X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FCompiler.h;h=ab26cea41e5ed955933c4a20e0598b9f1bbfc146;hb=553fb21593a9c95e37e3be98ad0e4b97bc4ff11b;hp=d2f036115733d2237f8f07508166c7135ff8f92b;hpb=587a9fc38235475f1c25424bee3e3aeb892a25e2;p=l2e.git diff --git a/src/loader/Compiler.h b/src/loader/Compiler.h index d2f0361..ab26cea 100644 --- a/src/loader/Compiler.h +++ b/src/loader/Compiler.h @@ -8,6 +8,8 @@ #ifndef LOADER_COMPILER_H_ #define LOADER_COMPILER_H_ +#include "ObjectFile.h" + #include #include #include @@ -29,29 +31,6 @@ private: public: void Write(std::ostream &); - struct Export { - int nameOffset; - int typeId; - int dataOffset; - }; - - struct External { - int nameOffset; - int referenceOffset; - int inlined; - }; - - struct ImageProperties { - Uint32 flags; - int width; - int height; - int depth; - Uint32 rmask; - Uint32 gmask; - Uint32 bmask; - Uint32 amask; - }; - private: void WriteHeader(std::ostream &); void WriteExports(std::ostream &); @@ -67,19 +46,14 @@ private: int ReferenceOffset(int typeId, int objectId, std::ptrdiff_t fieldOffset) const; int ObjectOffset(int typeId, int objectId) const; - int TypeOffset(int typeId) const; + int GetTypeOffset(int typeId) const; private: const Interpreter &intp; int cursor; - int exportsOffset; - int externalsOffset; - int externalStringsOffset; - int exportStringsOffset; - int imagesOffset; - int objectsOffset; + ObjectFileHeader fileHeader; std::map objectOffsets;