summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-09 20:37:53 +0200
committerGitHub <noreply@github.com>2020-04-09 20:37:53 +0200
commit5b5de5d2f3a883a795f62098f69a05c77900ecba (patch)
tree1c73c5ccb17ce6f345b0fd08ebd041ae3284d95b /src/render
parentMerge pull request #395 from aap/master (diff)
parenttxd.img creator (diff)
downloadre3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar.gz
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar.bz2
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar.lz
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar.xz
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.tar.zst
re3-5b5de5d2f3a883a795f62098f69a05c77900ecba.zip
Diffstat (limited to '')
-rw-r--r--src/render/TexList.cpp41
-rw-r--r--src/render/TexList.h14
2 files changed, 55 insertions, 0 deletions
diff --git a/src/render/TexList.cpp b/src/render/TexList.cpp
new file mode 100644
index 00000000..daed620a
--- /dev/null
+++ b/src/render/TexList.cpp
@@ -0,0 +1,41 @@
+#include "common.h"
+#include "TexList.h"
+#include "rtbmp.h"
+#include "FileMgr.h"
+
+bool CTexList::ms_nTexUsed[MAX_TEXUSED];
+
+void
+CTexList::Initialise()
+{}
+
+void
+CTexList::Shutdown()
+{}
+
+RwTexture *
+CTexList::SetTexture(int32 slot, char *name)
+{
+ return nil;
+}
+
+int32
+CTexList::GetFirstFreeTexture()
+{
+ for (int32 i = 0; i < MAX_TEXUSED; i++)
+ if (!ms_nTexUsed[i])
+ return i;
+ return -1;
+}
+
+RwTexture *
+CTexList::LoadFileNameTexture(char *name)
+{
+ return SetTexture(GetFirstFreeTexture(), name);
+}
+
+void
+CTexList::LoadGlobalTextureList()
+{
+ CFileMgr::SetDir("TEXTURES");
+} \ No newline at end of file
diff --git a/src/render/TexList.h b/src/render/TexList.h
new file mode 100644
index 00000000..c6618fba
--- /dev/null
+++ b/src/render/TexList.h
@@ -0,0 +1,14 @@
+#pragma once
+
+class CTexList
+{
+ enum { MAX_TEXUSED = 400, };
+ static bool ms_nTexUsed[MAX_TEXUSED];
+public:
+ static void Initialise();
+ static void Shutdown();
+ static RwTexture *SetTexture(int32 slot, char *name);
+ static int32 GetFirstFreeTexture();
+ static RwTexture *LoadFileNameTexture(char *name);
+ static void LoadGlobalTextureList();
+}; \ No newline at end of file