double-hit-balls/ios/doublehitballs/ios_api.cpp

56 lines
891 B
C++
Raw Normal View History

2013-01-19 21:23:44 +00:00
#include "include/Engine.h"
#include "main_code.h"
2013-02-06 10:10:20 +00:00
TAndroidApplication* App;
2013-01-19 21:23:44 +00:00
extern "C" void AppInit()
{
2013-02-05 20:45:59 +00:00
CreateEngine();
2013-02-06 10:10:20 +00:00
App = new TAndroidApplication;
2013-01-19 21:23:44 +00:00
App->OuterInit(480, 320, 480, 320);
2013-02-05 20:45:59 +00:00
2013-01-19 21:23:44 +00:00
}
extern "C" void AppDeinit()
{
2013-02-05 20:45:59 +00:00
2013-01-19 21:23:44 +00:00
App->OuterDeinit();
delete App;
2013-02-05 20:45:59 +00:00
DestroyEngine();
2013-01-19 21:23:44 +00:00
}
extern "C" void AppUpdate(int dt)
{
App->OuterUpdate(dt);
}
extern "C" void AppDraw()
{
App->OuterDraw();
}
extern "C" void AppOnTapDown(int posx, int posy)
{
App->OuterOnTapDown(vec2(posx, posy));
}
extern "C" void AppOnTapUp(int posx, int posy)
{
App->OuterOnTapUp(vec2(posx, posy));
}
2013-02-05 20:45:59 +00:00
extern "C" void AppOnTapUpAfterScroll(int posx, int posy)
{
App->OuterOnTapUpAfterShift(vec2(posx, posy));
}
2013-01-19 21:23:44 +00:00
extern "C" void AppOnScroll(int shiftx, int shifty)
{
App->OuterOnMove(vec2(shiftx, shifty));
}