diff --git a/ios/doublehitballs/ios_api.cpp b/ios/doublehitballs/ios_api.cpp index 334c19c..b951083 100644 --- a/ios/doublehitballs/ios_api.cpp +++ b/ios/doublehitballs/ios_api.cpp @@ -1,21 +1,24 @@ #include "include/Engine.h" #include "main_code.h" -TAndroidApplication* App = NULL; +TMyApplication* App; extern "C" void AppInit() { - App = new TAndroidApplication; - //App->OuterInit(320, 480, 320, 480); + CreateEngine(); + App = new TMyApplication; App->OuterInit(480, 320, 480, 320); + } - extern "C" void AppDeinit() { + App->OuterDeinit(); delete App; + DestroyEngine(); + } @@ -41,9 +44,12 @@ extern "C" void AppOnTapUp(int posx, int posy) App->OuterOnTapUp(vec2(posx, posy)); } +extern "C" void AppOnTapUpAfterScroll(int posx, int posy) +{ + App->OuterOnTapUpAfterShift(vec2(posx, posy)); +} + extern "C" void AppOnScroll(int shiftx, int shifty) { App->OuterOnMove(vec2(shiftx, shifty)); } - - diff --git a/jni/Android.mk b/jni/Android.mk index 4b26ef4..53c2935 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -33,7 +33,7 @@ ZIP_PATH = $(LibsPathCygwin)/julienr-libzip-android/jni #====== ENGINE AND LIBS ===================== -include $(ENGINE_PATH)/Android_Engine.mk +include $(ENGINE_PATH)/Android_Salmon_Engine.mk #================= THE GAME ======================= @@ -42,12 +42,13 @@ LOCAL_PATH:= $(LPATH) include $(CLEAR_VARS) -LOCAL_CFLAGS := -DTARGET_ANDROID -DTARGET_HALIBUT -std=gnu++11 +LOCAL_CFLAGS := -DTARGET_ANDROID -std=gnu++11 --std=c++11 LOCAL_STATIC_LIBRARIES := boost LOCAL_STATIC_LIBRARIES += squirrel LOCAL_STATIC_LIBRARIES += png_lib LOCAL_STATIC_LIBRARIES += zip -LOCAL_SHARED_LIBRARIES := HalibutEngine +LOCAL_SHARED_LIBRARIES := SalmonEngine +LOCAL_SHARED_LIBRARIES += gnustl_shared LOCAL_C_INCLUDES := $(ENGINE_PATH) LOCAL_C_INCLUDES += $(BOOST_PATH) LOCAL_C_INCLUDES += $(VORBIS_PATH)/include diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe index 380d149..0974c55 100644 Binary files a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe differ diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp index 50db9fe..6840512 100644 Binary files a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp differ diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib index 05e3423..4eb16f1 100644 Binary files a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib differ diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj index 91f28aa..cfa9eb0 100644 --- a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj @@ -53,7 +53,7 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;TARGET_WIN32;TARGET_SALMON;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(SalmonEnginePath);$(LibsPath)\boost_1_52_0;$(LibsPath)\libogg-1.3.0\include;$(LibsPath)\libvorbis-1.3.2\include;$(LibsPath)\sqplus\sqplus;$(LibsPath)\sqplus\include;$(LibsPath)\DirectXsdk\Include;$(LibsPath)\lpng1510;$(SolutionDir)\..\..\jni; 4503 @@ -72,7 +72,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;TARGET_SALMON;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(SalmonEnginePath);$(LibsPath)\boost_1_52_0;$(LibsPath)\libogg-1.3.0\include;$(LibsPath)\libvorbis-1.3.2\include;$(LibsPath)\sqplus\sqplus;$(LibsPath)\sqplus\include;$(LibsPath)\DirectXsdk\Include;$(LibsPath)\lpng1510;$(SolutionDir)\..\..\jni; 4503