22 #ifndef NANCY_ACTION_FISHINGPUZZLE_H 23 #define NANCY_ACTION_FISHINGPUZZLE_H 25 #include "engines/nancy/commontypes.h" 26 #include "engines/nancy/action/puzzlerecord.h" 44 void execute()
override;
47 bool isViewportRelative()
const override {
return true; }
50 Common::String getRecordTypeName()
const override {
return "FishingPuzzle"; }
57 Vec2(
float x_,
float y_) : x(x_), y(y_) {}
59 Vec2 operator+(
const Vec2 &v)
const {
return Vec2(x + v.x, y + v.y); }
60 Vec2 operator-(
const Vec2 &v)
const {
return Vec2(x - v.x, y - v.y); }
61 Vec2 operator*(
float f)
const {
return Vec2(x * f, y * f); }
72 bool snagsLine =
false;
89 float minInterval = 0;
90 float maxInterval = 0;
106 bool isMirrored =
false;
108 float segmentTicks = 0;
116 static bool segmentsIntersect(
const Vec2 &a1,
const Vec2 &a2,
const Vec2 &b1,
const Vec2 &b2);
118 void pickLaneInterval(
Lane &lane);
119 void spawn(
const Lane &lane, uint catchable);
120 bool moveSwimmer(
Swimmer &swimmer,
float ticks);
122 bool isCaught(
const Swimmer &swimmer,
const Vec2 &hook,
const Vec2 &lineTop,
const Vec2 &lineBottom)
const;
125 bool moveLine(int32 ticks);
126 void update(int32 lineTicks,
float ticks);
127 void startEnding(
const Ending &ending);
137 float _lineAcceleration = 0;
146 int32 _exitHookY = 0;
159 uint32 _lastTickTime = 0;
160 uint32 _lastFrameTime = 0;
161 bool _isEnding =
false;
162 bool _exitRequested =
false;
170 #endif // NANCY_ACTION_FISHINGPUZZLE_H Definition: fishingpuzzle.h:65
Definition: fishingpuzzle.h:87
Definition: fishingpuzzle.h:35
Definition: fishingpuzzle.h:52
Definition: fishingpuzzle.h:70
Definition: commontypes.h:206
Definition: fishingpuzzle.h:97
Definition: commontypes.h:324
Definition: fishingpuzzle.h:82
Definition: puzzlerecord.h:37
Definition: commontypes.h:306
Definition: fishingpuzzle.h:104
Definition: actionmanager.h:32