tunnel/jni/main_code.h

75 lines
1.3 KiB
C
Raw Normal View History

2013-01-23 20:14:11 +00:00
#ifndef MAIN_CODE_H_INCLUDED
#define MAIN_CODE_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifdef TARGET_ANDROID
#include <GLES/gl.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
#include "boost/shared_ptr.hpp"
#include "boost/thread/thread.hpp"
#include "boost/assign.hpp"
#include "boost/bind.hpp"
#include "boost/asio.hpp"
#include "boost/signal.hpp"
#include "include/Engine.h"
using namespace SE;
class TMyApplication : public TApplication
{
protected:
public:
bool Inited;
float Velocity;
TFlexModel FlexModel;
std::vector<TFlexModel> TubeModelArr;
2013-01-27 21:48:57 +00:00
std::vector<TVolumeBody> TubeBodyArr;
//std::list<std::pair<TFlexModel, TVolumeBody>> BoxList;
2013-01-23 20:14:11 +00:00
2013-01-27 21:48:57 +00:00
vec3 PrevCamVec;
vec3 RotateAxis;
//float RotateShift;
vec2 RotateShift;
2013-01-23 20:14:11 +00:00
2013-01-29 19:20:42 +00:00
boost::signal<void()> OnUpdateSignal;
2013-01-27 21:48:57 +00:00
TMyApplication() : TApplication(), Inited(false) { }
2013-01-23 20:14:11 +00:00
virtual void InnerInit();
virtual void InnerDeinit();
virtual void InnerDraw();
virtual void InnerUpdate(cardinal dt);
bool IsInited() { return Inited; }
virtual void InnerOnMove(vec2 shift);
2013-01-27 21:48:57 +00:00
virtual void InnerOnTapUp(vec2 p);
virtual void InnerOnTapUpAfterShift(vec2 p);
2013-01-23 20:14:11 +00:00
virtual void OnMouseWheel(short int delta);
2013-01-27 21:48:57 +00:00
void UpdatePitVector(cardinal dt);
2013-01-29 19:20:42 +00:00
void RecreateLevel();
2013-01-23 20:14:11 +00:00
};
#endif