ScummVM API documentation
MutationOfJB::Static Struct Reference

#include <gamedata.h>

Inheritance diagram for MutationOfJB::Static:
Common::Serializable

Public Member Functions

bool loadInitialState (Common::ReadStream &stream)
 
void saveLoadWithSerializer (Common::Serializer &sz) override
 
bool isCombinable () const
 
bool allowsImplicitPickup () const
 

Public Attributes

uint8 _active
 
char _name [MAX_ENTITY_NAME_LENGTH+1]
 
uint16 _x
 
uint8 _y
 
uint16 _width
 
uint8 _height
 
uint16 _walkToX
 
uint8 _walkToY
 
uint8 _walkToFrame
 

Detailed Description

An interactable area, usually without a visual representation.

Member Function Documentation

◆ loadInitialState()

bool MutationOfJB::Static::loadInitialState ( Common::ReadStream stream)

Load initial state from game data file.

Parameters
streamStream for reading.
Returns
True if success, false otherwise.

◆ saveLoadWithSerializer()

void MutationOfJB::Static::saveLoadWithSerializer ( Common::Serializer sz)
overridevirtual

(De)serialization for save/load.

Parameters
szSerializer.

Implements Common::Serializable.

◆ isCombinable()

bool MutationOfJB::Static::isCombinable ( ) const

Check whether this static is combinable. Statics with names ending with '[' are allowed to be combined with other items.

Returns
True if combinable, false otherwise.

◆ allowsImplicitPickup()

bool MutationOfJB::Static::allowsImplicitPickup ( ) const

Check whether this static is implicitly picked up. Statics with names starting with '~' are implicitly picked up.

Returns
Returns true if this static is implicitly picked up by pick up action, false otherwise.

Member Data Documentation

◆ _active

uint8 MutationOfJB::Static::_active

Whether you can mouse over and interact with the static (AC register).

◆ _name

char MutationOfJB::Static::_name[MAX_ENTITY_NAME_LENGTH+1]

Static name (NM register).

If it starts with '~', the static has an implicit "pickup" action that adds an item with the same name (except '`' replaces '~') to your inventory and disables the static. If there is a matching scripted "pickup" action, it overrides the implicit action. This kind of static also has graphics in the form of its rectangle extracted from room frame 2 (and 3 after pickup).

If it ends with '[', the "use" action allows combining the static with another entity.

TODO: Support '~' statics.

◆ _x

uint16 MutationOfJB::Static::_x

X coordinate of the static rectangle (XX register).

◆ _y

uint8 MutationOfJB::Static::_y

Y coordinate of the static rectangle (YY register).

◆ _width

uint16 MutationOfJB::Static::_width

Width of the static rectangle (XL register).

◆ _height

uint8 MutationOfJB::Static::_height

Height of the static rectangle (YL register).

◆ _walkToX

uint16 MutationOfJB::Static::_walkToX

X coordinate of the position the player will walk towards after clicking the static (WX register).

◆ _walkToY

uint8 MutationOfJB::Static::_walkToY

Y coordinate of the position the player will walk towards after clicking the static (WY register).

◆ _walkToFrame

uint8 MutationOfJB::Static::_walkToFrame

Player frame (rotation) set after the player finishes walking towards the walk to position (SP register).


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