summaryrefslogtreecommitdiffstats
path: root/src/rw/TexturePools.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-02 10:38:39 +0100
committeraap <aap@papnet.eu>2020-12-02 10:38:39 +0100
commitf5763118140591f980e89089e3f67c3d50a293b9 (patch)
tree0e6a15457497d9999f039b11260eda3d2679f580 /src/rw/TexturePools.h
parentbetter cam lod dist fix (diff)
parentfast fix (diff)
downloadre3-f5763118140591f980e89089e3f67c3d50a293b9.tar
re3-f5763118140591f980e89089e3f67c3d50a293b9.tar.gz
re3-f5763118140591f980e89089e3f67c3d50a293b9.tar.bz2
re3-f5763118140591f980e89089e3f67c3d50a293b9.tar.lz
re3-f5763118140591f980e89089e3f67c3d50a293b9.tar.xz
re3-f5763118140591f980e89089e3f67c3d50a293b9.tar.zst
re3-f5763118140591f980e89089e3f67c3d50a293b9.zip
Diffstat (limited to 'src/rw/TexturePools.h')
-rw-r--r--src/rw/TexturePools.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/rw/TexturePools.h b/src/rw/TexturePools.h
new file mode 100644
index 00000000..75187432
--- /dev/null
+++ b/src/rw/TexturePools.h
@@ -0,0 +1,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(); \ No newline at end of file