2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-04-19 16:34:08 +00:00
|
|
|
enum eLevelName {
|
2020-04-19 04:14:13 +00:00
|
|
|
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
|
2020-07-13 14:43:09 +00:00
|
|
|
LEVEL_GENERIC = 0,
|
2020-05-05 21:27:43 +00:00
|
|
|
LEVEL_BEACH,
|
2020-10-20 23:04:51 +00:00
|
|
|
LEVEL_MAINLAND,
|
|
|
|
|
|
|
|
NUM_LEVELS
|
2020-05-05 21:27:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum eAreaName {
|
|
|
|
AREA_MAIN_MAP,
|
|
|
|
AREA_HOTEL,
|
|
|
|
AREA_MANSION,
|
|
|
|
AREA_BANK,
|
|
|
|
AREA_MALL,
|
|
|
|
AREA_STRIP_CLUB,
|
|
|
|
AREA_LAWYERS,
|
|
|
|
AREA_COFFEE_SHOP,
|
|
|
|
AREA_CONCERT_HALL,
|
|
|
|
AREA_STUDIO,
|
|
|
|
AREA_RIFLE_RANGE,
|
|
|
|
AREA_BIKER_BAR,
|
|
|
|
AREA_POLICE_STATION,
|
|
|
|
AREA_EVERYWHERE,
|
|
|
|
AREA_DIRT,
|
|
|
|
AREA_BLOOD,
|
|
|
|
AREA_OVALRING,
|
|
|
|
AREA_MALIBU_CLUB,
|
|
|
|
AREA_PRINT_WORKS
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CGame
|
|
|
|
{
|
|
|
|
public:
|
2020-04-17 05:54:14 +00:00
|
|
|
static eLevelName currLevel;
|
2020-05-05 15:04:43 +00:00
|
|
|
static int32 currArea;
|
2020-04-17 05:54:14 +00:00
|
|
|
static bool bDemoMode;
|
|
|
|
static bool nastyGame;
|
|
|
|
static bool frenchGame;
|
|
|
|
static bool germanGame;
|
2020-03-29 06:35:13 +00:00
|
|
|
#ifdef MORE_LANGUAGES
|
|
|
|
static bool russianGame;
|
2020-04-26 20:49:24 +00:00
|
|
|
static bool japaneseGame;
|
2020-03-29 06:35:13 +00:00
|
|
|
#endif
|
2020-04-17 05:54:14 +00:00
|
|
|
static bool noProstitutes;
|
|
|
|
static bool playingIntro;
|
|
|
|
static char aDatFile[32];
|
2019-05-31 09:44:43 +00:00
|
|
|
|
2021-01-02 09:38:54 +00:00
|
|
|
#ifndef MASTER
|
|
|
|
static CVector PlayerCoords;
|
|
|
|
static bool8 VarUpdatePlayerCoords;
|
|
|
|
#endif
|
|
|
|
|
2019-06-16 22:16:38 +00:00
|
|
|
static bool InitialiseOnceBeforeRW(void);
|
|
|
|
static bool InitialiseRenderWare(void);
|
2019-05-31 17:02:26 +00:00
|
|
|
static void ShutdownRenderWare(void);
|
2020-03-28 20:55:23 +00:00
|
|
|
static bool InitialiseOnceAfterRW(void);
|
2019-05-31 17:02:26 +00:00
|
|
|
static void FinalShutdown(void);
|
2020-03-28 20:55:23 +00:00
|
|
|
static bool Initialise(const char *datFile);
|
|
|
|
static bool ShutDown(void);
|
|
|
|
static void ReInitGameObjectVariables(void);
|
|
|
|
static void ReloadIPLs(void);
|
2019-06-02 03:00:38 +00:00
|
|
|
static void ShutDownForRestart(void);
|
2020-03-28 20:55:23 +00:00
|
|
|
static void InitialiseWhenRestarting(void);
|
2019-06-28 17:23:28 +00:00
|
|
|
static void Process(void);
|
2020-05-07 13:57:49 +00:00
|
|
|
|
2020-05-21 11:23:12 +00:00
|
|
|
static void InitAfterFocusLoss(void);
|
|
|
|
|
2020-05-07 13:57:49 +00:00
|
|
|
static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; }
|
2020-05-27 18:50:01 +00:00
|
|
|
static bool CanSeeWaterFromCurrArea(void);
|
2020-05-12 14:27:26 +00:00
|
|
|
static bool CanSeeOutSideFromCurrArea(void);
|
2020-03-28 20:55:23 +00:00
|
|
|
|
2019-06-28 17:23:28 +00:00
|
|
|
// NB: these do something on PS2
|
2020-03-28 20:55:23 +00:00
|
|
|
static void TidyUpMemory(bool, bool);
|
|
|
|
static void DrasticTidyUpMemory(bool);
|
2020-04-08 23:52:38 +00:00
|
|
|
static void ProcessTidyUpMemory(void);
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
2020-05-05 21:27:43 +00:00
|
|
|
|
|
|
|
inline bool IsAreaVisible(int area) { return area == CGame::currArea || area == AREA_EVERYWHERE; }
|