Permalink
Browse files

Rewrote almost everything in the ESM Reader.

Fixed nested GRUPS and better handling of records.
Now it supports Zip compressed records.
  • Loading branch information...
1 parent afbf7e0 commit 9ace092f1881b7467941b6e096502a930b7b601e @roby65 roby65 committed Jul 10, 2012
Showing with 13,007 additions and 485 deletions.
  1. +66 −1 tools/ESMReader/Common.h
  2. +194 −92 tools/ESMReader/ESMLoader.cpp
  3. +6 −13 tools/ESMReader/ESMLoader.h
  4. +0 −52 tools/ESMReader/Fields.cpp
  5. +0 −33 tools/ESMReader/Fields.h
  6. +0 −51 tools/ESMReader/Group.cpp
  7. +0 −38 tools/ESMReader/Group.h
  8. +0 −65 tools/ESMReader/Record.cpp
  9. +0 −48 tools/ESMReader/Record.h
  10. +5 −28 tools/ESMReader/Sample/main.cpp
  11. +0 −50 tools/ESMReader/Utils.cpp
  12. +0 −14 tools/ESMReader/Utils.h
  13. +179 −0 tools/ESMReader/zlib/adler32.c
  14. +80 −0 tools/ESMReader/zlib/compress.c
  15. +425 −0 tools/ESMReader/zlib/crc32.c
  16. +441 −0 tools/ESMReader/zlib/crc32.h
  17. +1,965 −0 tools/ESMReader/zlib/deflate.c
  18. +346 −0 tools/ESMReader/zlib/deflate.h
  19. +25 −0 tools/ESMReader/zlib/gzclose.c
  20. +193 −0 tools/ESMReader/zlib/gzguts.h
  21. +620 −0 tools/ESMReader/zlib/gzlib.c
  22. +589 −0 tools/ESMReader/zlib/gzread.c
  23. +565 −0 tools/ESMReader/zlib/gzwrite.c
  24. +640 −0 tools/ESMReader/zlib/infback.c
  25. +340 −0 tools/ESMReader/zlib/inffast.c
  26. +11 −0 tools/ESMReader/zlib/inffast.h
  27. +94 −0 tools/ESMReader/zlib/inffixed.h
  28. +1,496 −0 tools/ESMReader/zlib/inflate.c
  29. +122 −0 tools/ESMReader/zlib/inflate.h
  30. +306 −0 tools/ESMReader/zlib/inftrees.c
  31. +62 −0 tools/ESMReader/zlib/inftrees.h
  32. +1,224 −0 tools/ESMReader/zlib/trees.c
  33. +128 −0 tools/ESMReader/zlib/trees.h
  34. +59 −0 tools/ESMReader/zlib/uncompr.c
  35. +506 −0 tools/ESMReader/zlib/zconf.h
  36. +1,744 −0 tools/ESMReader/zlib/zlib.h
  37. +324 −0 tools/ESMReader/zlib/zutil.c
  38. +252 −0 tools/ESMReader/zlib/zutil.h
@@ -1,7 +1,72 @@
+#pragma once
+
#include <Windows.h>
#include <iostream>
#include <fstream>
+#include <vector>
+
+#include "zlib/zlib.h"
using namespace std;
-#define byte char
+#define byte char
+
+struct MNAM
+{
+ unsigned int width;
+ unsigned int height;
+ unsigned short nwCellX,nwCellY,seCellX,seCellY;
+};
+
+struct standardRecord
+{
+ int type;
+ char* start;
+ char* end;
+ int parent;
+
+ int groupType;
+
+ int formID;
+ char EDID[64];
+ char FULL[128];
+ int XCLC[2];
+
+ struct
+ {
+ unsigned int width;
+ unsigned int height;
+ unsigned short NW_cell_X;
+ unsigned short NW_cell_Y;
+ unsigned short SE_cell_X;
+ unsigned short SE_cell_Y;
+ } MNAM;
+
+ float ONAM[3];
+};
+
+struct RECORD_NPC
+{
+ unsigned int formID;
+ char fullName[128];
+ char editorID[64];
+};
+
+struct RECORD_WEAP
+{
+ unsigned int formID;
+ char fullName[128];
+ char editorID[64];
+};
+
+struct RECORD_AMMO
+{
+ unsigned int formID;
+ char fullName[128];
+ char editorID[64];
+};
+
+
+#define RECORD_GROUP 1
+#define RECORD_RECORD 2
+#define RECORD_FIELD 3
Oops, something went wrong.

0 comments on commit 9ace092

Please sign in to comment.