double-hit-balls/game/main_code.h

86 lines
1.3 KiB
C
Raw Permalink Normal View History

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:
2018-01-19 14:23:11 +00:00
TRenderPair fabricRender;
TRenderPair background;
2018-01-21 21:05:15 +00:00
TRenderPair rect;
2017-12-04 11:14:14 +00:00
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
2018-01-21 21:05:15 +00:00
void DrawScene();
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-12-11 09:30:51 +00:00
virtual void OnMouseWheel(short int delta);
float distance = 2000;
float alpha = 0;
float phi = pi / 6;
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