1
0

Fixed a bug in the inventory system where it would de-sync when dragging items with non-default metadata/health

Android: Updated VS2008 project to point to correct Android files
Android: Updated makefiles to compile CryptoPP
Android: Modified CryptoPP config.h and misc.cpp so it compiles for Android
Android: Added pretty MCServer icons

git-svn-id: http://mc-server.googlecode.com/svn/trunk@893 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth 2012-09-26 14:36:08 +00:00
parent fb9a00a64e
commit 987b6ac123
11 changed files with 22 additions and 13 deletions

View File

@ -5,7 +5,7 @@ LOCAL_MODULE := mcserver
LOCAL_SRC_FILES := $(shell find ../lua-5.1.4 ../jsoncpp-src-0.5.0 ../zlib-1.2.7 ../source ../squirrel_3_0_1_stable ../tolua++-1.0.93 ../iniFile ../WebServer '(' -name '*.cpp' -o -name '*.c' ')')
LOCAL_SRC_FILES := $(shell find ../CryptoPP ../lua-5.1.4 ../jsoncpp-src-0.5.0 ../zlib-1.2.7 ../source ../squirrel_3_0_1_stable ../tolua++-1.0.93 ../iniFile ../WebServer '(' -name '*.cpp' -o -name '*.c' ')')
LOCAL_SRC_FILES := $(filter-out %SquirrelFunctions.cpp %SquirrelBindings.cpp %cPlugin_Squirrel.cpp %cSquirrelCommandBinder.cpp %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(LOCAL_SRC_FILES))
LOCAL_SRC_FILES := $(patsubst %.cpp,../%.cpp,$(LOCAL_SRC_FILES))
LOCAL_SRC_FILES := $(patsubst %.c,../%.c,$(LOCAL_SRC_FILES))
@ -16,6 +16,8 @@ LOCAL_CFLAGS := -DANDROID_NDK \
-O3 \
-funroll-loops \
-mfloat-abi=softfp -mfpu=neon \
-fexceptions \
-D_DEBUG \
LOCAL_STATIC_LIBRARIES := cpufeatures
@ -36,6 +38,7 @@ LOCAL_C_INCLUDES := ../source \
../squirrel_3_0_1_stable/include \
../squirrel_3_0_1_stable \
../squirrel_3_0_1_stable/sqrat \
.. \
LOCAL_LDLIBS := -ldl -llog

View File

@ -1,4 +1,7 @@
# Build both ARMv5TE and ARMv7-A machine code.
APP_MODULES := mcserver
# APP_ABI := armeabi armeabi-v7a
APP_STL := stlport_static
#APP_STL := stlport_static
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti

View File

@ -10,11 +10,12 @@
#include <float.h>
#include <assert.h>
#include "cCriticalSection.h"
#include "cRoot.h"
#include "cMakeDir.h"
#include "OSSupport/CriticalSection.h"
#include "OSSupport/MakeDir.h"
#include "ToJava.h"
#include "Root.h"
#include <android/log.h>
cCriticalSection g_CriticalSection;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -243,7 +243,7 @@ NAMESPACE_END
# pragma warn -8037
#endif
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION) || defined(ANDROID_NDK)
#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
#endif

View File

@ -112,13 +112,14 @@ bool VerifyBufsEqual(const byte *buf, const byte *mask, size_t count)
return acc8 == 0;
}
#if !(defined(_MSC_VER) && (_MSC_VER < 1300))
#if !(defined(_MSC_VER) && (_MSC_VER < 1300)) && !defined(ANDROID_NDK)
using std::new_handler;
using std::set_new_handler;
#endif
void CallNewHandler()
{
#if !defined(ANDROID_NDK)
new_handler newHandler = set_new_handler(NULL);
if (newHandler)
set_new_handler(newHandler);
@ -127,6 +128,7 @@ void CallNewHandler()
newHandler();
else
throw std::bad_alloc();
#endif
}
#if CRYPTOPP_BOOL_ALIGN16_ENABLED

View File

@ -1186,7 +1186,7 @@
Name="Android Specific"
>
<File
RelativePath="..\jni\Android.mk"
RelativePath="..\Android\jni\Android.mk"
>
<FileConfiguration
Name="Debug|Win32"
@ -1214,7 +1214,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\jni\app-android.cpp"
RelativePath="..\Android\jni\app-android.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@ -1242,7 +1242,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\jni\Application.mk"
RelativePath="..\Android\jni\Application.mk"
>
<FileConfiguration
Name="Debug|Win32"
@ -1270,7 +1270,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\jni\ToJava.cpp"
RelativePath="..\Android\jni\ToJava.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@ -1298,7 +1298,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\jni\ToJava.h"
RelativePath="..\Android\jni\ToJava.h"
>
<FileConfiguration
Name="Debug|Win32"

View File

@ -61,7 +61,7 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, bool a_IsRightClick,
}
cItem Slot(*GetSlot(a_SlotNum, a_Player));
if (!Slot.IsEqual(a_ClickedItem))
if (!Slot.IsSameType(a_ClickedItem))
{
LOGD("*** Window lost sync at item %d in SlotArea with %d items ***", a_SlotNum, m_NumSlots);
LOGD("My item: %s", ItemToFullString(Slot).c_str());