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

Classes

struct  Checkpoint
 
struct  DestinationZone
 
struct  MudZone
 
struct  Obstacle
 
struct  Overlay
 
struct  Pothole
 
struct  Waypoint
 

Public Types

enum  Variant { kDriving = 0, kChase }
 
- Public Types inherited from Nancy::Action::ActionRecord
enum  ExecutionState { kBegin, kRun, kActionTrigger }
 
enum  ExecutionType { kOneShot = 1, kRepeating = 2 }
 

Public Member Functions

 DrivingPuzzle (Variant variant)
 
void init () 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::PuzzleRecord
 PuzzleRecord (uint zOrder)
 
Common::String getRecordExtraInfo () 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 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 ()
 
virtual void updateGraphics ()
 
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)
 
bool isNativeResolution () const
 
void setNativeResolution (bool isNative)
 
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  ChaseParam {
  kChaseGate01Flag = 0, kChaseOffViewScene = 1, kChaseOffViewFlag = 2, kChaseGate12Flag = 3,
  kChasePathEndScene = 4
}
 
enum  ChaseState { kPursuit = 0, kShortcut = 1, kCaught = 2 }
 

Protected Member Functions

Common::String getRecordTypeName () const override
 
void readFrameRects (Common::SeekableReadStream &stream, Common::Array< Common::Rect > &out)
 
void readWaypoints (Common::SeekableReadStream &stream, Common::Array< Waypoint > &out)
 
void readBlob (Common::SeekableReadStream &stream)
 
void classifyZones (const Common::Array< ActionZone > &zones)
 
void playSoundBlockRawLoops (const RandomSoundBlock &block)
 
void armExit (const DestinationZone &dest)
 
void armExitScene (uint16 sceneID, int16 flag, byte flagValue)
 
void updatePhysics (int throttle, double cursorDist)
 
Common::Point cameraOffset () const
 
void saveState () const
 
void refillFuel ()
 
void repairTire ()
 
bool isWall (int px, int py) const
 
bool isBlocked (const Common::Point &p) const
 
void updateChaser ()
 
uint frameIndexForHeading (double heading, uint frameCount) const
 
int overlayImageIndex (const Common::String &name)
 
void drawOverlays (const Common::Point &cam, bool aboveCar)
 
void drawScene ()
 
- Protected Member Functions inherited from Nancy::Action::PuzzleRecord
void loadImage ()
 
void initViewportSurface ()
 
void setDataCursor (uint16 cursorType, bool hotspotVariant=true) const
 
Common::Point getHeldPiecePos (const Common::Point &mousePos, const Common::Rect &src, const Common::Point &offset) const
 
SoundDescription playSoundBlock (const RandomSoundBlock &block)
 
bool isSoundBlockPlaying (const RandomSoundBlock &block) const
 
void readExitHotspot (Common::SeekableReadStream &stream)
 
bool isExitHotspotHovered (const NancyInput &input) const
 
void setExitCursor () const
 
bool hoverExitHotspot (const NancyInput &input) const
 
bool hasSolveSound () const
 
void playSolveSound ()
 
bool isSolveSoundPlaying () const
 
- Protected Member Functions inherited from Nancy::Action::ActionRecord
void finishExecution ()
 

Protected Attributes

Variant _variant
 
Common::Path _collisionName
 
Common::Path _carSpriteName
 
int32 _startX = 0
 
int32 _startY = 0
 
int32 _startAngle = 0
 
int32 _forwardSpeed = 0
 
int32 _reverseSpeed = 0
 
int16 _frictionIndex = 0
 
int32 _distanceDivisor = 0
 
bool _retainState = false
 
uint16 _finishScene = kNoScene
 
RandomSoundBlock _soundBlocks [3]
 
Common::Array< Common::Rect > _frameRects
 
Common::Array< ActionZone > _zones
 
int16 _chaseParams [5] = {}
 
Common::Path _chaseCarImageName
 
Common::Array< Common::Rect > _frameRects2
 
Common::Array< ActionZone > _zones2
 
Common::Array< Waypoint > _chaserPathA
 
Common::Array< Waypoint > _chaserPathB
 
Common::Array< DestinationZone > _destinations
 
Common::Array< Checkpoint > _checkpoints
 
Common::Array< MudZone > _mudZones
 
Common::Array< Pothole > _potholes
 
Common::Array< Overlay > _overlays
 
Common::Array< Obstacle > _obstacles
 
Common::Array< Graphics::ManagedSurface > _overlayImages
 
Common::Array< Common::String > _overlayImageNames
 
double _carX = 0.0
 
double _carY = 0.0
 
double _carHeading = 0.0
 
double _carVelocity = 0.0
 
double _speedCap = 0.0
 
uint32 _lastPhysicsMs = 0
 
int _parkedDest = -1
 
bool _exitHasFade = false
 
byte _exitFadeType = 0
 
uint16 _exitFadeTotalTime = 0
 
uint16 _exitFadeToBlackTime = 0
 
Common::Rect _exitFadeRect
 
ChaseState _chaseState = kPursuit
 
bool _chaserOnPathB = false
 
double _fuelBurnAccum = 0.0
 
int _tireDamage = 0
 
bool _flatTirePending = false
 
bool _infiniteFuel = false
 
bool _chaseStarted = false
 
uint32 _chaseStartTime = 0
 
uint _chaserWaypoint = 0
 
double _chaserX = 0.0
 
double _chaserY = 0.0
 
double _chaserHeading = 0.0
 
Graphics::ManagedSurface _carImage
 
Graphics::ManagedSurface _chaseCarImage
 
Graphics::ManagedSurface _collisionMask
 
- Protected Attributes inherited from Nancy::Action::PuzzleRecord
Common::Path _imageName
 
Graphics::ManagedSurface _image
 
SceneChangeWithFlag _solveScene
 
SoundDescription _solveSound
 
uint16 _solveSoundDelay = 0
 
SceneChangeWithFlag _exitScene
 
Common::Rect _exitHotspot
 
uint16 _exitCursorType = 0
 
bool _exitCursorFromData = false
 
- Protected Attributes inherited from Nancy::RenderObject
bool _needsRedraw
 
bool _isVisible
 
bool _hasMoved
 
bool _isNativeResolution = false
 
uint16 _z
 
Common::Rect _previousScreenPosition
 
Common::Rect _screenPosition
 

Static Protected Attributes

static const uint kTireResourceIndex = 2
 

Additional Inherited Members

- Public Attributes inherited from Nancy::Action::ActionRecord
Common::String _description
 
Common::String _includeSource
 
byte _type
 
ExecutionType _execType
 
DependencyRecord _dependencies
 
bool _isActive
 
bool _isDone
 
bool _hasHotspot
 
Common::Rect _hotspot
 
ExecutionState _state
 
DependencyRecord * _cursorDependency
 
- Public Attributes inherited from Nancy::RenderObject
Graphics::ManagedSurface _drawSurface
 

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