Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions | Variables
main.cpp File Reference
#include <boost/algorithm/clamp.hpp>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory>
#include <string>
#include "SDL.h"
#include "SDL_cpuinfo.h"
#include "SDL_error.h"
#include "SDL_hints.h"
#include "SDL_mouse.h"
#include "SDL_stdinc.h"
#include "SDL_video.h"
#include <enet/enet.h>
#include "inexor/client/network.hpp"
#include "inexor/crashreporter/CrashReporter.hpp"
#include "inexor/engine/decal.hpp"
#include "inexor/engine/frame.hpp"
#include "inexor/engine/lightmap.hpp"
#include "inexor/engine/movie.hpp"
#include "inexor/engine/octa.hpp"
#include "inexor/engine/octaedit.hpp"
#include "inexor/engine/octarender.hpp"
#include "inexor/engine/octree.hpp"
#include "inexor/engine/renderbackground.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/renderparticles.hpp"
#include "inexor/engine/rendertext.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/engine/world.hpp"
#include "inexor/fpsgame/client.hpp"
#include "inexor/fpsgame/config.hpp"
#include "inexor/fpsgame/fps.hpp"
#include "inexor/io/Error.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/io/input/InputRouter.hpp"
#include "inexor/io/legacy/stream.hpp"
#include "inexor/network/SharedFunc.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/sound/mumble.hpp"
#include "inexor/sound/sound.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"
#include "inexor/util/Subsystem.hpp"
#include "inexor/util/legacy_time.hpp"

Namespaces

 inexor
 Show stacktrace on unix, do not include directly.
 
 inexor::rendering
 
 inexor::rendering::screen
 
 inexor::io
 

Functions

void writeinitcfg ()
 write most important settings to init.cfg using an UTF-8 stream More...
 
void cleanup ()
 cleans up game memory and SDL at exit More...
 
void quit ()
 normal game quit More...
 
 COMMAND (quit,"")
 
 SharedFunc (quit)
 
void cleanup_application ()
 
 inexor::rendering::screen::ICOMMAND (screenres,"ii",(int *w, int *h), screen_manager.screenres(*w,*h))
 
 inexor::rendering::screen::VARF (scr_w, SCR_MINW,-1, SCR_MAXW, screen_manager.screenres(scr_w,-1))
 change screen width and height More...
 
 inexor::rendering::screen::VARF (scr_h, SCR_MINH,-1, SCR_MAXH, screen_manager.screenres(-1, scr_h))
 
 inexor::rendering::screen::VAR (colorbits, 0, 0, 32)
 various buffer precisions and anti aliasing More...
 
 inexor::rendering::screen::VARF (depthbits, 0, 0, 32, initwarning("depth-buffer precision"))
 
 inexor::rendering::screen::VARF (stencilbits, 0, 0, 32, initwarning("stencil-buffer precision"))
 
 inexor::rendering::screen::VARFP (vsync, 0, 0, 1, screen_manager.restorevsync())
 VSYNC settings. More...
 
 inexor::rendering::screen::VARFP (vsynctear, 0, 0, 1,{if(vsync) screen_manager.restorevsync();})
 
 inexor::rendering::screen::VARF (fsaa,-1,-1, 16, initwarning("anti-aliasing"))
 
 inexor::rendering::screen::VARF (fullscreen, 0, 1, 1, screen_manager.setfullscreen(fullscreen!=0))
 
 inexor::rendering::screen::VARFP (gamma, 30, 100, 300,{if(gamma==screen_manager.curgamma) return;screen_manager.curgamma=gamma;if(SDL_SetWindowBrightness(screen_manager.sdl_window, gamma/100.0f)==-1) Log.std->error("Could not set gamma: {}", SDL_GetError());})
 screen gamma as float value More...
 
 inexor::io::VARNP (input_router.relativemouse, userelativemouse, 0, 1, 1)
 try to initialise mouse with relative coordinates instead of absolute coordinates More...
 
void resetgl ()
 reset OpenGL manually (/resetgl command) this function is not called in the entire code More...
 
 COMMAND (resetgl,"")
 
 VAR (numcpus, 1, 1, 16)
 
static bool findarg (int argc, char **argv, const char *str)
 find command line argument More...
 
 ICOMMANDERR (subsystem_start,"s",(char *s), std::string ccs{s};metapp.start(ccs))
 
 ICOMMANDERR (subsystem_stop,"s",(char *s), std::string ccs{s};metapp.stop(ccs))
 
int main (int argc, char **argv)
 

Variables

dynentplayer = nullptr
 local player More...
 
int initing = NOT_INITING
 
inexor::util::Metasystem metapp
 
SharedVar< char * > package_dir ((char *)"media/essential")
 
SharedVar< char * > package_dir2 ((char *)"media/additional")
 

Function Documentation

void cleanup ( )
void cleanup_application ( )

Referenced by fatal().

COMMAND ( quit  ,
""   
)
COMMAND ( resetgl  ,
""   
)
static bool findarg ( int  argc,
char **  argv,
const char *  str 
)
static

find command line argument

ICOMMANDERR ( subsystem_start  ,
"s"  ,
(char *s)  ,
std::string ccs{s};metapp.  startccs 
)
ICOMMANDERR ( subsystem_stop  ,
"s"  ,
(char *s)  ,
std::string ccs{s};metapp.  stopccs 
)
int main ( int  argc,
char **  argv 
)

References addpackagedir(), ASSERT, game::autoexec(), camera1, inexor::io::InputRouter::checkinput(), checksleep(), game::defaultconfig(), dir, elapsedtime, emptymap(), execfile(), execute(), fatal(), findfile(), game::gamespeed, get_current_max_fps(), gl_checkextensions(), gl_drawframe(), gl_drawmainmenu(), gl_init(), identflags, IDF_PERSIST, inexor::io::InputRouter::ignoremousemotion(), inbetweenframes, INIT_LOAD, INIT_RESET, game::initclient(), initdecals(), inexor::util::Metasystem::initialize(), initing, inexor::sound::initmumble(), initscript, inexor::sound::initsound(), inexor::io::input_router, inexor::io::InputRouter::inputgrab(), game::ispaused(), game::iterdynents(), lastmillis, loadhistory(), loadshaders(), Log, inexor::util::log_manager::logfile, mainmenu, menuprocess(), metapp, inexor::rendering::screen::ScreenManager::minimized, NOT_INITING, notexture, package_dir, package_dir2, particleinit(), player, recomputecamera(), renderbackground(), renderedframe, resetfpshistory(), game::restoreconfig(), game::savedconfig(), game::savedservers(), inexor::rendering::screen::screen_manager, inexor::io::InputRouter::set_grab_input(), setfont(), inexor::rendering::screen::ScreenManager::setupscreen(), inexor::util::Metasystem::start(), inexor::util::log_manager::start_stop, SUBSYSTEM_REQUIRE, inexor::rendering::screen::ScreenManager::swapbuffers(), textureload(), inexor::util::Metasystem::tick(), tryedit(), UNUSED, updatefpshistory(), updateparticles(), inexor::sound::updatesounds(), updatetime(), game::updateworld(), and writecfg().

Referenced by findglslmain().

void quit ( )
void resetgl ( )
SharedFunc ( quit  )
VAR ( numcpus  ,
,
,
16   
)
void writeinitcfg ( )

Variable Documentation

int initing = NOT_INITING

Referenced by main(), and quit().

SharedVar<char *> package_dir((char *)"media/essential")

Referenced by main().

SharedVar<char *> package_dir2((char *)"media/additional")

Referenced by main().

dynent* player = nullptr