summaryrefslogtreecommitdiff
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-27 21:28:18 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-27 21:28:18 +0300
commit345b8553a7455926d523b90926edb0eacf88a13a (patch)
tree3ba80e1ba6fece816603e9f683f012842347186b /src/control/Script.h
parentefdd44cd685cb1f8384da175f97993acfc0660a3 (diff)
cargen + some script
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;
}
};