00001
00002 #ifndef MAIN_H
00003 #define MAIN_H
00004
00005
00006
00007 #define MAX_PLAYER_NAME 64
00008 #define MAX_CHEAT_STRING_BUFFER 16
00009
00010 #define GHOST_TAKEOVER 1
00011 #define RECORD_AVI 0
00012 #define CHECK_IP 0
00013 #define CHECK_ZZZ 0
00014
00015 #define SHOW_PHYSICS_INFO TRUE
00016
00017 #define MSCOMPILER_FUDGE_OPTIMISATIONS TRUE
00018
00019 #define MINUTES(_t) ((_t) / 60000)
00020 #define SECONDS(_t) (((_t) / 1000) % 60)
00021 #define THOUSANDTHS(_t) ((_t) % 1000)
00022
00023
00024
00025 enum {
00026 EDIT_NONE,
00027 EDIT_LIGHTS,
00028 EDIT_VISIBOXES,
00029 EDIT_OBJECTS,
00030 EDIT_INSTANCES,
00031 EDIT_AINODES,
00032 EDIT_ZONES,
00033 EDIT_TRIGGERS,
00034 EDIT_CAM,
00035 EDIT_FIELDS,
00036 EDIT_PORTALS,
00037
00038 EDIT_NUM
00039 };
00040
00041
00042
00043 typedef struct {
00044 long GameType, Level, LevelNum;
00045 unsigned long Reversed, Mirrored;
00046 unsigned long AutoBrake, CarID, Paws;
00047 } GAME_SETTINGS;
00048
00049 typedef struct {
00050 REAL GeomPers;
00051 REAL GeomCentreX;
00052 REAL GeomCentreY;
00053 REAL GeomScaleX;
00054 REAL GeomScaleY;
00055 REAL MatScaleX;
00056 REAL MatScaleY;
00057 REAL NearClip;
00058 REAL FarClip;
00059 REAL DrawDist;
00060 REAL FarDivDist;
00061 REAL FarMulNear;
00062 REAL FogStart;
00063 REAL FogDist;
00064 REAL FogMul;
00065 REAL VertFogStart;
00066 REAL VertFogEnd;
00067 REAL VertFogDist;
00068 REAL VertFogMul;
00069 long Env;
00070 long Mirror;
00071 long Shadow;
00072 long Light;
00073 long Instance;
00074 long Skid;
00075 } RENDER_SETTINGS;
00076
00077
00078
00079 extern LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
00080 extern bool InitWin(HINSTANCE hThisInst, int nWinMode);
00081 extern long Box(char *title, char *mess, long flag);
00082 extern void Vblank(char count);
00083 extern void GameLoop(void);
00084 extern void Go(void);
00085 extern void GoFront(void);
00086 extern void SetupGame(void);
00087 extern void InitPlayersTrial(void);
00088 extern void InitPlayersSingle(void);
00089 extern void InitPlayersNetwork(void);
00090 extern void InitPlayeresFullArray(void);
00091 extern void CheckCheatStrings(void);
00092
00093
00094
00095 extern char Everything;
00096 extern char NoGamma;
00097 extern char AppRestore;
00098 extern char QuitGame;
00099 extern char FullScreen;
00100 extern unsigned long FrameCount, FrameCountLast, FrameTime, FrameTimeLast, FrameRate;
00101 extern char DetailMenuTogg;
00102 extern long EditMode;
00103 extern REAL TimeFactor;
00104 extern REAL TimeStep;
00105 extern REAL EditScale;
00106 extern HWND hwnd;
00107 extern HBITMAP TitleHbm;
00108 extern void (*Event)(void);
00109 extern GAME_SETTINGS GameSettings;
00110 extern RENDER_SETTINGS RenderSettings;
00111 extern int __argc;
00112 extern char **__argv;
00113
00114 #if SHOW_PHYSICS_INFO
00115 #include "draw.h"
00116 extern long DEBUG_CollGrid;
00117 extern int DEBUG_NCols;
00118 extern int DEBUG_LastNCols;
00119 extern int DEBUG_N2Cols;
00120 extern VEC DEBUG_dR;
00121 extern VEC DEBUG_Impulse;
00122 extern VEC DEBUG_AngImpulse;
00123 extern VEC DEBUG_SNorm[256];
00124 extern FACING_POLY DEBUG_Faces[256];
00125 #endif
00126
00127 #endif