]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/Interpreter.h
simplified definition postponing
[l2e.git] / src / loader / Interpreter.h
index 454fccc67427786e61fd3db7b8d22bc074938786..5a8e3ab8aa424ed4db977e0c471c475cea05b8af 100644 (file)
@@ -51,14 +51,22 @@ public:
                int id;
        };
        struct PostponedDefinition {
-               PostponedDefinition(int type, int id, std::ptrdiff_t offset, const char *identifier, int linkedType, bool inlined)
-               : type(type), id(id), offset(offset), identifier(identifier), linkedType(linkedType), inlined(inlined) { }
-               int type;
-               int id;
-               std::ptrdiff_t offset;
+               PostponedDefinition(
+                               char *dest,
+                               const char *identifier,
+                               int type,
+                               bool inlined,
+                               bool aggregate)
+               : dest(dest)
+               , identifier(identifier)
+               , type(type)
+               , inlined(inlined)
+               , aggregate(aggregate) { }
+               char *dest;
                const char *identifier;
-               int linkedType;
+               int type;
                bool inlined;
+               bool aggregate;
        };
 
        const std::set<std::string> &ExportedIdentifiers() const { return source.Exports(); }
@@ -85,7 +93,12 @@ private:
        SDL_Surface *GetImage(const std::string &);
 
        bool CanLink(const Value &) const;
-       void Postpone(int type, int id, std::ptrdiff_t offset, const std::string &identifier, int linkedType, bool inlined);
+       void Postpone(
+                       char *dest,
+                       const std::string &identifier,
+                       int type,
+                       bool inlined = true,
+                       bool aggregate = false);
 
 private:
        const ParsedSource &source;