From 6364d64cbca986c61b3bea76167610198fbe99bb Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Sat, 3 Feb 2018 16:05:37 +0100 Subject: * Aircraft.c: files were being loaded each time level was selected. * Game.c: score bonus is now added depending on flight remaining time. + Added second level. --- Source/Aircraft.c | 11 +++++++++-- Source/Exe/AIRPORT.elf | Bin 330500 -> 330656 bytes Source/Exe/AIRPORT.iso | Bin 1480704 -> 1480704 bytes Source/Game.c | 3 +++ Source/Makefile | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) (limited to 'Source') diff --git a/Source/Aircraft.c b/Source/Aircraft.c index 8af8ad8..54db446 100644 --- a/Source/Aircraft.c +++ b/Source/Aircraft.c @@ -87,6 +87,8 @@ static bool AircraftCheckPath(TYPE_AIRCRAFT_DATA* ptrAicraft, TYPE_AIRCRAFT_DATA void AircraftInit(void) { + static bool firstLoad = true; + bzero(AircraftData, GAME_MAX_AIRCRAFT * sizeof(TYPE_AIRCRAFT_DATA)); AircraftIndex = 0; @@ -113,10 +115,15 @@ void AircraftInit(void) AIRCRAFT_INVALID_IDX, sizeof(AircraftFlightDataIdx_HashTable) ); - LoadMenu( GameFileList, + if (firstLoad != false) + { + firstLoad = false; + + LoadMenu( GameFileList, GameFileDest, sizeof(GameFileList) / sizeof(GameFileList[0]), - sizeof(GameFileDest) / sizeof(GameFileDest[0]) ); + sizeof(GameFileDest) / sizeof(GameFileDest[0]) ); + } } bool AircraftAddNew( TYPE_FLIGHT_DATA* ptrFlightData, diff --git a/Source/Exe/AIRPORT.elf b/Source/Exe/AIRPORT.elf index 33a2f5e..074d649 100644 Binary files a/Source/Exe/AIRPORT.elf and b/Source/Exe/AIRPORT.elf differ diff --git a/Source/Exe/AIRPORT.iso b/Source/Exe/AIRPORT.iso index 34ceefa..77a91f2 100644 Binary files a/Source/Exe/AIRPORT.iso and b/Source/Exe/AIRPORT.iso differ diff --git a/Source/Game.c b/Source/Game.c index 2670dc0..f3fd11a 100644 --- a/Source/Game.c +++ b/Source/Game.c @@ -3968,6 +3968,9 @@ void GameRemoveFlight(uint8_t idx, bool successful) if (successful != false) { GameScore += SCORE_REWARD_FINISH_FLIGHT; + + // Add punctuation + GameScore += FlightData.RemainingTime[idx] << 1; } else { diff --git a/Source/Makefile b/Source/Makefile index 7de5746..e47a3da 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -27,7 +27,7 @@ CDROM_ROOT=$(PROJECT_DIR)/cdimg BIN_TARGET_PATH = $(PROJECT_DIR)/Bin #Uncomment this DEFINE below to use Airport together with OpenSend + QPSXSerial toolchain. -#DEFINE += -DSERIAL_INTERFACE +DEFINE += -DSERIAL_INTERFACE # PSXSDK tools definitions # ELF2EXE: -- cgit v1.2.3