mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
pause state helper example
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
#include "GameInteractor.h"
|
||||
|
||||
bool GameInteractor::IsSaveLoaded() {
|
||||
// todo
|
||||
return false;
|
||||
}
|
||||
#include "game/level_update.h"
|
||||
|
||||
extern int16_t sCurrPlayMode;
|
||||
|
||||
// Taken from game/level_update.c
|
||||
#define PLAY_MODE_NORMAL 0
|
||||
#define PLAY_MODE_PAUSED 2
|
||||
#define PLAY_MODE_CHANGE_AREA 3
|
||||
#define PLAY_MODE_CHANGE_LEVEL 4
|
||||
#define PLAY_MODE_FRAME_ADVANCE 5
|
||||
|
||||
bool GameInteractor::IsGameplayPaused() {
|
||||
// todo
|
||||
return false;
|
||||
return sCurrPlayMode == PLAY_MODE_PAUSED;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef GameInteractor_h
|
||||
#define GameInteractor_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -38,9 +41,9 @@ public:
|
||||
DEFINE_HOOK(OnHealthChange, void(int16_t health));
|
||||
|
||||
// Helpers
|
||||
static bool IsSaveLoaded();
|
||||
static bool IsGameplayPaused();
|
||||
|
||||
// Game Actions
|
||||
class RawAction {
|
||||
|
||||
};
|
||||
@@ -48,3 +51,5 @@ public:
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // GameInteractor_h
|
||||
|
||||
Reference in New Issue
Block a user