From 1ced0c912ea011243e3699051ac0e00776273adc Mon Sep 17 00:00:00 2001 From: "florent.teppe" Date: Sun, 3 Jul 2022 20:53:08 +0200 Subject: [PATCH] partially revert "Store: moved all the template specialization to its own heaper file, included where it's needed" This reverts commit 80a25bcd3021f7ebfaf2f864e34532009b9b8aeb. It didn't really make sense to do all those changes in the same MR partially Revert "Store refactoring: more forgotten storeSpecialization.hpp" This reverts commit 9943a5bc96b9025f06cbaac5bb7f1bf51ebc746f. removed remaining references to storeSpecialization CMakeLists.txt, and landmanager.cpp --- apps/openmw/CMakeLists.txt | 2 +- apps/openmw/mwclass/creature.cpp | 1 - apps/openmw/mwclass/npc.cpp | 1 - apps/openmw/mwdialogue/hypertextparser.cpp | 1 - apps/openmw/mwgui/alchemywindow.cpp | 1 - apps/openmw/mwgui/console.cpp | 1 - apps/openmw/mwgui/hud.cpp | 1 - apps/openmw/mwgui/mapwindow.cpp | 1 - apps/openmw/mwgui/quickkeysmenu.cpp | 1 - apps/openmw/mwgui/spellcreationdialog.cpp | 1 - apps/openmw/mwgui/spellicons.cpp | 1 - apps/openmw/mwgui/spellmodel.cpp | 1 - apps/openmw/mwgui/statswindow.cpp | 1 - apps/openmw/mwgui/tooltips.cpp | 2 - apps/openmw/mwgui/trainingwindow.cpp | 1 - apps/openmw/mwgui/widgets.cpp | 1 - apps/openmw/mwmechanics/activespells.cpp | 1 - apps/openmw/mwmechanics/aicombat.cpp | 2 - apps/openmw/mwmechanics/aicombataction.cpp | 1 - apps/openmw/mwmechanics/aiwander.cpp | 1 - apps/openmw/mwmechanics/alchemy.cpp | 1 - apps/openmw/mwmechanics/autocalcspell.cpp | 1 - apps/openmw/mwmechanics/enchanting.cpp | 1 - .../mwmechanics/mechanicsmanagerimp.cpp | 1 - apps/openmw/mwmechanics/npcstats.cpp | 1 - apps/openmw/mwmechanics/pathgrid.cpp | 1 - apps/openmw/mwmechanics/spellcasting.cpp | 1 - apps/openmw/mwmechanics/spelleffects.cpp | 1 - apps/openmw/mwmechanics/spellpriority.cpp | 1 - apps/openmw/mwmechanics/spellresistance.cpp | 1 - apps/openmw/mwmechanics/spellutil.cpp | 2 - apps/openmw/mwrender/globalmap.cpp | 1 - apps/openmw/mwrender/landmanager.cpp | 1 - apps/openmw/mwrender/objectpaging.cpp | 2 - apps/openmw/mwrender/pathgrid.cpp | 1 - apps/openmw/mwrender/terrainstorage.cpp | 1 - apps/openmw/mwscript/guiextensions.cpp | 1 - apps/openmw/mwworld/StoreSpecialization.hpp | 285 ------------------ apps/openmw/mwworld/cells.cpp | 1 - apps/openmw/mwworld/class.cpp | 1 - apps/openmw/mwworld/esmstore.cpp | 1 - apps/openmw/mwworld/esmstore.hpp | 3 - apps/openmw/mwworld/projectilemanager.cpp | 1 - apps/openmw/mwworld/scene.cpp | 1 - apps/openmw/mwworld/store.cpp | 1 - apps/openmw/mwworld/worldimp.cpp | 1 - 46 files changed, 1 insertion(+), 336 deletions(-) delete mode 100644 apps/openmw/mwworld/StoreSpecialization.hpp diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 335bfaa41d..13fb717147 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -75,7 +75,7 @@ add_openmw_dir (mwworld containerstore actiontalk actiontake manualref player cellvisitors failedaction cells localscripts customdata inventorystore ptr actionopen actionread actionharvest actionequip timestamp actionalchemy cellstore actionapply actioneat - store esmstore storeSpecialization fallback actionrepair actionsoulgem livecellref actiondoor + store esmstore fallback actionrepair actionsoulgem livecellref actiondoor contentloader esmloader actiontrap cellreflist cellref weather projectilemanager cellpreloader datetimemanager groundcoverstore magiceffects ) diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 2e885736bf..1be89c0c09 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -35,7 +35,6 @@ #include "../mwworld/localscripts.hpp" #include "../mwworld/inventorystore.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwrender/renderinginterface.hpp" #include "../mwrender/objects.hpp" diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 1240f4fc15..0169e63950 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -49,7 +49,6 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/localscripts.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" diff --git a/apps/openmw/mwdialogue/hypertextparser.cpp b/apps/openmw/mwdialogue/hypertextparser.cpp index 488d8a1401..732cdb1f8f 100644 --- a/apps/openmw/mwdialogue/hypertextparser.cpp +++ b/apps/openmw/mwdialogue/hypertextparser.cpp @@ -5,7 +5,6 @@ #include "../mwworld/store.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "keywordsearch.hpp" diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index 61a5cb850a..b7fa3d71a9 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -17,7 +17,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 47bd12b22e..65ac17cea2 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -25,7 +25,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/class.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace MWGui { diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index bce735e7f7..028da083f5 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -17,7 +17,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwmechanics/npcstats.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index 0b2821b39a..c52d1f0660 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -26,7 +26,6 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/esmstore.hpp" #include "../mwworld/cellutils.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwrender/globalmap.hpp" #include "../mwrender/localmap.hpp" diff --git a/apps/openmw/mwgui/quickkeysmenu.cpp b/apps/openmw/mwgui/quickkeysmenu.cpp index d67901cd61..c661b59f17 100644 --- a/apps/openmw/mwgui/quickkeysmenu.cpp +++ b/apps/openmw/mwgui/quickkeysmenu.cpp @@ -15,7 +15,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/player.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/mechanicsmanager.hpp" diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index 9bc9de5ff8..a54c5c87f3 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -18,7 +18,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/store.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwmechanics/spellutil.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/spellicons.cpp b/apps/openmw/mwgui/spellicons.cpp index 12161cdeb3..60ea47683b 100644 --- a/apps/openmw/mwgui/spellicons.cpp +++ b/apps/openmw/mwgui/spellicons.cpp @@ -17,7 +17,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwmechanics/creaturestats.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/spellmodel.cpp b/apps/openmw/mwgui/spellmodel.cpp index 6c47c833d2..859410392d 100644 --- a/apps/openmw/mwgui/spellmodel.cpp +++ b/apps/openmw/mwgui/spellmodel.cpp @@ -13,7 +13,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" #include "../mwworld/class.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index 1575ad10df..1f7576d493 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -18,7 +18,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/player.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwmechanics/npcstats.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index d3e6332c7b..94c4288ddf 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -18,8 +18,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" - #include "../mwmechanics/spellutil.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/trainingwindow.cpp b/apps/openmw/mwgui/trainingwindow.cpp index e68b9ffe13..24a4eb3607 100644 --- a/apps/openmw/mwgui/trainingwindow.cpp +++ b/apps/openmw/mwgui/trainingwindow.cpp @@ -11,7 +11,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/containerstore.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwmechanics/npcstats.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index 4f68ff9f50..2a27a976ee 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -15,7 +15,6 @@ #include "../mwbase/windowmanager.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "controllers.hpp" #include "ustring.hpp" diff --git a/apps/openmw/mwmechanics/activespells.cpp b/apps/openmw/mwmechanics/activespells.cpp index 361abe3067..040214848c 100644 --- a/apps/openmw/mwmechanics/activespells.cpp +++ b/apps/openmw/mwmechanics/activespells.cpp @@ -27,7 +27,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/class.hpp" #include "../mwworld/inventorystore.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwmechanics/aicombat.cpp b/apps/openmw/mwmechanics/aicombat.cpp index 35f9bfd238..2be388568b 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -14,8 +14,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" - #include "../mwbase/environment.hpp" #include "../mwbase/dialoguemanager.hpp" diff --git a/apps/openmw/mwmechanics/aicombataction.cpp b/apps/openmw/mwmechanics/aicombataction.cpp index b67f241635..2def2696bb 100644 --- a/apps/openmw/mwmechanics/aicombataction.cpp +++ b/apps/openmw/mwmechanics/aicombataction.cpp @@ -12,7 +12,6 @@ #include "../mwworld/inventorystore.hpp" #include "../mwworld/actionequip.hpp" #include "../mwworld/cellstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "actorutil.hpp" #include "npcstats.hpp" diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index a32eb717d6..05eff857e0 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -17,7 +17,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" #include "../mwworld/cellstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwphysics/collisiontype.hpp" diff --git a/apps/openmw/mwmechanics/alchemy.cpp b/apps/openmw/mwmechanics/alchemy.cpp index c41e3c81e8..d60eac15de 100644 --- a/apps/openmw/mwmechanics/alchemy.cpp +++ b/apps/openmw/mwmechanics/alchemy.cpp @@ -21,7 +21,6 @@ #include "../mwworld/containerstore.hpp" #include "../mwworld/class.hpp" #include "../mwworld/cellstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "magiceffects.hpp" #include "creaturestats.hpp" diff --git a/apps/openmw/mwmechanics/autocalcspell.cpp b/apps/openmw/mwmechanics/autocalcspell.cpp index d88922eb97..d82b8505f1 100644 --- a/apps/openmw/mwmechanics/autocalcspell.cpp +++ b/apps/openmw/mwmechanics/autocalcspell.cpp @@ -3,7 +3,6 @@ #include #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" diff --git a/apps/openmw/mwmechanics/enchanting.cpp b/apps/openmw/mwmechanics/enchanting.cpp index a48712c74e..256e1bd871 100644 --- a/apps/openmw/mwmechanics/enchanting.cpp +++ b/apps/openmw/mwmechanics/enchanting.cpp @@ -7,7 +7,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/containerstore.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index ecff69566a..bde5ad0225 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -14,7 +14,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/player.hpp" #include "../mwworld/ptr.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/statemanager.hpp" diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index 04b1b91345..a89e01259c 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -11,7 +11,6 @@ #include #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwmechanics/pathgrid.cpp b/apps/openmw/mwmechanics/pathgrid.cpp index d0ef410a97..ee1de3b5ad 100644 --- a/apps/openmw/mwmechanics/pathgrid.cpp +++ b/apps/openmw/mwmechanics/pathgrid.cpp @@ -5,7 +5,6 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 88a749bc27..06d504ef6c 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -18,7 +18,6 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwrender/animation.hpp" diff --git a/apps/openmw/mwmechanics/spelleffects.cpp b/apps/openmw/mwmechanics/spelleffects.cpp index d303ecf717..4a9cf49263 100644 --- a/apps/openmw/mwmechanics/spelleffects.cpp +++ b/apps/openmw/mwmechanics/spelleffects.cpp @@ -29,7 +29,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" #include "../mwworld/player.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwmechanics/spellpriority.cpp b/apps/openmw/mwmechanics/spellpriority.cpp index 6a3aafd1d0..e22a8c4f75 100644 --- a/apps/openmw/mwmechanics/spellpriority.cpp +++ b/apps/openmw/mwmechanics/spellpriority.cpp @@ -13,7 +13,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" #include "../mwworld/cellstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "creaturestats.hpp" #include "spellresistance.hpp" diff --git a/apps/openmw/mwmechanics/spellresistance.cpp b/apps/openmw/mwmechanics/spellresistance.cpp index b5c9b6d8dd..bb39255b43 100644 --- a/apps/openmw/mwmechanics/spellresistance.cpp +++ b/apps/openmw/mwmechanics/spellresistance.cpp @@ -7,7 +7,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "creaturestats.hpp" #include "spellutil.hpp" diff --git a/apps/openmw/mwmechanics/spellutil.cpp b/apps/openmw/mwmechanics/spellutil.cpp index c5568c63ce..7fa9687189 100644 --- a/apps/openmw/mwmechanics/spellutil.cpp +++ b/apps/openmw/mwmechanics/spellutil.cpp @@ -7,8 +7,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" - #include "actorutil.hpp" #include "creaturestats.hpp" diff --git a/apps/openmw/mwrender/globalmap.cpp b/apps/openmw/mwrender/globalmap.cpp index 1bc8e02b57..dca26a220f 100644 --- a/apps/openmw/mwrender/globalmap.cpp +++ b/apps/openmw/mwrender/globalmap.cpp @@ -23,7 +23,6 @@ #include "../mwbase/world.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "vismask.hpp" #include "util.hpp" diff --git a/apps/openmw/mwrender/landmanager.cpp b/apps/openmw/mwrender/landmanager.cpp index 1b80a02cbb..f85504a863 100644 --- a/apps/openmw/mwrender/landmanager.cpp +++ b/apps/openmw/mwrender/landmanager.cpp @@ -7,7 +7,6 @@ #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" namespace MWRender diff --git a/apps/openmw/mwrender/objectpaging.cpp b/apps/openmw/mwrender/objectpaging.cpp index 91bf5a3711..adbf1a202b 100644 --- a/apps/openmw/mwrender/objectpaging.cpp +++ b/apps/openmw/mwrender/objectpaging.cpp @@ -31,8 +31,6 @@ #include #include "apps/openmw/mwworld/esmstore.hpp" -#include "apps/openmw/mwworld/storeSpecialization.hpp" - #include "apps/openmw/mwbase/environment.hpp" #include "apps/openmw/mwbase/world.hpp" diff --git a/apps/openmw/mwrender/pathgrid.cpp b/apps/openmw/mwrender/pathgrid.cpp index 859b728031..ec7d2c15e0 100644 --- a/apps/openmw/mwrender/pathgrid.cpp +++ b/apps/openmw/mwrender/pathgrid.cpp @@ -19,7 +19,6 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/esmstore.hpp" #include "../mwmechanics/pathfinding.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "vismask.hpp" diff --git a/apps/openmw/mwrender/terrainstorage.cpp b/apps/openmw/mwrender/terrainstorage.cpp index e4701a7689..879a2ef68b 100644 --- a/apps/openmw/mwrender/terrainstorage.cpp +++ b/apps/openmw/mwrender/terrainstorage.cpp @@ -3,7 +3,6 @@ #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "landmanager.hpp" diff --git a/apps/openmw/mwscript/guiextensions.cpp b/apps/openmw/mwscript/guiextensions.cpp index ad1e883518..36669f34ac 100644 --- a/apps/openmw/mwscript/guiextensions.cpp +++ b/apps/openmw/mwscript/guiextensions.cpp @@ -7,7 +7,6 @@ #include #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/windowmanager.hpp" diff --git a/apps/openmw/mwworld/StoreSpecialization.hpp b/apps/openmw/mwworld/StoreSpecialization.hpp deleted file mode 100644 index f4a2ccff20..0000000000 --- a/apps/openmw/mwworld/StoreSpecialization.hpp +++ /dev/null @@ -1,285 +0,0 @@ -#pragma once -namespace MWWorld -{ - - class StoreBase; - template class Store; - template class IndexedStore; - -template <> - class Store : public StoreBase - { - // For multiple ESM/ESP files we need one list per file. - typedef std::vector LandTextureList; - std::vector mStatic; - - public: - Store(); - - typedef std::vector::const_iterator iterator; - - // Must be threadsafe! Called from terrain background loading threads. - // Not a big deal here, since ESM::LandTexture can never be modified or inserted/erased - const ESM::LandTexture *search(size_t index, size_t plugin) const; - const ESM::LandTexture *find(size_t index, size_t plugin) const; - - void resize(size_t num) { mStatic.resize(num); } - - size_t getSize() const override; - size_t getSize(size_t plugin) const; - - RecordId load(ESM::ESMReader &esm) override; - - iterator begin(size_t plugin) const; - iterator end(size_t plugin) const; - }; - - template <> - class Store : public StoreBase - { - struct SpatialComparator - { - using is_transparent = void; - - bool operator()(const ESM::Land& x, const ESM::Land& y) const - { - return std::tie(x.mX, x.mY) < std::tie(y.mX, y.mY); - } - bool operator()(const ESM::Land& x, const std::pair& y) const - { - return std::tie(x.mX, x.mY) < std::tie(y.first, y.second); - } - bool operator()(const std::pair& x, const ESM::Land& y) const - { - return std::tie(x.first, x.second) < std::tie(y.mX, y.mY); - } - }; - using Statics = std::set; - Statics mStatic; - - public: - typedef typename Statics::iterator iterator; - - virtual ~Store(); - - size_t getSize() const override; - iterator begin() const; - iterator end() const; - - // Must be threadsafe! Called from terrain background loading threads. - // Not a big deal here, since ESM::Land can never be modified or inserted/erased - const ESM::Land *search(int x, int y) const; - const ESM::Land *find(int x, int y) const; - - RecordId load(ESM::ESMReader &esm) override; - void setUp() override; - private: - bool mBuilt = false; - }; - - template <> - class Store : public StoreBase - { - struct DynamicExtCmp - { - bool operator()(const std::pair &left, const std::pair &right) const { - if (left.first == right.first && left.second == right.second) - return false; - - if (left.first == right.first) - return left.second > right.second; - - // Exterior cells are listed in descending, row-major order, - // this is a workaround for an ambiguous chargen_plank reference in the vanilla game. - // there is one at -22,16 and one at -2,-9, the latter should be used. - return left.first > right.first; - } - }; - - typedef std::unordered_map DynamicInt; - typedef std::map, ESM::Cell, DynamicExtCmp> DynamicExt; - - DynamicInt mInt; - DynamicExt mExt; - - std::vector mSharedInt; - std::vector mSharedExt; - - DynamicInt mDynamicInt; - DynamicExt mDynamicExt; - - const ESM::Cell *search(const ESM::Cell &cell) const; - void handleMovedCellRefs(ESM::ESMReader& esm, ESM::Cell* cell); - - public: - typedef SharedIterator iterator; - - const ESM::Cell *search(const std::string &id) const; - const ESM::Cell *search(int x, int y) const; - const ESM::Cell *searchStatic(int x, int y) const; - const ESM::Cell *searchOrCreate(int x, int y); - - const ESM::Cell *find(const std::string &id) const; - const ESM::Cell *find(int x, int y) const; - - void clearDynamic() override; - void setUp() override; - - RecordId load(ESM::ESMReader &esm) override; - - iterator intBegin() const; - iterator intEnd() const; - iterator extBegin() const; - iterator extEnd() const; - - // Return the northernmost cell in the easternmost column. - const ESM::Cell *searchExtByName(const std::string &id) const; - - // Return the northernmost cell in the easternmost column. - const ESM::Cell *searchExtByRegion(const std::string &id) const; - - size_t getSize() const override; - size_t getExtSize() const; - size_t getIntSize() const; - - void listIdentifier(std::vector &list) const override; - - ESM::Cell *insert(const ESM::Cell &cell); - - bool erase(const ESM::Cell &cell); - bool erase(const std::string &id); - - bool erase(int x, int y); - }; - - template <> - class Store : public StoreBase - { - private: - typedef std::unordered_map Interior; - typedef std::map, ESM::Pathgrid> Exterior; - - Interior mInt; - Exterior mExt; - - Store* mCells; - - public: - - Store(); - - void setCells(Store& cells); - RecordId load(ESM::ESMReader &esm) override; - size_t getSize() const override; - - void setUp() override; - - const ESM::Pathgrid *search(int x, int y) const; - const ESM::Pathgrid *search(const std::string& name) const; - const ESM::Pathgrid *find(int x, int y) const; - const ESM::Pathgrid* find(const std::string& name) const; - const ESM::Pathgrid *search(const ESM::Cell &cell) const; - const ESM::Pathgrid *find(const ESM::Cell &cell) const; - }; - - - template <> - class Store : public IndexedStore - { - public: - Store(); - }; - - template <> - class Store : public IndexedStore - { - public: - Store(); - }; - - template <> - class Store : public IndexedStore - { - std::vector mStatic; - - public: - typedef std::vector::const_iterator iterator; - - Store(); - - const ESM::Attribute *search(size_t index) const; - - // calls `search` and throws an exception if not found - const ESM::Attribute *find(size_t index) const; - - void setUp(); - - size_t getSize() const; - iterator begin() const; - iterator end() const; - }; - - template <> - class Store : public StoreBase - { - std::map mStatic; - - public: - typedef std::map::const_iterator iterator; - - Store(); - - const ESM::WeaponType *search(const int id) const; - - // calls `search` and throws an exception if not found - const ESM::WeaponType *find(const int id) const; - - RecordId load(ESM::ESMReader &esm) override { return RecordId({}, false); } - - ESM::WeaponType* insert(const ESM::WeaponType &weaponType); - - void setUp() override; - - size_t getSize() const override; - iterator begin() const; - iterator end() const; - }; - - template <> - class Store : public StoreBase - { - typedef std::unordered_map Static; - Static mStatic; - /// @par mShared usually preserves the record order as it came from the content files (this - /// is relevant for the spell autocalc code and selection order - /// for heads/hairs in the character creation) - /// @warning ESM::Dialogue Store currently implements a sorted order for unknown reasons. - std::vector mShared; - - mutable bool mKeywordSearchModFlag; - mutable MWDialogue::KeywordSearch mKeywordSearch; - - public: - Store(); - - typedef SharedIterator iterator; - - void setUp() override; - - const ESM::Dialogue *search(const std::string &id) const; - const ESM::Dialogue *find(const std::string &id) const; - - iterator begin() const; - iterator end() const; - - size_t getSize() const override; - - bool eraseStatic(const std::string &id) override; - - RecordId load(ESM::ESMReader &esm) override; - - void listIdentifier(std::vector &list) const override; - - const MWDialogue::KeywordSearch& getDialogIdKeywordSearch() const; - }; -} diff --git a/apps/openmw/mwworld/cells.cpp b/apps/openmw/mwworld/cells.cpp index d909b9623a..3ad8a1ee38 100644 --- a/apps/openmw/mwworld/cells.cpp +++ b/apps/openmw/mwworld/cells.cpp @@ -15,7 +15,6 @@ #include "esmstore.hpp" #include "containerstore.hpp" #include "cellstore.hpp" -#include "storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwworld/class.cpp b/apps/openmw/mwworld/class.cpp index 971e056853..93009c26cb 100644 --- a/apps/openmw/mwworld/class.cpp +++ b/apps/openmw/mwworld/class.cpp @@ -8,7 +8,6 @@ #include "../mwbase/windowmanager.hpp" #include "../mwbase/world.hpp" #include "../mwworld/esmstore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "ptr.hpp" #include "nullaction.hpp" diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index 5e64e5fc28..ae0b3c584d 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -13,7 +13,6 @@ #include #include "../mwmechanics/spelllist.hpp" -#include "storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwworld/esmstore.hpp b/apps/openmw/mwworld/esmstore.hpp index 3d9168cd4b..5569b6f52a 100644 --- a/apps/openmw/mwworld/esmstore.hpp +++ b/apps/openmw/mwworld/esmstore.hpp @@ -4,9 +4,7 @@ #include #include #include -#include -#include #include #include "store.hpp" @@ -23,7 +21,6 @@ namespace MWMechanics namespace ESM { class ReadersCache; - struct Dialogue; } namespace MWWorld diff --git a/apps/openmw/mwworld/projectilemanager.cpp b/apps/openmw/mwworld/projectilemanager.cpp index 1bd21a8412..b25d867542 100644 --- a/apps/openmw/mwworld/projectilemanager.cpp +++ b/apps/openmw/mwworld/projectilemanager.cpp @@ -30,7 +30,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" #include "../mwworld/inventorystore.hpp" -#include "../mwworld/storeSpecialization.hpp" #include "../mwbase/soundmanager.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 3443913607..489f80ed20 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -43,7 +43,6 @@ #include "cellpreloader.hpp" #include "worldimp.hpp" #include "cellutils.hpp" -#include "storeSpecialization.hpp" namespace { diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 7aa5e8b659..a84f4d9de5 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -8,7 +8,6 @@ #include #include -#include "storeSpecialization.hpp" #include #include diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index d73a221092..163df76106 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -86,7 +86,6 @@ #include "contentloader.hpp" #include "esmloader.hpp" #include "cellutils.hpp" -#include "storeSpecialization.hpp" namespace MWWorld {