--- a/src/newgrf.cpp Thu May 10 16:03:06 2007 +0000
+++ b/src/newgrf.cpp Thu May 10 23:10:23 2007 +0000
@@ -531,6 +531,10 @@
FOR_EACH_OBJECT rvi[i].user_def_data = grf_load_byte(&buf);
break;
+ case 0x26: // Retire vehicle early
+ FOR_EACH_OBJECT ei[i].retire_early = grf_load_byte(&buf);
+ break;
+
case 0x27: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
@@ -553,7 +557,6 @@
/* @todo air drag and retire vehicle early
* Fall-through for unimplemented one byte long properties. */
case 0x20: // Air drag
- case 0x26: // Retire vehicle early
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
@@ -650,6 +653,10 @@
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
+ case 0x1B: // Retire vehicle early
+ FOR_EACH_OBJECT ei[i].retire_early = grf_load_byte(&buf);
+ break;
+
case 0x1C: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
@@ -671,7 +678,6 @@
case 0x18: // Tractive effort
case 0x19: // Air drag
- case 0x1B: // Retire vehicle early
/* @todo */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
@@ -758,6 +764,10 @@
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
+ case 0x16: // Retire vehicle early
+ FOR_EACH_OBJECT ei[i].retire_early = grf_load_byte(&buf);
+ break;
+
case 0x17: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
@@ -779,7 +789,6 @@
case 0x14: // Ocean speed fraction
case 0x15: // Canal speed fraction
- case 0x16: // Retire vehicle early
/* @todo */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
@@ -871,6 +880,10 @@
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
+ case 0x16: // Retire vehicle early
+ FOR_EACH_OBJECT ei[i].retire_early = grf_load_byte(&buf);
+ break;
+
case 0x17: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
@@ -890,12 +903,6 @@
FOR_EACH_OBJECT ei[i].base_intro = grf_load_dword(&buf);
break;
- case 0x16: // Retire vehicle early
- /* @todo */
- FOR_EACH_OBJECT grf_load_byte(&buf);
- ret = true;
- break;
-
default:
ret = true;
break;
--- a/src/table/engines.h Thu May 10 16:03:06 2007 +0000
+++ b/src/table/engines.h Thu May 10 23:10:23 2007 +0000
@@ -19,7 +19,7 @@
* @note the 0x80 in parameter b sets the "is carriage bit"
* @note the 5 between d and e is the load amount
*/
-#define MK(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0 }
+#define MK(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0, 0 }
/** Writes the properties of a train carriage into the EngineInfo struct.
* @param a Introduction date
@@ -30,7 +30,7 @@
* @see MK
* @note the 5 between d and e is the load amount
*/
-#define MW(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b | 0x80, 5, e, 0, 8, 0, 0 }
+#define MW(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b | 0x80, 5, e, 0, 8, 0, 0, 0 }
/** Writes the properties of a ship into the EngineInfo struct.
* @param a Introduction date
@@ -41,7 +41,7 @@
* @see MK
* @note the 10 between d and e is the load amount
*/
-#define MS(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, e, 0, 8, 0, 0 }
+#define MS(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, e, 0, 8, 0, 0, 0 }
/** Writes the properties of an aeroplane into the EngineInfo struct.
* @param a Introduction date
@@ -52,7 +52,7 @@
* @see MK
* @note the 20 between d and e is the load amount
*/
-#define MA(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 20, e, 0, 8, 0, 0 }
+#define MA(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 20, e, 0, 8, 0, 0, 0 }
// Climates
// T = Temperate