aboutsummaryrefslogtreecommitdiff
path: root/Source/Game.c
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate PLNBLUE.CLTXavier Del Campo Romero2021-01-031-2/+0
|
* Remove debug messageXavier Del Campo Romero2021-01-021-2/+0
|
* Fix bug that accidentally removed aircraft in unboard stateXavier Del Campo Romero2021-01-011-3/+2
|
* Removed SIO interrupt (it caused VBlank ISR not to be triggered).Xavier ASUS2018-11-301-15/+21
| | | | | | | Added Gfx wait on LoadMenuEnd(). Otherwise, some levels would not start after loading all required files. Also, added GPU wait on Menu.c before entering the main loop. An invalid index inside sound table was being accessed when creating an arrival flight. This made the game crash only under real hardware. Other minor changes and fixes.
* Blue background dimensions are now limited to drawing enviroment's.Xavier ASUS2018-11-291-12/+13
| | | | Fixed X position for "Remaining aircraft" and "Next aircraft" messages in GameGui.c
* Some important bugfixes.Xavier ASUS2018-11-291-95/+128
| | | | | Added BUILDING_ATC_LOC. Added more levels.
* TILE_TAXIWAY_CORNER_GRASS_3 added to accepted tiles list.Xavier ASUS2018-11-271-10/+3
| | | | | Building edition is now supported on MapEditor! LEVEL2.LVL now has some buildings laying around.
* Removed city background.Xavier ASUS2018-11-251-44/+112
| | | | Fixed some serious issues regarding building and tile data.
* Bugfix: minutes were not being retrieved from PLT files.Xavier ASUS2018-11-251-154/+145
| | | | | | Game.c: parking slots cannot be selected if an aircraft in STATE_PARKED state is on it. Other fixes and improvements. Added some tiles from TILESET2.TIM
* * LEVEL3.PLT was incorrectly using Windows CRLF end of line.XaviDCR922018-11-251-69/+137
| | | | * When assigning a parking slot, busy parking slots cannot be selected. Some work TODO yet, though.
* New LEVEL3.Xavier ASUS2018-11-241-29/+31
| | | | Improvements.
* Aircraft are now auto-locked when entering "ShowAircraftData" menu.Xavier ASUS2018-11-241-132/+160
| | | | | Minor fixes and improvements. Path is shown when selecting a moving aircraft.
* Minor improvementsXavier ASUS2018-11-231-71/+38
|
* Fixed critical bug that provoked an accidental access to a NULL pointer.Xavier ASUS2018-11-231-52/+54
|
* Optimization flag changed from -Os to -O3 (seems to perform better FPS-wise).Xavier ASUS2018-11-231-350/+340
| | | | Improved const-correctness and scope for some variables.
* Added "const" qualifier to some functions.Xavier ASUS2018-11-181-2195/+2195
| | | | | "cdrom:\ and ;1" are automatically inserted into file name, in order to save memory space. Some minor optimizations.
* * Minor changes.XaviDCR922018-05-071-1/+1
|
* * Game.c: removed obsolete comments.XaviDCR922018-03-111-14/+1
| | | | * GameGui.c: status shown on aircraft list is now summarized on a table.
* * Menu.c: bugfix for PLT level list.XaviDCR922018-03-101-35/+35
| | | | * Minor: added whitespace to "sizeof" operand.
* + Added Message module, used for tutorials.XaviDCR922018-02-251-46/+14
| | | | | | | + Added first tutorial level. * Font now inserts line feed automatically if the next word is too long to fit. * Gfx.c: added primitive list double buffering in order to gain some performance. * MapEditor: now airport can be defined inside the tool.
* * I think GameGraphics() can be executed as long as GPU has received all DMA ↵XaviDCR922018-02-071-3/+1
| | | | blocks. Remove if something goes wrong.
* * Aircraft.c: files were being loaded each time level was selected.XaviDCR922018-02-031-0/+3
| | | | | * Game.c: score bonus is now added depending on flight remaining time. + Added second level.
* * Aircraft.c: since "rotate" member != 0 would render ArrowSpr incorrectly, ↵XaviDCR922018-01-031-19/+7
| | | | | | | | 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().
* * Aircraft.c: taxiing speed has been doubled.XaviDCR922018-01-021-180/+242
| | | | | | | * 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.
* * RWY_DIR and AIRCRAFT_DIRECTION have been joint into a single enum.XaviDCR922017-12-291-141/+146
| | | | | | * Game.c: new prototypes GameGetParkingDirection() and GameGetRunwayDirection(). * Slight optimizations into GameRenderLevel(). * Added some comment headers into Gfx.c.
* * Aircraft.c: invalid XYZ position was calculated if runway direction != EAST.XaviDCR922017-12-291-74/+96
| | | | | | * 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.
* * New LEVEL2.LVL was not being displayed correctly as I forgot to include ↵XaviDCR922017-12-291-816/+863
| | | | | | | the new tiles on Game.c. * Some work done on runway exit detection, but still TODO. * Minor change in LoadMenu.c.
* * Slight optimization: all comparations against true are now compared ↵XaviDCR922017-12-261-81/+191
| | | | | | | against != false. + Added a provisional background during gameplay (still WIP). * Map editor now allows creating a map.
* * Removed now unneeded dprintf calls on Game.c.XaviDCR922017-09-261-14/+1
| | | | | * Imported MenuStar sprite into Menu.c. * Minor changes on Makefile (clean_music target removed).
* Bugfix: ptrPlayer->SelectedAircraft was being substracted when == 0 and ↵XaviDCR922017-09-231-27/+43
| | | | caused a game crash. Bugfix: aircraft did not stop when DIR_SOUTH.
* * Removed unneeded -g flag from Makefile.XaviDCR922017-09-161-8/+63
| | | | | | | * 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.
* * Trimmed ending whitespaces.XaviDCR922017-09-161-496/+496
| | | | * Makefile now generates output TIM files automatically, using 'cat whatever.flags' files as flags for bmp2tim.
* * Minor changes (spaces between "if"/"for"... instructions).XaviDCR922017-08-301-249/+252
| | | | + Added output ELF file with debugging symbols for nocash.
* * (Bugfix): ptrPlayer->SelectedAircraft was not being updated correctly when ↵XaviDCR922017-08-191-33/+61
| | | | | | | | | 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.
* * Added more comments.XaviDCR922017-08-181-41/+237
| | | | | * Radio chatter sounds. * Created aircraft state STATE_STOPPED, to be used when L1 is pressed on aircraft selection mode.
* + Documentation about sound sources.XaviDCR922017-08-141-56/+126
| | | | | | | | * 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().
* * IMASK is now accessed as volatile variable.XaviDCR922017-08-111-1/+0
| | | | * Other minor changes.
* + System timer functions now moved to a separate source file, Timer.c/Timer.h.XaviDCR922017-08-101-153/+667
| | | | | * Added some more comments on Game.c. * On GamePathToTile(), duplicate checks for existing tile have been replaced by calls to GameWaypointCheckExisting().
* * Added some comments on Game.c.XaviDCR922017-08-091-38/+159
| | | | | | * 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.
* * Include directives are now moved to .c instead of .h, as it should really ↵XaviDCR922017-08-061-21/+38
| | | | | | | | | 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.
* * Added comments on System.XaviDCR922017-07-271-12/+23
| | | | | | | * 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.
* + Added support for SIO (Serial Input Output).XaviDCR922017-07-201-179/+131
| | | | * On SystemLoadFileToBuffer(), files can be now uploaded to PSX using QPSXSerial.
* * Bugfix: busy runway was not being cleared when aircraft was resting on a ↵XaviDCR922017-07-061-14/+60
| | | | | | | 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.
* * GameRenderBuildingAircraft() done.XaviDCR922017-06-301-142/+282
| | | | | * (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.
* * Added font spacing parameter.XaviDCR922017-06-281-218/+393
| | | | | | * 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.
* * Reduced tileset sprite size from 64x64 to 64x48.XaviDCR922017-06-271-108/+132
| | | | | | * Modified rendering functions to keep up with this size reduction. * Sprites in TIM have been reordered inside VRAM. * Other minor changes.
* * Tried to get some work done in MapEditor with no success so far.XaviDCR922017-06-111-4/+8
| | | | | | * 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.
* * Implemented aircraft collision. But it would not detect collision in some ↵XaviDCR922017-06-061-36/+45
| | | | | | | | 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.
* * Bugfix: index for selectedAircraft is recalculated when a new aircraft is ↵XaviDCR922017-06-041-6/+75
| | | | | | | spawned. * Initial implementation for minimum spawn time in parkings. * GfxIsGPUBusy() check added for MemCard.
* * More passengers by correct sequence are unboarded.XaviDCR922017-06-031-13/+58
| | | | | | | * Aircraft should not be removed on State == STATE_APPROACH. * Initial implementation for finished game. * Added some comments on System.c. * GameGuiPrepareNotificationString() deprecated.