ho3/Template/main.h
2024-06-09 01:09:17 +03:00

84 lines
1.8 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
int view = 0;
float WaterTimer;
void DrawSceneWithoutWater();
void DrawToCubemap();
void DrawToShadowMap();
void DrawWaterSurface();
void DrawCubemap();
void DrawCubemapDay();
cardinal cubemapTexture;
cardinal cubemapTextureDay;
cardinal cubemapTextureNight;
VertexDataStruct cubemapVertexDataStruct;
VertexDataStruct waterVertexDataStruct;
public:
//Constructor
TMyApplication() : MouseRightButtonPressed(false), MouseLeftButtonPressed(false), WaterTimer(0) {
Width = 1920;
Height = 1080;
}
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
};