Commit Graph

65 Commits

Author SHA1 Message Date
XaviDCR92 6364d64cbc * 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.
2018-02-03 16:05:37 +01:00
XaviDCR92 7d14b50360 * Aircraft.c: since "rotate" member != 0 would render ArrowSpr incorrectly, I have created two separate sprites: LeftRightArrowSpr and UpDownArrowSpr. Still, H_FLIP isn't working properly.
* GameGui.c: new function GameGuiCalculateNextAircraftTime(), which calculates remaining time for next aircraft on the list.
* GameStructures.h: new parameter NextAircraftTime for TYPE_PLAYER structures.
* Game.c: added call to new function GameGuiCalculateNextAircraftTime().
2018-01-03 21:17:28 +01:00
XaviDCR92 b094335404 * Aircraft.c: taxiing speed has been doubled.
* Game.c: GameRenderLevel() renamed to GameRenderTerrain().
* Game.c: GameRenderTerrainPrecalculations() has been created to perform some calculations which are stored in tables to be then looked up by GameRenderTerrain(). This should save us some calculation time during rendering process.
* Camera.c: added new CameraApplyCoordinatesToCartesianPos() prototype.
* GameGui.c: AircraftDataGPoly4 RGB data is now only calculated on startup.
2018-01-02 06:43:54 +01:00
XaviDCR92 e53faffaea * Menu.c: when 1Player/2Player buttons are pressed, level list is now shown.
* System.c/System.h: new prototype SystemGetFileBasename().
2017-12-30 00:58:57 +01:00
XaviDCR92 67cfc8b2c2 * RWY_DIR and AIRCRAFT_DIRECTION have been joint into a single enum.
* Game.c: new prototypes GameGetParkingDirection() and GameGetRunwayDirection().
* Slight optimizations into GameRenderLevel().
* Added some comment headers into Gfx.c.
2017-12-29 23:19:43 +01:00
XaviDCR92 0d1df70f2d * Aircraft.c: invalid XYZ position was calculated if runway direction != EAST.
* Aircraft.c: aircraft direction is now set according to runway direction when aircraft is created.
* Game.c: TILE_PARKING_2 was not included on AcceptedTiles[].
* Game.c: GameAssignRunwaytoAircraft() was not looking up runway exit/entry points correctly.
2017-12-29 15:07:17 +01:00
XaviDCR92 fef6629d96 * New LEVEL2.LVL was not being displayed correctly as I forgot to include the new tiles on Game.c.
* Some work done on runway exit detection, but still TODO.
* Minor change in LoadMenu.c.
2017-12-29 02:57:40 +01:00
XaviDCR92 eb6f4d6d8c * Added "Save map" function to MapEditor.
* Tiles can be now modified runtime.
+ tileset.ini now allows configuring tileset layout in an easy way.
2017-12-27 13:08:36 +01:00
XaviDCR92 88526570da * Minor: added comment headers on every function in GameGui.c. 2017-12-27 10:39:39 +01:00
XaviDCR92 4eaa6c091f * Slight optimization: all comparations against true are now compared against != false.
+ Added a provisional background during gameplay (still WIP).
* Map editor now allows creating a map.
2017-12-26 22:18:37 +01:00
XaviDCR92 f06d582d63 Merge branch 'master' of https://github.com/XaviDCR92/Airport 2017-10-01 04:40:43 +02:00
XaviDCR92 73bef893dd * Updated ELF. 2017-10-01 04:40:09 +02:00
XaviDCR92 f6f5a1ab11 * Removed now unneeded dprintf calls on Game.c.
* Imported MenuStar sprite into Menu.c.
* Minor changes on Makefile (clean_music target removed).
2017-09-26 21:52:39 +02:00
XaviDCR92 e6d41c59ff Bugfix: ptrPlayer->SelectedAircraft was being substracted when == 0 and caused a game crash. Bugfix: aircraft did not stop when DIR_SOUTH. 2017-09-23 01:32:26 +02:00
XaviDCR92 286d13d71d Renamed BMP/WAV data to uppercase (Linux case-sensitivity). 2017-09-16 12:50:06 +02:00
XaviDCR92 d60819e75a + New sprites. 2017-09-16 12:44:23 +02:00
XaviDCR92 69584f0a2a + Added source WAV files. See SOUND_SOURCES for license reference. 2017-09-16 12:30:18 +02:00
XaviDCR92 56ed60ff3a + Added BIN/CUE image for non-CDDA mode. 2017-09-16 03:35:52 +02:00
XaviDCR92 111ea6aade * Probably it looks like Github's MD parser needs spaces after "#" token... 2017-09-16 03:23:54 +02:00
XaviDCR92 49ddf73109 * Trying to solve README.md issues (no headers are shown on Github?). 2017-09-16 03:22:15 +02:00
XaviDCR92 6629a61c3b * Removed unneeded -g flag from Makefile.
* Aircraft now prevents collision against other aircraft if state == STATE_TAXIING.
* Game: new event handlers for new Aircraft collision prevention algorithm.
* Font: although not compulsory, _blend_effect_lum should be volatile.
* Other minor changes.
2017-09-16 03:21:15 +02:00
XaviDCR92 0d7af34486 * Trimmed ending whitespaces.
* Makefile now generates output TIM files automatically, using 'cat whatever.flags' files as flags for bmp2tim.
2017-09-16 01:44:42 +02:00
XaviDCR92 f2a6798f1d + Added first stub of README.md. 2017-09-15 23:05:17 +02:00
XaviDCR92 7ba159f6e7 * Corrected dependencies for Makefile (.elf was being rebuilt every time, as well as .bin/.cue).
* Removed useless macro MAIN_MENU_FILES.
2017-09-15 23:04:25 +02:00
XaviDCR92 69027a04e3 * Minor changes (spaces between "if"/"for"... instructions).
+ Added output ELF file with debugging symbols for nocash.
2017-08-30 23:29:57 +02:00
XaviDCR92 0cfdfaf959 * (Bugfix): padx_last_key_single_pressed was being checked AFTER checking pads connected, so it was never calculated if, for example, pad 2 was disconnected. This was only reproducible under real hardware. 2017-08-19 17:19:53 +02:00
XaviDCR92 e778deb2c0 * (Bugfix): ptrPlayer->SelectedAircraft was not being updated correctly when new aircraft appeared.
* (Bugfix): PltParser was casting remaining time to uint8_t instead of uint16_t.
* Reduced file buffer size to original value.
* GfxDrawButton(): L1/R1/L2/R2 text is now printed on top of Lx/Rx button.
* Other minor changes.
2017-08-19 16:51:00 +02:00
XaviDCR92 b1aad213d4 * Added more comments.
* Radio chatter sounds.
* Created aircraft state STATE_STOPPED, to be used when L1 is pressed on aircraft selection mode.
2017-08-18 20:17:13 +02:00
XaviDCR92 150cc8adc0 + Added documentation about text fonts sources. 2017-08-14 14:31:31 +02:00
XaviDCR92 db8bc5f9e3 + Documentation about sound sources.
* Sine-like effect used for runways now moved to SystemCalculateSine().
* Bugfix: ptrPlayer->FlightDataPage is now decreased if there aren't enough active aircraft.
* On main menu, 2 players option is now disabled if pad 2 is disconnected.
* More work on FPS measurement (not working yet).
* Number of used SPU voices is now returned on SfxUploadSound().
2017-08-14 14:29:04 +02:00
XaviDCR92 f97f48ca7c * IMASK is now accessed as volatile variable.
* Other minor changes.
2017-08-11 22:11:43 +02:00
XaviDCR92 f17b15bdff + System timer functions now moved to a separate source file, Timer.c/Timer.h.
* Added some more comments on Game.c.
* On GamePathToTile(), duplicate checks for existing tile have been replaced by calls to GameWaypointCheckExisting().
2017-08-10 22:39:31 +02:00
XaviDCR92 b807ee7ca5 * Added some comments on Game.c.
* Some performance optimizations on Game.c (removed unneeded "for" loops).
* Timer 2 is now handler (ISR still not working).
* SYSTEM.CNF: EVENT parameter increased to 7.
2017-08-09 22:51:15 +02:00
XaviDCR92 8700a329d0 * Include directives are now moved to .c instead of .h, as it should really be...
* Makefile now rebuilds needed targets on modified header files.
* Some more work on GameEmergencyMode().
* Initial work on PSX mouse auto detection.
* Prototypes for RCNT2 I_MASK bit handling.
2017-08-06 04:17:09 +02:00
XaviDCR92 153f078ec2 * Added comments on System.
* Files needed for Game are now only loaded once, except from LEVEL1.PLT.
* Added DevMenu to get debug info.
* ISR_LoadMenuVBlank() does not stop when accessing SIO.
* On fopen() and SERIAL_INTERFACE defined, "#" is prepended and "@" is appended to filename string.
2017-07-27 07:41:25 +02:00
XaviDCR92 cb1c0345c7 + Added support for SIO (Serial Input Output).
* On SystemLoadFileToBuffer(), files can be now uploaded to PSX using QPSXSerial.
2017-07-20 22:36:19 +02:00
XaviDCR92 98d3232ef4 * Bugfix: busy runway was not being cleared when aircraft was resting on a runway tile e.g.: STATE_READY_FOR_TAKEOFF or STATE_LANDED.
* Reimplemented slow rendering on 2-player mode (provisionally though as long as I don't find any better solution).
* Other minor fixes.
2017-07-06 13:15:16 +02:00
XaviDCR92 521efcfe54 + New sprites. 2017-06-30 13:04:28 +02:00
XaviDCR92 f7e3421f56 * GameRenderBuildingAircraft() done.
* (Bugfix): on AircraftGetTileFromFlightDataIndex(), a buffer overrun was caused when asking for index = AIRCRAFT_INVALID_IDX.
* Added new parameters for some building types. Still some work pending.
2017-06-30 13:03:43 +02:00
XaviDCR92 bd23878d45 * Added font spacing parameter.
* Removed obsolete, unused functions.
* Performance optimization: routines inside GameCalculations() were computating a big loop several times, so this has been modified so that loop is only performed once.
* Initial implementation for GameGetAircraftTilemap(). Still some work TODO.
2017-06-28 16:19:36 +02:00
XaviDCR92 f9f9924566 * Reduced tileset sprite size from 64x64 to 64x48.
* Modified rendering functions to keep up with this size reduction.
* Sprites in TIM have been reordered inside VRAM.
* Other minor changes.
2017-06-27 00:58:12 +02:00
XaviDCR92 d1f55e8b45 * Tried to get some work done in MapEditor with no success so far.
* Timers with no repeat flag were being set to NULL, but this is not actually desired!
* Reenabled transparency for aircraft shadow.
* Deprecated NotificationRequest flags, and replaced by system timer handling.
2017-06-11 13:58:33 +02:00
XaviDCR92 022c72fe36 * (Bugfix) MemCard: MEMCARD_MAXIMUM_SECTOR changed from 512 (8 << MEMCARD_SECTORS_PER_BLOCK_BITSHIFT) to 1024 (16 << MEMCARD_SECTORS_PER_BLOCK_BITSHIFT).
* DrawEnv and DispEnv buffers are no longer swapped using DMA commands, but GPIO. This ensures stability under real hw. TODO: how to fix in 2-player mode?
* Provisionally removed semi-transparency for aircraft shadow sprite.
2017-06-08 07:23:25 +02:00
XaviDCR92 faf3197555 * Some more work on Plt file generator. 2017-06-06 07:13:16 +02:00
XaviDCR92 1244505327 * Implemented aircraft collision. But it would not detect collision in some cases.
* Remove unneeded whitespace character on pointer variables (unary operators should not have any whitespaces).
* SelectedAircraft index now increases or decreases automatically on aircraft added/removed.
* Started writing Plt generation routines. Still a lot of work TODO.
2017-06-06 06:52:46 +02:00
XaviDCR92 c43347edb7 * Bugfix: index for selectedAircraft is recalculated when a new aircraft is spawned.
* Initial implementation for minimum spawn time in parkings.
* GfxIsGPUBusy() check added for MemCard.
2017-06-04 14:00:56 +02:00
XaviDCR92 219d958538 * More passengers by correct sequence are unboarded.
* Aircraft should not be removed on State == STATE_APPROACH.
* Initial implementation for finished game.
* Added some comments on System.c.
* GameGuiPrepareNotificationString() deprecated.
2017-06-03 01:37:55 +02:00
XaviDCR92 92c65ff3b2 * Used runway is now freed if state == STATE_APPROACH.
TODO: Free runway on state == STATE_READY_TAKEOFF or STATE_ENTERING_RWY.
2017-05-31 07:24:00 +02:00
XaviDCR92 f5d1b4415c * Aircraft 0 was incorrectly being removed because indexes 0 to GAME_MAX_AIRCRAFT were being read instead of 0 to ptrPlayer->ActiveAircraft.
* Solved issues with linked list overflow. A detection mechanism has also been added.
* New state STATE_ENTERING_RWY.
* GameGuiActiveAircraftList has been moved from GameGui to Game module.
* Active aircraft list for each player is now updated each time that a new flight either appears or disappears.
* Other minor fixes.
2017-05-31 06:57:06 +02:00
XaviDCR92 30b18fd262 * Departure flights are not created if parking is busy.
* Available TILE_PARKING and TILE_HOLDING_RWY are showed in green.
* Fixed lock/unlock target logic.
* Added TILE_PARKING_2.
2017-05-30 07:00:36 +02:00