ho3/Template/main.h

78 lines
1.7 KiB
C
Raw Normal View History

2024-06-06 13:25:38 +00:00
#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
2024-06-08 17:55:56 +00:00
int view = 0;
2024-06-06 13:25:38 +00:00
float WaterTimer;
void DrawSceneWithoutWater();
void DrawToCubemap();
void DrawToShadowMap();
void DrawWaterSurface();
2024-06-08 17:55:56 +00:00
void DrawCubemap();
cardinal cubemapTexture;
VertexDataStruct cubemapVertexDataStruct;
2024-06-08 20:24:26 +00:00
VertexDataStruct waterVertexDataStruct;
2024-06-08 17:55:56 +00:00
2024-06-06 13:25:38 +00:00
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
};