00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GAMEDEFS_H
00019 #define GAMEDEFS_H
00020
00021
00022 #define M_LEFT 0
00023 #define M_MIDDLE 1
00024 #define M_RIGHT 2
00025
00026 #define SCREEN_BORDER_SIZE 10
00027
00028
00029 #define MAX_PLAYERS 16
00030 #define MAX_UNITS 500
00031 #define MAX_TGL_OBJECTS 500
00032 #define MAX_FILE_NAME_LEN 256
00033 #define MAX_TEXTURES 128 //limit for Renderer
00034 #define MAX_TGL_TEXTURES 128 //limit for TGL
00035 #define MAX_GUIBUTTONS 128 //limit for GameGUI
00036
00037 #define MAINLOOP_FPS 100
00038 #define MAINLOOP_TIME (1000/MAINLOOP_FPS) // how long time (ms) one mainloop cycle takes
00039 #define MAINLOOP_FPSINV (1.0/float(MAINLOOP_FPS))
00040 #define FRAMERATE 33 // units' framerate
00041 #define UNIT_CYCLE_TIME (1000/FRAMERATE) // how often to step units
00042 #define RAMERATEINV (1.0/float(FRAMERATE))
00043 #define GROUND_GRID_RESOLUTION 2 // size in meter of resolution how tightly units and buildings can be positioned,
00044
00045
00046
00047
00048 #define MAINLOOP_PER_FRAME(x) (float(x)*MAINLOOP_FPSINV) //multiplying is faster than x/FRAMERATE on x86
00049 #define PER_FRAME(x) (float(x)*RAMERATEINV) //multiplying is faster than x/FRAMERATE on x86
00050 #define RAD_TO_DEG(x) (float(x)*57.2957795131)
00051 #define DEG_TO_RAD(x) (float(x)*0.1745329252)
00052
00053
00054 #define A_NONE -1
00055 #define A_CANCEL 0
00056 #define A_MOVE 1
00057 #define A_HOLD_POSITION 2
00058 #define A_PATROL 3
00059 #define A_ATTACK 4
00060 #define A_HARVEST_REPAIR 5
00061 #define A_AUTO 6
00062
00063 #define A_TEST 32 // for testing/debugging purposes only
00064
00065
00066
00067
00068 #define UNIT_MARINE 1
00069
00070
00071 #define MARINE_MODEL "/files/3d/executor/marine.t3d"
00072 #define MARKER_MODEL "/files/3d/cross.t3d"
00073
00074
00075
00076 #endif