tunnel/iOS/ios_api.cpp

57 lines
883 B
C++
Raw Normal View History

2013-01-23 20:14:11 +00:00
#include "include/Engine.h"
#include "main_code.h"
2013-02-05 20:40:52 +00:00
TMyApplication* App;
2013-01-23 20:14:11 +00:00
extern "C" void AppInit()
{
2013-02-05 20:40:52 +00:00
CreateEngine();
App = new TMyApplication;
App->OuterInit(320, 480, 320, 480);
2013-01-23 20:14:11 +00:00
}
extern "C" void AppDeinit()
{
2013-02-05 20:40:52 +00:00
App->OuterDeinit();
delete App;
DestroyEngine();
2013-01-23 20:14:11 +00:00
}
extern "C" void AppUpdate(int dt)
{
2013-02-05 20:40:52 +00:00
App->OuterUpdate(dt);
2013-01-23 20:14:11 +00:00
}
extern "C" void AppDraw()
{
2013-02-05 20:40:52 +00:00
App->OuterDraw();
2013-01-23 20:14:11 +00:00
}
extern "C" void AppOnTapDown(int posx, int posy)
{
2013-02-05 20:40:52 +00:00
App->OuterOnTapDown(vec2(posx, posy));
2013-01-23 20:14:11 +00:00
}
extern "C" void AppOnTapUp(int posx, int posy)
{
2013-02-05 20:40:52 +00:00
App->OuterOnTapUp(vec2(posx, posy));
2013-01-29 20:38:43 +00:00
}
extern "C" void AppOnTapUpAfterScroll(int posx, int posy)
{
2013-02-05 20:40:52 +00:00
App->OuterOnTapUpAfterShift(vec2(posx, posy));
2013-01-23 20:14:11 +00:00
}
extern "C" void AppOnScroll(int shiftx, int shifty)
{
2013-02-05 20:40:52 +00:00
App->OuterOnMove(vec2(shiftx, shifty));
2013-01-23 20:14:11 +00:00
}