R:/projects/actioncube/_svn/trunk/ac/source/src/main.cpp File Reference

#include "pch.h"
#include "cube.h"

Include dependency graph for main.cpp:


Defines

#define initlog(s)   puts("init: " s)

Functions

void cleanup (char *msg)
 VAR (resetcfg, 0, 0, 1)
void quit ()
void fatal (const char *s,...)
struct tm * systemtime ()
bool initwarning (const char *desc, int level, int type)
 VARF (scr_w, 320, 1024, 10000, initwarning("screen resolution"))
 VARF (scr_h, 200, 768, 10000, initwarning("screen resolution"))
 VARF (colorbits, 0, 0, 32, initwarning("color depth"))
 VARF (depthbits, 0, 0, 32, initwarning("depth-buffer precision"))
 VARF (stencilbits, 0, 0, 32, initwarning("stencil-buffer precision"))
 VARF (fsaa,-1,-1, 16, initwarning("anti-aliasing"))
 VARF (vsync,-1,-1, 1, initwarning("vertical sync"))
void setfullscreen (bool enable)
 VARF (fullscreen, 0, 1, 1, setfullscreen(fullscreen!=0))
void writeinitcfg ()
 VARP (screenshottype, 0, 1, 1)
 VARP (jpegquality, 10, 70, 100)
const char * maketimestr ()
void jpeg_screenshot (char *imagepath)
void bmp_screenshot (char *imagepath)
void screenshot (char *imagepath)
void makeautoscreenshot ()
 COMMAND (screenshot, ARG_1STR)
 COMMAND (quit, ARG_NONE)
void screenres (int w, int h)
void setresdata (char *s, enet_uint32 c)
 COMMAND (screenres, ARG_2INT)
 VARFP (gamma, 30, 100, 300,{float f=gamma/100.0f;if(SDL_SetGamma(f, f, f)==-1){conoutf("Could not set gamma (card/driver doesn't support it?)");conoutf("sdl: %s", SDL_GetError());}})
void resetgamma ()
void setupscreen (int &usedcolorbits, int &useddepthbits, int &usedfsaa)
void resetgl ()
 COMMAND (resetgl, ARG_NONE)
 VARP (maxfps, 0, 200, 1000)
void limitfps (int &millis, int curmillis)
void fpsrange (int low, int high)
 COMMAND (fpsrange, ARG_2INT)
void keyrepeat (bool on)
void checkinput ()
 VARF (gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed=100)
 VARF (paused, 0, 0, 1, if(multiplayer()) paused=0)
static void clockreset ()
 VARFP (clockerror, 990000, 1000000, 1010000, clockreset())
 VARFP (clockfix, 0, 0, 1, clockreset())
int main (int argc, char **argv)
 VAR (version, 1, AC_VERSION, 0)

Variables

SDL_Surface * screen = NULL
static int initing = NOT_INITING
static bool restoredinits = false
time_t now_utc
bool needsautoscreenshot = false
int lowfps = 30
int highfps = 40
static int ignoremouse = 5
static int grabmouse = 0
bool firstrun = false
static int clockrealbase = 0
static int clockvirtbase = 0

Define Documentation

#define initlog ( s   )     puts("init: " s)


Function Documentation

void bmp_screenshot ( char *  imagepath  ) 

void checkinput (  ) 

void cleanup ( char *  msg  ) 

static void clockreset (  )  [static]

COMMAND ( fpsrange  ,
ARG_2INT   
)

COMMAND ( resetgl  ,
ARG_NONE   
)

COMMAND ( screenres  ,
ARG_2INT   
)

COMMAND ( quit  ,
ARG_NONE   
)

COMMAND ( screenshot  ,
ARG_1STR   
)

void fatal ( const char *  s,
  ... 
)

void fpsrange ( int  low,
int  high 
)

bool initwarning ( const char *  desc,
int  level,
int  type 
)

void jpeg_screenshot ( char *  imagepath  ) 

void keyrepeat ( bool  on  ) 

void limitfps ( int &  millis,
int  curmillis 
)

int main ( int  argc,
char **  argv 
)

void makeautoscreenshot (  ) 

const char* maketimestr (  ) 

void quit (  ) 

void resetgamma (  ) 

void resetgl (  ) 

void screenres ( int  w,
int  h 
)

void screenshot ( char *  imagepath  ) 

void setfullscreen ( bool  enable  ) 

void setresdata ( char *  s,
enet_uint32  c 
)

void setupscreen ( int &  usedcolorbits,
int &  useddepthbits,
int &  usedfsaa 
)

struct tm* systemtime (  )  [read]

VAR ( version  ,
1  ,
AC_VERSION  ,
0   
)

VAR ( resetcfg  ,
0  ,
0  ,
1   
)

VARF ( paused  ,
0  ,
0  ,
1  ,
if(multiplayer())  paused = 0 
)

VARF ( gamespeed  ,
10  ,
100  ,
1000  ,
if(multiplayer())  gamespeed = 100 
)

VARF ( fullscreen  ,
0  ,
1  ,
1  ,
setfullscreen(fullscreen!=0)   
)

VARF ( vsync  ,
-  1,
-  1,
1  ,
initwarning("vertical sync")   
)

VARF ( fsaa  ,
-  1,
-  1,
16  ,
initwarning("anti-aliasing")   
)

VARF ( stencilbits  ,
0  ,
0  ,
32  ,
initwarning("stencil-buffer precision")   
)

VARF ( depthbits  ,
0  ,
0  ,
32  ,
initwarning("depth-buffer precision")   
)

VARF ( colorbits  ,
0  ,
0  ,
32  ,
initwarning("color depth")   
)

VARF ( scr_h  ,
200  ,
768  ,
10000  ,
initwarning("screen resolution")   
)

VARF ( scr_w  ,
320  ,
1024  ,
10000  ,
initwarning("screen resolution")   
)

VARFP ( clockfix  ,
0  ,
0  ,
1  ,
clockreset()   
)

VARFP ( clockerror  ,
990000  ,
1000000  ,
1010000  ,
clockreset()   
)

VARFP ( gamma  ,
30  ,
100  ,
300   
)

VARP ( maxfps  ,
0  ,
200  ,
1000   
)

VARP ( jpegquality  ,
10  ,
70  ,
100   
)

VARP ( screenshottype  ,
0  ,
1  ,
1   
)

void writeinitcfg (  ) 


Variable Documentation

int clockrealbase = 0 [static]

int clockvirtbase = 0 [static]

bool firstrun = false

int grabmouse = 0 [static]

int highfps = 40

int ignoremouse = 5 [static]

int initing = NOT_INITING [static]

int lowfps = 30

bool needsautoscreenshot = false

time_t now_utc

bool restoredinits = false [static]

SDL_Surface* screen = NULL


Generated on Mon Dec 8 21:41:32 2008 for AssaultCube by  doxygen 1.5.7.1