summaryrefslogtreecommitdiffstats
path: root/src/rw/RwHelper.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-24 13:27:02 +0200
committeraap <aap@papnet.eu>2020-04-24 14:08:06 +0200
commit5bb4e9992679c9e8767d4eb6de54da1892ec13c6 (patch)
treebed321a714eed597caa620a77bdd00f9e2b6a153 /src/rw/RwHelper.cpp
parentimplemented skinned peds, no cutscene hands yet (diff)
downloadre3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar.gz
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar.bz2
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar.lz
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar.xz
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.tar.zst
re3-5bb4e9992679c9e8767d4eb6de54da1892ec13c6.zip
Diffstat (limited to '')
-rw-r--r--src/rw/RwHelper.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 5aa4475f..02a07558 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -9,12 +9,20 @@
RtCharset *debugCharset;
#endif
+static bool charsetOpen;
+void OpenCharsetSafe()
+{
+ if(!charsetOpen)
+ RtCharsetOpen();
+ charsetOpen = true;
+}
+
void CreateDebugFont()
{
#ifndef FINAL
RwRGBA color = { 255, 255, 128, 255 };
RwRGBA colorbg = { 0, 0, 0, 0 };
- RtCharsetOpen();
+ OpenCharsetSafe();
debugCharset = RtCharsetCreate(&color, &colorbg);
#endif
}
@@ -24,6 +32,7 @@ void DestroyDebugFont()
#ifndef FINAL
RtCharsetDestroy(debugCharset);
RtCharsetClose();
+ charsetOpen = false;
#endif
}