X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FInterpreter.h;h=5a8e3ab8aa424ed4db977e0c471c475cea05b8af;hb=087783315ac5955c17bb3b051c9351f321653df6;hp=fc1499dbd807c10eff793ee7b34a3506db8df640;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/loader/Interpreter.h b/src/loader/Interpreter.h index fc1499d..5a8e3ab 100644 --- a/src/loader/Interpreter.h +++ b/src/loader/Interpreter.h @@ -1,17 +1,9 @@ #ifndef LOADER_INTERPRETER_H_ #define LOADER_INTERPRETER_H_ -#include "fwd.h" #include "PagedAllocator.h" #include "ParsedSource.h" -#include "TypeDescription.h" -#include "../battle/fwd.h" -#include "../common/fwd.h" #include "../common/Script.h" -#include "../geometry/Vector.h" -#include "../graphics/Color.h" -#include "../graphics/ComplexAnimation.h" -#include "../graphics/fwd.h" #include #include @@ -59,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 &ExportedIdentifiers() const { return source.Exports(); } @@ -93,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; @@ -109,4 +114,4 @@ private: } -#endif /* LOADER_INTERPRETER_H_ */ +#endif