2020-12-21 13:16:29 -03:00
|
|
|
#pragma once
|
2021-12-22 16:23:57 +03:00
|
|
|
#include "Game/animation.h"
|
2021-12-24 03:32:19 +03:00
|
|
|
#include "Game/control/trigger.h"
|
2021-12-22 16:23:57 +03:00
|
|
|
#include "Game/items.h"
|
|
|
|
#include "Game/room.h"
|
2021-12-24 03:32:19 +03:00
|
|
|
#include "Specific/phd_global.h"
|
2020-12-21 13:16:29 -03:00
|
|
|
|
|
|
|
struct BOUNDING_BOX;
|
2021-08-28 13:27:58 +02:00
|
|
|
struct ITEM_INFO;
|
|
|
|
struct COLL_INFO;
|
|
|
|
class FLOOR_INFO;
|
|
|
|
struct ANIM_STRUCT;
|
|
|
|
struct MESH_INFO;
|
|
|
|
struct ROOM_INFO;
|
2021-09-13 03:20:53 +03:00
|
|
|
|
2021-09-25 16:03:28 -05:00
|
|
|
enum class GAME_STATUS
|
2020-12-21 13:16:29 -03:00
|
|
|
{
|
|
|
|
GAME_STATUS_NONE,
|
|
|
|
GAME_STATUS_NEW_GAME,
|
|
|
|
GAME_STATUS_LOAD_GAME,
|
|
|
|
GAME_STATUS_SAVE_GAME,
|
|
|
|
GAME_STATUS_EXIT_TO_TITLE,
|
|
|
|
GAME_STATUS_EXIT_GAME,
|
|
|
|
GAME_STATUS_LARA_DEAD,
|
|
|
|
GAME_STATUS_LEVEL_COMPLETED
|
|
|
|
};
|
|
|
|
|
|
|
|
enum HEADINGS
|
|
|
|
{
|
|
|
|
NORTH,
|
|
|
|
EAST,
|
|
|
|
SOUTH,
|
|
|
|
WEST
|
|
|
|
};
|
|
|
|
|
2021-10-27 08:35:11 +02:00
|
|
|
constexpr int MAX_ROOMS = 1024;
|
|
|
|
|
2021-11-22 19:14:29 +03:00
|
|
|
constexpr int WIBBLE_SPEED = 4;
|
2021-11-22 19:19:48 +03:00
|
|
|
constexpr int WIBBLE_MAX = UCHAR_MAX - WIBBLE_SPEED + 1;
|
2021-11-22 19:14:29 +03:00
|
|
|
|
2021-09-15 22:43:19 +03:00
|
|
|
extern int GameTimer;
|
|
|
|
extern int RumbleTimer;
|
2021-10-22 16:33:15 +03:00
|
|
|
extern int GlobalCounter;
|
2021-09-15 22:43:19 +03:00
|
|
|
extern int Wibble;
|
|
|
|
|
|
|
|
extern bool InitialiseGame;
|
|
|
|
extern bool DoTheGame;
|
|
|
|
extern bool JustLoaded;
|
|
|
|
extern bool ThreadEnded;
|
|
|
|
|
|
|
|
extern int RequiredStartPos;
|
|
|
|
extern int CurrentLevel;
|
|
|
|
extern int LevelComplete;
|
|
|
|
|
|
|
|
extern bool InItemControlLoop;
|
2020-12-21 13:16:29 -03:00
|
|
|
extern short ItemNewRoomNo;
|
2021-10-27 08:35:11 +02:00
|
|
|
extern short ItemNewRooms[MAX_ROOMS];
|
2020-12-21 13:16:29 -03:00
|
|
|
extern short NextItemActive;
|
|
|
|
extern short NextItemFree;
|
2021-09-15 22:43:19 +03:00
|
|
|
extern short NextFxActive;
|
|
|
|
extern short NextFxFree;
|
|
|
|
|
|
|
|
extern int WeaponDelay;
|
|
|
|
extern int WeaponEnemyTimer;
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
extern std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE];
|
|
|
|
|
2021-09-16 05:06:03 +03:00
|
|
|
int DrawPhase();
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
GAME_STATUS DoTitle(int index);
|
2021-06-26 07:36:54 +02:00
|
|
|
GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame);
|
2020-12-21 13:16:29 -03:00
|
|
|
GAME_STATUS ControlPhase(int numFrames, int demoMode);
|
2021-09-15 17:40:00 +03:00
|
|
|
|
|
|
|
int GetRandomControl();
|
|
|
|
int GetRandomDraw();
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
void KillMoveItems();
|
|
|
|
void KillMoveEffects();
|
2021-09-16 01:12:19 +03:00
|
|
|
void UpdateShatters();
|
2021-09-19 23:41:26 +03:00
|
|
|
int ExplodeItemNode(ITEM_INFO* item, int Node, int NoXZVel, int bits);
|
2021-09-15 17:40:00 +03:00
|
|
|
|
2021-10-04 03:09:32 +03:00
|
|
|
void CleanUp();
|
2021-09-15 17:40:00 +03:00
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
void AlterFloorHeight(ITEM_INFO* item, int height);
|
|
|
|
int GetFloorHeight(FLOOR_INFO* floor, int x, int y, int z);
|
|
|
|
FLOOR_INFO* GetFloor(int x, int y, int z, short* roomNumber);
|
2021-09-19 23:41:26 +03:00
|
|
|
int GetCeiling(FLOOR_INFO* floor, int x, int y, int z);
|
2021-09-15 17:40:00 +03:00
|
|
|
int GetWaterSurface(int x, int y, int z, short roomNumber);
|
2021-11-10 01:32:54 +11:00
|
|
|
int GetWaterDepth(int x, int y, int z, short roomNumber);
|
2021-11-10 02:01:43 +11:00
|
|
|
int GetWaterHeight(int x, int y, int z, short roomNumber);
|
2021-09-24 13:50:31 +03:00
|
|
|
int GetDistanceToFloor(int itemNumber, bool precise = true);
|
2021-09-15 17:40:00 +03:00
|
|
|
|
2021-09-15 17:20:42 +03:00
|
|
|
unsigned CALLBACK GameMain(void*);
|