forked from mirror/openmw-tes3mp
wipe record superclass
This commit is contained in:
parent
2fa4ac177a
commit
3494e17b7c
45 changed files with 191 additions and 86 deletions
|
@ -46,5 +46,54 @@ struct Position
|
|||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
enum RecNameInts
|
||||
{
|
||||
REC_ACTI = 0x49544341,
|
||||
REC_ALCH = 0x48434c41,
|
||||
REC_APPA = 0x41505041,
|
||||
REC_ARMO = 0x4f4d5241,
|
||||
REC_BODY = 0x59444f42,
|
||||
REC_BOOK = 0x4b4f4f42,
|
||||
REC_BSGN = 0x4e475342,
|
||||
REC_CELL = 0x4c4c4543,
|
||||
REC_CLAS = 0x53414c43,
|
||||
REC_CLOT = 0x544f4c43,
|
||||
REC_CNTC = 0x43544e43,
|
||||
REC_CONT = 0x544e4f43,
|
||||
REC_CREA = 0x41455243,
|
||||
REC_CREC = 0x43455243,
|
||||
REC_DIAL = 0x4c414944,
|
||||
REC_DOOR = 0x524f4f44,
|
||||
REC_ENCH = 0x48434e45,
|
||||
REC_FACT = 0x54434146,
|
||||
REC_GLOB = 0x424f4c47,
|
||||
REC_GMST = 0x54534d47,
|
||||
REC_INFO = 0x4f464e49,
|
||||
REC_INGR = 0x52474e49,
|
||||
REC_LAND = 0x444e414c,
|
||||
REC_LEVC = 0x4356454c,
|
||||
REC_LEVI = 0x4956454c,
|
||||
REC_LIGH = 0x4847494c,
|
||||
REC_LOCK = 0x4b434f4c,
|
||||
REC_LTEX = 0x5845544c,
|
||||
REC_MGEF = 0x4645474d,
|
||||
REC_MISC = 0x4353494d,
|
||||
REC_NPC_ = 0x5f43504e,
|
||||
REC_NPCC = 0x4343504e,
|
||||
REC_PGRD = 0x44524750,
|
||||
REC_PROB = 0x424f5250,
|
||||
REC_RACE = 0x45434152,
|
||||
REC_REGN = 0x4e474552,
|
||||
REC_REPA = 0x41504552,
|
||||
REC_SCPT = 0x54504353,
|
||||
REC_SKIL = 0x4c494b53,
|
||||
REC_SNDG = 0x47444e53,
|
||||
REC_SOUN = 0x4e554f53,
|
||||
REC_SPEL = 0x4c455053,
|
||||
REC_SSCR = 0x52435353,
|
||||
REC_STAT = 0x54415453,
|
||||
REC_WEAP = 0x50414557
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef OPENMW_ESM_COMMON_H
|
||||
#define OPENMW_ESM_COMMON_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <libs/platform/stdint.h>
|
||||
#include <libs/platform/string.h>
|
||||
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef OPENMW_ESM_ACTI_H
|
||||
#define OPENMW_ESM_ACTI_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct Activator
|
||||
{
|
||||
std::string mName, mScript, mModel;
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "effectlist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Alchemy item (potions)
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
#ifndef OPENMW_ESM_APPA_H
|
||||
#define OPENMW_ESM_APPA_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Alchemist apparatus
|
||||
*/
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
enum PartReferenceType
|
||||
{
|
||||
PRT_Head = 0,
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef OPENMW_ESM_BODY_H
|
||||
#define OPENMW_ESM_BODY_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct BodyPart
|
||||
{
|
||||
enum MeshPart
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_ESM_BOOK_H
|
||||
#define OPENMW_ESM_BOOK_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
@ -9,6 +9,9 @@ namespace ESM
|
|||
* Books, magic scrolls, notes and so on
|
||||
*/
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct Book
|
||||
{
|
||||
struct BKDTstruct
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "spelllist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct BirthSign
|
||||
{
|
||||
std::string mName, mDescription, mTexture;
|
||||
|
|
|
@ -4,11 +4,14 @@
|
|||
#include <string>
|
||||
|
||||
#include "esmcommon.hpp"
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/* Cell reference. This represents ONE object (of many) inside the
|
||||
cell. The cell references are not loaded as part of the normal
|
||||
loading process, but are rather loaded later on demand when we are
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Character class definitions
|
||||
*/
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "loadarmo.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Clothing
|
||||
*/
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Container definition
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "loadcont.hpp"
|
||||
#include "spelllist.hpp"
|
||||
#include "aipackage.hpp"
|
||||
|
@ -11,6 +10,9 @@
|
|||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Creature definition
|
||||
*
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#ifndef OPENMW_ESM_CREC_H
|
||||
#define OPENMW_ESM_CREC_H
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
// TODO create implementation files and remove this one
|
||||
#include "esmreader.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/* These two are only used in save games. They are not decoded yet.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
#ifndef OPENMW_ESM_DIAL_H
|
||||
#define OPENMW_ESM_DIAL_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "loadinfo.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Dialogue topic and journal entries. The actual data is contained in
|
||||
* the INFO records following the DIAL.
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct Door
|
||||
{
|
||||
std::string mName, mModel, mScript, mOpenSound, mCloseSound;
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef OPENMW_ESM_ENCH_H
|
||||
#define OPENMW_ESM_ENCH_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include "effectlist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Enchantments
|
||||
*/
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Faction definitions
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#ifndef OPENMW_ESM_GLOB_H
|
||||
#define OPENMW_ESM_GLOB_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Global script variables
|
||||
*/
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Game setting, with automatic cleaning of "dirty" entries.
|
||||
*
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
// NOT DONE
|
||||
|
||||
/*
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Alchemy ingredient
|
||||
*/
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <libs/platform/stdint.h>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Landscape data.
|
||||
*/
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Leveled lists. Since these have identical layout, I only bothered
|
||||
* to implement it once.
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Lights. Includes static light sources and also carryable candles
|
||||
* and torches.
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef OPENMW_ESM_LOCKS_H
|
||||
#define OPENMW_ESM_LOCKS_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* This file covers lockpicks (LOCK), probes (PROB) and armor repair
|
||||
* items (REPA). These have nearly identical data structures.
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Texture used for texturing landscape.
|
||||
*
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct MagicEffect
|
||||
{
|
||||
enum Flags
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Misc inventory items, basically things that have no use but can be
|
||||
* carried, bought and sold. It also includes keys.
|
||||
|
|
|
@ -5,12 +5,15 @@
|
|||
#include <vector>
|
||||
|
||||
#include "defs.hpp"
|
||||
#include "record.hpp"
|
||||
#include "loadcont.hpp"
|
||||
#include "aipackage.hpp"
|
||||
#include "spelllist.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* NPC definition
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#ifndef OPENMW_ESM_NPCC_H
|
||||
#define OPENMW_ESM_NPCC_H
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
// TODO: create implementation files to remove this
|
||||
#include "esmreader.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* NPC change information (found in savegame files only). We can't
|
||||
* read these yet.
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Path grid.
|
||||
*/
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "spelllist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Race definition
|
||||
*/
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Region data
|
||||
*/
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Script definitions
|
||||
*/
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
|
||||
#include <boost/array.hpp>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Skill information
|
||||
*
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Sound generator. This describes the sounds a creature make.
|
||||
*/
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct SOUNstruct
|
||||
{
|
||||
unsigned char mVolume, mMinRange, mMaxRange;
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
#include "effectlist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
struct Spell
|
||||
{
|
||||
enum SpellType
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
Startup script. I think this is simply a 'main' script that is run
|
||||
from the begining. The SSCR records contain a DATA identifier which
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Definition of static object.
|
||||
*
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "record.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Weapon definition
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef OPENMW_ESM_RECORD_H
|
||||
#define OPENMW_ESM_RECORD_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
|
@ -55,30 +53,6 @@ enum RecNameInts
|
|||
REC_WEAP = 0x50414557
|
||||
};
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
class Record
|
||||
{
|
||||
public:
|
||||
Record() {}
|
||||
virtual ~Record() {}
|
||||
|
||||
virtual void load(ESMReader& esm) = 0;
|
||||
virtual void save(ESMWriter& esm) = 0;
|
||||
|
||||
std::string getId() const { return mId; }
|
||||
void setId(const std::string& in) { mId = in; }
|
||||
|
||||
int getFlags() const { return (mFlags & 0x1 ? 0x00002000 : 0) | (mFlags & 0x2 ? 0x00000400 : 0); }
|
||||
void setFlags(int in) { mFlags = (in & 0x00002000 ? 0x1 : 0) | (in & 0x00000400 ? 0x2 : 0); }
|
||||
|
||||
virtual int getName() = 0;
|
||||
|
||||
protected:
|
||||
std::string mId;
|
||||
char mFlags;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_ESM_RECORDS_H
|
||||
#define OPENMW_ESM_RECORDS_H
|
||||
|
||||
#include "record.hpp"
|
||||
#include "defs.hpp"
|
||||
#include "loadacti.hpp"
|
||||
#include "loadalch.hpp"
|
||||
#include "loadappa.hpp"
|
||||
|
|
Loading…
Reference in a new issue