More fixes to get it to compile for me on Mac 10.9. Mostly just newline additions, but some of the unused variables were causing errors, so I wrapped them in #ifndef __APPLE__ calls, since I didn't know if they were going to be used in the future.
Also had to undefine TOLUA_TEMPLATE_BIND a couple of times.
This commit is contained in:
parent
71e9133e49
commit
eb3cc729d4
|
@ -90,4 +90,4 @@ private:
|
||||||
|
|
||||||
std::string md5(const std::string & str);
|
std::string md5(const std::string & str);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "DeprecatedBindings.h"
|
#include "DeprecatedBindings.h"
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
#include "Plugin.h"
|
#include "Plugin.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@ extern "C"
|
||||||
#include "lua/src/lualib.h"
|
#include "lua/src/lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
#include "Bindings.h"
|
#include "Bindings.h"
|
||||||
#include "ManualBindings.h"
|
#include "ManualBindings.h"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "ManualBindings.h"
|
#include "ManualBindings.h"
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
#include "Plugin.h"
|
#include "Plugin.h"
|
||||||
|
|
|
@ -5,4 +5,4 @@ class ManualBindings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void Bind( lua_State* tolua_S );
|
static void Bind( lua_State* tolua_S );
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,11 @@
|
||||||
|
|
||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define LUA_USE_MACOSX
|
||||||
|
#else
|
||||||
#define LUA_USE_POSIX
|
#define LUA_USE_POSIX
|
||||||
|
#endif
|
||||||
#include "PluginLua.h"
|
#include "PluginLua.h"
|
||||||
#include "../CommandOutput.h"
|
#include "../CommandOutput.h"
|
||||||
|
|
||||||
|
@ -14,6 +18,7 @@ extern "C"
|
||||||
#include "lua/src/lualib.h"
|
#include "lua/src/lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef TOLUA_TEMPLATE_BIND
|
||||||
#include "tolua++/include/tolua++.h"
|
#include "tolua++/include/tolua++.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -110,4 +110,4 @@ AString cWebPlugin::SafeString( const AString & a_String )
|
||||||
RetVal.push_back( c );
|
RetVal.push_back( c );
|
||||||
}
|
}
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
const int CYCLE_MILLISECONDS = 100;
|
const int CYCLE_MILLISECONDS = 100;
|
||||||
|
|
||||||
/// When the number of cycles for the same world age hits this value, it is considered a deadlock
|
/// When the number of cycles for the same world age hits this value, it is considered a deadlock
|
||||||
|
#ifndef __APPLE__
|
||||||
const int NUM_CYCLES_LIMIT = 200; // 200 = twenty seconds
|
const int NUM_CYCLES_LIMIT = 200; // 200 = twenty seconds
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,5 +122,3 @@ void cBoat::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
|
||||||
|
|
||||||
AddSpeed(ToAddSpeed);
|
AddSpeed(ToAddSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,4 +42,4 @@ protected:
|
||||||
|
|
||||||
/** The number of ticks that the entity has existed / timer between collect and destroy; in msec */
|
/** The number of ticks that the entity has existed / timer between collect and destroy; in msec */
|
||||||
float m_Timer;
|
float m_Timer;
|
||||||
} ; // tolua_export
|
} ; // tolua_export
|
||||||
|
|
|
@ -38,4 +38,4 @@ void cGroup::InheritFrom( cGroup* a_Group )
|
||||||
void cGroup::ClearPermission()
|
void cGroup::ClearPermission()
|
||||||
{
|
{
|
||||||
m_Permissions.clear();
|
m_Permissions.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,4 +53,4 @@ void cBlaze::Attack(float a_Dt)
|
||||||
m_AttackInterval = 0.0;
|
m_AttackInterval = 0.0;
|
||||||
// ToDo: Shoot 3 fireballs instead of 1.
|
// ToDo: Shoot 3 fireballs instead of 1.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,3 @@ public:
|
||||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
||||||
virtual void Attack(float a_Dt) override;
|
virtual void Attack(float a_Dt) override;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -88,4 +88,4 @@ void cSkeleton::Attack(float a_Dt)
|
||||||
m_World->BroadcastSpawnEntity(*Arrow);
|
m_World->BroadcastSpawnEntity(*Arrow);
|
||||||
m_AttackInterval = 0.0;
|
m_AttackInterval = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ AString GetOSErrorString( int a_ErrNo )
|
||||||
|
|
||||||
// According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r():
|
// According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r():
|
||||||
|
|
||||||
#if ( _GNU_SOURCE ) && !defined(ANDROID_NDK) // GNU version of strerror_r()
|
#if !defined(__APPLE__) && ( _GNU_SOURCE ) && !defined(ANDROID_NDK) // GNU version of strerror_r()
|
||||||
|
|
||||||
char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer) );
|
char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer) );
|
||||||
if( res != NULL )
|
if( res != NULL )
|
||||||
|
|
|
@ -59,9 +59,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
/// Up to this many m_SpreadQueue elements are handled each world tick
|
/// Up to this many m_SpreadQueue elements are handled each world tick
|
||||||
const int MAX_LIGHTING_SPREAD_PER_TICK = 10;
|
const int MAX_LIGHTING_SPREAD_PER_TICK = 10;
|
||||||
|
#endif
|
||||||
|
|
||||||
const int TIME_SUNSET = 12000;
|
const int TIME_SUNSET = 12000;
|
||||||
const int TIME_NIGHT_START = 13187;
|
const int TIME_NIGHT_START = 13187;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user