2017-01-10 12:43:06 +00:00
|
|
|
#ifndef MAIN_CODE_H_INCLUDED
|
|
|
|
#define MAIN_CODE_H_INCLUDED
|
|
|
|
|
|
|
|
#ifdef TARGET_ANDROID
|
|
|
|
#include "android_api.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef TARGET_WIN32
|
|
|
|
#define NOMINMAX 1
|
|
|
|
#include <Windows.h>
|
|
|
|
#undef NOMINMAX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#include "boost/shared_ptr.hpp"
|
|
|
|
#include "boost/thread/thread.hpp"
|
|
|
|
#include "boost/assign.hpp"
|
|
|
|
#include "boost/bind.hpp"
|
|
|
|
|
|
|
|
#include "include/Engine.h"
|
|
|
|
|
2017-02-26 23:07:37 +00:00
|
|
|
#include "boost/signals2.hpp"//Signal must be included after asio
|
2017-01-10 12:43:06 +00:00
|
|
|
|
|
|
|
using namespace SE;
|
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
class TMyApplication : public TApplication
|
2017-01-10 12:43:06 +00:00
|
|
|
{
|
|
|
|
protected:
|
2017-11-14 17:04:04 +00:00
|
|
|
|
|
|
|
bool Inited;
|
|
|
|
|
2017-01-10 12:43:06 +00:00
|
|
|
public:
|
2017-12-04 11:14:14 +00:00
|
|
|
TRenderPair pair;
|
|
|
|
TRenderPair rect;
|
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
bool Loaded;
|
|
|
|
|
|
|
|
TMyApplication() : TApplication(), Loaded(false), Inited(false) { }
|
|
|
|
|
|
|
|
virtual void InnerInit();
|
|
|
|
|
|
|
|
virtual void InnerDeinit();
|
|
|
|
|
2017-01-10 12:43:06 +00:00
|
|
|
virtual void InnerDraw();
|
2017-11-14 17:04:04 +00:00
|
|
|
|
|
|
|
virtual void InnerUpdate(size_t dt);
|
|
|
|
|
2017-01-10 12:43:06 +00:00
|
|
|
bool IsLoaded();
|
2017-11-14 17:04:04 +00:00
|
|
|
|
2017-01-10 12:43:06 +00:00
|
|
|
bool IsInited();
|
2017-11-14 17:04:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
virtual void InnerOnTapDown(Vector2f p);
|
|
|
|
|
|
|
|
virtual void InnerOnTapUp(Vector2f p);
|
|
|
|
|
|
|
|
virtual void InnerOnTapUpAfterMove(Vector2f p);
|
|
|
|
|
|
|
|
virtual void InnerOnMove(Vector2f p, Vector2f shift);
|
|
|
|
|
|
|
|
virtual void OnFling(Vector2f v);
|
2017-01-10 12:43:06 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
extern TMyApplication* Application;
|
2017-01-10 12:43:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|