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"
|
2020-07-25 18:34:40 +00:00
|
|
|
#include "misc.h"
|
2019-09-21 11:02:17 +00:00
|
|
|
#include "db.h"
|
2020-08-16 11:26:57 +00:00
|
|
|
#include "mapinfo.h"
|
2020-08-28 07:06:49 +00:00
|
|
|
#include "gamestruct.h"
|
2020-09-01 21:34:04 +00:00
|
|
|
#include "mapinfo.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
|
|
|
extern int gNetPlayers;
|
|
|
|
extern int blood_globalflags;
|
|
|
|
|
|
|
|
void QuitGame(void);
|
|
|
|
void PreloadCache(void);
|
2020-08-16 11:26:57 +00:00
|
|
|
void StartLevel(MapRecord *gameOptions);
|
2019-09-19 22:42:45 +00:00
|
|
|
void ProcessFrame(void);
|
|
|
|
void ScanINIFiles(void);
|
2020-09-01 19:27:32 +00:00
|
|
|
void EndLevel();
|
2020-09-01 17:49:05 +00:00
|
|
|
|
|
|
|
inline bool DemoRecordStatus(void)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool VanillaMode()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2019-09-22 06:39:22 +00:00
|
|
|
void sndPlaySpecialMusicOrNothing(int nMusic);
|
|
|
|
|
2019-11-03 11:32:58 +00:00
|
|
|
struct GameInterface : ::GameInterface
|
|
|
|
{
|
2020-02-12 19:25:59 +00:00
|
|
|
const char* Name() override { return "Blood"; }
|
2020-08-23 15:47:05 +00:00
|
|
|
void app_init() override;
|
2020-01-14 20:20:46 +00:00
|
|
|
bool GenerateSavePic() override;
|
2020-09-03 21:10:28 +00:00
|
|
|
void FreeLevelData() override;
|
2019-12-24 18:47:34 +00:00
|
|
|
void FreeGameData() 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;
|
2020-04-23 19:18:40 +00:00
|
|
|
void StartGame(FNewGameStartup& gs) override;
|
2019-12-01 14:31:08 +00:00
|
|
|
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;
|
2020-01-07 00:11:19 +00:00
|
|
|
void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool bg) override;
|
2019-12-06 17:36:49 +00:00
|
|
|
void QuitToTitle() override;
|
2019-12-23 19:55:12 +00:00
|
|
|
FString GetCoordString() override;
|
2020-08-16 00:55:50 +00:00
|
|
|
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
2020-08-29 22:55:49 +00:00
|
|
|
void UpdateSounds() override;
|
2020-09-14 05:14:22 +00:00
|
|
|
void GetInput(InputPacket* packet, ControlInfo* const hidInput) override;
|
2020-09-01 21:34:04 +00:00
|
|
|
void Ticker() override;
|
|
|
|
void DrawBackground() override;
|
|
|
|
void Startup() override;
|
|
|
|
void Render() override;
|
2020-09-02 22:29:17 +00:00
|
|
|
const char* GenericCheat(int player, int cheat) override;
|
2020-09-04 18:46:44 +00:00
|
|
|
void NewGame(MapRecord *sng, int skill) override;
|
|
|
|
void NextLevel(MapRecord* map, int skill) override;
|
|
|
|
void LevelCompleted(MapRecord* map, int skill) override;
|
2020-09-06 19:15:59 +00:00
|
|
|
bool DrawAutomapPlayer(int x, int y, int z, int a) override;
|
2020-09-14 23:27:24 +00:00
|
|
|
void SetTileProps(int til, int surf, int vox, int shade) override;
|
2020-09-20 10:01:05 +00:00
|
|
|
fixed_t playerHorizMin() override { return IntToFixed(-79); }
|
|
|
|
fixed_t playerHorizMax() override { return IntToFixed(219); }
|
2020-08-29 22:55:49 +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
|