aboutsummaryrefslogtreecommitdiff
path: root/Source/Aircraft.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed SIO interrupt (it caused VBlank ISR not to be triggered).Xavier ASUS2018-11-301-2/+2
| | | | | | | 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.
* Some important bugfixes.Xavier ASUS2018-11-291-1/+3
| | | | | Added BUILDING_ATC_LOC. Added more levels.
* * LEVEL3.PLT was incorrectly using Windows CRLF end of line.XaviDCR922018-11-251-3/+8
| | | | * When assigning a parking slot, busy parking slots cannot be selected. Some work TODO yet, though.
* New LEVEL3.Xavier ASUS2018-11-241-17/+23
| | | | Improvements.
* Aircraft are now auto-locked when entering "ShowAircraftData" menu.Xavier ASUS2018-11-241-5/+1
| | | | | Minor fixes and improvements. Path is shown when selecting a moving aircraft.
* Minor improvementsXavier ASUS2018-11-231-20/+21
|
* Fixed critical bug that provoked an accidental access to a NULL pointer.Xavier ASUS2018-11-231-256/+279
|
* Optimization flag changed from -Os to -O3 (seems to perform better FPS-wise).Xavier ASUS2018-11-231-72/+86
| | | | Improved const-correctness and scope for some variables.
* Added "const" qualifier to some functions.Xavier ASUS2018-11-181-411/+411
| | | | | "cdrom:\ and ;1" are automatically inserted into file name, in order to save memory space. Some minor optimizations.
* * Menu.c: bugfix for PLT level list.XaviDCR922018-03-101-7/+7
| | | | * Minor: added whitespace to "sizeof" operand.
* * Aircraft.c: files were being loaded each time level was selected.XaviDCR922018-02-031-2/+9
| | | | | * 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-18/+51
| | | | | | | | 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-1/+1
| | | | | | | * 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-35/+41
| | | | | | * 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-10/+39
| | | | | | * 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.
* * Slight optimization: all comparations against true are now compared ↵XaviDCR922017-12-261-5/+5
| | | | | | | against != false. + Added a provisional background during gameplay (still WIP). * Map editor now allows creating a map.
* Bugfix: ptrPlayer->SelectedAircraft was being substracted when == 0 and ↵XaviDCR922017-09-231-7/+6
| | | | caused a game crash. Bugfix: aircraft did not stop when DIR_SOUTH.
* * Removed unneeded -g flag from Makefile.XaviDCR922017-09-161-31/+84
| | | | | | | * 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-11/+11
| | | | * 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-46/+92
| | | | + Added output ELF file with debugging symbols for nocash.
* * Added more comments.XaviDCR922017-08-181-0/+4
| | | | | * 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-3/+40
| | | | | | | | * 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().
* * Include directives are now moved to .c instead of .h, as it should really ↵XaviDCR922017-08-061-0/+3
| | | | | | | | | 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 support for SIO (Serial Input Output).XaviDCR922017-07-201-10/+10
| | | | * On SystemLoadFileToBuffer(), files can be now uploaded to PSX using QPSXSerial.
* * GameRenderBuildingAircraft() done.XaviDCR922017-06-301-16/+8
| | | | | * (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-64/+67
| | | | | | * 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-8/+25
| | | | | | * 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-2/+17
| | | | | | * 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.
* * (Bugfix) MemCard: MEMCARD_MAXIMUM_SECTOR changed from 512 (8 << ↵XaviDCR922017-06-081-2/+2
| | | | | | | 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.
* * Implemented aircraft collision. But it would not detect collision in some ↵XaviDCR922017-06-061-10/+84
| | | | | | | | 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.
* * More passengers by correct sequence are unboarded.XaviDCR922017-06-031-0/+3
| | | | | | | * Aircraft should not be removed on State == STATE_APPROACH. * Initial implementation for finished game. * Added some comments on System.c. * GameGuiPrepareNotificationString() deprecated.
* * Used runway is now freed if state == STATE_APPROACH.XaviDCR922017-05-311-1/+8
| | | | TODO: Free runway on state == STATE_READY_TAKEOFF or STATE_ENTERING_RWY.
* * Aircraft 0 was incorrectly being removed because indexes 0 to ↵XaviDCR922017-05-311-5/+15
| | | | | | | | | | 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.
* * Departure flights are not created if parking is busy.XaviDCR922017-05-301-4/+22
| | | | | | * Available TILE_PARKING and TILE_HOLDING_RWY are showed in green. * Fixed lock/unlock target logic. * Added TILE_PARKING_2.
* * Takeoff procedure implemented almost completely. TODO: "Holding" message.XaviDCR922017-05-281-60/+102
| | | | * Initial implementation to show passengers left when entering correct sequence.
* * Takeoff barely implemented. Stil a lot of work to do.XaviDCR922017-05-281-0/+8
| | | | | * Added new runway holding point tiles. * Bugfixes in last key single pressed.
* * Added more aircraft on LEVEL1.PLT.XaviDCR922017-05-271-3/+21
| | | | | | * Unboarding state now totally implemented. * (Bugfix): Incorrect aircraft was selected on ShowAircraftData. * Gfx1HzFlash() and Gfx2HzFlash() were incorrectly implemented, causing multiple ticks on a single cycle.
* * Aircraft state was not being transferred ciclically from Game to Aircraft ↵XaviDCR922017-05-241-91/+135
| | | | | | | | | | module. * Improved detection of target reaching for Aircraft.c. * Cursor is now displayed correctly on both 1-player and 2-player mode. * Fixed behaviour for locking/unlocking aircraft. * Fixed menus for 2-player mode. * Minor fixes and improvements.
* * Split screen from now on is only calling GsDrawList() once. The reason for ↵XaviDCR922017-05-221-2/+1
| | | | | | | | | this is that now DMA is used instead of GPIO for drawenv/dispenv management. * (PSXSDK internals): incorrect bit shifting was being made on 0xE3 and 0xE4 GPU instructions (drawenv management). * (Bugfix): Timers were not being reset properly because pad1_cheat_timer and pad2_cheat_timer were being accidentally reset to NULL on calling memset() for cheatsArray. * Timers are now updated every 100 ms instead of every second. * Mouse sprite should be now drawn on X_SCREEN_RESOLUTION >> 2 in 2-player mode. TODO: check why this isn't working!
* * Split screen is now working. Yay!!XaviDCR922017-05-051-4/+29
| | | | * New prototypes for Gfx. Still preliminar, but make split screen work.
* * Added some comments on System.XaviDCR922017-05-011-13/+38
| | | | | | | * New routine PadOneKeySinglePress() and PadTwoKeySinglePress(). * Temp waypoints now turn red when colliding with an aircraft or with a previously existing waypoint. * When loading files, GPU operation is finishedbefore calling fopen. Also, I_MASK is disabled just in case. * For PLT files, actual tile needs to be set instead of parking number.
* * Updated.XaviDCR922017-02-041-0/+0
|
* Initial commitXavier Del Campo2017-02-041-0/+372