66// Description : Precompiled header creatore
77// //////////////////////////////////////////////////////////////////////////
88
9- #include " pch_script .h"
9+ #include " stdafx .h"
1010#include " xrSE_Factory.h"
1111#include " ai_space.h"
1212#include " xrScriptEngine/script_engine.hpp"
1313#include " object_factory.h"
14- #include " xrEProps.h"
1514#include " xrSE_Factory_import_export.h"
1615#include " script_properties_list_helper.h"
16+ #include " xrCore/ModuleLookup.hpp"
1717
1818#include " character_info.h"
1919#include " specific_character.h"
2020
2121extern CSE_Abstract* F_entity_Create (LPCSTR section);
2222
2323extern CScriptPropertiesListHelper* g_property_list_helper;
24- extern HMODULE prop_helper_module;
24+ extern std::unique_ptr<XRay::Module> prop_helper_module;
2525
2626extern " C" {
2727FACTORY_API IServerEntity* __stdcall create_entity (LPCSTR section) { return F_entity_Create (section); }
@@ -33,11 +33,14 @@ FACTORY_API void __stdcall destroy_entity(IServerEntity*& abstract)
3333}
3434};
3535
36+ // !!!!!!! Very ugly fix !!!!!!!
37+ XRay::ScriptExporter::Node* XRay::ScriptExporter::Node::firstNode;
38+ XRay::ScriptExporter::Node* XRay::ScriptExporter::Node::lastNode;
39+ size_t XRay::ScriptExporter::Node::nodeCount;
40+
3641// typedef void DUMMY_STUFF (const void*,const u32&,void*);
3742// XRCORE_API DUMMY_STUFF *g_temporary_stuff;
3843
39- void setup_luabind_allocator ();
40-
4144// #define TRIVIAL_ENCRYPTOR_DECODER
4245
4346BOOL APIENTRY DllMain (HANDLE module_handle, DWORD call_reason, LPVOID reserved)
@@ -53,8 +56,6 @@ BOOL APIENTRY DllMain(HANDLE module_handle, DWORD call_reason, LPVOID reserved)
5356 FS.update_path (SYSTEM_LTX, " $game_config$" , " system.ltx" );
5457 pSettings = new CInifile (SYSTEM_LTX);
5558
56- setup_luabind_allocator ();
57-
5859 CCharacterInfo::InitInternal ();
5960 CSpecificCharacter::InitInternal ();
6061
@@ -74,7 +75,7 @@ BOOL APIENTRY DllMain(HANDLE module_handle, DWORD call_reason, LPVOID reserved)
7475 xr_delete (g_ai_space);
7576 xr_delete (g_object_factory);
7677 if (prop_helper_module)
77- FreeLibrary ( prop_helper_module);
78+ prop_helper_module-> close ( );
7879 Core._destroy ();
7980 break ;
8081 }
0 commit comments