diff -r 240d846d5149 -r 6e4db2fda167 src/newgrf.cpp --- a/src/newgrf.cpp Sun Jul 22 22:28:46 2007 +0000 +++ b/src/newgrf.cpp Mon Jul 23 22:20:36 2007 +0000 @@ -2075,6 +2075,21 @@ /* Swap classid because we read it in BE meaning WAYP or DFLT */ uint32 classid = grf_load_dword(&buf); (*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 + ); + } break; case 0x09: // Define sprite layout @@ -2218,6 +2233,52 @@ ret = true; break; + case 0x1C: // Entry points + //TODO: store entry points + grf_load_byte(&buf); + grf_load_byte(&buf); + grf_load_byte(&buf); + grf_load_byte(&buf); + ret = true; + break; + + case 0x1D: // Hangar locations + fsmportspec->portFSM->nof_depots = grf_load_byte(&buf); + fsmportspec->portFSM->airport_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); + fsmportspec->portFSM->airport_depots[depot] = depot_tile; + } + ret = true; + break; + + case 0x1E: // Terminal groups + { + uint num_terms = grf_load_byte(&buf); + for (uint terms = 0; terms < num_terms; terms++) + { + //TODO: store terms + grf_load_byte(&buf); + } + ret = true; + } + break; + + case 0x1F: // Helipad groups + { + uint num_helipads = grf_load_byte(&buf); + for (uint helipads = 0; helipads < num_helipads; helipads++) + { + //TODO: store helipads + grf_load_byte(&buf); + } + ret = true; + } + break; + default: ret = true; break;