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
|
|
|
extern boost::signals2::signal<void(Vector2f)> OnTapUpSignal;
|
|
|
|
extern boost::signals2::signal<void(Vector2f)> OnTapUpAfterMoveSignal;
|
2017-01-10 12:43:06 +00:00
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
extern boost::signals2::signal<void(Vector2f)> OnTapDownSignal;
|
|
|
|
extern boost::signals2::signal<void(Vector2f)> OnFlingSignal;
|
|
|
|
extern boost::signals2::signal<void(Vector2f)> OnScrollSignal;
|
2017-02-26 23:07:37 +00:00
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
extern boost::signals2::signal<void()> OnDrawSignal;
|
2017-01-10 12:43:06 +00:00
|
|
|
|
2017-11-14 17:04:04 +00:00
|
|
|
class TMyApplication : public TApplication
|
2017-01-10 12:43:06 +00:00
|
|
|
{
|
|
|
|
protected:
|
2017-12-22 18:35:11 +00:00
|
|
|
ParticleEffect sparkler;
|
|
|
|
|
2017-01-10 12:43:06 +00:00
|
|
|
public:
|
2017-12-19 10:54:34 +00:00
|
|
|
TMyApplication() : TApplication() { }
|
2017-11-14 17:04:04 +00:00
|
|
|
|
|
|
|
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-12-22 18:35:11 +00:00
|
|
|
virtual void InnerOnMouseDown(TMouseState& mouseState);
|
2017-11-14 17:04:04 +00:00
|
|
|
|
|
|
|
virtual void InnerOnMove(Vector2f p, Vector2f shift);
|
|
|
|
|
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
|