diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2018-01-02 06:43:54 +0100 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2018-01-02 06:43:54 +0100 |
| commit | b094335404446183954eb1ccaba33f5f4888eacf (patch) | |
| tree | 14e87f4a12f174dc66cad0ab4010efb2858fdd12 /Source/GameStructures.h | |
| parent | e53faffaead15f0aa6c323d0b0dbed05eaf5b4d4 (diff) | |
| download | airport-b094335404446183954eb1ccaba33f5f4888eacf.tar.gz | |
* 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.
Diffstat (limited to 'Source/GameStructures.h')
| -rw-r--r-- | Source/GameStructures.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/GameStructures.h b/Source/GameStructures.h index 115255f..17fee7a 100644 --- a/Source/GameStructures.h +++ b/Source/GameStructures.h @@ -9,6 +9,7 @@ #define GAME_MAX_CHARACTERS 8
#define GAME_MAX_PARKING 32
#define GAME_MAX_RWY_LENGTH 16
+#define GAME_MAX_MAP_SIZE 0x400
#define CHEAT_ARRAY_SIZE 16
#define AIRCRAFT_MAX_TARGETS 48
#define PLAYER_MAX_WAYPOINTS AIRCRAFT_MAX_TARGETS
@@ -78,6 +79,15 @@ typedef struct t_cartpos short y;
}TYPE_CARTESIAN_POS;
+typedef struct t_tileData
+{ + bool ShowTile;
+ TYPE_CARTESIAN_POS CartPos;
+ unsigned char r;
+ unsigned char g;
+ unsigned char b; +}TYPE_TILE_DATA;
+
typedef struct t_flightData
{
FL_DIR FlightDirection[GAME_MAX_AIRCRAFT];
@@ -192,14 +202,20 @@ typedef struct uint8_t UnboardingSequenceIdx;
// Show passengers left
uint8_t PassengersLeftSelectedAircraft;
+ // Lookup tables defined on GameRenderTerrainPrecalculations() to be later used on
+ // GameRenderTerrain().
+ TYPE_TILE_DATA TileData[GAME_MAX_MAP_SIZE];
+ // Player camera instance.
+ TYPE_CAMERA Camera;
+ // Array of tiles which will change their RGB values when displayed under certain player states.
+ uint16_t RwyArray[GAME_MAX_RWY_LENGTH];
+ // Pad callbacks.
bool (*PadKeyPressed_Callback)(unsigned short);
bool (*PadKeyReleased_Callback)(unsigned short);
bool (*PadKeySinglePress_Callback)(unsigned short);
bool (*PadDirectionKeyPressed_Callback)(void);
unsigned short (*PadLastKeySinglePressed_Callback)(void);
- TYPE_CAMERA Camera;
- uint16_t RwyArray[GAME_MAX_RWY_LENGTH];
}TYPE_PLAYER;
typedef enum t_fontflags
|
