(svn r10052) -Codechange: Support reserve/activate stage bits of action 7/9 variable 84.
authorpeter1138
Thu, 07 Jun 2007 07:20:44 +0000
changeset 7309 bc9f31c4ab97
parent 7308 9c2affec007a
child 7310 b835c3c702c1
(svn r10052) -Codechange: Support reserve/activate stage bits of action 7/9 variable 84.
src/newgrf.cpp
--- a/src/newgrf.cpp	Thu Jun 07 00:25:49 2007 +0000
+++ b/src/newgrf.cpp	Thu Jun 07 07:20:44 2007 +0000
@@ -2987,8 +2987,14 @@
 		case 0x83: // current climate, 0=temp, 1=arctic, 2=trop, 3=toyland
 			return _opt.landscape;
 
-		case 0x84: // GRF loading stage
-			return (_cur_stage > GLS_INIT) | ((_cur_stage == GLS_ACTIVATION) << 9);
+		case 0x84: { // GRF loading stage
+			uint32 res = 0;
+
+			if (_cur_stage > GLS_INIT) SETBIT(res, 0);
+			if (_cur_stage == GLS_RESERVE) SETBIT(res, 8);
+			if (_cur_stage == GLS_ACTIVATION) SETBIT(res, 9);
+			return res;
+		}
 
 		case 0x85: // TTDPatch flags, only for bit tests
 			if (cond_val == NULL) {