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"
36template<
typename T,
class DL = Common::DefaultDeleter<T> >
74struct TwpGameDescription;
97 uint32 getFeatures()
const;
110 inline Gfx &getGfx() {
return _gfx; }
111 inline TextDb &getTextDb() {
return *_textDb; }
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()
EngineFeature
Definition: engine.h:282
@ kSupportsReturnToLauncher
Definition: engine.h:296
@ kSupportsSavingDuringRuntime
Definition: engine.h:314
@ kSupportsLoadingDuringRuntime
Definition: engine.h:305
@ kSupportsChangingOptionsDuringRuntime
Definition: engine.h:322
Definition: actorswitcher.h:49
Definition: scenegraph.h:295
Definition: scenegraph.h:336
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
Common::Error run() override
Common::Error loadGameState(int slot) override
bool hasFeature(EngineFeature f) const override
Definition: twp.h:113
int runDialog(GUI::Dialog &dialog) override
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Common::RandomSource & getRandomSource()
Definition: twp.h:107
Common::String getGameId() const
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: twp.h:122
bool canSaveAutosaveCurrently() override
Definition: twp.h:132
Definition: formatinfo.h:28
Definition: advancedDetector.h:164
Definition: atari-screen.h:58
Definition: actorswitcher.h:37
Definition: detection.h:57
Definition: squirrel.h:154