1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 23:57:46 +00:00
sapphire/src/scripts/ScriptLoader.cpp.in

69 lines
1.6 KiB
C++
Raw Normal View History

2018-03-07 08:14:42 +01:00
#include <Script/NativeScriptApi.h>
#ifdef _WIN32
#include <memory>
#include <Service.h>
#endif
2018-03-07 08:14:42 +01:00
@ScriptIncludes@
const Sapphire::ScriptAPI::ScriptObject* ptrs[] =
2018-03-07 08:14:42 +01:00
{
@ScriptNames@
nullptr
};
#ifdef _WIN32
2022-02-10 18:50:44 +01:00
namespace Sapphire
{
class InstanceObjectCache;
}
namespace Sapphire::Data
{
class ExdData;
}
namespace Sapphire::World::Manager
{
class TerritoryMgr;
class LinkshellMgr;
2022-02-07 23:08:29 +01:00
class WarpMgr;
2022-02-16 13:50:10 +01:00
class RNGMgr;
}
extern "C" EXPORT void win32initRngMgr( std::shared_ptr< Sapphire::World::Manager::RNGMgr > rngMgr )
{
Sapphire::Common::Service< Sapphire::World::Manager::RNGMgr >::set( rngMgr );
}
extern "C" EXPORT void win32initExd( std::shared_ptr< Sapphire::Data::ExdData > exdData )
{
Sapphire::Common::Service< Sapphire::Data::ExdData >::set( exdData );
}
extern "C" EXPORT void win32initTeri( std::shared_ptr< Sapphire::World::Manager::TerritoryMgr > teriMgr )
{
Sapphire::Common::Service< Sapphire::World::Manager::TerritoryMgr >::set( teriMgr );
}
extern "C" EXPORT void win32initLinkshell( std::shared_ptr< Sapphire::World::Manager::LinkshellMgr > lsMgr )
{
Sapphire::Common::Service< Sapphire::World::Manager::LinkshellMgr >::set( lsMgr );
}
2022-02-07 23:08:29 +01:00
extern "C" EXPORT void win32initWarpMgr( std::shared_ptr< Sapphire::World::Manager::WarpMgr > warpMgr )
{
Sapphire::Common::Service< Sapphire::World::Manager::WarpMgr >::set( warpMgr );
}
2022-02-10 18:50:44 +01:00
extern "C" EXPORT void win32initIObjectCache( std::shared_ptr< Sapphire::InstanceObjectCache > ioCache )
{
Sapphire::Common::Service< Sapphire::InstanceObjectCache >::set( ioCache );
}
#endif
extern "C" EXPORT const Sapphire::ScriptAPI::ScriptObject** getScripts()
2018-03-07 08:14:42 +01:00
{
return ptrs;
}