mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 03:40:50 +00:00
- moved non-Build definitions out of baselayer.h.
This commit is contained in:
parent
5b805af4e7
commit
686999381b
2 changed files with 102 additions and 99 deletions
|
@ -38,105 +38,7 @@ extern int32_t qsetmode;
|
|||
#define in3dmode() (qsetmode==200)
|
||||
|
||||
extern int32_t g_logFlushWindow;
|
||||
bool System_WantGuiCapture(); // During playing this tells us whether the game must be paused due to active GUI elememts.
|
||||
|
||||
|
||||
#include "print.h"
|
||||
|
||||
struct GameStats
|
||||
{
|
||||
int kill, tkill;
|
||||
int secret, tsecret;
|
||||
int timesecnd;
|
||||
int frags;
|
||||
};
|
||||
|
||||
struct FNewGameStartup
|
||||
{
|
||||
int Episode;
|
||||
int Level;
|
||||
int Skill;
|
||||
int CustomLevel1;
|
||||
int CustomLevel2;
|
||||
};
|
||||
|
||||
struct FSavegameInfo
|
||||
{
|
||||
const char *savesig;
|
||||
int minsavever;
|
||||
int currentsavever;
|
||||
};
|
||||
|
||||
struct FSaveGameNode
|
||||
{
|
||||
FString SaveTitle;
|
||||
FString Filename;
|
||||
bool bOldVersion = false;
|
||||
bool bMissingWads = false;
|
||||
bool bNoDelete = false;
|
||||
bool bIsExt = false;
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return Filename.IsNotEmpty() && !bOldVersion && !bMissingWads;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum EMenuSounds : int;
|
||||
|
||||
struct GameInterface
|
||||
{
|
||||
virtual const char* Name() { return "$"; }
|
||||
virtual ~GameInterface() {}
|
||||
virtual bool GenerateSavePic() { return false; }
|
||||
virtual void faketimerhandler() {} // This is a remnant of older versions, but Blood backend has not updated yet.
|
||||
virtual int app_main() = 0;
|
||||
virtual void UpdateScreenSize() {}
|
||||
virtual void FreeGameData() {}
|
||||
virtual bool validate_hud(int) { return true; }
|
||||
virtual void set_hud_layout(int size) = 0;
|
||||
virtual void set_hud_scale(int size) {}
|
||||
virtual FString statFPS() { return "FPS display not available"; }
|
||||
virtual GameStats getStats() { return {}; }
|
||||
virtual void DrawNativeMenuText(int fontnum, int state, double xpos, double ypos, float fontscale, const char* text, int flags) {}
|
||||
virtual void MainMenuOpened() {}
|
||||
virtual void MenuOpened() {}
|
||||
virtual void MenuClosed() {}
|
||||
virtual void MenuSound(EMenuSounds snd) {}
|
||||
virtual bool CanSave() { return true; }
|
||||
virtual void CustomMenuSelection(int menu, int item) {}
|
||||
virtual void StartGame(FNewGameStartup& gs) {}
|
||||
virtual FSavegameInfo GetSaveSig() { return { "", 0, 0}; }
|
||||
virtual bool DrawSpecialScreen(const DVector2 &origin, int tilenum) { return false; }
|
||||
virtual void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool withbg = true) {}
|
||||
virtual void DrawMenuCaption(const DVector2& origin, const char* text) {}
|
||||
virtual bool SaveGame(FSaveGameNode*) { return false; }
|
||||
virtual bool LoadGame(FSaveGameNode*) { return false; }
|
||||
virtual bool CleanupForLoad() { return true; }
|
||||
virtual void DoPrintMessage(int prio, const char*) {}
|
||||
void PrintMessage(int prio, const char*fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
FString f;
|
||||
f.VFormat(fmt, ap);
|
||||
DoPrintMessage(prio, f);
|
||||
}
|
||||
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
|
||||
virtual void QuitToTitle() {}
|
||||
virtual void SetAmbience(bool on) {}
|
||||
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
|
||||
virtual int GetStringTile(int font, const char* t, int f) { return -1; }
|
||||
|
||||
};
|
||||
|
||||
extern GameInterface* gi;
|
||||
extern double g_beforeSwapTime;
|
||||
|
||||
|
||||
void ImGui_Begin_Frame();
|
||||
|
||||
|
||||
#include "gamestruct.h"
|
||||
#endif // baselayer_h_
|
||||
|
||||
|
|
101
source/core/gamestruct.h
Normal file
101
source/core/gamestruct.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
#pragma once
|
||||
|
||||
bool System_WantGuiCapture(); // During playing this tells us whether the game must be paused due to active GUI elememts.
|
||||
|
||||
#include <stdint.h>
|
||||
#include "print.h"
|
||||
|
||||
struct GameStats
|
||||
{
|
||||
int kill, tkill;
|
||||
int secret, tsecret;
|
||||
int timesecnd;
|
||||
int frags;
|
||||
};
|
||||
|
||||
struct FNewGameStartup
|
||||
{
|
||||
int Episode;
|
||||
int Level;
|
||||
int Skill;
|
||||
int CustomLevel1;
|
||||
int CustomLevel2;
|
||||
};
|
||||
|
||||
struct FSavegameInfo
|
||||
{
|
||||
const char *savesig;
|
||||
int minsavever;
|
||||
int currentsavever;
|
||||
};
|
||||
|
||||
struct FSaveGameNode
|
||||
{
|
||||
FString SaveTitle;
|
||||
FString Filename;
|
||||
bool bOldVersion = false;
|
||||
bool bMissingWads = false;
|
||||
bool bNoDelete = false;
|
||||
bool bIsExt = false;
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return Filename.IsNotEmpty() && !bOldVersion && !bMissingWads;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum EMenuSounds : int;
|
||||
|
||||
struct GameInterface
|
||||
{
|
||||
virtual const char* Name() { return "$"; }
|
||||
virtual ~GameInterface() {}
|
||||
virtual bool GenerateSavePic() { return false; }
|
||||
virtual void faketimerhandler() {} // This is a remnant of older versions, but Blood backend has not updated yet.
|
||||
virtual int app_main() = 0;
|
||||
virtual void UpdateScreenSize() {}
|
||||
virtual void FreeGameData() {}
|
||||
virtual bool validate_hud(int) { return true; }
|
||||
virtual void set_hud_layout(int size) = 0;
|
||||
virtual void set_hud_scale(int size) {}
|
||||
virtual FString statFPS() { return "FPS display not available"; }
|
||||
virtual GameStats getStats() { return {}; }
|
||||
virtual void DrawNativeMenuText(int fontnum, int state, double xpos, double ypos, float fontscale, const char* text, int flags) {}
|
||||
virtual void MainMenuOpened() {}
|
||||
virtual void MenuOpened() {}
|
||||
virtual void MenuClosed() {}
|
||||
virtual void MenuSound(EMenuSounds snd) {}
|
||||
virtual bool CanSave() { return true; }
|
||||
virtual void CustomMenuSelection(int menu, int item) {}
|
||||
virtual void StartGame(FNewGameStartup& gs) {}
|
||||
virtual FSavegameInfo GetSaveSig() { return { "", 0, 0}; }
|
||||
virtual bool DrawSpecialScreen(const DVector2 &origin, int tilenum) { return false; }
|
||||
virtual void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool withbg = true) {}
|
||||
virtual void DrawMenuCaption(const DVector2& origin, const char* text) {}
|
||||
virtual bool SaveGame(FSaveGameNode*) { return false; }
|
||||
virtual bool LoadGame(FSaveGameNode*) { return false; }
|
||||
virtual bool CleanupForLoad() { return true; }
|
||||
virtual void DoPrintMessage(int prio, const char*) {}
|
||||
void PrintMessage(int prio, const char*fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
FString f;
|
||||
f.VFormat(fmt, ap);
|
||||
DoPrintMessage(prio, f);
|
||||
}
|
||||
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
|
||||
virtual void QuitToTitle() {}
|
||||
virtual void SetAmbience(bool on) {}
|
||||
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
|
||||
virtual int GetStringTile(int font, const char* t, int f) { return -1; }
|
||||
|
||||
};
|
||||
|
||||
extern GameInterface* gi;
|
||||
extern double g_beforeSwapTime;
|
||||
|
||||
|
||||
void ImGui_Begin_Frame();
|
||||
|
Loading…
Reference in a new issue