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

📄 resfile.h

📁 liu7788414
💻 H
字号:
/*
* ============================================================================
*  Name     : CResFile from ResFile.h
*  Part of  : Game
*  Created  : 2003-06-16 by Qiu Wei Min
*  Description:
*     Resource store for game.
*  Version  :
*  Copyright: Gameloft S.A.
*
*  Port from symbian to Brew LG6000 to use old pack tool. 
* ============================================================================
*/

#ifndef RESFILE_H
#define RESFILE_H

#include "zlibbrew.h"
//#include "aeefile.h"

//class CEngine;
#include "Sysdef.h"

class CResFile
{
public:

	bool Read(void* hRecord, void* pBuf, int len = -1, int ofs = 0);
//	bool Read(CFile file, void* pBuf, int len = -1, int ofs = 0);

	int GetRecordSize(void* hRecord);

	int GetDecompressedSize(void *hRecord);

//	void* ReadToStack(void* hRecord);
	void* ReadToStack(const char *fName);

	void* ReadBMPToHeap(void *hRecord, bool bGlobal);

	unsigned long ComputeHash(const char *s);

	void* FindRecord(const char *name);

	bool Open(const char *fn);
	int LoadFileToStack(const char *fName, void **pData);
	
	enum {
		MAX_ENTRY = 100
	};

	struct PakEntry{
		unsigned long nameHash; // hashValue of fileName.
		unsigned long start;	//*4 is the start address.
		unsigned long len;
	};

	struct Pak{
		long nPak;
		struct PakEntry aPak[1];
	} ;

	typedef struct FileIO{
		char isPaked	;
		char foo1,foo2,foo3;
		struct Pak *pak;
	} FileIO;


	CResFile(void);

	virtual ~CResFile();

protected:
	//RESENTRY m_entry[MAX_ENTRY];

	int m_nEntry;

	FileIO* f;

	CFile m_handle;

	//CEngine *m_pEngine;

	CZLibBrew* m_pZlib;
};

#endif

// End of File

⌨️ 快捷键说明

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