mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Fix build
apps/openmw/mwlua/soundbindings.cpp:166:78: error: member access into incomplete type 'MWBase::World' const SoundStore* soundStore = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Sound>(); ^ apps/openmw/mwlua/../mwbase/environment.hpp:27:11: note: forward declaration of 'MWBase::World' class World; ^
This commit is contained in:
parent
4211665ede
commit
57bcb3e89d
@ -1,16 +1,15 @@
|
||||
#include "soundbindings.hpp"
|
||||
#include "luabindings.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
|
||||
#include <components/esm3/loadsoun.hpp>
|
||||
#include <components/misc/resourcehelpers.hpp>
|
||||
#include <components/vfs/pathutil.hpp>
|
||||
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
|
||||
#include "luamanagerimp.hpp"
|
||||
|
||||
namespace MWLua
|
||||
@ -161,9 +160,7 @@ namespace MWLua
|
||||
},
|
||||
[]() { return MWBase::Environment::get().getSoundManager()->sayActive(MWWorld::ConstPtr()); });
|
||||
|
||||
// Sound store
|
||||
using SoundStore = MWWorld::Store<ESM::Sound>;
|
||||
const SoundStore* soundStore = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Sound>();
|
||||
sol::usertype<SoundStore> soundStoreT = lua.new_usertype<SoundStore>("ESM3_SoundStore");
|
||||
soundStoreT[sol::meta_function::to_string]
|
||||
= [](const SoundStore& store) { return "ESM3_SoundStore{" + std::to_string(store.getSize()) + " sounds}"; };
|
||||
@ -176,7 +173,7 @@ namespace MWLua
|
||||
soundStoreT[sol::meta_function::pairs] = lua["ipairsForArray"].template get<sol::function>();
|
||||
soundStoreT[sol::meta_function::ipairs] = lua["ipairsForArray"].template get<sol::function>();
|
||||
|
||||
api["sounds"] = soundStore;
|
||||
api["sounds"] = &MWBase::Environment::get().getWorld()->getStore().get<ESM::Sound>();
|
||||
|
||||
// Sound record
|
||||
auto soundT = lua.new_usertype<ESM::Sound>("ESM3_Sound");
|
||||
|
Loading…
x
Reference in New Issue
Block a user