ScummVM API documentation
Tetraedge::InGameSceneXmlParser Class Reference

#include <in_game_scene_xml_parser.h>

Inheritance diagram for Tetraedge::InGameSceneXmlParser:
Tetraedge::TeXmlParser Common::XMLParser

Public Types

enum  TextNodeType { TextNodeNone, TextNodePosition, TextNodeGridSize }
 
- Public Types inherited from Common::XMLParser
enum  ParserState {
  kParserNeedHeader, kParserNeedKey, kParserNeedKeyName, kParserNeedPropertyName,
  kParserNeedPropertyOperator, kParserNeedPropertyValue, kParserError
}
 
typedef HashMap< String, XMLParser::XMLKeyLayout *, IgnoreCase_Hash, IgnoreCase_EqualToChildMap
 

Public Member Functions

 InGameSceneXmlParser (InGameScene *scene)
 
 CUSTOM_XML_PARSER (InGameSceneXmlParser)
 
 PARSER_END () bool parserCallback_scene(ParserNode *node)
 
bool parserCallback_camera (ParserNode *node)
 
bool parserCallback_pathZone (ParserNode *node)
 
bool parserCallback_gridSize (ParserNode *node)
 
bool parserCallback_curve (ParserNode *node)
 
bool parserCallback_dummy (ParserNode *node)
 
bool parserCallback_position (ParserNode *node)
 
bool parserCallback_mask (ParserNode *node)
 
bool parserCallback_dynamicLight (ParserNode *node)
 
bool parserCallback_rippleMask (ParserNode *node)
 
bool parserCallback_snowCone (ParserNode *node)
 
bool parserCallback_shadowMask (ParserNode *node)
 
bool parserCallback_shadowReceivingObject (ParserNode *node)
 
bool parserCallback_zBufferObject (ParserNode *node)
 
bool parserCallback_rObject (ParserNode *node)
 
bool parserCallback_rBB (ParserNode *node)
 
bool parserCallback_light (ParserNode *node)
 
bool parserCallback_collisionSlide (ParserNode *node)
 
bool parserCallback_coliisionSlide (ParserNode *node)
 
bool parserCallback_noCollisionSlide (ParserNode *node)
 
bool parserCallback_flamme (ParserNode *node)
 
bool parserCallback_name (ParserNode *node)
 
bool parserCallback_center (ParserNode *node)
 
bool parserCallback_yMax (ParserNode *node)
 
bool parserCallback_offsetMin (ParserNode *node)
 
bool parserCallback_offsetMax (ParserNode *node)
 
virtual bool closedKeyCallback (ParserNode *node) override
 
virtual bool textCallback (const Common::String &val) override
 
- Public Member Functions inherited from Common::XMLParser
 XMLParser ()
 
ParserNodeallocNode ()
 
void freeNode (ParserNode *node)
 
bool loadFile (const Path &filename)
 
bool loadFile (const FSNode &node)
 
bool loadBuffer (const byte *buffer, uint32 size, DisposeAfterUse::Flag disposable=DisposeAfterUse::NO)
 
bool loadStream (SeekableReadStream *stream)
 
void close ()
 
bool parse ()
 
ParserNodegetActiveNode ()
 
ParserNodegetParentNode (ParserNode *child)
 
void setAllowText ()
 

Public Attributes

InGameScene_scene
 
TeVector2f32 _fmzGridSize
 
TextNodeType _textNodeType
 
- Public Attributes inherited from Common::XMLParser
XMLKeyLayout_XMLkeys
 
ObjectPool< ParserNode, 8 > _nodePool
 

Additional Inherited Members

- Protected Member Functions inherited from Tetraedge::TeXmlParser
TeVector3f32 parsePoint (const ParserNode *node) const
 Parse a point with x/y/z attributes.
 
bool parseCol (const ParserNode *node, TeColor &colout)
 
double parseDouble (const ParserNode *node, const char *attr=nullptr) const
 
int parseUint (const ParserNode *node, const char *attr=nullptr) const
 
- Protected Member Functions inherited from Common::XMLParser
virtual void buildLayout ()=0
 
virtual bool keyCallback (ParserNode *node)=0
 
bool closeKey ()
 
bool parseKeyValue (String keyName)
 
bool parseActiveKey (bool closed)
 
bool parserError (const String &errStr)
 
bool skipSpaces ()
 
bool skipComments ()
 
virtual bool isValidNameChar (char c)
 
bool parseToken ()
 
bool parseIntegerKey (const char *key, int count,...)
 
bool parseIntegerKey (const String &keyStr, int count,...)
 
bool vparseIntegerKey (const char *key, int count, va_list args)
 
bool parseXMLHeader (ParserNode *node)
 
virtual void cleanup ()
 
virtual bool handleUnknownKey (ParserNode *node)
 
- Protected Attributes inherited from Common::XMLParser
List< XMLKeyLayout * > _layoutList
 

Detailed Description

XML Parser for in game scene files in Syberia 2. Sybeira 1 uses a binary format, see InGameScene::load.

Member Function Documentation

◆ closedKeyCallback()

virtual bool Tetraedge::InGameSceneXmlParser::closedKeyCallback ( ParserNode node)
overridevirtual

The closed key callback function MAY be overloaded by inheriting classes to implement parser-specific functions.

The closedKeyCallback is issued once a key has been finished parsing, to let the parser verify that all the required subkeys, etc, were included.

Unlike the keyCallbacks(), there's just a closedKeyCallback() for all keys. Use "node->name" to distinguish between each key type.

Returns true if the key was properly closed, false otherwise. By default, all keys are properly closed.

Reimplemented from Common::XMLParser.

◆ textCallback()

virtual bool Tetraedge::InGameSceneXmlParser::textCallback ( const Common::String val)
overridevirtual

Called when a text node is found. This will only be called if setAllowText() has been called, otherwise text nodes are considered parse errors.

Reimplemented from Common::XMLParser.


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