From 345b8553a7455926d523b90926edb0eacf88a13a Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 27 Jul 2019 21:28:18 +0300 Subject: cargen + some script --- src/control/Script.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/control/Script.h') 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; } }; -- cgit v1.2.3