summaryrefslogtreecommitdiffstats
path: root/src/control/Script2.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-18 20:19:30 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-18 20:19:30 +0100
commitc09297997e9878f06e6cd513e26cbbe50ae860fb (patch)
tree810b97cfd49a9c3b43a3a3f1803d2e04f9c87ce9 /src/control/Script2.cpp
parentMerge branch 'lcs' into lcs-dev (diff)
downloadre3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.gz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.bz2
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.lz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.xz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.zst
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp
index 9ef24751..b31484ab 100644
--- a/src/control/Script2.cpp
+++ b/src/control/Script2.cpp
@@ -175,27 +175,27 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
*/
case COMMAND_DISPLAY_ONSCREEN_TIMER:
{
- uint16 offset = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - (int32*)CTheScripts::ScriptSpace;
+ uint16 offset = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace;
CollectParameters(&m_nIp, 1);
CUserDisplay::OnscnTimer.AddClock(offset, nil, GET_INTEGER_PARAM(0) != 0);
return 0;
}
case COMMAND_CLEAR_ONSCREEN_TIMER:
{
- uint16 offset = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - (int32*)CTheScripts::ScriptSpace;
+ uint16 offset = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace;
CUserDisplay::OnscnTimer.ClearClock(offset);
return 0;
}
case COMMAND_DISPLAY_ONSCREEN_COUNTER:
{
- uint16 counter = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - (int32*)CTheScripts::ScriptSpace;
+ uint16 counter = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace;
CollectParameters(&m_nIp, 1);
CUserDisplay::OnscnTimer.AddCounter(counter, GET_INTEGER_PARAM(0), nil, 0);
return 0;
}
case COMMAND_CLEAR_ONSCREEN_COUNTER:
{
- uint16 counter = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - (int32*)CTheScripts::ScriptSpace;
+ uint16 counter = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace;
CUserDisplay::OnscnTimer.ClearCounter(counter);
return 0;
}
@@ -624,7 +624,7 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
//case COMMAND_MOVE_CAMERA_ALONG_SPLINE:
//case COMMAND_GET_CAMERA_POSITION_ALONG_SPLINE:
case COMMAND_DECLARE_MISSION_FLAG:
- CTheScripts::OnAMissionFlag = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - (int32*)CTheScripts::ScriptSpace;
+ CTheScripts::OnAMissionFlag = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace;
return 0;
case COMMAND_DECLARE_MISSION_FLAG_FOR_CONTACT:
return 0;
@@ -1452,7 +1452,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
{
wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp);
CollectParameters(&m_nIp, 3);
- CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1);
+ CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); // 1
return 0;
}
case COMMAND_PRINT_WITH_NUMBER_SOON: