summaryrefslogtreecommitdiff
path: root/src/rw/TexturePools.h
blob: 75187432874d2e9c2127f3ae299ec6c7d11b519c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once

class CTexturePool
{
public:
	D3DFORMAT Format;
	int size;
	uint32 levels;
	int32 texturesMax;
	int32 texturesUsed;
	int32 texturesNum;
	IDirect3DTexture8 **pTextures;

public:
	CTexturePool() {}
	void Create(D3DFORMAT _Format, int size, uint32 mipmapLevels, int32 numTextures);
	void Release();
	IDirect3DTexture8 *FindTexture();
	bool AddTexture(IDirect3DTexture8 *texture);
	void Resize(int numTextures);
#ifdef FIX_BUGS
	int GetSize() { return size; }
#else
	float GetSize() { return size; }
#endif
};

class CPaletteList
{
	int Max;
	int Num;
	int *Data;
public:
	void Alloc(int max);
	void Free();
	int Find();
	void Add(int item);
	void Resize(int max);
};

void _TexturePoolsInitialise();
void _TexturePoolsShutdown();