(svn r10861) [NewGRF_ports] -Change: Updates to spec now reflected in newgrf.cpp. No trailing 00 00 in Prop 0E. Prop 19 now identifies which hangar each coordinate is for. (allows multi-tile depots). NewGRF_ports
authorrichk
Sun, 12 Aug 2007 00:04:43 +0000
branchNewGRF_ports
changeset 6789 8817427af899
parent 6788 b750e5514a72
child 6790 3c2ee81e8219
(svn r10861) [NewGRF_ports] -Change: Updates to spec now reflected in newgrf.cpp. No trailing 00 00 in Prop 0E. Prop 19 now identifies which hangar each coordinate is for. (allows multi-tile depots).
src/newgrf.cpp
--- a/src/newgrf.cpp	Sat Aug 11 23:48:46 2007 +0000
+++ b/src/newgrf.cpp	Sun Aug 12 00:04:43 2007 +0000
@@ -2215,11 +2215,8 @@
 							layout[l] = grf_load_byte(&buf);
 						}
 
-//						free(fsmportspec->layouts[set][l][p]);
 						fsmportspec->layouts[set] = (FSMportsLayout*)layout;
 					}
-					grf_load_byte(&buf);
-					grf_load_byte(&buf);
 				}
 				break;
 
@@ -2327,6 +2324,7 @@
 					TileIndexDiffC depot_tile;
 					depot_tile.x = grf_load_byte(&buf);
 					depot_tile.y = grf_load_byte(&buf);
+					grf_load_byte(&buf);  //TODO: depot number. for the moment discard. will be used to allow multi-tile depots
 					fsmportspec->portFSM->airport_depots[depot] = depot_tile;
 				}
 				ret = true;
@@ -2375,8 +2373,10 @@
 					for (uint set = 0; set < numlayouts; set++)
 					{
 						byte orientation = grf_load_byte(&buf);
-						byte x = fsmportspec->size_x[set];
-						byte y = fsmportspec->size_y[set];
+						//byte x = fsmportspec->size_x[set];
+						//byte y = fsmportspec->size_y[set];
+						byte x = grf_load_byte(&buf);  //could use either, but it helps nforenum if x&y embedded here
+						byte y = grf_load_byte(&buf);
 
 						fsmportspec->layout_mask[set] = MallocT<FSMportsLayout>((x*y) + 2);
 						memset(fsmportspec->layout_mask[set], 0, ((x*y) + 2));