ScummVM API documentation
Nancy::Action::DrivingPuzzle Class Reference
Inheritance diagram for Nancy::Action::DrivingPuzzle:
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::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 ()
 
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)
 
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 playSoundBlock (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::ActionRecord
void finishExecution ()
 

Protected Attributes

Variant _variant
 
Common::Path _imageName
 
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
 
SceneChangeDescription _exitScene
 
bool _exitHasFade = false
 
byte _exitFadeType = 0
 
uint16 _exitFadeTotalTime = 0
 
uint16 _exitFadeToBlackTime = 0
 
Common::Rect _exitFadeRect
 
int16 _exitFlag = -1
 
byte _exitFlagValue = 0
 
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 _image
 
Graphics::ManagedSurface _carImage
 
Graphics::ManagedSurface _chaseCarImage
 
Graphics::ManagedSurface _collisionMask
 
- 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 uint kTireResourceIndex = 2
 

Additional Inherited Members

- 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: