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();
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;
171 void update(
float elapsedMs);
175 void clickedAt(
const Math::Vector2d &scrPos);
176 bool clickedAtHandled(
const Math::Vector2d &roomPos);
177 void setShaderEffect(RoomEffect effect);
183 void updateTriggers();
209 bool _walkFastState =
false;
210 bool _holdToMove =
false;
211 float _nextHoldToMoveTime = 0.f;
212 int _frameCounter = 0;
224 bool oldLeftDown =
false;
225 bool leftDown =
false;
226 int leftDownTime = 0;
227 bool oldRightDown =
false;
228 bool rightDown =
false;
229 int doubleClick =
false;
230 bool holdLeft =
false;
231 bool holdRight =
false;
233 bool holdDown =
false;
236 oldLeftDown = leftDown;
237 oldRightDown = rightDown;
239 bool isLeftDown() {
return !oldLeftDown && leftDown; }
240 bool isRightDown() {
return !oldRightDown && rightDown; }
244 uint32 totalUpdateTime = 0;
245 uint32 updateRoomTime = 0;
246 uint32 updateTasksTime = 0;
247 uint32 updateMiscTime = 0;
248 uint32 updateCutsceneTime = 0;
249 uint32 updateThreadsTime = 0;
250 uint32 updateCallbacksTime = 0;
273 bool _control =
false;
278 #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:253
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