]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/Interpreter.h
added interpretation of battle resources
[l2e.git] / src / loader / Interpreter.h
index e72d4da202d43a99ae0bf8a1490c49ff7570ffbf..044a3c0848c0dd51bb0df8a3124fb48e1c0457f2 100644 (file)
@@ -22,6 +22,7 @@ namespace battle {
        class Hero;
        class Monster;
        class PartyLayout;
+       struct Resources;
        class Stats;
 }
 
@@ -69,6 +70,7 @@ public:
 
 public:
        graphics::Animation *GetAnimation(const std::string &name);
+       battle::Resources *GetBattleResources(const std::string &name);
        bool GetBoolean(const std::string &name) const;
        const graphics::Color &GetColor(const std::string &name) const;
        graphics::Font *GetFont(const std::string &name);
@@ -89,6 +91,7 @@ public:
        geometry::Vector<int> GetVector(const std::string &name) const;
 
 public:
+       const std::vector<battle::Resources *> &BattleResources() const { return battleResources; }
        const std::vector<bool> &Booleans() const { return booleans; }
        const std::vector<graphics::Color> &Colors() const { return colors; }
        const std::vector<graphics::ComplexAnimation *> &ComplexAnimations() const { return complexAnimations; }
@@ -116,6 +119,7 @@ private:
        void ReadObject(const Definition &);
 
        graphics::Animation *GetAnimation(const Value &);
+       battle::Resources *GetBattleResources(const Value &);
        graphics::Color GetColor(const Value &);
        bool GetBoolean(const Value &);
        graphics::Font *GetFont(const Value &);
@@ -139,6 +143,7 @@ private:
        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 &);
@@ -159,6 +164,7 @@ private:
 private:
        const ParsedSource &source;
        enum Type {
+               BATTLE_RESOURCES,
                BOOLEAN,
                COLOR,
                COMPLEX_ANIMATION,
@@ -194,6 +200,7 @@ private:
 
        std::map<std::string, SDL_Surface *> imageCache;
 
+       std::vector<battle::Resources *> battleResources;
        std::vector<bool> booleans;
        std::vector<graphics::Color> colors;
        std::vector<graphics::ComplexAnimation *> complexAnimations;