1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 02:09:41 +00:00

Add to ESMStore the records that are needed to render ESM4 actors; cleanup usage of records.hpp

This commit is contained in:
Petr Mikheev 2023-07-30 18:16:55 +02:00
parent 5d54ca6fdb
commit 957880d515
8 changed files with 213 additions and 136 deletions

View file

@ -1,6 +1,22 @@
#include "classes.hpp"
#include <components/esm/records.hpp>
#include <components/esm4/loadacti.hpp>
#include <components/esm4/loadalch.hpp>
#include <components/esm4/loadammo.hpp>
#include <components/esm4/loadarmo.hpp>
#include <components/esm4/loadbook.hpp>
#include <components/esm4/loadclot.hpp>
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/esm4/loadmisc.hpp>
#include <components/esm4/loadnpc.hpp>
#include <components/esm4/loadstat.hpp>
#include <components/esm4/loadtree.hpp>
#include <components/esm4/loadweap.hpp>
#include "activator.hpp"
#include "apparatus.hpp"

View file

@ -1,7 +1,43 @@
#include "cellbindings.hpp"
#include <components/esm/esmbridge.hpp>
#include <components/esm/records.hpp>
#include <components/esm3/loadacti.hpp>
#include <components/esm3/loadalch.hpp>
#include <components/esm3/loadappa.hpp>
#include <components/esm3/loadarmo.hpp>
#include <components/esm3/loadbook.hpp>
#include <components/esm3/loadclot.hpp>
#include <components/esm3/loadcont.hpp>
#include <components/esm3/loadcrea.hpp>
#include <components/esm3/loaddoor.hpp>
#include <components/esm3/loadingr.hpp>
#include <components/esm3/loadligh.hpp>
#include <components/esm3/loadlock.hpp>
#include <components/esm3/loadmisc.hpp>
#include <components/esm3/loadnpc.hpp>
#include <components/esm3/loadprob.hpp>
#include <components/esm3/loadrepa.hpp>
#include <components/esm3/loadstat.hpp>
#include <components/esm3/loadweap.hpp>
#include <components/esm4/loadacti.hpp>
#include <components/esm4/loadalch.hpp>
#include <components/esm4/loadammo.hpp>
#include <components/esm4/loadarmo.hpp>
#include <components/esm4/loadbook.hpp>
#include <components/esm4/loadcell.hpp>
#include <components/esm4/loadclot.hpp>
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/esm4/loadmisc.hpp>
#include <components/esm4/loadrefr.hpp>
#include <components/esm4/loadstat.hpp>
#include <components/esm4/loadtree.hpp>
#include <components/esm4/loadweap.hpp>
#include "../mwworld/cellstore.hpp"
#include "../mwworld/worldmodel.hpp"

View file

@ -7,7 +7,6 @@
#include <components/debug/debuglog.hpp>
#include <components/esm/format.hpp>
#include <components/esm/records.hpp>
#include <components/esm3/cellref.hpp>
#include <components/esm3/cellstate.hpp>
#include <components/esm3/containerstate.hpp>
@ -41,11 +40,29 @@
#include <components/esm3/npcstate.hpp>
#include <components/esm3/objectstate.hpp>
#include <components/esm3/readerscache.hpp>
#include <components/esm4/loadachr.hpp>
#include <components/esm4/loadacti.hpp>
#include <components/esm4/loadalch.hpp>
#include <components/esm4/loadammo.hpp>
#include <components/esm4/loadarmo.hpp>
#include <components/esm4/loadbook.hpp>
#include <components/esm4/loadcell.hpp>
#include <components/esm4/loadclot.hpp>
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/esm4/loadmisc.hpp>
#include <components/esm4/loadnpc.hpp>
#include <components/esm4/loadrefr.hpp>
#include <components/esm4/loadstat.hpp>
#include <components/esm4/loadtree.hpp>
#include <components/esm4/loadweap.hpp>
#include <components/esm4/readerutils.hpp>
#include <components/files/openfile.hpp>
#include <components/misc/tuplehelpers.hpp>
#include <components/resource/resourcesystem.hpp>
@ -387,7 +404,7 @@ namespace MWWorld
static constexpr bool isESM4ActorRec(unsigned int rec)
{
return rec == ESM::REC_NPC_4 || rec == ESM::REC_CREA4 || rec == ESM::REC_LVLN4 || rec == ESM::REC_LVLC4;
return rec == ESM::REC_NPC_4 || rec == ESM::REC_CREA4;
}
template <typename X, typename R>

View file

@ -5,20 +5,18 @@
#include <tuple>
#include <components/debug/debuglog.hpp>
#include <components/esm/records.hpp>
#include <components/esm3/esmreader.hpp>
#include <components/esm3/esmwriter.hpp>
#include <components/esm3/readerscache.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include <components/lua/configuration.hpp>
#include <components/misc/algorithm.hpp>
#include <components/esm4/common.hpp>
#include <components/esm4/loadland.hpp>
#include <components/esm4/loadwrld.hpp>
#include <components/esm4/reader.hpp>
#include <components/esm4/readerutils.hpp>
#include <components/esmloader/load.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include <components/lua/configuration.hpp>
#include <components/misc/algorithm.hpp>
#include "../mwmechanics/spelllist.hpp"
@ -278,10 +276,6 @@ namespace MWWorld
case ESM::REC_STAT:
case ESM::REC_WEAP:
case ESM::REC_BODY:
case ESM::REC_ACHR4:
case ESM::REC_ACRE4:
case ESM::REC_STAT4:
case ESM::REC_LIGH4:
case ESM::REC_ACTI4:
case ESM::REC_ALCH4:
case ESM::REC_AMMO4:
@ -292,11 +286,13 @@ namespace MWWorld
case ESM::REC_DOOR4:
case ESM::REC_FURN4:
case ESM::REC_INGR4:
case ESM::REC_LIGH4:
case ESM::REC_LVLI4:
case ESM::REC_LVLC4:
case ESM::REC_LVLN4:
case ESM::REC_MISC4:
case ESM::REC_NPC_4:
case ESM::REC_RACE4:
case ESM::REC_STAT4:
case ESM::REC_TREE4:
case ESM::REC_WEAP4:
return true;

View file

@ -24,82 +24,87 @@ namespace MWMechanics
class SpellList;
}
namespace ESM
{
class ReadersCache;
class Script;
struct Activator;
struct Apparatus;
struct Armor;
struct Attribute;
struct BirthSign;
struct BodyPart;
struct Book;
struct Cell;
struct Class;
struct Clothing;
struct Container;
struct Creature;
struct CreatureLevList;
struct Dialogue;
struct Door;
struct Enchantment;
struct Faction;
struct GameSetting;
struct Global;
struct Ingredient;
struct ItemLevList;
struct Land;
struct LandTexture;
struct Light;
struct Lockpick;
struct MagicEffect;
struct Miscellaneous;
struct NPC;
struct Pathgrid;
struct Potion;
struct Probe;
struct Race;
struct Region;
struct Repair;
struct Skill;
struct Sound;
struct SoundGenerator;
struct Spell;
struct StartScript;
struct Static;
struct Weapon;
}
namespace ESM4
{
class Reader;
struct Static;
struct Cell;
struct Light;
struct Reference;
struct Activator;
struct ActorCharacter;
struct ActorCreature;
struct Activator;
struct Potion;
struct Ammunition;
struct Armor;
struct ArmorAddon;
struct Book;
struct Cell;
struct Clothing;
struct Container;
struct Creature;
struct Door;
struct Furniture;
struct Hair;
struct HeadPart;
struct Ingredient;
struct Land;
struct LevelledCreature;
struct LevelledItem;
struct LevelledNpc;
struct Light;
struct MiscItem;
struct Npc;
struct Outfit;
struct Potion;
struct Race;
struct Reference;
struct Static;
struct Tree;
struct Weapon;
struct World;
struct Land;
}
namespace ESM
{
class ReadersCache;
struct Activator;
struct Potion;
struct Apparatus;
struct Armor;
struct BodyPart;
struct Book;
struct BirthSign;
struct Class;
struct Clothing;
struct Container;
struct Creature;
struct Dialogue;
struct Door;
struct Enchantment;
struct Faction;
struct Global;
struct Ingredient;
struct CreatureLevList;
struct ItemLevList;
struct Light;
struct Lockpick;
struct Miscellaneous;
struct NPC;
struct Probe;
struct Race;
struct Region;
struct Repair;
struct SoundGenerator;
struct Sound;
struct Spell;
struct StartScript;
struct Static;
struct Weapon;
struct GameSetting;
class Script;
struct Cell;
struct Land;
struct LandTexture;
struct Pathgrid;
struct MagicEffect;
struct Skill;
struct Attribute;
}
namespace MWWorld
@ -128,12 +133,13 @@ namespace MWWorld
// Special entry which is hardcoded and not loaded from an ESM
Store<ESM::Attribute>,
Store<ESM4::Static>, Store<ESM4::Cell>, Store<ESM4::Light>, Store<ESM4::Reference>, Store<ESM4::Activator>,
Store<ESM4::Potion>, Store<ESM4::Ammunition>, Store<ESM4::Armor>, Store<ESM4::Book>, Store<ESM4::Clothing>,
Store<ESM4::Container>, Store<ESM4::Door>, Store<ESM4::Ingredient>, Store<ESM4::MiscItem>,
Store<ESM4::Tree>, Store<ESM4::Weapon>, Store<ESM4::World>, Store<ESM4::Furniture>, Store<ESM4::Land>,
Store<ESM4::ActorCharacter>, Store<ESM4::ActorCreature>, Store<ESM4::Race>, Store<ESM4::Creature>,
Store<ESM4::LevelledCreature>, Store<ESM4::Npc>, Store<ESM4::LevelledNpc>>;
Store<ESM4::Activator>, Store<ESM4::ActorCharacter>, Store<ESM4::ActorCreature>, Store<ESM4::Ammunition>,
Store<ESM4::Armor>, Store<ESM4::ArmorAddon>, Store<ESM4::Book>, Store<ESM4::Cell>, Store<ESM4::Clothing>,
Store<ESM4::Container>, Store<ESM4::Creature>, Store<ESM4::Door>, Store<ESM4::Furniture>, Store<ESM4::Hair>,
Store<ESM4::HeadPart>, Store<ESM4::Ingredient>, Store<ESM4::Land>, Store<ESM4::LevelledCreature>,
Store<ESM4::LevelledItem>, Store<ESM4::LevelledNpc>, Store<ESM4::Light>, Store<ESM4::MiscItem>,
Store<ESM4::Npc>, Store<ESM4::Outfit>, Store<ESM4::Potion>, Store<ESM4::Race>, Store<ESM4::Reference>,
Store<ESM4::Static>, Store<ESM4::Tree>, Store<ESM4::Weapon>, Store<ESM4::World>>;
private:
template <typename T>

View file

@ -5,11 +5,11 @@
#include <stdexcept>
#include <components/debug/debuglog.hpp>
#include <components/esm/records.hpp>
#include <components/esm3/esmreader.hpp>
#include <components/esm3/esmwriter.hpp>
#include <components/esm4/loadland.hpp>
#include <components/esm4/loadwrld.hpp>
#include <components/fallback/fallback.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include <components/misc/rng.hpp>
@ -1371,29 +1371,35 @@ template class MWWorld::TypedDynamicStore<ESM::StartScript>;
template class MWWorld::TypedDynamicStore<ESM::Static>;
template class MWWorld::TypedDynamicStore<ESM::Weapon>;
template class MWWorld::TypedDynamicStore<ESM4::Reference, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::ActorCharacter, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::ActorCreature, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::Activator>;
template class MWWorld::TypedDynamicStore<ESM4::Potion>;
template class MWWorld::TypedDynamicStore<ESM4::Ammunition>;
template class MWWorld::TypedDynamicStore<ESM4::Armor>;
template class MWWorld::TypedDynamicStore<ESM4::ArmorAddon>;
template class MWWorld::TypedDynamicStore<ESM4::Book>;
template class MWWorld::TypedDynamicStore<ESM4::Cell>;
template class MWWorld::TypedDynamicStore<ESM4::Clothing>;
template class MWWorld::TypedDynamicStore<ESM4::Container>;
template class MWWorld::TypedDynamicStore<ESM4::Creature>;
template class MWWorld::TypedDynamicStore<ESM4::Door>;
template class MWWorld::TypedDynamicStore<ESM4::Furniture>;
template class MWWorld::TypedDynamicStore<ESM4::Hair>;
template class MWWorld::TypedDynamicStore<ESM4::HeadPart>;
template class MWWorld::TypedDynamicStore<ESM4::Ingredient>;
template class MWWorld::TypedDynamicStore<ESM4::MiscItem>;
template class MWWorld::TypedDynamicStore<ESM4::Static>;
template class MWWorld::TypedDynamicStore<ESM4::Tree>;
template class MWWorld::TypedDynamicStore<ESM4::Land>;
template class MWWorld::TypedDynamicStore<ESM4::LevelledCreature>;
template class MWWorld::TypedDynamicStore<ESM4::LevelledItem>;
template class MWWorld::TypedDynamicStore<ESM4::LevelledNpc>;
template class MWWorld::TypedDynamicStore<ESM4::Light>;
template class MWWorld::TypedDynamicStore<ESM4::MiscItem>;
template class MWWorld::TypedDynamicStore<ESM4::Npc>;
template class MWWorld::TypedDynamicStore<ESM4::Reference, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::ActorCharacter, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::ActorCreature, ESM::FormId>;
template class MWWorld::TypedDynamicStore<ESM4::Outfit>;
template class MWWorld::TypedDynamicStore<ESM4::Potion>;
template class MWWorld::TypedDynamicStore<ESM4::Race>;
template class MWWorld::TypedDynamicStore<ESM4::Cell>;
template class MWWorld::TypedDynamicStore<ESM4::Static>;
template class MWWorld::TypedDynamicStore<ESM4::Tree>;
template class MWWorld::TypedDynamicStore<ESM4::Weapon>;
template class MWWorld::TypedDynamicStore<ESM4::World>;
template class MWWorld::TypedDynamicStore<ESM4::Land>;

View file

@ -16,12 +16,6 @@
#include <components/esm3/esmwriter.hpp>
#include <components/esm3/typetraits.hpp>
#include <components/esm4/common.hpp>
#include <components/esm4/loadcell.hpp>
#include <components/esm4/loadland.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/esm4/loadrefr.hpp>
#include <components/esm4/loadstat.hpp>
#include <components/esm4/loadwrld.hpp>
#include <components/esm4/reader.hpp>
#include <components/esm4/readerutils.hpp>
#include <components/files/configurationmanager.hpp>

View file

@ -1,51 +1,53 @@
#ifndef OPENMW_ESM_RECORDS_H
#define OPENMW_ESM_RECORDS_H
#include "components/esm3/loadacti.hpp"
#include "components/esm3/loadalch.hpp"
#include "components/esm3/loadappa.hpp"
#include "components/esm3/loadarmo.hpp"
#include "components/esm3/loadbody.hpp"
#include "components/esm3/loadbook.hpp"
#include "components/esm3/loadbsgn.hpp"
#include "components/esm3/loadcell.hpp"
#include "components/esm3/loadclas.hpp"
#include "components/esm3/loadclot.hpp"
#include "components/esm3/loadcont.hpp"
#include "components/esm3/loadcrea.hpp"
#include "components/esm3/loaddial.hpp"
#include "components/esm3/loaddoor.hpp"
#include "components/esm3/loadench.hpp"
#include "components/esm3/loadfact.hpp"
#include "components/esm3/loadglob.hpp"
#include "components/esm3/loadgmst.hpp"
#include "components/esm3/loadinfo.hpp"
#include "components/esm3/loadingr.hpp"
#include "components/esm3/loadland.hpp"
#include "components/esm3/loadlevlist.hpp"
#include "components/esm3/loadligh.hpp"
#include "components/esm3/loadlock.hpp"
#include "components/esm3/loadltex.hpp"
#include "components/esm3/loadmgef.hpp"
#include "components/esm3/loadmisc.hpp"
#include "components/esm3/loadnpc.hpp"
#include "components/esm3/loadpgrd.hpp"
#include "components/esm3/loadprob.hpp"
#include "components/esm3/loadrace.hpp"
#include "components/esm3/loadregn.hpp"
#include "components/esm3/loadrepa.hpp"
#include "components/esm3/loadscpt.hpp"
#include "components/esm3/loadskil.hpp"
#include "components/esm3/loadsndg.hpp"
#include "components/esm3/loadsoun.hpp"
#include "components/esm3/loadspel.hpp"
#include "components/esm3/loadsscr.hpp"
#include "components/esm3/loadstat.hpp"
#include "components/esm3/loadweap.hpp"
#include <components/esm3/loadacti.hpp>
#include <components/esm3/loadalch.hpp>
#include <components/esm3/loadappa.hpp>
#include <components/esm3/loadarmo.hpp>
#include <components/esm3/loadbody.hpp>
#include <components/esm3/loadbook.hpp>
#include <components/esm3/loadbsgn.hpp>
#include <components/esm3/loadcell.hpp>
#include <components/esm3/loadclas.hpp>
#include <components/esm3/loadclot.hpp>
#include <components/esm3/loadcont.hpp>
#include <components/esm3/loadcrea.hpp>
#include <components/esm3/loaddial.hpp>
#include <components/esm3/loaddoor.hpp>
#include <components/esm3/loadench.hpp>
#include <components/esm3/loadfact.hpp>
#include <components/esm3/loadglob.hpp>
#include <components/esm3/loadgmst.hpp>
#include <components/esm3/loadinfo.hpp>
#include <components/esm3/loadingr.hpp>
#include <components/esm3/loadland.hpp>
#include <components/esm3/loadlevlist.hpp>
#include <components/esm3/loadligh.hpp>
#include <components/esm3/loadlock.hpp>
#include <components/esm3/loadltex.hpp>
#include <components/esm3/loadmgef.hpp>
#include <components/esm3/loadmisc.hpp>
#include <components/esm3/loadnpc.hpp>
#include <components/esm3/loadpgrd.hpp>
#include <components/esm3/loadprob.hpp>
#include <components/esm3/loadrace.hpp>
#include <components/esm3/loadregn.hpp>
#include <components/esm3/loadrepa.hpp>
#include <components/esm3/loadscpt.hpp>
#include <components/esm3/loadskil.hpp>
#include <components/esm3/loadsndg.hpp>
#include <components/esm3/loadsoun.hpp>
#include <components/esm3/loadspel.hpp>
#include <components/esm3/loadsscr.hpp>
#include <components/esm3/loadstat.hpp>
#include <components/esm3/loadweap.hpp>
#include <components/esm4/loadachr.hpp>
#include <components/esm4/loadacti.hpp>
#include <components/esm4/loadalch.hpp>
#include <components/esm4/loadammo.hpp>
#include <components/esm4/loadarma.hpp>
#include <components/esm4/loadarmo.hpp>
#include <components/esm4/loadbook.hpp>
#include <components/esm4/loadcell.hpp>
@ -54,20 +56,24 @@
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadhair.hpp>
#include <components/esm4/loadhdpt.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadland.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/esm4/loadlvlc.hpp>
#include <components/esm4/loadlvli.hpp>
#include <components/esm4/loadlvln.hpp>
#include <components/esm4/loadmisc.hpp>
#include <components/esm4/loadnpc.hpp>
#include <components/esm4/loadotft.hpp>
#include <components/esm4/loadrace.hpp>
#include <components/esm4/loadrefr.hpp>
#include <components/esm4/loadstat.hpp>
#include <components/esm4/loadtree.hpp>
#include <components/esm4/loadweap.hpp>
#include "defs.hpp"
#include <components/esm4/loadwrld.hpp>
// Special records which are not loaded from ESM
#include "components/esm/attr.hpp"
#include <components/esm/attr.hpp>
#endif