//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
| 781 | ///////////////////////////////////////////////////////////////////////////////// |
| 782 | ///////////////////////////////////////////////////////////////////////////////// |
| 783 | bool CSystem::InitScriptSystem() |
| 784 | { |
| 785 | #ifndef _XBOX |
| 786 | #if defined(LINUX) |
| 787 | m_dll.hScript = LoadDLL("cryscriptsystem.so"); |
| 788 | #else |
| 789 | m_dll.hScript = LoadDLL("CryScriptSystem.dll"); |
| 790 | #endif |
| 791 | if(m_dll.hScript==NULL) |
| 792 | return (false); |
| 793 | |
| 794 | CREATESCRIPTSYSTEM_FNCPTR fncCreateScriptSystem; |
| 795 | fncCreateScriptSystem = (CREATESCRIPTSYSTEM_FNCPTR) CryGetProcAddress(m_dll.hScript,"CreateScriptSystem"); |
| 796 | if(fncCreateScriptSystem==NULL) |
| 797 | { |
| 798 | Error( "Error initializeing ScriptSystem" ); |
| 799 | return (false); |
| 800 | } |
| 801 | |
| 802 | m_pScriptSink = new CScriptSink(this,m_pConsole); |
| 803 | m_pScriptSystem=fncCreateScriptSystem(this,m_pScriptSink,NULL,true); |
| 804 | if(m_pScriptSystem==NULL) |
| 805 | { |
| 806 | Error( "Error initializeing ScriptSystem" ); |
| 807 | delete m_pScriptSink; |
| 808 | m_pScriptSink = NULL; |
| 809 | return (false); |
| 810 | } |
| 811 | #else |
| 812 | m_pScriptSink = new CScriptSink(this,m_pConsole); |
| 813 | m_pScriptSystem=CreateScriptSystem(m_pScriptSink,NULL,true); |
| 814 | if (m_pScriptSystem==NULL) |
| 815 | { |
| 816 | Error( "Error initializeing ScriptSystem" ); |
| 817 | delete m_pScriptSink; |
| 818 | m_pScriptSink = NULL; |
| 819 | return (false); |
| 820 | } |
| 821 | #endif |
| 822 | |
| 823 | if (m_pScriptSink) |
| 824 | m_pScriptSink->Init(); |
| 825 | |
| 826 | assert( m_pConsole ); |
| 827 | //@HACK! |
| 828 | ((CXConsole*)m_pConsole)->SetScriptSystem(m_pScriptSystem); |
| 829 | |
| 830 | m_pScriptSystem->PostInit(); |
| 831 | |
| 832 | return (true); |
| 833 | } |
| 834 | |
| 835 | ///////////////////////////////////////////////////////////////////////////////// |
| 836 | bool CSystem::InitFileSystem() |
nothing calls this directly
no test coverage detected