diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-16 10:44:33 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-16 10:44:33 +0100 |
commit | a36da99798b99ca1d15ccdde00ef86af412d2a16 (patch) | |
tree | caaf8977c7d7715f36ad9264d3680da4d4ab1d97 /src/control/Script.h | |
parent | bug fixes (diff) | |
download | re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar.gz re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar.bz2 re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar.lz re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar.xz re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.tar.zst re3-a36da99798b99ca1d15ccdde00ef86af412d2a16.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Script.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/control/Script.h b/src/control/Script.h index 426a0f50..a1b35dcc 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -11,6 +11,8 @@ class CPed; class CObject; class CPlayerInfo; +#define KEY_LENGTH_IN_SCRIPT 8 + struct CScriptRectangle { int8 m_bIsUsed; @@ -409,11 +411,11 @@ public: return Read2BytesFromScript(pIp) / 16.0f; } static void ReadTextLabelFromScript(uint32* pIp, char* buf){ - strncpy(buf, (const char*)&ScriptSpace[*pIp], 8); + strncpy(buf, (const char*)&ScriptSpace[*pIp], KEY_LENGTH_IN_SCRIPT); } static wchar* GetTextByKeyFromScript(uint32* pIp) { wchar* text = TheText.Get((const char*)&ScriptSpace[*pIp]); - *pIp += 8; + *pIp += KEY_LENGTH_IN_SCRIPT; return text; } }; |