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
|
|
|
|
|
2020-12-09 14:56:32 +00:00
|
|
|
#include "build.h"
|
2020-08-28 07:06:49 +00:00
|
|
|
#include "gamestruct.h"
|
2020-09-01 21:34:04 +00:00
|
|
|
#include "mapinfo.h"
|
2021-05-03 17:01:00 +00:00
|
|
|
#include "d_net.h"
|
2021-12-05 22:56:35 +00:00
|
|
|
#include "serialize_obj.h"
|
2019-09-19 22:42:45 +00:00
|
|
|
|
2020-12-09 14:56:32 +00:00
|
|
|
#include "common_game.h"
|
|
|
|
#include "fx.h"
|
|
|
|
#include "gameutil.h"
|
|
|
|
#include "db.h"
|
|
|
|
|
|
|
|
#include "actor.h"
|
|
|
|
#include "ai.h"
|
|
|
|
#include "aistate.h"
|
|
|
|
#include "aiunicult.h"
|
|
|
|
#include "callback.h"
|
|
|
|
#include "db.h"
|
|
|
|
#include "endgame.h"
|
|
|
|
#include "eventq.h"
|
|
|
|
#include "gib.h"
|
|
|
|
#include "globals.h"
|
|
|
|
#include "levels.h"
|
|
|
|
#include "misc.h"
|
|
|
|
#include "player.h"
|
|
|
|
#include "seq.h"
|
|
|
|
#include "sound.h"
|
|
|
|
#include "triggers.h"
|
|
|
|
#include "view.h"
|
|
|
|
#include "nnexts.h"
|
|
|
|
#include "player.h"
|
|
|
|
#include "misc.h"
|
|
|
|
#include "sectorfx.h"
|
|
|
|
#include "bloodactor.h"
|
|
|
|
|
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
BEGIN_BLD_NS
|
|
|
|
|
2023-10-03 21:04:11 +00:00
|
|
|
enum EFeatureFlags
|
|
|
|
{
|
|
|
|
kFeatureCustomAmmoCount = 1,
|
2023-10-04 20:05:26 +00:00
|
|
|
kFeatureEnemyAttacks = 2,
|
2023-10-03 21:04:11 +00:00
|
|
|
};
|
|
|
|
|
2023-09-30 19:47:17 +00:00
|
|
|
constexpr int BMAX_PATH = 260;
|
|
|
|
|
2019-09-19 22:42:45 +00:00
|
|
|
struct INIDESCRIPTION {
|
2021-12-29 19:03:42 +00:00
|
|
|
const char* pzName;
|
|
|
|
const char* pzFilename;
|
|
|
|
const char** pzArts;
|
|
|
|
int nArts;
|
2019-09-19 22:42:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct INICHAIN {
|
2021-12-29 19:03:42 +00:00
|
|
|
INICHAIN* pNext;
|
|
|
|
char zName[BMAX_PATH];
|
|
|
|
INIDESCRIPTION* pDescription;
|
2019-09-19 22:42:45 +00:00
|
|
|
};
|
|
|
|
|
2021-12-29 19:03:42 +00:00
|
|
|
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);
|
|
|
|
void ProcessFrame(void);
|
|
|
|
void ScanINIFiles(void);
|
2021-12-06 23:12:04 +00:00
|
|
|
void EndLevel(bool);
|
2020-09-01 17:49:05 +00:00
|
|
|
|
2021-03-20 22:01:16 +00:00
|
|
|
extern int mirrorcnt, mirrorsector, mirrorwall[4];
|
|
|
|
|
2020-09-01 17:49:05 +00:00
|
|
|
inline bool DemoRecordStatus(void)
|
|
|
|
{
|
2021-12-29 19:03:42 +00:00
|
|
|
return false;
|
2020-09-01 17:49:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool VanillaMode()
|
|
|
|
{
|
2021-12-29 19:03:42 +00:00
|
|
|
return false;
|
2020-09-01 17:49:05 +00:00
|
|
|
}
|
2019-09-22 06:39:22 +00:00
|
|
|
void sndPlaySpecialMusicOrNothing(int nMusic);
|
|
|
|
|
2021-05-31 21:16:52 +00:00
|
|
|
struct GameInterface : public ::GameInterface
|
2019-11-03 11:32:58 +00:00
|
|
|
{
|
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-11-21 14:09:38 +00:00
|
|
|
void SerializeGameState(FSerializer& arc) override;
|
2020-11-10 21:07:45 +00:00
|
|
|
void loadPalette() override;
|
2020-01-14 20:20:46 +00:00
|
|
|
bool GenerateSavePic() override;
|
2020-09-03 21:10:28 +00:00
|
|
|
void FreeLevelData() 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-08-29 22:55:49 +00:00
|
|
|
void UpdateSounds() override;
|
2023-10-02 05:05:16 +00:00
|
|
|
void Ticker() override;
|
2020-09-01 21:34:04 +00:00
|
|
|
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;
|
2021-12-29 19:03:42 +00:00
|
|
|
void NewGame(MapRecord* sng, int skill, bool) override;
|
2020-09-04 18:46:44 +00:00
|
|
|
void NextLevel(MapRecord* map, int skill) override;
|
|
|
|
void LevelCompleted(MapRecord* map, int skill) override;
|
2022-09-07 09:37:50 +00:00
|
|
|
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
2022-10-11 06:46:56 +00:00
|
|
|
DAngle playerPitchMin() override { return DAngle::fromDeg(54.575); }
|
|
|
|
DAngle playerPitchMax() override { return DAngle::fromDeg(-43.15); }
|
2020-11-29 11:23:31 +00:00
|
|
|
void ToggleThirdPerson() override;
|
|
|
|
void SwitchCoopView() override;
|
|
|
|
void ToggleShowWeapon() override;
|
2022-09-16 17:20:35 +00:00
|
|
|
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double interpfrac) override;
|
2021-12-22 22:27:32 +00:00
|
|
|
void EnterPortal(DCoreActor* viewer, int type) override;
|
|
|
|
void LeavePortal(DCoreActor* viewer, int type) override;
|
2022-12-07 16:10:27 +00:00
|
|
|
void LoadTextureInfo(TilesetBuildInfo& info) override;
|
|
|
|
void SetupSpecialTextures(TilesetBuildInfo&) override;
|
2021-07-20 08:50:46 +00:00
|
|
|
int GetCurrentSkill() override;
|
2021-08-22 23:00:30 +00:00
|
|
|
bool IsQAVInterpTypeValid(const FString& type) override;
|
2021-11-14 21:52:20 +00:00
|
|
|
void AddQAVInterpProps(const int res_id, const FString& interptype, const bool loopable, const TMap<int, TArray<int>>&& ignoredata) override;
|
|
|
|
void RemoveQAVInterpProps(const int res_id) override;
|
2022-11-24 20:27:08 +00:00
|
|
|
void StartSoundEngine() override;
|
2023-09-24 03:40:15 +00:00
|
|
|
unsigned getCrouchState() override;
|
2023-10-03 20:25:28 +00:00
|
|
|
void FinalizeSetup() override;
|
2019-11-03 11:32:58 +00:00
|
|
|
};
|
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
END_BLD_NS
|