(svn r4374) Never directly commit something you prepared the evening before, mysteriously it will break in the morning, fix r4373
This commit is contained in:
		
							
								
								
									
										26
									
								
								road.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								road.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					/* $Id$ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef ROAD_H
 | 
				
			||||||
 | 
					#define ROAD_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef enum RoadBits {
 | 
				
			||||||
 | 
						ROAD_NW  = 1,
 | 
				
			||||||
 | 
						ROAD_SW  = 2,
 | 
				
			||||||
 | 
						ROAD_SE  = 4,
 | 
				
			||||||
 | 
						ROAD_NE  = 8,
 | 
				
			||||||
 | 
						ROAD_X   = ROAD_SW | ROAD_NE,
 | 
				
			||||||
 | 
						ROAD_Y   = ROAD_NW | ROAD_SE,
 | 
				
			||||||
 | 
						ROAD_ALL = ROAD_X  | ROAD_Y
 | 
				
			||||||
 | 
					} RoadBits;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline RoadBits ComplementRoadBits(RoadBits r)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return ROAD_ALL ^ r;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline RoadBits DiagDirToRoadBits(DiagDirection d)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 1 << (3 ^ d);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										21
									
								
								road_map.h
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								road_map.h
									
									
									
									
									
								
							@@ -5,28 +5,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "macros.h"
 | 
					#include "macros.h"
 | 
				
			||||||
#include "rail.h"
 | 
					#include "rail.h"
 | 
				
			||||||
 | 
					#include "road.h"
 | 
				
			||||||
#include "tile.h"
 | 
					#include "tile.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef enum RoadBits {
 | 
					 | 
				
			||||||
	ROAD_NW  = 1,
 | 
					 | 
				
			||||||
	ROAD_SW  = 2,
 | 
					 | 
				
			||||||
	ROAD_SE  = 4,
 | 
					 | 
				
			||||||
	ROAD_NE  = 8,
 | 
					 | 
				
			||||||
	ROAD_X   = ROAD_SW | ROAD_NE,
 | 
					 | 
				
			||||||
	ROAD_Y   = ROAD_NW | ROAD_SE,
 | 
					 | 
				
			||||||
	ROAD_ALL = ROAD_X  | ROAD_Y
 | 
					 | 
				
			||||||
} RoadBits;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline RoadBits ComplementRoadBits(RoadBits r)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return ROAD_ALL ^ r;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline RoadBits DiagDirToRoadBits(DiagDirection d)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return 1 << (3 ^ d);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef enum RoadType {
 | 
					typedef enum RoadType {
 | 
				
			||||||
	ROAD_NORMAL,
 | 
						ROAD_NORMAL,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,7 +84,7 @@ enum {
 | 
				
			|||||||
	BRIDGE_PARTLY_LEVELED_FOUNDATION = 1 << 1 | 1 << 2 | 1 << 4 | 1 << 8,
 | 
						BRIDGE_PARTLY_LEVELED_FOUNDATION = 1 << 1 | 1 << 2 | 1 << 4 | 1 << 8,
 | 
				
			||||||
	// no foundations (X,Y direction) (tileh's 0, 3, 6, 9, 12)
 | 
						// no foundations (X,Y direction) (tileh's 0, 3, 6, 9, 12)
 | 
				
			||||||
	BRIDGE_NO_FOUNDATION = 1 << 0 | 1 << 3 | 1 << 6 | 1 << 9 | 1 << 12,
 | 
						BRIDGE_NO_FOUNDATION = 1 << 0 | 1 << 3 | 1 << 6 | 1 << 9 | 1 << 12,
 | 
				
			||||||
	BRIDGE_HORZ_RAMP = (BRIDGE_PARTLY_LEVELED_FOUNDATION | BRIDGE_NO_FOUNDATION) & ~0
 | 
						BRIDGE_HORZ_RAMP = (BRIDGE_PARTLY_LEVELED_FOUNDATION | BRIDGE_NO_FOUNDATION) & ~(1 << 0)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline const PalSpriteID *GetBridgeSpriteTable(int index, byte table)
 | 
					static inline const PalSpriteID *GetBridgeSpriteTable(int index, byte table)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user