1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 19:40:00 +00:00

Merge branch 'lcs-dev' into lcs

This commit is contained in:
Nikolay Korolev 2021-01-09 22:24:52 +03:00
commit 1b3047c812
5 changed files with 38 additions and 11 deletions

View file

@ -2179,7 +2179,7 @@ bool CUpsideDownCarCheck::IsCarUpsideDown(int32 id)
// done(LCS) // done(LCS)
bool CUpsideDownCarCheck::IsCarUpsideDown(CVehicle* pVehicle) bool CUpsideDownCarCheck::IsCarUpsideDown(CVehicle* pVehicle)
{ {
assert(pVehicle); script_assert(pVehicle);
return pVehicle->GetUp().z <= UPSIDEDOWN_UP_THRESHOLD && return pVehicle->GetUp().z <= UPSIDEDOWN_UP_THRESHOLD &&
pVehicle->GetMoveSpeed().Magnitude() < UPSIDEDOWN_MOVE_SPEED_THRESHOLD && pVehicle->GetMoveSpeed().Magnitude() < UPSIDEDOWN_MOVE_SPEED_THRESHOLD &&
pVehicle->GetTurnSpeed().Magnitude() < UPSIDEDOWN_TURN_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)]; return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)];
} }
else { else {
assert(type >= ARGUMENT_TIMER); script_assert(type >= ARGUMENT_TIMER);
sprintf(tmpstr, " TIMER%d@", (type - ARGUMENT_TIMER)); sprintf(tmpstr, " TIMER%d@", (type - ARGUMENT_TIMER));
strcat(buf, tmpstr); strcat(buf, tmpstr);
return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)]; // why 8? 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)]; return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)];
} }
else { else {
assert(type >= ARGUMENT_TIMER); script_assert(type >= ARGUMENT_TIMER);
return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (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; return 0;
} }
//case COMMAND_ADD_AMMO_TO_CAR: //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: case COMMAND_IS_PLAYER_DEAD:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_WASTED); UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_WASTED);

View file

@ -836,7 +836,6 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
case COMMAND_RESTORE_CLOCK: case COMMAND_RESTORE_CLOCK:
CClock::RestoreClock(); CClock::RestoreClock();
return 0; return 0;
/*
case COMMAND_RESTART_CRITICAL_MISSION: case COMMAND_RESTART_CRITICAL_MISSION:
{ {
CollectParameters(&m_nIp, 4); CollectParameters(&m_nIp, 4);
@ -849,7 +848,6 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
CWorld::Players[CWorld::PlayerInFocus].PlayerFailedCriticalMission(); CWorld::Players[CWorld::PlayerInFocus].PlayerFailedCriticalMission();
return 0; return 0;
} }
*/
case COMMAND_IS_PLAYER_PLAYING: case COMMAND_IS_PLAYER_PLAYING:
{ {
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
@ -1357,12 +1355,14 @@ int8 CRunningScript::ProcessCommands600To699(int32 command)
UpdateCompareFlag(CTheScripts::IsPedStopped(pPed)); UpdateCompareFlag(CTheScripts::IsPedStopped(pPed));
return 0; return 0;
} }
*/
case COMMAND_MESSAGE_WAIT: case COMMAND_MESSAGE_WAIT:
CollectParameters(&m_nIp, 2); CollectParameters(&m_nIp, 2);
m_nWakeTime = CTimer::GetTimeInMilliseconds() + ScriptParams[0]; m_nWakeTime = CTimer::GetTimeInMilliseconds() + ScriptParams[0];
if (ScriptParams[1] != 0) if (ScriptParams[1] != 0)
m_bSkipWakeTime = true; m_bSkipWakeTime = true;
return 1; return 1;
/*
case COMMAND_ADD_PARTICLE_EFFECT: case COMMAND_ADD_PARTICLE_EFFECT:
{ {
CollectParameters(&m_nIp, 5); CollectParameters(&m_nIp, 5);

View file

@ -714,7 +714,7 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false); script_assert(false);
return 0; return 0;
case COMMAND_1539: case COMMAND_1539:
script_assert(false); //TODO (REGISTER_OUTFIT_CHANGE)
return 0; return 0;
case COMMAND_1540: case COMMAND_1540:
script_assert(false); script_assert(false);
@ -741,7 +741,9 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false); script_assert(false);
return 0; return 0;
case COMMAND_1548: case COMMAND_1548:
script_assert(false); // TODO (GET_ONFOOT_CAMERA_MODE)
ScriptParams[0] = 0;
StoreParameters(&m_nIp, 1);
return 0; return 0;
case COMMAND_1549: case COMMAND_1549:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
@ -847,8 +849,11 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
script_assert(false); script_assert(false);
return 0; return 0;
case COMMAND_1581: case COMMAND_1581:
script_assert(false); {
// TODO (SET_HELP_MESSAGE?)
wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp);
return 0; return 0;
}
case COMMAND_1582: case COMMAND_1582:
script_assert(false); script_assert(false);
return 0; return 0;
@ -1062,8 +1067,15 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
script_assert(false); script_assert(false);
return 0; return 0;
case COMMAND_1645: 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; return 0;
}
case COMMAND_1646: case COMMAND_1646:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
// TODO (DISABLE_PAUSE_MENU?) // TODO (DISABLE_PAUSE_MENU?)
@ -1100,7 +1112,8 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
script_assert(false); script_assert(false);
return 0; return 0;
case COMMAND_1656: case COMMAND_1656:
script_assert(false); CollectParameters(&m_nIp, 2);
// TODO (?)
return 0; return 0;
default: default:
script_assert(0); script_assert(0);

View file

@ -104,6 +104,11 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
&RadioVCPRSprite, &RadioVCPRSprite,
&RadioEspantosoSprite, &RadioEspantosoSprite,
&RadioEmotionSprite, &RadioEmotionSprite,
&RadioWaveSprite, // tmp hack
&RadioWaveSprite,
&RadioWaveSprite,
&RadioWaveSprite,
&RadioWaveSprite,
&RadioWaveSprite &RadioWaveSprite
}; };
@ -1689,6 +1694,7 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite)
text = TheText.Get("LG_34"); text = TheText.Get("LG_34");
break; break;
default: default:
text = TheText.Get("LG_34"); // tmp hack
break; break;
} }
CFont::PrintString(SCREEN_SCALE_X(20.f) + x, SCREEN_SCALE_Y(3.0f) + y, text); CFont::PrintString(SCREEN_SCALE_X(20.f) + x, SCREEN_SCALE_Y(3.0f) + y, text);

View file

@ -92,6 +92,11 @@ enum eRadarSprite
RADAR_SPRITE_RADIO_ESPANTOSO, RADAR_SPRITE_RADIO_ESPANTOSO,
RADAR_SPRITE_RADIO_EMOTION, RADAR_SPRITE_RADIO_EMOTION,
RADAR_SPRITE_RADIO_WAVE, RADAR_SPRITE_RADIO_WAVE,
RADAR_SPRITE_40, // tmp
RADAR_SPRITE_41,
RADAR_SPRITE_42,
RADAR_SPRITE_43,
RADAR_SPRITE_44,
RADAR_SPRITE_COUNT RADAR_SPRITE_COUNT
}; };