summaryrefslogtreecommitdiffstats
path: root/src/rw/TexturePools.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-23 21:46:07 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-01 21:54:19 +0100
commita259b6b8ab7124b68bbc0f0b80c5560a672a502a (patch)
tree93f31535b1bd0b5a95b89c5af0c00174657186d7 /src/rw/TexturePools.h
parentAdd GTA_REPLAY (diff)
downloadre3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar.gz
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar.bz2
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar.lz
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar.xz
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.tar.zst
re3-a259b6b8ab7124b68bbc0f0b80c5560a672a502a.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