#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 WalkNode & | operator[] (int idx) |
| const WalkNode & | popNode () |
| void | resetNext () |
| int | getNext () |
| void | synchronize (Common::Serializer &s) |
| void | disableNode (int idx) |
| void | disableLine (int from, int to) |
This class handles storing the intermediate walk node points for a given scene, and calculating walking routes between any two positions.
| MADS::Rails::Rails | ( | ) |
Constructor
| 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.
| nodes | Intermediate walk-points |
| depthSurface | Depth surface to use |
| void MADS::Rails::setupRoute | ( | bool | bitFlag, |
| const Common::Point & | srcPos, | ||
| const Common::Point & | destPos | ||
| ) |
Set up a route between two points in a scene
| void MADS::Rails::resetRoute | ( | ) |
Resets any currently running route
| 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
|
inline |
Returns true if the current calculated walk route is empty
|
inline |
Returns the data for a given walk node
| void MADS::Rails::synchronize | ( | Common::Serializer & | s | ) |
Synchronize the data for the route