70 lines
1.5 KiB
C++
70 lines
1.5 KiB
C++
#pragma once
|
|
|
|
/* Path to the engine */
|
|
#include "SalmonEngineWindows.h"
|
|
#include "gameMap.h"
|
|
|
|
using namespace SE;
|
|
|
|
//Application class
|
|
class TMyApplication : public SE::TApplication
|
|
{
|
|
/*
|
|
TLiteModel* lm;
|
|
TSimpleLandClass* TestLand;
|
|
glmat3 LiteModelRotateMatrix;
|
|
glmat3 LiteModelDeltaRotateMatrix;
|
|
cardinal LiteModelUpdateTimer;
|
|
*/
|
|
TGameMap GameMap;
|
|
|
|
bool MouseRightButtonPressed;
|
|
//Rotate camera on mouse right button pressed
|
|
|
|
bool MouseLeftButtonPressed;
|
|
|
|
int MouseX0, MouseY0;
|
|
//Mouse pos caught on right button click
|
|
|
|
float WaterTimer;
|
|
|
|
void DrawSceneWithoutWater();
|
|
|
|
void DrawToCubemap();
|
|
|
|
void DrawToShadowMap();
|
|
|
|
void DrawWaterSurface();
|
|
|
|
public:
|
|
|
|
//Constructor
|
|
TMyApplication() : MouseRightButtonPressed(false), MouseLeftButtonPressed(false), WaterTimer(0) { }
|
|
|
|
virtual void InnerInit();
|
|
//What to do on init
|
|
|
|
virtual void InnerDeinit();
|
|
//What to do on deinit
|
|
|
|
virtual void InnerDraw();
|
|
//What to do on draw
|
|
|
|
virtual void InnerUpdate(cardinal timer);
|
|
//What to do on update. timer means how many ms passed since last update
|
|
|
|
virtual void UpdateQuick();
|
|
//To process input - this method is called more frequently than Update()
|
|
|
|
virtual void OnMouseMove(TMouseState& mouseState);
|
|
//To do on mouse move (with or without pressed buttons)
|
|
|
|
virtual void OnMouseDown(TMouseState& mouseState);
|
|
//To do on mouse move (with or without pressed buttons)
|
|
|
|
virtual void OnMouseUp(TMouseState& mouseState);
|
|
//To do on mouse move (with or without pressed buttons)
|
|
|
|
virtual void OnMouseWheel(short int delta);
|
|
//To do on mouse wheel move
|
|
}; |