Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gamedefs.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           gamedefs.h  -  description
00003                              -------------------
00004     begin                : Tue Jul 24 2001
00005     copyright            : (C) 2001 by T Kontkanen
00006     email                : tkontkanen@mail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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  //limitations
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                                         // smaller number means higher resolution but it eats more memory
00045 
00046 //macros:
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 //some action numbers, numbers 0-31 are reserved for standard actions, 32-? are for special actions
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 //special actions:
00063 #define A_TEST 32 // for testing/debugging purposes only
00064 
00065 
00066 
00067 //unit types
00068 #define UNIT_MARINE 1
00069 
00070 //model files
00071 #define MARINE_MODEL "/files/3d/executor/marine.t3d"
00072 #define MARKER_MODEL "/files/3d/cross.t3d"
00073 //#define MARINE_MODEL "/files/3d/executor/medic.t3d"
00074 
00075 
00076  #endif

Generated at Fri Oct 5 20:23:52 2001 for Executor by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001