summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-27 20:28:18 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-27 20:28:18 +0200
commit345b8553a7455926d523b90926edb0eacf88a13a (patch)
tree3ba80e1ba6fece816603e9f683f012842347186b /src/control/Script.h
parentfixed bridge (diff)
downloadre3-345b8553a7455926d523b90926edb0eacf88a13a.tar
re3-345b8553a7455926d523b90926edb0eacf88a13a.tar.gz
re3-345b8553a7455926d523b90926edb0eacf88a13a.tar.bz2
re3-345b8553a7455926d523b90926edb0eacf88a13a.tar.lz
re3-345b8553a7455926d523b90926edb0eacf88a13a.tar.xz
re3-345b8553a7455926d523b90926edb0eacf88a13a.tar.zst
re3-345b8553a7455926d523b90926edb0eacf88a13a.zip
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 0984952a..47c70914 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -1,5 +1,6 @@
#pragma once
#include "common.h"
+#include "Text.h"
#include "Sprite2d.h"
class CEntity;
@@ -373,6 +374,11 @@ public:
return Read2BytesFromScript(pIp) / 16.0f;
}
static void ReadTextLabelFromScript(uint32* pIp, char* buf){
- strncpy(buf, (const char*)&CTheScripts::ScriptSpace[*pIp], 8);
+ strncpy(buf, (const char*)&ScriptSpace[*pIp], 8);
+ }
+ static wchar* GetTextByKeyFromScript(uint32* pIp) {
+ wchar* text = TheText.Get((const char*)&ScriptSpace[*pIp]);
+ *pIp += 8;
+ return text;
}
};