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

Classes

struct  Food
 
struct  FoodType
 
struct  IngredientFlag
 
struct  Order
 
struct  Plate
 
struct  PlateLayout
 
struct  Processor
 
struct  Recipe
 
struct  Slot
 

Public Member Functions

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  Doneness : byte { kUnderDone = 0, kWellDone = 1, kOverDone = 2 }
 

Protected Member Functions

Common::String getRecordTypeName () const override
 
const FoodType * findFoodType (const Common::String &name) const
 
const Recipe * findRecipe (const Processor &processor, const Common::String &input) const
 
Food * createFood (const Common::String &typeName, const Food *source)
 
void holdFood (Food *food)
 
void releaseHeldFood (bool discard)
 
bool clickManual (const Common::Point &pos)
 
bool clickPlates (const Common::Point &pos)
 
bool clickProcessors (const Common::Point &pos)
 
bool clickBins (const Common::Point &pos)
 
bool clickGarbage (const Common::Point &pos)
 
bool putOnPlate (Plate &plate)
 
bool servePlate (Plate &plate)
 
void serveAllPlates ()
 
bool foodMatches (const Food *food, const Order &order, Common::Array< FlagDescription > &flags, bool checkDoneness, bool &allWellDone) const
 
bool updateCursor (const Common::Point &pos)
 
void update (int32 ticks)
 
bool cook (Food *food, int32 ticks)
 
void redraw ()
 
void drawFood (const Food *food, const Common::Rect &dest, bool jitter, uint32 &randSeed)
 
void drawOrderCounts (const Order &order, const Graphics::Font *font, uint32 color)
 
void startEnding (const SceneChangeWithFlag &scene, const RandomSoundBlock &sound)
 
- 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 ()
 

Static Protected Member Functions

static void readSoundBank (Common::SeekableReadStream &stream, RandomSoundBlock &sound)
 
static void readFoodType (Common::SeekableReadStream &stream, FoodType &food)
 
static void readOrder (Common::SeekableReadStream &stream, Order &order)
 
static void rollOrderCounts (Order &order)
 
static const Order * findOrder (const Common::Array< Order > &orders, const Common::String &food)
 
static void deleteFood (Food *food)
 
static void insertSorted (Common::Array< Food *> &list, Food *food)
 
static void addRequiredIngredientFlags (const Order &order, Common::Array< FlagDescription > &flags)
 

Protected Attributes

Common::Array< FoodType > _foodTypes
 
Common::Array< Processor > _processors
 
Common::Path _plateImageName
 
Common::Rect _plateSrc
 
Common::Rect _plateDest
 
Common::Rect _plateBarArea
 
Common::Rect _serveHotspot
 
Common::Rect _ticketIconSrc
 
Common::Array< PlateLayout > _plateLayouts
 
uint16 _plateFoodCursor = 0
 
uint16 _plateCloseCursor = 0
 
uint16 _serveCursor = 0
 
uint16 _ticketCursor = 0
 
Common::Rect _ticketDest
 
Common::String _countFontName
 
uint32 _countColor = 0
 
float _captionTime = 0
 
RandomSoundBlock _orderRightSound
 
RandomSoundBlock _orderWrongSound
 
RandomSoundBlock _allServedSound
 
Common::Array< Plate > _plates
 
Common::Array< Common::Path > _manualPageNames
 
Common::Rect _manualPrevHotspot
 
Common::Rect _manualNextHotspot
 
Common::Rect _manualOpenHotspot
 
Common::Rect _manualCloseHotspot
 
Common::Rect _manualSrc
 
Common::Rect _manualDest
 
uint16 _manualPrevCursor = 0
 
uint16 _manualNextCursor = 0
 
uint16 _manualOpenCursor = 0
 
uint16 _manualCloseCursor = 0
 
RandomSoundBlock _pageFlipSound
 
RandomSoundBlock _manualOpenSound
 
RandomSoundBlock _manualCloseSound
 
Common::Rect _garbageHotspot
 
RandomSoundBlock _garbageSound
 
uint16 _heldCursor = 0
 
SceneChangeWithFlag _fireScene
 
RandomSoundBlock _fireSound
 
Common::Array< Food * > _bins
 
Food * _heldFood = nullptr
 
int _openPlate = -1
 
bool _manualOpen = false
 
uint _manualPage = 0
 
bool _rightSoundPending = false
 
bool _wrongSoundPending = false
 
int32 _captionTicks = 0
 
uint32 _lastTickTime = 0
 
bool _isEnding = false
 
bool _exitRequested = false
 
SceneChangeWithFlag _endScene
 
SoundDescription _endSound
 
Common::Point _mousePos
 
Graphics::ManagedSurface _plateImage
 
Common::Array< Graphics::ManagedSurface > _manualPages
 
- 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 kNumDoneness = 3
 

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