summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-09 20:24:52 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-09 20:24:52 +0100
commit1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5 (patch)
tree023ea2aa841ac8489f247d1bd3132a02aa48bffd
parentfix rendering; update librw (diff)
parentcan finish first mission (diff)
downloadre3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar.gz
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar.bz2
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar.lz
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar.xz
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.tar.zst
re3-1b3047c8126a1840033ca28f2fc24d1dbdfe9bc5.zip
-rw-r--r--src/control/Script.cpp11
-rw-r--r--src/control/Script3.cpp4
-rw-r--r--src/control/Script8.cpp23
-rw-r--r--src/core/Radar.cpp6
-rw-r--r--src/core/Radar.h5
5 files changed, 38 insertions, 11 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index df851daa..543221c6 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -2179,7 +2179,7 @@ bool CUpsideDownCarCheck::IsCarUpsideDown(int32 id)
// done(LCS)
bool CUpsideDownCarCheck::IsCarUpsideDown(CVehicle* pVehicle)
{
- assert(pVehicle);
+ script_assert(pVehicle);
return pVehicle->GetUp().z <= UPSIDEDOWN_UP_THRESHOLD &&
pVehicle->GetMoveSpeed().Magnitude() < UPSIDEDOWN_MOVE_SPEED_THRESHOLD &&
pVehicle->GetTurnSpeed().Magnitude() < UPSIDEDOWN_TURN_SPEED_THRESHOLD;
@@ -2411,7 +2411,7 @@ int32* GetPointerToScriptVariableForDebug(CRunningScript* pScript, uint32* pIp,
return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)];
}
else {
- assert(type >= ARGUMENT_TIMER);
+ script_assert(type >= ARGUMENT_TIMER);
sprintf(tmpstr, " TIMER%d@", (type - ARGUMENT_TIMER));
strcat(buf, tmpstr);
return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)]; // why 8?
@@ -2534,7 +2534,7 @@ int32* GetPointerToScriptVariable(CRunningScript* pScript, uint32* pIp)
return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)];
}
else {
- assert(type >= ARGUMENT_TIMER);
+ script_assert(type >= ARGUMENT_TIMER);
return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)];
}
}
@@ -4998,7 +4998,10 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
return 0;
}
//case COMMAND_ADD_AMMO_TO_CAR:
- //case COMMAND_IS_PLAYER_STILL_ALIVE:
+ case COMMAND_IS_PLAYER_STILL_ALIVE:
+ CollectParameters(&m_nIp, 1);
+ UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState != WBSTATE_WASTED);
+ return 0;
case COMMAND_IS_PLAYER_DEAD:
CollectParameters(&m_nIp, 1);
UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_WASTED);
diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp
index 0134df00..c2c7d044 100644
--- a/src/control/Script3.cpp
+++ b/src/control/Script3.cpp
@@ -836,7 +836,6 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
case COMMAND_RESTORE_CLOCK:
CClock::RestoreClock();
return 0;
- /*
case COMMAND_RESTART_CRITICAL_MISSION:
{
CollectParameters(&m_nIp, 4);
@@ -849,7 +848,6 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
CWorld::Players[CWorld::PlayerInFocus].PlayerFailedCriticalMission();
return 0;
}
- */
case COMMAND_IS_PLAYER_PLAYING:
{
CollectParameters(&m_nIp, 1);
@@ -1357,12 +1355,14 @@ int8 CRunningScript::ProcessCommands600To699(int32 command)
UpdateCompareFlag(CTheScripts::IsPedStopped(pPed));
return 0;
}
+ */
case COMMAND_MESSAGE_WAIT:
CollectParameters(&m_nIp, 2);
m_nWakeTime = CTimer::GetTimeInMilliseconds() + ScriptParams[0];
if (ScriptParams[1] != 0)
m_bSkipWakeTime = true;
return 1;
+ /*
case COMMAND_ADD_PARTICLE_EFFECT:
{
CollectParameters(&m_nIp, 5);
diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp
index f41ef8a4..cf5f1327 100644
--- a/src/control/Script8.cpp
+++ b/src/control/Script8.cpp
@@ -714,7 +714,7 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false);
return 0;
case COMMAND_1539:
- script_assert(false);
+ //TODO (REGISTER_OUTFIT_CHANGE)
return 0;
case COMMAND_1540:
script_assert(false);
@@ -741,7 +741,9 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false);
return 0;
case COMMAND_1548:
- script_assert(false);
+ // TODO (GET_ONFOOT_CAMERA_MODE)
+ ScriptParams[0] = 0;
+ StoreParameters(&m_nIp, 1);
return 0;
case COMMAND_1549:
CollectParameters(&m_nIp, 1);
@@ -847,8 +849,11 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false);
return 0;
case COMMAND_1581:
- script_assert(false);
+ {
+ // TODO (SET_HELP_MESSAGE?)
+ wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp);
return 0;
+ }
case COMMAND_1582:
script_assert(false);
return 0;
@@ -1062,8 +1067,15 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
script_assert(false);
return 0;
case COMMAND_1645:
- script_assert(false);
+ {
+ CollectParameters(&m_nIp, 1);
+ // TODO (GET_STORED_WEAPON?)
+ CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
+ script_assert(pPed);
+ ScriptParams[0] = pPed->m_storedWeapon;
+ StoreParameters(&m_nIp, 1);
return 0;
+ }
case COMMAND_1646:
CollectParameters(&m_nIp, 1);
// TODO (DISABLE_PAUSE_MENU?)
@@ -1100,7 +1112,8 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
script_assert(false);
return 0;
case COMMAND_1656:
- script_assert(false);
+ CollectParameters(&m_nIp, 2);
+ // TODO (?)
return 0;
default:
script_assert(0);
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 8fe900ae..d9802acc 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -104,6 +104,11 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
&RadioVCPRSprite,
&RadioEspantosoSprite,
&RadioEmotionSprite,
+ &RadioWaveSprite, // tmp hack
+ &RadioWaveSprite,
+ &RadioWaveSprite,
+ &RadioWaveSprite,
+ &RadioWaveSprite,
&RadioWaveSprite
};
@@ -1689,6 +1694,7 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite)
text = TheText.Get("LG_34");
break;
default:
+ text = TheText.Get("LG_34"); // tmp hack
break;
}
CFont::PrintString(SCREEN_SCALE_X(20.f) + x, SCREEN_SCALE_Y(3.0f) + y, text);
diff --git a/src/core/Radar.h b/src/core/Radar.h
index 8f2e7069..d051745a 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -92,6 +92,11 @@ enum eRadarSprite
RADAR_SPRITE_RADIO_ESPANTOSO,
RADAR_SPRITE_RADIO_EMOTION,
RADAR_SPRITE_RADIO_WAVE,
+ RADAR_SPRITE_40, // tmp
+ RADAR_SPRITE_41,
+ RADAR_SPRITE_42,
+ RADAR_SPRITE_43,
+ RADAR_SPRITE_44,
RADAR_SPRITE_COUNT
};