Windows compilation fix after Android changes
git-svn-id: http://mc-server.googlecode.com/svn/trunk@742 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
d21e4dacf7
commit
1c4c0b5698
@ -8,15 +8,17 @@
|
|||||||
#include "cItem.h"
|
#include "cItem.h"
|
||||||
#include "cRoot.h"
|
#include "cRoot.h"
|
||||||
#include "cLuaCommandBinder.h"
|
#include "cLuaCommandBinder.h"
|
||||||
#if USE_SQUIRREL
|
|
||||||
# include "cPlugin_Squirrel.h"
|
#ifdef USE_SQUIRREL
|
||||||
# include "cSquirrelCommandBinder.h"
|
#include "cPlugin_Squirrel.h"
|
||||||
|
#include "cSquirrelCommandBinder.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
#include "tolua++.h"
|
#include "tolua++.h"
|
||||||
#include "cPlayer.h"
|
#include "cPlayer.h"
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
#include "squirrelbindings/SquirrelBindings.h"
|
#include "squirrelbindings/SquirrelBindings.h"
|
||||||
#include "squirrelbindings/SquirrelFunctions.h"
|
#include "squirrelbindings/SquirrelFunctions.h"
|
||||||
#pragma warning(disable:4100;disable:4127;disable:4510;disable:4610;disable:4244;disable:4512) // Getting A LOT of these warnings from SqPlus
|
#pragma warning(disable:4100;disable:4127;disable:4510;disable:4610;disable:4244;disable:4512) // Getting A LOT of these warnings from SqPlus
|
||||||
@ -40,7 +42,7 @@ cPluginManager* cPluginManager::GetPluginManager()
|
|||||||
|
|
||||||
cPluginManager::cPluginManager()
|
cPluginManager::cPluginManager()
|
||||||
: m_LuaCommandBinder( new cLuaCommandBinder() )
|
: m_LuaCommandBinder( new cLuaCommandBinder() )
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
, m_SquirrelCommandBinder( new cSquirrelCommandBinder() )
|
, m_SquirrelCommandBinder( new cSquirrelCommandBinder() )
|
||||||
#endif
|
#endif
|
||||||
, m_bReloadPlugins(false)
|
, m_bReloadPlugins(false)
|
||||||
@ -56,7 +58,7 @@ cPluginManager::~cPluginManager()
|
|||||||
UnloadPluginsNow();
|
UnloadPluginsNow();
|
||||||
|
|
||||||
delete m_LuaCommandBinder;
|
delete m_LuaCommandBinder;
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
delete m_SquirrelCommandBinder;
|
delete m_SquirrelCommandBinder;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -80,7 +82,7 @@ void cPluginManager::ReloadPluginsNow()
|
|||||||
m_bReloadPlugins = false;
|
m_bReloadPlugins = false;
|
||||||
UnloadPluginsNow();
|
UnloadPluginsNow();
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
CloseSquirrelVM();
|
CloseSquirrelVM();
|
||||||
OpenSquirrelVM();
|
OpenSquirrelVM();
|
||||||
#endif // USE_SQUIRREL
|
#endif // USE_SQUIRREL
|
||||||
@ -130,7 +132,7 @@ void cPluginManager::ReloadPluginsNow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
else if( ValueName.compare("Squirrel") == 0 ) // Squirrel plugin
|
else if( ValueName.compare("Squirrel") == 0 ) // Squirrel plugin
|
||||||
{
|
{
|
||||||
AString PluginFile = IniFile.GetValue(KeyNum, i );
|
AString PluginFile = IniFile.GetValue(KeyNum, i );
|
||||||
@ -202,7 +204,7 @@ bool cPluginManager::CallHook(PluginHook a_Hook, unsigned int a_NumArgs, ...)
|
|||||||
cPlayer * Player = va_arg(argptr, cPlayer * );
|
cPlayer * Player = va_arg(argptr, cPlayer * );
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
if (m_SquirrelCommandBinder->HandleCommand( std::string( Message ), Player))
|
if (m_SquirrelCommandBinder->HandleCommand( std::string( Message ), Player))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -689,7 +691,7 @@ void cPluginManager::RemovePlugin( cPlugin* a_Plugin, bool a_bDelete /* = false
|
|||||||
if( a_bDelete )
|
if( a_bDelete )
|
||||||
{
|
{
|
||||||
m_LuaCommandBinder->RemoveBindingsForPlugin( a_Plugin );
|
m_LuaCommandBinder->RemoveBindingsForPlugin( a_Plugin );
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
m_SquirrelCommandBinder->RemoveBindingsForPlugin( a_Plugin );
|
m_SquirrelCommandBinder->RemoveBindingsForPlugin( a_Plugin );
|
||||||
#endif
|
#endif
|
||||||
m_Plugins.remove( a_Plugin );
|
m_Plugins.remove( a_Plugin );
|
||||||
|
@ -16,12 +16,13 @@
|
|||||||
#include "cRedstone.h"
|
#include "cRedstone.h"
|
||||||
#include "blocks/Block.h"
|
#include "blocks/Block.h"
|
||||||
#include "items/Item.h"
|
#include "items/Item.h"
|
||||||
#if USE_SQUIRREL
|
|
||||||
#include "squirrelbindings/SquirrelFunctions.h"
|
|
||||||
#include "squirrelbindings/SquirrelBindings.h"
|
|
||||||
#endif
|
|
||||||
#include "cChunk.h"
|
#include "cChunk.h"
|
||||||
|
|
||||||
|
#ifdef USE_SQUIRREL
|
||||||
|
#include "squirrelbindings/SquirrelFunctions.h"
|
||||||
|
#include "squirrelbindings/SquirrelBindings.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../iniFile/iniFile.h"
|
#include "../iniFile/iniFile.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -177,7 +178,7 @@ void cRoot::Start()
|
|||||||
delete m_PluginManager; m_PluginManager = 0; // This should be first
|
delete m_PluginManager; m_PluginManager = 0; // This should be first
|
||||||
|
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
CloseSquirrelVM();
|
CloseSquirrelVM();
|
||||||
#endif
|
#endif
|
||||||
LOG("Freeing MonsterConfig...");
|
LOG("Freeing MonsterConfig...");
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
using namespace Sqrat;
|
using namespace Sqrat;
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
void BindSquirrel(HSQUIRRELVM vm)
|
void BindSquirrel(HSQUIRRELVM vm)
|
||||||
{
|
{
|
||||||
RootTable()
|
RootTable()
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#define USE_SQUIRREL 0
|
#ifdef USE_SQUIRREL
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
|
||||||
|
|
||||||
#include <squirrel.h>
|
#include <squirrel.h>
|
||||||
#include <sqrat.h>
|
#include <sqrat.h>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "SquirrelBindings.h"
|
#include "SquirrelBindings.h"
|
||||||
|
|
||||||
|
|
||||||
#if USE_SQUIRREL
|
#ifdef USE_SQUIRREL
|
||||||
|
|
||||||
static HSQUIRRELVM squirrelvm = NULL;
|
static HSQUIRRELVM squirrelvm = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user