ScummVM API documentation
Nancy::Action::CardGamePuzzle Class Reference
Inheritance diagram for Nancy::Action::CardGamePuzzle:
Nancy::Action::RenderActionRecord Nancy::Action::ActionRecord Nancy::RenderObject

Classes

struct  PlayerBoard
 

Public Member Functions

void init () override
 
void updateGraphics () override
 
void readData (Common::SeekableReadStream &stream) override
 
void execute () override
 
void handleInput (NancyInput &input) override
 
bool isViewportRelative () const override
 
- Public Member Functions inherited from Nancy::Action::RenderActionRecord
 RenderActionRecord (uint zOrder)
 
 RenderActionRecord (RenderActionRecord &&)=default
 
void onPause (bool pause) override
 
- Public Member Functions inherited from Nancy::Action::ActionRecord
virtual CursorManager::CursorType getHoverCursor () const
 
virtual bool cursorSetFromScript () const
 
virtual Common::String getRecordExtraInfo () const
 
virtual bool canHaveHotspot () const
 
virtual bool survivesSceneChange (bool nextSceneIsNoArt) const
 
- Public Member Functions inherited from Nancy::RenderObject
 RenderObject (uint16 zOrder)
 
 RenderObject (uint16 zOrder, Graphics::ManagedSurface &surface, const Common::Rect &srcBounds, const Common::Rect &destBounds)
 
 RenderObject (RenderObject &&)=default
 
virtual void registerGraphics ()
 
void moveTo (const Common::Point &position)
 
void moveTo (const Common::Rect &bounds)
 
void setVisible (bool visible)
 
void setTransparent (bool isTransparent)
 
bool isVisible () const
 
bool needsRedraw () const
 
void setNeedsRedraw (bool needsRedraw)
 
void setHasMoved (bool hasMoved)
 
void grabPalette (byte *colors, uint paletteStart=0, uint paletteSize=256)
 
void setPalette (const Common::Path &paletteName, uint paletteStart=0, uint paletteSize=256)
 
void setPalette (const byte *colors, uint paletteStart=0, uint paletteSize=256)
 
bool hasMoved () const
 
void updatePreviousScreenPosition ()
 
Common::Rect getScreenPosition () const
 
Common::Rect getScreenPositionRaw () const
 
Common::Rect getPreviousScreenPosition () const
 
Common::Rect convertToLocal (const Common::Rect &screen) const
 
Common::Rect convertToScreen (const Common::Rect &rect) const
 
Common::Rect getBounds () const
 
uint16 getZOrder () const
 
void setZOrder (uint16 z)
 

Protected Types

enum  Phase { kWaitInput, kAskSound, kAnswerSound, kAiDelay }
 

Protected Member Functions

Common::String getRecordTypeName () const override
 
int dealOne (int player)
 
void drawBoard ()
 
bool usesColumnButtons () const
 
int columnUnderMouse (const Common::Point &mousePos) const
 
bool hasPlayableColumn (int side) const
 
int aiPickColumn ()
 
bool takeCards (int side, int col)
 
void beginAsk (int side, int col)
 
void resolveAsk ()
 
void advanceTurn ()
 
void startPlayerTurn ()
 
void startAiAsk ()
 
void endGame ()
 
void startMoveAnimation (const bool beforeGrid[kMaxRows][kMaxCols])
 
void playVoice (const Common::String &name)
 
- Protected Member Functions inherited from Nancy::Action::ActionRecord
void finishExecution ()
 

Protected Attributes

Common::Path _imageName
 
byte _unknown21 = 0
 
byte _switchTurnRule = 0
 
byte _startPlayer = 0
 
byte _dealMode = 0
 
uint16 _numCols = 0
 
uint16 _numRows = 0
 
uint16 _dealRounds = 0
 
Common::Rect _turnHighlightSrc [2]
 
Common::Rect _turnHighlightDest [2]
 
Common::Array< Common::Rect_faceUpSrc
 
Common::Rect _suitScoreSrc
 
Common::Array< Common::Rect_scoreDest
 
Common::Rect _cardDisplayDest [2]
 
Common::Array< Common::Rect_columnButtons
 
Common::Array< Common::Rect_faceDownSrc
 
Common::Rect _exitHotspot
 
uint16 _moveAnimSteps = 0
 
uint16 _moveAnimDelta = 0
 
uint32 _moveAnimDelay = 0
 
uint16 _dealFrameCount [2] = {}
 
uint32 _dealFrameDelay [2] = {}
 
Common::Array< Common::Rect_dealFrames [2]
 
Common::Rect _deliverDest [2]
 
uint16 _winSceneStartPlayer = 0
 
uint16 _winSceneStartEnemy = 0
 
SceneChangeDescription _winScene
 
int16 _winFlagPlayer = -1
 
int16 _winFlagEnemy = -1
 
uint16 _exitScene = 0
 
SceneChangeDescription _exitSceneChange
 
bool _gaveUp = false
 
Common::String _moveVoiceName
 
Common::String _dealVoiceName
 
Common::String _matchVoice [2][kMaxCols]
 
Common::String _madeMoveVoice [2]
 
Common::String _noMoveVoice [2]
 
Common::String _enemyScoredVoiceName
 
Common::String _playerScoredVoiceName
 
Common::String _endVoiceName [2]
 
SoundDescription _voiceSound
 
bool _awaitingEnd = false
 
uint32 _endWaitUntil = 0
 
Phase _phase = kWaitInput
 
int _mover = 1
 
int _askedCol = -1
 
bool _goAgain = false
 
uint32 _aiDelayUntil = 0
 
Graphics::ManagedSurface _image
 
PlayerBoard _board [2]
 
byte _availMap [kMaxRows][kMaxCols]
 
int _deckRemaining = 0
 
int _currentTurn = 0
 
int _lastAiColumn = -1
 
bool _gameOver = false
 
bool _appearing [kMaxRows][kMaxCols] = {}
 
bool _leaving [kMaxRows][kMaxCols] = {}
 
int _animStep = 0
 
uint32 _animNextStep = 0
 
bool _animating = false
 
bool _handAnimActive = false
 
int _handAnimSide = 1
 
uint16 _handFrame = 0
 
uint32 _handNextFrame = 0
 
- Protected Attributes inherited from Nancy::RenderObject
bool _needsRedraw
 
bool _isVisible
 
bool _hasMoved
 
uint16 _z
 
Common::Rect _previousScreenPosition
 
Common::Rect _screenPosition
 

Static Protected Attributes

static const int kMaxCols = 13
 
static const int kMaxRows = 4
 
static const int kSlidePerStep = 12
 

Additional Inherited Members

- Public Types inherited from Nancy::Action::ActionRecord
enum  ExecutionState { kBegin, kRun, kActionTrigger }
 
enum  ExecutionType { kOneShot = 1, kRepeating = 2 }
 
- Public Attributes inherited from Nancy::Action::ActionRecord
Common::String _description
 
byte _type
 
ExecutionType _execType
 
DependencyRecord _dependencies
 
bool _isActive
 
bool _isDone
 
bool _hasHotspot
 
Common::Rect _hotspot
 
ExecutionState _state
 
int16 _days
 
DependencyRecord_cursorDependency
 
- Public Attributes inherited from Nancy::RenderObject
Graphics::ManagedSurface _drawSurface
 

The documentation for this class was generated from the following file: