25 #include "common/random.h" 26 #include "common/ptr.h" 27 #include "engines/engine.h" 28 #include "twp/actorswitcher.h" 29 #include "twp/squirrel/squirrel.h" 31 #define SCREEN_MARGIN 100.f 32 #define SCREEN_WIDTH 1280 33 #define SCREEN_HEIGHT 720 34 #define VERBDEFAULT "verbDefault" 36 template<
typename T,
class DL = Common::DefaultDeleter<T> >
67 class SaveGameManager;
74 struct TwpGameDescription;
80 enum class FadeEffect;
81 enum class RoomEffect;
97 uint32 getFeatures()
const;
110 inline Gfx &getGfx() {
return _gfx; }
111 inline TextDb &getTextDb() {
return *_textDb; }
114 return (f == kSupportsLoadingDuringRuntime) ||
115 (f == kSupportsSavingDuringRuntime) ||
116 (f == kSupportsReturnToLauncher) ||
117 (f == kSupportsChangingOptionsDuringRuntime);
120 void updateSettingVars();
123 return _cutscene.id == 0;
135 Math::Vector2d winToScreen(
const Math::Vector2d &pos)
const;
136 Math::Vector2d screenToWin(
const Math::Vector2d &pos)
const;
137 Math::Vector2d roomToScreen(
const Math::Vector2d &pos)
const;
138 Math::Vector2d screenToRoom(
const Math::Vector2d &pos)
const;
142 void flashSelectableActor(
int flash);
145 bool isSomeoneTalking()
const;
146 void walkFast(
bool state =
true);
154 void cameraAt(
const Math::Vector2d &at);
156 Math::Vector2d cameraPos();
158 void fadeTo(FadeEffect effect,
float duration,
bool fadeToSep =
false);
165 float getRandom()
const;
166 float getRandom(
float min,
float max)
const;
170 SQRESULT skipCutscene();
173 void update(
float elapsedMs);
177 void clickedAt(
const Math::Vector2d &scrPos);
178 bool clickedAtHandled(
const Math::Vector2d &roomPos);
179 void setShaderEffect(RoomEffect effect);
185 void updateTriggers();
210 bool _walkFastState =
false;
211 bool _holdToMove =
false;
212 float _nextHoldToMoveTime = 0.f;
213 int _frameCounter = 0;
217 InputStateFlag inputState = (InputStateFlag)0;
218 bool showCursor =
false;
219 bool inOverride =
false;
232 bool oldLeftDown =
false;
233 bool leftDown =
false;
234 int leftDownTime = 0;
235 bool oldRightDown =
false;
236 bool rightDown =
false;
237 int doubleClick =
false;
238 bool holdLeft =
false;
239 bool holdRight =
false;
241 bool holdDown =
false;
244 oldLeftDown = leftDown;
245 oldRightDown = rightDown;
247 bool isLeftDown() {
return !oldLeftDown && leftDown; }
248 bool isRightDown() {
return !oldRightDown && rightDown; }
252 uint32 totalUpdateTime = 0;
253 uint32 updateRoomTime = 0;
254 uint32 updateTasksTime = 0;
255 uint32 updateMiscTime = 0;
256 uint32 updateCutsceneTime = 0;
257 uint32 updateThreadsTime = 0;
258 uint32 updateCallbacksTime = 0;
281 bool _control =
false;
286 #define SHOULD_QUIT ::Twp::g_twp->shouldQuit()
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: twp.h:122
Definition: actorswitcher.h:49
EngineFeature
Definition: engine.h:250
bool canSaveAutosaveCurrently() override
Definition: twp.h:132
Definition: advancedDetector.h:163
Definition: scenegraph.h:336
Definition: atari-screen.h:60
Definition: squirrel.h:153
Definition: scenegraph.h:295
Definition: formatinfo.h:28
Common::RandomSource & getRandomSource()
Definition: twp.h:107
Definition: actorswitcher.h:37
Definition: detection.h:58
bool hasFeature(EngineFeature f) const override
Definition: twp.h:113
Definition: achievements_tables.h:27