(svn r3386) - NewGRF: Small comment update, and fix for possible issue with engine class not getting set.
authorpeter1138
Sat, 07 Jan 2006 13:26:52 +0000
changeset 2838 7d6a3195f87d
parent 2837 bbd6f3f4b814
child 2839 665d7c92448b
(svn r3386) - NewGRF: Small comment update, and fix for possible issue with engine class not getting set.
newgrf.c
--- a/newgrf.c	Sat Jan 07 13:21:04 2006 +0000
+++ b/newgrf.c	Sat Jan 07 13:26:52 2006 +0000
@@ -333,8 +333,13 @@
 			ret = true;
 		} break;
 		case 0x19: { /* Engine traction type */
-			/* TODO: What do the individual numbers mean?
-			 * XXX: And in what base are they, in fact? --pasky */
+			/* What do the individual numbers mean?
+			 * 0x00 .. 0x07: Steam
+			 * 0x08 .. 0x27: Diesel
+			 * 0x28 .. 0x31: Electric
+			 * 0x32 .. 0x37: Monorail
+			 * 0x38 .. 0x41: Maglev
+			 */
 			FOR_EACH_OBJECT {
 				uint8 traction = grf_load_byte(&buf);
 				int engclass;
@@ -343,7 +348,7 @@
 					engclass = 0;
 				else if (traction <= 0x27)
 					engclass = 1;
-				else if (traction <= 0x31)
+				else if (traction <= 0x41)
 					engclass = 2;
 				else
 					break;