| 94 | } |
| 95 | |
| 96 | Sapphire::ScriptAPI::ScriptObject** Sapphire::Scripting::ScriptLoader::getScripts( ModuleHandle handle ) |
| 97 | { |
| 98 | using getScripts = Sapphire::ScriptAPI::ScriptObject** ( * )(); |
| 99 | |
| 100 | #ifdef _WIN32 |
| 101 | getScripts func = reinterpret_cast< getScripts >( GetProcAddress( handle, "getScripts" ) ); |
| 102 | #else |
| 103 | getScripts func = reinterpret_cast< getScripts >( dlsym( handle, "getScripts" ) ); |
| 104 | #endif |
| 105 | |
| 106 | if( func ) |
| 107 | { |
| 108 | auto ptr = func(); |
| 109 | |
| 110 | return ptr; |
| 111 | } |
| 112 | else |
| 113 | return nullptr; |
| 114 | } |
| 115 | |
| 116 | bool Sapphire::Scripting::ScriptLoader::unloadScript( Sapphire::Scripting::ScriptInfo* info ) |
| 117 | { |