aboutsummaryrefslogtreecommitdiff
path: root/Source/GameStructures.h
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-05-24 07:15:38 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-05-24 07:15:38 +0200
commit8d2e08d7448e6c3514a747c0dff5db5f27eb8788 (patch)
treef34b60609315c450ccc5a4f3a65fb29877386ad4 /Source/GameStructures.h
parentaefe5f8c1c45f4cdeafe08113953a9f03df3c644 (diff)
downloadairport-8d2e08d7448e6c3514a747c0dff5db5f27eb8788.tar.gz
* Aircraft state was not being transferred ciclically from Game to Aircraft 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.
Diffstat (limited to 'Source/GameStructures.h')
-rw-r--r--Source/GameStructures.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/GameStructures.h b/Source/GameStructures.h
index 355ec33..4a6b563 100644
--- a/Source/GameStructures.h
+++ b/Source/GameStructures.h
@@ -84,10 +84,11 @@ typedef enum t_livery
typedef enum t_direction
{
- AIRCRAFT_DIR_NORTH = 0,
+ AIRCRAFT_DIR_NO_DIRECTION = 0,
+ AIRCRAFT_DIR_NORTH,
AIRCRAFT_DIR_SOUTH,
AIRCRAFT_DIR_EAST,
- AIRCRAFT_DIR_WEST
+ AIRCRAFT_DIR_WEST,
}AIRCRAFT_DIRECTION;
typedef enum t_aircraftAttitude
@@ -114,6 +115,10 @@ typedef struct t_aircraftData
fix16_t Speed;
short TargetSpeed;
bool TargetReached;
+ // Used for target reached detection
+ fix16_t XPos_Old;
+ // Used for target reached detection
+ fix16_t YPos_Old;
}TYPE_AIRCRAFT_DATA;
typedef struct
@@ -135,6 +140,7 @@ typedef struct
bool LockTarget;
// Stores indexes for player-specific active aircraft
+ // Used to relate SelectedAircraft agains FlightData index
uint8_t ActiveAircraftList[GAME_MAX_AIRCRAFT];
// Flight direction to be managed by player (see 2-player mode)
FL_DIR FlightDirection;
@@ -157,8 +163,6 @@ typedef struct
uint8_t WaypointIdx;
// Another internal index to keep last desired selected point by user when defining a path.
uint8_t LastWaypointIdx;
- // Player ID (PLAYER_ONE = 0, PLAYER_TWO = 1)
- uint8_t Id;
bool (*PadKeyPressed_Callback)(unsigned short);
bool (*PadKeyReleased_Callback)(unsigned short);