					*--- XRally level file specification ---*

	XRally supports loading of custom made levels. A level is a file which
contains several maps. It's specification is very simple:

	Comments: Lines starting with # are disgarded as comments

	*** First section: Level Options ***

	In this section you will add all the level specific options at one line. The options are:

	|| name <LEVEL NAME> ||
		- The name of the map (not used yet)
	|| tileset <TILESET NAME> ||
		- The tileset to use. (see the "tileset" file). You can use default and it will work
	|| desc <LEVEL DESCRIPTION> ||
		- A description for the level (not used yet)
	|| lives <NUMBER OF LIVES> <EXTRA LIVE> <LIVES BONUS> ||
		- How many lives the player will have. If you supply a number < 0, it will enter special test mode, and you will be able to choose which map to play. The extra live argument will mean how much points you must make to get another life. (This value is the necessary to get the first life. To get the second, you must do twice this value, etc). The lives bonus argument is how many points you will receive for each live you have at the end of the level (if it is negative, it means how many points you will receive for each live beyond the starting ones)
    - DEFAULTS:
      NUMBER OF LIVES = 5
      EXTRA LIVE = 5000
      LIVES BONUS = -1000
	|| carai <AI MODE> ||
		- The ai mode of the player car.
		 - -1 will disable all car control... the car will only be controled by his ai
		 - 0  will act as default. The player car can't never stop
		 - 1  will correct only small mistakes, when the player wants to go to a direction but can't because of a few pixels deslocated.
		 - 2  will disable all car ai. (NOT THE ENEMY AI)
    - DEFAULT = 0
	|| sound <SOUND FILE> <VOLUME> ||
		- Tells the game to look for the sounds in the file "sounds/SOUNDFILE" and play the background music at <VOLUME> (not the sound effects)
	|| border <WIDTH> ||
		- Draw a border of WIDTH pixels around the blocks, like in the classic Rally X
    - DEFAULT = 0
  || resol <X RESOL> <Y RESOL> ||
    - Change the game window resolution, ie, how many tiles are painted in the
      screen
    - DEFAULT
      X RESOL = 10
      Y RESOL = 10

			--*		  EXAMPLE 	 *--
			
			# Example level
			name Example Level
			tileset default
			desc This is a example level
			lives 9
			
			--* END OF EXAMPLE *--
	

	*** Second section: Maps options ***

	First start the map section with a '-' in a single line.
	Then you can add the map options. They work the same way as the level options:

	|| speed <CAR SPEED> <AI SPEED> ||
		- The speed of your car and the speed of the ai. If you enter a 0 for any of them, it will use the default value. (you can also just enter the car speed and leave the ai one blank)
    - DEFAULT:
      CAR SPEED = 9
      AI SPEED = 10
	|| size <WIDTH> <HEIGHT> ||
		- The size of this map. THIS IS VERY IMPORTANT! If you forget this options, the game will probably crash!
	|| fuel <FUEL AMOUNT> <FUEL IMPACT> ||
		- How much fuel the car will have at the start of the map and the impact on the car speed when it ends (higher numbers, lower impact)
    - DEFAULT
      FUEL AMOUNT = WIDTH*HEIGHT*PIXMAP_SIZE*4.5
      FUEL IMPACT = 1
	|| bonus ||
		- Bonus map: If the fuel ends or the car is caught it doesn't lose a live, just move on to the next map. Besides, display a nice "BONUS!" string at start of the level.
	|| fuelpts <POINTS> ||
		- Bonus points for fuel. If positive, you will receive (remainingFuel / fuelpts) extra points. If negative, you will receive (remainingFuel * fuelpts)
    - DEFAULT = 5
	|| radarmode <MODE> <RANGE> ||
		- Mode of the radar. (The RANGE command is only important with the modes 1 and 2)
			0 -> Original mode (shows only you, the enemy and the flags)
			1 -> Sonar mode (shows fully a circle area around you, of RANGE radius)
			2 -> Fuel sonar mode (like sonar mode, but RANGE decreases with your fuel)
			3 -> Full mode (shows everything)
    - DEFAULT = ORIGINAL
	|| enemywait <TIME> ||
		- How many game turns the enemy will wait, being confused, before it will start moving (make it more compatible with the original Rally X)
    - DEFAULT = 0
	
	You can put map options in the level options section. This options will take effect for all the maps in the level. (Take a look at the "maps/Test Level" file for details)
	
	Then you add the map data in itself. The map must have <height> lines,
each one of <width> characters. The following characters are allowed:

	0 -> Indicate nothing: A place where the car can walk
	1 -> Indicate a wall
	A -> Indicate the start point for a enemy car
	F -> Indicate the location of a flag
	P -> Indicate the location of a pit (oil, rocks, roadblocks, etc)
	U -> Indicate the start point for the player car, facing up
	D -> Indicate the start point for the player car, facing down
	L -> Indicate the start point for the player car, facing left
	R -> Indicate the start point for the player car, facing right

	You can use lowercase or uppercase letters. If you use any letter that the
program doesn't recognize, it will treat it as a 0

	The only limit of the number of maps a level can have, the number of
enemys of a map or stuff like that is the memory of your computer. So, if you
have huge machine, nothing stop you of creating a 150x160 map with 30 enemy
cars... :)

			--*			EXAMPLE	 	 *--
			# Example level
			name Example Level
			tileset default
			desc This is a example level
			lives 9
			# Let's make the car speed 20 and the ai speed 10 for all the maps
			speed 20 10
 			# Map separator. Starts map 0
			-
			# Width and Height -> As you can see, the map doesn't have to be a square
			size 5 7
			# This is a bonus map!
			bonus
			# Map data -> not a very playable map, but I think you can have a idea of it
			# by now
			F000F
			01110
			A1D00
			01010
			01010
			0110F
			FA001
			# Map separator. Starts map 1
			-
			# Size of the map
			size 3 3
			# Speed -> Let's make the AI faster then the car just for this map
			speed 10 15
			0D0
			0FF
			00A
			--* END OF EXAMPLE *--

	For further examples, see the file "Test Level" in the maps subdirectory.

	To use your maps, just save the in the maps subdirectory. They will appear next time you run the game.

	*** Custom tilesets ***

	As from XRally 0.8 you have the opportunity to use custom images. This allows you to have more than 1 pixmap for the block or the road tiles. So, you can create special effects like bridges, roads, shadows or anything like that. The custom images are saved in the tileset directory as "block[2-6].xpm" or "road[2-6].xpm" (see the tileset file for details). You can have up to 5 custom blocks and 5 custom road. (this limitation will be lifted up in future versions)

	--* To use them: *--

	To use the custom blocks, instead of using a "1" in the map description, use the keys of the bottom row of your keyboard (z, x, c, v, b). The letter "z" maps to the "block2.xpm" file. The letter "x", to the "block3.xpm" and so on (so, "b" maps to "block6.xpm").

	To use the custom road tiles, use the numbers of the top row of the keyboard. So, "2" maps to "road2.xpm", "3" to "road3.xpm", up to "6", which maps to "road6.xpm".

	To see examples, just load the map number 2, from the "Test Level". You will see different images as the blocks. If you take a look at the file, you will noticed that it is like this:

			--*    EXAMPLE     *--
			-
			size 16 16
			00000F0000000000
			0111111111111110
			0000000000000000
			010zzzzzzzzzz010
			0100000000000010
			010z0xxxxxx0zF10
			010z00000000z010
			F10z0x0cc0x0z01F
			010z0xUcc0x0z010
			010z00000000z010
			010z0xxxxxx0z010
			0100000000000010
			010zzzzzzzzzz010
			0000A000000F0000
			0111111111111110
			F000000000000000
			--* END OF EXAMPLE *--

	As you can see, the letters "z", "x" and "c" reffers to the images "block2.xpm", "block3.xpm" and "block4.xpm" in the default tileset.

