ScummVM API documentation
MADS::Rails Class Reference

#include <rails.h>

Public Member Functions

 Rails ()
 
void load (const WalkNodeList &nodes, DepthSurface *depthSurface, int depthStyle)
 
void setupRoute (bool bitFlag, const Common::Point &srcPos, const Common::Point &destPos)
 
void setupRouteNode (int *routeIndexP, int nodeIndex, int flags, int routeLength)
 
void resetRoute ()
 
int scanPath (const Common::Point &srcPos, const Common::Point &destPos)
 
int size () const
 
bool empty () const
 
const WalkNodeoperator[] (int idx)
 
const WalkNodepopNode ()
 
void resetNext ()
 
int getNext ()
 
void synchronize (Common::Serializer &s)
 
void disableNode (int idx)
 
void disableLine (int from, int to)
 

Detailed Description

This class handles storing the intermediate walk node points for a given scene, and calculating walking routes between any two positions.

Constructor & Destructor Documentation

◆ Rails()

MADS::Rails::Rails ( )

Constructor

Member Function Documentation

◆ load()

void MADS::Rails::load ( const WalkNodeList nodes,
DepthSurface depthSurface,
int  depthStyle 
)

Loads the scene data for the list of intermediate walk nodes and the depth surface to use.

Parameters
nodesIntermediate walk-points
depthSurfaceDepth surface to use

◆ setupRoute()

void MADS::Rails::setupRoute ( bool  bitFlag,
const Common::Point srcPos,
const Common::Point destPos 
)

Set up a route between two points in a scene

◆ resetRoute()

void MADS::Rails::resetRoute ( )

Resets any currently running route

◆ scanPath()

int MADS::Rails::scanPath ( const Common::Point srcPos,
const Common::Point destPos 
)

Scans along an edge connecting two points within the depths/walk surface, and returns the information of the first pixel high nibble encountered with a non-zero value

◆ empty()

bool MADS::Rails::empty ( ) const
inline

Returns true if the current calculated walk route is empty

◆ operator[]()

const WalkNode& MADS::Rails::operator[] ( int  idx)
inline

Returns the data for a given walk node

◆ synchronize()

void MADS::Rails::synchronize ( Common::Serializer s)

Synchronize the data for the route


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