diff -r acb078280f60 -r b3b8bb6c0a48 src/newgrf.cpp --- a/src/newgrf.cpp Mon Aug 20 23:21:45 2007 +0000 +++ b/src/newgrf.cpp Tue Aug 21 09:02:06 2007 +0000 @@ -2101,10 +2101,6 @@ switch (prop) { case 0x08: { // Class ID - static AirportMovingData fsmport_moving_data_dummy[1] = {{ 0, 0, 0, 5, {DIR_N}, 0, 0 }}; - static byte fsmport_entries_dummy[] = {0, 0, 0, 0}; - static AirportFTAbuildup fsmport_fta_dummy[] = {{0, 0, 0, 0}, { MAX_ELEMENTS, 0, 0, 0 }}; - FSMportsSpec **fsmportspec = &_cur_grffile->fsmports[stid + i]; /* Property 0x08 is special; it is where the station is allocated */ @@ -2115,18 +2111,7 @@ (*fsmportspec)->sclass = AllocateFSMportsClass(BSWAP32(classid)); /* create new AirportClass for this airport */ - (*fsmportspec)->portFSM = new AirportFTAClass( fsmport_moving_data_dummy, - NULL, - NULL, - fsmport_entries_dummy, - AirportFTAClass::ALL, - fsmport_fta_dummy, - NULL, - 0, - 0, 0, - 0, - 0 - ); + (*fsmportspec)->portFSM = new AirportFTAClass(); } break; @@ -2265,12 +2250,12 @@ break; case 0x1A: // Finite State Machine and Movement Orders - fsmportspec->portFSM->nofelements = grf_load_byte(&buf); - fsmportspec->portFSM->layout = MallocT(fsmportspec->portFSM->nofelements); - fsmportspec->portFSM->moving_data = MallocT(fsmportspec->portFSM->nofelements); + fsmportspec->portFSM->nof_elements = grf_load_byte(&buf); + fsmportspec->portFSM->layout = MallocT(fsmportspec->portFSM->nof_elements); + fsmportspec->portFSM->moving_data = MallocT(fsmportspec->portFSM->nof_elements); fsmportspec->portFSM->size_x = fsmportspec->size_x[0]; fsmportspec->portFSM->size_y = fsmportspec->size_y[0]; - for (byte element = 0; element < fsmportspec->portFSM->nofelements; element++) { + for (byte element = 0; element < fsmportspec->portFSM->nof_elements; element++) { AirportMovingData md; md.x = grf_load_word(&buf); md.y = grf_load_word(&buf); @@ -2325,13 +2310,13 @@ case 0x1D: // Hangar locations fsmportspec->portFSM->nof_depots = grf_load_byte(&buf); - fsmportspec->portFSM->airport_depots = MallocT(fsmportspec->portFSM->nof_depots); + fsmportspec->portFSM->depots = MallocT(fsmportspec->portFSM->nof_depots); for (uint depot = 0; depot < fsmportspec->portFSM->nof_depots; depot++) { 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; + fsmportspec->portFSM->depots[depot] = depot_tile; } break;