src/table/ai_rail.h
branchnoai
changeset 9694 e72987579514
parent 9627 6a7c8ead2328
child 6818 8c977ca780fe
child 10429 1b99254f9607
child 10801 3ad9dfb5430d
--- a/src/table/ai_rail.h	Fri Aug 03 19:16:36 2007 +0000
+++ b/src/table/ai_rail.h	Fri Aug 03 22:09:42 2007 +0000
@@ -2,7 +2,7 @@
 
 struct AiDefaultBlockData {
 	byte mode;
-	byte attr;
+	DiagDirection attr;
 	TileIndexDiffC tileoffs;
 };
 
@@ -22,11 +22,11 @@
 
 
 #define MKHDR(a, b, c, d, e) a, b, c, d, e,
-#define MKDEPOT(a, b, c)   {0, a, {b, c}}
-#define MKSTATION(a, b, c) {1, a, {b, c}}
-#define MKRAIL(a, b, c)    {2, a, {b, c}}
-#define MKCLRRAIL(a, b, c) {3, a, {b, c}}
-#define MKEND              {4, 0, {0, 0}}
+#define MKDEPOT(a, b, c)   {0, (DiagDirection)a, {b, c}}
+#define MKSTATION(a, b, c) {1, (DiagDirection)a, {b, c}}
+#define MKRAIL(a, b, c)    {2, (DiagDirection)a, {b, c}}
+#define MKCLRRAIL(a, b, c) {3, (DiagDirection)a, {b, c}}
+#define MKEND              {4, (DiagDirection)0, {0, 0}}
 
 static const AiDefaultBlockData _raildata_ai_0_data[] = {
 	MKDEPOT(2, -1, 1),
@@ -555,38 +555,50 @@
 	NULL
 };
 
-#define MKAIR(a, b, c) {0, a, {b, c}}
+#undef MKHDR
+#undef MKDEPOT
+#undef MKSTATION
+#undef MKRAIL
+#undef MKCLRRAIL
+#undef MKEND
+
+
+#define MKAIR(a, b, c) {0, (DiagDirection)a, {b, c}}
+#define MKEND() {1, (DiagDirection)0, {0, 0}}
 
 static const AiDefaultBlockData _airportdata_ai_0[] = {
 	MKAIR(1, 0, 0),
-	{1, 0, {0, 0}},
+	MKEND(),
 };
 
 static const AiDefaultBlockData _airportdata_ai_1[] = {
 	MKAIR(0, 0, 0),
-	{1, 0, {0, 0}}
+	MKEND(),
 };
 
 static const AiDefaultBlockData _airportdata_ai_3[] = {
 	MKAIR(3, 0, 0),
-	{1, 0, {0, 0}},
+	MKEND(),
 };
 
 static const AiDefaultBlockData _airportdata_ai_4[] = {
 	MKAIR(4, 0, 0),
-	{1, 0, {0, 0}},
+	MKEND(),
 };
 
 static const AiDefaultBlockData _airportdata_ai_5[] = {
 	MKAIR(5, 0, 0),
-	{1, 0, {0, 0}},
+	MKEND(),
 };
 
 static const AiDefaultBlockData _airportdata_ai_7[] = {
 	MKAIR(7, 0, 0),
-	{1, 0, {0, 0}}
+	MKEND(),
 };
 
+#undef MKAIR
+#undef MDEND
+
 static const AiDefaultBlockData * const _airport_default_block_data[] = {
 	_airportdata_ai_7, // intercontinental airport
 	_airportdata_ai_4, // international airport