This commit is contained in:
Vladislav Khorev 2013-02-05 20:40:52 +00:00
parent ac98475101
commit 46b17db96e

View File

@ -1,53 +1,56 @@
#include "include/Engine.h" #include "include/Engine.h"
#include "main_code.h" #include "main_code.h"
TMyApplication App; TMyApplication* App;
extern "C" void AppInit() extern "C" void AppInit()
{ {
CreateEngine();
App = new TMyApplication;
App->OuterInit(320, 480, 320, 480);
App.OuterInit(320, 480, 320, 480);
//App.OuterInit(480, 320, 480, 320);
} }
extern "C" void AppDeinit() extern "C" void AppDeinit()
{ {
App.OuterDeinit();
App->OuterDeinit();
delete App;
DestroyEngine();
} }
extern "C" void AppUpdate(int dt) extern "C" void AppUpdate(int dt)
{ {
App.OuterUpdate(dt); App->OuterUpdate(dt);
} }
extern "C" void AppDraw() extern "C" void AppDraw()
{ {
App.OuterDraw(); App->OuterDraw();
} }
extern "C" void AppOnTapDown(int posx, int posy) 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) 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) 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) extern "C" void AppOnScroll(int shiftx, int shifty)
{ {
App.OuterOnMove(vec2(shiftx, shifty)); App->OuterOnMove(vec2(shiftx, shifty));
} }