98 lines
2.4 KiB
C++
98 lines
2.4 KiB
C++
#ifndef _APPLICATIONCLASS_H_
|
|
#define _APPLICATIONCLASS_H_
|
|
|
|
|
|
///////////////////////
|
|
// MY CLASS INCLUDES //
|
|
///////////////////////
|
|
#include "d3dclass.h"
|
|
#include "cameraclass.h"
|
|
#include "object.h"
|
|
#include "lightshaderclass.h"
|
|
#include "lightclass.h"
|
|
#include <vector>
|
|
#include <filesystem>
|
|
|
|
#include "multitextureshaderclass.h"
|
|
#include "bitmapclass.h"
|
|
#include "textureshaderclass.h"
|
|
#include "spriteclass.h"
|
|
#include "timerclass.h"
|
|
#include "fontshaderclass.h"
|
|
#include "fontclass.h"
|
|
#include "textclass.h"
|
|
#include "fpsclass.h"
|
|
|
|
/////////////
|
|
// GLOBALS //
|
|
/////////////
|
|
const bool FULL_SCREEN = false;
|
|
const bool VSYNC_ENABLED = true;
|
|
const float SCREEN_DEPTH = 1000.0f;
|
|
const float SCREEN_NEAR = 0.3f;
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// Class name: ApplicationClass
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
class ApplicationClass
|
|
{
|
|
public:
|
|
ApplicationClass();
|
|
ApplicationClass(const ApplicationClass&);
|
|
~ApplicationClass();
|
|
D3DClass* GetDirect3D();
|
|
|
|
bool Initialize(int, int, HWND);
|
|
void Shutdown();
|
|
bool Frame();
|
|
|
|
int GetScreenWidth() const;
|
|
int GetScreenHeight() const;
|
|
|
|
float GetSpeed() const { return speed; };
|
|
void SetSpeed(float speed) { this->speed = speed; };
|
|
|
|
void AddCube();
|
|
void DeleteKobject(int index);
|
|
int GetCubeCount() const { return m_cubes.size(); };
|
|
int GetTerrainCubeCount() const { return m_terrainChunk.size(); };
|
|
std::vector<Object*> GetCubes() const { return m_cubes; };
|
|
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
|
std::vector<Object*> GetKobjects() const { return m_object; };
|
|
void AddKobject(WCHAR* filepath);
|
|
|
|
void GenerateTerrain();
|
|
void DeleteTerrain();
|
|
|
|
private:
|
|
bool Render(float, float, float, float);
|
|
bool UpdateFps();
|
|
private:
|
|
D3DClass* m_Direct3D;
|
|
CameraClass* m_Camera;
|
|
IDXGISwapChain* m_swapChain;
|
|
float speed = 0.1f;
|
|
Object* m_SelectedObject;
|
|
std::vector<Object*> m_cubes;
|
|
std::vector<Object*> m_terrainChunk;
|
|
LightShaderClass* m_LightShader;
|
|
LightClass* m_Light;
|
|
MultiTextureShaderClass* m_MultiTextureShader;
|
|
ModelClass* m_Model;
|
|
TextureShaderClass* m_TextureShader;
|
|
BitmapClass* m_Bitmap;
|
|
SpriteClass* m_Sprite;
|
|
TimerClass* m_Timer;
|
|
LightClass* m_Lights;
|
|
int m_numLights;
|
|
FontShaderClass* m_FontShader;
|
|
FontClass* m_Font;
|
|
TextClass *m_TextString1, *m_TextString2, *m_TextString3;
|
|
FpsClass* m_Fps;
|
|
TextClass* m_FpsString;
|
|
int m_previousFps;
|
|
std::vector<Object*> m_object;
|
|
};
|
|
|
|
#endif |