ios stuff

This commit is contained in:
Vladislav Khorev 2013-02-05 20:48:00 +00:00
parent f2dca8749b
commit 4e695fe902
3 changed files with 17 additions and 14 deletions

View File

@ -1,52 +1,55 @@
#include "include/Engine.h"
#include "main_code.h"
TMyApplication App;
TMyApplication* App;
extern "C" void AppInit()
{
CreateEngine();
App = new TMyApplication;
App->OuterInit(480, 320, 480, 320);
App.OuterInit(480, 320, 480, 320);
}
extern "C" void AppDeinit()
{
App.OuterDeinit();
App->OuterDeinit();
delete App;
DestroyEngine();
}
extern "C" void AppUpdate(int dt)
{
App.OuterUpdate(dt);
App->OuterUpdate(dt);
}
extern "C" void AppDraw()
{
App.OuterDraw();
App->OuterDraw();
}
extern "C" void AppOnTapDown(int posx, int posy)
{
App.OuterOnTapDown(vec2(posx, posy));
App->OuterOnTapDown(vec2(posx, posy));
}
extern "C" void AppOnTapUp(int posx, int posy)
{
App.OuterOnTapUp(vec2(posx, posy));
App->OuterOnTapUp(vec2(posx, posy));
}
extern "C" void AppOnTapUpAfterScroll(int posx, int posy)
{
App.OuterOnTapUpAfterShift(vec2(posx, posy));
App->OuterOnTapUpAfterShift(vec2(posx, posy));
}
extern "C" void AppOnScroll(int shiftx, int shifty)
{
App.OuterOnMove(vec2(shiftx, shifty));
App->OuterOnMove(vec2(shiftx, shifty));
}

View File

@ -41,7 +41,7 @@ LOCAL_PATH:= $(LPATH)
include $(CLEAR_VARS)
LOCAL_CFLAGS := -DTARGET_ANDROID -DNOSOUND -DTARGET_SALMON -std=gnu++11 --std=c++11
LOCAL_CFLAGS := -DTARGET_ANDROID -DNOSOUND -std=gnu++11 --std=c++11
LOCAL_STATIC_LIBRARIES := boost
LOCAL_STATIC_LIBRARIES += squirrel
LOCAL_STATIC_LIBRARIES += png_lib

View File

@ -49,7 +49,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../../jni;$(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</AdditionalIncludeDirectories>
<PreprocessorDefinitions>TARGET_WIN32;TARGET_SALMON;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;DEBUG</PreprocessorDefinitions>
<PreprocessorDefinitions>TARGET_WIN32;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;DEBUG</PreprocessorDefinitions>
<DisableSpecificWarnings>4503</DisableSpecificWarnings>
</ClCompile>
<Link>
@ -65,7 +65,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>../../../jni;$(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</AdditionalIncludeDirectories>
<PreprocessorDefinitions>TARGET_WIN32;TARGET_SALMON;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;NDEBUG</PreprocessorDefinitions>
<PreprocessorDefinitions>TARGET_WIN32;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;NDEBUG</PreprocessorDefinitions>
<DisableSpecificWarnings>4503</DisableSpecificWarnings>
</ClCompile>
<Link>