⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gameresource.h

📁 一个类似坦克大战的小小游戏
💻 H
字号:

/**************************************************************************************
	Project  Name			: Map Edit of my game
	Module Name				: Picture resources
	File Name				: GameResource.h: interface for the CResource class.
	Create					: 2007-7-8, by Vigame
	Update					: 
	Copyright				: 
	Reference				: 
	Abstrct					: To manage all the pictures in the game
 **************************************************************************************/

#if !defined(AFX_RESOURCE1_H__B039EDCA_467C_44FF_B4D8_1F2BA18E6A06__INCLUDED_)
#define AFX_RESOURCE1_H__B039EDCA_467C_44FF_B4D8_1F2BA18E6A06__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ObjectTexture.h"

const int SEA_COUNT = 3;
const int ISLAND_COUNT = 4; 
const int WALL_COUNT = 6;
const int REEF_COUNT = 5;
const int BARBETTE_COUNT = 2;
const int FENSE_COUNT = 2;

class CGameResource  
{
public:
	CGameResource();
	virtual ~CGameResource();

public:
	// Load pictures
	BOOL LoadAll(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadSea(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadIsland(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadWall(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadReef(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadBarbette(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadFense(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);
	BOOL LoadSeaweed(LPDIRECT3DDEVICE9 &pDevice, DWORD inColorKey);

	// Release
	void ReleaseAll();
	void ReleaseSea();
	void ReleaseIsland();
	void ReleaseWall();
	void ReleaseReef();
	void ReleaseBarbette();
	void ReleaseFense();
	void ReleaseSeaweed();

public:
	CObjectTexture m_textureSea[SEA_COUNT];				// Sea (ground)		
	CObjectTexture m_textureIsland[ISLAND_COUNT];		// Island pictures
	CObjectTexture m_textureWall[WALL_COUNT];			// Wall pictures, 4 states
	CObjectTexture m_textureReef[REEF_COUNT];			// Reef pictures
	CObjectTexture m_textureBarbette[BARBETTE_COUNT];	// Sea pictures
	CObjectTexture m_textureFense[FENSE_COUNT];			// Fense
	CObjectTexture m_textureSeaweed;					// Seaweed

};

#endif // !defined(AFX_RESOURCE1_H__B039EDCA_467C_44FF_B4D8_1F2BA18E6A06__INCLUDED_)

⌨️ 快捷键说明

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