ho3/Template/gameMap.h

66 lines
1011 B
C
Raw Normal View History

2024-06-06 13:25:38 +00:00
#pragma once
#include "SalmonEngineWindows.h"
#include <vector>
using namespace SE;
typedef std::vector<TLiteModel> TLiteModelArr;
class TMapCharacter
{
protected:
//Do not change them directly:
vec3 Pos; // y=0 here
mat3 RotationMatrix;
vec3 Direction; // y=0 here
vec3 Destination; // y=0 here
vec3 VectorToDestination;
float Velocity;
public:
TMapCharacter();
~TMapCharacter() { }
void SetPos(vec3& pos);
void GoToDestination(vec3& dest);
void Update(cardinal timer);
vec3 GetPos();
mat3 GetRotationMatrix();
};
class TGameMap
{
protected:
TSimpleLandClass* Land;
TLiteModelArr StaticModelArr;
TLiteModel* PlayerChar;
TMapCharacter MapChar;
public:
TGameMap() : Land(NULL), PlayerChar(NULL), AnimModel(NULL), GirlText(NULL) {};
~TGameMap() { FreeMap(); };
void LoadMap();
void FreeMap();
TSimpleLandClass* GetLand();
void DrawVBO();
void Update(cardinal timer);
void PlayerClicked(int x, int y);
TAnimModel* AnimModel;
TAnimModel* GirlText;
int animSeq;
};