mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
Use forward declaration for context and sol
This commit is contained in:
parent
eeca0b13b0
commit
e87b95f642
@ -3,10 +3,10 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initBirthSignRecordBindings(const Context& context);
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#ifndef MWLUA_CELLBINDINGS_H
|
||||
#define MWLUA_CELLBINDINGS_H
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
void initCellBindingsForLocalScripts(const Context&);
|
||||
void initCellBindingsForGlobalScripts(const Context&);
|
||||
struct Context;
|
||||
|
||||
void initCellBindingsForLocalScripts(const Context& context);
|
||||
void initCellBindingsForGlobalScripts(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_CELLBINDINGS_H
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initClassRecordBindings(const Context& context);
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "../mwworld/datetimemanager.hpp"
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "coremwscriptbindings.hpp"
|
||||
#include "dialoguebindings.hpp"
|
||||
#include "factionbindings.hpp"
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
void addCoreTimeBindings(sol::table& api, const Context& context);
|
||||
|
||||
sol::table initCorePackage(const Context&);
|
||||
sol::table initCorePackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_COREBINDINGS_H
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef OPENMW_MWLUA_DEBUGBINDINGS_H
|
||||
#define OPENMW_MWLUA_DEBUGBINDINGS_H
|
||||
|
||||
#include <sol/sol.hpp>
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initCoreFactionBindings(const Context& context);
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwinput/actions.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "luamanagerimp.hpp"
|
||||
|
||||
namespace sol
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initInputPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initInputPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_INPUTBINDINGS_H
|
||||
|
@ -1,14 +1,24 @@
|
||||
#include "landbindings.hpp"
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
|
||||
#include <sol/object.hpp>
|
||||
#include <sol/table.hpp>
|
||||
#include <sol/variadic_results.hpp>
|
||||
|
||||
#include <components/esm/refid.hpp>
|
||||
#include <components/esm/util.hpp>
|
||||
#include <components/esmterrain/storage.hpp>
|
||||
#include <components/lua/luastate.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwworld/worldmodel.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "object.hpp"
|
||||
|
||||
namespace
|
||||
|
@ -1,10 +1,12 @@
|
||||
#ifndef MWLUA_LANDBINDINGS_H
|
||||
#define MWLUA_LANDBINDINGS_H
|
||||
|
||||
#include "context.hpp"
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initCoreLandBindings(const Context& context);
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,30 @@
|
||||
#ifndef MWLUA_LUABINDINGS_H
|
||||
#define MWLUA_LUABINDINGS_H
|
||||
|
||||
#include <map>
|
||||
#include <sol/forward.hpp>
|
||||
#include <string>
|
||||
|
||||
#include "context.hpp"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
// Initialize Lua packages that are available for all scripts.
|
||||
std::map<std::string, sol::object> initCommonPackages(const Context&);
|
||||
std::map<std::string, sol::object> initCommonPackages(const Context& context);
|
||||
|
||||
// Initialize Lua packages that are available for global scripts (additionally to common packages).
|
||||
std::map<std::string, sol::object> initGlobalPackages(const Context&);
|
||||
std::map<std::string, sol::object> initGlobalPackages(const Context& context);
|
||||
|
||||
// Initialize Lua packages that are available for local scripts (additionally to common packages).
|
||||
std::map<std::string, sol::object> initLocalPackages(const Context&);
|
||||
std::map<std::string, sol::object> initLocalPackages(const Context& context);
|
||||
|
||||
// Initialize Lua packages that are available only for local scripts on the player (additionally to common and local
|
||||
// packages).
|
||||
std::map<std::string, sol::object> initPlayerPackages(const Context&);
|
||||
std::map<std::string, sol::object> initPlayerPackages(const Context& context);
|
||||
|
||||
// Initialize Lua packages that are available only for menu scripts (additionally to common packages).
|
||||
std::map<std::string, sol::object> initMenuPackages(const Context&);
|
||||
std::map<std::string, sol::object> initMenuPackages(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_LUABINDINGS_H
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initCoreMagicBindings(const Context& context);
|
||||
void addActorMagicBindings(sol::table& actor, const Context& context);
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initMarkupPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initMarkupPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_MARKUPBINDINGS_H
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "../mwbase/statemanager.hpp"
|
||||
#include "../mwstate/character.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
static const MWState::Character* findCharacter(std::string_view characterDir)
|
||||
|
@ -9,11 +9,11 @@
|
||||
|
||||
#include "../mwbase/luamanager.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "inputprocessor.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initMenuPackage(const Context& context);
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwworld/worldimp.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "object.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
@ -3,13 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initMWScriptBindings(const Context&);
|
||||
|
||||
sol::table initMWScriptBindings(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_MWSCRIPTBINDINGS_H
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/scene.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "luamanagerimp.hpp"
|
||||
#include "objectlists.hpp"
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initNearbyPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initNearbyPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_NEARBYBINDINGS_H
|
||||
|
@ -1,12 +1,12 @@
|
||||
#ifndef MWLUA_OBJECTBINDINGS_H
|
||||
#define MWLUA_OBJECTBINDINGS_H
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
void initObjectBindingsForLocalScripts(const Context&);
|
||||
void initObjectBindingsForGlobalScripts(const Context&);
|
||||
struct Context;
|
||||
|
||||
void initObjectBindingsForLocalScripts(const Context& context);
|
||||
void initObjectBindingsForGlobalScripts(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_OBJECTBINDINGS_H
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwrender/postprocessor.hpp"
|
||||
|
||||
#include "context.hpp"
|
||||
#include "luamanagerimp.hpp"
|
||||
|
||||
namespace
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initPostprocessingPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initPostprocessingPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_POSTPROCESSINGBINDINGS_H
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
struct Context;
|
||||
|
||||
sol::table initRaceRecordBindings(const Context& context);
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initCoreSoundBindings(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initCoreSoundBindings(const Context& context);
|
||||
|
||||
sol::table initAmbientPackage(const Context& context);
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initUserInterfacePackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initUserInterfacePackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_UIBINDINGS_H
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initVFSPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initVFSPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_VFSBINDINGS_H
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "luamanagerimp.hpp"
|
||||
|
||||
#include "animationbindings.hpp"
|
||||
#include "context.hpp"
|
||||
#include "corebindings.hpp"
|
||||
#include "mwscriptbindings.hpp"
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include <sol/forward.hpp>
|
||||
|
||||
#include "context.hpp"
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
sol::table initWorldPackage(const Context&);
|
||||
struct Context;
|
||||
|
||||
sol::table initWorldPackage(const Context& context);
|
||||
}
|
||||
|
||||
#endif // MWLUA_WORLDBINDINGS_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user