22 #ifndef NANCY_ACTION_PEGSPUZZLE_H 23 #define NANCY_ACTION_PEGSPUZZLE_H 25 #include "engines/nancy/commontypes.h" 26 #include "engines/nancy/action/actionrecord.h" 49 void execute()
override;
52 bool isViewportRelative()
const override {
return true; }
55 Common::String getRecordTypeName()
const override {
return "PegsPuzzle"; }
57 enum CellState : byte { kPeg = 0, kEmpty = 1, kBlocked = 2 };
59 int cellIndex(
int col,
int row)
const {
return col + row * 8; }
60 bool validCell(
int col,
int row)
const;
63 bool canJump(
int col,
int row,
int dCol,
int dRow,
int &destCol,
int &destRow)
const;
65 bool isCarriedTarget(
int col,
int row)
const;
67 bool cellAtCursor(
const Common::Point &mousePos,
int &outCol,
int &outRow)
const;
68 bool cellHasAnyMove(
int col,
int row)
const;
69 bool anyMovesLeft()
const;
71 void doJump(
int fromCol,
int fromRow,
int destCol,
int destRow);
75 void setDataCursor(uint16 cursorType)
const;
82 uint16 _hoverCursorType = 0;
83 uint16 _dragCursorType = 0;
84 byte _startEmptyFlag = 0;
85 byte _startEmptyPos = 0;
86 byte _targetPegCount = 0;
95 uint16 _pitchYBias = 0;
96 uint16 _pitchXBias = 0;
97 uint16 _numBlocked = 0;
103 uint16 _exitCursorType = 0;
112 int _carriedCol = -1;
113 int _carriedRow = -1;
116 bool _solved =
false;
117 bool _exitRequested =
false;
127 #endif // NANCY_ACTION_PEGSPUZZLE_H Definition: managed_surface.h:51
Definition: commontypes.h:165
Definition: pegspuzzle.h:41
Definition: actionrecord.h:161
Definition: commontypes.h:300
Definition: commontypes.h:282
Definition: commontypes.h:180
Definition: actionmanager.h:32