- graphics::Animation *GetAnimation(const Value &);
- battle::Resources *GetBattleResources(const Value &);
- graphics::Color GetColor(const Value &);
- bool GetBoolean(const Value &);
- graphics::Font *GetFont(const Value &);
- graphics::Frame *GetFrame(const Value &);
- graphics::Gauge *GetGauge(const Value &);
- battle::Hero *GetHero(const Value &);
- common::Ikari *GetIkari(const Value &);
- SDL_Surface *GetImage(const Value &);
- common::Item *GetItem(const Value &);
- graphics::MenuProperties *GetMenuProperties(const Value &);
- battle::Monster *GetMonster(const Value &);
- int GetNumber(const Value &);
- battle::PartyLayout *GetPartyLayout(const Value &);
- const PropertyList *GetPropertyList(const Value &);
- const std::vector<PropertyList *> &GetPropertyListArray(const Value &);
- const char *GetPath(const Value &);
- common::Spell *GetSpell(const Value &);
- graphics::Sprite *GetSprite(const Value &);
- const char *GetString(const Value &);
- common::TargetingMode *GetTargetingMode(const Value &);
- const std::vector<Value *> &GetValueArray(const Value &);
- geometry::Vector<int> GetVector(const Value &);
-
- void ReadBattleResources(battle::Resources &, const PropertyList &);
- void ReadComplexAnimation(graphics::ComplexAnimation &, const PropertyList &);
- void ReadComplexAnimationFrame(graphics::ComplexAnimation::FrameProp &, const PropertyList &);
- void ReadFont(graphics::Font &, const PropertyList &);
- void ReadFrame(graphics::Frame &, const PropertyList &);
- void ReadGauge(graphics::Gauge &, const PropertyList &);
- void ReadHero(battle::Hero &, const PropertyList &);
- void ReadIkari(common::Ikari &, const PropertyList &);
- void ReadItem(common::Item &, const PropertyList &);
- void ReadMenuProperties(graphics::MenuProperties &, const PropertyList &);
- void ReadMonster(battle::Monster &, const PropertyList &);
- void ReadPartyLayout(battle::PartyLayout &, const PropertyList &);
- void ReadSimpleAnimation(graphics::SimpleAnimation &, const PropertyList &);
- void ReadSpell(common::Spell &, const PropertyList &);
- void ReadSprite(graphics::Sprite &, const PropertyList &);
- void ReadStats(battle::Stats &, const PropertyList &);
- void ReadTargetingMode(common::TargetingMode &, const PropertyList &);
+ /// Interpret given literal as an object of given type.
+ /// The resulting object shall be accessible by given ID
+ /// (whiich is already reserved) and be written to given
+ /// destination.
+ void ReadLiteral(int typeId, int id, char *dest, const Literal &);
+ /// Get an object of given type from given value.
+ /// The object will be registere as new and be given a
+ /// unique ID.
+ /// Any nested objects will be created likewise.
+ void *GetObject(int typeId, const Value &value);
+ /// Read an object of given type and properties into dest.
+ /// The object should alrady have an assigned identifier.
+ /// Pass -1 as ID if the object is anonymous.
+ /// Note that anonymous objects must not contain
+ /// references as they are excluded from linking.
+ void ReadObject(int typeId, int id, char *dest, const PropertyList &);
+ /// The function that does the actual compiling when you
+ /// call ReadScript(const vector<ScriptToken *> &).
+ void ReadScript(const std::vector<ScriptToken *> &, common::Script *);
+ /// Compile a tokenized script.
+ /// Storage for the script will be allocated as neccessary.
+ char *ReadScript(const std::vector<ScriptToken *> &);
+ /// Reinterpret dest as a script code and return a
+ /// reference to that.
+ common::Script::Code &CreateScriptCode(common::Script::Command c, char *dest);
+ /// Write address to dest.
+ void ReadScriptAddress(const ScriptToken &t, char *dest);
+ /// Write integer to est.
+ void ReadScriptInteger(const ScriptToken &t, char *dest);
+ /// Write vector to dest.
+ void ReadScriptVector(const ScriptToken &t, char *dest);
+
+ /// Get a surface from given image path.
+ /// Load it if neccessary.
+ SDL_Surface *GetImage(const std::string &);
+
+ /// Check if a value can be linked right now or if linkage
+ /// must be deferred (with Postpone()).
+ bool CanLink(const Value &) const;
+ /// Defer linking of given object reference.
+ void Postpone(
+ char *dest,
+ const std::string &identifier,
+ int type,
+ bool inlined = true,
+ bool aggregate = false);