Skip to content

Commit

Permalink
Merge branch 'floragato' into 'master'
Browse files Browse the repository at this point in the history
Place ESM4::Flora instances to the scene

See merge request OpenMW/openmw!3446
  • Loading branch information
psi29a committed Sep 24, 2023
2 parents 6707599 + 7e360df commit 7b8abc7
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
2 changes: 2 additions & 0 deletions apps/openmw/mwclass/classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadflor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
Expand Down Expand Up @@ -78,6 +79,7 @@ namespace MWClass
ESM4Named<ESM4::Clothing>::registerSelf();
ESM4Named<ESM4::Container>::registerSelf();
ESM4Named<ESM4::Door>::registerSelf();
ESM4Named<ESM4::Flora>::registerSelf();
ESM4Named<ESM4::Furniture>::registerSelf();
ESM4Named<ESM4::Ingredient>::registerSelf();
ESM4Named<ESM4::MiscItem>::registerSelf();
Expand Down
4 changes: 4 additions & 0 deletions apps/openmw/mwlua/cellbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <components/esm4/loadclot.hpp>
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadflor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
Expand Down Expand Up @@ -220,6 +221,9 @@ namespace MWLua
case ESM::REC_DOOR4:
cell.mStore->template forEachType<ESM4::Door>(visitor);
break;
case ESM::REC_FLOR4:
cell.mStore->template forEachType<ESM4::Flora>(visitor);
break;
case ESM::REC_FURN4:
cell.mStore->template forEachType<ESM4::Furniture>(visitor);
break;
Expand Down
3 changes: 3 additions & 0 deletions apps/openmw/mwlua/types/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace MWLua
constexpr std::string_view ESM4Clothing = "ESM4Clothing";
constexpr std::string_view ESM4Container = "ESM4Container";
constexpr std::string_view ESM4Door = "ESM4Door";
constexpr std::string_view ESM4Flora = "ESM4Flora";
constexpr std::string_view ESM4Furniture = "ESM4Furniture";
constexpr std::string_view ESM4Ingredient = "ESM4Ingredient";
constexpr std::string_view ESM4Light = "ESM4Light";
Expand Down Expand Up @@ -85,6 +86,7 @@ namespace MWLua
{ ESM::REC_CLOT4, ObjectTypeName::ESM4Clothing },
{ ESM::REC_CONT4, ObjectTypeName::ESM4Container },
{ ESM::REC_DOOR4, ObjectTypeName::ESM4Door },
{ ESM::REC_FLOR4, ObjectTypeName::ESM4Flora },
{ ESM::REC_FURN4, ObjectTypeName::ESM4Furniture },
{ ESM::REC_INGR4, ObjectTypeName::ESM4Ingredient },
{ ESM::REC_LIGH4, ObjectTypeName::ESM4Light },
Expand Down Expand Up @@ -223,6 +225,7 @@ namespace MWLua
addType(ObjectTypeName::ESM4Clothing, { ESM::REC_CLOT4 });
addType(ObjectTypeName::ESM4Container, { ESM::REC_CONT4 });
addESM4DoorBindings(addType(ObjectTypeName::ESM4Door, { ESM::REC_DOOR4 }, ObjectTypeName::Lockable), context);
addType(ObjectTypeName::ESM4Flora, { ESM::REC_FLOR4 });
addType(ObjectTypeName::ESM4Furniture, { ESM::REC_FURN4 });
addType(ObjectTypeName::ESM4Ingredient, { ESM::REC_INGR4 });
addType(ObjectTypeName::ESM4Light, { ESM::REC_LIGH4 });
Expand Down
1 change: 1 addition & 0 deletions apps/openmw/mwworld/cellstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadflor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadingr.hpp>
#include <components/esm4/loadligh.hpp>
Expand Down
3 changes: 2 additions & 1 deletion apps/openmw/mwworld/cellstore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ namespace ESM4
struct Container;
struct Door;
struct Furniture;
struct Flora;
struct Ingredient;
struct MiscItem;
struct Terminal;
Expand All @@ -93,7 +94,7 @@ namespace MWWorld

CellRefList<ESM4::Static>, CellRefList<ESM4::Light>, CellRefList<ESM4::Activator>, CellRefList<ESM4::Potion>,
CellRefList<ESM4::Ammunition>, CellRefList<ESM4::Armor>, CellRefList<ESM4::Book>, CellRefList<ESM4::Clothing>,
CellRefList<ESM4::Container>, CellRefList<ESM4::Door>, CellRefList<ESM4::Ingredient>,
CellRefList<ESM4::Container>, CellRefList<ESM4::Door>, CellRefList<ESM4::Flora>, CellRefList<ESM4::Ingredient>,
CellRefList<ESM4::Terminal>, CellRefList<ESM4::Tree>, CellRefList<ESM4::MiscItem>, CellRefList<ESM4::Weapon>,
CellRefList<ESM4::Furniture>, CellRefList<ESM4::Creature>, CellRefList<ESM4::Npc>>;

Expand Down
1 change: 1 addition & 0 deletions apps/openmw/mwworld/esmstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ namespace MWWorld
case ESM::REC_CONT4:
case ESM::REC_CREA4:
case ESM::REC_DOOR4:
case ESM::REC_FLOR4:
case ESM::REC_FURN4:
case ESM::REC_INGR4:
case ESM::REC_LIGH4:
Expand Down
12 changes: 7 additions & 5 deletions apps/openmw/mwworld/esmstore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ namespace ESM4
struct Container;
struct Creature;
struct Door;
struct Flora;
struct Furniture;
struct Hair;
struct HeadPart;
Expand Down Expand Up @@ -136,11 +137,12 @@ namespace MWWorld

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::Terminal>, Store<ESM4::Tree>, Store<ESM4::Weapon>, Store<ESM4::World>>;
Store<ESM4::Container>, Store<ESM4::Creature>, Store<ESM4::Door>, Store<ESM4::Furniture>,
Store<ESM4::Flora>, 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::Terminal>, Store<ESM4::Tree>, Store<ESM4::Weapon>,
Store<ESM4::World>>;

private:
template <typename T>
Expand Down
1 change: 1 addition & 0 deletions apps/openmw/mwworld/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,7 @@ 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::Flora>;
template class MWWorld::TypedDynamicStore<ESM4::Furniture>;
template class MWWorld::TypedDynamicStore<ESM4::Hair>;
template class MWWorld::TypedDynamicStore<ESM4::HeadPart>;
Expand Down
1 change: 1 addition & 0 deletions components/esm/records.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <components/esm4/loadcont.hpp>
#include <components/esm4/loadcrea.hpp>
#include <components/esm4/loaddoor.hpp>
#include <components/esm4/loadflor.hpp>
#include <components/esm4/loadfurn.hpp>
#include <components/esm4/loadhair.hpp>
#include <components/esm4/loadhdpt.hpp>
Expand Down
3 changes: 3 additions & 0 deletions files/lua_api/openmw/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,9 @@
--- Functions for @{#ESM4Door} objects
-- @field [parent=#types] #ESM4Door ESM4Door

--- Functions for @{#ESM4Flora} objects
-- @field [parent=#types] #ESM4Flora ESM4Flora

--- Functions for @{#ESM4Terminal} objects
-- @field [parent=#types] #ESM4Terminal ESM4Terminal

Expand Down

0 comments on commit 7b8abc7

Please sign in to comment.