2019-09-19 22:42:45 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
|
|
Copyright (C) 2019 Nuke.YKT
|
|
|
|
|
|
|
|
This file is part of NBlood.
|
|
|
|
|
|
|
|
NBlood is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "levels.h"
|
|
|
|
#include "resource.h"
|
2019-09-21 11:02:17 +00:00
|
|
|
#include "db.h"
|
2019-09-19 22:42:45 +00:00
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
BEGIN_BLD_NS
|
|
|
|
|
2019-09-19 22:42:45 +00:00
|
|
|
struct INIDESCRIPTION {
|
|
|
|
const char *pzName;
|
|
|
|
const char *pzFilename;
|
|
|
|
const char **pzArts;
|
|
|
|
int nArts;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct INICHAIN {
|
|
|
|
INICHAIN *pNext;
|
|
|
|
char zName[BMAX_PATH];
|
|
|
|
INIDESCRIPTION *pDescription;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern INICHAIN *pINIChain;
|
2019-11-01 21:17:15 +00:00
|
|
|
|
2019-09-19 22:42:45 +00:00
|
|
|
|
|
|
|
enum INPUT_MODE {
|
2019-10-19 15:20:06 +00:00
|
|
|
kInputGame = 0,
|
|
|
|
kInputMessage,
|
|
|
|
kInputEndGame,
|
2019-09-19 22:42:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern INPUT_MODE gInputMode;
|
|
|
|
extern int32_t gNoSetup;
|
|
|
|
extern short BloodVersion;
|
|
|
|
extern int gNetPlayers;
|
|
|
|
extern bool gRestartGame;
|
|
|
|
#define GAMEUPDATEAVGTIMENUMSAMPLES 100
|
|
|
|
extern double g_gameUpdateTime, g_gameUpdateAndDrawTime;
|
|
|
|
extern double g_gameUpdateAvgTime;
|
|
|
|
extern int blood_globalflags;
|
|
|
|
|
2019-06-27 04:33:22 +00:00
|
|
|
extern int gSaveGameNum;
|
|
|
|
extern bool gPaused;
|
|
|
|
extern bool gSaveGameActive;
|
|
|
|
extern bool gSavingGame;
|
|
|
|
extern bool gQuitGame;
|
|
|
|
extern int gQuitRequest;
|
|
|
|
extern int gCacheMiss;
|
2019-09-24 02:14:59 +00:00
|
|
|
extern int gDoQuickSave;
|
2019-09-19 22:42:45 +00:00
|
|
|
|
|
|
|
void QuitGame(void);
|
|
|
|
void PreloadCache(void);
|
|
|
|
void StartLevel(GAMEOPTIONS *gameOptions);
|
|
|
|
void ProcessFrame(void);
|
|
|
|
void ScanINIFiles(void);
|
|
|
|
bool DemoRecordStatus(void);
|
|
|
|
bool VanillaMode(void);
|
2019-06-28 12:45:39 +00:00
|
|
|
bool fileExistsRFF(int id, const char* ext);
|
|
|
|
int sndTryPlaySpecialMusic(int nMusic);
|
2019-09-22 06:39:22 +00:00
|
|
|
void sndPlaySpecialMusicOrNothing(int nMusic);
|
|
|
|
|
2019-11-03 11:32:58 +00:00
|
|
|
struct GameInterface : ::GameInterface
|
|
|
|
{
|
|
|
|
void faketimerhandler() override;
|
|
|
|
int app_main() override;
|
2020-01-01 08:49:06 +00:00
|
|
|
void UpdateScreenSize() override;
|
2019-12-24 18:47:34 +00:00
|
|
|
void FreeGameData() override;
|
2019-11-03 11:32:58 +00:00
|
|
|
bool validate_hud(int) override;
|
|
|
|
void set_hud_layout(int size) override;
|
|
|
|
void set_hud_scale(int size) override;
|
2019-11-10 10:42:25 +00:00
|
|
|
FString statFPS() override;
|
2019-11-26 23:41:26 +00:00
|
|
|
FSavegameInfo GetSaveSig() override;
|
2019-12-01 14:31:08 +00:00
|
|
|
void MenuOpened() override;
|
|
|
|
void MenuClosed() override;
|
|
|
|
bool CanSave() override;
|
|
|
|
void StartGame(FGameStartup& gs) override;
|
|
|
|
void DrawNativeMenuText(int fontnum, int state, double xpos, double ypos, float fontscale, const char* text, int flags) override;
|
|
|
|
void DrawMenuCaption(const DVector2& origin, const char* text) override;
|
2019-12-01 21:54:52 +00:00
|
|
|
bool SaveGame(FSaveGameNode*) override;
|
|
|
|
bool LoadGame(FSaveGameNode*) override;
|
2019-12-04 20:35:35 +00:00
|
|
|
void DoPrintMessage(int prio, const char*) override;
|
2019-12-05 22:17:55 +00:00
|
|
|
void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool bg);
|
2019-12-06 17:36:49 +00:00
|
|
|
void QuitToTitle() override;
|
2019-12-23 19:55:12 +00:00
|
|
|
FString GetCoordString() override;
|
2019-12-04 20:35:35 +00:00
|
|
|
|
2019-12-08 23:55:30 +00:00
|
|
|
GameStats getStats() override;
|
2019-11-03 11:32:58 +00:00
|
|
|
};
|
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
END_BLD_NS
|