mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Move gi->getConsoleActor()
directly into the header.
This commit is contained in:
parent
ee294d7fa0
commit
65ee4b14d6
8 changed files with 52 additions and 81 deletions
|
@ -132,7 +132,7 @@ struct GameInterface : public ::GameInterface
|
|||
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
||||
DAngle playerPitchMin() override { return DAngle::fromDeg(54.575); }
|
||||
DAngle playerPitchMax() override { return DAngle::fromDeg(-43.15); }
|
||||
DCoreActor* getConsoleActor() override;
|
||||
DCoreActor* getConsoleActor() override { return gPlayer[myconnectindex].actor; }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void ToggleShowWeapon() override;
|
||||
|
|
|
@ -31,11 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
DCoreActor* GameInterface::getConsoleActor()
|
||||
{
|
||||
return gPlayer[myconnectindex].actor;
|
||||
}
|
||||
|
||||
void GameInterface::ToggleThirdPerson()
|
||||
{
|
||||
if (gamestate != GS_LEVEL) return;
|
||||
|
|
|
@ -118,11 +118,6 @@ static int ccmd_spawn(CCmdFuncPtr parm)
|
|||
return CCMD_OK;
|
||||
}
|
||||
|
||||
DCoreActor* GameInterface::getConsoleActor()
|
||||
{
|
||||
return ps[myconnectindex].GetActor();
|
||||
}
|
||||
|
||||
void GameInterface::ToggleThirdPerson()
|
||||
{
|
||||
if (gamestate != GS_LEVEL) return;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
extern player_struct ps[MAXPLAYERS];
|
||||
|
||||
struct GameInterface : public ::GameInterface
|
||||
{
|
||||
const char* Name() override { return "Duke"; }
|
||||
|
@ -50,7 +52,7 @@ struct GameInterface : public ::GameInterface
|
|||
void NewGame(MapRecord* map, int skill, bool) override;
|
||||
void LevelCompleted(MapRecord* map, int skill) override;
|
||||
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
||||
DCoreActor* getConsoleActor() override;
|
||||
DCoreActor* getConsoleActor() override { return ps[myconnectindex].GetActor(); }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void ToggleShowWeapon() override;
|
||||
|
|
|
@ -34,6 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "exhumedactor.h"
|
||||
#include "serialize_obj.h"
|
||||
#include "texturemanager.h"
|
||||
#include "player.h"
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
|
@ -234,7 +235,7 @@ struct GameInterface : public ::GameInterface
|
|||
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
||||
DAngle playerPitchMin() override { return DAngle::fromDeg(49.5); }
|
||||
DAngle playerPitchMax() override { return DAngle::fromDeg(-49.5); }
|
||||
DCoreActor* getConsoleActor() override;
|
||||
DCoreActor* getConsoleActor() override { return PlayerList[nLocalPlayer].pActor; }
|
||||
void ToggleThirdPerson() override;
|
||||
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double interpfrac) override;
|
||||
int GetCurrentSkill() override;
|
||||
|
|
|
@ -39,17 +39,6 @@ BEGIN_PS_NS
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DCoreActor* GameInterface::getConsoleActor()
|
||||
{
|
||||
return PlayerList[nLocalPlayer].pActor;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static int osdcmd_doors(CCmdFuncPtr parm)
|
||||
{
|
||||
for (int i = 0; i < kMaxChannels; i++)
|
||||
|
|
|
@ -1661,52 +1661,6 @@ extern int ChopTics;
|
|||
extern int Bunny_Count;
|
||||
|
||||
|
||||
struct GameInterface : public ::GameInterface
|
||||
{
|
||||
const char* Name() override { return "ShadowWarrior"; }
|
||||
void app_init() override;
|
||||
void LoadTextureInfo(TilesetBuildInfo& info) override;
|
||||
void SetupSpecialTextures(TilesetBuildInfo& info) override;
|
||||
void loadPalette() override;
|
||||
void clearlocalinputstate() override;
|
||||
void FreeLevelData() override;
|
||||
bool GenerateSavePic() override;
|
||||
void MenuSound(EMenuSounds snd) override;
|
||||
bool CanSave() override;
|
||||
bool StartGame(FNewGameStartup& gs) override;
|
||||
FSavegameInfo GetSaveSig() override;
|
||||
void SerializeGameState(FSerializer& arc);
|
||||
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
|
||||
void UpdateSounds() override;
|
||||
void ErrorCleanup() override;
|
||||
void GetInput(const double scaleAdjust, InputPacket* input = nullptr) override;
|
||||
void DrawBackground(void) override;
|
||||
void Ticker(void) override;
|
||||
void Render() override;
|
||||
//void DrawWeapons() override;
|
||||
void Startup() override;
|
||||
const char *CheckCheatMode() override;
|
||||
const char* GenericCheat(int player, int cheat) override;
|
||||
void LevelCompleted(MapRecord *map, int skill) override;
|
||||
void NextLevel(MapRecord *map, int skill) override;
|
||||
void NewGame(MapRecord *map, int skill, bool) override;
|
||||
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
||||
DCoreActor* getConsoleActor() override;
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double smoothRatio) override;
|
||||
void UpdateCameras(double smoothratio) override;
|
||||
void EnterPortal(DCoreActor* viewer, int type) override;
|
||||
void LeavePortal(DCoreActor* viewer, int type) override;
|
||||
void ExitFromMenu() override;
|
||||
int GetCurrentSkill() override;
|
||||
void StartSoundEngine() override;
|
||||
|
||||
|
||||
GameStats getStats() override;
|
||||
};
|
||||
|
||||
|
||||
END_SW_NS
|
||||
|
||||
#include "swactor.h"
|
||||
|
@ -1897,6 +1851,52 @@ struct PLAYER
|
|||
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
||||
|
||||
|
||||
struct GameInterface : public ::GameInterface
|
||||
{
|
||||
const char* Name() override { return "ShadowWarrior"; }
|
||||
void app_init() override;
|
||||
void LoadTextureInfo(TilesetBuildInfo& info) override;
|
||||
void SetupSpecialTextures(TilesetBuildInfo& info) override;
|
||||
void loadPalette() override;
|
||||
void clearlocalinputstate() override;
|
||||
void FreeLevelData() override;
|
||||
bool GenerateSavePic() override;
|
||||
void MenuSound(EMenuSounds snd) override;
|
||||
bool CanSave() override;
|
||||
bool StartGame(FNewGameStartup& gs) override;
|
||||
FSavegameInfo GetSaveSig() override;
|
||||
void SerializeGameState(FSerializer& arc);
|
||||
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
|
||||
void UpdateSounds() override;
|
||||
void ErrorCleanup() override;
|
||||
void GetInput(const double scaleAdjust, InputPacket* input = nullptr) override;
|
||||
void DrawBackground(void) override;
|
||||
void Ticker(void) override;
|
||||
void Render() override;
|
||||
//void DrawWeapons() override;
|
||||
void Startup() override;
|
||||
const char *CheckCheatMode() override;
|
||||
const char* GenericCheat(int player, int cheat) override;
|
||||
void LevelCompleted(MapRecord *map, int skill) override;
|
||||
void NextLevel(MapRecord *map, int skill) override;
|
||||
void NewGame(MapRecord *map, int skill, bool) override;
|
||||
bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override;
|
||||
DCoreActor* getConsoleActor() override { return Player[myconnectindex].actor; }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double smoothRatio) override;
|
||||
void UpdateCameras(double smoothratio) override;
|
||||
void EnterPortal(DCoreActor* viewer, int type) override;
|
||||
void LeavePortal(DCoreActor* viewer, int type) override;
|
||||
void ExitFromMenu() override;
|
||||
int GetCurrentSkill() override;
|
||||
void StartSoundEngine() override;
|
||||
|
||||
|
||||
GameStats getStats() override;
|
||||
};
|
||||
|
||||
|
||||
// OVER and UNDER water macros
|
||||
inline bool SectorIsDiveArea(sectortype* sect)
|
||||
{
|
||||
|
|
|
@ -54,17 +54,6 @@ BEGIN_SW_NS
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DCoreActor* GameInterface::getConsoleActor()
|
||||
{
|
||||
return Player[myconnectindex].actor;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static int osdcmd_mirror(CCmdFuncPtr parm)
|
||||
{
|
||||
char base[80];
|
||||
|
|
Loading…
Reference in a new issue