1 #ifndef __ROAD_SMOOTHING_H
2 #define __ROAD_SMOOTHING_H
3 
4 //There are the 32 macro definitions that make up all of the road pieces.  These enumerations
5 //match up exactly to the previous road system order of graphics (FIRSTROAD1 - FIRSTROAD32)
6 enum
7 {
8 	L1,		//left 1 -- this is a left straight-away edge
9 	R1,		//right 1
10 	B1,		//bottom 1
11 	T1,		//top 1
12 	TTR,	//top top-right corner piece (the top part of the top-right corner)
13 	BTR,	//bottom top-right corner piece (the bottom part of the top-right corner)
14 	LBL,	//left bottom-left corner piece
15 	RBL,	//right bottom-left corner piece
16 	LTL,	//left top-left corner piece
17 	RTL,	//right top-left corner piece
18 	RBR,	//right bottom-right corner piece
19 	LBR,	//left bottom-right corner piece
20 	L2,		//left 2  (variation of the left 1)
21 	R2,		//right 2
22 	L3,		//left 3
23 	R3,		//right 3
24 	B2,		//bottom 2
25 	T2,		//top 2
26 	B3,		//bottom 3
27 	T3,		//top 3
28 	BI,		//bottom intersection (piece connecting bottom to right)
29 	LI,		//left intersection		(piece connecting left to bottom )
30 	TI,		//top intersection		(piece connecting top to left)
31 	RI,		//right intersection  (piece connection right to top)
32 	L4,		//left 4
33 	R4,		//right 4
34 	B4,		//bottom 4
35 	T4,		//top 4
36 	RE,		//right edge (end of road)
37 	LE,		//left edge
38 	BE,		//bottom edge
39 	TE,		//top edge
40 	NUM_ROAD_MACROS
41 };
42 
43 //The old road system used multi-tiled roads as a single image.  The new road system has taken these large
44 //pieces and chopped them up into single tiled images (to mitigate lighting problems).  Some of the larger
45 //road pieces turned into 18 smaller pieces.  So this function will go analyse the world, and replaces any
46 //locations containing the original road tile information, delete it, and replace it by inserting it's
47 //equivalent macro.
48 void ReplaceObsoleteRoads(void);
49 
50 //Road macros vary in size from 3 gridnos to 18 gridnos.  Using the anchor gridno based off of the original
51 //road system, this function will place the new macro (consisting of multiple road pieces in multiple
52 //gridnos).
53 void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID );
54 
55 void InitializeRoadMacros(void);
56 
57 
58 #endif
59