engine/Templates/SalmonUniversalTemplate/iOS/ios_api.cpp

56 lines
881 B
C++
Raw Normal View History

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