1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-26 18:15:27 +00:00

Merge branch 'lcs-dev' into lcs

This commit is contained in:
Nikolay Korolev 2021-01-11 17:26:17 +03:00
commit 4422a3df23
7 changed files with 587 additions and 537 deletions

View file

@ -292,12 +292,12 @@ const tScriptCommandData commands[] = {
REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="), REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"), REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
REGISTER_COMMAND(COMMAND_ABS_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"), REGISTER_COMMAND(COMMAND_ABS_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
REGISTER_COMMAND(COMMAND_ABS_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"), REGISTER_COMMAND(COMMAND_ABS_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"), REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),

View file

@ -33,35 +33,35 @@
int8 CRunningScript::ProcessCommands300To399(int32 command) int8 CRunningScript::ProcessCommands300To399(int32 command)
{ {
switch (command) { switch (command) {
//case COMMAND_SET_CHAR_INVINCIBLE: //case COMMAND_SET_CHAR_INVINCIBLE:
//case COMMAND_SET_PLAYER_INVINCIBLE: //case COMMAND_SET_PLAYER_INVINCIBLE:
//case COMMAND_SET_CHAR_GRAPHIC_TYPE: //case COMMAND_SET_CHAR_GRAPHIC_TYPE:
//case COMMAND_SET_PLAYER_GRAPHIC_TYPE: //case COMMAND_SET_PLAYER_GRAPHIC_TYPE:
case COMMAND_HAS_PLAYER_BEEN_ARRESTED: case COMMAND_HAS_PLAYER_BEEN_ARRESTED:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_WBState == WBSTATE_BUSTED); UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_WBState == WBSTATE_BUSTED);
return 0; return 0;
//case COMMAND_STOP_CHAR_DRIVING: //case COMMAND_STOP_CHAR_DRIVING:
//case COMMAND_KILL_CHAR: //case COMMAND_KILL_CHAR:
//case COMMAND_SET_FAVOURITE_CAR_MODEL_FOR_CHAR: //case COMMAND_SET_FAVOURITE_CAR_MODEL_FOR_CHAR:
//case COMMAND_SET_CHAR_OCCUPATION: //case COMMAND_SET_CHAR_OCCUPATION:
/* /*
case COMMAND_CHANGE_CAR_LOCK: case COMMAND_CHANGE_CAR_LOCK:
{ {
CollectParameters(&m_nIp, 2); CollectParameters(&m_nIp, 2);
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0));
script_assert(pVehicle); script_assert(pVehicle);
pVehicle->m_nDoorLock = (eCarLock)GET_INTEGER_PARAM(1); pVehicle->m_nDoorLock = (eCarLock)GET_INTEGER_PARAM(1);
return 0; return 0;
} }
case COMMAND_SHAKE_CAM_WITH_POINT: case COMMAND_SHAKE_CAM_WITH_POINT:
CollectParameters(&m_nIp, 4); CollectParameters(&m_nIp, 4);
TheCamera.CamShake(GET_INTEGER_PARAM(0) / 1000.0f, TheCamera.CamShake(GET_INTEGER_PARAM(0) / 1000.0f,
GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(1),
GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(2),
GET_FLOAT_PARAM(3)); GET_FLOAT_PARAM(3));
return 0; return 0;
*/ */
case COMMAND_IS_CAR_MODEL: case COMMAND_IS_CAR_MODEL:
{ {
CollectParameters(&m_nIp, 2); CollectParameters(&m_nIp, 2);

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,8 @@ enum StreamFlags
STREAMFLAGS_PRIORITY = 0x08, STREAMFLAGS_PRIORITY = 0x08,
STREAMFLAGS_NOFADE = 0x10, STREAMFLAGS_NOFADE = 0x10,
STREAMFLAGS_20 = 0x20, // TODO(MIAMI): what's this STREAMFLAGS_20 = 0x20, // TODO(MIAMI): what's this
STREAMFLAGS_40 = 0x40, // TODO(LCS): what's this
STREAMFLAGS_AMBIENT_SCRIPT_OWNED = 0x80,
STREAMFLAGS_CANT_REMOVE = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED, STREAMFLAGS_CANT_REMOVE = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED,
STREAMFLAGS_KEEP_IN_MEMORY = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED|STREAMFLAGS_DEPENDENCY, STREAMFLAGS_KEEP_IN_MEMORY = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED|STREAMFLAGS_DEPENDENCY,

View file

@ -521,7 +521,13 @@ public:
uint32 bCollectBusFare : 1; uint32 bCollectBusFare : 1;
uint32 bBoughtIceCream : 1; uint32 bBoughtIceCream : 1;
uint32 bDonePositionOutOfCollision : 1; uint32 bDonePositionOutOfCollision : 1;
uint32 bCanAttackPlayerWithCops : 1;
uint32 bCanAttackPlayerWithCops : 1; // 1A1_1 on PS2
uint32 b1A1_2 : 1;
uint32 b1A1_4 : 1;
uint32 b1A1_8 : 1;
uint32 b1A1_10 : 1;
uint32 b1A1_20 : 1;
// our own flags // our own flags
uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle

View file

@ -51,6 +51,11 @@ float CWeather::WindClipped;
float CWeather::TrafficLightBrightness; float CWeather::TrafficLightBrightness;
bool CWeather::bScriptsForceRain; bool CWeather::bScriptsForceRain;
bool CWeather::Stored_StateStored;
float CWeather::Stored_InterpolationValue;
int16 CWeather::Stored_OldWeatherType;
int16 CWeather::Stored_NewWeatherType;
float CWeather::Stored_Rain;
tRainStreak Streaks[NUM_RAIN_STREAKS]; tRainStreak Streaks[NUM_RAIN_STREAKS];
@ -647,3 +652,23 @@ void CWeather::RenderRainStreaks(void)
TempBufferVerticesStored = 0; TempBufferVerticesStored = 0;
TempBufferIndicesStored = 0; TempBufferIndicesStored = 0;
} }
void CWeather::StoreWeatherState()
{
Stored_StateStored = true;
Stored_InterpolationValue = InterpolationValue;
Stored_Rain = Rain;
Stored_NewWeatherType = NewWeatherType;
Stored_OldWeatherType = OldWeatherType;
}
void CWeather::RestoreWeatherState()
{
#ifdef FIX_BUGS // it's not used anyway though
Stored_StateStored = false;
#endif
InterpolationValue = Stored_InterpolationValue;
Rain = Stored_Rain;
NewWeatherType = Stored_NewWeatherType;
OldWeatherType = Stored_OldWeatherType;
}

View file

@ -42,6 +42,11 @@ public:
static float TrafficLightBrightness; static float TrafficLightBrightness;
static bool bScriptsForceRain; static bool bScriptsForceRain;
static bool Stored_StateStored;
static float Stored_InterpolationValue;
static int16 Stored_OldWeatherType;
static int16 Stored_NewWeatherType;
static float Stored_Rain;
static void RenderRainStreaks(void); static void RenderRainStreaks(void);
static void Update(void); static void Update(void);
@ -55,6 +60,9 @@ public:
static void AddRain(); static void AddRain();
static void AddHeatHaze(); static void AddHeatHaze();
static void AddBeastie(); static void AddBeastie();
static void StoreWeatherState();
static void RestoreWeatherState();
}; };
enum { enum {