game.h

来自「小型的3D游戏引擎」· C头文件 代码 · 共 66 行

H
66
字号
#ifndef _GAME_H_
#define _GAME_H_

#include <gimcrack/gimcrack.h>
#include <application.h>
#include "cacti.h"

#define GAME_RUNNING	1
#define GAME_INIT		2
#define GAME_CLOSING	3


// Forward declarations
//class GcApplication;
//class GcOpenGL;
//class GcMain;

class Game : public Win32Application
{
public:
	
	Game();
	~Game();

	void CoreLoop();

	void OnKeyDown(uint key);
	void OnKeyUp(uint key);
	void OnActivate(BOOL active);
	void Close();
		
private:

	void GameRunning();
	bool Init();

	void Render();
	void PreRender();
	void PostRender();


	GcOpenGL			renderdevice;
	GcTerrain			terrain;
	GcWater				water;
	GcCamera			camera;
	GcCube				cube;
	GcTimer				timer;
	GcGui				gui;
	GcTarga				screenshot;
	GcSkybox			skybox;
	GcConsole			console;
	GcMD2				testmodel1;
	GcMS3D				*testmodel2;
	GcVector3			lastpos1;
	GcVector3			lastpos2;
	char				buffer[80];
	GcStaticGeometry	sg;
	GcQuadtree			*tree;
	GcAABB				aabb1;
	GcAABB				aabb2;
	GcPlane				plane;
	uint				gameState;
	GcCacti				cacti;
};

#endif _GAME_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?