OpenMW
|
00001 #ifndef COMPONENT_ESM_TES3_H 00002 #define COMPONENT_ESM_TES3_H 00003 00004 #include <vector> 00005 00006 #include "esmcommon.hpp" 00007 00008 namespace ESM 00009 { 00010 class ESMReader; 00011 class ESMWriter; 00012 00013 #pragma pack(push) 00014 #pragma pack(1) 00015 00017 struct Header 00018 { 00019 static const int CurrentFormat = 0; // most recent known format 00020 00021 struct Data 00022 { 00023 /* File format version. This is actually a float, the supported 00024 versions are 1.2 and 1.3. These correspond to: 00025 1.2 = 0x3f99999a and 1.3 = 0x3fa66666 00026 */ 00027 unsigned int version; 00028 int type; // 0=esp, 1=esm, 32=ess (unused) 00029 NAME32 author; // Author's name 00030 NAME256 desc; // File description 00031 int records; // Number of records? Not used. 00032 }; 00033 00034 // Defines another files (esm or esp) that this file depends upon. 00035 struct MasterData 00036 { 00037 std::string name; 00038 uint64_t size; 00039 int index; // Position of the parent file in the global list of loaded files 00040 }; 00041 00042 Data mData; 00043 int mFormat; 00044 std::vector<MasterData> mMaster; 00045 00046 void blank(); 00047 00048 void load (ESMReader &esm); 00049 void save (ESMWriter &esm); 00050 }; 00051 #pragma pack(pop) 00052 00053 } 00054 00055 #endif