1 
2 #ifndef LEVEL_H
3 #define LEVEL_H
4 
5 bool loadLevel(levelStruct *level, char *filename);
6 bool quickLoadLevel(levelStruct *level, char *filename);
7 bool loadLevelOld(levelStruct *level, char *filename);
8 void parseGlobalOption(int option, char *arguments, levelStruct *level, int quickParseMap);
9 void parseMapOptions(levelStruct *level, long position, mapStruct *map, int full_loading);
10 int getOptionNumber(char *argument);
11 void mapOption(int option, char *arg, mapStruct *map);
12 void levelOption(int option, char *arg, levelStruct *level);
13 void interpretData(mapStruct *map, levelStruct *level);
14 void initLevel(levelStruct *level);
15 unsigned long int checksum(char *);
16 char *cut(char *arg);
17 
18 
19 #define match(s) (strcmp(cmd, s) == 0)
20 
21 // Known options and corresponding code
22 // HEX 0x00 - 0x7F reserved to global options
23 // HEX 0x80 - 0xFF reserverd to map options
24 
25 #define NAME 		0x00 		 	// Name of the level
26 #define DESC 		0x01  		// Description of the level
27 #define TILESET	0x02 			// Tileset name
28 #define LIVES   0x03			// Number of lives
29 #define CARAI   0x04			// 0 - Original mode
30 													// 1 - Only small changes
31 													// 2 - No car AI
32 #define BORDER	0x05			// Border (argument is thickness)
33 #define SOUND		0x06			// Soundfile and arguments
34 #define RESOL   0x07      // Resolution of the screen
35 
36 #define SIZE 		0x80			// Map size
37 #define SPEED 	0x81			// Car speed
38 #define FUEL		0x82			// Fuel
39 #define BONUS 	0x83			// Bonus map
40 #define FUELPTS	0x84			// How many fuel for a extra point (if positive)
41 													// How many points for each extra fuel (if negative)
42 #define RADARMODE 0x85		// 0 - Original radar
43 													// 1 - Sonar like (thanks to Anatoly�A. Orehovsky for the code)
44 													// 2 - Fuel sonar mode (like sonar, but range is proportional to fuel)
45 													// 3 - Full map
46 #define ENEMYWAIT 0x86		// How many turns the enemy will wait before starting
47 
48 #endif
49