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/screen.h" 38 #include "video/video_decoder.h" 40 #include "phoenixvr/angle.h" 41 #include "phoenixvr/detection.h" 42 #include "phoenixvr/region_set.h" 43 #include "phoenixvr/script.h" 44 #include "phoenixvr/vr.h" 52 struct PhoenixVRGameDescription;
55 enum struct RolloverType {
63 static constexpr uint kFPSLimit = 60;
80 uint32 getFeatures()
const;
95 return (f == kSupportsLoadingDuringRuntime) ||
96 (f == kSupportsSavingDuringRuntime) ||
97 (f == kSupportsReturnToLauncher);
110 void syncSoundSettings()
override;
122 void stopAllSounds();
129 void executeTest(
int idx);
130 void scheduleTest(
int idx);
132 void wait(
float seconds);
135 const Region *getRegion(
int idx)
const;
139 void startTimer(
float seconds);
140 void pauseTimer(
bool pause,
bool deactivate);
144 void setZoom(
int fov) {
145 _fov = kPi * fov / 180;
148 void setXMax(
float max) {
149 static const float baseX = -kPi2;
150 _angleY.setRange(baseX - max, baseX + max);
154 void setYMax(
float min,
float max) {
155 _angleX.setRange(min, max);
159 _angleX.resetRange();
162 void setAngle(
float x,
float y) {
164 static const float baseX = -kPi2;
165 _angleY.set(baseX + x);
168 bool testSaveSlot(
int idx)
const;
171 void drawSlot(
int idx,
int face,
int x,
int y);
172 void captureContext();
175 _contextLabel = contextLabel;
178 bool isLoading()
const {
return !_loadedState.empty(); }
180 void saveVariables();
181 void loadVariables();
183 void rollover(
int textId, RolloverType type);
194 PointF currentVRPos()
const {
195 return RectF::transform(_angleX.angle(), _angleY.angle(), _fov);
198 void tickTimer(
float dt);
199 void loadNextScript();
200 void renderVR(
float dt);
203 bool _hasFocus =
true;
211 int _hoverIndex = -1;
215 uint operator()(Common::KeyCode val)
const {
return static_cast<uint
>(val); }
239 int _currentMusicVolume = 0;
246 bool _showRegions =
false;
248 static constexpr byte kPaused = 2;
249 static constexpr byte kActive = 4;
250 byte _timerFlags = 0;
269 #define SHOULD_QUIT ::PhoenixVR::g_engine->shouldQuit() 273 #endif // PHOENIXVR_H Definition: managed_surface.h:51
bool hasFeature(EngineFeature f) const override
Definition: phoenixvr.h:94
EngineFeature
Definition: engine.h:258
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: phoenixvr.h:103
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: phoenixvr.h:106
Definition: advancedDetector.h:164
Definition: phoenixvr.h:61
uint getRandomNumber(uint max)
Definition: region_set.h:34
SoundType
Definition: mixer.h:73
uint32 getRandomNumber(uint maxNum)
Definition: phoenixvr.h:90
Definition: formatinfo.h:28
int getAutosaveSlot() const override
Definition: phoenixvr.h:101