25 #include "audio/mixer.h" 26 #include "common/error.h" 27 #include "common/fs.h" 28 #include "common/hash-str.h" 29 #include "common/keyboard.h" 30 #include "common/random.h" 31 #include "common/scummsys.h" 32 #include "common/serializer.h" 33 #include "common/system.h" 34 #include "common/util.h" 35 #include "engines/engine.h" 36 #include "engines/savestate.h" 37 #include "graphics/framelimiter.h" 38 #include "graphics/screen.h" 39 #include "video/video_decoder.h" 41 #include "phoenixvr/angle.h" 42 #include "phoenixvr/detection.h" 43 #include "phoenixvr/region_set.h" 44 #include "phoenixvr/script.h" 45 #include "phoenixvr/vr.h" 54 struct PhoenixVRGameDescription;
57 enum struct RolloverType : uint8 {
65 static constexpr uint kFPSLimit = 60;
66 static constexpr
float kMaxTick = 4.0f / kFPSLimit;
85 uint32 getFeatures()
const;
87 bool gameIdMatches(
const char *gameId)
const;
97 return (f == kSupportsLoadingDuringRuntime) ||
98 (f == kSupportsSavingDuringRuntime) ||
99 (f == kSupportsReturnToLauncher);
112 void syncSoundSettings()
override;
124 void stopAllSounds();
131 void executeTest(
int idx);
132 void scheduleTest(
int idx);
134 void wait(
float seconds);
137 const Region *getRegion(
int idx)
const;
141 void startTimer(
float seconds);
142 void pauseTimer(
bool pause,
bool deactivate);
146 void setZoom(
float fov) {
149 void interpolateAngle(
float x,
float y,
float speed,
float zoom);
150 void fade(
int start,
int stop,
int speed);
152 void setXMax(
float max) {
153 _angleY.setRange(-max, max);
157 void setYMax(
float min,
float max) {
158 _angleX.setRange(min, max);
162 _angleX.resetRange();
165 void setAngle(
float x,
float y) {
167 _angleY.set(kPi2 - x);
170 void setNord(
float a) {
174 bool testSaveSlot(
int idx)
const;
177 void drawSlot(
int idx,
int face,
int x,
int y);
178 void captureContext();
181 _contextLabel = contextLabel;
184 bool isLoading()
const {
return !_loadedState.empty(); }
186 bool wasRestarted()
const {
return _restarted; }
187 bool wasLoaded()
const {
return _loaded; }
189 void saveVariables();
190 void loadVariables();
192 void rollover(
int textId, RolloverType type);
197 void setGlobalVolume(
int vol);
207 PointF currentVRPos()
const {
208 return RectF::transform(_angleX.angle(), _angleY.angle(), _fov);
211 void tickTimer(
float dt);
212 void loadNextScript();
213 void renderVR(
float dt);
215 void renderFade(
int color);
220 bool _hasFocus =
true;
228 int _hoverIndex = -1;
232 uint operator()(Common::KeyCode val)
const {
return static_cast<uint
>(val); }
256 int _currentMusicVolume = 0;
263 bool _showRegions =
false;
265 static constexpr byte kPaused = 2;
266 static constexpr byte kActive = 4;
267 byte _timerFlags = 0;
268 float _timer = 0, _initialTimer = 0;
285 uint _currentLevel = 0;
287 bool _restarted =
false;
288 bool _loaded =
false;
292 #define SHOULD_QUIT ::PhoenixVR::g_engine->shouldQuit() 296 #endif // PHOENIXVR_H Definition: managed_surface.h:51
bool hasFeature(EngineFeature f) const override
Definition: phoenixvr.h:96
Definition: framelimiter.h:40
EngineFeature
Definition: engine.h:258
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: phoenixvr.h:105
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: phoenixvr.h:108
Definition: advancedDetector.h:164
Definition: phoenixvr.h:63
uint getRandomNumber(uint max)
Definition: region_set.h:34
SoundType
Definition: mixer.h:73
uint32 getRandomNumber(uint maxNum)
Definition: phoenixvr.h:92
Definition: formatinfo.h:28
int getAutosaveSlot() const override
Definition: phoenixvr.h:103