00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _LEVEL_H_
00018 #define _LEVEL_H_
00019
00020 #include "car.h"
00021
00022
00023
00024
00025
00026 #define MAX_LEVELS 256
00027 #define MAX_LEVEL_DIR_NAME 16
00028 #define MAX_LEVEL_NAME 64
00029 #define MAX_ENV_NAME 32
00030
00031 #define FILENAME_MAKE_BODY 1
00032 #define FILENAME_GAME_SETTINGS 2
00033
00034 enum {
00035 GAMETYPE_TRIAL,
00036 GAMETYPE_SINGLE,
00037 GAMETYPE_SERVER,
00038 GAMETYPE_CLIENT,
00039 GAMETYPE_SESSIONLOST,
00040 };
00041
00042 typedef struct {
00043 long Time;
00044 char Player[MAX_PLAYER_NAME];
00045 char Car[CAR_NAMELEN];
00046 } ONE_RECORD_ENTRY;
00047
00048 typedef struct {
00049 long SplitTime[MAX_SPLIT_TIMES];
00050 ONE_RECORD_ENTRY RecordLap[MAX_RECORD_TIMES];
00051 ONE_RECORD_ENTRY RecordRace[MAX_RECORD_TIMES];
00052 } RECORD_ENTRY;
00053
00054
00055
00056 typedef struct {
00057 char Dir[MAX_LEVEL_DIR_NAME];
00058 char Name[MAX_LEVEL_NAME];
00059 char EnvStill[MAX_ENV_NAME];
00060 char EnvRoll[MAX_ENV_NAME];
00061 VEC NormalStartPos, ReverseStartPos;
00062 float NormalStartRot, ReverseStartRot;
00063 long NormalStartGrid, ReverseStartGrid;
00064 float FarClip;
00065 float FogStart;
00066 long FogColor;
00067 float VertFogStart;
00068 float VertFogEnd;
00069 long WorldRGBper;
00070 long ModelRGBper;
00071 long InstanceRGBper;
00072 long MirrorType;
00073 float MirrorMix;
00074 float MirrorIntensity;
00075 float MirrorDist;
00076 } LEVELINFO;
00077
00078
00079
00080 extern LEVELINFO *LevelInf;
00081 extern GAME_SETTINGS GameSettings;
00082 extern VEC LEV_StartPos;
00083 extern REAL LEV_StartRot;
00084 extern long LEV_StartGrid;
00085
00086
00087
00088
00089 extern void LEV_InitLevel(void);
00090 extern void LEV_EndLevel(void);
00091 extern void FindLevels(void);
00092 extern void FreeLevels(void);
00093 extern long GetLevelNum(char *dir);
00094 extern char *GetLevelFilename(char *filename, long flag);
00095 extern bool LoadLevelFields(LEVELINFO *LevelInfo);
00096 extern VEC *LEV_LevelFieldPos;
00097 extern MAT *LEV_LevelFieldMat;
00098
00099 #endif
00100