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

49 lines
769 B
C++
Raw Normal View History

2013-01-19 21:23:44 +00:00
#include "include/Engine.h"
#include "main_code.h"
TAndroidApplication* App = NULL;
extern "C" void AppInit()
{
App = new TAndroidApplication;
//App->OuterInit(320, 480, 320, 480);
App->OuterInit(480, 320, 480, 320);
}
extern "C" void AppDeinit()
{
App->OuterDeinit();
delete App;
}
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));
}
extern "C" void AppOnScroll(int shiftx, int shifty)
{
App->OuterOnMove(vec2(shiftx, shifty));
}