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

📄 texture.h

📁 一个3D的保龄球的源代码
💻 H
字号:
#ifndef CTEXTURE_H
#define CTEXTURE_H


#include "..\System\Sysdef.h"
#include "..\System\bufReader.h"
#include "..\System\gfx.h"



class CGraphics3D;
class CEngine;

class CTexture
{
public:
	short m_w,m_h;
	int m_shift;
	int m_mask;
	unsigned char m_bpp; // the byte per pixel
	unsigned char m_flag; 
	short m_npal;       // number of entries in pallete
	unsigned short* m_ppalData;//the ppaldata of the pallete
	
	byte * m_pData;//the index of the each pixel

	void *m_pFile;
	unsigned short* m_expp;
	GFXBMP bmp;
	operator GFXBMP* ()	{
		bmp.w = m_w;
		bmp.h = m_h;
		bmp.npal = 0;
		bmp.pData = m_pData;
		bmp.bpp = 16;
		bmp.flag = 0;
		return &bmp;
	}

public:
	~CTexture();
	CTexture();

	// 1: store as index, 0: expand;
	bool LoadTexData(CEngine * pEngine, const char *filename, int);
	bool LoadTga(CEngine * pEngine, CBufReader *r, int);
};

#endif

⌨️ 快捷键说明

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