ios stuff

This commit is contained in:
vladislav.khorev committed 2013-02-05 20:48:00 +00:00
1 parent f2dca8749b
commit 4e695fe902
3 files changed
+17 -14

No files matched your search

@@ -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));
}