diff options
Diffstat (limited to 'src')
263 files changed, 28140 insertions, 23203 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 28090d7e..9cce6641 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -108,6 +108,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang if (NOT LIBRW_PLATFORM_PS2) target_compile_options(${EXECUTABLE} PRIVATE + -fpermissive # for CVECTORHACK + -Wno-address-of-temporary # for CVECTORHACK -Wextra -Wdouble-promotion -Wpedantic diff --git a/src/animation/AnimBlendAssocGroup.cpp b/src/animation/AnimBlendAssocGroup.cpp index 935e7fd6..7c0a10d4 100644 --- a/src/animation/AnimBlendAssocGroup.cpp +++ b/src/animation/AnimBlendAssocGroup.cpp @@ -18,6 +18,7 @@ #include "RpAnimBlend.h" #include "AnimBlendAssociation.h" #include "AnimBlendAssocGroup.h" +#include "KeyGen.h" CAnimBlendAssocGroup::CAnimBlendAssocGroup(void) { @@ -111,27 +112,34 @@ strcmpIgnoringDigits(const char *s1, const char *s2) } } +extern const char* csPlayerNames[]; +extern const char* playerNames[]; + CBaseModelInfo* GetModelFromName(const char *name) { int i; - CBaseModelInfo *mi; - char playername[32]; - - if(strncasecmp(name, "CSplay", 6) == 0 && - strncasecmp(CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName(), "ig", 2) == 0){ - strcpy(playername, CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName()); - playername[0] = 'C'; - playername[1] = 'S'; - name = playername; + CBaseModelInfo* mi; + if (CKeyGen::GetUppercaseKey(name) == CKeyGen::GetUppercaseKey("cstoni_a")) { + i = 0; + while (csPlayerNames[i][0] != '\0') { + if (CModelInfo::GetModelInfo(0)->GetNameHashKey() == CKeyGen::GetUppercaseKey(playerNames[i])) { + name = csPlayerNames[i]; + break; + } + i++; + } } - for(i = 0; i < MODELINFOSIZE; i++){ + uint32 hashKey = CKeyGen::GetUppercaseKey(name); + for (i = 0; i < MODELINFOSIZE; i++) { mi = CModelInfo::GetModelInfo(i); - if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP && - strcmpIgnoringDigits(mi->GetModelName(), name)) + if (mi && mi->GetRwObject() + && RwObjectGetType(mi->GetRwObject()) == rpCLUMP && + hashKey == mi->GetNameHashKey()) return mi; } + return nil; } @@ -185,3 +193,45 @@ CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, } numAssociations = numAssocs; } + +void +CAnimBlendAssocGroup::CreateAssociations(const char *blockName, const char *animNames, const char *objectNames, int numChars) +{ + if (!objectNames) { + CreateAssociations(blockName); + return; + } + + if (assocList) + DestroyAssociations(); + + animBlock = CAnimManager::GetAnimationBlock(blockName); + assocList = new CAnimBlendAssociation[animBlock->numAnims]; + + numAssociations = 0; + if (animBlock->numAnims > 0) + { + int i, j; + for (i = 0; i < animBlock->numAnims; i++) { + int animId = -1; + for (j = 0; j != animBlock->numAnims; j++) + if (strcmp(CAnimManager::GetAnimation(i + animBlock->firstIndex)->name, animNames + numChars * j) == 0) + animId = j; + + if (animId != -1) { + CBaseModelInfo* minfo = GetModelFromName(objectNames + numChars * animId); + if (minfo) + { + RpClump* clump = (RpClump*)minfo->CreateInstance(); + RpAnimBlendClumpInit(clump); + assocList[numAssociations].Init(clump, CAnimManager::GetAnimation(i + animBlock->firstIndex)); + if (IsClumpSkinned(clump)) + RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil); + RpClumpDestroy(clump); + assocList[numAssociations].animId = i + numAssociations; + assocList[numAssociations++].groupId = groupId; + } + } + } + } +}
\ No newline at end of file diff --git a/src/animation/AnimBlendAssocGroup.h b/src/animation/AnimBlendAssocGroup.h index 86f0ca18..e264787e 100644 --- a/src/animation/AnimBlendAssocGroup.h +++ b/src/animation/AnimBlendAssocGroup.h @@ -21,4 +21,5 @@ public: CAnimBlendAssociation *CopyAnimation(const char *name); void CreateAssociations(const char *name); void CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs); + void CreateAssociations(const char *blockName, const char *animNames, const char *objectNames, int numChars); }; diff --git a/src/animation/AnimBlendAssociation.cpp b/src/animation/AnimBlendAssociation.cpp index bb4e7bf4..a65f0fc5 100644 --- a/src/animation/AnimBlendAssociation.cpp +++ b/src/animation/AnimBlendAssociation.cpp @@ -230,3 +230,9 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta) return true; } + +void +CAnimBlendAssociation::Remove() +{ + delete this; +} diff --git a/src/animation/AnimBlendAssociation.h b/src/animation/AnimBlendAssociation.h index dbfcb722..da026e01 100644 --- a/src/animation/AnimBlendAssociation.h +++ b/src/animation/AnimBlendAssociation.h @@ -81,6 +81,7 @@ public: void UpdateTimeStep(float timeDelta, float relSpeed); bool UpdateTime(float timeDelta, float relSpeed); bool UpdateBlend(float timeDelta); + void Remove(); void SetRun(void) { flags |= ASSOC_RUNNING; } diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp index f6ac3eb5..d0763ef7 100644 --- a/src/animation/AnimManager.cpp +++ b/src/animation/AnimManager.cpp @@ -20,281 +20,373 @@ CAnimBlendAssocGroup *CAnimManager::ms_aAnimAssocGroups; CLinkList<CAnimBlendHierarchy*> CAnimManager::ms_animCache; AnimAssocDesc aStdAnimDescs[] = { - { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_IDLE, ASSOC_REPEAT }, - { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION }, - { ANIM_STD_RUNSTOP1, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_RUNSTOP2, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_IDLE_CAM, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_IDLE_HBHB, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_IDLE_TIRED, ASSOC_REPEAT }, - { ANIM_STD_IDLE_BIGGUN, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_CHAT, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_HAILTAXI, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_KO_FRONT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_KO_LEFT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_KO_BACK, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_KO_RIGHT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_KO_SHOT_FACE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_KO_SHOT_STOMACH, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_KO_SHOT_ARM_L, ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_KO_SHOT_ARM_R, ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_KO_SHOT_LEG_L, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_KO_SHOT_LEG_R, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_SPINFORWARD_LEFT, ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_SPINFORWARD_RIGHT, ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_HIGHIMPACT_FRONT, ASSOC_PARTIAL }, - { ANIM_STD_HIGHIMPACT_LEFT, ASSOC_PARTIAL }, - { ANIM_STD_HIGHIMPACT_BACK, ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_HIGHIMPACT_RIGHT, ASSOC_PARTIAL }, - { ANIM_STD_HITBYGUN_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_HITBYGUN_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_HITBYGUN_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_HITBYGUN_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_HIT_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_HIT_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_HIT_FLOOR, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_HIT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_CHEST, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_WALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_WALL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HIT_FLOOR_FRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_HIT_BEHIND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_IDLE, ASSOC_REPEAT }, - { ANIM_STD_FIGHT_2IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_SHUFFLE_F, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_FIGHT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_KNEE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_LHOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_ROUNDHOUSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_FIGHT_LONGKICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_PARTIAL_PUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_FIGHT_JAB, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_ELBOW_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_ELBOW_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_BKICK_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_BKICK_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_DETONATE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_PARTIALPUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_KICKGROUND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_THROW_UNDER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_FIGHT_SHUFFLE_B, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_JACKEDCAR_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_JACKEDCAR_LO_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_JACKEDCAR_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_JACKEDCAR_LO_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_QUICKJACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_QUICKJACKED, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_CAR_ALIGN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_ALIGNHI_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_OPEN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CARDOOR_LOCKED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_PULL_OUT_PED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_PULL_OUT_PED_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_GET_IN_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_JUMP_IN_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_GETOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_GETOUT_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_ALIGN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_ALIGNHI_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_OPEN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CARDOOR_LOCKED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_PULL_OUT_PED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_PULL_OUT_PED_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_GET_IN_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_DOOR_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_SHUFFLE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_SHUFFLE_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_SIT, ASSOC_DELETEFADEDOUT}, - { ANIM_STD_CAR_SIT_LO, ASSOC_DELETEFADEDOUT}, - { ANIM_STD_CAR_SIT_P, ASSOC_DELETEFADEDOUT}, - { ANIM_STD_CAR_SIT_P_LO, ASSOC_DELETEFADEDOUT}, - { ANIM_STD_CAR_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVE_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVE_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVEBY_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVEBY_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVEBY_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_DRIVEBY_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_CAR_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_BOAT_DRIVE, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING }, - { ANIM_STD_BOAT_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_BOAT_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_BOAT_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_STD_BIKE_PICKUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_PICKUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_PULLUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_PULLUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_ELBOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_ELBOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_BIKE_FALLOFF, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_BIKE_FALLBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_GETOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_GETOUT_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_CLOSE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CAR_HOOKERTALK, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_TRAIN_GETIN, ASSOC_PARTIAL }, - { ANIM_STD_TRAIN_GETOUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CRAWLOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_ROLLOUT_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, - { ANIM_STD_ROLLOUT_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, - { ANIM_STD_GET_UP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_GET_UP_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_GET_UP_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_GET_UP_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_JUMP_LAUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_FALL, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_FALL_COLLAPSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_FALL_ONBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_FALL_ONFRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL }, - { ANIM_STD_EVADE_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_EVADE_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, - { ANIM_STD_XPRESS_SCRATCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, - { ANIM_STD_ROADCROSS, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_STD_TURN180, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_ARREST, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_DROWN, ASSOC_PARTIAL }, - { ANIM_STD_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_DUCK_WEAPON, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_RBLOCK_SHOOT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_HANDSUP, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_HANDSCOWER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_STD_PARTIAL_FUCKU, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_STD_PHONE_IN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, - { ANIM_STD_SEAT_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_SEAT_UP, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_SEAT_IDLE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_SEAT_RVRS, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_ATM, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_ABSEIL, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_IDLE, ASSOC_REPEAT }, + { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION }, + { ANIM_STD_RUNSTOP1, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_RUNSTOP2, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_IDLE_CAM, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_IDLE_HBHB, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_IDLE_TIRED, ASSOC_REPEAT }, + { ANIM_STD_IDLE_BIGGUN, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_CHAT, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_HAILTAXI, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_KO_FRONT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_KO_LEFT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_KO_BACK, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_KO_RIGHT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_KO_SHOT_FACE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_KO_SHOT_STOMACH, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_KO_SHOT_ARM_L, ASSOC_PARTIAL | ASSOC_FRONTAL }, + { ANIM_STD_KO_SHOT_ARM_R, ASSOC_PARTIAL | ASSOC_FRONTAL }, + { ANIM_STD_KO_SHOT_LEG_L, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_KO_SHOT_LEG_R, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_SPINFORWARD_LEFT, ASSOC_PARTIAL }, + { ANIM_STD_SPINFORWARD_RIGHT, ASSOC_PARTIAL }, + { ANIM_STD_HIGHIMPACT_FRONT, ASSOC_PARTIAL }, + { ANIM_STD_HIGHIMPACT_LEFT, ASSOC_PARTIAL }, + { ANIM_STD_HIGHIMPACT_BACK, ASSOC_PARTIAL | ASSOC_FRONTAL }, + { ANIM_STD_HIGHIMPACT_RIGHT, ASSOC_PARTIAL }, + { ANIM_STD_HITBYGUN_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_STD_HITBYGUN_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_STD_HITBYGUN_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_STD_HITBYGUN_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_STD_HIT_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_HIT_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_HIT_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_HIT_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_HIT_FLOOR, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_HIT_WALL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_HIT_FLOOR_FRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL }, + { ANIM_STD_HIT_BEHIND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_FIGHT_IDLE, ASSOC_REPEAT }, + { ANIM_STD_FIGHT_2IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_FIGHT_SHUFFLE_F, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_PARTIAL_PUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_FIGHT_ATTACK_A1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_ATTACK_A2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_ATTACK_A3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_ATTACK_B1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_ATTACK_B2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_ATTACK_B3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_A1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_A2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_A3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_B1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_B2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_FIGHT_HIT_B3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_DETONATE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_PARTIALPUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_KICKGROUND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_THROW_UNDER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_FIGHT_SHUFFLE_B, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_JACKEDCAR_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_JACKEDCAR_LO_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_JACKEDCAR_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_JACKEDCAR_LO_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_QUICKJACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_QUICKJACKED, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_CAR_ALIGN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_ALIGNHI_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_OPEN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CARDOOR_LOCKED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_PULL_OUT_PED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_PULL_OUT_PED_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_GET_IN_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_JUMP_IN_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_GETOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_GETOUT_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_ALIGN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_ALIGNHI_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_OPEN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CARDOOR_LOCKED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_PULL_OUT_PED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_PULL_OUT_PED_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_GET_IN_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_DOOR_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_SHUFFLE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_SHUFFLE_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_SIT, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_CAR_SIT_LO, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_CAR_SIT_P, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_CAR_SIT_P_LO, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_CAR_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVE_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVE_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVEBY_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVEBY_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVEBY_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_DRIVEBY_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_CAR_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_BOAT_DRIVE, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING }, + { ANIM_STD_BOAT_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_BOAT_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_BOAT_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_STD_BIKE_PICKUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_PICKUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_PULLUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_PULLUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_ELBOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_ELBOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_BIKE_FALLOFF, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_BIKE_FALLBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_GETOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_GETOUT_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_CLOSE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CAR_HOOKERTALK, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_TRAIN_GETIN, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_TRAIN_GETOUT, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE }, + { ANIM_STD_CRAWLOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_ROLLOUT_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_ROLLOUT_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_GET_UP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_GET_UP_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_GET_UP_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_GET_UP_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_JUMP_LAUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_FALL, ASSOC_DELETEFADEDOUT }, + { ANIM_STD_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_FALL_COLLAPSE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_FALL_ONBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_FALL_ONFRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL }, + { ANIM_STD_EVADE_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_EVADE_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_COMMANDO_ROLL, ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL }, + { ANIM_STD_XPRESS_SCRATCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_STD_ROADCROSS, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_STD_TURN180, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_ARREST, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_DROWN, ASSOC_PARTIAL }, + { ANIM_STD_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_DUCK_WEAPON, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_RBLOCK_SHOOT, ASSOC_RUNNING }, + { ANIM_STD_HANDSUP, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_HANDSCOWER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_STD_PARTIAL_FUCKU, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_STD_PHONE_IN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, + { ANIM_STD_SEAT_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_SEAT_UP, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_SEAT_IDLE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_SEAT_RVRS, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_ATM, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_ABSEIL, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL }, }; AnimAssocDesc aVanAnimDescs[] = { - { ANIM_STD_VAN_OPEN_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_GET_IN_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_GET_OUT_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_OPEN_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_GET_IN_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_VAN_GET_OUT_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_OPEN_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_GET_IN_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_GET_OUT_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_OPEN_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_GET_IN_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_VAN_GET_OUT_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aCoachAnimDescs[] = { - { ANIM_STD_COACH_OPEN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_COACH_OPEN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_COACH_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_COACH_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STD_COACH_GET_OUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_COACH_OPEN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_COACH_OPEN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_COACH_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_COACH_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STD_COACH_GET_OUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aBikeAnimDescs[] = { - { ANIM_BIKE_RIDE, ASSOC_DELETEFADEDOUT}, - { ANIM_BIKE_READY, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_LEFT, ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_RIGHT, ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_LEANB, ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_LEANF, ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_WALKBACK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_JUMPON_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_JUMPON_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_HIT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_GETOFF_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_GETOFF_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_BIKE_GETOFF_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, - { ANIM_BIKE_DRIVEBY_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_DRIVEBY_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_DRIVEBY_FORWARD, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, - { ANIM_BIKE_RIDE_P, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING }, + { ANIM_BIKE_RIDE, ASSOC_DELETEFADEDOUT }, + { ANIM_BIKE_READY, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_LEFT, ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_RIGHT, ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_LEANB, ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_LEANF, ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_WALKBACK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_JUMPON_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_JUMPON_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_HIT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_GETOFF_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_GETOFF_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_BIKE_GETOFF_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_BIKE_DRIVEBY_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_DRIVEBY_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_DRIVEBY_FORWARD, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING }, + { ANIM_BIKE_RIDE_P, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING }, }; AnimAssocDesc aMeleeAnimDescs[] = { - { ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, - { ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT }, - { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, + { ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK }, + { ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT }, + { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, }; AnimAssocDesc aSwingAnimDescs[] = { - { ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT }, - { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT }, + { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aWeaponAnimDescs[] = { - { ANIM_WEAPON_FIRE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_WEAPON_CROUCHFIRE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_WEAPON_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_WEAPON_CROUCHRELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_WEAPON_FIRE_3RD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_ATTACK_1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_ATTACK_2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_ATTACK_EXTRA1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_ATTACK_EXTRA2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aMedicAnimDescs[] = { - { ANIM_MEDIC_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_MEDIC_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aSunbatheAnimDescs[] = { - { ANIM_SUNBATHE_IDLE, ASSOC_REPEAT | ASSOC_PARTIAL }, - { ANIM_SUNBATHE_DOWN, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, - { ANIM_SUNBATHE_UP, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, - { ANIM_SUNBATHE_ESCAPE, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, + { ANIM_SUNBATHE_IDLE, ASSOC_REPEAT | ASSOC_PARTIAL }, + { ANIM_SUNBATHE_DOWN, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL }, + { ANIM_SUNBATHE_UP, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL }, + { ANIM_SUNBATHE_ESCAPE, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL }, }; AnimAssocDesc aPlayerIdleAnimDescs[] = { - { ANIM_PLAYER_IDLE1, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_PLAYER_IDLE2, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_PLAYER_IDLE3, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_PLAYER_IDLE4, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_PLAYER_IDLE1, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_PLAYER_IDLE2, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_PLAYER_IDLE3, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_PLAYER_IDLE4, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aRiotAnimDescs[] = { - { ANIM_RIOT_ANGRY, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_ANGRY_B, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_CHANT, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_PUNCHES, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_SHOUT, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_CHALLENGE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_RIOT_FUCKYOU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_ANGRY, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_ANGRY_B, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_CHANT, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_PUNCHES, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_SHOUT, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_CHALLENGE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_RIOT_FUCKYOU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, }; AnimAssocDesc aStripAnimDescs[] = { - { ANIM_STRIP_A, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_B, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_C, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_D, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_E, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_F, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, - { ANIM_STRIP_G, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, -}; -#ifdef PC_PLAYER_CONTROLS + { ANIM_STRIP_A, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_B, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_C, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_D, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_E, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_F, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, + { ANIM_STRIP_G, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, +}; AnimAssocDesc aStdAnimDescsSide[] = { - { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, - { ANIM_STD_IDLE, ASSOC_REPEAT }, - { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, + { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK }, + { ANIM_STD_IDLE, ASSOC_REPEAT }, + { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION }, +}; +AnimAssocDesc aMPNoteAnimDescs[] = { + { ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aCSMiscAnimDescs[] = { + { ANIM_CS_MISC_IDLE_LOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_NO, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_YES, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_CHAT2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_COUGH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_GIGGLE_FEMALE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_TOUGH_CHAT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_CS_MISC_IDLE_CELL_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aDONH2AnimDescs[] = { + { ANIM_DONH2_CAMERA, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aDONH3AnimDescs[] = { + { ANIM_DONH3_HAPPY, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aJDT2AnimDescs[] = { + { ANIM_JDT2_ANXIOUS_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_JDT2_SHRUG, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aJDT4AnimDescs[] = { + { ANIM_JDT4_DILDO_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aJDT5AnimDescs[] = { + { ANIM_JDT5_CALM_DOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_JDT5_POINT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aJDT6AnimDescs[] = { + { ANIM_JDT6_PICKUP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_JDT6_KNOCK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aMAR1AnimDescs[] = { + { ANIM_MAR1_SKIRT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aMAR2AnimDescs[] = { + { ANIM_MAR2_CELL_ANSWER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MAR2_CELL_END, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MAR2_CELL_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MAR2_FOOT_TAP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aMAR3AnimDescs[] = { + { ANIM_MAR3_HOOCHY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MAR3_NOTE_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_MAR3_NOTE_PICKUP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL1AnimDescs[] = { + { ANIM_SAL1_BIREFCASE_DOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL2AnimDescs[] = { + { ANIM_SAL2_IDLE_SEATED, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_SAL2_SEAT_TO_STAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL3AnimDescs[] = { + { ANIM_SAL3_SEATED_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_SAL3_SEATED_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_SAL3_SIT_DOWN, ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL4AnimDescs[] = { + { ANIM_SAL4_DUST_DOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_SAL4_GIRL_RUN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL6AnimDescs[] = { + { ANIM_SAL6_ANGRY_SEATED, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_SAL6_IDLE_SEATED, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aSAL7AnimDescs[] = { + { ANIM_SAL7_LOOKOUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aVIC2AnimDescs[] = { + { ANIM_VIC2_POINT_ANGRY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aVIC3AnimDescs[] = { + { ANIM_VIC3_WAFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_VIC3_PICKUP_ROLL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aVIC4AnimDescs[] = { + { ANIM_VIC4_CARRY_BOX, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_VIC4_CELL_LOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_VIC4_CRATE_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aVIC6AnimDescs[] = { + { ANIM_VIC6_CELL_ANGRY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aTouristAnimDescs[] = { + { ANIM_TOURIST3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_TOURIST2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, + { ANIM_TOURIST1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aMAC2AnimDescs[] = { + { ANIM_MAC2_PLEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, +}; +AnimAssocDesc aVIC7AnimDescs[] = { + { ANIM_VIC7_PROD_WITH_FOOT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE }, }; -#endif -char const* aStdAnimations[] = { + +char const *aStdAnimations[] = { "walk_civi", "run_civi", "sprint_panic", @@ -318,8 +410,8 @@ char const* aStdAnimations[] = { "KO_shot_armR", "KO_shot_legl", "KO_shot_legR", - "KD_left", - "KD_right", + "BIKE_fall_off", + "BIKE_fall_off", "KO_skid_front", "KO_spin_R", "KO_skid_back", @@ -333,30 +425,28 @@ char const* aStdAnimations[] = { "HIT_back", "HIT_R", "FLOOR_hit", - "HIT_bodyblow", - "HIT_chest", - "HIT_head", - "HIT_walk", + "HIT_wall", "FLOOR_hit_f", "HIT_behind", "FIGHTIDLE", "FIGHT2IDLE", "FIGHTsh_F", - "FIGHTbodyblow", - "FIGHThead", - "FIGHTkick", - "FIGHTknee", - "FIGHTLhook", - "FIGHTpunch", - "FIGHTrndhse", - "FIGHTlngkck", "FIGHTppunch", - "FIGHTjab", - "FIGHTelbowL", - "FIGHTelbowR", - "FIGHTbkickL", - "FIGHTbkickR", + + "l_hook", + "r_hook", + "uppercut", + "headbutt", + "frontkick", + "roundhouse", + "hit_l_hook", + "hit_r_hook", + "hit_uppercut", + "hit_headbutt", + "hit_frontkick", + "hit_rhouse", + "bomber", "punchR", "FIGHTppunch", @@ -426,12 +516,13 @@ char const* aStdAnimations[] = { "CAR_getoutL_RHS", "CAR_close_RHS", "car_hookertalk", - "idle_stance", - "idle_stance", + + "TRAIN_getin", + "TRAIN_getout", "CAR_crawloutRHS", "CAR_crawloutRHS", "CAR_rollout_LHS", - "CAR_rollout_LHS", + "CAR_rollout_RHS", "Getup", "Getup", "Getup", @@ -447,6 +538,8 @@ char const* aStdAnimations[] = { "FALL_front", "EV_step", "EV_dive", + + "commando_roll", "XPRESSscratch", "roadcross", "TURN_180", @@ -469,7 +562,7 @@ char const* aStdAnimations[] = { "ATM", "abseil", }; -char const* aVanAnimations[] = { +char const *aVanAnimations[] = { "VAN_openL", "VAN_getinL", "VAN_closeL", @@ -479,14 +572,14 @@ char const* aVanAnimations[] = { "VAN_close", "VAN_getout", }; -char const* aCoachAnimations[] = { +char const *aCoachAnimations[] = { "COACH_opnL", - "COACH_opnL", - "COACH_inL", + "COACH_opnR", "COACH_inL", + "COACH_inR", "COACH_outL", }; -char const* aBikesAnimations[] = { +char const *aBikesAnimations[] = { "BIKEs_Ride", "BIKEs_Still", "BIKEs_Left", @@ -506,7 +599,7 @@ char const* aBikesAnimations[] = { "BIKEs_drivebyFT", "BIKEs_passenger", }; -char const* aBikevAnimations[] = { +char const *aBikevAnimations[] = { "BIKEv_Ride", "BIKEv_Still", "BIKEv_Left", @@ -526,7 +619,7 @@ char const* aBikevAnimations[] = { "BIKEv_drivebyFT", "BIKEv_passenger", }; -char const* aBikehAnimations[] = { +char const *aBikehAnimations[] = { "BIKEh_Ride", "BIKEh_Still", "BIKEh_Left", @@ -546,7 +639,7 @@ char const* aBikehAnimations[] = { "BIKEh_drivebyFT", "BIKEh_passenger", }; -char const* aBikedAnimations[] = { +char const *aBikedAnimations[] = { "BIKEd_Ride", "BIKEd_Still", "BIKEd_Left", @@ -566,115 +659,123 @@ char const* aBikedAnimations[] = { "BIKEd_drivebyFT", "BIKEd_passenger", }; -char const* aUnarmedAnimations[] = { +char const *aUnarmedAnimations[] = { "punchR", "KICK_floor", "FIGHTppunch", }; -char const* aScrewdriverAnimations[] = { - "FIGHTbodyblow", - "FIGHTbodyblow", +char const *aScrewdriverAnimations[] = { + "r_hook", + "r_hook", "FIGHTppunch", "FIGHTIDLE", - "FIGHTbodyblow", + "r_hook", }; -char const* aKnifeAnimations[] = { +char const *aKnifeAnimations[] = { "WEAPON_knife_1", "WEAPON_knife_2", "knife_part", "WEAPON_knifeidle", "WEAPON_knife_3", }; -char const* aBaseballbatAnimations[] = { +char const *aBaseballbatAnimations[] = { "WEAPON_bat_h", "WEAPON_bat_v", "BAT_PART", "WEAPON_bat_h", "WEAPON_golfclub", }; -char const* aGolfclubAnimations[] = { +char const *aGolfclubAnimations[] = { "WEAPON_bat_h", "WEAPON_golfclub", "BAT_PART", "WEAPON_bat_h", "WEAPON_bat_v", }; -char const* aChainsawAnimations[] = { +char const *aChainsawAnimations[] = { "WEAPON_csaw", "WEAPON_csawlo", "csaw_part", }; -char const* aPythonAnimations[] = { +char const *aPythonAnimations[] = { "python_fire", "python_crouchfire", "python_reload", "python_crouchreload", }; -char const* aColtAnimations[] = { +char const *aColtAnimations[] = { "colt45_fire", "colt45_crouchfire", "colt45_reload", "colt45_crouchreload", "colt45_cop", }; -char const* aShotgunAnimations[] = { +char const *aShotgunAnimations[] = { "shotgun_fire", "shotgun_crouchfire", }; -char const* aBuddyAnimations[] = { +char const *aBuddyAnimations[] = { "buddy_fire", "buddy_crouchfire", + "buddy_reload", }; -char const* aTecAnimations[] = { +char const *aTecAnimations[] = { "TEC_fire", "TEC_crouchfire", "TEC_reload", "TEC_crouchreload", }; -char const* aUziAnimations[] = { +char const *aUziAnimations[] = { "UZI_fire", "UZI_crouchfire", "UZI_reload", "UZI_crouchreload", }; -char const* aRifleAnimations[] = { +char const *aRifleAnimations[] = { "RIFLE_fire", "RIFLE_crouchfire", "RIFLE_load", "RIFLE_crouchload", }; -char const* aM60Animations[] = { +char const *aM60Animations[] = { "M60_fire", "M60_fire", "M60_reload", }; -char const* aSniperAnimations[] = { - "WEAPON_sniper", +char const *aSniperAnimations[] = { + "sniper_fire", + "sniper_fire", + "sniper_reload", }; -char const* aThrowAnimations[] = { +char const *aThrowAnimations[] = { "WEAPON_throw", "WEAPON_throwu", "WEAPON_start_throw", }; -char const* aFlamethrowerAnimations[] = { +char const *aFlamethrowerAnimations[] = { "FLAME_fire", }; -char const* aMedicAnimations[] = { +char const *aRocketLauncherAnimations[] = { + "rocket_fire", + "rocket_fire", + "rocket_reload", +}; +char const *aMedicAnimations[] = { "CPR", }; -char const* aSunbatheAnimations[] = { +char const *aSunbatheAnimations[] = { "bather", "batherdown", "batherup", "batherscape", }; -char const* aPlayerIdleAnimations[] = { +char const *aPlayerIdleAnimations[] = { "stretch", "time", "shldr", "strleg", }; -char const* aRiotAnimations[] = { +char const *aRiotAnimations[] = { "riot_angry", "riot_angry_b", "riot_chant", @@ -683,7 +784,7 @@ char const* aRiotAnimations[] = { "riot_challenge", "riot_fuku", }; -char const* aStripAnimations[] = { +char const *aStripAnimations[] = { "strip_A", "strip_B", "strip_C", @@ -692,212 +793,287 @@ char const* aStripAnimations[] = { "strip_F", "strip_G", }; -char const* aLanceAnimations[] = { +char const *aLanceAnimations[] = { "lance", }; -char const* aPlayerAnimations[] = { +char const *aPlayerAnimations[] = { "walk_player", "run_player", "SPRINT_civi", "IDLE_STANCE", "walk_start", }; -char const* aPlayerWithRocketAnimations[] = { +char const *aPlayerWithRocketAnimations[] = { "walk_rocket", "run_rocket", - "run_rocket", + "sprint_rocket", "idle_rocket", "walk_start_rocket", }; -char const* aPlayer1ArmedAnimations[] = { +char const *aPlayer1ArmedAnimations[] = { "walk_player", "run_1armed", "SPRINT_civi", "IDLE_STANCE", "walk_start", }; -char const* aPlayer2ArmedAnimations[] = { +char const *aPlayer2ArmedAnimations[] = { "walk_armed", "run_armed", - "run_armed", + "playersprint_armed", "idle_armed", "walk_start_armed", }; -char const* aPlayerBBBatAnimations[] = { - "walk_player", - "run_player", - "run_player", - "IDLE_STANCE", - "walk_start", +char const *aAIChainsawAnimations[] = { + "walk_aicsaw", + "run_aicsaw", + "run_aicsaw", + "IDLE_csaw", + "walk_start_aicsaw", }; -char const* aPlayerChainsawAnimations[] = { +char const *aPlayerChainsawAnimations[] = { "walk_csaw", "run_csaw", - "run_csaw", + "sprint_csaw", "IDLE_csaw", "walk_start_csaw", }; -char const* aShuffleAnimations[] = { +char const *aShuffleAnimations[] = { "WALK_shuffle", "RUN_civi", "SPRINT_civi", "IDLE_STANCE", }; -char const* aOldAnimations[] = { +char const *aOldAnimations[] = { "walk_old", "run_civi", "sprint_civi", "idle_stance", }; -char const* aGang1Animations[] = { +char const *aGang1Animations[] = { "walk_gang1", "run_gang1", "sprint_civi", "idle_stance", }; -char const* aGang2Animations[] = { +char const *aGang2Animations[] = { "walk_gang2", "run_gang1", "sprint_civi", "idle_stance", }; -char const* aFatAnimations[] = { +char const *aFatAnimations[] = { "walk_fat", "run_civi", "woman_runpanic", "idle_stance", }; -char const* aOldFatAnimations[] = { +char const *aOldFatAnimations[] = { "walk_fatold", "run_fatold", "woman_runpanic", "idle_stance", }; -char const* aJoggerAnimations[] = { +char const *aJoggerAnimations[] = { "JOG_maleA", "run_civi", "sprint_civi", "idle_stance", }; -char const* aStdWomanAnimations[] = { +char const *aStdWomanAnimations[] = { "woman_walknorm", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aWomanShopAnimations[] = { +char const *aWomanShopAnimations[] = { "woman_walkshop", "woman_run", "woman_run", "woman_idlestance", }; -char const* aBusyWomanAnimations[] = { +char const *aBusyWomanAnimations[] = { "woman_walkbusy", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aSexyWomanAnimations[] = { +char const *aSexyWomanAnimations[] = { "woman_walksexy", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aFatWomanAnimations[] = { +char const *aFatWomanAnimations[] = { "walk_fat", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aOldWomanAnimations[] = { +char const *aOldWomanAnimations[] = { "woman_walkold", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aJoggerWomanAnimations[] = { +char const *aJoggerWomanAnimations[] = { "JOG_maleB", "woman_run", "woman_runpanic", "woman_idlestance", }; -char const* aPanicChunkyAnimations[] = { +char const *aPanicChunkyAnimations[] = { "run_fatold", "woman_runpanic", "woman_runpanic", "idle_stance", }; -char const* aSkateAnimations[] = { +char const *aSkateAnimations[] = { "skate_run", "skate_sprint", "skate_sprint", "skate_idle", }; -#ifdef PC_PLAYER_CONTROLS -char const* aPlayerStrafeBackAnimations[] = { +char const *aPlayerStrafeBackAnimations[] = { "walk_back", "run_back", "run_back", "IDLE_STANCE", "walk_start_back", }; -char const* aPlayerStrafeLeftAnimations[] = { +char const *aPlayerStrafeLeftAnimations[] = { "walk_left", "run_left", "run_left", "IDLE_STANCE", "walk_start_left", }; -char const* aPlayerStrafeRightAnimations[] = { +char const *aPlayerStrafeRightAnimations[] = { "walk_right", "run_right", "run_right", "IDLE_STANCE", "walk_start_right", }; -char const* aRocketStrafeBackAnimations[] = { +char const *aRocketStrafeBackAnimations[] = { "walk_rocket_back", "run_rocket_back", "run_rocket_back", "idle_rocket", "walkst_rocket_back", }; -char const* aRocketStrafeLeftAnimations[] = { +char const *aRocketStrafeLeftAnimations[] = { "walk_rocket_left", "run_rocket_left", "run_rocket_left", "idle_rocket", "walkst_rocket_left", }; -char const* aRocketStrafeRightAnimations[] = { +char const *aRocketStrafeRightAnimations[] = { "walk_rocket_right", "run_rocket_right", "run_rocket_right", "idle_rocket", "walkst_rocket_right", }; -char const* aChainsawStrafeBackAnimations[] = { - "walk_csaw_back", - "run_csaw_back", - "run_csaw_back", - "idle_csaw", - "walkst_csaw_back", -}; -char const* aChainsawStrafeLeftAnimations[] = { - "walk_csaw_left", - "run_csaw_left", - "run_csaw_left", - "idle_csaw", - "walkst_csaw_left", -}; -char const* aChainsawStrafeRightAnimations[] = { - "walk_csaw_right", - "run_csaw_right", - "run_csaw_right", - "idle_csaw", - "walkst_csaw_right", +char const *aMPNoteAnimations[] = { + "MPNote", + "MPNoteloop", +}; +char const *aCSMiscAnimations[] = { + "IDLE_look", + "IDLE_no", + "IDLE_yes", + "IDLE_chat2", + "IDLE_cough", + "IDLE_giggle_female", + "IDLE_tough_chat", + "IDLE_cell_talk", +}; +char const *aDONH2Animations[] = { + "DONH2_camera", +}; +char const *aDONH3Animations[] = { + "DONH3_happy", +}; +char const *aJDT2Animations[] = { + "JDT2_anxious_talk", + "JDT2_shrug", +}; +char const *aJDT4Animations[] = { + "JDT4_dildo_talk", +}; +char const *aJDT5Animations[] = { + "JDT5_calm_down", + "JDT5_point", +}; +char const *aJDT6Animations[] = { + "JDT6_pickup", + "JDT6_doorknock", +}; +char const *aMAR1Animations[] = { + "MAR1_skirt", +}; +char const *aMAR2Animations[] = { + "MAR2_cell_answer", + "MAR2_cell_end", + "MAR2_cell_talk", + "MAR2_foot_tap", +}; +char const *aMAR3Animations[] = { + "MAR3_hoochy", + "MAR3_note_idle", + "MAR3_note_pick", +}; +char const *aSAL1Animations[] = { + "SAL1_briefcase_down", +}; +char const *aSAL2Animations[] = { + "SAL2_idle_seated", + "SAL2_seat_to_stand", +}; +char const *aSAL3Animations[] = { + "SAL3_seated_talk", + "SAL3_seated_idle", + "SAL3_sit_down", +}; +char const *aSAL4Animations[] = { + "SAL4_dustdown", + "SAL4_girlrun", +}; +char const *aSAL6Animations[] = { + "SAL6_angry_seated", + "SAL6_idle_seated", +}; +char const *aSAL7Animations[] = { + "SAL7_lookout", +}; +char const *aVIC2Animations[] = { + "VIC2_point_angry", +}; +char const *aVIC3Animations[] = { + "VIC3_waft", + "VIC3_pickup_roll", +}; +char const *aVIC4Animations[] = { + "VIC4_carry_box", + "VIC4_cell_look", + "VIC4_crate_idle", +}; +char const *aVIC6Animations[] = { + "VIC6_cell_angry", +}; +char const *aTouristAnimations[] = { + "tourist3", + "tourist2", + "tourist1", +}; +char const *aMAC2Animations[] = { + "MAC2_plead", +}; +char const *aVIC7Animations[] = { + "VIC7_prod_with_foot", }; -#endif #define awc(a) ARRAY_SIZE(a), a const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS] = { @@ -925,6 +1101,7 @@ const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_ { "sniper", "sniper", MI_COP, awc(aSniperAnimations), aWeaponAnimDescs }, { "grenade", "grenade", MI_COP, awc(aThrowAnimations), aWeaponAnimDescs }, { "flame", "flame", MI_COP, awc(aFlamethrowerAnimations), aWeaponAnimDescs }, + { "rocketla", "rocketla", MI_COP, awc(aRocketLauncherAnimations), aWeaponAnimDescs }, { "medic", "medic", MI_COP, awc(aMedicAnimations), aMedicAnimDescs }, { "sunbathe", "sunbathe", MI_COP, 1, aSunbatheAnimations, aSunbatheAnimDescs }, // NB: not using awc here! { "playidles", "playidles", MI_COP, awc(aPlayerIdleAnimations), aPlayerIdleAnimDescs }, @@ -935,7 +1112,8 @@ const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_ { "playerrocket", "ped", MI_COP, awc(aPlayerWithRocketAnimations), aStdAnimDescs }, { "player1armed", "ped", MI_COP, awc(aPlayer1ArmedAnimations), aStdAnimDescs }, { "player2armed", "ped", MI_COP, awc(aPlayer2ArmedAnimations), aStdAnimDescs }, - { "playerBBBat", "ped", MI_COP, awc(aPlayerBBBatAnimations), aStdAnimDescs }, + { "playerBBBat", "ped", MI_COP, awc(aPlayer1ArmedAnimations), aStdAnimDescs }, + { "aicsaw2", "ped", MI_COP, awc(aAIChainsawAnimations), aStdAnimDescs }, { "playercsaw", "ped", MI_COP, awc(aPlayerChainsawAnimations), aStdAnimDescs }, { "shuffle", "ped", MI_COP, awc(aShuffleAnimations), aStdAnimDescs }, { "oldman", "ped", MI_COP, awc(aOldAnimations), aStdAnimDescs }, @@ -953,17 +1131,39 @@ const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_ { "jogwoman", "ped", MI_COP, awc(aJoggerWomanAnimations), aStdAnimDescs }, { "panicchunky", "ped", MI_COP, awc(aPanicChunkyAnimations), aStdAnimDescs }, { "skate", "skate", MI_COP, awc(aSkateAnimations), aStdAnimDescs }, -#ifdef PC_PLAYER_CONTROLS +#ifdef PC_PLAYER_CONTROLS // strangely enabled even on PS2 { "playerback", "ped", MI_COP, awc(aPlayerStrafeBackAnimations), aStdAnimDescs }, { "playerleft", "ped", MI_COP, awc(aPlayerStrafeLeftAnimations), aStdAnimDescsSide }, { "playerright", "ped", MI_COP, awc(aPlayerStrafeRightAnimations), aStdAnimDescsSide }, { "rocketback", "ped", MI_COP, awc(aRocketStrafeBackAnimations), aStdAnimDescs }, { "rocketleft", "ped", MI_COP, awc(aRocketStrafeLeftAnimations), aStdAnimDescsSide }, { "rocketright", "ped", MI_COP, awc(aRocketStrafeRightAnimations), aStdAnimDescsSide }, - { "csawback", "ped", MI_COP, awc(aChainsawStrafeBackAnimations), aStdAnimDescs }, - { "csawleft", "ped", MI_COP, awc(aChainsawStrafeLeftAnimations), aStdAnimDescsSide }, - { "csawright", "ped", MI_COP, awc(aChainsawStrafeRightAnimations), aStdAnimDescsSide }, #endif + + { "MPNote", "MPNote", MI_COP, awc(aMPNoteAnimations), aMPNoteAnimDescs }, + { "CS_MISC", "CS_MISC", MI_COP, awc(aCSMiscAnimations), aCSMiscAnimDescs }, + { "DONH2", "DONH2", MI_COP, awc(aDONH2Animations), aDONH2AnimDescs }, + { "DONH3", "DONH3", MI_COP, awc(aDONH3Animations), aDONH3AnimDescs }, + { "JDT2", "JDT2", MI_COP, awc(aJDT2Animations), aJDT2AnimDescs }, + { "JDT4", "JDT4", MI_COP, awc(aJDT4Animations), aJDT4AnimDescs }, + { "JDT5", "JDT5", MI_COP, awc(aJDT5Animations), aJDT5AnimDescs }, + { "JDT6", "JDT6", MI_COP, awc(aJDT6Animations), aJDT6AnimDescs }, + { "MAR1", "MAR1", MI_COP, awc(aMAR1Animations), aMAR1AnimDescs }, + { "MAR2", "MAR2", MI_COP, awc(aMAR2Animations), aMAR2AnimDescs }, + { "MAR3", "MAR3", MI_COP, awc(aMAR3Animations), aMAR3AnimDescs }, + { "SAL1", "SAL1", MI_COP, awc(aSAL1Animations), aSAL1AnimDescs }, + { "SAL2", "SAL2", MI_COP, awc(aSAL2Animations), aSAL2AnimDescs }, + { "SAL3", "SAL3", MI_COP, awc(aSAL3Animations), aSAL3AnimDescs }, + { "SAL4", "SAL4", MI_COP, awc(aSAL4Animations), aSAL4AnimDescs }, + { "SAL6", "SAL6", MI_COP, awc(aSAL6Animations), aSAL6AnimDescs }, + { "SAL7", "SAL7", MI_COP, awc(aSAL7Animations), aSAL7AnimDescs }, + { "VIC2", "VIC2", MI_COP, awc(aVIC2Animations), aVIC2AnimDescs }, + { "VIC3", "VIC3", MI_COP, awc(aVIC3Animations), aVIC3AnimDescs }, + { "VIC4", "VIC4", MI_COP, awc(aVIC4Animations), aVIC4AnimDescs }, + { "VIC6", "VIC6", MI_COP, awc(aVIC6Animations), aVIC6AnimDescs }, + { "TOURIST", "TOURIST", MI_COP, awc(aTouristAnimations), aTouristAnimDescs }, + { "MAC2", "MAC2", MI_COP, awc(aMAC2Animations), aMAC2AnimDescs }, + { "VIC7", "VIC7", MI_COP, awc(aVIC7Animations), aVIC7AnimDescs }, }; #undef awc diff --git a/src/animation/AnimManager.h b/src/animation/AnimManager.h index 213326b6..9f556b54 100644 --- a/src/animation/AnimManager.h +++ b/src/animation/AnimManager.h @@ -29,6 +29,7 @@ enum AssocGroupId ASSOCGRP_SNIPER, ASSOCGRP_THROW, ASSOCGRP_FLAMETHROWER, + ASSOCGRP_ROCKETLAUNCHER, ASSOCGRP_MEDIC, ASSOCGRP_SUNBATHE, ASSOCGRP_PLAYER_IDLE, @@ -40,6 +41,7 @@ enum AssocGroupId ASSOCGRP_PLAYER1ARMED, ASSOCGRP_PLAYER2ARMED, ASSOCGRP_PLAYERBBBAT, + ASSOCGRP_AICHAINSAW, ASSOCGRP_PLAYERCHAINSAW, ASSOCGRP_SHUFFLE, ASSOCGRP_OLD, @@ -64,11 +66,33 @@ enum AssocGroupId ASSOCGRP_ROCKETBACK, ASSOCGRP_ROCKETLEFT, ASSOCGRP_ROCKETRIGHT, - ASSOCGRP_CHAINSAWBACK, - ASSOCGRP_CHAINSAWLEFT, - ASSOCGRP_CHAINSAWRIGHT, #endif + ASSOCGRP_MPNOTE, + ASSOCGRP_CSMISC, + ASSOCGRP_DONH2, + ASSOCGRP_DONH3, + ASSOCGRP_JDT2, + ASSOCGRP_JDT4, + ASSOCGRP_JDT5, + ASSOCGRP_JDT6, + ASSOCGRP_MAR1, + ASSOCGRP_MAR2, + ASSOCGRP_MAR3, + ASSOCGRP_SAL1, + ASSOCGRP_SAL2, + ASSOCGRP_SAL3, + ASSOCGRP_SAL4, + ASSOCGRP_SAL6, + ASSOCGRP_SAL7, + ASSOCGRP_VIC2, + ASSOCGRP_VIC3, + ASSOCGRP_VIC4, + ASSOCGRP_VIC6, + ASSOCGRP_TOURIST, + ASSOCGRP_MAC2, + ASSOCGRP_VIC7, + NUM_ANIM_ASSOC_GROUPS }; diff --git a/src/animation/AnimationId.h b/src/animation/AnimationId.h index 0b5d8d8e..5a8f7289 100644 --- a/src/animation/AnimationId.h +++ b/src/animation/AnimationId.h @@ -40,42 +40,25 @@ enum AnimationId ANIM_STD_HIT_BACK, ANIM_STD_HIT_RIGHT, ANIM_STD_HIT_FLOOR, - - /* names made up */ - ANIM_STD_HIT_BODYBLOW, - ANIM_STD_HIT_CHEST, - ANIM_STD_HIT_HEAD, - ANIM_STD_HIT_WALK, - /**/ - ANIM_STD_HIT_WALL, ANIM_STD_HIT_FLOOR_FRONT, ANIM_STD_HIT_BEHIND, ANIM_STD_FIGHT_IDLE, ANIM_STD_FIGHT_2IDLE, ANIM_STD_FIGHT_SHUFFLE_F, - - /* names made up */ - ANIM_STD_FIGHT_BODYBLOW, - ANIM_STD_FIGHT_HEAD, - ANIM_STD_FIGHT_KICK, - ANIM_STD_FIGHT_KNEE, - ANIM_STD_FIGHT_LHOOK, - ANIM_STD_FIGHT_PUNCH, - ANIM_STD_FIGHT_ROUNDHOUSE, - ANIM_STD_FIGHT_LONGKICK, - /**/ - ANIM_STD_PARTIAL_PUNCH, - - /* names made up */ - ANIM_STD_FIGHT_JAB, - ANIM_STD_FIGHT_ELBOW_L, - ANIM_STD_FIGHT_ELBOW_R, - ANIM_STD_FIGHT_BKICK_L, - ANIM_STD_FIGHT_BKICK_R, - /**/ - + ANIM_FIGHT_ATTACK_A1, + ANIM_FIGHT_ATTACK_A2, + ANIM_FIGHT_ATTACK_A3, + ANIM_FIGHT_ATTACK_B1, + ANIM_FIGHT_ATTACK_B2, + ANIM_FIGHT_ATTACK_B3, + ANIM_FIGHT_HIT_A1, + ANIM_FIGHT_HIT_A2, + ANIM_FIGHT_HIT_A3, + ANIM_FIGHT_HIT_B1, + ANIM_FIGHT_HIT_B2, + ANIM_FIGHT_HIT_B3, ANIM_STD_DETONATE, ANIM_STD_PUNCH, ANIM_STD_PARTIALPUNCH, @@ -174,6 +157,7 @@ enum AnimationId ANIM_STD_EVADE_STEP, ANIM_STD_EVADE_DIVE, + ANIM_STD_COMMANDO_ROLL, ANIM_STD_XPRESS_SCRATCH, ANIM_STD_ROADCROSS, ANIM_STD_TURN180, @@ -284,4 +268,65 @@ enum AnimationId ANIM_STRIP_E, ANIM_STRIP_F, ANIM_STRIP_G, + + + ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, + ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, + + ANIM_CS_MISC_IDLE_LOOK, + ANIM_CS_MISC_IDLE_NO, + ANIM_CS_MISC_IDLE_YES, + ANIM_CS_MISC_IDLE_CHAT2, + ANIM_CS_MISC_IDLE_COUGH, + ANIM_CS_MISC_IDLE_GIGGLE_FEMALE, + ANIM_CS_MISC_IDLE_TOUGH_CHAT, + ANIM_CS_MISC_IDLE_CELL_TALK, + + ANIM_DONH2_CAMERA, + ANIM_DONH3_HAPPY, + + ANIM_JDT2_ANXIOUS_TALK, + ANIM_JDT2_SHRUG, + ANIM_JDT4_DILDO_TALK, + ANIM_JDT5_CALM_DOWN, + ANIM_JDT5_POINT, + ANIM_JDT6_PICKUP, + ANIM_JDT6_KNOCK, + + ANIM_MAR1_SKIRT, + ANIM_MAR2_CELL_ANSWER, + ANIM_MAR2_CELL_END, + ANIM_MAR2_CELL_TALK, + ANIM_MAR2_FOOT_TAP, + ANIM_MAR3_HOOCHY, + ANIM_MAR3_NOTE_IDLE, + ANIM_MAR3_NOTE_PICKUP, + + ANIM_SAL1_BIREFCASE_DOWN, + ANIM_SAL2_IDLE_SEATED, + ANIM_SAL2_SEAT_TO_STAND, + ANIM_SAL3_SEATED_TALK, + ANIM_SAL3_SEATED_IDLE, + ANIM_SAL3_SIT_DOWN, + ANIM_SAL4_DUST_DOWN, + ANIM_SAL4_GIRL_RUN, + ANIM_SAL6_ANGRY_SEATED, + ANIM_SAL6_IDLE_SEATED, + ANIM_SAL7_LOOKOUT, + + ANIM_VIC2_POINT_ANGRY, + ANIM_VIC3_WAFT, + ANIM_VIC3_PICKUP_ROLL, + ANIM_VIC4_CARRY_BOX, + ANIM_VIC4_CELL_LOOK, + ANIM_VIC4_CRATE_IDLE, + ANIM_VIC6_CELL_ANGRY, + + ANIM_TOURIST3, + ANIM_TOURIST2, + ANIM_TOURIST1, + + ANIM_MAC2_PLEAD, + + ANIM_VIC7_PROD_WITH_FOOT };
\ No newline at end of file diff --git a/src/animation/CutsceneMgr.cpp b/src/animation/CutsceneMgr.cpp index 633618b1..088cb413 100644 --- a/src/animation/CutsceneMgr.cpp +++ b/src/animation/CutsceneMgr.cpp @@ -22,590 +22,84 @@ #include "ColStore.h" #include "Radar.h" #include "Pools.h" +#include "crossplatform.h" -const struct { - const char *szTrackName; - int iTrackId; -} musicNameIdAssoc[] = { - { "ASS_1", STREAMED_SOUND_CUTSCENE_ASS_1 }, - { "ASS_2", STREAMED_SOUND_CUTSCENE_ASS_2 }, - { "BANK_1", STREAMED_SOUND_CUTSCENE_BANK_1 }, - { "BANK_2A", STREAMED_SOUND_CUTSCENE_BANK_2A }, - { "BANK_2B", STREAMED_SOUND_CUTSCENE_BANK_2B }, - { "BANK_3A", STREAMED_SOUND_CUTSCENE_BANK_3A }, - { "BANK_3B", STREAMED_SOUND_CUTSCENE_BANK_3B }, - { "BANK_4", STREAMED_SOUND_CUTSCENE_BANK_4 }, - { "BIKE_1", STREAMED_SOUND_CUTSCENE_BIKE_1 }, - { "BIKE_2", STREAMED_SOUND_CUTSCENE_BIKE_2 }, - { "BIKE_3", STREAMED_SOUND_CUTSCENE_BIKE_3 }, - { "BUD_1", STREAMED_SOUND_CUTSCENE_BUD_1 }, - { "BUD_2", STREAMED_SOUND_CUTSCENE_BUD_2 }, - { "BUD_3", STREAMED_SOUND_CUTSCENE_BUD_3 }, - { "CAP_1", STREAMED_SOUND_CUTSCENE_CAP_1 }, - { "CAR_1", STREAMED_SOUND_CUTSCENE_CAR_1 }, - { "CNT_1A", STREAMED_SOUND_CUTSCENE_CNT_1A }, - { "CNT_1B", STREAMED_SOUND_CUTSCENE_CNT_1B }, - { "CNT_2", STREAMED_SOUND_CUTSCENE_CNT_2 }, - { "COK_1", STREAMED_SOUND_CUTSCENE_COK_1 }, - { "COK_2A", STREAMED_SOUND_CUTSCENE_COK_2A }, - { "COK_2B", STREAMED_SOUND_CUTSCENE_COK_2B }, - { "COK_3", STREAMED_SOUND_CUTSCENE_COK_3 }, - { "COK_4A", STREAMED_SOUND_CUTSCENE_COK_4A }, - { "COK_4A2", STREAMED_SOUND_CUTSCENE_COK_4A2 }, - { "COK_4B", STREAMED_SOUND_CUTSCENE_COK_4B }, - { "COL_1", STREAMED_SOUND_CUTSCENE_COL_1 }, - { "COL_2", STREAMED_SOUND_CUTSCENE_COL_2 }, - { "COL_3A", STREAMED_SOUND_CUTSCENE_COL_3A }, - { "COL_4A", STREAMED_SOUND_CUTSCENE_COL_4A }, - { "COL_5A", STREAMED_SOUND_CUTSCENE_COL_5A }, - { "COL_5B", STREAMED_SOUND_CUTSCENE_COL_5B }, - { "CUB_1", STREAMED_SOUND_CUTSCENE_CUB_1 }, - { "CUB_2", STREAMED_SOUND_CUTSCENE_CUB_2 }, - { "CUB_3", STREAMED_SOUND_CUTSCENE_CUB_3 }, - { "CUB_4", STREAMED_SOUND_CUTSCENE_CUB_4 }, - { "DRUG_1", STREAMED_SOUND_CUTSCENE_DRUG_1 }, - { "FIN", STREAMED_SOUND_CUTSCENE_FIN }, - { "FIN_2", STREAMED_SOUND_CUTSCENE_FIN2 }, - { "FINALE", STREAMED_SOUND_CUTSCENE_FINALE }, - { "HAT_1", STREAMED_SOUND_CUTSCENE_HAT_1 }, - { "HAT_2", STREAMED_SOUND_CUTSCENE_HAT_2 }, - { "HAT_3", STREAMED_SOUND_CUTSCENE_HAT_3 }, - { "ICE_1", STREAMED_SOUND_CUTSCENE_ICE_1 }, - { "INT_A", STREAMED_SOUND_CUTSCENE_INT_A }, - { "INT_B", STREAMED_SOUND_CUTSCENE_INT_B }, - { "INT_D", STREAMED_SOUND_CUTSCENE_INT_D }, - { "INT_M", STREAMED_SOUND_CUTSCENE_INT_M }, - { "LAW_1A", STREAMED_SOUND_CUTSCENE_LAW_1A }, - { "LAW_1B", STREAMED_SOUND_CUTSCENE_LAW_1B }, - { "LAW_2A", STREAMED_SOUND_CUTSCENE_LAW_2A }, - { "LAW_2B", STREAMED_SOUND_CUTSCENE_LAW_2B }, - { "LAW_2C", STREAMED_SOUND_CUTSCENE_LAW_2C }, - { "LAW_3", STREAMED_SOUND_CUTSCENE_LAW_3 }, - { "LAW_4", STREAMED_SOUND_CUTSCENE_LAW_4 }, - { "PHIL_1", STREAMED_SOUND_CUTSCENE_PHIL_1 }, - { "PHIL_2", STREAMED_SOUND_CUTSCENE_PHIL_2 }, - { "PORN_1", STREAMED_SOUND_CUTSCENE_PORN_1 }, - { "PORN_2", STREAMED_SOUND_CUTSCENE_PORN_2 }, - { "PORN_3", STREAMED_SOUND_CUTSCENE_PORN_3 }, - { "PORN_4", STREAMED_SOUND_CUTSCENE_PORN_4 }, - { "RESC_1A", STREAMED_SOUND_CUTSCENE_RESC_1A }, - { "ROK_1", STREAMED_SOUND_CUTSCENE_ROK_1 }, - { "ROK_2", STREAMED_SOUND_CUTSCENE_ROK_2 }, - { "ROK_3A", STREAMED_SOUND_CUTSCENE_ROK_3A }, - { "STRIPA", STREAMED_SOUND_CUTSCENE_STRIPA }, - { "TAX_1", STREAMED_SOUND_CUTSCENE_TAX_1 }, - { "TEX_1", STREAMED_SOUND_CUTSCENE_TEX_1 }, - { "TEX_2", STREAMED_SOUND_CUTSCENE_TEX_2 }, - { "TEX_3", STREAMED_SOUND_CUTSCENE_TEX_3 }, - { "GSPOT", STREAMED_SOUND_CUTSCENE_GLIGHT }, - { "FIST", STREAMED_SOUND_CUTSCENE_FIST }, - { "EL_PH1", STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1 }, - { "EL_PH2", STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2 }, - { NULL, 0 } -}; +static bool bModelsRemovedForCutscene; +static int32 NumberOfSavedWeapons; +static eWeaponType SavedWeaponIDs[TOTAL_WEAPON_SLOTS]; +static int32 SavedWeaponAmmo[TOTAL_WEAPON_SLOTS]; -int -FindCutsceneAudioTrackId(const char *szCutsceneName) -{ - for (int i = 0; musicNameIdAssoc[i].szTrackName; i++) { - if (!CGeneral::faststricmp(musicNameIdAssoc[i].szTrackName, szCutsceneName)) - return musicNameIdAssoc[i].iTrackId; - } - return -1; -} - -bool CCutsceneMgr::ms_running; -bool CCutsceneMgr::ms_cutsceneProcessing; +char CCutsceneMgr::ms_cAppendAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH]; +char CCutsceneMgr::ms_cAppendObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH]; +int CCutsceneMgr::ms_numAppendObjectNames; CDirectory *CCutsceneMgr::ms_pCutsceneDir; -CCutsceneObject *CCutsceneMgr::ms_pCutsceneObjects[NUMCUTSCENEOBJECTS]; -int32 CCutsceneMgr::ms_numCutsceneObjs; bool CCutsceneMgr::ms_loaded; -bool CCutsceneMgr::ms_animLoaded; -bool CCutsceneMgr::ms_useLodMultiplier; -char CCutsceneMgr::ms_cutsceneName[CUTSCENENAMESIZE]; -CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations; -CVector CCutsceneMgr::ms_cutsceneOffset; -float CCutsceneMgr::ms_cutsceneTimer; +bool CCutsceneMgr::ms_hasFileInfo; bool CCutsceneMgr::ms_wasCutsceneSkipped; +bool CCutsceneMgr::ms_useLodMultiplier; +bool CCutsceneMgr::ms_cutsceneProcessing; +bool CCutsceneMgr::ms_running; +bool CCutsceneMgr::ms_animLoaded; uint32 CCutsceneMgr::ms_cutsceneLoadStatus; -bool CCutsceneMgr::ms_useCutsceneShadows = true; - -bool bCamLoaded; -bool bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver; // pls don't shrink the name :P -int32 NumberOfSavedWeapons; -eWeaponType SavedWeaponIDs[TOTAL_WEAPON_SLOTS]; -int32 SavedWeaponAmmo[TOTAL_WEAPON_SLOTS]; -char uncompressedAnims[8][32]; -uint32 numUncompressedAnims; - - -RpAtomic * -CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data) -{ - float radius = RpAtomicGetBoundingSphere(atomic)->radius; - RwV3d center = RpAtomicGetBoundingSphere(atomic)->center; - - for (RwFrame *frame = RpAtomicGetFrame(atomic); RwFrameGetParent(frame); frame = RwFrameGetParent(frame)) - RwV3dTransformPoints(¢er, ¢er, 1, RwFrameGetMatrix(frame)); - - float size = RwV3dLength(¢er) + radius; - if (size > *(float *)data) - *(float *)data = size; - return atomic; -} void -CCutsceneMgr::Initialise(void) +CCutsceneMgr::Initialise(void *dir) { - ms_numCutsceneObjs = 0; - ms_loaded = false; - ms_wasCutsceneSkipped = false; + ms_cutsceneLoadStatus = CUTSCENE_NOT_LOADED; ms_running = false; - ms_useLodMultiplier = false; ms_animLoaded = false; ms_cutsceneProcessing = false; - - ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE); - ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR"); - - numUncompressedAnims = 0; - uncompressedAnims[0][0] = '\0'; -} - -void -CCutsceneMgr::Shutdown(void) -{ - delete ms_pCutsceneDir; -} - -void -CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName) -{ - int file; - uint32 size; - uint32 offset; - CPlayerPed *pPlayerPed; - - ms_cutsceneProcessing = true; + ms_useLodMultiplier = false; ms_wasCutsceneSkipped = false; - CTimer::Suspend(); - if (!bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver) - CStreaming::RemoveCurrentZonesModels(); - - ms_pCutsceneDir->numEntries = 0; - ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR"); - - CStreaming::RemoveUnusedModelsInLoadedList(); - CGame::DrasticTidyUpMemory(true); - - strcpy(ms_cutsceneName, szCutsceneName); - - RwStream *stream; - stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG"); - assert(stream); - - // Load animations - sprintf(gString, "%s.IFP", szCutsceneName); - if (ms_pCutsceneDir->FindItem(gString, offset, size)) { - CStreaming::MakeSpaceFor(size << 11); - CStreaming::ImGonnaUseStreamingMemory(); - RwStreamSkip(stream, offset << 11); - CAnimManager::LoadAnimFile(stream, true, uncompressedAnims); - ms_cutsceneAssociations.CreateAssociations(szCutsceneName); - CStreaming::IHaveUsedStreamingMemory(); - ms_animLoaded = true; - } else { - ms_animLoaded = false; - } - RwStreamClose(stream, nil); - - // Load camera data - file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb"); - sprintf(gString, "%s.DAT", szCutsceneName); - if (ms_pCutsceneDir->FindItem(gString, offset, size)) { - CStreaming::ImGonnaUseStreamingMemory(); - CFileMgr::Seek(file, offset << 11, SEEK_SET); - TheCamera.LoadPathSplines(file); - CStreaming::IHaveUsedStreamingMemory(); - bCamLoaded = true; - } else { - bCamLoaded = false; - } - - CFileMgr::CloseFile(file); - - if (CGeneral::faststricmp(ms_cutsceneName, "finale")) { - DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE); - int trackId = FindCutsceneAudioTrackId(szCutsceneName); - if (trackId != -1) { - printf("Start preload audio %s\n", szCutsceneName); - DMAudio.PreloadCutSceneMusic(trackId); - printf("End preload audio %s\n", szCutsceneName); - } + ms_hasFileInfo = false; + //ms_numCutsceneObjs = 0; + //ms_loaded = false; + if (gMakeResources) { + ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE); + ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR"); } + else + ms_pCutsceneDir = (CDirectory*)dir; - ms_cutsceneTimer = 0.0f; - ms_loaded = true; - ms_cutsceneOffset = CVector(0.0f, 0.0f, 0.0f); - - pPlayerPed = FindPlayerPed(); - pPlayerPed->m_pWanted->ClearQdCrimes(); - pPlayerPed->bIsVisible = false; - pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina; - CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE); - CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true); - - CTimer::Resume(); -} - -void -CCutsceneMgr::FinishCutscene() -{ - ms_wasCutsceneSkipped = true; - if (bCamLoaded) { - CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f; - TheCamera.FinishCutscene(); - } - - FindPlayerPed()->bIsVisible = true; - CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false); + //numUncompressedAnims = 0; + //uncompressedAnims[0][0] = '\0'; } -void -CCutsceneMgr::SetupCutsceneToStart(void) +void CCutsceneMgr::Write(base::cRelocatableChunkWriter& writer) { - if (bCamLoaded) { - TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset); - TheCamera.TakeControlWithSpline(JUMP_CUT); - TheCamera.SetWideScreenOn(); - } - - ms_cutsceneOffset.z++; - - for (int i = ms_numCutsceneObjs - 1; i >= 0; i--) { - assert(RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP); - if (CAnimBlendAssociation *pAnimBlendAssoc = RpAnimBlendClumpGetFirstAssociation((RpClump*)ms_pCutsceneObjects[i]->m_rwObject)) { - assert(pAnimBlendAssoc->hierarchy->sequences[0].HasTranslation()); - if (ms_pCutsceneObjects[i]->m_pAttachTo != nil) { - pAnimBlendAssoc->flags &= (~ASSOC_HAS_TRANSLATION); - } else { - if (pAnimBlendAssoc->hierarchy->IsCompressed()){ - KeyFrameTransCompressed *keyFrames = ((KeyFrameTransCompressed*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrameCompressed(0)); - CVector trans; - keyFrames->GetTranslation(&trans); - ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + trans); - }else{ - KeyFrameTrans *keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0)); - ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + keyFrames->translation); - } - } - pAnimBlendAssoc->SetRun(); - } else { - ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset); - } - CWorld::Add(ms_pCutsceneObjects[i]); - if (RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP) { - ms_pCutsceneObjects[i]->UpdateRpHAnim(); - } - } - - CTimer::Update(); - CTimer::Update(); - ms_running = true; - ms_cutsceneTimer = 0.0f; + writer.AllocateRaw(ms_pCutsceneDir, sizeof(*ms_pCutsceneDir), 4, false, true); + writer.AllocateRaw(ms_pCutsceneDir->entries, sizeof(CDirectory::DirectoryInfo) * ms_pCutsceneDir->numEntries, 4, false, true); + writer.AddPatch(ms_pCutsceneDir); } void -CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject) +CCutsceneMgr::Shutdown(void) { - CAnimBlendAssociation *pNewAnim; - CAnimBlendClumpData *pAnimBlendClumpData; - - assert(RwObjectGetType(pObject->m_rwObject) == rpCLUMP); - debug("Give cutscene anim %s\n", animName); - RpAnimBlendClumpRemoveAllAssociations((RpClump*)pObject->m_rwObject); - - pNewAnim = ms_cutsceneAssociations.GetAnimation(animName); - if (!pNewAnim) { - debug("\n\nHaven't I told you I can't find the fucking animation %s\n\n\n", animName); - return; - } - - if (pNewAnim->hierarchy->IsCompressed()) - pNewAnim->hierarchy->keepCompressed = true; - - CStreaming::ImGonnaUseStreamingMemory(); - pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName); - CStreaming::IHaveUsedStreamingMemory(); - - pNewAnim->SetCurrentTime(0.0f); - pNewAnim->flags |= ASSOC_HAS_TRANSLATION; - pNewAnim->flags &= ~ASSOC_RUNNING; - - pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject); - pAnimBlendClumpData->link.Prepend(&pNewAnim->link); - - if (pNewAnim->hierarchy->keepCompressed) - pAnimBlendClumpData->frames->flag |= AnimBlendFrameData::COMPRESSED; + delete ms_pCutsceneDir; } void -CCutsceneMgr::SetCutsceneAnimToLoop(const char* animName) -{ - ms_cutsceneAssociations.GetAnimation(animName)->flags |= ASSOC_REPEAT; -} - -CCutsceneHead * -CCutsceneMgr::AddCutsceneHead(CObject *pObject, int modelId) -{ - return nil; -} - -void UpdateCutsceneObjectBoundingBox(RpClump* clump, int modelId) -{ - if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) { - CColModel* pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01]; - float radius = 0.0f; - RpClumpForAllAtomics(clump, CalculateBoundingSphereRadiusCB, &radius); - pColModel->boundingSphere.radius = radius; - pColModel->boundingBox.min = CVector(-radius, -radius, -radius); - pColModel->boundingBox.max = CVector(radius, radius, radius); - } -} - -CCutsceneObject * -CCutsceneMgr::CreateCutsceneObject(int modelId) +CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName) { - CBaseModelInfo *pModelInfo; - CColModel *pColModel; - CCutsceneObject *pCutsceneObject; - - CStreaming::ImGonnaUseStreamingMemory(); - debug("Created cutscene object %s\n", CModelInfo::GetModelInfo(modelId)->GetModelName()); - if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) { - pModelInfo = CModelInfo::GetModelInfo(modelId); - pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01]; - pModelInfo->SetColModel(pColModel); - UpdateCutsceneObjectBoundingBox((RpClump*)pModelInfo->GetRwObject(), modelId); - } else if (modelId >= MI_SPECIAL01 && modelId <= MI_SPECIAL21) { - pModelInfo = CModelInfo::GetModelInfo(modelId); - if (pModelInfo->GetColModel() == &CTempColModels::ms_colModelPed1) { - CColModel *colModel = new CColModel(); - colModel->boundingSphere.radius = 2.0f; - colModel->boundingSphere.center = CVector(0.0f, 0.0f, 0.0f); - pModelInfo->SetColModel(colModel, true); - } - pColModel = pModelInfo->GetColModel(); - float radius = 2.0f; - pColModel->boundingSphere.radius = radius; - pColModel->boundingBox.min = CVector(-radius, -radius, -radius); - pColModel->boundingBox.max = CVector(radius, radius, radius); - } - - pCutsceneObject = new CCutsceneObject(); - pCutsceneObject->SetModelIndex(modelId); - if (ms_useCutsceneShadows) - pCutsceneObject->CreateShadow(); - ms_pCutsceneObjects[ms_numCutsceneObjs++] = pCutsceneObject; - CStreaming::IHaveUsedStreamingMemory(); - return pCutsceneObject; + LoadCutsceneData_overlay(szCutsceneName); } void CCutsceneMgr::DeleteCutsceneData(void) { - if (!ms_loaded) return; - CTimer::Suspend(); - - ms_cutsceneProcessing = false; - ms_useLodMultiplier = false; - ms_useCutsceneShadows = true; - - for (--ms_numCutsceneObjs; ms_numCutsceneObjs >= 0; ms_numCutsceneObjs--) { - CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]); - ms_pCutsceneObjects[ms_numCutsceneObjs]->DeleteRwObject(); - delete ms_pCutsceneObjects[ms_numCutsceneObjs]; - ms_pCutsceneObjects[ms_numCutsceneObjs] = nil; - } - ms_numCutsceneObjs = 0; - - for (int i = MI_SPECIAL01; i < MI_SPECIAL21; i++) { - CBaseModelInfo *minfo = CModelInfo::GetModelInfo(i); - CColModel *colModel = minfo->GetColModel(); - if (colModel != &CTempColModels::ms_colModelPed1) { - delete colModel; - minfo->SetColModel(&CTempColModels::ms_colModelPed1); - } - } - - if (ms_animLoaded) - CAnimManager::RemoveLastAnimFile(); - - ms_animLoaded = false; - numUncompressedAnims = 0; - uncompressedAnims[0][0] = '\0'; - - if (bCamLoaded) { - TheCamera.RestoreWithJumpCut(); - TheCamera.SetWideScreenOff(); - TheCamera.DeleteCutSceneCamDataMemory(); - } - ms_running = false; - ms_loaded = false; - - FindPlayerPed()->bIsVisible = true; - CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE); - CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false); - - if (CGeneral::faststricmp(ms_cutsceneName, "finale")) { - DMAudio.StopCutSceneMusic(); - DMAudio.ChangeMusicMode(MUSICMODE_GAME); - } - - CStreaming::ms_disableStreaming = false; - CWorld::bProcessCutsceneOnly = false; - - if(bCamLoaded) - CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2); - - CPad::GetPad(0)->Clear(false); - if (bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver) { - CStreaming::LoadInitialPeds(); - CStreaming::LoadInitialWeapons(); - CStreaming::LoadInitialVehicles(); - bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = false; - - CPlayerPed *pPlayerPed = FindPlayerPed(); - for (int i = 0; i < NumberOfSavedWeapons; i++) { - int32 weaponModelId = CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModelId; - uint8 flags = CStreaming::ms_aInfoForModel[weaponModelId].m_flags; - CStreaming::RequestModel(weaponModelId, STREAMFLAGS_DONT_REMOVE); - CStreaming::LoadAllRequestedModels(false); - if (CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id != -1) { - CStreaming::RequestModel(CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id, 0); - CStreaming::LoadAllRequestedModels(false); - } - if (!(flags & STREAMFLAGS_DONT_REMOVE)) - CStreaming::SetModelIsDeletable(weaponModelId); - pPlayerPed->GiveWeapon(SavedWeaponIDs[i], SavedWeaponAmmo[i], true); - } - NumberOfSavedWeapons = 0; - } - - CTimer::Resume(); -} - -void -CCutsceneMgr::Update(void) -{ - enum { - CUTSCENE_LOADING_0 = 0, - CUTSCENE_LOADING_AUDIO, - CUTSCENE_LOADING_2, - CUTSCENE_LOADING_3, - CUTSCENE_LOADING_4 - }; - - switch (ms_cutsceneLoadStatus) { - case CUTSCENE_LOADING_AUDIO: - SetupCutsceneToStart(); - if (CGeneral::faststricmp(ms_cutsceneName, "finale")) - DMAudio.PlayPreloadedCutSceneMusic(); - ms_cutsceneLoadStatus++; - break; - case CUTSCENE_LOADING_2: - case CUTSCENE_LOADING_3: - ms_cutsceneLoadStatus++; - break; - case CUTSCENE_LOADING_4: - ms_cutsceneLoadStatus = CUTSCENE_LOADING_0; - break; - default: - break; - } - - if (!ms_running) return; - - ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds(); - - for (int i = 0; i < ms_numCutsceneObjs; i++) { - int modelId = ms_pCutsceneObjects[i]->GetModelIndex(); - if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) - UpdateCutsceneObjectBoundingBox(ms_pCutsceneObjects[i]->GetClump(), modelId); - - if (ms_pCutsceneObjects[i]->m_pAttachTo != nil && modelId >= MI_SPECIAL01 && modelId <= MI_SPECIAL21) - UpdateCutsceneObjectBoundingBox(ms_pCutsceneObjects[i]->GetClump(), modelId); - } - - if (bCamLoaded) - if (CGeneral::faststricmp(ms_cutsceneName, "finale") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) { - if (CPad::GetPad(0)->GetCrossJustDown() - || (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown()) - || CPad::GetPad(0)->GetLeftMouseJustDown() - || CPad::GetPad(0)->GetEnterJustDown() - || CPad::GetPad(0)->GetCharJustDown(' ')) - FinishCutscene(); - } -} - -bool CCutsceneMgr::HasCutsceneFinished(void) { return !bCamLoaded || TheCamera.GetPositionAlongSpline() == 1.0f; } - -void -CCutsceneMgr::LoadAnimationUncompressed(char const* name) -{ - strcpy(uncompressedAnims[numUncompressedAnims], name); - - // Because that's how CAnimManager knows the end of array - ++numUncompressedAnims; - assert(numUncompressedAnims < ARRAY_SIZE(uncompressedAnims)); - uncompressedAnims[numUncompressedAnims][0] = '\0'; -} - -void -CCutsceneMgr::AttachObjectToParent(CObject *pObject, CEntity *pAttachTo) -{ - ((CCutsceneObject*)pObject)->m_pAttachmentObject = nil; - ((CCutsceneObject*)pObject)->m_pAttachTo = RpClumpGetFrame(pAttachTo->GetClump()); - - debug("Attach %s to %s\n", CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); -} - -void -CCutsceneMgr::AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame) -{ - ((CCutsceneObject*)pObject)->m_pAttachmentObject = nil; - ((CCutsceneObject*)pObject)->m_pAttachTo = RpAnimBlendClumpFindFrame(pAttachTo->GetClump(), frame)->frame; - debug("Attach %s to component %s of %s\n", - CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), - frame, - CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); - if (RwObjectGetType(pObject->m_rwObject) == rpCLUMP) { - RpClump *clump = (RpClump*)pObject->m_rwObject; - if (IsClumpSkinned(clump)) - RpAtomicGetBoundingSphere(GetFirstAtomic(clump))->radius *= 1.1f; - } + DeleteCutsceneData_overlay(); + if (bModelsRemovedForCutscene) + LoadEverythingBecauseCutsceneDeletedAllOfIt(); } void -CCutsceneMgr::AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int bone) +CCutsceneMgr::RemoveEverythingBecauseCutsceneDoesntFitInMemory() { - RpHAnimHierarchy *hanim = GetAnimHierarchyFromSkinClump(pAttachTo->GetClump()); - RwInt32 id = RpHAnimIDGetIndex(hanim, bone); - RwMatrix *matrixArray = RpHAnimHierarchyGetMatrixArray(hanim); - ((CCutsceneObject*)pObject)->m_pAttachmentObject = pAttachTo; - ((CCutsceneObject*)pObject)->m_pAttachTo = &matrixArray[id]; - debug("Attach %s to %s\n", - CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), - CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); -} - -void -CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver() -{ - CStreaming::ms_disableStreaming = true; + //CStreaming::ms_disableStreaming = true; + CWorld::ClearExcitingStuffFromArea(FindPlayerCoors(), 120.0f, true); CColStore::RemoveAllCollision(); CWorld::bProcessCutsceneOnly = true; - ms_cutsceneProcessing = true; + /*ms_cutsceneProcessing = true; for (int i = CPools::GetPedPool()->GetSize() - 1; i >= 0; i--) { CPed *pPed = CPools::GetPedPool()->GetSlot(i); @@ -626,25 +120,21 @@ CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver() } } } - - bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = true; + CWorld::bProcessCutsceneOnly = true; + //bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = true;*/ CStreaming::RemoveCurrentZonesModels(); + while (CStreaming::RemoveLoadedVehicle()); + CRadar::RemoveRadarSections(); CStreaming::SetModelIsDeletable(MI_MALE01); CStreaming::SetModelTxdIsDeletable(MI_MALE01); - CStreaming::SetModelIsDeletable(MI_TAXI_D); - CStreaming::SetModelTxdIsDeletable(MI_TAXI_D); + CStreaming::SetModelIsDeletable(MI_COLT45); + CStreaming::SetModelTxdIsDeletable(MI_COLT45); CStreaming::SetModelIsDeletable(MI_NIGHTSTICK); CStreaming::SetModelTxdIsDeletable(MI_NIGHTSTICK); CStreaming::SetModelIsDeletable(MI_MISSILE); CStreaming::SetModelTxdIsDeletable(MI_MISSILE); - CStreaming::SetModelIsDeletable(MI_POLICE); - CStreaming::SetModelTxdIsDeletable(MI_POLICE); - - while (CStreaming::RemoveLoadedVehicle()) ; - - CRadar::RemoveRadarSections(); - for (int i = CPools::GetDummyPool()->GetSize() - 1; i >= 0; i--) { + /*for (int i = CPools::GetDummyPool()->GetSize() - 1; i >= 0; i--) { CDummy* pDummy = CPools::GetDummyPool()->GetSlot(i); if (pDummy) pDummy->DeleteRwObject(); @@ -664,7 +154,7 @@ CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver() if (!pBuilding->bImBeingRendered) pBuilding->DeleteRwObject(); } - } + }*/ CPlayerPed *pPlayerPed = FindPlayerPed(); pPlayerPed->RemoveWeaponAnims(0, -1000.0f); @@ -679,5 +169,69 @@ CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver() } pPlayerPed->ClearWeapons(); - CGame::DrasticTidyUpMemory(true); + bModelsRemovedForCutscene = true; + //CGame::DrasticTidyUpMemory(true); +} + +void +CCutsceneMgr::LoadEverythingBecauseCutsceneDeletedAllOfIt() +{ + bModelsRemovedForCutscene = false; + CStreaming::LoadInitialPeds(); + CStreaming::LoadInitialWeapons(); + //CStreaming::LoadInitialVehicles(); + + CPlayerPed *pPlayerPed = FindPlayerPed(); + for (int i = 0; i < NumberOfSavedWeapons; i++) { + int32 weaponModelId = CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModelId; + uint8 flags = CStreaming::ms_aInfoForModel[weaponModelId].m_flags; + CStreaming::RequestModel(weaponModelId, STREAMFLAGS_DONT_REMOVE); + CStreaming::LoadAllRequestedModels(false); + if (CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id != -1) { + CStreaming::RequestModel(CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id, 0); + CStreaming::LoadAllRequestedModels(false); + } + if (!(flags & STREAMFLAGS_DONT_REMOVE)) + CStreaming::SetModelIsDeletable(weaponModelId); + pPlayerPed->GiveWeapon(SavedWeaponIDs[i], SavedWeaponAmmo[i], true); + } + NumberOfSavedWeapons = 0; +} + +void +CCutsceneMgr::Update(void) +{ + if (ms_cutsceneLoadStatus != CUTSCENE_NOT_LOADED) + Update_overlay(); +} + +void +CCutsceneMgr::LoadAnimationUncompressed(char const* name) +{ + strcpy(ms_aUncompressedCutsceneAnims[ms_numUncompressedCutsceneAnims], name); + + // Because that's how CAnimManager knows the end of array + ++ms_numUncompressedCutsceneAnims; + assert(ms_numUncompressedCutsceneAnims < ARRAY_SIZE(ms_aUncompressedCutsceneAnims)); + ms_aUncompressedCutsceneAnims[ms_numUncompressedCutsceneAnims][0] = '\0'; +} + + +bool +CCutsceneMgr::IsCutsceneSkipButtonBeingPressed() +{ + return (CPad::GetPad(0)->GetCrossJustDown() + || CPad::GetPad(0)->GetLeftMouseJustDown() + || CPad::GetPad(0)->GetEnterJustDown() + || CPad::GetPad(0)->GetCharJustDown(' ')); +} + +void +CCutsceneMgr::AppendToNextCutscene(const char *object, const char *anim) +{ + strcpy(ms_cAppendObjectName[ms_numAppendObjectNames], object); + strlwr(ms_cAppendObjectName[ms_numAppendObjectNames]); + strcpy(ms_cAppendAnimName[ms_numAppendObjectNames], anim); + strlwr(ms_cAppendAnimName[ms_numAppendObjectNames]); + ms_numAppendObjectNames++; }
\ No newline at end of file diff --git a/src/animation/CutsceneMgr.h b/src/animation/CutsceneMgr.h index 51ef6c04..7c749d4b 100644 --- a/src/animation/CutsceneMgr.h +++ b/src/animation/CutsceneMgr.h @@ -1,14 +1,69 @@ #pragma once #include "CutsceneObject.h" -#define CUTSCENENAMESIZE 8 class CDirectory; class CAnimBlendAssocGroup; class CCutsceneHead; +enum { + CUTSCENE_NOT_LOADED = 0, + CUTSCENE_LOADING, + CUTSCENE_LOADED, +}; + +enum { + CUTSCENE_PLAYING_0 = 0, + CUTSCENE_STARTED, + CUTSCENE_PLAYING_2, + CUTSCENE_PLAYING_3, + CUTSCENE_PLAYING_4, +}; + +enum +{ + NAMELENGTH = 32, + NUM_CUTS_PARTICLE_EFFECTS = 8, + NUM_CUTS_MAX_TEXTS = 64, + NUM_CUTS_UNCOMPRESSED_ANIMS = 8, + TEXT_KEY_SIZE = 8, + CUTSCENENAMESIZE = 8 +}; + +struct sToHideItem +{ + float x, y, z; + char name[NAMELENGTH]; +}; + +// TODO: figure out from SA +// this is unused in LCS anyway +struct sParticleEffect +{ + char name[NAMELENGTH]; + bool bPlayed; // ?? + int iTime; + int unk1; + int unk2; + char name2[NAMELENGTH]; + float x; + float y; + float z; + float unkX; + float unkY; + float unkZ; + bool unk10; + bool unk11; +}; + +struct sAttachInfo +{ + int attachToId, objectId, boneId; +}; + class CCutsceneMgr { + static bool ms_running; static CCutsceneObject *ms_pCutsceneObjects[NUMCUTSCENEOBJECTS]; @@ -24,10 +79,55 @@ class CCutsceneMgr static bool ms_wasCutsceneSkipped; static bool ms_cutsceneProcessing; static bool ms_useCutsceneShadows; + static bool ms_hasFileInfo; + static int ms_numLoadObjectNames; + + static char ms_cAppendAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH]; + static char ms_cAppendObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH]; + static int ms_numAppendObjectNames; public: static CDirectory *ms_pCutsceneDir; static uint32 ms_cutsceneLoadStatus; + static bool mCutsceneSkipFading; + static int mCutsceneSkipFadeTime; + + static float m_fPrevCarDensity; + static float m_fPrevPedDensity; + + static bool m_PrevExtraColourOn; + static uint32 m_PrevExtraColour; + + static uint32 ms_iNumParticleEffects; + static sParticleEffect ms_pParticleEffects[NUM_CUTS_PARTICLE_EFFECTS]; + + static sToHideItem ms_crToHideItems[NUMCUTSCENEOBJECTS]; + static uint32 ms_iNumHiddenEntities; + static CEntity *ms_pHiddenEntities[NUMCUTSCENEOBJECTS]; + + static int ms_numAttachObjectToBones; + static bool ms_bRepeatObject[NUMCUTSCENEOBJECTS]; + + static sAttachInfo ms_iAttachObjectToBone[NUMCUTSCENEOBJECTS]; + + static uint32 ms_numUncompressedCutsceneAnims; + + static char ms_aUncompressedCutsceneAnims[NUM_CUTS_UNCOMPRESSED_ANIMS][NAMELENGTH]; + + static uint32 ms_iTextDuration[NUM_CUTS_MAX_TEXTS]; + static uint32 ms_iTextStartTime[NUM_CUTS_MAX_TEXTS]; + static char ms_cTextOutput[NUM_CUTS_MAX_TEXTS][TEXT_KEY_SIZE]; + + static uint32 ms_currTextOutput; + static uint32 ms_numTextOutput; + static uint32 ms_iModelIndex[NUMCUTSCENEOBJECTS]; + + static char ms_cLoadAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH]; + static char ms_cLoadObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH]; + + static uint32 ms_cutscenePlayStatus; + + static void StartCutscene(); static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; } static bool IsRunning(void) { return ms_running; } static bool HasLoaded(void) { return ms_loaded; } @@ -35,19 +135,19 @@ public: static bool WasCutsceneSkipped(void) { return ms_wasCutsceneSkipped; } static bool UseLodMultiplier(void) { return ms_useLodMultiplier; } static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; } - static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; } + static uint32 GetCutsceneTimeInMilleseconds(void); static char *GetCutsceneName(void) { return ms_cutsceneName; } static void SetCutsceneOffset(const CVector& vec) { ms_cutsceneOffset = vec; } static bool HasCutsceneFinished(void); - static void Initialise(void); + static void Initialise(void *dir = nil); static void Shutdown(void); static void LoadCutsceneData(const char *szCutsceneName); static void FinishCutscene(void); static void SetupCutsceneToStart(void); static void SetCutsceneAnim(const char *animName, CObject *pObject); static void SetCutsceneAnimToLoop(const char *animName); - static CCutsceneHead *AddCutsceneHead(CObject *pObject, int modelId); + static CCutsceneHead *SetHeadAnim(const char*, CObject *pObject); static CCutsceneObject *CreateCutsceneObject(int modelId); static void DeleteCutsceneData(void); static void LoadAnimationUncompressed(char const*); @@ -56,6 +156,24 @@ public: static void AttachObjectToParent(CObject *pObject, CEntity *pAttachTo); static void AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame); static void AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int frame); - static void RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver(); + static void RemoveEverythingBecauseCutsceneDoesntFitInMemory(); + static void LoadEverythingBecauseCutsceneDeletedAllOfIt(); static void DisableCutsceneShadows() { ms_useCutsceneShadows = false; } + + + static void LoadCutsceneData_overlay(const char* szCutsceneName); + static bool LoadCutsceneData_postload(bool b = false); + static void Update_overlay(void); + static void DeleteCutsceneData_overlay(void); + + static bool IsCutsceneSkipButtonBeingPressed(); + static void AppendToNextCutscene(const char *object, const char *anim); + + static void LoadCutsceneData_preload(); + static void LoadCutsceneData_loading(); + static void HideRequestedObjects(); + + static bool PresubBodge(); + + static void Write(base::cRelocatableChunkWriter& writer); }; diff --git a/src/animation/CutsceneMgr_overlay.cpp b/src/animation/CutsceneMgr_overlay.cpp new file mode 100644 index 00000000..5fcb752d --- /dev/null +++ b/src/animation/CutsceneMgr_overlay.cpp @@ -0,0 +1,1030 @@ +#include "common.h" +#include "relocatableChunk.h" + +#include "General.h" +#include "CutsceneMgr.h" +#include "Directory.h" +#include "Camera.h" +#include "Streaming.h" +#include "FileMgr.h" +#include "main.h" +#include "AnimManager.h" +#include "AnimBlendAssociation.h" +#include "AnimBlendAssocGroup.h" +#include "AnimBlendClumpData.h" +#include "Pad.h" +#include "DMAudio.h" +#include "World.h" +#include "PlayerPed.h" +#include "Wanted.h" +#include "RpAnimBlend.h" +#include "ModelIndices.h" +#include "TempColModels.h" +#include "ColStore.h" +#include "Radar.h" +#include "Pools.h" +#include "Messages.h" +#include "Population.h" +#include "CarCtrl.h" +#include "Timecycle.h" +#include "Rubbish.h" +#include "Text.h" +#include "Hud.h" +#include "crossplatform.h" + +const struct { + const char *szTrackName; + int iTrackId; +} musicNameIdAssoc[] = { + { "BIKER", STREAMED_SOUND_CUTSCENE_BIKER }, + { "BONEVOY", STREAMED_SOUND_CUTSCENE_BONEVOY }, + { "CAMPAIN", STREAMED_SOUND_CUTSCENE_CAMPAIN }, + { "CASHCHP", STREAMED_SOUND_CUTSCENE_CASHCHP }, + { "CONTBAN", STREAMED_SOUND_CUTSCENE_CONTBAN }, + { "CRAZY69", STREAMED_SOUND_CUTSCENE_CRAZY69 }, + { "CUTTEST", STREAMED_SOUND_CUTSCENE_CUTTEST }, + { "DEADLY", STREAMED_SOUND_CUTSCENE_DEADLY }, + { "DONPROB", STREAMED_SOUND_CUTSCENE_DONPROB }, + { "DRIVNMR", STREAMED_SOUND_CUTSCENE_DRIVNMR }, + { "ELECTON", STREAMED_SOUND_CUTSCENE_ELECTON }, + { "FINAL", STREAMED_SOUND_CUTSCENE_FINAL }, + { "FINAL_2", STREAMED_SOUND_CUTSCENE_FINAL_2 }, + { "HOMSWET", STREAMED_SOUND_CUTSCENE_HOMSWET }, + { "HOTWHEL", STREAMED_SOUND_CUTSCENE_HOTWHEL }, + { "KIDNAPP", STREAMED_SOUND_CUTSCENE_KIDNAPP }, + { "LANDGRB", STREAMED_SOUND_CUTSCENE_LANDGRB }, + { "MORGUE", STREAMED_SOUND_CUTSCENE_MORGUE }, + { "OVERDOS", STREAMED_SOUND_CUTSCENE_OVERDOS }, + { "RUFJUST", STREAMED_SOUND_CUTSCENE_RUFJUST }, + { "SAYONAR", STREAMED_SOUND_CUTSCENE_SAYONAR }, + { "SICILAN", STREAMED_SOUND_CUTSCENE_SICILAN }, + { "THEOFER", STREAMED_SOUND_CUTSCENE_THEOFER }, + { "INTRO", STREAMED_SOUND_CUTSCENE_INTRO }, + { "FINALE", STREAMED_SOUND_CUTSCENE_FINALE }, + { NULL, 0 } +}; + +int +FindCutsceneAudioTrackId(const char *szCutsceneName) +{ + debug("looking for cutscene music track\n"); + for (int i = 0; musicNameIdAssoc[i].szTrackName; i++) { + if (!CGeneral::faststricmp(musicNameIdAssoc[i].szTrackName, szCutsceneName)) { + debug("HUZZA! FOUND cutscene music track\n"); + return musicNameIdAssoc[i].iTrackId; + } + } + debug("NOT FOUND cutscene music track\n"); + return -1; +} + +const char * +GetNextLine(const char *buf, char *line, uint32 lineSize) +{ + while (*buf == '\n' || *buf == '\r') + buf++; + + if (*buf == '\0') + return nil; + + // size check never happened, eh? + while (*buf != '\n' && *buf != '\r') { + if (*buf == '\0') + break; + *(line++) = *(buf++); + } + *(line++) = '\0'; + return buf; +} + +RpAtomic* +CalculateBoundingSphereRadiusCB(RpAtomic* atomic, void* data) +{ + float radius = RpAtomicGetBoundingSphere(atomic)->radius; + RwV3d center = RpAtomicGetBoundingSphere(atomic)->center; + + for (RwFrame* frame = RpAtomicGetFrame(atomic); RwFrameGetParent(frame); frame = RwFrameGetParent(frame)) + RwV3dTransformPoints(¢er, ¢er, 1, RwFrameGetMatrix(frame)); + + float size = RwV3dLength(¢er) + radius; + if (size > *(float*)data) + *(float*)data = size; + return atomic; +} + +void UpdateCutsceneObjectBoundingBox(RpClump* clump, int modelId) +{ + if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ10) { + CColModel* pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01]; + float oldRadius = pColModel->boundingSphere.radius; + float radius = 0.0f; + RpClumpForAllAtomics(clump, CalculateBoundingSphereRadiusCB, &radius); + if (oldRadius < 20.0f) oldRadius = 20.0f; + if (oldRadius < radius) { + debug("Limiting cutscene object radius %f\n", oldRadius); + radius = oldRadius; + } + radius = oldRadius; + pColModel->boundingSphere.radius = radius; + pColModel->boundingBox.min = CVector(-radius, -radius, -radius); + pColModel->boundingBox.max = CVector(radius, radius, radius); + } +} + +bool bCamLoaded; +bool bCamFading; + +// yes, they've actually doubled this thing here, thus this one is unused +static bool bModelsRemovedForCutscene; +static int32 NumberOfSavedWeapons; +static eWeaponType SavedWeaponIDs[TOTAL_WEAPON_SLOTS]; +static int32 SavedWeaponAmmo[TOTAL_WEAPON_SLOTS]; + +enum +{ + CUTMODEL_PLAYER = 1, + CUTMODEL_SIMPLE, + CUTMODEL_REPEATED, +}; + +bool CCutsceneMgr::ms_useCutsceneShadows = true; +bool CCutsceneMgr::mCutsceneSkipFading; +int CCutsceneMgr::mCutsceneSkipFadeTime; +float CCutsceneMgr::m_fPrevCarDensity; +float CCutsceneMgr::m_fPrevPedDensity; +bool CCutsceneMgr::m_PrevExtraColourOn; +uint32 CCutsceneMgr::m_PrevExtraColour; +uint32 CCutsceneMgr::ms_iNumParticleEffects; +sParticleEffect CCutsceneMgr::ms_pParticleEffects[NUM_CUTS_PARTICLE_EFFECTS]; +sToHideItem CCutsceneMgr::ms_crToHideItems[NUMCUTSCENEOBJECTS]; +uint32 CCutsceneMgr::ms_iNumHiddenEntities; +CEntity *CCutsceneMgr::ms_pHiddenEntities[NUMCUTSCENEOBJECTS]; +int CCutsceneMgr::ms_numAttachObjectToBones; +bool CCutsceneMgr::ms_bRepeatObject[NUMCUTSCENEOBJECTS]; +sAttachInfo CCutsceneMgr::ms_iAttachObjectToBone[NUMCUTSCENEOBJECTS]; +uint32 CCutsceneMgr::ms_numUncompressedCutsceneAnims; +char CCutsceneMgr::ms_aUncompressedCutsceneAnims[NUM_CUTS_UNCOMPRESSED_ANIMS][NAMELENGTH]; +uint32 CCutsceneMgr::ms_iTextDuration[NUM_CUTS_MAX_TEXTS]; +uint32 CCutsceneMgr::ms_iTextStartTime[NUM_CUTS_MAX_TEXTS]; +char CCutsceneMgr::ms_cTextOutput[NUM_CUTS_MAX_TEXTS][TEXT_KEY_SIZE]; +uint32 CCutsceneMgr::ms_currTextOutput; +uint32 CCutsceneMgr::ms_numTextOutput; +uint32 CCutsceneMgr::ms_iModelIndex[NUMCUTSCENEOBJECTS]; +char CCutsceneMgr::ms_cLoadAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH]; +char CCutsceneMgr::ms_cLoadObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH]; +int CCutsceneMgr::ms_numLoadObjectNames; +CCutsceneObject *CCutsceneMgr::ms_pCutsceneObjects[NUMCUTSCENEOBJECTS]; +int32 CCutsceneMgr::ms_numCutsceneObjs; +CVector CCutsceneMgr::ms_cutsceneOffset; +float CCutsceneMgr::ms_cutsceneTimer; +uint32 CCutsceneMgr::ms_cutscenePlayStatus; +CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations; +char CCutsceneMgr::ms_cutsceneName[CUTSCENENAMESIZE]; + +CCutsceneObject * +CCutsceneMgr::CreateCutsceneObject(int modelId) +{ + CBaseModelInfo *pModelInfo; + CColModel *pColModel; + CCutsceneObject *pCutsceneObject; + + CStreaming::ImGonnaUseStreamingMemory(); + debug("Created cutscene object %s\n", CModelInfo::GetModelInfo(modelId)->GetModelName()); + if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ10) { + pModelInfo = CModelInfo::GetModelInfo(modelId); + pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01]; + pModelInfo->SetColModel(pColModel); + UpdateCutsceneObjectBoundingBox((RpClump*)pModelInfo->GetRwObject(), modelId); + } + + pCutsceneObject = new CCutsceneObject(); + pCutsceneObject->SetModelIndex(modelId); + if (ms_useCutsceneShadows) + pCutsceneObject->CreateShadow(); + ms_pCutsceneObjects[ms_numCutsceneObjs++] = pCutsceneObject; + CStreaming::IHaveUsedStreamingMemory(); + return pCutsceneObject; +} + +void +CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject) +{ + CAnimBlendAssociation *pNewAnim; + CAnimBlendClumpData *pAnimBlendClumpData; + + debug("Give cutscene anim %s\n", animName); + /*assert(RwObjectGetType(pObject->m_rwObject) == rpCLUMP); + debug("Give cutscene anim %s\n", animName); + RpAnimBlendClumpRemoveAllAssociations((RpClump*)pObject->m_rwObject); + + pNewAnim = ms_cutsceneAssociations.GetAnimation(animName); + if (!pNewAnim) { + debug("\n\nHaven't I told you I can't find the fucking animation %s\n\n\n", animName); + return; + } + + if (pNewAnim->hierarchy->IsCompressed()) + pNewAnim->hierarchy->keepCompressed = true;*/ + + CStreaming::ImGonnaUseStreamingMemory(); + pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName); + CStreaming::IHaveUsedStreamingMemory(); + + pNewAnim->SetCurrentTime(0.0f); + pNewAnim->flags |= ASSOC_HAS_TRANSLATION; + pNewAnim->flags &= ~ASSOC_RUNNING; + + pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject); + pAnimBlendClumpData->link.Prepend(&pNewAnim->link); + + //if (pNewAnim->hierarchy->keepCompressed) + // pAnimBlendClumpData->frames->flag |= AnimBlendFrameData::COMPRESSED; +} + +void +CCutsceneMgr::SetCutsceneAnimToLoop(const char* animName) +{ + ms_cutsceneAssociations.GetAnimation(animName)->flags |= ASSOC_REPEAT; +} + +CCutsceneHead* +CCutsceneMgr::SetHeadAnim(const char*, CObject* pObject) +{ + return nil; +} + +void +CCutsceneMgr::StartCutscene() +{ + ms_cutscenePlayStatus = CUTSCENE_STARTED; + if (bCamLoaded) { + TheCamera.SetWideScreenOn(); + CHud::SetHelpMessage(nil, true); + } +} + +void +CCutsceneMgr::SetupCutsceneToStart(void) +{ + if (bCamLoaded) { + TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset); + TheCamera.TakeControlWithSpline(JUMP_CUT); + TheCamera.SetWideScreenOn(); + CHud::SetHelpMessage(nil, true); + } + + ms_cutsceneOffset.z += 1.0f; + + for (int i = ms_numCutsceneObjs - 1; i >= 0; i--) { + assert(RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP); + if (CAnimBlendAssociation *pAnimBlendAssoc = RpAnimBlendClumpGetFirstAssociation((RpClump*)ms_pCutsceneObjects[i]->m_rwObject)) { + assert(pAnimBlendAssoc->hierarchy->sequences[0].HasTranslation()); + if (ms_pCutsceneObjects[i]->m_pAttachTo != nil) { + pAnimBlendAssoc->flags &= (~ASSOC_HAS_TRANSLATION); + } else { + if (pAnimBlendAssoc->hierarchy->IsCompressed()){ + KeyFrameTransCompressed *keyFrames = ((KeyFrameTransCompressed*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrameCompressed(0)); + CVector trans; + keyFrames->GetTranslation(&trans); + ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + trans); + }else{ + KeyFrameTrans *keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0)); + ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + keyFrames->translation); + } + } + pAnimBlendAssoc->SetRun(); + } else { + ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset); + } + CWorld::Add(ms_pCutsceneObjects[i]); + if (RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP) { + ms_pCutsceneObjects[i]->UpdateRpHAnim(); + } + } + + CTimer::Update(); + CTimer::Update(); + ms_cutsceneTimer = 0.0f; + ms_running = true; + mCutsceneSkipFadeTime = 0; + mCutsceneSkipFading = 0; +} + +void +CCutsceneMgr::FinishCutscene() +{ + if (bCamLoaded) { + ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f; + TheCamera.FinishCutscene(); + } + + FindPlayerPed()->bIsVisible = true; + CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false); +} + +uint32 +CCutsceneMgr::GetCutsceneTimeInMilleseconds(void) +{ + return 1000.0f * ms_cutsceneTimer; +} + +bool CCutsceneMgr::HasCutsceneFinished(void) +{ + return !bCamLoaded || TheCamera.GetPositionAlongSpline() == 1.0f; +} + +void +CCutsceneMgr::AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int bone) +{ + RpHAnimHierarchy *hanim = GetAnimHierarchyFromSkinClump(pAttachTo->GetClump()); + RwInt32 id = RpHAnimIDGetIndex(hanim, bone); + RwMatrix *matrixArray = RpHAnimHierarchyGetMatrixArray(hanim); + ((CCutsceneObject*)pObject)->m_pAttachmentObject = pAttachTo; + ((CCutsceneObject*)pObject)->m_pAttachTo = &matrixArray[id]; + //debug("Attach %s to %s\n", + // CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), + // CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); +} + +void +CCutsceneMgr::AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame) +{ + ((CCutsceneObject*)pObject)->m_pAttachmentObject = nil; + ((CCutsceneObject*)pObject)->m_pAttachTo = RpAnimBlendClumpFindFrame(pAttachTo->GetClump(), frame)->frame; + //debug("Attach %s to component %s of %s\n", + // CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), + // frame, + // CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); + if (RwObjectGetType(pObject->m_rwObject) == rpCLUMP) { + RpClump *clump = (RpClump*)pObject->m_rwObject; + if (IsClumpSkinned(clump)) + RpAtomicGetBoundingSphere(GetFirstAtomic(clump))->radius *= 1.1f; + } +} + +void +CCutsceneMgr::AttachObjectToParent(CObject *pObject, CEntity *pAttachTo) +{ + ((CCutsceneObject*)pObject)->m_pAttachmentObject = nil; + ((CCutsceneObject*)pObject)->m_pAttachTo = RpClumpGetFrame(pAttachTo->GetClump()); + + //debug("Attach %s to %s\n", CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName()); +} + +void +CCutsceneMgr::HideRequestedObjects(void) +{ + int num = ms_iNumHiddenEntities; + ms_iNumHiddenEntities = 0; + + for (int i = 0; i < num; i++) { + int id; + if (CModelInfo::GetModelInfo(ms_crToHideItems[i].name, &id)) { + CVector pos(ms_crToHideItems[i].x, ms_crToHideItems[i].y, ms_crToHideItems[i].z); + int16 foundEntities; + CEntity* pEntities[32]; + CWorld::FindObjectsOfTypeInRange(id, pos, 1.5f, true, &foundEntities, 32, pEntities, true, false, false, true, true); + for (int j = 0; i < foundEntities; j++) { + if (pEntities[j]->bIsVisible) { + ms_pHiddenEntities[ms_iNumHiddenEntities] = pEntities[j]; + ms_pHiddenEntities[ms_iNumHiddenEntities]->RegisterReference(&ms_pHiddenEntities[ms_iNumHiddenEntities]); + ms_pHiddenEntities[ms_iNumHiddenEntities]->bIsVisible = false; + ms_iNumHiddenEntities++; + } + } + } + } +} + +bool +CCutsceneMgr::PresubBodge() +{ + return true; +} + +void +CCutsceneMgr::LoadCutsceneData_loading() +{ + for (int i = 0; i < ms_numLoadObjectNames; i++) { + int mi = ms_iModelIndex[i]; + if (mi >= MI_CUTOBJ01 && mi <= MI_CUTOBJ10) { + if (CStreaming::ms_aInfoForModel[mi].m_loadState != STREAMSTATE_LOADED) + return; + } + } + + if (!LoadCutsceneData_postload()) + return; + + CCutsceneObject* cutsceneObject; + for (int i = 0; i < ms_numLoadObjectNames; i++) { + if (!ms_bRepeatObject[i]) + cutsceneObject = CreateCutsceneObject(ms_iModelIndex[i]); + if (ms_cLoadAnimName[i][0] != '\0') + SetCutsceneAnim(ms_cLoadAnimName[i], cutsceneObject); + } + + for (int i = 0; i < ms_numAttachObjectToBones; i++) { + int objectId = ms_iAttachObjectToBone[i].objectId; + int attachToId = ms_iAttachObjectToBone[i].attachToId; + int bone = ms_iAttachObjectToBone[i].boneId; + AttachObjectToBone(ms_pCutsceneObjects[objectId], ms_pCutsceneObjects[attachToId], bone); + } +} + +bool +CCutsceneMgr::LoadCutsceneData_postload(bool b) +{ + RwStream *stream = nil; + uint32 size; + uint32 offset; + + bool result; + + CMessages::ClearThisBigPrintNow(0); + CPopulation::PedDensityMultiplier = 0.0f; + CCarCtrl::CarDensityMultiplier = 0.0f; + CStreaming::ms_disableStreaming = false; + if (b) + { + sprintf(gString, "%s.IFP", ms_cutsceneName); + result = false; + ms_animLoaded = false; + RwStreamClose(stream, nil); // umm... + sprintf(gString, "%s.DAT", ms_cutsceneName); + bCamLoaded = false; + } else { + + stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG"); + sprintf(gString, "%s.IFP", ms_cutsceneName); + if (stream) { + if (ms_pCutsceneDir->FindItem(gString, offset, size)) + { + CStreaming::MakeSpaceFor(size << 11); + CStreaming::ImGonnaUseStreamingMemory(); + RwStreamSkip(stream, offset << 11); + CAnimManager::LoadAnimFile(stream, true, ms_aUncompressedCutsceneAnims); + ms_cutsceneAssociations.CreateAssociations(ms_cutsceneName, ms_cLoadAnimName[0], ms_cLoadObjectName[0], NAMELENGTH); + CStreaming::IHaveUsedStreamingMemory(); + ms_animLoaded = true; + } + else + { + ms_animLoaded = false; + } + RwStreamClose(stream, nil); + + int file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb"); + sprintf(gString, "%s.DAT", ms_cutsceneName); + if (file) { + if (ms_pCutsceneDir->FindItem(gString, offset, size)) + { + CStreaming::ImGonnaUseStreamingMemory(); + CFileMgr::Seek(file, offset << 11, 0); + TheCamera.LoadPathSplines(file); + CStreaming::IHaveUsedStreamingMemory(); + bCamLoaded = true; + } + else + { + bCamLoaded = false; + } + result = true; + CFileMgr::CloseFile(file); + } + else + { + bCamLoaded = false; + result = true; + } + } + else + { + result = false; + ms_animLoaded = false; + RwStreamClose(stream, nil); + sprintf(gString, "%s.DAT", ms_cutsceneName); + bCamLoaded = false; + } + } + ms_cutsceneLoadStatus = CUTSCENE_LOADED; + ms_cutsceneTimer = 0.0f; + FindPlayerPed()->m_pWanted->ClearQdCrimes(); + return result; +} + +void +CCutsceneMgr::LoadCutsceneData_overlay(const char *szCutsceneName) +{ + CTimer::Suspend(); + ms_cutsceneProcessing = true; + ms_wasCutsceneSkipped = false; + if (!bModelsRemovedForCutscene) + CStreaming::RemoveCurrentZonesModels(); + + ms_pCutsceneDir->numEntries = 0; + ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR"); + + CStreaming::RemoveUnusedModelsInLoadedList(); + CGame::DrasticTidyUpMemory(true); + + strcpy(ms_cutsceneName, szCutsceneName); + + LoadCutsceneData_preload(); + CTimer::Resume(); +} + +void +CCutsceneMgr::LoadCutsceneData_preload(void) +{ + uint32 size; + uint32 offset; + CPlayerPed* pPlayerPed; + if (CGeneral::faststricmp(ms_cutsceneName, "finale")) { + DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE); + int trackId = FindCutsceneAudioTrackId(ms_cutsceneName); + if (trackId != -1) { + printf("Start preload audio %s\n", ms_cutsceneName); + DMAudio.PreloadCutSceneMusic(trackId); + printf("End preload audio %s\n", ms_cutsceneName); + } + } + + for (int i = MI_CUTOBJ01; i <= MI_CUTOBJ10; i++) { + if (CModelInfo::GetModelInfo(i)->GetNumRefs() <= 0) { + if (CStreaming::ms_aInfoForModel[i].m_loadState == STREAMSTATE_LOADED) { + CStreaming::RemoveModel(i); + CModelInfo::GetModelInfo(i)->SetModelName("&*%"); + } + } + } + + m_PrevExtraColour = CTimeCycle::m_ExtraColour; + m_PrevExtraColourOn = CTimeCycle::m_bExtraColourOn != 0; + m_fPrevPedDensity = CPopulation::PedDensityMultiplier; + m_fPrevCarDensity = CCarCtrl::CarDensityMultiplier; + ms_cutsceneOffset = CVector(0.0f, 0.0f, 0.0f); + ms_numTextOutput = 0; + ms_currTextOutput = 0; + ms_numLoadObjectNames = 0; + ms_numUncompressedCutsceneAnims = 0; + ms_numAttachObjectToBones = 0; + ms_iNumHiddenEntities = 0; + bCamFading = false; + ms_iNumParticleEffects = 0; + + for (int i = 0; i < NUM_CUTS_UNCOMPRESSED_ANIMS; i++) + ms_aUncompressedCutsceneAnims[i][0] = '\0'; + + memset(ms_iModelIndex, 0, sizeof(ms_iModelIndex)); + CRubbish::SetVisibility(false); + + pPlayerPed = FindPlayerPed(); + pPlayerPed->m_pWanted->ClearQdCrimes(); + pPlayerPed->bIsVisible = false; + pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina; + CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE); + CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true); + + sprintf(gString, "%s.CUT", ms_cutsceneName); + if (!ms_pCutsceneDir->FindItem(gString, offset, size)) { + LoadCutsceneData_postload(); + return; + } + + size <<= 11; + offset <<= 11; + + char *cutsBuf = new char[size]; + + RwStream* stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG"); + + if (stream) { + RwStreamSkip(stream, offset); + RwStreamRead(stream, cutsBuf, size); + RwStreamClose(stream, nil); + } + + enum + { + CUT_NONE = 0, + CUT_INFO, + CUT_MODEL, + CUT_TEXT, + CUT_UNCOMPRESS, + CUT_ATTACH, + CUT_REMOVE, + CUT_PARTICLE_EFFECT, + CUT_EXTRA_COLOR, + }; + + int cutSection = CUT_NONE; + bool bExtraColSet = false; + + char line[1024]; + const char *pCurLine = cutsBuf; + + while (true) + { + pCurLine = GetNextLine(pCurLine, line, sizeof(line)); + if (pCurLine) { + if (line[0] == '\0') + break; + + if (strcmp(line, "end") == 0) { + cutSection = CUT_NONE; + continue; + } + + switch (cutSection) + { + case CUT_NONE: + if (strcmp(line, "info") == 0) + cutSection = CUT_INFO; + if (strcmp(line, "model") == 0) + cutSection = CUT_MODEL; + if (strcmp(line, "text") == 0) + cutSection = CUT_TEXT; + if (strcmp(line, "uncompress") == 0) + cutSection = CUT_UNCOMPRESS; + if (strcmp(line, "attach") == 0) + cutSection = CUT_ATTACH; + if (strcmp(line, "remove") == 0) + cutSection = CUT_REMOVE; + if (strcmp(line, "peffect") == 0) + cutSection = CUT_PARTICLE_EFFECT; + if (strcmp(line, "extracol") == 0) + cutSection = CUT_EXTRA_COLOR; + break; + case CUT_INFO: + { + if (strncmp(line, "offset", 6) == 0) { + float x, y, z; + sscanf(line+7, "%f %f %f", &x, &y, &z); + FindPlayerPed(); // called for some sa check in here + ms_cutsceneOffset = CVector(x, y, z); + } + break; + } + case CUT_MODEL: + { + char objectName[NAMELENGTH]; + char animName[NAMELENGTH]; + + int num; // unused + sscanf(strtok(line, " ,"), "%d", &num); + strcpy(objectName, strtok(nil, " ,")); + char* pAnimName = strtok(0, " ,"); + strlwr(objectName); + + bool bUsedFirstTime = true; + if (pAnimName) { + do { + strcpy(animName, pAnimName); + strlwr(animName); + strcpy(ms_cLoadObjectName[ms_numLoadObjectNames], objectName); + strcpy(ms_cLoadAnimName[ms_numLoadObjectNames], animName); + if (bUsedFirstTime) { + bUsedFirstTime = false; + ms_iModelIndex[ms_numLoadObjectNames] = CUTMODEL_SIMPLE; + ms_bRepeatObject[ms_numLoadObjectNames] = false; + } else { + ms_bRepeatObject[ms_numLoadObjectNames] = true; + ms_iModelIndex[ms_numLoadObjectNames] = CUTMODEL_REPEATED; + } + ms_numLoadObjectNames++; + pAnimName = strtok(0, " ,"); + } while (pAnimName); + } + break; + } + case CUT_TEXT: + { + int iTextStartTime, iTextDuration; + char cTextOutput[8]; + sscanf(line, "%d,%d,%s", &iTextStartTime, &iTextDuration, cTextOutput); + for (size_t i = 0; i < strlen(cTextOutput); i++) + cTextOutput[i] = toupper(cTextOutput[i]); + + memcpy(ms_cTextOutput[ms_numTextOutput], cTextOutput, strlen(cTextOutput)+1); + ms_iTextStartTime[ms_numTextOutput] = iTextStartTime; + ms_iTextDuration[ms_numTextOutput] = iTextDuration; + ms_numTextOutput++; + break; + } + case CUT_UNCOMPRESS: + LoadAnimationUncompressed(strtok(line, " ,")); + break; + case CUT_ATTACH: + { + int attachToId, objectId, bone; + sscanf(line, "%d,%d,%d", &attachToId, &objectId, &bone); + ms_iAttachObjectToBone[ms_numAttachObjectToBones].attachToId = attachToId; + ms_iAttachObjectToBone[ms_numAttachObjectToBones].objectId = objectId; + ms_iAttachObjectToBone[ms_numAttachObjectToBones].boneId = bone; + ms_numAttachObjectToBones++; + break; + } + case CUT_REMOVE: + { + float x, y, z; + char name[NAMELENGTH]; + sscanf(line, "%f,%f,%f,%s", &x, &y, &z, name); + ms_crToHideItems[ms_iNumHiddenEntities].x = x; + ms_crToHideItems[ms_iNumHiddenEntities].y = y; + ms_crToHideItems[ms_iNumHiddenEntities].z = z; + strcpy(ms_crToHideItems[ms_iNumHiddenEntities].name, name); + ms_iNumHiddenEntities++; + break; + } + case CUT_PARTICLE_EFFECT: + { + char name[NAMELENGTH]; + char name2[NAMELENGTH]; + + int iTime; + int unk1; + int unk2; + float x; + float y; + float z; + float unkX; + float unkY; + float unkZ; + + memset(name, 0, NAMELENGTH); + memset(name2, 0, NAMELENGTH); + + strncpy(name, strtok(line, ","), NAMELENGTH-1); + iTime = atoi(strtok(0, ",")); + unk1 = atoi(strtok(0, ",")); + unk2 = atoi(strtok(0, ",")); + strncpy(name, strtok(line, ","), NAMELENGTH-1); + x = strtod(strtok(0, ","), nil); + y = strtod(strtok(0, ","), nil); + z = strtod(strtok(0, ","), nil); + unkX = strtod(strtok(0, ","), nil); + unkY = strtod(strtok(0, ","), nil); + unkZ = strtod(strtok(0, ","), nil); + + ms_pParticleEffects[ms_iNumParticleEffects].bPlayed = false; + ms_pParticleEffects[ms_iNumParticleEffects].iTime = iTime; + ms_pParticleEffects[ms_iNumParticleEffects].unk1 = unk1; + ms_pParticleEffects[ms_iNumParticleEffects].unk2 = unk2; + strcpy(CCutsceneMgr::ms_pParticleEffects[ms_iNumParticleEffects].name2, name2); + ms_pParticleEffects[ms_iNumParticleEffects].unk10 = false; + ms_pParticleEffects[ms_iNumParticleEffects].x = x; + ms_pParticleEffects[ms_iNumParticleEffects].y = y; + ms_pParticleEffects[ms_iNumParticleEffects].z = z; + ms_pParticleEffects[ms_iNumParticleEffects].unkX = unkX; + ms_pParticleEffects[ms_iNumParticleEffects].unkY = unkY; + ms_pParticleEffects[ms_iNumParticleEffects].unkZ = unkZ; + ms_pParticleEffects[ms_iNumParticleEffects].unk11 = false; + strcpy(CCutsceneMgr::ms_pParticleEffects[ms_iNumParticleEffects].name, name); + ms_iNumParticleEffects++; + break; + } + case CUT_EXTRA_COLOR: + if (!bExtraColSet) { + int colorId; + sscanf(line, "%d", &colorId); + if (colorId == 0) + bExtraColSet = false; + else { + CTimeCycle::StartExtraColour(colorId - 1, false); + bExtraColSet = true; + } + } + break; + default: + break; + }; + + } + else + { + delete[]cutsBuf; + + // add manually inserted objects + for (int i = 0; i < ms_numAppendObjectNames; i++) { + strcpy(ms_cLoadObjectName[ms_numLoadObjectNames], ms_cAppendObjectName[i]); + strcpy(ms_cLoadAnimName[ms_numLoadObjectNames], ms_cAppendAnimName[i]); + ms_iModelIndex[ms_numLoadObjectNames] = CUTMODEL_SIMPLE; + ms_numLoadObjectNames++; + } + ms_numAppendObjectNames = 0; + + int specialId = 0; + for (int i = 0; i < ms_numLoadObjectNames; i++) + { + if (strcasecmp(ms_cLoadObjectName[i], "csplay") == 0) { + ms_iModelIndex[i] = CUTMODEL_PLAYER; + continue; + } else if (ms_iModelIndex[i] == CUTMODEL_SIMPLE) { + int id; + if (CModelInfo::GetModelInfo(ms_cLoadObjectName[i], &id)) { + ms_iModelIndex[i] = id; + CStreaming::RequestModel(id, STREAMFLAGS_SCRIPTOWNED | STREAMFLAGS_DEPENDENCY | STREAMFLAGS_PRIORITY); + } else { + CStreaming::RequestSpecialModel(specialId + MI_CUTOBJ01, ms_cLoadObjectName[i], STREAMFLAGS_SCRIPTOWNED | STREAMFLAGS_DEPENDENCY | STREAMFLAGS_PRIORITY); + ms_iModelIndex[i] = specialId + MI_CUTOBJ01; + specialId++; + // skip if id is busy + while (CStreaming::ms_aInfoForModel[specialId + MI_CUTOBJ01].m_loadState == STREAMSTATE_LOADED) + specialId++; + } + } + else if (ms_iModelIndex[i] == CUTMODEL_REPEATED && i != 0) + ms_iModelIndex[i] = ms_iModelIndex[i - 1]; + } + + CStreaming::LoadAllRequestedModels(true); + ms_cutsceneLoadStatus = CUTSCENE_LOADING; + return; + } + } + + delete[]cutsBuf; + LoadCutsceneData_postload(true); +} + +void +CCutsceneMgr::DeleteCutsceneData_overlay(void) +{ + if (ms_cutsceneLoadStatus == CUTSCENE_NOT_LOADED) return; + CTimer::Suspend(); + CPopulation::PedDensityMultiplier = m_fPrevPedDensity; + CCarCtrl::CarDensityMultiplier = m_fPrevCarDensity; + if (m_PrevExtraColourOn) + CTimeCycle::StartExtraColour(m_PrevExtraColour, false); + else + CTimeCycle::StopExtraColour(m_PrevExtraColourOn); + + for (uint32 i = 0; i < ms_iNumHiddenEntities; i++) { + if (ms_pHiddenEntities[i]) { + ms_pHiddenEntities[i]->CleanUpOldReference(&ms_pHiddenEntities[i]); + ms_pHiddenEntities[i]->bIsVisible = true; + } + } + + ms_iNumHiddenEntities = 0; + ms_iNumParticleEffects = 0; + CMessages::ClearMessages(); + CRubbish::SetVisibility(true); + + ms_cutsceneProcessing = false; + ms_useLodMultiplier = false; + ms_useCutsceneShadows = false; + + ms_numCutsceneObjs--; + while (ms_numCutsceneObjs >= 0) { + CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]); + ms_pCutsceneObjects[ms_numCutsceneObjs]->DeleteRwObject(); + delete ms_pCutsceneObjects[ms_numCutsceneObjs]; + ms_pCutsceneObjects[ms_numCutsceneObjs] = nil; + ms_numCutsceneObjs--; + } + ms_numCutsceneObjs = 0; + + if (ms_animLoaded) + CAnimManager::RemoveLastAnimFile(); + + ms_animLoaded = false; + ms_cutsceneAssociations.DestroyAssociations(); + + ms_aUncompressedCutsceneAnims[0][0] = '\0'; + ms_numUncompressedCutsceneAnims = 0; + + if (bCamLoaded) { + TheCamera.RestoreWithJumpCut(); + TheCamera.SetWideScreenOff(); + TheCamera.DeleteCutSceneCamDataMemory(); + } + ms_cutsceneLoadStatus = CUTSCENE_NOT_LOADED; + ms_running = false; + + FindPlayerPed()->bIsVisible = true; + CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE); + CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false); + + if (CGeneral::faststricmp(ms_cutsceneName, "finale")) { + DMAudio.StopCutSceneMusic(); + DMAudio.ChangeMusicMode(MUSICMODE_GAME); + } + + CStreaming::ms_disableStreaming = false; + CWorld::bProcessCutsceneOnly = false; + + //if(bCamLoaded) + // CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2); + + CPad::GetPad(0)->Clear(false); + + if (bModelsRemovedForCutscene) { + CStreaming::LoadInitialPeds(); + CStreaming::LoadInitialWeapons(); + CStreaming::LoadInitialVehicles(); + bModelsRemovedForCutscene = false; + + CPlayerPed *pPlayerPed = FindPlayerPed(); + for (int i = 0; i < NumberOfSavedWeapons; i++) { + int32 weaponModelId = CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModelId; + uint8 flags = CStreaming::ms_aInfoForModel[weaponModelId].m_flags; + CStreaming::RequestModel(weaponModelId, STREAMFLAGS_DONT_REMOVE); + CStreaming::LoadAllRequestedModels(false); + if (CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id != -1) { + CStreaming::RequestModel(CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id, 0); + CStreaming::LoadAllRequestedModels(false); + } + if (!(flags & STREAMFLAGS_DONT_REMOVE)) + CStreaming::SetModelIsDeletable(weaponModelId); + pPlayerPed->GiveWeapon(SavedWeaponIDs[i], SavedWeaponAmmo[i], true); + } + NumberOfSavedWeapons = 0; + } + + for (int i = 0; i < ms_numLoadObjectNames; i++) + CStreaming::SetMissionDoesntRequireModel(ms_iModelIndex[i]); + + CStreaming::SetMissionDoesntRequireModel(MI_COP); + CStreaming::StreamZoneModels(FindPlayerCoors()); + CTimer::Resume(); +} + +void +CCutsceneMgr::Update_overlay(void) +{ + if (ms_cutsceneLoadStatus == CUTSCENE_LOADING) { + debug("Loading Cutscene...\n"); + CTimer::Suspend(); + LoadCutsceneData_loading(); + CTimer::Resume(); + return; + } + + if (ms_cutsceneLoadStatus != CUTSCENE_LOADED) { + debug("Cutscene Not Loaded!\n"); + return; + } + + switch (ms_cutscenePlayStatus) { + case CUTSCENE_STARTED: + SetupCutsceneToStart(); + HideRequestedObjects(); + ms_cutscenePlayStatus++; + break; + case CUTSCENE_PLAYING_2: + case CUTSCENE_PLAYING_3: + ms_cutscenePlayStatus++; + break; + case CUTSCENE_PLAYING_4: + ms_cutscenePlayStatus = CUTSCENE_PLAYING_0; + if (CGeneral::faststricmp(ms_cutsceneName, "finale")) + DMAudio.PlayPreloadedCutSceneMusic(); + break; + default: + break; + } + + if (!ms_running) return; + + ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds(); + uint32 cutsceneTimeInMS = GetCutsceneTimeInMilleseconds(); + + if (ms_currTextOutput < ms_numTextOutput && cutsceneTimeInMS > ms_iTextStartTime[ms_currTextOutput]) { + CMessages::AddMessageJumpQ(TheText.Get(ms_cTextOutput[ms_currTextOutput]), ms_iTextDuration[ms_currTextOutput], 1); + ms_currTextOutput++; + } + + for (int i = 0; i < ms_numCutsceneObjs; i++) { + int modelId = ms_pCutsceneObjects[i]->GetModelIndex(); + if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ10) + UpdateCutsceneObjectBoundingBox(ms_pCutsceneObjects[i]->GetClump(), modelId); + } + + if (!bCamLoaded) return; + + if (CGeneral::faststricmp(ms_cutsceneName, "finale") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADED) { + if (TheCamera.GetCutSceneFinishTime() < cutsceneTimeInMS + 1000) { + if (!bCamFading) { + bCamFading = true; + TheCamera.Fade(1.0f, FADE_OUT); + } + } + if (mCutsceneSkipFading) { + mCutsceneSkipFadeTime -= CTimer::GetTimeStepInMilliseconds(); + if (mCutsceneSkipFadeTime < 0) { + CHud::m_BigMessage[1][0] = '\0'; + ms_wasCutsceneSkipped = true; + FinishCutscene(); + mCutsceneSkipFading = false; + mCutsceneSkipFadeTime = 0; + } + } + else if (IsCutsceneSkipButtonBeingPressed() && PresubBodge()){ + mCutsceneSkipFading = true; + mCutsceneSkipFadeTime = 1000; + TheCamera.Fade(1.0f, FADE_OUT); + } + } +}
\ No newline at end of file diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 83f55d33..2a83139e 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -574,136 +574,139 @@ struct tVehicleSampleData { }; const tVehicleSampleData aVehicleSettings[MAX_CARS] = { - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9935, OLD_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, - {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9890, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9960, TRUCK_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_HORN_JEEP, 9500, OLD_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 10588, TRUCK_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 9538, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 10000, OLD_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_BMW328, 12017, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, - {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_JEEP, 22293, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR}, - {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SIREN_SLOW, 12688, OLD_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 11471, NEW_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_HORN_JEEP, 9400, OLD_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 11000, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR}, - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_BMW328, 10796, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10500, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR}, - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_HORN_JEEP, 9000, OLD_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, OLD_DOOR}, - {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, OLD_DOOR}, - {SFX_HELI_APACHE_1, SFX_BANK_HELI_APACHE, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 10511, NEW_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 11029, OLD_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS2, 11652, SFX_CAR_HORN_JEEP, 9500, BUS_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9600, TRUCK_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9700, TRUCK_DOOR}, - {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 25400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, - {SFX_CAR_REV_17, SFX_BANK_VTWIN, SFX_CAR_HORN_JEEP, 26313, SFX_CAR_HORN_JEEP, 10000, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS, 16291, SFX_CAR_HORN_JEEP, 10100, BUS_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9890, NEW_DOOR}, + {SFX_CAR_REV_PATHFINDER, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9935, OLD_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9890, NEW_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9960, TRUCK_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_HORN_JEEP, 9500, OLD_DOOR}, + {SFX_CAR_REV_MERC, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, + {SFX_CAR_REV_PATHFINDER, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 10588, TRUCK_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 9538, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 10000, OLD_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SI, 12688, OLD_DOOR}, + {SFX_CAR_REV_MERC, SFX_BANK_MERC, SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 11471, NEW_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_HORN_JEEP, 9400, OLD_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 11000, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR}, + {SFX_CAR_REV_PATHFINDER, SFX_BANK_PATHFINDER, SFX_CAR_HORN_BMW328, 10796, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_PATHFINDER, SFX_BANK_PATHFINDER, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_HORN_JEEP, 9000, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, OLD_DOOR}, + {SFX_CAR_REV_HOTROD, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, OLD_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_MERC, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 10511, NEW_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 11029, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS2, 11652, SFX_CAR_HORN_JEEP, 9500, BUS_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9600, TRUCK_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9700, TRUCK_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS, 16291, SFX_CAR_HORN_JEEP, 10100, BUS_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, + {SFX_CAR_REV_PACARD, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, {SFX_RC_REV, SFX_BANK_RC, SFX_CAR_HORN_PICKUP, 20000, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29000, SFX_CAR_HORN_JEEP, 9400, TRUCK_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BMW328, 9003, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_PORSCHE, 12375, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_BUS2, 15554, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_BUS2, 13857, SFX_CAR_HORN_JEEP, 9000, TRUCK_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_PONTIAC, SFX_CAR_HORN_BMW328, 9003, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_HOTROD, SFX_BANK_HOTROD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_PATHFINDER, SFX_BANK_PATHFINDER, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_PONTIAC, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_SPIDER, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, + {SFX_CAR_REV_PORSHE, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, + {SFX_CAR_REV_TRUCK, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, + {SFX_CAR_REV_HOTROD, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 25400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_COBRA, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, + {SFX_CAR_REV_VTWI, SFX_BANK_VTWIN, SFX_CAR_HORN_JEEP, 26313, SFX_CAR_HORN_JEEP, 10000, NEW_DOOR}, {SFX_MOPED_REV, SFX_BANK_MOPED, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 22043, SFX_CAR_HORN_JEEP, 9200, OLD_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR}, - {SFX_CAR_REV_12, SFX_BANK_GOLF_CART, SFX_CAR_HORN_JEEP, 28500, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, - {SFX_SEAPLANE_PRO1, SFX_BANK_PLANE_SEAPLANE, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_20, SFX_BANK_SPORTS_BIKE, SFX_CAR_HORN_JEEP, 27000, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, + {SFX_MOPED_REV, SFX_BANK_MOPED, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR}, + {SFX_CAR_REV_SPORTCAR, SFX_BANK_SPORTS_BIKE, SFX_CAR_HORN_JEEP, 27000, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, {SFX_MOPED_REV, SFX_BANK_MOPED, SFX_CAR_HORN_JEEP, 31000, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_17, SFX_BANK_VTWIN, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_RC_REV, SFX_BANK_RC, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, NEW_DOOR}, - {SFX_CAR_RC_HELI, SFX_BANK_RC_HELI, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, NEW_DOOR}, - {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10300, SFX_CAR_HORN_JEEP, 9100, OLD_DOOR}, - {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10500, SFX_CAR_HORN_JEEP, 9000, OLD_DOOR}, - {SFX_CAR_REV_19, SFX_BANK_HONDA250, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9000, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_TRUCK, 28000, SFX_CAR_HORN_JEEP, 9200, TRUCK_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PICKUP, 11200, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BMW328, 9000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR}, - {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_BMW328, 9200, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, - {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10540, SFX_CAR_HORN_JEEP, 9935, TRUCK_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_BMW328, 9500, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_BMW328, 9700, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18000, SFX_CAR_HORN_JEEP, 9500, TRUCK_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_JEEP, 27513, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9200, OLD_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9000, TRUCK_DOOR}, - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BUS2, 17900, SFX_POLICE_SIREN_SLOW, 10511, TRUCK_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, - {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BMW328, 9600, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_4, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10000, SFX_CAR_HORN_JEEP, 9500, OLD_DOOR}, - {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_PORSCHE, 10500, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR}, - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 25513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR}, - {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, + {SFX_CAR_REV_VTWI, SFX_BANK_VTWIN, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, + {SFX_CAR_REV_VTWI, SFX_BANK_VTWIN, SFX_CAR_HORN_JEEP, 26313, SFX_CAR_HORN_JEEP, 10000, NEW_DOOR}, + {SFX_CAR_REV_HONDA, SFX_BANK_HONDA250, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9000, NEW_DOOR}, + {SFX_CAR_REV_HONDA, SFX_BANK_HONDA250, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9000, NEW_DOOR}, {SFX_CAR_RC_HELI, SFX_BANK_RC_HELI, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, - {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR}, - {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR}, - {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR}, - {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_POLICE_SIREN_SLOW, 11000, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR}, - {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR} }; - + {SFX_CAR_RC_HELI, SFX_BANK_RC_HELI, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, NEW_DOOR}, + {SFX_CAR_ACCEL_22, SFX_BANK_HELI_APACHE, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR}, + {SFX_CAR_REV_PONT, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9000, TRUCK_DOOR} +}; +const eSfxSample aEngineSounds[][2] = { + { SFX_CAR_IDLE_PONT, SFX_CAR_REV_PONT }, + { SFX_CAR_IDLE_PORSHE, SFX_CAR_REV_PORSHE }, + { SFX_CAR_IDLE_SPIDER, SFX_CAR_REV_SPIDER }, + { SFX_CAR_IDLE_MERC, SFX_CAR_REV_MERC }, + { SFX_CAR_IDLE_TRUCK, SFX_CAR_REV_TRUCK }, + { SFX_CAR_IDLE_HOTROD, SFX_CAR_REV_HOTROD }, + { SFX_CAR_IDLE_COBRA, SFX_CAR_REV_COBRA }, + { SFX_CAR_IDLE_PONT2, SFX_CAR_REV_PONT2 }, + { SFX_CAR_IDLE_CADI, SFX_CAR_REV_CADI }, + { SFX_CAR_IDLE_PATHFINDER, SFX_CAR_REV_PATHFINDER }, + { SFX_CAR_IDLE_PACARD, SFX_CAR_REV_PACARD }, + { SFX_CAR_IDLE_GOLFCART, SFX_CAR_REV_GOLFCART }, + { SFX_CAR_IDLE_GOLFCART, SFX_CAR_REV_GOLFCART }, + { SFX_CAR_IDLE_GOLFCART, SFX_CAR_REV_GOLFCART }, + { SFX_CAR_IDLE_GOLFCART, SFX_CAR_REV_GOLFCART }, + { SFX_CAR_IDLE_GOLFCART, SFX_CAR_REV_GOLFCART }, + { SFX_CAR_IDLE_VTWI, SFX_CAR_REV_VTWI }, + { SFX_MOPED_IDLE, SFX_MOPED_REV }, + { SFX_CAR_IDLE_HONDA, SFX_CAR_REV_HONDA }, + { SFX_CAR_IDLE_SPORTCAR, SFX_CAR_REV_SPORTCAR }, + { SFX_CAR_IDLE_UNUSED1, SFX_CAR_REV_UNUSED1 }, + { SFX_CAR_IDLE_UNUSED2, SFX_CAR_REV_UNUSED2 }, + { SFX_CAR_IDLE_UNUSED3, SFX_CAR_REV_UNUSED3 }, + { SFX_CAR_IDLE_UNUSED4, SFX_CAR_REV_UNUSED4 }, +}; bool8 bPlayerJustEnteredCar; const bool8 hornPatternsArray[8][44] = { - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, - FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, - TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, - FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, - TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, + FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, + FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, + TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, - TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, - {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, - FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, + TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, + FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE}, + {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, + TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE} }; void @@ -792,6 +795,12 @@ cAudioManager::ProcessVehicle(CVehicle* veh) ProcessBoatMovingOverWater(params); ProcessVehicleOneShots(params); break; +#ifdef GTA_TRAIN + case VEHICLE_TYPE_TRAIN: + ProcessTrainNoise(params); + ProcessVehicleOneShots(params); + break; +#endif case VEHICLE_TYPE_HELI: ProcessCarHeli(params); ProcessVehicleOneShots(params); @@ -1817,7 +1826,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) if (!caddyBool) { if (veh->GetStatus() == STATUS_SIMPLE) { if (modificator < 0.02f) { - m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nBank - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1; + m_sQueueSample.m_nSampleIndex = aEngineSounds[aVehicleSettings[params.m_nIndex].m_nBank - CAR_SFX_BANKS_OFFSET][0]; m_sQueueSample.m_nCounter = 52; freq = 10000.0f * modificator + 22050; } else { @@ -1826,7 +1835,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) } } else { if (veh->m_fGasPedal < 0.02f) { - m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nBank - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1; + m_sQueueSample.m_nSampleIndex = aEngineSounds[aVehicleSettings[params.m_nIndex].m_nBank - CAR_SFX_BANKS_OFFSET][0]; m_sQueueSample.m_nCounter = 52; freq = 10000.0f * modificator + 22050; } else { @@ -1839,13 +1848,13 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params) if (FindVehicleOfPlayer() == params.m_pVehicle) m_sQueueSample.m_nSampleIndex = SFX_CAR_AFTER_ACCEL_12; else - m_sQueueSample.m_nSampleIndex = SFX_CAR_REV_12; + m_sQueueSample.m_nSampleIndex = SFX_CAR_REV_GOLFCART; m_sQueueSample.m_nFrequency = freq + 20 * m_sQueueSample.m_nBankIndex % 100; } m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 3; - if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_5 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_5) + if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_TRUCK || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_TRUCK) m_sQueueSample.m_nFrequency /= 2; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; @@ -2121,7 +2130,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh freqModifier += 1400; gearSoundLength = 0; engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank; - soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET); + soundOffset = gBankStartOffset[engineSoundType] - gBankStartOffset[CAR_SFX_BANKS_OFFSET]; + //soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET); noGearBox = FALSE; switch (engineSoundType) { case SFX_BANK_PONTIAC: @@ -2182,7 +2192,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh relativeVelocityChange = 2.0f * params.m_fVelocityChange / params.m_pTransmission->fMaxVelocity; accelerationMultipler = Clamp(relativeVelocityChange, 0.0f, 1.0f); gasPedalAudio = accelerationMultipler; - switch (engineSoundType) { + /*switch (engineSoundType) { case SFX_BANK_MOPED: ++soundOffset; break; @@ -2194,7 +2204,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh break; default: break; - } + }*/ if (accelerateState <= 0) { if (params.m_fVelocityChange < -0.001f) { if (channelUsed) { @@ -2241,7 +2251,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh freq /= 2; if (params.m_pVehicle->bIsDrowning) vol /= 4; - AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1, SFX_BANK_0, 52, TRUE); + AddPlayerCarSample(vol, freq, aEngineSounds[engineSoundType - CAR_SFX_BANKS_OFFSET][0], SFX_BANK_0, 52, TRUE); CurrentPretendGear = Max(1, currentGear); } @@ -2276,7 +2286,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh } if (params.m_pVehicle->bIsDrowning) vol /= 4; - AddPlayerCarSample(vol, freq, engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1, SFX_BANK_0, 2, TRUE); + AddPlayerCarSample(vol, freq, aEngineSounds[engineSoundType - CAR_SFX_BANKS_OFFSET][1], SFX_BANK_0, 2, TRUE); } else { TranslateEntity(&m_sQueueSample.m_vecPos, &pos); if (bAccelSampleStopped) { @@ -3543,7 +3553,7 @@ AddSample: bool8 cAudioManager::ProcessTrainNoise(cVehicleParams& params) { - const float SOUND_INTENSITY = 300.0f; + const float SOUND_INTENSITY = 140.0f; CTrain *train; uint8 emittingVol; @@ -3556,16 +3566,16 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params) CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); train = (CTrain *)params.m_pVehicle; speedMultipler = Min(1.0f, train->m_fSpeed * 250.f / 51.f); - emittingVol = (75.f * speedMultipler); + emittingVol = (70.f * speedMultipler); if (train->m_fWagonPosition == 0.0f) { m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 32; - m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR; + m_sQueueSample.m_nSampleIndex = SFX_TRAIN; m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 2; - m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR); + m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN); m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) @@ -3578,28 +3588,28 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params) AddSampleToRequestedQueue(); } } - const float SOUND_INTENSITY = 70.0f; - if (params.m_fDistance < SQR(SOUND_INTENSITY)) { - m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); - if (m_sQueueSample.m_nVolume != 0) { - m_sQueueSample.m_nCounter = 33; - m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_bIs2D = FALSE; - m_sQueueSample.m_nReleasingVolumeModificator = 5; - m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987; - m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_nEmittingVolume = emittingVol; - SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) - m_sQueueSample.m_fSpeedMultiplier = 6.0f; - m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bReleasingSoundFlag = FALSE; - m_sQueueSample.m_nReleasingVolumeDivider = 3; - m_sQueueSample.m_bReverbFlag = TRUE; - m_sQueueSample.m_bRequireReflection = FALSE; - AddSampleToRequestedQueue(); - } - } + //const float SOUND_INTENSITY = 70.0f; + //if (params.m_fDistance < SQR(SOUND_INTENSITY)) { + // m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); + // if (m_sQueueSample.m_nVolume != 0) { + // m_sQueueSample.m_nCounter = 33; + // m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR; + // m_sQueueSample.m_nBankIndex = SFX_BANK_0; + // m_sQueueSample.m_bIs2D = FALSE; + // m_sQueueSample.m_nReleasingVolumeModificator = 5; + // m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987; + // m_sQueueSample.m_nLoopCount = 0; + // m_sQueueSample.m_nEmittingVolume = emittingVol; + // SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex) + // m_sQueueSample.m_fSpeedMultiplier = 6.0f; + // m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; + // m_sQueueSample.m_bReleasingSoundFlag = FALSE; + // m_sQueueSample.m_nReleasingVolumeDivider = 3; + // m_sQueueSample.m_bReverbFlag = TRUE; + // m_sQueueSample.m_bRequireReflection = FALSE; + // AddSampleToRequestedQueue(); + // } + //} } return TRUE; } @@ -4099,6 +4109,23 @@ cAudioManager::GetJumboTaxiFreq() #pragma endregion All the vehicle audio code #pragma region PED AUDIO +struct sToniReactions +{ + uint32 sfx[4]; + uint32 count[4]; +}; + +const sToniReactions aReactions[8] = { + {{SFX_TONI_PISSED_OFF_CRASH_01, SFX_TONI_ANGRY_CRASH_01, SFX_TONI_WISECRACKING_CRASH_01, NULL}, {25, 29, 17, 0}}, + {{SFX_TONI_PISSED_OFF_FIGHT_01, SFX_TONI_ANGRY_FIGHT_01, SFX_TONI_WISECRACKING_FIGHT_01, NULL}, {18, 39, 20, 0}}, + {{SFX_TONI_PISSED_OFF_JACKED_01, SFX_TONI_ANGRY_JACKED_01, SFX_TONI_WISECRACKING_JACKED_01, NULL}, {11, 16, 17, 0}}, + {{SFX_TONI_PISSED_OFF_JACKING_01, SFX_TONI_ANGRY_JACKING_01, SFX_TONI_WISECRACKING_JACKING_01, NULL}, {25, 33, 12, 0}}, + {{SFX_TONI_ANGRY_PICK_UP_HOOKER_01, SFX_TONI_ANGRY_PICK_UP_HOOKER_01, SFX_TONI_WISECRACKING_PICK_UP_HOOKER_01, NULL}, {8, 8, 11, 0}}, + {{SFX_TONI_PISSED_OFF_PULL_GUN_01, SFX_TONI_ANGRY_PULL_GUN_01, SFX_TONI_WISECRACKING_PULL_GUN_01, NULL}, {18, 29, 19, 0}}, + {{SFX_TONI_CALM_SEX_01, SFX_TONI_ANGRY_SEX_01, SFX_TONI_ANGRY_SEX_01, SFX_TONI_WISECRACKING_SEX_01}, {11, 10, 10, 10}}, + {{SFX_TONI_CALM_SHOOT_01, SFX_TONI_PISSED_OFF_SHOOT_01, SFX_TONI_ANGRY_SHOOT_01, SFX_TONI_WISECRACKING_SHOOT_01}, {30, 31, 36, 26}} +}; + void cAudioManager::ProcessPed(CPhysical *ped) { @@ -4299,14 +4326,18 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) if (weaponType == WEAPONTYPE_BRASSKNUCKLE) { CPed* ped = params.m_pPed; uint32 fightMove = ped->m_curFightMove; - if (fightMove == FIGHTMOVE_BACKLEFT || fightMove == FIGHTMOVE_STDPUNCH || fightMove == FIGHTMOVE_PUNCH || + // LCS:removed for now + //if (fightMove == FIGHTMOVE_BACKLEFT || fightMove == FIGHTMOVE_STDPUNCH || fightMove == FIGHTMOVE_PUNCH || + if ( ped->m_nPedState == PED_ATTACK) { CEntity* damageEntity = ped->m_pDamageEntity; if (!damageEntity) m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1; else if (damageEntity->GetType() != ENTITY_TYPE_PED) m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1; - else if (((CPed*)damageEntity)->m_curFightMove != FIGHTMOVE_HITHEAD) + // LCS:removed for now + //else if (((CPed*)damageEntity)->m_curFightMove != FIGHTMOVE_HITHEAD) + else if(1) m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1; else m_sQueueSample.m_nSampleIndex = SFX_HAMMER_HIT_1; @@ -4823,7 +4854,7 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms) break; case WEAPONTYPE_M60: case WEAPONTYPE_HELICANNON: - m_sQueueSample.m_nSampleIndex = SFX_M60_TAIL_LEFT; + //m_sQueueSample.m_nSampleIndex = SFX_M60_TAIL_LEFT; break; default: continue; @@ -5191,23 +5222,19 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound) switch(sound) { case SOUND_PED_HELI_PLAYER_FOUND: soundIntensity = 400.0f; - pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 20 + SFX_POLICE_HELI_1; + pedComment.m_nSampleIndex = NO_SAMPLE; //GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_POLICE_HELI_1, SFX_POLICE_HELI_20); break; case SOUND_PED_VCPA_PLAYER_FOUND: soundIntensity = 400.0f; -#ifdef FIX_BUGS - pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 23 + SFX_POLICE_BOAT_1; -#else - pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 29 + SFX_POLICE_BOAT_1; -#endif + pedComment.m_nSampleIndex = NO_SAMPLE; //m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 23 + SFX_POLICE_BOAT_1; break; case SOUND_INJURED_PED_MALE_OUCH: soundIntensity = 40.0f; - pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 41 + SFX_GENERIC_MALE_GRUNT_1; + pedComment.m_nSampleIndex = NO_SAMPLE; // = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_MALE_GRUNT_1, SFX_GENERIC_MALE_GRUNT_41); break; case SOUND_INJURED_PED_FEMALE: soundIntensity = 40.0f; - pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 33 + SFX_GENERIC_FEMALE_GRUNT_1; + pedComment.m_nSampleIndex = NO_SAMPLE; // = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_FEMALE_GRUNT_1, SFX_GENERIC_FEMALE_GRUNT_33); break; default: return; @@ -5249,63 +5276,90 @@ cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound) case MI_MEDIC: return GetMedicTalkSfx(ped, sound); case MI_FIREMAN: return GetFiremanTalkSfx(ped, sound); case MI_MALE01: return GetDefaultTalkSfx(ped, sound); +/* LCS: removed for now + case MI_TAXI_D: + case MI_MALE03: return GetHFORITalkSfx(ped, sound); + case MI_PIMP: return GetHFOSTTalkSfx(ped, sound); + case MI_CRIMINAL01: return GetHMYSTTalkSfx(ped, sound); + case MI_CRIMINAL02: return GetHMOSTTalkSfx(ped, sound); + case MI_MALE02: return GetHFYRITalkSfx(ped, sound); + case MI_FATMALE01: + case MI_FATMALE02: return GetHMORITalkSfx(ped, sound); + case MI_FEMALE01: return GetHFYBETalkSfx(ped, sound); + case MI_FEMALE02: return GetHFOBETalkSfx(ped, sound); + case MI_FEMALE03: return GetHMYBETalkSfx(ped, sound); + case MI_FATFEMALE01: return GetHMYRITalkSfx(ped, sound); + case MI_FATFEMALE02: return GetHFYBUTalkSfx(ped, sound); + case MI_PROSTITUTE: return GetHFYMDTalkSfx(ped, sound); + case MI_PROSTITUTE2: return GetHFYCGTalkSfx(ped, sound); + case MI_P_MAN1: return GetHFYPRTalkSfx(ped, sound); + case MI_P_MAN2: return GetHFOTRTalkSfx(ped, sound); + case MI_P_WOM1: return GetHMOTRTalkSfx(ped, sound); + case MI_P_WOM2: return GetHMYAPTalkSfx(ped, sound); + case MI_CT_MAN1: return GetHMOCATalkSfx(ped, sound); + case MI_CT_MAN2: return GetBMODKTalkSfx(ped, sound); + case MI_CT_WOM1: return GetBMYCRTalkSfx(ped, sound); + case MI_CT_WOM2: return GetBFYSTTalkSfx(ped, sound); + case MI_LI_MAN1: return GetBFOSTTalkSfx(ped, sound); + case MI_LI_MAN2: return GetBMYSTTalkSfx(ped, sound); + case MI_LI_WOM1: return GetBMOSTTalkSfx(ped, sound); + case MI_LI_WOM2: return GetBFYRITalkSfx(ped, sound); + case MI_DOCKER1: + case MI_DOCKER2: return GetBFORITalkSfx(ped, sound); + case MI_SCUM_MAN: return GetBFYBETalkSfx(ped, sound); + case MI_SCUM_WOM: return GetBMYBETalkSfx(ped, sound); + case MI_WORKER1: return GetBFOBETalkSfx(ped, sound); + case MI_WORKER2: return GetBMOBETalkSfx(ped, sound); + case MI_B_MAN1: return GetBMYBUTalkSfx(ped, sound); + case MI_B_MAN2: return GetBFYPRTalkSfx(ped, sound); + case MI_B_MAN3: return GetBFOTRTalkSfx(ped, sound); + case MI_B_WOM1: return GetBMOTRTalkSfx(ped, sound); + case MI_B_WOM2: return GetBMYPITalkSfx(ped, sound); + case MI_B_WOM3: return GetBMYBBTalkSfx(ped, sound); + case MI_MOD_MAN: return GetWMYCRTalkSfx(ped, sound); + case MI_MOD_WOM: return GetWFYSTTalkSfx(ped, sound); + case MI_ST_MAN: return GetWFOSTTalkSfx(ped, sound); + case MI_ST_WOM: return GetWMYSTTalkSfx(ped, sound); + case MI_FAN_MAN1: return GetWMOSTTalkSfx(ped, sound); + case MI_FAN_MAN2: return GetWFYRITalkSfx(ped, sound); + case MI_FAN_WOM: return GetWFORITalkSfx(ped, sound); + case MI_HOS_MAN: return GetWMYRITalkSfx(ped, sound); + case MI_HOS_WOM: return GetWMORITalkSfx(ped, sound); + case MI_CONST1: return GetWFYBETalkSfx(ped, sound); + case MI_CONST2: return GetWMYBETalkSfx(ped, sound); + case MI_SHOPPER1: return GetWFOBETalkSfx(ped, sound); + case MI_SHOPPER2: return GetWMOBETalkSfx(ped, sound); + case MI_SHOPPER3: return GetWMYCWTalkSfx(ped, sound); + case MI_STUD_MAN: return GetWMYGOTalkSfx(ped, sound); + case MI_STUD_WOM: return GetWFOGOTalkSfx(ped, sound); + case MI_CAS_MAN: return GetWMOGOTalkSfx(ped, sound); + case MI_CAS_WOM: return GetWFYLGTalkSfx(ped, sound); + case MI_CAMP_MAN: return GetCAMPMANTalkSfx(ped, sound); + case MI_CAMP_WOM: return GetCAMPWOMTalkSfx(ped, sound); + case MI_JFOTO: return GetJFOTOTalkSfx(ped, sound); + case MI_JMOTO: return GetJMOTOTalkSfx(ped, sound); + case MI_GANG01: return GetGangLeoneATalkSfx(ped, sound); + case MI_GANG02: return GetGangLeoneBTalkSfx(ped, sound); + case MI_GANG03: return GetGangTriadATalkSfx(ped, sound); + case MI_GANG04: return GetGangTriadBTalkSfx(ped, sound); + case MI_GANG05: return GetGangDiabloATalkSfx(ped, sound); + case MI_GANG06: return GetGangDiabloBTalkSfx(ped, sound); + case MI_GANG07: return GetGangYakuzaATalkSfx(ped, sound); + case MI_GANG08: return GetGangYakuzaBTalkSfx(ped, sound); + case MI_GANG09: return GetGangYardieATalkSfx(ped, sound); + case MI_GANG10: return GetGangYardieBTalkSfx(ped, sound); + case MI_GANG11: return GetGangColumbianATalkSfx(ped, sound); + case MI_GANG12: return GetGangColumbianBTalkSfx(ped, sound); + case MI_GANG13: return GetGangHoodATalkSfx(ped, sound); + case MI_GANG14: return GetGangHoodBTalkSfx(ped, sound); + case MI_GANG15: return GetGangForelliATalkSfx(ped, sound); + case MI_GANG16: return GetGangForelliBTalkSfx(ped, sound); + case MI_GANG17: return GetGangSindaccosATalkSfx(ped, sound); + case MI_GANG18: return GetGangSindaccosBTalkSfx(ped, sound); +/* LCS: cut case MI_HFYST: return GetHFYSTTalkSfx(ped, sound); - case MI_HFOST: return GetHFOSTTalkSfx(ped, sound); - case MI_HMYST: return GetHMYSTTalkSfx(ped, sound); - case MI_HMOST: return GetHMOSTTalkSfx(ped, sound); - case MI_HFYRI: return GetHFYRITalkSfx(ped, sound); - case MI_HFORI: return GetHFORITalkSfx(ped, sound); - case MI_HMYRI: return GetHMYRITalkSfx(ped, sound); - case MI_HMORI: return GetHMORITalkSfx(ped, sound); - case MI_HFYBE: return GetHFYBETalkSfx(ped, sound); - case MI_HFOBE: return GetHFOBETalkSfx(ped, sound); - case MI_HMYBE: return GetHMYBETalkSfx(ped, sound); case MI_HMOBE: return GetHMOBETalkSfx(ped, sound); - case MI_HFYBU: return GetHFYBUTalkSfx(ped, sound); - case MI_HFYMD: return GetHFYMDTalkSfx(ped, sound); - case MI_HFYCG: return GetHFYCGTalkSfx(ped, sound); - case MI_HFYPR: return GetHFYPRTalkSfx(ped, sound); - case MI_HFOTR: return GetHFOTRTalkSfx(ped, sound); - case MI_HMOTR: return GetHMOTRTalkSfx(ped, sound); - case MI_HMYAP: return GetHMYAPTalkSfx(ped, sound); - case MI_HMOCA: return GetHMOCATalkSfx(ped, sound); - case MI_BMODK: return GetBMODKTalkSfx(ped, sound); - case MI_BMYKR: return GetBMYCRTalkSfx(ped, sound); - case MI_BFYST: return GetBFYSTTalkSfx(ped, sound); - case MI_BFOST: return GetBFOSTTalkSfx(ped, sound); - case MI_BMYST: return GetBMYSTTalkSfx(ped, sound); - case MI_BMOST: return GetBMOSTTalkSfx(ped, sound); - case MI_BFYRI: return GetBFYRITalkSfx(ped, sound); - case MI_BFORI: return GetBFORITalkSfx(ped, sound); case MI_BMYRI: return GetBMYRITalkSfx(ped, sound); - case MI_BFYBE: return GetBFYBETalkSfx(ped, sound); - case MI_BMYBE: return GetBMYBETalkSfx(ped, sound); - case MI_BFOBE: return GetBFOBETalkSfx(ped, sound); - case MI_BMOBE: return GetBMOBETalkSfx(ped, sound); - case MI_BMYBU: return GetBMYBUTalkSfx(ped, sound); - case MI_BFYPR: return GetBFYPRTalkSfx(ped, sound); - case MI_BFOTR: return GetBFOTRTalkSfx(ped, sound); - case MI_BMOTR: return GetBMOTRTalkSfx(ped, sound); - case MI_BMYPI: return GetBMYPITalkSfx(ped, sound); - case MI_BMYBB: return GetBMYBBTalkSfx(ped, sound); - case MI_WMYCR: return GetWMYCRTalkSfx(ped, sound); - case MI_WFYST: return GetWFYSTTalkSfx(ped, sound); - case MI_WFOST: return GetWFOSTTalkSfx(ped, sound); - case MI_WMYST: return GetWMYSTTalkSfx(ped, sound); - case MI_WMOST: return GetWMOSTTalkSfx(ped, sound); - case MI_WFYRI: return GetWFYRITalkSfx(ped, sound); - case MI_WFORI: return GetWFORITalkSfx(ped, sound); - case MI_WMYRI: return GetWMYRITalkSfx(ped, sound); - case MI_WMORI: return GetWMORITalkSfx(ped, sound); - case MI_WFYBE: return GetWFYBETalkSfx(ped, sound); - case MI_WMYBE: return GetWMYBETalkSfx(ped, sound); - case MI_WFOBE: return GetWFOBETalkSfx(ped, sound); - case MI_WMOBE: return GetWMOBETalkSfx(ped, sound); - case MI_WMYCW: return GetWMYCWTalkSfx(ped, sound); - case MI_WMYGO: return GetWMYGOTalkSfx(ped, sound); - case MI_WFOGO: return GetWFOGOTalkSfx(ped, sound); - case MI_WMOGO: return GetWMOGOTalkSfx(ped, sound); - case MI_WFYLG: return GetWFYLGTalkSfx(ped, sound); case MI_WMYLG: return GetWMYLGTalkSfx(ped, sound); case MI_WFYBU: return GetWFYBUTalkSfx(ped, sound); case MI_WMYBU: return GetWMYBUTalkSfx(ped, sound); @@ -5321,8 +5375,6 @@ cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound) case MI_WMYSK: return GetWMYSKTalkSfx(ped, sound); case MI_WFYSH: return GetWFYSHTalkSfx(ped, sound); case MI_WFOSH: return GetWFOSHTalkSfx(ped, sound); - case MI_JFOTO: return GetJFOTOTalkSfx(ped, sound); - case MI_JMOTO: return GetJMOTOTalkSfx(ped, sound); case MI_CBA: case MI_CBB: return GetCBTalkSfx(ped, sound); case MI_HNA: @@ -5337,16 +5389,15 @@ cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound) case MI_BKB: return GetBKTalkSfx(ped, sound); case MI_PGA: case MI_PGB: return GetPGTalkSfx(ped, sound); +*/ case MI_VICE1: case MI_VICE2: case MI_VICE3: case MI_VICE4: case MI_VICE5: case MI_VICE7: - case MI_VICE8: return GetViceWhiteTalkSfx(ped, sound); - case MI_VICE6: return GetViceBlackTalkSfx(ped, sound); - case MI_WFYG1: return GetWFYG1TalkSfx(ped, sound); - case MI_WFYG2: return GetWFYG2TalkSfx(ped, sound); + case MI_VICE8: //return GetViceWhiteTalkSfx(ped, sound); + case MI_VICE6: //return GetViceBlackTalkSfx(ped, sound); case MI_SPECIAL01: case MI_SPECIAL02: case MI_SPECIAL03: @@ -5367,7 +5418,8 @@ cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound) case MI_SPECIAL18: case MI_SPECIAL19: case MI_SPECIAL20: - case MI_SPECIAL21: return NO_SAMPLE; + case MI_SPECIAL21: //GetSpecialCharacterTalkSfx(ped, sound) + return NO_SAMPLE; default: return GetGenericMaleTalkSfx(ped, sound); } } @@ -5378,6 +5430,11 @@ cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound) void cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) { + if (maxOffset == 0) { + phrase = prevPhrase = NO_SAMPLE; + return; + } + phrase = sample + m_anRandomTable[m_sQueueSample.m_nEntityIndex & 3] % maxOffset; // check if the same sfx like last time, if yes, then try use next one, @@ -5403,40 +5460,38 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) if(m_bIsPlayerShutUp) return NO_SAMPLE; switch(sound) { - case SOUND_PED_DEATH: return SFX_PLAYER_DEATH; + case SOUND_PED_DEATH: + case SOUND_PED_PLAYER_AFTERSEX: return NO_SAMPLE; case SOUND_PED_DAMAGE: - case SOUND_PED_BULLET_HIT: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_BULLET_1, 33); break; + case SOUND_PED_BULLET_HIT: GetPhrase(sfx, ped->m_lastComment, SFX_TONI_GENERAL_IMP_HI_01, 16); break; case SOUND_PED_HIT: - case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_FIST_1, 42); break; - case SOUND_PED_LAND: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_HIT_GROUND_1, 35); break; - case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ON_FIRE_1, 16); break; + case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_TONI_GENERAL_IMP_LOW_01, 15); break; + case SOUND_PED_LAND: GetPhrase(sfx, ped->m_lastComment, SFX_TONI_GENERAL_HIT_GROUND_01, 12); break; + case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_TONI_GENERAL_ON_FIRE_01, 7); break; case SOUND_PED_PLAYER_REACTTOCOP: switch(m_nPlayerMood) { - case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_BUSTED_1, 38); + case PLAYER_MOOD_PISSED_OFF: + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_PISSED_OFF_BUSTED_01, 12); break; - case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_BUSTED_1, 20); + case PLAYER_MOOD_ANGRY: + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_ANGRY_BUSTED_01, 16); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_BUSTED_1, 22); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_BUSTED_01, 25); break; } break; case SOUND_PED_ON_FIRE: { cooldown_phrase(8); switch(m_nPlayerMood) { + case PLAYER_MOOD_CALM: case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_SHOOT_1, 29); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_SHOOT_1, 39); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_SHOOT_1, 9); + GetPhrase(sfx, ped->m_lastComment, aReactions[7].sfx[m_nPlayerMood], aReactions[7].count[m_nPlayerMood]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_SHOOT_1, 35); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_SEX_01, 30); // bruh break; } break; @@ -5445,16 +5500,12 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) cooldown_phrase(8); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PULL_GUN_1, 25); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PULL_GUN_1, 52); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PULL_GUN_1, 19); + GetPhrase(sfx, ped->m_lastComment, aReactions[5].sfx[m_nPlayerMood-1], aReactions[5].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PULL_GUN_1, 39); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_PULL_GUN_01, 35); break; } break; @@ -5463,81 +5514,59 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_JACKING_1, 36); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_JACKING_1, 43); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_JACKING_1, 18); + GetPhrase(sfx, ped->m_lastComment, aReactions[3].sfx[m_nPlayerMood-1], aReactions[3].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_JACKING_1, 40); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_JACKING_01, 35); break; } break; } case SOUND_PED_MUGGING: { cooldown_phrase(8); - switch(m_nPlayerMood) { - case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_1, 25); - break; - case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PICK_UP_CASH_1, 12); - break; - case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PICK_UP_CASH_1, 23); - break; - default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PICK_UP_CASH_1, 11); - break; - } + sfx = NO_SAMPLE; break; } case SOUND_PED_CAR_JACKED: { cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_JACKED_1, 21); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_JACKED_1, 33); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_JACKED_1, 18); + GetPhrase(sfx, ped->m_lastComment, aReactions[2].sfx[m_nPlayerMood-1], aReactions[2].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_JACKED_1, 24); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_JACKED_01, 23); break; } break; } - case SOUND_PED_PLAYER_AFTERSEX: GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_AFTERSEX_1, 18); break; case SOUND_PED_PLAYER_BEFORESEX: switch(m_nPlayerMood) { + case PLAYER_MOOD_CALM: + case PLAYER_MOOD_PISSED_OFF: case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_SEX_1, 18); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_SEX_1, 10); + GetPhrase(sfx, ped->m_lastComment, aReactions[6].sfx[m_nPlayerMood], aReactions[6].count[m_nPlayerMood]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_SEX_1, 8); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_SEX_01, 10); break; } break; case SOUND_PED_PLAYER_FARFROMCOPS: { cooldown_phrase(4); switch(m_nPlayerMood) { - case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_CHASED_1, 9); + case PLAYER_MOOD_PISSED_OFF: + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_PISSED_OFF_CHASED_01, 25); break; - case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_CHASED_1, 7); + case PLAYER_MOOD_ANGRY: + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_ANGRY_CHASED_01, 25); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_CHASED_1, 20); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_CHASED_01, 20); break; } break; @@ -5546,16 +5575,12 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_FIGHT_1, 61); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_FIGHT_1, 61); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_FIGHT_1, 27); + GetPhrase(sfx, ped->m_lastComment, aReactions[1].sfx[m_nPlayerMood-1], aReactions[1].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_FIGHT_1, 47); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_FIGHT_01, 42); break; } break; @@ -5566,16 +5591,12 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_CRASH_1, 44); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_CRASH_1, 41); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_CRASH_1, 19); + GetPhrase(sfx, ped->m_lastComment, aReactions[0].sfx[m_nPlayerMood-1], aReactions[0].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_CRASH_1, 43); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_CRASH_01, 31); break; } break; @@ -5584,16 +5605,12 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, uint16 sound) cooldown_phrase(4); switch(m_nPlayerMood) { case PLAYER_MOOD_PISSED_OFF: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_1, 17); - break; case PLAYER_MOOD_ANGRY: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_ANGRY_PICK_UP_HOOKER_1, 6); - break; case PLAYER_MOOD_WISECRACKING: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_1, 11); + GetPhrase(sfx, ped->m_lastComment, aReactions[4].sfx[m_nPlayerMood-1], aReactions[4].count[m_nPlayerMood-1]); break; default: - GetPhrase(sfx, ped->m_lastComment, SFX_PLAYER_CALM_PICK_UP_HOOKER_1, 22); + GetPhrase(sfx, ped->m_lastComment, SFX_TONI_CALM_PICK_UP_HOOKER_01, 18); break; } break; @@ -5610,11 +5627,11 @@ cAudioManager::GetGenericMaleTalkSfx(CPed *ped, uint16 sound) m_bGenericSfx = TRUE; switch(sound) { - case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_DEATH_1, 41); break; + case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_MALE_DEATH_01, 28); break; case SOUND_PED_BULLET_HIT: - case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_GRUNT_1, 41); break; - case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_FIRE_1, 32); break; - case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_MALE_PANIC_1, 35); break; + case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_MALE_PAIN_01, 51); break; + case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_MALE_PAIN_ON_FIRE_01, 21); break; + case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, SFX_MALE_PANIC_01, 23); break; default: return NO_SAMPLE; } return sfx; @@ -5626,11 +5643,12 @@ cAudioManager::GetGenericFemaleTalkSfx(CPed *ped, uint16 sound) uint32 sfx; m_bGenericSfx = TRUE; switch(sound) { - case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_DEATH_1, 22); break; + case SOUND_PED_DEATH: GetPhrase(sfx, ped->m_lastComment, SFX_FEMALE_DEATH_01, 16); break; case SOUND_PED_BULLET_HIT: - case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_GRUNT_1, 33); break; - case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_FIRE_1, 17); break; - case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, SFX_GENERIC_FEMALE_PANIC_1, 27); break; + case SOUND_PED_DEFEND: GetPhrase(sfx, ped->m_lastComment, SFX_FEMALE_PAIN_01, 34); break; + case SOUND_PED_BURNING: GetPhrase(sfx, ped->m_lastComment, SFX_FEMALE_PAIN_ON_FIRE_01, 11); break; + case SOUND_PED_FLEE_SPRINT: GetPhrase(sfx, ped->m_lastComment, SFX_FEMALE_PANIC_01, 13); break; + case SOUND_PED_PLAYER_BEFORESEX: GetPhrase(sfx, ped->m_lastComment, SFX_FEMALE_SEX_01, 11); break; default: return NO_SAMPLE; } return sfx; @@ -5642,29 +5660,28 @@ cAudioManager::GetDefaultTalkSfx(CPed *ped, uint16 sound) uint32 sfx; switch(sound) { - case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_GUN_PANIC_1, 12); break; - case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_JACKED_1, 12); break; -#ifdef FIX_BUGS - case SOUND_PED_CAR_JACKING: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_JACKING_1, 13); break; -#endif - case SOUND_PED_ROBBED: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_MUGGED_1, 4); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_SAVED_1, 4); break; - case SOUND_PED_TAXI_WAIT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_TAXI_1, 5); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_FIGHT_1, 16); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_DODGE_1, 19); break; - case SOUND_PED_FLEE_RUN: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_RUN_1, 19); break; - case SOUND_PED_CRASH_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_GENERIC_CRASH_1, 13); break; - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_CAR_CRASH_1, 15); break; - case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_BLOCKED_1, 16); break; - case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_LOST_1, 5); break; + case SOUND_PED_HANDS_COWER: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_GUN_THREATENED_1, 2); break; + case SOUND_PED_CAR_JACKED: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_JACKED_CAR_1, 2); break; + case SOUND_PED_ROBBED: + case SOUND_PED_ACCIDENTREACTION1: + case SOUND_PED_TAXI_WAIT: + case SOUND_PED_EVADE: + case SOUND_PED_FLEE_RUN: + case SOUND_PED_CRASH_VEHICLE: + case SOUND_PED_WAIT_DOUBLEBACK: #ifdef FIX_BUGS - case SOUND_PED_CHAT_SEXY_MALE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_EYEING_1, 6); break; + case SOUND_PED_CHAT_SEXY_MALE: #else - case SOUND_PED_CHAT_SEXY_FEMALE: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_EYEING_1, 6); break; + case SOUND_PED_CHAT_SEXY_FEMALE: #endif - case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_SHOCKED_1, 6); break; - case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_BUMP_1, 25); break; - case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_DEFAULT_VOICE_CHAT_1, 25); break; + GetPhrase(sfx, ped->m_lastComment, NO_SAMPLE, 0); + break; + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_FIGHT_1, 3); break; + case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_CRASH_CAR_1, 2); break; + case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_DRIVER_BLOCKED_1, 2); break; + case SOUND_PED_CHAT_EVENT: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_SHOCKED_1, 1); break; + case SOUND_PED_PED_COLLISION: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_BUMP_1, 3); break; + case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_MALE01_CHAT_1, 4); break; default: return GetGenericMaleTalkSfx(ped, sound); } return sfx; @@ -5676,38 +5693,35 @@ cAudioManager::GetCopTalkSfx(CPed *ped, uint16 sound) uint32 sfx; PedState objective; switch(sound) { - case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_ARREST_1, 4); break; - case SOUND_PED_PULLOUTWEAPON: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_PULLOUTWEAPON_1, 3); break; - case SOUND_PED_ACCIDENTREACTION1: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_SAVED_1, 2); break; - case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_TARGETING_1, 4); break; - case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_MANYCOPSAROUND_1, 2); break; - case SOUND_PED_GUNAIMEDAT2: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_GUNAIMEDAT2_1, 2); break; - case SOUND_PED_COP_ALONE: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_ALONE_1, 4); break; - case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_GUNAIMEDAT2_1, 2); break; + case SOUND_PED_ARREST_COP: GetPhrase(sfx, ped->m_lastComment, SFX_COP1_ARREST_1, 2); break; + case SOUND_PED_PULLOUTWEAPON: + case SOUND_PED_ACCIDENTREACTION1: + case SOUND_PED_COP_MANYCOPSAROUND: + case SOUND_PED_GUNAIMEDAT2: + case SOUND_PED_COP_ALONE: + case SOUND_PED_GUNAIMEDAT3: + return NO_SAMPLE; + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_COP1_SHOOT_1, 6); break; case SOUND_PED_COP_ASK_FOR_ID: { cooldown_phrase(4); - GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_ASK_FOR_ID_1, 2); - break; + return NO_SAMPLE; } case SOUND_PED_COP_LITTLECOPSAROUND: objective = FindPlayerPed()->m_nPedState; if(objective == PED_ARRESTED || objective == PED_DEAD || objective == PED_DIE) return NO_SAMPLE; - GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_1, 4); + GetPhrase(sfx, ped->m_lastComment, SFX_COP1_CHASE_FOOT_1, 6); break; - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_FIGHT_1, 4); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_DODGE_1, 3); break; -#ifdef FIX_BUGS - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_CAR_CRASH_1, 4); break; -#endif + case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_COP1_FIGHT_1, 3); break; + case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_COP1_DODGE_1, 2); break; case SOUND_PED_PED_COLLISION: if(FindPlayerPed()->m_pWanted->GetWantedLevel() > 0) - GetPhrase(sfx, ped->m_lastComment, SFX_COP_VOICE_1_BUMP_1, 5); + GetPhrase(sfx, ped->m_lastComment, SFX_COP1_BUMP_1, 5); else return NO_SAMPLE; break; default: return GetGenericMaleTalkSfx(ped, sound); } - return (SFX_COP_VOICE_2_ARREST_1 - SFX_COP_VOICE_1_ARREST_1) * (m_sQueueSample.m_nEntityIndex % 5) + sfx; + return (SFX_COP2_ARREST_1 - SFX_COP1_ARREST_1) * (m_sQueueSample.m_nEntityIndex % 6) + sfx; } uint32 @@ -5715,12 +5729,12 @@ cAudioManager::GetSwatTalkSfx(CPed *ped, uint16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_COP_HELIPILOTPHRASE: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_1, 7); break; - case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_COP_TARGETING_1, 4); break; - case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_DODGE_1, 3); break; + case SOUND_PED_COP_HELIPILOTPHRASE: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_ROPE_1, 2); break; + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_SWAT_VOICE_1_SHOOT_1, 5); break; + case SOUND_PED_EVADE: return NO_SAMPLE; default: return GetGenericMaleTalkSfx(ped, sound); } - sfx += (SFX_SWAT_VOICE_2_DODGE_1 - SFX_SWAT_VOICE_1_DODGE_1) * (m_sQueueSample.m_nEntityIndex % 3); + sfx += (SFX_SWAT_VOICE_2_ROPE_1 - SFX_SWAT_VOICE_1_ROPE_1) * (m_sQueueSample.m_nEntityIndex % 2); return sfx; } @@ -5729,22 +5743,21 @@ cAudioManager::GetFBITalkSfx(CPed *ped, uint16 sound) { uint32 sfx; switch(sound) { + case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_SHOOT_1, 5); break; + case SOUND_PED_COP_MANYCOPSAROUND: + case SOUND_PED_GUNAIMEDAT2: + case SOUND_PED_GUNAIMEDAT3: + case SOUND_PED_CRASH_VEHICLE: + case SOUND_PED_CRASH_CAR: return NO_SAMPLE; #ifdef FIX_BUGS - case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_TARGETING_1, 6); break; -#else - case SOUND_PED_COP_TARGETING: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_TARGETING_1, 4); break; + case SOUND_PED_LEAVE_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_VAN_1, 2); break; #endif - case SOUND_PED_COP_MANYCOPSAROUND: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_1, 3); break; - case SOUND_PED_GUNAIMEDAT2: sfx = SFX_FBI_VOICE_1_GUNAIMEDAT2_1; break; - case SOUND_PED_GUNAIMEDAT3: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_GUNAIMEDAT3_1, 4); break; - case SOUND_PED_CRASH_VEHICLE: - case SOUND_PED_CRASH_CAR: GetPhrase(sfx, ped->m_lastComment, SFX_FBI_VOICE_1_CAR_CRASH_1, 4); break; default: return GetGenericMaleTalkSfx(ped, sound); } #ifdef FIX_BUGS - sfx += (SFX_FBI_VOICE_2_GUNAIMEDAT3_1 - SFX_FBI_VOICE_1_GUNAIMEDAT3_1) * (m_sQueueSample.m_nEntityIndex % 3); + sfx += (SFX_FBI_VOICE_2_SHOOT_1 - SFX_FBI_VOICE_1_SHOOT_1) * (m_sQueueSample.m_nEntityIndex % 2); #else - sfx += 16 * (m_sQueueSample.m_nEntityIndex % 3); + sfx += 5 * (m_sQueueSample.m_nEntityIndex % 2); #endif return sfx; } @@ -5760,12 +5773,11 @@ cAudioManager::GetMedicTalkSfx(CPed *ped, uint16 sound) { uint32 sfx; switch(sound) { - case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_FIGHT_1, 6); break; - case SOUND_PED_HEALING: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_AT_VICTIM_1, 17); break; - case SOUND_PED_LEAVE_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_1, 10); break; + case SOUND_PED_HEALING: GetPhrase(sfx, ped->m_lastComment, SFX_AMBULAN_VOICE_1_VICTIM_1, 17); break; + case SOUND_PED_LEAVE_VEHICLE: GetPhrase(sfx, ped->m_lastComment, SFX_AMBULAN_VOICE_1_VAN_1, 10); break; default: return GetGenericMaleTalkSfx(ped, sound); } - sfx += (SFX_MEDIC_VOICE_2_FIGHT_1 - SFX_MEDIC_VOICE_1_FIGHT_1) * (m_sQueueSample.m_nEntityIndex % 2); + sfx += (SFX_AMBULAN_VOICE_2_VAN_1 - SFX_AMBULAN_VOICE_1_VAN_1) * (m_sQueueSample.m_nEntityIndex % 2); return sfx; } @@ -5775,6 +5787,7 @@ cAudioManager::GetFiremanTalkSfx(CPed *ped, uint16 sound) return GetGenericMaleTalkSfx(ped, sound); } +/* uint32 cAudioManager::GetWFYG1TalkSfx(CPed *ped, uint16 sound) { @@ -5832,7 +5845,9 @@ cAudioManager::GetWFYG2TalkSfx(CPed *ped, uint16 sound) return sfx; } +*/ +/* uint32 cAudioManager::GetHFYSTTalkSfx(CPed *ped, uint16 sound) { @@ -7599,7 +7614,8 @@ cAudioManager::GetSGTalkSfx(CPed *ped, uint16 sound) case SOUND_PED_CHAT: GetPhrase(sfx, ped->m_lastComment, SFX_STREET_GANG_1_CHAT_1, 12); break; default: return GetGenericMaleTalkSfx(ped, sound); } - if(ped->GetModelIndex() == MI_SGB) sfx += (SFX_STREET_GANG_2_BLOCKED_1 - SFX_STREET_GANG_1_BLOCKED_1); +// LCS removed for now +// if(ped->GetModelIndex() == MI_SGB) sfx += (SFX_STREET_GANG_2_BLOCKED_1 - SFX_STREET_GANG_1_BLOCKED_1); return sfx; } @@ -7793,6 +7809,7 @@ cAudioManager::GetWMYJGTalkSfx(CPed *ped, uint16 sound) } return sfx; } +*/ void cPedComments::Add(tPedComment *com) @@ -7874,7 +7891,7 @@ cPedComments::Process() AudioManager.m_sQueueSample.m_bRequireReflection = TRUE; AudioManager.m_sQueueSample.m_bIs2D = FALSE; #ifdef FIX_BUGS - if (sampleIndex >= SFX_PLAYER_ANGRY_BUSTED_1 && sampleIndex < TOTAL_AUDIO_SAMPLES) { // check if player sfx + if (sampleIndex >= SFX_TONI_ANGRY_BUSTED_01 && sampleIndex <= SFX_TONI_WISECRACKING_SHOOT_26) { // check if player sfx AudioManager.m_sQueueSample.m_bIs2D = TRUE; AudioManager.m_sQueueSample.m_nOffset = 63; } @@ -8224,17 +8241,17 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_bIs2D = TRUE; m_sQueueSample.m_bRequireReflection = FALSE; break; - case SCRIPT_SOUND_PAYPHONE_RINGING: - m_sQueueSample.m_fSoundIntensity = 80.0f; - m_sQueueSample.m_nSampleIndex = SFX_PHONE_RING; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; - emittingVolume = 80; - m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING); - m_sQueueSample.m_nReleasingVolumeModificator = 1; - m_sQueueSample.m_fSpeedMultiplier = 2.0f; - m_sQueueSample.m_bIs2D = FALSE; - m_sQueueSample.m_bRequireReflection = FALSE; - break; + //case SCRIPT_SOUND_PAYPHONE_RINGING: + // m_sQueueSample.m_fSoundIntensity = 80.0f; + // m_sQueueSample.m_nSampleIndex = SFX_PHONE_RING; + // m_sQueueSample.m_nBankIndex = SFX_BANK_0; + // emittingVolume = 80; + // m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING); + // m_sQueueSample.m_nReleasingVolumeModificator = 1; + // m_sQueueSample.m_fSpeedMultiplier = 2.0f; + // m_sQueueSample.m_bIs2D = FALSE; + // m_sQueueSample.m_bRequireReflection = FALSE; + // break; case SCRIPT_SOUND_GLASS_BREAK_L: m_sQueueSample.m_fSoundIntensity = 60.0f; m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH; @@ -8778,7 +8795,7 @@ cAudioManager::ProcessFrontEnd() case SOUND_FRONTEND_MENU_STARTING: case SOUND_HUD: stereo = TRUE; - m_sQueueSample.m_nSampleIndex = SFX_INFO_LEFT; + m_sQueueSample.m_nSampleIndex = SFX_FE_INFO_LEFT; center = TRUE; break; case SOUND_PICKUP_MONEY: @@ -8817,7 +8834,7 @@ cAudioManager::ProcessFrontEnd() m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK; break; case SOUND_FRONTEND_HURRICANE: - m_sQueueSample.m_nSampleIndex = SFX_HURRICANE_MA; + //m_sQueueSample.m_nSampleIndex = SFX_HURRICANE_MA; break; case SOUND_BULLETTRACE_1: case SOUND_BULLETTRACE_2: @@ -8828,21 +8845,21 @@ cAudioManager::ProcessFrontEnd() break; case SOUND_RADIO_CHANGE: m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] % 2) ? radioDial + 1 : radioDial + 2; - if (m_sQueueSample.m_nSampleIndex > SFX_RADIO_DIAL_12) - m_sQueueSample.m_nSampleIndex -= 12; + if (m_sQueueSample.m_nSampleIndex > SFX_RADIO_DIAL_3) + m_sQueueSample.m_nSampleIndex -= 3; radioDial = m_sQueueSample.m_nSampleIndex; break; case SOUND_FRONTEND_HIGHLIGHT_OPTION: - stereo = TRUE; - m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT; + //stereo = TRUE; + m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT; break; case SOUND_FRONTEND_ENTER_OR_ADJUST: - stereo = TRUE; - m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT; + //stereo = TRUE; + m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT; break; case SOUND_FRONTEND_BACK: - stereo = TRUE; - m_sQueueSample.m_nSampleIndex = SFX_FE_BACK_LEFT; + //stereo = TRUE; + m_sQueueSample.m_nSampleIndex = SFX_FE_BACK; break; case SOUND_FRONTEND_FAIL: stereo = TRUE; @@ -8880,8 +8897,8 @@ cAudioManager::ProcessFrontEnd() m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nVolume = 127; - if (m_sQueueSample.m_nSampleIndex == SFX_HURRICANE_MA && CWeather::Wind > 1.0f) - m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume; + //if (m_sQueueSample.m_nSampleIndex == SFX_HURRICANE_MA && CWeather::Wind > 1.0f) + // m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume; m_sQueueSample.m_nCounter = iSound++; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_bReleasingSoundFlag = TRUE; @@ -9082,37 +9099,37 @@ CVector aVecExtraSoundPosition[] = { CVector(-1042.546f, 88.794f, 11.324f), CVec void cAudioManager::ProcessExtraSounds() { - const float SOUND_INTENSITY = 18.0f; - const uint8 EMITTING_VOLUME = 50; - - float distance; - - for (int i = 0; i < ARRAY_SIZE(aVecExtraSoundPosition); i++) { - m_sQueueSample.m_vecPos = aVecExtraSoundPosition[i]; - distance = GetDistanceSquared(m_sQueueSample.m_vecPos); - if (distance < SQR(SOUND_INTENSITY)) { - m_sQueueSample.m_fDistance = Sqrt(distance); - m_sQueueSample.m_nVolume = ComputeVolume(EMITTING_VOLUME, SOUND_INTENSITY, m_sQueueSample.m_fDistance); - if (m_sQueueSample.m_nVolume != 0) { - m_sQueueSample.m_nCounter = i; - m_sQueueSample.m_nSampleIndex = SFX_ARCADE; - m_sQueueSample.m_nBankIndex = SFX_BANK_0; - m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE); - m_sQueueSample.m_bIs2D = FALSE; - m_sQueueSample.m_nLoopCount = 0; - m_sQueueSample.m_bReleasingSoundFlag = FALSE; - m_sQueueSample.m_nReleasingVolumeModificator = 4; - m_sQueueSample.m_fSpeedMultiplier = 3.0f; - m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME; - SET_LOOP_OFFSETS(SFX_ARCADE) - m_sQueueSample.m_bReverbFlag = TRUE; - m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; - m_sQueueSample.m_bRequireReflection = FALSE; - m_sQueueSample.m_nReleasingVolumeDivider = 3; - AddSampleToRequestedQueue(); - } - } - } + //const float SOUND_INTENSITY = 18.0f; + //const uint8 EMITTING_VOLUME = 50; + + //float distance; + + //for (int i = 0; i < ARRAY_SIZE(aVecExtraSoundPosition); i++) { + // m_sQueueSample.m_vecPos = aVecExtraSoundPosition[i]; + // distance = GetDistanceSquared(m_sQueueSample.m_vecPos); + // if (distance < SQR(SOUND_INTENSITY)) { + // m_sQueueSample.m_fDistance = Sqrt(distance); + // m_sQueueSample.m_nVolume = ComputeVolume(EMITTING_VOLUME, SOUND_INTENSITY, m_sQueueSample.m_fDistance); + // if (m_sQueueSample.m_nVolume != 0) { + // m_sQueueSample.m_nCounter = i; + // m_sQueueSample.m_nSampleIndex = SFX_ARCADE; + // m_sQueueSample.m_nBankIndex = SFX_BANK_0; + // m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE); + // m_sQueueSample.m_bIs2D = FALSE; + // m_sQueueSample.m_nLoopCount = 0; + // m_sQueueSample.m_bReleasingSoundFlag = FALSE; + // m_sQueueSample.m_nReleasingVolumeModificator = 4; + // m_sQueueSample.m_fSpeedMultiplier = 3.0f; + // m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME; + // SET_LOOP_OFFSETS(SFX_ARCADE) + // m_sQueueSample.m_bReverbFlag = TRUE; + // m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; + // m_sQueueSample.m_bRequireReflection = FALSE; + // m_sQueueSample.m_nReleasingVolumeDivider = 3; + // AddSampleToRequestedQueue(); + // } + // } + //} } void @@ -9306,7 +9323,8 @@ cAudioManager::ProcessBridge() void cAudioManager::ProcessBridgeWarning() { - if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) { + // TODO: LCS +/* if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) { m_sQueueSample.m_nVolume = ComputeVolume(100, 450.f, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 0; @@ -9326,7 +9344,7 @@ cAudioManager::ProcessBridgeWarning() m_sQueueSample.m_bRequireReflection = FALSE; AddSampleToRequestedQueue(); } - } + }*/ } void @@ -9400,380 +9418,1874 @@ struct MissionAudioData { const MissionAudioData MissionAudioNameSfxAssoc[] = { - {"mobring", STREAMED_SOUND_MISSION_MOBR1}, {"pagring", STREAMED_SOUND_MISSION_PAGER}, {"carrev", STREAMED_SOUND_MISSION_CARREV}, - {"bikerev", STREAMED_SOUND_MISSION_BIKEREV}, {"liftop", STREAMED_SOUND_MISSION_LIFTOP}, {"liftcl", STREAMED_SOUND_MISSION_LIFTCL}, - {"liftrun", STREAMED_SOUND_MISSION_LIFTRUN}, {"liftbel", STREAMED_SOUND_MISSION_LIFTBEL}, {"inlift", STREAMED_SOUND_MISSION_INLIFT}, - {"caml", STREAMED_SOUND_MISSION_CAMERAL}, {"camr", STREAMED_SOUND_MISSION_CAMERAR}, {"cheer1", STREAMED_SOUND_MISSION_CHEER1}, - {"cheer2", STREAMED_SOUND_MISSION_CHEER2}, {"cheer3", STREAMED_SOUND_MISSION_CHEER3}, {"cheer4", STREAMED_SOUND_MISSION_CHEER4}, - {"ooh1", STREAMED_SOUND_MISSION_OOH1}, {"ooh2", STREAMED_SOUND_MISSION_OOH2}, {"race1", STREAMED_SOUND_MISSION_RACE1}, - {"race2", STREAMED_SOUND_MISSION_RACE2}, {"race3", STREAMED_SOUND_MISSION_RACE3}, {"race4", STREAMED_SOUND_MISSION_RACE4}, - {"race5", STREAMED_SOUND_MISSION_RACE5}, {"race6", STREAMED_SOUND_MISSION_RACE6}, {"race7", STREAMED_SOUND_MISSION_RACE7}, - {"race8", STREAMED_SOUND_MISSION_RACE8}, {"race9", STREAMED_SOUND_MISSION_RACE9}, {"race10", STREAMED_SOUND_MISSION_RACE10}, - {"race11", STREAMED_SOUND_MISSION_RACE11}, {"race12", STREAMED_SOUND_MISSION_RACE12}, {"race13", STREAMED_SOUND_MISSION_RACE13}, - {"race14", STREAMED_SOUND_MISSION_RACE14}, {"race15", STREAMED_SOUND_MISSION_RACE15}, {"hot1", STREAMED_SOUND_MISSION_HOT1}, - {"hot2", STREAMED_SOUND_MISSION_HOT2}, {"hot3", STREAMED_SOUND_MISSION_HOT3}, {"hot4", STREAMED_SOUND_MISSION_HOT4}, - {"hot5", STREAMED_SOUND_MISSION_HOT5}, {"hot6", STREAMED_SOUND_MISSION_HOT6}, {"hot7", STREAMED_SOUND_MISSION_HOT7}, - {"hot8", STREAMED_SOUND_MISSION_HOT8}, {"hot9", STREAMED_SOUND_MISSION_HOT9}, {"hot10", STREAMED_SOUND_MISSION_HOT10}, - {"hot11", STREAMED_SOUND_MISSION_HOT11}, {"hot12", STREAMED_SOUND_MISSION_HOT12}, {"hot13", STREAMED_SOUND_MISSION_HOT13}, - {"hot14", STREAMED_SOUND_MISSION_HOT14}, {"hot15", STREAMED_SOUND_MISSION_HOT15}, {"lanstp1", STREAMED_SOUND_MISSION_LANSTP1}, - {"lanstp2", STREAMED_SOUND_MISSION_LANSTP2}, {"lanamu1", STREAMED_SOUND_MISSION_LANAMU1}, {"lanamu2", STREAMED_SOUND_MISSION_LANAMU2}, - {"airhrnl", STREAMED_SOUND_MISSION_AIRHORNL}, {"airhrnr", STREAMED_SOUND_MISSION_AIRHORNR}, {"sniper", STREAMED_SOUND_MISSION_SNIPSCRL}, - {"snipsh", STREAMED_SOUND_MISSION_SNIPSHORT}, {"bloroof", STREAMED_SOUND_MISSION_BLOWROOF}, {"sfx_01", STREAMED_SOUND_MISSION_SFX_01}, - {"sfx_02", STREAMED_SOUND_MISSION_SFX_02}, {"LAW1_1", STREAMED_SOUND_MISSION_LAW1_1}, {"LAW1_2", STREAMED_SOUND_MISSION_LAW1_2}, - {"LAW1_3", STREAMED_SOUND_MISSION_LAW1_3}, {"LAW1_4", STREAMED_SOUND_MISSION_LAW1_4}, {"LAW1_5", STREAMED_SOUND_MISSION_LAW1_5}, - {"LAW1_6", STREAMED_SOUND_MISSION_LAW1_6}, {"LAW1_7", STREAMED_SOUND_MISSION_LAW1_7}, {"LAW1_8", STREAMED_SOUND_MISSION_LAW1_8}, - {"LAW1_9", STREAMED_SOUND_MISSION_LAW1_9}, {"LAW1_10", STREAMED_SOUND_MISSION_LAW1_10}, {"LAW2_1", STREAMED_SOUND_MISSION_LAW2_1}, - {"LAW2_2", STREAMED_SOUND_MISSION_LAW2_2}, {"LAW2_3", STREAMED_SOUND_MISSION_LAW2_3}, {"LAW2_4", STREAMED_SOUND_MISSION_LAW2_4}, - {"LAW2_5", STREAMED_SOUND_MISSION_LAW2_5}, {"LAW2_6", STREAMED_SOUND_MISSION_LAW2_6}, {"LAW2_7", STREAMED_SOUND_MISSION_LAW2_7}, - {"LAW2_8", STREAMED_SOUND_MISSION_LAW2_8}, {"LAW2_9", STREAMED_SOUND_MISSION_LAW2_9}, {"LAW2_10", STREAMED_SOUND_MISSION_LAW2_10}, - {"LAW3_1", STREAMED_SOUND_MISSION_LAW3_1}, {"LAW3_2", STREAMED_SOUND_MISSION_LAW3_2}, {"LAW3_3", STREAMED_SOUND_MISSION_LAW3_3}, - {"LAW3_4", STREAMED_SOUND_MISSION_LAW3_4}, {"LAW3_5", STREAMED_SOUND_MISSION_LAW3_5}, {"LAW3_6", STREAMED_SOUND_MISSION_LAW3_6}, - {"LAW3_10", STREAMED_SOUND_MISSION_LAW3_10}, {"LAW3_11", STREAMED_SOUND_MISSION_LAW3_11}, {"LAW3_12", STREAMED_SOUND_MISSION_LAW3_12}, - {"LAW3_13", STREAMED_SOUND_MISSION_LAW3_13}, {"LAW3_14", STREAMED_SOUND_MISSION_LAW3_14}, {"LAW3_16", STREAMED_SOUND_MISSION_LAW3_16}, - {"LAW3_17", STREAMED_SOUND_MISSION_LAW3_17}, {"LAW3_18", STREAMED_SOUND_MISSION_LAW3_18}, {"LAW3_19", STREAMED_SOUND_MISSION_LAW3_19}, - {"LAW3_20", STREAMED_SOUND_MISSION_LAW3_20}, {"LAW3_21", STREAMED_SOUND_MISSION_LAW3_21}, {"LAW3_22", STREAMED_SOUND_MISSION_LAW3_22}, - {"LAW3_23", STREAMED_SOUND_MISSION_LAW3_23}, {"LAW3_24", STREAMED_SOUND_MISSION_LAW3_24}, {"LAW3_25", STREAMED_SOUND_MISSION_LAW3_25}, - {"LAW4_1a", STREAMED_SOUND_MISSION_LAW4_1A}, {"LAW4_1b", STREAMED_SOUND_MISSION_LAW4_1B}, {"LAW4_1c", STREAMED_SOUND_MISSION_LAW4_1C}, - {"LAW4_1d", STREAMED_SOUND_MISSION_LAW4_1D}, {"LAW4_10", STREAMED_SOUND_MISSION_LAW4_10}, {"LAW4_3", STREAMED_SOUND_MISSION_LAW4_3}, - {"LAW4_4", STREAMED_SOUND_MISSION_LAW4_4}, {"LAW4_5", STREAMED_SOUND_MISSION_LAW4_5}, {"LAW4_6", STREAMED_SOUND_MISSION_LAW4_6}, - {"LAW4_7", STREAMED_SOUND_MISSION_LAW4_7}, {"LAW4_8", STREAMED_SOUND_MISSION_LAW4_8}, {"LAW4_9", STREAMED_SOUND_MISSION_LAW4_9}, - {"COL1_1", STREAMED_SOUND_MISSION_COL1_1}, {"COL1_2", STREAMED_SOUND_MISSION_COL1_2}, {"COL1_3", STREAMED_SOUND_MISSION_COL1_3}, - {"COL1_4", STREAMED_SOUND_MISSION_COL1_4}, {"COL1_5", STREAMED_SOUND_MISSION_COL1_5}, {"COL1_6", STREAMED_SOUND_MISSION_COL1_6}, - {"COL1_7", STREAMED_SOUND_MISSION_COL1_7}, {"COL1_8", STREAMED_SOUND_MISSION_COL1_8}, {"COL2_1", STREAMED_SOUND_MISSION_COL2_1}, - {"COL2_2", STREAMED_SOUND_MISSION_COL2_2}, {"COL2_3", STREAMED_SOUND_MISSION_COL2_3}, {"COL2_4", STREAMED_SOUND_MISSION_COL2_4}, - {"COL2_5", STREAMED_SOUND_MISSION_COL2_5}, {"COL2_6a", STREAMED_SOUND_MISSION_COL2_6A}, {"COL2_7", STREAMED_SOUND_MISSION_COL2_7}, - {"COL2_8", STREAMED_SOUND_MISSION_COL2_8}, {"COL2_9", STREAMED_SOUND_MISSION_COL2_9}, {"COL2_10", STREAMED_SOUND_MISSION_COL2_10}, - {"COL2_11", STREAMED_SOUND_MISSION_COL2_11}, {"COL2_12", STREAMED_SOUND_MISSION_COL2_12}, {"COL2_13", STREAMED_SOUND_MISSION_COL2_13}, - {"COL2_14", STREAMED_SOUND_MISSION_COL2_14}, {"COL2_15", STREAMED_SOUND_MISSION_COL2_15}, {"COL2_16", STREAMED_SOUND_MISSION_COL2_16}, - {"COL3_1", STREAMED_SOUND_MISSION_COL3_1}, {"COL3_2", STREAMED_SOUND_MISSION_COL3_2}, {"COL3_2a", STREAMED_SOUND_MISSION_COL3_2A}, - {"COL3_2b", STREAMED_SOUND_MISSION_COL3_2B}, {"COL3_3", STREAMED_SOUND_MISSION_COL3_3}, {"COL3_4", STREAMED_SOUND_MISSION_COL3_4}, - {"COL3_5", STREAMED_SOUND_MISSION_COL3_5}, {"COL3_6", STREAMED_SOUND_MISSION_COL3_6}, {"COL3_7", STREAMED_SOUND_MISSION_COL3_7}, - {"COL3_8", STREAMED_SOUND_MISSION_COL3_8}, {"COL3_9", STREAMED_SOUND_MISSION_COL3_9}, {"COL3_10", STREAMED_SOUND_MISSION_COL3_10}, - {"COL3_11", STREAMED_SOUND_MISSION_COL3_11}, {"COL3_12", STREAMED_SOUND_MISSION_COL3_12}, {"COL3_13", STREAMED_SOUND_MISSION_COL3_13}, - {"COL3_14", STREAMED_SOUND_MISSION_COL3_14}, {"COL3_15", STREAMED_SOUND_MISSION_COL3_15}, {"COL3_16", STREAMED_SOUND_MISSION_COL3_16}, - {"COL3_17", STREAMED_SOUND_MISSION_COL3_17}, {"COL3_18", STREAMED_SOUND_MISSION_COL3_18}, {"COL3_19", STREAMED_SOUND_MISSION_COL3_19}, - {"COL3_20", STREAMED_SOUND_MISSION_COL3_20}, {"COL3_21", STREAMED_SOUND_MISSION_COL3_21}, {"COL3_23", STREAMED_SOUND_MISSION_COL3_23}, - {"COL3_24", STREAMED_SOUND_MISSION_COL3_24}, {"COL3_25", STREAMED_SOUND_MISSION_COL3_25}, {"COL4_1", STREAMED_SOUND_MISSION_COL4_1}, - {"COL4_2", STREAMED_SOUND_MISSION_COL4_2}, {"COL4_3", STREAMED_SOUND_MISSION_COL4_3}, {"COL4_4", STREAMED_SOUND_MISSION_COL4_4}, - {"COL4_5", STREAMED_SOUND_MISSION_COL4_5}, {"COL4_6", STREAMED_SOUND_MISSION_COL4_6}, {"COL4_7", STREAMED_SOUND_MISSION_COL4_7}, - {"COL4_8", STREAMED_SOUND_MISSION_COL4_8}, {"COL4_9", STREAMED_SOUND_MISSION_COL4_9}, {"COL4_10", STREAMED_SOUND_MISSION_COL4_10}, - {"COL4_11", STREAMED_SOUND_MISSION_COL4_11}, {"COL4_12", STREAMED_SOUND_MISSION_COL4_12}, {"COL4_13", STREAMED_SOUND_MISSION_COL4_13}, - {"COL4_14", STREAMED_SOUND_MISSION_COL4_14}, {"COL4_15", STREAMED_SOUND_MISSION_COL4_15}, {"COL4_16", STREAMED_SOUND_MISSION_COL4_16}, - {"COL4_17", STREAMED_SOUND_MISSION_COL4_17}, {"COL4_18", STREAMED_SOUND_MISSION_COL4_18}, {"COL4_19", STREAMED_SOUND_MISSION_COL4_19}, - {"COL4_20", STREAMED_SOUND_MISSION_COL4_20}, {"COL4_21", STREAMED_SOUND_MISSION_COL4_21}, {"COL4_22", STREAMED_SOUND_MISSION_COL4_22}, - {"COL4_23", STREAMED_SOUND_MISSION_COL4_23}, {"COL4_24", STREAMED_SOUND_MISSION_COL4_24}, {"COL4_25", STREAMED_SOUND_MISSION_COL4_25}, - {"COL4_26", STREAMED_SOUND_MISSION_COL4_26}, {"COL5_1", STREAMED_SOUND_MISSION_COL5_1}, {"COL5_2", STREAMED_SOUND_MISSION_COL5_2}, - {"COL5_3", STREAMED_SOUND_MISSION_COL5_3}, {"COL5_4", STREAMED_SOUND_MISSION_COL5_4}, {"COL5_5", STREAMED_SOUND_MISSION_COL5_5}, - {"COL5_6", STREAMED_SOUND_MISSION_COL5_6}, {"COL5_7", STREAMED_SOUND_MISSION_COL5_7}, {"COL5_8", STREAMED_SOUND_MISSION_COL5_8}, - {"COL5_9", STREAMED_SOUND_MISSION_COL5_9}, {"COL5_10", STREAMED_SOUND_MISSION_COL5_10}, {"COL5_11", STREAMED_SOUND_MISSION_COL5_11}, - {"COL5_12", STREAMED_SOUND_MISSION_COL5_12}, {"COL5_13", STREAMED_SOUND_MISSION_COL5_13}, {"COL5_14", STREAMED_SOUND_MISSION_COL5_14}, - {"COL5_15", STREAMED_SOUND_MISSION_COL5_15}, {"COL5_16", STREAMED_SOUND_MISSION_COL5_16}, {"COL5_17", STREAMED_SOUND_MISSION_COL5_17}, - {"COL5_18", STREAMED_SOUND_MISSION_COL5_18}, {"COL5_19", STREAMED_SOUND_MISSION_COL5_19}, {"COL5_20", STREAMED_SOUND_MISSION_COL5_20}, - {"COL5_21", STREAMED_SOUND_MISSION_COL5_21}, {"COL5_22", STREAMED_SOUND_MISSION_COL5_22}, {"COK1_1", STREAMED_SOUND_MISSION_COK1_1}, - {"COK1_2", STREAMED_SOUND_MISSION_COK1_2}, {"COK1_3", STREAMED_SOUND_MISSION_COK1_3}, {"COK1_4", STREAMED_SOUND_MISSION_COK1_4}, - {"COK1_5", STREAMED_SOUND_MISSION_COK1_5}, {"COK1_6", STREAMED_SOUND_MISSION_COK1_6}, {"COK2_1", STREAMED_SOUND_MISSION_COK2_1}, - {"COK2_2", STREAMED_SOUND_MISSION_COK2_2}, {"COK2_3", STREAMED_SOUND_MISSION_COK2_3}, {"COK2_4", STREAMED_SOUND_MISSION_COK2_4}, - {"COK2_5", STREAMED_SOUND_MISSION_COK2_5}, {"COK2_6", STREAMED_SOUND_MISSION_COK2_6}, {"COK2_7a", STREAMED_SOUND_MISSION_COK2_7A}, - {"COK2_7b", STREAMED_SOUND_MISSION_COK2_7B}, {"COK2_7c", STREAMED_SOUND_MISSION_COK2_7C}, {"COK2_8a", STREAMED_SOUND_MISSION_COK2_8A}, - {"COK2_8b", STREAMED_SOUND_MISSION_COK2_8B}, {"COK2_8c", STREAMED_SOUND_MISSION_COK2_8C}, {"COK2_8d", STREAMED_SOUND_MISSION_COK2_8D}, - {"COK2_9", STREAMED_SOUND_MISSION_COK2_9}, {"COK210a", STREAMED_SOUND_MISSION_COK210A}, {"COK210b", STREAMED_SOUND_MISSION_COK210B}, - {"COK210c", STREAMED_SOUND_MISSION_COK210C}, {"COK212a", STREAMED_SOUND_MISSION_COK212A}, {"COK212b", STREAMED_SOUND_MISSION_COK212B}, - {"COK2_13", STREAMED_SOUND_MISSION_COK2_13}, {"COK2_14", STREAMED_SOUND_MISSION_COK2_14}, {"COK2_15", STREAMED_SOUND_MISSION_COK2_15}, - {"COK2_16", STREAMED_SOUND_MISSION_COK2_16}, {"COK2_20", STREAMED_SOUND_MISSION_COK2_20}, {"COK2_21", STREAMED_SOUND_MISSION_COK2_21}, - {"COK2_22", STREAMED_SOUND_MISSION_COK2_22}, {"COK3_1", STREAMED_SOUND_MISSION_COK3_1}, {"COK3_2", STREAMED_SOUND_MISSION_COK3_2}, - {"COK3_3", STREAMED_SOUND_MISSION_COK3_3}, {"COK3_4", STREAMED_SOUND_MISSION_COK3_4}, {"COK4_1", STREAMED_SOUND_MISSION_COK4_1}, - {"COK4_2", STREAMED_SOUND_MISSION_COK4_2}, {"COK4_3", STREAMED_SOUND_MISSION_COK4_3}, {"COK4_4", STREAMED_SOUND_MISSION_COK4_4}, - {"COK4_5", STREAMED_SOUND_MISSION_COK4_5}, {"COK4_6", STREAMED_SOUND_MISSION_COK4_6}, {"COK4_7", STREAMED_SOUND_MISSION_COK4_7}, - {"COK4_8", STREAMED_SOUND_MISSION_COK4_8}, {"COK4_9", STREAMED_SOUND_MISSION_COK4_9}, {"COK4_9A", STREAMED_SOUND_MISSION_COK4_9A}, - {"COK4_10", STREAMED_SOUND_MISSION_COK4_10}, {"COK4_11", STREAMED_SOUND_MISSION_COK4_11}, {"COK4_12", STREAMED_SOUND_MISSION_COK4_12}, - {"COK4_13", STREAMED_SOUND_MISSION_COK4_13}, {"COK4_14", STREAMED_SOUND_MISSION_COK4_14}, {"COK4_15", STREAMED_SOUND_MISSION_COK4_15}, - {"COK4_16", STREAMED_SOUND_MISSION_COK4_16}, {"COK4_17", STREAMED_SOUND_MISSION_COK4_17}, {"COK4_18", STREAMED_SOUND_MISSION_COK4_18}, - {"COK4_19", STREAMED_SOUND_MISSION_COK4_19}, {"COK4_20", STREAMED_SOUND_MISSION_COK4_20}, {"COK4_21", STREAMED_SOUND_MISSION_COK4_21}, - {"COK4_22", STREAMED_SOUND_MISSION_COK4_22}, {"COK4_23", STREAMED_SOUND_MISSION_COK4_23}, {"COK4_24", STREAMED_SOUND_MISSION_COK4_24}, - {"COK4_25", STREAMED_SOUND_MISSION_COK4_25}, {"COK4_26", STREAMED_SOUND_MISSION_COK4_26}, {"COK4_27", STREAMED_SOUND_MISSION_COK4_27}, - {"RESC_1", STREAMED_SOUND_MISSION_RESC_1}, {"RESC_2", STREAMED_SOUND_MISSION_RESC_2}, {"RESC_3", STREAMED_SOUND_MISSION_RESC_3}, - {"RESC_4", STREAMED_SOUND_MISSION_RESC_4}, {"RESC_5", STREAMED_SOUND_MISSION_RESC_5}, {"RESC_6", STREAMED_SOUND_MISSION_RESC_6}, - {"RESC_7", STREAMED_SOUND_MISSION_RESC_7}, {"RESC_8", STREAMED_SOUND_MISSION_RESC_8}, {"RESC_9", STREAMED_SOUND_MISSION_RESC_9}, - {"RESC_10", STREAMED_SOUND_MISSION_RESC_10}, {"ASS_1", STREAMED_SOUND_MISSION_ASS_1}, {"ASS_2", STREAMED_SOUND_MISSION_ASS_2}, - {"ASS_3", STREAMED_SOUND_MISSION_ASS_3}, {"ASS_4", STREAMED_SOUND_MISSION_ASS_4}, {"ASS_5", STREAMED_SOUND_MISSION_ASS_5}, - {"ASS_6", STREAMED_SOUND_MISSION_ASS_6}, {"ASS_7", STREAMED_SOUND_MISSION_ASS_7}, {"ASS_8", STREAMED_SOUND_MISSION_ASS_8}, - {"ASS_9", STREAMED_SOUND_MISSION_ASS_9}, {"ASS_10", STREAMED_SOUND_MISSION_ASS_10}, {"ASS_11", STREAMED_SOUND_MISSION_ASS_11}, - {"ASS_12", STREAMED_SOUND_MISSION_ASS_12}, {"ASS_13", STREAMED_SOUND_MISSION_ASS_13}, {"ASS_14", STREAMED_SOUND_MISSION_ASS_14}, - {"BUD1_1", STREAMED_SOUND_MISSION_BUD1_1}, {"BUD1_2", STREAMED_SOUND_MISSION_BUD1_2}, {"BUD1_3", STREAMED_SOUND_MISSION_BUD1_3}, - {"BUD1_4", STREAMED_SOUND_MISSION_BUD1_4}, {"BUD1_5", STREAMED_SOUND_MISSION_BUD1_5}, {"BUD1_9", STREAMED_SOUND_MISSION_BUD1_9}, - {"BUD1_10", STREAMED_SOUND_MISSION_BUD1_10}, {"BUD2_1", STREAMED_SOUND_MISSION_BUD2_1}, {"BUD2_2", STREAMED_SOUND_MISSION_BUD2_2}, - {"BUD2_3", STREAMED_SOUND_MISSION_BUD2_3}, {"BUD2_4", STREAMED_SOUND_MISSION_BUD2_4}, {"BUD2_5", STREAMED_SOUND_MISSION_BUD2_5}, - {"BUD2_6", STREAMED_SOUND_MISSION_BUD2_6}, {"BUD2_7", STREAMED_SOUND_MISSION_BUD2_7}, {"BUD3_1a", STREAMED_SOUND_MISSION_BUD3_1A}, - {"BUD3_1b", STREAMED_SOUND_MISSION_BUD3_1B}, {"BUD3_1", STREAMED_SOUND_MISSION_BUD3_1}, {"BUD3_2", STREAMED_SOUND_MISSION_BUD3_2}, - {"BUD3_3", STREAMED_SOUND_MISSION_BUD3_3}, {"BUD3_4", STREAMED_SOUND_MISSION_BUD3_4}, {"BUD3_1c", STREAMED_SOUND_MISSION_BUD3_1C}, - {"BUD3_5", STREAMED_SOUND_MISSION_BUD3_5}, {"BUD3_6", STREAMED_SOUND_MISSION_BUD3_6}, {"BUD3_7", STREAMED_SOUND_MISSION_BUD3_7}, - {"BUD3_8a", STREAMED_SOUND_MISSION_BUD3_8A}, {"BUD3_8b", STREAMED_SOUND_MISSION_BUD3_8B}, {"BUD3_8c", STREAMED_SOUND_MISSION_BUD3_8C}, - {"BUD3_9a", STREAMED_SOUND_MISSION_BUD3_9A}, {"BUD3_9b", STREAMED_SOUND_MISSION_BUD3_9B}, {"BUD3_9c", STREAMED_SOUND_MISSION_BUD3_9C}, - {"CAP1_2", STREAMED_SOUND_MISSION_CAP1_2}, {"CAP1_3", STREAMED_SOUND_MISSION_CAP1_3}, {"CAP1_4", STREAMED_SOUND_MISSION_CAP1_4}, - {"CAP1_5", STREAMED_SOUND_MISSION_CAP1_5}, {"CAP1_6", STREAMED_SOUND_MISSION_CAP1_6}, {"CAP1_7", STREAMED_SOUND_MISSION_CAP1_7}, - {"CAP1_8", STREAMED_SOUND_MISSION_CAP1_8}, {"CAP1_9", STREAMED_SOUND_MISSION_CAP1_9}, {"CAP1_10", STREAMED_SOUND_MISSION_CAP1_10}, - {"CAP1_11", STREAMED_SOUND_MISSION_CAP1_11}, {"CAP1_12", STREAMED_SOUND_MISSION_CAP1_12}, {"FINKILL", STREAMED_SOUND_MISSION_FINKILL}, - {"FIN_1a", STREAMED_SOUND_MISSION_FIN_1A}, {"FIN_1b", STREAMED_SOUND_MISSION_FIN_1B}, {"FIN_1c", STREAMED_SOUND_MISSION_FIN_1C}, - {"FIN_2b", STREAMED_SOUND_MISSION_FIN_2B}, {"FIN_2c", STREAMED_SOUND_MISSION_FIN_2C}, {"FIN_3", STREAMED_SOUND_MISSION_FIN_3}, - {"FIN_4", STREAMED_SOUND_MISSION_FIN_4}, {"FIN_5", STREAMED_SOUND_MISSION_FIN_5}, {"FIN_6", STREAMED_SOUND_MISSION_FIN_6}, - {"FIN_10", STREAMED_SOUND_MISSION_FIN_10}, {"FIN_11a", STREAMED_SOUND_MISSION_FIN_11A}, {"FIN_11b", STREAMED_SOUND_MISSION_FIN_11B}, - {"FIN_12a", STREAMED_SOUND_MISSION_FIN_12A}, {"FIN_12b", STREAMED_SOUND_MISSION_FIN_12B}, {"FIN_12c", STREAMED_SOUND_MISSION_FIN_12C}, - {"FIN_13", STREAMED_SOUND_MISSION_FIN_13}, {"BNK1_1", STREAMED_SOUND_MISSION_BNK1_1}, {"BNK1_2", STREAMED_SOUND_MISSION_BNK1_2}, - {"BNK1_3", STREAMED_SOUND_MISSION_BNK1_3}, {"BNK1_4", STREAMED_SOUND_MISSION_BNK1_4}, {"BNK1_5", STREAMED_SOUND_MISSION_BNK1_5}, - {"BNK1_6", STREAMED_SOUND_MISSION_BNK1_6}, {"BNK1_7", STREAMED_SOUND_MISSION_BNK1_7}, {"BNK1_8", STREAMED_SOUND_MISSION_BNK1_8}, - {"BNK1_10", STREAMED_SOUND_MISSION_BNK1_10}, {"BNK1_11", STREAMED_SOUND_MISSION_BNK1_11}, {"BNK1_12", STREAMED_SOUND_MISSION_BNK1_12}, - {"BNK1_13", STREAMED_SOUND_MISSION_BNK1_13}, {"BNK1_14", STREAMED_SOUND_MISSION_BNK1_14}, {"BNK2_1", STREAMED_SOUND_MISSION_BNK2_1}, - {"BNK2_2", STREAMED_SOUND_MISSION_BNK2_2}, {"BNK2_3", STREAMED_SOUND_MISSION_BNK2_3}, {"BNK2_4", STREAMED_SOUND_MISSION_BNK2_4}, - {"BNK2_5", STREAMED_SOUND_MISSION_BNK2_5}, {"BNK2_6", STREAMED_SOUND_MISSION_BNK2_6}, {"BNK2_7", STREAMED_SOUND_MISSION_BNK2_7}, - {"BNK2_8", STREAMED_SOUND_MISSION_BNK2_8}, {"BNK2_9", STREAMED_SOUND_MISSION_BNK2_9}, {"BNK3_1", STREAMED_SOUND_MISSION_BNK3_1}, - {"BNK3_2", STREAMED_SOUND_MISSION_BNK3_2}, {"BNK3_3a", STREAMED_SOUND_MISSION_BNK3_3A}, {"BNK3_3b", STREAMED_SOUND_MISSION_BNK3_3B}, - {"BNK3_3c", STREAMED_SOUND_MISSION_BNK3_3C}, {"BNK3_4a", STREAMED_SOUND_MISSION_BNK3_4A}, {"BNK3_4b", STREAMED_SOUND_MISSION_BNK3_4B}, - {"BNK3_4c", STREAMED_SOUND_MISSION_BNK3_4C}, {"BNK4_1", STREAMED_SOUND_MISSION_BNK4_1}, {"BNK4_2", STREAMED_SOUND_MISSION_BNK4_2}, - {"BNK4_3A", STREAMED_SOUND_MISSION_BNK4_3A}, {"BNK4_3B", STREAMED_SOUND_MISSION_BNK4_3B}, {"BNK4_3C", STREAMED_SOUND_MISSION_BNK4_3C}, - {"BNK4_3D", STREAMED_SOUND_MISSION_BNK4_3D}, {"BNK4_3E", STREAMED_SOUND_MISSION_BNK4_3E}, {"BNK4_3F", STREAMED_SOUND_MISSION_BNK4_3F}, - {"BNK4_3G", STREAMED_SOUND_MISSION_BNK4_3G}, {"BNK4_3H", STREAMED_SOUND_MISSION_BNK4_3H}, {"BNK4_3I", STREAMED_SOUND_MISSION_BNK4_3I}, - {"BNK4_3J", STREAMED_SOUND_MISSION_BNK4_3J}, {"BNK4_3K", STREAMED_SOUND_MISSION_BNK4_3K}, {"BNK4_3M", STREAMED_SOUND_MISSION_BNK4_3M}, - {"BNK4_3O", STREAMED_SOUND_MISSION_BNK4_3O}, {"BNK4_3P", STREAMED_SOUND_MISSION_BNK4_3P}, {"BNK4_3Q", STREAMED_SOUND_MISSION_BNK4_3Q}, - {"BNK4_3R", STREAMED_SOUND_MISSION_BNK4_3R}, {"BNK4_3S", STREAMED_SOUND_MISSION_BNK4_3S}, {"BNK4_3T", STREAMED_SOUND_MISSION_BNK4_3T}, - {"BNK4_3U", STREAMED_SOUND_MISSION_BNK4_3U}, {"BNK4_3V", STREAMED_SOUND_MISSION_BNK4_3V}, {"BNK4_4a", STREAMED_SOUND_MISSION_BNK4_4A}, - {"BNK4_4b", STREAMED_SOUND_MISSION_BNK4_4B}, {"BNK4_5", STREAMED_SOUND_MISSION_BNK4_5}, {"BNK4_6", STREAMED_SOUND_MISSION_BNK4_6}, - {"BNK4_7", STREAMED_SOUND_MISSION_BNK4_7}, {"BNK4_8", STREAMED_SOUND_MISSION_BNK4_8}, {"BNK4_9", STREAMED_SOUND_MISSION_BNK4_9}, - {"BNK4_10", STREAMED_SOUND_MISSION_BNK4_10}, {"BNK4_11", STREAMED_SOUND_MISSION_BNK4_11}, {"BK4_12a", STREAMED_SOUND_MISSION_BK4_12A}, - {"BK4_12b", STREAMED_SOUND_MISSION_BK4_12B}, {"BK4_12c", STREAMED_SOUND_MISSION_BK4_12C}, {"BNK4_13", STREAMED_SOUND_MISSION_BNK4_13}, - {"BK4_14a", STREAMED_SOUND_MISSION_BK4_14A}, {"BK4_14b", STREAMED_SOUND_MISSION_BK4_14B}, {"BNK4_15", STREAMED_SOUND_MISSION_BNK4_15}, - {"BNK4_16", STREAMED_SOUND_MISSION_BNK4_16}, {"BNK4_17", STREAMED_SOUND_MISSION_BNK4_17}, {"BNK4_18", STREAMED_SOUND_MISSION_BNK4_18}, - {"BK4_19a", STREAMED_SOUND_MISSION_BK4_19A}, {"BK4_19b", STREAMED_SOUND_MISSION_BK4_19B}, {"BK4_20a", STREAMED_SOUND_MISSION_BK4_20A}, - {"BK4_20b", STREAMED_SOUND_MISSION_BK4_20B}, {"BNK4_21", STREAMED_SOUND_MISSION_BNK4_21}, {"BNK422a", STREAMED_SOUND_MISSION_BNK422A}, - {"BNK422b", STREAMED_SOUND_MISSION_BNK422B}, {"BK4_23a", STREAMED_SOUND_MISSION_BK4_23A}, {"BK4_23b", STREAMED_SOUND_MISSION_BK4_23B}, - {"BK4_23c", STREAMED_SOUND_MISSION_BK4_23C}, {"BK4_23d", STREAMED_SOUND_MISSION_BK4_23D}, {"BK4_24a", STREAMED_SOUND_MISSION_BK4_24A}, - {"BK4_24b", STREAMED_SOUND_MISSION_BK4_24B}, {"BNK4_25", STREAMED_SOUND_MISSION_BNK4_25}, {"BNK4_26", STREAMED_SOUND_MISSION_BNK4_26}, - {"BNK4_27", STREAMED_SOUND_MISSION_BNK4_27}, {"BNK4_28", STREAMED_SOUND_MISSION_BNK4_28}, {"BNK4_29", STREAMED_SOUND_MISSION_BNK4_29}, - {"BNK4_30", STREAMED_SOUND_MISSION_BNK4_30}, {"BK4_31a", STREAMED_SOUND_MISSION_BK4_31A}, {"BK4_31b", STREAMED_SOUND_MISSION_BK4_31B}, - {"BNK4_32", STREAMED_SOUND_MISSION_BNK4_32}, {"BK4_34a", STREAMED_SOUND_MISSION_BK4_34A}, {"BK4_34b", STREAMED_SOUND_MISSION_BK4_34B}, - {"BK4_35a", STREAMED_SOUND_MISSION_BK4_35A}, {"BK4_35b", STREAMED_SOUND_MISSION_BK4_35B}, {"BNK4_36", STREAMED_SOUND_MISSION_BNK4_36}, - {"BNK4_37", STREAMED_SOUND_MISSION_BNK4_37}, {"BNK4_38", STREAMED_SOUND_MISSION_BNK4_38}, {"BNK_39", STREAMED_SOUND_MISSION_BNK4_39}, - {"BK4_40a", STREAMED_SOUND_MISSION_BK4_40A}, {"BK4_40b", STREAMED_SOUND_MISSION_BK4_40B}, {"BNK4_41", STREAMED_SOUND_MISSION_BNK4_41}, - {"BNK4_42", STREAMED_SOUND_MISSION_BNK4_42}, {"BNK4_43", STREAMED_SOUND_MISSION_BNK4_43}, {"BNK4_44", STREAMED_SOUND_MISSION_BNK4_44}, - {"BNK4_45", STREAMED_SOUND_MISSION_BNK4_45}, {"BNK4_46", STREAMED_SOUND_MISSION_BNK4_46}, {"BNK4_47", STREAMED_SOUND_MISSION_BNK4_47}, - {"BNK4_48", STREAMED_SOUND_MISSION_BNK4_48}, {"BNK4_49", STREAMED_SOUND_MISSION_BNK4_49}, {"BNK450A", STREAMED_SOUND_MISSION_BNK450A}, - {"BNK450B", STREAMED_SOUND_MISSION_BNK450B}, {"BNK4_51", STREAMED_SOUND_MISSION_BNK4_51}, {"BNK4_94", STREAMED_SOUND_MISSION_BNK4_94}, - {"BNK4_95", STREAMED_SOUND_MISSION_BNK4_95}, {"BNK4_96", STREAMED_SOUND_MISSION_BNK4_96}, {"BNK4_97", STREAMED_SOUND_MISSION_BNK4_97}, - {"BNK4_98", STREAMED_SOUND_MISSION_BNK4_98}, {"BNK4_99", STREAMED_SOUND_MISSION_BNK4_99}, {"CNT1_1", STREAMED_SOUND_MISSION_CNT1_1}, - {"CNT1_2", STREAMED_SOUND_MISSION_CNT1_2}, {"CNT1_3", STREAMED_SOUND_MISSION_CNT1_3}, {"CNT1_4", STREAMED_SOUND_MISSION_CNT1_4}, - {"CNT1_5", STREAMED_SOUND_MISSION_CNT1_5}, {"CNT2_1", STREAMED_SOUND_MISSION_CNT2_1}, {"CNT2_2", STREAMED_SOUND_MISSION_CNT2_2}, - {"CNT2_3", STREAMED_SOUND_MISSION_CNT2_3}, {"CNT2_4", STREAMED_SOUND_MISSION_CNT2_4}, {"PORN1_1", STREAMED_SOUND_MISSION_PORN1_1}, - {"PORN1_2", STREAMED_SOUND_MISSION_PORN1_2}, {"PORN1_3", STREAMED_SOUND_MISSION_PORN1_3}, {"PRN1_3A", STREAMED_SOUND_MISSION_PRN1_3A}, - {"PORN1_4", STREAMED_SOUND_MISSION_PORN1_4}, {"PORN1_5", STREAMED_SOUND_MISSION_PORN1_5}, {"PORN1_6", STREAMED_SOUND_MISSION_PORN1_6}, - {"PORN1_7", STREAMED_SOUND_MISSION_PORN1_7}, {"PORN1_8", STREAMED_SOUND_MISSION_PORN1_8}, {"PORN1_9", STREAMED_SOUND_MISSION_PORN1_9}, - {"PRN1_10", STREAMED_SOUND_MISSION_PRN1_10}, {"PRN1_11", STREAMED_SOUND_MISSION_PRN1_11}, {"PRN1_12", STREAMED_SOUND_MISSION_PRN1_12}, - {"PRN1_13", STREAMED_SOUND_MISSION_PRN1_13}, {"PRN1_14", STREAMED_SOUND_MISSION_PRN1_14}, {"PRN1_15", STREAMED_SOUND_MISSION_PRN1_15}, - {"PRN1_16", STREAMED_SOUND_MISSION_PRN1_16}, {"PRN1_17", STREAMED_SOUND_MISSION_PRN1_17}, {"PRN1_18", STREAMED_SOUND_MISSION_PRN1_18}, - {"PRN1_19", STREAMED_SOUND_MISSION_PRN1_19}, {"PRN1_20", STREAMED_SOUND_MISSION_PRN1_20}, {"PRN1_21", STREAMED_SOUND_MISSION_PRN1_21}, - {"PORN3_1", STREAMED_SOUND_MISSION_PORN3_1}, {"PORN3_2", STREAMED_SOUND_MISSION_PORN3_2}, {"PORN3_3", STREAMED_SOUND_MISSION_PORN3_3}, - {"PORN3_4", STREAMED_SOUND_MISSION_PORN3_4}, {"TAX1_1", STREAMED_SOUND_MISSION_TAX1_1}, {"TAX1_2", STREAMED_SOUND_MISSION_TAX1_2}, - {"TAX1_3", STREAMED_SOUND_MISSION_TAX1_3}, {"TAX1_4", STREAMED_SOUND_MISSION_TAX1_4}, {"TAX1_5", STREAMED_SOUND_MISSION_TAX1_5}, - {"TAX2_1", STREAMED_SOUND_MISSION_TAX2_1}, {"TAX2_2", STREAMED_SOUND_MISSION_TAX2_2}, {"TAX2_3", STREAMED_SOUND_MISSION_TAX2_3}, - {"TAX2_4", STREAMED_SOUND_MISSION_TAX2_4}, {"TAX2_5", STREAMED_SOUND_MISSION_TAX2_5}, {"TAX2_6", STREAMED_SOUND_MISSION_TAX2_6}, - {"TAX2_7", STREAMED_SOUND_MISSION_TAX2_7}, {"TAX3_1", STREAMED_SOUND_MISSION_TAX3_1}, {"TAX3_2", STREAMED_SOUND_MISSION_TAX3_2}, - {"TAX3_3", STREAMED_SOUND_MISSION_TAX3_3}, {"TAX3_4", STREAMED_SOUND_MISSION_TAX3_4}, {"TAX3_5", STREAMED_SOUND_MISSION_TAX3_5}, - {"TEX1_1", STREAMED_SOUND_MISSION_TEX1_1}, {"TEX1_2", STREAMED_SOUND_MISSION_TEX1_2}, {"TEX1_3", STREAMED_SOUND_MISSION_TEX1_3}, - {"TEX1_4", STREAMED_SOUND_MISSION_TEX1_4}, {"TEX1_5", STREAMED_SOUND_MISSION_TEX1_5}, {"TEX1_6", STREAMED_SOUND_MISSION_TEX1_6}, - {"TEX2_1", STREAMED_SOUND_MISSION_TEX2_1}, {"TEX3_1", STREAMED_SOUND_MISSION_TEX3_1}, {"TEX3_2", STREAMED_SOUND_MISSION_TEX3_2}, - {"TEX3_3", STREAMED_SOUND_MISSION_TEX3_3}, {"TEX3_4", STREAMED_SOUND_MISSION_TEX3_4}, {"TEX3_5", STREAMED_SOUND_MISSION_TEX3_5}, - {"TEX3_6", STREAMED_SOUND_MISSION_TEX3_6}, {"TEX3_7", STREAMED_SOUND_MISSION_TEX3_7}, {"TEX3_8", STREAMED_SOUND_MISSION_TEX3_8}, - {"PHIL1_2", STREAMED_SOUND_MISSION_PHIL1_2}, {"PHIL1_3", STREAMED_SOUND_MISSION_PHIL1_3}, {"PHIL2_1", STREAMED_SOUND_MISSION_PHIL2_1}, - {"PHIL2_2", STREAMED_SOUND_MISSION_PHIL2_2}, {"PHIL2_3", STREAMED_SOUND_MISSION_PHIL2_3}, {"PHIL2_4", STREAMED_SOUND_MISSION_PHIL2_4}, - {"PHIL2_5", STREAMED_SOUND_MISSION_PHIL2_5}, {"PHIL2_6", STREAMED_SOUND_MISSION_PHIL2_6}, {"PHIL2_7", STREAMED_SOUND_MISSION_PHIL2_7}, - {"PHIL2_8", STREAMED_SOUND_MISSION_PHIL2_8}, {"PHIL2_9", STREAMED_SOUND_MISSION_PHIL2_9}, {"PHIL210", STREAMED_SOUND_MISSION_PHIL210}, - {"PHIL211", STREAMED_SOUND_MISSION_PHIL211}, {"BIKE1_1", STREAMED_SOUND_MISSION_BIKE1_1}, {"BIKE1_2", STREAMED_SOUND_MISSION_BIKE1_2}, - {"BIKE1_3", STREAMED_SOUND_MISSION_BIKE1_3}, {"ROK1_1a", STREAMED_SOUND_MISSION_ROK1_1A}, {"ROK1_1b", STREAMED_SOUND_MISSION_ROK1_1B}, - {"ROK1_5", STREAMED_SOUND_MISSION_ROK1_5}, {"ROK1_6", STREAMED_SOUND_MISSION_ROK1_6}, {"ROK1_7", STREAMED_SOUND_MISSION_ROK1_7}, - {"ROK1_8", STREAMED_SOUND_MISSION_ROK1_8}, {"ROK1_9", STREAMED_SOUND_MISSION_ROK1_9}, {"PSYCH_1", STREAMED_SOUND_MISSION_PSYCH_1}, - {"PSYCH_2", STREAMED_SOUND_MISSION_PSYCH_2}, {"ROK2_01", STREAMED_SOUND_MISSION_ROK2_01}, {"ROK3_1", STREAMED_SOUND_MISSION_ROK3_1}, - {"ROK3_2", STREAMED_SOUND_MISSION_ROK3_2}, {"ROK3_3", STREAMED_SOUND_MISSION_ROK3_3}, {"ROK3_4", STREAMED_SOUND_MISSION_ROK3_4}, - {"ROK3_5", STREAMED_SOUND_MISSION_ROK3_5}, {"ROK3_6", STREAMED_SOUND_MISSION_ROK3_6}, {"ROK3_7", STREAMED_SOUND_MISSION_ROK3_7}, - {"ROK3_8", STREAMED_SOUND_MISSION_ROK3_8}, {"ROK3_9", STREAMED_SOUND_MISSION_ROK3_9}, {"ROK3_10", STREAMED_SOUND_MISSION_ROK3_10}, - {"ROK3_11", STREAMED_SOUND_MISSION_ROK3_11}, {"ROK3_12", STREAMED_SOUND_MISSION_ROK3_12}, {"ROK3_13", STREAMED_SOUND_MISSION_ROK3_13}, - {"ROK3_14", STREAMED_SOUND_MISSION_ROK3_14}, {"ROK3_15", STREAMED_SOUND_MISSION_ROK3_15}, {"ROK3_16", STREAMED_SOUND_MISSION_ROK3_16}, - {"ROK3_17", STREAMED_SOUND_MISSION_ROK3_17}, {"ROK3_18", STREAMED_SOUND_MISSION_ROK3_18}, {"ROK3_19", STREAMED_SOUND_MISSION_ROK3_19}, - {"ROK3_20", STREAMED_SOUND_MISSION_ROK3_20}, {"ROK3_21", STREAMED_SOUND_MISSION_ROK3_21}, {"ROK3_22", STREAMED_SOUND_MISSION_ROK3_22}, - {"ROK3_23", STREAMED_SOUND_MISSION_ROK3_23}, {"ROK3_24", STREAMED_SOUND_MISSION_ROK3_24}, {"ROK3_25", STREAMED_SOUND_MISSION_ROK3_25}, - {"ROK3_26", STREAMED_SOUND_MISSION_ROK3_26}, {"ROK3_27", STREAMED_SOUND_MISSION_ROK3_27}, {"ROK3_62", STREAMED_SOUND_MISSION_ROK3_62}, - {"ROK3_63", STREAMED_SOUND_MISSION_ROK3_63}, {"ROK3_64", STREAMED_SOUND_MISSION_ROK3_64}, {"ROK3_65", STREAMED_SOUND_MISSION_ROK3_65}, - {"ROK3_66", STREAMED_SOUND_MISSION_ROK3_66}, {"ROK3_67", STREAMED_SOUND_MISSION_ROK3_67}, {"ROK3_68", STREAMED_SOUND_MISSION_ROK3_68}, - {"ROK3_69", STREAMED_SOUND_MISSION_ROK3_69}, {"ROK3_70", STREAMED_SOUND_MISSION_ROK3_70}, {"ROK3_71", STREAMED_SOUND_MISSION_ROK3_71}, - {"ROK3_73", STREAMED_SOUND_MISSION_ROK3_73}, {"HAT_1a", STREAMED_SOUND_MISSION_HAT_1A}, {"intro1", STREAMED_SOUND_MISSION_INTRO1}, - {"intro2", STREAMED_SOUND_MISSION_INTRO2}, {"intro3", STREAMED_SOUND_MISSION_INTRO3}, {"intro4", STREAMED_SOUND_MISSION_INTRO4}, - {"CUB1_1", STREAMED_SOUND_MISSION_CUB1_1}, {"CUB1_2", STREAMED_SOUND_MISSION_CUB1_2}, {"CUB1_3", STREAMED_SOUND_MISSION_CUB1_3}, - {"CUB1_4", STREAMED_SOUND_MISSION_CUB1_4}, {"CUB1_5", STREAMED_SOUND_MISSION_CUB1_5}, {"CUB1_6", STREAMED_SOUND_MISSION_CUB1_6}, - {"CUB1_7", STREAMED_SOUND_MISSION_CUB1_7}, {"CUB1_8", STREAMED_SOUND_MISSION_CUB1_8}, {"CUB1_9", STREAMED_SOUND_MISSION_CUB1_9}, - {"CUB1_10", STREAMED_SOUND_MISSION_CUB1_10}, {"CUB2_1", STREAMED_SOUND_MISSION_CUB2_1}, {"CUB2_2", STREAMED_SOUND_MISSION_CUB2_2}, - {"CUB2_3a", STREAMED_SOUND_MISSION_CUB2_3A}, {"CUB2_3b", STREAMED_SOUND_MISSION_CUB2_3B}, {"CUB2_3c", STREAMED_SOUND_MISSION_CUB2_3C}, - {"CUB2_4a", STREAMED_SOUND_MISSION_CUB2_4A}, {"CUB2_5", STREAMED_SOUND_MISSION_CUB2_5}, {"CUB2_6", STREAMED_SOUND_MISSION_CUB2_6}, - {"CUB2_7", STREAMED_SOUND_MISSION_CUB2_7}, {"CUB2_8", STREAMED_SOUND_MISSION_CUB2_8}, {"CUB2_9", STREAMED_SOUND_MISSION_CUB2_9}, - {"CUB2_10", STREAMED_SOUND_MISSION_CUB2_10}, {"CUB2_11", STREAMED_SOUND_MISSION_CUB2_11}, {"CUB3_1", STREAMED_SOUND_MISSION_CUB3_1}, - {"CUB3_2", STREAMED_SOUND_MISSION_CUB3_2}, {"CUB3_3", STREAMED_SOUND_MISSION_CUB3_3}, {"CUB3_4", STREAMED_SOUND_MISSION_CUB3_4}, - {"CUB4_1", STREAMED_SOUND_MISSION_CUB4_1}, {"CUB4_2", STREAMED_SOUND_MISSION_CUB4_2}, {"CUB4_3", STREAMED_SOUND_MISSION_CUB4_3}, - {"CUB4_4", STREAMED_SOUND_MISSION_CUB4_4}, {"CUB4_5", STREAMED_SOUND_MISSION_CUB4_5}, {"CUB4_5A", STREAMED_SOUND_MISSION_CUB4_5A}, - {"CUB4_6", STREAMED_SOUND_MISSION_CUB4_6}, {"CUB4_7", STREAMED_SOUND_MISSION_CUB4_7}, {"CUB4_8", STREAMED_SOUND_MISSION_CUB4_8}, - {"CUB4_9", STREAMED_SOUND_MISSION_CUB4_9}, {"CUB4_10", STREAMED_SOUND_MISSION_CUB4_10}, {"CUB4_11", STREAMED_SOUND_MISSION_CUB4_11}, - {"CUB4_12", STREAMED_SOUND_MISSION_CUB4_12}, {"CUB4_13", STREAMED_SOUND_MISSION_CUB4_13}, {"CUB4_14", STREAMED_SOUND_MISSION_CUB4_14}, - {"CUB4_15", STREAMED_SOUND_MISSION_CUB4_15}, {"CUB4_16", STREAMED_SOUND_MISSION_CUB4_16}, {"golf_1", STREAMED_SOUND_MISSION_GOLF_1}, - {"golf_2", STREAMED_SOUND_MISSION_GOLF_2}, {"golf_3", STREAMED_SOUND_MISSION_GOLF_3}, {"bar_1", STREAMED_SOUND_MISSION_BAR_1}, - {"bar_2", STREAMED_SOUND_MISSION_BAR_2}, {"bar_3", STREAMED_SOUND_MISSION_BAR_3}, {"bar_4", STREAMED_SOUND_MISSION_BAR_4}, - {"bar_5", STREAMED_SOUND_MISSION_BAR_5}, {"bar_6", STREAMED_SOUND_MISSION_BAR_6}, {"bar_7", STREAMED_SOUND_MISSION_BAR_7}, - {"bar_8", STREAMED_SOUND_MISSION_BAR_8}, {"strip_1", STREAMED_SOUND_MISSION_STRIP_1}, {"strip_2", STREAMED_SOUND_MISSION_STRIP_2}, - {"strip_3", STREAMED_SOUND_MISSION_STRIP_3}, {"strip_4", STREAMED_SOUND_MISSION_STRIP_4}, {"strip_5", STREAMED_SOUND_MISSION_STRIP_5}, - {"strip_6", STREAMED_SOUND_MISSION_STRIP_6}, {"strip_7", STREAMED_SOUND_MISSION_STRIP_7}, {"strip_8", STREAMED_SOUND_MISSION_STRIP_8}, - {"strip_9", STREAMED_SOUND_MISSION_STRIP_9}, {"star_1", STREAMED_SOUND_MISSION_STAR_1}, {"star_2", STREAMED_SOUND_MISSION_STAR_2}, - {"star_3", STREAMED_SOUND_MISSION_STAR_3}, {"star_4", STREAMED_SOUND_MISSION_STAR_4}, {"mob_01a", STREAMED_SOUND_MISSION_MOB_01A}, - {"mob_01b", STREAMED_SOUND_MISSION_MOB_01B}, {"mob_01c", STREAMED_SOUND_MISSION_MOB_01C}, {"mob_02a", STREAMED_SOUND_MISSION_MOB_02A}, - {"mob_02b", STREAMED_SOUND_MISSION_MOB_02B}, {"mob_02c", STREAMED_SOUND_MISSION_MOB_02C}, {"mob_03a", STREAMED_SOUND_MISSION_MOB_03A}, - {"mob_03b", STREAMED_SOUND_MISSION_MOB_03B}, {"mob_03c", STREAMED_SOUND_MISSION_MOB_03C}, {"mob_03d", STREAMED_SOUND_MISSION_MOB_03D}, - {"mob_03e", STREAMED_SOUND_MISSION_MOB_03E}, {"shark_1", STREAMED_SOUND_MISSION_SHARK_1}, {"shark_2", STREAMED_SOUND_MISSION_SHARK_2}, - {"shark_3", STREAMED_SOUND_MISSION_SHARK_3}, {"shark_4", STREAMED_SOUND_MISSION_SHARK_4}, {"shark_5", STREAMED_SOUND_MISSION_SHARK_5}, - {"mob_04a", STREAMED_SOUND_MISSION_MOB_04A}, {"mob_04b", STREAMED_SOUND_MISSION_MOB_04B}, {"mob_04c", STREAMED_SOUND_MISSION_MOB_04C}, - {"mob_04d", STREAMED_SOUND_MISSION_MOB_04D}, {"mob_05a", STREAMED_SOUND_MISSION_MOB_05A}, {"mob_05b", STREAMED_SOUND_MISSION_MOB_05B}, - {"mob_05c", STREAMED_SOUND_MISSION_MOB_05C}, {"mob_05d", STREAMED_SOUND_MISSION_MOB_05D}, {"mob_06a", STREAMED_SOUND_MISSION_MOB_06A}, - {"mob_06b", STREAMED_SOUND_MISSION_MOB_06B}, {"mob_06c", STREAMED_SOUND_MISSION_MOB_06C}, {"mob_07a", STREAMED_SOUND_MISSION_MOB_07A}, - {"mob_07b", STREAMED_SOUND_MISSION_MOB_07B}, {"mob_08a", STREAMED_SOUND_MISSION_MOB_08A}, {"mob_08b", STREAMED_SOUND_MISSION_MOB_08B}, - {"mob_08c", STREAMED_SOUND_MISSION_MOB_08C}, {"mob_08d", STREAMED_SOUND_MISSION_MOB_08D}, {"mob_08e", STREAMED_SOUND_MISSION_MOB_08E}, - {"mob_08f", STREAMED_SOUND_MISSION_MOB_08F}, {"mob_08g", STREAMED_SOUND_MISSION_MOB_08G}, {"mob_09a", STREAMED_SOUND_MISSION_MOB_09A}, - {"mob_09b", STREAMED_SOUND_MISSION_MOB_09B}, {"mob_09c", STREAMED_SOUND_MISSION_MOB_09C}, {"mob_09d", STREAMED_SOUND_MISSION_MOB_09D}, - {"mob_09e", STREAMED_SOUND_MISSION_MOB_09E}, {"mob_09f", STREAMED_SOUND_MISSION_MOB_09F}, {"mob_10a", STREAMED_SOUND_MISSION_MOB_10A}, - {"mob_10b", STREAMED_SOUND_MISSION_MOB_10B}, {"mob_10c", STREAMED_SOUND_MISSION_MOB_10C}, {"mob_10d", STREAMED_SOUND_MISSION_MOB_10D}, - {"mob_10e", STREAMED_SOUND_MISSION_MOB_10E}, {"mob_11a", STREAMED_SOUND_MISSION_MOB_11A}, {"mob_11b", STREAMED_SOUND_MISSION_MOB_11B}, - {"mob_11c", STREAMED_SOUND_MISSION_MOB_11C}, {"mob_11d", STREAMED_SOUND_MISSION_MOB_11D}, {"mob_11e", STREAMED_SOUND_MISSION_MOB_11E}, - {"mob_11f", STREAMED_SOUND_MISSION_MOB_11F}, {"mob_14a", STREAMED_SOUND_MISSION_MOB_14A}, {"mob_14b", STREAMED_SOUND_MISSION_MOB_14B}, - {"mob_14c", STREAMED_SOUND_MISSION_MOB_14C}, {"mob_14d", STREAMED_SOUND_MISSION_MOB_14D}, {"mob_14e", STREAMED_SOUND_MISSION_MOB_14E}, - {"mob_14f", STREAMED_SOUND_MISSION_MOB_14F}, {"mob_14g", STREAMED_SOUND_MISSION_MOB_14G}, {"mob_14h", STREAMED_SOUND_MISSION_MOB_14H}, - {"mob_16a", STREAMED_SOUND_MISSION_MOB_16A}, {"mob_16b", STREAMED_SOUND_MISSION_MOB_16B}, {"mob_16c", STREAMED_SOUND_MISSION_MOB_16C}, - {"mob_16d", STREAMED_SOUND_MISSION_MOB_16D}, {"mob_16e", STREAMED_SOUND_MISSION_MOB_16E}, {"mob_16f", STREAMED_SOUND_MISSION_MOB_16F}, - {"mob_16g", STREAMED_SOUND_MISSION_MOB_16G}, {"mob_17a", STREAMED_SOUND_MISSION_MOB_17A}, {"mob_17b", STREAMED_SOUND_MISSION_MOB_17B}, - {"mob_17c", STREAMED_SOUND_MISSION_MOB_17C}, {"mob_17d", STREAMED_SOUND_MISSION_MOB_17D}, {"mob_17e", STREAMED_SOUND_MISSION_MOB_17E}, - {"mob_17g", STREAMED_SOUND_MISSION_MOB_17G}, {"mob_17h", STREAMED_SOUND_MISSION_MOB_17H}, {"mob_17i", STREAMED_SOUND_MISSION_MOB_17I}, - {"mob_17j", STREAMED_SOUND_MISSION_MOB_17J}, {"mob_17k", STREAMED_SOUND_MISSION_MOB_17K}, {"mob_17l", STREAMED_SOUND_MISSION_MOB_17L}, - {"mob_18a", STREAMED_SOUND_MISSION_MOB_18A}, {"mob_18b", STREAMED_SOUND_MISSION_MOB_18B}, {"mob_18c", STREAMED_SOUND_MISSION_MOB_18C}, - {"mob_18d", STREAMED_SOUND_MISSION_MOB_18D}, {"mob_18e", STREAMED_SOUND_MISSION_MOB_18E}, {"mob_18f", STREAMED_SOUND_MISSION_MOB_18F}, - {"mob_18g", STREAMED_SOUND_MISSION_MOB_18G}, {"mob_20a", STREAMED_SOUND_MISSION_MOB_20A}, {"mob_20b", STREAMED_SOUND_MISSION_MOB_20B}, - {"mob_20c", STREAMED_SOUND_MISSION_MOB_20C}, {"mob_20d", STREAMED_SOUND_MISSION_MOB_20D}, {"mob_20e", STREAMED_SOUND_MISSION_MOB_20E}, - {"mob_24a", STREAMED_SOUND_MISSION_MOB_24A}, {"mob_24b", STREAMED_SOUND_MISSION_MOB_24B}, {"mob_24c", STREAMED_SOUND_MISSION_MOB_24C}, - {"mob_24d", STREAMED_SOUND_MISSION_MOB_24D}, {"mob_24e", STREAMED_SOUND_MISSION_MOB_24E}, {"mob_24f", STREAMED_SOUND_MISSION_MOB_24F}, - {"mob_24g", STREAMED_SOUND_MISSION_MOB_24G}, {"mob_24h", STREAMED_SOUND_MISSION_MOB_24H}, {"mob_25a", STREAMED_SOUND_MISSION_MOB_25A}, - {"mob_25b", STREAMED_SOUND_MISSION_MOB_25B}, {"mob_25c", STREAMED_SOUND_MISSION_MOB_25C}, {"mob_25d", STREAMED_SOUND_MISSION_MOB_25D}, - {"mob_26a", STREAMED_SOUND_MISSION_MOB_26A}, {"mob_26b", STREAMED_SOUND_MISSION_MOB_26B}, {"mob_26c", STREAMED_SOUND_MISSION_MOB_26C}, - {"mob_26d", STREAMED_SOUND_MISSION_MOB_26D}, {"mob_26e", STREAMED_SOUND_MISSION_MOB_26E}, {"mob_29a", STREAMED_SOUND_MISSION_MOB_29A}, - {"mob_29b", STREAMED_SOUND_MISSION_MOB_29B}, {"mob_29c", STREAMED_SOUND_MISSION_MOB_29C}, {"mob_29d", STREAMED_SOUND_MISSION_MOB_29D}, - {"mob_29e", STREAMED_SOUND_MISSION_MOB_29E}, {"mob_29f", STREAMED_SOUND_MISSION_MOB_29F}, {"mob_29g", STREAMED_SOUND_MISSION_MOB_29G}, - {"mob_30a", STREAMED_SOUND_MISSION_MOB_30A}, {"mob_30b", STREAMED_SOUND_MISSION_MOB_30B}, {"mob_30c", STREAMED_SOUND_MISSION_MOB_30C}, - {"mob_30d", STREAMED_SOUND_MISSION_MOB_30D}, {"mob_30e", STREAMED_SOUND_MISSION_MOB_30E}, {"mob_30f", STREAMED_SOUND_MISSION_MOB_30F}, - {"mob_33a", STREAMED_SOUND_MISSION_MOB_33A}, {"mob_33b", STREAMED_SOUND_MISSION_MOB_33B}, {"mob_33c", STREAMED_SOUND_MISSION_MOB_33C}, - {"mob_33d", STREAMED_SOUND_MISSION_MOB_33D}, {"mob_34a", STREAMED_SOUND_MISSION_MOB_34A}, {"mob_34b", STREAMED_SOUND_MISSION_MOB_34B}, - {"mob_34c", STREAMED_SOUND_MISSION_MOB_34C}, {"mob_34d", STREAMED_SOUND_MISSION_MOB_34D}, {"mob_35a", STREAMED_SOUND_MISSION_MOB_35A}, - {"mob_35b", STREAMED_SOUND_MISSION_MOB_35B}, {"mob_35c", STREAMED_SOUND_MISSION_MOB_35C}, {"mob_35d", STREAMED_SOUND_MISSION_MOB_35D}, - {"mob_36a", STREAMED_SOUND_MISSION_MOB_36A}, {"mob_36b", STREAMED_SOUND_MISSION_MOB_36B}, {"mob_36c", STREAMED_SOUND_MISSION_MOB_36C}, - {"mob_40a", STREAMED_SOUND_MISSION_MOB_40A}, {"mob_40b", STREAMED_SOUND_MISSION_MOB_40B}, {"mob_40c", STREAMED_SOUND_MISSION_MOB_40C}, - {"mob_40d", STREAMED_SOUND_MISSION_MOB_40D}, {"mob_40e", STREAMED_SOUND_MISSION_MOB_40E}, {"mob_40f", STREAMED_SOUND_MISSION_MOB_40F}, - {"mob_40g", STREAMED_SOUND_MISSION_MOB_40G}, {"mob_40h", STREAMED_SOUND_MISSION_MOB_40H}, {"mob_40i", STREAMED_SOUND_MISSION_MOB_40I}, - {"mob_41a", STREAMED_SOUND_MISSION_MOB_41A}, {"mob_41b", STREAMED_SOUND_MISSION_MOB_41B}, {"mob_41c", STREAMED_SOUND_MISSION_MOB_41C}, - {"mob_41d", STREAMED_SOUND_MISSION_MOB_41D}, {"mob_41e", STREAMED_SOUND_MISSION_MOB_41E}, {"mob_41f", STREAMED_SOUND_MISSION_MOB_41F}, - {"mob_41g", STREAMED_SOUND_MISSION_MOB_41G}, {"mob_41h", STREAMED_SOUND_MISSION_MOB_41H}, {"mob_42a", STREAMED_SOUND_MISSION_MOB_42A}, - {"mob_42b", STREAMED_SOUND_MISSION_MOB_42B}, {"mob_42c", STREAMED_SOUND_MISSION_MOB_42C}, {"mob_42d", STREAMED_SOUND_MISSION_MOB_42D}, - {"mob_42e", STREAMED_SOUND_MISSION_MOB_42E}, {"mob_43a", STREAMED_SOUND_MISSION_MOB_43A}, {"mob_43b", STREAMED_SOUND_MISSION_MOB_43B}, - {"mob_43c", STREAMED_SOUND_MISSION_MOB_43C}, {"mob_43d", STREAMED_SOUND_MISSION_MOB_43D}, {"mob_43e", STREAMED_SOUND_MISSION_MOB_43E}, - {"mob_43f", STREAMED_SOUND_MISSION_MOB_43F}, {"mob_43g", STREAMED_SOUND_MISSION_MOB_43G}, {"mob_43h", STREAMED_SOUND_MISSION_MOB_43H}, - {"mob_45a", STREAMED_SOUND_MISSION_MOB_45A}, {"mob_45b", STREAMED_SOUND_MISSION_MOB_45B}, {"mob_45c", STREAMED_SOUND_MISSION_MOB_45C}, - {"mob_45d", STREAMED_SOUND_MISSION_MOB_45D}, {"mob_45e", STREAMED_SOUND_MISSION_MOB_45E}, {"mob_45f", STREAMED_SOUND_MISSION_MOB_45F}, - {"mob_45g", STREAMED_SOUND_MISSION_MOB_45G}, {"mob_45h", STREAMED_SOUND_MISSION_MOB_45H}, {"mob_45i", STREAMED_SOUND_MISSION_MOB_45I}, - {"mob_45j", STREAMED_SOUND_MISSION_MOB_45J}, {"mob_45k", STREAMED_SOUND_MISSION_MOB_45K}, {"mob_45l", STREAMED_SOUND_MISSION_MOB_45L}, - {"mob_45m", STREAMED_SOUND_MISSION_MOB_45M}, {"mob_45n", STREAMED_SOUND_MISSION_MOB_45N}, {"mob_46a", STREAMED_SOUND_MISSION_MOB_46A}, - {"mob_46b", STREAMED_SOUND_MISSION_MOB_46B}, {"mob_46c", STREAMED_SOUND_MISSION_MOB_46C}, {"mob_46d", STREAMED_SOUND_MISSION_MOB_46D}, - {"mob_46e", STREAMED_SOUND_MISSION_MOB_46E}, {"mob_46f", STREAMED_SOUND_MISSION_MOB_46F}, {"mob_46g", STREAMED_SOUND_MISSION_MOB_46G}, - {"mob_46h", STREAMED_SOUND_MISSION_MOB_46H}, {"mob_47a", STREAMED_SOUND_MISSION_MOB_47A}, {"mob_52a", STREAMED_SOUND_MISSION_MOB_52A}, - {"mob_52b", STREAMED_SOUND_MISSION_MOB_52B}, {"mob_52c", STREAMED_SOUND_MISSION_MOB_52C}, {"mob_52d", STREAMED_SOUND_MISSION_MOB_52D}, - {"mob_52e", STREAMED_SOUND_MISSION_MOB_52E}, {"mob_52f", STREAMED_SOUND_MISSION_MOB_52F}, {"mob_52g", STREAMED_SOUND_MISSION_MOB_52G}, - {"mob_52h", STREAMED_SOUND_MISSION_MOB_52H}, {"mob_54a", STREAMED_SOUND_MISSION_MOB_54A}, {"mob_54b", STREAMED_SOUND_MISSION_MOB_54B}, - {"mob_54c", STREAMED_SOUND_MISSION_MOB_54C}, {"mob_54d", STREAMED_SOUND_MISSION_MOB_54D}, {"mob_54e", STREAMED_SOUND_MISSION_MOB_54E}, - {"mob_55a", STREAMED_SOUND_MISSION_MOB_55A}, {"mob_55b", STREAMED_SOUND_MISSION_MOB_55B}, {"mob_55c", STREAMED_SOUND_MISSION_MOB_55C}, - {"mob_55d", STREAMED_SOUND_MISSION_MOB_55D}, {"mob_55e", STREAMED_SOUND_MISSION_MOB_55E}, {"mob_55f", STREAMED_SOUND_MISSION_MOB_55F}, - {"mob_56a", STREAMED_SOUND_MISSION_MOB_56A}, {"mob_56b", STREAMED_SOUND_MISSION_MOB_56B}, {"mob_56c", STREAMED_SOUND_MISSION_MOB_56C}, - {"mob_56d", STREAMED_SOUND_MISSION_MOB_56D}, {"mob_56e", STREAMED_SOUND_MISSION_MOB_56E}, {"mob_56f", STREAMED_SOUND_MISSION_MOB_56F}, - {"mob_57a", STREAMED_SOUND_MISSION_MOB_57A}, {"mob_57b", STREAMED_SOUND_MISSION_MOB_57B}, {"mob_57c", STREAMED_SOUND_MISSION_MOB_57C}, - {"mob_57d", STREAMED_SOUND_MISSION_MOB_57D}, {"mob_57e", STREAMED_SOUND_MISSION_MOB_57E}, {"mob_58a", STREAMED_SOUND_MISSION_MOB_58A}, - {"mob_58b", STREAMED_SOUND_MISSION_MOB_58B}, {"mob_58c", STREAMED_SOUND_MISSION_MOB_58C}, {"mob_58d", STREAMED_SOUND_MISSION_MOB_58D}, - {"mob_58e", STREAMED_SOUND_MISSION_MOB_58E}, {"mob_58f", STREAMED_SOUND_MISSION_MOB_58F}, {"mob_58g", STREAMED_SOUND_MISSION_MOB_58G}, - {"mob_61a", STREAMED_SOUND_MISSION_MOB_61A}, {"mob_61b", STREAMED_SOUND_MISSION_MOB_61B}, {"mob_62a", STREAMED_SOUND_MISSION_MOB_62A}, - {"mob_62b", STREAMED_SOUND_MISSION_MOB_62B}, {"mob_62c", STREAMED_SOUND_MISSION_MOB_62C}, {"mob_62d", STREAMED_SOUND_MISSION_MOB_62D}, - {"mob_63a", STREAMED_SOUND_MISSION_MOB_63A}, {"mob_63b", STREAMED_SOUND_MISSION_MOB_63B}, {"mob_63c", STREAMED_SOUND_MISSION_MOB_63C}, - {"mob_63d", STREAMED_SOUND_MISSION_MOB_63D}, {"mob_63e", STREAMED_SOUND_MISSION_MOB_63E}, {"mob_63f", STREAMED_SOUND_MISSION_MOB_63F}, - {"mob_63g", STREAMED_SOUND_MISSION_MOB_63G}, {"mob_63h", STREAMED_SOUND_MISSION_MOB_63H}, {"mob_63i", STREAMED_SOUND_MISSION_MOB_63I}, - {"mob_63j", STREAMED_SOUND_MISSION_MOB_63J}, {"mob_66a", STREAMED_SOUND_MISSION_MOB_66A}, {"mob_66b", STREAMED_SOUND_MISSION_MOB_66B}, - {"mob_68a", STREAMED_SOUND_MISSION_MOB_68A}, {"mob_68b", STREAMED_SOUND_MISSION_MOB_68B}, {"mob_68c", STREAMED_SOUND_MISSION_MOB_68C}, - {"mob_68d", STREAMED_SOUND_MISSION_MOB_68D}, {"mob_70a", STREAMED_SOUND_MISSION_MOB_70A}, {"mob_70b", STREAMED_SOUND_MISSION_MOB_70B}, - {"mob_71a", STREAMED_SOUND_MISSION_MOB_71A}, {"mob_71b", STREAMED_SOUND_MISSION_MOB_71B}, {"mob_71c", STREAMED_SOUND_MISSION_MOB_71C}, - {"mob_71d", STREAMED_SOUND_MISSION_MOB_71D}, {"mob_71e", STREAMED_SOUND_MISSION_MOB_71E}, {"mob_71f", STREAMED_SOUND_MISSION_MOB_71F}, - {"mob_71g", STREAMED_SOUND_MISSION_MOB_71G}, {"mob_71h", STREAMED_SOUND_MISSION_MOB_71H}, {"mob_71i", STREAMED_SOUND_MISSION_MOB_71I}, - {"mob_71j", STREAMED_SOUND_MISSION_MOB_71J}, {"mob_71k", STREAMED_SOUND_MISSION_MOB_71K}, {"mob_71l", STREAMED_SOUND_MISSION_MOB_71L}, - {"mob_71m", STREAMED_SOUND_MISSION_MOB_71M}, {"mob_71n", STREAMED_SOUND_MISSION_MOB_71N}, {"mob_72a", STREAMED_SOUND_MISSION_MOB_72A}, - {"mob_72b", STREAMED_SOUND_MISSION_MOB_72B}, {"mob_72c", STREAMED_SOUND_MISSION_MOB_72C}, {"mob_72d", STREAMED_SOUND_MISSION_MOB_72D}, - {"mob_72e", STREAMED_SOUND_MISSION_MOB_72E}, {"mob_72f", STREAMED_SOUND_MISSION_MOB_72F}, {"mob_72g", STREAMED_SOUND_MISSION_MOB_72G}, - {"mob_73a", STREAMED_SOUND_MISSION_MOB_73A}, {"mob_73c", STREAMED_SOUND_MISSION_MOB_73C}, {"mob_73d", STREAMED_SOUND_MISSION_MOB_73D}, - {"mob_73f", STREAMED_SOUND_MISSION_MOB_73F}, {"mob_73g", STREAMED_SOUND_MISSION_MOB_73G}, {"mob_73i", STREAMED_SOUND_MISSION_MOB_73I}, - {"mob_95a", STREAMED_SOUND_MISSION_MOB_95A}, {"mob_96a", STREAMED_SOUND_MISSION_MOB_96A}, {"mob_98a", STREAMED_SOUND_MISSION_MOB_98A}, - {"mob_99a", STREAMED_SOUND_MISSION_MOB_99A}, {"job1_1b", STREAMED_SOUND_MISSION_JOB1_1B}, {"job1_1c", STREAMED_SOUND_MISSION_JOB1_1C}, - {"job1_1d", STREAMED_SOUND_MISSION_JOB1_1D}, {"job2_1b", STREAMED_SOUND_MISSION_JOB2_1B}, {"job2_2", STREAMED_SOUND_MISSION_JOB2_2}, - {"job2_3", STREAMED_SOUND_MISSION_JOB2_3}, {"job2_4", STREAMED_SOUND_MISSION_JOB2_4}, {"job2_5", STREAMED_SOUND_MISSION_JOB2_5}, - {"job2_6", STREAMED_SOUND_MISSION_JOB2_6}, {"job2_7", STREAMED_SOUND_MISSION_JOB2_7}, {"job2_8", STREAMED_SOUND_MISSION_JOB2_8}, - {"job2_9", STREAMED_SOUND_MISSION_JOB2_9}, {"job3_1", STREAMED_SOUND_MISSION_JOB3_1}, {"job3_2", STREAMED_SOUND_MISSION_JOB3_2}, - {"job3_3", STREAMED_SOUND_MISSION_JOB3_3}, {"job4_1", STREAMED_SOUND_MISSION_JOB4_1}, {"job4_2", STREAMED_SOUND_MISSION_JOB4_2}, - {"job4_3", STREAMED_SOUND_MISSION_JOB4_3}, {"job5_1", STREAMED_SOUND_MISSION_JOB5_1}, {"job5_2", STREAMED_SOUND_MISSION_JOB5_2}, - {"job5_3", STREAMED_SOUND_MISSION_JOB5_3}, {"bjm1_20", STREAMED_SOUND_MISSION_BJM1_20}, {"bjm1_4", STREAMED_SOUND_MISSION_BJM1_4}, - {"bjm1_5", STREAMED_SOUND_MISSION_BJM1_5}, {"merc_39", STREAMED_SOUND_MISSION_MERC_39}, {"mono_1", STREAMED_SOUND_MISSION_MONO_1}, - {"mono_2", STREAMED_SOUND_MISSION_MONO_2}, {"mono_3", STREAMED_SOUND_MISSION_MONO_3}, {"mono_4", STREAMED_SOUND_MISSION_MONO_4}, - {"mono_5", STREAMED_SOUND_MISSION_MONO_5}, {"mono_6", STREAMED_SOUND_MISSION_MONO_6}, {"mono_7", STREAMED_SOUND_MISSION_MONO_7}, - {"mono_8", STREAMED_SOUND_MISSION_MONO_8}, {"mono_9", STREAMED_SOUND_MISSION_MONO_9}, {"mono10", STREAMED_SOUND_MISSION_MONO10}, - {"mono11", STREAMED_SOUND_MISSION_MONO11}, {"mono12", STREAMED_SOUND_MISSION_MONO12}, {"mono13", STREAMED_SOUND_MISSION_MONO13}, - {"mono14", STREAMED_SOUND_MISSION_MONO14}, {"mono15", STREAMED_SOUND_MISSION_MONO15}, {"mono16", STREAMED_SOUND_MISSION_MONO16}, - {"fud_01", STREAMED_SOUND_MISSION_FUD_01}, {"fud_02", STREAMED_SOUND_MISSION_FUD_02}, {"fud_03", STREAMED_SOUND_MISSION_FUD_03}, - {"fud_04", STREAMED_SOUND_MISSION_FUD_04}, {"fud_05", STREAMED_SOUND_MISSION_FUD_05}, {"fud_06", STREAMED_SOUND_MISSION_FUD_06}, - {"fud_07", STREAMED_SOUND_MISSION_FUD_07}, {"fud_08", STREAMED_SOUND_MISSION_FUD_08}, {"fud_09", STREAMED_SOUND_MISSION_FUD_09}, - {"fud_10", STREAMED_SOUND_MISSION_FUD_10}, {"fud_11", STREAMED_SOUND_MISSION_FUD_11}, {"fud_12", STREAMED_SOUND_MISSION_FUD_12}, - {"fud_13", STREAMED_SOUND_MISSION_FUD_13}, {"fud_14", STREAMED_SOUND_MISSION_FUD_14}, {"fud_15", STREAMED_SOUND_MISSION_FUD_15}, - {"fud_16", STREAMED_SOUND_MISSION_FUD_16}, {"fud_17", STREAMED_SOUND_MISSION_FUD_17}, {"fud_18", STREAMED_SOUND_MISSION_FUD_18}, - {"fud_19", STREAMED_SOUND_MISSION_FUD_19}, {"fud_20", STREAMED_SOUND_MISSION_FUD_20}, {"burg_01", STREAMED_SOUND_MISSION_BURG_01}, - {"burg_02", STREAMED_SOUND_MISSION_BURG_02}, {"burg_03", STREAMED_SOUND_MISSION_BURG_03}, {"burg_04", STREAMED_SOUND_MISSION_BURG_04}, - {"burg_05", STREAMED_SOUND_MISSION_BURG_05}, {"burg_06", STREAMED_SOUND_MISSION_BURG_06}, {"burg_07", STREAMED_SOUND_MISSION_BURG_07}, - {"burg_08", STREAMED_SOUND_MISSION_BURG_08}, {"burg_09", STREAMED_SOUND_MISSION_BURG_09}, {"burg_10", STREAMED_SOUND_MISSION_BURG_10}, - {"burg_11", STREAMED_SOUND_MISSION_BURG_11}, {"burg_12", STREAMED_SOUND_MISSION_BURG_12}, {"crust01", STREAMED_SOUND_MISSION_CRUST01}, - {"crust02", STREAMED_SOUND_MISSION_CRUST02}, {"crust03", STREAMED_SOUND_MISSION_CRUST03}, {"crust04", STREAMED_SOUND_MISSION_CRUST04}, - {"crust05", STREAMED_SOUND_MISSION_CRUST05}, {"crust06", STREAMED_SOUND_MISSION_CRUST06}, {"crust07", STREAMED_SOUND_MISSION_CRUST07}, - {"crust08", STREAMED_SOUND_MISSION_CRUST08}, {"crust09", STREAMED_SOUND_MISSION_CRUST09}, {"band_01", STREAMED_SOUND_MISSION_BAND_01}, - {"band_02", STREAMED_SOUND_MISSION_BAND_02}, {"band_03", STREAMED_SOUND_MISSION_BAND_03}, {"band_04", STREAMED_SOUND_MISSION_BAND_04}, - {"band_05", STREAMED_SOUND_MISSION_BAND_05}, {"band_06", STREAMED_SOUND_MISSION_BAND_06}, {"band_07", STREAMED_SOUND_MISSION_BAND_07}, - {"band_08", STREAMED_SOUND_MISSION_BAND_08}, {"shaft01", STREAMED_SOUND_MISSION_SHAFT01}, {"shaft02", STREAMED_SOUND_MISSION_SHAFT02}, - {"shaft03", STREAMED_SOUND_MISSION_SHAFT03}, {"shaft04", STREAMED_SOUND_MISSION_SHAFT04}, {"shaft05", STREAMED_SOUND_MISSION_SHAFT05}, - {"shaft06", STREAMED_SOUND_MISSION_SHAFT06}, {"shaft07", STREAMED_SOUND_MISSION_SHAFT07}, {"shaft08", STREAMED_SOUND_MISSION_SHAFT08}, - {"piss_01", STREAMED_SOUND_MISSION_PISS_01}, {"piss_02", STREAMED_SOUND_MISSION_PISS_02}, {"piss_03", STREAMED_SOUND_MISSION_PISS_03}, - {"piss_04", STREAMED_SOUND_MISSION_PISS_04}, {"piss_05", STREAMED_SOUND_MISSION_PISS_05}, {"piss_06", STREAMED_SOUND_MISSION_PISS_06}, - {"piss_07", STREAMED_SOUND_MISSION_PISS_07}, {"piss_08", STREAMED_SOUND_MISSION_PISS_08}, {"piss_09", STREAMED_SOUND_MISSION_PISS_09}, - {"piss_10", STREAMED_SOUND_MISSION_PISS_10}, {"piss_11", STREAMED_SOUND_MISSION_PISS_11}, {"piss_12", STREAMED_SOUND_MISSION_PISS_12}, - {"piss_13", STREAMED_SOUND_MISSION_PISS_13}, {"piss_14", STREAMED_SOUND_MISSION_PISS_14}, {"piss_15", STREAMED_SOUND_MISSION_PISS_15}, - {"piss_16", STREAMED_SOUND_MISSION_PISS_16}, {"piss_17", STREAMED_SOUND_MISSION_PISS_17}, {"piss_18", STREAMED_SOUND_MISSION_PISS_18}, - {"piss_19", STREAMED_SOUND_MISSION_PISS_19}, {"gimme01", STREAMED_SOUND_MISSION_GIMME01}, {"gimme02", STREAMED_SOUND_MISSION_GIMME02}, - {"gimme03", STREAMED_SOUND_MISSION_GIMME03}, {"gimme04", STREAMED_SOUND_MISSION_GIMME04}, {"gimme05", STREAMED_SOUND_MISSION_GIMME05}, - {"gimme06", STREAMED_SOUND_MISSION_GIMME06}, {"gimme07", STREAMED_SOUND_MISSION_GIMME07}, {"gimme08", STREAMED_SOUND_MISSION_GIMME08}, - {"gimme09", STREAMED_SOUND_MISSION_GIMME09}, {"gimme10", STREAMED_SOUND_MISSION_GIMME10}, {"gimme11", STREAMED_SOUND_MISSION_GIMME11}, - {"gimme12", STREAMED_SOUND_MISSION_GIMME12}, {"gimme13", STREAMED_SOUND_MISSION_GIMME13}, {"gimme14", STREAMED_SOUND_MISSION_GIMME14}, - {"gimme15", STREAMED_SOUND_MISSION_GIMME15}, {"bust_01", STREAMED_SOUND_MISSION_BUST_01}, {"bust_02", STREAMED_SOUND_MISSION_BUST_02}, - {"bust_03", STREAMED_SOUND_MISSION_BUST_03}, {"bust_04", STREAMED_SOUND_MISSION_BUST_04}, {"bust_05", STREAMED_SOUND_MISSION_BUST_05}, - {"bust_06", STREAMED_SOUND_MISSION_BUST_06}, {"bust_07", STREAMED_SOUND_MISSION_BUST_07}, {"bust_08", STREAMED_SOUND_MISSION_BUST_08}, - {"bust_09", STREAMED_SOUND_MISSION_BUST_09}, {"bust_10", STREAMED_SOUND_MISSION_BUST_10}, {"bust_11", STREAMED_SOUND_MISSION_BUST_11}, - {"bust_12", STREAMED_SOUND_MISSION_BUST_12}, {"bust_13", STREAMED_SOUND_MISSION_BUST_13}, {"bust_14", STREAMED_SOUND_MISSION_BUST_14}, - {"bust_15", STREAMED_SOUND_MISSION_BUST_15}, {"bust_16", STREAMED_SOUND_MISSION_BUST_16}, {"bust_17", STREAMED_SOUND_MISSION_BUST_17}, - {"bust_18", STREAMED_SOUND_MISSION_BUST_18}, {"bust_19", STREAMED_SOUND_MISSION_BUST_19}, {"bust_20", STREAMED_SOUND_MISSION_BUST_20}, - {"bust_21", STREAMED_SOUND_MISSION_BUST_21}, {"bust_22", STREAMED_SOUND_MISSION_BUST_22}, {"bust_23", STREAMED_SOUND_MISSION_BUST_23}, - {"bust_24", STREAMED_SOUND_MISSION_BUST_24}, {"bust_25", STREAMED_SOUND_MISSION_BUST_25}, {"bust_26", STREAMED_SOUND_MISSION_BUST_26}, - {"bust_27", STREAMED_SOUND_MISSION_BUST_27}, {"bust_28", STREAMED_SOUND_MISSION_BUST_28}, {nil, 0} }; + {"JDAISH2", SFX_JD_SHOCKED_2}, + {"JDAICR2", SFX_JD_CRASH_CAR_2}, + {"JDAICR1", SFX_JD_CRASH_CAR_1}, + {"MHAIJC1", SFX_MICKEY_JACKED_CAR_1}, + {"JDAICR3", SFX_JD_CRASH_CAR_3}, + {"CSHUTR", SFX_CSHUTR}, + {"DRKNOCK", SFX_DRKNOCK}, + {"NEDS4CA", SFX_NEDS4CA}, + {"RUNPAST", SFX_RUNPAST}, + {"LEAR", SFX_LEAR}, + {"TING", SFX_TING}, + {"CLICK", SFX_CLICK}, + {"BBell", SFX_BRIDGE_BELL}, + {"CHOP_1", SFX_CHOP_1}, + {"CHOP_2", SFX_CHOP_2}, + {"MAC4_CM", SFX_MAC4_CM}, + {"MAC4_CN", SFX_MAC4_CN}, + {"MAC4_CO", SFX_MAC4_CO}, + {"MAC4_CP", SFX_MAC4_CP}, + {"MAC4_CQ", SFX_MAC4_CQ}, + {"MAC4_CR", SFX_MAC4_CR}, + {"MAC4_CS", SFX_MAC4_CS}, + {"SBell", SFX_SHOPBELL}, + {"PROSCR1", SFX_PROSTITUTE_SHOCKED_2}, + {"PROSCR2", SFX_PROSTITUTE_SHOCKED_3}, + {"COLT_45", SFX_COLT_45}, + {"SAL4_AJ", SFX_SAL4_AJ}, + {"JD_SLPN", SFX_JD_SLPN}, + {"MDON2AH", SFX_MDON2AH}, + {"SAL4_EA", SFX_SAL4_EA}, + {"mobring", SFX_SFX_RING}, + {"pagring", SFX_SFX_PAGER_RING}, + {"carrev", SFX_SFX_WILLIE_CAR_REV}, + {"bikerev", SFX_SFX_WILLIE_BIKE_REV}, + {"liftop", SFX_SFX_LIFT_OPEN}, + {"liftcl", SFX_SFX_LIFT_CLOSE}, + {"liftrun", SFX_SFX_LIFT_RUNNING}, + {"liftbel", SFX_SFX_LIFT_BELL}, + {"inlift", SFX_SFX_IN_LIFT}, + {"caml", SFX_SFX_CAMERA_LEFT}, + {"camr", SFX_SFX_CAMERA_RIGHT}, + {"cheer1", SFX_SFX_CHEER1}, + {"cheer2", SFX_SFX_CHEER2}, + {"cheer3", SFX_SFX_CHEER3}, + {"cheer4", SFX_SFX_CHEER4}, + {"ooh1", SFX_SFX_OOH1}, + {"ooh2", SFX_SFX_OOH2}, + {"lanstp1", SFX_SFX_LANSTP1}, + {"lanstp2", SFX_SFX_LANSTP2}, + {"lanamu1", SFX_SFX_LANAMU1}, + {"lanamu2", SFX_SFX_LANAMU2}, + {"airhrnl", SFX_SFX_AIRHORN_LEFT}, + {"airhrnr", SFX_SFX_AIRHORN_RIGHT}, + {"sniper", SFX_SFX_SNIPER_SHOT_1}, + {"snipsh", SFX_SFX_SNIPER_SHOT_2}, + {"bloroof", SFX_SFX_BLOW_ROOF}, + {"sfx_01", SFX_SFX_SFX_01}, + {"sfx_02", SFX_SFX_SFX_02}, + {"ANG1_AA", SFX_SFX_ANG1_AA}, + {"ANG1_AB", SFX_SFX_ANG1_AB}, + {"ANG1_AC", SFX_SFX_ANG1_AC}, + {"ANG1_AD", SFX_SFX_ANG1_AD}, + {"ANG1_AE", SFX_SFX_ANG1_AE}, + {"ANG1_AF", SFX_SFX_ANG1_AF}, + {"ANG1_AG", SFX_SFX_ANG1_AG}, + {"ANG1_AH", SFX_SFX_ANG1_AH}, + {"ANG1_AI", SFX_SFX_ANG1_AI}, + {"ANG1_AJ", SFX_SFX_ANG1_AJ}, + {"ANG1_AK", SFX_SFX_ANG1_AK}, + {"ANG1_AL", SFX_SFX_ANG1_AL}, + {"ANG1_AM", SFX_SFX_ANG1_AM}, + {"ANG1_AN", SFX_SFX_ANG1_AN}, + {"ANG1_AO", SFX_SFX_ANG1_AO}, + {"ANG1_AP", SFX_SFX_ANG1_AP}, + {"ANG1_AQ", SFX_SFX_ANG1_AQ}, + {"ANG1_AR", SFX_SFX_ANG1_AR}, + {"ANG1_AS", SFX_SFX_ANG1_AS}, + {"ANG1_AT", SFX_SFX_ANG1_AT}, + {"ANG1_AU", SFX_SFX_ANG1_AU}, + {"ANG1_AV", SFX_SFX_ANG1_AV}, + {"ANG1_AW", SFX_SFX_ANG1_AW}, + {"JDT3_AA", SFX_SFX_JDT3_AA}, + {"JDT3_AB", SFX_SFX_JDT3_AB}, + {"JDT3_AC", SFX_SFX_JDT3_AC}, + {"JDT3_AD", SFX_SFX_JDT3_AD}, + {"JDT3_AE", SFX_SFX_JDT3_AE}, + {"JDT3_AG", SFX_SFX_JDT3_AG}, + {"JDT3_AH", SFX_SFX_JDT3_AH}, + {"JDT3_BA", SFX_SFX_JDT3_BA}, + {"JDT3_BB", SFX_SFX_JDT3_BB}, + {"JDT3_BC", SFX_SFX_JDT3_BC}, + {"JDT3_BD", SFX_SFX_JDT3_BD}, + {"JDT3_BE", SFX_SFX_JDT3_BE}, + {"JDT3_BF", SFX_SFX_JDT3_BF}, + {"MAR4_AA", SFX_SFX_MAR4_AA}, + {"MAR4_AB", SFX_SFX_MAR4_AB}, + {"MAR4_AC", SFX_SFX_MAR4_AC}, + {"MAR4_AD", SFX_SFX_MAR4_AD}, + {"MAR4_BA", SFX_SFX_MAR4_BA}, + {"MAR4_BB", SFX_SFX_MAR4_BB}, + {"MAR4_BC", SFX_SFX_MAR4_BC}, + {"MAR4_BD", SFX_SFX_MAR4_BD}, + {"MAR4_BE", SFX_SFX_MAR4_BE}, + {"MAR4_BF", SFX_SFX_MAR4_BF}, + {"MAR4_BG", SFX_SFX_MAR4_BG}, + {"AVEN_AA", SFX_AVEN_AA}, + {"AVEN_AB", SFX_AVEN_AB}, + {"AVEN_AC", SFX_AVEN_AC}, + {"AVEN_AD", SFX_AVEN_AD}, + {"AVEN_AE", SFX_AVEN_AE}, + {"AVEN_AF", SFX_AVEN_AF}, + {"AVEN_AG", SFX_AVEN_AG}, + {"AVEN_AH", SFX_AVEN_AH}, + {"AVEN_AI", SFX_AVEN_AI}, + {"AVEN_AJ", SFX_AVEN_AJ}, + {"AVEN_AK", SFX_AVEN_AK}, + {"AVEN_AL", SFX_AVEN_AL}, + {"AVEN_AM", SFX_AVEN_AM}, + {"AVEN_AN", SFX_AVEN_AN}, + {"AVEN_AO", SFX_AVEN_AO}, + {"AVEN_AP", SFX_AVEN_AP}, + {"AVEN_AQ", SFX_AVEN_AQ}, + {"AVEN_AR", SFX_AVEN_AR}, + {"AVEN_AS", SFX_AVEN_AS}, + {"AVEN_AT", SFX_AVEN_AT}, + {"AVEN_AU", SFX_AVEN_AU}, + {"AVEN_AV", SFX_AVEN_AV}, + {"AVEN_AW", SFX_AVEN_AW}, + {"AVE1_AA", SFX_AVE1_AA}, + {"AVE1_AB", SFX_AVE1_AB}, + {"AVE1_AC", SFX_AVE1_AC}, + {"AVE1_AD", SFX_AVE1_AD}, + {"AVE1_AE", SFX_AVE1_AE}, + {"AVE1_AF", SFX_AVE1_AF}, + {"AVE1_AG", SFX_AVE1_AG}, + {"AVE2_AA", SFX_AVE2_AA}, + {"AVE2_AC", SFX_AVE2_AC}, + {"AVE2_AD", SFX_AVE2_AD}, + {"AVE2_AE", SFX_AVE2_AE}, + {"AVE2_AG", SFX_AVE2_AG}, + {"AVE2_AH", SFX_AVE2_AH}, + {"AVE3_AA", SFX_AVE3_AA}, + {"AVE3_AB", SFX_AVE3_AB}, + {"AVE3_AC", SFX_AVE3_AC}, + {"AVE3_AD", SFX_AVE3_AD}, + {"AVE3_AE", SFX_AVE3_AE}, + {"AVE3_AF", SFX_AVE3_AF}, + {"AVE3_AG", SFX_AVE3_AG}, + {"AVE4_AA", SFX_AVE4_AA}, + {"AVE4_AB", SFX_AVE4_AB}, + {"AVE4_AD", SFX_AVE4_AD}, + {"AVE4_AE", SFX_AVE4_AE}, + {"AVE4_AF", SFX_AVE4_AF}, + {"AVE4_AG", SFX_AVE4_AG}, + {"AVE4_AH", SFX_AVE4_AH}, + {"AVE5_AA", SFX_AVE5_AA}, + {"AVE5_AB", SFX_AVE5_AB}, + {"AVE5_AC", SFX_AVE5_AC}, + {"AVE5_AD", SFX_AVE5_AD}, + {"AVE5_AE", SFX_AVE5_AE}, + {"AVE5_AF", SFX_AVE5_AF}, + {"AVE5_AG", SFX_AVE5_AG}, + {"AVE6_AA", SFX_AVE6_AA}, + {"AVE6_AB", SFX_AVE6_AB}, + {"AVE6_AC", SFX_AVE6_AC}, + {"AVE6_AD", SFX_AVE6_AD}, + {"AVE6_AE", SFX_AVE6_AE}, + {"BONS2BA", SFX_BONS2BA}, + {"BONS2BB", SFX_BONS2BB}, + {"BONS2BC", SFX_BONS2BC}, + {"BONS2BD", SFX_BONS2BD}, + {"BONS2BE", SFX_BONS2BE}, + {"CAD1_AA", SFX_CAD1_AA}, + {"CAD1_AB", SFX_CAD1_AB}, + {"CAD1_AC", SFX_CAD1_AC}, + {"CAD1_AD", SFX_CAD1_AD}, + {"CAD1_AE", SFX_CAD1_AE}, + {"CAD2_AA", SFX_CAD2_AA}, + {"CAD2_AB", SFX_CAD2_AB}, + {"CAD2_AC", SFX_CAD2_AC}, + {"CAD2_AD", SFX_CAD2_AD}, + {"CAD2_AE", SFX_CAD2_AE}, + {"CAD2_AF", SFX_CAD2_AF}, + {"CAD3_AA", SFX_CAD3_AA}, + {"CAD3_AB", SFX_CAD3_AB}, + {"CAD3_AC", SFX_CAD3_AC}, + {"CAD3_AD", SFX_CAD3_AD}, + {"CAD3_AE", SFX_CAD3_AE}, + {"CAD3_AF", SFX_CAD3_AF}, + {"CAD4_AA", SFX_CAD4_AA}, + {"CAD4_AB", SFX_CAD4_AB}, + {"CAD4_AC", SFX_CAD4_AC}, + {"CAD4_AD", SFX_CAD4_AD}, + {"CAD4_AE", SFX_CAD4_AE}, + {"CAD4_AF", SFX_CAD4_AF}, + {"CAD5_AA", SFX_CAD5_AA}, + {"CAD5_AB", SFX_CAD5_AB}, + {"CAD5_AC", SFX_CAD5_AC}, + {"CAD5_AD", SFX_CAD5_AD}, + {"CAD5_AE", SFX_CAD5_AE}, + {"CAD5_AF", SFX_CAD5_AF}, + {"CAD6_AA", SFX_CAD6_AA}, + {"CAD6_AB", SFX_CAD6_AB}, + {"CAD6_AC", SFX_CAD6_AC}, + {"CAD6_AD", SFX_CAD6_AD}, + {"CAD6_AE", SFX_CAD6_AE}, + {"CAD6_AF", SFX_CAD6_AF}, + {"CAD7_AB", SFX_CAD7_AB}, + {"CAD7_AC", SFX_CAD7_AC}, + {"CAD7_AD", SFX_CAD7_AD}, + {"CAD7_AE", SFX_CAD7_AE}, + {"CAD8_AB", SFX_CAD8_AB}, + {"CAD8_AC", SFX_CAD8_AC}, + {"CAD8_AD", SFX_CAD8_AD}, + {"CAD8_AE", SFX_CAD8_AE}, + {"CAD8_AF", SFX_CAD8_AF}, + {"CAD9_AA", SFX_CAD9_AA}, + {"CAD9_AB", SFX_CAD9_AB}, + {"CAD9_AC", SFX_CAD9_AC}, + {"CAD9_AD", SFX_CAD9_AD}, + {"CAD9_AE", SFX_CAD9_AE}, + {"CAD9_AF", SFX_CAD9_AF}, + {"DONH1CA", SFX_DONH1CA}, + {"DONH1DA", SFX_DONH1DA}, + {"DONH1DB", SFX_DONH1DB}, + {"DONH1EA", SFX_DONH1EA}, + {"DONH1EB", SFX_DONH1EB}, + {"DONH1EC", SFX_DONH1EC}, + {"DONH1ED", SFX_DONH1ED}, + {"DONH1EE", SFX_DONH1EE}, + {"DONH1FA", SFX_DONH1FA}, + {"DONH1GA", SFX_DONH1GA}, + {"DONH1GB", SFX_DONH1GB}, + {"DONH1GC", SFX_DONH1GC}, + {"DONH1HA", SFX_DONH1HA}, + {"DONH1IA", SFX_DONH1IA}, + {"DONH1IB", SFX_DONH1IB}, + {"DONH1JA", SFX_DONH1JA}, + {"DONH1JB", SFX_DONH1JB}, + {"DONH1JC", SFX_DONH1JC}, + {"DONH1JD", SFX_DONH1JD}, + {"DONH1JE", SFX_DONH1JE}, + {"DONH2AA", SFX_DONH2AA}, + {"DONH2AB", SFX_DONH2AB}, + {"DONH2AC", SFX_DONH2AC}, + {"DONH2AD", SFX_DONH2AD}, + {"DONH2AF", SFX_DONH2AF}, + {"DONH2AG", SFX_DONH2AG}, + {"DONH2AH", SFX_DONH2AH}, + {"DONH2BA", SFX_DONH2BA}, + {"DONH2BB", SFX_DONH2BB}, + {"DONH2BC", SFX_DONH2BC}, + {"DONH2BD", SFX_DONH2BD}, + {"DONH2BE", SFX_DONH2BE}, + {"DONH2BF", SFX_DONH2BF}, + {"DONH2BG", SFX_DONH2BG}, + {"DONH2BH", SFX_DONH2BH}, + {"DONH2BI", SFX_DONH2BI}, + {"DONH2BJ", SFX_DONH2BJ}, + {"DONH2BK", SFX_DONH2BK}, + {"DONH2BL", SFX_DONH2BL}, + {"DONH2CA", SFX_DONH2CA}, + {"DONH2CB", SFX_DONH2CB}, + {"DONH2CC", SFX_DONH2CC}, + {"DONH2CD", SFX_DONH2CD}, + {"DONH2CE", SFX_DONH2CE}, + {"DONH2CF", SFX_DONH2CF}, + {"DONH2CG", SFX_DONH2CG}, + {"DONH2DA", SFX_DONH2DA}, + {"DONH2DB", SFX_DONH2DB}, + {"DONH2DC", SFX_DONH2DC}, + {"DONH2EA", SFX_DONH2EA}, + {"DONH2EC", SFX_DONH2EC}, + {"DONH3AA", SFX_DONH3AA}, + {"DONH3AB", SFX_DONH3AB}, + {"DONH3AC", SFX_DONH3AC}, + {"DONH3AD", SFX_DONH3AD}, + {"DONH3AE", SFX_DONH3AE}, + {"DONH3AF", SFX_DONH3AF}, + {"DONH3AG", SFX_DONH3AG}, + {"DONH3AH", SFX_DONH3AH}, + {"DONH3AI", SFX_DONH3AI}, + {"DONH3BA", SFX_DONH3BA}, + {"DONH3BB", SFX_DONH3BB}, + {"DONH3CA", SFX_DONH3CA}, + {"DONH3DA", SFX_DONH3DA}, + {"DONH3EA", SFX_DONH3EA}, + {"DONH3EB", SFX_DONH3EB}, + {"DONH3EC", SFX_DONH3EC}, + {"DONH3ED", SFX_DONH3ED}, + {"DONH3EE", SFX_DONH3EE}, + {"DONH3EF", SFX_DONH3EF}, + {"DONH3FA", SFX_DONH3FA}, + {"DONH3GA", SFX_DONH3GA}, + {"DONH3GB", SFX_DONH3GB}, + {"DONH3GC", SFX_DONH3GC}, + {"DONH3GD", SFX_DONH3GD}, + {"DONH3GE", SFX_DONH3GE}, + {"DONH3GF", SFX_DONH3GF}, + {"DONH3HA", SFX_DONH3HA}, + {"DONH3HB", SFX_DONH3HB}, + {"DONH4AA", SFX_DONH4AA}, + {"DONH4AB", SFX_DONH4AB}, + {"DONH4AC", SFX_DONH4AC}, + {"DONH4AD", SFX_DONH4AD}, + {"DONH4AE", SFX_DONH4AE}, + {"DONH4AF", SFX_DONH4AF}, + {"DONH4AG", SFX_DONH4AG}, + {"DONH4AH", SFX_DONH4AH}, + {"DONH4AI", SFX_DONH4AI}, + {"DONH4AJ", SFX_DONH4AJ}, + {"DONH5AA", SFX_DONH5AA}, + {"DONH5AB", SFX_DONH5AB}, + {"DONH5AC", SFX_DONH5AC}, + {"DONH5AD", SFX_DONH5AD}, + {"DONH5AE", SFX_DONH5AE}, + {"DONH5AF", SFX_DONH5AF}, + {"DONH5AG", SFX_DONH5AG}, + {"DONH5AH", SFX_DONH5AH}, + {"DONH5AI", SFX_DONH5AI}, + {"DONH5AJ", SFX_DONH5AJ}, + {"DONH5BA", SFX_DONH5BA}, + {"DONH6BA", SFX_DONH6BA}, + {"DONH6CA", SFX_DONH6CA}, + {"DONH6CB", SFX_DONH6CB}, + {"DONH6DA", SFX_DONH6DA}, + {"DONH6DB", SFX_DONH6DB}, + {"DONH6EA", SFX_DONH6EA}, + {"DONH6EB", SFX_DONH6EB}, + {"DONH6EC", SFX_DONH6EC}, + {"DONH6FA", SFX_DONH6FA}, + {"DONH6GA", SFX_DONH6GA}, + {"DONH6GB", SFX_DONH6GB}, + {"DONH6GC", SFX_DONH6GC}, + {"DONH6GD", SFX_DONH6GD}, + {"DONH6GF", SFX_DONH6GF}, + {"DONS1AA", SFX_DONS1AA}, + {"DONS1AB", SFX_DONS1AB}, + {"DONS1AC", SFX_DONS1AC}, + {"DONS1BA", SFX_DONS1BA}, + {"DONS1BB", SFX_DONS1BB}, + {"DONS2AA", SFX_DONS2AA}, + {"DONS2AB", SFX_DONS2AB}, + {"DONS2AC", SFX_DONS2AC}, + {"DONS2AD", SFX_DONS2AD}, + {"DONS2AE", SFX_DONS2AE}, + {"DONS2AF", SFX_DONS2AF}, + {"DONS2BA", SFX_DONS2BA}, + {"DONS2BB", SFX_DONS2BB}, + {"DONS2BC", SFX_DONS2BC}, + {"DONS2BD", SFX_DONS2BD}, + {"DONS2BE", SFX_DONS2BE}, + {"DONS2CA", SFX_DONS2CA}, + {"DONS2CB", SFX_DONS2CB}, + {"DONS2CC", SFX_DONS2CC}, + {"DONS2CD", SFX_DONS2CD}, + {"DONS2CE", SFX_DONS2CE}, + {"DONS2CF", SFX_DONS2CF}, + {"DONS2CG", SFX_DONS2CG}, + {"DONS2CH", SFX_DONS2CH}, + {"DONS2CI", SFX_DONS2CI}, + {"DONS2CJ", SFX_DONS2CJ}, + {"DONS2CK", SFX_DONS2CK}, + {"DONS2CL", SFX_DONS2CL}, + {"DONS2CM", SFX_DONS2CM}, + {"DONS2CN", SFX_DONS2CN}, + {"DONS4AA", SFX_DONS4AA}, + {"DONS4AB", SFX_DONS4AB}, + {"DONS4AC", SFX_DONS4AC}, + {"DONS4AD", SFX_DONS4AD}, + {"DONS4AE", SFX_DONS4AE}, + {"DONS4AF", SFX_DONS4AF}, + {"DONS5AA", SFX_DONS5AA}, + {"DONS5AB", SFX_DONS5AB}, + {"DONS5AC", SFX_DONS5AC}, + {"DONS5AD", SFX_DONS5AD}, + {"DONS5AE", SFX_DONS5AE}, + {"DONS5BA", SFX_DONS5BA}, + {"DONS5BB", SFX_DONS5BB}, + {"DONS5BC", SFX_DONS5BC}, + {"DONS5BD", SFX_DONS5BD}, + {"DONS5BE", SFX_DONS5BE}, + {"DONS5CA", SFX_DONS5CA}, + {"DONS5DA", SFX_DONS5DA}, + {"DONS5EA", SFX_DONS5EA}, + {"DONS5EB", SFX_DONS5EB}, + {"DONS6AA", SFX_DONS6AA}, + {"DONS6AB", SFX_DONS6AB}, + {"DONS6AC", SFX_DONS6AC}, + {"DONS6AD", SFX_DONS6AD}, + {"DONS6AE", SFX_DONS6AE}, + {"DONS6AF", SFX_DONS6AF}, + {"DONS6AG", SFX_DONS6AG}, + {"DONS7AA", SFX_DONS7AA}, + {"DONS7AB", SFX_DONS7AB}, + {"DONS7AC", SFX_DONS7AC}, + {"DONS7AD", SFX_DONS7AD}, + {"DONS7AE", SFX_DONS7AE}, + {"DONS7AF", SFX_DONS7AF}, + {"DONS7AG", SFX_DONS7AG}, + {"HIT1_AA", SFX_HIT1_AA}, + {"HIT1_AB", SFX_HIT1_AB}, + {"HIT1_AC", SFX_HIT1_AC}, + {"HIT1_AD", SFX_HIT1_AD}, + {"HIT1_AE", SFX_HIT1_AE}, + {"HIT1_AF", SFX_HIT1_AF}, + {"HIT1_AG", SFX_HIT1_AG}, + {"HIT2_AA", SFX_HIT2_AA}, + {"HIT2_AB", SFX_HIT2_AB}, + {"HIT2_AC", SFX_HIT2_AC}, + {"HIT2_AD", SFX_HIT2_AD}, + {"HIT2_AE", SFX_HIT2_AE}, + {"HIT2_AF", SFX_HIT2_AF}, + {"HIT2_AG", SFX_HIT2_AG}, + {"HIT2_AH", SFX_HIT2_AH}, + {"HIT3_AA", SFX_HIT3_AA}, + {"HIT3_AB", SFX_HIT3_AB}, + {"HIT3_AC", SFX_HIT3_AC}, + {"HIT3_AD", SFX_HIT3_AD}, + {"HIT3_AE", SFX_HIT3_AE}, + {"HIT3_AF", SFX_HIT3_AF}, + {"HIT3_AG", SFX_HIT3_AG}, + {"HITM_AA", SFX_HITM_AA}, + {"HITM_AB", SFX_HITM_AB}, + {"HITM_AC", SFX_HITM_AC}, + {"HITM_AD", SFX_HITM_AD}, + {"JDT1_BA", SFX_JDT1_BA}, + {"JDT1_BB", SFX_JDT1_BB}, + {"JDT1_CA", SFX_JDT1_CA}, + {"JDT1_CB", SFX_JDT1_CB}, + {"JDT1_DA", SFX_JDT1_DA}, + {"JDT1_DB", SFX_JDT1_DB}, + {"JDT1_DC", SFX_JDT1_DC}, + {"JDT1_DD", SFX_JDT1_DD}, + {"JDT1_DE", SFX_JDT1_DE}, + {"JDT1_DF", SFX_JDT1_DF}, + {"JDT1_DG", SFX_JDT1_DG}, + {"JDT1_DH", SFX_JDT1_DH}, + {"JDT1_DI", SFX_JDT1_DI}, + {"JDT1_DJ", SFX_JDT1_DJ}, + {"JDT1_EA", SFX_JDT1_EA}, + {"JDT1_EB", SFX_JDT1_EB}, + {"JDT1_EC", SFX_JDT1_EC}, + {"JDT1_ED", SFX_JDT1_ED}, + {"JDT1_EE", SFX_JDT1_EE}, + {"JDT1_FA", SFX_JDT1_FA}, + {"JDT1_FB", SFX_JDT1_FB}, + {"JDT1_FC", SFX_JDT1_FC}, + {"JDT1_FD", SFX_JDT1_FD}, + {"JDT1_FE", SFX_JDT1_FE}, + {"JDT1_FF", SFX_JDT1_FF}, + {"JDT1_GA", SFX_JDT1_GA}, + {"JDT1_HA", SFX_JDT1_HA}, + {"JDT1_HB", SFX_JDT1_HB}, + {"JDT1_HC", SFX_JDT1_HC}, + {"JDT1_HD", SFX_JDT1_HD}, + {"JDT1_HE", SFX_JDT1_HE}, + {"JDT1_HF", SFX_JDT1_HF}, + {"JDT1_IA", SFX_JDT1_IA}, + {"JDT1_JA", SFX_JDT1_JA}, + {"JDT1_JB", SFX_JDT1_JB}, + {"JDT1_KA", SFX_JDT1_KA}, + {"JDT1_KB", SFX_JDT1_KB}, + {"JDT1_KC", SFX_JDT1_KC}, + {"JDT1_KD", SFX_JDT1_KD}, + {"JDT1_KE", SFX_JDT1_KE}, + {"JDT1_KF", SFX_JDT1_KF}, + {"JDT1_LA", SFX_JDT1_LA}, + {"JDT1_LB", SFX_JDT1_LB}, + {"JDT2_AA", SFX_JDT2_AA}, + {"JDT2_AB", SFX_JDT2_AB}, + {"JDT2_AC", SFX_JDT2_AC}, + {"JDT2_AD", SFX_JDT2_AD}, + {"JDT2_AE", SFX_JDT2_AE}, + {"JDT2_AF", SFX_JDT2_AF}, + {"JDT2_AG", SFX_JDT2_AG}, + {"JDT2_AH", SFX_JDT2_AH}, + {"JDT2_BA", SFX_JDT2_BA}, + {"JDT2_BB", SFX_JDT2_BB}, + {"JDT2_BC", SFX_JDT2_BC}, + {"JDT2_CA", SFX_JDT2_CA}, + {"JDT2_CB", SFX_JDT2_CB}, + {"JDT2_DA", SFX_JDT2_DA}, + {"JDT2_DC", SFX_JDT2_DC}, + {"JDT2_DD", SFX_JDT2_DD}, + {"JDT2_DE", SFX_JDT2_DE}, + {"JDT2_DF", SFX_JDT2_DF}, + {"JDT3_AA", SFX_JDT3_AA}, + {"JDT3_AB", SFX_JDT3_AB}, + {"JDT3_AC", SFX_JDT3_AC}, + {"JDT3_AD", SFX_JDT3_AD}, + {"JDT3_AE", SFX_JDT3_AE}, + {"JDT3_AG", SFX_JDT3_AG}, + {"JDT3_AH", SFX_JDT3_AH}, + {"JDT3_BA", SFX_JDT3_BA}, + {"JDT3_BB", SFX_JDT3_BB}, + {"JDT3_BC", SFX_JDT3_BC}, + {"JDT3_BD", SFX_JDT3_BD}, + {"JDT3_BE", SFX_JDT3_BE}, + {"JDT3_BF", SFX_JDT3_BF}, + {"JDT4_AA", SFX_JDT4_AA}, + {"JDT4_AB", SFX_JDT4_AB}, + {"JDT4_AC", SFX_JDT4_AC}, + {"JDT4_AD", SFX_JDT4_AD}, + {"JDT4_AE", SFX_JDT4_AE}, + {"JDT4_AF", SFX_JDT4_AF}, + {"JDT5_BA", SFX_JDT5_BA}, + {"JDT5_CA", SFX_JDT5_CA}, + {"JDT5_CC", SFX_JDT5_CC}, + {"JDT5_CD", SFX_JDT5_CD}, + {"JDT5_CE", SFX_JDT5_CE}, + {"JDT5_CG", SFX_JDT5_CG}, + {"JDT5_CI", SFX_JDT5_CI}, + {"JDT5_DA", SFX_JDT5_DA}, + {"JDT5_EA", SFX_JDT5_EA}, + {"JDT5_EB", SFX_JDT5_EB}, + {"JDT5_EC", SFX_JDT5_EC}, + {"JDT5_ED", SFX_JDT5_ED}, + {"JDT5_EE", SFX_JDT5_EE}, + {"JDT6_AA", SFX_JDT6_AA}, + {"JDT6_AB", SFX_JDT6_AB}, + {"JDT6_AC", SFX_JDT6_AC}, + {"JDT6_AE", SFX_JDT6_AE}, + {"JDT6_AF", SFX_JDT6_AF}, + {"JDT6_AG", SFX_JDT6_AG}, + {"JDT6_AH", SFX_JDT6_AH}, + {"JDT6_BA", SFX_JDT6_BA}, + {"JDT6_BB", SFX_JDT6_BB}, + {"JDT6_BC", SFX_JDT6_BC}, + {"JDT6_BD", SFX_JDT6_BD}, + {"JDT6_BE", SFX_JDT6_BE}, + {"JDT6_BF", SFX_JDT6_BF}, + {"JDT6_BG", SFX_JDT6_BG}, + {"JDT7_AA", SFX_JDT7_AA}, + {"JDT7_AB", SFX_JDT7_AB}, + {"JDT7_AC", SFX_JDT7_AC}, + {"JDT7_AD", SFX_JDT7_AD}, + {"JDT7_AE", SFX_JDT7_AE}, + {"JDT7_AF", SFX_JDT7_AF}, + {"JDT7_AG", SFX_JDT7_AG}, + {"JDT7_BA", SFX_JDT7_BA}, + {"JDT7_BB", SFX_JDT7_BB}, + {"JDT7_BC", SFX_JDT7_BC}, + {"JDT7_CA", SFX_JDT7_CA}, + {"JDT7_CB", SFX_JDT7_CB}, + {"JDT7_CC", SFX_JDT7_CC}, + {"JDT8_AA", SFX_JDT8_AA}, + {"JDT8_AB", SFX_JDT8_AB}, + {"JDT8_AC", SFX_JDT8_AC}, + {"JDT8_AD", SFX_JDT8_AD}, + {"JDT8_AE", SFX_JDT8_AE}, + {"JDT8_AF", SFX_JDT8_AF}, + {"JDT8_AG", SFX_JDT8_AG}, + {"JDT8_AH", SFX_JDT8_AH}, + {"JDT8_CA", SFX_JDT8_CA}, + {"JDT8_CB", SFX_JDT8_CB}, + {"JDT8_DA", SFX_JDT8_DA}, + {"JDT8_DB", SFX_JDT8_DB}, + {"JDT8_DC", SFX_JDT8_DC}, + {"JDT8_DD", SFX_JDT8_DD}, + {"JDT8_DE", SFX_JDT8_DE}, + {"JDT8_DF", SFX_JDT8_DF}, + {"JDT8_DG", SFX_JDT8_DG}, + {"JDT8_EA", SFX_JDT8_EA}, + {"JDT8_EB", SFX_JDT8_EB}, + {"JDT8_EC", SFX_JDT8_EC}, + {"JDT8_ED", SFX_JDT8_ED}, + {"JDT8_EE", SFX_JDT8_EE}, + {"JDT8_FA", SFX_JDT8_FA}, + {"JDT8_FB", SFX_JDT8_FB}, + {"JDT8_FC", SFX_JDT8_FC}, + {"JDX_AA", SFX_JDX_AA}, + {"JDX_AB", SFX_JDX_AB}, + {"JDX_AC", SFX_JDX_AC}, + {"M8B1AA", SFX_M8B1AA}, + {"M8B1AB", SFX_M8B1AB}, + {"MAC1_AA", SFX_MAC1_AA}, + {"MAC1_AB", SFX_MAC1_AB}, + {"MAC1_AC", SFX_MAC1_AC}, + {"MAC1_AD", SFX_MAC1_AD}, + {"MAC1_AE", SFX_MAC1_AE}, + {"MAC1_AF", SFX_MAC1_AF}, + {"MAC1_AG", SFX_MAC1_AG}, + {"MAC1_AH", SFX_MAC1_AH}, + {"MAC1_AI", SFX_MAC1_AI}, + {"MAC1_AJ", SFX_MAC1_AJ}, + {"MAC1_AK", SFX_MAC1_AK}, + {"MAC1_AL", SFX_MAC1_AL}, + {"MAC1_AM", SFX_MAC1_AM}, + {"MAC1_AN", SFX_MAC1_AN}, + {"MAC1_AO", SFX_MAC1_AO}, + {"MAC1_BA", SFX_MAC1_BA}, + {"MAC1_BB", SFX_MAC1_BB}, + {"MAC1_BC", SFX_MAC1_BC}, + {"MAC1_BD", SFX_MAC1_BD}, + {"MAC1_BE", SFX_MAC1_BE}, + {"MAC1_BF", SFX_MAC1_BF}, + {"MAC1_BG", SFX_MAC1_BG}, + {"MAC1_CA", SFX_MAC1_CA}, + {"MAC1_CB", SFX_MAC1_CB}, + {"MAC1_DA", SFX_MAC1_DA}, + {"MAC1_EA", SFX_MAC1_EA}, + {"MAC1_FA", SFX_MAC1_FA}, + {"MAC1_FB", SFX_MAC1_FB}, + {"MAC1_GA", SFX_MAC1_GA}, + {"MAC1_GB", SFX_MAC1_GB}, + {"MAC1_HA", SFX_MAC1_HA}, + {"MAC1_IA", SFX_MAC1_IA}, + {"MAC1_IB", SFX_MAC1_IB}, + {"MAC1_JA", SFX_MAC1_JA}, + {"MAC1_JB", SFX_MAC1_JB}, + {"MAC2_AA", SFX_MAC2_AA}, + {"MAC2_AB", SFX_MAC2_AB}, + {"MAC2_AC", SFX_MAC2_AC}, + {"MAC2_AD", SFX_MAC2_AD}, + {"MAC2_AE", SFX_MAC2_AE}, + {"MAC2_AF", SFX_MAC2_AF}, + {"MAC2_AG", SFX_MAC2_AG}, + {"MAC2_AH", SFX_MAC2_AH}, + {"MAC2_AI", SFX_MAC2_AI}, + {"MAC2_BA", SFX_MAC2_BA}, + {"MAC2_BB", SFX_MAC2_BB}, + {"MAC2_BC", SFX_MAC2_BC}, + {"MAC3_AA", SFX_MAC3_AA}, + {"MAC3_AB", SFX_MAC3_AB}, + {"MAC3_AC", SFX_MAC3_AC}, + {"MAC3_AD", SFX_MAC3_AD}, + {"MAC3_AE", SFX_MAC3_AE}, + {"MAC3_AF", SFX_MAC3_AF}, + {"MAC3_AG", SFX_MAC3_AG}, + {"MAC3_AH", SFX_MAC3_AH}, + {"MAC3_AI", SFX_MAC3_AI}, + {"MAC3_AJ", SFX_MAC3_AJ}, + {"MAC3_AK", SFX_MAC3_AK}, + {"MAC3_AL", SFX_MAC3_AL}, + {"MAC3_AM", SFX_MAC3_AM}, + {"MAC3_AN", SFX_MAC3_AN}, + {"MAC3_BA", SFX_MAC3_BA}, + {"MAC4_AA", SFX_MAC4_AA}, + {"MAC4_AB", SFX_MAC4_AB}, + {"MAC4_AC", SFX_MAC4_AC}, + {"MAC4_AD", SFX_MAC4_AD}, + {"MAC4_AE", SFX_MAC4_AE}, + {"MAC4_AF", SFX_MAC4_AF}, + {"MAC4_AG", SFX_MAC4_AG}, + {"MAC4_AH", SFX_MAC4_AH}, + {"MAC4_AI", SFX_MAC4_AI}, + {"MAC4_AJ", SFX_MAC4_AJ}, + {"MAC4_AK", SFX_MAC4_AK}, + {"MAC4_AL", SFX_MAC4_AL}, + {"MAC4_BA", SFX_MAC4_BA}, + {"MAC4_BB", SFX_MAC4_BB}, + {"MAC4_BC", SFX_MAC4_BC}, + {"MAC4_BD", SFX_MAC4_BD}, + {"MAC4_BE", SFX_MAC4_BE}, + {"MAC4_BF", SFX_MAC4_BF}, + {"MAC4_BG", SFX_MAC4_BG}, + {"MAC4_BI", SFX_MAC4_BI}, + {"MAC4_BJ", SFX_MAC4_BJ}, + {"MAC4_BL", SFX_MAC4_BL}, + {"MAC4_BM", SFX_MAC4_BM}, + {"MAC4_BO", SFX_MAC4_BO}, + {"MAC4_BP", SFX_MAC4_BP}, + {"MAC4_BQ", SFX_MAC4_BQ}, + {"MAC4_BR", SFX_MAC4_BR}, + {"MAC4_BS", SFX_MAC4_BS}, + {"MAC4_BT", SFX_MAC4_BT}, + {"MAC4_BU", SFX_MAC4_BU}, + {"MAC4_CA", SFX_MAC4_CA}, + {"MAC4_CB", SFX_MAC4_CB}, + {"MAC4_CC", SFX_MAC4_CC}, + {"MAC4_CD", SFX_MAC4_CD}, + {"MAC4_CE", SFX_MAC4_CE}, + {"MAC4_CF", SFX_MAC4_CF}, + {"MAC4_CG", SFX_MAC4_CG}, + {"MAC4_CH", SFX_MAC4_CH}, + {"MAC4_CI", SFX_MAC4_CI}, + {"MAC4_CK", SFX_MAC4_CK}, + {"MAC4_CM", SFX_MAC4_CM}, + {"MAC5_AA", SFX_MAC5_AA}, + {"MAC5_AB", SFX_MAC5_AB}, + {"MAC5_AC", SFX_MAC5_AC}, + {"MAC5_AD", SFX_MAC5_AD}, + {"MAC5_AE", SFX_MAC5_AE}, + {"MAC5_AF", SFX_MAC5_AF}, + {"MAC5_AG", SFX_MAC5_AG}, + {"MAC5_AH", SFX_MAC5_AH}, + {"MAC5_AI", SFX_MAC5_AI}, + {"MAC5_AJ", SFX_MAC5_AJ}, + {"MAC5_AK", SFX_MAC5_AK}, + {"MAC5_AL", SFX_MAC5_AL}, + {"MAC5_AM", SFX_MAC5_AM}, + {"MAC5_AN", SFX_MAC5_AN}, + {"MAR1_AA", SFX_MAR1_AA}, + {"MAR1_AB", SFX_MAR1_AB}, + {"MAR1_AC", SFX_MAR1_AC}, + {"MAR1_AD", SFX_MAR1_AD}, + {"MAR1_AE", SFX_MAR1_AE}, + {"MAR1_BA", SFX_MAR1_BA}, + {"MAR1_CA", SFX_MAR1_CA}, + {"MAR1_DA", SFX_MAR1_DA}, + {"MAR1_DB", SFX_MAR1_DB}, + {"MAR1_EA", SFX_MAR1_EA}, + {"MAR1_FA", SFX_MAR1_FA}, + {"MAR1_FB", SFX_MAR1_FB}, + {"MAR1_FC", SFX_MAR1_FC}, + {"MAR1_FD", SFX_MAR1_FD}, + {"MAR1_GA", SFX_MAR1_GA}, + {"MAR1_GB", SFX_MAR1_GB}, + {"MAR1_GC", SFX_MAR1_GC}, + {"MAR1_HA", SFX_MAR1_HA}, + {"MAR1_HB", SFX_MAR1_HB}, + {"MAR1_HC", SFX_MAR1_HC}, + {"MAR1_IA", SFX_MAR1_IA}, + {"MAR1_IB", SFX_MAR1_IB}, + {"MAR1_IC", SFX_MAR1_IC}, + {"MAR2_AA", SFX_MAR2_AA}, + {"MAR2_AB", SFX_MAR2_AB}, + {"MAR2_AC", SFX_MAR2_AC}, + {"MAR2_AD", SFX_MAR2_AD}, + {"MAR2_AE", SFX_MAR2_AE}, + {"MAR2_AF", SFX_MAR2_AF}, + {"MAR2_AG", SFX_MAR2_AG}, + {"MAR2_AH", SFX_MAR2_AH}, + {"MAR2_BA", SFX_MAR2_BA}, + {"MAR2_BB", SFX_MAR2_BB}, + {"MAR2_BC", SFX_MAR2_BC}, + {"MAR2_CA", SFX_MAR2_CA}, + {"MAR2_CB", SFX_MAR2_CB}, + {"MAR2_CC", SFX_MAR2_CC}, + {"MAR2_CD", SFX_MAR2_CD}, + {"MAR2_CE", SFX_MAR2_CE}, + {"MAR2_DA", SFX_MAR2_DA}, + {"MAR2_EA", SFX_MAR2_EA}, + {"MAR2_EB", SFX_MAR2_EB}, + {"MAR2_EC", SFX_MAR2_EC}, + {"MAR2_FA", SFX_MAR2_FA}, + {"MAR2_FB", SFX_MAR2_FB}, + {"MAR2_GA", SFX_MAR2_GA}, + {"MAR2_GB", SFX_MAR2_GB}, + {"MAR2_GC", SFX_MAR2_GC}, + {"MAR2_GE", SFX_MAR2_GE}, + {"MAR2_GG", SFX_MAR2_GG}, + {"MAR2_GH", SFX_MAR2_GH}, + {"MAR2_HA", SFX_MAR2_HA}, + {"MAR2_HB", SFX_MAR2_HB}, + {"MAR2_HC", SFX_MAR2_HC}, + {"MAR3_AA", SFX_MAR3_AA}, + {"MAR3_AB", SFX_MAR3_AB}, + {"MAR3_AC", SFX_MAR3_AC}, + {"MAR3_AD", SFX_MAR3_AD}, + {"MAR3_BA", SFX_MAR3_BA}, + {"MAR3_BB", SFX_MAR3_BB}, + {"MAR3_BC", SFX_MAR3_BC}, + {"MAR3_BD", SFX_MAR3_BD}, + {"MAR3_BE", SFX_MAR3_BE}, + {"MAR3_BF", SFX_MAR3_BF}, + {"MAR4_BA", SFX_MAR4_BA}, + {"MAR4_BC", SFX_MAR4_BC}, + {"MAR4_BD", SFX_MAR4_BD}, + {"MAR4_BF", SFX_MAR4_BF}, + {"MAR5_AA", SFX_MAR5_AA}, + {"MAR5_AB", SFX_MAR5_AB}, + {"MAR5_AC", SFX_MAR5_AC}, + {"MAR5_AD", SFX_MAR5_AD}, + {"MAR5_AE", SFX_MAR5_AE}, + {"MAR5_BA", SFX_MAR5_BA}, + {"MAR5_BB", SFX_MAR5_BB}, + {"MAR5_CA", SFX_MAR5_CA}, + {"MAR5_CB", SFX_MAR5_CB}, + {"MAR5_CC", SFX_MAR5_CC}, + {"MAR5_CD", SFX_MAR5_CD}, + {"MAR5_CE", SFX_MAR5_CE}, + {"MAR5_EA", SFX_MAR5_EA}, + {"MAR5_EB", SFX_MAR5_EB}, + {"MAR5_EC", SFX_MAR5_EC}, + {"MAR5_FA", SFX_MAR5_FA}, + {"MAR5_FB", SFX_MAR5_FB}, + {"MAR5_FC", SFX_MAR5_FC}, + {"MAR5_FD", SFX_MAR5_FD}, + {"MAR5_FE", SFX_MAR5_FE}, + {"MAR5_FF", SFX_MAR5_FF}, + {"MARX_AA", SFX_MARX_AA}, + {"MARX_AB", SFX_MARX_AB}, + {"MARX_AC", SFX_MARX_AC}, + {"MDON1AA", SFX_MDON1AA}, + {"MDON1AB", SFX_MDON1AB}, + {"MDON1AC", SFX_MDON1AC}, + {"MDON2AA", SFX_MDON2AA}, + {"MDON2AB", SFX_MDON2AB}, + {"MDON2AC", SFX_MDON2AC}, + {"MDON2AD", SFX_MDON2AD}, + {"MDON2AE", SFX_MDON2AE}, + {"MDON2AF", SFX_MDON2AF}, + {"MDON2AG", SFX_MDON2AG}, + {"MDON3AA", SFX_MDON3AA}, + {"MDON3AB", SFX_MDON3AB}, + {"MDON3AC", SFX_MDON3AC}, + {"MDON3AD", SFX_MDON3AD}, + {"MDON3AE", SFX_MDON3AE}, + {"MDON3AF", SFX_MDON3AF}, + {"MDON3AG", SFX_MDON3AG}, + {"MJDT1AA", SFX_MJDT1AA}, + {"MJDT1AB", SFX_MJDT1AB}, + {"MJDT1AC", SFX_MJDT1AC}, + {"MJDT1AE", SFX_MJDT1AE}, + {"MMA1AA", SFX_MMA1AA}, + {"MMA1AB", SFX_MMA1AB}, + {"MMA1AC", SFX_MMA1AC}, + {"MMA1AD", SFX_MMA1AD}, + {"MMA1AE", SFX_MMA1AE}, + {"MMA2AA", SFX_MMA2AA}, + {"MMA2AB", SFX_MMA2AB}, + {"MMA2AC", SFX_MMA2AC}, + {"MMA2AD", SFX_MMA2AD}, + {"MMA2AE", SFX_MMA2AE}, + {"MMA2AF", SFX_MMA2AF}, + {"MMA2AG", SFX_MMA2AG}, + {"MMA2AH", SFX_MMA2AH}, + {"MMA2AI", SFX_MMA2AI}, + {"MMA2AJ", SFX_MMA2AJ}, + {"MMAR1AA", SFX_MMAR1AA}, + {"MMAR1AB", SFX_MMAR1AB}, + {"MMAR1AC", SFX_MMAR1AC}, + {"MMAR1AD", SFX_MMAR1AD}, + {"MMCA1AA", SFX_MMCA1AA}, + {"MMCA1AB", SFX_MMCA1AB}, + {"MMCA1AC", SFX_MMCA1AC}, + {"MMCA1AD", SFX_MMCA1AD}, + {"MMCA2AA", SFX_MMCA2AA}, + {"MMCA2AB", SFX_MMCA2AB}, + {"MMCA2AC", SFX_MMCA2AC}, + {"MMCA2AD", SFX_MMCA2AD}, + {"MMCA2AE", SFX_MMCA2AE}, + {"MMCA2AF", SFX_MMCA2AF}, + {"MSA10AA", SFX_MSA10AA}, + {"MSA10AB", SFX_MSA10AB}, + {"MSA10AC", SFX_MSA10AC}, + {"MSA10AD", SFX_MSA10AD}, + {"MSA11AA", SFX_MSA11AA}, + {"MSA11AB", SFX_MSA11AB}, + {"MSA11AC", SFX_MSA11AC}, + {"MSA11AD", SFX_MSA11AD}, + {"MSA12AA", SFX_MSA12AA}, + {"MSA12AC", SFX_MSA12AC}, + {"MSA12AD", SFX_MSA12AD}, + {"MSA13AA", SFX_MSA13AA}, + {"MSA13AB", SFX_MSA13AB}, + {"MSA13AC", SFX_MSA13AC}, + {"MSA13AD", SFX_MSA13AD}, + {"MSA13AE", SFX_MSA13AE}, + {"MSA13AF", SFX_MSA13AF}, + {"MSA13AG", SFX_MSA13AG}, + {"MSA13AH", SFX_MSA13AH}, + {"MSA14AA", SFX_MSA14AA}, + {"MSA14AB", SFX_MSA14AB}, + {"MSA14AC", SFX_MSA14AC}, + {"MSA14AD", SFX_MSA14AD}, + {"MSAL5AA", SFX_MSAL5AA}, + {"MSAL5AB", SFX_MSAL5AB}, + {"MSAL6AA", SFX_MSAL6AA}, + {"MSAL6AB", SFX_MSAL6AB}, + {"MSAL6AC", SFX_MSAL6AC}, + {"MSAL6AD", SFX_MSAL6AD}, + {"MSAL7AA", SFX_MSAL7AA}, + {"MSAL7AB", SFX_MSAL7AB}, + {"MSAL7AC", SFX_MSAL7AC}, + {"MSAL7AD", SFX_MSAL7AD}, + {"MSAL7AE", SFX_MSAL7AE}, + {"MSAL7AF", SFX_MSAL7AF}, + {"MSAL7AG", SFX_MSAL7AG}, + {"MSAL8AA", SFX_MSAL8AA}, + {"MSAL8AB", SFX_MSAL8AB}, + {"MSAL8AC", SFX_MSAL8AC}, + {"MSAL8AD", SFX_MSAL8AD}, + {"MSAL8AF", SFX_MSAL8AF}, + {"MSAL8AG", SFX_MSAL8AG}, + {"MSAL9AA", SFX_MSAL9AA}, + {"MSAL9AB", SFX_MSAL9AB}, + {"MSAL9AC", SFX_MSAL9AC}, + {"MSAL9AD", SFX_MSAL9AD}, + {"MSAL9AE", SFX_MSAL9AE}, + {"MSAL9AF", SFX_MSAL9AF}, + {"MTOS1AA", SFX_MTOS1AA}, + {"MTOS1AB", SFX_MTOS1AB}, + {"MTOS1AC", SFX_MTOS1AC}, + {"MTOS1AD", SFX_MTOS1AD}, + {"MTOS1AE", SFX_MTOS1AE}, + {"MTOS1AF", SFX_MTOS1AF}, + {"MTOS1AG", SFX_MTOS1AG}, + {"MTOS2AA", SFX_MTOS2AA}, + {"MTOS2AB", SFX_MTOS2AB}, + {"MTOS2AC", SFX_MTOS2AC}, + {"MTOS2AD", SFX_MTOS2AD}, + {"MTOS2AE", SFX_MTOS2AE}, + {"MTOS2AF", SFX_MTOS2AF}, + {"MTOS2AG", SFX_MTOS2AG}, + {"MVIC1AA", SFX_MVIC1AA}, + {"MVIC1AB", SFX_MVIC1AB}, + {"MVIC1AC", SFX_MVIC1AC}, + {"MVIC1AD", SFX_MVIC1AD}, + {"MVIC1AE", SFX_MVIC1AE}, + {"MVIC1AF", SFX_MVIC1AF}, + {"MVIC1AG", SFX_MVIC1AG}, + {"MVIC1AH", SFX_MVIC1AH}, + {"MVIC1AI", SFX_MVIC1AI}, + {"MVIC1AJ", SFX_MVIC1AJ}, + {"MVIC1AK", SFX_MVIC1AK}, + {"NEDS1AA", SFX_NEDS1AA}, + {"NEDS1AB", SFX_NEDS1AB}, + {"NEDS1AC", SFX_NEDS1AC}, + {"NEDS1AD", SFX_NEDS1AD}, + {"NEDS1AE", SFX_NEDS1AE}, + {"NEDS1AF", SFX_NEDS1AF}, + {"NEDS1AG", SFX_NEDS1AG}, + {"NEDS1BC", SFX_NEDS1BC}, + {"NEDS1BE", SFX_NEDS1BE}, + {"NEDS2AA", SFX_NEDS2AA}, + {"NEDS2AB", SFX_NEDS2AB}, + {"NEDS2AC", SFX_NEDS2AC}, + {"NEDS2AD", SFX_NEDS2AD}, + {"NEDS2AE", SFX_NEDS2AE}, + {"NEDS2AF", SFX_NEDS2AF}, + {"NEDS2BA", SFX_NEDS2BA}, + {"NEDS3AA", SFX_NEDS3AA}, + {"NEDS3AB", SFX_NEDS3AB}, + {"NEDS3AC", SFX_NEDS3AC}, + {"NEDS3AD", SFX_NEDS3AD}, + {"NEDS4AA", SFX_NEDS4AA}, + {"NEDS4AB", SFX_NEDS4AB}, + {"NEDS4AC", SFX_NEDS4AC}, + {"NEDS4AD", SFX_NEDS4AD}, + {"NEDS4AE", SFX_NEDS4AE}, + {"NEDS4BA", SFX_NEDS4BA}, + {"NEDS4BB", SFX_NEDS4BB}, + {"NEDS4BC", SFX_NEDS4BC}, + {"NEDS4BD", SFX_NEDS4BD}, + {"NEDS4BE", SFX_NEDS4BE}, + {"NEDS4BF", SFX_NEDS4BF}, + {"RAC1_AA", SFX_RAC1_AA}, + {"RAC1_AB", SFX_RAC1_AB}, + {"RAC1_AC", SFX_RAC1_AC}, + {"RAC1_AD", SFX_RAC1_AD}, + {"RAC1_AE", SFX_RAC1_AE}, + {"RAC1_AF", SFX_RAC1_AF}, + {"RAC1_AG", SFX_RAC1_AG}, + {"RAC2_AA", SFX_RAC2_AA}, + {"RAC2_AB", SFX_RAC2_AB}, + {"RAC2_AC", SFX_RAC2_AC}, + {"RAC2_AD", SFX_RAC2_AD}, + {"RAC2_AE", SFX_RAC2_AE}, + {"RAC2_AF", SFX_RAC2_AF}, + {"RAC3_AB", SFX_RAC3_AB}, + {"RAC3_AC", SFX_RAC3_AC}, + {"RAC3_AD", SFX_RAC3_AD}, + {"RAC3_AE", SFX_RAC3_AE}, + {"RAC3_AF", SFX_RAC3_AF}, + {"RAC3_AG", SFX_RAC3_AG}, + {"RAYS1AA", SFX_RAYS1AA}, + {"RAYS1AB", SFX_RAYS1AB}, + {"RAYS1AC", SFX_RAYS1AC}, + {"RAYS1BA", SFX_RAYS1BA}, + {"RAYS1BB", SFX_RAYS1BB}, + {"RAYS1CA", SFX_RAYS1CA}, + {"RAYS1CB", SFX_RAYS1CB}, + {"RAYS1CC", SFX_RAYS1CC}, + {"RAYS1CD", SFX_RAYS1CD}, + {"RAYS1CE", SFX_RAYS1CE}, + {"RAYS1CF", SFX_RAYS1CF}, + {"RAYS1DA", SFX_RAYS1DA}, + {"RAYS1DB", SFX_RAYS1DB}, + {"RAYS1DC", SFX_RAYS1DC}, + {"RAYS2AA", SFX_RAYS2AA}, + {"RAYS2AB", SFX_RAYS2AB}, + {"RAYS2AD", SFX_RAYS2AD}, + {"RAYS2AE", SFX_RAYS2AE}, + {"RAYS2AF", SFX_RAYS2AF}, + {"RAYS2AG", SFX_RAYS2AG}, + {"RAYS2AH", SFX_RAYS2AH}, + {"RAYS2AI", SFX_RAYS2AI}, + {"RAYS2CA", SFX_RAYS2CA}, + {"RAYS2DA", SFX_RAYS2DA}, + {"RAYS4AA", SFX_RAYS4AA}, + {"RAYS4AB", SFX_RAYS4AB}, + {"RAYS4AC", SFX_RAYS4AC}, + {"RAYS4AD", SFX_RAYS4AD}, + {"RAYS4AE", SFX_RAYS4AE}, + {"RAYS4AF", SFX_RAYS4AF}, + {"RAYS5AA", SFX_RAYS5AA}, + {"RAYS5AB", SFX_RAYS5AB}, + {"RAYS5AC", SFX_RAYS5AC}, + {"RAYS5AD", SFX_RAYS5AD}, + {"RAYS5AE", SFX_RAYS5AE}, + {"RAYS5AF", SFX_RAYS5AF}, + {"RAYS5AG", SFX_RAYS5AG}, + {"RAYS5AH", SFX_RAYS5AH}, + {"RAYS5AI", SFX_RAYS5AI}, + {"SAL1_AA", SFX_SAL1_AA}, + {"SAL1_AB", SFX_SAL1_AB}, + {"SAL1_AC", SFX_SAL1_AC}, + {"SAL1_AE", SFX_SAL1_AE}, + {"SAL2_AA", SFX_SAL2_AA}, + {"SAL2_AB", SFX_SAL2_AB}, + {"SAL2_AC", SFX_SAL2_AC}, + {"SAL2_AD", SFX_SAL2_AD}, + {"SAL2_AF", SFX_SAL2_AF}, + {"SAL2_AG", SFX_SAL2_AG}, + {"SAL2_CK", SFX_SAL2_CK}, + {"SAL2_DA", SFX_SAL2_DA}, + {"SAL2_DB", SFX_SAL2_DB}, + {"SAL2_DC", SFX_SAL2_DC}, + {"SAL2_EA", SFX_SAL2_EA}, + {"SAL3_AA", SFX_SAL3_AA}, + {"SAL3_AD", SFX_SAL3_AD}, + {"SAL3_AE", SFX_SAL3_AE}, + {"SAL3_AF", SFX_SAL3_AF}, + {"SAL3_AG", SFX_SAL3_AG}, + {"SAL3_AI", SFX_SAL3_AI}, + {"SAL3_BB", SFX_SAL3_BB}, + {"SAL3_CB", SFX_SAL3_CB}, + {"SALH4AB", SFX_SALH4AB}, + {"SALH4AC", SFX_SALH4AC}, + {"SALH4AE", SFX_SALH4AE}, + {"SALH4AF", SFX_SALH4AF}, + {"SALH4AH", SFX_SALH4AH}, + {"SALH4AI", SFX_SALH4AI}, + {"SALH4AJ", SFX_SALH4AJ}, + {"SAL4_AA", SFX_SAL4_AA}, + {"SAL4_AB", SFX_SAL4_AB}, + {"SAL4_AC", SFX_SAL4_AC}, + {"SAL4_AD", SFX_SAL4_AD}, + {"SAL4_AE", SFX_SAL4_AE}, + {"SAL4_AF", SFX_SAL4_AF}, + {"SAL4_AH", SFX_SAL4_AH}, + {"SAL4_AI", SFX_SAL4_AI}, + {"SAL4_BA", SFX_SAL4_BA}, + {"SAL4_CA", SFX_SAL4_CA}, + {"SAL4_CB", SFX_SAL4_CB}, + {"SAL4_CC", SFX_SAL4_CC}, + {"SAL4_CD", SFX_SAL4_CD}, + {"SAL4_CE", SFX_SAL4_CE}, + {"SAL4_CF", SFX_SAL4_CF}, + {"SAL4_CG", SFX_SAL4_CG}, + {"SAL4_CH", SFX_SAL4_CH}, + {"SAL4_CI", SFX_SAL4_CI}, + {"SAL4_CJ", SFX_SAL4_CJ}, + {"SAL4_CK", SFX_SAL4_CK}, + {"SAL4_CL", SFX_SAL4_CL}, + {"SAL4_CM", SFX_SAL4_CM}, + {"SAL4_CN", SFX_SAL4_CN}, + {"SAL4_CO", SFX_SAL4_CO}, + {"SAL4_CP", SFX_SAL4_CP}, + {"SAL4_CQ", SFX_SAL4_CQ}, + {"SAL4_DA", SFX_SAL4_DA}, + {"SAL5_AB", SFX_SAL5_AB}, + {"SAL5_AE", SFX_SAL5_AE}, + {"SAL5_AH", SFX_SAL5_AH}, + {"SAL5_AI", SFX_SAL5_AI}, + {"SAL5_AJ", SFX_SAL5_AJ}, + {"SAL6_AA", SFX_SAL6_AA}, + {"SAL6_AB", SFX_SAL6_AB}, + {"SAL6_AC", SFX_SAL6_AC}, + {"SAL6_AE", SFX_SAL6_AE}, + {"SAL6_AF", SFX_SAL6_AF}, + {"SAL6_AG", SFX_SAL6_AG}, + {"SAL6_AH", SFX_SAL6_AH}, + {"SAL6_AI", SFX_SAL6_AI}, + {"SAL6_AJ", SFX_SAL6_AJ}, + {"SAL6_BA", SFX_SAL6_BA}, + {"SAL6_BB", SFX_SAL6_BB}, + {"SAL6_BC", SFX_SAL6_BC}, + {"SAL6_BD", SFX_SAL6_BD}, + {"SAL6_BE", SFX_SAL6_BE}, + {"SAL6_BF", SFX_SAL6_BF}, + {"SAL6_BH", SFX_SAL6_BH}, + {"SAL6_BJ", SFX_SAL6_BJ}, + {"SAL6_BK", SFX_SAL6_BK}, + {"SAL7_AA", SFX_SAL7_AA}, + {"SAL7_AB", SFX_SAL7_AB}, + {"SAL7_AC", SFX_SAL7_AC}, + {"SAL7_AD", SFX_SAL7_AD}, + {"SAL7_AE", SFX_SAL7_AE}, + {"SAL7_AF", SFX_SAL7_AF}, + {"SAL7_AG", SFX_SAL7_AG}, + {"SAL7_AI", SFX_SAL7_AI}, + {"SAL7_AJ", SFX_SAL7_AJ}, + {"SAL7_AK", SFX_SAL7_AK}, + {"SAL7_BA", SFX_SAL7_BA}, + {"SAL7_BB", SFX_SAL7_BB}, + {"SAL7_BC", SFX_SAL7_BC}, + {"SAL7_BD", SFX_SAL7_BD}, + {"SAL7_BE", SFX_SAL7_BE}, + {"SAL7_BF", SFX_SAL7_BF}, + {"SAL7_BG", SFX_SAL7_BG}, + {"SAL7_BH", SFX_SAL7_BH}, + {"SAL7_CA", SFX_SAL7_CA}, + {"SAL7_CB", SFX_SAL7_CB}, + {"SAL7_CC", SFX_SAL7_CC}, + {"SAL8_AA", SFX_SAL8_AA}, + {"SAL8_AB", SFX_SAL8_AB}, + {"SAL8_AC", SFX_SAL8_AC}, + {"SAL8_BA", SFX_SAL8_BA}, + {"SAL8_BC", SFX_SAL8_BC}, + {"SAL8_BD", SFX_SAL8_BD}, + {"SAL8_BE", SFX_SAL8_BE}, + {"SAL8_BF", SFX_SAL8_BF}, + {"SAL8_CA", SFX_SAL8_CA}, + {"SAL8_CC", SFX_SAL8_CC}, + {"SAL8_DA", SFX_SAL8_DA}, + {"SAL8_DB", SFX_SAL8_DB}, + {"SAL8_DC", SFX_SAL8_DC}, + {"SAL8_EA", SFX_SAL8_EA}, + {"SAL8_EC", SFX_SAL8_EC}, + {"SAL8_ED", SFX_SAL8_ED}, + {"SAL8_EE", SFX_SAL8_EE}, + {"SAL8_FA", SFX_SAL8_FA}, + {"SAL8_GA", SFX_SAL8_GA}, + {"SAL8_GB", SFX_SAL8_GB}, + {"SALH1GB", SFX_SALH1GB}, + {"SALH1HB", SFX_SALH1HB}, + {"SALH2AA", SFX_SALH2AA}, + {"SALH2AB", SFX_SALH2AB}, + {"SALH2AC", SFX_SALH2AC}, + {"SALH2AD", SFX_SALH2AD}, + {"SALH2AE", SFX_SALH2AE}, + {"SALH2AF", SFX_SALH2AF}, + {"SALH2AG", SFX_SALH2AG}, + {"SALH2AH", SFX_SALH2AH}, + {"SALH2BA", SFX_SALH2BA}, + {"SALH2BB", SFX_SALH2BB}, + {"SALH2BC", SFX_SALH2BC}, + {"SALH2BD", SFX_SALH2BD}, + {"SALH2BH", SFX_SALH2BH}, + {"SALH2BI", SFX_SALH2BI}, + {"SALH2CA", SFX_SALH2CA}, + {"SALH3AA", SFX_SALH3AA}, + {"SALH3AB", SFX_SALH3AB}, + {"SALH3AC", SFX_SALH3AC}, + {"SALH3AD", SFX_SALH3AD}, + {"SALH3AE", SFX_SALH3AE}, + {"SALH3AF", SFX_SALH3AF}, + {"SALH3AG", SFX_SALH3AG}, + {"SALH3AH", SFX_SALH3AH}, + {"SALH3AI", SFX_SALH3AI}, + {"SALH3AJ", SFX_SALH3AJ}, + {"SALH3AK", SFX_SALH3AK}, + {"SALH3BA", SFX_SALH3BA}, + {"SALH3BB", SFX_SALH3BB}, + {"SALH3CA", SFX_SALH3CA}, + {"SALH3CC", SFX_SALH3CC}, + {"SALH3CD", SFX_SALH3CD}, + {"SALH4AA", SFX_SALH4AA}, + {"SALH4AD", SFX_SALH4AD}, + {"SALH4AG", SFX_SALH4AG}, + {"SALH4BA", SFX_SALH4BA}, + {"SALH4BB", SFX_SALH4BB}, + {"SALH4BC", SFX_SALH4BC}, + {"SALH4CA", SFX_SALH4CA}, + {"SALH5CA", SFX_SALH5CA}, + {"SALH5CB", SFX_SALH5CB}, + {"SALH5CC", SFX_SALH5CC}, + {"SALH5DA", SFX_SALH5DA}, + {"SALH5DB", SFX_SALH5DB}, + {"SALH5EA", SFX_SALH5EA}, + {"SALH5EB", SFX_SALH5EB}, + {"SALH5FA", SFX_SALH5FA}, + {"SALH5GA", SFX_SALH5GA}, + {"SALH5GB", SFX_SALH5GB}, + {"SALH5GC", SFX_SALH5GC}, + {"SALH5HA", SFX_SALH5HA}, + {"SALH5IA", SFX_SALH5IA}, + {"SALH5IB", SFX_SALH5IB}, + {"SALH5JA", SFX_SALH5JA}, + {"SALH5KA", SFX_SALH5KA}, + {"SALH5KB", SFX_SALH5KB}, + {"SALH5LA", SFX_SALH5LA}, + {"SALH5LB", SFX_SALH5LB}, + {"SALH5MA", SFX_SALH5MA}, + {"SALH5MB", SFX_SALH5MB}, + {"SALH5MC", SFX_SALH5MC}, + {"SALH5NA", SFX_SALH5NA}, + {"SALH5OA", SFX_SALH5OA}, + {"SALH5OB", SFX_SALH5OB}, + {"SALH5OC", SFX_SALH5OC}, + {"SALH5OD", SFX_SALH5OD}, + {"SALH5OE", SFX_SALH5OE}, + {"SALH5OF", SFX_SALH5OF}, + {"SALH5OG", SFX_SALH5OG}, + {"SALH5OH", SFX_SALH5OH}, + {"SALH5OI", SFX_SALH5OI}, + {"SALH5OJ", SFX_SALH5OJ}, + {"SALH5OK", SFX_SALH5OK}, + {"SALS1AA", SFX_SALS1AA}, + {"SALS1AB", SFX_SALS1AB}, + {"SALS1AC", SFX_SALS1AC}, + {"SALS1AD", SFX_SALS1AD}, + {"SALS1AE", SFX_SALS1AE}, + {"SALS1AF", SFX_SALS1AF}, + {"SALS1AG", SFX_SALS1AG}, + {"SALS1AH", SFX_SALS1AH}, + {"SALS1AI", SFX_SALS1AI}, + {"SALS2AA", SFX_SALS2AA}, + {"SALS2AB", SFX_SALS2AB}, + {"SALS2AC", SFX_SALS2AC}, + {"SALS2AD", SFX_SALS2AD}, + {"SALS2BC", SFX_SALS2BC}, + {"SALS2BD", SFX_SALS2BD}, + {"SALS2BE", SFX_SALS2BE}, + {"SALS2BF", SFX_SALS2BF}, + {"SALS2CD", SFX_SALS2CD}, + {"SALS3AA", SFX_SALS3AA}, + {"SALS3AB", SFX_SALS3AB}, + {"SALS3AC", SFX_SALS3AC}, + {"SALS3BB", SFX_SALS3BB}, + {"SALS3BD", SFX_SALS3BD}, + {"SALS3CA", SFX_SALS3CA}, + {"SALS3CB", SFX_SALS3CB}, + {"SALS3CC", SFX_SALS3CC}, + {"SALS3CD", SFX_SALS3CD}, + {"SALS3CE", SFX_SALS3CE}, + {"SALS3CF", SFX_SALS3CF}, + {"SALS3CG", SFX_SALS3CG}, + {"SALS3DA", SFX_SALS3DA}, + {"SALS3DE", SFX_SALS3DE}, + {"SALS3DH", SFX_SALS3DH}, + {"SALS3DI", SFX_SALS3DI}, + {"SALS4AA", SFX_SALS4AA}, + {"SALS4AB", SFX_SALS4AB}, + {"SALS4AC", SFX_SALS4AC}, + {"SALS4AD", SFX_SALS4AD}, + {"SALS4AE", SFX_SALS4AE}, + {"SALS4AF", SFX_SALS4AF}, + {"SALS4BA", SFX_SALS4BA}, + {"SALS4BB", SFX_SALS4BB}, + {"SALS4BC", SFX_SALS4BC}, + {"SALS4BD", SFX_SALS4BD}, + {"SALS4BE", SFX_SALS4BE}, + {"SALS4BF", SFX_SALS4BF}, + {"SALS4BG", SFX_SALS4BG}, + {"SALS4BH", SFX_SALS4BH}, + {"SALS5AA", SFX_SALS5AA}, + {"SALS5AB", SFX_SALS5AB}, + {"SALS5AC", SFX_SALS5AC}, + {"SALS5AD", SFX_SALS5AD}, + {"SALS5AE", SFX_SALS5AE}, + {"SALS5AF", SFX_SALS5AF}, + {"SALS5BA", SFX_SALS5BA}, + {"SALS5BB", SFX_SALS5BB}, + {"SALS5BC", SFX_SALS5BC}, + {"SALS5BD", SFX_SALS5BD}, + {"SALS5BE", SFX_SALS5BE}, + {"SALS5BF", SFX_SALS5BF}, + {"SALS5BG", SFX_SALS5BG}, + {"SALS5CA", SFX_SALS5CA}, + {"SALS5CB", SFX_SALS5CB}, + {"SALS5CC", SFX_SALS5CC}, + {"SALS5CD", SFX_SALS5CD}, + {"SALS5CE", SFX_SALS5CE}, + {"SALS5CF", SFX_SALS5CF}, + {"SALS5CG", SFX_SALS5CG}, + {"SALS6AA", SFX_SALS6AA}, + {"SALS6AB", SFX_SALS6AB}, + {"SALS6AD", SFX_SALS6AD}, + {"SALS6AE", SFX_SALS6AE}, + {"SALS6AF", SFX_SALS6AF}, + {"SALS6AG", SFX_SALS6AG}, + {"SALS6AH", SFX_SALS6AH}, + {"SALX_AA", SFX_SALX_AA}, + {"SALX_AB", SFX_SALX_AB}, + {"SALX_AC", SFX_SALX_AC}, + {"SALX_AD", SFX_SALX_AD}, + {"SALX_AE", SFX_SALX_AE}, + {"SALX_AF", SFX_SALX_AF}, + {"SALX_AG", SFX_SALX_AG}, + {"SALX_AH", SFX_SALX_AH}, + {"SALX_AI", SFX_SALX_AI}, + {"SALX_AK", SFX_SALX_AK}, + {"SALX_AL", SFX_SALX_AL}, + {"SALX_AM", SFX_SALX_AM}, + {"SALX_AN", SFX_SALX_AN}, + {"SALX_AO", SFX_SALX_AO}, + {"SALX_AP", SFX_SALX_AP}, + {"SALX_AQ", SFX_SALX_AQ}, + {"SALX_AR", SFX_SALX_AR}, + {"SALX_AS", SFX_SALX_AS}, + {"TAN1_AA", SFX_TAN1_AA}, + {"TAN1_AB", SFX_TAN1_AB}, + {"TAN1_AD", SFX_TAN1_AD}, + {"TAN1_AE", SFX_TAN1_AE}, + {"TAN1_AF", SFX_TAN1_AF}, + {"TAN1_AG", SFX_TAN1_AG}, + {"TAN1_AH", SFX_TAN1_AH}, + {"TAN1_AI", SFX_TAN1_AI}, + {"TAN1_AJ", SFX_TAN1_AJ}, + {"TAN2_AA", SFX_TAN2_AA}, + {"TAN2_AB", SFX_TAN2_AB}, + {"TAN2_AC", SFX_TAN2_AC}, + {"TAN2_AE", SFX_TAN2_AE}, + {"TAN2_AF", SFX_TAN2_AF}, + {"TAN2_AG", SFX_TAN2_AG}, + {"TAN2_AH", SFX_TAN2_AH}, + {"TAN2_AJ", SFX_TAN2_AJ}, + {"TAN3_AA", SFX_TAN3_AA}, + {"TAN3_AB", SFX_TAN3_AB}, + {"TAN3_AC", SFX_TAN3_AC}, + {"TAN3_AD", SFX_TAN3_AD}, + {"TAN3_AE", SFX_TAN3_AE}, + {"TAN3_AF", SFX_TAN3_AF}, + {"TAN3_AG", SFX_TAN3_AG}, + {"TAN3_AH", SFX_TAN3_AH}, + {"TOSH1AA", SFX_TOSH1AA}, + {"TOSH1AB", SFX_TOSH1AB}, + {"TOSH1AC", SFX_TOSH1AC}, + {"TOSH1AD", SFX_TOSH1AD}, + {"TOSH2AA", SFX_TOSH2AA}, + {"TOSH2AB", SFX_TOSH2AB}, + {"TOSH2AC", SFX_TOSH2AC}, + {"TOSH2AE", SFX_TOSH2AE}, + {"TOSH2AF", SFX_TOSH2AF}, + {"TOSH2AG", SFX_TOSH2AG}, + {"TOSH2AH", SFX_TOSH2AH}, + {"TOSH2AI", SFX_TOSH2AI}, + {"TOSH2AJ", SFX_TOSH2AJ}, + {"TOSH2AK", SFX_TOSH2AK}, + {"TOSH2AL", SFX_TOSH2AL}, + {"TOSH2AM", SFX_TOSH2AM}, + {"TOSH3AA", SFX_TOSH3AA}, + {"TOSH3AB", SFX_TOSH3AB}, + {"TOSH3AC", SFX_TOSH3AC}, + {"TOSH3AD", SFX_TOSH3AD}, + {"TOSH3AE", SFX_TOSH3AE}, + {"TOSH3AF", SFX_TOSH3AF}, + {"TOSH3AG", SFX_TOSH3AG}, + {"TOSH3AH", SFX_TOSH3AH}, + {"TOSH3AI", SFX_TOSH3AI}, + {"TOSH3AJ", SFX_TOSH3AJ}, + {"TOSH3AK", SFX_TOSH3AK}, + {"TOSH3BA", SFX_TOSH3BA}, + {"TOSH3BB", SFX_TOSH3BB}, + {"TOSH3CA", SFX_TOSH3CA}, + {"TOSH3CB", SFX_TOSH3CB}, + {"TOSH3CC", SFX_TOSH3CC}, + {"TOSH3CD", SFX_TOSH3CD}, + {"TOSH3CE", SFX_TOSH3CE}, + {"TOSH3CF", SFX_TOSH3CF}, + {"TOSH3CG", SFX_TOSH3CG}, + {"TOSH3CH", SFX_TOSH3CH}, + {"TOSH3CI", SFX_TOSH3CI}, + {"TOSH3CJ", SFX_TOSH3CJ}, + {"TOSH3CK", SFX_TOSH3CK}, + {"TOSH3DA", SFX_TOSH3DA}, + {"TOSH3EA", SFX_TOSH3EA}, + {"TOSH3FA", SFX_TOSH3FA}, + {"TOSH3FB", SFX_TOSH3FB}, + {"TOSH3FC", SFX_TOSH3FC}, + {"TOSH3FD", SFX_TOSH3FD}, + {"TOSH3FE", SFX_TOSH3FE}, + {"TOSH3FF", SFX_TOSH3FF}, + {"TOSH3GA", SFX_TOSH3GA}, + {"TOSH3GB", SFX_TOSH3GB}, + {"TOSH3HA", SFX_TOSH3HA}, + {"TOSH4AA", SFX_TOSH4AA}, + {"TOSH4AB", SFX_TOSH4AB}, + {"TOSH4AC", SFX_TOSH4AC}, + {"TOSH4AD", SFX_TOSH4AD}, + {"TOSH4AE", SFX_TOSH4AE}, + {"TOSH4AF", SFX_TOSH4AF}, + {"TOSH4AG", SFX_TOSH4AG}, + {"TOSH4AH", SFX_TOSH4AH}, + {"TOSH4AI", SFX_TOSH4AI}, + {"TOSH4AJ", SFX_TOSH4AJ}, + {"TOSH4BA", SFX_TOSH4BA}, + {"TOSH4BB", SFX_TOSH4BB}, + {"TOSH4BC", SFX_TOSH4BC}, + {"TOSH4CA", SFX_TOSH4CA}, + {"TOSH4CB", SFX_TOSH4CB}, + {"TOSH4CC", SFX_TOSH4CC}, + {"TOSH4CD", SFX_TOSH4CD}, + {"TOSH4CE", SFX_TOSH4CE}, + {"TOSH4DA", SFX_TOSH4DA}, + {"TOSH4DB", SFX_TOSH4DB}, + {"TOSH4DC", SFX_TOSH4DC}, + {"VAL1_AA", SFX_VAL1_AA}, + {"VAL1_AB", SFX_VAL1_AB}, + {"VAL1_AC", SFX_VAL1_AC}, + {"VAL1_AD", SFX_VAL1_AD}, + {"VAL1_AE", SFX_VAL1_AE}, + {"VAL1_AF", SFX_VAL1_AF}, + {"VAL1_AG", SFX_VAL1_AG}, + {"VAL1_AH", SFX_VAL1_AH}, + {"VAL1_AI", SFX_VAL1_AI}, + {"VAL2_AA", SFX_VAL2_AA}, + {"VAL2_AB", SFX_VAL2_AB}, + {"VAL2_AC", SFX_VAL2_AC}, + {"VAL2_AD", SFX_VAL2_AD}, + {"VAL2_AE", SFX_VAL2_AE}, + {"VAL2_AF", SFX_VAL2_AF}, + {"VAL2_AG", SFX_VAL2_AG}, + {"VAL2_AH", SFX_VAL2_AH}, + {"VAL2_AI", SFX_VAL2_AI}, + {"VAL3_AA", SFX_VAL3_AA}, + {"VAL3_AB", SFX_VAL3_AB}, + {"VAL3_AC", SFX_VAL3_AC}, + {"VAL3_AD", SFX_VAL3_AD}, + {"VAL3_AE", SFX_VAL3_AE}, + {"VAL3_AF", SFX_VAL3_AF}, + {"VIC1_BA", SFX_VIC1_BA}, + {"VIC1_BB", SFX_VIC1_BB}, + {"VIC1_BC", SFX_VIC1_BC}, + {"VIC1_BD", SFX_VIC1_BD}, + {"VIC1_BE", SFX_VIC1_BE}, + {"VIC1_BF", SFX_VIC1_BF}, + {"VIC1_CA", SFX_VIC1_CA}, + {"VIC1_CB", SFX_VIC1_CB}, + {"VIC1_CC", SFX_VIC1_CC}, + {"VIC1_CD", SFX_VIC1_CD}, + {"VIC1_CE", SFX_VIC1_CE}, + {"VIC1_DA", SFX_VIC1_DA}, + {"VIC1_DB", SFX_VIC1_DB}, + {"VIC1_DC", SFX_VIC1_DC}, + {"VIC1_DD", SFX_VIC1_DD}, + {"VIC1_DE", SFX_VIC1_DE}, + {"VIC1_DF", SFX_VIC1_DF}, + {"VIC1_DG", SFX_VIC1_DG}, + {"VIC1_DH", SFX_VIC1_DH}, + {"VIC2_AA", SFX_VIC2_AA}, + {"VIC2_AB", SFX_VIC2_AB}, + {"VIC2_AC", SFX_VIC2_AC}, + {"VIC2_AD", SFX_VIC2_AD}, + {"VIC2_AF", SFX_VIC2_AF}, + {"VIC2_AG", SFX_VIC2_AG}, + {"VIC2_AH", SFX_VIC2_AH}, + {"VIC2_BA", SFX_VIC2_BA}, + {"VIC2_BE", SFX_VIC2_BE}, + {"VIC2_BI", SFX_VIC2_BI}, + {"VIC3_AA", SFX_VIC3_AA}, + {"VIC3_AB", SFX_VIC3_AB}, + {"VIC3_AD", SFX_VIC3_AD}, + {"VIC3_AE", SFX_VIC3_AE}, + {"VIC3_AF", SFX_VIC3_AF}, + {"VIC3_AG", SFX_VIC3_AG}, + {"VIC3_AH", SFX_VIC3_AH}, + {"VIC3_AJ", SFX_VIC3_AJ}, + {"VIC3_AK", SFX_VIC3_AK}, + {"VIC3_AL", SFX_VIC3_AL}, + {"VIC3_AM", SFX_VIC3_AM}, + {"VIC3_AN", SFX_VIC3_AN}, + {"VIC3_AO", SFX_VIC3_AO}, + {"VIC3_BA", SFX_VIC3_BA}, + {"VIC3_BB", SFX_VIC3_BB}, + {"VIC3_BC", SFX_VIC3_BC}, + {"VIC4_AA", SFX_VIC4_AA}, + {"VIC4_AB", SFX_VIC4_AB}, + {"VIC4_AC", SFX_VIC4_AC}, + {"VIC4_AD", SFX_VIC4_AD}, + {"VIC4_AE", SFX_VIC4_AE}, + {"VIC4_AF", SFX_VIC4_AF}, + {"VIC4_AG", SFX_VIC4_AG}, + {"VIC4_AH", SFX_VIC4_AH}, + {"VIC4_AI", SFX_VIC4_AI}, + {"VIC4_AJ", SFX_VIC4_AJ}, + {"VIC4_AK", SFX_VIC4_AK}, + {"VIC4_AL", SFX_VIC4_AL}, + {"VIC4_AM", SFX_VIC4_AM}, + {"VIC4_AN", SFX_VIC4_AN}, + {"VIC4_BA", SFX_VIC4_BA}, + {"VIC4_BB", SFX_VIC4_BB}, + {"VIC4_BC", SFX_VIC4_BC}, + {"VIC4_BD", SFX_VIC4_BD}, + {"VIC4_BE", SFX_VIC4_BE}, + {"VIC4_BF", SFX_VIC4_BF}, + {"VIC4_BG", SFX_VIC4_BG}, + {"VIC4_BH", SFX_VIC4_BH}, + {"VIC5_AA", SFX_VIC5_AA}, + {"VIC5_AB", SFX_VIC5_AB}, + {"VIC5_AC", SFX_VIC5_AC}, + {"VIC5_AD", SFX_VIC5_AD}, + {"VIC5_AE", SFX_VIC5_AE}, + {"VIC5_AF", SFX_VIC5_AF}, + {"VIC5_AG", SFX_VIC5_AG}, + {"VIC5_AH", SFX_VIC5_AH}, + {"VIC5_AI", SFX_VIC5_AI}, + {"VIC5_AJ", SFX_VIC5_AJ}, + {"VIC5_AK", SFX_VIC5_AK}, + {"VIC5_AL", SFX_VIC5_AL}, + {"VIC5_FA", SFX_VIC5_FA}, + {"VIC5_FD", SFX_VIC5_FD}, + {"VIC5_FF", SFX_VIC5_FF}, + {"VIC5_FG", SFX_VIC5_FG}, + {"VIC5_FH", SFX_VIC5_FH}, + {"VIC5_FI", SFX_VIC5_FI}, + {"VIC5_FJ", SFX_VIC5_FJ}, + {"VIC5_FK", SFX_VIC5_FK}, + {"VIC6_AA", SFX_VIC6_AA}, + {"VIC6_AB", SFX_VIC6_AB}, + {"VIC6_AC", SFX_VIC6_AC}, + {"VIC6_AD", SFX_VIC6_AD}, + {"VIC6_AE", SFX_VIC6_AE}, + {"VIC6_AF", SFX_VIC6_AF}, + {"VIC6_AG", SFX_VIC6_AG}, + {"VIC6_AH", SFX_VIC6_AH}, + {"VIC6_AI", SFX_VIC6_AI}, + {"VIC6_AJ", SFX_VIC6_AJ}, + {"VIC6_AK", SFX_VIC6_AK}, + {"VIC6_AL", SFX_VIC6_AL}, + {"VIC6_AM", SFX_VIC6_AM}, + {"VIC6_AN", SFX_VIC6_AN}, + {"VIC6_AO", SFX_VIC6_AO}, + {"VIC7_AA", SFX_VIC7_AA}, + {"VIC7_AB", SFX_VIC7_AB}, + {"VIC7_AC", SFX_VIC7_AC}, + {"VIC7_AD", SFX_VIC7_AD}, + {"VIC7_AE", SFX_VIC7_AE}, + {"VIC7_AG", SFX_VIC7_AG}, + {"VIC7_AH", SFX_VIC7_AH}, + {"VIC7_AJ", SFX_VIC7_AJ}, + {"VIC7_AL", SFX_VIC7_AL}, + {"VIC7_AM", SFX_VIC7_AM}, + {"VIC7_AN", SFX_VIC7_AN}, + {"VIC7_AO", SFX_VIC7_AO}, + {"VIC7_BA", SFX_VIC7_BA}, + {"VIC7_BB", SFX_VIC7_BB}, + {"VIC7_BC", SFX_VIC7_BC}, + {"VIC7_BD", SFX_VIC7_BD}, + {"VIC7_BE", SFX_VIC7_BE}, + {"VIC7_BF", SFX_VIC7_BF}, + {"VIC7_BG", SFX_VIC7_BG}, + {"VIC7_BH", SFX_VIC7_BH}, + {"VIC7_BI", SFX_VIC7_BI}, + {"WAC1_AA", SFX_WAC1_AA}, + {"WAC1_AB", SFX_WAC1_AB}, + {"WAC1_AC", SFX_WAC1_AC}, + {"WAC1_AD", SFX_WAC1_AD}, + {"WAC1_AE", SFX_WAC1_AE}, + {"WAC1_AF", SFX_WAC1_AF}, + {"WAC1_AG", SFX_WAC1_AG}, + {"WAC1_AH", SFX_WAC1_AH}, + {"WAC2_AA", SFX_WAC2_AA}, + {"WAC2_AB", SFX_WAC2_AB}, + {"WAC2_AC", SFX_WAC2_AC}, + {"WAC2_AD", SFX_WAC2_AD}, + {"WAC2_AE", SFX_WAC2_AE}, + {"WAC2_AF", SFX_WAC2_AF}, + {"WAC2_AG", SFX_WAC2_AG}, + {"WED1_AA", SFX_WED1_AA}, + {"WED1_AB", SFX_WED1_AB}, + {"WED1_AC", SFX_WED1_AC}, + {"WED1_AD", SFX_WED1_AD}, + {"WED1_AE", SFX_WED1_AE}, + {"WED1_AF", SFX_WED1_AF}, + {"WED1_AG", SFX_WED1_AG}, + {"WED2_AA", SFX_WED2_AA}, + {"WED2_AB", SFX_WED2_AB}, + {"WED2_AC", SFX_WED2_AC}, + {"WED2_AD", SFX_WED2_AD}, + {"WED2_AE", SFX_WED2_AE}, + {"WED2_AF", SFX_WED2_AF}, + {"WED2_AG", SFX_WED2_AG}, + {"WED2_AH", SFX_WED2_AH}, + {"WED3_AA", SFX_WED3_AA}, + {"WED3_AB", SFX_WED3_AB}, + {"WED3_AC", SFX_WED3_AC}, + {"WED3_AD", SFX_WED3_AD}, + {"WED3_AE", SFX_WED3_AE}, + {"WED3_AF", SFX_WED3_AF}, + {"WED3_AG", SFX_WED3_AG}, + {"WED3_AH", SFX_WED3_AH}, + {"WED3_AI", SFX_WED3_AI}, + {"WED3_AJ", SFX_WED3_AJ}, + {"WED3_AK", SFX_WED3_AK}, + {"WED3_AL", SFX_WED3_AL}, + {"DONH3IA", SFX_DONH3IA}, + {"DONH3JA", SFX_DONH3JA}, + {"DONH5CA", SFX_DONH5CA}, + {"DONH5CB", SFX_DONH5CB}, + {"DONS7CA", SFX_DONS7CA}, + {"DONS7CB", SFX_DONS7CB}, + {"DONS7CC", SFX_DONS7CC}, + {"DONS7CD", SFX_DONS7CD}, + {"DONS7CE", SFX_DONS7CE}, + {"JDT1_MA", SFX_JDT1_MA}, + {"JDT1_MB", SFX_JDT1_MB}, + {"JDT1_MC", SFX_JDT1_MC}, + {"JDT1_MD", SFX_JDT1_MD}, + {"JDT1_ME", SFX_JDT1_ME}, + {"JDT1_MF", SFX_JDT1_MF}, + {"JDT1_MG", SFX_JDT1_MG}, + {"JDT1_MH", SFX_JDT1_MH}, + {"JDT4_BA", SFX_JDT4_BA}, + {"JDT4_BB", SFX_JDT4_BB}, + {"JDT4_BC", SFX_JDT4_BC}, + {"JDT5_FA", SFX_JDT5_FA}, + {"JDT5_FB", SFX_JDT5_FB}, + {"JDT5_FC", SFX_JDT5_FC}, + {"JDT5_GA", SFX_JDT5_GA}, + {"JDT5_GB", SFX_JDT5_GB}, + {"JDT6_CA", SFX_JDT6_CA}, + {"JDT6_CB", SFX_JDT6_CB}, + {"JDT6_DA", SFX_JDT6_DA}, + {"JDT7_CD", SFX_JDT7_CD}, + {"JDT8_AI", SFX_JDT8_AI}, + {"JDT8_BA", SFX_JDT8_BA}, + {"JDT8_FD", SFX_JDT8_FD}, + {"JDT8_FE", SFX_JDT8_FE}, + {"JDT8_FF", SFX_JDT8_FF}, + {"JDT8_FG", SFX_JDT8_FG}, + {"JDT8_FH", SFX_JDT8_FH}, + {"JDT8_GA", SFX_JDT8_GA}, + {"JDT8_HA", SFX_JDT8_HA}, + {"JDT8_HB", SFX_JDT8_HB}, + {"MAC1_JC", SFX_MAC1_JC}, + {"MAC4_DA", SFX_MAC4_DA}, + {"MAC4_DB", SFX_MAC4_DB}, + {"MAC4_DC", SFX_MAC4_DC}, + {"MAC4_DD", SFX_MAC4_DD}, + {"MAC4_DE", SFX_MAC4_DE}, + {"MAC4_DF", SFX_MAC4_DF}, + {"MAC4_DG", SFX_MAC4_DG}, + {"MAC4_DH", SFX_MAC4_DH}, + {"MAR1_HD", SFX_MAR1_HD}, + {"MAR2_GF", SFX_MAR2_GF}, + {"MAR5_DA", SFX_MAR5_DA}, + {"MAR5_DB", SFX_MAR5_DB}, + {"MAR5_DC", SFX_MAR5_DC}, + {"MAR5_EA", SFX_MAR5_EA}, + {"MAR5_EB", SFX_MAR5_EB}, + {"MAR5_EC", SFX_MAR5_EC}, + {"MAR5_ED", SFX_MAR5_ED}, + {"NEDS1BA", SFX_NEDS1BA}, + {"NEDS1BB", SFX_NEDS1BB}, + {"NEDS1BC", SFX_NEDS1BC}, + {"NEDS1BD", SFX_NEDS1BD}, + {"NEDS1BE", SFX_NEDS1BE}, + {"NEDS1BF", SFX_NEDS1BF}, + {"NOOD_AA", SFX_NOOD_AA}, + {"NOOD_AB", SFX_NOOD_AB}, + {"NOOD_AC", SFX_NOOD_AC}, + {"NOOD_AD", SFX_NOOD_AD}, + {"NOOD_AE", SFX_NOOD_AE}, + {"NOOD_AF", SFX_NOOD_AF}, + {"NOOD_AG", SFX_NOOD_AG}, + {"NOOD_AH", SFX_NOOD_AH}, + {"NOOD_AI", SFX_NOOD_AI}, + {"NOOD_AJ", SFX_NOOD_AJ}, + {"NOOD_AK", SFX_NOOD_AK}, + {"NOOD_AL", SFX_NOOD_AL}, + {"NOOD_AM", SFX_NOOD_AM}, + {"NOOD_AN", SFX_NOOD_AN}, + {"NOOD_AO", SFX_NOOD_AO}, + {"NOOD_AP", SFX_NOOD_AP}, + {"NOOD_AQ", SFX_NOOD_AQ}, + {"NOOD_AR", SFX_NOOD_AR}, + {"NOOD_AS", SFX_NOOD_AS}, + {"NOOD_AT", SFX_NOOD_AT}, + {"PIZZ_AA", SFX_PIZZ_AA}, + {"PIZZ_AB", SFX_PIZZ_AB}, + {"PIZZ_AC", SFX_PIZZ_AC}, + {"PIZZ_AD", SFX_PIZZ_AD}, + {"PIZZ_AE", SFX_PIZZ_AE}, + {"PIZZ_AF", SFX_PIZZ_AF}, + {"PIZZ_AG", SFX_PIZZ_AG}, + {"PIZZ_AH", SFX_PIZZ_AH}, + {"PIZZ_AI", SFX_PIZZ_AI}, + {"PIZZ_AJ", SFX_PIZZ_AJ}, + {"PIZZ_AK", SFX_PIZZ_AK}, + {"PIZZ_AL", SFX_PIZZ_AL}, + {"PIZZ_AM", SFX_PIZZ_AM}, + {"PIZZ_AN", SFX_PIZZ_AN}, + {"PIZZ_AO", SFX_PIZZ_AO}, + {"PIZZ_AP", SFX_PIZZ_AP}, + {"PIZZ_AQ", SFX_PIZZ_AQ}, + {"PIZZ_AR", SFX_PIZZ_AR}, + {"PIZZ_AS", SFX_PIZZ_AS}, + {"PIZZ_AT", SFX_PIZZ_AT}, + {"RAYS2BA", SFX_RAYS2BA}, + {"RAYS2BB", SFX_RAYS2BB}, + {"RAYS2CA", SFX_RAYS2CA}, + {"RAYS2CB", SFX_RAYS2CB}, + {"RAYS2DA", SFX_RAYS2DA}, + {"RAYS2DB", SFX_RAYS2DB}, + {"RAYS2EA", SFX_RAYS2EA}, + {"RAYS2EB", SFX_RAYS2EB}, + {"RAYS4AA", SFX_RAYS4AA}, + {"RAYS4AB", SFX_RAYS4AB}, + {"RAYS4AC", SFX_RAYS4AC}, + {"RAYS4AD", SFX_RAYS4AD}, + {"RAYS4AE", SFX_RAYS4AE}, + {"RAYS4AF", SFX_RAYS4AF}, + {"RAYS4BA", SFX_RAYS4BA}, + {"RAYS4BB", SFX_RAYS4BB}, + {"RAYS4BC", SFX_RAYS4BC}, + {"RAYS4BD", SFX_RAYS4BD}, + {"RAYS4BE", SFX_RAYS4BE}, + {"RAYS4BF", SFX_RAYS4BF}, + {"RAYS4BG", SFX_RAYS4BG}, + {"RAYS5BA", SFX_RAYS5BA}, + {"RAYS5BB", SFX_RAYS5BB}, + {"RMN_AA", SFX_RMN_AA}, + {"RMN_AB", SFX_RMN_AB}, + {"RMN_AC", SFX_RMN_AC}, + {"RMN_AD", SFX_RMN_AD}, + {"RMN_AE", SFX_RMN_AE}, + {"RMN_AF", SFX_RMN_AF}, + {"RMN_AG", SFX_RMN_AG}, + {"RMN_AH", SFX_RMN_AH}, + {"RMN_AI", SFX_RMN_AI}, + {"RMN_AJ", SFX_RMN_AJ}, + {"RMN_AK", SFX_RMN_AK}, + {"SAL1_BA", SFX_SAL1_BA}, + {"SAL1_BB", SFX_SAL1_BB}, + {"SAL1_BC", SFX_SAL1_BC}, + {"SAL1_BD", SFX_SAL1_BD}, + {"SAL2_BA", SFX_SAL2_BA}, + {"SAL2_BB", SFX_SAL2_BB}, + {"SAL2_BC", SFX_SAL2_BC}, + {"SAL2_BD", SFX_SAL2_BD}, + {"SAL2_CA", SFX_SAL2_CA}, + {"SAL2_CB", SFX_SAL2_CB}, + {"SAL2_CC", SFX_SAL2_CC}, + {"SAL2_CD", SFX_SAL2_CD}, + {"SAL2_CE", SFX_SAL2_CE}, + {"SAL2_CF", SFX_SAL2_CF}, + {"SAL2_CG", SFX_SAL2_CG}, + {"SAL2_CH", SFX_SAL2_CH}, + {"SAL2_CI", SFX_SAL2_CI}, + {"SAL2_CJ", SFX_SAL2_CJ}, + {"SAL2_CL", SFX_SAL2_CL}, + {"SAL2_CM", SFX_SAL2_CM}, + {"SAL2_CN", SFX_SAL2_CN}, + {"SAL2_CO", SFX_SAL2_CO}, + {"SAL2_CP", SFX_SAL2_CP}, + {"SAL2_CQ", SFX_SAL2_CQ}, + {"SAL2_CR", SFX_SAL2_CR}, + {"SAL2_CS", SFX_SAL2_CS}, + {"SAL2_CT", SFX_SAL2_CT}, + {"SAL2_CU", SFX_SAL2_CU}, + {"SAL2_CV", SFX_SAL2_CV}, + {"SAL2_DD", SFX_SAL2_DD}, + {"SAL2_DE", SFX_SAL2_DE}, + {"SAL3_BA", SFX_SAL3_BA}, + {"SAL3_CA", SFX_SAL3_CA}, + {"SAL3_DA", SFX_SAL3_DA}, + {"SAL4_AA", SFX_SAL4_AA}, + {"SAL5_AA", SFX_SAL5_AA}, + {"SAL5_AD", SFX_SAL5_AD}, + {"SAL5_AF", SFX_SAL5_AF}, + {"SAL5_AG", SFX_SAL5_AG}, + {"SAL6_CA", SFX_SAL6_CA}, + {"SAL6_CB", SFX_SAL6_CB}, + {"SAL6_CC", SFX_SAL6_CC}, + {"SAL6_CD", SFX_SAL6_CD}, + {"SAL7_CD", SFX_SAL7_CD}, + {"SAL8_HA", SFX_SAL8_HA}, + {"SAL8_HB", SFX_SAL8_HB}, + {"SAL8_HC", SFX_SAL8_HC}, + {"SAL8_HD", SFX_SAL8_HD}, + {"SAL8_HE", SFX_SAL8_HE}, + {"SAL8_HF", SFX_SAL8_HF}, + {"SAL8_HG", SFX_SAL8_HG}, + {"SAL8_HH", SFX_SAL8_HH}, + {"SALH1AA", SFX_SALH1AA}, + {"SALH1AB", SFX_SALH1AB}, + {"SALH1BA", SFX_SALH1BA}, + {"SALH1BB", SFX_SALH1BB}, + {"SALH1CA", SFX_SALH1CA}, + {"SALH1CB", SFX_SALH1CB}, + {"SALH1DA", SFX_SALH1DA}, + {"SALH1EA", SFX_SALH1EA}, + {"SALH1EB", SFX_SALH1EB}, + {"SALH1FB", SFX_SALH1FB}, + {"SALH1FC", SFX_SALH1FC}, + {"SALH1FG", SFX_SALH1FG}, + {"SALH1GA", SFX_SALH1GA}, + {"SALH1GB", SFX_SALH1GB}, + {"SALH1HA", SFX_SALH1HA}, + {"SALH2BE", SFX_SALH2BE}, + {"SALH2BF", SFX_SALH2BF}, + {"SALH2BG", SFX_SALH2BG}, + {"SALH4CB", SFX_SALH4CB}, + {"SALS1BA", SFX_SALS1BA}, + {"SALS1BB", SFX_SALS1BB}, + {"SALS1BC", SFX_SALS1BC}, + {"SALS1BD", SFX_SALS1BD}, + {"SALS2BA", SFX_SALS2BA}, + {"SALS2BB", SFX_SALS2BB}, + {"SALS2CA", SFX_SALS2CA}, + {"SALS2CB", SFX_SALS2CB}, + {"SALS2CC", SFX_SALS2CC}, + {"SALS2CE", SFX_SALS2CE}, + {"SALS3BA", SFX_SALS3BA}, + {"SALS3BC", SFX_SALS3BC}, + {"SALS3DB", SFX_SALS3DB}, + {"SALS3DC", SFX_SALS3DC}, + {"SALS3DD", SFX_SALS3DD}, + {"SALS3DF", SFX_SALS3DF}, + {"SALS3DG", SFX_SALS3DG}, + {"STRE_AA", SFX_STRE_AA}, + {"STRE_AB", SFX_STRE_AB}, + {"STRE_AC", SFX_STRE_AC}, + {"STRE_AD", SFX_STRE_AD}, + {"STRE_AE", SFX_STRE_AE}, + {"STRE_AF", SFX_STRE_AF}, + {"STRE_AG", SFX_STRE_AG}, + {"STRE_BA", SFX_STRE_BA}, + {"STRE_BB", SFX_STRE_BB}, + {"STRE_BC", SFX_STRE_BC}, + {"STRE_BD", SFX_STRE_BD}, + {"STRE_BE", SFX_STRE_BE}, + {"STRE_BF", SFX_STRE_BF}, + {"STRE_BG", SFX_STRE_BG}, + {"STRE_CA", SFX_STRE_CA}, + {"STRE_CB", SFX_STRE_CB}, + {"STRE_CC", SFX_STRE_CC}, + {"TOSH1BA", SFX_TOSH1BA}, + {"TOSH1BB", SFX_TOSH1BB}, + {"TOSH1BC", SFX_TOSH1BC}, + {"TOSH1BD", SFX_TOSH1BD}, + {"TOSH3IA", SFX_TOSH3IA}, + {"TOSH3IB", SFX_TOSH3IB}, + {"VIC2_BB", SFX_VIC2_BB}, + {"VIC2_BC", SFX_VIC2_BC}, + {"VIC2_BD", SFX_VIC2_BD}, + {"VIC2_BF", SFX_VIC2_BF}, + {"VIC2_BH", SFX_VIC2_BH}, + {"VIC2_BJ", SFX_VIC2_BJ}, + {"VIC2_CA", SFX_VIC2_CA}, + {"VIC2_DA", SFX_VIC2_DA}, + {"VIC2_DB", SFX_VIC2_DB}, + {"VIC2_DE", SFX_VIC2_DC}, + {"VIC4_CA", SFX_VIC4_CA}, + {"VIC4_CB", SFX_VIC4_CB}, + {"VIC5_DA", SFX_VIC5_DA}, + {"VIC5_DB", SFX_VIC5_DB}, + {"VIC5_DC", SFX_VIC5_DC}, + {"VIC5_EA", SFX_VIC5_EA}, + {"VIC5_EB", SFX_VIC5_EB}, + {"VIC5_EC", SFX_VIC5_EC}, + {"VIC5_FB", SFX_VIC5_FB}, + {"VIC5_FC", SFX_VIC5_FC}, + {"VIC5_FE", SFX_VIC5_FE}, + {"VIC6_BA", SFX_VIC6_BA}, + {"VIC6_BB", SFX_VIC6_BB}, + {"VIC7_CA", SFX_VIC7_CA}, + {"VIC7_CB", SFX_VIC7_CB}, + {"VIC7_CC", SFX_VIC7_CC}, + {"LCN_AA", SFX_LCN_AA}, + {"LCN_AB", SFX_LCN_AB}, + {"MSA12AB", SFX_SFX_ANG1_AA}, + {"BNK1_12", SFX_SFX_BNK1_12}, + {"TAX1_1", SFX_SFX_TAX1_1}, + {"TAX1_2", SFX_SFX_TAX1_2}, + {"TAX1_3", SFX_SFX_TAX1_3}, + {"TAX1_4", SFX_SFX_TAX1_4}, + {"TAX1_5", SFX_SFX_TAX1_5}, + {"TAX2_1", SFX_SFX_TAX2_1}, + {"TAX2_2", SFX_SFX_TAX2_2}, + {"TAX2_3", SFX_SFX_TAX2_3}, + {"TAX2_4", SFX_SFX_TAX2_4}, + {"TAX2_5", SFX_SFX_TAX2_5}, + {"TAX2_6", SFX_SFX_TAX2_6}, + {"TAX2_7", SFX_SFX_TAX2_7}, + {"TAX3_1", SFX_SFX_TAX3_1}, + {"TAX3_2", SFX_SFX_TAX3_2}, + {"TAX3_3", SFX_SFX_TAX3_3}, + {"TAX3_4", SFX_SFX_TAX3_4}, + {"TAX3_5", SFX_SFX_TAX3_5}, + {nil, 0} +}; int32 FindMissionAudioSfx(const char *name) @@ -9792,6 +11304,8 @@ cAudioManager::MissionScriptAudioUsesPoliceChannel(uint32 soundMission) return FALSE; } +// LCS: mission audio turns from streamed to sampled + void cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name) { @@ -9802,8 +11316,8 @@ cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name) m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED; m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED; m_sMissionAudio.m_bIsPlaying[slot] = FALSE; - m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000; - m_sMissionAudio.m_nMissionAudioCounter[slot] *= 4; + m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetSampleLength(missionAudioSfx) / SampleManager.GetSampleBaseFrequency(missionAudioSfx); + m_sMissionAudio.m_nMissionAudioCounter[slot] = 11 * m_sMissionAudio.m_nMissionAudioCounter[slot] / 10; m_sMissionAudio.m_bIsPlayed[slot] = FALSE; m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE; g_bMissionAudioLoadFailed[slot] = FALSE; @@ -9840,8 +11354,8 @@ cAudioManager::PlayLoadedMissionAudio(uint8 slot) bool8 cAudioManager::ShouldDuckMissionAudio(uint8 slot) { - if (IsMissionAudioSamplePlaying(slot)) - return m_sMissionAudio.m_nSampleIndex[slot] != STREAMED_SOUND_MISSION_ROK2_01; + //if (IsMissionAudioSamplePlaying(slot)) + // return m_sMissionAudio.m_nSampleIndex[slot] != STREAMED_SOUND_MISSION_ROK2_01; return FALSE; } @@ -9887,7 +11401,7 @@ cAudioManager::ClearMissionAudio(uint8 slot) m_sMissionAudio.m_bPredefinedProperties[slot] = TRUE; m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; m_sMissionAudio.m_bIsMobile[slot] = FALSE; - SampleManager.StopStreamedFile(slot + 1); + SampleManager.StopChannel(slot + CHANNEL_MISSION_AUDIO_1); } } @@ -9908,7 +11422,9 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) switch (m_sMissionAudio.m_nLoadingStatus[slot]) { case LOADING_STATUS_NOT_LOADED: - SampleManager.PreloadStreamedFile(m_sMissionAudio.m_nSampleIndex[slot], slot + 1); + // TODO: LoadMissionAudio + SampleManager.LoadPedComment(m_sMissionAudio.m_nSampleIndex[slot]); + SampleManager.SetChannelFrequency(slot + CHANNEL_MISSION_AUDIO_1, SampleManager.GetSampleBaseFrequency(m_sMissionAudio.m_nSampleIndex[slot])); m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_LOADED; nFramesUntilFailedLoad[slot] = 0; break; @@ -9918,7 +11434,8 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) if (g_bMissionAudioLoadFailed[slot]) { if (m_bTimerJustReset) { ClearMissionAudio(slot); - SampleManager.StopStreamedFile(slot + 1); + SampleManager.StopChannel(CHANNEL_POLICE_RADIO); + SampleManager.StopChannel(slot + CHANNEL_MISSION_AUDIO_1); nFramesForPretendPlaying[slot] = 0; nCheckPlayingDelay[slot] = 0; nFramesUntilFailedLoad[slot] = 0; @@ -9937,42 +11454,47 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) if (MissionScriptAudioUsesPoliceChannel(m_sMissionAudio.m_nSampleIndex[slot])) { SetMissionScriptPoliceAudio(m_sMissionAudio.m_nSampleIndex[slot]); } else { - if (m_nUserPause) - SampleManager.PauseStream(TRUE, slot + 1); + SampleManager.InitialiseChannel(slot + CHANNEL_MISSION_AUDIO_1, m_sMissionAudio.m_nSampleIndex[slot], SFX_BANK_PED_COMMENTS); + if(m_nUserPause) + SampleManager.SetChannelFrequency(slot + CHANNEL_MISSION_AUDIO_1, 0); + else + SampleManager.SetChannelFrequency(slot + CHANNEL_MISSION_AUDIO_1, SampleManager.GetSampleBaseFrequency(m_sMissionAudio.m_nSampleIndex[slot])); if (m_sMissionAudio.m_bPredefinedProperties[slot]) { - if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAL) - SampleManager.SetStreamedVolumeAndPan(80, 0, TRUE, slot + 1); - else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_CAMERAR) - SampleManager.SetStreamedVolumeAndPan(80, 127, TRUE, slot + 1); + SampleManager.SetChannelVolume(slot + CHANNEL_MISSION_AUDIO_1, 127); + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, 63); + if (m_sMissionAudio.m_nSampleIndex[slot] == SFX_SFX_CAMERA_LEFT || m_sMissionAudio.m_nSampleIndex[slot] == SFX_SFX_AIRHORN_LEFT) + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, 0); + else if (m_sMissionAudio.m_nSampleIndex[slot] == SFX_SFX_CAMERA_RIGHT || m_sMissionAudio.m_nSampleIndex[slot] == SFX_SFX_AIRHORN_RIGHT) + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, 127); else - SampleManager.SetStreamedVolumeAndPan(80, 63, TRUE, slot + 1); + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, 63); } else { distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]); if (distSquared >= SQR(80.0f)) { emittingVol = 0; pan = 63; } else { - emittingVol = 80; + emittingVol = 127; if (distSquared > 0.0f) { dist = Sqrt(distSquared); - emittingVol = ComputeVolume(80, 80.0f, dist); + emittingVol = ComputeVolume(127, 80.0f, dist); } TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec); pan = ComputePan(80.f, &vec); } - SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1); + SampleManager.SetChannelVolume(slot + CHANNEL_MISSION_AUDIO_1, emittingVol); + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, pan); } - SampleManager.StartPreloadedStreamedFile(slot + 1); + SampleManager.StartChannel(slot + CHANNEL_MISSION_AUDIO_1); } m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_PLAYING; nCheckPlayingDelay[slot] = 30; - if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) - m_sMissionAudio.m_bIsMobile[slot] = TRUE; break; case PLAY_STATUS_PLAYING: if (m_bTimerJustReset) { ClearMissionAudio(slot); - SampleManager.StopStreamedFile(slot + 1); + SampleManager.StopChannel(CHANNEL_POLICE_RADIO); + SampleManager.StopChannel(slot + CHANNEL_MISSION_AUDIO_1); break; } if (MissionScriptAudioUsesPoliceChannel(m_sMissionAudio.m_nSampleIndex[slot])) { @@ -9980,21 +11502,20 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) if (nCheckPlayingDelay[slot]) { --nCheckPlayingDelay[slot]; } else if ((g_bMissionAudioLoadFailed[slot] && m_sMissionAudio.m_nMissionAudioCounter[slot]-- == 0) || GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED) { + debug("FINISHED PLAYINGXXXXXXXXXXXXX"); m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_FINISHED; - if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) - m_sMissionAudio.m_bIsMobile[slot] = FALSE; m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE; - SampleManager.StopStreamedFile(slot + 1); + SampleManager.StopChannel(CHANNEL_POLICE_RADIO); m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; } } } else if (m_sMissionAudio.m_bIsPlaying[slot]) { - if (SampleManager.IsStreamPlaying(slot + 1) || m_nUserPause || m_nPreviousUserPause) { - if (m_nUserPause) - SampleManager.PauseStream(TRUE, slot + 1); + if(SampleManager.GetChannelUsedFlag(slot + CHANNEL_MISSION_AUDIO_1) || m_nUserPause || m_nPreviousUserPause) { + if(m_nUserPause) + SampleManager.SetChannelFrequency(slot + CHANNEL_MISSION_AUDIO_1, 0); else { - SampleManager.PauseStream(FALSE, slot + 1); + SampleManager.SetChannelFrequency(slot + CHANNEL_MISSION_AUDIO_1, SampleManager.GetSampleBaseFrequency(m_sMissionAudio.m_nSampleIndex[slot])); if (!m_sMissionAudio.m_bPredefinedProperties[slot]) { distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos[slot]); if (distSquared >= SQR(80.0f)) { @@ -10009,24 +11530,21 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot) TranslateEntity(&m_sMissionAudio.m_vecPos[slot], &vec); pan = ComputePan(80.f, &vec); } - SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, slot + 1); + SampleManager.SetChannelVolume(slot + CHANNEL_MISSION_AUDIO_1, emittingVol); + SampleManager.SetChannelPan(slot + CHANNEL_MISSION_AUDIO_1, pan); } } - } else if (m_sMissionAudio.m_nSampleIndex[slot] == STREAMED_SOUND_MISSION_ROK2_01) { - m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED; } else { m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_FINISHED; - if (m_sMissionAudio.m_nSampleIndex[slot] >= STREAMED_SOUND_MISSION_MOB_01A && m_sMissionAudio.m_nSampleIndex[slot] <= STREAMED_SOUND_MISSION_MOB_99A) - m_sMissionAudio.m_bIsMobile[slot] = FALSE; m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE; - SampleManager.StopStreamedFile(slot + 1); + SampleManager.StopChannel(slot + CHANNEL_MISSION_AUDIO_1); m_sMissionAudio.m_nMissionAudioCounter[slot] = 0; } } else { if (m_nUserPause) break; if (nCheckPlayingDelay[slot]--) { - if (!SampleManager.IsStreamPlaying(slot + 1)) + if (!SampleManager.GetChannelUsedFlag(slot + CHANNEL_MISSION_AUDIO_1)) break; nCheckPlayingDelay[slot] = 0; } diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index e4f8a023..398224f0 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -273,6 +273,8 @@ cAudioManager::ResetTimers(uint32 time) ClearMissionAudio(0); ClearMissionAudio(1); SampleManager.StopChannel(CHANNEL_POLICE_RADIO); + SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_1); + SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_2); SampleManager.SetEffectsFadeVolume(0); SampleManager.SetMusicFadeVolume(0); MusicManager.ResetMusicAfterReload(); @@ -449,9 +451,17 @@ cAudioManager::ServiceSoundEffects() #endif m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0; if (m_nUserPause && !m_nPreviousUserPause) { - for (int32 i = 0; i < NUM_CHANNELS; i++) + for (int32 i = 0; i < NUM_CHANNELS_GENERIC; i++) SampleManager.StopChannel(i); + SampleManager.SetChannelFrequency(CHANNEL_POLICE_RADIO, 0); + SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO_1, 0); + SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO_2, 0); + + // ps2 code just stops the sound here for some reason + //SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_1); + //SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_2); + ClearRequestedQueue(); if (m_nActiveSampleQueue) { m_nActiveSampleQueue = 0; diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index f002317a..932e2ecb 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -565,8 +565,9 @@ public: #define SET_LOOP_OFFSETS(sample) #endif -#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS) -static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); -#endif +//#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS) +//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); +//#endif + extern cAudioManager AudioManager; diff --git a/src/audio/AudioSamples.h b/src/audio/AudioSamples.h index b98bfd7c..41c2e3d4 100644 --- a/src/audio/AudioSamples.h +++ b/src/audio/AudioSamples.h @@ -4,398 +4,330 @@ enum eSfxSample { - SFX_CAR_HORN_JEEP = 0, + SFX_AIR_BRAKES, + SFX_AK47_LEFT, + SFX_AK47_RELOAD, + SFX_AK47_RIGHT, + SFX_ALARM, + SFX_AMBULANCE_SI, + SFX_AMMU_AA, + SFX_AMMU_AB, + SFX_AMMU_AC, + SFX_ARM_BOMB, + SFX_A_10, + SFX_BAT_HIT_LEFT, + SFX_BAT_HIT_RIGHT, + SFX_BEEP, + SFX_BOAT_CRUISER_LOOP, + SFX_BOAT_SPLASH_1, + SFX_BOAT_SPLASH_2, + SFX_BOAT_V12_LOOP, + SFX_BOAT_WATER_LOOP, + SFX_BODY_LAND, + SFX_BODY_LAND_AND_FALL, + SFX_BOMB_BEEP, + SFX_BRIDGE_OPEN_WARNING, + SFX_BULLET_CAR_1, + SFX_BULLET_CAR_2, + SFX_BULLET_CAR_3, + SFX_BULLET_PASS_1, + SFX_BULLET_PASS_2, + SFX_BULLET_PED, + SFX_BULLET_SHELL_HIT_GROUND_1, + SFX_BULLET_SHELL_HIT_GROUND_2, + SFX_BULLET_WALL_1, + SFX_BULLET_WALL_2, + SFX_BULLET_WALL_3, + SFX_CAMERA, + SFX_CARDBOARD_BOX_SMASH, + SFX_CAR_HELI_FAR, + SFX_CAR_HELI_MAI, + SFX_CAR_HELI_MAI2, + SFX_CAR_HELI_REA, + SFX_CAR_HELI_ROL, + SFX_CAR_HELI_ROT, + SFX_CAR_HELI_STA, + SFX_CAR_HORN_56CHEV, SFX_CAR_HORN_BMW328, SFX_CAR_HORN_BUS, SFX_CAR_HORN_BUS2, - SFX_CAR_HORN_56CHEV, + SFX_CAR_HORN_JEEP, SFX_CAR_HORN_PICKUP, SFX_CAR_HORN_PORSCHE, SFX_CAR_HORN_TRUCK, - - SFX_CAR_HELI_MAI, // 8 - SFX_CAR_HELI_MAI2, // 9 - SFX_CAR_HELI_REA, // 10 - SFX_CAR_HELI_STA, // 11 - SFX_CAR_HELI_ROT, // 12 - SFX_CAR_HELI_FAR, // 13 - SFX_CAR_HELI_ROL, // 14 - - SFX_OLD_CAR_DOOR_OPEN, - SFX_OLD_CAR_DOOR_CLOSE, - SFX_NEW_CAR_DOOR_OPEN, - SFX_NEW_CAR_DOOR_CLOSE, - SFX_TRUCK_DOOR_OPEN, - SFX_TRUCK_DOOR_CLOSE, - SFX_REVERSE_GEAR, - SFX_REVERSE_GEAR_2, - SFX_CAR_STARTER, // 23 - SFX_ROAD_NOISE, // 24 - SFX_SKID, // 25 - SFX_GRAVEL_SKID, // 26 - SFX_POLICE_SIREN_SLOW, - SFX_SIREN_FAST, // 28 - SFX_AMBULANCE_SIREN_SLOW, - SFX_REVERSE_WARNING, - SFX_ICE_CREAM_TUNE, - SFX_AIR_BRAKES, // 32 - SFX_TYRE_BUMP, // 33 - SFX_TYRE_BURST_B, // 34 - SFX_TYRE_BURST, // 35 - SFX_TYRE_BURST_L, // 36 - SFX_PALM_TREE_LO, // 37 - SFX_BULLET_PASS_1, // 38 - SFX_BULLET_PASS_2, // 39 - SFX_SKATE_1, // 40 - SFX_SKATE_2, // 41 - SFX_FOOTSTEP_CONCRETE_1, - SFX_FOOTSTEP_CONCRETE_2, - SFX_FOOTSTEP_CONCRETE_3, - SFX_FOOTSTEP_CONCRETE_4, - SFX_FOOTSTEP_CONCRETE_5, - SFX_EXPLOSION_1, // 47 - SFX_EXPLOSION_2, // 48 - SFX_EXPLOSION_3, // 49 - SFX_COLT45_LEFT, // 50 - SFX_COLT45_RIGHT, // 51 - SFX_AK47_LEFT, // 52 - SFX_AK47_RIGHT, // 53 - SFX_UZI_LEFT, // 54 - SFX_UZI_RIGHT, // 55 - SFX_UZI_END_LEFT, // 56 - SFX_SNIPER_LEFT, // 57 - SFX_SNIPER_RIGHT, // 58 - SFX_ROCKET_LEFT, // 59 - SFX_ROCKET_RIGHT, // 60 - SFX_ROCKET_FLY, // 61 - SFX_FLAMETHROWER_LEFT, // 62 - SFX_FLAMETHROWER_RIGHT, // 63 - SFX_FLAMETHROWER_START_LEFT, // 64 - SFX_FLAMETHROWER_START_RIGHT, // 65 - SFX_SHOTGUN_LEFT, // 66 - SFX_SHOTGUN_RIGH, // 67 - SFX_M60_LEFT, // 68 - SFX_M60_RIGHT, // 69 - SFX_M60_TAIL_LEFT, // 70 - SFX_TEC_LEFT, // 71 - SFX_TEC_RIGHT, // 72 - SFX_TEC_TAIL, // 73 - SFX_RUGER_LEFT, // 74 - SFX_RUGER_RIGHT, // 75 - SFX_RUGER_TAIL, // 76 - SFX_PISTOL_RELOAD, // 77 - SFX_AK47_RELOAD, // 78 - SFX_ROCKET_RELOAD, // 79 - SFX_RIFLE_RELOAD, // 80 - SFX_GOLF_CLUB_SWING, // 81 - SFX_MINIGUN_FIRE_LEFT, // 82 - SFX_MINIGUN_FIRE_RIGHT, // 83 - SFX_MINIGUN_STOP, // 84 - SFX_SPAS12_LEFT, // 85 - SFX_SPAS12_RIGHT, // 86 - SFX_SPAS12_TAIL_LEFT, // 87 - SFX_PYTHON_LEFT, // 88 - SFX_PYTHON_RIGHT, // 89 - SFX_MP5_LEFT, // 90 - SFX_MP5_RIGHT, // 91 - SFX_COL_TARMAC_1, // 92 - SFX_COL_TARMAC_2, // 93 - SFX_COL_TARMAC_3, // 94 - SFX_COL_TARMAC_4, // 95 - SFX_COL_TARMAC_5, // 96 - SFX_COL_GRASS_1, - SFX_COL_GRAVEL_1, - SFX_COL_MUD_1, - SFX_COL_GARAGE_DOOR_1, + SFX_CAR_IDLE_CADI, + SFX_CAR_IDLE_COBRA, + SFX_CAR_IDLE_GOLFCART, + SFX_CAR_IDLE_HONDA, + SFX_CAR_IDLE_HOTROD, + SFX_CAR_IDLE_MERC, + SFX_CAR_IDLE_PACARD, + SFX_CAR_IDLE_PATHFINDER, + SFX_CAR_IDLE_PONT, + SFX_CAR_IDLE_PONT2, + SFX_CAR_IDLE_PORSHE, + SFX_CAR_IDLE_SPIDER, + SFX_CAR_IDLE_SPORTCAR, + SFX_CAR_IDLE_TRUCK, + SFX_CAR_IDLE_UNUSED1, + SFX_CAR_IDLE_UNUSED2, + SFX_CAR_IDLE_UNUSED3, + SFX_CAR_IDLE_UNUSED4, + SFX_CAR_IDLE_VTWI, + SFXNEWCARDOOR, + SFX_CAR_ON_FIRE, + SFX_CAR_RAIN_1, + SFX_CAR_RAIN_2, + SFX_CAR_RAIN_3, + SFX_CAR_RAIN_4, + SFX_CAR_REV_CADI, + SFX_CAR_REV_COBRA, + SFX_CAR_REV_GOLFCART, + SFX_CAR_REV_HONDA, + SFX_CAR_REV_HOTROD, + SFX_CAR_REV_MERC, + SFX_CAR_REV_PACARD, + SFX_CAR_REV_PATHFINDER, + SFX_CAR_REV_PONT, + SFX_CAR_REV_PONT2, + SFX_CAR_REV_PORSHE, + SFX_CAR_REV_SPIDER, + SFX_CAR_REV_SPORTCAR, + SFX_CAR_REV_TRUCK, + SFX_CAR_REV_UNUSED1, + SFX_CAR_REV_UNUSED2, + SFX_CAR_REV_UNUSED3, + SFX_CAR_REV_UNUSED4, + SFX_CAR_REV_VTWI, + SFX_CAR_STARTER, + SFX_CENTRAL, + SFX_CESNA_IDLE, + SFX_CESNA_REV, + SFX_COLT45_LEFT, + SFX_COLT45_RIGHT, + SFX_COL_CARDBOARD_1, + SFX_COL_CARDBOARD_2, + SFX_COL_CAR_1, + SFX_COL_CAR_2, + SFX_COL_CAR_3, + SFX_COL_CAR_4, + SFX_COL_CAR_5, SFX_COL_CAR_PANEL_1, SFX_COL_CAR_PANEL_2, SFX_COL_CAR_PANEL_3, SFX_COL_CAR_PANEL_4, SFX_COL_CAR_PANEL_5, SFX_COL_CAR_PANEL_6, - SFX_COL_THICK_METAL_PLATE_1, - SFX_COL_SCAFFOLD_POLE_1, - SFX_COL_LAMP_POST_1, + SFX_COL_CONTAINER_1, + SFX_COL_GARAGE_DOOR_1, + SFX_COL_GATE, + SFX_COL_GRASS_1, + SFX_COL_GRAVEL_1, SFX_COL_HYDRANT_1, + SFX_COL_LAMP_POST_1, SFX_COL_METAL_CHAIN_FENCE_1, SFX_COL_METAL_CHAIN_FENCE_2, SFX_COL_METAL_CHAIN_FENCE_3, SFX_COL_METAL_CHAIN_FENCE_4, - SFX_COL_PED_1, // 115 - SFX_COL_PED_2, // 116 + SFX_COL_MUD_1, + SFX_COL_NEWS_VENDOR_1, + SFX_COL_NEWS_VENDOR_2, + SFX_COL_NEWS_VENDOR_3, + SFX_COL_PED_1, + SFX_COL_PED_2, SFX_COL_SAND_1, - SFX_COL_WOOD_CRATES_1, - SFX_COL_WOOD_CRATES_2, - SFX_COL_WOOD_CRATES_3, - SFX_COL_WOOD_CRATES_4, + SFX_COL_SCAFFOLD_POLE_1, + SFX_COL_TARMAC_1, + SFX_COL_TARMAC_2, + SFX_COL_TARMAC_3, + SFX_COL_TARMAC_4, + SFX_COL_TARMAC_5, + SFX_COL_THICK_METAL_PLATE_1, + SFX_COL_VEG_1, + SFX_COL_VEG_2, + SFX_COL_VEG_3, + SFX_COL_VEG_4, + SFX_COL_VEG_5, SFX_COL_WOOD_BENCH_1, SFX_COL_WOOD_BENCH_2, SFX_COL_WOOD_BENCH_3, SFX_COL_WOOD_BENCH_4, + SFX_COL_WOOD_CRATES_1, + SFX_COL_WOOD_CRATES_2, + SFX_COL_WOOD_CRATES_3, + SFX_COL_WOOD_CRATES_4, SFX_COL_WOOD_SOLID_1, - SFX_COL_VEG_1, // 127 - SFX_COL_VEG_2, // 128 - SFX_COL_VEG_3, // 129 - SFX_COL_VEG_4, // 130 - SFX_COL_VEG_5, // 131 - SFX_COL_CONTAINER_1, - SFX_COL_NEWS_VENDOR_1, - SFX_COL_NEWS_VENDOR_2, - SFX_COL_NEWS_VENDOR_3, - SFX_COL_CAR_1, // 136 - SFX_COL_CAR_2, // 137 - SFX_COL_CAR_3, // 138 - SFX_COL_CAR_4, // 139 - SFX_COL_CAR_5, // 140 - SFX_COL_CARDBOARD_1, - SFX_COL_CARDBOARD_2, - SFX_COL_GATE, // 143 - SFX_SCRAPE_CAR_1, // 144 + SFX_COUNTDOWN, SFX_CRATE_SMASH, - SFX_GLASS_CRACK, // 146 - SFX_GLASS_SMASH, // 147 + SFX_C_OR_D_UNK_1, + SFX_C_OR_D_UNK_2, + SFX_C_OR_D_UNK_3, + SFX_C_OR_D_UNK_4, + SFX_C_OR_D_UNK_5, + SFX_C_OR_D_UNK_6, + SFX_DOCK_BA, + SFX_DOCK_BB, + SFX_EAST, + SFX_ERROR_FIRE_RIFLE, + SFX_ERROR_FIRE_ROCKET_LAUNCHER, + SFX_EXPLOSION_1, + SFX_EXPLOSION_2, + SFX_EXPLOSION_3, + SFX_FIGHT_1, + SFX_FIGHT_2, + SFX_FIGHT_4, + SFX_FIGHT_5, + SFX_FISHING_BOAT_IDLE, + SFX_FLAMETHROWER_LEFT, + SFX_FLAMETHROWER_RIGHT, + SFX_FLAMETHROWER_START_LEFT, + SFX_FLAMETHROWER_START_RIGHT, + SFX_FOOTSTEP_CONCRETE_1, + SFX_FOOTSTEP_CONCRETE_2, + SFX_FOOTSTEP_CONCRETE_3, + SFX_FOOTSTEP_CONCRETE_4, + SFX_FOOTSTEP_CONCRETE_5, + SFX_GARAGE_DOOR_LOOP, + SFX_GATE_START_CLU, + SFX_GATE_STOP_CLU, + SFX_GLASS_CRACK, SFX_GLASS_SHARD_1, SFX_GLASS_SHARD_2, SFX_GLASS_SHARD_3, SFX_GLASS_SHARD_4, - SFX_PED_ON_FIRE, // 152 - SFX_CAR_ON_FIRE, // 153 - SFX_RAIN, // 154 - SFX_HURRICANE_MA, // 155 - SFX_BULLET_SHELL_HIT_GROUND_1, - SFX_BULLET_SHELL_HIT_GROUND_2, - SFX_BULLET_PED, // 158 - SFX_BULLET_CAR_1, // 159 - SFX_BULLET_CAR_2, // 160 - SFX_BULLET_CAR_3, // 161 - SFX_BULLET_WALL_1, // 162 - SFX_BULLET_WALL_2, // 163 - SFX_BULLET_WALL_3, // 164 - SFX_BAT_HIT_LEFT, // 165 - SFX_BAT_HIT_RIGH, // 166 - SFX_FIGHT_1, // 167 - SFX_FIGHT_2, // 168 - SFX_FIGHT_4, // 169 - SFX_FIGHT_5, // 170 - SFX_KNIFE_SWING, // 171 - SFX_KNIFE_SLASH, // 172 - SFX_KNIFE_STAB, // 173 - SFX_HAMMER_HIT_1, // 174 - SFX_HAMMER_HIT_2, // 175 - SFX_GARAGE_DOOR_LOOP, // 176 - SFX_COUNTDOWN, // 177 - SFX_ARM_BOMB, // 178 - SFX_POLICE_RADIO_CRACKLE, // 179 - - SFX_WEVE_GOT, - SFX_THERES, - SFX_RESPOND_TO, - SFX_A_10, + SFX_GLASS_SMASH, + SFX_GOLF_CLUB_SWING, + SFX_GO_CENTRE, + SFX_GO_LEFT, + SFX_GO_RIGHT, + SFX_GRAVEL_SKID, + SFX_HAMMER_HIT_1, + SFX_HAMMER_HIT_2, + SFX_HELI_1, + SFX_HIT_BALL, + SFX_HOSE, + SFX_H_UNK, // SFX_CAR_REV_UNUS + SFX_ICE_CREAM_TUNE, SFX_IN, - SFX_NORTH, - SFX_EAST, - SFX_SOUTH, - SFX_WEST, - SFX_CENTRAL, - SFX_POLICE_RADIO_MESSAGE_NOISE_1, - SFX_POLICE_RADIO_SUSPECT, - SFX_POLICE_RADIO_LAST_SEEN, - SFX_POLICE_RADIO_ON_FOOT, - SFX_POLICE_RADIO_IN_A, - SFX_POLICE_RADIO_DARK, - SFX_POLICE_RADIO_LIGHT, - SFX_POLICE_RADIO_BRIGHT, - - SFX_CRIME_1, - SFX_CRIME_2, - SFX_CRIME_3, - SFX_CRIME_4, - SFX_CRIME_5, - SFX_CRIME_6, - SFX_CRIME_7, - SFX_CRIME_8, - SFX_CRIME_9, - SFX_CRIME_10, - SFX_CRIME_11, - SFX_CRIME_12, - SFX_POLICE_RADIO_VICE_CITY, - SFX_POLICE_RADIO_VICE_CITY_BEACH, - SFX_POLICE_RADIO_VICE_CITY_MAINLAND, - SFX_POLICE_RADIO_OCEAN_BEACH, //??? - SFX_POLICE_RADIO_WASHINGTON_BEACH, - SFX_POLICE_RADIO_VICE_POINT, - SFX_POLICE_RADIO_LEAF_LINKS, - SFX_POLICE_RADIO_STARFISH_ISLAND, //??????????? - SFX_POLICE_RADIO_VICEPORT, - SFX_POLICE_RADIO_LITTLE_HAVANA, - SFX_POLICE_RADIO_LITTLE_HAITI, - SFX_POLICE_RADIO_PRAWN_ISLAND, //??????????? IS THAT HOW SHE PRONOUNCES ISLAND? - SFX_POLICE_RADIO_DOWNTOWN, - SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL, - SFX_POLICE_RADIO_BLACK, - SFX_POLICE_RADIO_WHITE, - SFX_POLICE_RADIO_BLUE, - SFX_POLICE_RADIO_RED, - SFX_POLICE_RADIO_PURPLE, - SFX_POLICE_RADIO_YELLOW, - SFX_POLICE_RADIO_GREY, - SFX_POLICE_RADIO_ORANGE, - SFX_POLICE_RADIO_GREEN, - SFX_POLICE_RADIO_SILVER, - SFX_POLICE_RADIO_AMBULANCE, - SFX_POLICE_RADIO_TUDOOR, - SFX_POLICE_RADIO_TRUCK, - SFX_POLICE_RADIO_FIRE_TRUCK, - SFX_POLICE_RADIO_PICKUP, - SFX_POLICE_RADIO_POLICE_CAR, - SFX_POLICE_RADIO_BOAT, - SFX_POLICE_RADIO_BUGGY, - SFX_POLICE_RADIO_BUS, - SFX_POLICE_RADIO_COACH, - SFX_POLICE_RADIO_CRUISER, - SFX_POLICE_RADIO_DINGHY, - SFX_POLICE_RADIO_GARBAGE_TRUCK, - SFX_POLICE_RADIO_GOLF_CART, - SFX_POLICE_RADIO_HEARSE, - SFX_POLICE_RADIO_HELICOPTER, - SFX_POLICE_RADIO_ICE_CREAM_VAN, - SFX_POLICE_RADIO_LOWRIDER, - SFX_POLICE_RADIO_MOPED, - SFX_POLICE_RADIO_MOTOBIKE, - SFX_POLICE_RADIO_OFFROAD, - SFX_POLICE_RADIO_PLANE, - SFX_POLICE_RADIO_RIG, - SFX_POLICE_RADIO_SEDAN, - SFX_POLICE_RADIO_SPEEDBOAT, - SFX_POLICE_RADIO_SPORTS_CAR, - SFX_POLICE_RADIO_STATION_WAGON, - SFX_POLICE_RADIO_STRETCH, - SFX_POLICE_RADIO_SWAT_VAN, - SFX_POLICE_RADIO_TANK, - SFX_POLICE_RADIO_TAXI, - SFX_POLICE_RADIO_VAN, - - SFX_HELI_1, // 198 - SFX_PHONE_RING, // 199 - SFX_CAR_REV_1, // PONT - SFX_CAR_REV_2, // PORSHE - SFX_CAR_REV_3, // SPIDER - SFX_CAR_REV_4, // MERC - SFX_CAR_REV_5, // TRUC - SFX_CAR_REV_6, // HOTROD - SFX_CAR_REV_7, // COBRA - SFX_CAR_REV_8, // PONT2 - SFX_CAR_REV_9, // CADI - SFX_CAR_REV_10, // PATHFINDER - SFX_CAR_REV_11, // PACARD - SFX_CAR_REV_12, // GOLFCART - SFX_CAR_REV_13, // SFX_CAR_IDLE_GOL - SFX_CAR_REV_14, // SFX_CAR_IDLE_GOL - SFX_CAR_REV_15, // SFX_CAR_IDLE_GOL - SFX_CAR_REV_16, // SFX_CAR_IDLE_GOL - SFX_CAR_REV_17, // VTWI - SFX_MOPED_REV, // just moped - SFX_CAR_REV_19, // HOND(A) - SFX_CAR_REV_20, // SPOR(TCAR) - SFX_CAR_IDLE_1, // PONT - SFX_CAR_IDLE_2, // PORSHE - SFX_CAR_IDLE_3, // SPIDER - SFX_CAR_IDLE_4, // MERC - SFX_CAR_IDLE_5, // TRUC - SFX_CAR_IDLE_6, // HOTROD - SFX_CAR_IDLE_7, // COBRA - SFX_CAR_IDLE_8, // PONT2 - SFX_CAR_IDLE_9, // CADI - SFX_CAR_IDLE_10, // PATHFINDER - SFX_CAR_IDLE_11, // PACARD - SFX_CAR_IDLE_12, // GOLFCART - SFX_CAR_IDLE_13, // SFX_CAR_IDLE_GOL - SFX_CAR_IDLE_14, // SFX_CAR_IDLE_GOL - SFX_CAR_IDLE_15, // SFX_CAR_IDLE_GOL - SFX_CAR_IDLE_16, // SFX_CAR_IDLE_GOL - SFX_CAR_IDLE_17, // VTWI - SFX_MOPED_IDLE, // 237 - SFX_CAR_IDLE_19, // HOND(A) - SFX_CAR_IDLE_20, // SPOR(TCAR) + SFX_FE_INFO_LEFT, + SFX_FE_INFO_RIGHT, SFX_JUMBO_DIST_FLY, - SFX_JUMBO_TAXI, // 241 - SFX_JUMBO_WHINE, // 242 - SFX_JUMBO_ENGINE, // 243 - SFX_JUMBO_RUMBLE, // 244 + SFX_JUMBO_ENGINE, SFX_JUMBO_LAND_WHEELS, - SFX_BOAT_CRUISER_LOOP, // 246 - SFX_BOAT_V12_LOOP, // 247 - SFX_BOAT_WATER_LOOP, - SFX_BOAT_SPLASH_1, - SFX_BOAT_SPLASH_2, - SFX_FISHING_BOAT_IDLE, - SFX_CAR_RAIN_1, // 252 - SFX_CAR_RAIN_2, // 253 - SFX_CAR_RAIN_3, // 254 - SFX_CAR_RAIN_4, // 255 - SFX_SPLASH_1, // 256 - SFX_PED_CRUNCH_1, // 257 - SFX_PED_CRUNCH_2, // 258 - SFX_WOODEN_BOX_SMASH, - SFX_CARDBOARD_BOX_SMASH, - SFX_ERROR_FIRE_ROCKET_LAUNCHER, - SFX_ERROR_FIRE_RIFLE, - SFX_TANK_TURRET, // 263 - SFX_BODY_LAND_AND_FALL, - SFX_BODY_LAND, // 265 - SFX_BOMB_BEEP, // 266 - SFX_TIMER_BEEP, // 267 + SFX_JUMBO_RUMBLE, + SFX_JUMBO_TAXI, + SFX_JUMBO_WHINE, + SFX_KNIFE_SLASH, + SFX_KNIFE_STAB, + SFX_KNIFE_SWING, + SFX_M60_LEFT, + SFX_M60_RIGHT, + SFX_MINIGUN_FIRE_LEFT, + SFX_MINIGUN_FIRE_RIGHT, + SFX_MINIGUN_STOP, + SFX_MONEY_LEFT, + SFX_MONEY_RIGHT, + SFX_MOPED_IDLE, + SFX_MOPED_REV, + SFX_MP5_LEFT, + SFX_MP5_RIGHT, + SFX_NEW_CAR_DOOR_CLOSE, + SFX_NEW_CAR_DOOR_OPEN, + SFX_NORTH, // cut + SFX_OLD_CAR_DOOR_CLOSE, + SFX_OLD_CAR_DOOR_OPEN, + SFX_PALM_TREE_LO, + SFX_PART_MISSION_COMPLETE_LEFT, + SFX_PART_MISSION_COMPLETE_RIGHT, + SFX_PART_MISSION_COMPLETE_CENTRE, + SFX_PAY_PHONE, + SFX_PED_CRUNCH_1, + SFX_PED_CRUNCH_2, + SFX_PED_ON_FIRE, + SFX_PISTOL_RELOAD, + SFX_PIZZA_THROW, // Throwpizza + SFX_POLICE_RADIO_BRIGHT, + SFX_POLICE_RADIO_CRACKLE, // 179 + SFX_POLICE_RADIO_DARK, + SFX_POLICE_RADIO_IN_A, + SFX_POLICE_RADIO_LAST_SEEN, + SFX_POLICE_RADIO_LIGHT, + SFX_POLICE_RADIO_MESSAGE_NOISE_1, + SFX_POLICE_RADIO_ON_FOOT, + SFX_POLICE_RADIO_SUSPECT, + SFX_POLICE_SIREN_SLOW, + SFX_PYTHON_LEFT, + SFX_PYTHON_RIGHT, + SFX_RADIO_CLICK, + SFX_RADIO_DIAL_1, + SFX_RADIO_DIAL_2, + SFX_RADIO_DIAL_3, + SFX_RAIN, + SFX_RESPOND_TO, // cut + SFX_REVERSE_GEAR, + SFX_REVERSE_GEAR_2, + SFX_REVERSE_WARNING, + SFX_RIFLE_RELOAD, + SFX_ROAD_NOISE, + SFX_ROCKET_FLY, + SFX_ROCKET_LEFT, + SFX_ROCKET_RELOAD, + SFX_ROCKET_RIGHT, + SFX_RUGER_LEFT, + SFX_RUGER_RIGHT, + SFX_RUGER_TAIL, + SFX_R_OR_S_UNK1, + SFX_SCRAPE_CAR_1, + SFX_SHAG_SUSPENSION, + SFX_SHOTGUN_LEFT, + SFX_SHOTGUN_RIGHT, + SFX_SIREN_FAST, + SFX_SKATE_1, // cut + SFX_SKATE_2, // cut + SFX_SKID, + SFX_SNIPER_LEFT, + SFX_SNIPER_RIGHT, + SFX_SOUTH, // cut + SFX_SPAS12_LEFT, + SFX_SPAS12_RIGHT, + SFX_SPAS12_TAIL_LEFT, + SFX_SPLASH_1, SFX_SUSPENSION_FAST_MOVE, SFX_SUSPENSION_SLOW_MOVE_LOOP, - SFX_SHAG_SUSPENSION, - SFX_HIT_BALL, // 271 - SFX_ARCADE, // 272 - SFX_CESNA_IDLE, // 273 - SFX_CESNA_REV, // 274 - SFX_RADIO_CLICK, // 275 - SFX_RADIO_DIAL_1, // 276 - SFX_RADIO_DIAL_2, // 277 - SFX_RADIO_DIAL_3, // 278 - - // pc only - SFX_RADIO_DIAL_4, - SFX_RADIO_DIAL_5, - SFX_RADIO_DIAL_6, - SFX_RADIO_DIAL_7, - SFX_RADIO_DIAL_8, - SFX_RADIO_DIAL_9, - SFX_RADIO_DIAL_10, - SFX_RADIO_DIAL_11, - SFX_RADIO_DIAL_12, + SFX_TANK_TURRET, + SFX_TEC_LEFT, + SFX_TEC_RIGHT, + SFX_TEC_TAIL, + SFX_THERES, // cut + SFX_TIMER, + SFX_TIMER_BEEP, + SFX_TRAIN, // trainloop + SFX_TRUCK_DOOR_CLOSE, + SFX_TRUCK_DOOR_OPEN, + SFX_TYRE_BUMP, + SFX_TYRE_BURST, + SFX_TYRE_BURST_B, + SFX_TYRE_BURST_L, + SFX_UZI_END_LEFT, + SFX_UZI_LEFT, + SFX_UZI_RIGHT, + SFX_WEAPON_CENTRE, + SFX_WEAPON_LEFT, + SFX_WEAPON_RIGHT, + SFX_WEST, // cut + SFX_WEVE_GOT, // cut + SFX_WOODEN_BOX_SMASH, - SFX_INFO_LEFT, // 279 - SFX_INFO_RIGHT, // 280 - SFX_INFO_CENTRE, // 281 - SFX_MONEY_LEFT, // 282 - SFX_MONEY_RIGHT, // 283 - SFX_WEAPON_LEFT, // 284 - SFX_WEAPON_RIGHT, // 285 - SFX_WEAPON_CENTRE, // 286 - SFX_PART_MISSION_COMPLETE_LEFT, // 287 - SFX_PART_MISSION_COMPLETE_RIGHT, // 288 - SFX_PART_MISSION_COMPLETE_CENTRE, // 289 - SFX_GO_LEFT, // 290 - SFX_GO_RIGHT, // 291 - SFX_GO_CENTRE, // 292 - SFX_TIMER, // 293 - SFX_EMPTY, // 294 + SFX_EMPTY, - SFX_FE_HIGHLIGHT_LEFT, // - SFX_FE_HIGHLIGHT_RIGHT, // - SFX_FE_SELECT_LEFT, // - SFX_FE_SELECT_RIGHT, // - SFX_FE_BACK_LEFT, // - SFX_FE_BACK_RIGHT, // - SFX_FE_ERROR_LEFT, // - SFX_FE_ERROR_RIGHT, // + SFX_FE_BACK, + SFX_FE_ERROR_LEFT, + SFX_FE_ERROR_RIGHT, + SFX_FE_HIGHLIGHT, SFX_FE_NOISE_BURST_1, SFX_FE_NOISE_BURST_2, SFX_FE_NOISE_BURST_3, + SFX_FE_SELECT, SFX_CAR_ACCEL_1, SFX_CAR_AFTER_ACCEL_1, @@ -450,17 +382,17 @@ enum eSfxSample SFX_CAR_CHAINSAW_ATTACK, SFX_CAR_CHAINSAW_EMPTY, // unused - SFX_RC_IDLE, // 10976 - SFX_RC_REV, // 10977 - SFX_RC_EMPTY, // 10978 + SFX_RC_IDLE, + SFX_RC_REV, + SFX_RC_EMPTY, - SFX_CAR_RC_HELI, // 10979 - SFX_CAR_AFTER_ACCEL_15, // empty - SFX_CAR_FINGER_OFF_ACCEL_15, // empty + SFX_CAR_RC_HELI, + SFX_CAR_AFTER_ACCEL_15, + // SFX_CAR_FINGER_OFF_ACCEL_15, - SFX_CAR_ACCEL_16, // empty - SFX_CAR_AFTER_ACCEL_16, // empty - SFX_CAR_FINGER_OFF_ACCEL_16, // empty + SFX_CAR_ACCEL_16, + // SFX_CAR_AFTER_ACCEL_16, + // SFX_CAR_FINGER_OFF_ACCEL_16, // bike stuff apparently SFX_CAR_ACCEL_17, @@ -502,12 +434,12 @@ enum eSfxSample SFX_HELI_UNUSED_3, SFX_HELI_UNUSED_4, - SFX_SEAPLANE_PRO1, // 11018 - SFX_SEAPLANE_PRO2, // 11019 - SFX_SEAPLANE_PRO3, // 11020 - SFX_SEAPLANE_PRO4, // 11021 // low fuel - SFX_SEAPLANE_LOW, // 11022 + SFX_SEAPLANE_LOW, + SFX_SEAPLANE_PRO1, + SFX_SEAPLANE_PRO2, + SFX_SEAPLANE_PRO3, + SFX_SEAPLANE_PRO4, // something padded for more plane? SFX_PLANE_UNUSED_1, @@ -516,32 +448,32 @@ enum eSfxSample SFX_PLANE_UNUSED_4, // script objects - SFX_BUILDINGS_BANK_ALARM, // 11027 - SFX_BUILDING_SNORE, // 11028 - SFX_BUILDING_BAR_1, // 11029 - SFX_BUILDING_BAR_2, // 11030 - SFX_BUILDING_BAR_3, // 11031 - SFX_BUILDING_BAR_4, // 11032 - SFX_BUILDING_MAL1, // 11033 - SFX_BUILDING_MAL2, // 11034 - SFX_BUILDING_MAL3, // 11035 - SFX_BUILDING_STR1, // 11036 - SFX_BUILDING_STR2, // 11037 - SFX_BUILDING_STR3, // 11038 - SFX_BUILDING_CHURCH, // 11039 - SFX_BUILDING_FAN_1, // 11040 - SFX_BUILDING_FAN_2, // 11041 - SFX_BUILDING_FAN_3, // 11042 - SFX_BUILDING_FAN_4, // 11043 - SFX_BUILDING_INSECTS_1, // 11044 - SFX_BUILDING_INSECTS_2, // 11045 - SFX_BUILDING_INSECTS_3, // 11046 - SFX_BUILDING_INSECTS_4, // 11047 - SFX_BUILDING_INSECTS_5, // 11048 - SFX_CLUB_1, // 11049 - SFX_CLUB_2, // 11050 - SFX_CLUB_3, // 11051 - SFX_CLUB_4, // 11052 + SFX_BUILDINGS_BANK_ALARM, + SFX_BUILDING_SNORE, + SFX_BUILDING_BAR_1, + SFX_BUILDING_BAR_2, + SFX_BUILDING_BAR_3, + SFX_BUILDING_BAR_4, + SFX_BUILDING_MAL1, + SFX_BUILDING_MAL2, + SFX_BUILDING_MAL3, + SFX_BUILDING_STR1, + SFX_BUILDING_STR2, + SFX_BUILDING_STR3, + SFX_BUILDING_CHURCH, + SFX_BUILDING_FAN_1, + SFX_BUILDING_FAN_2, + SFX_BUILDING_FAN_3, + SFX_BUILDING_FAN_4, + SFX_BUILDING_INSECTS_1, + SFX_BUILDING_INSECTS_2, + SFX_BUILDING_INSECTS_3, + SFX_BUILDING_INSECTS_4, + SFX_BUILDING_INSECTS_5, + SFX_CLUB_1, + SFX_CLUB_2, + SFX_CLUB_3, + SFX_CLUB_4, SFX_FOOTSTEP_GRASS_1, SFX_FOOTSTEP_GRASS_2, @@ -574,9554 +506,5220 @@ enum eSfxSample // ped comments - SFX_BMYBB_BLOCKED_1, - SFX_BMYBB_BLOCKED_2, - SFX_BMYBB_BLOCKED_3, - SFX_BMYBB_BLOCKED_4, - SFX_BMYBB_BLOCKED_5, - SFX_BMYBB_BLOCKED_6, - SFX_BMYBB_BLOCKED_7, - SFX_BMYBB_BLOCKED_8, - SFX_BMYBB_BLOCKED_9, - SFX_BMYBB_BLOCKED_10, - SFX_BMYBB_BLOCKED_11, - SFX_BMYBB_BLOCKED_12, - SFX_BMYBB_BLOCKED_13, - SFX_BMYBB_BUMP_1, - SFX_BMYBB_BUMP_2, - SFX_BMYBB_BUMP_3, - SFX_BMYBB_BUMP_4, - SFX_BMYBB_BUMP_5, - SFX_BMYBB_BUMP_6, - SFX_BMYBB_BUMP_7, - SFX_BMYBB_BUMP_8, - SFX_BMYBB_BUMP_9, - SFX_BMYBB_BUMP_10, - SFX_BMYBB_BUMP_11, - SFX_BMYBB_BUMP_12, - SFX_BMYBB_BUMP_13, - SFX_BMYBB_BUMP_14, - SFX_BMYBB_BUMP_15, - SFX_BMYBB_BUMP_16, - SFX_BMYBB_BUMP_17, - SFX_BMYBB_CAR_CRASH_1, - SFX_BMYBB_CAR_CRASH_2, - SFX_BMYBB_CAR_CRASH_3, - SFX_BMYBB_CAR_CRASH_4, - SFX_BMYBB_CAR_CRASH_5, - SFX_BMYBB_CAR_CRASH_6, - SFX_BMYBB_CAR_CRASH_7, - SFX_BMYBB_CAR_CRASH_8, - SFX_BMYBB_CAR_CRASH_9, - SFX_BMYBB_CHAT_1, - SFX_BMYBB_CHAT_2, - SFX_BMYBB_CHAT_3, - SFX_BMYBB_CHAT_4, - SFX_BMYBB_CHAT_5, - SFX_BMYBB_CHAT_6, - SFX_BMYBB_CHAT_7, - SFX_BMYBB_CHAT_8, - SFX_BMYBB_CHAT_9, - SFX_BMYBB_CHAT_10, - SFX_BMYBB_CHAT_11, - SFX_BMYBB_CHAT_12, - SFX_BMYBB_CHAT_13, - SFX_BMYBB_CHAT_14, - SFX_BMYBB_CHAT_15, - SFX_BMYBB_CHAT_16, - SFX_BMYBB_CHAT_17, - SFX_BMYBB_CHAT_18, - SFX_BMYBB_CHAT_19, - SFX_BMYBB_CHAT_20, - SFX_BMYBB_CHAT_21, - SFX_BMYBB_DODGE_1, - SFX_BMYBB_DODGE_2, - SFX_BMYBB_DODGE_3, - SFX_BMYBB_DODGE_4, - SFX_BMYBB_DODGE_5, - SFX_BMYBB_DODGE_6, - SFX_BMYBB_DODGE_7, - SFX_BMYBB_DODGE_8, - SFX_BMYBB_DODGE_9, - SFX_BMYBB_DODGE_10, - SFX_BMYBB_DODGE_11, - SFX_BMYBB_DODGE_12, - SFX_BMYBB_DODGE_13, - SFX_BMYBB_DODGE_14, - SFX_BMYBB_DODGE_15, - SFX_BMYBB_DODGE_16, - SFX_BMYBB_DODGE_17, - SFX_BMYBB_DODGE_18, - SFX_BMYBB_EYEING_1, - SFX_BMYBB_EYEING_2, - SFX_BMYBB_EYEING_3, - SFX_BMYBB_EYEING_4, - SFX_BMYBB_EYEING_5, - SFX_BMYBB_EYEING_6, - SFX_BMYBB_EYEING_7, - SFX_BMYBB_EYEING_8, - SFX_BMYBB_EYEING_9, - SFX_BMYBB_EYEING_10, - SFX_BMYBB_EYEING_11, - SFX_BMYBB_EYEING_12, - SFX_BMYBB_EYEING_13, - SFX_BMYBB_EYEING_14, - SFX_BMYBB_EYEING_15, - SFX_BMYBB_EYEING_16, - SFX_BMYBB_FIGHT_1, - SFX_BMYBB_FIGHT_2, - SFX_BMYBB_FIGHT_3, - SFX_BMYBB_FIGHT_4, - SFX_BMYBB_FIGHT_5, - SFX_BMYBB_FIGHT_6, - SFX_BMYBB_FIGHT_7, - SFX_BMYBB_FIGHT_8, - SFX_BMYBB_FIGHT_9, - SFX_BMYBB_FIGHT_10, - SFX_BMYBB_FIGHT_11, - SFX_BMYBB_FIGHT_12, - SFX_BMYBB_GENERIC_CRASH_1, - SFX_BMYBB_GENERIC_CRASH_2, - SFX_BMYBB_GENERIC_CRASH_3, - SFX_BMYBB_GENERIC_CRASH_4, - SFX_BMYBB_GENERIC_CRASH_5, - SFX_BMYBB_GENERIC_CRASH_6, - SFX_BMYBB_GENERIC_CRASH_7, - SFX_BMYBB_GENERIC_CRASH_8, - SFX_BMYBB_GENERIC_CRASH_9, - SFX_BMYBB_GUN_COOL_1, - SFX_BMYBB_GUN_COOL_2, - SFX_BMYBB_GUN_COOL_3, - SFX_BMYBB_GUN_COOL_4, - SFX_BMYBB_GUN_COOL_5, - SFX_BMYBB_INNOCENT_1, - SFX_BMYBB_INNOCENT_2, - SFX_BMYBB_INNOCENT_3, - SFX_BMYBB_INNOCENT_4, - SFX_BMYBB_JACKED_1, - SFX_BMYBB_JACKED_2, - SFX_BMYBB_JACKED_3, - SFX_BMYBB_JACKED_4, - SFX_BMYBB_JACKED_5, - SFX_BMYBB_JACKED_6, - SFX_BMYBB_JACKED_7, - SFX_BMYBB_JACKED_8, - SFX_BMYBB_JACKED_9, - SFX_BMYBB_JACKED_10, - SFX_BMYBB_JACKED_11, - SFX_BMYBB_JACKING_1, - SFX_BMYBB_JACKING_2, - SFX_BMYBB_JACKING_3, - SFX_BMYBB_JACKING_4, - SFX_BMYBB_JACKING_5, - SFX_BMYBB_JACKING_6, - SFX_BMYBB_JACKING_7, - SFX_BMYBB_JACKING_8, - SFX_BMYBB_JACKING_9, - SFX_BMYBB_JEER_1, - SFX_BMYBB_JEER_2, - SFX_BMYBB_JEER_3, - SFX_BMYBB_JEER_4, - SFX_BMYBB_JEER_5, - SFX_BMYBB_JEER_6, - SFX_BMYBB_JEER_7, - SFX_BMYBB_JEER_8, - SFX_BMYBB_JEER_9, - SFX_BMYBB_JEER_10, - SFX_BMYBB_JEER_11, - SFX_BMYBB_JEER_12, - SFX_BMYBB_JEER_13, - SFX_BMYBB_JEER_14, - SFX_BMYBB_JEER_15, - SFX_BMYBB_JEER_16, - SFX_BMYBB_LOST_1, - SFX_BMYBB_LOST_2, - SFX_BMYBB_MUGGED_1, - SFX_BMYBB_MUGGED_2, - SFX_BMYBB_MUGGED_3, - SFX_BMYBB_MUGGED_4, - SFX_BMYBB_MUGGED_5, - SFX_BMYBB_MUGGING_1, - SFX_BMYBB_MUGGING_2, - SFX_BMYBB_MUGGING_3, - SFX_BMYBB_MUGGING_4, - SFX_BMYBB_MUGGING_5, - SFX_BMYBB_MUGGING_6, - SFX_BMYBB_MUGGING_7, - SFX_BMYBB_MUGGING_8, - SFX_BMYBB_SAVED_1, - SFX_BMYBB_SAVED_2, - SFX_BMYBB_SAVED_3, - SFX_BMYBB_SAVED_4, - SFX_BMYBB_SAVED_5, - SFX_BMYBB_SAVED_6, - SFX_BMYBB_SHOCKED_1, - SFX_BMYBB_SHOCKED_2, - SFX_BMYBB_SHOCKED_3, - SFX_BMYBB_SHOCKED_4, - SFX_BMYBB_SHOCKED_5, - SFX_BMYBB_SHOCKED_6, - SFX_BMYBB_TAXI_1, - SFX_BMYBB_TAXI_2, - SFX_BMYBB_TAXI_3, + SFX_AMBULAN_VOICE_1_VAN_1, + SFX_AMBULAN_VOICE_1_VAN_2, + SFX_AMBULAN_VOICE_1_VAN_3, + SFX_AMBULAN_VOICE_1_VAN_4, + SFX_AMBULAN_VOICE_1_VICTIM_1, + SFX_AMBULAN_VOICE_1_VICTIM_2, + SFX_AMBULAN_VOICE_1_VICTIM_3, + SFX_AMBULAN_VOICE_1_VICTIM_4, + SFX_AMBULAN_VOICE_2_VAN_1, + SFX_AMBULAN_VOICE_2_VAN_2, + SFX_AMBULAN_VOICE_2_VAN_3, + SFX_AMBULAN_VOICE_2_VAN_4, + SFX_AMBULAN_VOICE_2_VICTIM_1, + SFX_AMBULAN_VOICE_2_VICTIM_2, + SFX_AMBULAN_VOICE_2_VICTIM_3, + SFX_AMBULAN_VOICE_2_VICTIM_4, + SFX_AVE1_AA, + SFX_AVE1_AB, + SFX_AVE1_AC, + SFX_AVE1_AD, + SFX_AVE1_AE, + SFX_AVE1_AF, + SFX_AVE1_AG, + SFX_AVE2_AA, + SFX_AVE2_AC, + SFX_AVE2_AD, + SFX_AVE2_AE, + SFX_AVE2_AG, + SFX_AVE2_AH, + SFX_AVE3_AA, + SFX_AVE3_AB, + SFX_AVE3_AC, + SFX_AVE3_AD, + SFX_AVE3_AE, + SFX_AVE3_AF, + SFX_AVE3_AG, + SFX_AVE4_AA, + SFX_AVE4_AB, + SFX_AVE4_AD, + SFX_AVE4_AE, + SFX_AVE4_AF, + SFX_AVE4_AG, + SFX_AVE4_AH, + SFX_AVE5_AA, + SFX_AVE5_AB, + SFX_AVE5_AC, + SFX_AVE5_AD, + SFX_AVE5_AE, + SFX_AVE5_AF, + SFX_AVE5_AG, + SFX_AVE6_AA, + SFX_AVE6_AB, + SFX_AVE6_AC, + SFX_AVE6_AD, + SFX_AVE6_AE, + SFX_AVEN_AA, + SFX_AVEN_AB, + SFX_AVEN_AC, + SFX_AVEN_AD, + SFX_AVEN_AE, + SFX_AVEN_AF, + SFX_AVEN_AG, + SFX_AVEN_AH, + SFX_AVEN_AI, + SFX_AVEN_AJ, + SFX_AVEN_AK, + SFX_AVEN_AL, + SFX_AVEN_AM, + SFX_AVEN_AN, + SFX_AVEN_AO, + SFX_AVEN_AP, + SFX_AVEN_AQ, + SFX_AVEN_AR, + SFX_AVEN_AS, + SFX_AVEN_AT, + SFX_AVEN_AU, + SFX_AVEN_AV, + SFX_AVEN_AW, + SFX_BIKER1_BUMP_1, + SFX_BIKER1_BUMP_2, + SFX_BIKER1_BUMP_3, + SFX_BIKER1_CHAT_1, + SFX_BIKER1_CHAT_2, + SFX_BIKER1_CHAT_3, + SFX_BIKER1_CHAT_4, + SFX_BIKER1_CRASH_CAR_1, + SFX_BIKER1_CRASH_CAR_2, + SFX_BIKER1_DODGE_1, + SFX_BIKER1_DODGE_2, + SFX_BIKER1_DRIVER_BLOCKED_1, + SFX_BIKER1_DRIVER_BLOCKED_2, + SFX_BIKER1_FIGHT_1, + SFX_BIKER1_FIGHT_2, + SFX_BIKER1_FIGHT_3, + SFX_BIKER1_GUN_THREATENED_1, + SFX_BIKER1_GUN_THREATENED_2, + SFX_BIKER1_JACKED_CAR_1, + SFX_BIKER1_JACKED_CAR_2, + SFX_BIKER1_JACKED_CAR_3, + SFX_BIKER2_BUMP_1, + SFX_BIKER2_BUMP_2, + SFX_BIKER2_BUMP_3, + SFX_BIKER2_CHAT_1, + SFX_BIKER2_CHAT_2, + SFX_BIKER2_CHAT_3, + SFX_BIKER2_CRASH_CAR_1, + SFX_BIKER2_CRASH_CAR_2, + SFX_BIKER2_DODGE_1, + SFX_BIKER2_DODGE_2, + SFX_BIKER2_DODGE_3, + SFX_BIKER2_DRIVER_BLOCKED_1, + SFX_BIKER2_DRIVER_BLOCKED_2, + SFX_BIKER2_FIGHT_1, + SFX_BIKER2_FIGHT_2, + SFX_BIKER2_FIGHT_3, + SFX_BIKER2_GUN_THREATENED_1, + SFX_BIKER2_GUN_THREATENED_2, + SFX_BIKER2_JACKED_CAR_1, + SFX_BIKER2_JACKED_CAR_2, + SFX_BIKER2_JACKED_CAR_3, + SFX_BIKER2_SHOCKED_1, + SFX_BONS2BA, + SFX_BONS2BB, + SFX_BONS2BC, + SFX_BONS2BD, + SFX_BONS2BE, + SFX_BRIDGE_BELL, + SFX_B_MAN1_BUMP_1, + SFX_B_MAN1_BUMP_2, + SFX_B_MAN1_BUMP_3, + SFX_B_MAN1_CHAT_1, + SFX_B_MAN1_CHAT_2, + SFX_B_MAN1_CHAT_3, + SFX_B_MAN1_CRASH_CAR_1, + SFX_B_MAN1_CRASH_CAR_2, + SFX_B_MAN1_DODGE_1, + SFX_B_MAN1_DODGE_2, + SFX_B_MAN1_DRIVER_BLOCKED_1, + SFX_B_MAN1_DRIVER_BLOCKED_2, + SFX_B_MAN1_FIGHT_1, + SFX_B_MAN1_FIGHT_2, + SFX_B_MAN1_FIGHT_3, + SFX_B_MAN1_GUN_THREATENED_1, + SFX_B_MAN1_GUN_THREATENED_2, + SFX_B_MAN1_JACKED_CAR_1, + SFX_B_MAN1_JACKED_CAR_2, + SFX_B_MAN1_JACKED_CAR_3, + SFX_B_MAN1_SHOCKED_1, + SFX_B_MAN2_BUMP_1, + SFX_B_MAN2_BUMP_2, + SFX_B_MAN2_BUMP_3, + SFX_B_MAN2_CHAT_1, + SFX_B_MAN2_CHAT_2, + SFX_B_MAN2_CHAT_3, + SFX_B_MAN2_CHAT_4, + SFX_B_MAN2_CRASH_CAR_1, + SFX_B_MAN2_CRASH_CAR_2, + SFX_B_MAN2_DODGE_1, + SFX_B_MAN2_DODGE_2, + SFX_B_MAN2_DRIVER_BLOCKED_1, + SFX_B_MAN2_DRIVER_BLOCKED_2, + SFX_B_MAN2_FIGHT_1, + SFX_B_MAN2_FIGHT_2, + SFX_B_MAN2_FIGHT_3, + SFX_B_MAN2_GUN_THREATENED_1, + SFX_B_MAN2_GUN_THREATENED_2, + SFX_B_MAN2_JACKED_CAR_1, + SFX_B_MAN2_JACKED_CAR_2, + SFX_B_MAN2_JACKED_CAR_3, + SFX_B_MAN2_SHOCKED_1, + SFX_B_MAN3_BUMP_1, + SFX_B_MAN3_BUMP_2, + SFX_B_MAN3_BUMP_3, + SFX_B_MAN3_CHAT_1, + SFX_B_MAN3_CHAT_2, + SFX_B_MAN3_CHAT_3, + SFX_B_MAN3_CHAT_4, + SFX_B_MAN3_CHAT_5, + SFX_B_MAN3_CRASH_CAR_1, + SFX_B_MAN3_CRASH_CAR_2, + SFX_B_MAN3_DODGE_1, + SFX_B_MAN3_DODGE_2, + SFX_B_MAN3_DRIVER_BLOCKED_1, + SFX_B_MAN3_DRIVER_BLOCKED_2, + SFX_B_MAN3_FIGHT_1, + SFX_B_MAN3_FIGHT_2, + SFX_B_MAN3_FIGHT_3, + SFX_B_MAN3_FIGHT_4, + SFX_B_MAN3_GUN_THREATENED_1, + SFX_B_MAN3_GUN_THREATENED_2, + SFX_B_MAN3_JACKED_CAR_1, + SFX_B_MAN3_JACKED_CAR_2, + SFX_B_MAN3_JACKED_CAR_3, + SFX_B_MAN3_SHOCKED_1, + SFX_B_WOM1_BUMP_1, + SFX_B_WOM1_BUMP_2, + SFX_B_WOM1_BUMP_3, + SFX_B_WOM1_CHAT_1, + SFX_B_WOM1_CHAT_2, + SFX_B_WOM1_CHAT_3, + SFX_B_WOM1_CRASH_CAR_1, + SFX_B_WOM1_CRASH_CAR_2, + SFX_B_WOM1_DODGE_1, + SFX_B_WOM1_DODGE_2, + SFX_B_WOM1_DRIVER_BLOCKED_1, + SFX_B_WOM1_DRIVER_BLOCKED_2, + SFX_B_WOM1_FIGHT_1, + SFX_B_WOM1_FIGHT_2, + SFX_B_WOM1_FIGHT_3, + SFX_B_WOM1_GUN_THREATENED_1, + SFX_B_WOM1_GUN_THREATENED_2, + SFX_B_WOM1_JACKED_CAR_1, + SFX_B_WOM1_JACKED_CAR_2, + SFX_B_WOM1_JACKED_CAR_3, + SFX_B_WOM1_SHOCKED_1, + SFX_B_WOM2_BUMP_1, + SFX_B_WOM2_BUMP_2, + SFX_B_WOM2_BUMP_3, + SFX_B_WOM2_CHAT_1, + SFX_B_WOM2_CHAT_2, + SFX_B_WOM2_CHAT_3, + SFX_B_WOM2_CHAT_4, + SFX_B_WOM2_CRASH_CAR_1, + SFX_B_WOM2_CRASH_CAR_2, + SFX_B_WOM2_DODGE_1, + SFX_B_WOM2_DODGE_2, + SFX_B_WOM2_DODGE_3, + SFX_B_WOM2_DRIVER_BLOCKED_1, + SFX_B_WOM2_DRIVER_BLOCKED_2, + SFX_B_WOM2_FIGHT_1, + SFX_B_WOM2_FIGHT_2, + SFX_B_WOM2_FIGHT_3, + SFX_B_WOM2_GUN_THREATENED_1, + SFX_B_WOM2_GUN_THREATENED_2, + SFX_B_WOM2_JACKED_CAR_1, + SFX_B_WOM2_JACKED_CAR_2, + SFX_B_WOM2_JACKED_CAR_3, + SFX_B_WOM2_SHOCKED_1, + SFX_B_WOM3_BUMP_1, + SFX_B_WOM3_BUMP_2, + SFX_B_WOM3_BUMP_3, + SFX_B_WOM3_CHAT_1, + SFX_B_WOM3_CHAT_2, + SFX_B_WOM3_CHAT_3, + SFX_B_WOM3_CRASH_CAR_1, + SFX_B_WOM3_CRASH_CAR_2, + SFX_B_WOM3_DODGE_1, + SFX_B_WOM3_DODGE_2, + SFX_B_WOM3_DRIVER_BLOCKED_1, + SFX_B_WOM3_DRIVER_BLOCKED_2, + SFX_B_WOM3_FIGHT_1, + SFX_B_WOM3_FIGHT_2, + SFX_B_WOM3_FIGHT_3, + SFX_B_WOM3_GUN_THREATENED_1, + SFX_B_WOM3_GUN_THREATENED_2, + SFX_B_WOM3_JACKED_CAR_1, + SFX_B_WOM3_JACKED_CAR_2, + SFX_B_WOM3_JACKED_CAR_3, + SFX_B_WOM3_SHOCKED_1, + SFX_CAD1_AA, + SFX_CAD1_AB, + SFX_CAD1_AC, + SFX_CAD1_AD, + SFX_CAD1_AE, + SFX_CAD2_AA, + SFX_CAD2_AB, + SFX_CAD2_AC, + SFX_CAD2_AD, + SFX_CAD2_AE, + SFX_CAD2_AF, + SFX_CAD3_AA, + SFX_CAD3_AB, + SFX_CAD3_AC, + SFX_CAD3_AD, + SFX_CAD3_AE, + SFX_CAD3_AF, + SFX_CAD4_AA, + SFX_CAD4_AB, + SFX_CAD4_AC, + SFX_CAD4_AD, + SFX_CAD4_AE, + SFX_CAD4_AF, + SFX_CAD5_AA, + SFX_CAD5_AB, + SFX_CAD5_AC, + SFX_CAD5_AD, + SFX_CAD5_AE, + SFX_CAD5_AF, + SFX_CAD6_AA, + SFX_CAD6_AB, + SFX_CAD6_AC, + SFX_CAD6_AD, + SFX_CAD6_AE, + SFX_CAD6_AF, + SFX_CAD7_AB, + SFX_CAD7_AC, + SFX_CAD7_AD, + SFX_CAD7_AE, + SFX_CAD8_AB, + SFX_CAD8_AC, + SFX_CAD8_AD, + SFX_CAD8_AE, + SFX_CAD8_AF, + SFX_CAD9_AA, + SFX_CAD9_AB, + SFX_CAD9_AC, + SFX_CAD9_AD, + SFX_CAD9_AE, + SFX_CAD9_AF, + SFX_CSHUTR, + SFX_CAMP_MAN_BUMP_1, + SFX_CAMP_MAN_BUMP_2, + SFX_CAMP_MAN_BUMP_3, + SFX_CAMP_MAN_CHAT_1, + SFX_CAMP_MAN_CHAT_2, + SFX_CAMP_MAN_CHAT_3, + SFX_CAMP_MAN_CHAT_4, + SFX_CAMP_MAN_CRASH_CAR_1, + SFX_CAMP_MAN_CRASH_CAR_2, + SFX_CAMP_MAN_CRASH_CAR_3, + SFX_CAMP_MAN_DODGE_1, + SFX_CAMP_MAN_DODGE_2, + SFX_CAMP_MAN_DRIVER_BLOCKED_1, + SFX_CAMP_MAN_DRIVER_BLOCKED_2, + SFX_CAMP_MAN_DRIVER_BLOCKED_3, + SFX_CAMP_MAN_FIGHT_1, + SFX_CAMP_MAN_FIGHT_2, + SFX_CAMP_MAN_FIGHT_3, + SFX_CAMP_MAN_GUN_THREATENED_1, + SFX_CAMP_MAN_GUN_THREATENED_2, + SFX_CAMP_MAN_JACKED_CAR_1, + SFX_CAMP_MAN_JACKED_CAR_2, + SFX_CAMP_MAN_JACKED_CAR_3, + SFX_CAMP_MAN_SHOCKED_1, + SFX_CAMP_WOM_BUMP_1, + SFX_CAMP_WOM_BUMP_2, + SFX_CAMP_WOM_BUMP_3, + SFX_CAMP_WOM_CHAT_1, + SFX_CAMP_WOM_CHAT_2, + SFX_CAMP_WOM_CHAT_3, + SFX_CAMP_WOM_CHAT_4, + SFX_CAMP_WOM_CHAT_5, + SFX_CAMP_WOM_CRASH_CAR_1, + SFX_CAMP_WOM_CRASH_CAR_2, + SFX_CAMP_WOM_DODGE_1, + SFX_CAMP_WOM_DODGE_2, + SFX_CAMP_WOM_DRIVER_BLOCKED_1, + SFX_CAMP_WOM_DRIVER_BLOCKED_2, + SFX_CAMP_WOM_FIGHT_1, + SFX_CAMP_WOM_FIGHT_2, + SFX_CAMP_WOM_FIGHT_3, + SFX_CAMP_WOM_GUN_THREATENED_1, + SFX_CAMP_WOM_GUN_THREATENED_2, + SFX_CAMP_WOM_JACKED_CAR_1, + SFX_CAMP_WOM_JACKED_CAR_2, + SFX_CAMP_WOM_JACKED_CAR_3, + SFX_CAMP_WOM_SHOCKED_1, + SFX_CAS_MAN_BUMP_1, + SFX_CAS_MAN_BUMP_2, + SFX_CAS_MAN_BUMP_3, + SFX_CAS_MAN_CHAT_1, + SFX_CAS_MAN_CHAT_2, + SFX_CAS_MAN_CHAT_3, + SFX_CAS_MAN_CHAT_4, + SFX_CAS_MAN_CRASH_CAR_1, + SFX_CAS_MAN_CRASH_CAR_2, + SFX_CAS_MAN_DODGE_1, + SFX_CAS_MAN_DODGE_2, + SFX_CAS_MAN_DRIVER_BLOCKED_1, + SFX_CAS_MAN_DRIVER_BLOCKED_2, + SFX_CAS_MAN_FIGHT_1, + SFX_CAS_MAN_FIGHT_2, + SFX_CAS_MAN_FIGHT_3, + SFX_CAS_MAN_GUN_THREATENED_1, + SFX_CAS_MAN_GUN_THREATENED_2, + SFX_CAS_MAN_JACKED_CAR_1, + SFX_CAS_MAN_JACKED_CAR_2, + SFX_CAS_MAN_JACKED_CAR_3, + SFX_CAS_MAN_SHOCKED_1, + SFX_CAS_WOM_BUMP_1, + SFX_CAS_WOM_BUMP_2, + SFX_CAS_WOM_BUMP_3, + SFX_CAS_WOM_CHAT_1, + SFX_CAS_WOM_CHAT_2, + SFX_CAS_WOM_CHAT_3, + SFX_CAS_WOM_CHAT_4, + SFX_CAS_WOM_CRASH_CAR_1, + SFX_CAS_WOM_CRASH_CAR_2, + SFX_CAS_WOM_DODGE_1, + SFX_CAS_WOM_DODGE_2, + SFX_CAS_WOM_DRIVER_BLOCKED_1, + SFX_CAS_WOM_DRIVER_BLOCKED_2, + SFX_CAS_WOM_FIGHT_1, + SFX_CAS_WOM_FIGHT_2, + SFX_CAS_WOM_FIGHT_3, + SFX_CAS_WOM_GUN_THREATENED_1, + SFX_CAS_WOM_GUN_THREATENED_2, + SFX_CAS_WOM_JACKED_CAR_1, + SFX_CAS_WOM_JACKED_CAR_2, + SFX_CAS_WOM_JACKED_CAR_3, + SFX_CAS_WOM_SHOCKED_1, + SFX_CAS_WOM_SPECIAL_CASE_1, + SFX_CAS_WOM_SPECIAL_CASE_2, + SFX_CAS_WOM_SPECIAL_CASE_3, + SFX_CHOP_1, + SFX_CHOP_2, + SFX_CLICK, + SFX_COLT_45, + SFX_CONST1_BUMP_1, + SFX_CONST1_BUMP_2, + SFX_CONST1_CHAT_1, + SFX_CONST1_CHAT_3, + SFX_CONST1_CHAT_4, + SFX_CONST1_CRASH_CAR_1, + SFX_CONST1_CRASH_CAR_2, + SFX_CONST1_DODGE_1, + SFX_CONST1_DODGE_2, + SFX_CONST1_DRIVER_BLOCKED_1, + SFX_CONST1_DRIVER_BLOCKED_2, + SFX_CONST1_FIGHT_1, + SFX_CONST1_FIGHT_2, + SFX_CONST1_FIGHT_3, + SFX_CONST1_GUN_THREATENED_1, + SFX_CONST1_GUN_THREATENED_2, + SFX_CONST1_JACKED_CAR_1, + SFX_CONST1_JACKED_CAR_2, + SFX_CONST1_JACKED_CAR_3, + SFX_CONST1_SHOCKED_1, + SFX_CONST1_SPECIAL_CASE_1, + SFX_CONST1_SPECIAL_CASE_2, + SFX_CONST1_SPECIAL_CASE_3, + SFX_CONST2_BUMP_1, + SFX_CONST2_BUMP_2, + SFX_CONST2_BUMP_3, + SFX_CONST2_CHAT_1, + SFX_CONST2_CHAT_2, + SFX_CONST2_CHAT_3, + SFX_CONST2_CHAT_4, + SFX_CONST2_CRASH_CAR_1, + SFX_CONST2_CRASH_CAR_2, + SFX_CONST2_DODGE_1, + SFX_CONST2_DODGE_2, + SFX_CONST2_DRIVER_BLOCKED_1, + SFX_CONST2_DRIVER_BLOCKED_2, + SFX_CONST2_FIGHT_1, + SFX_CONST2_FIGHT_2, + SFX_CONST2_FIGHT_3, + SFX_CONST2_GUN_THREATENED_1, + SFX_CONST2_GUN_THREATENED_2, + SFX_CONST2_JACKED_CAR_1, + SFX_CONST2_JACKED_CAR_2, + SFX_CONST2_SHOCKED_1, + SFX_COP1_ARREST_1, + SFX_COP1_ARREST_2, + SFX_COP1_BUMP_1, + SFX_COP1_BUMP_2, + SFX_COP1_BUMP_3, + SFX_COP1_CHASE_FOOT_1, + SFX_COP1_CHASE_FOOT_2, + SFX_COP1_CHASE_FOOT_3, + SFX_COP1_CHASE_FOOT_4, + SFX_COP1_CHASE_FOOT_5, + SFX_COP1_CHASE_FOOT_6, + SFX_COP1_DODGE_1, + SFX_COP1_DODGE_2, + SFX_COP1_FIGHT_1, + SFX_COP1_FIGHT_2, + SFX_COP1_FIGHT_3, + SFX_COP1_SHOOT_1, + SFX_COP1_SHOOT_2, + SFX_COP1_SHOOT_3, + SFX_COP1_SHOOT_4, + SFX_COP1_SHOOT_5, + SFX_COP1_SHOOT_6, + SFX_COP2_ARREST_1, + SFX_COP2_ARREST_2, + SFX_COP2_BUMP_1, + SFX_COP2_BUMP_2, + SFX_COP2_BUMP_3, + SFX_COP2_CHASE_FOOT_1, + SFX_COP2_CHASE_FOOT_2, + SFX_COP2_CHASE_FOOT_3, + SFX_COP2_CHASE_FOOT_4, + SFX_COP2_CHASE_FOOT_5, + SFX_COP2_CHASE_FOOT_6, + SFX_COP2_DODGE_1, + SFX_COP2_DODGE_2, + SFX_COP2_FIGHT_1, + SFX_COP2_FIGHT_2, + SFX_COP2_FIGHT_3, + SFX_COP2_SHOOT_1, + SFX_COP2_SHOOT_2, + SFX_COP2_SHOOT_3, + SFX_COP2_SHOOT_4, + SFX_COP2_SHOOT_5, + SFX_COP2_SHOOT_6, + SFX_COP3_ARREST_1, + SFX_COP3_ARREST_2, + SFX_COP3_BUMP_1, + SFX_COP3_BUMP_2, + SFX_COP3_BUMP_3, + SFX_COP3_CHASE_FOOT_1, + SFX_COP3_CHASE_FOOT_2, + SFX_COP3_CHASE_FOOT_3, + SFX_COP3_CHASE_FOOT_4, + SFX_COP3_CHASE_FOOT_5, + SFX_COP3_CHASE_FOOT_6, + SFX_COP3_DODGE_1, + SFX_COP3_DODGE_2, + SFX_COP3_FIGHT_1, + SFX_COP3_FIGHT_2, + SFX_COP3_FIGHT_3, + SFX_COP3_SHOOT_1, + SFX_COP3_SHOOT_2, + SFX_COP3_SHOOT_3, + SFX_COP3_SHOOT_4, + SFX_COP3_SHOOT_5, + SFX_COP3_SHOOT_6, + SFX_COP4_ARREST_1, + SFX_COP4_ARREST_2, + SFX_COP4_BUMP_1, + SFX_COP4_BUMP_2, + SFX_COP4_BUMP_3, + SFX_COP4_CHASE_FOOT_1, + SFX_COP4_CHASE_FOOT_2, + SFX_COP4_CHASE_FOOT_3, + SFX_COP4_CHASE_FOOT_4, + SFX_COP4_CHASE_FOOT_5, + SFX_COP4_CHASE_FOOT_6, + SFX_COP4_DODGE_1, + SFX_COP4_DODGE_2, + SFX_COP4_FIGHT_1, + SFX_COP4_FIGHT_2, + SFX_COP4_FIGHT_3, + SFX_COP4_SHOOT_1, + SFX_COP4_SHOOT_2, + SFX_COP4_SHOOT_3, + SFX_COP4_SHOOT_4, + SFX_COP4_SHOOT_5, + SFX_COP4_SHOOT_6, + SFX_COP5_ARREST_1, + SFX_COP5_ARREST_2, + SFX_COP5_BUMP_1, + SFX_COP5_BUMP_2, + SFX_COP5_BUMP_3, + SFX_COP5_CHASE_FOOT_1, + SFX_COP5_CHASE_FOOT_2, + SFX_COP5_CHASE_FOOT_3, + SFX_COP5_CHASE_FOOT_4, + SFX_COP5_CHASE_FOOT_5, + SFX_COP5_CHASE_FOOT_6, + SFX_COP5_DODGE_1, + SFX_COP5_DODGE_2, + SFX_COP5_FIGHT_1, + SFX_COP5_FIGHT_2, + SFX_COP5_FIGHT_3, + SFX_COP5_SHOOT_1, + SFX_COP5_SHOOT_2, + SFX_COP5_SHOOT_3, + SFX_COP5_SHOOT_4, + SFX_COP5_SHOOT_5, + SFX_COP5_SHOOT_6, + SFX_COP6_ARREST_1, + SFX_COP6_ARREST_2, + SFX_COP6_BUMP_1, + SFX_COP6_BUMP_2, + SFX_COP6_BUMP_3, + SFX_COP6_CHASE_FOOT_1, + SFX_COP6_CHASE_FOOT_2, + SFX_COP6_CHASE_FOOT_3, + SFX_COP6_CHASE_FOOT_4, + SFX_COP6_CHASE_FOOT_5, + SFX_COP6_CHASE_FOOT_6, + SFX_COP6_DODGE_1, + SFX_COP6_DODGE_2, + SFX_COP6_FIGHT_1, + SFX_COP6_FIGHT_2, + SFX_COP6_FIGHT_3, + SFX_COP6_SHOOT_1, + SFX_COP6_SHOOT_2, + SFX_COP6_SHOOT_3, + SFX_COP6_SHOOT_4, + SFX_COP6_SHOOT_5, + SFX_COP6_SHOOT_6, + SFX_CRIMINAL01_BUMP_1, + SFX_CRIMINAL01_BUMP_2, + SFX_CRIMINAL01_BUMP_3, + SFX_CRIMINAL01_CHAT_1, + SFX_CRIMINAL01_CHAT_2, + SFX_CRIMINAL01_CHAT_3, + SFX_CRIMINAL01_CHAT_4, + SFX_CRIMINAL01_CRASH_CAR_1, + SFX_CRIMINAL01_CRASH_CAR_2, + SFX_CRIMINAL01_DODGE_1, + SFX_CRIMINAL01_DODGE_2, + SFX_CRIMINAL01_DRIVER_BLOCKED_1, + SFX_CRIMINAL01_DRIVER_BLOCKED_2, + SFX_CRIMINAL01_FIGHT_1, + SFX_CRIMINAL01_FIGHT_2, + SFX_CRIMINAL01_FIGHT_3, + SFX_CRIMINAL01_GUN_THREATENED_1, + SFX_CRIMINAL01_GUN_THREATENED_2, + SFX_CRIMINAL01_JACKED_CAR_1, + SFX_CRIMINAL01_JACKED_CAR_2, + SFX_CRIMINAL01_JACKED_CAR_3, + SFX_CRIMINAL01_SHOCKED_1, + SFX_CRIMINAL02_BUMP_1, + SFX_CRIMINAL02_BUMP_2, + SFX_CRIMINAL02_BUMP_3, + SFX_CRIMINAL02_CHAT_1, + SFX_CRIMINAL02_CHAT_2, + SFX_CRIMINAL02_CHAT_3, + SFX_CRIMINAL02_CHAT_4, + SFX_CRIMINAL02_CRASH_CAR_1, + SFX_CRIMINAL02_CRASH_CAR_2, + SFX_CRIMINAL02_DODGE_1, + SFX_CRIMINAL02_DODGE_2, + SFX_CRIMINAL02_DRIVER_BLOCKED_1, + SFX_CRIMINAL02_DRIVER_BLOCKED_2, + SFX_CRIMINAL02_FIGHT_1, + SFX_CRIMINAL02_FIGHT_2, + SFX_CRIMINAL02_FIGHT_3, + SFX_CRIMINAL02_GUN_THREATENED_1, + SFX_CRIMINAL02_GUN_THREATENED_2, + SFX_CRIMINAL02_JACKED_CAR_1, + SFX_CRIMINAL02_JACKED_CAR_2, + SFX_CRIMINAL02_JACKED_CAR_3, + SFX_CRIMINAL02_SHOCKED_1, + SFX_CRIMINAL02_SPECIAL_CASE_1, + SFX_CRIMINAL02_SPECIAL_CASE_2, + SFX_CT_MAN1_BUMP_1, + SFX_CT_MAN1_BUMP_2, + SFX_CT_MAN1_BUMP_3, + SFX_CT_MAN1_CHAT_1, + SFX_CT_MAN1_CHAT_2, + SFX_CT_MAN1_CHAT_3, + SFX_CT_MAN1_CHAT_4, + SFX_CT_MAN1_CRASH_CAR_1, + SFX_CT_MAN1_CRASH_CAR_2, + SFX_CT_MAN1_DODGE_1, + SFX_CT_MAN1_DODGE_2, + SFX_CT_MAN1_DRIVER_BLOCKED_1, + SFX_CT_MAN1_DRIVER_BLOCKED_2, + SFX_CT_MAN1_FIGHT_1, + SFX_CT_MAN1_FIGHT_2, + SFX_CT_MAN1_FIGHT_3, + SFX_CT_MAN1_GUN_THREATENED_1, + SFX_CT_MAN1_GUN_THREATENED_2, + SFX_CT_MAN1_JACKED_CAR_1, + SFX_CT_MAN1_JACKED_CAR_2, + SFX_CT_MAN1_JACKED_CAR_3, + SFX_CT_MAN1_SHOCKED_1, + SFX_CT_MAN1_SPECIAL_CASE_1, + SFX_CT_MAN1_SPECIAL_CASE_2, + SFX_CT_MAN1_SPECIAL_CASE_3, + SFX_CT_MAN2_BUMP_1, + SFX_CT_MAN2_BUMP_2, + SFX_CT_MAN2_BUMP_3, + SFX_CT_MAN2_CHAT_1, + SFX_CT_MAN2_CHAT_2, + SFX_CT_MAN2_CHAT_3, + SFX_CT_MAN2_CHAT_4, + SFX_CT_MAN2_CRASH_CAR_1, + SFX_CT_MAN2_CRASH_CAR_2, + SFX_CT_MAN2_DODGE_1, + SFX_CT_MAN2_DODGE_2, + SFX_CT_MAN2_DRIVER_BLOCKED_1, + SFX_CT_MAN2_DRIVER_BLOCKED_2, + SFX_CT_MAN2_FIGHT_1, + SFX_CT_MAN2_FIGHT_2, + SFX_CT_MAN2_FIGHT_3, + SFX_CT_MAN2_GUN_THREATENED_1, + SFX_CT_MAN2_GUN_THREATENED_2, + SFX_CT_MAN2_JACKED_CAR_1, + SFX_CT_MAN2_JACKED_CAR_2, + SFX_CT_MAN2_JACKED_CAR_3, + SFX_CT_MAN2_SHOCKED_1, + SFX_CT_WOM1_BUMP_1, + SFX_CT_WOM1_BUMP_2, + SFX_CT_WOM1_BUMP_3, + SFX_CT_WOM1_CHAT_1, + SFX_CT_WOM1_CHAT_2, + SFX_CT_WOM1_CHAT_3, + SFX_CT_WOM1_CHAT_4, + SFX_CT_WOM1_CRASH_CAR_1, + SFX_CT_WOM1_CRASH_CAR_2, + SFX_CT_WOM1_DODGE_1, + SFX_CT_WOM1_DODGE_2, + SFX_CT_WOM1_DRIVER_BLOCKED_1, + SFX_CT_WOM1_DRIVER_BLOCKED_2, + SFX_CT_WOM1_FIGHT_1, + SFX_CT_WOM1_FIGHT_2, + SFX_CT_WOM1_FIGHT_3, + SFX_CT_WOM1_GUN_THREATENED_1, + SFX_CT_WOM1_GUN_THREATENED_2, + SFX_CT_WOM1_JACKED_CAR_1, + SFX_CT_WOM1_JACKED_CAR_2, + SFX_CT_WOM1_JACKED_CAR_3, + SFX_CT_WOM1_SHOCKED_1, + SFX_CT_WOM2_BUMP_1, + SFX_CT_WOM2_BUMP_2, + SFX_CT_WOM2_BUMP_3, + SFX_CT_WOM2_CHAT_1, + SFX_CT_WOM2_CHAT_2, + SFX_CT_WOM2_CHAT_3, + SFX_CT_WOM2_CHAT_4, + SFX_CT_WOM2_CRASH_CAR_1, + SFX_CT_WOM2_CRASH_CAR_2, + SFX_CT_WOM2_DODGE_1, + SFX_CT_WOM2_DODGE_2, + SFX_CT_WOM2_DRIVER_BLOCKED_1, + SFX_CT_WOM2_DRIVER_BLOCKED_2, + SFX_CT_WOM2_FIGHT_1, + SFX_CT_WOM2_FIGHT_2, + SFX_CT_WOM2_FIGHT_3, + SFX_CT_WOM2_GUN_THREATENED_1, + SFX_CT_WOM2_GUN_THREATENED_2, + SFX_CT_WOM2_JACKED_CAR_1, + SFX_CT_WOM2_JACKED_CAR_2, + SFX_CT_WOM2_JACKED_CAR_3, + SFX_CT_WOM2_SHOCKED_1, + SFX_DOCKER_BUMP_1, + SFX_DOCKER_BUMP_2, + SFX_DOCKER_BUMP_3, + SFX_DOCKER_CHAT_1, + SFX_DOCKER_CHAT_2, + SFX_DOCKER_CHAT_3, + SFX_DOCKER_CHAT_4, + SFX_DOCKER_CRASH_CAR_1, + SFX_DOCKER_CRASH_CAR_2, + SFX_DOCKER_DODGE_1, + SFX_DOCKER_DODGE_2, + SFX_DOCKER_DRIVER_BLOCKED_1, + SFX_DOCKER_DRIVER_BLOCKED_2, + SFX_DOCKER_FIGHT_1, + SFX_DOCKER_FIGHT_2, + SFX_DOCKER_FIGHT_3, + SFX_DOCKER_GUN_THREATENED_1, + SFX_DOCKER_GUN_THREATENED_2, + SFX_DOCKER_JACKED_CAR_1, + SFX_DOCKER_JACKED_CAR_2, + SFX_DOCKER_JACKED_CAR_3, + SFX_DOCKER_SHOCKED_1, + SFX_DOCKER_SPECIAL_CASE_1, + SFX_DOCKER_SPECIAL_CASE_2, + SFX_DOCKER_SPECIAL_CASE_3, + SFX_DONALD_CRASH_CAR_1, + SFX_DONALD_CRASH_CAR_2, + SFX_DONALD_CRASH_CAR_3, + SFX_DONALD_DRIVER_BLOCKED_1, + SFX_DONALD_DRIVER_BLOCKED_2, + SFX_DONALD_JACKED_CAR_1, + SFX_DONALD_JACKED_CAR_2, + SFX_DONALD_JACKED_CAR_3, + SFX_DONALD_SHOCKED_1, + SFX_DONALD_SHOCKED_2, + SFX_DONH1CA, + SFX_DONH1DA, + SFX_DONH1DB, + SFX_DONH1EA, + SFX_DONH1EB, + SFX_DONH1EC, + SFX_DONH1ED, + SFX_DONH1EE, + SFX_DONH1FA, + SFX_DONH1GA, + SFX_DONH1GB, + SFX_DONH1GC, + SFX_DONH1HA, + SFX_DONH1IA, + SFX_DONH1IB, + SFX_DONH1JA, + SFX_DONH1JB, + SFX_DONH1JC, + SFX_DONH1JD, + SFX_DONH1JE, + SFX_DONH2AA, + SFX_DONH2AB, + SFX_DONH2AC, + SFX_DONH2AD, + SFX_DONH2AF, + SFX_DONH2AG, + SFX_DONH2AH, + SFX_DONH2BA, + SFX_DONH2BB, + SFX_DONH2BC, + SFX_DONH2BD, + SFX_DONH2BE, + SFX_DONH2BF, + SFX_DONH2BG, + SFX_DONH2BH, + SFX_DONH2BI, + SFX_DONH2BJ, + SFX_DONH2BK, + SFX_DONH2BL, + SFX_DONH2CA, + SFX_DONH2CB, + SFX_DONH2CC, + SFX_DONH2CD, + SFX_DONH2CE, + SFX_DONH2CF, + SFX_DONH2CG, + SFX_DONH2DA, + SFX_DONH2DB, + SFX_DONH2DC, + SFX_DONH2EA, + SFX_DONH2EC, + SFX_DONH3AA, + SFX_DONH3AB, + SFX_DONH3AC, + SFX_DONH3AD, + SFX_DONH3AE, + SFX_DONH3AF, + SFX_DONH3AG, + SFX_DONH3AH, + SFX_DONH3AI, + SFX_DONH3BA, + SFX_DONH3BB, + SFX_DONH3CA, + SFX_DONH3DA, + SFX_DONH3EA, + SFX_DONH3EB, + SFX_DONH3EC, + SFX_DONH3ED, + SFX_DONH3EE, + SFX_DONH3EF, + SFX_DONH3FA, + SFX_DONH3GA, + SFX_DONH3GB, + SFX_DONH3GC, + SFX_DONH3GD, + SFX_DONH3GE, + SFX_DONH3GF, + SFX_DONH3HA, + SFX_DONH3HB, + SFX_DONH3IA, + SFX_DONH3JA, + SFX_DONH4AA, + SFX_DONH4AB, + SFX_DONH4AC, + SFX_DONH4AD, + SFX_DONH4AE, + SFX_DONH4AF, + SFX_DONH4AG, + SFX_DONH4AH, + SFX_DONH4AI, + SFX_DONH4AJ, + SFX_DONH5AA, + SFX_DONH5AB, + SFX_DONH5AC, + SFX_DONH5AD, + SFX_DONH5AE, + SFX_DONH5AF, + SFX_DONH5AG, + SFX_DONH5AH, + SFX_DONH5AI, + SFX_DONH5AJ, + SFX_DONH5BA, + SFX_DONH5CA, + SFX_DONH5CB, + SFX_DONH6BA, + SFX_DONH6CA, + SFX_DONH6CB, + SFX_DONH6DA, + SFX_DONH6DB, + SFX_DONH6EA, + SFX_DONH6EB, + SFX_DONH6EC, + SFX_DONH6FA, + SFX_DONH6GA, + SFX_DONH6GB, + SFX_DONH6GC, + SFX_DONH6GD, + SFX_DONH6GF, + SFX_DONS1AA, + SFX_DONS1AB, + SFX_DONS1AC, + SFX_DONS1BA, + SFX_DONS1BB, + SFX_DONS2AA, + SFX_DONS2AB, + SFX_DONS2AC, + SFX_DONS2AD, + SFX_DONS2AE, + SFX_DONS2AF, + SFX_DONS2BA, + SFX_DONS2BB, + SFX_DONS2BC, + SFX_DONS2BD, + SFX_DONS2BE, + SFX_DONS2CA, + SFX_DONS2CB, + SFX_DONS2CC, + SFX_DONS2CD, + SFX_DONS2CE, + SFX_DONS2CF, + SFX_DONS2CG, + SFX_DONS2CH, + SFX_DONS2CI, + SFX_DONS2CJ, + SFX_DONS2CK, + SFX_DONS2CL, + SFX_DONS2CM, + SFX_DONS2CN, + SFX_DONS4AA, + SFX_DONS4AB, + SFX_DONS4AC, + SFX_DONS4AD, + SFX_DONS4AE, + SFX_DONS4AF, + SFX_DONS5AA, + SFX_DONS5AB, + SFX_DONS5AC, + SFX_DONS5AD, + SFX_DONS5AE, + SFX_DONS5BA, + SFX_DONS5BB, + SFX_DONS5BC, + SFX_DONS5BD, + SFX_DONS5BE, + SFX_DONS5CA, + SFX_DONS5DA, + SFX_DONS5EA, + SFX_DONS5EB, + SFX_DONS6AA, + SFX_DONS6AB, + SFX_DONS6AC, + SFX_DONS6AD, + SFX_DONS6AE, + SFX_DONS6AF, + SFX_DONS6AG, + SFX_DONS7AA, + SFX_DONS7AB, + SFX_DONS7AC, + SFX_DONS7AD, + SFX_DONS7AE, + SFX_DONS7AF, + SFX_DONS7AG, + SFX_DONS7CA, + SFX_DONS7CB, + SFX_DONS7CC, + SFX_DONS7CD, + SFX_DONS7CE, + SFX_DRKNOCK, + SFX_FAN_MAN1_BUMP_1, + SFX_FAN_MAN1_BUMP_2, + SFX_FAN_MAN1_BUMP_3, + SFX_FAN_MAN1_CHAT_1, + SFX_FAN_MAN1_CHAT_2, + SFX_FAN_MAN1_CHAT_3, + SFX_FAN_MAN1_CHAT_4, + SFX_FAN_MAN1_CRASH_CAR_1, + SFX_FAN_MAN1_CRASH_CAR_2, + SFX_FAN_MAN1_DODGE_1, + SFX_FAN_MAN1_DRIVER_BLOCKED_1, + SFX_FAN_MAN1_DRIVER_BLOCKED_2, + SFX_FAN_MAN1_FIGHT_1, + SFX_FAN_MAN1_FIGHT_2, + SFX_FAN_MAN1_FIGHT_3, + SFX_FAN_MAN1_GUN_THREATENED_1, + SFX_FAN_MAN1_GUN_THREATENED_2, + SFX_FAN_MAN1_JACKED_CAR_1, + SFX_FAN_MAN1_JACKED_CAR_2, + SFX_FAN_MAN1_JACKED_CAR_3, + SFX_FAN_MAN1_SHOCKED_1, + SFX_FAN_MAN2_BUMP_1, + SFX_FAN_MAN2_BUMP_2, + SFX_FAN_MAN2_BUMP_3, + SFX_FAN_MAN2_CHAT_1, + SFX_FAN_MAN2_CHAT_2, + SFX_FAN_MAN2_CHAT_3, + SFX_FAN_MAN2_CHAT_4, + SFX_FAN_MAN2_CRASH_CAR_1, + SFX_FAN_MAN2_CRASH_CAR_2, + SFX_FAN_MAN2_DODGE_1, + SFX_FAN_MAN2_DODGE_2, + SFX_FAN_MAN2_DRIVER_BLOCKED_1, + SFX_FAN_MAN2_DRIVER_BLOCKED_2, + SFX_FAN_MAN2_FIGHT_1, + SFX_FAN_MAN2_FIGHT_2, + SFX_FAN_MAN2_FIGHT_3, + SFX_FAN_MAN2_GUN_THREATENED_1, + SFX_FAN_MAN2_GUN_THREATENED_2, + SFX_FAN_MAN2_JACKED_CAR_1, + SFX_FAN_MAN2_JACKED_CAR_2, + SFX_FAN_MAN2_JACKED_CAR_3, + SFX_FAN_MAN2_SHOCKED_1, + SFX_FAN_WOM_BUMP_1, + SFX_FAN_WOM_BUMP_2, + SFX_FAN_WOM_BUMP_3, + SFX_FAN_WOM_CHAT_1, + SFX_FAN_WOM_CHAT_2, + SFX_FAN_WOM_CHAT_3, + SFX_FAN_WOM_CHAT_4, + SFX_FAN_WOM_CRASH_CAR_1, + SFX_FAN_WOM_CRASH_CAR_2, + SFX_FAN_WOM_DODGE_1, + SFX_FAN_WOM_DODGE_2, + SFX_FAN_WOM_DRIVER_BLOCKED_1, + SFX_FAN_WOM_DRIVER_BLOCKED_2, + SFX_FAN_WOM_FIGHT_1, + SFX_FAN_WOM_FIGHT_2, + SFX_FAN_WOM_FIGHT_3, + SFX_FAN_WOM_GUN_THREATENED_1, + SFX_FAN_WOM_GUN_THREATENED_2, + SFX_FAN_WOM_JACKED_CAR_1, + SFX_FAN_WOM_JACKED_CAR_2, + SFX_FAN_WOM_JACKED_CAR_3, + SFX_FAN_WOM_SHOCKED_1, + SFX_FATFEMALE01_BUMP_1, + SFX_FATFEMALE01_BUMP_2, + SFX_FATFEMALE01_BUMP_3, + SFX_FATFEMALE01_CHAT_1, + SFX_FATFEMALE01_CHAT_2, + SFX_FATFEMALE01_CHAT_3, + SFX_FATFEMALE01_CHAT_4, + SFX_FATFEMALE01_CRASH_CAR_1, + SFX_FATFEMALE01_CRASH_CAR_2, + SFX_FATFEMALE01_DODGE_1, + SFX_FATFEMALE01_DODGE_2, + SFX_FATFEMALE01_DRIVER_BLOCKED_1, + SFX_FATFEMALE01_DRIVER_BLOCKED_2, + SFX_FATFEMALE01_FIGHT_1, + SFX_FATFEMALE01_FIGHT_2, + SFX_FATFEMALE01_FIGHT_3, + SFX_FATFEMALE01_FIGHT_4, + SFX_FATFEMALE01_GUN_THREATENED_1, + SFX_FATFEMALE01_GUN_THREATENED_2, + SFX_FATFEMALE01_JACKED_CAR_1, + SFX_FATFEMALE01_JACKED_CAR_2, + SFX_FATFEMALE01_JACKED_CAR_3, + SFX_FATFEMALE01_SHOCKED_1, + SFX_FATFEMALE02_BUMP_1, + SFX_FATFEMALE02_BUMP_2, + SFX_FATFEMALE02_BUMP_3, + SFX_FATFEMALE02_CHAT_1, + SFX_FATFEMALE02_CHAT_2, + SFX_FATFEMALE02_CHAT_3, + SFX_FATFEMALE02_CHAT_4, + SFX_FATFEMALE02_CRASH_CAR_1, + SFX_FATFEMALE02_CRASH_CAR_2, + SFX_FATFEMALE02_DODGE_1, + SFX_FATFEMALE02_DODGE_2, + SFX_FATFEMALE02_DRIVER_BLOCKED_1, + SFX_FATFEMALE02_DRIVER_BLOCKED_2, + SFX_FATFEMALE02_FIGHT_1, + SFX_FATFEMALE02_FIGHT_2, + SFX_FATFEMALE02_FIGHT_3, + SFX_FATFEMALE02_GUN_THREATENED_1, + SFX_FATFEMALE02_GUN_THREATENED_2, + SFX_FATFEMALE02_JACKED_CAR_1, + SFX_FATFEMALE02_JACKED_CAR_2, + SFX_FATFEMALE02_JACKED_CAR_3, + SFX_FATFEMALE02_SHOCKED_1, + SFX_FATMALE_BUMP_1, + SFX_FATMALE_BUMP_2, + SFX_FATMALE_BUMP_3, + SFX_FATMALE_CHAT_1, + SFX_FATMALE_CHAT_2, + SFX_FATMALE_CHAT_3, + SFX_FATMALE_CHAT_4, + SFX_FATMALE_CRASH_CAR_1, + SFX_FATMALE_CRASH_CAR_2, + SFX_FATMALE_DODGE_1, + SFX_FATMALE_DODGE_2, + SFX_FATMALE_DRIVER_BLOCKED_1, + SFX_FATMALE_DRIVER_BLOCKED_2, + SFX_FATMALE_FIGHT_1, + SFX_FATMALE_FIGHT_2, + SFX_FATMALE_FIGHT_3, + SFX_FATMALE_GUN_THREATENED_1, + SFX_FATMALE_GUN_THREATENED_2, + SFX_FATMALE_JACKED_CAR_1, + SFX_FATMALE_JACKED_CAR_2, + SFX_FATMALE_JACKED_CAR_3, + SFX_FATMALE_SHOCKED_1, + SFX_FBI_VOICE_1_SHOOT_1, + SFX_FBI_VOICE_1_SHOOT_2, + SFX_FBI_VOICE_1_SHOOT_3, + SFX_FBI_VOICE_1_SHOOT_4, + SFX_FBI_VOICE_1_SHOOT_5, + SFX_FBI_VOICE_1_VAN_1, + SFX_FBI_VOICE_1_VAN_2, + SFX_FBI_VOICE_2_SHOOT_1, + SFX_FBI_VOICE_2_SHOOT_2, + SFX_FBI_VOICE_2_SHOOT_3, + SFX_FBI_VOICE_2_SHOOT_4, + SFX_FBI_VOICE_2_SHOOT_5, + SFX_FBI_VOICE_2_VAN_1, + SFX_FBI_VOICE_2_VAN_2, + SFX_FEMALE01_BUMP_1, + SFX_FEMALE01_BUMP_2, + SFX_FEMALE01_BUMP_3, + SFX_FEMALE01_CHAT_1, + SFX_FEMALE01_CHAT_2, + SFX_FEMALE01_CHAT_3, + SFX_FEMALE01_CHAT_4, + SFX_FEMALE01_CRASH_CAR_1, + SFX_FEMALE01_CRASH_CAR_2, + SFX_FEMALE01_DODGE_1, + SFX_FEMALE01_DODGE_2, + SFX_FEMALE01_DRIVER_BLOCKED_1, + SFX_FEMALE01_DRIVER_BLOCKED_2, + SFX_FEMALE01_FIGHT_1, + SFX_FEMALE01_FIGHT_2, + SFX_FEMALE01_FIGHT_3, + SFX_FEMALE01_GUN_THREATENED_1, + SFX_FEMALE01_GUN_THREATENED_2, + SFX_FEMALE01_SHOCKED_1, + SFX_FEMALE01_SPECIAL_CASE_1, + SFX_FEMALE01_SPECIAL_CASE_2, + SFX_FEMALE01_SPECIAL_CASE_3, + SFX_FEMALE02_BUMP_1, + SFX_FEMALE02_BUMP_2, + SFX_FEMALE02_CHAT_1, + SFX_FEMALE02_CHAT_2, + SFX_FEMALE02_CHAT_3, + SFX_FEMALE02_CRASH_CAR_1, + SFX_FEMALE02_DODGE_1, + SFX_FEMALE02_DODGE_2, + SFX_FEMALE02_DRIVER_BLOCKED_1, + SFX_FEMALE02_DRIVER_BLOCKED_2, + SFX_FEMALE02_FIGHT_1, + SFX_FEMALE02_FIGHT_2, + SFX_FEMALE02_GUN_THREATENED_1, + SFX_FEMALE02_GUN_THREATENED_2, + SFX_FEMALE02_JACKED_CAR_1, + SFX_FEMALE02_JACKED_CAR_2, + SFX_FEMALE02_JACKED_CAR_3, + SFX_FEMALE02_SHOCKED_1, + SFX_FEMALE03_BUMP_1, + SFX_FEMALE03_BUMP_2, + SFX_FEMALE03_BUMP_3, + SFX_FEMALE03_CHAT_1, + SFX_FEMALE03_CHAT_2, + SFX_FEMALE03_CRASH_CAR_1, + SFX_FEMALE03_CRASH_CAR_2, + SFX_FEMALE03_CRASH_CAR_3, + SFX_FEMALE03_DODGE_1, + SFX_FEMALE03_DODGE_2, + SFX_FEMALE03_DRIVER_BLOCKED_1, + SFX_FEMALE03_FIGHT_1, + SFX_FEMALE03_FIGHT_2, + SFX_FEMALE03_FIGHT_3, + SFX_FEMALE03_GUN_THREATENED_1, + SFX_FEMALE03_GUN_THREATENED_2, + SFX_FEMALE03_JACKED_CAR_1, + SFX_FEMALE03_JACKED_CAR_2, + SFX_FEMALE03_JACKED_CAR_3, + SFX_FEMALE03_SHOCKED_1, + SFX_FEMALE_DEATH_01, + SFX_FEMALE_DEATH_02, + SFX_FEMALE_DEATH_03, + SFX_FEMALE_DEATH_04, + SFX_FEMALE_DEATH_05, + SFX_FEMALE_DEATH_06, + SFX_FEMALE_DEATH_07, + SFX_FEMALE_DEATH_08, + SFX_FEMALE_DEATH_09, + SFX_FEMALE_DEATH_10, + SFX_FEMALE_DEATH_11, + SFX_FEMALE_DEATH_12, + SFX_FEMALE_DEATH_13, + SFX_FEMALE_DEATH_14, + SFX_FEMALE_DEATH_15, + SFX_FEMALE_DEATH_16, + SFX_FEMALE_PAIN_01, + SFX_FEMALE_PAIN_02, + SFX_FEMALE_PAIN_03, + SFX_FEMALE_PAIN_04, + SFX_FEMALE_PAIN_05, + SFX_FEMALE_PAIN_06, + SFX_FEMALE_PAIN_07, + SFX_FEMALE_PAIN_08, + SFX_FEMALE_PAIN_09, + SFX_FEMALE_PAIN_10, + SFX_FEMALE_PAIN_11, + SFX_FEMALE_PAIN_12, + SFX_FEMALE_PAIN_13, + SFX_FEMALE_PAIN_14, + SFX_FEMALE_PAIN_15, + SFX_FEMALE_PAIN_16, + SFX_FEMALE_PAIN_17, + SFX_FEMALE_PAIN_18, + SFX_FEMALE_PAIN_19, + SFX_FEMALE_PAIN_20, + SFX_FEMALE_PAIN_21, + SFX_FEMALE_PAIN_22, + SFX_FEMALE_PAIN_23, + SFX_FEMALE_PAIN_24, + SFX_FEMALE_PAIN_25, + SFX_FEMALE_PAIN_26, + SFX_FEMALE_PAIN_27, + SFX_FEMALE_PAIN_28, + SFX_FEMALE_PAIN_29, + SFX_FEMALE_PAIN_30, + SFX_FEMALE_PAIN_31, + SFX_FEMALE_PAIN_32, + SFX_FEMALE_PAIN_33, + SFX_FEMALE_PAIN_34, + SFX_FEMALE_PAIN_ON_FIRE_01, + SFX_FEMALE_PAIN_ON_FIRE_02, + SFX_FEMALE_PAIN_ON_FIRE_03, + SFX_FEMALE_PAIN_ON_FIRE_04, + SFX_FEMALE_PAIN_ON_FIRE_05, + SFX_FEMALE_PAIN_ON_FIRE_06, + SFX_FEMALE_PAIN_ON_FIRE_07, + SFX_FEMALE_PAIN_ON_FIRE_08, + SFX_FEMALE_PAIN_ON_FIRE_09, + SFX_FEMALE_PAIN_ON_FIRE_10, + SFX_FEMALE_PAIN_ON_FIRE_11, + SFX_FEMALE_PANIC_01, + SFX_FEMALE_PANIC_02, + SFX_FEMALE_PANIC_03, + SFX_FEMALE_PANIC_04, + SFX_FEMALE_PANIC_05, + SFX_FEMALE_PANIC_06, + SFX_FEMALE_PANIC_07, + SFX_FEMALE_PANIC_08, + SFX_FEMALE_PANIC_09, + SFX_FEMALE_PANIC_10, + SFX_FEMALE_PANIC_11, + SFX_FEMALE_PANIC_12, + SFX_FEMALE_PANIC_13, + SFX_FEMALE_SEX_01, + SFX_FEMALE_SEX_02, + SFX_FEMALE_SEX_03, + SFX_FEMALE_SEX_04, + SFX_FEMALE_SEX_05, + SFX_FEMALE_SEX_06, + SFX_FEMALE_SEX_07, + SFX_FEMALE_SEX_08, + SFX_FEMALE_SEX_09, + SFX_FEMALE_SEX_10, + SFX_FEMALE_SEX_11, + SFX_GANG01_BUMP_1, + SFX_GANG01_BUMP_2, + SFX_GANG01_BUMP_3, + SFX_GANG01_CHAT_1, + SFX_GANG01_CHAT_2, + SFX_GANG01_CHAT_3, + SFX_GANG01_CRASH_CAR_1, + SFX_GANG01_CRASH_CAR_2, + SFX_GANG01_DODGE_1, + SFX_GANG01_DODGE_2, + SFX_GANG01_DRIVER_BLOCKED_1, + SFX_GANG01_DRIVER_BLOCKED_2, + SFX_GANG01_FIGHT_1, + SFX_GANG01_FIGHT_2, + SFX_GANG01_GUN_THREATENED_1, + SFX_GANG01_GUN_THREATENED_2, + SFX_GANG01_JACKED_CAR_1, + SFX_GANG01_JACKED_CAR_2, + SFX_GANG01_JACKING_1, + SFX_GANG01_JACKING_2, + SFX_GANG01_SHOOT_1, + SFX_GANG01_SHOOT_2, + SFX_GANG01_SHOOT_3, + SFX_GANG01_SHOOT_4, + SFX_GANG01_SHOOT_5, + SFX_GANG02_BUMP_1, + SFX_GANG02_BUMP_2, + SFX_GANG02_BUMP_3, + SFX_GANG02_CHAT_1, + SFX_GANG02_CHAT_2, + SFX_GANG02_CRASH_CAR_1, + SFX_GANG02_CRASH_CAR_2, + SFX_GANG02_DODGE_1, + SFX_GANG02_DODGE_2, + SFX_GANG02_DRIVER_BLOCKED_1, + SFX_GANG02_DRIVER_BLOCKED_2, + SFX_GANG02_FIGHT_1, + SFX_GANG02_FIGHT_2, + SFX_GANG02_GUN_THREATENED_1, + SFX_GANG02_GUN_THREATENED_2, + SFX_GANG02_JACKED_CAR_1, + SFX_GANG02_JACKED_CAR_2, + SFX_GANG02_JACKING_1, + SFX_GANG02_JACKING_2, + SFX_GANG02_SHOOT_1, + SFX_GANG02_SHOOT_2, + SFX_GANG02_SHOOT_3, + SFX_GANG02_SHOOT_4, + SFX_GANG02_SHOOT_5, + SFX_GANG03_BUMP_1, + SFX_GANG03_BUMP_2, + SFX_GANG03_BUMP_3, + SFX_GANG03_CHAT_1, + SFX_GANG03_CHAT_2, + SFX_GANG03_CHAT_3, + SFX_GANG03_CHAT_4, + SFX_GANG03_CRASH_CAR_1, + SFX_GANG03_CRASH_CAR_2, + SFX_GANG03_CRASH_CAR_3, + SFX_GANG03_DODGE_1, + SFX_GANG03_DODGE_2, + SFX_GANG03_DRIVER_BLOCKED_1, + SFX_GANG03_DRIVER_BLOCKED_2, + SFX_GANG03_FIGHT_1, + SFX_GANG03_FIGHT_2, + SFX_GANG03_FIGHT_3, + SFX_GANG03_GUN_THREATENED_1, + SFX_GANG03_GUN_THREATENED_2, + SFX_GANG03_JACKED_CAR_1, + SFX_GANG03_JACKED_CAR_2, + SFX_GANG03_SHOOT_1, + SFX_GANG03_SHOOT_2, + SFX_GANG03_SHOOT_3, + SFX_GANG03_SHOOT_4, + SFX_GANG04_BUMP_1, + SFX_GANG04_BUMP_2, + SFX_GANG04_BUMP_3, + SFX_GANG04_CHAT_1, + SFX_GANG04_CHAT_2, + SFX_GANG04_CRASH_CAR_1, + SFX_GANG04_CRASH_CAR_2, + SFX_GANG04_DODGE_1, + SFX_GANG04_DODGE_2, + SFX_GANG04_DRIVER_BLOCKED_1, + SFX_GANG04_DRIVER_BLOCKED_2, + SFX_GANG04_FIGHT_1, + SFX_GANG04_FIGHT_2, + SFX_GANG04_GUN_THREATENED_1, + SFX_GANG04_GUN_THREATENED_2, + SFX_GANG04_JACKED_CAR_1, + SFX_GANG04_JACKED_CAR_2, + SFX_GANG04_JACKING_1, + SFX_GANG04_JACKING_2, + SFX_GANG04_SHOOT_1, + SFX_GANG04_SHOOT_2, + SFX_GANG04_SHOOT_3, + SFX_GANG04_SHOOT_4, + SFX_GANG04_SHOOT_5, + SFX_GANG05_BUMP_1, + SFX_GANG05_BUMP_2, + SFX_GANG05_BUMP_3, + SFX_GANG05_CHAT_1, + SFX_GANG05_CHAT_2, + SFX_GANG05_CHAT_3, + SFX_GANG05_CRASH_CAR_1, + SFX_GANG05_CRASH_CAR_2, + SFX_GANG05_DODGE_1, + SFX_GANG05_DODGE_2, + SFX_GANG05_DRIVER_BLOCKED_1, + SFX_GANG05_DRIVER_BLOCKED_2, + SFX_GANG05_FIGHT_1, + SFX_GANG05_FIGHT_2, + SFX_GANG05_GUN_THREATENED_1, + SFX_GANG05_GUN_THREATENED_2, + SFX_GANG05_JACKED_CAR_1, + SFX_GANG05_JACKED_CAR_2, + SFX_GANG05_JACKING_1, + SFX_GANG05_JACKING_2, + SFX_GANG05_SHOOT_1, + SFX_GANG05_SHOOT_2, + SFX_GANG05_SHOOT_3, + SFX_GANG05_SHOOT_4, + SFX_GANG06_BUMP_1, + SFX_GANG06_BUMP_2, + SFX_GANG06_BUMP_3, + SFX_GANG06_CHAT_1, + SFX_GANG06_CHAT_2, + SFX_GANG06_CHAT_3, + SFX_GANG06_CRASH_CAR_1, + SFX_GANG06_CRASH_CAR_2, + SFX_GANG06_DODGE_1, + SFX_GANG06_DODGE_2, + SFX_GANG06_DRIVER_BLOCKED_1, + SFX_GANG06_DRIVER_BLOCKED_2, + SFX_GANG06_FIGHT_1, + SFX_GANG06_FIGHT_2, + SFX_GANG06_GUN_THREATENED_1, + SFX_GANG06_GUN_THREATENED_2, + SFX_GANG06_JACKED_CAR_1, + SFX_GANG06_JACKED_CAR_2, + SFX_GANG06_JACKING_1, + SFX_GANG06_JACKING_2, + SFX_GANG06_SHOOT_1, + SFX_GANG06_SHOOT_2, + SFX_GANG06_SHOOT_3, + SFX_GANG06_SHOOT_4, + SFX_GANG06_SHOOT_5, + SFX_GANG07_BUMP_1, + SFX_GANG07_BUMP_2, + SFX_GANG07_BUMP_3, + SFX_GANG07_CHAT_1, + SFX_GANG07_CHAT_2, + SFX_GANG07_CRASH_CAR_1, + SFX_GANG07_CRASH_CAR_2, + SFX_GANG07_DODGE_1, + SFX_GANG07_DODGE_2, + SFX_GANG07_DRIVER_BLOCKED_1, + SFX_GANG07_DRIVER_BLOCKED_2, + SFX_GANG07_FIGHT_1, + SFX_GANG07_FIGHT_2, + SFX_GANG07_GUN_THREATENED_1, + SFX_GANG07_GUN_THREATENED_2, + SFX_GANG07_JACKED_CAR_1, + SFX_GANG07_JACKED_CAR_2, + SFX_GANG07_JACKING_1, + SFX_GANG07_SHOOT_1, + SFX_GANG07_SHOOT_2, + SFX_GANG07_SHOOT_3, + SFX_GANG07_SHOOT_4, + SFX_GANG08_BUMP_1, + SFX_GANG08_BUMP_2, + SFX_GANG08_BUMP_3, + SFX_GANG08_CHAT_1, + SFX_GANG08_CHAT_2, + SFX_GANG08_CRASH_CAR_1, + SFX_GANG08_CRASH_CAR_2, + SFX_GANG08_DODGE_1, + SFX_GANG08_DODGE_2, + SFX_GANG08_DRIVER_BLOCKED_1, + SFX_GANG08_DRIVER_BLOCKED_2, + SFX_GANG08_FIGHT_1, + SFX_GANG08_FIGHT_2, + SFX_GANG08_GUN_THREATENED_1, + SFX_GANG08_GUN_THREATENED_2, + SFX_GANG08_JACKED_CAR_1, + SFX_GANG08_JACKED_CAR_2, + SFX_GANG08_JACKING_1, + SFX_GANG08_JACKING_2, + SFX_GANG08_SHOOT_1, + SFX_GANG08_SHOOT_2, + SFX_GANG08_SHOOT_3, + SFX_GANG08_SHOOT_4, + SFX_GANG08_SHOOT_5, + SFX_GANG09_BUMP_1, + SFX_GANG09_BUMP_2, + SFX_GANG09_BUMP_3, + SFX_GANG09_CHAT_1, + SFX_GANG09_CHAT_2, + SFX_GANG09_CHAT_3, + SFX_GANG09_CRASH_CAR_1, + SFX_GANG09_CRASH_CAR_2, + SFX_GANG09_DODGE_1, + SFX_GANG09_DODGE_2, + SFX_GANG09_DRIVER_BLOCKED_1, + SFX_GANG09_DRIVER_BLOCKED_2, + SFX_GANG09_FIGHT_1, + SFX_GANG09_FIGHT_2, + SFX_GANG09_GUN_THREATENED_1, + SFX_GANG09_GUN_THREATENED_2, + SFX_GANG09_JACKED_CAR_1, + SFX_GANG09_JACKED_CAR_2, + SFX_GANG09_JACKING_1, + SFX_GANG09_JACKING_2, + SFX_GANG09_SHOOT_1, + SFX_GANG09_SHOOT_2, + SFX_GANG09_SHOOT_3, + SFX_GANG09_SHOOT_4, + SFX_GANG09_SHOOT_5, + SFX_GANG10_BUMP_1, + SFX_GANG10_BUMP_2, + SFX_GANG10_BUMP_3, + SFX_GANG10_CHAT_1, + SFX_GANG10_CHAT_2, + SFX_GANG10_CHAT_3, + SFX_GANG10_CRASH_CAR_1, + SFX_GANG10_CRASH_CAR_2, + SFX_GANG10_DODGE_1, + SFX_GANG10_DODGE_2, + SFX_GANG10_DRIVER_BLOCKED_1, + SFX_GANG10_DRIVER_BLOCKED_2, + SFX_GANG10_FIGHT_1, + SFX_GANG10_FIGHT_2, + SFX_GANG10_GUN_THREATENED_1, + SFX_GANG10_GUN_THREATENED_2, + SFX_GANG10_JACKED_CAR_1, + SFX_GANG10_JACKED_CAR_2, + SFX_GANG10_JACKING_1, + SFX_GANG10_JACKING_2, + SFX_GANG10_SHOOT_1, + SFX_GANG10_SHOOT_2, + SFX_GANG10_SHOOT_3, + SFX_GANG10_SHOOT_4, + SFX_GANG10_SHOOT_5, + SFX_GANG11_BUMP_1, + SFX_GANG11_BUMP_2, + SFX_GANG11_BUMP_3, + SFX_GANG11_CHAT_1, + SFX_GANG11_CHAT_2, + SFX_GANG11_CRASH_CAR_1, + SFX_GANG11_CRASH_CAR_2, + SFX_GANG11_DODGE_1, + SFX_GANG11_DODGE_2, + SFX_GANG11_DRIVER_BLOCKED_1, + SFX_GANG11_DRIVER_BLOCKED_2, + SFX_GANG11_FIGHT_1, + SFX_GANG11_FIGHT_2, + SFX_GANG11_GUN_THREATENED_1, + SFX_GANG11_GUN_THREATENED_2, + SFX_GANG11_JACKED_CAR_1, + SFX_GANG11_JACKED_CAR_2, + SFX_GANG11_JACKING_1, + SFX_GANG11_JACKING_2, + SFX_GANG11_SHOOT_1, + SFX_GANG11_SHOOT_2, + SFX_GANG11_SHOOT_3, + SFX_GANG11_SHOOT_4, + SFX_GANG11_SHOOT_5, + SFX_GANG12_BUMP_1, + SFX_GANG12_BUMP_2, + SFX_GANG12_BUMP_3, + SFX_GANG12_CHAT_1, + SFX_GANG12_CHAT_2, + SFX_GANG12_CHAT_3, + SFX_GANG12_CRASH_CAR_1, + SFX_GANG12_CRASH_CAR_2, + SFX_GANG12_DODGE_1, + SFX_GANG12_DODGE_2, + SFX_GANG12_DRIVER_BLOCKED_1, + SFX_GANG12_DRIVER_BLOCKED_2, + SFX_GANG12_FIGHT_1, + SFX_GANG12_FIGHT_2, + SFX_GANG12_GUN_THREATENED_1, + SFX_GANG12_GUN_THREATENED_2, + SFX_GANG12_JACKED_CAR_1, + SFX_GANG12_JACKED_CAR_2, + SFX_GANG12_JACKING_1, + SFX_GANG12_JACKING_2, + SFX_GANG12_SHOOT_1, + SFX_GANG12_SHOOT_2, + SFX_GANG12_SHOOT_3, + SFX_GANG12_SHOOT_4, + SFX_GANG12_SHOOT_5, + SFX_GANG13_BUMP_1, + SFX_GANG13_BUMP_2, + SFX_GANG13_BUMP_3, + SFX_GANG13_CHAT_1, + SFX_GANG13_CHAT_2, + SFX_GANG13_CRASH_CAR_1, + SFX_GANG13_CRASH_CAR_2, + SFX_GANG13_DODGE_1, + SFX_GANG13_DODGE_2, + SFX_GANG13_DRIVER_BLOCKED_1, + SFX_GANG13_DRIVER_BLOCKED_2, + SFX_GANG13_FIGHT_1, + SFX_GANG13_FIGHT_2, + SFX_GANG13_GUN_THREATENED_1, + SFX_GANG13_GUN_THREATENED_2, + SFX_GANG13_JACKED_CAR_1, + SFX_GANG13_JACKED_CAR_2, + SFX_GANG13_JACKING_1, + SFX_GANG13_JACKING_2, + SFX_GANG13_SHOOT_1, + SFX_GANG13_SHOOT_2, + SFX_GANG13_SHOOT_3, + SFX_GANG13_SHOOT_4, + SFX_GANG13_SHOOT_5, + SFX_GANG14_BUMP_1, + SFX_GANG14_BUMP_2, + SFX_GANG14_BUMP_3, + SFX_GANG14_CHAT_1, + SFX_GANG14_CHAT_2, + SFX_GANG14_CHAT_3, + SFX_GANG14_CRASH_CAR_1, + SFX_GANG14_CRASH_CAR_2, + SFX_GANG14_DODGE_1, + SFX_GANG14_DODGE_2, + SFX_GANG14_DRIVER_BLOCKED_1, + SFX_GANG14_DRIVER_BLOCKED_2, + SFX_GANG14_FIGHT_1, + SFX_GANG14_FIGHT_2, + SFX_GANG14_GUN_THREATENED_1, + SFX_GANG14_GUN_THREATENED_2, + SFX_GANG14_JACKED_CAR_1, + SFX_GANG14_JACKED_CAR_2, + SFX_GANG14_JACKING_1, + SFX_GANG14_JACKING_2, + SFX_GANG14_SHOOT_1, + SFX_GANG14_SHOOT_2, + SFX_GANG14_SHOOT_3, + SFX_GANG14_SHOOT_4, + SFX_GANG14_SHOOT_5, + SFX_GANG15_BUMP_1, + SFX_GANG15_BUMP_2, + SFX_GANG15_BUMP_3, + SFX_GANG15_CHAT_1, + SFX_GANG15_CHAT_2, + SFX_GANG15_CHAT_3, + SFX_GANG15_CRASH_CAR_1, + SFX_GANG15_CRASH_CAR_2, + SFX_GANG15_DODGE_1, + SFX_GANG15_DODGE_2, + SFX_GANG15_DRIVER_BLOCKED_1, + SFX_GANG15_DRIVER_BLOCKED_2, + SFX_GANG15_FIGHT_1, + SFX_GANG15_FIGHT_2, + SFX_GANG15_GUN_THREATENED_1, + SFX_GANG15_GUN_THREATENED_2, + SFX_GANG15_JACKING_1, + SFX_GANG15_JACKING_2, + SFX_GANG15_JACKING_CAR_1, + SFX_GANG15_JACKING_CAR_2, + SFX_GANG15_SHOOT_1, + SFX_GANG15_SHOOT_2, + SFX_GANG15_SHOOT_3, + SFX_GANG15_SHOOT_4, + SFX_GANG16_BUMP_1, + SFX_GANG16_BUMP_2, + SFX_GANG16_BUMP_3, + SFX_GANG16_CHAT_1, + SFX_GANG16_CHAT_2, + SFX_GANG16_CRASH_CAR_1, + SFX_GANG16_CRASH_CAR_2, + SFX_GANG16_DODGE_1, + SFX_GANG16_DODGE_2, + SFX_GANG16_DRIVER_BLOCKED_1, + SFX_GANG16_DRIVER_BLOCKED_2, + SFX_GANG16_FIGHT_1, + SFX_GANG16_FIGHT_2, + SFX_GANG16_GUN_THREATENED_1, + SFX_GANG16_GUN_THREATENED_2, + SFX_GANG16_JACKED_CAR_1, + SFX_GANG16_JACKED_CAR_2, + SFX_GANG16_JACKING_1, + SFX_GANG16_JACKING_2, + SFX_GANG16_SHOOT_1, + SFX_GANG16_SHOOT_2, + SFX_GANG16_SHOOT_3, + SFX_GANG16_SHOOT_4, + SFX_GANG16_SHOOT_5, + SFX_GANG17_BUMP_1, + SFX_GANG17_BUMP_2, + SFX_GANG17_BUMP_3, + SFX_GANG17_CHAT_1, + SFX_GANG17_CHAT_2, + SFX_GANG17_CRASH_CAR_1, + SFX_GANG17_CRASH_CAR_2, + SFX_GANG17_DODGE_1, + SFX_GANG17_DODGE_2, + SFX_GANG17_DRIVER_BLOCKED_1, + SFX_GANG17_DRIVER_BLOCKED_2, + SFX_GANG17_FIGHT_1, + SFX_GANG17_FIGHT_2, + SFX_GANG17_GUN_THREATENED_1, + SFX_GANG17_GUN_THREATENED_2, + SFX_GANG17_JACKED_CAR_1, + SFX_GANG17_JACKED_CAR_2, + SFX_GANG17_JACKING_1, + SFX_GANG17_JACKING_2, + SFX_GANG17_SHOOT_1, + SFX_GANG17_SHOOT_2, + SFX_GANG17_SHOOT_3, + SFX_GANG17_SHOOT_4, + SFX_GANG17_SHOOT_5, + SFX_GANG18_BUMP_1, + SFX_GANG18_BUMP_2, + SFX_GANG18_BUMP_3, + SFX_GANG18_CHAT_1, + SFX_GANG18_CHAT_2, + SFX_GANG18_CHAT_3, + SFX_GANG18_CRASH_CAR_1, + SFX_GANG18_CRASH_CAR_2, + SFX_GANG18_DODGE_1, + SFX_GANG18_DODGE_2, + SFX_GANG18_DRIVER_BLOCKED_1, + SFX_GANG18_DRIVER_BLOCKED_2, + SFX_GANG18_FIGHT_1, + SFX_GANG18_FIGHT_2, + SFX_GANG18_GUN_THREATENED_1, + SFX_GANG18_GUN_THREATENED_2, + SFX_GANG18_JACKED_CAR_1, + SFX_GANG18_JACKED_CAR_2, + SFX_GANG18_JACKING_1, + SFX_GANG18_JACKING_2, + SFX_GANG18_SHOOT_1, + SFX_GANG18_SHOOT_2, + SFX_GANG18_SHOOT_3, + SFX_GANG18_SHOOT_4, + SFX_GRDANG1_BUMP_1, + SFX_GRDANG1_BUMP_2, + SFX_GRDANG1_BUMP_3, + SFX_GRDANG1_CHAT_1, + SFX_GRDANG1_CHAT_2, + SFX_GRDANG1_CHAT_3, + SFX_GRDANG1_CRASH_CAR_1, + SFX_GRDANG1_CRASH_CAR_2, + SFX_GRDANG1_DODGE_1, + SFX_GRDANG1_DODGE_2, + SFX_GRDANG1_DRIVER_BLOCKED_1, + SFX_GRDANG1_DRIVER_BLOCKED_2, + SFX_GRDANG1_FIGHT_1, + SFX_GRDANG1_FIGHT_2, + SFX_GRDANG1_FIGHT_3, + SFX_GRDANG1_GUN_THREATENED_1, + SFX_GRDANG1_GUN_THREATENED_2, + SFX_GRDANG1_JACKED_CAR_1, + SFX_GRDANG1_JACKED_CAR_2, + SFX_GRDANG1_JACKED_CAR_3, + SFX_GRDANG1_SHOCKED_1, + SFX_GRDANG1_SPECIAL_CASE_1, + SFX_GRDANG1_SPECIAL_CASE_2, + SFX_GRDANG1_SPECIAL_CASE_3, + SFX_GRDANG2_BUMP_1, + SFX_GRDANG2_BUMP_2, + SFX_GRDANG2_BUMP_3, + SFX_GRDANG2_CHAT_1, + SFX_GRDANG2_CHAT_2, + SFX_GRDANG2_CHAT_3, + SFX_GRDANG2_CHAT_4, + SFX_GRDANG2_CRASH_CAR_1, + SFX_GRDANG2_CRASH_CAR_2, + SFX_GRDANG2_DODGE_1, + SFX_GRDANG2_DODGE_2, + SFX_GRDANG2_DRIVER_BLOCKED_1, + SFX_GRDANG2_DRIVER_BLOCKED_2, + SFX_GRDANG2_FIGHT_1, + SFX_GRDANG2_FIGHT_2, + SFX_GRDANG2_FIGHT_3, + SFX_GRDANG2_GUN_THREATENED_1, + SFX_GRDANG2_GUN_THREATENED_2, + SFX_GRDANG2_JACKED_CAR_1, + SFX_GRDANG2_JACKED_CAR_2, + SFX_GRDANG2_JACKED_CAR_3, + SFX_GRDANG2_SHOCKED_1, + SFX_HIT1_AA, + SFX_HIT1_AB, + SFX_HIT1_AC, + SFX_HIT1_AD, + SFX_HIT1_AE, + SFX_HIT1_AF, + SFX_HIT1_AG, + SFX_HIT2_AA, + SFX_HIT2_AB, + SFX_HIT2_AC, + SFX_HIT2_AD, + SFX_HIT2_AE, + SFX_HIT2_AF, + SFX_HIT2_AG, + SFX_HIT2_AH, + SFX_HIT3_AA, + SFX_HIT3_AB, + SFX_HIT3_AC, + SFX_HIT3_AD, + SFX_HIT3_AE, + SFX_HIT3_AF, + SFX_HIT3_AG, + SFX_HITM_AA, + SFX_HITM_AB, + SFX_HITM_AC, + SFX_HITM_AD, + SFX_HOS_MAN_BUMP_1, + SFX_HOS_MAN_BUMP_2, + SFX_HOS_MAN_BUMP_3, + SFX_HOS_MAN_CHAT_1, + SFX_HOS_MAN_CHAT_2, + SFX_HOS_MAN_CHAT_3, + SFX_HOS_MAN_CRASH_CAR_1, + SFX_HOS_MAN_CRASH_CAR_2, + SFX_HOS_MAN_DODGE_1, + SFX_HOS_MAN_DODGE_2, + SFX_HOS_MAN_DRIVER_BLOCKED_1, + SFX_HOS_MAN_DRIVER_BLOCKED_2, + SFX_HOS_MAN_FIGHT_1, + SFX_HOS_MAN_FIGHT_2, + SFX_HOS_MAN_FIGHT_3, + SFX_HOS_MAN_GUN_THREATENED_1, + SFX_HOS_MAN_GUN_THREATENED_2, + SFX_HOS_MAN_JACKED_CAR_1, + SFX_HOS_MAN_JACKED_CAR_2, + SFX_HOS_MAN_JACKED_CAR_3, + SFX_HOS_MAN_SHOCKED_1, + SFX_HOS_WOM_BUMP_1, + SFX_HOS_WOM_BUMP_2, + SFX_HOS_WOM_BUMP_3, + SFX_HOS_WOM_CHAT_1, + SFX_HOS_WOM_CHAT_2, + SFX_HOS_WOM_CHAT_3, + SFX_HOS_WOM_CRASH_CAR_1, + SFX_HOS_WOM_CRASH_CAR_2, + SFX_HOS_WOM_DODGE_1, + SFX_HOS_WOM_DODGE_2, + SFX_HOS_WOM_DRIVER_BLOCKED_1, + SFX_HOS_WOM_DRIVER_BLOCKED_2, + SFX_HOS_WOM_FIGHT_1, + SFX_HOS_WOM_FIGHT_2, + SFX_HOS_WOM_FIGHT_3, + SFX_HOS_WOM_GUN_THREATENED_1, + SFX_HOS_WOM_GUN_THREATENED_2, + SFX_HOS_WOM_JACKED_CAR_1, + SFX_HOS_WOM_JACKED_CAR_2, + SFX_HOS_WOM_JACKED_CAR_3, + SFX_HOS_WOM_SHOCKED_1, + SFX_JDT1_BA, + SFX_JDT1_BB, + SFX_JDT1_CA, + SFX_JDT1_CB, + SFX_JDT1_DA, + SFX_JDT1_DB, + SFX_JDT1_DC, + SFX_JDT1_DD, + SFX_JDT1_DE, + SFX_JDT1_DF, + SFX_JDT1_DG, + SFX_JDT1_DH, + SFX_JDT1_DI, + SFX_JDT1_DJ, + SFX_JDT1_EA, + SFX_JDT1_EB, + SFX_JDT1_EC, + SFX_JDT1_ED, + SFX_JDT1_EE, + SFX_JDT1_FA, + SFX_JDT1_FB, + SFX_JDT1_FC, + SFX_JDT1_FD, + SFX_JDT1_FE, + SFX_JDT1_FF, + SFX_JDT1_GA, + SFX_JDT1_HA, + SFX_JDT1_HB, + SFX_JDT1_HC, + SFX_JDT1_HD, + SFX_JDT1_HE, + SFX_JDT1_HF, + SFX_JDT1_IA, + SFX_JDT1_JA, + SFX_JDT1_JB, + SFX_JDT1_KA, + SFX_JDT1_KB, + SFX_JDT1_KC, + SFX_JDT1_KD, + SFX_JDT1_KE, + SFX_JDT1_KF, + SFX_JDT1_LA, + SFX_JDT1_LB, + SFX_JDT1_MA, + SFX_JDT1_MB, + SFX_JDT1_MC, + SFX_JDT1_MD, + SFX_JDT1_ME, + SFX_JDT1_MF, + SFX_JDT1_MG, + SFX_JDT1_MH, + SFX_JDT2_AA, + SFX_JDT2_AB, + SFX_JDT2_AC, + SFX_JDT2_AD, + SFX_JDT2_AE, + SFX_JDT2_AF, + SFX_JDT2_AG, + SFX_JDT2_AH, + SFX_JDT2_BA, + SFX_JDT2_BB, + SFX_JDT2_BC, + SFX_JDT2_CA, + SFX_JDT2_CB, + SFX_JDT2_DA, + SFX_JDT2_DC, + SFX_JDT2_DD, + SFX_JDT2_DE, + SFX_JDT2_DF, + SFX_JDT3_AA, + SFX_JDT3_AB, + SFX_JDT3_AC, + SFX_JDT3_AD, + SFX_JDT3_AE, + SFX_JDT3_AG, + SFX_JDT3_AH, + SFX_JDT3_BA, + SFX_JDT3_BB, + SFX_JDT3_BC, + SFX_JDT3_BD, + SFX_JDT3_BE, + SFX_JDT3_BF, + SFX_JDT4_AA, + SFX_JDT4_AB, + SFX_JDT4_AC, + SFX_JDT4_AD, + SFX_JDT4_AE, + SFX_JDT4_AF, + SFX_JDT4_BA, + SFX_JDT4_BB, + SFX_JDT4_BC, + SFX_JDT5_BA, + SFX_JDT5_CA, + SFX_JDT5_CC, + SFX_JDT5_CD, + SFX_JDT5_CE, + SFX_JDT5_CG, + SFX_JDT5_CI, + SFX_JDT5_DA, + SFX_JDT5_EA, + SFX_JDT5_EB, + SFX_JDT5_EC, + SFX_JDT5_ED, + SFX_JDT5_EE, + SFX_JDT5_FA, + SFX_JDT5_FB, + SFX_JDT5_FC, + SFX_JDT5_GA, + SFX_JDT5_GB, + SFX_JDT6_AA, + SFX_JDT6_AB, + SFX_JDT6_AC, + SFX_JDT6_AE, + SFX_JDT6_AF, + SFX_JDT6_AG, + SFX_JDT6_AH, + SFX_JDT6_BA, + SFX_JDT6_BB, + SFX_JDT6_BC, + SFX_JDT6_BD, + SFX_JDT6_BE, + SFX_JDT6_BF, + SFX_JDT6_BG, + SFX_JDT6_CA, + SFX_JDT6_CB, + SFX_JDT6_DA, + SFX_JDT7_AA, + SFX_JDT7_AB, + SFX_JDT7_AC, + SFX_JDT7_AD, + SFX_JDT7_AE, + SFX_JDT7_AF, + SFX_JDT7_AG, + SFX_JDT7_BA, + SFX_JDT7_BB, + SFX_JDT7_BC, + SFX_JDT7_CA, + SFX_JDT7_CB, + SFX_JDT7_CC, + SFX_JDT7_CD, + SFX_JDT8_AA, + SFX_JDT8_AB, + SFX_JDT8_AC, + SFX_JDT8_AD, + SFX_JDT8_AE, + SFX_JDT8_AF, + SFX_JDT8_AG, + SFX_JDT8_AH, + SFX_JDT8_AI, + SFX_JDT8_BA, + SFX_JDT8_CA, + SFX_JDT8_CB, + SFX_JDT8_DA, + SFX_JDT8_DB, + SFX_JDT8_DC, + SFX_JDT8_DD, + SFX_JDT8_DE, + SFX_JDT8_DF, + SFX_JDT8_DG, + SFX_JDT8_EA, + SFX_JDT8_EB, + SFX_JDT8_EC, + SFX_JDT8_ED, + SFX_JDT8_EE, + SFX_JDT8_FA, + SFX_JDT8_FB, + SFX_JDT8_FC, + SFX_JDT8_FD, + SFX_JDT8_FE, + SFX_JDT8_FF, + SFX_JDT8_FG, + SFX_JDT8_FH, + SFX_JDT8_GA, + SFX_JDT8_HA, + SFX_JDT8_HB, + SFX_JDX_AA, + SFX_JDX_AB, + SFX_JDX_AC, + SFX_JD_CRASH_CAR_1, + SFX_JD_CRASH_CAR_2, + SFX_JD_CRASH_CAR_3, + SFX_JD_JACKED_CAR_1, + SFX_JD_JACKED_CAR_2, + SFX_JD_JACKED_CAR_3, + SFX_JD_SHOCKED_1, + SFX_JD_SHOCKED_2, + SFX_JD_SLPN, + SFX_LCN_AA, + SFX_LCN_AB, + SFX_LEAR, + SFX_LEON_CRASH_CAR_1, + SFX_LEON_CRASH_CAR_2, + SFX_LEON_CRASH_CAR_3, + SFX_LEON_CRASH_CAR_4, + SFX_LEON_CRASH_CAR_5, + SFX_LEON_DRIVER_BLOCKED_1, + SFX_LEON_DRIVER_BLOCKED_2, + SFX_LEON_DRIVER_BLOCKED_3, + SFX_LEON_DRIVER_BLOCKED_4, + SFX_LEON_JACKED_CAR_1, + SFX_LEON_JACKED_CAR_2, + SFX_LEON_JACKED_CAR_3, + SFX_LEON_SHOCKED_1, + SFX_LEON_SHOCKED_2, + SFX_LI_MAN1_BUMP_1, + SFX_LI_MAN1_BUMP_2, + SFX_LI_MAN1_BUMP_3, + SFX_LI_MAN1_CHAT_1, + SFX_LI_MAN1_CHAT_2, + SFX_LI_MAN1_CHAT_3, + SFX_LI_MAN1_CHAT_4, + SFX_LI_MAN1_CRASH_CAR_1, + SFX_LI_MAN1_CRASH_CAR_2, + SFX_LI_MAN1_DODGE_1, + SFX_LI_MAN1_DODGE_2, + SFX_LI_MAN1_DRIVER_BLOCKED_1, + SFX_LI_MAN1_DRIVER_BLOCKED_2, + SFX_LI_MAN1_FIGHT_1, + SFX_LI_MAN1_FIGHT_2, + SFX_LI_MAN1_FIGHT_3, + SFX_LI_MAN1_GUN_THREATENED_1, + SFX_LI_MAN1_GUN_THREATENED_2, + SFX_LI_MAN1_JACKED_CAR_1, + SFX_LI_MAN1_JACKED_CAR_2, + SFX_LI_MAN1_JACKED_CAR_3, + SFX_LI_MAN2_BUMP_1, + SFX_LI_MAN2_BUMP_2, + SFX_LI_MAN2_BUMP_3, + SFX_LI_MAN2_CHAT_1, + SFX_LI_MAN2_CHAT_2, + SFX_LI_MAN2_CHAT_3, + SFX_LI_MAN2_CHAT_4, + SFX_LI_MAN2_CRASH_CAR_1, + SFX_LI_MAN2_CRASH_CAR_2, + SFX_LI_MAN2_DODGE_1, + SFX_LI_MAN2_DODGE_2, + SFX_LI_MAN2_DRIVER_BLOCKED_1, + SFX_LI_MAN2_DRIVER_BLOCKED_2, + SFX_LI_MAN2_FIGHT_1, + SFX_LI_MAN2_FIGHT_2, + SFX_LI_MAN2_FIGHT_3, + SFX_LI_MAN2_GUN_THREATENED_1, + SFX_LI_MAN2_GUN_THREATENED_2, + SFX_LI_MAN2_JACKED_CAR_1, + SFX_LI_MAN2_JACKED_CAR_2, + SFX_LI_MAN2_JACKED_CAR_3, + SFX_LI_MAN2_SHOCKED_1, + SFX_LI_WOM1_BUMP_1, + SFX_LI_WOM1_BUMP_2, + SFX_LI_WOM1_BUMP_3, + SFX_LI_WOM1_CHAT_1, + SFX_LI_WOM1_CHAT_2, + SFX_LI_WOM1_CHAT_3, + SFX_LI_WOM1_CRASH_CAR_1, + SFX_LI_WOM1_CRASH_CAR_2, + SFX_LI_WOM1_DODGE_1, + SFX_LI_WOM1_DODGE_2, + SFX_LI_WOM1_DRIVER_BLOCKED_1, + SFX_LI_WOM1_DRIVER_BLOCKED_2, + SFX_LI_WOM1_FIGHT_1, + SFX_LI_WOM1_FIGHT_2, + SFX_LI_WOM1_FIGHT_3, + SFX_LI_WOM1_GUN_THREATENED_1, + SFX_LI_WOM1_GUN_THREATENED_2, + SFX_LI_WOM1_JACKED_CAR_1, + SFX_LI_WOM1_JACKED_CAR_2, + SFX_LI_WOM1_SHOCKED_1, + SFX_LI_WOM2_BUMP_1, + SFX_LI_WOM2_BUMP_2, + SFX_LI_WOM2_BUMP_3, + SFX_LI_WOM2_CHAT_1, + SFX_LI_WOM2_CHAT_2, + SFX_LI_WOM2_CHAT_3, + SFX_LI_WOM2_CHAT_4, + SFX_LI_WOM2_CRASH_CAR_1, + SFX_LI_WOM2_CRASH_CAR_2, + SFX_LI_WOM2_DODGE_1, + SFX_LI_WOM2_DODGE_2, + SFX_LI_WOM2_DRIVER_BLOCKED_1, + SFX_LI_WOM2_DRIVER_BLOCKED_2, + SFX_LI_WOM2_FIGHT_1, + SFX_LI_WOM2_FIGHT_2, + SFX_LI_WOM2_FIGHT_3, + SFX_LI_WOM2_GUN_THREATENED_1, + SFX_LI_WOM2_GUN_THREATENED_2, + SFX_LI_WOM2_JACKED_CAR_1, + SFX_LI_WOM2_JACKED_CAR_2, + SFX_LI_WOM2_JACKED_CAR_3, + SFX_LI_WOM2_SHOCKED_1, + SFX_M8B1AA, + SFX_M8B1AB, + SFX_MAC1_AA, + SFX_MAC1_AB, + SFX_MAC1_AC, + SFX_MAC1_AD, + SFX_MAC1_AE, + SFX_MAC1_AF, + SFX_MAC1_AG, + SFX_MAC1_AH, + SFX_MAC1_AI, + SFX_MAC1_AJ, + SFX_MAC1_AK, + SFX_MAC1_AL, + SFX_MAC1_AM, + SFX_MAC1_AN, + SFX_MAC1_AO, + SFX_MAC1_BA, + SFX_MAC1_BB, + SFX_MAC1_BC, + SFX_MAC1_BD, + SFX_MAC1_BE, + SFX_MAC1_BF, + SFX_MAC1_BG, + SFX_MAC1_CA, + SFX_MAC1_CB, + SFX_MAC1_DA, + SFX_MAC1_EA, + SFX_MAC1_FA, + SFX_MAC1_FB, + SFX_MAC1_GA, + SFX_MAC1_GB, + SFX_MAC1_HA, + SFX_MAC1_IA, + SFX_MAC1_IB, + SFX_MAC1_JA, + SFX_MAC1_JB, + SFX_MAC1_JC, + SFX_MAC2_AA, + SFX_MAC2_AB, + SFX_MAC2_AC, + SFX_MAC2_AD, + SFX_MAC2_AE, + SFX_MAC2_AF, + SFX_MAC2_AG, + SFX_MAC2_AH, + SFX_MAC2_AI, + SFX_MAC2_BA, + SFX_MAC2_BB, + SFX_MAC2_BC, + SFX_MAC3_AA, + SFX_MAC3_AB, + SFX_MAC3_AC, + SFX_MAC3_AD, + SFX_MAC3_AE, + SFX_MAC3_AF, + SFX_MAC3_AG, + SFX_MAC3_AH, + SFX_MAC3_AI, + SFX_MAC3_AJ, + SFX_MAC3_AK, + SFX_MAC3_AL, + SFX_MAC3_AM, + SFX_MAC3_AN, + SFX_MAC3_BA, + SFX_MAC4_AA, + SFX_MAC4_AB, + SFX_MAC4_AC, + SFX_MAC4_AD, + SFX_MAC4_AE, + SFX_MAC4_AF, + SFX_MAC4_AG, + SFX_MAC4_AH, + SFX_MAC4_AI, + SFX_MAC4_AJ, + SFX_MAC4_AK, + SFX_MAC4_AL, + SFX_MAC4_BA, + SFX_MAC4_BB, + SFX_MAC4_BC, + SFX_MAC4_BD, + SFX_MAC4_BE, + SFX_MAC4_BF, + SFX_MAC4_BG, + SFX_MAC4_BI, + SFX_MAC4_BJ, + SFX_MAC4_BL, + SFX_MAC4_BM, + SFX_MAC4_BO, + SFX_MAC4_BP, + SFX_MAC4_BQ, + SFX_MAC4_BR, + SFX_MAC4_BS, + SFX_MAC4_BT, + SFX_MAC4_BU, + SFX_MAC4_CA, + SFX_MAC4_CB, + SFX_MAC4_CC, + SFX_MAC4_CD, + SFX_MAC4_CE, + SFX_MAC4_CF, + SFX_MAC4_CG, + SFX_MAC4_CH, + SFX_MAC4_CI, + SFX_MAC4_CK, + SFX_MAC4_CM, + SFX_MAC4_CN, + SFX_MAC4_CO, + SFX_MAC4_CP, + SFX_MAC4_CQ, + SFX_MAC4_CR, + SFX_MAC4_CS, + SFX_MAC4_DA, + SFX_MAC4_DB, + SFX_MAC4_DC, + SFX_MAC4_DD, + SFX_MAC4_DE, + SFX_MAC4_DF, + SFX_MAC4_DG, + SFX_MAC4_DH, + SFX_MAC5_AA, + SFX_MAC5_AB, + SFX_MAC5_AC, + SFX_MAC5_AD, + SFX_MAC5_AE, + SFX_MAC5_AF, + SFX_MAC5_AG, + SFX_MAC5_AH, + SFX_MAC5_AI, + SFX_MAC5_AJ, + SFX_MAC5_AK, + SFX_MAC5_AL, + SFX_MAC5_AM, + SFX_MAC5_AN, + SFX_MALE01_BUMP_1, + SFX_MALE01_BUMP_2, + SFX_MALE01_BUMP_3, + SFX_MALE01_CHAT_1, + SFX_MALE01_CHAT_2, + SFX_MALE01_CHAT_3, + SFX_MALE01_CHAT_4, + SFX_MALE01_CRASH_CAR_1, + SFX_MALE01_CRASH_CAR_2, + SFX_MALE01_DRIVER_BLOCKED_1, + SFX_MALE01_DRIVER_BLOCKED_2, + SFX_MALE01_FIGHT_1, + SFX_MALE01_FIGHT_2, + SFX_MALE01_FIGHT_3, + SFX_MALE01_GUN_THREATENED_1, + SFX_MALE01_GUN_THREATENED_2, + SFX_MALE01_JACKED_CAR_1, + SFX_MALE01_JACKED_CAR_2, + SFX_MALE01_SHOCKED_1, + SFX_MALE02_BUMP_1, + SFX_MALE02_BUMP_2, + SFX_MALE02_BUMP_3, + SFX_MALE02_CHAT_1, + SFX_MALE02_CHAT_2, + SFX_MALE02_CHAT_3, + SFX_MALE02_CHAT_4, + SFX_MALE02_CRASH_CAR_1, + SFX_MALE02_CRASH_CAR_2, + SFX_MALE02_DODGE_1, + SFX_MALE02_DODGE_2, + SFX_MALE02_DRIVER_BLOCKED_1, + SFX_MALE02_DRIVER_BLOCKED_2, + SFX_MALE02_FIGHT_1, + SFX_MALE02_FIGHT_2, + SFX_MALE02_FIGHT_3, + SFX_MALE02_GUN_THREATENED_1, + SFX_MALE02_GUN_THREATENED_2, + SFX_MALE02_JACKED_CAR_1, + SFX_MALE02_JACKED_CAR_2, + SFX_MALE02_JACKED_CAR_3, + SFX_MALE02_SHOCKED_1, + SFX_MALE02_SPECIAL_CASE_1, + SFX_MALE02_SPECIAL_CASE_2, + SFX_MALE03_BUMP_1, + SFX_MALE03_BUMP_2, + SFX_MALE03_BUMP_3, + SFX_MALE03_CHAT_1, + SFX_MALE03_CHAT_2, + SFX_MALE03_CHAT_3, + SFX_MALE03_CRASH_CAR_1, + SFX_MALE03_CRASH_CAR_2, + SFX_MALE03_DODGE_1, + SFX_MALE03_DODGE_2, + SFX_MALE03_DRIVER_BLOCKED_1, + SFX_MALE03_DRIVER_BLOCKED_2, + SFX_MALE03_FIGHT_1, + SFX_MALE03_FIGHT_2, + SFX_MALE03_FIGHT_3, + SFX_MALE03_GUN_THREATENED_1, + SFX_MALE03_GUN_THREATENED_2, + SFX_MALE03_JACKED_CAR_1, + SFX_MALE03_JACKED_CAR_2, + SFX_MALE03_JACKED_CAR_3, + SFX_MALE03_SHOCKED_1, + SFX_MALE_DEATH_01, + SFX_MALE_DEATH_02, + SFX_MALE_DEATH_03, + SFX_MALE_DEATH_04, + SFX_MALE_DEATH_05, + SFX_MALE_DEATH_06, + SFX_MALE_DEATH_07, + SFX_MALE_DEATH_08, + SFX_MALE_DEATH_09, + SFX_MALE_DEATH_10, + SFX_MALE_DEATH_11, + SFX_MALE_DEATH_12, + SFX_MALE_DEATH_13, + SFX_MALE_DEATH_14, + SFX_MALE_DEATH_15, + SFX_MALE_DEATH_16, + SFX_MALE_DEATH_17, + SFX_MALE_DEATH_18, + SFX_MALE_DEATH_19, + SFX_MALE_DEATH_20, + SFX_MALE_DEATH_21, + SFX_MALE_DEATH_22, + SFX_MALE_DEATH_23, + SFX_MALE_DEATH_24, + SFX_MALE_DEATH_25, + SFX_MALE_DEATH_26, + SFX_MALE_DEATH_27, + SFX_MALE_DEATH_28, + SFX_MALE_PAIN_01, + SFX_MALE_PAIN_02, + SFX_MALE_PAIN_03, + SFX_MALE_PAIN_04, + SFX_MALE_PAIN_05, + SFX_MALE_PAIN_06, + SFX_MALE_PAIN_07, + SFX_MALE_PAIN_08, + SFX_MALE_PAIN_09, + SFX_MALE_PAIN_10, + SFX_MALE_PAIN_11, + SFX_MALE_PAIN_12, + SFX_MALE_PAIN_13, + SFX_MALE_PAIN_16, + SFX_MALE_PAIN_17, + SFX_MALE_PAIN_18, + SFX_MALE_PAIN_19, + SFX_MALE_PAIN_20, + SFX_MALE_PAIN_21, + SFX_MALE_PAIN_22, + SFX_MALE_PAIN_23, + SFX_MALE_PAIN_24, + SFX_MALE_PAIN_25, + SFX_MALE_PAIN_26, + SFX_MALE_PAIN_27, + SFX_MALE_PAIN_28, + SFX_MALE_PAIN_29, + SFX_MALE_PAIN_30, + SFX_MALE_PAIN_31, + SFX_MALE_PAIN_32, + SFX_MALE_PAIN_33, + SFX_MALE_PAIN_34, + SFX_MALE_PAIN_35, + SFX_MALE_PAIN_36, + SFX_MALE_PAIN_37, + SFX_MALE_PAIN_38, + SFX_MALE_PAIN_39, + SFX_MALE_PAIN_40, + SFX_MALE_PAIN_41, + SFX_MALE_PAIN_42, + SFX_MALE_PAIN_43, + SFX_MALE_PAIN_44, + SFX_MALE_PAIN_45, + SFX_MALE_PAIN_46, + SFX_MALE_PAIN_47, + SFX_MALE_PAIN_48, + SFX_MALE_PAIN_49, + SFX_MALE_PAIN_50, + SFX_MALE_PAIN_51, + SFX_MALE_PAIN_52, + SFX_MALE_PAIN_53, + SFX_MALE_PAIN_ON_FIRE_01, + SFX_MALE_PAIN_ON_FIRE_02, + SFX_MALE_PAIN_ON_FIRE_03, + SFX_MALE_PAIN_ON_FIRE_04, + SFX_MALE_PAIN_ON_FIRE_05, + SFX_MALE_PAIN_ON_FIRE_06, + SFX_MALE_PAIN_ON_FIRE_07, + SFX_MALE_PAIN_ON_FIRE_08, + SFX_MALE_PAIN_ON_FIRE_09, + SFX_MALE_PAIN_ON_FIRE_10, + SFX_MALE_PAIN_ON_FIRE_11, + SFX_MALE_PAIN_ON_FIRE_12, + SFX_MALE_PAIN_ON_FIRE_13, + SFX_MALE_PAIN_ON_FIRE_14, + SFX_MALE_PAIN_ON_FIRE_15, + SFX_MALE_PAIN_ON_FIRE_16, + SFX_MALE_PAIN_ON_FIRE_17, + SFX_MALE_PAIN_ON_FIRE_18, + SFX_MALE_PAIN_ON_FIRE_19, + SFX_MALE_PAIN_ON_FIRE_20, + SFX_MALE_PAIN_ON_FIRE_21, + SFX_MALE_PANIC_01, + SFX_MALE_PANIC_02, + SFX_MALE_PANIC_03, + SFX_MALE_PANIC_04, + SFX_MALE_PANIC_05, + SFX_MALE_PANIC_06, + SFX_MALE_PANIC_07, + SFX_MALE_PANIC_08, + SFX_MALE_PANIC_09, + SFX_MALE_PANIC_10, + SFX_MALE_PANIC_11, + SFX_MALE_PANIC_12, + SFX_MALE_PANIC_13, + SFX_MALE_PANIC_14, + SFX_MALE_PANIC_15, + SFX_MALE_PANIC_16, + SFX_MALE_PANIC_17, + SFX_MALE_PANIC_18, + SFX_MALE_PANIC_19, + SFX_MALE_PANIC_20, + SFX_MALE_PANIC_21, + SFX_MALE_PANIC_22, + SFX_MALE_PANIC_23, + SFX_MAR1_AA, + SFX_MAR1_AB, + SFX_MAR1_AC, + SFX_MAR1_AD, + SFX_MAR1_AE, + SFX_MAR1_BA, + SFX_MAR1_CA, + SFX_MAR1_DA, + SFX_MAR1_DB, + SFX_MAR1_EA, + SFX_MAR1_FA, + SFX_MAR1_FB, + SFX_MAR1_FC, + SFX_MAR1_FD, + SFX_MAR1_GA, + SFX_MAR1_GB, + SFX_MAR1_GC, + SFX_MAR1_HA, + SFX_MAR1_HB, + SFX_MAR1_HC, + SFX_MAR1_HD, + SFX_MAR1_IA, + SFX_MAR1_IB, + SFX_MAR1_IC, + SFX_MAR2_AA, + SFX_MAR2_AB, + SFX_MAR2_AC, + SFX_MAR2_AD, + SFX_MAR2_AE, + SFX_MAR2_AF, + SFX_MAR2_AG, + SFX_MAR2_AH, + SFX_MAR2_BA, + SFX_MAR2_BB, + SFX_MAR2_BC, + SFX_MAR2_CA, + SFX_MAR2_CB, + SFX_MAR2_CC, + SFX_MAR2_CD, + SFX_MAR2_CE, + SFX_MAR2_DA, + SFX_MAR2_EA, + SFX_MAR2_EB, + SFX_MAR2_EC, + SFX_MAR2_FA, + SFX_MAR2_FB, + SFX_MAR2_GA, + SFX_MAR2_GB, + SFX_MAR2_GC, + SFX_MAR2_GE, + SFX_MAR2_GF, + SFX_MAR2_GG, + SFX_MAR2_GH, + SFX_MAR2_HA, + SFX_MAR2_HB, + SFX_MAR2_HC, + SFX_MAR3_AA, + SFX_MAR3_AB, + SFX_MAR3_AC, + SFX_MAR3_AD, + SFX_MAR3_BA, + SFX_MAR3_BB, + SFX_MAR3_BC, + SFX_MAR3_BD, + SFX_MAR3_BE, + SFX_MAR3_BF, + SFX_MAR4_BA, + SFX_MAR4_BC, + SFX_MAR4_BD, + SFX_MAR4_BF, + SFX_MAR5_AA, + SFX_MAR5_AB, + SFX_MAR5_AC, + SFX_MAR5_AD, + SFX_MAR5_AE, + SFX_MAR5_BA, + SFX_MAR5_BB, + SFX_MAR5_CA, + SFX_MAR5_CB, + SFX_MAR5_CC, + SFX_MAR5_CD, + SFX_MAR5_CE, + SFX_MAR5_DA, + SFX_MAR5_DB, + SFX_MAR5_DC, + SFX_MAR5_EA, + SFX_MAR5_EB, + SFX_MAR5_EC, + SFX_MAR5_ED, + SFX_MAR5_FA, + SFX_MAR5_FB, + SFX_MAR5_FC, + SFX_MAR5_FD, + SFX_MAR5_FE, + SFX_MAR5_FF, + SFX_MARIA_CRASH_CAR_1, + SFX_MARIA_CRASH_CAR_2, + SFX_MARIA_CRASH_CAR_3, + SFX_MARIA_CRASH_CAR_4, + SFX_MARIA_DRIVER_BLOCKED_1, + SFX_MARIA_DRIVER_BLOCKED_2, + SFX_MARIA_JACKED_CAR_1, + SFX_MARIA_JACKED_CAR_2, + SFX_MARIA_JACKED_CAR_3, + SFX_MARIA_SHOCKED_1, + SFX_MARIA_SHOCKED_2, + SFX_MARX_AA, + SFX_MARX_AB, + SFX_MARX_AC, + SFX_MDON1AA, + SFX_MDON1AB, + SFX_MDON1AC, + SFX_MDON2AA, + SFX_MDON2AB, + SFX_MDON2AC, + SFX_MDON2AD, + SFX_MDON2AE, + SFX_MDON2AF, + SFX_MDON2AG, + SFX_MDON2AH, + SFX_MDON3AA, + SFX_MDON3AB, + SFX_MDON3AC, + SFX_MDON3AD, + SFX_MDON3AE, + SFX_MDON3AF, + SFX_MDON3AG, + SFX_MDON3AH, + SFX_MICKEY_BUMP_1, + SFX_MICKEY_BUMP_2, + SFX_MICKEY_BUMP_3, + SFX_MICKEY_BUMP_4, + SFX_MICKEY_CHAT_1, + SFX_MICKEY_CHAT_2, + SFX_MICKEY_CRASH_CAR_1, + SFX_MICKEY_CRASH_CAR_2, + SFX_MICKEY_DODGE_1, + SFX_MICKEY_DODGE_2, + SFX_MICKEY_DRIVER_BLOCKED_1, + SFX_MICKEY_DRIVER_BLOCKED_2, + SFX_MICKEY_FIGHT_1, + SFX_MICKEY_FIGHT_2, + SFX_MICKEY_GUN_THREATENED_1, + SFX_MICKEY_GUN_THREATENED_2, + SFX_MICKEY_JACKED_CAR_1, + SFX_MICKEY_JACKED_CAR_2, + SFX_MICKEY_JACKING_1, + SFX_MICKEY_JACKING_2, + SFX_MICKEY_SHOOT_1, + SFX_MICKEY_SHOOT_2, + SFX_MICKEY_SHOOT_3, + SFX_MICKEY_SHOOT_4, + SFX_MICKEY_SHOOT_5, + SFX_MJDT1AA, + SFX_MJDT1AB, + SFX_MJDT1AC, + SFX_MJDT1AE, + SFX_MMA1AA, + SFX_MMA1AB, + SFX_MMA1AC, + SFX_MMA1AD, + SFX_MMA1AE, + SFX_MMA2AA, + SFX_MMA2AB, + SFX_MMA2AC, + SFX_MMA2AD, + SFX_MMA2AE, + SFX_MMA2AF, + SFX_MMA2AG, + SFX_MMA2AH, + SFX_MMA2AI, + SFX_MMA2AJ, + SFX_MMAR1AA, + SFX_MMAR1AB, + SFX_MMAR1AC, + SFX_MMAR1AD, + SFX_MMCA1AA, + SFX_MMCA1AB, + SFX_MMCA1AC, + SFX_MMCA1AD, + SFX_MMCA2AA, + SFX_MMCA2AB, + SFX_MMCA2AC, + SFX_MMCA2AD, + SFX_MMCA2AE, + SFX_MMCA2AF, + SFX_MOD_MAN_BUMP_1, + SFX_MOD_MAN_BUMP_2, + SFX_MOD_MAN_BUMP_3, + SFX_MOD_MAN_CHAT_1, + SFX_MOD_MAN_CHAT_2, + SFX_MOD_MAN_CHAT_3, + SFX_MOD_MAN_CHAT_4, + SFX_MOD_MAN_CRASH_CAR_1, + SFX_MOD_MAN_CRASH_CAR_2, + SFX_MOD_MAN_DODGE_1, + SFX_MOD_MAN_DODGE_2, + SFX_MOD_MAN_DRIVER_BLOCKED_1, + SFX_MOD_MAN_DRIVER_BLOCKED_2, + SFX_MOD_MAN_FIGHT_1, + SFX_MOD_MAN_FIGHT_2, + SFX_MOD_MAN_FIGHT_3, + SFX_MOD_MAN_GUN_THREATENED_1, + SFX_MOD_MAN_GUN_THREATENED_2, + SFX_MOD_MAN_JACKED_CAR_1, + SFX_MOD_MAN_JACKED_CAR_2, + SFX_MOD_MAN_JACKED_CAR_3, + SFX_MOD_MAN_SHOCKED_1, + SFX_MOD_WOM_BUMP_1, + SFX_MOD_WOM_BUMP_2, + SFX_MOD_WOM_BUMP_3, + SFX_MOD_WOM_CHAT_1, + SFX_MOD_WOM_CHAT_2, + SFX_MOD_WOM_CHAT_3, + SFX_MOD_WOM_CHAT_4, + SFX_MOD_WOM_CRASH_CAR_1, + SFX_MOD_WOM_CRASH_CAR_2, + SFX_MOD_WOM_DODGE_1, + SFX_MOD_WOM_DODGE_2, + SFX_MOD_WOM_DRIVER_BLOCKED_1, + SFX_MOD_WOM_DRIVER_BLOCKED_2, + SFX_MOD_WOM_FIGHT_1, + SFX_MOD_WOM_FIGHT_2, + SFX_MOD_WOM_FIGHT_3, + SFX_MOD_WOM_GUN_THREATENED_1, + SFX_MOD_WOM_GUN_THREATENED_2, + SFX_MOD_WOM_JACKED_CAR_1, + SFX_MOD_WOM_JACKED_CAR_2, + SFX_MOD_WOM_JACKED_CAR_3, + SFX_MOD_WOM_SHOCKED_1, + SFX_MSA10AA, + SFX_MSA10AB, + SFX_MSA10AC, + SFX_MSA10AD, + SFX_MSA11AA, + SFX_MSA11AB, + SFX_MSA11AC, + SFX_MSA11AD, + SFX_MSA12AA, + SFX_MSA12AC, + SFX_MSA12AD, + SFX_MSA13AA, + SFX_MSA13AB, + SFX_MSA13AC, + SFX_MSA13AD, + SFX_MSA13AE, + SFX_MSA13AF, + SFX_MSA13AG, + SFX_MSA13AH, + SFX_MSA14AA, + SFX_MSA14AB, + SFX_MSA14AC, + SFX_MSA14AD, + SFX_MSAL5AA, + SFX_MSAL5AB, + SFX_MSAL6AA, + SFX_MSAL6AB, + SFX_MSAL6AC, + SFX_MSAL6AD, + SFX_MSAL7AA, + SFX_MSAL7AB, + SFX_MSAL7AC, + SFX_MSAL7AD, + SFX_MSAL7AE, + SFX_MSAL7AF, + SFX_MSAL7AG, + SFX_MSAL8AA, + SFX_MSAL8AB, + SFX_MSAL8AC, + SFX_MSAL8AD, + SFX_MSAL8AF, + SFX_MSAL8AG, + SFX_MSAL9AA, + SFX_MSAL9AB, + SFX_MSAL9AC, + SFX_MSAL9AD, + SFX_MSAL9AE, + SFX_MSAL9AF, + SFX_MTOS1AA, + SFX_MTOS1AB, + SFX_MTOS1AC, + SFX_MTOS1AD, + SFX_MTOS1AE, + SFX_MTOS1AF, + SFX_MTOS1AG, + SFX_MTOS2AA, + SFX_MTOS2AB, + SFX_MTOS2AC, + SFX_MTOS2AD, + SFX_MTOS2AE, + SFX_MTOS2AF, + SFX_MTOS2AG, + SFX_MVIC1AA, + SFX_MVIC1AB, + SFX_MVIC1AC, + SFX_MVIC1AD, + SFX_MVIC1AE, + SFX_MVIC1AF, + SFX_MVIC1AG, + SFX_MVIC1AH, + SFX_MVIC1AI, + SFX_MVIC1AJ, + SFX_MVIC1AK, + SFX_NEDS1AA, + SFX_NEDS1AB, + SFX_NEDS1AC, + SFX_NEDS1AD, + SFX_NEDS1AE, + SFX_NEDS1AF, + SFX_NEDS1AG, + SFX_NEDS1BA, + SFX_NEDS1BB, + SFX_NEDS1BC, + SFX_NEDS1BD, + SFX_NEDS1BE, + SFX_NEDS1BF, + SFX_NEDS2AA, + SFX_NEDS2AB, + SFX_NEDS2AC, + SFX_NEDS2AD, + SFX_NEDS2AE, + SFX_NEDS2AF, + SFX_NEDS2BA, + SFX_NEDS3AA, + SFX_NEDS3AB, + SFX_NEDS3AC, + SFX_NEDS3AD, + SFX_NEDS4AA, + SFX_NEDS4AB, + SFX_NEDS4AC, + SFX_NEDS4AD, + SFX_NEDS4AE, + SFX_NEDS4BA, + SFX_NEDS4BB, + SFX_NEDS4BC, + SFX_NEDS4BD, + SFX_NEDS4BE, + SFX_NEDS4BF, + SFX_NEDS4CA, + SFX_NOOD_AA, + SFX_NOOD_AB, + SFX_NOOD_AC, + SFX_NOOD_AD, + SFX_NOOD_AE, + SFX_NOOD_AF, + SFX_NOOD_AG, + SFX_NOOD_AH, + SFX_NOOD_AI, + SFX_NOOD_AJ, + SFX_NOOD_AK, + SFX_NOOD_AL, + SFX_NOOD_AM, + SFX_NOOD_AN, + SFX_NOOD_AO, + SFX_NOOD_AP, + SFX_NOOD_AQ, + SFX_NOOD_AR, + SFX_NOOD_AS, + SFX_NOOD_AT, + SFX_PBCHAT1, + SFX_PBCHAT10, + SFX_PBCHAT11, + SFX_PBCHAT12, + SFX_PBCHAT13, + SFX_PBCHAT14, + SFX_PBCHAT15, + SFX_PBCHAT16, + SFX_PBCHAT17, + SFX_PBCHAT18, + SFX_PBCHAT19, + SFX_PBCHAT2, + SFX_PBCHAT20, + SFX_PBCHAT21, + SFX_PBCHAT22, + SFX_PBCHAT23, + SFX_PBCHAT24, + SFX_PBCHAT25, + SFX_PBCHAT26, + SFX_PBCHAT27, + SFX_PBCHAT28, + SFX_PBCHAT29, + SFX_PBCHAT3, + SFX_PBCHAT4, + SFX_PBCHAT5, + SFX_PBCHAT6, + SFX_PBCHAT7, + SFX_PBCHAT8, + SFX_PBCHAT9, + SFX_PHCHAT1, + SFX_PHCHAT10, + SFX_PHCHAT11, + SFX_PHCHAT12, + SFX_PHCHAT13, + SFX_PHCHAT14, + SFX_PHCHAT15, + SFX_PHCHAT16, + SFX_PHCHAT17, + SFX_PHCHAT18, + SFX_PHCHAT19, + SFX_PHCHAT2, + SFX_PHCHAT20, + SFX_PHCHAT21, + SFX_PHCHAT22, + SFX_PHCHAT23, + SFX_PHCHAT24, + SFX_PHCHAT25, + SFX_PHCHAT26, + SFX_PHCHAT27, + SFX_PHCHAT28, + SFX_PHCHAT29, + SFX_PHCHAT3, + SFX_PHCHAT4, + SFX_PHCHAT5, + SFX_PHCHAT6, + SFX_PHCHAT7, + SFX_PHCHAT8, + SFX_PHCHAT9, + SFX_PIMP_BUMP_1, + SFX_PIMP_BUMP_2, + SFX_PIMP_BUMP_3, + SFX_PIMP_CHAT_1, + SFX_PIMP_CHAT_2, + SFX_PIMP_CHAT_3, + SFX_PIMP_CHAT_4, + SFX_PIMP_CRASH_CAR_1, + SFX_PIMP_CRASH_CAR_2, + SFX_PIMP_DODGE_1, + SFX_PIMP_DODGE_2, + SFX_PIMP_DRIVER_BLOCKED_1, + SFX_PIMP_DRIVER_BLOCKED_2, + SFX_PIMP_FIGHT_1, + SFX_PIMP_FIGHT_2, + SFX_PIMP_FIGHT_3, + SFX_PIMP_GUN_THREATENED_1, + SFX_PIMP_GUN_THREATENED_2, + SFX_PIMP_JACKED_CAR_1, + SFX_PIMP_JACKED_CAR_2, + SFX_PIMP_JACKED_CAR_3, + SFX_PIMP_SHOCKED_1, + SFX_PIMP_SPECIAL_CASE_1, + SFX_PIMP_SPECIAL_CASE_2, + SFX_PIMP_SPECIAL_CASE_3, + SFX_PIZZ_AA, + SFX_PIZZ_AB, + SFX_PIZZ_AC, + SFX_PIZZ_AD, + SFX_PIZZ_AE, + SFX_PIZZ_AF, + SFX_PIZZ_AG, + SFX_PIZZ_AH, + SFX_PIZZ_AI, + SFX_PIZZ_AJ, + SFX_PIZZ_AK, + SFX_PIZZ_AL, + SFX_PIZZ_AM, + SFX_PIZZ_AN, + SFX_PIZZ_AO, + SFX_PIZZ_AP, + SFX_PIZZ_AQ, + SFX_PIZZ_AR, + SFX_PIZZ_AS, + SFX_PIZZ_AT, + SFX_PROSTITUTE2_BUMP_1, + SFX_PROSTITUTE2_BUMP_2, + SFX_PROSTITUTE2_BUMP_3, + SFX_PROSTITUTE2_CHAT_1, + SFX_PROSTITUTE2_CHAT_2, + SFX_PROSTITUTE2_CHAT_3, + SFX_PROSTITUTE2_CHAT_4, + SFX_PROSTITUTE2_CRASH_CAR_1, + SFX_PROSTITUTE2_CRASH_CAR_2, + SFX_PROSTITUTE2_DODGE_1, + SFX_PROSTITUTE2_DODGE_2, + SFX_PROSTITUTE2_DRIVER_BLOCKED_1, + SFX_PROSTITUTE2_DRIVER_BLOCKED_2, + SFX_PROSTITUTE2_FIGHT_1, + SFX_PROSTITUTE2_FIGHT_2, + SFX_PROSTITUTE2_FIGHT_3, + SFX_PROSTITUTE2_GUN_THREATENED_1, + SFX_PROSTITUTE2_GUN_THREATENED_2, + SFX_PROSTITUTE2_JACKED_CAR_1, + SFX_PROSTITUTE2_JACKED_CAR_2, + SFX_PROSTITUTE2_JACKED_CAR_3, + SFX_PROSTITUTE2_SPECIAL_CASE_1, + SFX_PROSTITUTE2_SPECIAL_CASE_2, + SFX_PROSTITUTE2_SPECIAL_CASE_3, + SFX_PROSTITUTE_BUMP_1, + SFX_PROSTITUTE_BUMP_2, + SFX_PROSTITUTE_BUMP_3, + SFX_PROSTITUTE_CHAT_1, + SFX_PROSTITUTE_CHAT_2, + SFX_PROSTITUTE_CHAT_3, + SFX_PROSTITUTE_CHAT_4, + SFX_PROSTITUTE_CRASH_CAR_1, + SFX_PROSTITUTE_CRASH_CAR_2, + SFX_PROSTITUTE_DODGE_1, + SFX_PROSTITUTE_DODGE_2, + SFX_PROSTITUTE_DRIVER_BLOCKED_1, + SFX_PROSTITUTE_DRIVER_BLOCKED_2, + SFX_PROSTITUTE_FIGHT_1, + SFX_PROSTITUTE_FIGHT_2, + SFX_PROSTITUTE_GUN_THREATENED_1, + SFX_PROSTITUTE_GUN_THREATENED_2, + SFX_PROSTITUTE_JACKED_CAR_1, + SFX_PROSTITUTE_JACKED_CAR_2, + SFX_PROSTITUTE_JACKED_CAR_3, + SFX_PROSTITUTE_JACKED_CAR_4, + SFX_PROSTITUTE_SHOCKED_1, + SFX_PROSTITUTE_SHOCKED_2, + SFX_PROSTITUTE_SHOCKED_3, + SFX_P_MAN1_BUMP_1, + SFX_P_MAN1_BUMP_2, + SFX_P_MAN1_BUMP_3, + SFX_P_MAN1_CHAT_1, + SFX_P_MAN1_CHAT_2, + SFX_P_MAN1_CHAT_3, + SFX_P_MAN1_CRASH_CAR_1, + SFX_P_MAN1_CRASH_CAR_2, + SFX_P_MAN1_DODGE_1, + SFX_P_MAN1_DODGE_2, + SFX_P_MAN1_DRIVER_BLOCKED_1, + SFX_P_MAN1_DRIVER_BLOCKED_2, + SFX_P_MAN1_FIGHT_1, + SFX_P_MAN1_FIGHT_2, + SFX_P_MAN1_FIGHT_3, + SFX_P_MAN1_GUN_THREATENED_1, + SFX_P_MAN1_GUN_THREATENED_2, + SFX_P_MAN1_JACKED_CAR_1, + SFX_P_MAN1_JACKED_CAR_2, + SFX_P_MAN1_JACKED_CAR_3, + SFX_P_MAN2_BUMP_1, + SFX_P_MAN2_BUMP_2, + SFX_P_MAN2_BUMP_3, + SFX_P_MAN2_CHAT_1, + SFX_P_MAN2_CHAT_2, + SFX_P_MAN2_CHAT_3, + SFX_P_MAN2_CHAT_4, + SFX_P_MAN2_CRASH_CAR_1, + SFX_P_MAN2_CRASH_CAR_2, + SFX_P_MAN2_DODGE_1, + SFX_P_MAN2_DODGE_2, + SFX_P_MAN2_DRIVER_BLOCKED_1, + SFX_P_MAN2_DRIVER_BLOCKED_2, + SFX_P_MAN2_FIGHT_1, + SFX_P_MAN2_FIGHT_2, + SFX_P_MAN2_FIGHT_3, + SFX_P_MAN2_FIGHT_4, + SFX_P_MAN2_GUN_THREATENED_1, + SFX_P_MAN2_GUN_THREATENED_2, + SFX_P_MAN2_JACKED_CAR_1, + SFX_P_MAN2_JACKED_CAR_2, + SFX_P_MAN2_JACKED_CAR_3, + SFX_P_MAN2_SHOCKED_1, + SFX_P_WOM1_BUMP_1, + SFX_P_WOM1_BUMP_2, + SFX_P_WOM1_BUMP_3, + SFX_P_WOM1_CHAT_1, + SFX_P_WOM1_CHAT_2, + SFX_P_WOM1_CHAT_3, + SFX_P_WOM1_CHAT_4, + SFX_P_WOM1_CRASH_CAR_1, + SFX_P_WOM1_CRASH_CAR_2, + SFX_P_WOM1_DODGE_1, + SFX_P_WOM1_DODGE_2, + SFX_P_WOM1_DRIVER_BLOCKED_1, + SFX_P_WOM1_DRIVER_BLOCKED_2, + SFX_P_WOM1_FIGHT_1, + SFX_P_WOM1_FIGHT_2, + SFX_P_WOM1_FIGHT_3, + SFX_P_WOM1_GUN_THREATENED_1, + SFX_P_WOM1_GUN_THREATENED_2, + SFX_P_WOM1_JACKED_CAR_1, + SFX_P_WOM1_JACKED_CAR_2, + SFX_P_WOM1_JACKED_CAR_3, + SFX_P_WOM1_SHOCKED_1, + SFX_P_WOM2_BUMP_1, + SFX_P_WOM2_BUMP_2, + SFX_P_WOM2_BUMP_3, + SFX_P_WOM2_CHAT_1, + SFX_P_WOM2_CHAT_2, + SFX_P_WOM2_CHAT_3, + SFX_P_WOM2_CHAT_4, + SFX_P_WOM2_CRASH_CAR_1, + SFX_P_WOM2_CRASH_CAR_2, + SFX_P_WOM2_DODGE_1, + SFX_P_WOM2_DODGE_2, + SFX_P_WOM2_DRIVER_BLOCKED_1, + SFX_P_WOM2_DRIVER_BLOCKED_2, + SFX_P_WOM2_FIGHT_1, + SFX_P_WOM2_FIGHT_2, + SFX_P_WOM2_FIGHT_3, + SFX_P_WOM2_GUN_THREATENED_1, + SFX_P_WOM2_GUN_THREATENED_2, + SFX_P_WOM2_JACKED_CAR_1, + SFX_P_WOM2_JACKED_CAR_2, + SFX_P_WOM2_SHOCKED_1, + SFX_RAC1_AA, + SFX_RAC1_AB, + SFX_RAC1_AC, + SFX_RAC1_AD, + SFX_RAC1_AE, + SFX_RAC1_AF, + SFX_RAC1_AG, + SFX_RAC2_AA, + SFX_RAC2_AB, + SFX_RAC2_AC, + SFX_RAC2_AD, + SFX_RAC2_AE, + SFX_RAC2_AF, + SFX_RAC3_AB, + SFX_RAC3_AC, + SFX_RAC3_AD, + SFX_RAC3_AE, + SFX_RAC3_AF, + SFX_RAC3_AG, + SFX_RAYS1AA, + SFX_RAYS1AB, + SFX_RAYS1AC, + SFX_RAYS1BA, + SFX_RAYS1BB, + SFX_RAYS1CA, + SFX_RAYS1CB, + SFX_RAYS1CC, + SFX_RAYS1CD, + SFX_RAYS1CE, + SFX_RAYS1CF, + SFX_RAYS1DA, + SFX_RAYS1DB, + SFX_RAYS1DC, + SFX_RAYS2AA, + SFX_RAYS2AB, + SFX_RAYS2AD, + SFX_RAYS2AE, + SFX_RAYS2AF, + SFX_RAYS2AG, + SFX_RAYS2AH, + SFX_RAYS2AI, + SFX_RAYS2BA, + SFX_RAYS2BB, + SFX_RAYS2CA, + SFX_RAYS2CB, + SFX_RAYS2DA, + SFX_RAYS2DB, + SFX_RAYS2EA, + SFX_RAYS2EB, + SFX_RAYS4AA, + SFX_RAYS4AB, + SFX_RAYS4AC, + SFX_RAYS4AD, + SFX_RAYS4AE, + SFX_RAYS4AF, + SFX_RAYS4BA, + SFX_RAYS4BB, + SFX_RAYS4BC, + SFX_RAYS4BD, + SFX_RAYS4BE, + SFX_RAYS4BF, + SFX_RAYS4BG, + SFX_RAYS5AA, + SFX_RAYS5AB, + SFX_RAYS5AC, + SFX_RAYS5AD, + SFX_RAYS5AE, + SFX_RAYS5AF, + SFX_RAYS5AG, + SFX_RAYS5AH, + SFX_RAYS5AI, + SFX_RAYS5BA, + SFX_RAYS5BB, + SFX_RMN_AA, + SFX_RMN_AB, + SFX_RMN_AC, + SFX_RMN_AD, + SFX_RMN_AE, + SFX_RMN_AF, + SFX_RMN_AG, + SFX_RMN_AH, + SFX_RMN_AI, + SFX_RMN_AJ, + SFX_RMN_AK, + SFX_RUNPAST, + SFX_SAL1_AA, + SFX_SAL1_AB, + SFX_SAL1_AC, + SFX_SAL1_AE, + SFX_SAL1_BA, + SFX_SAL1_BB, + SFX_SAL1_BC, + SFX_SAL1_BD, + SFX_SAL2_AA, + SFX_SAL2_AB, + SFX_SAL2_AC, + SFX_SAL2_AD, + SFX_SAL2_AF, + SFX_SAL2_AG, + SFX_SAL2_BA, + SFX_SAL2_BB, + SFX_SAL2_BC, + SFX_SAL2_BD, + SFX_SAL2_CA, + SFX_SAL2_CB, + SFX_SAL2_CC, + SFX_SAL2_CD, + SFX_SAL2_CE, + SFX_SAL2_CF, + SFX_SAL2_CG, + SFX_SAL2_CH, + SFX_SAL2_CI, + SFX_SAL2_CJ, + SFX_SAL2_CK, + SFX_SAL2_CL, + SFX_SAL2_CM, + SFX_SAL2_CN, + SFX_SAL2_CO, + SFX_SAL2_CP, + SFX_SAL2_CQ, + SFX_SAL2_CR, + SFX_SAL2_CS, + SFX_SAL2_CT, + SFX_SAL2_CU, + SFX_SAL2_CV, + SFX_SAL2_DA, + SFX_SAL2_DB, + SFX_SAL2_DC, + SFX_SAL2_DD, + SFX_SAL2_DE, + SFX_SAL2_EA, + SFX_SAL3_AA, + SFX_SAL3_AD, + SFX_SAL3_AE, + SFX_SAL3_AF, + SFX_SAL3_AG, + SFX_SAL3_AI, + SFX_SAL3_BA, + SFX_SAL3_BB, + SFX_SAL3_CA, + SFX_SAL3_CB, + SFX_SAL3_DA, + SFX_SAL4_AA, + SFX_SAL4_AB, + SFX_SAL4_AC, + SFX_SAL4_AD, + SFX_SAL4_AE, + SFX_SAL4_AF, + SFX_SAL4_AH, + SFX_SAL4_AI, + SFX_SAL4_AJ, + SFX_SAL4_BA, + SFX_SAL4_CA, + SFX_SAL4_CB, + SFX_SAL4_CC, + SFX_SAL4_CD, + SFX_SAL4_CE, + SFX_SAL4_CF, + SFX_SAL4_CG, + SFX_SAL4_CH, + SFX_SAL4_CI, + SFX_SAL4_CJ, + SFX_SAL4_CK, + SFX_SAL4_CL, + SFX_SAL4_CM, + SFX_SAL4_CN, + SFX_SAL4_CO, + SFX_SAL4_CP, + SFX_SAL4_CQ, + SFX_SAL4_DA, + SFX_SAL4_EA, + SFX_SAL5_AA, + SFX_SAL5_AB, + SFX_SAL5_AD, + SFX_SAL5_AE, + SFX_SAL5_AF, + SFX_SAL5_AG, + SFX_SAL5_AH, + SFX_SAL5_AI, + SFX_SAL5_AJ, + SFX_SAL6_AA, + SFX_SAL6_AB, + SFX_SAL6_AC, + SFX_SAL6_AE, + SFX_SAL6_AF, + SFX_SAL6_AG, + SFX_SAL6_AH, + SFX_SAL6_AI, + SFX_SAL6_AJ, + SFX_SAL6_BA, + SFX_SAL6_BB, + SFX_SAL6_BC, + SFX_SAL6_BD, + SFX_SAL6_BE, + SFX_SAL6_BF, + SFX_SAL6_BH, + SFX_SAL6_BJ, + SFX_SAL6_BK, + SFX_SAL6_CA, + SFX_SAL6_CB, + SFX_SAL6_CC, + SFX_SAL6_CD, + SFX_SAL7_AA, + SFX_SAL7_AB, + SFX_SAL7_AC, + SFX_SAL7_AD, + SFX_SAL7_AE, + SFX_SAL7_AF, + SFX_SAL7_AG, + SFX_SAL7_AI, + SFX_SAL7_AJ, + SFX_SAL7_AK, + SFX_SAL7_BA, + SFX_SAL7_BB, + SFX_SAL7_BC, + SFX_SAL7_BD, + SFX_SAL7_BE, + SFX_SAL7_BF, + SFX_SAL7_BG, + SFX_SAL7_BH, + SFX_SAL7_CA, + SFX_SAL7_CB, + SFX_SAL7_CC, + SFX_SAL7_CD, + SFX_SAL8_AA, + SFX_SAL8_AB, + SFX_SAL8_AC, + SFX_SAL8_BA, + SFX_SAL8_BC, + SFX_SAL8_BD, + SFX_SAL8_BE, + SFX_SAL8_BF, + SFX_SAL8_CA, + SFX_SAL8_CC, + SFX_SAL8_DA, + SFX_SAL8_DB, + SFX_SAL8_DC, + SFX_SAL8_EA, + SFX_SAL8_EC, + SFX_SAL8_ED, + SFX_SAL8_EE, + SFX_SAL8_FA, + SFX_SAL8_GA, + SFX_SAL8_GB, + SFX_SAL8_HA, + SFX_SAL8_HB, + SFX_SAL8_HC, + SFX_SAL8_HD, + SFX_SAL8_HE, + SFX_SAL8_HF, + SFX_SAL8_HG, + SFX_SAL8_HH, + SFX_SALH1AA, + SFX_SALH1AB, + SFX_SALH1BA, + SFX_SALH1BB, + SFX_SALH1CA, + SFX_SALH1CB, + SFX_SALH1DA, + SFX_SALH1EA, + SFX_SALH1EB, + SFX_SALH1FB, + SFX_SALH1FC, + SFX_SALH1FG, + SFX_SALH1GA, + SFX_SALH1GB, + SFX_SALH1HA, + SFX_SALH1HB, + SFX_SALH2AA, + SFX_SALH2AB, + SFX_SALH2AC, + SFX_SALH2AD, + SFX_SALH2AE, + SFX_SALH2AF, + SFX_SALH2AG, + SFX_SALH2AH, + SFX_SALH2BA, + SFX_SALH2BB, + SFX_SALH2BC, + SFX_SALH2BD, + SFX_SALH2BE, + SFX_SALH2BF, + SFX_SALH2BG, + SFX_SALH2BH, + SFX_SALH2BI, + SFX_SALH2CA, + SFX_SALH3AA, + SFX_SALH3AB, + SFX_SALH3AC, + SFX_SALH3AD, + SFX_SALH3AE, + SFX_SALH3AF, + SFX_SALH3AG, + SFX_SALH3AH, + SFX_SALH3AI, + SFX_SALH3AJ, + SFX_SALH3AK, + SFX_SALH3BA, + SFX_SALH3BB, + SFX_SALH3CA, + SFX_SALH3CC, + SFX_SALH3CD, + SFX_SALH4AA, + SFX_SALH4AB, + SFX_SALH4AC, + SFX_SALH4AD, + SFX_SALH4AE, + SFX_SALH4AF, + SFX_SALH4AG, + SFX_SALH4AH, + SFX_SALH4AI, + SFX_SALH4AJ, + SFX_SALH4BA, + SFX_SALH4BB, + SFX_SALH4BC, + SFX_SALH4CA, + SFX_SALH4CB, + SFX_SALH5CA, + SFX_SALH5CB, + SFX_SALH5CC, + SFX_SALH5DA, + SFX_SALH5DB, + SFX_SALH5EA, + SFX_SALH5EB, + SFX_SALH5FA, + SFX_SALH5GA, + SFX_SALH5GB, + SFX_SALH5GC, + SFX_SALH5HA, + SFX_SALH5IA, + SFX_SALH5IB, + SFX_SALH5JA, + SFX_SALH5KA, + SFX_SALH5KB, + SFX_SALH5LA, + SFX_SALH5LB, + SFX_SALH5MA, + SFX_SALH5MB, + SFX_SALH5MC, + SFX_SALH5NA, + SFX_SALH5OA, + SFX_SALH5OB, + SFX_SALH5OC, + SFX_SALH5OD, + SFX_SALH5OE, + SFX_SALH5OF, + SFX_SALH5OG, + SFX_SALH5OH, + SFX_SALH5OI, + SFX_SALH5OJ, + SFX_SALH5OK, + SFX_SALS1AA, + SFX_SALS1AB, + SFX_SALS1AC, + SFX_SALS1AD, + SFX_SALS1AE, + SFX_SALS1AF, + SFX_SALS1AG, + SFX_SALS1AH, + SFX_SALS1AI, + SFX_SALS1BA, + SFX_SALS1BB, + SFX_SALS1BC, + SFX_SALS1BD, + SFX_SALS2AA, + SFX_SALS2AB, + SFX_SALS2AC, + SFX_SALS2AD, + SFX_SALS2BA, + SFX_SALS2BB, + SFX_SALS2BC, + SFX_SALS2BD, + SFX_SALS2BE, + SFX_SALS2BF, + SFX_SALS2CA, + SFX_SALS2CB, + SFX_SALS2CC, + SFX_SALS2CD, + SFX_SALS2CE, + SFX_SALS3AA, + SFX_SALS3AB, + SFX_SALS3AC, + SFX_SALS3BA, + SFX_SALS3BB, + SFX_SALS3BC, + SFX_SALS3BD, + SFX_SALS3CA, + SFX_SALS3CB, + SFX_SALS3CC, + SFX_SALS3CD, + SFX_SALS3CE, + SFX_SALS3CF, + SFX_SALS3CG, + SFX_SALS3DA, + SFX_SALS3DB, + SFX_SALS3DC, + SFX_SALS3DD, + SFX_SALS3DE, + SFX_SALS3DF, + SFX_SALS3DG, + SFX_SALS3DH, + SFX_SALS3DI, + SFX_SALS4AA, + SFX_SALS4AB, + SFX_SALS4AC, + SFX_SALS4AD, + SFX_SALS4AE, + SFX_SALS4AF, + SFX_SALS4BA, + SFX_SALS4BB, + SFX_SALS4BC, + SFX_SALS4BD, + SFX_SALS4BE, + SFX_SALS4BF, + SFX_SALS4BG, + SFX_SALS4BH, + SFX_SALS5AA, + SFX_SALS5AB, + SFX_SALS5AC, + SFX_SALS5AD, + SFX_SALS5AE, + SFX_SALS5AF, + SFX_SALS5BA, + SFX_SALS5BB, + SFX_SALS5BC, + SFX_SALS5BD, + SFX_SALS5BE, + SFX_SALS5BF, + SFX_SALS5BG, + SFX_SALS5CA, + SFX_SALS5CB, + SFX_SALS5CC, + SFX_SALS5CD, + SFX_SALS5CE, + SFX_SALS5CF, + SFX_SALS5CG, + SFX_SALS6AA, + SFX_SALS6AB, + SFX_SALS6AD, + SFX_SALS6AE, + SFX_SALS6AF, + SFX_SALS6AG, + SFX_SALS6AH, + SFX_SALVATORE_CRASH_CAR_1, + SFX_SALVATORE_CRASH_CAR_2, + SFX_SALVATORE_CRASH_CAR_3, + SFX_SALVATORE_CRASH_CAR_4, + SFX_SALVATORE_DRIVER_BLOCKED_1, + SFX_SALVATORE_DRIVER_BLOCKED_2, + SFX_SALVATORE_DRIVER_BLOCKED_3, + SFX_SALVATORE_JACKED_CAR_1, + SFX_SALVATORE_JACKED_CAR_2, + SFX_SALVATORE_SHOCKED_1, + SFX_SALVATORE_SHOCKED_2, + SFX_SALX_AA, + SFX_SALX_AB, + SFX_SALX_AC, + SFX_SALX_AD, + SFX_SALX_AE, + SFX_SALX_AF, + SFX_SALX_AG, + SFX_SALX_AH, + SFX_SALX_AI, + SFX_SALX_AK, + SFX_SALX_AL, + SFX_SALX_AM, + SFX_SALX_AN, + SFX_SALX_AO, + SFX_SALX_AP, + SFX_SALX_AQ, + SFX_SALX_AR, + SFX_SALX_AS, + SFX_SCUM_MAN_BUMP_1, + SFX_SCUM_MAN_BUMP_2, + SFX_SCUM_MAN_BUMP_3, + SFX_SCUM_MAN_CHAT_1, + SFX_SCUM_MAN_CHAT_2, + SFX_SCUM_MAN_CHAT_3, + SFX_SCUM_MAN_CHAT_4, + SFX_SCUM_MAN_CRASH_CAR_1, + SFX_SCUM_MAN_CRASH_CAR_2, + SFX_SCUM_MAN_DODGE_1, + SFX_SCUM_MAN_DODGE_2, + SFX_SCUM_MAN_DRIVER_BLOCKED_1, + SFX_SCUM_MAN_DRIVER_BLOCKED_2, + SFX_SCUM_MAN_FIGHT_1, + SFX_SCUM_MAN_FIGHT_2, + SFX_SCUM_MAN_FIGHT_3, + SFX_SCUM_MAN_GUN_THREATENED_1, + SFX_SCUM_MAN_GUN_THREATENED_2, + SFX_SCUM_MAN_JACKED_CAR_1, + SFX_SCUM_MAN_JACKED_CAR_2, + SFX_SCUM_MAN_JACKED_CAR_3, + SFX_SCUM_MAN_SHOCKED_1, + SFX_SCUM_MAN_SPECIAL_CASE_1, + SFX_SCUM_MAN_SPECIAL_CASE_2, + SFX_SCUM_MAN_SPECIAL_CASE_3, + SFX_SCUM_WOM_BUMP_1, + SFX_SCUM_WOM_BUMP_2, + SFX_SCUM_WOM_BUMP_3, + SFX_SCUM_WOM_CAR_JACKED_1, + SFX_SCUM_WOM_CAR_JACKED_2, + SFX_SCUM_WOM_CHAT_1, + SFX_SCUM_WOM_CHAT_2, + SFX_SCUM_WOM_CHAT_3, + SFX_SCUM_WOM_CHAT_4, + SFX_SCUM_WOM_CRASH_CAR_1, + SFX_SCUM_WOM_CRASH_CAR_2, + SFX_SCUM_WOM_DODGE_1, + SFX_SCUM_WOM_DODGE_2, + SFX_SCUM_WOM_DRIVER_BLOCKED_1, + SFX_SCUM_WOM_DRIVER_BLOCKED_2, + SFX_SCUM_WOM_FIGHT_1, + SFX_SCUM_WOM_FIGHT_2, + SFX_SCUM_WOM_FIGHT_3, + SFX_SCUM_WOM_GUN_THREATENED_1, + SFX_SCUM_WOM_GUN_THREATENED_2, + SFX_SCUM_WOM_SHOCKED_1, + SFX_SFX_AIRHORN_LEFT, + SFX_SFX_AIRHORN_RIGHT, + SFX_SFX_ANG1_AA, + SFX_SFX_ANG1_AB, + SFX_SFX_ANG1_AC, + SFX_SFX_ANG1_AD, + SFX_SFX_ANG1_AE, + SFX_SFX_ANG1_AF, + SFX_SFX_ANG1_AG, + SFX_SFX_ANG1_AH, + SFX_SFX_ANG1_AI, + SFX_SFX_ANG1_AJ, + SFX_SFX_ANG1_AK, + SFX_SFX_ANG1_AL, + SFX_SFX_ANG1_AM, + SFX_SFX_ANG1_AN, + SFX_SFX_ANG1_AO, + SFX_SFX_ANG1_AP, + SFX_SFX_ANG1_AQ, + SFX_SFX_ANG1_AR, + SFX_SFX_ANG1_AS, + SFX_SFX_ANG1_AT, + SFX_SFX_ANG1_AU, + SFX_SFX_ANG1_AV, + SFX_SFX_ANG1_AW, + SFX_SFX_BLOW_ROOF, + SFX_SFX_BNK1_12, + SFX_SFX_CAMERA_LEFT, + SFX_SFX_CAMERA_RIGHT, + SFX_SFX_CHEER1, + SFX_SFX_CHEER2, + SFX_SFX_CHEER3, + SFX_SFX_CHEER4, + SFX_SFX_CRIME_1, + SFX_SFX_CRIME_10, + SFX_SFX_CRIME_11, + SFX_SFX_CRIME_12, + SFX_SFX_CRIME_2, + SFX_SFX_CRIME_3, + SFX_SFX_CRIME_4, + SFX_SFX_CRIME_5, + SFX_SFX_CRIME_6, + SFX_SFX_CRIME_7, + SFX_SFX_CRIME_8, + SFX_SFX_CRIME_9, + SFX_SFX_IN_LIFT, + SFX_SFX_JDT3_AA, + SFX_SFX_JDT3_AB, + SFX_SFX_JDT3_AC, + SFX_SFX_JDT3_AD, + SFX_SFX_JDT3_AE, + SFX_SFX_JDT3_AG, + SFX_SFX_JDT3_AH, + SFX_SFX_JDT3_BA, + SFX_SFX_JDT3_BB, + SFX_SFX_JDT3_BC, + SFX_SFX_JDT3_BD, + SFX_SFX_JDT3_BE, + SFX_SFX_JDT3_BF, + SFX_SFX_LANAMU1, + SFX_SFX_LANAMU2, + SFX_SFX_LANSTP1, + SFX_SFX_LANSTP2, + SFX_SFX_LIFT_BELL, + SFX_SFX_LIFT_CLOSE, + SFX_SFX_LIFT_OPEN, + SFX_SFX_LIFT_RUNNING, + SFX_SFX_MAR4_AA, + SFX_SFX_MAR4_AB, + SFX_SFX_MAR4_AC, + SFX_SFX_MAR4_AD, + SFX_SFX_MAR4_BA, + SFX_SFX_MAR4_BB, + SFX_SFX_MAR4_BC, + SFX_SFX_MAR4_BD, + SFX_SFX_MAR4_BE, + SFX_SFX_MAR4_BF, + SFX_SFX_MAR4_BG, + SFX_SFX_RING, + SFX_SFX_OOH1, + SFX_SFX_OOH2, + SFX_SFX_PAGER_RING, + SFX_SFX_POLICE_RADIO_AMBULANCE, + SFX_SFX_POLICE_RADIO_BLACK, + SFX_SFX_POLICE_RADIO_BLUE, + SFX_SFX_POLICE_RADIO_BOAT, + SFX_SFX_POLICE_RADIO_BUGGY, + SFX_SFX_POLICE_RADIO_BUS, + SFX_SFX_POLICE_RADIO_COACH, + SFX_SFX_POLICE_RADIO_CRUISER, + SFX_SFX_POLICE_RADIO_DINGHY, + SFX_SFX_POLICE_RADIO_DOWNTOWN, + SFX_SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL, + SFX_SFX_POLICE_RADIO_FIRE_TRUCK, + SFX_SFX_POLICE_RADIO_GARBAGE_TRUCK, + SFX_SFX_POLICE_RADIO_GOLF_CART, + SFX_SFX_POLICE_RADIO_GREEN, + SFX_SFX_POLICE_RADIO_GREY, + SFX_SFX_POLICE_RADIO_HEARSE, + SFX_SFX_POLICE_RADIO_HELICOPTER, + SFX_SFX_POLICE_RADIO_ICE_CREAM_VAN, + SFX_SFX_POLICE_RADIO_LEAF_LINKS, + SFX_SFX_POLICE_RADIO_LITTLE_HAITI, + SFX_SFX_POLICE_RADIO_LITTLE_HAVANA, + SFX_SFX_POLICE_RADIO_LOWRIDER, + SFX_SFX_POLICE_RADIO_MOPED, + SFX_SFX_POLICE_RADIO_MOTOBIKE, + SFX_SFX_POLICE_RADIO_OCEAN_BEACH, + SFX_SFX_POLICE_RADIO_OFFROAD, + SFX_SFX_POLICE_RADIO_ORANGE, + SFX_SFX_POLICE_RADIO_PICKUP, + SFX_SFX_POLICE_RADIO_PLANE, + SFX_SFX_POLICE_RADIO_POLICE_CAR, + SFX_SFX_POLICE_RADIO_PRAWN_ISLAND, + SFX_SFX_POLICE_RADIO_PURPLE, + SFX_SFX_POLICE_RADIO_RED, + SFX_SFX_POLICE_RADIO_RIG, + SFX_SFX_POLICE_RADIO_SEDAN, + SFX_SFX_POLICE_RADIO_SILVER, + SFX_SFX_POLICE_RADIO_SPEEDBOAT, + SFX_SFX_POLICE_RADIO_SPORTS_CAR, + SFX_SFX_POLICE_RADIO_STARFISH_ISLAND, + SFX_SFX_POLICE_RADIO_STATION_WAGON, + SFX_SFX_POLICE_RADIO_STRETCH, + SFX_SFX_POLICE_RADIO_SWAT_VAN, + SFX_SFX_POLICE_RADIO_TANK, + SFX_SFX_POLICE_RADIO_TAXI, + SFX_SFX_POLICE_RADIO_TRUCK, + SFX_SFX_POLICE_RADIO_TUDOOR, + SFX_SFX_POLICE_RADIO_VAN, + SFX_SFX_POLICE_RADIO_VICEPORT, + SFX_SFX_POLICE_RADIO_VICE_CITY, + SFX_SFX_POLICE_RADIO_VICE_CITY_BEACH, + SFX_SFX_POLICE_RADIO_VICE_CITY_MAINLAND, + SFX_SFX_POLICE_RADIO_VICE_POINT, + SFX_SFX_POLICE_RADIO_WASHINGTON_BEACH, + SFX_SFX_POLICE_RADIO_WHITE, + SFX_SFX_POLICE_RADIO_YELLOW, + SFX_SFX_PSYCH_1, + SFX_SFX_PSYCH_2, + SFX_SFX_SAL7_BA, + SFX_SFX_SAL7_BB, + SFX_SFX_SAL7_BC, + SFX_SFX_SAL7_BD, + SFX_SFX_SAL7_BE, + SFX_SFX_SAL7_BF, + SFX_SFX_SAL7_BG, + SFX_SFX_SAL7_BH, + SFX_SFX_SAL7_CA, + SFX_SFX_SAL7_CB, + SFX_SFX_SAL7_CC, + SFX_SFX_SAL7_CD, + SFX_SFX_SFX_01, + SFX_SFX_SFX_02, + SFX_SFX_SNIPER_SHOT_1, + SFX_SFX_SNIPER_SHOT_2, + SFX_SFX_TAX1_1, + SFX_SFX_TAX1_2, + SFX_SFX_TAX1_3, + SFX_SFX_TAX1_4, + SFX_SFX_TAX1_5, + SFX_SFX_TAX2_1, + SFX_SFX_TAX2_2, + SFX_SFX_TAX2_3, + SFX_SFX_TAX2_4, + SFX_SFX_TAX2_5, + SFX_SFX_TAX2_6, + SFX_SFX_TAX2_7, + SFX_SFX_TAX3_1, + SFX_SFX_TAX3_2, + SFX_SFX_TAX3_3, + SFX_SFX_TAX3_4, + SFX_SFX_TAX3_5, + SFX_SFX_VICE_VOICE_1_ARREST_1, + SFX_SFX_VICE_VOICE_1_ARREST_2, + SFX_SFX_VICE_VOICE_1_ARREST_3, + SFX_SFX_VICE_VOICE_1_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_VICE_VOICE_2_ARREST_1, + SFX_SFX_VICE_VOICE_2_ARREST_2, + SFX_SFX_VICE_VOICE_2_ARREST_3, + SFX_SFX_VICE_VOICE_2_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_VICE_VOICE_3_ARREST_1, + SFX_SFX_VICE_VOICE_3_ARREST_2, + SFX_SFX_VICE_VOICE_3_ARREST_3, + SFX_SFX_VICE_VOICE_3_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_VICE_VOICE_4_ARREST_1, + SFX_SFX_VICE_VOICE_4_ARREST_2, + SFX_SFX_VICE_VOICE_4_ARREST_3, + SFX_SFX_VICE_VOICE_4_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_VICE_VOICE_5_ARREST_1, + SFX_SFX_VICE_VOICE_5_ARREST_2, + SFX_SFX_VICE_VOICE_5_ARREST_3, + SFX_SFX_VICE_VOICE_5_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_VICE_VOICE_6_ARREST_1, + SFX_SFX_VICE_VOICE_6_ARREST_2, + SFX_SFX_VICE_VOICE_6_ARREST_3, + SFX_SFX_VICE_VOICE_6_MIAMIVICE_EXITING_CAR_1, + SFX_SFX_WILLIE_BIKE_REV, + SFX_SFX_WILLIE_CAR_REV, + SFX_SHOPBELL, + SFX_SHOPPER1_BUMP_1, + SFX_SHOPPER1_BUMP_2, + SFX_SHOPPER1_BUMP_3, + SFX_SHOPPER1_CHAT_1, + SFX_SHOPPER1_CHAT_2, + SFX_SHOPPER1_CHAT_3, + SFX_SHOPPER1_CHAT_4, + SFX_SHOPPER1_CRASH_CAR_1, + SFX_SHOPPER1_CRASH_CAR_2, + SFX_SHOPPER1_DODGE_1, + SFX_SHOPPER1_DODGE_2, + SFX_SHOPPER1_DRIVER_BLOCKED_1, + SFX_SHOPPER1_DRIVER_BLOCKED_2, + SFX_SHOPPER1_FIGHT_1, + SFX_SHOPPER1_FIGHT_2, + SFX_SHOPPER1_FIGHT_3, + SFX_SHOPPER1_GUN_THREATENED_1, + SFX_SHOPPER1_GUN_THREATENED_2, + SFX_SHOPPER1_JACKED_CAR_1, + SFX_SHOPPER1_JACKED_CAR_2, + SFX_SHOPPER1_JACKED_CAR_3, + SFX_SHOPPER1_SHOCKED_1, + SFX_SHOPPER2_BUMP_1, + SFX_SHOPPER2_BUMP_2, + SFX_SHOPPER2_BUMP_3, + SFX_SHOPPER2_CHAT_1, + SFX_SHOPPER2_CHAT_2, + SFX_SHOPPER2_CHAT_3, + SFX_SHOPPER2_CRASH_CAR_1, + SFX_SHOPPER2_CRASH_CAR_2, + SFX_SHOPPER2_DODGE_1, + SFX_SHOPPER2_DODGE_2, + SFX_SHOPPER2_DRIVER_BLOCKED_1, + SFX_SHOPPER2_DRIVER_BLOCKED_2, + SFX_SHOPPER2_FIGHT_1, + SFX_SHOPPER2_FIGHT_2, + SFX_SHOPPER2_FIGHT_3, + SFX_SHOPPER2_GUN_THREATENED_1, + SFX_SHOPPER2_GUN_THREATENED_2, + SFX_SHOPPER2_JACKED_CAR_1, + SFX_SHOPPER2_JACKED_CAR_2, + SFX_SHOPPER2_JACKED_CAR_3, + SFX_SHOPPER2_SHOCKED_1, + SFX_SHOPPER3_BUMP_1, + SFX_SHOPPER3_BUMP_2, + SFX_SHOPPER3_BUMP_3, + SFX_SHOPPER3_CHAT_1, + SFX_SHOPPER3_CHAT_2, + SFX_SHOPPER3_CHAT_3, + SFX_SHOPPER3_CRASH_CAR_1, + SFX_SHOPPER3_CRASH_CAR_2, + SFX_SHOPPER3_DODGE_1, + SFX_SHOPPER3_DODGE_2, + SFX_SHOPPER3_DRIVER_BLOCKED_1, + SFX_SHOPPER3_DRIVER_BLOCKED_2, + SFX_SHOPPER3_FIGHT_1, + SFX_SHOPPER3_FIGHT_2, + SFX_SHOPPER3_FIGHT_3, + SFX_SHOPPER3_GUN_THREATENED_1, + SFX_SHOPPER3_GUN_THREATENED_2, + SFX_SHOPPER3_JACKED_CAR_1, + SFX_SHOPPER3_JACKED_CAR_2, + SFX_SHOPPER3_JACKED_CAR_3, + SFX_SHOPPER3_SHOCKED_1, + SFX_STRE_AA, + SFX_STRE_AB, + SFX_STRE_AC, + SFX_STRE_AD, + SFX_STRE_AE, + SFX_STRE_AF, + SFX_STRE_AG, + SFX_STRE_BA, + SFX_STRE_BB, + SFX_STRE_BC, + SFX_STRE_BD, + SFX_STRE_BE, + SFX_STRE_BF, + SFX_STRE_BG, + SFX_STRE_CA, + SFX_STRE_CB, + SFX_STRE_CC, + SFX_STUD_MAN_CHAT_1, + SFX_STUD_MAN_CHAT_2, + SFX_STUD_MAN_CHAT_3, + SFX_STUD_MAN_CHAT_4, + SFX_STUD_MAN_CRASH_CAR_1, + SFX_STUD_MAN_CRASH_CAR_2, + SFX_STUD_MAN_DODGE_1, + SFX_STUD_MAN_DODGE_2, + SFX_STUD_MAN_DRIVER_BLOCKED_1, + SFX_STUD_MAN_DRIVER_BLOCKED_2, + SFX_STUD_MAN_FIGHT_1, + SFX_STUD_MAN_FIGHT_2, + SFX_STUD_MAN_FIGHT_3, + SFX_STUD_MAN_GUN_THREATENED_1, + SFX_STUD_MAN_GUN_THREATENED_2, + SFX_STUD_MAN_JACKED_CAR_1, + SFX_STUD_MAN_JACKED_CAR_2, + SFX_STUD_MAN_JACKED_CAR_3, + SFX_STUD_MAN_SHOCKED_1, + SFX_STUD_MAN_SPECIAL_CASE_1, + SFX_STUD_MAN_SPECIAL_CASE_2, + SFX_STUD_MAN_SPECIAL_CASE_3, + SFX_STUD_WOM_BUMP_1, + SFX_STUD_WOM_BUMP_2, + SFX_STUD_WOM_BUMP_3, + SFX_STUD_WOM_CHAT_1, + SFX_STUD_WOM_CHAT_2, + SFX_STUD_WOM_CHAT_3, + SFX_STUD_WOM_CHAT_4, + SFX_STUD_WOM_CRASH_CAR_1, + SFX_STUD_WOM_CRASH_CAR_2, + SFX_STUD_WOM_DODGE_1, + SFX_STUD_WOM_DODGE_2, + SFX_STUD_WOM_DRIVER_BLOCKED_1, + SFX_STUD_WOM_DRIVER_BLOCKED_2, + SFX_STUD_WOM_FIGHT_1, + SFX_STUD_WOM_FIGHT_2, + SFX_STUD_WOM_GUN_THREATENED_1, + SFX_STUD_WOM_GUN_THREATENED_2, + SFX_STUD_WOM_JACKED_CAR_1, + SFX_STUD_WOM_JACKED_CAR_2, + SFX_STUD_WOM_JACKED_CAR_3, + SFX_STUD_WOM_SHOCKED_1, + SFX_ST_MAN_BUMP_1, + SFX_ST_MAN_BUMP_2, + SFX_ST_MAN_BUMP_3, + SFX_ST_MAN_CHAT_1, + SFX_ST_MAN_CHAT_2, + SFX_ST_MAN_CHAT_3, + SFX_ST_MAN_CRASH_CAR_1, + SFX_ST_MAN_CRASH_CAR_2, + SFX_ST_MAN_DODGE_1, + SFX_ST_MAN_DODGE_2, + SFX_ST_MAN_DRIVER_BLOCKED_1, + SFX_ST_MAN_DRIVER_BLOCKED_2, + SFX_ST_MAN_FIGHT_1, + SFX_ST_MAN_FIGHT_2, + SFX_ST_MAN_GUN_THREATENED_1, + SFX_ST_MAN_GUN_THREATENED_2, + SFX_ST_MAN_JACKED_CAR_1, + SFX_ST_MAN_JACKED_CAR_2, + SFX_ST_MAN_JACKED_CAR_3, + SFX_ST_WOM_BUMP_1, + SFX_ST_WOM_BUMP_2, + SFX_ST_WOM_BUMP_3, + SFX_ST_WOM_CHAT_1, + SFX_ST_WOM_CHAT_2, + SFX_ST_WOM_CHAT_3, + SFX_ST_WOM_CHAT_4, + SFX_ST_WOM_CRASH_CAR_1, + SFX_ST_WOM_CRASH_CAR_2, + SFX_ST_WOM_DODGE_1, + SFX_ST_WOM_DODGE_2, + SFX_ST_WOM_DRIVER_BLOCKED_1, + SFX_ST_WOM_DRIVER_BLOCKED_2, + SFX_ST_WOM_FIGHT_1, + SFX_ST_WOM_FIGHT_2, + SFX_ST_WOM_FIGHT_3, + SFX_ST_WOM_GUN_THREATENED_1, + SFX_ST_WOM_GUN_THREATENED_2, + SFX_ST_WOM_JACKED_CAR_1, + SFX_ST_WOM_JACKED_CAR_2, + SFX_ST_WOM_JACKED_CAR_3, + SFX_ST_WOM_SHOCKED_1, + SFX_SWAT_VOICE_1_ROPE_1, + SFX_SWAT_VOICE_1_ROPE_2, + SFX_SWAT_VOICE_1_SHOOT_1, + SFX_SWAT_VOICE_1_SHOOT_2, + SFX_SWAT_VOICE_1_SHOOT_3, + SFX_SWAT_VOICE_1_SHOOT_4, + SFX_SWAT_VOICE_1_SHOOT_5, + SFX_SWAT_VOICE_2_ROPE_1, + SFX_SWAT_VOICE_2_ROPE_2, + SFX_SWAT_VOICE_2_SHOOT_1, + SFX_SWAT_VOICE_2_SHOOT_2, + SFX_SWAT_VOICE_2_SHOOT_3, + SFX_SWAT_VOICE_2_SHOOT_4, + SFX_SWAT_VOICE_2_SHOOT_5, + SFX_TAN1_AA, + SFX_TAN1_AB, + SFX_TAN1_AD, + SFX_TAN1_AE, + SFX_TAN1_AF, + SFX_TAN1_AG, + SFX_TAN1_AH, + SFX_TAN1_AI, + SFX_TAN1_AJ, + SFX_TAN2_AA, + SFX_TAN2_AB, + SFX_TAN2_AC, + SFX_TAN2_AE, + SFX_TAN2_AF, + SFX_TAN2_AG, + SFX_TAN2_AH, + SFX_TAN2_AJ, + SFX_TAN3_AA, + SFX_TAN3_AB, + SFX_TAN3_AC, + SFX_TAN3_AD, + SFX_TAN3_AE, + SFX_TAN3_AF, + SFX_TAN3_AG, + SFX_TAN3_AH, + SFX_TING, + SFX_TONI_ANGRY_BUSTED_01, + SFX_TONI_ANGRY_BUSTED_02, + SFX_TONI_ANGRY_BUSTED_03, + SFX_TONI_ANGRY_BUSTED_04, + SFX_TONI_ANGRY_BUSTED_05, + SFX_TONI_ANGRY_BUSTED_06, + SFX_TONI_ANGRY_BUSTED_07, + SFX_TONI_ANGRY_BUSTED_08, + SFX_TONI_ANGRY_BUSTED_09, + SFX_TONI_ANGRY_BUSTED_10, + SFX_TONI_ANGRY_BUSTED_11, + SFX_TONI_ANGRY_BUSTED_12, + SFX_TONI_ANGRY_BUSTED_13, + SFX_TONI_ANGRY_BUSTED_14, + SFX_TONI_ANGRY_BUSTED_15, + SFX_TONI_ANGRY_BUSTED_16, + SFX_TONI_ANGRY_CHASED_01, + SFX_TONI_ANGRY_CHASED_02, + SFX_TONI_ANGRY_CHASED_03, + SFX_TONI_ANGRY_CHASED_04, + SFX_TONI_ANGRY_CHASED_05, + SFX_TONI_ANGRY_CHASED_06, + SFX_TONI_ANGRY_CHASED_07, + SFX_TONI_ANGRY_CHASED_08, + SFX_TONI_ANGRY_CHASED_09, + SFX_TONI_ANGRY_CHASED_10, + SFX_TONI_ANGRY_CHASED_11, + SFX_TONI_ANGRY_CHASED_12, + SFX_TONI_ANGRY_CHASED_13, + SFX_TONI_ANGRY_CHASED_14, + SFX_TONI_ANGRY_CHASED_15, + SFX_TONI_ANGRY_CHASED_16, + SFX_TONI_ANGRY_CHASED_17, + SFX_TONI_ANGRY_CHASED_18, + SFX_TONI_ANGRY_CHASED_19, + SFX_TONI_ANGRY_CHASED_20, + SFX_TONI_ANGRY_CHASED_21, + SFX_TONI_ANGRY_CHASED_22, + SFX_TONI_ANGRY_CHASED_23, + SFX_TONI_ANGRY_CHASED_24, + SFX_TONI_ANGRY_CHASED_25, + SFX_TONI_ANGRY_CRASH_01, + SFX_TONI_ANGRY_CRASH_02, + SFX_TONI_ANGRY_CRASH_03, + SFX_TONI_ANGRY_CRASH_04, + SFX_TONI_ANGRY_CRASH_05, + SFX_TONI_ANGRY_CRASH_06, + SFX_TONI_ANGRY_CRASH_07, + SFX_TONI_ANGRY_CRASH_08, + SFX_TONI_ANGRY_CRASH_09, + SFX_TONI_ANGRY_CRASH_10, + SFX_TONI_ANGRY_CRASH_11, + SFX_TONI_ANGRY_CRASH_12, + SFX_TONI_ANGRY_CRASH_13, + SFX_TONI_ANGRY_CRASH_14, + SFX_TONI_ANGRY_CRASH_15, + SFX_TONI_ANGRY_CRASH_16, + SFX_TONI_ANGRY_CRASH_17, + SFX_TONI_ANGRY_CRASH_18, + SFX_TONI_ANGRY_CRASH_19, + SFX_TONI_ANGRY_CRASH_20, + SFX_TONI_ANGRY_CRASH_21, + SFX_TONI_ANGRY_CRASH_22, + SFX_TONI_ANGRY_CRASH_23, + SFX_TONI_ANGRY_CRASH_24, + SFX_TONI_ANGRY_CRASH_25, + SFX_TONI_ANGRY_CRASH_26, + SFX_TONI_ANGRY_CRASH_27, + SFX_TONI_ANGRY_CRASH_28, + SFX_TONI_ANGRY_CRASH_29, + SFX_TONI_ANGRY_FIGHT_01, + SFX_TONI_ANGRY_FIGHT_02, + SFX_TONI_ANGRY_FIGHT_03, + SFX_TONI_ANGRY_FIGHT_04, + SFX_TONI_ANGRY_FIGHT_05, + SFX_TONI_ANGRY_FIGHT_06, + SFX_TONI_ANGRY_FIGHT_07, + SFX_TONI_ANGRY_FIGHT_08, + SFX_TONI_ANGRY_FIGHT_09, + SFX_TONI_ANGRY_FIGHT_10, + SFX_TONI_ANGRY_FIGHT_11, + SFX_TONI_ANGRY_FIGHT_12, + SFX_TONI_ANGRY_FIGHT_13, + SFX_TONI_ANGRY_FIGHT_14, + SFX_TONI_ANGRY_FIGHT_15, + SFX_TONI_ANGRY_FIGHT_16, + SFX_TONI_ANGRY_FIGHT_17, + SFX_TONI_ANGRY_FIGHT_18, + SFX_TONI_ANGRY_FIGHT_19, + SFX_TONI_ANGRY_FIGHT_20, + SFX_TONI_ANGRY_FIGHT_21, + SFX_TONI_ANGRY_FIGHT_22, + SFX_TONI_ANGRY_FIGHT_23, + SFX_TONI_ANGRY_FIGHT_24, + SFX_TONI_ANGRY_FIGHT_25, + SFX_TONI_ANGRY_FIGHT_26, + SFX_TONI_ANGRY_FIGHT_27, + SFX_TONI_ANGRY_FIGHT_28, + SFX_TONI_ANGRY_FIGHT_29, + SFX_TONI_ANGRY_FIGHT_30, + SFX_TONI_ANGRY_FIGHT_31, + SFX_TONI_ANGRY_FIGHT_32, + SFX_TONI_ANGRY_FIGHT_33, + SFX_TONI_ANGRY_FIGHT_34, + SFX_TONI_ANGRY_FIGHT_35, + SFX_TONI_ANGRY_FIGHT_36, + SFX_TONI_ANGRY_FIGHT_37, + SFX_TONI_ANGRY_FIGHT_38, + SFX_TONI_ANGRY_FIGHT_39, + SFX_TONI_ANGRY_JACKED_01, + SFX_TONI_ANGRY_JACKED_02, + SFX_TONI_ANGRY_JACKED_03, + SFX_TONI_ANGRY_JACKED_04, + SFX_TONI_ANGRY_JACKED_05, + SFX_TONI_ANGRY_JACKED_06, + SFX_TONI_ANGRY_JACKED_07, + SFX_TONI_ANGRY_JACKED_08, + SFX_TONI_ANGRY_JACKED_09, + SFX_TONI_ANGRY_JACKED_10, + SFX_TONI_ANGRY_JACKED_11, + SFX_TONI_ANGRY_JACKED_12, + SFX_TONI_ANGRY_JACKED_13, + SFX_TONI_ANGRY_JACKED_14, + SFX_TONI_ANGRY_JACKED_15, + SFX_TONI_ANGRY_JACKED_16, + SFX_TONI_ANGRY_JACKING_01, + SFX_TONI_ANGRY_JACKING_02, + SFX_TONI_ANGRY_JACKING_03, + SFX_TONI_ANGRY_JACKING_04, + SFX_TONI_ANGRY_JACKING_05, + SFX_TONI_ANGRY_JACKING_06, + SFX_TONI_ANGRY_JACKING_07, + SFX_TONI_ANGRY_JACKING_08, + SFX_TONI_ANGRY_JACKING_09, + SFX_TONI_ANGRY_JACKING_10, + SFX_TONI_ANGRY_JACKING_11, + SFX_TONI_ANGRY_JACKING_12, + SFX_TONI_ANGRY_JACKING_13, + SFX_TONI_ANGRY_JACKING_14, + SFX_TONI_ANGRY_JACKING_15, + SFX_TONI_ANGRY_JACKING_16, + SFX_TONI_ANGRY_JACKING_17, + SFX_TONI_ANGRY_JACKING_18, + SFX_TONI_ANGRY_JACKING_19, + SFX_TONI_ANGRY_JACKING_20, + SFX_TONI_ANGRY_JACKING_21, + SFX_TONI_ANGRY_JACKING_22, + SFX_TONI_ANGRY_JACKING_23, + SFX_TONI_ANGRY_JACKING_24, + SFX_TONI_ANGRY_JACKING_25, + SFX_TONI_ANGRY_JACKING_26, + SFX_TONI_ANGRY_JACKING_27, + SFX_TONI_ANGRY_JACKING_28, + SFX_TONI_ANGRY_JACKING_29, + SFX_TONI_ANGRY_JACKING_30, + SFX_TONI_ANGRY_JACKING_31, + SFX_TONI_ANGRY_JACKING_32, + SFX_TONI_ANGRY_JACKING_33, + SFX_TONI_ANGRY_PICK_UP_CASH_01, + SFX_TONI_ANGRY_PICK_UP_CASH_02, + SFX_TONI_ANGRY_PICK_UP_CASH_03, + SFX_TONI_ANGRY_PICK_UP_CASH_04, + SFX_TONI_ANGRY_PICK_UP_CASH_05, + SFX_TONI_ANGRY_PICK_UP_CASH_06, + SFX_TONI_ANGRY_PICK_UP_CASH_07, + SFX_TONI_ANGRY_PICK_UP_CASH_08, + SFX_TONI_ANGRY_PICK_UP_CASH_09, + SFX_TONI_ANGRY_PICK_UP_CASH_10, + SFX_TONI_ANGRY_PICK_UP_CASH_11, + SFX_TONI_ANGRY_PICK_UP_CASH_12, + SFX_TONI_ANGRY_PICK_UP_HOOKER_01, + SFX_TONI_ANGRY_PICK_UP_HOOKER_02, + SFX_TONI_ANGRY_PICK_UP_HOOKER_03, + SFX_TONI_ANGRY_PICK_UP_HOOKER_04, + SFX_TONI_ANGRY_PICK_UP_HOOKER_05, + SFX_TONI_ANGRY_PICK_UP_HOOKER_06, + SFX_TONI_ANGRY_PICK_UP_HOOKER_07, + SFX_TONI_ANGRY_PICK_UP_HOOKER_08, + SFX_TONI_ANGRY_PULL_GUN_01, + SFX_TONI_ANGRY_PULL_GUN_02, + SFX_TONI_ANGRY_PULL_GUN_03, + SFX_TONI_ANGRY_PULL_GUN_04, + SFX_TONI_ANGRY_PULL_GUN_05, + SFX_TONI_ANGRY_PULL_GUN_06, + SFX_TONI_ANGRY_PULL_GUN_07, + SFX_TONI_ANGRY_PULL_GUN_08, + SFX_TONI_ANGRY_PULL_GUN_09, + SFX_TONI_ANGRY_PULL_GUN_10, + SFX_TONI_ANGRY_PULL_GUN_11, + SFX_TONI_ANGRY_PULL_GUN_12, + SFX_TONI_ANGRY_PULL_GUN_13, + SFX_TONI_ANGRY_PULL_GUN_14, + SFX_TONI_ANGRY_PULL_GUN_15, + SFX_TONI_ANGRY_PULL_GUN_16, + SFX_TONI_ANGRY_PULL_GUN_17, + SFX_TONI_ANGRY_PULL_GUN_18, + SFX_TONI_ANGRY_PULL_GUN_19, + SFX_TONI_ANGRY_PULL_GUN_20, + SFX_TONI_ANGRY_PULL_GUN_21, + SFX_TONI_ANGRY_PULL_GUN_22, + SFX_TONI_ANGRY_PULL_GUN_23, + SFX_TONI_ANGRY_PULL_GUN_24, + SFX_TONI_ANGRY_PULL_GUN_25, + SFX_TONI_ANGRY_PULL_GUN_26, + SFX_TONI_ANGRY_PULL_GUN_27, + SFX_TONI_ANGRY_PULL_GUN_28, + SFX_TONI_ANGRY_PULL_GUN_29, + SFX_TONI_ANGRY_SEX_01, + SFX_TONI_ANGRY_SEX_02, + SFX_TONI_ANGRY_SEX_03, + SFX_TONI_ANGRY_SEX_04, + SFX_TONI_ANGRY_SEX_05, + SFX_TONI_ANGRY_SEX_06, + SFX_TONI_ANGRY_SEX_07, + SFX_TONI_ANGRY_SEX_08, + SFX_TONI_ANGRY_SEX_09, + SFX_TONI_ANGRY_SEX_10, + SFX_TONI_ANGRY_SHOOT_01, + SFX_TONI_ANGRY_SHOOT_02, + SFX_TONI_ANGRY_SHOOT_03, + SFX_TONI_ANGRY_SHOOT_04, + SFX_TONI_ANGRY_SHOOT_05, + SFX_TONI_ANGRY_SHOOT_06, + SFX_TONI_ANGRY_SHOOT_07, + SFX_TONI_ANGRY_SHOOT_08, + SFX_TONI_ANGRY_SHOOT_09, + SFX_TONI_ANGRY_SHOOT_10, + SFX_TONI_ANGRY_SHOOT_11, + SFX_TONI_ANGRY_SHOOT_12, + SFX_TONI_ANGRY_SHOOT_13, + SFX_TONI_ANGRY_SHOOT_14, + SFX_TONI_ANGRY_SHOOT_15, + SFX_TONI_ANGRY_SHOOT_16, + SFX_TONI_ANGRY_SHOOT_17, + SFX_TONI_ANGRY_SHOOT_18, + SFX_TONI_ANGRY_SHOOT_19, + SFX_TONI_ANGRY_SHOOT_20, + SFX_TONI_ANGRY_SHOOT_21, + SFX_TONI_ANGRY_SHOOT_22, + SFX_TONI_ANGRY_SHOOT_23, + SFX_TONI_ANGRY_SHOOT_24, + SFX_TONI_ANGRY_SHOOT_25, + SFX_TONI_ANGRY_SHOOT_26, + SFX_TONI_ANGRY_SHOOT_27, + SFX_TONI_ANGRY_SHOOT_28, + SFX_TONI_ANGRY_SHOOT_29, + SFX_TONI_ANGRY_SHOOT_30, + SFX_TONI_ANGRY_SHOOT_31, + SFX_TONI_ANGRY_SHOOT_32, + SFX_TONI_ANGRY_SHOOT_33, + SFX_TONI_ANGRY_SHOOT_34, + SFX_TONI_ANGRY_SHOOT_35, + SFX_TONI_ANGRY_SHOOT_36, + SFX_TONI_CALM_BUSTED_01, + SFX_TONI_CALM_BUSTED_02, + SFX_TONI_CALM_BUSTED_03, + SFX_TONI_CALM_BUSTED_04, + SFX_TONI_CALM_BUSTED_05, + SFX_TONI_CALM_BUSTED_06, + SFX_TONI_CALM_BUSTED_07, + SFX_TONI_CALM_BUSTED_08, + SFX_TONI_CALM_BUSTED_10, + SFX_TONI_CALM_BUSTED_11, + SFX_TONI_CALM_BUSTED_12, + SFX_TONI_CALM_BUSTED_13, + SFX_TONI_CALM_BUSTED_14, + SFX_TONI_CALM_BUSTED_15, + SFX_TONI_CALM_BUSTED_16, + SFX_TONI_CALM_BUSTED_17, + SFX_TONI_CALM_BUSTED_18, + SFX_TONI_CALM_BUSTED_19, + SFX_TONI_CALM_BUSTED_20, + SFX_TONI_CALM_BUSTED_21, + SFX_TONI_CALM_BUSTED_22, + SFX_TONI_CALM_BUSTED_23, + SFX_TONI_CALM_BUSTED_24, + SFX_TONI_CALM_BUSTED_25, + SFX_TONI_CALM_CHASED_01, + SFX_TONI_CALM_CHASED_02, + SFX_TONI_CALM_CHASED_03, + SFX_TONI_CALM_CHASED_04, + SFX_TONI_CALM_CHASED_05, + SFX_TONI_CALM_CHASED_06, + SFX_TONI_CALM_CHASED_07, + SFX_TONI_CALM_CHASED_08, + SFX_TONI_CALM_CHASED_09, + SFX_TONI_CALM_CHASED_10, + SFX_TONI_CALM_CHASED_11, + SFX_TONI_CALM_CHASED_12, + SFX_TONI_CALM_CHASED_13, + SFX_TONI_CALM_CHASED_14, + SFX_TONI_CALM_CHASED_15, + SFX_TONI_CALM_CHASED_16, + SFX_TONI_CALM_CHASED_17, + SFX_TONI_CALM_CHASED_18, + SFX_TONI_CALM_CHASED_19, + SFX_TONI_CALM_CHASED_20, + SFX_TONI_CALM_CRASH_01, + SFX_TONI_CALM_CRASH_02, + SFX_TONI_CALM_CRASH_03, + SFX_TONI_CALM_CRASH_04, + SFX_TONI_CALM_CRASH_05, + SFX_TONI_CALM_CRASH_06, + SFX_TONI_CALM_CRASH_07, + SFX_TONI_CALM_CRASH_08, + SFX_TONI_CALM_CRASH_09, + SFX_TONI_CALM_CRASH_10, + SFX_TONI_CALM_CRASH_11, + SFX_TONI_CALM_CRASH_12, + SFX_TONI_CALM_CRASH_13, + SFX_TONI_CALM_CRASH_14, + SFX_TONI_CALM_CRASH_15, + SFX_TONI_CALM_CRASH_16, + SFX_TONI_CALM_CRASH_17, + SFX_TONI_CALM_CRASH_18, + SFX_TONI_CALM_CRASH_19, + SFX_TONI_CALM_CRASH_20, + SFX_TONI_CALM_CRASH_21, + SFX_TONI_CALM_CRASH_22, + SFX_TONI_CALM_CRASH_23, + SFX_TONI_CALM_CRASH_24, + SFX_TONI_CALM_CRASH_25, + SFX_TONI_CALM_CRASH_26, + SFX_TONI_CALM_CRASH_27, + SFX_TONI_CALM_CRASH_28, + SFX_TONI_CALM_CRASH_29, + SFX_TONI_CALM_CRASH_30, + SFX_TONI_CALM_CRASH_31, + SFX_TONI_CALM_FIGHT_01, + SFX_TONI_CALM_FIGHT_02, + SFX_TONI_CALM_FIGHT_03, + SFX_TONI_CALM_FIGHT_04, + SFX_TONI_CALM_FIGHT_05, + SFX_TONI_CALM_FIGHT_06, + SFX_TONI_CALM_FIGHT_07, + SFX_TONI_CALM_FIGHT_08, + SFX_TONI_CALM_FIGHT_09, + SFX_TONI_CALM_FIGHT_10, + SFX_TONI_CALM_FIGHT_11, + SFX_TONI_CALM_FIGHT_12, + SFX_TONI_CALM_FIGHT_13, + SFX_TONI_CALM_FIGHT_14, + SFX_TONI_CALM_FIGHT_15, + SFX_TONI_CALM_FIGHT_16, + SFX_TONI_CALM_FIGHT_17, + SFX_TONI_CALM_FIGHT_18, + SFX_TONI_CALM_FIGHT_19, + SFX_TONI_CALM_FIGHT_20, + SFX_TONI_CALM_FIGHT_21, + SFX_TONI_CALM_FIGHT_22, + SFX_TONI_CALM_FIGHT_23, + SFX_TONI_CALM_FIGHT_24, + SFX_TONI_CALM_FIGHT_25, + SFX_TONI_CALM_FIGHT_26, + SFX_TONI_CALM_FIGHT_27, + SFX_TONI_CALM_FIGHT_28, + SFX_TONI_CALM_FIGHT_29, + SFX_TONI_CALM_FIGHT_30, + SFX_TONI_CALM_FIGHT_31, + SFX_TONI_CALM_FIGHT_32, + SFX_TONI_CALM_FIGHT_33, + SFX_TONI_CALM_FIGHT_34, + SFX_TONI_CALM_FIGHT_35, + SFX_TONI_CALM_FIGHT_36, + SFX_TONI_CALM_FIGHT_37, + SFX_TONI_CALM_FIGHT_38, + SFX_TONI_CALM_FIGHT_39, + SFX_TONI_CALM_FIGHT_40, + SFX_TONI_CALM_FIGHT_41, + SFX_TONI_CALM_FIGHT_42, + SFX_TONI_CALM_JACKED_01, + SFX_TONI_CALM_JACKED_02, + SFX_TONI_CALM_JACKED_03, + SFX_TONI_CALM_JACKED_04, + SFX_TONI_CALM_JACKED_05, + SFX_TONI_CALM_JACKED_06, + SFX_TONI_CALM_JACKED_07, + SFX_TONI_CALM_JACKED_08, + SFX_TONI_CALM_JACKED_09, + SFX_TONI_CALM_JACKED_10, + SFX_TONI_CALM_JACKED_11, + SFX_TONI_CALM_JACKED_12, + SFX_TONI_CALM_JACKED_13, + SFX_TONI_CALM_JACKED_14, + SFX_TONI_CALM_JACKED_15, + SFX_TONI_CALM_JACKED_16, + SFX_TONI_CALM_JACKED_17, + SFX_TONI_CALM_JACKED_18, + SFX_TONI_CALM_JACKED_19, + SFX_TONI_CALM_JACKED_20, + SFX_TONI_CALM_JACKED_21, + SFX_TONI_CALM_JACKED_22, + SFX_TONI_CALM_JACKED_23, + SFX_TONI_CALM_JACKING_01, + SFX_TONI_CALM_JACKING_02, + SFX_TONI_CALM_JACKING_03, + SFX_TONI_CALM_JACKING_04, + SFX_TONI_CALM_JACKING_05, + SFX_TONI_CALM_JACKING_06, + SFX_TONI_CALM_JACKING_07, + SFX_TONI_CALM_JACKING_08, + SFX_TONI_CALM_JACKING_09, + SFX_TONI_CALM_JACKING_10, + SFX_TONI_CALM_JACKING_11, + SFX_TONI_CALM_JACKING_12, + SFX_TONI_CALM_JACKING_13, + SFX_TONI_CALM_JACKING_14, + SFX_TONI_CALM_JACKING_15, + SFX_TONI_CALM_JACKING_16, + SFX_TONI_CALM_JACKING_17, + SFX_TONI_CALM_JACKING_18, + SFX_TONI_CALM_JACKING_19, + SFX_TONI_CALM_JACKING_20, + SFX_TONI_CALM_JACKING_21, + SFX_TONI_CALM_JACKING_22, + SFX_TONI_CALM_JACKING_23, + SFX_TONI_CALM_JACKING_24, + SFX_TONI_CALM_JACKING_25, + SFX_TONI_CALM_JACKING_26, + SFX_TONI_CALM_JACKING_27, + SFX_TONI_CALM_JACKING_28, + SFX_TONI_CALM_JACKING_29, + SFX_TONI_CALM_JACKING_30, + SFX_TONI_CALM_JACKING_31, + SFX_TONI_CALM_JACKING_32, + SFX_TONI_CALM_JACKING_33, + SFX_TONI_CALM_JACKING_34, + SFX_TONI_CALM_JACKING_35, + SFX_TONI_CALM_JACKING_36, + SFX_TONI_CALM_JACKING_37, + SFX_TONI_CALM_JACKING_38, + SFX_TONI_CALM_JACKING_39, + SFX_TONI_CALM_PICK_UP_CASH_01, + SFX_TONI_CALM_PICK_UP_CASH_02, + SFX_TONI_CALM_PICK_UP_CASH_03, + SFX_TONI_CALM_PICK_UP_CASH_04, + SFX_TONI_CALM_PICK_UP_CASH_05, + SFX_TONI_CALM_PICK_UP_CASH_06, + SFX_TONI_CALM_PICK_UP_CASH_07, + SFX_TONI_CALM_PICK_UP_CASH_08, + SFX_TONI_CALM_PICK_UP_CASH_09, + SFX_TONI_CALM_PICK_UP_CASH_10, + SFX_TONI_CALM_PICK_UP_CASH_11, + SFX_TONI_CALM_PICK_UP_CASH_12, + SFX_TONI_CALM_PICK_UP_CASH_13, + SFX_TONI_CALM_PICK_UP_CASH_14, + SFX_TONI_CALM_PICK_UP_CASH_15, + SFX_TONI_CALM_PICK_UP_CASH_16, + SFX_TONI_CALM_PICK_UP_HOOKER_01, + SFX_TONI_CALM_PICK_UP_HOOKER_02, + SFX_TONI_CALM_PICK_UP_HOOKER_03, + SFX_TONI_CALM_PICK_UP_HOOKER_04, + SFX_TONI_CALM_PICK_UP_HOOKER_05, + SFX_TONI_CALM_PICK_UP_HOOKER_06, + SFX_TONI_CALM_PICK_UP_HOOKER_07, + SFX_TONI_CALM_PICK_UP_HOOKER_08, + SFX_TONI_CALM_PICK_UP_HOOKER_09, + SFX_TONI_CALM_PICK_UP_HOOKER_10, + SFX_TONI_CALM_PICK_UP_HOOKER_11, + SFX_TONI_CALM_PICK_UP_HOOKER_12, + SFX_TONI_CALM_PICK_UP_HOOKER_13, + SFX_TONI_CALM_PICK_UP_HOOKER_14, + SFX_TONI_CALM_PICK_UP_HOOKER_15, + SFX_TONI_CALM_PICK_UP_HOOKER_16, + SFX_TONI_CALM_PICK_UP_HOOKER_17, + SFX_TONI_CALM_PICK_UP_HOOKER_18, + SFX_TONI_CALM_PULL_GUN_01, + SFX_TONI_CALM_PULL_GUN_02, + SFX_TONI_CALM_PULL_GUN_03, + SFX_TONI_CALM_PULL_GUN_04, + SFX_TONI_CALM_PULL_GUN_05, + SFX_TONI_CALM_PULL_GUN_06, + SFX_TONI_CALM_PULL_GUN_07, + SFX_TONI_CALM_PULL_GUN_08, + SFX_TONI_CALM_PULL_GUN_09, + SFX_TONI_CALM_PULL_GUN_10, + SFX_TONI_CALM_PULL_GUN_11, + SFX_TONI_CALM_PULL_GUN_12, + SFX_TONI_CALM_PULL_GUN_13, + SFX_TONI_CALM_PULL_GUN_14, + SFX_TONI_CALM_PULL_GUN_15, + SFX_TONI_CALM_PULL_GUN_16, + SFX_TONI_CALM_PULL_GUN_17, + SFX_TONI_CALM_PULL_GUN_18, + SFX_TONI_CALM_PULL_GUN_19, + SFX_TONI_CALM_PULL_GUN_20, + SFX_TONI_CALM_PULL_GUN_21, + SFX_TONI_CALM_PULL_GUN_22, + SFX_TONI_CALM_PULL_GUN_23, + SFX_TONI_CALM_PULL_GUN_24, + SFX_TONI_CALM_PULL_GUN_25, + SFX_TONI_CALM_PULL_GUN_26, + SFX_TONI_CALM_PULL_GUN_27, + SFX_TONI_CALM_PULL_GUN_28, + SFX_TONI_CALM_PULL_GUN_29, + SFX_TONI_CALM_PULL_GUN_30, + SFX_TONI_CALM_PULL_GUN_31, + SFX_TONI_CALM_PULL_GUN_32, + SFX_TONI_CALM_PULL_GUN_33, + SFX_TONI_CALM_PULL_GUN_34, + SFX_TONI_CALM_PULL_GUN_35, + SFX_TONI_CALM_SEX_01, + SFX_TONI_CALM_SEX_02, + SFX_TONI_CALM_SEX_03, + SFX_TONI_CALM_SEX_04, + SFX_TONI_CALM_SEX_05, + SFX_TONI_CALM_SEX_06, + SFX_TONI_CALM_SEX_07, + SFX_TONI_CALM_SEX_08, + SFX_TONI_CALM_SEX_09, + SFX_TONI_CALM_SEX_10, + SFX_TONI_CALM_SEX_11, + SFX_TONI_CALM_SHOOT_01, + SFX_TONI_CALM_SHOOT_02, + SFX_TONI_CALM_SHOOT_03, + SFX_TONI_CALM_SHOOT_04, + SFX_TONI_CALM_SHOOT_05, + SFX_TONI_CALM_SHOOT_06, + SFX_TONI_CALM_SHOOT_07, + SFX_TONI_CALM_SHOOT_08, + SFX_TONI_CALM_SHOOT_09, + SFX_TONI_CALM_SHOOT_10, + SFX_TONI_CALM_SHOOT_11, + SFX_TONI_CALM_SHOOT_12, + SFX_TONI_CALM_SHOOT_13, + SFX_TONI_CALM_SHOOT_14, + SFX_TONI_CALM_SHOOT_15, + SFX_TONI_CALM_SHOOT_16, + SFX_TONI_CALM_SHOOT_17, + SFX_TONI_CALM_SHOOT_18, + SFX_TONI_CALM_SHOOT_19, + SFX_TONI_CALM_SHOOT_20, + SFX_TONI_CALM_SHOOT_21, + SFX_TONI_CALM_SHOOT_22, + SFX_TONI_CALM_SHOOT_23, + SFX_TONI_CALM_SHOOT_24, + SFX_TONI_CALM_SHOOT_25, + SFX_TONI_CALM_SHOOT_26, + SFX_TONI_CALM_SHOOT_27, + SFX_TONI_CALM_SHOOT_28, + SFX_TONI_CALM_SHOOT_29, + SFX_TONI_CALM_SHOOT_30, + SFX_TONI_GENERAL_AFTER_SEX_01, + SFX_TONI_GENERAL_AFTER_SEX_02, + SFX_TONI_GENERAL_AFTER_SEX_03, + SFX_TONI_GENERAL_AFTER_SEX_04, + SFX_TONI_GENERAL_AFTER_SEX_05, + SFX_TONI_GENERAL_AFTER_SEX_06, + SFX_TONI_GENERAL_AFTER_SEX_07, + SFX_TONI_GENERAL_AFTER_SEX_08, + SFX_TONI_GENERAL_AFTER_SEX_09, + SFX_TONI_GENERAL_AFTER_SEX_10, + SFX_TONI_GENERAL_AFTER_SEX_11, + SFX_TONI_GENERAL_AFTER_SEX_12, + SFX_TONI_GENERAL_AFTER_SEX_13, + SFX_TONI_GENERAL_AFTER_SEX_14, + SFX_TONI_GENERAL_HIT_GROUND_01, + SFX_TONI_GENERAL_HIT_GROUND_02, + SFX_TONI_GENERAL_HIT_GROUND_03, + SFX_TONI_GENERAL_HIT_GROUND_04, + SFX_TONI_GENERAL_HIT_GROUND_08, + SFX_TONI_GENERAL_HIT_GROUND_09, + SFX_TONI_GENERAL_HIT_GROUND_10, + SFX_TONI_GENERAL_HIT_GROUND_11, + SFX_TONI_GENERAL_HIT_GROUND_12, + SFX_TONI_GENERAL_HIT_GROUND_13, + SFX_TONI_GENERAL_HIT_GROUND_14, + SFX_TONI_GENERAL_HIT_GROUND_15, + SFX_TONI_GENERAL_IMP_HI_01, + SFX_TONI_GENERAL_IMP_HI_02, + SFX_TONI_GENERAL_IMP_HI_03, + SFX_TONI_GENERAL_IMP_HI_04, + SFX_TONI_GENERAL_IMP_HI_05, + SFX_TONI_GENERAL_IMP_HI_06, + SFX_TONI_GENERAL_IMP_HI_07, + SFX_TONI_GENERAL_IMP_HI_08, + SFX_TONI_GENERAL_IMP_HI_09, + SFX_TONI_GENERAL_IMP_HI_10, + SFX_TONI_GENERAL_IMP_HI_11, + SFX_TONI_GENERAL_IMP_HI_12, + SFX_TONI_GENERAL_IMP_HI_13, + SFX_TONI_GENERAL_IMP_HI_14, + SFX_TONI_GENERAL_IMP_HI_15, + SFX_TONI_GENERAL_IMP_HI_16, + SFX_TONI_GENERAL_IMP_LOW_01, + SFX_TONI_GENERAL_IMP_LOW_02, + SFX_TONI_GENERAL_IMP_LOW_03, + SFX_TONI_GENERAL_IMP_LOW_04, + SFX_TONI_GENERAL_IMP_LOW_05, + SFX_TONI_GENERAL_IMP_LOW_06, + SFX_TONI_GENERAL_IMP_LOW_07, + SFX_TONI_GENERAL_IMP_LOW_08, + SFX_TONI_GENERAL_IMP_LOW_09, + SFX_TONI_GENERAL_IMP_LOW_10, + SFX_TONI_GENERAL_IMP_LOW_11, + SFX_TONI_GENERAL_IMP_LOW_12, + SFX_TONI_GENERAL_IMP_LOW_13, + SFX_TONI_GENERAL_IMP_LOW_14, + SFX_TONI_GENERAL_IMP_LOW_15, + SFX_TONI_GENERAL_ON_FIRE_01, + SFX_TONI_GENERAL_ON_FIRE_02, + SFX_TONI_GENERAL_ON_FIRE_03, + SFX_TONI_GENERAL_ON_FIRE_04, + SFX_TONI_GENERAL_ON_FIRE_05, + SFX_TONI_GENERAL_ON_FIRE_06, + SFX_TONI_GENERAL_ON_FIRE_08, + SFX_TONI_PISSED_OFF_BUSTED_01, + SFX_TONI_PISSED_OFF_BUSTED_02, + SFX_TONI_PISSED_OFF_BUSTED_03, + SFX_TONI_PISSED_OFF_BUSTED_04, + SFX_TONI_PISSED_OFF_BUSTED_05, + SFX_TONI_PISSED_OFF_BUSTED_06, + SFX_TONI_PISSED_OFF_BUSTED_07, + SFX_TONI_PISSED_OFF_BUSTED_08, + SFX_TONI_PISSED_OFF_BUSTED_09, + SFX_TONI_PISSED_OFF_BUSTED_10, + SFX_TONI_PISSED_OFF_BUSTED_11, + SFX_TONI_PISSED_OFF_BUSTED_12, + SFX_TONI_PISSED_OFF_CHASED_01, + SFX_TONI_PISSED_OFF_CHASED_02, + SFX_TONI_PISSED_OFF_CHASED_03, + SFX_TONI_PISSED_OFF_CHASED_04, + SFX_TONI_PISSED_OFF_CHASED_05, + SFX_TONI_PISSED_OFF_CHASED_06, + SFX_TONI_PISSED_OFF_CHASED_07, + SFX_TONI_PISSED_OFF_CHASED_08, + SFX_TONI_PISSED_OFF_CHASED_09, + SFX_TONI_PISSED_OFF_CHASED_10, + SFX_TONI_PISSED_OFF_CHASED_11, + SFX_TONI_PISSED_OFF_CHASED_12, + SFX_TONI_PISSED_OFF_CHASED_13, + SFX_TONI_PISSED_OFF_CHASED_14, + SFX_TONI_PISSED_OFF_CHASED_15, + SFX_TONI_PISSED_OFF_CHASED_16, + SFX_TONI_PISSED_OFF_CHASED_17, + SFX_TONI_PISSED_OFF_CHASED_18, + SFX_TONI_PISSED_OFF_CHASED_19, + SFX_TONI_PISSED_OFF_CHASED_20, + SFX_TONI_PISSED_OFF_CHASED_21, + SFX_TONI_PISSED_OFF_CHASED_22, + SFX_TONI_PISSED_OFF_CHASED_23, + SFX_TONI_PISSED_OFF_CHASED_24, + SFX_TONI_PISSED_OFF_CHASED_25, + SFX_TONI_PISSED_OFF_CRASH_01, + SFX_TONI_PISSED_OFF_CRASH_02, + SFX_TONI_PISSED_OFF_CRASH_03, + SFX_TONI_PISSED_OFF_CRASH_04, + SFX_TONI_PISSED_OFF_CRASH_05, + SFX_TONI_PISSED_OFF_CRASH_06, + SFX_TONI_PISSED_OFF_CRASH_07, + SFX_TONI_PISSED_OFF_CRASH_08, + SFX_TONI_PISSED_OFF_CRASH_09, + SFX_TONI_PISSED_OFF_CRASH_10, + SFX_TONI_PISSED_OFF_CRASH_11, + SFX_TONI_PISSED_OFF_CRASH_12, + SFX_TONI_PISSED_OFF_CRASH_13, + SFX_TONI_PISSED_OFF_CRASH_14, + SFX_TONI_PISSED_OFF_CRASH_15, + SFX_TONI_PISSED_OFF_CRASH_16, + SFX_TONI_PISSED_OFF_CRASH_17, + SFX_TONI_PISSED_OFF_CRASH_18, + SFX_TONI_PISSED_OFF_CRASH_19, + SFX_TONI_PISSED_OFF_CRASH_20, + SFX_TONI_PISSED_OFF_CRASH_21, + SFX_TONI_PISSED_OFF_CRASH_22, + SFX_TONI_PISSED_OFF_CRASH_23, + SFX_TONI_PISSED_OFF_CRASH_24, + SFX_TONI_PISSED_OFF_CRASH_25, + SFX_TONI_PISSED_OFF_FIGHT_01, + SFX_TONI_PISSED_OFF_FIGHT_02, + SFX_TONI_PISSED_OFF_FIGHT_03, + SFX_TONI_PISSED_OFF_FIGHT_04, + SFX_TONI_PISSED_OFF_FIGHT_05, + SFX_TONI_PISSED_OFF_FIGHT_06, + SFX_TONI_PISSED_OFF_FIGHT_07, + SFX_TONI_PISSED_OFF_FIGHT_08, + SFX_TONI_PISSED_OFF_FIGHT_09, + SFX_TONI_PISSED_OFF_FIGHT_10, + SFX_TONI_PISSED_OFF_FIGHT_11, + SFX_TONI_PISSED_OFF_FIGHT_12, + SFX_TONI_PISSED_OFF_FIGHT_13, + SFX_TONI_PISSED_OFF_FIGHT_14, + SFX_TONI_PISSED_OFF_FIGHT_15, + SFX_TONI_PISSED_OFF_FIGHT_16, + SFX_TONI_PISSED_OFF_FIGHT_17, + SFX_TONI_PISSED_OFF_FIGHT_18, + SFX_TONI_PISSED_OFF_JACKED_01, + SFX_TONI_PISSED_OFF_JACKED_02, + SFX_TONI_PISSED_OFF_JACKED_03, + SFX_TONI_PISSED_OFF_JACKED_04, + SFX_TONI_PISSED_OFF_JACKED_05, + SFX_TONI_PISSED_OFF_JACKED_06, + SFX_TONI_PISSED_OFF_JACKED_07, + SFX_TONI_PISSED_OFF_JACKED_08, + SFX_TONI_PISSED_OFF_JACKED_09, + SFX_TONI_PISSED_OFF_JACKED_10, + SFX_TONI_PISSED_OFF_JACKED_11, + SFX_TONI_PISSED_OFF_JACKING_01, + SFX_TONI_PISSED_OFF_JACKING_02, + SFX_TONI_PISSED_OFF_JACKING_03, + SFX_TONI_PISSED_OFF_JACKING_04, + SFX_TONI_PISSED_OFF_JACKING_05, + SFX_TONI_PISSED_OFF_JACKING_06, + SFX_TONI_PISSED_OFF_JACKING_07, + SFX_TONI_PISSED_OFF_JACKING_08, + SFX_TONI_PISSED_OFF_JACKING_09, + SFX_TONI_PISSED_OFF_JACKING_10, + SFX_TONI_PISSED_OFF_JACKING_11, + SFX_TONI_PISSED_OFF_JACKING_12, + SFX_TONI_PISSED_OFF_JACKING_13, + SFX_TONI_PISSED_OFF_JACKING_14, + SFX_TONI_PISSED_OFF_JACKING_15, + SFX_TONI_PISSED_OFF_JACKING_16, + SFX_TONI_PISSED_OFF_JACKING_17, + SFX_TONI_PISSED_OFF_JACKING_18, + SFX_TONI_PISSED_OFF_JACKING_19, + SFX_TONI_PISSED_OFF_JACKING_20, + SFX_TONI_PISSED_OFF_JACKING_21, + SFX_TONI_PISSED_OFF_JACKING_22, + SFX_TONI_PISSED_OFF_JACKING_23, + SFX_TONI_PISSED_OFF_JACKING_24, + SFX_TONI_PISSED_OFF_JACKING_25, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_01, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_02, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_03, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_04, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_05, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_06, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_07, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_08, + SFX_TONI_PISSED_OFF_PICK_UP_CASH_09, + SFX_TONI_PISSED_OFF_PULL_GUN_01, + SFX_TONI_PISSED_OFF_PULL_GUN_02, + SFX_TONI_PISSED_OFF_PULL_GUN_03, + SFX_TONI_PISSED_OFF_PULL_GUN_04, + SFX_TONI_PISSED_OFF_PULL_GUN_05, + SFX_TONI_PISSED_OFF_PULL_GUN_06, + SFX_TONI_PISSED_OFF_PULL_GUN_07, + SFX_TONI_PISSED_OFF_PULL_GUN_08, + SFX_TONI_PISSED_OFF_PULL_GUN_09, + SFX_TONI_PISSED_OFF_PULL_GUN_10, + SFX_TONI_PISSED_OFF_PULL_GUN_11, + SFX_TONI_PISSED_OFF_PULL_GUN_12, + SFX_TONI_PISSED_OFF_PULL_GUN_13, + SFX_TONI_PISSED_OFF_PULL_GUN_14, + SFX_TONI_PISSED_OFF_PULL_GUN_15, + SFX_TONI_PISSED_OFF_PULL_GUN_16, + SFX_TONI_PISSED_OFF_PULL_GUN_17, + SFX_TONI_PISSED_OFF_PULL_GUN_18, + SFX_TONI_PISSED_OFF_SHOOT_01, + SFX_TONI_PISSED_OFF_SHOOT_02, + SFX_TONI_PISSED_OFF_SHOOT_03, + SFX_TONI_PISSED_OFF_SHOOT_04, + SFX_TONI_PISSED_OFF_SHOOT_05, + SFX_TONI_PISSED_OFF_SHOOT_06, + SFX_TONI_PISSED_OFF_SHOOT_07, + SFX_TONI_PISSED_OFF_SHOOT_08, + SFX_TONI_PISSED_OFF_SHOOT_09, + SFX_TONI_PISSED_OFF_SHOOT_10, + SFX_TONI_PISSED_OFF_SHOOT_11, + SFX_TONI_PISSED_OFF_SHOOT_12, + SFX_TONI_PISSED_OFF_SHOOT_13, + SFX_TONI_PISSED_OFF_SHOOT_14, + SFX_TONI_PISSED_OFF_SHOOT_15, + SFX_TONI_PISSED_OFF_SHOOT_16, + SFX_TONI_PISSED_OFF_SHOOT_17, + SFX_TONI_PISSED_OFF_SHOOT_18, + SFX_TONI_PISSED_OFF_SHOOT_19, + SFX_TONI_PISSED_OFF_SHOOT_20, + SFX_TONI_PISSED_OFF_SHOOT_21, + SFX_TONI_PISSED_OFF_SHOOT_22, + SFX_TONI_PISSED_OFF_SHOOT_23, + SFX_TONI_PISSED_OFF_SHOOT_24, + SFX_TONI_PISSED_OFF_SHOOT_25, + SFX_TONI_PISSED_OFF_SHOOT_26, + SFX_TONI_PISSED_OFF_SHOOT_27, + SFX_TONI_PISSED_OFF_SHOOT_28, + SFX_TONI_PISSED_OFF_SHOOT_29, + SFX_TONI_PISSED_OFF_SHOOT_30, + SFX_TONI_PISSED_OFF_SHOOT_31, + SFX_TONI_WISECRACKING_CRASH_01, + SFX_TONI_WISECRACKING_CRASH_02, + SFX_TONI_WISECRACKING_CRASH_03, + SFX_TONI_WISECRACKING_CRASH_04, + SFX_TONI_WISECRACKING_CRASH_05, + SFX_TONI_WISECRACKING_CRASH_06, + SFX_TONI_WISECRACKING_CRASH_07, + SFX_TONI_WISECRACKING_CRASH_08, + SFX_TONI_WISECRACKING_CRASH_09, + SFX_TONI_WISECRACKING_CRASH_10, + SFX_TONI_WISECRACKING_CRASH_11, + SFX_TONI_WISECRACKING_CRASH_12, + SFX_TONI_WISECRACKING_CRASH_13, + SFX_TONI_WISECRACKING_CRASH_14, + SFX_TONI_WISECRACKING_CRASH_15, + SFX_TONI_WISECRACKING_CRASH_16, + SFX_TONI_WISECRACKING_CRASH_17, + SFX_TONI_WISECRACKING_FIGHT_01, + SFX_TONI_WISECRACKING_FIGHT_02, + SFX_TONI_WISECRACKING_FIGHT_03, + SFX_TONI_WISECRACKING_FIGHT_04, + SFX_TONI_WISECRACKING_FIGHT_05, + SFX_TONI_WISECRACKING_FIGHT_06, + SFX_TONI_WISECRACKING_FIGHT_07, + SFX_TONI_WISECRACKING_FIGHT_08, + SFX_TONI_WISECRACKING_FIGHT_09, + SFX_TONI_WISECRACKING_FIGHT_10, + SFX_TONI_WISECRACKING_FIGHT_11, + SFX_TONI_WISECRACKING_FIGHT_12, + SFX_TONI_WISECRACKING_FIGHT_13, + SFX_TONI_WISECRACKING_FIGHT_14, + SFX_TONI_WISECRACKING_FIGHT_15, + SFX_TONI_WISECRACKING_FIGHT_16, + SFX_TONI_WISECRACKING_FIGHT_17, + SFX_TONI_WISECRACKING_FIGHT_18, + SFX_TONI_WISECRACKING_FIGHT_19, + SFX_TONI_WISECRACKING_FIGHT_20, + SFX_TONI_WISECRACKING_JACKED_01, + SFX_TONI_WISECRACKING_JACKED_02, + SFX_TONI_WISECRACKING_JACKED_03, + SFX_TONI_WISECRACKING_JACKED_04, + SFX_TONI_WISECRACKING_JACKED_05, + SFX_TONI_WISECRACKING_JACKED_06, + SFX_TONI_WISECRACKING_JACKED_07, + SFX_TONI_WISECRACKING_JACKED_08, + SFX_TONI_WISECRACKING_JACKED_09, + SFX_TONI_WISECRACKING_JACKED_10, + SFX_TONI_WISECRACKING_JACKED_11, + SFX_TONI_WISECRACKING_JACKED_12, + SFX_TONI_WISECRACKING_JACKED_13, + SFX_TONI_WISECRACKING_JACKED_14, + SFX_TONI_WISECRACKING_JACKED_15, + SFX_TONI_WISECRACKING_JACKED_16, + SFX_TONI_WISECRACKING_JACKED_17, + SFX_TONI_WISECRACKING_JACKING_01, + SFX_TONI_WISECRACKING_JACKING_02, + SFX_TONI_WISECRACKING_JACKING_03, + SFX_TONI_WISECRACKING_JACKING_04, + SFX_TONI_WISECRACKING_JACKING_05, + SFX_TONI_WISECRACKING_JACKING_06, + SFX_TONI_WISECRACKING_JACKING_07, + SFX_TONI_WISECRACKING_JACKING_08, + SFX_TONI_WISECRACKING_JACKING_09, + SFX_TONI_WISECRACKING_JACKING_10, + SFX_TONI_WISECRACKING_JACKING_11, + SFX_TONI_WISECRACKING_JACKING_12, + SFX_TONI_WISECRACKING_PICK_UP_CASH_01, + SFX_TONI_WISECRACKING_PICK_UP_CASH_02, + SFX_TONI_WISECRACKING_PICK_UP_CASH_03, + SFX_TONI_WISECRACKING_PICK_UP_CASH_04, + SFX_TONI_WISECRACKING_PICK_UP_CASH_05, + SFX_TONI_WISECRACKING_PICK_UP_CASH_06, + SFX_TONI_WISECRACKING_PICK_UP_CASH_07, + SFX_TONI_WISECRACKING_PICK_UP_CASH_08, + SFX_TONI_WISECRACKING_PICK_UP_CASH_09, + SFX_TONI_WISECRACKING_PICK_UP_CASH_10, + SFX_TONI_WISECRACKING_PICK_UP_CASH_11, + SFX_TONI_WISECRACKING_PICK_UP_CASH_12, + SFX_TONI_WISECRACKING_PICK_UP_CASH_13, + SFX_TONI_WISECRACKING_PICK_UP_CASH_14, + SFX_TONI_WISECRACKING_PICK_UP_CASH_15, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_01, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_02, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_03, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_04, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_05, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_06, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_07, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_08, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_09, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_10, + SFX_TONI_WISECRACKING_PICK_UP_HOOKER_11, + SFX_TONI_WISECRACKING_PULL_GUN_01, + SFX_TONI_WISECRACKING_PULL_GUN_02, + SFX_TONI_WISECRACKING_PULL_GUN_03, + SFX_TONI_WISECRACKING_PULL_GUN_04, + SFX_TONI_WISECRACKING_PULL_GUN_05, + SFX_TONI_WISECRACKING_PULL_GUN_06, + SFX_TONI_WISECRACKING_PULL_GUN_07, + SFX_TONI_WISECRACKING_PULL_GUN_08, + SFX_TONI_WISECRACKING_PULL_GUN_09, + SFX_TONI_WISECRACKING_PULL_GUN_10, + SFX_TONI_WISECRACKING_PULL_GUN_11, + SFX_TONI_WISECRACKING_PULL_GUN_12, + SFX_TONI_WISECRACKING_PULL_GUN_13, + SFX_TONI_WISECRACKING_PULL_GUN_14, + SFX_TONI_WISECRACKING_PULL_GUN_15, + SFX_TONI_WISECRACKING_PULL_GUN_16, + SFX_TONI_WISECRACKING_PULL_GUN_17, + SFX_TONI_WISECRACKING_PULL_GUN_18, + SFX_TONI_WISECRACKING_PULL_GUN_19, + SFX_TONI_WISECRACKING_SEX_01, + SFX_TONI_WISECRACKING_SEX_02, + SFX_TONI_WISECRACKING_SEX_03, + SFX_TONI_WISECRACKING_SEX_04, + SFX_TONI_WISECRACKING_SEX_05, + SFX_TONI_WISECRACKING_SEX_06, + SFX_TONI_WISECRACKING_SEX_07, + SFX_TONI_WISECRACKING_SEX_08, + SFX_TONI_WISECRACKING_SEX_09, + SFX_TONI_WISECRACKING_SEX_10, + SFX_TONI_WISECRACKING_SHOOT_01, + SFX_TONI_WISECRACKING_SHOOT_02, + SFX_TONI_WISECRACKING_SHOOT_03, + SFX_TONI_WISECRACKING_SHOOT_04, + SFX_TONI_WISECRACKING_SHOOT_05, + SFX_TONI_WISECRACKING_SHOOT_06, + SFX_TONI_WISECRACKING_SHOOT_07, + SFX_TONI_WISECRACKING_SHOOT_08, + SFX_TONI_WISECRACKING_SHOOT_09, + SFX_TONI_WISECRACKING_SHOOT_10, + SFX_TONI_WISECRACKING_SHOOT_11, + SFX_TONI_WISECRACKING_SHOOT_12, + SFX_TONI_WISECRACKING_SHOOT_13, + SFX_TONI_WISECRACKING_SHOOT_14, + SFX_TONI_WISECRACKING_SHOOT_15, + SFX_TONI_WISECRACKING_SHOOT_16, + SFX_TONI_WISECRACKING_SHOOT_17, + SFX_TONI_WISECRACKING_SHOOT_18, + SFX_TONI_WISECRACKING_SHOOT_19, + SFX_TONI_WISECRACKING_SHOOT_20, + SFX_TONI_WISECRACKING_SHOOT_21, + SFX_TONI_WISECRACKING_SHOOT_22, + SFX_TONI_WISECRACKING_SHOOT_23, + SFX_TONI_WISECRACKING_SHOOT_24, + SFX_TONI_WISECRACKING_SHOOT_25, + SFX_TONI_WISECRACKING_SHOOT_26, + SFX_TOSH1AA, + SFX_TOSH1AB, + SFX_TOSH1AC, + SFX_TOSH1AD, + SFX_TOSH1BA, + SFX_TOSH1BB, + SFX_TOSH1BC, + SFX_TOSH1BD, + SFX_TOSH2AA, + SFX_TOSH2AB, + SFX_TOSH2AC, + SFX_TOSH2AE, + SFX_TOSH2AF, + SFX_TOSH2AG, + SFX_TOSH2AH, + SFX_TOSH2AI, + SFX_TOSH2AJ, + SFX_TOSH2AK, + SFX_TOSH2AL, + SFX_TOSH2AM, + SFX_TOSH3AA, + SFX_TOSH3AB, + SFX_TOSH3AC, + SFX_TOSH3AD, + SFX_TOSH3AE, + SFX_TOSH3AF, + SFX_TOSH3AG, + SFX_TOSH3AH, + SFX_TOSH3AI, + SFX_TOSH3AJ, + SFX_TOSH3AK, + SFX_TOSH3BA, + SFX_TOSH3BB, + SFX_TOSH3CA, + SFX_TOSH3CB, + SFX_TOSH3CC, + SFX_TOSH3CD, + SFX_TOSH3CE, + SFX_TOSH3CF, + SFX_TOSH3CG, + SFX_TOSH3CH, + SFX_TOSH3CI, + SFX_TOSH3CJ, + SFX_TOSH3CK, + SFX_TOSH3DA, + SFX_TOSH3EA, + SFX_TOSH3FA, + SFX_TOSH3FB, + SFX_TOSH3FC, + SFX_TOSH3FD, + SFX_TOSH3FE, + SFX_TOSH3FF, + SFX_TOSH3GA, + SFX_TOSH3GB, + SFX_TOSH3HA, + SFX_TOSH3IA, + SFX_TOSH3IB, + SFX_TOSH4AA, + SFX_TOSH4AB, + SFX_TOSH4AC, + SFX_TOSH4AD, + SFX_TOSH4AE, + SFX_TOSH4AF, + SFX_TOSH4AG, + SFX_TOSH4AH, + SFX_TOSH4AI, + SFX_TOSH4AJ, + SFX_TOSH4BA, + SFX_TOSH4BB, + SFX_TOSH4BC, + SFX_TOSH4CA, + SFX_TOSH4CB, + SFX_TOSH4CC, + SFX_TOSH4CD, + SFX_TOSH4CE, + SFX_TOSH4DA, + SFX_TOSH4DB, + SFX_TOSH4DC, + SFX_TOSHIKO_CRASH_CAR_1, + SFX_TOSHIKO_CRASH_CAR_2, + SFX_TOSHIKO_CRASH_CAR_3, + SFX_TOSHIKO_CRASH_CAR_4, + SFX_TOSHIKO_DRIVER_BLOCKED_1, + SFX_TOSHIKO_DRIVER_BLOCKED_2, + SFX_TOSHIKO_DRIVER_BLOCKED_3, + SFX_TOSHIKO_DRIVER_BLOCKED_4, + SFX_TOSHIKO_JACKED_CAR_1, + SFX_TOSHIKO_JACKED_CAR_2, + SFX_TOSHIKO_JACKED_CAR_3, + SFX_TOSHIKO_JACKED_CAR_4, + SFX_TOSHIKO_JACKED_CAR_5, + SFX_TOSHIKO_SHOCKED_1, + SFX_TOSHIKO_SHOCKED_2, + SFX_TOSHIKO_SHOCKED_3, + SFX_VAL1_AA, + SFX_VAL1_AB, + SFX_VAL1_AC, + SFX_VAL1_AD, + SFX_VAL1_AE, + SFX_VAL1_AF, + SFX_VAL1_AG, + SFX_VAL1_AH, + SFX_VAL1_AI, + SFX_VAL2_AA, + SFX_VAL2_AB, + SFX_VAL2_AC, + SFX_VAL2_AD, + SFX_VAL2_AE, + SFX_VAL2_AF, + SFX_VAL2_AG, + SFX_VAL2_AH, + SFX_VAL2_AI, + SFX_VAL3_AA, + SFX_VAL3_AB, + SFX_VAL3_AC, + SFX_VAL3_AD, + SFX_VAL3_AE, + SFX_VAL3_AF, + SFX_VIC1_BA, + SFX_VIC1_BB, + SFX_VIC1_BC, + SFX_VIC1_BD, + SFX_VIC1_BE, + SFX_VIC1_BF, + SFX_VIC1_CA, + SFX_VIC1_CB, + SFX_VIC1_CC, + SFX_VIC1_CD, + SFX_VIC1_CE, + SFX_VIC1_DA, + SFX_VIC1_DB, + SFX_VIC1_DC, + SFX_VIC1_DD, + SFX_VIC1_DE, + SFX_VIC1_DF, + SFX_VIC1_DG, + SFX_VIC1_DH, + SFX_VIC2_AA, + SFX_VIC2_AB, + SFX_VIC2_AC, + SFX_VIC2_AD, + SFX_VIC2_AF, + SFX_VIC2_AG, + SFX_VIC2_AH, + SFX_VIC2_BA, + SFX_VIC2_BB, + SFX_VIC2_BC, + SFX_VIC2_BD, + SFX_VIC2_BE, + SFX_VIC2_BF, + SFX_VIC2_BH, + SFX_VIC2_BI, + SFX_VIC2_BJ, + SFX_VIC2_CA, + SFX_VIC2_DA, + SFX_VIC2_DB, + SFX_VIC2_DC, + SFX_VIC3_AA, + SFX_VIC3_AB, + SFX_VIC3_AD, + SFX_VIC3_AE, + SFX_VIC3_AF, + SFX_VIC3_AG, + SFX_VIC3_AH, + SFX_VIC3_AJ, + SFX_VIC3_AK, + SFX_VIC3_AL, + SFX_VIC3_AM, + SFX_VIC3_AN, + SFX_VIC3_AO, + SFX_VIC3_BA, + SFX_VIC3_BB, + SFX_VIC3_BC, + SFX_VIC4_AA, + SFX_VIC4_AB, + SFX_VIC4_AC, + SFX_VIC4_AD, + SFX_VIC4_AE, + SFX_VIC4_AF, + SFX_VIC4_AG, + SFX_VIC4_AH, + SFX_VIC4_AI, + SFX_VIC4_AJ, + SFX_VIC4_AK, + SFX_VIC4_AL, + SFX_VIC4_AM, + SFX_VIC4_AN, + SFX_VIC4_BA, + SFX_VIC4_BB, + SFX_VIC4_BC, + SFX_VIC4_BD, + SFX_VIC4_BE, + SFX_VIC4_BF, + SFX_VIC4_BG, + SFX_VIC4_BH, + SFX_VIC4_CA, + SFX_VIC4_CB, + SFX_VIC5_AA, + SFX_VIC5_AB, + SFX_VIC5_AC, + SFX_VIC5_AD, + SFX_VIC5_AE, + SFX_VIC5_AF, + SFX_VIC5_AG, + SFX_VIC5_AH, + SFX_VIC5_AI, + SFX_VIC5_AJ, + SFX_VIC5_AK, + SFX_VIC5_AL, + SFX_VIC5_DA, + SFX_VIC5_DB, + SFX_VIC5_DC, + SFX_VIC5_EA, + SFX_VIC5_EB, + SFX_VIC5_EC, + SFX_VIC5_FA, + SFX_VIC5_FB, + SFX_VIC5_FC, + SFX_VIC5_FD, + SFX_VIC5_FE, + SFX_VIC5_FF, + SFX_VIC5_FG, + SFX_VIC5_FH, + SFX_VIC5_FI, + SFX_VIC5_FJ, + SFX_VIC5_FK, + SFX_VIC6_AA, + SFX_VIC6_AB, + SFX_VIC6_AC, + SFX_VIC6_AD, + SFX_VIC6_AE, + SFX_VIC6_AF, + SFX_VIC6_AG, + SFX_VIC6_AH, + SFX_VIC6_AI, + SFX_VIC6_AJ, + SFX_VIC6_AK, + SFX_VIC6_AL, + SFX_VIC6_AM, + SFX_VIC6_AN, + SFX_VIC6_AO, + SFX_VIC6_BA, + SFX_VIC6_BB, + SFX_VIC7_AA, + SFX_VIC7_AB, + SFX_VIC7_AC, + SFX_VIC7_AD, + SFX_VIC7_AE, + SFX_VIC7_AG, + SFX_VIC7_AH, + SFX_VIC7_AJ, + SFX_VIC7_AL, + SFX_VIC7_AM, + SFX_VIC7_AN, + SFX_VIC7_AO, + SFX_VIC7_BA, + SFX_VIC7_BB, + SFX_VIC7_BC, + SFX_VIC7_BD, + SFX_VIC7_BE, + SFX_VIC7_BF, + SFX_VIC7_BG, + SFX_VIC7_BH, + SFX_VIC7_BI, + SFX_VIC7_CA, + SFX_VIC7_CB, + SFX_VIC7_CC, + SFX_WAC1_AA, + SFX_WAC1_AB, + SFX_WAC1_AC, + SFX_WAC1_AD, + SFX_WAC1_AE, + SFX_WAC1_AF, + SFX_WAC1_AG, + SFX_WAC1_AH, + SFX_WAC2_AA, + SFX_WAC2_AB, + SFX_WAC2_AC, + SFX_WAC2_AD, + SFX_WAC2_AE, + SFX_WAC2_AF, + SFX_WAC2_AG, + SFX_WED1_AA, + SFX_WED1_AB, + SFX_WED1_AC, + SFX_WED1_AD, + SFX_WED1_AE, + SFX_WED1_AF, + SFX_WED1_AG, + SFX_WED2_AA, + SFX_WED2_AB, + SFX_WED2_AC, + SFX_WED2_AD, + SFX_WED2_AE, + SFX_WED2_AF, + SFX_WED2_AG, + SFX_WED2_AH, + SFX_WED3_AA, + SFX_WED3_AB, + SFX_WED3_AC, + SFX_WED3_AD, + SFX_WED3_AE, + SFX_WED3_AF, + SFX_WED3_AG, + SFX_WED3_AH, + SFX_WED3_AI, + SFX_WED3_AJ, + SFX_WED3_AK, + SFX_WED3_AL, + SFX_WORKER1_BUMP_1, + SFX_WORKER1_BUMP_2, + SFX_WORKER1_BUMP_3, + SFX_WORKER1_CHAT_1, + SFX_WORKER1_CHAT_2, + SFX_WORKER1_CHAT_3, + SFX_WORKER1_CHAT_4, + SFX_WORKER1_CRASH_CAR_1, + SFX_WORKER1_CRASH_CAR_2, + SFX_WORKER1_DODGE_1, + SFX_WORKER1_DODGE_2, + SFX_WORKER1_DRIVER_BLOCKED_1, + SFX_WORKER1_DRIVER_BLOCKED_2, + SFX_WORKER1_FIGHT_1, + SFX_WORKER1_FIGHT_2, + SFX_WORKER1_FIGHT_3, + SFX_WORKER1_GUN_THREATENED_1, + SFX_WORKER1_GUN_THREATENED_2, + SFX_WORKER1_JACKED_CAR_1, + SFX_WORKER1_JACKED_CAR_2, + SFX_WORKER1_JACKED_CAR_3, + SFX_WORKER1_SHOCKED_1, + SFX_WORKER1_SPECIAL_CASE_1, + SFX_WORKER1_SPECIAL_CASE_2, + SFX_WORKER1_SPECIAL_CASE_3, + SFX_WORKER2_BUMP_1, + SFX_WORKER2_BUMP_2, + SFX_WORKER2_BUMP_3, + SFX_WORKER2_CHAT_1, + SFX_WORKER2_CHAT_2, + SFX_WORKER2_CHAT_3, + SFX_WORKER2_CHAT_4, + SFX_WORKER2_CRASH_CAR_1, + SFX_WORKER2_CRASH_CAR_2, + SFX_WORKER2_DODGE_1, + SFX_WORKER2_DODGE_2, + SFX_WORKER2_DRIVER_BLOCKED_1, + SFX_WORKER2_DRIVER_BLOCKED_2, + SFX_WORKER2_FIGHT_1, + SFX_WORKER2_FIGHT_2, + SFX_WORKER2_FIGHT_3, + SFX_WORKER2_GUN_THREATENED_1, + SFX_WORKER2_GUN_THREATENED_2, + SFX_WORKER2_JACKED_CAR_1, + SFX_WORKER2_JACKED_CAR_2, + SFX_WORKER2_JACKED_CAR_3, + SFX_WORKER2_SHOCKED_1, + SFX_WORKER2_SPECIAL_CASE_1, + SFX_WORKER2_SPECIAL_CASE_2, + SFX_WORKER2_SPECIAL_CASE_3, - SFX_POLICE_BOAT_1, - SFX_POLICE_BOAT_2, - SFX_POLICE_BOAT_3, - SFX_POLICE_BOAT_4, - SFX_POLICE_BOAT_5, - SFX_POLICE_BOAT_6, - SFX_POLICE_BOAT_7, - SFX_POLICE_BOAT_8, - SFX_POLICE_BOAT_9, - SFX_POLICE_BOAT_10, - SFX_POLICE_BOAT_11, - SFX_POLICE_BOAT_12, - SFX_POLICE_BOAT_13, - SFX_POLICE_BOAT_14, - SFX_POLICE_BOAT_15, - SFX_POLICE_BOAT_16, - SFX_POLICE_BOAT_17, - SFX_POLICE_BOAT_18, - SFX_POLICE_BOAT_19, - SFX_POLICE_BOAT_20, - SFX_POLICE_BOAT_21, - SFX_POLICE_BOAT_22, - SFX_POLICE_BOAT_23, - - SFX_POLICE_HELI_1, - SFX_POLICE_HELI_2, - SFX_POLICE_HELI_3, - SFX_POLICE_HELI_4, - SFX_POLICE_HELI_5, - SFX_POLICE_HELI_6, - SFX_POLICE_HELI_7, - SFX_POLICE_HELI_8, - SFX_POLICE_HELI_9, - SFX_POLICE_HELI_10, - SFX_POLICE_HELI_11, - SFX_POLICE_HELI_12, - SFX_POLICE_HELI_13, - SFX_POLICE_HELI_14, - SFX_POLICE_HELI_15, - SFX_POLICE_HELI_16, - SFX_POLICE_HELI_17, - SFX_POLICE_HELI_18, - SFX_POLICE_HELI_19, - SFX_POLICE_HELI_20, - - SFX_JFOTO_BLOCKED_1, - SFX_JFOTO_BLOCKED_2, - SFX_JFOTO_BLOCKED_3, - SFX_JFOTO_BLOCKED_4, - SFX_JFOTO_BLOCKED_5, - SFX_JFOTO_BLOCKED_6, - SFX_JFOTO_BLOCKED_7, - SFX_JFOTO_BLOCKED_8, - - SFX_JFOTO_BUMP_1, - SFX_JFOTO_BUMP_2, - SFX_JFOTO_BUMP_3, - SFX_JFOTO_BUMP_4, - SFX_JFOTO_BUMP_5, - SFX_JFOTO_BUMP_6, - SFX_JFOTO_BUMP_7, - SFX_JFOTO_BUMP_8, - SFX_JFOTO_BUMP_9, - SFX_JFOTO_BUMP_10, - - SFX_JFOTO_CAR_CRASH_1, - SFX_JFOTO_CAR_CRASH_2, - SFX_JFOTO_CAR_CRASH_3, - SFX_JFOTO_CAR_CRASH_4, - SFX_JFOTO_CAR_CRASH_5, - SFX_JFOTO_CAR_CRASH_6, - SFX_JFOTO_CAR_CRASH_7, - SFX_JFOTO_CAR_CRASH_8, - - SFX_JFOTO_CHAT_1, - SFX_JFOTO_CHAT_2, - SFX_JFOTO_CHAT_3, - SFX_JFOTO_CHAT_4, - SFX_JFOTO_CHAT_5, - SFX_JFOTO_CHAT_6, - SFX_JFOTO_CHAT_7, - SFX_JFOTO_CHAT_8, - SFX_JFOTO_CHAT_9, - SFX_JFOTO_CHAT_10, - SFX_JFOTO_CHAT_11, - SFX_JFOTO_CHAT_12, - SFX_JFOTO_CHAT_13, - - SFX_JFOTO_DODGE_1, - SFX_JFOTO_DODGE_2, - SFX_JFOTO_DODGE_3, - SFX_JFOTO_DODGE_4, - SFX_JFOTO_DODGE_5, - SFX_JFOTO_DODGE_6, - SFX_JFOTO_DODGE_7, - SFX_JFOTO_DODGE_8, - SFX_JFOTO_DODGE_9, - - SFX_JFOTO_GENERIC_CRASH_1, - SFX_JFOTO_GENERIC_CRASH_2, - SFX_JFOTO_GENERIC_CRASH_3, - SFX_JFOTO_GENERIC_CRASH_4, - SFX_JFOTO_GENERIC_CRASH_5, - SFX_JFOTO_GENERIC_CRASH_6, - SFX_JFOTO_GUN_PANIC_1, - SFX_JFOTO_GUN_PANIC_2, - SFX_JFOTO_GUN_PANIC_3, - SFX_JFOTO_GUN_PANIC_4, - SFX_JFOTO_JACKED_1, - SFX_JFOTO_JACKED_2, - SFX_JFOTO_JACKED_3, - SFX_JFOTO_JACKED_4, - SFX_JFOTO_JACKED_5, - SFX_JFOTO_LOST_1, - SFX_JFOTO_MUGGED_1, - SFX_JFOTO_MUGGED_2, - SFX_JFOTO_RUN_1, - SFX_JFOTO_RUN_2, - SFX_JFOTO_RUN_3, - SFX_JFOTO_RUN_4, - SFX_JFOTO_RUN_5, - SFX_JFOTO_SAVED_1, - SFX_JFOTO_SAVED_2, - SFX_JFOTO_SHOCKED_1, - SFX_JFOTO_TAXI_1, - SFX_JFOTO_TAXI_2, - - SFX_JMOTO_BLOCKED_1, - SFX_JMOTO_BLOCKED_2, - SFX_JMOTO_BLOCKED_3, - SFX_JMOTO_BLOCKED_4, - SFX_JMOTO_BLOCKED_5, - SFX_JMOTO_BLOCKED_6, - SFX_JMOTO_BLOCKED_7, - SFX_JMOTO_BLOCKED_8, - SFX_JMOTO_BUMP_1, - SFX_JMOTO_BUMP_2, - SFX_JMOTO_BUMP_3, - SFX_JMOTO_BUMP_4, - SFX_JMOTO_BUMP_5, - SFX_JMOTO_BUMP_6, - SFX_JMOTO_BUMP_7, - SFX_JMOTO_BUMP_8, - SFX_JMOTO_CAR_CRASH_1, - SFX_JMOTO_CAR_CRASH_2, - SFX_JMOTO_CAR_CRASH_3, - SFX_JMOTO_CAR_CRASH_4, - SFX_JMOTO_CAR_CRASH_5, - SFX_JMOTO_CAR_CRASH_6, - SFX_JMOTO_CHAT_1, - SFX_JMOTO_CHAT_2, - SFX_JMOTO_CHAT_3, - SFX_JMOTO_CHAT_4, - SFX_JMOTO_CHAT_5, - SFX_JMOTO_CHAT_6, - SFX_JMOTO_CHAT_7, - SFX_JMOTO_DODGE_1, - SFX_JMOTO_DODGE_2, - SFX_JMOTO_DODGE_3, - SFX_JMOTO_DODGE_4, - SFX_JMOTO_DODGE_5, - SFX_JMOTO_DODGE_6, - SFX_JMOTO_GENERIC_CRASH_1, - SFX_JMOTO_GENERIC_CRASH_2, - SFX_JMOTO_GENERIC_CRASH_3, - SFX_JMOTO_GENERIC_CRASH_4, - SFX_JMOTO_GENERIC_CRASH_5, - SFX_JMOTO_GENERIC_CRASH_6, - SFX_JMOTO_GUN_PANIC_1, - SFX_JMOTO_GUN_PANIC_2, - SFX_JMOTO_GUN_PANIC_3, - SFX_JMOTO_GUN_PANIC_4, - SFX_JMOTO_JACKED_1, - SFX_JMOTO_JACKED_2, - SFX_JMOTO_JACKED_3, - SFX_JMOTO_JACKED_4, - SFX_JMOTO_LOST_1, - SFX_JMOTO_MUGGED_1, - SFX_JMOTO_MUGGED_2, - SFX_JMOTO_RUN_1, - SFX_JMOTO_RUN_2, - SFX_JMOTO_RUN_3, - SFX_JMOTO_RUN_4, - SFX_JMOTO_SAVED_1, - SFX_JMOTO_SHOCKED_1, - SFX_JMOTO_TAXI_1, - - SFX_BMYBE_BLOCKED_1, - SFX_BMYBE_BLOCKED_2, - SFX_BMYBE_BLOCKED_3, - SFX_BMYBE_BLOCKED_4, - SFX_BMYBE_BLOCKED_5, - SFX_BMYBE_BLOCKED_6, - SFX_BMYBE_BLOCKED_7, - SFX_BMYBE_BLOCKED_8, - SFX_BMYBE_BUMP_1, - SFX_BMYBE_BUMP_2, - SFX_BMYBE_BUMP_3, - SFX_BMYBE_BUMP_4, - SFX_BMYBE_BUMP_5, - SFX_BMYBE_BUMP_6, - SFX_BMYBE_BUMP_7, - SFX_BMYBE_BUMP_8, - SFX_BMYBE_BUMP_9, - SFX_BMYBE_BUMP_10, - SFX_BMYBE_CAR_CRASH_1, - SFX_BMYBE_CAR_CRASH_2, - SFX_BMYBE_CAR_CRASH_3, - SFX_BMYBE_CAR_CRASH_4, - SFX_BMYBE_CAR_CRASH_5, - SFX_BMYBE_CAR_CRASH_6, - SFX_BMYBE_CAR_CRASH_7, - SFX_BMYBE_CAR_CRASH_8, - SFX_BMYBE_CHAT_1, - SFX_BMYBE_CHAT_2, - SFX_BMYBE_CHAT_3, - SFX_BMYBE_CHAT_4, - SFX_BMYBE_CHAT_5, - SFX_BMYBE_CHAT_6, - SFX_BMYBE_CHAT_7, - SFX_BMYBE_CHAT_8, - SFX_BMYBE_CHAT_9, - SFX_BMYBE_CHAT_10, - SFX_BMYBE_DODGE_1, - SFX_BMYBE_DODGE_2, - SFX_BMYBE_DODGE_3, - SFX_BMYBE_DODGE_4, - SFX_BMYBE_DODGE_5, - SFX_BMYBE_DODGE_6, - SFX_BMYBE_DODGE_7, - SFX_BMYBE_DODGE_8, - SFX_BMYBE_DODGE_9, - SFX_BMYBE_DODGE_10, - SFX_BMYBE_EYEING_1, - SFX_BMYBE_EYEING_2, - SFX_BMYBE_FIGHT_1, - SFX_BMYBE_FIGHT_2, - SFX_BMYBE_FIGHT_3, - SFX_BMYBE_FIGHT_4, - SFX_BMYBE_FIGHT_5, - SFX_BMYBE_FIGHT_6, - SFX_BMYBE_FIGHT_7, - SFX_BMYBE_FIGHT_8, - SFX_BMYBE_GENERIC_CRASH_1, - SFX_BMYBE_GENERIC_CRASH_2, - SFX_BMYBE_GENERIC_CRASH_3, - SFX_BMYBE_GENERIC_CRASH_4, - SFX_BMYBE_GENERIC_CRASH_5, - SFX_BMYBE_GENERIC_CRASH_6, - SFX_BMYBE_GENERIC_CRASH_7, - SFX_BMYBE_GENERIC_CRASH_8, - SFX_BMYBE_GUN_COOL_1, - SFX_BMYBE_GUN_COOL_2, - SFX_BMYBE_GUN_COOL_3, - SFX_BMYBE_GUN_COOL_4, - SFX_BMYBE_JACKED_1, - SFX_BMYBE_JACKED_2, - SFX_BMYBE_JACKED_3, - SFX_BMYBE_JACKED_4, - SFX_BMYBE_JACKED_5, - SFX_BMYBE_JACKED_6, - SFX_BMYBE_JACKING_1, - SFX_BMYBE_JACKING_2, - SFX_BMYBE_JACKING_3, - SFX_BMYBE_LOST_1, - SFX_BMYBE_MUGGED_1, - SFX_BMYBE_SAVED_1, - SFX_BMYBE_TAXI_1, - - SFX_HFOBE_BLOCKED_1, - SFX_HFOBE_BLOCKED_2, - SFX_HFOBE_BLOCKED_3, - SFX_HFOBE_BLOCKED_4, - SFX_HFOBE_BLOCKED_5, - SFX_HFOBE_BLOCKED_6, - SFX_HFOBE_BUMP_1, - SFX_HFOBE_BUMP_2, - SFX_HFOBE_BUMP_3, - SFX_HFOBE_BUMP_4, - SFX_HFOBE_BUMP_5, - SFX_HFOBE_BUMP_6, - SFX_HFOBE_BUMP_7, - SFX_HFOBE_BUMP_8, - SFX_HFOBE_BUMP_9, - SFX_HFOBE_BUMP_10, - SFX_HFOBE_BUMP_11, - SFX_HFOBE_CAR_CRASH_1, - SFX_HFOBE_CAR_CRASH_2, - SFX_HFOBE_CAR_CRASH_3, - SFX_HFOBE_CAR_CRASH_4, - SFX_HFOBE_CAR_CRASH_5, - SFX_HFOBE_CAR_CRASH_6, - SFX_HFOBE_CHAT_1, - SFX_HFOBE_CHAT_2, - SFX_HFOBE_CHAT_3, - SFX_HFOBE_CHAT_4, - SFX_HFOBE_CHAT_5, - SFX_HFOBE_CHAT_6, - SFX_HFOBE_CHAT_7, - SFX_HFOBE_CHAT_8, - SFX_HFOBE_CHAT_9, - SFX_HFOBE_CHAT_10, - SFX_HFOBE_DODGE_1, - SFX_HFOBE_DODGE_2, - SFX_HFOBE_DODGE_3, - SFX_HFOBE_DODGE_4, - SFX_HFOBE_DODGE_5, - SFX_HFOBE_DODGE_6, - SFX_HFOBE_DODGE_7, - SFX_HFOBE_GENERIC_CRASH_1, - SFX_HFOBE_GENERIC_CRASH_2, - SFX_HFOBE_GENERIC_CRASH_3, - SFX_HFOBE_GENERIC_CRASH_4, - SFX_HFOBE_GENERIC_CRASH_5, - SFX_HFOBE_GUN_PANIC_1, - SFX_HFOBE_GUN_PANIC_2, - SFX_HFOBE_GUN_PANIC_3, - SFX_HFOBE_GUN_PANIC_4, - SFX_HFOBE_GUN_PANIC_5, - SFX_HFOBE_JACKED_1, - SFX_HFOBE_JACKED_2, - SFX_HFOBE_JACKED_3, - SFX_HFOBE_JACKED_4, - SFX_HFOBE_JACKED_5, - SFX_HFOBE_JACKED_6, - SFX_HFOBE_LOST_1, - SFX_HFOBE_LOST_2, - SFX_HFOBE_RUN_1, - SFX_HFOBE_RUN_2, - SFX_HFOBE_RUN_3, - SFX_HFOBE_RUN_4, - SFX_HFOBE_SAVED_1, - SFX_HFOBE_SHOCKED_1, - SFX_HFOBE_SHOCKED_2, - SFX_HFOBE_TAXI_1, - SFX_HFOBE_TAXI_2, - - SFX_STREET_GANG_1_BLOCKED_1, - SFX_STREET_GANG_1_BLOCKED_2, - SFX_STREET_GANG_1_BLOCKED_3, - SFX_STREET_GANG_1_BLOCKED_4, - SFX_STREET_GANG_1_BLOCKED_5, - SFX_STREET_GANG_1_BLOCKED_6, - SFX_STREET_GANG_1_BLOCKED_7, - SFX_STREET_GANG_1_BLOCKED_8, - SFX_STREET_GANG_1_BUMP_1, - SFX_STREET_GANG_1_BUMP_2, - SFX_STREET_GANG_1_BUMP_3, - SFX_STREET_GANG_1_BUMP_4, - SFX_STREET_GANG_1_BUMP_5, - SFX_STREET_GANG_1_BUMP_6, - SFX_STREET_GANG_1_BUMP_7, - SFX_STREET_GANG_1_BUMP_8, - SFX_STREET_GANG_1_BUMP_9, - SFX_STREET_GANG_1_BUMP_10, - SFX_STREET_GANG_1_CAR_CRASH_1, - SFX_STREET_GANG_1_CAR_CRASH_2, - SFX_STREET_GANG_1_CAR_CRASH_3, - SFX_STREET_GANG_1_CAR_CRASH_4, - SFX_STREET_GANG_1_CAR_CRASH_5, - SFX_STREET_GANG_1_CAR_CRASH_6, - SFX_STREET_GANG_1_CHAT_1, - SFX_STREET_GANG_1_CHAT_2, - SFX_STREET_GANG_1_CHAT_3, - SFX_STREET_GANG_1_CHAT_4, - SFX_STREET_GANG_1_CHAT_5, - SFX_STREET_GANG_1_CHAT_6, - SFX_STREET_GANG_1_CHAT_7, - SFX_STREET_GANG_1_CHAT_8, - SFX_STREET_GANG_1_CHAT_9, - SFX_STREET_GANG_1_CHAT_10, - SFX_STREET_GANG_1_CHAT_11, - SFX_STREET_GANG_1_CHAT_12, - SFX_STREET_GANG_1_DODGE_1, - SFX_STREET_GANG_1_DODGE_2, - SFX_STREET_GANG_1_DODGE_3, - SFX_STREET_GANG_1_DODGE_4, - SFX_STREET_GANG_1_DODGE_5, - SFX_STREET_GANG_1_DODGE_6, - SFX_STREET_GANG_1_DODGE_7, - SFX_STREET_GANG_1_DODGE_8, - SFX_STREET_GANG_1_DODGE_9, - SFX_STREET_GANG_1_EYEING_1, - SFX_STREET_GANG_1_EYEING_2, - SFX_STREET_GANG_1_EYEING_3, - SFX_STREET_GANG_1_FIGHT_1, - SFX_STREET_GANG_1_FIGHT_2, - SFX_STREET_GANG_1_FIGHT_3, - SFX_STREET_GANG_1_FIGHT_4, - SFX_STREET_GANG_1_FIGHT_5, - SFX_STREET_GANG_1_FIGHT_6, - SFX_STREET_GANG_1_FIGHT_7, - SFX_STREET_GANG_1_FIGHT_8, - SFX_STREET_GANG_1_FIGHT_9, - SFX_STREET_GANG_1_FIGHT_10, - SFX_STREET_GANG_1_GENERIC_CRASH_1, - SFX_STREET_GANG_1_GENERIC_CRASH_2, - SFX_STREET_GANG_1_GENERIC_CRASH_3, - SFX_STREET_GANG_1_GENERIC_CRASH_4, - SFX_STREET_GANG_1_GENERIC_CRASH_5, - SFX_STREET_GANG_1_GENERIC_CRASH_6, - SFX_STREET_GANG_1_GUN_COOL_1, - SFX_STREET_GANG_1_GUN_COOL_2, - SFX_STREET_GANG_1_GUN_COOL_3, - SFX_STREET_GANG_1_GUN_COOL_4, - SFX_STREET_GANG_1_GUN_COOL_5, - SFX_STREET_GANG_1_JACKED_1, - SFX_STREET_GANG_1_JACKED_2, - SFX_STREET_GANG_1_JACKED_3, - SFX_STREET_GANG_1_JACKED_4, - SFX_STREET_GANG_1_JACKED_5, - SFX_STREET_GANG_1_JACKING_1, - SFX_STREET_GANG_1_JACKING_2, - SFX_STREET_GANG_1_JACKING_3, - SFX_STREET_GANG_1_JACKING_4, - SFX_STREET_GANG_1_JACKING_5, - SFX_STREET_GANG_1_LOST_1, - SFX_STREET_GANG_1_LOST_2, - SFX_STREET_GANG_1_MUGGED_1, - SFX_STREET_GANG_1_MUGGED_2, - SFX_STREET_GANG_1_MUGGED_3, - SFX_STREET_GANG_1_MUGGING_1, - SFX_STREET_GANG_1_MUGGING_2, - SFX_STREET_GANG_1_MUGGING_3, - SFX_STREET_GANG_1_MUGGING_4, - SFX_STREET_GANG_1_MUGGING_5, - SFX_STREET_GANG_1_SAVED_1, - SFX_STREET_GANG_1_SHOCKED_1, - SFX_STREET_GANG_1_SHOCKED_2, - SFX_STREET_GANG_1_TAXI_1, - - SFX_STREET_GANG_2_BLOCKED_1, - SFX_STREET_GANG_2_BLOCKED_2, - SFX_STREET_GANG_2_BLOCKED_3, - SFX_STREET_GANG_2_BLOCKED_4, - SFX_STREET_GANG_2_BLOCKED_5, - SFX_STREET_GANG_2_BLOCKED_6, - SFX_STREET_GANG_2_BLOCKED_7, - SFX_STREET_GANG_2_BLOCKED_8, - SFX_STREET_GANG_2_BUMP_1, - SFX_STREET_GANG_2_BUMP_2, - SFX_STREET_GANG_2_BUMP_3, - SFX_STREET_GANG_2_BUMP_4, - SFX_STREET_GANG_2_BUMP_5, - SFX_STREET_GANG_2_BUMP_6, - SFX_STREET_GANG_2_BUMP_7, - SFX_STREET_GANG_2_BUMP_8, - SFX_STREET_GANG_2_BUMP_9, - SFX_STREET_GANG_2_BUMP_10, - SFX_STREET_GANG_2_CAR_CRASH_1, - SFX_STREET_GANG_2_CAR_CRASH_2, - SFX_STREET_GANG_2_CAR_CRASH_3, - SFX_STREET_GANG_2_CAR_CRASH_4, - SFX_STREET_GANG_2_CAR_CRASH_5, - SFX_STREET_GANG_2_CAR_CRASH_6, - SFX_STREET_GANG_2_CHAT_1, - SFX_STREET_GANG_2_CHAT_2, - SFX_STREET_GANG_2_CHAT_3, - SFX_STREET_GANG_2_CHAT_4, - SFX_STREET_GANG_2_CHAT_5, - SFX_STREET_GANG_2_CHAT_6, - SFX_STREET_GANG_2_CHAT_7, - SFX_STREET_GANG_2_CHAT_8, - SFX_STREET_GANG_2_CHAT_9, - SFX_STREET_GANG_2_CHAT_10, - SFX_STREET_GANG_2_CHAT_11, - SFX_STREET_GANG_2_CHAT_12, - SFX_STREET_GANG_2_DODGE_1, - SFX_STREET_GANG_2_DODGE_2, - SFX_STREET_GANG_2_DODGE_3, - SFX_STREET_GANG_2_DODGE_4, - SFX_STREET_GANG_2_DODGE_5, - SFX_STREET_GANG_2_DODGE_6, - SFX_STREET_GANG_2_DODGE_7, - SFX_STREET_GANG_2_DODGE_8, - SFX_STREET_GANG_2_DODGE_9, - SFX_STREET_GANG_2_EYEING_1, - SFX_STREET_GANG_2_EYEING_2, - SFX_STREET_GANG_2_EYEING_3, - SFX_STREET_GANG_2_FIGHT_1, - SFX_STREET_GANG_2_FIGHT_2, - SFX_STREET_GANG_2_FIGHT_3, - SFX_STREET_GANG_2_FIGHT_4, - SFX_STREET_GANG_2_FIGHT_5, - SFX_STREET_GANG_2_FIGHT_6, - SFX_STREET_GANG_2_FIGHT_7, - SFX_STREET_GANG_2_FIGHT_8, - SFX_STREET_GANG_2_FIGHT_9, - SFX_STREET_GANG_2_FIGHT_10, - SFX_STREET_GANG_2_GENERIC_CRASH_1, - SFX_STREET_GANG_2_GENERIC_CRASH_2, - SFX_STREET_GANG_2_GENERIC_CRASH_3, - SFX_STREET_GANG_2_GENERIC_CRASH_4, - SFX_STREET_GANG_2_GENERIC_CRASH_5, - SFX_STREET_GANG_2_GENERIC_CRASH_6, - SFX_STREET_GANG_2_GUN_COOL_1, - SFX_STREET_GANG_2_GUN_COOL_2, - SFX_STREET_GANG_2_GUN_COOL_3, - SFX_STREET_GANG_2_GUN_COOL_4, - SFX_STREET_GANG_2_GUN_COOL_5, - SFX_STREET_GANG_2_JACKED_1, - SFX_STREET_GANG_2_JACKED_2, - SFX_STREET_GANG_2_JACKED_3, - SFX_STREET_GANG_2_JACKED_4, - SFX_STREET_GANG_2_JACKED_5, - SFX_STREET_GANG_2_JACKING_1, - SFX_STREET_GANG_2_JACKING_2, - SFX_STREET_GANG_2_JACKING_3, - SFX_STREET_GANG_2_JACKING_4, - SFX_STREET_GANG_2_JACKING_5, - SFX_STREET_GANG_2_LOST_1, - SFX_STREET_GANG_2_LOST_2, - SFX_STREET_GANG_2_MUGGED_1, - SFX_STREET_GANG_2_MUGGED_2, - SFX_STREET_GANG_2_MUGGED_3, - SFX_STREET_GANG_2_MUGGING_1, - SFX_STREET_GANG_2_MUGGING_2, - SFX_STREET_GANG_2_MUGGING_3, - SFX_STREET_GANG_2_MUGGING_4, - SFX_STREET_GANG_2_MUGGING_5, - SFX_STREET_GANG_2_SAVED_1, - SFX_STREET_GANG_2_SHOCKED_1, - SFX_STREET_GANG_2_SHOCKED_2, - SFX_STREET_GANG_2_TAXI_1, - - SFX_CUBAN_LORD_GANG_1_BLOCKED_1, - SFX_CUBAN_LORD_GANG_1_BLOCKED_2, - SFX_CUBAN_LORD_GANG_1_BLOCKED_3, - SFX_CUBAN_LORD_GANG_1_BLOCKED_4, - SFX_CUBAN_LORD_GANG_1_BLOCKED_5, - SFX_CUBAN_LORD_GANG_1_BLOCKED_6, - SFX_CUBAN_LORD_GANG_1_BLOCKED_7, - SFX_CUBAN_LORD_GANG_1_BLOCKED_8, - SFX_CUBAN_LORD_GANG_1_BLOCKED_9, - SFX_CUBAN_LORD_GANG_1_BLOCKED_10, - SFX_CUBAN_LORD_GANG_1_BUMP_1, - SFX_CUBAN_LORD_GANG_1_BUMP_2, - SFX_CUBAN_LORD_GANG_1_BUMP_3, - SFX_CUBAN_LORD_GANG_1_BUMP_4, - SFX_CUBAN_LORD_GANG_1_BUMP_5, - SFX_CUBAN_LORD_GANG_1_BUMP_6, - SFX_CUBAN_LORD_GANG_1_BUMP_7, - SFX_CUBAN_LORD_GANG_1_BUMP_8, - SFX_CUBAN_LORD_GANG_1_BUMP_9, - SFX_CUBAN_LORD_GANG_1_BUMP_10, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_1, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_2, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_3, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_4, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_5, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_6, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_7, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_8, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_9, - SFX_CUBAN_LORD_GANG_1_CAR_CRASH_10, - SFX_CUBAN_LORD_GANG_1_CHAT_1, - SFX_CUBAN_LORD_GANG_1_CHAT_2, - SFX_CUBAN_LORD_GANG_1_CHAT_3, - SFX_CUBAN_LORD_GANG_1_CHAT_4, - SFX_CUBAN_LORD_GANG_1_CHAT_5, - SFX_CUBAN_LORD_GANG_1_CHAT_6, - SFX_CUBAN_LORD_GANG_1_CHAT_7, - SFX_CUBAN_LORD_GANG_1_CHAT_8, - SFX_CUBAN_LORD_GANG_1_CHAT_9, - SFX_CUBAN_LORD_GANG_1_CHAT_10, - SFX_CUBAN_LORD_GANG_1_DODGE_1, - SFX_CUBAN_LORD_GANG_1_DODGE_2, - SFX_CUBAN_LORD_GANG_1_DODGE_3, - SFX_CUBAN_LORD_GANG_1_DODGE_4, - SFX_CUBAN_LORD_GANG_1_DODGE_5, - SFX_CUBAN_LORD_GANG_1_DODGE_6, - SFX_CUBAN_LORD_GANG_1_DODGE_7, - SFX_CUBAN_LORD_GANG_1_DODGE_8, - SFX_CUBAN_LORD_GANG_1_DODGE_9, - SFX_CUBAN_LORD_GANG_1_DODGE_10, - SFX_CUBAN_LORD_GANG_1_DODGE_11, - SFX_CUBAN_LORD_GANG_1_DODGE_12, - SFX_CUBAN_LORD_GANG_1_DODGE_13, - SFX_CUBAN_LORD_GANG_1_EYEING_1, - SFX_CUBAN_LORD_GANG_1_EYEING_2, - SFX_CUBAN_LORD_GANG_1_FIGHT_1, - SFX_CUBAN_LORD_GANG_1_FIGHT_2, - SFX_CUBAN_LORD_GANG_1_FIGHT_3, - SFX_CUBAN_LORD_GANG_1_FIGHT_4, - SFX_CUBAN_LORD_GANG_1_FIGHT_5, - SFX_CUBAN_LORD_GANG_1_FIGHT_6, - SFX_CUBAN_LORD_GANG_1_FIGHT_7, - SFX_CUBAN_LORD_GANG_1_FIGHT_8, - SFX_CUBAN_LORD_GANG_1_FIGHT_9, - SFX_CUBAN_LORD_GANG_1_FIGHT_10, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_1, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_2, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_3, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_4, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_5, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_6, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_7, - SFX_CUBAN_LORD_GANG_1_GENERIC_CRASH_8, - SFX_CUBAN_LORD_GANG_1_GUN_COOL_1, - SFX_CUBAN_LORD_GANG_1_GUN_COOL_2, - SFX_CUBAN_LORD_GANG_1_GUN_COOL_3, - SFX_CUBAN_LORD_GANG_1_GUN_COOL_4, - SFX_CUBAN_LORD_GANG_1_GUN_COOL_5, - SFX_CUBAN_LORD_GANG_1_JACKED_1, - SFX_CUBAN_LORD_GANG_1_JACKED_2, - SFX_CUBAN_LORD_GANG_1_JACKED_3, - SFX_CUBAN_LORD_GANG_1_JACKED_4, - SFX_CUBAN_LORD_GANG_1_JACKED_5, - SFX_CUBAN_LORD_GANG_1_JACKED_6, - SFX_CUBAN_LORD_GANG_1_JACKING_1, - SFX_CUBAN_LORD_GANG_1_JACKING_2, - SFX_CUBAN_LORD_GANG_1_JACKING_3, - SFX_CUBAN_LORD_GANG_1_JACKING_4, - SFX_CUBAN_LORD_GANG_1_JACKING_5, - SFX_CUBAN_LORD_GANG_1_LOST_1, - SFX_CUBAN_LORD_GANG_1_LOST_2, - SFX_CUBAN_LORD_GANG_1_MUGGED_1, - SFX_CUBAN_LORD_GANG_1_MUGGED_2, - SFX_CUBAN_LORD_GANG_1_SAVED_1, - SFX_CUBAN_LORD_GANG_1_TAXI_1, - SFX_CUBAN_LORD_GANG_1_TAXI_2, - SFX_CUBAN_LORD_GANG_2_BLOCKED_1, - SFX_CUBAN_LORD_GANG_2_BLOCKED_2, - SFX_CUBAN_LORD_GANG_2_BLOCKED_3, - SFX_CUBAN_LORD_GANG_2_BLOCKED_4, - SFX_CUBAN_LORD_GANG_2_BLOCKED_5, - SFX_CUBAN_LORD_GANG_2_BLOCKED_6, - SFX_CUBAN_LORD_GANG_2_BLOCKED_7, - SFX_CUBAN_LORD_GANG_2_BLOCKED_8, - SFX_CUBAN_LORD_GANG_2_BLOCKED_9, - SFX_CUBAN_LORD_GANG_2_BLOCKED_10, - SFX_CUBAN_LORD_GANG_2_BUMP_1, - SFX_CUBAN_LORD_GANG_2_BUMP_2, - SFX_CUBAN_LORD_GANG_2_BUMP_3, - SFX_CUBAN_LORD_GANG_2_BUMP_4, - SFX_CUBAN_LORD_GANG_2_BUMP_5, - SFX_CUBAN_LORD_GANG_2_BUMP_6, - SFX_CUBAN_LORD_GANG_2_BUMP_7, - SFX_CUBAN_LORD_GANG_2_BUMP_8, - SFX_CUBAN_LORD_GANG_2_BUMP_9, - SFX_CUBAN_LORD_GANG_2_BUMP_10, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_1, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_2, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_3, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_4, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_5, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_6, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_7, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_8, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_9, - SFX_CUBAN_LORD_GANG_2_CAR_CRASH_10, - SFX_CUBAN_LORD_GANG_2_CHAT_1, - SFX_CUBAN_LORD_GANG_2_CHAT_2, - SFX_CUBAN_LORD_GANG_2_CHAT_3, - SFX_CUBAN_LORD_GANG_2_CHAT_4, - SFX_CUBAN_LORD_GANG_2_CHAT_5, - SFX_CUBAN_LORD_GANG_2_CHAT_6, - SFX_CUBAN_LORD_GANG_2_CHAT_7, - SFX_CUBAN_LORD_GANG_2_CHAT_8, - SFX_CUBAN_LORD_GANG_2_CHAT_9, - SFX_CUBAN_LORD_GANG_2_CHAT_10, - SFX_CUBAN_LORD_GANG_2_DODGE_1, - SFX_CUBAN_LORD_GANG_2_DODGE_2, - SFX_CUBAN_LORD_GANG_2_DODGE_3, - SFX_CUBAN_LORD_GANG_2_DODGE_4, - SFX_CUBAN_LORD_GANG_2_DODGE_5, - SFX_CUBAN_LORD_GANG_2_DODGE_6, - SFX_CUBAN_LORD_GANG_2_DODGE_7, - SFX_CUBAN_LORD_GANG_2_DODGE_8, - SFX_CUBAN_LORD_GANG_2_DODGE_9, - SFX_CUBAN_LORD_GANG_2_DODGE_10, - SFX_CUBAN_LORD_GANG_2_DODGE_11, - SFX_CUBAN_LORD_GANG_2_DODGE_12, - SFX_CUBAN_LORD_GANG_2_DODGE_13, - SFX_CUBAN_LORD_GANG_2_EYEING_1, - SFX_CUBAN_LORD_GANG_2_EYEING_2, - SFX_CUBAN_LORD_GANG_2_FIGHT_1, - SFX_CUBAN_LORD_GANG_2_FIGHT_2, - SFX_CUBAN_LORD_GANG_2_FIGHT_3, - SFX_CUBAN_LORD_GANG_2_FIGHT_4, - SFX_CUBAN_LORD_GANG_2_FIGHT_5, - SFX_CUBAN_LORD_GANG_2_FIGHT_6, - SFX_CUBAN_LORD_GANG_2_FIGHT_7, - SFX_CUBAN_LORD_GANG_2_FIGHT_8, - SFX_CUBAN_LORD_GANG_2_FIGHT_9, - SFX_CUBAN_LORD_GANG_2_FIGHT_10, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_1, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_2, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_3, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_4, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_5, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_6, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_7, - SFX_CUBAN_LORD_GANG_2_GENERIC_CRASH_8, - SFX_CUBAN_LORD_GANG_2_GUN_COOL_1, - SFX_CUBAN_LORD_GANG_2_GUN_COOL_2, - SFX_CUBAN_LORD_GANG_2_GUN_COOL_3, - SFX_CUBAN_LORD_GANG_2_GUN_COOL_4, - SFX_CUBAN_LORD_GANG_2_GUN_COOL_5, - SFX_CUBAN_LORD_GANG_2_JACKED_1, - SFX_CUBAN_LORD_GANG_2_JACKED_2, - SFX_CUBAN_LORD_GANG_2_JACKED_3, - SFX_CUBAN_LORD_GANG_2_JACKED_4, - SFX_CUBAN_LORD_GANG_2_JACKED_5, - SFX_CUBAN_LORD_GANG_2_JACKED_6, - SFX_CUBAN_LORD_GANG_2_JACKING_1, - SFX_CUBAN_LORD_GANG_2_JACKING_2, - SFX_CUBAN_LORD_GANG_2_JACKING_3, - SFX_CUBAN_LORD_GANG_2_JACKING_4, - SFX_CUBAN_LORD_GANG_2_JACKING_5, - SFX_CUBAN_LORD_GANG_2_LOST_1, - SFX_CUBAN_LORD_GANG_2_LOST_2, - SFX_CUBAN_LORD_GANG_2_MUGGED_1, - SFX_CUBAN_LORD_GANG_2_MUGGED_2, - SFX_CUBAN_LORD_GANG_2_SAVED_1, - SFX_CUBAN_LORD_GANG_2_TAXI_1, - SFX_CUBAN_LORD_GANG_2_TAXI_2, - SFX_CUBAN_LORD_GANG_3_BLOCKED_1, - SFX_CUBAN_LORD_GANG_3_BLOCKED_2, - SFX_CUBAN_LORD_GANG_3_BLOCKED_3, - SFX_CUBAN_LORD_GANG_3_BLOCKED_4, - SFX_CUBAN_LORD_GANG_3_BLOCKED_5, - SFX_CUBAN_LORD_GANG_3_BLOCKED_6, - SFX_CUBAN_LORD_GANG_3_BLOCKED_7, - SFX_CUBAN_LORD_GANG_3_BLOCKED_8, - SFX_CUBAN_LORD_GANG_3_BLOCKED_9, - SFX_CUBAN_LORD_GANG_3_BLOCKED_10, - SFX_CUBAN_LORD_GANG_3_BUMP_1, - SFX_CUBAN_LORD_GANG_3_BUMP_2, - SFX_CUBAN_LORD_GANG_3_BUMP_3, - SFX_CUBAN_LORD_GANG_3_BUMP_4, - SFX_CUBAN_LORD_GANG_3_BUMP_5, - SFX_CUBAN_LORD_GANG_3_BUMP_6, - SFX_CUBAN_LORD_GANG_3_BUMP_7, - SFX_CUBAN_LORD_GANG_3_BUMP_8, - SFX_CUBAN_LORD_GANG_3_BUMP_9, - SFX_CUBAN_LORD_GANG_3_BUMP_10, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_1, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_2, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_3, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_4, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_5, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_6, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_7, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_8, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_9, - SFX_CUBAN_LORD_GANG_3_CAR_CRASH_10, - SFX_CUBAN_LORD_GANG_3_CHAT_1, - SFX_CUBAN_LORD_GANG_3_CHAT_2, - SFX_CUBAN_LORD_GANG_3_CHAT_3, - SFX_CUBAN_LORD_GANG_3_CHAT_4, - SFX_CUBAN_LORD_GANG_3_CHAT_5, - SFX_CUBAN_LORD_GANG_3_CHAT_6, - SFX_CUBAN_LORD_GANG_3_CHAT_7, - SFX_CUBAN_LORD_GANG_3_CHAT_8, - SFX_CUBAN_LORD_GANG_3_CHAT_9, - SFX_CUBAN_LORD_GANG_3_CHAT_10, - SFX_CUBAN_LORD_GANG_3_DODGE_1, - SFX_CUBAN_LORD_GANG_3_DODGE_2, - SFX_CUBAN_LORD_GANG_3_DODGE_3, - SFX_CUBAN_LORD_GANG_3_DODGE_4, - SFX_CUBAN_LORD_GANG_3_DODGE_5, - SFX_CUBAN_LORD_GANG_3_DODGE_6, - SFX_CUBAN_LORD_GANG_3_DODGE_7, - SFX_CUBAN_LORD_GANG_3_DODGE_8, - SFX_CUBAN_LORD_GANG_3_DODGE_9, - SFX_CUBAN_LORD_GANG_3_DODGE_10, - SFX_CUBAN_LORD_GANG_3_DODGE_11, - SFX_CUBAN_LORD_GANG_3_DODGE_12, - SFX_CUBAN_LORD_GANG_3_DODGE_13, - SFX_CUBAN_LORD_GANG_3_EYEING_1, - SFX_CUBAN_LORD_GANG_3_EYEING_2, - SFX_CUBAN_LORD_GANG_3_FIGHT_1, - SFX_CUBAN_LORD_GANG_3_FIGHT_2, - SFX_CUBAN_LORD_GANG_3_FIGHT_3, - SFX_CUBAN_LORD_GANG_3_FIGHT_4, - SFX_CUBAN_LORD_GANG_3_FIGHT_5, - SFX_CUBAN_LORD_GANG_3_FIGHT_6, - SFX_CUBAN_LORD_GANG_3_FIGHT_7, - SFX_CUBAN_LORD_GANG_3_FIGHT_8, - SFX_CUBAN_LORD_GANG_3_FIGHT_9, - SFX_CUBAN_LORD_GANG_3_FIGHT_10, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_1, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_2, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_3, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_4, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_5, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_6, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_7, - SFX_CUBAN_LORD_GANG_3_GENERIC_CRASH_8, - SFX_CUBAN_LORD_GANG_3_GUN_COOL_1, - SFX_CUBAN_LORD_GANG_3_GUN_COOL_2, - SFX_CUBAN_LORD_GANG_3_GUN_COOL_3, - SFX_CUBAN_LORD_GANG_3_GUN_COOL_4, - SFX_CUBAN_LORD_GANG_3_GUN_COOL_5, - SFX_CUBAN_LORD_GANG_3_JACKED_1, - SFX_CUBAN_LORD_GANG_3_JACKED_2, - SFX_CUBAN_LORD_GANG_3_JACKED_3, - SFX_CUBAN_LORD_GANG_3_JACKED_4, - SFX_CUBAN_LORD_GANG_3_JACKED_5, - SFX_CUBAN_LORD_GANG_3_JACKED_6, - SFX_CUBAN_LORD_GANG_3_JACKING_1, - SFX_CUBAN_LORD_GANG_3_JACKING_2, - SFX_CUBAN_LORD_GANG_3_JACKING_3, - SFX_CUBAN_LORD_GANG_3_JACKING_4, - SFX_CUBAN_LORD_GANG_3_JACKING_5, - SFX_CUBAN_LORD_GANG_3_LOST_1, - SFX_CUBAN_LORD_GANG_3_LOST_2, - SFX_CUBAN_LORD_GANG_3_MUGGED_1, - SFX_CUBAN_LORD_GANG_3_MUGGED_2, - SFX_CUBAN_LORD_GANG_3_SAVED_1, - SFX_CUBAN_LORD_GANG_3_TAXI_1, - SFX_CUBAN_LORD_GANG_3_TAXI_2, - - SFX_PLAYER_GANG_1_BLOCKED_1, - SFX_PLAYER_GANG_1_BLOCKED_2, - SFX_PLAYER_GANG_1_BLOCKED_3, - SFX_PLAYER_GANG_1_BLOCKED_4, - SFX_PLAYER_GANG_1_BLOCKED_5, - SFX_PLAYER_GANG_1_BLOCKED_6, - SFX_PLAYER_GANG_1_BLOCKED_7, - SFX_PLAYER_GANG_1_BLOCKED_8, - SFX_PLAYER_GANG_1_BLOCKED_9, - SFX_PLAYER_GANG_1_BLOCKED_10, - SFX_PLAYER_GANG_1_BUMP_1, - SFX_PLAYER_GANG_1_BUMP_2, - SFX_PLAYER_GANG_1_BUMP_3, - SFX_PLAYER_GANG_1_BUMP_4, - SFX_PLAYER_GANG_1_BUMP_5, - SFX_PLAYER_GANG_1_CAR_CRASH_1, - SFX_PLAYER_GANG_1_CAR_CRASH_2, - SFX_PLAYER_GANG_1_CAR_CRASH_3, - SFX_PLAYER_GANG_1_CAR_CRASH_4, - SFX_PLAYER_GANG_1_CAR_CRASH_5, - SFX_PLAYER_GANG_1_CHAT_1, - SFX_PLAYER_GANG_1_CHAT_2, - SFX_PLAYER_GANG_1_CHAT_3, - SFX_PLAYER_GANG_1_CHAT_4, - SFX_PLAYER_GANG_1_CHAT_5, - SFX_PLAYER_GANG_1_CHAT_6, - SFX_PLAYER_GANG_1_CHAT_7, - SFX_PLAYER_GANG_1_CHAT_8, - SFX_PLAYER_GANG_1_DODGE_1, - SFX_PLAYER_GANG_1_DODGE_2, - SFX_PLAYER_GANG_1_DODGE_3, - SFX_PLAYER_GANG_1_DODGE_4, - SFX_PLAYER_GANG_1_DODGE_5, - SFX_PLAYER_GANG_1_DODGE_6, - SFX_PLAYER_GANG_1_DODGE_7, - SFX_PLAYER_GANG_1_EYEING_1, - SFX_PLAYER_GANG_1_EYEING_2, - SFX_PLAYER_GANG_1_FIGHT_1, - SFX_PLAYER_GANG_1_FIGHT_2, - SFX_PLAYER_GANG_1_FIGHT_3, - SFX_PLAYER_GANG_1_FIGHT_4, - SFX_PLAYER_GANG_1_FIGHT_5, - SFX_PLAYER_GANG_1_GENERIC_CRASH_1, - SFX_PLAYER_GANG_1_GENERIC_CRASH_2, - SFX_PLAYER_GANG_1_GENERIC_CRASH_3, - SFX_PLAYER_GANG_1_GENERIC_CRASH_4, - SFX_PLAYER_GANG_1_GENERIC_CRASH_5, - SFX_PLAYER_GANG_1_GUN_COOL_1, - SFX_PLAYER_GANG_1_GUN_COOL_2, - SFX_PLAYER_GANG_1_GUN_COOL_3, - SFX_PLAYER_GANG_1_GUN_COOL_4, - SFX_PLAYER_GANG_1_JACKED_1, - SFX_PLAYER_GANG_1_JACKED_2, - SFX_PLAYER_GANG_1_JACKED_3, - SFX_PLAYER_GANG_1_JACKED_4, - SFX_PLAYER_GANG_1_JACKED_5, - SFX_PLAYER_GANG_1_JACKING_1, - SFX_PLAYER_GANG_1_JACKING_2, - SFX_PLAYER_GANG_1_JACKING_3, - SFX_PLAYER_GANG_1_JACKING_4, - SFX_PLAYER_GANG_1_JACKING_5, - SFX_PLAYER_GANG_1_LOST_1, - SFX_PLAYER_GANG_1_LOST_2, - SFX_PLAYER_GANG_1_MUGGED_1, - SFX_PLAYER_GANG_1_MUGGED_2, - SFX_PLAYER_GANG_1_SAVED_1, - SFX_PLAYER_GANG_1_SHOCKED_1, - SFX_PLAYER_GANG_1_SHOCKED_2, - SFX_PLAYER_GANG_1_TAXI_1, - SFX_PLAYER_GANG_1_TAXI_2, - SFX_PLAYER_GANG_2_BLOCKED_1, - SFX_PLAYER_GANG_2_BLOCKED_2, - SFX_PLAYER_GANG_2_BLOCKED_3, - SFX_PLAYER_GANG_2_BLOCKED_4, - SFX_PLAYER_GANG_2_BLOCKED_5, - SFX_PLAYER_GANG_2_BLOCKED_6, - SFX_PLAYER_GANG_2_BLOCKED_7, - SFX_PLAYER_GANG_2_BLOCKED_8, - SFX_PLAYER_GANG_2_BLOCKED_9, - SFX_PLAYER_GANG_2_BLOCKED_10, - SFX_PLAYER_GANG_2_BUMP_1, - SFX_PLAYER_GANG_2_BUMP_2, - SFX_PLAYER_GANG_2_BUMP_3, - SFX_PLAYER_GANG_2_BUMP_4, - SFX_PLAYER_GANG_2_BUMP_5, - SFX_PLAYER_GANG_2_CAR_CRASH_1, - SFX_PLAYER_GANG_2_CAR_CRASH_2, - SFX_PLAYER_GANG_2_CAR_CRASH_3, - SFX_PLAYER_GANG_2_CAR_CRASH_4, - SFX_PLAYER_GANG_2_CAR_CRASH_5, - SFX_PLAYER_GANG_2_CHAT_1, - SFX_PLAYER_GANG_2_CHAT_2, - SFX_PLAYER_GANG_2_CHAT_3, - SFX_PLAYER_GANG_2_CHAT_4, - SFX_PLAYER_GANG_2_CHAT_5, - SFX_PLAYER_GANG_2_CHAT_6, - SFX_PLAYER_GANG_2_CHAT_7, - SFX_PLAYER_GANG_2_CHAT_8, - SFX_PLAYER_GANG_2_DODGE_1, - SFX_PLAYER_GANG_2_DODGE_2, - SFX_PLAYER_GANG_2_DODGE_3, - SFX_PLAYER_GANG_2_DODGE_4, - SFX_PLAYER_GANG_2_DODGE_5, - SFX_PLAYER_GANG_2_DODGE_6, - SFX_PLAYER_GANG_2_DODGE_7, - SFX_PLAYER_GANG_2_EYEING_1, - SFX_PLAYER_GANG_2_EYEING_2, - SFX_PLAYER_GANG_2_FIGHT_1, - SFX_PLAYER_GANG_2_FIGHT_2, - SFX_PLAYER_GANG_2_FIGHT_3, - SFX_PLAYER_GANG_2_FIGHT_4, - SFX_PLAYER_GANG_2_FIGHT_5, - SFX_PLAYER_GANG_2_GENERIC_CRASH_1, - SFX_PLAYER_GANG_2_GENERIC_CRASH_2, - SFX_PLAYER_GANG_2_GENERIC_CRASH_3, - SFX_PLAYER_GANG_2_GENERIC_CRASH_4, - SFX_PLAYER_GANG_2_GENERIC_CRASH_5, - SFX_PLAYER_GANG_2_GUN_COOL_1, - SFX_PLAYER_GANG_2_GUN_COOL_2, - SFX_PLAYER_GANG_2_GUN_COOL_3, - SFX_PLAYER_GANG_2_GUN_COOL_4, - SFX_PLAYER_GANG_2_JACKED_1, - SFX_PLAYER_GANG_2_JACKED_2, - SFX_PLAYER_GANG_2_JACKED_3, - SFX_PLAYER_GANG_2_JACKED_4, - SFX_PLAYER_GANG_2_JACKED_5, - SFX_PLAYER_GANG_2_JACKING_1, - SFX_PLAYER_GANG_2_JACKING_2, - SFX_PLAYER_GANG_2_JACKING_3, - SFX_PLAYER_GANG_2_JACKING_4, - SFX_PLAYER_GANG_2_JACKING_5, - SFX_PLAYER_GANG_2_LOST_1, - SFX_PLAYER_GANG_2_LOST_2, - SFX_PLAYER_GANG_2_MUGGED_1, - SFX_PLAYER_GANG_2_MUGGED_2, - SFX_PLAYER_GANG_2_SAVED_1, - SFX_PLAYER_GANG_2_SHOCKED_1, - SFX_PLAYER_GANG_2_SHOCKED_2, - SFX_PLAYER_GANG_2_TAXI_1, - SFX_PLAYER_GANG_2_TAXI_2, - SFX_PLAYER_GANG_3_BLOCKED_1, - SFX_PLAYER_GANG_3_BLOCKED_2, - SFX_PLAYER_GANG_3_BLOCKED_3, - SFX_PLAYER_GANG_3_BLOCKED_4, - SFX_PLAYER_GANG_3_BLOCKED_5, - SFX_PLAYER_GANG_3_BLOCKED_6, - SFX_PLAYER_GANG_3_BLOCKED_7, - SFX_PLAYER_GANG_3_BLOCKED_8, - SFX_PLAYER_GANG_3_BLOCKED_9, - SFX_PLAYER_GANG_3_BLOCKED_10, - SFX_PLAYER_GANG_3_BUMP_1, - SFX_PLAYER_GANG_3_BUMP_2, - SFX_PLAYER_GANG_3_BUMP_3, - SFX_PLAYER_GANG_3_BUMP_4, - SFX_PLAYER_GANG_3_BUMP_5, - SFX_PLAYER_GANG_3_CAR_CRASH_1, - SFX_PLAYER_GANG_3_CAR_CRASH_2, - SFX_PLAYER_GANG_3_CAR_CRASH_3, - SFX_PLAYER_GANG_3_CAR_CRASH_4, - SFX_PLAYER_GANG_3_CAR_CRASH_5, - SFX_PLAYER_GANG_3_CHAT_1, - SFX_PLAYER_GANG_3_CHAT_2, - SFX_PLAYER_GANG_3_CHAT_3, - SFX_PLAYER_GANG_3_CHAT_4, - SFX_PLAYER_GANG_3_CHAT_5, - SFX_PLAYER_GANG_3_CHAT_6, - SFX_PLAYER_GANG_3_CHAT_7, - SFX_PLAYER_GANG_3_CHAT_8, - SFX_PLAYER_GANG_3_DODGE_1, - SFX_PLAYER_GANG_3_DODGE_2, - SFX_PLAYER_GANG_3_DODGE_3, - SFX_PLAYER_GANG_3_DODGE_4, - SFX_PLAYER_GANG_3_DODGE_5, - SFX_PLAYER_GANG_3_DODGE_6, - SFX_PLAYER_GANG_3_DODGE_7, - SFX_PLAYER_GANG_3_EYEING_1, - SFX_PLAYER_GANG_3_EYEING_2, - SFX_PLAYER_GANG_3_FIGHT_1, - SFX_PLAYER_GANG_3_FIGHT_2, - SFX_PLAYER_GANG_3_FIGHT_3, - SFX_PLAYER_GANG_3_FIGHT_4, - SFX_PLAYER_GANG_3_FIGHT_5, - SFX_PLAYER_GANG_3_GENERIC_CRASH_1, - SFX_PLAYER_GANG_3_GENERIC_CRASH_2, - SFX_PLAYER_GANG_3_GENERIC_CRASH_3, - SFX_PLAYER_GANG_3_GENERIC_CRASH_4, - SFX_PLAYER_GANG_3_GENERIC_CRASH_5, - SFX_PLAYER_GANG_3_GUN_COOL_1, - SFX_PLAYER_GANG_3_GUN_COOL_2, - SFX_PLAYER_GANG_3_GUN_COOL_3, - SFX_PLAYER_GANG_3_GUN_COOL_4, - SFX_PLAYER_GANG_3_JACKED_1, - SFX_PLAYER_GANG_3_JACKED_2, - SFX_PLAYER_GANG_3_JACKED_3, - SFX_PLAYER_GANG_3_JACKED_4, - SFX_PLAYER_GANG_3_JACKED_5, - SFX_PLAYER_GANG_3_JACKING_1, - SFX_PLAYER_GANG_3_JACKING_2, - SFX_PLAYER_GANG_3_JACKING_3, - SFX_PLAYER_GANG_3_JACKING_4, - SFX_PLAYER_GANG_3_JACKING_5, - SFX_PLAYER_GANG_3_LOST_1, - SFX_PLAYER_GANG_3_LOST_2, - SFX_PLAYER_GANG_3_MUGGED_1, - SFX_PLAYER_GANG_3_MUGGED_2, - SFX_PLAYER_GANG_3_SAVED_1, - SFX_PLAYER_GANG_3_SHOCKED_1, - SFX_PLAYER_GANG_3_SHOCKED_2, - SFX_PLAYER_GANG_3_TAXI_1, - SFX_PLAYER_GANG_3_TAXI_2, - - SFX_GUARD_DUTY_1_BUMP_1, - SFX_GUARD_DUTY_1_BUMP_2, - SFX_GUARD_DUTY_1_BUMP_3, - SFX_GUARD_DUTY_1_BUMP_4, - SFX_GUARD_DUTY_1_BUMP_5, - SFX_GUARD_DUTY_1_BUMP_6, - SFX_GUARD_DUTY_1_BUMP_7, - SFX_GUARD_DUTY_1_BUMP_8, - SFX_GUARD_DUTY_1_BUMP_9, - SFX_GUARD_DUTY_1_BUMP_10, - SFX_GUARD_DUTY_1_CHAT_1, - SFX_GUARD_DUTY_1_CHAT_2, - SFX_GUARD_DUTY_1_CHAT_3, - SFX_GUARD_DUTY_1_CHAT_4, - SFX_GUARD_DUTY_1_CHAT_5, - SFX_GUARD_DUTY_1_CHAT_6, - SFX_GUARD_DUTY_1_CHAT_7, - SFX_GUARD_DUTY_1_CHAT_8, - SFX_GUARD_DUTY_1_CHAT_9, - SFX_GUARD_DUTY_1_CHAT_10, - SFX_GUARD_DUTY_1_DODGE_1, - SFX_GUARD_DUTY_1_DODGE_2, - SFX_GUARD_DUTY_1_DODGE_3, - SFX_GUARD_DUTY_1_DODGE_4, - SFX_GUARD_DUTY_1_DODGE_5, - SFX_GUARD_DUTY_1_DODGE_6, - SFX_GUARD_DUTY_1_DODGE_7, - SFX_GUARD_DUTY_1_DODGE_8, - SFX_GUARD_DUTY_1_DODGE_9, - SFX_GUARD_DUTY_1_EYEING_1, - SFX_GUARD_DUTY_1_EYEING_2, - SFX_GUARD_DUTY_1_FIGHT_1, - SFX_GUARD_DUTY_1_FIGHT_2, - SFX_GUARD_DUTY_1_FIGHT_3, - SFX_GUARD_DUTY_1_FIGHT_4, - SFX_GUARD_DUTY_1_FIGHT_5, - SFX_GUARD_DUTY_1_FIGHT_6, - SFX_GUARD_DUTY_1_FIGHT_7, - SFX_GUARD_DUTY_1_GUN_COOL_1, - SFX_GUARD_DUTY_1_GUN_COOL_2, - SFX_GUARD_DUTY_1_GUN_COOL_3, - SFX_GUARD_DUTY_1_GUN_COOL_4, - SFX_GUARD_DUTY_1_GUN_COOL_5, - SFX_GUARD_DUTY_1_GUN_COOL_6, - SFX_GUARD_DUTY_1_LOST_1, - SFX_GUARD_DUTY_1_LOST_2, - SFX_GUARD_DUTY_1_SAVED_1, - SFX_GUARD_DUTY_1_SAVED_2, - SFX_GUARD_DUTY_1_SHOCKED_1, - SFX_GUARD_DUTY_1_SHOCKED_2, - - SFX_GUARD_DUTY_2_BUMP_1, - SFX_GUARD_DUTY_2_BUMP_2, - SFX_GUARD_DUTY_2_BUMP_3, - SFX_GUARD_DUTY_2_BUMP_4, - SFX_GUARD_DUTY_2_BUMP_5, - SFX_GUARD_DUTY_2_BUMP_6, - SFX_GUARD_DUTY_2_BUMP_7, - SFX_GUARD_DUTY_2_BUMP_8, - SFX_GUARD_DUTY_2_BUMP_9, - SFX_GUARD_DUTY_2_BUMP_10, - SFX_GUARD_DUTY_2_CHAT_1, - SFX_GUARD_DUTY_2_CHAT_2, - SFX_GUARD_DUTY_2_CHAT_3, - SFX_GUARD_DUTY_2_CHAT_4, - SFX_GUARD_DUTY_2_CHAT_5, - SFX_GUARD_DUTY_2_CHAT_6, - SFX_GUARD_DUTY_2_CHAT_7, - SFX_GUARD_DUTY_2_CHAT_8, - SFX_GUARD_DUTY_2_CHAT_9, - SFX_GUARD_DUTY_2_CHAT_10, - SFX_GUARD_DUTY_2_DODGE_1, - SFX_GUARD_DUTY_2_DODGE_2, - SFX_GUARD_DUTY_2_DODGE_3, - SFX_GUARD_DUTY_2_DODGE_4, - SFX_GUARD_DUTY_2_DODGE_5, - SFX_GUARD_DUTY_2_DODGE_6, - SFX_GUARD_DUTY_2_DODGE_7, - SFX_GUARD_DUTY_2_DODGE_8, - SFX_GUARD_DUTY_2_DODGE_9, - SFX_GUARD_DUTY_2_EYEING_1, - SFX_GUARD_DUTY_2_EYEING_2, - SFX_GUARD_DUTY_2_FIGHT_1, - SFX_GUARD_DUTY_2_FIGHT_2, - SFX_GUARD_DUTY_2_FIGHT_3, - SFX_GUARD_DUTY_2_FIGHT_4, - SFX_GUARD_DUTY_2_FIGHT_5, - SFX_GUARD_DUTY_2_FIGHT_6, - SFX_GUARD_DUTY_2_FIGHT_7, - SFX_GUARD_DUTY_2_GUN_COOL_1, - SFX_GUARD_DUTY_2_GUN_COOL_2, - SFX_GUARD_DUTY_2_GUN_COOL_3, - SFX_GUARD_DUTY_2_GUN_COOL_4, - SFX_GUARD_DUTY_2_GUN_COOL_5, - SFX_GUARD_DUTY_2_GUN_COOL_6, - SFX_GUARD_DUTY_2_LOST_1, - SFX_GUARD_DUTY_2_LOST_2, - SFX_GUARD_DUTY_2_SAVED_1, - SFX_GUARD_DUTY_2_SAVED_2, - SFX_GUARD_DUTY_2_SHOCKED_1, - SFX_GUARD_DUTY_2_SHOCKED_2, - - SFX_GUARD_DUTY_3_BUMP_1, - SFX_GUARD_DUTY_3_BUMP_2, - SFX_GUARD_DUTY_3_BUMP_3, - SFX_GUARD_DUTY_3_BUMP_4, - SFX_GUARD_DUTY_3_BUMP_5, - SFX_GUARD_DUTY_3_BUMP_6, - SFX_GUARD_DUTY_3_BUMP_7, - SFX_GUARD_DUTY_3_BUMP_8, - SFX_GUARD_DUTY_3_BUMP_9, - SFX_GUARD_DUTY_3_BUMP_10, - SFX_GUARD_DUTY_3_CHAT_1, - SFX_GUARD_DUTY_3_CHAT_2, - SFX_GUARD_DUTY_3_CHAT_3, - SFX_GUARD_DUTY_3_CHAT_4, - SFX_GUARD_DUTY_3_CHAT_5, - SFX_GUARD_DUTY_3_CHAT_6, - SFX_GUARD_DUTY_3_CHAT_7, - SFX_GUARD_DUTY_3_CHAT_8, - SFX_GUARD_DUTY_3_CHAT_9, - SFX_GUARD_DUTY_3_CHAT_10, - SFX_GUARD_DUTY_3_DODGE_1, - SFX_GUARD_DUTY_3_DODGE_2, - SFX_GUARD_DUTY_3_DODGE_3, - SFX_GUARD_DUTY_3_DODGE_4, - SFX_GUARD_DUTY_3_DODGE_5, - SFX_GUARD_DUTY_3_DODGE_6, - SFX_GUARD_DUTY_3_DODGE_7, - SFX_GUARD_DUTY_3_DODGE_8, - SFX_GUARD_DUTY_3_DODGE_9, - SFX_GUARD_DUTY_3_EYEING_1, - SFX_GUARD_DUTY_3_EYEING_2, - SFX_GUARD_DUTY_3_FIGHT_1, - SFX_GUARD_DUTY_3_FIGHT_2, - SFX_GUARD_DUTY_3_FIGHT_3, - SFX_GUARD_DUTY_3_FIGHT_4, - SFX_GUARD_DUTY_3_FIGHT_5, - SFX_GUARD_DUTY_3_FIGHT_6, - SFX_GUARD_DUTY_3_FIGHT_7, - SFX_GUARD_DUTY_3_GUN_COOL_1, - SFX_GUARD_DUTY_3_GUN_COOL_2, - SFX_GUARD_DUTY_3_GUN_COOL_3, - SFX_GUARD_DUTY_3_GUN_COOL_4, - SFX_GUARD_DUTY_3_GUN_COOL_5, - SFX_GUARD_DUTY_3_GUN_COOL_6, - SFX_GUARD_DUTY_3_LOST_1, - SFX_GUARD_DUTY_3_LOST_2, - SFX_GUARD_DUTY_3_SAVED_1, - SFX_GUARD_DUTY_3_SAVED_2, - SFX_GUARD_DUTY_3_SHOCKED_1, - SFX_GUARD_DUTY_3_SHOCKED_2, - - SFX_VICE_VOICE_1_ARREST_1, - SFX_VICE_VOICE_1_ARREST_2, - SFX_VICE_VOICE_1_ARREST_3, - SFX_VICE_VOICE_1_MIAMIVICE_EXITING_CAR_1, - - SFX_VICE_VOICE_2_ARREST_1, - SFX_VICE_VOICE_2_ARREST_2, - SFX_VICE_VOICE_2_ARREST_3, - SFX_VICE_VOICE_2_MIAMIVICE_EXITING_CAR_1, - - SFX_VICE_VOICE_3_ARREST_1, - SFX_VICE_VOICE_3_ARREST_2, - SFX_VICE_VOICE_3_ARREST_3, - SFX_VICE_VOICE_3_MIAMIVICE_EXITING_CAR_1, - - SFX_VICE_VOICE_4_ARREST_1, - SFX_VICE_VOICE_4_ARREST_2, - SFX_VICE_VOICE_4_ARREST_3, - SFX_VICE_VOICE_4_MIAMIVICE_EXITING_CAR_1, - - SFX_VICE_VOICE_5_ARREST_1, - SFX_VICE_VOICE_5_ARREST_2, - SFX_VICE_VOICE_5_ARREST_3, - SFX_VICE_VOICE_5_MIAMIVICE_EXITING_CAR_1, - - SFX_VICE_VOICE_6_ARREST_1, - SFX_VICE_VOICE_6_ARREST_2, - SFX_VICE_VOICE_6_ARREST_3, - SFX_VICE_VOICE_6_MIAMIVICE_EXITING_CAR_1, - - SFX_DEFAULT_VOICE_BLOCKED_1, - SFX_DEFAULT_VOICE_BLOCKED_2, - SFX_DEFAULT_VOICE_BLOCKED_3, - SFX_DEFAULT_VOICE_BLOCKED_4, - SFX_DEFAULT_VOICE_BLOCKED_5, - SFX_DEFAULT_VOICE_BLOCKED_6, - SFX_DEFAULT_VOICE_BLOCKED_7, - SFX_DEFAULT_VOICE_BLOCKED_8, - SFX_DEFAULT_VOICE_BLOCKED_9, - SFX_DEFAULT_VOICE_BLOCKED_10, - SFX_DEFAULT_VOICE_BLOCKED_11, - SFX_DEFAULT_VOICE_BLOCKED_12, - SFX_DEFAULT_VOICE_BLOCKED_13, - SFX_DEFAULT_VOICE_BLOCKED_14, - SFX_DEFAULT_VOICE_BLOCKED_15, - SFX_DEFAULT_VOICE_BLOCKED_16, - SFX_DEFAULT_VOICE_BUMP_1, - SFX_DEFAULT_VOICE_BUMP_2, - SFX_DEFAULT_VOICE_BUMP_3, - SFX_DEFAULT_VOICE_BUMP_4, - SFX_DEFAULT_VOICE_BUMP_5, - SFX_DEFAULT_VOICE_BUMP_6, - SFX_DEFAULT_VOICE_BUMP_7, - SFX_DEFAULT_VOICE_BUMP_8, - SFX_DEFAULT_VOICE_BUMP_9, - SFX_DEFAULT_VOICE_BUMP_10, - SFX_DEFAULT_VOICE_BUMP_11, - SFX_DEFAULT_VOICE_BUMP_12, - SFX_DEFAULT_VOICE_BUMP_13, - SFX_DEFAULT_VOICE_BUMP_14, - SFX_DEFAULT_VOICE_BUMP_15, - SFX_DEFAULT_VOICE_BUMP_16, - SFX_DEFAULT_VOICE_BUMP_17, - SFX_DEFAULT_VOICE_BUMP_18, - SFX_DEFAULT_VOICE_BUMP_19, - SFX_DEFAULT_VOICE_BUMP_20, - SFX_DEFAULT_VOICE_BUMP_21, - SFX_DEFAULT_VOICE_BUMP_22, - SFX_DEFAULT_VOICE_BUMP_23, - SFX_DEFAULT_VOICE_BUMP_24, - SFX_DEFAULT_VOICE_BUMP_25, - SFX_DEFAULT_VOICE_CAR_CRASH_1, - SFX_DEFAULT_VOICE_CAR_CRASH_2, - SFX_DEFAULT_VOICE_CAR_CRASH_3, - SFX_DEFAULT_VOICE_CAR_CRASH_4, - SFX_DEFAULT_VOICE_CAR_CRASH_5, - SFX_DEFAULT_VOICE_CAR_CRASH_6, - SFX_DEFAULT_VOICE_CAR_CRASH_7, - SFX_DEFAULT_VOICE_CAR_CRASH_8, - SFX_DEFAULT_VOICE_CAR_CRASH_9, - SFX_DEFAULT_VOICE_CAR_CRASH_10, - SFX_DEFAULT_VOICE_CAR_CRASH_11, - SFX_DEFAULT_VOICE_CAR_CRASH_12, - SFX_DEFAULT_VOICE_CAR_CRASH_13, - SFX_DEFAULT_VOICE_CAR_CRASH_14, - SFX_DEFAULT_VOICE_CAR_CRASH_15, - SFX_DEFAULT_VOICE_CHAT_1, - SFX_DEFAULT_VOICE_CHAT_2, - SFX_DEFAULT_VOICE_CHAT_3, - SFX_DEFAULT_VOICE_CHAT_4, - SFX_DEFAULT_VOICE_CHAT_5, - SFX_DEFAULT_VOICE_CHAT_6, - SFX_DEFAULT_VOICE_CHAT_7, - SFX_DEFAULT_VOICE_CHAT_8, - SFX_DEFAULT_VOICE_CHAT_9, - SFX_DEFAULT_VOICE_CHAT_10, - SFX_DEFAULT_VOICE_CHAT_11, - SFX_DEFAULT_VOICE_CHAT_12, - SFX_DEFAULT_VOICE_CHAT_13, - SFX_DEFAULT_VOICE_CHAT_14, - SFX_DEFAULT_VOICE_CHAT_15, - SFX_DEFAULT_VOICE_CHAT_16, - SFX_DEFAULT_VOICE_CHAT_17, - SFX_DEFAULT_VOICE_CHAT_18, - SFX_DEFAULT_VOICE_CHAT_19, - SFX_DEFAULT_VOICE_CHAT_20, - SFX_DEFAULT_VOICE_CHAT_21, - SFX_DEFAULT_VOICE_CHAT_22, - SFX_DEFAULT_VOICE_CHAT_23, - SFX_DEFAULT_VOICE_CHAT_24, - SFX_DEFAULT_VOICE_CHAT_25, - SFX_DEFAULT_VOICE_DODGE_1, - SFX_DEFAULT_VOICE_DODGE_2, - SFX_DEFAULT_VOICE_DODGE_3, - SFX_DEFAULT_VOICE_DODGE_4, - SFX_DEFAULT_VOICE_DODGE_5, - SFX_DEFAULT_VOICE_DODGE_6, - SFX_DEFAULT_VOICE_DODGE_7, - SFX_DEFAULT_VOICE_DODGE_8, - SFX_DEFAULT_VOICE_DODGE_9, - SFX_DEFAULT_VOICE_DODGE_10, - SFX_DEFAULT_VOICE_DODGE_11, - SFX_DEFAULT_VOICE_DODGE_12, - SFX_DEFAULT_VOICE_DODGE_13, - SFX_DEFAULT_VOICE_DODGE_14, - SFX_DEFAULT_VOICE_DODGE_15, - SFX_DEFAULT_VOICE_DODGE_16, - SFX_DEFAULT_VOICE_DODGE_17, - SFX_DEFAULT_VOICE_DODGE_18, - SFX_DEFAULT_VOICE_DODGE_19, - SFX_DEFAULT_VOICE_EYEING_1, - SFX_DEFAULT_VOICE_EYEING_2, - SFX_DEFAULT_VOICE_EYEING_3, - SFX_DEFAULT_VOICE_EYEING_4, - SFX_DEFAULT_VOICE_EYEING_5, - SFX_DEFAULT_VOICE_EYEING_6, - SFX_DEFAULT_VOICE_FIGHT_1, - SFX_DEFAULT_VOICE_FIGHT_2, - SFX_DEFAULT_VOICE_FIGHT_3, - SFX_DEFAULT_VOICE_FIGHT_4, - SFX_DEFAULT_VOICE_FIGHT_5, - SFX_DEFAULT_VOICE_FIGHT_6, - SFX_DEFAULT_VOICE_FIGHT_7, - SFX_DEFAULT_VOICE_FIGHT_8, - SFX_DEFAULT_VOICE_FIGHT_9, - SFX_DEFAULT_VOICE_FIGHT_10, - SFX_DEFAULT_VOICE_FIGHT_11, - SFX_DEFAULT_VOICE_FIGHT_12, - SFX_DEFAULT_VOICE_FIGHT_13, - SFX_DEFAULT_VOICE_FIGHT_14, - SFX_DEFAULT_VOICE_FIGHT_15, - SFX_DEFAULT_VOICE_FIGHT_16, - SFX_DEFAULT_VOICE_GENERIC_CRASH_1, - SFX_DEFAULT_VOICE_GENERIC_CRASH_2, - SFX_DEFAULT_VOICE_GENERIC_CRASH_3, - SFX_DEFAULT_VOICE_GENERIC_CRASH_4, - SFX_DEFAULT_VOICE_GENERIC_CRASH_5, - SFX_DEFAULT_VOICE_GENERIC_CRASH_6, - SFX_DEFAULT_VOICE_GENERIC_CRASH_7, - SFX_DEFAULT_VOICE_GENERIC_CRASH_8, - SFX_DEFAULT_VOICE_GENERIC_CRASH_9, - SFX_DEFAULT_VOICE_GENERIC_CRASH_10, - SFX_DEFAULT_VOICE_GENERIC_CRASH_11, - SFX_DEFAULT_VOICE_GENERIC_CRASH_12, - SFX_DEFAULT_VOICE_GENERIC_CRASH_13, - SFX_DEFAULT_VOICE_GUN_PANIC_1, - SFX_DEFAULT_VOICE_GUN_PANIC_2, - SFX_DEFAULT_VOICE_GUN_PANIC_3, - SFX_DEFAULT_VOICE_GUN_PANIC_4, - SFX_DEFAULT_VOICE_GUN_PANIC_5, - SFX_DEFAULT_VOICE_GUN_PANIC_6, - SFX_DEFAULT_VOICE_GUN_PANIC_7, - SFX_DEFAULT_VOICE_GUN_PANIC_8, - SFX_DEFAULT_VOICE_GUN_PANIC_9, - SFX_DEFAULT_VOICE_GUN_PANIC_10, - SFX_DEFAULT_VOICE_GUN_PANIC_11, - SFX_DEFAULT_VOICE_GUN_PANIC_12, - SFX_DEFAULT_VOICE_JACKED_1, - SFX_DEFAULT_VOICE_JACKED_2, - SFX_DEFAULT_VOICE_JACKED_3, - SFX_DEFAULT_VOICE_JACKED_4, - SFX_DEFAULT_VOICE_JACKED_5, - SFX_DEFAULT_VOICE_JACKED_6, - SFX_DEFAULT_VOICE_JACKED_7, - SFX_DEFAULT_VOICE_JACKED_8, - SFX_DEFAULT_VOICE_JACKED_9, - SFX_DEFAULT_VOICE_JACKED_10, - SFX_DEFAULT_VOICE_JACKED_11, - SFX_DEFAULT_VOICE_JACKED_12, - SFX_DEFAULT_VOICE_JACKING_1, - SFX_DEFAULT_VOICE_JACKING_2, - SFX_DEFAULT_VOICE_JACKING_3, - SFX_DEFAULT_VOICE_JACKING_4, - SFX_DEFAULT_VOICE_JACKING_5, - SFX_DEFAULT_VOICE_JACKING_6, - SFX_DEFAULT_VOICE_JACKING_7, - SFX_DEFAULT_VOICE_JACKING_8, - SFX_DEFAULT_VOICE_JACKING_9, - SFX_DEFAULT_VOICE_JACKING_10, - SFX_DEFAULT_VOICE_JACKING_11, - SFX_DEFAULT_VOICE_JACKING_12, - SFX_DEFAULT_VOICE_JACKING_13, - SFX_DEFAULT_VOICE_LOST_1, - SFX_DEFAULT_VOICE_LOST_2, - SFX_DEFAULT_VOICE_LOST_3, - SFX_DEFAULT_VOICE_LOST_4, - SFX_DEFAULT_VOICE_LOST_5, - SFX_DEFAULT_VOICE_MUGGED_1, - SFX_DEFAULT_VOICE_MUGGED_2, - SFX_DEFAULT_VOICE_MUGGED_3, - SFX_DEFAULT_VOICE_MUGGED_4, - SFX_DEFAULT_VOICE_RUN_1, - SFX_DEFAULT_VOICE_RUN_2, - SFX_DEFAULT_VOICE_RUN_3, - SFX_DEFAULT_VOICE_RUN_4, - SFX_DEFAULT_VOICE_RUN_5, - SFX_DEFAULT_VOICE_RUN_6, - SFX_DEFAULT_VOICE_RUN_7, - SFX_DEFAULT_VOICE_RUN_8, - SFX_DEFAULT_VOICE_RUN_9, - SFX_DEFAULT_VOICE_RUN_10, - SFX_DEFAULT_VOICE_RUN_11, - SFX_DEFAULT_VOICE_RUN_12, - SFX_DEFAULT_VOICE_RUN_13, - SFX_DEFAULT_VOICE_RUN_14, - SFX_DEFAULT_VOICE_RUN_15, - SFX_DEFAULT_VOICE_RUN_16, - SFX_DEFAULT_VOICE_RUN_17, - SFX_DEFAULT_VOICE_RUN_18, - SFX_DEFAULT_VOICE_RUN_19, - SFX_DEFAULT_VOICE_SAVED_1, - SFX_DEFAULT_VOICE_SAVED_2, - SFX_DEFAULT_VOICE_SAVED_3, - SFX_DEFAULT_VOICE_SAVED_4, - SFX_DEFAULT_VOICE_SHOCKED_1, - SFX_DEFAULT_VOICE_SHOCKED_2, - SFX_DEFAULT_VOICE_SHOCKED_3, - SFX_DEFAULT_VOICE_SHOCKED_4, - SFX_DEFAULT_VOICE_SHOCKED_5, - SFX_DEFAULT_VOICE_SHOCKED_6, - SFX_DEFAULT_VOICE_TAXI_1, - SFX_DEFAULT_VOICE_TAXI_2, - SFX_DEFAULT_VOICE_TAXI_3, - SFX_DEFAULT_VOICE_TAXI_4, - SFX_DEFAULT_VOICE_TAXI_5, - - SFX_CUBAN_GANG_1_BLOCKED_1, - SFX_CUBAN_GANG_1_BLOCKED_2, - SFX_CUBAN_GANG_1_BLOCKED_3, - SFX_CUBAN_GANG_1_BLOCKED_4, - SFX_CUBAN_GANG_1_BLOCKED_5, - SFX_CUBAN_GANG_1_BLOCKED_6, - SFX_CUBAN_GANG_1_BLOCKED_7, - SFX_CUBAN_GANG_1_BLOCKED_8, - SFX_CUBAN_GANG_1_BUMP_1, - SFX_CUBAN_GANG_1_BUMP_2, - SFX_CUBAN_GANG_1_BUMP_3, - SFX_CUBAN_GANG_1_BUMP_4, - SFX_CUBAN_GANG_1_BUMP_5, - SFX_CUBAN_GANG_1_BUMP_6, - SFX_CUBAN_GANG_1_BUMP_7, - SFX_CUBAN_GANG_1_BUMP_8, - SFX_CUBAN_GANG_1_BUMP_9, - SFX_CUBAN_GANG_1_BUMP_10, - SFX_CUBAN_GANG_1_BUMP_11, - SFX_CUBAN_GANG_1_CAR_CRASH_1, - SFX_CUBAN_GANG_1_CAR_CRASH_2, - SFX_CUBAN_GANG_1_CAR_CRASH_3, - SFX_CUBAN_GANG_1_CAR_CRASH_4, - SFX_CUBAN_GANG_1_CAR_CRASH_5, - SFX_CUBAN_GANG_1_CAR_CRASH_6, - SFX_CUBAN_GANG_1_CAR_CRASH_7, - SFX_CUBAN_GANG_1_CAR_CRASH_8, - SFX_CUBAN_GANG_1_CHAT_1, - SFX_CUBAN_GANG_1_CHAT_2, - SFX_CUBAN_GANG_1_CHAT_3, - SFX_CUBAN_GANG_1_CHAT_4, - SFX_CUBAN_GANG_1_CHAT_5, - SFX_CUBAN_GANG_1_CHAT_6, - SFX_CUBAN_GANG_1_CHAT_7, - SFX_CUBAN_GANG_1_CHAT_8, - SFX_CUBAN_GANG_1_CHAT_9, - SFX_CUBAN_GANG_1_CHAT_10, - SFX_CUBAN_GANG_1_DODGE_1, - SFX_CUBAN_GANG_1_DODGE_2, - SFX_CUBAN_GANG_1_DODGE_3, - SFX_CUBAN_GANG_1_DODGE_4, - SFX_CUBAN_GANG_1_DODGE_5, - SFX_CUBAN_GANG_1_DODGE_6, - SFX_CUBAN_GANG_1_DODGE_7, - SFX_CUBAN_GANG_1_DODGE_8, - SFX_CUBAN_GANG_1_DODGE_9, - SFX_CUBAN_GANG_1_EYEING_1, - SFX_CUBAN_GANG_1_EYEING_2, - SFX_CUBAN_GANG_1_FIGHT_1, - SFX_CUBAN_GANG_1_FIGHT_2, - SFX_CUBAN_GANG_1_FIGHT_3, - SFX_CUBAN_GANG_1_FIGHT_4, - SFX_CUBAN_GANG_1_FIGHT_5, - SFX_CUBAN_GANG_1_FIGHT_6, - SFX_CUBAN_GANG_1_FIGHT_7, - SFX_CUBAN_GANG_1_FIGHT_8, - SFX_CUBAN_GANG_1_FIGHT_9, - SFX_CUBAN_GANG_1_GENERIC_CRASH_1, - SFX_CUBAN_GANG_1_GENERIC_CRASH_2, - SFX_CUBAN_GANG_1_GENERIC_CRASH_3, - SFX_CUBAN_GANG_1_GENERIC_CRASH_4, - SFX_CUBAN_GANG_1_GENERIC_CRASH_5, - SFX_CUBAN_GANG_1_GENERIC_CRASH_6, - SFX_CUBAN_GANG_1_GENERIC_CRASH_7, - SFX_CUBAN_GANG_1_GENERIC_CRASH_8, - SFX_CUBAN_GANG_1_GUN_COOL_1, - SFX_CUBAN_GANG_1_GUN_COOL_2, - SFX_CUBAN_GANG_1_GUN_COOL_3, - SFX_CUBAN_GANG_1_GUN_COOL_4, - SFX_CUBAN_GANG_1_GUN_COOL_5, - SFX_CUBAN_GANG_1_JACKED_1, - SFX_CUBAN_GANG_1_JACKED_2, - SFX_CUBAN_GANG_1_JACKED_3, - SFX_CUBAN_GANG_1_JACKED_4, - SFX_CUBAN_GANG_1_JACKING_1, - SFX_CUBAN_GANG_1_JACKING_2, - SFX_CUBAN_GANG_1_JACKING_3, - SFX_CUBAN_GANG_1_JACKING_4, - SFX_CUBAN_GANG_1_JACKING_5, - SFX_CUBAN_GANG_1_LOST_1, - SFX_CUBAN_GANG_1_LOST_2, - SFX_CUBAN_GANG_1_MUGGED_1, - SFX_CUBAN_GANG_1_MUGGED_2, - SFX_CUBAN_GANG_1_SAVED_1, - SFX_CUBAN_GANG_1_TAXI_1, - SFX_CUBAN_GANG_1_TAXI_2, - SFX_CUBAN_GANG_2_BLOCKED_1, - SFX_CUBAN_GANG_2_BLOCKED_2, - SFX_CUBAN_GANG_2_BLOCKED_3, - SFX_CUBAN_GANG_2_BLOCKED_4, - SFX_CUBAN_GANG_2_BLOCKED_5, - SFX_CUBAN_GANG_2_BLOCKED_6, - SFX_CUBAN_GANG_2_BLOCKED_7, - SFX_CUBAN_GANG_2_BLOCKED_8, - SFX_CUBAN_GANG_2_BUMP_1, - SFX_CUBAN_GANG_2_BUMP_2, - SFX_CUBAN_GANG_2_BUMP_3, - SFX_CUBAN_GANG_2_BUMP_4, - SFX_CUBAN_GANG_2_BUMP_5, - SFX_CUBAN_GANG_2_BUMP_6, - SFX_CUBAN_GANG_2_BUMP_7, - SFX_CUBAN_GANG_2_BUMP_8, - SFX_CUBAN_GANG_2_BUMP_9, - SFX_CUBAN_GANG_2_BUMP_10, - SFX_CUBAN_GANG_2_BUMP_11, - SFX_CUBAN_GANG_2_CAR_CRASH_1, - SFX_CUBAN_GANG_2_CAR_CRASH_2, - SFX_CUBAN_GANG_2_CAR_CRASH_3, - SFX_CUBAN_GANG_2_CAR_CRASH_4, - SFX_CUBAN_GANG_2_CAR_CRASH_5, - SFX_CUBAN_GANG_2_CAR_CRASH_6, - SFX_CUBAN_GANG_2_CAR_CRASH_7, - SFX_CUBAN_GANG_2_CAR_CRASH_8, - SFX_CUBAN_GANG_2_CHAT_1, - SFX_CUBAN_GANG_2_CHAT_2, - SFX_CUBAN_GANG_2_CHAT_3, - SFX_CUBAN_GANG_2_CHAT_4, - SFX_CUBAN_GANG_2_CHAT_5, - SFX_CUBAN_GANG_2_CHAT_6, - SFX_CUBAN_GANG_2_CHAT_7, - SFX_CUBAN_GANG_2_CHAT_8, - SFX_CUBAN_GANG_2_CHAT_9, - SFX_CUBAN_GANG_2_CHAT_10, - SFX_CUBAN_GANG_2_DODGE_1, - SFX_CUBAN_GANG_2_DODGE_2, - SFX_CUBAN_GANG_2_DODGE_3, - SFX_CUBAN_GANG_2_DODGE_4, - SFX_CUBAN_GANG_2_DODGE_5, - SFX_CUBAN_GANG_2_DODGE_6, - SFX_CUBAN_GANG_2_DODGE_7, - SFX_CUBAN_GANG_2_DODGE_8, - SFX_CUBAN_GANG_2_DODGE_9, - SFX_CUBAN_GANG_2_EYEING_1, - SFX_CUBAN_GANG_2_EYEING_2, - SFX_CUBAN_GANG_2_FIGHT_1, - SFX_CUBAN_GANG_2_FIGHT_2, - SFX_CUBAN_GANG_2_FIGHT_3, - SFX_CUBAN_GANG_2_FIGHT_4, - SFX_CUBAN_GANG_2_FIGHT_5, - SFX_CUBAN_GANG_2_FIGHT_6, - SFX_CUBAN_GANG_2_FIGHT_7, - SFX_CUBAN_GANG_2_FIGHT_8, - SFX_CUBAN_GANG_2_FIGHT_9, - SFX_CUBAN_GANG_2_GENERIC_CRASH_1, - SFX_CUBAN_GANG_2_GENERIC_CRASH_2, - SFX_CUBAN_GANG_2_GENERIC_CRASH_3, - SFX_CUBAN_GANG_2_GENERIC_CRASH_4, - SFX_CUBAN_GANG_2_GENERIC_CRASH_5, - SFX_CUBAN_GANG_2_GENERIC_CRASH_6, - SFX_CUBAN_GANG_2_GENERIC_CRASH_7, - SFX_CUBAN_GANG_2_GENERIC_CRASH_8, - SFX_CUBAN_GANG_2_GUN_COOL_1, - SFX_CUBAN_GANG_2_GUN_COOL_2, - SFX_CUBAN_GANG_2_GUN_COOL_3, - SFX_CUBAN_GANG_2_GUN_COOL_4, - SFX_CUBAN_GANG_2_GUN_COOL_5, - SFX_CUBAN_GANG_2_JACKED_1, - SFX_CUBAN_GANG_2_JACKED_2, - SFX_CUBAN_GANG_2_JACKED_3, - SFX_CUBAN_GANG_2_JACKED_4, - SFX_CUBAN_GANG_2_JACKING_1, - SFX_CUBAN_GANG_2_JACKING_2, - SFX_CUBAN_GANG_2_JACKING_3, - SFX_CUBAN_GANG_2_JACKING_4, - SFX_CUBAN_GANG_2_JACKING_5, - SFX_CUBAN_GANG_2_LOST_1, - SFX_CUBAN_GANG_2_LOST_2, - SFX_CUBAN_GANG_2_MUGGED_1, - SFX_CUBAN_GANG_2_MUGGED_2, - SFX_CUBAN_GANG_2_SAVED_1, - SFX_CUBAN_GANG_2_TAXI_1, - SFX_CUBAN_GANG_2_TAXI_2, - SFX_CUBAN_GANG_3_BLOCKED_1, - SFX_CUBAN_GANG_3_BLOCKED_2, - SFX_CUBAN_GANG_3_BLOCKED_3, - SFX_CUBAN_GANG_3_BLOCKED_4, - SFX_CUBAN_GANG_3_BLOCKED_5, - SFX_CUBAN_GANG_3_BLOCKED_6, - SFX_CUBAN_GANG_3_BLOCKED_7, - SFX_CUBAN_GANG_3_BLOCKED_8, - SFX_CUBAN_GANG_3_BUMP_1, - SFX_CUBAN_GANG_3_BUMP_2, - SFX_CUBAN_GANG_3_BUMP_3, - SFX_CUBAN_GANG_3_BUMP_4, - SFX_CUBAN_GANG_3_BUMP_5, - SFX_CUBAN_GANG_3_BUMP_6, - SFX_CUBAN_GANG_3_BUMP_7, - SFX_CUBAN_GANG_3_BUMP_8, - SFX_CUBAN_GANG_3_BUMP_9, - SFX_CUBAN_GANG_3_BUMP_10, - SFX_CUBAN_GANG_3_BUMP_11, - SFX_CUBAN_GANG_3_CAR_CRASH_1, - SFX_CUBAN_GANG_3_CAR_CRASH_2, - SFX_CUBAN_GANG_3_CAR_CRASH_3, - SFX_CUBAN_GANG_3_CAR_CRASH_4, - SFX_CUBAN_GANG_3_CAR_CRASH_5, - SFX_CUBAN_GANG_3_CAR_CRASH_6, - SFX_CUBAN_GANG_3_CAR_CRASH_7, - SFX_CUBAN_GANG_3_CAR_CRASH_8, - SFX_CUBAN_GANG_3_CHAT_1, - SFX_CUBAN_GANG_3_CHAT_2, - SFX_CUBAN_GANG_3_CHAT_3, - SFX_CUBAN_GANG_3_CHAT_4, - SFX_CUBAN_GANG_3_CHAT_5, - SFX_CUBAN_GANG_3_CHAT_6, - SFX_CUBAN_GANG_3_CHAT_7, - SFX_CUBAN_GANG_3_CHAT_8, - SFX_CUBAN_GANG_3_CHAT_9, - SFX_CUBAN_GANG_3_CHAT_10, - SFX_CUBAN_GANG_3_DODGE_1, - SFX_CUBAN_GANG_3_DODGE_2, - SFX_CUBAN_GANG_3_DODGE_3, - SFX_CUBAN_GANG_3_DODGE_4, - SFX_CUBAN_GANG_3_DODGE_5, - SFX_CUBAN_GANG_3_DODGE_6, - SFX_CUBAN_GANG_3_DODGE_7, - SFX_CUBAN_GANG_3_DODGE_8, - SFX_CUBAN_GANG_3_DODGE_9, - SFX_CUBAN_GANG_3_EYEING_1, - SFX_CUBAN_GANG_3_EYEING_2, - SFX_CUBAN_GANG_3_FIGHT_1, - SFX_CUBAN_GANG_3_FIGHT_2, - SFX_CUBAN_GANG_3_FIGHT_3, - SFX_CUBAN_GANG_3_FIGHT_4, - SFX_CUBAN_GANG_3_FIGHT_5, - SFX_CUBAN_GANG_3_FIGHT_6, - SFX_CUBAN_GANG_3_FIGHT_7, - SFX_CUBAN_GANG_3_FIGHT_8, - SFX_CUBAN_GANG_3_FIGHT_9, - SFX_CUBAN_GANG_3_GENERIC_CRASH_1, - SFX_CUBAN_GANG_3_GENERIC_CRASH_2, - SFX_CUBAN_GANG_3_GENERIC_CRASH_3, - SFX_CUBAN_GANG_3_GENERIC_CRASH_4, - SFX_CUBAN_GANG_3_GENERIC_CRASH_5, - SFX_CUBAN_GANG_3_GENERIC_CRASH_6, - SFX_CUBAN_GANG_3_GENERIC_CRASH_7, - SFX_CUBAN_GANG_3_GENERIC_CRASH_8, - SFX_CUBAN_GANG_3_GUN_COOL_1, - SFX_CUBAN_GANG_3_GUN_COOL_2, - SFX_CUBAN_GANG_3_GUN_COOL_3, - SFX_CUBAN_GANG_3_GUN_COOL_4, - SFX_CUBAN_GANG_3_GUN_COOL_5, - SFX_CUBAN_GANG_3_JACKED_1, - SFX_CUBAN_GANG_3_JACKED_2, - SFX_CUBAN_GANG_3_JACKED_3, - SFX_CUBAN_GANG_3_JACKED_4, - SFX_CUBAN_GANG_3_JACKING_1, - SFX_CUBAN_GANG_3_JACKING_2, - SFX_CUBAN_GANG_3_JACKING_3, - SFX_CUBAN_GANG_3_JACKING_4, - SFX_CUBAN_GANG_3_JACKING_5, - SFX_CUBAN_GANG_3_LOST_1, - SFX_CUBAN_GANG_3_LOST_2, - SFX_CUBAN_GANG_3_MUGGED_1, - SFX_CUBAN_GANG_3_MUGGED_2, - SFX_CUBAN_GANG_3_SAVED_1, - SFX_CUBAN_GANG_3_TAXI_1, - SFX_CUBAN_GANG_3_TAXI_2, - - SFX_BIKER_GANG_1_BLOCKED_1, - SFX_BIKER_GANG_1_BLOCKED_2, - SFX_BIKER_GANG_1_BLOCKED_3, - SFX_BIKER_GANG_1_BLOCKED_4, - SFX_BIKER_GANG_1_BLOCKED_5, - SFX_BIKER_GANG_1_BLOCKED_6, - SFX_BIKER_GANG_1_BLOCKED_7, - SFX_BIKER_GANG_1_BLOCKED_8, - SFX_BIKER_GANG_1_BLOCKED_9, - SFX_BIKER_GANG_1_BLOCKED_10, - SFX_BIKER_GANG_1_BUMP_1, - SFX_BIKER_GANG_1_BUMP_2, - SFX_BIKER_GANG_1_BUMP_3, - SFX_BIKER_GANG_1_BUMP_4, - SFX_BIKER_GANG_1_BUMP_5, - SFX_BIKER_GANG_1_BUMP_6, - SFX_BIKER_GANG_1_BUMP_7, - SFX_BIKER_GANG_1_BUMP_8, - SFX_BIKER_GANG_1_BUMP_9, - SFX_BIKER_GANG_1_BUMP_10, - SFX_BIKER_GANG_1_CHAT_1, - SFX_BIKER_GANG_1_CHAT_2, - SFX_BIKER_GANG_1_CHAT_3, - SFX_BIKER_GANG_1_CHAT_4, - SFX_BIKER_GANG_1_CHAT_5, - SFX_BIKER_GANG_1_CHAT_6, - SFX_BIKER_GANG_1_CHAT_7, - SFX_BIKER_GANG_1_CHAT_8, - SFX_BIKER_GANG_1_CHAT_9, - SFX_BIKER_GANG_1_CHAT_10, - SFX_BIKER_GANG_1_CHAT_11, - SFX_BIKER_GANG_1_CHAT_12, - SFX_BIKER_GANG_1_DODGE_1, - SFX_BIKER_GANG_1_DODGE_2, - SFX_BIKER_GANG_1_DODGE_3, - SFX_BIKER_GANG_1_DODGE_4, - SFX_BIKER_GANG_1_DODGE_5, - SFX_BIKER_GANG_1_DODGE_6, - SFX_BIKER_GANG_1_DODGE_7, - SFX_BIKER_GANG_1_DODGE_8, - SFX_BIKER_GANG_1_DODGE_9, - SFX_BIKER_GANG_1_FIGHT_1, - SFX_BIKER_GANG_1_FIGHT_2, - SFX_BIKER_GANG_1_FIGHT_3, - SFX_BIKER_GANG_1_FIGHT_4, - SFX_BIKER_GANG_1_FIGHT_5, - SFX_BIKER_GANG_1_FIGHT_6, - SFX_BIKER_GANG_1_FIGHT_7, - SFX_BIKER_GANG_1_FIGHT_8, - SFX_BIKER_GANG_1_FIGHT_9, - SFX_BIKER_GANG_1_GENERIC_CRASH_1, - SFX_BIKER_GANG_1_GENERIC_CRASH_2, - SFX_BIKER_GANG_1_GENERIC_CRASH_3, - SFX_BIKER_GANG_1_GENERIC_CRASH_4, - SFX_BIKER_GANG_1_GENERIC_CRASH_5, - SFX_BIKER_GANG_1_GENERIC_CRASH_6, - SFX_BIKER_GANG_1_GENERIC_CRASH_7, - SFX_BIKER_GANG_1_GENERIC_CRASH_8, - SFX_BIKER_GANG_1_GUN_COOL_1, - SFX_BIKER_GANG_1_GUN_COOL_2, - SFX_BIKER_GANG_1_GUN_COOL_3, - SFX_BIKER_GANG_1_GUN_COOL_4, - SFX_BIKER_GANG_1_GUN_COOL_5, - SFX_BIKER_GANG_1_JACKED_1, - SFX_BIKER_GANG_1_JACKED_2, - SFX_BIKER_GANG_1_JACKED_3, - SFX_BIKER_GANG_1_JACKED_4, - SFX_BIKER_GANG_1_JACKED_5, - SFX_BIKER_GANG_1_JACKED_6, - SFX_BIKER_GANG_1_JACKED_7, - SFX_BIKER_GANG_1_JACKED_8, - SFX_BIKER_GANG_1_JACKING_1, - SFX_BIKER_GANG_1_JACKING_2, - SFX_BIKER_GANG_1_JACKING_3, - SFX_BIKER_GANG_1_JACKING_4, - SFX_BIKER_GANG_1_LOST_1, - SFX_BIKER_GANG_1_LOST_2, - SFX_BIKER_GANG_1_MUGGED_1, - SFX_BIKER_GANG_1_MUGGED_2, - SFX_BIKER_GANG_1_SAVED_1, - SFX_BIKER_GANG_1_TAXI_1, - SFX_BIKER_GANG_1_TAXI_2, - - SFX_BIKER_GANG_2_BLOCKED_1, - SFX_BIKER_GANG_2_BLOCKED_2, - SFX_BIKER_GANG_2_BLOCKED_3, - SFX_BIKER_GANG_2_BLOCKED_4, - SFX_BIKER_GANG_2_BLOCKED_5, - SFX_BIKER_GANG_2_BLOCKED_6, - SFX_BIKER_GANG_2_BLOCKED_7, - SFX_BIKER_GANG_2_BLOCKED_8, - SFX_BIKER_GANG_2_BLOCKED_9, - SFX_BIKER_GANG_2_BLOCKED_10, - SFX_BIKER_GANG_2_BUMP_1, - SFX_BIKER_GANG_2_BUMP_2, - SFX_BIKER_GANG_2_BUMP_3, - SFX_BIKER_GANG_2_BUMP_4, - SFX_BIKER_GANG_2_BUMP_5, - SFX_BIKER_GANG_2_BUMP_6, - SFX_BIKER_GANG_2_BUMP_7, - SFX_BIKER_GANG_2_BUMP_8, - SFX_BIKER_GANG_2_BUMP_9, - SFX_BIKER_GANG_2_BUMP_10, - SFX_BIKER_GANG_2_CHAT_1, - SFX_BIKER_GANG_2_CHAT_2, - SFX_BIKER_GANG_2_CHAT_3, - SFX_BIKER_GANG_2_CHAT_4, - SFX_BIKER_GANG_2_CHAT_5, - SFX_BIKER_GANG_2_CHAT_6, - SFX_BIKER_GANG_2_CHAT_7, - SFX_BIKER_GANG_2_CHAT_8, - SFX_BIKER_GANG_2_CHAT_9, - SFX_BIKER_GANG_2_CHAT_10, - SFX_BIKER_GANG_2_CHAT_11, - SFX_BIKER_GANG_2_CHAT_12, - SFX_BIKER_GANG_2_DODGE_1, - SFX_BIKER_GANG_2_DODGE_2, - SFX_BIKER_GANG_2_DODGE_3, - SFX_BIKER_GANG_2_DODGE_4, - SFX_BIKER_GANG_2_DODGE_5, - SFX_BIKER_GANG_2_DODGE_6, - SFX_BIKER_GANG_2_DODGE_7, - SFX_BIKER_GANG_2_DODGE_8, - SFX_BIKER_GANG_2_DODGE_9, - SFX_BIKER_GANG_2_FIGHT_1, - SFX_BIKER_GANG_2_FIGHT_2, - SFX_BIKER_GANG_2_FIGHT_3, - SFX_BIKER_GANG_2_FIGHT_4, - SFX_BIKER_GANG_2_FIGHT_5, - SFX_BIKER_GANG_2_FIGHT_6, - SFX_BIKER_GANG_2_FIGHT_7, - SFX_BIKER_GANG_2_FIGHT_8, - SFX_BIKER_GANG_2_FIGHT_9, - SFX_BIKER_GANG_2_GENERIC_CRASH_1, - SFX_BIKER_GANG_2_GENERIC_CRASH_2, - SFX_BIKER_GANG_2_GENERIC_CRASH_3, - SFX_BIKER_GANG_2_GENERIC_CRASH_4, - SFX_BIKER_GANG_2_GENERIC_CRASH_5, - SFX_BIKER_GANG_2_GENERIC_CRASH_6, - SFX_BIKER_GANG_2_GENERIC_CRASH_7, - SFX_BIKER_GANG_2_GENERIC_CRASH_8, - SFX_BIKER_GANG_2_GUN_COOL_1, - SFX_BIKER_GANG_2_GUN_COOL_2, - SFX_BIKER_GANG_2_GUN_COOL_3, - SFX_BIKER_GANG_2_GUN_COOL_4, - SFX_BIKER_GANG_2_GUN_COOL_5, - SFX_BIKER_GANG_2_JACKED_1, - SFX_BIKER_GANG_2_JACKED_2, - SFX_BIKER_GANG_2_JACKED_3, - SFX_BIKER_GANG_2_JACKED_4, - SFX_BIKER_GANG_2_JACKED_5, - SFX_BIKER_GANG_2_JACKED_6, - SFX_BIKER_GANG_2_JACKED_7, - SFX_BIKER_GANG_2_JACKED_8, - SFX_BIKER_GANG_2_JACKING_1, - SFX_BIKER_GANG_2_JACKING_2, - SFX_BIKER_GANG_2_JACKING_3, - SFX_BIKER_GANG_2_JACKING_4, - SFX_BIKER_GANG_2_LOST_1, - SFX_BIKER_GANG_2_LOST_2, - SFX_BIKER_GANG_2_MUGGED_1, - SFX_BIKER_GANG_2_MUGGED_2, - SFX_BIKER_GANG_2_SAVED_1, - SFX_BIKER_GANG_2_TAXI_1, - SFX_BIKER_GANG_2_TAXI_2, - - SFX_BIKER_GANG_3_BLOCKED_1, - SFX_BIKER_GANG_3_BLOCKED_2, - SFX_BIKER_GANG_3_BLOCKED_3, - SFX_BIKER_GANG_3_BLOCKED_4, - SFX_BIKER_GANG_3_BLOCKED_5, - SFX_BIKER_GANG_3_BLOCKED_6, - SFX_BIKER_GANG_3_BLOCKED_7, - SFX_BIKER_GANG_3_BLOCKED_8, - SFX_BIKER_GANG_3_BLOCKED_9, - SFX_BIKER_GANG_3_BLOCKED_10, - SFX_BIKER_GANG_3_BUMP_1, - SFX_BIKER_GANG_3_BUMP_2, - SFX_BIKER_GANG_3_BUMP_3, - SFX_BIKER_GANG_3_BUMP_4, - SFX_BIKER_GANG_3_BUMP_5, - SFX_BIKER_GANG_3_BUMP_6, - SFX_BIKER_GANG_3_BUMP_7, - SFX_BIKER_GANG_3_BUMP_8, - SFX_BIKER_GANG_3_BUMP_9, - SFX_BIKER_GANG_3_BUMP_10, - SFX_BIKER_GANG_3_CHAT_1, - SFX_BIKER_GANG_3_CHAT_2, - SFX_BIKER_GANG_3_CHAT_3, - SFX_BIKER_GANG_3_CHAT_4, - SFX_BIKER_GANG_3_CHAT_5, - SFX_BIKER_GANG_3_CHAT_6, - SFX_BIKER_GANG_3_CHAT_7, - SFX_BIKER_GANG_3_CHAT_8, - SFX_BIKER_GANG_3_CHAT_9, - SFX_BIKER_GANG_3_CHAT_10, - SFX_BIKER_GANG_3_CHAT_11, - SFX_BIKER_GANG_3_CHAT_12, - SFX_BIKER_GANG_3_DODGE_1, - SFX_BIKER_GANG_3_DODGE_2, - SFX_BIKER_GANG_3_DODGE_3, - SFX_BIKER_GANG_3_DODGE_4, - SFX_BIKER_GANG_3_DODGE_5, - SFX_BIKER_GANG_3_DODGE_6, - SFX_BIKER_GANG_3_DODGE_7, - SFX_BIKER_GANG_3_DODGE_8, - SFX_BIKER_GANG_3_DODGE_9, - SFX_BIKER_GANG_3_FIGHT_1, - SFX_BIKER_GANG_3_FIGHT_2, - SFX_BIKER_GANG_3_FIGHT_3, - SFX_BIKER_GANG_3_FIGHT_4, - SFX_BIKER_GANG_3_FIGHT_5, - SFX_BIKER_GANG_3_FIGHT_6, - SFX_BIKER_GANG_3_FIGHT_7, - SFX_BIKER_GANG_3_FIGHT_8, - SFX_BIKER_GANG_3_FIGHT_9, - SFX_BIKER_GANG_3_GENERIC_CRASH_1, - SFX_BIKER_GANG_3_GENERIC_CRASH_2, - SFX_BIKER_GANG_3_GENERIC_CRASH_3, - SFX_BIKER_GANG_3_GENERIC_CRASH_4, - SFX_BIKER_GANG_3_GENERIC_CRASH_5, - SFX_BIKER_GANG_3_GENERIC_CRASH_6, - SFX_BIKER_GANG_3_GENERIC_CRASH_7, - SFX_BIKER_GANG_3_GENERIC_CRASH_8, - SFX_BIKER_GANG_3_GUN_COOL_1, - SFX_BIKER_GANG_3_GUN_COOL_2, - SFX_BIKER_GANG_3_GUN_COOL_3, - SFX_BIKER_GANG_3_GUN_COOL_4, - SFX_BIKER_GANG_3_GUN_COOL_5, - SFX_BIKER_GANG_3_JACKED_1, - SFX_BIKER_GANG_3_JACKED_2, - SFX_BIKER_GANG_3_JACKED_3, - SFX_BIKER_GANG_3_JACKED_4, - SFX_BIKER_GANG_3_JACKED_5, - SFX_BIKER_GANG_3_JACKED_6, - SFX_BIKER_GANG_3_JACKED_7, - SFX_BIKER_GANG_3_JACKED_8, - SFX_BIKER_GANG_3_JACKING_1, - SFX_BIKER_GANG_3_JACKING_2, - SFX_BIKER_GANG_3_JACKING_3, - SFX_BIKER_GANG_3_JACKING_4, - SFX_BIKER_GANG_3_LOST_1, - SFX_BIKER_GANG_3_LOST_2, - SFX_BIKER_GANG_3_MUGGED_1, - SFX_BIKER_GANG_3_MUGGED_2, - SFX_BIKER_GANG_3_SAVED_1, - SFX_BIKER_GANG_3_TAXI_1, - SFX_BIKER_GANG_3_TAXI_2, - - SFX_HAITIAN_GANG_1_BLOCKED_1, - SFX_HAITIAN_GANG_1_BLOCKED_2, - SFX_HAITIAN_GANG_1_BLOCKED_3, - SFX_HAITIAN_GANG_1_BLOCKED_4, - SFX_HAITIAN_GANG_1_BLOCKED_5, - SFX_HAITIAN_GANG_1_BLOCKED_6, - SFX_HAITIAN_GANG_1_BLOCKED_7, - SFX_HAITIAN_GANG_1_BLOCKED_8, - SFX_HAITIAN_GANG_1_BLOCKED_9, - SFX_HAITIAN_GANG_1_BUMP_1, - SFX_HAITIAN_GANG_1_BUMP_2, - SFX_HAITIAN_GANG_1_BUMP_3, - SFX_HAITIAN_GANG_1_BUMP_4, - SFX_HAITIAN_GANG_1_BUMP_5, - SFX_HAITIAN_GANG_1_BUMP_6, - SFX_HAITIAN_GANG_1_BUMP_7, - SFX_HAITIAN_GANG_1_BUMP_8, - SFX_HAITIAN_GANG_1_BUMP_9, - SFX_HAITIAN_GANG_1_BUMP_10, - SFX_HAITIAN_GANG_1_BUMP_11, - SFX_HAITIAN_GANG_1_BUMP_12, - SFX_HAITIAN_GANG_1_CAR_CRASH_1, - SFX_HAITIAN_GANG_1_CAR_CRASH_2, - SFX_HAITIAN_GANG_1_CAR_CRASH_3, - SFX_HAITIAN_GANG_1_CAR_CRASH_4, - SFX_HAITIAN_GANG_1_CAR_CRASH_5, - SFX_HAITIAN_GANG_1_CAR_CRASH_6, - SFX_HAITIAN_GANG_1_CAR_CRASH_7, - SFX_HAITIAN_GANG_1_CAR_CRASH_8, - SFX_HAITIAN_GANG_1_CAR_CRASH_9, - SFX_HAITIAN_GANG_1_CHAT_1, - SFX_HAITIAN_GANG_1_CHAT_2, - SFX_HAITIAN_GANG_1_CHAT_3, - SFX_HAITIAN_GANG_1_CHAT_4, - SFX_HAITIAN_GANG_1_CHAT_5, - SFX_HAITIAN_GANG_1_CHAT_6, - SFX_HAITIAN_GANG_1_CHAT_7, - SFX_HAITIAN_GANG_1_CHAT_8, - SFX_HAITIAN_GANG_1_CHAT_9, - SFX_HAITIAN_GANG_1_CHAT_10, - SFX_HAITIAN_GANG_1_CHAT_11, - SFX_HAITIAN_GANG_1_CHAT_12, - SFX_HAITIAN_GANG_1_CHAT_13, - SFX_HAITIAN_GANG_1_CHAT_14, - SFX_HAITIAN_GANG_1_DODGE_1, - SFX_HAITIAN_GANG_1_DODGE_2, - SFX_HAITIAN_GANG_1_DODGE_3, - SFX_HAITIAN_GANG_1_DODGE_4, - SFX_HAITIAN_GANG_1_DODGE_5, - SFX_HAITIAN_GANG_1_DODGE_6, - SFX_HAITIAN_GANG_1_DODGE_7, - SFX_HAITIAN_GANG_1_DODGE_8, - SFX_HAITIAN_GANG_1_DODGE_9, - SFX_HAITIAN_GANG_1_DODGE_10, - SFX_HAITIAN_GANG_1_EYEING_1, - SFX_HAITIAN_GANG_1_EYEING_2, - SFX_HAITIAN_GANG_1_FIGHT_1, - SFX_HAITIAN_GANG_1_FIGHT_2, - SFX_HAITIAN_GANG_1_FIGHT_3, - SFX_HAITIAN_GANG_1_FIGHT_4, - SFX_HAITIAN_GANG_1_FIGHT_5, - SFX_HAITIAN_GANG_1_FIGHT_6, - SFX_HAITIAN_GANG_1_FIGHT_7, - SFX_HAITIAN_GANG_1_FIGHT_8, - SFX_HAITIAN_GANG_1_FIGHT_9, - SFX_HAITIAN_GANG_1_FIGHT_10, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_1, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_2, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_3, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_4, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_5, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_6, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_7, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_8, - SFX_HAITIAN_GANG_1_GENERIC_CRASH_9, - SFX_HAITIAN_GANG_1_GUN_COOL_1, - SFX_HAITIAN_GANG_1_GUN_COOL_2, - SFX_HAITIAN_GANG_1_GUN_COOL_3, - SFX_HAITIAN_GANG_1_GUN_COOL_4, - SFX_HAITIAN_GANG_1_GUN_COOL_5, - SFX_HAITIAN_GANG_1_JACKED_1, - SFX_HAITIAN_GANG_1_JACKED_2, - SFX_HAITIAN_GANG_1_JACKED_3, - SFX_HAITIAN_GANG_1_JACKED_4, - SFX_HAITIAN_GANG_1_JACKED_5, - SFX_HAITIAN_GANG_1_JACKED_6, - SFX_HAITIAN_GANG_1_JACKING_1, - SFX_HAITIAN_GANG_1_JACKING_2, - SFX_HAITIAN_GANG_1_JACKING_3, - SFX_HAITIAN_GANG_1_JACKING_4, - SFX_HAITIAN_GANG_1_LOST_1, - SFX_HAITIAN_GANG_1_LOST_2, - SFX_HAITIAN_GANG_1_LOST_3, - SFX_HAITIAN_GANG_1_LOST_4, - SFX_HAITIAN_GANG_1_MUGGED_1, - SFX_HAITIAN_GANG_1_MUGGED_2, - SFX_HAITIAN_GANG_1_MUGGED_3, - SFX_HAITIAN_GANG_1_SAVED_1, - SFX_HAITIAN_GANG_1_TAXI_1, - - - SFX_HAITIAN_GANG_2_BLOCKED_1, - SFX_HAITIAN_GANG_2_BLOCKED_2, - SFX_HAITIAN_GANG_2_BLOCKED_3, - SFX_HAITIAN_GANG_2_BLOCKED_4, - SFX_HAITIAN_GANG_2_BLOCKED_5, - SFX_HAITIAN_GANG_2_BLOCKED_6, - SFX_HAITIAN_GANG_2_BLOCKED_7, - SFX_HAITIAN_GANG_2_BLOCKED_8, - SFX_HAITIAN_GANG_2_BLOCKED_9, - SFX_HAITIAN_GANG_2_BUMP_1, - SFX_HAITIAN_GANG_2_BUMP_2, - SFX_HAITIAN_GANG_2_BUMP_3, - SFX_HAITIAN_GANG_2_BUMP_4, - SFX_HAITIAN_GANG_2_BUMP_5, - SFX_HAITIAN_GANG_2_BUMP_6, - SFX_HAITIAN_GANG_2_BUMP_7, - SFX_HAITIAN_GANG_2_BUMP_8, - SFX_HAITIAN_GANG_2_BUMP_9, - SFX_HAITIAN_GANG_2_BUMP_10, - SFX_HAITIAN_GANG_2_BUMP_11, - SFX_HAITIAN_GANG_2_BUMP_12, - SFX_HAITIAN_GANG_2_CAR_CRASH_1, - SFX_HAITIAN_GANG_2_CAR_CRASH_2, - SFX_HAITIAN_GANG_2_CAR_CRASH_3, - SFX_HAITIAN_GANG_2_CAR_CRASH_4, - SFX_HAITIAN_GANG_2_CAR_CRASH_5, - SFX_HAITIAN_GANG_2_CAR_CRASH_6, - SFX_HAITIAN_GANG_2_CAR_CRASH_7, - SFX_HAITIAN_GANG_2_CAR_CRASH_8, - SFX_HAITIAN_GANG_2_CAR_CRASH_9, - SFX_HAITIAN_GANG_2_CHAT_1, - SFX_HAITIAN_GANG_2_CHAT_2, - SFX_HAITIAN_GANG_2_CHAT_3, - SFX_HAITIAN_GANG_2_CHAT_4, - SFX_HAITIAN_GANG_2_CHAT_5, - SFX_HAITIAN_GANG_2_CHAT_6, - SFX_HAITIAN_GANG_2_CHAT_7, - SFX_HAITIAN_GANG_2_CHAT_8, - SFX_HAITIAN_GANG_2_CHAT_9, - SFX_HAITIAN_GANG_2_CHAT_10, - SFX_HAITIAN_GANG_2_CHAT_11, - SFX_HAITIAN_GANG_2_CHAT_12, - SFX_HAITIAN_GANG_2_CHAT_13, - SFX_HAITIAN_GANG_2_CHAT_14, - SFX_HAITIAN_GANG_2_DODGE_1, - SFX_HAITIAN_GANG_2_DODGE_2, - SFX_HAITIAN_GANG_2_DODGE_3, - SFX_HAITIAN_GANG_2_DODGE_4, - SFX_HAITIAN_GANG_2_DODGE_5, - SFX_HAITIAN_GANG_2_DODGE_6, - SFX_HAITIAN_GANG_2_DODGE_7, - SFX_HAITIAN_GANG_2_DODGE_8, - SFX_HAITIAN_GANG_2_DODGE_9, - SFX_HAITIAN_GANG_2_DODGE_10, - SFX_HAITIAN_GANG_2_EYEING_1, - SFX_HAITIAN_GANG_2_EYEING_2, - SFX_HAITIAN_GANG_2_FIGHT_1, - SFX_HAITIAN_GANG_2_FIGHT_2, - SFX_HAITIAN_GANG_2_FIGHT_3, - SFX_HAITIAN_GANG_2_FIGHT_4, - SFX_HAITIAN_GANG_2_FIGHT_5, - SFX_HAITIAN_GANG_2_FIGHT_6, - SFX_HAITIAN_GANG_2_FIGHT_7, - SFX_HAITIAN_GANG_2_FIGHT_8, - SFX_HAITIAN_GANG_2_FIGHT_9, - SFX_HAITIAN_GANG_2_FIGHT_10, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_1, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_2, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_3, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_4, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_5, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_6, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_7, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_8, - SFX_HAITIAN_GANG_2_GENERIC_CRASH_9, - SFX_HAITIAN_GANG_2_GUN_COOL_1, - SFX_HAITIAN_GANG_2_GUN_COOL_2, - SFX_HAITIAN_GANG_2_GUN_COOL_3, - SFX_HAITIAN_GANG_2_GUN_COOL_4, - SFX_HAITIAN_GANG_2_GUN_COOL_5, - SFX_HAITIAN_GANG_2_JACKED_1, - SFX_HAITIAN_GANG_2_JACKED_2, - SFX_HAITIAN_GANG_2_JACKED_3, - SFX_HAITIAN_GANG_2_JACKED_4, - SFX_HAITIAN_GANG_2_JACKED_5, - SFX_HAITIAN_GANG_2_JACKED_6, - SFX_HAITIAN_GANG_2_JACKING_1, - SFX_HAITIAN_GANG_2_JACKING_2, - SFX_HAITIAN_GANG_2_JACKING_3, - SFX_HAITIAN_GANG_2_JACKING_4, - SFX_HAITIAN_GANG_2_LOST_1, - SFX_HAITIAN_GANG_2_LOST_2, - SFX_HAITIAN_GANG_2_LOST_3, - SFX_HAITIAN_GANG_2_LOST_4, - SFX_HAITIAN_GANG_2_MUGGED_1, - SFX_HAITIAN_GANG_2_MUGGED_2, - SFX_HAITIAN_GANG_2_MUGGED_3, - SFX_HAITIAN_GANG_2_SAVED_1, - SFX_HAITIAN_GANG_2_TAXI_1, - - SFX_HAITIAN_GANG_3_BLOCKED_1, - SFX_HAITIAN_GANG_3_BLOCKED_2, - SFX_HAITIAN_GANG_3_BLOCKED_3, - SFX_HAITIAN_GANG_3_BLOCKED_4, - SFX_HAITIAN_GANG_3_BLOCKED_5, - SFX_HAITIAN_GANG_3_BLOCKED_6, - SFX_HAITIAN_GANG_3_BLOCKED_7, - SFX_HAITIAN_GANG_3_BLOCKED_8, - SFX_HAITIAN_GANG_3_BLOCKED_9, - SFX_HAITIAN_GANG_3_BUMP_1, - SFX_HAITIAN_GANG_3_BUMP_2, - SFX_HAITIAN_GANG_3_BUMP_3, - SFX_HAITIAN_GANG_3_BUMP_4, - SFX_HAITIAN_GANG_3_BUMP_5, - SFX_HAITIAN_GANG_3_BUMP_6, - SFX_HAITIAN_GANG_3_BUMP_7, - SFX_HAITIAN_GANG_3_BUMP_8, - SFX_HAITIAN_GANG_3_BUMP_9, - SFX_HAITIAN_GANG_3_BUMP_10, - SFX_HAITIAN_GANG_3_BUMP_11, - SFX_HAITIAN_GANG_3_BUMP_12, - SFX_HAITIAN_GANG_3_CAR_CRASH_1, - SFX_HAITIAN_GANG_3_CAR_CRASH_2, - SFX_HAITIAN_GANG_3_CAR_CRASH_3, - SFX_HAITIAN_GANG_3_CAR_CRASH_4, - SFX_HAITIAN_GANG_3_CAR_CRASH_5, - SFX_HAITIAN_GANG_3_CAR_CRASH_6, - SFX_HAITIAN_GANG_3_CAR_CRASH_7, - SFX_HAITIAN_GANG_3_CAR_CRASH_8, - SFX_HAITIAN_GANG_3_CAR_CRASH_9, - SFX_HAITIAN_GANG_3_CHAT_1, - SFX_HAITIAN_GANG_3_CHAT_2, - SFX_HAITIAN_GANG_3_CHAT_3, - SFX_HAITIAN_GANG_3_CHAT_4, - SFX_HAITIAN_GANG_3_CHAT_5, - SFX_HAITIAN_GANG_3_CHAT_6, - SFX_HAITIAN_GANG_3_CHAT_7, - SFX_HAITIAN_GANG_3_CHAT_8, - SFX_HAITIAN_GANG_3_CHAT_9, - SFX_HAITIAN_GANG_3_CHAT_10, - SFX_HAITIAN_GANG_3_CHAT_11, - SFX_HAITIAN_GANG_3_CHAT_12, - SFX_HAITIAN_GANG_3_CHAT_13, - SFX_HAITIAN_GANG_3_CHAT_14, - SFX_HAITIAN_GANG_3_DODGE_1, - SFX_HAITIAN_GANG_3_DODGE_2, - SFX_HAITIAN_GANG_3_DODGE_3, - SFX_HAITIAN_GANG_3_DODGE_4, - SFX_HAITIAN_GANG_3_DODGE_5, - SFX_HAITIAN_GANG_3_DODGE_6, - SFX_HAITIAN_GANG_3_DODGE_7, - SFX_HAITIAN_GANG_3_DODGE_8, - SFX_HAITIAN_GANG_3_DODGE_9, - SFX_HAITIAN_GANG_3_DODGE_10, - SFX_HAITIAN_GANG_3_EYEING_1, - SFX_HAITIAN_GANG_3_EYEING_2, - SFX_HAITIAN_GANG_3_FIGHT_1, - SFX_HAITIAN_GANG_3_FIGHT_2, - SFX_HAITIAN_GANG_3_FIGHT_3, - SFX_HAITIAN_GANG_3_FIGHT_4, - SFX_HAITIAN_GANG_3_FIGHT_5, - SFX_HAITIAN_GANG_3_FIGHT_6, - SFX_HAITIAN_GANG_3_FIGHT_7, - SFX_HAITIAN_GANG_3_FIGHT_8, - SFX_HAITIAN_GANG_3_FIGHT_9, - SFX_HAITIAN_GANG_3_FIGHT_10, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_1, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_2, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_3, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_4, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_5, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_6, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_7, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_8, - SFX_HAITIAN_GANG_3_GENERIC_CRASH_9, - SFX_HAITIAN_GANG_3_GUN_COOL_1, - SFX_HAITIAN_GANG_3_GUN_COOL_2, - SFX_HAITIAN_GANG_3_GUN_COOL_3, - SFX_HAITIAN_GANG_3_GUN_COOL_4, - SFX_HAITIAN_GANG_3_GUN_COOL_5, - SFX_HAITIAN_GANG_3_JACKED_1, - SFX_HAITIAN_GANG_3_JACKED_2, - SFX_HAITIAN_GANG_3_JACKED_3, - SFX_HAITIAN_GANG_3_JACKED_4, - SFX_HAITIAN_GANG_3_JACKED_5, - SFX_HAITIAN_GANG_3_JACKED_6, - SFX_HAITIAN_GANG_3_JACKING_1, - SFX_HAITIAN_GANG_3_JACKING_2, - SFX_HAITIAN_GANG_3_JACKING_3, - SFX_HAITIAN_GANG_3_JACKING_4, - SFX_HAITIAN_GANG_3_LOST_1, - SFX_HAITIAN_GANG_3_LOST_2, - SFX_HAITIAN_GANG_3_LOST_3, - SFX_HAITIAN_GANG_3_LOST_4, - SFX_HAITIAN_GANG_3_MUGGED_1, - SFX_HAITIAN_GANG_3_MUGGED_2, - SFX_HAITIAN_GANG_3_MUGGED_3, - SFX_HAITIAN_GANG_3_SAVED_1, - SFX_HAITIAN_GANG_3_TAXI_1, - - SFX_GENERIC_FEMALE_FIRE_1, - SFX_GENERIC_FEMALE_FIRE_2, - SFX_GENERIC_FEMALE_FIRE_3, - SFX_GENERIC_FEMALE_FIRE_4, - SFX_GENERIC_FEMALE_FIRE_5, - SFX_GENERIC_FEMALE_FIRE_6, - SFX_GENERIC_FEMALE_FIRE_7, - SFX_GENERIC_FEMALE_FIRE_8, - SFX_GENERIC_FEMALE_FIRE_9, - SFX_GENERIC_FEMALE_FIRE_10, - SFX_GENERIC_FEMALE_FIRE_11, - SFX_GENERIC_FEMALE_FIRE_12, - SFX_GENERIC_FEMALE_FIRE_13, - SFX_GENERIC_FEMALE_FIRE_14, - SFX_GENERIC_FEMALE_FIRE_15, - SFX_GENERIC_FEMALE_FIRE_16, - SFX_GENERIC_FEMALE_FIRE_17, - SFX_GENERIC_FEMALE_DEATH_1, - SFX_GENERIC_FEMALE_DEATH_2, - SFX_GENERIC_FEMALE_DEATH_3, - SFX_GENERIC_FEMALE_DEATH_4, - SFX_GENERIC_FEMALE_DEATH_5, - SFX_GENERIC_FEMALE_DEATH_6, - SFX_GENERIC_FEMALE_DEATH_7, - SFX_GENERIC_FEMALE_DEATH_8, - SFX_GENERIC_FEMALE_DEATH_9, - SFX_GENERIC_FEMALE_DEATH_10, - SFX_GENERIC_FEMALE_DEATH_11, - SFX_GENERIC_FEMALE_DEATH_12, - SFX_GENERIC_FEMALE_DEATH_13, - SFX_GENERIC_FEMALE_DEATH_14, - SFX_GENERIC_FEMALE_DEATH_15, - SFX_GENERIC_FEMALE_DEATH_16, - SFX_GENERIC_FEMALE_DEATH_17, - SFX_GENERIC_FEMALE_DEATH_18, - SFX_GENERIC_FEMALE_DEATH_19, - SFX_GENERIC_FEMALE_DEATH_20, - SFX_GENERIC_FEMALE_DEATH_21, - SFX_GENERIC_FEMALE_DEATH_22, - SFX_GENERIC_FEMALE_GRUNT_1, - SFX_GENERIC_FEMALE_GRUNT_2, - SFX_GENERIC_FEMALE_GRUNT_3, - SFX_GENERIC_FEMALE_GRUNT_4, - SFX_GENERIC_FEMALE_GRUNT_5, - SFX_GENERIC_FEMALE_GRUNT_6, - SFX_GENERIC_FEMALE_GRUNT_7, - SFX_GENERIC_FEMALE_GRUNT_8, - SFX_GENERIC_FEMALE_GRUNT_9, - SFX_GENERIC_FEMALE_GRUNT_10, - SFX_GENERIC_FEMALE_GRUNT_11, - SFX_GENERIC_FEMALE_GRUNT_12, - SFX_GENERIC_FEMALE_GRUNT_13, - SFX_GENERIC_FEMALE_GRUNT_14, - SFX_GENERIC_FEMALE_GRUNT_15, - SFX_GENERIC_FEMALE_GRUNT_16, - SFX_GENERIC_FEMALE_GRUNT_17, - SFX_GENERIC_FEMALE_GRUNT_18, - SFX_GENERIC_FEMALE_GRUNT_19, - SFX_GENERIC_FEMALE_GRUNT_20, - SFX_GENERIC_FEMALE_GRUNT_21, - SFX_GENERIC_FEMALE_GRUNT_22, - SFX_GENERIC_FEMALE_GRUNT_23, - SFX_GENERIC_FEMALE_GRUNT_24, - SFX_GENERIC_FEMALE_GRUNT_25, - SFX_GENERIC_FEMALE_GRUNT_26, - SFX_GENERIC_FEMALE_GRUNT_27, - SFX_GENERIC_FEMALE_GRUNT_28, - SFX_GENERIC_FEMALE_GRUNT_29, - SFX_GENERIC_FEMALE_GRUNT_30, - SFX_GENERIC_FEMALE_GRUNT_31, - SFX_GENERIC_FEMALE_GRUNT_32, - SFX_GENERIC_FEMALE_GRUNT_33, - SFX_GENERIC_FEMALE_PANIC_1, - SFX_GENERIC_FEMALE_PANIC_2, - SFX_GENERIC_FEMALE_PANIC_3, - SFX_GENERIC_FEMALE_PANIC_4, - SFX_GENERIC_FEMALE_PANIC_5, - SFX_GENERIC_FEMALE_PANIC_6, - SFX_GENERIC_FEMALE_PANIC_7, - SFX_GENERIC_FEMALE_PANIC_8, - SFX_GENERIC_FEMALE_PANIC_9, - SFX_GENERIC_FEMALE_PANIC_10, - SFX_GENERIC_FEMALE_PANIC_11, - SFX_GENERIC_FEMALE_PANIC_12, - SFX_GENERIC_FEMALE_PANIC_13, - SFX_GENERIC_FEMALE_PANIC_14, - SFX_GENERIC_FEMALE_PANIC_15, - SFX_GENERIC_FEMALE_PANIC_16, - SFX_GENERIC_FEMALE_PANIC_17, - SFX_GENERIC_FEMALE_PANIC_18, - SFX_GENERIC_FEMALE_PANIC_19, - SFX_GENERIC_FEMALE_PANIC_20, - SFX_GENERIC_FEMALE_PANIC_21, - SFX_GENERIC_FEMALE_PANIC_22, - SFX_GENERIC_FEMALE_PANIC_23, - SFX_GENERIC_FEMALE_PANIC_24, - SFX_GENERIC_FEMALE_PANIC_25, - SFX_GENERIC_FEMALE_PANIC_26, - SFX_GENERIC_FEMALE_PANIC_27, - - SFX_GENERIC_MALE_FIRE_1, - SFX_GENERIC_MALE_FIRE_2, - SFX_GENERIC_MALE_FIRE_3, - SFX_GENERIC_MALE_FIRE_4, - SFX_GENERIC_MALE_FIRE_5, - SFX_GENERIC_MALE_FIRE_6, - SFX_GENERIC_MALE_FIRE_7, - SFX_GENERIC_MALE_FIRE_8, - SFX_GENERIC_MALE_FIRE_9, - SFX_GENERIC_MALE_FIRE_10, - SFX_GENERIC_MALE_FIRE_11, - SFX_GENERIC_MALE_FIRE_12, - SFX_GENERIC_MALE_FIRE_13, - SFX_GENERIC_MALE_FIRE_14, - SFX_GENERIC_MALE_FIRE_15, - SFX_GENERIC_MALE_FIRE_16, - SFX_GENERIC_MALE_FIRE_17, - SFX_GENERIC_MALE_FIRE_18, - SFX_GENERIC_MALE_FIRE_19, - SFX_GENERIC_MALE_FIRE_20, - SFX_GENERIC_MALE_FIRE_21, - SFX_GENERIC_MALE_FIRE_22, - SFX_GENERIC_MALE_FIRE_23, - SFX_GENERIC_MALE_FIRE_24, - SFX_GENERIC_MALE_FIRE_25, - SFX_GENERIC_MALE_FIRE_26, - SFX_GENERIC_MALE_FIRE_27, - SFX_GENERIC_MALE_FIRE_28, - SFX_GENERIC_MALE_FIRE_29, - SFX_GENERIC_MALE_FIRE_30, - SFX_GENERIC_MALE_FIRE_31, - SFX_GENERIC_MALE_FIRE_32, - SFX_GENERIC_MALE_DEATH_1, - SFX_GENERIC_MALE_DEATH_2, - SFX_GENERIC_MALE_DEATH_3, - SFX_GENERIC_MALE_DEATH_4, - SFX_GENERIC_MALE_DEATH_5, - SFX_GENERIC_MALE_DEATH_6, - SFX_GENERIC_MALE_DEATH_7, - SFX_GENERIC_MALE_DEATH_8, - SFX_GENERIC_MALE_DEATH_9, - SFX_GENERIC_MALE_DEATH_10, - SFX_GENERIC_MALE_DEATH_11, - SFX_GENERIC_MALE_DEATH_12, - SFX_GENERIC_MALE_DEATH_13, - SFX_GENERIC_MALE_DEATH_14, - SFX_GENERIC_MALE_DEATH_15, - SFX_GENERIC_MALE_DEATH_16, - SFX_GENERIC_MALE_DEATH_17, - SFX_GENERIC_MALE_DEATH_18, - SFX_GENERIC_MALE_DEATH_19, - SFX_GENERIC_MALE_DEATH_20, - SFX_GENERIC_MALE_DEATH_21, - SFX_GENERIC_MALE_DEATH_22, - SFX_GENERIC_MALE_DEATH_23, - SFX_GENERIC_MALE_DEATH_24, - SFX_GENERIC_MALE_DEATH_25, - SFX_GENERIC_MALE_DEATH_26, - SFX_GENERIC_MALE_DEATH_27, - SFX_GENERIC_MALE_DEATH_28, - SFX_GENERIC_MALE_DEATH_29, - SFX_GENERIC_MALE_DEATH_30, - SFX_GENERIC_MALE_DEATH_31, - SFX_GENERIC_MALE_DEATH_32, - SFX_GENERIC_MALE_DEATH_33, - SFX_GENERIC_MALE_DEATH_34, - SFX_GENERIC_MALE_DEATH_35, - SFX_GENERIC_MALE_DEATH_36, - SFX_GENERIC_MALE_DEATH_37, - SFX_GENERIC_MALE_DEATH_38, - SFX_GENERIC_MALE_DEATH_39, - SFX_GENERIC_MALE_DEATH_40, - SFX_GENERIC_MALE_DEATH_41, - SFX_GENERIC_MALE_GRUNT_1, - SFX_GENERIC_MALE_GRUNT_2, - SFX_GENERIC_MALE_GRUNT_3, - SFX_GENERIC_MALE_GRUNT_4, - SFX_GENERIC_MALE_GRUNT_5, - SFX_GENERIC_MALE_GRUNT_6, - SFX_GENERIC_MALE_GRUNT_7, - SFX_GENERIC_MALE_GRUNT_8, - SFX_GENERIC_MALE_GRUNT_9, - SFX_GENERIC_MALE_GRUNT_10, - SFX_GENERIC_MALE_GRUNT_11, - SFX_GENERIC_MALE_GRUNT_12, - SFX_GENERIC_MALE_GRUNT_13, - SFX_GENERIC_MALE_GRUNT_14, - SFX_GENERIC_MALE_GRUNT_15, - SFX_GENERIC_MALE_GRUNT_16, - SFX_GENERIC_MALE_GRUNT_17, - SFX_GENERIC_MALE_GRUNT_18, - SFX_GENERIC_MALE_GRUNT_19, - SFX_GENERIC_MALE_GRUNT_20, - SFX_GENERIC_MALE_GRUNT_21, - SFX_GENERIC_MALE_GRUNT_22, - SFX_GENERIC_MALE_GRUNT_23, - SFX_GENERIC_MALE_GRUNT_24, - SFX_GENERIC_MALE_GRUNT_25, - SFX_GENERIC_MALE_GRUNT_26, - SFX_GENERIC_MALE_GRUNT_27, - SFX_GENERIC_MALE_GRUNT_28, - SFX_GENERIC_MALE_GRUNT_29, - SFX_GENERIC_MALE_GRUNT_30, - SFX_GENERIC_MALE_GRUNT_31, - SFX_GENERIC_MALE_GRUNT_32, - SFX_GENERIC_MALE_GRUNT_33, - SFX_GENERIC_MALE_GRUNT_34, - SFX_GENERIC_MALE_GRUNT_35, - SFX_GENERIC_MALE_GRUNT_36, - SFX_GENERIC_MALE_GRUNT_37, - SFX_GENERIC_MALE_GRUNT_38, - SFX_GENERIC_MALE_GRUNT_39, - SFX_GENERIC_MALE_GRUNT_40, - SFX_GENERIC_MALE_GRUNT_41, - SFX_GENERIC_MALE_PANIC_1, - SFX_GENERIC_MALE_PANIC_2, - SFX_GENERIC_MALE_PANIC_3, - SFX_GENERIC_MALE_PANIC_4, - SFX_GENERIC_MALE_PANIC_5, - SFX_GENERIC_MALE_PANIC_6, - SFX_GENERIC_MALE_PANIC_7, - SFX_GENERIC_MALE_PANIC_8, - SFX_GENERIC_MALE_PANIC_9, - SFX_GENERIC_MALE_PANIC_10, - SFX_GENERIC_MALE_PANIC_11, - SFX_GENERIC_MALE_PANIC_12, - SFX_GENERIC_MALE_PANIC_13, - SFX_GENERIC_MALE_PANIC_14, - SFX_GENERIC_MALE_PANIC_15, - SFX_GENERIC_MALE_PANIC_16, - SFX_GENERIC_MALE_PANIC_17, - SFX_GENERIC_MALE_PANIC_18, - SFX_GENERIC_MALE_PANIC_19, - SFX_GENERIC_MALE_PANIC_20, - SFX_GENERIC_MALE_PANIC_21, - SFX_GENERIC_MALE_PANIC_22, - SFX_GENERIC_MALE_PANIC_23, - SFX_GENERIC_MALE_PANIC_24, - SFX_GENERIC_MALE_PANIC_25, - SFX_GENERIC_MALE_PANIC_26, - SFX_GENERIC_MALE_PANIC_27, - SFX_GENERIC_MALE_PANIC_28, - SFX_GENERIC_MALE_PANIC_29, - SFX_GENERIC_MALE_PANIC_30, - SFX_GENERIC_MALE_PANIC_31, - SFX_GENERIC_MALE_PANIC_32, - SFX_GENERIC_MALE_PANIC_33, - SFX_GENERIC_MALE_PANIC_34, - SFX_GENERIC_MALE_PANIC_35, - - SFX_MEDIC_VOICE_1_FIGHT_1, - SFX_MEDIC_VOICE_1_FIGHT_2, - SFX_MEDIC_VOICE_1_FIGHT_3, - SFX_MEDIC_VOICE_1_FIGHT_4, - SFX_MEDIC_VOICE_1_FIGHT_5, - SFX_MEDIC_VOICE_1_FIGHT_6, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_1, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_2, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_3, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_4, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_5, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_6, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_7, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_8, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_9, - SFX_MEDIC_VOICE_1_GET_OUT_VAN_CHAT_10, - SFX_MEDIC_VOICE_1_AT_VICTIM_1, - SFX_MEDIC_VOICE_1_AT_VICTIM_2, - SFX_MEDIC_VOICE_1_AT_VICTIM_3, - SFX_MEDIC_VOICE_1_AT_VICTIM_4, - SFX_MEDIC_VOICE_1_AT_VICTIM_5, - SFX_MEDIC_VOICE_1_AT_VICTIM_6, - SFX_MEDIC_VOICE_1_AT_VICTIM_7, - SFX_MEDIC_VOICE_1_AT_VICTIM_8, - SFX_MEDIC_VOICE_1_AT_VICTIM_9, - SFX_MEDIC_VOICE_1_AT_VICTIM_10, - SFX_MEDIC_VOICE_1_AT_VICTIM_11, - SFX_MEDIC_VOICE_1_AT_VICTIM_12, - SFX_MEDIC_VOICE_1_AT_VICTIM_13, - SFX_MEDIC_VOICE_1_AT_VICTIM_14, - SFX_MEDIC_VOICE_1_AT_VICTIM_15, - SFX_MEDIC_VOICE_1_AT_VICTIM_16, - SFX_MEDIC_VOICE_1_AT_VICTIM_17, - - SFX_MEDIC_VOICE_2_FIGHT_1, - SFX_MEDIC_VOICE_2_FIGHT_2, - SFX_MEDIC_VOICE_2_FIGHT_3, - SFX_MEDIC_VOICE_2_FIGHT_4, - SFX_MEDIC_VOICE_2_FIGHT_5, - SFX_MEDIC_VOICE_2_FIGHT_6, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_1, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_2, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_3, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_4, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_5, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_6, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_7, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_8, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_9, - SFX_MEDIC_VOICE_2_GET_OUT_VAN_CHAT_10, - SFX_MEDIC_VOICE_2_AT_VICTIM_1, - SFX_MEDIC_VOICE_2_AT_VICTIM_2, - SFX_MEDIC_VOICE_2_AT_VICTIM_3, - SFX_MEDIC_VOICE_2_AT_VICTIM_4, - SFX_MEDIC_VOICE_2_AT_VICTIM_5, - SFX_MEDIC_VOICE_2_AT_VICTIM_6, - SFX_MEDIC_VOICE_2_AT_VICTIM_7, - SFX_MEDIC_VOICE_2_AT_VICTIM_8, - SFX_MEDIC_VOICE_2_AT_VICTIM_9, - SFX_MEDIC_VOICE_2_AT_VICTIM_10, - SFX_MEDIC_VOICE_2_AT_VICTIM_11, - SFX_MEDIC_VOICE_2_AT_VICTIM_12, - SFX_MEDIC_VOICE_2_AT_VICTIM_13, - SFX_MEDIC_VOICE_2_AT_VICTIM_14, - SFX_MEDIC_VOICE_2_AT_VICTIM_15, - SFX_MEDIC_VOICE_2_AT_VICTIM_16, - SFX_MEDIC_VOICE_2_AT_VICTIM_17, - - SFX_FBI_VOICE_1_GUNAIMEDAT3_1, - SFX_FBI_VOICE_1_GUNAIMEDAT3_2, - SFX_FBI_VOICE_1_GUNAIMEDAT3_3, - SFX_FBI_VOICE_1_GUNAIMEDAT3_4, - SFX_FBI_VOICE_1_CAR_CRASH_1, - SFX_FBI_VOICE_1_CAR_CRASH_2, - SFX_FBI_VOICE_1_CAR_CRASH_3, - SFX_FBI_VOICE_1_CAR_CRASH_4, - SFX_FBI_VOICE_1_GUNAIMEDAT2_1, - SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_1, - SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_2, - SFX_FBI_VOICE_1_COP_MANYCOPSAROUND_3, - SFX_FBI_VOICE_1_COP_TARGETING_1, - SFX_FBI_VOICE_1_COP_TARGETING_2, - SFX_FBI_VOICE_1_COP_TARGETING_3, - SFX_FBI_VOICE_1_COP_TARGETING_4, - SFX_FBI_VOICE_1_COP_TARGETING_5, - SFX_FBI_VOICE_1_COP_TARGETING_6, - - SFX_FBI_VOICE_2_GUNAIMEDAT3_1, - SFX_FBI_VOICE_2_GUNAIMEDAT3_2, - SFX_FBI_VOICE_2_GUNAIMEDAT3_3, - SFX_FBI_VOICE_2_GUNAIMEDAT3_4, - SFX_FBI_VOICE_2_CAR_CRASH_1, - SFX_FBI_VOICE_2_CAR_CRASH_2, - SFX_FBI_VOICE_2_CAR_CRASH_3, - SFX_FBI_VOICE_2_CAR_CRASH_4, - SFX_FBI_VOICE_2_GUNAIMEDAT2_1, - SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_1, - SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_2, - SFX_FBI_VOICE_2_COP_MANYCOPSAROUND_3, - SFX_FBI_VOICE_2_COP_TARGETING_1, - SFX_FBI_VOICE_2_COP_TARGETING_2, - SFX_FBI_VOICE_2_COP_TARGETING_3, - SFX_FBI_VOICE_2_COP_TARGETING_4, - SFX_FBI_VOICE_2_COP_TARGETING_5, - SFX_FBI_VOICE_2_COP_TARGETING_6, - - SFX_FBI_VOICE_3_GUNAIMEDAT3_1, - SFX_FBI_VOICE_3_GUNAIMEDAT3_2, - SFX_FBI_VOICE_3_GUNAIMEDAT3_3, - SFX_FBI_VOICE_3_GUNAIMEDAT3_4, - SFX_FBI_VOICE_3_CAR_CRASH_1, - SFX_FBI_VOICE_3_CAR_CRASH_2, - SFX_FBI_VOICE_3_CAR_CRASH_3, - SFX_FBI_VOICE_3_CAR_CRASH_4, - SFX_FBI_VOICE_3_GUNAIMEDAT2_1, - SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_1, - SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_2, - SFX_FBI_VOICE_3_COP_MANYCOPSAROUND_3, - SFX_FBI_VOICE_3_COP_TARGETING_1, - SFX_FBI_VOICE_3_COP_TARGETING_2, - SFX_FBI_VOICE_3_COP_TARGETING_3, - SFX_FBI_VOICE_3_COP_TARGETING_4, - SFX_FBI_VOICE_3_COP_TARGETING_5, - SFX_FBI_VOICE_3_COP_TARGETING_6, - - SFX_SWAT_VOICE_1_DODGE_1, - SFX_SWAT_VOICE_1_DODGE_2, - SFX_SWAT_VOICE_1_DODGE_3, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_1, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_2, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_3, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_4, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_5, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_6, - SFX_SWAT_VOICE_1_COP_HELIPILOTPHRASE_7, - SFX_SWAT_VOICE_1_COP_TARGETING_1, - SFX_SWAT_VOICE_1_COP_TARGETING_2, - SFX_SWAT_VOICE_1_COP_TARGETING_3, - SFX_SWAT_VOICE_1_COP_TARGETING_4, - - SFX_SWAT_VOICE_2_DODGE_1, - SFX_SWAT_VOICE_2_DODGE_2, - SFX_SWAT_VOICE_2_DODGE_3, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_1, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_2, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_3, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_4, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_5, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_6, - SFX_SWAT_VOICE_2_COP_HELIPILOTPHRASE_7, - SFX_SWAT_VOICE_2_COP_TARGETING_1, - SFX_SWAT_VOICE_2_COP_TARGETING_2, - SFX_SWAT_VOICE_2_COP_TARGETING_3, - SFX_SWAT_VOICE_2_COP_TARGETING_4, - - SFX_SWAT_VOICE_3_DODGE_1, - SFX_SWAT_VOICE_3_DODGE_2, - SFX_SWAT_VOICE_3_DODGE_3, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_1, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_2, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_3, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_4, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_5, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_6, - SFX_SWAT_VOICE_3_COP_HELIPILOTPHRASE_7, - SFX_SWAT_VOICE_3_COP_TARGETING_1, - SFX_SWAT_VOICE_3_COP_TARGETING_2, - SFX_SWAT_VOICE_3_COP_TARGETING_3, - SFX_SWAT_VOICE_3_COP_TARGETING_4, - - - SFX_WFYG1_BLOCKED_1, - SFX_WFYG1_BLOCKED_2, - SFX_WFYG1_BLOCKED_3, - SFX_WFYG1_BLOCKED_4, - SFX_WFYG1_BLOCKED_5, - SFX_WFYG1_BLOCKED_6, - SFX_WFYG1_BLOCKED_7, - SFX_WFYG1_BUMP_1, - SFX_WFYG1_BUMP_2, - SFX_WFYG1_BUMP_3, - SFX_WFYG1_BUMP_4, - SFX_WFYG1_BUMP_5, - SFX_WFYG1_BUMP_6, - SFX_WFYG1_BUMP_7, - SFX_WFYG1_BUMP_8, - SFX_WFYG1_BUMP_9, - SFX_WFYG1_BUMP_10, - SFX_WFYG1_BUMP_11, - SFX_WFYG1_CAR_CRASH_1, - SFX_WFYG1_CAR_CRASH_2, - SFX_WFYG1_CAR_CRASH_3, - SFX_WFYG1_CAR_CRASH_4, - SFX_WFYG1_CAR_CRASH_5, - SFX_WFYG1_CAR_CRASH_6, - SFX_WFYG1_CAR_CRASH_7, - SFX_WFYG1_CAR_CRASH_8, - SFX_WFYG1_CAR_CRASH_9, - SFX_WFYG1_CHAT_1, - SFX_WFYG1_CHAT_2, - SFX_WFYG1_CHAT_3, - SFX_WFYG1_CHAT_4, - SFX_WFYG1_CHAT_5, - SFX_WFYG1_CHAT_6, - SFX_WFYG1_CHAT_7, - SFX_WFYG1_CHAT_8, - SFX_WFYG1_CHAT_9, - SFX_WFYG1_CHAT_10, - SFX_WFYG1_DODGE_1, - SFX_WFYG1_DODGE_2, - SFX_WFYG1_DODGE_3, - SFX_WFYG1_DODGE_4, - SFX_WFYG1_DODGE_5, - SFX_WFYG1_DODGE_6, - SFX_WFYG1_DODGE_7, - SFX_WFYG1_DODGE_8, - SFX_WFYG1_DODGE_9, - SFX_WFYG1_EYEING_1, - SFX_WFYG1_EYEING_2, - SFX_WFYG1_FIGHT_1, - SFX_WFYG1_FIGHT_2, - SFX_WFYG1_FIGHT_3, - SFX_WFYG1_FIGHT_4, - SFX_WFYG1_GENERIC_CRASH_1, - SFX_WFYG1_GENERIC_CRASH_2, - SFX_WFYG1_GENERIC_CRASH_3, - SFX_WFYG1_GENERIC_CRASH_4, - SFX_WFYG1_GENERIC_CRASH_5, - SFX_WFYG1_GENERIC_CRASH_6, - SFX_WFYG1_GENERIC_CRASH_7, - SFX_WFYG1_GUN_COOL_1, - SFX_WFYG1_GUN_COOL_2, - SFX_WFYG1_GUN_COOL_3, - SFX_WFYG1_GUN_COOL_4, - SFX_WFYG1_GUN_COOL_5, - SFX_WFYG1_GUN_COOL_6, - SFX_WFYG1_JACKED_1, - SFX_WFYG1_JACKED_2, - SFX_WFYG1_JACKED_3, - SFX_WFYG1_JACKED_4, - SFX_WFYG1_JACKED_5, - SFX_WFYG1_LOST_1, - SFX_WFYG1_LOST_2, - SFX_WFYG1_LOST_3, - SFX_WFYG1_MUGGED_1, - SFX_WFYG1_MUGGED_2, - SFX_WFYG1_MUGGING_1, - SFX_WFYG1_MUGGING_2, - SFX_WFYG1_RUN_1, - SFX_WFYG1_RUN_2, - SFX_WFYG1_SAVED_1, - SFX_WFYG1_SHOCKED_1, - SFX_WFYG1_TAXI_1, - - SFX_WFYG2_BLOCKED_1, - SFX_WFYG2_BLOCKED_2, - SFX_WFYG2_BLOCKED_3, - SFX_WFYG2_BLOCKED_4, - SFX_WFYG2_BLOCKED_5, - SFX_WFYG2_BUMP_1, - SFX_WFYG2_BUMP_2, - SFX_WFYG2_BUMP_3, - SFX_WFYG2_BUMP_4, - SFX_WFYG2_BUMP_5, - SFX_WFYG2_BUMP_6, - SFX_WFYG2_BUMP_7, - SFX_WFYG2_BUMP_8, - SFX_WFYG2_BUMP_9, - SFX_WFYG2_BUMP_10, - SFX_WFYG2_BUMP_11, - SFX_WFYG2_CAR_CRASH_1, - SFX_WFYG2_CAR_CRASH_2, - SFX_WFYG2_CAR_CRASH_3, - SFX_WFYG2_CAR_CRASH_4, - SFX_WFYG2_CAR_CRASH_5, - SFX_WFYG2_CAR_CRASH_6, - SFX_WFYG2_CAR_CRASH_7, - SFX_WFYG2_CAR_CRASH_8, - SFX_WFYG2_CAR_CRASH_9, - SFX_WFYG2_CHAT_1, - SFX_WFYG2_CHAT_2, - SFX_WFYG2_CHAT_3, - SFX_WFYG2_CHAT_4, - SFX_WFYG2_CHAT_5, - SFX_WFYG2_CHAT_6, - SFX_WFYG2_CHAT_7, - SFX_WFYG2_CHAT_8, - SFX_WFYG2_CHAT_9, - SFX_WFYG2_DODGE_1, - SFX_WFYG2_DODGE_2, - SFX_WFYG2_DODGE_3, - SFX_WFYG2_DODGE_4, - SFX_WFYG2_DODGE_5, - SFX_WFYG2_DODGE_6, - SFX_WFYG2_DODGE_7, - SFX_WFYG2_DODGE_8, - SFX_WFYG2_EYEING_1, - SFX_WFYG2_EYEING_2, - SFX_WFYG2_EYEING_3, - SFX_WFYG2_EYEING_4, - SFX_WFYG2_FIGHT_1, - SFX_WFYG2_FIGHT_2, - SFX_WFYG2_FIGHT_3, - SFX_WFYG2_FIGHT_4, - SFX_WFYG2_FIGHT_5, - SFX_WFYG2_GENERIC_CRASH_1, - SFX_WFYG2_GENERIC_CRASH_2, - SFX_WFYG2_GENERIC_CRASH_3, - SFX_WFYG2_GENERIC_CRASH_4, - SFX_WFYG2_GENERIC_CRASH_5, - SFX_WFYG2_GENERIC_CRASH_6, - SFX_WFYG2_GENERIC_CRASH_7, - SFX_WFYG2_GUN_COOL_1, - SFX_WFYG2_GUN_COOL_2, - SFX_WFYG2_GUN_COOL_3, - SFX_WFYG2_JACKED_1, - SFX_WFYG2_JACKED_2, - SFX_WFYG2_JACKED_3, - SFX_WFYG2_JACKED_4, - SFX_WFYG2_JACKED_5, - SFX_WFYG2_LOST_1, - SFX_WFYG2_MUGGED_1, - SFX_WFYG2_MUGGED_2, - SFX_WFYG2_SHOCKED_1, - SFX_WFYG2_TAXI_1, - SFX_WFYG2_TAXI_2, // unused - - SFX_HMOCA_BLOCKED_1, - SFX_HMOCA_BLOCKED_2, - SFX_HMOCA_BLOCKED_3, - SFX_HMOCA_BLOCKED_4, - SFX_HMOCA_BLOCKED_5, - SFX_HMOCA_BLOCKED_6, - SFX_HMOCA_BLOCKED_7, - SFX_HMOCA_BLOCKED_8, - SFX_HMOCA_CAR_CRASH_1, - SFX_HMOCA_CAR_CRASH_2, - SFX_HMOCA_CAR_CRASH_3, - SFX_HMOCA_CAR_CRASH_4, - SFX_HMOCA_CAR_CRASH_5, - SFX_HMOCA_CAR_CRASH_6, - SFX_HMOCA_CAR_CRASH_7, - SFX_HMOCA_CAR_CRASH_8, - SFX_HMOCA_CHAT_1, - SFX_HMOCA_CHAT_2, - SFX_HMOCA_CHAT_3, - SFX_HMOCA_CHAT_4, - SFX_HMOCA_CHAT_5, - SFX_HMOCA_CHAT_6, - SFX_HMOCA_CHAT_7, - SFX_HMOCA_CHAT_8, - SFX_HMOCA_CHAT_9, - SFX_HMOCA_CHAT_10, - SFX_HMOCA_EYEING_1, - SFX_HMOCA_EYEING_2, - SFX_HMOCA_GUN_PANIC_1, - SFX_HMOCA_GUN_PANIC_2, - SFX_HMOCA_GUN_PANIC_3, - SFX_HMOCA_GUN_PANIC_4, - SFX_HMOCA_GUN_PANIC_5, - SFX_HMOCA_JACKED_1, - SFX_HMOCA_JACKED_2, - SFX_HMOCA_JACKED_3, - SFX_HMOCA_JACKED_4, - SFX_HMOCA_JACKED_5, - SFX_HMOCA_JACKED_6, - SFX_HMOCA_JACKED_7, - SFX_HMOCA_JACKED_8, - SFX_HMOCA_JACKED_9, - SFX_HMOCA_JACKED_10, - SFX_HMOCA_JACKING_1, - SFX_HMOCA_JACKING_2, - SFX_HMOCA_JACKING_3, - SFX_HMOCA_JACKING_4, - SFX_HMOCA_JACKING_5, - SFX_HMOCA_JACKING_6, - SFX_HMOCA_JACKING_7, - SFX_HMOCA_JACKING_8, - SFX_HMOCA_JACKING_9, - SFX_HMOCA_JACKING_10, - SFX_HMOCA_JACKING_11, - SFX_HMOCA_MUGGED_1, - SFX_HMOCA_MUGGED_2, - SFX_HMOCA_MUGGED_3, - SFX_HMOCA_MUGGED_4, - SFX_HMOCA_MUGGED_5, - SFX_HMOCA_MUGGED_6, - SFX_HMOCA_MUGGED_7, - SFX_HMOCA_RUN_1, - SFX_HMOCA_RUN_2, - SFX_HMOCA_TAXI_1, - - SFX_WFOSH_BUMP_1, - SFX_WFOSH_BUMP_2, - SFX_WFOSH_BUMP_3, - SFX_WFOSH_BUMP_4, - SFX_WFOSH_BUMP_5, - SFX_WFOSH_BUMP_6, - SFX_WFOSH_BUMP_7, - SFX_WFOSH_BUMP_8, - SFX_WFOSH_BUMP_9, - SFX_WFOSH_BUMP_10, - SFX_WFOSH_CHAT_1, - SFX_WFOSH_CHAT_2, - SFX_WFOSH_CHAT_3, - SFX_WFOSH_CHAT_4, - SFX_WFOSH_CHAT_5, - SFX_WFOSH_CHAT_6, - SFX_WFOSH_CHAT_7, - SFX_WFOSH_CHAT_8, - SFX_WFOSH_CHAT_9, - SFX_WFOSH_DODGE_1, - SFX_WFOSH_DODGE_2, - SFX_WFOSH_DODGE_3, - SFX_WFOSH_DODGE_4, - SFX_WFOSH_DODGE_5, - SFX_WFOSH_DODGE_6, - SFX_WFOSH_DODGE_7, - SFX_WFOSH_DODGE_8, - SFX_WFOSH_DODGE_9, - SFX_WFOSH_DODGE_10, - SFX_WFOSH_GUN_COOL_1, - SFX_WFOSH_GUN_COOL_2, - SFX_WFOSH_GUN_COOL_3, - SFX_WFOSH_GUN_COOL_4, - SFX_WFOSH_GUN_COOL_5, - SFX_WFOSH_GUN_COOL_6, - SFX_WFOSH_GUN_COOL_7, - SFX_WFOSH_GUN_COOL_8, - SFX_WFOSH_GUN_COOL_9, - SFX_WFOSH_GUN_COOL_10, - SFX_WFOSH_LOST_1, - SFX_WFOSH_LOST_2, - SFX_WFOSH_MUGGED_1, - SFX_WFOSH_MUGGED_2, - SFX_WFOSH_RUN_1, - SFX_WFOSH_RUN_2, - SFX_WFOSH_RUN_3, - SFX_WFOSH_RUN_4, - SFX_WFOSH_RUN_5, - SFX_WFOSH_RUN_6, - SFX_WFOSH_RUN_7, - SFX_WFOSH_RUN_8, - SFX_WFOSH_RUN_9, - SFX_WFOSH_SAVED_1, - SFX_WFOSH_SAVED_2, - SFX_WFOSH_SAVED_3, - SFX_WFOSH_SHOCKED_1, - SFX_WFOSH_SHOCKED_2, - SFX_WFOSH_SHOCKED_3, - SFX_WFOSH_SHOCKED_4, - SFX_WFOSH_SHOCKED_5, - SFX_WFOSH_TAXI_1, - SFX_WFYSK_BLOCKED_1, - SFX_WFYSK_BLOCKED_2, - SFX_WFYSK_BLOCKED_3, - SFX_WFYSK_BLOCKED_4, - SFX_WFYSK_BLOCKED_5, - SFX_WFYSK_BLOCKED_6, - SFX_WFYSK_BLOCKED_7, - SFX_WFYSK_BLOCKED_8, - SFX_WFYSK_BLOCKED_9, - SFX_WFYSK_BLOCKED_10, - SFX_WFYSK_BLOCKED_11, - SFX_WFYSK_BUMP_1, - SFX_WFYSK_BUMP_2, - SFX_WFYSK_BUMP_3, - SFX_WFYSK_BUMP_4, - SFX_WFYSK_BUMP_5, - SFX_WFYSK_BUMP_6, - SFX_WFYSK_BUMP_7, - SFX_WFYSK_BUMP_8, - SFX_WFYSK_BUMP_9, - SFX_WFYSK_BUMP_10, - SFX_WFYSK_BUMP_11, - SFX_WFYSK_BUMP_12, - SFX_WFYSK_BUMP_13, - SFX_WFYSK_BUMP_14, - SFX_WFYSK_BUMP_15, - SFX_WFYSK_BUMP_16, - SFX_WFYSK_BUMP_17, - SFX_WFYSK_BUMP_18, - SFX_WFYSK_DODGE_1, - SFX_WFYSK_DODGE_2, - SFX_WFYSK_DODGE_3, - SFX_WFYSK_DODGE_4, - SFX_WFYSK_DODGE_5, - SFX_WFYSK_DODGE_6, - SFX_WFYSK_DODGE_7, - SFX_WFYSK_DODGE_8, - SFX_WFYSK_DODGE_9, - SFX_WFYSK_FIGHT_1, - SFX_WFYSK_FIGHT_2, - SFX_WFYSK_FIGHT_3, - SFX_WFYSK_FIGHT_4, - SFX_WFYSK_FIGHT_5, - SFX_WFYSK_FIGHT_6, - SFX_WFYSK_FIGHT_7, - SFX_WFYSK_FIGHT_8, - SFX_WFYSK_FIGHT_9, - SFX_WFYSK_FIGHT_10, - SFX_WFYSK_FIGHT_11, - SFX_WFYSK_GUN_PANIC_1, - SFX_WFYSK_GUN_PANIC_2, - SFX_WFYSK_GUN_PANIC_3, - SFX_WFYSK_GUN_PANIC_4, - SFX_WFYSK_GUN_PANIC_5, - SFX_WFYSK_MUGGED_1, - SFX_WFYSK_MUGGED_2, - SFX_WFYSK_SAVED_1, - SFX_WFYSK_SAVED_2, - SFX_WFYSK_TAXI_1, - SFX_WMYLG_BUMP_1, - SFX_WMYLG_BUMP_2, - SFX_WMYLG_BUMP_3, - SFX_WMYLG_BUMP_4, - SFX_WMYLG_BUMP_5, - SFX_WMYLG_BUMP_6, - SFX_WMYLG_BUMP_7, - SFX_WMYLG_BUMP_8, - SFX_WMYLG_BUMP_9, - SFX_WMYLG_BUMP_10, - SFX_WMYLG_CHAT_1, - SFX_WMYLG_CHAT_2, - SFX_WMYLG_CHAT_3, - SFX_WMYLG_CHAT_4, - SFX_WMYLG_CHAT_5, - SFX_WMYLG_CHAT_6, - SFX_WMYLG_CHAT_7, - SFX_WMYLG_CHAT_8, - SFX_WMYLG_CHAT_9, - SFX_WMYLG_CHAT_10, - SFX_WMYLG_DODGE_1, - SFX_WMYLG_DODGE_2, - SFX_WMYLG_DODGE_3, - SFX_WMYLG_DODGE_4, - SFX_WMYLG_DODGE_5, - SFX_WMYLG_DODGE_6, - SFX_WMYLG_DODGE_7, - SFX_WMYLG_DODGE_8, - SFX_WMYLG_DODGE_9, - SFX_WMYLG_FIGHT_1, - SFX_WMYLG_FIGHT_2, - SFX_WMYLG_FIGHT_3, - SFX_WMYLG_FIGHT_4, - SFX_WMYLG_FIGHT_5, - SFX_WMYLG_FIGHT_6, - SFX_WMYLG_FIGHT_7, - SFX_WMYLG_GUN_COOL_1, - SFX_WMYLG_GUN_COOL_2, - SFX_WMYLG_GUN_COOL_3, - SFX_WMYLG_GUN_COOL_4, - SFX_WMYLG_GUN_COOL_5, - SFX_WMYLG_GUN_COOL_6, - SFX_WMYLG_SAVED_1, - SFX_WMYLG_TAXI_1, - - SFX_WMOBE_BLOCKED_1, - SFX_WMOBE_BLOCKED_2, - SFX_WMOBE_BLOCKED_3, - SFX_WMOBE_BLOCKED_4, - SFX_WMOBE_BLOCKED_5, - SFX_WMOBE_BLOCKED_6, - SFX_WMOBE_BUMP_1, - SFX_WMOBE_BUMP_2, - SFX_WMOBE_BUMP_3, - SFX_WMOBE_BUMP_4, - SFX_WMOBE_BUMP_5, - SFX_WMOBE_BUMP_6, - SFX_WMOBE_BUMP_7, - SFX_WMOBE_BUMP_8, - SFX_WMOBE_BUMP_9, - SFX_WMOBE_BUMP_10, - SFX_WMOBE_BUMP_11, - SFX_WMOBE_BUMP_12, - SFX_WMOBE_CAR_CRASH_1, - SFX_WMOBE_CAR_CRASH_2, - SFX_WMOBE_CAR_CRASH_3, - SFX_WMOBE_CAR_CRASH_4, - SFX_WMOBE_CAR_CRASH_5, - SFX_WMOBE_CAR_CRASH_6, - SFX_WMOBE_CAR_CRASH_7, - SFX_WMOBE_CAR_CRASH_8, - SFX_WMOBE_CHAT_1, - SFX_WMOBE_CHAT_2, - SFX_WMOBE_CHAT_3, - SFX_WMOBE_CHAT_4, - SFX_WMOBE_CHAT_5, - SFX_WMOBE_CHAT_6, - SFX_WMOBE_CHAT_7, - SFX_WMOBE_CHAT_8, - SFX_WMOBE_CHAT_9, - SFX_WMOBE_CHAT_10, - SFX_WMOBE_DODGE_1, - SFX_WMOBE_DODGE_2, - SFX_WMOBE_DODGE_3, - SFX_WMOBE_DODGE_4, - SFX_WMOBE_DODGE_5, - SFX_WMOBE_DODGE_6, - SFX_WMOBE_DODGE_7, - SFX_WMOBE_DODGE_8, - SFX_WMOBE_EYEING_1, - SFX_WMOBE_EYEING_2, - SFX_WMOBE_GENERIC_CRASH_1, - SFX_WMOBE_GENERIC_CRASH_2, - SFX_WMOBE_GENERIC_CRASH_3, - SFX_WMOBE_GENERIC_CRASH_4, - SFX_WMOBE_GENERIC_CRASH_5, - SFX_WMOBE_GENERIC_CRASH_6, - SFX_WMOBE_GENERIC_CRASH_7, - SFX_WMOBE_GUN_PANIC_1, - SFX_WMOBE_GUN_PANIC_2, - SFX_WMOBE_GUN_PANIC_3, - SFX_WMOBE_GUN_PANIC_4, - SFX_WMOBE_GUN_PANIC_5, - SFX_WMOBE_JACKED_1, - SFX_WMOBE_JACKED_2, - SFX_WMOBE_JACKED_3, - SFX_WMOBE_JACKED_4, - SFX_WMOBE_JACKED_5, - SFX_WMOBE_JACKED_6, - SFX_WMOBE_JACKED_7, - SFX_WMOBE_JACKED_8, - SFX_WMOBE_JACKING_1, - SFX_WMOBE_JACKING_2, - SFX_WMOBE_JACKING_3, - SFX_WMOBE_JACKING_4, - SFX_WMOBE_JEER_1, - SFX_WMOBE_JEER_2, - SFX_WMOBE_JEER_3, - SFX_WMOBE_JEER_4, - SFX_WMOBE_JEER_5, - SFX_WMOBE_JEER_6, - SFX_WMOBE_JEER_7, - SFX_WMOBE_JEER_8, - SFX_WMOBE_JEER_9, - SFX_WMOBE_JEER_10, - SFX_WMOBE_JEER_11, - SFX_WMOBE_JEER_12, - SFX_WMOBE_JEER_13, - SFX_WMOBE_JEER_14, - SFX_WMOBE_JEER_15, - SFX_WMOBE_JEER_16, - SFX_WMOBE_MUGGING_1, - SFX_WMOBE_MUGGING_2, - SFX_WMOBE_MUGGING_3, - SFX_WMOBE_MUGGING_4, - SFX_WMOBE_MUGGING_5, - SFX_WMOBE_MUGGING_6, - SFX_WMOBE_RUN_1, - SFX_WMOBE_RUN_2, - SFX_WMOBE_RUN_3, - SFX_WMOBE_RUN_4, - SFX_WMOBE_SAVED_1, - SFX_WMOBE_SAVED_2, - SFX_WMOBE_SHOCKED_1, - SFX_WMOBE_SHOCKED_2, - - - - SFX_WMYBU_BLOCKED_1, - SFX_WMYBU_BLOCKED_2, - SFX_WMYBU_BLOCKED_3, - SFX_WMYBU_BLOCKED_4, - SFX_WMYBU_BLOCKED_5, - SFX_WMYBU_BLOCKED_6, - SFX_WMYBU_BLOCKED_7, - SFX_WMYBU_BLOCKED_8, - SFX_WMYBU_BLOCKED_9, - SFX_WMYBU_BUMP_1, - SFX_WMYBU_BUMP_2, - SFX_WMYBU_BUMP_3, - SFX_WMYBU_BUMP_4, - SFX_WMYBU_BUMP_5, - SFX_WMYBU_BUMP_6, - SFX_WMYBU_BUMP_7, - SFX_WMYBU_BUMP_8, - SFX_WMYBU_BUMP_9, - SFX_WMYBU_BUMP_10, - SFX_WMYBU_BUMP_11, - SFX_WMYBU_CAR_CRASH_1, - SFX_WMYBU_CAR_CRASH_2, - SFX_WMYBU_CAR_CRASH_3, - SFX_WMYBU_CAR_CRASH_4, - SFX_WMYBU_CAR_CRASH_5, - SFX_WMYBU_CAR_CRASH_6, - SFX_WMYBU_CAR_CRASH_7, - SFX_WMYBU_CAR_CRASH_8, - SFX_WMYBU_CAR_CRASH_9, - SFX_WMYBU_CHAT_1, - SFX_WMYBU_CHAT_2, - SFX_WMYBU_CHAT_3, - SFX_WMYBU_CHAT_4, - SFX_WMYBU_CHAT_5, - SFX_WMYBU_CHAT_6, - SFX_WMYBU_CHAT_7, - SFX_WMYBU_CHAT_8, - SFX_WMYBU_CHAT_9, - SFX_WMYBU_CHAT_10, - SFX_WMYBU_DODGE_1, - SFX_WMYBU_DODGE_2, - SFX_WMYBU_DODGE_3, - SFX_WMYBU_DODGE_4, - SFX_WMYBU_DODGE_5, - SFX_WMYBU_DODGE_6, - SFX_WMYBU_DODGE_7, - SFX_WMYBU_DODGE_8, - SFX_WMYBU_DODGE_9, - SFX_WMYBU_DODGE_10, - SFX_WMYBU_EYEING_1, - SFX_WMYBU_EYEING_2, - SFX_WMYBU_GENERIC_CRASH_1, - SFX_WMYBU_GENERIC_CRASH_2, - SFX_WMYBU_GENERIC_CRASH_3, - SFX_WMYBU_GENERIC_CRASH_4, - SFX_WMYBU_GENERIC_CRASH_5, - SFX_WMYBU_GUN_PANIC_1, - SFX_WMYBU_GUN_PANIC_2, - SFX_WMYBU_GUN_PANIC_3, - SFX_WMYBU_GUN_PANIC_4, - SFX_WMYBU_GUN_PANIC_5, - SFX_WMYBU_GUN_PANIC_6, - SFX_WMYBU_INNOCENT_1, - SFX_WMYBU_INNOCENT_2, - SFX_WMYBU_JACKED_1, - SFX_WMYBU_JACKED_2, - SFX_WMYBU_JACKED_3, - SFX_WMYBU_JACKED_4, - SFX_WMYBU_JACKED_5, - SFX_WMYBU_LOST_1, - SFX_WMYBU_LOST_2, - SFX_WMYBU_LOST_3, - SFX_WMYBU_LOST_4, - SFX_WMYBU_LOST_5, - SFX_WMYBU_MUGGED_1, - SFX_WMYBU_RUN_1, - SFX_WMYBU_RUN_2, - SFX_WMYBU_RUN_3, - SFX_WMYBU_SAVED_1, - SFX_WMYBU_SAVED_2, - SFX_WMYBU_SHOCKED_1, - SFX_WMYBU_SHOCKED_2, - SFX_WMYBU_SHOCKED_3, - SFX_WMYBU_SHOCKED_4, - SFX_WMYBU_SHOCKED_5, - SFX_WMYBU_TAXI_1, - SFX_WMYBU_TAXI_2, - - SFX_WMYST_BLOCKED_1, - SFX_WMYST_BLOCKED_2, - SFX_WMYST_BLOCKED_3, - SFX_WMYST_BLOCKED_4, - SFX_WMYST_BLOCKED_5, - SFX_WMYST_BLOCKED_6, - SFX_WMYST_BLOCKED_7, - SFX_WMYST_BLOCKED_8, - SFX_WMYST_BUMP_1, - SFX_WMYST_BUMP_2, - SFX_WMYST_BUMP_3, - SFX_WMYST_BUMP_4, - SFX_WMYST_BUMP_5, - SFX_WMYST_BUMP_6, - SFX_WMYST_BUMP_7, - SFX_WMYST_BUMP_8, - SFX_WMYST_BUMP_9, - SFX_WMYST_BUMP_10, - SFX_WMYST_BUMP_11, - SFX_WMYST_CAR_CRASH_1, - SFX_WMYST_CAR_CRASH_2, - SFX_WMYST_CAR_CRASH_3, - SFX_WMYST_CAR_CRASH_4, - SFX_WMYST_CAR_CRASH_5, - SFX_WMYST_CAR_CRASH_6, - SFX_WMYST_CAR_CRASH_7, - SFX_WMYST_CAR_CRASH_8, - SFX_WMYST_CHAT_1, - SFX_WMYST_CHAT_2, - SFX_WMYST_CHAT_3, - SFX_WMYST_CHAT_4, - SFX_WMYST_CHAT_5, - SFX_WMYST_CHAT_6, - SFX_WMYST_CHAT_7, - SFX_WMYST_CHAT_8, - SFX_WMYST_CHAT_9, - SFX_WMYST_CHAT_10, - SFX_WMYST_DODGE_1, - SFX_WMYST_DODGE_2, - SFX_WMYST_DODGE_3, - SFX_WMYST_DODGE_4, - SFX_WMYST_DODGE_5, - SFX_WMYST_DODGE_6, - SFX_WMYST_DODGE_7, - SFX_WMYST_DODGE_8, - SFX_WMYST_DODGE_9, - SFX_WMYST_DODGE_10, - SFX_WMYST_EYEING_1, - SFX_WMYST_EYEING_2, - SFX_WMYST_GENERIC_CRASH_1, - SFX_WMYST_GENERIC_CRASH_2, - SFX_WMYST_GENERIC_CRASH_3, - SFX_WMYST_GENERIC_CRASH_4, - SFX_WMYST_GENERIC_CRASH_5, - SFX_WMYST_GUN_PANIC_1, - SFX_WMYST_GUN_PANIC_2, - SFX_WMYST_GUN_PANIC_3, - SFX_WMYST_GUN_PANIC_4, - SFX_WMYST_GUN_PANIC_5, - SFX_WMYST_INNOCENT_1, - SFX_WMYST_INNOCENT_2, - SFX_WMYST_INNOCENT_3, - SFX_WMYST_JACKED_1, - SFX_WMYST_JACKED_2, - SFX_WMYST_JACKED_3, - SFX_WMYST_JACKED_4, - SFX_WMYST_JACKED_5, - SFX_WMYST_LOST_1, - SFX_WMYST_LOST_2, - SFX_WMYST_MUGGED_1, - SFX_WMYST_MUGGING_1, - SFX_WMYST_MUGGING_2, - SFX_WMYST_MUGGING_3, - SFX_WMYST_MUGGING_4, - SFX_WMYST_MUGGING_5, - SFX_WMYST_RUN_1, - SFX_WMYST_RUN_2, - SFX_WMYST_RUN_3, - SFX_WMYST_RUN_4, - SFX_WMYST_RUN_5, - SFX_WMYST_RUN_6, - SFX_WMYST_RUN_7, - SFX_WMYST_SAVED_1, - SFX_WMYST_TAXI_1, - SFX_WMYST_TAXI_2, - - SFX_BMYPI_BLOCKED_1, - SFX_BMYPI_BLOCKED_2, - SFX_BMYPI_BLOCKED_3, - SFX_BMYPI_BLOCKED_4, - SFX_BMYPI_BLOCKED_5, - SFX_BMYPI_BLOCKED_6, - SFX_BMYPI_BUMP_1, - SFX_BMYPI_BUMP_2, - SFX_BMYPI_BUMP_3, - SFX_BMYPI_BUMP_4, - SFX_BMYPI_BUMP_5, - SFX_BMYPI_BUMP_6, - SFX_BMYPI_BUMP_7, - SFX_BMYPI_BUMP_8, - SFX_BMYPI_BUMP_9, - SFX_BMYPI_CAR_CRASH_1, - SFX_BMYPI_CAR_CRASH_2, - SFX_BMYPI_CAR_CRASH_3, - SFX_BMYPI_CAR_CRASH_4, - SFX_BMYPI_CAR_CRASH_5, - SFX_BMYPI_DODGE_1, - SFX_BMYPI_DODGE_2, - SFX_BMYPI_DODGE_3, - SFX_BMYPI_DODGE_4, - SFX_BMYPI_DODGE_5, - SFX_BMYPI_DODGE_6, - SFX_BMYPI_DODGE_7, - SFX_BMYPI_DODGE_8, - SFX_BMYPI_DODGE_9, - SFX_BMYPI_DODGE_10, - SFX_BMYPI_EYEING_1, - SFX_BMYPI_EYEING_2, - SFX_BMYPI_EYEING_3, - SFX_BMYPI_EYEING_4, - SFX_BMYPI_FIGHT_1, - SFX_BMYPI_FIGHT_2, - SFX_BMYPI_FIGHT_3, - SFX_BMYPI_FIGHT_4, - SFX_BMYPI_FIGHT_5, - SFX_BMYPI_FIGHT_6, - SFX_BMYPI_FIGHT_7, - SFX_BMYPI_FIGHT_8, - SFX_BMYPI_GENERIC_CRASH_1, - SFX_BMYPI_GENERIC_CRASH_2, - SFX_BMYPI_GENERIC_CRASH_3, - SFX_BMYPI_GENERIC_CRASH_4, - SFX_BMYPI_GENERIC_CRASH_5, - SFX_BMYPI_GENERIC_CRASH_6, - SFX_BMYPI_GENERIC_CRASH_7, - SFX_BMYPI_GENERIC_CRASH_8, - SFX_BMYPI_GENERIC_CRASH_9, - SFX_BMYPI_GENERIC_CRASH_10, - SFX_BMYPI_GENERIC_CRASH_11, - SFX_BMYPI_GENERIC_CRASH_12, - SFX_BMYPI_GENERIC_CRASH_13, - SFX_BMYPI_GUN_COOL_1, - SFX_BMYPI_GUN_COOL_2, - SFX_BMYPI_GUN_COOL_3, - SFX_BMYPI_GUN_COOL_4, - SFX_BMYPI_GUN_COOL_5, - SFX_BMYPI_JACKED_1, - SFX_BMYPI_JACKED_2, - SFX_BMYPI_JACKED_3, - SFX_BMYPI_JACKED_4, - SFX_BMYPI_JACKED_5, - SFX_BMYPI_JACKED_6, - SFX_BMYPI_JACKING_1, - SFX_BMYPI_JACKING_2, - SFX_BMYPI_JACKING_3, - SFX_BMYPI_JACKING_4, - SFX_BMYPI_MUGGED_1, - SFX_BMYPI_SAVED_1, - SFX_BMYPI_TAXI_1, - SFX_BMYPI_TAXI_2, - - SFX_WFYPR_BUMP_1, - SFX_WFYPR_BUMP_2, - SFX_WFYPR_BUMP_3, - SFX_WFYPR_BUMP_4, - SFX_WFYPR_BUMP_5, - SFX_WFYPR_BUMP_6, - SFX_WFYPR_BUMP_7, - SFX_WFYPR_BUMP_8, - SFX_WFYPR_BUMP_9, - SFX_WFYPR_BUMP_10, - SFX_WFYPR_BUMP_11, - SFX_WFYPR_CHAT_1, - SFX_WFYPR_CHAT_2, - SFX_WFYPR_CHAT_3, - SFX_WFYPR_CHAT_4, - SFX_WFYPR_CHAT_5, - SFX_WFYPR_CHAT_6, - SFX_WFYPR_CHAT_7, - SFX_WFYPR_CHAT_8, - SFX_WFYPR_CHAT_9, - SFX_WFYPR_CHAT_10, - SFX_WFYPR_CHAT_11, - SFX_WFYPR_CHAT_12, - SFX_WFYPR_CHAT_13, - SFX_WFYPR_CHAT_14, - SFX_WFYPR_DODGE_1, - SFX_WFYPR_DODGE_2, - SFX_WFYPR_DODGE_3, - SFX_WFYPR_DODGE_4, - SFX_WFYPR_DODGE_5, - SFX_WFYPR_DODGE_6, - SFX_WFYPR_DODGE_7, - SFX_WFYPR_DODGE_8, - SFX_WFYPR_DODGE_9, - SFX_WFYPR_DODGE_10, - SFX_WFYPR_FIGHT_1, - SFX_WFYPR_FIGHT_2, - SFX_WFYPR_FIGHT_3, - SFX_WFYPR_FIGHT_4, - SFX_WFYPR_FIGHT_5, - SFX_WFYPR_FIGHT_6, - SFX_WFYPR_FIGHT_7, - SFX_WFYPR_FIGHT_8, - SFX_WFYPR_FIGHT_9, - SFX_WFYPR_FUCKING_1, - SFX_WFYPR_FUCKING_2, - SFX_WFYPR_FUCKING_3, - SFX_WFYPR_FUCKING_4, - SFX_WFYPR_FUCKING_5, - SFX_WFYPR_GUN_COOL_1, - SFX_WFYPR_GUN_COOL_2, - SFX_WFYPR_GUN_COOL_3, - SFX_WFYPR_GUN_COOL_4, - SFX_WFYPR_GUN_COOL_5, - SFX_WFYPR_GUN_COOL_6, - SFX_WFYPR_MUGGED_1, - SFX_WFYPR_MUGGED_2, - SFX_WFYPR_SAVED_1, - SFX_WFYPR_SOLICIT_1, - SFX_WFYPR_SOLICIT_2, - SFX_WFYPR_SOLICIT_3, - SFX_WFYPR_SOLICIT_4, - SFX_WFYPR_SOLICIT_5, - SFX_WFYPR_SOLICIT_6, - SFX_WFYPR_SOLICIT_7, - SFX_WFYPR_SOLICIT_8, - SFX_WFYPR_SOLICIT_9, - SFX_WFYPR_SOLICIT_10, - SFX_WFYPR_SOLICIT_11, - SFX_WFYPR_SOLICIT_12, - SFX_WFYPR_SOLICIT_13, - SFX_WFYPR_SOLICIT_14, - SFX_WFYPR_SOLICIT_15, - SFX_WFYPR_TAXI_1, - - SFX_WMYRI_BLOCKED_1, - SFX_WMYRI_BLOCKED_2, - SFX_WMYRI_BLOCKED_3, - SFX_WMYRI_BLOCKED_4, - SFX_WMYRI_BLOCKED_5, - SFX_WMYRI_BLOCKED_6, - SFX_WMYRI_BLOCKED_7, - SFX_WMYRI_BLOCKED_8, - SFX_WMYRI_BLOCKED_9, - SFX_WMYRI_BLOCKED_10, - SFX_WMYRI_BUMP_1, - SFX_WMYRI_BUMP_2, - SFX_WMYRI_BUMP_3, - SFX_WMYRI_BUMP_4, - SFX_WMYRI_BUMP_5, - SFX_WMYRI_BUMP_6, - SFX_WMYRI_BUMP_7, - SFX_WMYRI_BUMP_8, - SFX_WMYRI_CAR_CRASH_1, - SFX_WMYRI_CAR_CRASH_2, - SFX_WMYRI_CAR_CRASH_3, - SFX_WMYRI_CAR_CRASH_4, - SFX_WMYRI_CAR_CRASH_5, - SFX_WMYRI_CAR_CRASH_6, - SFX_WMYRI_CAR_CRASH_7, - SFX_WMYRI_CAR_CRASH_8, - SFX_WMYRI_CAR_CRASH_9, - SFX_WMYRI_CHAT_1, - SFX_WMYRI_CHAT_2, - SFX_WMYRI_CHAT_3, - SFX_WMYRI_CHAT_4, - SFX_WMYRI_CHAT_5, - SFX_WMYRI_CHAT_6, - SFX_WMYRI_CHAT_7, - SFX_WMYRI_CHAT_8, - SFX_WMYRI_CHAT_9, - SFX_WMYRI_CHAT_10, - SFX_WMYRI_DODGE_1, - SFX_WMYRI_DODGE_2, - SFX_WMYRI_DODGE_3, - SFX_WMYRI_DODGE_4, - SFX_WMYRI_DODGE_5, - SFX_WMYRI_DODGE_6, - SFX_WMYRI_DODGE_7, - SFX_WMYRI_DODGE_8, - SFX_WMYRI_DODGE_9, - SFX_WMYRI_EYEING_1, - SFX_WMYRI_EYEING_2, - SFX_WMYRI_EYEING_3, - SFX_WMYRI_GENERIC_CRASH_1, - SFX_WMYRI_GENERIC_CRASH_2, - SFX_WMYRI_GENERIC_CRASH_3, - SFX_WMYRI_GENERIC_CRASH_4, - SFX_WMYRI_GENERIC_CRASH_5, - SFX_WMYRI_GENERIC_CRASH_6, - SFX_WMYRI_GENERIC_CRASH_7, - SFX_WMYRI_GENERIC_CRASH_8, - SFX_WMYRI_GENERIC_CRASH_9, - SFX_WMYRI_GENERIC_CRASH_10, - SFX_WMYRI_GENERIC_CRASH_11, - SFX_WMYRI_GUN_PANIC_1, - SFX_WMYRI_GUN_PANIC_2, - SFX_WMYRI_GUN_PANIC_3, - SFX_WMYRI_GUN_PANIC_4, - SFX_WMYRI_GUN_PANIC_5, - SFX_WMYRI_GUN_PANIC_6, - SFX_WMYRI_GUN_PANIC_7, - SFX_WMYRI_GUN_PANIC_8, - SFX_WMYRI_JACKED_1, - SFX_WMYRI_JACKED_2, - SFX_WMYRI_JACKED_3, - SFX_WMYRI_JACKED_4, - SFX_WMYRI_JACKED_5, - SFX_WMYRI_JACKED_6, - SFX_WMYRI_JACKED_7, - SFX_WMYRI_JACKED_8, - SFX_WMYRI_LOST_1, - SFX_WMYRI_RUN_1, - SFX_WMYRI_RUN_2, - SFX_WMYRI_RUN_3, - SFX_WMYRI_RUN_4, - SFX_WMYRI_RUN_5, - SFX_WMYRI_SAVED_1, - SFX_WMYRI_SHOCKED_1, - SFX_WMYRI_SHOCKED_2, - SFX_WMYRI_SHOCKED_3, - SFX_WMYRI_SHOCKED_4, - SFX_WMYRI_TAXI_1, - SFX_WMYRI_TAXI_2, - - SFX_BMOST_BUMP_1, - SFX_BMOST_BUMP_2, - SFX_BMOST_BUMP_3, - SFX_BMOST_BUMP_4, - SFX_BMOST_BUMP_5, - SFX_BMOST_BUMP_6, - SFX_BMOST_BUMP_7, - SFX_BMOST_BUMP_8, - SFX_BMOST_BUMP_9, - SFX_BMOST_BUMP_10, - SFX_BMOST_BUMP_11, - SFX_BMOST_BUMP_12, - SFX_BMOST_BUMP_13, - SFX_BMOST_BUMP_14, - SFX_BMOST_BUMP_15, - SFX_BMOST_BUMP_16, - SFX_BMOST_BUMP_17, - SFX_BMOST_CAR_CRASH_1, - SFX_BMOST_CAR_CRASH_2, - SFX_BMOST_CAR_CRASH_3, - SFX_BMOST_CAR_CRASH_4, - SFX_BMOST_CAR_CRASH_5, - SFX_BMOST_CAR_CRASH_6, - SFX_BMOST_CAR_CRASH_7, - SFX_BMOST_CAR_CRASH_8, - SFX_BMOST_CHAT_1, - SFX_BMOST_CHAT_2, - SFX_BMOST_CHAT_3, - SFX_BMOST_CHAT_4, - SFX_BMOST_CHAT_5, - SFX_BMOST_CHAT_6, - SFX_BMOST_CHAT_7, - SFX_BMOST_CHAT_8, - SFX_BMOST_CHAT_9, - SFX_BMOST_CHAT_10, - SFX_BMOST_CHAT_11, - SFX_BMOST_CHAT_12, - SFX_BMOST_CHAT_13, - SFX_BMOST_CHAT_14, - SFX_BMOST_CHAT_15, - SFX_BMOST_CHAT_16, - SFX_BMOST_CHAT_17, - SFX_BMOST_CHAT_18, - SFX_BMOST_DODGE_1, - SFX_BMOST_DODGE_2, - SFX_BMOST_DODGE_3, - SFX_BMOST_DODGE_4, - SFX_BMOST_DODGE_5, - SFX_BMOST_DODGE_6, - SFX_BMOST_DODGE_7, - SFX_BMOST_DODGE_8, - SFX_BMOST_EYEING_1, - SFX_BMOST_EYEING_2, - SFX_BMOST_EYEING_3, - SFX_BMOST_EYEING_4, - SFX_BMOST_EYEING_5, - SFX_BMOST_EYEING_6, - SFX_BMOST_FIGHT_1, - SFX_BMOST_FIGHT_2, - SFX_BMOST_FIGHT_3, - SFX_BMOST_FIGHT_4, - SFX_BMOST_FIGHT_5, - SFX_BMOST_FIGHT_6, - SFX_BMOST_FIGHT_7, - SFX_BMOST_GENERIC_CRASH_1, - SFX_BMOST_GENERIC_CRASH_2, - SFX_BMOST_GENERIC_CRASH_3, - SFX_BMOST_GENERIC_CRASH_4, - SFX_BMOST_GENERIC_CRASH_5, - SFX_BMOST_GENERIC_CRASH_6, - SFX_BMOST_GENERIC_CRASH_7, - SFX_BMOST_GENERIC_CRASH_8, - SFX_BMOST_GENERIC_CRASH_9, - SFX_BMOST_GENERIC_CRASH_10, - SFX_BMOST_GENERIC_CRASH_11, - SFX_BMOST_GENERIC_CRASH_12, - SFX_BMOST_GENERIC_CRASH_13, - SFX_BMOST_GUN_PANIC_1, - SFX_BMOST_GUN_PANIC_2, - SFX_BMOST_GUN_PANIC_3, - SFX_BMOST_GUN_PANIC_4, - SFX_BMOST_GUN_PANIC_5, - SFX_BMOST_GUN_PANIC_6, - SFX_BMOST_GUN_PANIC_7, - SFX_BMOST_GUN_PANIC_8, - SFX_BMOST_GUN_PANIC_9, - SFX_BMOST_LOST_1, - SFX_BMOST_LOST_2, - SFX_BMOST_LOST_3, - SFX_BMOST_LOST_4, - SFX_BMOST_LOST_5, - SFX_BMOST_LOST_6, - SFX_BMOST_MUGGED_1, - SFX_BMOST_MUGGED_2, - SFX_BMOST_MUGGED_3, - SFX_BMOST_MUGGED_4, - SFX_BMOST_SAVED_1, - SFX_BMOST_TAXI_1, - - SFX_HFOST_BLOCKED_1, - SFX_HFOST_BLOCKED_2, - SFX_HFOST_BLOCKED_3, - SFX_HFOST_BLOCKED_4, - SFX_HFOST_BLOCKED_5, - SFX_HFOST_BLOCKED_6, - SFX_HFOST_BLOCKED_7, - SFX_HFOST_BLOCKED_8, - SFX_HFOST_BLOCKED_9, - SFX_HFOST_BUMP_1, - SFX_HFOST_BUMP_2, - SFX_HFOST_BUMP_3, - SFX_HFOST_BUMP_4, - SFX_HFOST_BUMP_5, - SFX_HFOST_BUMP_6, - SFX_HFOST_BUMP_7, - SFX_HFOST_BUMP_8, - SFX_HFOST_BUMP_9, - SFX_HFOST_BUMP_10, - SFX_HFOST_BUMP_11, - SFX_HFOST_BUMP_12, - SFX_HFOST_CAR_CRASH_1, - SFX_HFOST_CAR_CRASH_2, - SFX_HFOST_CAR_CRASH_3, - SFX_HFOST_CAR_CRASH_4, - SFX_HFOST_CAR_CRASH_5, - SFX_HFOST_CAR_CRASH_6, - SFX_HFOST_CAR_CRASH_7, - SFX_HFOST_CAR_CRASH_8, - SFX_HFOST_CHAT_1, - SFX_HFOST_CHAT_2, - SFX_HFOST_CHAT_3, - SFX_HFOST_CHAT_4, - SFX_HFOST_CHAT_5, - SFX_HFOST_CHAT_6, - SFX_HFOST_CHAT_7, - SFX_HFOST_CHAT_8, - SFX_HFOST_CHAT_9, - SFX_HFOST_CHAT_10, - SFX_HFOST_CHAT_11, - SFX_HFOST_DODGE_1, - SFX_HFOST_DODGE_2, - SFX_HFOST_DODGE_3, - SFX_HFOST_DODGE_4, - SFX_HFOST_DODGE_5, - SFX_HFOST_DODGE_6, - SFX_HFOST_DODGE_7, - SFX_HFOST_DODGE_8, - SFX_HFOST_DODGE_9, - SFX_HFOST_DODGE_10, - SFX_HFOST_FIGHT_1, - SFX_HFOST_FIGHT_2, - SFX_HFOST_FIGHT_3, - SFX_HFOST_FIGHT_4, - SFX_HFOST_FIGHT_5, - SFX_HFOST_FIGHT_6, - SFX_HFOST_FIGHT_7, - SFX_HFOST_FIGHT_8, - SFX_HFOST_GENERIC_CRASH_1, - SFX_HFOST_GENERIC_CRASH_2, - SFX_HFOST_GENERIC_CRASH_3, - SFX_HFOST_GENERIC_CRASH_4, - SFX_HFOST_GENERIC_CRASH_5, - SFX_HFOST_GENERIC_CRASH_6, - SFX_HFOST_GENERIC_CRASH_7, - SFX_HFOST_GENERIC_CRASH_8, - SFX_HFOST_GENERIC_CRASH_9, - SFX_HFOST_GENERIC_CRASH_10, - SFX_HFOST_GENERIC_CRASH_11, - SFX_HFOST_GUN_COOL_1, - SFX_HFOST_GUN_COOL_2, - SFX_HFOST_GUN_COOL_3, - SFX_HFOST_GUN_COOL_4, - SFX_HFOST_GUN_COOL_5, - SFX_HFOST_GUN_COOL_6, - SFX_HFOST_JACKED_1, - SFX_HFOST_JACKED_2, - SFX_HFOST_JACKED_3, - SFX_HFOST_JACKED_4, - SFX_HFOST_JACKED_5, - SFX_HFOST_JACKED_6, - SFX_HFOST_JACKED_7, - SFX_HFOST_JACKED_8, - SFX_HFOST_LOST_1, - SFX_HFOST_LOST_2, - SFX_HFOST_MUGGED_1, - SFX_HFOST_MUGGED_2, - SFX_HFOST_MUGGED_3, - SFX_HFOST_TAXI_1, - SFX_HFOST_TAXI_2, - - SFX_HMORI_BLOCKED_1, - SFX_HMORI_BLOCKED_2, - SFX_HMORI_BLOCKED_3, - SFX_HMORI_BLOCKED_4, - SFX_HMORI_BLOCKED_5, - SFX_HMORI_BLOCKED_6, - SFX_HMORI_BLOCKED_7, - SFX_HMORI_BLOCKED_8, - SFX_HMORI_BUMP_1, - SFX_HMORI_BUMP_2, - SFX_HMORI_BUMP_3, - SFX_HMORI_BUMP_4, - SFX_HMORI_BUMP_5, - SFX_HMORI_BUMP_6, - SFX_HMORI_BUMP_7, - SFX_HMORI_BUMP_8, - SFX_HMORI_BUMP_9, - SFX_HMORI_BUMP_10, - SFX_HMORI_BUMP_11, - SFX_HMORI_CAR_CRASH_1, - SFX_HMORI_CAR_CRASH_2, - SFX_HMORI_CAR_CRASH_3, - SFX_HMORI_CAR_CRASH_4, - SFX_HMORI_CAR_CRASH_5, - SFX_HMORI_CAR_CRASH_6, - SFX_HMORI_CHAT_1, - SFX_HMORI_CHAT_2, - SFX_HMORI_CHAT_3, - SFX_HMORI_CHAT_4, - SFX_HMORI_CHAT_5, - SFX_HMORI_CHAT_6, - SFX_HMORI_CHAT_7, - SFX_HMORI_CHAT_8, - SFX_HMORI_DODGE_1, - SFX_HMORI_DODGE_2, - SFX_HMORI_DODGE_3, - SFX_HMORI_DODGE_4, - SFX_HMORI_DODGE_5, - SFX_HMORI_DODGE_6, - SFX_HMORI_DODGE_7, - SFX_HMORI_GENERIC_CRASH_1, - SFX_HMORI_GENERIC_CRASH_2, - SFX_HMORI_GENERIC_CRASH_3, - SFX_HMORI_GENERIC_CRASH_4, - SFX_HMORI_GENERIC_CRASH_5, - SFX_HMORI_GENERIC_CRASH_6, - SFX_HMORI_GENERIC_CRASH_7, - SFX_HMORI_GENERIC_CRASH_8, - SFX_HMORI_GENERIC_CRASH_9, - SFX_HMORI_GENERIC_CRASH_10, - SFX_HMORI_GENERIC_CRASH_11, - SFX_HMORI_GUN_PANIC_1, - SFX_HMORI_GUN_PANIC_2, - SFX_HMORI_GUN_PANIC_3, - SFX_HMORI_GUN_PANIC_4, - SFX_HMORI_GUN_PANIC_5, - SFX_HMORI_JACKED_1, - SFX_HMORI_JACKED_2, - SFX_HMORI_JACKED_3, - SFX_HMORI_JACKED_4, - SFX_HMORI_JACKED_5, - SFX_HMORI_JACKED_6, - SFX_HMORI_JACKED_7, - SFX_HMORI_JACKED_8, - SFX_HMORI_LOST_1, - SFX_HMORI_LOST_2, - SFX_HMORI_MUGGED_1, - SFX_HMORI_MUGGED_2, - SFX_HMORI_MUGGED_3, - SFX_HMORI_RUN_1, - SFX_HMORI_RUN_2, - SFX_HMORI_RUN_3, - SFX_HMORI_RUN_4, - SFX_HMORI_RUN_5, - SFX_HMORI_RUN_6, - SFX_HMORI_TAXI_1, - SFX_HMORI_TAXI_2, - - SFX_HMOTR_BUMP_1, - SFX_HMOTR_BUMP_2, - SFX_HMOTR_BUMP_3, - SFX_HMOTR_BUMP_4, - SFX_HMOTR_BUMP_5, - SFX_HMOTR_BUMP_6, - SFX_HMOTR_BUMP_7, - SFX_HMOTR_BUMP_8, - SFX_HMOTR_CHAT_1, - SFX_HMOTR_CHAT_2, - SFX_HMOTR_CHAT_3, - SFX_HMOTR_CHAT_4, - SFX_HMOTR_CHAT_5, - SFX_HMOTR_CHAT_6, - SFX_HMOTR_CHAT_7, - SFX_HMOTR_CHAT_8, - SFX_HMOTR_CHAT_9, - SFX_HMOTR_DODGE_1, - SFX_HMOTR_DODGE_2, - SFX_HMOTR_DODGE_3, - SFX_HMOTR_DODGE_4, - SFX_HMOTR_DODGE_5, - SFX_HMOTR_DODGE_6, - SFX_HMOTR_DODGE_7, - SFX_HMOTR_DODGE_8, - SFX_HMOTR_DODGE_9, - SFX_HMOTR_DODGE_10, - SFX_HMOTR_DODGE_11, - SFX_HMOTR_FIGHT_1, - SFX_HMOTR_FIGHT_2, - SFX_HMOTR_FIGHT_3, - SFX_HMOTR_FIGHT_4, - SFX_HMOTR_FIGHT_5, - SFX_HMOTR_FIGHT_6, - SFX_HMOTR_FIGHT_7, - SFX_HMOTR_GUN_COOL_1, - SFX_HMOTR_GUN_COOL_2, - SFX_HMOTR_GUN_COOL_3, - SFX_HMOTR_GUN_COOL_4, - SFX_HMOTR_GUN_COOL_5, - SFX_HMOTR_GUN_COOL_6, - SFX_HMOTR_SAVED_1, - SFX_HMOTR_SAVED_2, - SFX_HMOTR_SHOCKED_1, - SFX_HMOTR_SHOCKED_2, - SFX_HMOTR_SHOCKED_3, - SFX_HMOTR_SOLICIT_1, - SFX_HMOTR_SOLICIT_2, - SFX_HMOTR_SOLICIT_3, - SFX_HMOTR_SOLICIT_4, - SFX_HMOTR_SOLICIT_5, - SFX_HMOTR_SOLICIT_6, - SFX_HMOTR_SOLICIT_7, - SFX_HMOTR_SOLICIT_8, - SFX_HMOTR_TAXI_1, - - SFX_HMYAP_BLOCKED_1, - SFX_HMYAP_BLOCKED_2, - SFX_HMYAP_BLOCKED_3, - SFX_HMYAP_BLOCKED_4, - SFX_HMYAP_BLOCKED_5, - SFX_HMYAP_BLOCKED_6, - SFX_HMYAP_BLOCKED_7, - SFX_HMYAP_BLOCKED_8, - SFX_HMYAP_BLOCKED_9, - SFX_HMYAP_BUMP_1, - SFX_HMYAP_BUMP_2, - SFX_HMYAP_BUMP_3, - SFX_HMYAP_BUMP_4, - SFX_HMYAP_BUMP_5, - SFX_HMYAP_BUMP_6, - SFX_HMYAP_BUMP_7, - SFX_HMYAP_BUMP_8, - SFX_HMYAP_BUMP_9, - SFX_HMYAP_BUMP_10, - SFX_HMYAP_BUMP_11, - SFX_HMYAP_CAR_CRASH_1, - SFX_HMYAP_CAR_CRASH_2, - SFX_HMYAP_CAR_CRASH_3, - SFX_HMYAP_CAR_CRASH_4, - SFX_HMYAP_CAR_CRASH_5, - SFX_HMYAP_CAR_CRASH_6, - SFX_HMYAP_CAR_CRASH_7, - SFX_HMYAP_CAR_CRASH_8, - SFX_HMYAP_CAR_CRASH_9, - SFX_HMYAP_CHAT_1, - SFX_HMYAP_CHAT_2, - SFX_HMYAP_CHAT_3, - SFX_HMYAP_CHAT_4, - SFX_HMYAP_CHAT_5, - SFX_HMYAP_CHAT_6, - SFX_HMYAP_CHAT_7, - SFX_HMYAP_CHAT_8, - SFX_HMYAP_CHAT_9, - SFX_HMYAP_DODGE_1, - SFX_HMYAP_DODGE_2, - SFX_HMYAP_DODGE_3, - SFX_HMYAP_DODGE_4, - SFX_HMYAP_DODGE_5, - SFX_HMYAP_DODGE_6, - SFX_HMYAP_DODGE_7, - SFX_HMYAP_DODGE_8, - SFX_HMYAP_DODGE_9, - SFX_HMYAP_EYEING_1, - SFX_HMYAP_EYEING_2, - SFX_HMYAP_EYEING_3, - SFX_HMYAP_GENERIC_CRASH_1, - SFX_HMYAP_GENERIC_CRASH_2, - SFX_HMYAP_GENERIC_CRASH_3, - SFX_HMYAP_GENERIC_CRASH_4, - SFX_HMYAP_GENERIC_CRASH_5, - SFX_HMYAP_GENERIC_CRASH_6, - SFX_HMYAP_GUN_PANIC_1, - SFX_HMYAP_GUN_PANIC_2, - SFX_HMYAP_GUN_PANIC_3, - SFX_HMYAP_GUN_PANIC_4, - SFX_HMYAP_GUN_PANIC_5, - SFX_HMYAP_GUN_PANIC_6, - SFX_HMYAP_GUN_PANIC_7, - SFX_HMYAP_JACKED_1, - SFX_HMYAP_JACKED_2, - SFX_HMYAP_JACKED_3, - SFX_HMYAP_JACKED_4, - SFX_HMYAP_JACKED_5, - SFX_HMYAP_JACKED_6, - SFX_HMYAP_JACKED_7, - SFX_HMYAP_JACKING_1, - SFX_HMYAP_JACKING_2, - SFX_HMYAP_JACKING_3, - SFX_HMYAP_JACKING_4, - SFX_HMYAP_LOST_1, - SFX_HMYAP_LOST_2, - SFX_HMYAP_MUGGED_1, - SFX_HMYAP_MUGGED_2, - SFX_HMYAP_RUN_1, - SFX_HMYAP_RUN_2, - SFX_HMYAP_RUN_3, - SFX_HMYAP_RUN_4, - SFX_HMYAP_RUN_5, - SFX_HMYAP_RUN_6, - SFX_HMYAP_SAVED_1, - SFX_HMYAP_SAVED_2, - SFX_HMYAP_TAXI_1, - SFX_HMYAP_TAXI_2, - - SFX_HFOTR_BUMP_1, - SFX_HFOTR_BUMP_2, - SFX_HFOTR_BUMP_3, - SFX_HFOTR_BUMP_4, - SFX_HFOTR_BUMP_5, - SFX_HFOTR_BUMP_6, - SFX_HFOTR_BUMP_7, - SFX_HFOTR_BUMP_8, - SFX_HFOTR_BUMP_9, - SFX_HFOTR_BUMP_10, - SFX_HFOTR_BUMP_11, - SFX_HFOTR_CHAT_1, - SFX_HFOTR_CHAT_2, - SFX_HFOTR_CHAT_3, - SFX_HFOTR_CHAT_4, - SFX_HFOTR_CHAT_5, - SFX_HFOTR_CHAT_6, - SFX_HFOTR_CHAT_7, - SFX_HFOTR_CHAT_8, - SFX_HFOTR_CHAT_9, - SFX_HFOTR_CHAT_10, - SFX_HFOTR_CHAT_11, - SFX_HFOTR_CHAT_12, - SFX_HFOTR_DODGE_1, - SFX_HFOTR_DODGE_2, - SFX_HFOTR_DODGE_3, - SFX_HFOTR_DODGE_4, - SFX_HFOTR_DODGE_5, - SFX_HFOTR_DODGE_6, - SFX_HFOTR_DODGE_7, - SFX_HFOTR_DODGE_8, - SFX_HFOTR_FIGHT_1, - SFX_HFOTR_FIGHT_2, - SFX_HFOTR_FIGHT_3, - SFX_HFOTR_FIGHT_4, - SFX_HFOTR_FIGHT_5, - SFX_HFOTR_FIGHT_6, - SFX_HFOTR_GUN_COOL_1, - SFX_HFOTR_GUN_COOL_2, - SFX_HFOTR_GUN_COOL_3, - SFX_HFOTR_GUN_COOL_4, - SFX_HFOTR_GUN_COOL_5, - SFX_HFOTR_MUGGED_1, - SFX_HFOTR_MUGGED_2, - SFX_HFOTR_SAVED_1, - SFX_HFOTR_SHOCKED_1, - SFX_HFOTR_SHOCKED_2, - SFX_HFOTR_TAXI_1, - SFX_HFOTR_TAXI_2, - - SFX_HMOBE_BLOCKED_1, - SFX_HMOBE_BLOCKED_2, - SFX_HMOBE_BLOCKED_3, - SFX_HMOBE_BLOCKED_4, - SFX_HMOBE_BLOCKED_5, - SFX_HMOBE_BLOCKED_6, - SFX_HMOBE_BLOCKED_7, - SFX_HMOBE_BLOCKED_8, - SFX_HMOBE_BLOCKED_9, - SFX_HMOBE_BLOCKED_10, - SFX_HMOBE_BUMP_1, - SFX_HMOBE_BUMP_2, - SFX_HMOBE_BUMP_3, - SFX_HMOBE_BUMP_4, - SFX_HMOBE_BUMP_5, - SFX_HMOBE_BUMP_6, - SFX_HMOBE_BUMP_7, - SFX_HMOBE_BUMP_8, - SFX_HMOBE_DODGE_1, - SFX_HMOBE_DODGE_2, - SFX_HMOBE_DODGE_3, - SFX_HMOBE_DODGE_4, - SFX_HMOBE_DODGE_5, - SFX_HMOBE_DODGE_6, - SFX_HMOBE_DODGE_7, - SFX_HMOBE_DODGE_8, - SFX_HMOBE_DODGE_9, - SFX_HMOBE_EYEING_1, - SFX_HMOBE_EYEING_2, - SFX_HMOBE_EYEING_3, - SFX_HMOBE_EYEING_4, - SFX_HMOBE_GUN_PANIC_1, - SFX_HMOBE_GUN_PANIC_2, - SFX_HMOBE_GUN_PANIC_3, - SFX_HMOBE_INNOCENT_1, - SFX_HMOBE_INNOCENT_2, - SFX_HMOBE_INNOCENT_3, - SFX_HMOBE_JACKED_1, - SFX_HMOBE_JACKED_2, - SFX_HMOBE_JACKED_3, - SFX_HMOBE_JACKED_4, - SFX_HMOBE_JACKED_5, - SFX_HMOBE_JACKED_6, - - SFX_HFYBU_BLOCKED_1, - SFX_HFYBU_BLOCKED_2, - SFX_HFYBU_BLOCKED_3, - SFX_HFYBU_BLOCKED_4, - SFX_HFYBU_BLOCKED_5, - SFX_HFYBU_BLOCKED_6, - SFX_HFYBU_BLOCKED_7, - SFX_HFYBU_BLOCKED_8, - SFX_HFYBU_BUMP_1, - SFX_HFYBU_BUMP_2, - SFX_HFYBU_BUMP_3, - SFX_HFYBU_BUMP_4, - SFX_HFYBU_BUMP_5, - SFX_HFYBU_BUMP_6, - SFX_HFYBU_BUMP_7, - SFX_HFYBU_BUMP_8, - SFX_HFYBU_BUMP_9, - SFX_HFYBU_BUMP_10, - SFX_HFYBU_BUMP_11, - SFX_HFYBU_CAR_CRASH_1, - SFX_HFYBU_CAR_CRASH_2, - SFX_HFYBU_CAR_CRASH_3, - SFX_HFYBU_CAR_CRASH_4, - SFX_HFYBU_CAR_CRASH_5, - SFX_HFYBU_CAR_CRASH_6, - SFX_HFYBU_CAR_CRASH_7, - SFX_HFYBU_CAR_CRASH_8, - SFX_HFYBU_DODGE_1, - SFX_HFYBU_DODGE_2, - SFX_HFYBU_DODGE_3, - SFX_HFYBU_DODGE_4, - SFX_HFYBU_DODGE_5, - SFX_HFYBU_DODGE_6, - SFX_HFYBU_DODGE_7, - SFX_HFYBU_DODGE_8, - SFX_HFYBU_DODGE_9, - SFX_HFYBU_DODGE_10, - SFX_HFYBU_FIGHT_1, - SFX_HFYBU_FIGHT_2, - SFX_HFYBU_FIGHT_3, - SFX_HFYBU_FIGHT_4, - SFX_HFYBU_FIGHT_5, - SFX_HFYBU_FIGHT_6, - SFX_HFYBU_FIGHT_7, - SFX_HFYBU_GENERIC_CRASH_1, - SFX_HFYBU_GENERIC_CRASH_2, - SFX_HFYBU_GENERIC_CRASH_3, - SFX_HFYBU_GENERIC_CRASH_4, - SFX_HFYBU_GENERIC_CRASH_5, - SFX_HFYBU_GENERIC_CRASH_6, - SFX_HFYBU_GENERIC_CRASH_7, - SFX_HFYBU_GENERIC_CRASH_8, - SFX_HFYBU_GENERIC_CRASH_9, - SFX_HFYBU_GENERIC_CRASH_10, - SFX_HFYBU_GENERIC_CRASH_11, - SFX_HFYBU_GENERIC_CRASH_12, - SFX_HFYBU_GUN_PANIC_1, - SFX_HFYBU_GUN_PANIC_2, - SFX_HFYBU_GUN_PANIC_3, - SFX_HFYBU_GUN_PANIC_4, - SFX_HFYBU_GUN_PANIC_5, - SFX_HFYBU_JACKED_1, - SFX_HFYBU_JACKED_2, - SFX_HFYBU_JACKED_3, - SFX_HFYBU_JACKED_4, - SFX_HFYBU_JACKED_5, - SFX_HFYBU_JACKED_6, - SFX_HFYBU_JACKING_1, - SFX_HFYBU_JACKING_2, - SFX_HFYBU_JACKING_3, - SFX_HFYBU_LOST_1, - SFX_HFYBU_LOST_2, - SFX_HFYBU_MUGGED_1, - SFX_HFYBU_MUGGED_2, - SFX_HFYBU_SAVED_1, - SFX_HFYBU_TAXI_1, - - SFX_HFYCG_BUMP_1, - SFX_HFYCG_BUMP_2, - SFX_HFYCG_BUMP_3, - SFX_HFYCG_BUMP_4, - SFX_HFYCG_BUMP_5, - SFX_HFYCG_BUMP_6, - SFX_HFYCG_BUMP_7, - SFX_HFYCG_BUMP_8, - SFX_HFYCG_BUMP_9, - SFX_HFYCG_DODGE_1, - SFX_HFYCG_DODGE_2, - SFX_HFYCG_DODGE_3, - SFX_HFYCG_DODGE_4, - SFX_HFYCG_DODGE_5, - SFX_HFYCG_DODGE_6, - SFX_HFYCG_DODGE_7, - SFX_HFYCG_DODGE_8, - SFX_HFYCG_GUN_PANIC_1, - SFX_HFYCG_GUN_PANIC_2, - SFX_HFYCG_GUN_PANIC_3, - SFX_HFYCG_GUN_PANIC_4, - SFX_HFYCG_GUN_PANIC_5, - SFX_HFYCG_MUGGED_1, - SFX_HFYCG_MUGGED_2, - SFX_HFYCG_RUN_1, - SFX_HFYCG_RUN_2, - SFX_HFYCG_RUN_3, - SFX_HFYCG_RUN_4, - SFX_HFYCG_SAVED_1, - SFX_HFYCG_SOLICIT_1, - SFX_HFYCG_SOLICIT_2, - SFX_HFYCG_SOLICIT_3, - SFX_HFYCG_SOLICIT_4, - SFX_HFYCG_SOLICIT_5, - SFX_HFYCG_SOLICIT_6, - SFX_HFYCG_SOLICIT_7, - SFX_HFYCG_SOLICIT_8, - SFX_HFYCG_SOLICIT_9, - SFX_HFYCG_SOLICIT_10, - SFX_HFYCG_SOLICIT_11, - SFX_HFYCG_SOLICIT_12, - SFX_HFYCG_SOLICIT_13, - SFX_HFYCG_SOLICIT_14, - SFX_HFYCG_TAXI_1, - - SFX_HMYBE_BUMP_1, - SFX_HMYBE_BUMP_2, - SFX_HMYBE_BUMP_3, - SFX_HMYBE_BUMP_4, - SFX_HMYBE_BUMP_5, - SFX_HMYBE_BUMP_6, - SFX_HMYBE_BUMP_7, - SFX_HMYBE_BUMP_8, - SFX_HMYBE_BUMP_9, - SFX_HMYBE_BUMP_10, - SFX_HMYBE_CAR_CRASH_1, - SFX_HMYBE_CAR_CRASH_2, - SFX_HMYBE_CAR_CRASH_3, - SFX_HMYBE_CAR_CRASH_4, - SFX_HMYBE_CAR_CRASH_5, - SFX_HMYBE_CAR_CRASH_6, - SFX_HMYBE_CAR_CRASH_7, - SFX_HMYBE_CHAT_1, - SFX_HMYBE_CHAT_2, - SFX_HMYBE_CHAT_3, - SFX_HMYBE_CHAT_4, - SFX_HMYBE_CHAT_5, - SFX_HMYBE_CHAT_6, - SFX_HMYBE_CHAT_7, - SFX_HMYBE_CHAT_8, - SFX_HMYBE_CHAT_9, - SFX_HMYBE_CHAT_10, - SFX_HMYBE_DODGE_1, - SFX_HMYBE_DODGE_2, - SFX_HMYBE_DODGE_3, - SFX_HMYBE_DODGE_4, - SFX_HMYBE_DODGE_5, - SFX_HMYBE_DODGE_6, - SFX_HMYBE_DODGE_7, - SFX_HMYBE_EYEING_1, - SFX_HMYBE_EYEING_2, - SFX_HMYBE_EYEING_3, - SFX_HMYBE_EYEING_4, - SFX_HMYBE_EYEING_5, - SFX_HMYBE_FIGHT_1, - SFX_HMYBE_FIGHT_2, - SFX_HMYBE_FIGHT_3, - SFX_HMYBE_FIGHT_4, - SFX_HMYBE_FIGHT_5, - SFX_HMYBE_FIGHT_6, - SFX_HMYBE_FIGHT_7, - SFX_HMYBE_FIGHT_8, - SFX_HMYBE_GENERIC_CRASH_1, - SFX_HMYBE_GENERIC_CRASH_2, - SFX_HMYBE_GENERIC_CRASH_3, - SFX_HMYBE_GENERIC_CRASH_4, - SFX_HMYBE_GENERIC_CRASH_5, - SFX_HMYBE_GENERIC_CRASH_6, - SFX_HMYBE_GENERIC_CRASH_7, - SFX_HMYBE_GENERIC_CRASH_8, - SFX_HMYBE_GENERIC_CRASH_9, - SFX_HMYBE_GENERIC_CRASH_10, - SFX_HMYBE_GUN_PANIC_1, - SFX_HMYBE_GUN_PANIC_2, - SFX_HMYBE_GUN_PANIC_3, - SFX_HMYBE_GUN_PANIC_4, - SFX_HMYBE_GUN_PANIC_5, - SFX_HMYBE_GUN_PANIC_6, - SFX_HMYBE_INNOCENT_1, - SFX_HMYBE_INNOCENT_2, - SFX_HMYBE_INNOCENT_3, - SFX_HMYBE_INNOCENT_4, - SFX_HMYBE_JACKED_1, - SFX_HMYBE_JACKED_2, - SFX_HMYBE_JACKED_3, - SFX_HMYBE_JACKED_4, - SFX_HMYBE_JACKED_5, - SFX_HMYBE_JACKED_6, - SFX_HMYBE_JACKED_7, - SFX_HMYBE_JACKED_8, - SFX_HMYBE_JACKED_9, - SFX_HMYBE_JACKED_10, - SFX_HMYBE_JACKED_11, - SFX_HMYBE_JACKED_12, - SFX_HMYBE_LOST_1, - SFX_HMYBE_LOST_2, - SFX_HMYBE_LOST_3, - SFX_HMYBE_SAVED_1, - SFX_HMYBE_SHOCKED_1, - SFX_HMYBE_SHOCKED_2, - SFX_HMYBE_TAXI_1, - - SFX_WMOGO_BUMP_1, - SFX_WMOGO_BUMP_2, - SFX_WMOGO_BUMP_3, - SFX_WMOGO_BUMP_4, - SFX_WMOGO_BUMP_5, - SFX_WMOGO_BUMP_6, - SFX_WMOGO_BUMP_7, - SFX_WMOGO_BUMP_8, - SFX_WMOGO_CAR_CRASH_1, - SFX_WMOGO_CAR_CRASH_2, - SFX_WMOGO_CAR_CRASH_3, - SFX_WMOGO_CAR_CRASH_4, - SFX_WMOGO_CAR_CRASH_5, - SFX_WMOGO_CAR_CRASH_6, - SFX_WMOGO_CAR_CRASH_7, - SFX_WMOGO_CAR_CRASH_8, - SFX_WMOGO_CAR_CRASH_9, - SFX_WMOGO_CHAT_1, - SFX_WMOGO_CHAT_2, - SFX_WMOGO_CHAT_3, - SFX_WMOGO_CHAT_4, - SFX_WMOGO_CHAT_5, - SFX_WMOGO_CHAT_6, - SFX_WMOGO_CHAT_7, - SFX_WMOGO_CHAT_8, - SFX_WMOGO_CHAT_9, - SFX_WMOGO_DODGE_1, - SFX_WMOGO_DODGE_2, - SFX_WMOGO_DODGE_3, - SFX_WMOGO_DODGE_4, - SFX_WMOGO_DODGE_5, - SFX_WMOGO_DODGE_6, - SFX_WMOGO_DODGE_7, - SFX_WMOGO_DODGE_8, - SFX_WMOGO_DODGE_9, - SFX_WMOGO_DODGE_10, - SFX_WMOGO_DODGE_11, - SFX_WMOGO_DODGE_12, - SFX_WMOGO_EYEING_1, - SFX_WMOGO_EYEING_2, - SFX_WMOGO_FIGHT_1, - SFX_WMOGO_FIGHT_2, - SFX_WMOGO_FIGHT_3, - SFX_WMOGO_FIGHT_4, - SFX_WMOGO_FIGHT_5, - SFX_WMOGO_FIGHT_6, - SFX_WMOGO_FIGHT_7, - SFX_WMOGO_FIGHT_8, - SFX_WMOGO_FIGHT_9, - SFX_WMOGO_FIGHT_10, - SFX_WMOGO_FIGHT_11, - SFX_WMOGO_FIGHT_12, - SFX_WMOGO_FIGHT_13, - SFX_WMOGO_GENERIC_CRASH_1, - SFX_WMOGO_GENERIC_CRASH_2, - SFX_WMOGO_GENERIC_CRASH_3, - SFX_WMOGO_GENERIC_CRASH_4, - SFX_WMOGO_GENERIC_CRASH_5, - SFX_WMOGO_GENERIC_CRASH_6, - SFX_WMOGO_GENERIC_CRASH_7, - SFX_WMOGO_GENERIC_CRASH_8, - SFX_WMOGO_GUN_PANIC_1, - SFX_WMOGO_GUN_PANIC_2, - SFX_WMOGO_GUN_PANIC_3, - SFX_WMOGO_GUN_PANIC_4, - SFX_WMOGO_GUN_PANIC_5, - SFX_WMOGO_JACKED_1, - SFX_WMOGO_JACKED_2, - SFX_WMOGO_JACKED_3, - SFX_WMOGO_JACKED_4, - SFX_WMOGO_JACKED_5, - SFX_WMOGO_JACKED_6, - SFX_WMOGO_RUN_1, - SFX_WMOGO_RUN_2, - SFX_WMOGO_RUN_3, - SFX_WMOGO_RUN_4, - SFX_WMOGO_RUN_5, - SFX_WMOGO_SAVED_1, - SFX_WMOGO_SHOCKED_1, - SFX_WMOGO_SHOCKED_2, - SFX_WMOGO_SHOCKED_3, - SFX_WMOGO_TAXI_1, - - SFX_WMYCR_BUMP_1, - SFX_WMYCR_BUMP_2, - SFX_WMYCR_BUMP_3, - SFX_WMYCR_BUMP_4, - SFX_WMYCR_BUMP_5, - SFX_WMYCR_BUMP_6, - SFX_WMYCR_BUMP_7, - SFX_WMYCR_BUMP_8, - SFX_WMYCR_BUMP_9, - SFX_WMYCR_BUMP_10, - SFX_WMYCR_BUMP_11, - SFX_WMYCR_BUMP_12, - SFX_WMYCR_BUMP_13, - SFX_WMYCR_BUMP_14, - SFX_WMYCR_BUMP_15, - SFX_WMYCR_BUMP_16, - SFX_WMYCR_BUMP_17, - SFX_WMYCR_BUMP_18, - SFX_WMYCR_CAR_CRASH_1, - SFX_WMYCR_CAR_CRASH_2, - SFX_WMYCR_CAR_CRASH_3, - SFX_WMYCR_CAR_CRASH_4, - SFX_WMYCR_CAR_CRASH_5, - SFX_WMYCR_CAR_CRASH_6, - SFX_WMYCR_CAR_CRASH_7, - SFX_WMYCR_CAR_CRASH_8, - SFX_WMYCR_CAR_CRASH_9, - SFX_WMYCR_DODGE_1, - SFX_WMYCR_DODGE_2, - SFX_WMYCR_DODGE_3, - SFX_WMYCR_DODGE_4, - SFX_WMYCR_DODGE_5, - SFX_WMYCR_DODGE_6, - SFX_WMYCR_DODGE_7, - SFX_WMYCR_DODGE_8, - SFX_WMYCR_DODGE_9, - SFX_WMYCR_DODGE_10, - SFX_WMYCR_FIGHT_1, - SFX_WMYCR_FIGHT_2, - SFX_WMYCR_FIGHT_3, - SFX_WMYCR_FIGHT_4, - SFX_WMYCR_FIGHT_5, - SFX_WMYCR_FIGHT_6, - SFX_WMYCR_FIGHT_7, - SFX_WMYCR_GENERIC_CRASH_1, - SFX_WMYCR_GENERIC_CRASH_2, - SFX_WMYCR_GENERIC_CRASH_3, - SFX_WMYCR_GENERIC_CRASH_4, - SFX_WMYCR_GENERIC_CRASH_5, - SFX_WMYCR_GENERIC_CRASH_6, - SFX_WMYCR_GENERIC_CRASH_7, - SFX_WMYCR_GENERIC_CRASH_8, - SFX_WMYCR_GENERIC_CRASH_9, - SFX_WMYCR_GUN_COOL_1, - SFX_WMYCR_GUN_COOL_2, - SFX_WMYCR_GUN_COOL_3, - SFX_WMYCR_GUN_COOL_4, - SFX_WMYCR_GUN_COOL_5, - SFX_WMYCR_JACKING_1, - SFX_WMYCR_JACKING_2, - SFX_WMYCR_JACKING_3, - SFX_WMYCR_JACKING_4, - SFX_WMYCR_JACKING_5, - SFX_WMYCR_JACKING_6, - SFX_WMYCR_MUGGED_1, - SFX_WMYCR_MUGGED_2, - SFX_WMYCR_MUGGED_3, - SFX_WMYCR_MUGGING_1, - SFX_WMYCR_MUGGING_2, - SFX_WMYCR_MUGGING_3, - SFX_WMYCR_MUGGING_4, - SFX_WMYCR_MUGGING_5, - SFX_WMYCR_TAXI_1, - - SFX_WMYJG_BLOCKED_1, - SFX_WMYJG_BLOCKED_2, - SFX_WMYJG_BLOCKED_3, - SFX_WMYJG_BLOCKED_4, - SFX_WMYJG_BLOCKED_5, - SFX_WMYJG_BLOCKED_6, - SFX_WMYJG_BLOCKED_7, - SFX_WMYJG_BLOCKED_8, - SFX_WMYJG_BLOCKED_9, - SFX_WMYJG_BLOCKED_10, - SFX_WMYJG_BUMP_1, - SFX_WMYJG_BUMP_2, - SFX_WMYJG_BUMP_3, - SFX_WMYJG_BUMP_4, - SFX_WMYJG_BUMP_5, - SFX_WMYJG_BUMP_6, - SFX_WMYJG_BUMP_7, - SFX_WMYJG_BUMP_8, - SFX_WMYJG_BUMP_9, - SFX_WMYJG_BUMP_10, - SFX_WMYJG_EYEING_1, - SFX_WMYJG_EYEING_2, - SFX_WMYJG_GUN_PANIC_1, - SFX_WMYJG_GUN_PANIC_2, - SFX_WMYJG_GUN_PANIC_3, - SFX_WMYJG_GUN_PANIC_4, - SFX_WMYJG_MUGGED_1, - SFX_WMYJG_MUGGED_2, - SFX_WMYJG_RUN_1, - SFX_WMYJG_RUN_2, - SFX_WMYJG_RUN_3, - SFX_WMYJG_RUN_4, - SFX_WMYJG_RUN_5, - SFX_WMYJG_SAVED_1, - SFX_WMYJG_TAXI_1, - - SFX_WMOST_BLOCKED_1, - SFX_WMOST_BLOCKED_2, - SFX_WMOST_BLOCKED_3, - SFX_WMOST_BLOCKED_4, - SFX_WMOST_BLOCKED_5, - SFX_WMOST_BLOCKED_6, - SFX_WMOST_BLOCKED_7, - SFX_WMOST_BLOCKED_8, - SFX_WMOST_BUMP_1, - SFX_WMOST_BUMP_2, - SFX_WMOST_BUMP_3, - SFX_WMOST_BUMP_4, - SFX_WMOST_BUMP_5, - SFX_WMOST_BUMP_6, - SFX_WMOST_BUMP_7, - SFX_WMOST_BUMP_8, - SFX_WMOST_BUMP_9, - SFX_WMOST_BUMP_10, - SFX_WMOST_CAR_CRASH_1, - SFX_WMOST_CAR_CRASH_2, - SFX_WMOST_CAR_CRASH_3, - SFX_WMOST_CAR_CRASH_4, - SFX_WMOST_CAR_CRASH_5, - SFX_WMOST_CAR_CRASH_6, - SFX_WMOST_CAR_CRASH_7, - SFX_WMOST_CHAT_1, - SFX_WMOST_CHAT_2, - SFX_WMOST_CHAT_3, - SFX_WMOST_CHAT_4, - SFX_WMOST_CHAT_5, - SFX_WMOST_CHAT_6, - SFX_WMOST_CHAT_7, - SFX_WMOST_CHAT_8, - SFX_WMOST_CHAT_9, - SFX_WMOST_DODGE_1, - SFX_WMOST_DODGE_2, - SFX_WMOST_DODGE_3, - SFX_WMOST_DODGE_4, - SFX_WMOST_DODGE_5, - SFX_WMOST_DODGE_6, - SFX_WMOST_DODGE_7, - SFX_WMOST_DODGE_8, - SFX_WMOST_EYEING_1, - SFX_WMOST_EYEING_2, - SFX_WMOST_FIGHT_1, - SFX_WMOST_FIGHT_2, - SFX_WMOST_FIGHT_3, - SFX_WMOST_FIGHT_4, - SFX_WMOST_FIGHT_5, - SFX_WMOST_FIGHT_6, - SFX_WMOST_FIGHT_7, - SFX_WMOST_FIGHT_8, - SFX_WMOST_GENERIC_CRASH_1, - SFX_WMOST_GENERIC_CRASH_2, - SFX_WMOST_GENERIC_CRASH_3, - SFX_WMOST_GENERIC_CRASH_4, - SFX_WMOST_GENERIC_CRASH_5, - SFX_WMOST_GENERIC_CRASH_6, - SFX_WMOST_GENERIC_CRASH_7, - SFX_WMOST_GUN_COOL_1, - SFX_WMOST_GUN_COOL_2, - SFX_WMOST_GUN_COOL_3, - SFX_WMOST_GUN_COOL_4, - SFX_WMOST_GUN_COOL_5, - SFX_WMOST_INNOCENT_1, - SFX_WMOST_INNOCENT_2, - SFX_WMOST_INNOCENT_3, - SFX_WMOST_JACKED_1, - SFX_WMOST_JACKED_2, - SFX_WMOST_JACKED_3, - SFX_WMOST_JACKED_4, - SFX_WMOST_JEER_1, - SFX_WMOST_JEER_2, - SFX_WMOST_JEER_3, - SFX_WMOST_JEER_4, - SFX_WMOST_LOST_1, - SFX_WMOST_LOST_2, - SFX_WMOST_MUGGED_1, - SFX_WMOST_MUGGED_2, - SFX_WMOST_SAVED_1, - SFX_WMOST_TAXI_1, - - SFX_BFOTR_BUMP_1, - SFX_BFOTR_BUMP_2, - SFX_BFOTR_BUMP_3, - SFX_BFOTR_BUMP_4, - SFX_BFOTR_BUMP_5, - SFX_BFOTR_BUMP_6, - SFX_BFOTR_BUMP_7, - SFX_BFOTR_BUMP_8, - SFX_BFOTR_BUMP_9, - SFX_BFOTR_BUMP_10, - SFX_BFOTR_CHAT_1, - SFX_BFOTR_CHAT_2, - SFX_BFOTR_CHAT_3, - SFX_BFOTR_CHAT_4, - SFX_BFOTR_CHAT_5, - SFX_BFOTR_CHAT_6, - SFX_BFOTR_CHAT_7, - SFX_BFOTR_CHAT_8, - SFX_BFOTR_CHAT_9, - SFX_BFOTR_CHAT_10, - SFX_BFOTR_CHAT_11, - SFX_BFOTR_CHAT_12, - SFX_BFOTR_CHAT_13, - SFX_BFOTR_CHAT_14, - SFX_BFOTR_CHAT_15, - SFX_BFOTR_DODGE_1, - SFX_BFOTR_DODGE_2, - SFX_BFOTR_DODGE_3, - SFX_BFOTR_DODGE_4, - SFX_BFOTR_DODGE_5, - SFX_BFOTR_DODGE_6, - SFX_BFOTR_DODGE_7, - SFX_BFOTR_DODGE_8, - SFX_BFOTR_DODGE_9, - SFX_BFOTR_FIGHT_1, - SFX_BFOTR_FIGHT_2, - SFX_BFOTR_FIGHT_3, - SFX_BFOTR_FIGHT_4, - SFX_BFOTR_FIGHT_5, - SFX_BFOTR_FIGHT_6, - SFX_BFOTR_GUN_COOL_1, - SFX_BFOTR_GUN_COOL_2, - SFX_BFOTR_GUN_COOL_3, - SFX_BFOTR_GUN_COOL_4, - SFX_BFOTR_GUN_COOL_5, - SFX_BFOTR_GUN_COOL_6, - SFX_BFOTR_MUGGED_1, - SFX_BFOTR_MUGGED_2, - SFX_BFOTR_MUGGING_1, - SFX_BFOTR_MUGGING_2, - SFX_BFOTR_MUGGING_3, - SFX_BFOTR_SAVED_1, - SFX_BFOTR_SHOCKED_1, - SFX_BFOTR_SHOCKED_2, - SFX_BFOTR_SHOCKED_3, - SFX_BFOTR_SOLICIT_1, - SFX_BFOTR_SOLICIT_2, - SFX_BFOTR_SOLICIT_3, - SFX_BFOTR_SOLICIT_4, - SFX_BFOTR_SOLICIT_5, - SFX_BFOTR_TAXI_1, - - SFX_WFYRI_BLOCKED_1, - SFX_WFYRI_BLOCKED_2, - SFX_WFYRI_BLOCKED_3, - SFX_WFYRI_BLOCKED_4, - SFX_WFYRI_BLOCKED_5, - SFX_WFYRI_BLOCKED_6, - SFX_WFYRI_BLOCKED_7, - SFX_WFYRI_BLOCKED_8, - SFX_WFYRI_BUMP_1, - SFX_WFYRI_BUMP_2, - SFX_WFYRI_BUMP_3, - SFX_WFYRI_BUMP_4, - SFX_WFYRI_BUMP_5, - SFX_WFYRI_BUMP_6, - SFX_WFYRI_BUMP_7, - SFX_WFYRI_BUMP_8, - SFX_WFYRI_BUMP_9, - SFX_WFYRI_BUMP_10, - SFX_WFYRI_CAR_CRASH_1, - SFX_WFYRI_CAR_CRASH_2, - SFX_WFYRI_CAR_CRASH_3, - SFX_WFYRI_CAR_CRASH_4, - SFX_WFYRI_CAR_CRASH_5, - SFX_WFYRI_CAR_CRASH_6, - SFX_WFYRI_CAR_CRASH_7, - SFX_WFYRI_CAR_CRASH_8, - SFX_WFYRI_CAR_CRASH_9, - SFX_WFYRI_DODGE_1, - SFX_WFYRI_DODGE_2, - SFX_WFYRI_DODGE_3, - SFX_WFYRI_DODGE_4, - SFX_WFYRI_DODGE_5, - SFX_WFYRI_DODGE_6, - SFX_WFYRI_DODGE_7, - SFX_WFYRI_DODGE_8, - SFX_WFYRI_DODGE_9, - SFX_WFYRI_EYEING_1, - SFX_WFYRI_EYEING_2, - SFX_WFYRI_GENERIC_CRASH_1, - SFX_WFYRI_GENERIC_CRASH_2, - SFX_WFYRI_GENERIC_CRASH_3, - SFX_WFYRI_GENERIC_CRASH_4, - SFX_WFYRI_GENERIC_CRASH_5, - SFX_WFYRI_GENERIC_CRASH_6, - SFX_WFYRI_GENERIC_CRASH_7, - SFX_WFYRI_GENERIC_CRASH_8, - SFX_WFYRI_GUN_PANIC_1, - SFX_WFYRI_GUN_PANIC_2, - SFX_WFYRI_GUN_PANIC_3, - SFX_WFYRI_GUN_PANIC_4, - SFX_WFYRI_GUN_PANIC_5, - SFX_WFYRI_JACKED_1, - SFX_WFYRI_JACKED_2, - SFX_WFYRI_JACKED_3, - SFX_WFYRI_JACKED_4, - SFX_WFYRI_JACKED_5, - SFX_WFYRI_JACKED_6, - SFX_WFYRI_JACKED_7, - SFX_WFYRI_LOST_1, - SFX_WFYRI_LOST_2, - SFX_WFYRI_MUGGED_1, - SFX_WFYRI_MUGGED_2, - SFX_WFYRI_RUN_1, - SFX_WFYRI_RUN_2, - SFX_WFYRI_RUN_3, - SFX_WFYRI_RUN_4, - SFX_WFYRI_RUN_5, - SFX_WFYRI_SAVED_1, - SFX_WFYRI_SHOCKED_1, - SFX_WFYRI_SHOCKED_2, - SFX_WFYRI_TAXI_1, - SFX_BFYPR_BUMP_1, - SFX_BFYPR_BUMP_2, - SFX_BFYPR_BUMP_3, - SFX_BFYPR_BUMP_4, - SFX_BFYPR_BUMP_5, - SFX_BFYPR_BUMP_6, - SFX_BFYPR_BUMP_7, - SFX_BFYPR_BUMP_8, - SFX_BFYPR_BUMP_9, - SFX_BFYPR_BUMP_10, - SFX_BFYPR_BUMP_11, - SFX_BFYPR_CHAT_1, - SFX_BFYPR_CHAT_2, - SFX_BFYPR_CHAT_3, - SFX_BFYPR_CHAT_4, - SFX_BFYPR_CHAT_5, - SFX_BFYPR_CHAT_6, - SFX_BFYPR_CHAT_7, - SFX_BFYPR_CHAT_8, - SFX_BFYPR_CHAT_9, - SFX_BFYPR_CHAT_10, - SFX_BFYPR_CHAT_11, - SFX_BFYPR_CHAT_12, - SFX_BFYPR_CHAT_13, - SFX_BFYPR_DODGE_1, - SFX_BFYPR_DODGE_2, - SFX_BFYPR_DODGE_3, - SFX_BFYPR_DODGE_4, - SFX_BFYPR_DODGE_5, - SFX_BFYPR_DODGE_6, - SFX_BFYPR_DODGE_7, - SFX_BFYPR_FIGHT_1, - SFX_BFYPR_FIGHT_2, - SFX_BFYPR_FIGHT_3, - SFX_BFYPR_FIGHT_4, - SFX_BFYPR_FIGHT_5, - SFX_BFYPR_FIGHT_6, - SFX_BFYPR_FIGHT_7, - SFX_BFYPR_FUCKING_1, - SFX_BFYPR_FUCKING_2, - SFX_BFYPR_FUCKING_3, - SFX_BFYPR_FUCKING_4, - SFX_BFYPR_FUCKING_5, - SFX_BFYPR_FUCKING_6, - SFX_BFYPR_FUCKING_7, - SFX_BFYPR_GUN_COOL_1, - SFX_BFYPR_GUN_COOL_2, - SFX_BFYPR_GUN_COOL_3, - SFX_BFYPR_GUN_COOL_4, - SFX_BFYPR_GUN_COOL_5, - SFX_BFYPR_MUGGED_1, - SFX_BFYPR_MUGGED_2, - SFX_BFYPR_SAVED_1, - SFX_BFYPR_SHOCKED_1, - SFX_BFYPR_SHOCKED_2, - SFX_BFYPR_SOLICIT_1, - SFX_BFYPR_SOLICIT_2, - SFX_BFYPR_SOLICIT_3, - SFX_BFYPR_SOLICIT_4, - SFX_BFYPR_SOLICIT_5, - SFX_BFYPR_SOLICIT_6, - SFX_BFYPR_SOLICIT_7, - SFX_BFYPR_SOLICIT_8, - SFX_BFYPR_SOLICIT_9, - SFX_BFYPR_SOLICIT_10, - SFX_BFYPR_SOLICIT_11, - SFX_BFYPR_SOLICIT_12, - SFX_BFYPR_SOLICIT_13, - SFX_BFYPR_TAXI_1, - SFX_BFYPR_TAXI_2, - - SFX_BMYRI_BLOCKED_1, - SFX_BMYRI_BLOCKED_2, - SFX_BMYRI_BLOCKED_3, - SFX_BMYRI_BLOCKED_4, - SFX_BMYRI_BLOCKED_5, - SFX_BMYRI_BLOCKED_6, - SFX_BMYRI_BUMP_1, - SFX_BMYRI_BUMP_2, - SFX_BMYRI_BUMP_3, - SFX_BMYRI_BUMP_4, - SFX_BMYRI_BUMP_5, - SFX_BMYRI_BUMP_6, - SFX_BMYRI_BUMP_7, - SFX_BMYRI_CAR_CRASH_1, - SFX_BMYRI_CAR_CRASH_2, - SFX_BMYRI_CAR_CRASH_3, - SFX_BMYRI_CAR_CRASH_4, - SFX_BMYRI_CAR_CRASH_5, - SFX_BMYRI_CAR_CRASH_6, - SFX_BMYRI_CAR_CRASH_7, - SFX_BMYRI_DODGE_1, - SFX_BMYRI_DODGE_2, - SFX_BMYRI_DODGE_3, - SFX_BMYRI_DODGE_4, - SFX_BMYRI_DODGE_5, - SFX_BMYRI_DODGE_6, - SFX_BMYRI_DODGE_7, - SFX_BMYRI_DODGE_8, - SFX_BMYRI_EYEING_1, - SFX_BMYRI_GENERIC_CRASH_1, - SFX_BMYRI_GENERIC_CRASH_2, - SFX_BMYRI_GENERIC_CRASH_3, - SFX_BMYRI_GENERIC_CRASH_4, - SFX_BMYRI_GENERIC_CRASH_5, - SFX_BMYRI_GENERIC_CRASH_6, - SFX_BMYRI_GENERIC_CRASH_7, - SFX_BMYRI_GUN_PANIC_1, - SFX_BMYRI_GUN_PANIC_2, - SFX_BMYRI_GUN_PANIC_3, - SFX_BMYRI_GUN_PANIC_4, - SFX_BMYRI_GUN_PANIC_5, - SFX_BMYRI_GUN_PANIC_6, - SFX_BMYRI_GUN_PANIC_7, - SFX_BMYRI_JACKED_1, - SFX_BMYRI_JACKED_2, - SFX_BMYRI_JACKED_3, - SFX_BMYRI_JACKED_4, - SFX_BMYRI_LOST_1, - SFX_BMYRI_LOST_2, - SFX_BMYRI_MUGGED_1, - SFX_BMYRI_MUGGED_2, - SFX_BMYRI_RUN_1, - SFX_BMYRI_RUN_2, - SFX_BMYRI_RUN_3, - SFX_BMYRI_RUN_4, - SFX_BMYRI_SAVED_1, - SFX_BMYRI_SHOCKED_1, - SFX_BMYRI_SHOCKED_2, - SFX_BMYRI_SHOCKED_3, - SFX_BMYRI_TAXI_1, - SFX_BMYBU_BLOCKED_1, - SFX_BMYBU_BLOCKED_2, - SFX_BMYBU_BLOCKED_3, - SFX_BMYBU_BLOCKED_4, - SFX_BMYBU_BLOCKED_5, - SFX_BMYBU_BLOCKED_6, - SFX_BMYBU_BLOCKED_7, - SFX_BMYBU_BLOCKED_8, - SFX_BMYBU_BUMP_1, - SFX_BMYBU_BUMP_2, - SFX_BMYBU_BUMP_3, - SFX_BMYBU_BUMP_4, - SFX_BMYBU_BUMP_5, - SFX_BMYBU_BUMP_6, - SFX_BMYBU_BUMP_7, - SFX_BMYBU_CAR_CRASH_1, - SFX_BMYBU_CAR_CRASH_2, - SFX_BMYBU_CAR_CRASH_3, - SFX_BMYBU_CAR_CRASH_4, - SFX_BMYBU_CAR_CRASH_5, - SFX_BMYBU_CAR_CRASH_6, - SFX_BMYBU_CAR_CRASH_7, - SFX_BMYBU_DODGE_1, - SFX_BMYBU_DODGE_2, - SFX_BMYBU_DODGE_3, - SFX_BMYBU_DODGE_4, - SFX_BMYBU_DODGE_5, - SFX_BMYBU_DODGE_6, - SFX_BMYBU_DODGE_7, - SFX_BMYBU_DODGE_8, - SFX_BMYBU_DODGE_9, - SFX_BMYBU_DODGE_10, - SFX_BMYBU_EYEING_1, - SFX_BMYBU_EYEING_2, - SFX_BMYBU_FIGHT_1, - SFX_BMYBU_FIGHT_2, - SFX_BMYBU_FIGHT_3, - SFX_BMYBU_FIGHT_4, - SFX_BMYBU_FIGHT_5, - SFX_BMYBU_GENERIC_CRASH_1, - SFX_BMYBU_GENERIC_CRASH_2, - SFX_BMYBU_GENERIC_CRASH_3, - SFX_BMYBU_GENERIC_CRASH_4, - SFX_BMYBU_GENERIC_CRASH_5, - SFX_BMYBU_GENERIC_CRASH_6, - SFX_BMYBU_GENERIC_CRASH_7, - SFX_BMYBU_GUN_PANIC_1, - SFX_BMYBU_GUN_PANIC_2, - SFX_BMYBU_GUN_PANIC_3, - SFX_BMYBU_GUN_PANIC_4, - SFX_BMYBU_GUN_PANIC_5, - SFX_BMYBU_INNOCENT_1, - SFX_BMYBU_INNOCENT_2, - SFX_BMYBU_JACKED_1, - SFX_BMYBU_JACKED_2, - SFX_BMYBU_JACKED_3, - SFX_BMYBU_JACKED_4, - SFX_BMYBU_JACKED_5, - SFX_BMYBU_JACKED_6, - SFX_BMYBU_MUGGED_1, - SFX_BMYBU_MUGGED_2, - SFX_BMYBU_SAVED_1, - SFX_BMYBU_SHOCKED_1, - SFX_BMYBU_SHOCKED_2, - SFX_BMYBU_TAXI_1, - - SFX_WMYSK_BUMP_1, - SFX_WMYSK_BUMP_2, - SFX_WMYSK_BUMP_3, - SFX_WMYSK_BUMP_4, - SFX_WMYSK_BUMP_5, - SFX_WMYSK_BUMP_6, - SFX_WMYSK_BUMP_7, - SFX_WMYSK_BUMP_8, - SFX_WMYSK_BUMP_9, - SFX_WMYSK_BUMP_10, - SFX_WMYSK_BUMP_11, - SFX_WMYSK_BUMP_12, - SFX_WMYSK_BUMP_13, - SFX_WMYSK_BUMP_14, - SFX_WMYSK_CHAT_1, - SFX_WMYSK_CHAT_2, - SFX_WMYSK_CHAT_3, - SFX_WMYSK_CHAT_4, - SFX_WMYSK_CHAT_5, - SFX_WMYSK_CHAT_6, - SFX_WMYSK_CHAT_7, - SFX_WMYSK_CHAT_8, - SFX_WMYSK_CHAT_9, - SFX_WMYSK_CHAT_10, - SFX_WMYSK_CHAT_11, - SFX_WMYSK_CHAT_12, - SFX_WMYSK_CHAT_13, - SFX_WMYSK_DODGE_1, - SFX_WMYSK_DODGE_2, - SFX_WMYSK_DODGE_3, - SFX_WMYSK_DODGE_4, - SFX_WMYSK_DODGE_5, - SFX_WMYSK_DODGE_6, - SFX_WMYSK_DODGE_7, - SFX_WMYSK_DODGE_8, - SFX_WMYSK_DODGE_9, - SFX_WMYSK_DODGE_10, - SFX_WMYSK_EYEING_1, - SFX_WMYSK_EYEING_2, - SFX_WMYSK_FIGHT_1, - SFX_WMYSK_FIGHT_2, - SFX_WMYSK_FIGHT_3, - SFX_WMYSK_FIGHT_4, - SFX_WMYSK_FIGHT_5, - SFX_WMYSK_GUN_PANIC_1, - SFX_WMYSK_GUN_PANIC_2, - SFX_WMYSK_GUN_PANIC_3, - SFX_WMYSK_GUN_PANIC_4, - SFX_WMYSK_GUN_PANIC_5, - SFX_WMYSK_INNOCENT_1, - SFX_WMYSK_INNOCENT_2, - SFX_WMYSK_INNOCENT_3, - SFX_WMYSK_LOST_1, - SFX_WMYSK_LOST_2, - SFX_WMYSK_MUGGED_1, - SFX_WMYSK_MUGGED_2, - SFX_WMYSK_SAVED_1, - SFX_WMYSK_SAVED_2, - SFX_WMYSK_SHOCKED_1, - SFX_WMYSK_SHOCKED_2, - SFX_WMYSK_TAXI_1, - - SFX_WMYCW_BLOCKED_1, - SFX_WMYCW_BLOCKED_2, - SFX_WMYCW_BLOCKED_3, - SFX_WMYCW_BLOCKED_4, - SFX_WMYCW_BLOCKED_5, - SFX_WMYCW_BLOCKED_6, - SFX_WMYCW_BLOCKED_7, - SFX_WMYCW_BLOCKED_8, - SFX_WMYCW_BLOCKED_9, - SFX_WMYCW_BUMP_1, - SFX_WMYCW_BUMP_2, - SFX_WMYCW_BUMP_3, - SFX_WMYCW_BUMP_4, - SFX_WMYCW_BUMP_5, - SFX_WMYCW_BUMP_6, - SFX_WMYCW_BUMP_7, - SFX_WMYCW_BUMP_8, - SFX_WMYCW_BUMP_9, - SFX_WMYCW_CAR_CRASH_1, - SFX_WMYCW_CAR_CRASH_2, - SFX_WMYCW_CAR_CRASH_3, - SFX_WMYCW_CAR_CRASH_4, - SFX_WMYCW_CAR_CRASH_5, - SFX_WMYCW_CAR_CRASH_6, - SFX_WMYCW_CAR_CRASH_7, - SFX_WMYCW_CAR_CRASH_8, - SFX_WMYCW_CAR_CRASH_9, - SFX_WMYCW_CHAT_1, - SFX_WMYCW_CHAT_2, - SFX_WMYCW_CHAT_3, - SFX_WMYCW_CHAT_4, - SFX_WMYCW_CHAT_5, - SFX_WMYCW_CHAT_6, - SFX_WMYCW_CHAT_7, - SFX_WMYCW_CHAT_8, - SFX_WMYCW_CHAT_9, - SFX_WMYCW_CHAT_10, - SFX_WMYCW_CHAT_11, - SFX_WMYCW_CHAT_12, - SFX_WMYCW_CHAT_13, - SFX_WMYCW_CHAT_14, - SFX_WMYCW_CHAT_15, - SFX_WMYCW_DODGE_1, - SFX_WMYCW_DODGE_2, - SFX_WMYCW_DODGE_3, - SFX_WMYCW_DODGE_4, - SFX_WMYCW_DODGE_5, - SFX_WMYCW_DODGE_6, - SFX_WMYCW_DODGE_7, - SFX_WMYCW_DODGE_8, - SFX_WMYCW_DODGE_9, - SFX_WMYCW_DODGE_10, - SFX_WMYCW_EYEING_1, - SFX_WMYCW_EYEING_2, - SFX_WMYCW_EYEING_3, - SFX_WMYCW_FIGHT_1, - SFX_WMYCW_FIGHT_2, - SFX_WMYCW_FIGHT_3, - SFX_WMYCW_FIGHT_4, - SFX_WMYCW_FIGHT_5, - SFX_WMYCW_FIGHT_6, - SFX_WMYCW_FIGHT_7, - SFX_WMYCW_FIGHT_8, - SFX_WMYCW_GENERIC_CRASH_1, - SFX_WMYCW_GENERIC_CRASH_2, - SFX_WMYCW_GENERIC_CRASH_3, - SFX_WMYCW_GENERIC_CRASH_4, - SFX_WMYCW_GENERIC_CRASH_5, - SFX_WMYCW_GENERIC_CRASH_6, - SFX_WMYCW_GENERIC_CRASH_7, - SFX_WMYCW_GUN_PANIC_1, - SFX_WMYCW_GUN_PANIC_2, - SFX_WMYCW_GUN_PANIC_3, - SFX_WMYCW_GUN_PANIC_4, - SFX_WMYCW_GUN_PANIC_5, - SFX_WMYCW_GUN_PANIC_6, - SFX_WMYCW_INNOCENT_1, - SFX_WMYCW_INNOCENT_2, - SFX_WMYCW_INNOCENT_3, - SFX_WMYCW_JACKED_1, - SFX_WMYCW_JACKED_2, - SFX_WMYCW_JACKED_3, - SFX_WMYCW_JACKED_4, - SFX_WMYCW_JACKED_5, - SFX_WMYCW_JACKED_6, - SFX_WMYCW_JEER_1, - SFX_WMYCW_JEER_2, - SFX_WMYCW_JEER_3, - SFX_WMYCW_JEER_4, - SFX_WMYCW_JEER_5, - SFX_WMYCW_JACKING_1, - SFX_WMYCW_JACKING_2, - SFX_WMYCW_JACKING_3, - SFX_WMYCW_JACKING_4, - SFX_WMYCW_LOST_1, - SFX_WMYCW_LOST_2, - SFX_WMYCW_MUGGED_1, - SFX_WMYCW_TAXI_1, - - SFX_HFYST_BLOCKED_1, - SFX_HFYST_BLOCKED_2, - SFX_HFYST_BLOCKED_3, - SFX_HFYST_BLOCKED_4, - SFX_HFYST_BLOCKED_5, - SFX_HFYST_BLOCKED_6, - SFX_HFYST_BLOCKED_7, - SFX_HFYST_BUMP_1, - SFX_HFYST_BUMP_2, - SFX_HFYST_BUMP_3, - SFX_HFYST_BUMP_4, - SFX_HFYST_BUMP_5, - SFX_HFYST_BUMP_6, - SFX_HFYST_BUMP_7, - SFX_HFYST_BUMP_8, - SFX_HFYST_BUMP_9, - SFX_HFYST_BUMP_10, - SFX_HFYST_CAR_CRASH_1, - SFX_HFYST_CAR_CRASH_2, - SFX_HFYST_CAR_CRASH_3, - SFX_HFYST_CAR_CRASH_4, - SFX_HFYST_CAR_CRASH_5, - SFX_HFYST_CAR_CRASH_6, - SFX_HFYST_CAR_CRASH_7, - SFX_HFYST_CAR_CRASH_8, - SFX_HFYST_CHAT_1, - SFX_HFYST_CHAT_2, - SFX_HFYST_CHAT_3, - SFX_HFYST_CHAT_4, - SFX_HFYST_CHAT_5, - SFX_HFYST_CHAT_6, - SFX_HFYST_CHAT_7, - SFX_HFYST_CHAT_8, - SFX_HFYST_CHAT_9, - SFX_HFYST_DODGE_1, - SFX_HFYST_DODGE_2, - SFX_HFYST_DODGE_3, - SFX_HFYST_DODGE_4, - SFX_HFYST_DODGE_5, - SFX_HFYST_DODGE_6, - SFX_HFYST_DODGE_7, - SFX_HFYST_DODGE_8, - SFX_HFYST_DODGE_9, - SFX_HFYST_DODGE_10, - SFX_HFYST_FIGHT_1, - SFX_HFYST_FIGHT_2, - SFX_HFYST_FIGHT_3, - SFX_HFYST_FIGHT_4, - SFX_HFYST_FIGHT_5, - SFX_HFYST_FIGHT_6, - SFX_HFYST_FIGHT_7, - SFX_HFYST_GENERIC_CRASH_1, - SFX_HFYST_GENERIC_CRASH_2, - SFX_HFYST_GENERIC_CRASH_3, - SFX_HFYST_GENERIC_CRASH_4, - SFX_HFYST_GENERIC_CRASH_5, - SFX_HFYST_GENERIC_CRASH_6, - SFX_HFYST_GENERIC_CRASH_7, - SFX_HFYST_GUN_COOL_1, - SFX_HFYST_GUN_COOL_2, - SFX_HFYST_GUN_COOL_3, - SFX_HFYST_GUN_COOL_4, - SFX_HFYST_GUN_COOL_5, - SFX_HFYST_JACKED_1, - SFX_HFYST_JACKED_2, - SFX_HFYST_JACKED_3, - SFX_HFYST_JACKED_4, - SFX_HFYST_JACKED_5, - SFX_HFYST_JACKED_6, - SFX_HFYST_JACKING_1, - SFX_HFYST_JACKING_2, - SFX_HFYST_JACKING_3, - SFX_HFYST_JACKING_4, - SFX_HFYST_LOST_1, - SFX_HFYST_LOST_2, - SFX_HFYST_MUGGED_1, - SFX_HFYST_MUGGED_2, - SFX_HFYST_MUGGING_1, - SFX_HFYST_MUGGING_2, - SFX_HFYST_MUGGING_3, - SFX_HFYST_MUGGING_4, - SFX_HFYST_TAXI_1, - - SFX_HMOST_BLOCKED_1, - SFX_HMOST_BLOCKED_2, - SFX_HMOST_BLOCKED_3, - SFX_HMOST_BLOCKED_4, - SFX_HMOST_BLOCKED_5, - SFX_HMOST_BLOCKED_6, - SFX_HMOST_BLOCKED_7, - SFX_HMOST_BUMP_1, - SFX_HMOST_BUMP_2, - SFX_HMOST_BUMP_3, - SFX_HMOST_BUMP_4, - SFX_HMOST_BUMP_5, - SFX_HMOST_BUMP_6, - SFX_HMOST_BUMP_7, - SFX_HMOST_BUMP_8, - SFX_HMOST_BUMP_9, - SFX_HMOST_BUMP_10, - SFX_HMOST_CAR_CRASH_1, - SFX_HMOST_CAR_CRASH_2, - SFX_HMOST_CAR_CRASH_3, - SFX_HMOST_CAR_CRASH_4, - SFX_HMOST_CAR_CRASH_5, - SFX_HMOST_CAR_CRASH_6, - SFX_HMOST_CAR_CRASH_7, - SFX_HMOST_CHAT_1, - SFX_HMOST_CHAT_2, - SFX_HMOST_CHAT_3, - SFX_HMOST_CHAT_4, - SFX_HMOST_CHAT_5, - SFX_HMOST_CHAT_6, - SFX_HMOST_CHAT_7, - SFX_HMOST_CHAT_8, - SFX_HMOST_CHAT_9, - SFX_HMOST_CHAT_10, - SFX_HMOST_CHAT_11, - SFX_HMOST_DODGE_1, - SFX_HMOST_DODGE_2, - SFX_HMOST_DODGE_3, - SFX_HMOST_DODGE_4, - SFX_HMOST_DODGE_5, - SFX_HMOST_DODGE_6, - SFX_HMOST_DODGE_7, - SFX_HMOST_DODGE_8, - SFX_HMOST_DODGE_9, - SFX_HMOST_EYEING_1, - SFX_HMOST_FIGHT_1, - SFX_HMOST_FIGHT_2, - SFX_HMOST_FIGHT_3, - SFX_HMOST_FIGHT_4, - SFX_HMOST_FIGHT_5, - SFX_HMOST_FIGHT_6, - SFX_HMOST_FIGHT_7, - SFX_HMOST_FIGHT_8, - SFX_HMOST_GENERIC_CRASH_1, - SFX_HMOST_GENERIC_CRASH_2, - SFX_HMOST_GENERIC_CRASH_3, - SFX_HMOST_GENERIC_CRASH_4, - SFX_HMOST_GENERIC_CRASH_5, - SFX_HMOST_GENERIC_CRASH_6, - SFX_HMOST_GENERIC_CRASH_7, - SFX_HMOST_GUN_COOL_1, - SFX_HMOST_GUN_COOL_2, - SFX_HMOST_GUN_COOL_3, - SFX_HMOST_GUN_COOL_4, - SFX_HMOST_GUN_COOL_5, - SFX_HMOST_JACKED_1, - SFX_HMOST_JACKED_2, - SFX_HMOST_JACKED_3, - SFX_HMOST_JACKED_4, - SFX_HMOST_JACKED_5, - SFX_HMOST_JACKED_6, - SFX_HMOST_JACKING_1, - SFX_HMOST_JACKING_2, - SFX_HMOST_JACKING_3, - SFX_HMOST_LOST_1, - SFX_HMOST_LOST_2, - SFX_HMOST_MUGGED_1, - SFX_HMOST_MUGGED_2, - SFX_HMOST_TAXI_1, - - SFX_HMYRI_BLOCKED_1, - SFX_HMYRI_BLOCKED_2, - SFX_HMYRI_BLOCKED_3, - SFX_HMYRI_BLOCKED_4, - SFX_HMYRI_BLOCKED_5, - SFX_HMYRI_BLOCKED_6, - SFX_HMYRI_BLOCKED_7, - SFX_HMYRI_BUMP_1, - SFX_HMYRI_BUMP_2, - SFX_HMYRI_BUMP_3, - SFX_HMYRI_BUMP_4, - SFX_HMYRI_BUMP_5, - SFX_HMYRI_BUMP_6, - SFX_HMYRI_BUMP_7, - SFX_HMYRI_BUMP_8, - SFX_HMYRI_BUMP_9, - SFX_HMYRI_BUMP_10, - SFX_HMYRI_CAR_CRASH_1, - SFX_HMYRI_CAR_CRASH_2, - SFX_HMYRI_CAR_CRASH_3, - SFX_HMYRI_CAR_CRASH_4, - SFX_HMYRI_CAR_CRASH_5, - SFX_HMYRI_CAR_CRASH_6, - SFX_HMYRI_CAR_CRASH_7, - SFX_HMYRI_CAR_CRASH_8, - SFX_HMYRI_DODGE_1, - SFX_HMYRI_DODGE_2, - SFX_HMYRI_DODGE_3, - SFX_HMYRI_DODGE_4, - SFX_HMYRI_DODGE_5, - SFX_HMYRI_DODGE_6, - SFX_HMYRI_DODGE_7, - SFX_HMYRI_DODGE_8, - SFX_HMYRI_DODGE_9, - SFX_HMYRI_FIGHT_1, - SFX_HMYRI_FIGHT_2, - SFX_HMYRI_FIGHT_3, - SFX_HMYRI_FIGHT_4, - SFX_HMYRI_FIGHT_5, - SFX_HMYRI_GENERIC_CRASH_1, - SFX_HMYRI_GENERIC_CRASH_2, - SFX_HMYRI_GENERIC_CRASH_3, - SFX_HMYRI_GENERIC_CRASH_4, - SFX_HMYRI_GENERIC_CRASH_5, - SFX_HMYRI_GENERIC_CRASH_6, - SFX_HMYRI_GENERIC_CRASH_7, - SFX_HMYRI_GENERIC_CRASH_8, - SFX_HMYRI_GENERIC_CRASH_9, - SFX_HMYRI_GENERIC_CRASH_10, - SFX_HMYRI_GENERIC_CRASH_11, - SFX_HMYRI_GENERIC_CRASH_12, - SFX_HMYRI_GUN_PANIC_1, - SFX_HMYRI_GUN_PANIC_2, - SFX_HMYRI_GUN_PANIC_3, - SFX_HMYRI_GUN_PANIC_4, - SFX_HMYRI_GUN_PANIC_5, - SFX_HMYRI_GUN_PANIC_6, - SFX_HMYRI_GUN_PANIC_7, - SFX_HMYRI_JACKED_1, - SFX_HMYRI_JACKED_2, - SFX_HMYRI_JACKED_3, - SFX_HMYRI_JACKED_4, - SFX_HMYRI_JACKED_5, - SFX_HMYRI_JACKED_6, - SFX_HMYRI_JACKED_7, - SFX_HMYRI_JACKED_8, - SFX_HMYRI_JACKING_1, - SFX_HMYRI_JACKING_2, - SFX_HMYRI_JACKING_3, - SFX_HMYRI_MUGGED_1, - SFX_HMYRI_SHOCKED_1, - SFX_HMYRI_SHOCKED_2, - SFX_HMYRI_SHOCKED_3, - - SFX_HFYPR_BUMP_1, - SFX_HFYPR_BUMP_2, - SFX_HFYPR_BUMP_3, - SFX_HFYPR_BUMP_4, - SFX_HFYPR_BUMP_5, - SFX_HFYPR_BUMP_6, - SFX_HFYPR_BUMP_7, - SFX_HFYPR_BUMP_8, - SFX_HFYPR_BUMP_9, - SFX_HFYPR_BUMP_10, - SFX_HFYPR_CHAT_1, - SFX_HFYPR_CHAT_2, - SFX_HFYPR_CHAT_3, - SFX_HFYPR_CHAT_4, - SFX_HFYPR_CHAT_5, - SFX_HFYPR_CHAT_6, - SFX_HFYPR_CHAT_7, - SFX_HFYPR_CHAT_8, - SFX_HFYPR_CHAT_9, - SFX_HFYPR_CHAT_10, - SFX_HFYPR_CHAT_11, - SFX_HFYPR_CHAT_12, - SFX_HFYPR_DODGE_1, - SFX_HFYPR_DODGE_2, - SFX_HFYPR_DODGE_3, - SFX_HFYPR_DODGE_4, - SFX_HFYPR_DODGE_5, - SFX_HFYPR_DODGE_6, - SFX_HFYPR_DODGE_7, - SFX_HFYPR_DODGE_8, - SFX_HFYPR_DODGE_9, - SFX_HFYPR_EYEING_1, - SFX_HFYPR_EYEING_2, - SFX_HFYPR_EYEING_3, - SFX_HFYPR_FIGHT_1, - SFX_HFYPR_FIGHT_2, - SFX_HFYPR_FIGHT_3, - SFX_HFYPR_FIGHT_4, - SFX_HFYPR_FIGHT_5, - SFX_HFYPR_FIGHT_6, - SFX_HFYPR_FIGHT_7, - SFX_HFYPR_FIGHT_8, - SFX_HFYPR_FIGHT_9, - SFX_HFYPR_FIGHT_10, - SFX_HFYPR_FUCKING_1, - SFX_HFYPR_FUCKING_2, - SFX_HFYPR_FUCKING_3, - SFX_HFYPR_FUCKING_4, - SFX_HFYPR_FUCKING_5, - SFX_HFYPR_FUCKING_6, - SFX_HFYPR_FUCKING_7, - SFX_HFYPR_FUCKING_8, - SFX_HFYPR_GUN_COOL_1, - SFX_HFYPR_GUN_COOL_2, - SFX_HFYPR_GUN_COOL_3, - SFX_HFYPR_GUN_COOL_4, - SFX_HFYPR_GUN_COOL_5, - SFX_HFYPR_GUN_COOL_6, - SFX_HFYPR_MUGGED_1, - SFX_HFYPR_MUGGED_2, - SFX_HFYPR_SAVED_1, - SFX_HFYPR_SOLICIT_1, - SFX_HFYPR_SOLICIT_2, - SFX_HFYPR_SOLICIT_3, - SFX_HFYPR_SOLICIT_4, - SFX_HFYPR_SOLICIT_5, - SFX_HFYPR_SOLICIT_6, - SFX_HFYPR_SOLICIT_7, - SFX_HFYPR_SOLICIT_8, - SFX_HFYPR_SOLICIT_9, - SFX_HFYPR_SOLICIT_10, - SFX_HFYPR_SOLICIT_11, - SFX_HFYPR_SOLICIT_12, - SFX_HFYPR_SOLICIT_13, - SFX_HFYPR_SOLICIT_14, - SFX_HFYPR_TAXI_1, - - SFX_HFYMD_BUMP_1, - SFX_HFYMD_BUMP_2, - SFX_HFYMD_BUMP_3, - SFX_HFYMD_BUMP_4, - SFX_HFYMD_BUMP_5, - SFX_HFYMD_BUMP_6, - SFX_HFYMD_BUMP_7, - SFX_HFYMD_BUMP_8, - SFX_HFYMD_BUMP_9, - SFX_HFYMD_DODGE_1, - SFX_HFYMD_DODGE_2, - SFX_HFYMD_DODGE_3, - SFX_HFYMD_DODGE_4, - SFX_HFYMD_DODGE_5, - SFX_HFYMD_DODGE_6, - SFX_HFYMD_DODGE_7, - SFX_HFYMD_DODGE_8, - SFX_HFYMD_FIGHT_1, - SFX_HFYMD_FIGHT_2, - SFX_HFYMD_FIGHT_3, - SFX_HFYMD_FIGHT_4, - SFX_HFYMD_FIGHT_5, - SFX_HFYMD_FIGHT_6, - SFX_HFYMD_FIGHT_7, - SFX_HFYMD_FIGHT_8, - SFX_HFYMD_FIGHT_9, - SFX_HFYMD_GUN_PANIC_1, - SFX_HFYMD_GUN_PANIC_2, - SFX_HFYMD_GUN_PANIC_3, - SFX_HFYMD_GUN_PANIC_4, - SFX_HFYMD_GUN_PANIC_5, - SFX_HFYMD_MUGGED_1, - SFX_HFYMD_MUGGED_2, - SFX_HFYMD_SAVED_1, - SFX_HFYMD_SAVED_2, - SFX_HFYMD_SAVED_3, - SFX_HFYMD_SOLICIT_1, - SFX_HFYMD_SOLICIT_2, - SFX_HFYMD_SOLICIT_3, - SFX_HFYMD_SOLICIT_4, - SFX_HFYMD_SOLICIT_5, - SFX_HFYMD_SOLICIT_6, - SFX_HFYMD_SOLICIT_7, - SFX_HFYMD_SOLICIT_8, - SFX_HFYMD_SOLICIT_9, - SFX_HFYMD_SOLICIT_10, - SFX_HFYMD_SOLICIT_11, - SFX_HFYMD_SOLICIT_12, - SFX_HFYMD_SOLICIT_13, - SFX_HFYMD_SOLICIT_14, - SFX_HFYMD_SOLICIT_15, - SFX_HFYMD_TAXI_1, - - SFX_WFOBE_BLOCKED_1, - SFX_WFOBE_BLOCKED_2, - SFX_WFOBE_BLOCKED_3, - SFX_WFOBE_BLOCKED_4, - SFX_WFOBE_BLOCKED_5, - SFX_WFOBE_BLOCKED_6, - SFX_WFOBE_BLOCKED_7, - SFX_WFOBE_BLOCKED_8, - SFX_WFOBE_BUMP_1, - SFX_WFOBE_BUMP_2, - SFX_WFOBE_BUMP_3, - SFX_WFOBE_BUMP_4, - SFX_WFOBE_BUMP_5, - SFX_WFOBE_BUMP_6, - SFX_WFOBE_BUMP_7, - SFX_WFOBE_BUMP_8, - SFX_WFOBE_BUMP_9, - SFX_WFOBE_BUMP_10, - SFX_WFOBE_CAR_CRASH_1, - SFX_WFOBE_CAR_CRASH_2, - SFX_WFOBE_CAR_CRASH_3, - SFX_WFOBE_CAR_CRASH_4, - SFX_WFOBE_CAR_CRASH_5, - SFX_WFOBE_CAR_CRASH_6, - SFX_WFOBE_CAR_CRASH_7, - SFX_WFOBE_CHAT_1, - SFX_WFOBE_CHAT_2, - SFX_WFOBE_CHAT_3, - SFX_WFOBE_CHAT_4, - SFX_WFOBE_CHAT_5, - SFX_WFOBE_CHAT_6, - SFX_WFOBE_CHAT_7, - SFX_WFOBE_CHAT_8, - SFX_WFOBE_CHAT_9, - SFX_WFOBE_CHAT_10, - SFX_WFOBE_DODGE_1, - SFX_WFOBE_DODGE_2, - SFX_WFOBE_DODGE_3, - SFX_WFOBE_DODGE_4, - SFX_WFOBE_DODGE_5, - SFX_WFOBE_DODGE_6, - SFX_WFOBE_DODGE_7, - SFX_WFOBE_DODGE_8, - SFX_WFOBE_GENERIC_CRASH_1, - SFX_WFOBE_GENERIC_CRASH_2, - SFX_WFOBE_GENERIC_CRASH_3, - SFX_WFOBE_GENERIC_CRASH_4, - SFX_WFOBE_GENERIC_CRASH_5, - SFX_WFOBE_GENERIC_CRASH_6, - SFX_WFOBE_GENERIC_CRASH_7, - SFX_WFOBE_GENERIC_CRASH_8, - SFX_WFOBE_GENERIC_CRASH_9, - SFX_WFOBE_GENERIC_CRASH_10, - SFX_WFOBE_GUN_PANIC_1, - SFX_WFOBE_GUN_PANIC_2, - SFX_WFOBE_GUN_PANIC_3, - SFX_WFOBE_GUN_PANIC_4, - SFX_WFOBE_GUN_PANIC_5, - SFX_WFOBE_JACKED_1, - SFX_WFOBE_JACKED_2, - SFX_WFOBE_JACKED_3, - SFX_WFOBE_JACKED_4, - SFX_WFOBE_RUN_1, - SFX_WFOBE_RUN_2, - SFX_WFOBE_RUN_3, - SFX_WFOBE_RUN_4, - SFX_WFOBE_RUN_5, - SFX_WFOBE_RUN_6, - SFX_WFOBE_RUN_7, - SFX_WFOBE_SAVED_1, - SFX_WFOBE_SAVED_2, - SFX_WFOBE_SAVED_3, - SFX_WFOBE_SHOCKED_1, - SFX_WFOBE_SHOCKED_2, - SFX_WFOBE_SHOCKED_3, - SFX_WFOBE_TAXI_1, - SFX_WFOBE_TAXI_2, - - SFX_BFYRI_BLOCKED_1, - SFX_BFYRI_BLOCKED_2, - SFX_BFYRI_BLOCKED_3, - SFX_BFYRI_BLOCKED_4, - SFX_BFYRI_BLOCKED_5, - SFX_BFYRI_BLOCKED_6, - SFX_BFYRI_BLOCKED_7, - SFX_BFYRI_BLOCKED_8, - SFX_BFYRI_BLOCKED_9, - SFX_BFYRI_BUMP_1, - SFX_BFYRI_BUMP_2, - SFX_BFYRI_BUMP_3, - SFX_BFYRI_BUMP_4, - SFX_BFYRI_BUMP_5, - SFX_BFYRI_BUMP_6, - SFX_BFYRI_BUMP_7, - SFX_BFYRI_BUMP_8, - SFX_BFYRI_BUMP_9, - SFX_BFYRI_CAR_CRASH_1, - SFX_BFYRI_CAR_CRASH_2, - SFX_BFYRI_CAR_CRASH_3, - SFX_BFYRI_CAR_CRASH_4, - SFX_BFYRI_CAR_CRASH_5, - SFX_BFYRI_CAR_CRASH_6, - SFX_BFYRI_CAR_CRASH_7, - SFX_BFYRI_CAR_CRASH_8, - SFX_BFYRI_DODGE_1, - SFX_BFYRI_DODGE_2, - SFX_BFYRI_DODGE_3, - SFX_BFYRI_DODGE_4, - SFX_BFYRI_DODGE_5, - SFX_BFYRI_DODGE_6, - SFX_BFYRI_DODGE_7, - SFX_BFYRI_DODGE_8, - SFX_BFYRI_EYEING_1, - SFX_BFYRI_EYEING_2, - SFX_BFYRI_EYEING_3, - SFX_BFYRI_GENERIC_CRASH_1, - SFX_BFYRI_GENERIC_CRASH_2, - SFX_BFYRI_GENERIC_CRASH_3, - SFX_BFYRI_GENERIC_CRASH_4, - SFX_BFYRI_GENERIC_CRASH_5, - SFX_BFYRI_GENERIC_CRASH_6, - SFX_BFYRI_GENERIC_CRASH_7, - SFX_BFYRI_GUN_PANIC_1, - SFX_BFYRI_GUN_PANIC_2, - SFX_BFYRI_GUN_PANIC_3, - SFX_BFYRI_GUN_PANIC_4, - SFX_BFYRI_JACKED_1, - SFX_BFYRI_JACKED_2, - SFX_BFYRI_JACKED_3, - SFX_BFYRI_JACKED_4, - SFX_BFYRI_JACKED_5, - SFX_BFYRI_JACKED_6, - SFX_BFYRI_JACKED_7, - SFX_BFYRI_JACKED_8, - SFX_BFYRI_JACKING_1, - SFX_BFYRI_JACKING_2, - SFX_BFYRI_JACKING_3, - SFX_BFYRI_JACKING_4, - SFX_BFYRI_LOST_1, - SFX_BFYRI_LOST_2, - SFX_BFYRI_MUGGED_1, - SFX_BFYRI_MUGGED_2, - SFX_BFYRI_MUGGED_3, - SFX_BFYRI_RUN_1, - SFX_BFYRI_RUN_2, - SFX_BFYRI_RUN_3, - SFX_BFYRI_RUN_4, - SFX_BFYRI_RUN_5, - SFX_BFYRI_RUN_6, - SFX_BFYRI_SAVED_1, - SFX_BFYRI_SAVED_2, - SFX_BFYRI_SHOCKED_1, - SFX_BFYRI_SHOCKED_2, - SFX_BFYRI_SHOCKED_3, - SFX_BFYRI_SHOCKED_4, - SFX_BFYRI_TAXI_1, - - SFX_BFYBE_BLOCKED_1, - SFX_BFYBE_BLOCKED_2, - SFX_BFYBE_BLOCKED_3, - SFX_BFYBE_BLOCKED_4, - SFX_BFYBE_BLOCKED_5, - SFX_BFYBE_BLOCKED_6, - SFX_BFYBE_BLOCKED_7, - SFX_BFYBE_BLOCKED_8, - SFX_BFYBE_BLOCKED_9, - SFX_BFYBE_BLOCKED_10, - SFX_BFYBE_BLOCKED_11, - SFX_BFYBE_BLOCKED_12, - SFX_BFYBE_CAR_CRASH_1, - SFX_BFYBE_CAR_CRASH_2, - SFX_BFYBE_CAR_CRASH_3, - SFX_BFYBE_CAR_CRASH_4, - SFX_BFYBE_CAR_CRASH_5, - SFX_BFYBE_CAR_CRASH_6, - SFX_BFYBE_CAR_CRASH_7, - SFX_BFYBE_CAR_CRASH_8, - SFX_BFYBE_CAR_CRASH_9, - SFX_BFYBE_CAR_CRASH_10, - SFX_BFYBE_CHAT_1, - SFX_BFYBE_CHAT_2, - SFX_BFYBE_CHAT_3, - SFX_BFYBE_CHAT_4, - SFX_BFYBE_CHAT_5, - SFX_BFYBE_CHAT_6, - SFX_BFYBE_CHAT_7, - SFX_BFYBE_CHAT_8, - SFX_BFYBE_CHAT_9, - SFX_BFYBE_CHAT_10, - SFX_BFYBE_CHAT_11, - SFX_BFYBE_CHAT_12, - SFX_BFYBE_CHAT_13, - SFX_BFYBE_CHAT_14, - SFX_BFYBE_CHAT_15, - SFX_BFYBE_CHAT_16, - SFX_BFYBE_DODGE_1, - SFX_BFYBE_DODGE_2, - SFX_BFYBE_DODGE_3, - SFX_BFYBE_DODGE_4, - SFX_BFYBE_DODGE_5, - SFX_BFYBE_DODGE_6, - SFX_BFYBE_DODGE_7, - SFX_BFYBE_DODGE_8, - SFX_BFYBE_DODGE_9, - SFX_BFYBE_DODGE_10, - SFX_BFYBE_EYEING_1, - SFX_BFYBE_EYEING_2, - SFX_BFYBE_EYEING_3, - SFX_BFYBE_EYEING_4, - SFX_BFYBE_GENERIC_CRASH_1, - SFX_BFYBE_GENERIC_CRASH_2, - SFX_BFYBE_GENERIC_CRASH_3, - SFX_BFYBE_GENERIC_CRASH_4, - SFX_BFYBE_GENERIC_CRASH_5, - SFX_BFYBE_GENERIC_CRASH_6, - SFX_BFYBE_GENERIC_CRASH_7, - SFX_BFYBE_GENERIC_CRASH_8, - SFX_BFYBE_GUN_COOL_1, - SFX_BFYBE_GUN_COOL_2, - SFX_BFYBE_GUN_COOL_3, - SFX_BFYBE_GUN_COOL_4, - SFX_BFYBE_GUN_COOL_5, - SFX_BFYBE_GUN_COOL_6, - SFX_BFYBE_JACKED_1, - SFX_BFYBE_JACKED_2, - SFX_BFYBE_JACKED_3, - SFX_BFYBE_JACKED_4, - SFX_BFYBE_JACKED_5, - SFX_BFYBE_JACKED_6, - SFX_BFYBE_JACKED_7, - SFX_BFYBE_JACKED_8, - SFX_BFYBE_LOST_1, - SFX_BFYBE_LOST_2, - SFX_BFYBE_LOST_3, - SFX_BFYBE_LOST_4, - SFX_BFYBE_MUGGED_1, - SFX_BFYBE_MUGGED_2, - SFX_BFYBE_MUGGED_3, - SFX_BFYBE_MUGGED_4, - SFX_BFYBE_MUGGED_5, - SFX_BFYBE_RUN_1, - SFX_BFYBE_RUN_2, - SFX_BFYBE_RUN_3, - SFX_BFYBE_RUN_4, - SFX_BFYBE_RUN_5, - SFX_BFYBE_RUN_6, - SFX_BFYBE_SAVED_1, - SFX_BFYBE_SAVED_2, - SFX_BFYBE_SHOCKED_1, - SFX_BFYBE_SHOCKED_2, - SFX_BFYBE_SHOCKED_3, - SFX_BFYBE_SHOCKED_4, - SFX_BFYBE_TAXI_1, - SFX_BFYBE_TAXI_2, - SFX_BFYBE_TAXI_3, - - SFX_BMOTR_BUMP_1, - SFX_BMOTR_BUMP_2, - SFX_BMOTR_BUMP_3, - SFX_BMOTR_BUMP_4, - SFX_BMOTR_BUMP_5, - SFX_BMOTR_BUMP_6, - SFX_BMOTR_BUMP_7, - SFX_BMOTR_BUMP_8, - SFX_BMOTR_BUMP_9, - SFX_BMOTR_BUMP_10, - SFX_BMOTR_CHAT_1, - SFX_BMOTR_CHAT_2, - SFX_BMOTR_CHAT_3, - SFX_BMOTR_CHAT_4, - SFX_BMOTR_CHAT_5, - SFX_BMOTR_CHAT_6, - SFX_BMOTR_CHAT_7, - SFX_BMOTR_CHAT_8, - SFX_BMOTR_CHAT_9, - SFX_BMOTR_CHAT_10, - SFX_BMOTR_DODGE_1, - SFX_BMOTR_DODGE_2, - SFX_BMOTR_DODGE_3, - SFX_BMOTR_DODGE_4, - SFX_BMOTR_DODGE_5, - SFX_BMOTR_DODGE_6, - SFX_BMOTR_DODGE_7, - SFX_BMOTR_DODGE_8, - SFX_BMOTR_DODGE_9, - SFX_BMOTR_DODGE_10, - SFX_BMOTR_DODGE_11, - SFX_BMOTR_EYEING_1, - SFX_BMOTR_EYEING_2, - SFX_BMOTR_EYEING_3, - SFX_BMOTR_GUN_COOL_1, - SFX_BMOTR_GUN_COOL_2, - SFX_BMOTR_GUN_COOL_3, - SFX_BMOTR_GUN_COOL_4, - SFX_BMOTR_GUN_COOL_5, - SFX_BMOTR_INNOCENT_1, - SFX_BMOTR_INNOCENT_2, - SFX_BMOTR_INNOCENT_3, - SFX_BMOTR_INNOCENT_4, - SFX_BMOTR_RUN_1, - SFX_BMOTR_RUN_2, - SFX_BMOTR_RUN_3, - SFX_BMOTR_RUN_4, - SFX_BMOTR_RUN_5, - SFX_BMOTR_RUN_6, - SFX_BMOTR_RUN_7, - SFX_BMOTR_SAVED_1, - SFX_BMOTR_SOLICIT_1, - SFX_BMOTR_SOLICIT_2, - SFX_BMOTR_SOLICIT_3, - SFX_BMOTR_SOLICIT_4, - SFX_BMOTR_SOLICIT_5, - SFX_BMOTR_SOLICIT_6, - SFX_BMOTR_SOLICIT_7, - SFX_BMOTR_TAXI_1, - - SFX_BMYST_BLOCKED_1, - SFX_BMYST_BLOCKED_2, - SFX_BMYST_BLOCKED_3, - SFX_BMYST_BLOCKED_4, - SFX_BMYST_BLOCKED_5, - SFX_BMYST_BLOCKED_6, - SFX_BMYST_BLOCKED_7, - SFX_BMYST_BLOCKED_8, - SFX_BMYST_BUMP_1, - SFX_BMYST_BUMP_2, - SFX_BMYST_BUMP_3, - SFX_BMYST_BUMP_4, - SFX_BMYST_BUMP_5, - SFX_BMYST_BUMP_6, - SFX_BMYST_BUMP_7, - SFX_BMYST_BUMP_8, - SFX_BMYST_BUMP_9, - SFX_BMYST_BUMP_10, - SFX_BMYST_BUMP_11, - SFX_BMYST_CAR_CRASH_1, - SFX_BMYST_CAR_CRASH_2, - SFX_BMYST_CAR_CRASH_3, - SFX_BMYST_CAR_CRASH_4, - SFX_BMYST_CAR_CRASH_5, - SFX_BMYST_CAR_CRASH_6, - SFX_BMYST_CAR_CRASH_7, - SFX_BMYST_CAR_CRASH_8, - SFX_BMYST_CAR_CRASH_9, - SFX_BMYST_CHAT_1, - SFX_BMYST_CHAT_2, - SFX_BMYST_CHAT_3, - SFX_BMYST_CHAT_4, - SFX_BMYST_CHAT_5, - SFX_BMYST_CHAT_6, - SFX_BMYST_CHAT_7, - SFX_BMYST_CHAT_8, - SFX_BMYST_CHAT_9, - SFX_BMYST_CHAT_10, - SFX_BMYST_CHAT_11, - SFX_BMYST_CHAT_12, - SFX_BMYST_DODGE_1, - SFX_BMYST_DODGE_2, - SFX_BMYST_DODGE_3, - SFX_BMYST_DODGE_4, - SFX_BMYST_DODGE_5, - SFX_BMYST_DODGE_6, - SFX_BMYST_DODGE_7, - SFX_BMYST_DODGE_8, - SFX_BMYST_FIGHT_1, - SFX_BMYST_FIGHT_2, - SFX_BMYST_FIGHT_3, - SFX_BMYST_FIGHT_4, - SFX_BMYST_FIGHT_5, - SFX_BMYST_FIGHT_6, - SFX_BMYST_GENERIC_CRASH_1, - SFX_BMYST_GENERIC_CRASH_2, - SFX_BMYST_GENERIC_CRASH_3, - SFX_BMYST_GENERIC_CRASH_4, - SFX_BMYST_GENERIC_CRASH_5, - SFX_BMYST_GENERIC_CRASH_6, - SFX_BMYST_GENERIC_CRASH_7, - SFX_BMYST_GUN_COOL_1, - SFX_BMYST_GUN_COOL_2, - SFX_BMYST_GUN_COOL_3, - SFX_BMYST_GUN_COOL_4, - SFX_BMYST_GUN_COOL_5, - SFX_BMYST_GUN_COOL_6, - SFX_BMYST_JACKED_1, - SFX_BMYST_JACKED_2, - SFX_BMYST_JACKED_3, - SFX_BMYST_JACKED_4, - SFX_BMYST_JACKED_5, - SFX_BMYST_JACKED_6, - SFX_BMYST_JACKED_7, - SFX_BMYST_JACKED_8, - SFX_BMYST_JACKING_1, - SFX_BMYST_JACKING_2, - SFX_BMYST_JACKING_3, - SFX_BMYST_JACKING_4, - SFX_BMYST_MUGGED_1, - SFX_BMYST_MUGGED_2, - SFX_BMYST_MUGGING_1, - SFX_BMYST_MUGGING_2, - SFX_BMYST_MUGGING_3, - SFX_BMYST_MUGGING_4, - SFX_BMYST_TAXI_1, - SFX_BMYST_TAXI_2, - - SFX_WMYPI_BLOCKED_1, - SFX_WMYPI_BLOCKED_2, - SFX_WMYPI_BLOCKED_3, - SFX_WMYPI_BLOCKED_4, - SFX_WMYPI_BLOCKED_5, - SFX_WMYPI_BLOCKED_6, - SFX_WMYPI_BLOCKED_7, - SFX_WMYPI_BLOCKED_8, - SFX_WMYPI_BUMP_1, - SFX_WMYPI_BUMP_2, - SFX_WMYPI_BUMP_3, - SFX_WMYPI_BUMP_4, - SFX_WMYPI_BUMP_5, - SFX_WMYPI_BUMP_6, - SFX_WMYPI_BUMP_7, - SFX_WMYPI_BUMP_8, - SFX_WMYPI_BUMP_9, - SFX_WMYPI_BUMP_10, - SFX_WMYPI_CAR_CRASH_1, - SFX_WMYPI_CAR_CRASH_2, - SFX_WMYPI_CAR_CRASH_3, - SFX_WMYPI_CAR_CRASH_4, - SFX_WMYPI_CAR_CRASH_5, - SFX_WMYPI_CAR_CRASH_6, - SFX_WMYPI_CAR_CRASH_7, - SFX_WMYPI_CAR_CRASH_8, - SFX_WMYPI_DODGE_1, - SFX_WMYPI_DODGE_2, - SFX_WMYPI_DODGE_3, - SFX_WMYPI_DODGE_4, - SFX_WMYPI_DODGE_5, - SFX_WMYPI_DODGE_6, - SFX_WMYPI_DODGE_7, - SFX_WMYPI_DODGE_8, - SFX_WMYPI_EYEING_1, - SFX_WMYPI_EYEING_2, - SFX_WMYPI_EYEING_3, - SFX_WMYPI_EYEING_4, - SFX_WMYPI_EYEING_5, - SFX_WMYPI_EYEING_6, - SFX_WMYPI_FIGHT_1, - SFX_WMYPI_FIGHT_2, - SFX_WMYPI_FIGHT_3, - SFX_WMYPI_FIGHT_4, - SFX_WMYPI_FIGHT_5, - SFX_WMYPI_FIGHT_6, - SFX_WMYPI_FIGHT_7, - SFX_WMYPI_FIGHT_8, - SFX_WMYPI_FIGHT_9, - SFX_WMYPI_GENERIC_CRASH_1, - SFX_WMYPI_GENERIC_CRASH_2, - SFX_WMYPI_GENERIC_CRASH_3, - SFX_WMYPI_GENERIC_CRASH_4, - SFX_WMYPI_GENERIC_CRASH_5, - SFX_WMYPI_GENERIC_CRASH_6, - SFX_WMYPI_GENERIC_CRASH_7, - SFX_WMYPI_GENERIC_CRASH_8, - SFX_WMYPI_GUN_COOL_1, - SFX_WMYPI_GUN_COOL_2, - SFX_WMYPI_GUN_COOL_3, - SFX_WMYPI_GUN_COOL_4, - SFX_WMYPI_GUN_COOL_5, - SFX_WMYPI_INNOCENT_1, - SFX_WMYPI_INNOCENT_2, - SFX_WMYPI_JACKED_1, - SFX_WMYPI_JACKED_2, - SFX_WMYPI_JACKED_3, - SFX_WMYPI_JACKED_4, - SFX_WMYPI_JACKED_5, - SFX_WMYPI_JACKED_6, - SFX_WMYPI_JACKING_1, - SFX_WMYPI_JACKING_2, - SFX_WMYPI_JACKING_3, - SFX_WMYPI_JACKING_4, - SFX_WMYPI_MUGGED_1, - SFX_WMYPI_MUGGED_2, - SFX_WMYPI_SAVED_1, - SFX_WMYPI_SAVED_2, - SFX_WMYPI_TAXI_1, - SFX_WMYPI_TAXI_2, - SFX_WMYPI_TAXI_3, - SFX_WMYPI_TAXI_4, - - SFX_BMYCR_BLOCKED_1, - SFX_BMYCR_BLOCKED_2, - SFX_BMYCR_BLOCKED_3, - SFX_BMYCR_BLOCKED_4, - SFX_BMYCR_BLOCKED_5, - SFX_BMYCR_BLOCKED_6, - SFX_BMYCR_BLOCKED_7, - SFX_BMYCR_BLOCKED_8, - SFX_BMYCR_BLOCKED_9, - SFX_BMYCR_BLOCKED_10, - SFX_BMYCR_BLOCKED_11, - SFX_BMYCR_BLOCKED_12, - SFX_BMYCR_BUMP_1, - SFX_BMYCR_BUMP_2, - SFX_BMYCR_BUMP_3, - SFX_BMYCR_BUMP_4, - SFX_BMYCR_BUMP_5, - SFX_BMYCR_BUMP_6, - SFX_BMYCR_BUMP_7, - SFX_BMYCR_BUMP_8, - SFX_BMYCR_BUMP_9, - SFX_BMYCR_BUMP_10, - SFX_BMYCR_BUMP_11, - SFX_BMYCR_CAR_CRASH_1, - SFX_BMYCR_CAR_CRASH_2, - SFX_BMYCR_CAR_CRASH_3, - SFX_BMYCR_CAR_CRASH_4, - SFX_BMYCR_CAR_CRASH_5, - SFX_BMYCR_CAR_CRASH_6, - SFX_BMYCR_CAR_CRASH_7, - SFX_BMYCR_CAR_CRASH_8, - SFX_BMYCR_CAR_CRASH_9, - SFX_BMYCR_DODGE_1, - SFX_BMYCR_DODGE_2, - SFX_BMYCR_DODGE_3, - SFX_BMYCR_DODGE_4, - SFX_BMYCR_DODGE_5, - SFX_BMYCR_DODGE_6, - SFX_BMYCR_DODGE_7, - SFX_BMYCR_DODGE_8, - SFX_BMYCR_EYEING_1, - SFX_BMYCR_EYEING_2, - SFX_BMYCR_FIGHT_1, - SFX_BMYCR_FIGHT_2, - SFX_BMYCR_FIGHT_3, - SFX_BMYCR_FIGHT_4, - SFX_BMYCR_FIGHT_5, - SFX_BMYCR_FIGHT_6, - SFX_BMYCR_FIGHT_7, - SFX_BMYCR_FIGHT_8, - SFX_BMYCR_GENERIC_CRASH_1, - SFX_BMYCR_GENERIC_CRASH_2, - SFX_BMYCR_GENERIC_CRASH_3, - SFX_BMYCR_GENERIC_CRASH_4, - SFX_BMYCR_GENERIC_CRASH_5, - SFX_BMYCR_GENERIC_CRASH_6, - SFX_BMYCR_GENERIC_CRASH_7, - SFX_BMYCR_GUN_COOL_1, - SFX_BMYCR_GUN_COOL_2, - SFX_BMYCR_GUN_COOL_3, - SFX_BMYCR_GUN_COOL_4, - SFX_BMYCR_GUN_COOL_5, - SFX_BMYCR_GUN_COOL_6, - SFX_BMYCR_INNOCENT_1, - SFX_BMYCR_INNOCENT_2, - SFX_BMYCR_INNOCENT_3, - SFX_BMYCR_INNOCENT_4, - SFX_BMYCR_JACKED_1, - SFX_BMYCR_JACKED_2, - SFX_BMYCR_JACKED_3, - SFX_BMYCR_JACKED_4, - SFX_BMYCR_JACKED_5, - SFX_BMYCR_JACKED_6, - SFX_BMYCR_JACKING_1, - SFX_BMYCR_JACKING_2, - SFX_BMYCR_JACKING_3, - SFX_BMYCR_JACKING_4, - SFX_BMYCR_JACKING_5, - SFX_BMYCR_JACKING_6, - SFX_BMYCR_JACKING_7, - SFX_BMYCR_JACKING_8, - SFX_BMYCR_JACKING_9, - SFX_BMYCR_JACKING_10, - SFX_BMYCR_JACKING_11, - SFX_BMYCR_JACKING_12, - SFX_BMYCR_MUGGED_1, - SFX_BMYCR_MUGGED_2, - SFX_BMYCR_MUGGED_3, - SFX_BMYCR_MUGGING_1, - SFX_BMYCR_MUGGING_2, - SFX_BMYCR_MUGGING_3, - SFX_BMYCR_MUGGING_4, - SFX_BMYCR_MUGGING_5, - SFX_BMYCR_MUGGING_6, - SFX_BMYCR_SAVED_1, - SFX_BMYCR_SAVED_2, - - SFX_WMORI_BLOCKED_1, - SFX_WMORI_BLOCKED_2, - SFX_WMORI_BLOCKED_3, - SFX_WMORI_BLOCKED_4, - SFX_WMORI_BLOCKED_5, - SFX_WMORI_BLOCKED_6, - SFX_WMORI_BLOCKED_7, - SFX_WMORI_BLOCKED_8, - SFX_WMORI_BLOCKED_9, - SFX_WMORI_BLOCKED_10, - SFX_WMORI_BUMP_1, - SFX_WMORI_BUMP_2, - SFX_WMORI_BUMP_3, - SFX_WMORI_BUMP_4, - SFX_WMORI_BUMP_5, - SFX_WMORI_BUMP_6, - SFX_WMORI_BUMP_7, - SFX_WMORI_BUMP_8, - SFX_WMORI_BUMP_9, - SFX_WMORI_BUMP_10, - SFX_WMORI_BUMP_11, - SFX_WMORI_BUMP_12, - SFX_WMORI_BUMP_13, - SFX_WMORI_BUMP_14, - SFX_WMORI_CAR_CRASH_1, - SFX_WMORI_CAR_CRASH_2, - SFX_WMORI_CAR_CRASH_3, - SFX_WMORI_CAR_CRASH_4, - SFX_WMORI_CAR_CRASH_5, - SFX_WMORI_CAR_CRASH_6, - SFX_WMORI_DODGE_1, - SFX_WMORI_DODGE_2, - SFX_WMORI_DODGE_3, - SFX_WMORI_DODGE_4, - SFX_WMORI_DODGE_5, - SFX_WMORI_DODGE_6, - SFX_WMORI_DODGE_7, - SFX_WMORI_DODGE_8, - SFX_WMORI_DODGE_9, - SFX_WMORI_DODGE_10, - SFX_WMORI_EYEING_1, - SFX_WMORI_EYEING_2, - SFX_WMORI_EYEING_3, - SFX_WMORI_GENERIC_CRASH_1, - SFX_WMORI_GENERIC_CRASH_2, - SFX_WMORI_GENERIC_CRASH_3, - SFX_WMORI_GENERIC_CRASH_4, - SFX_WMORI_GENERIC_CRASH_5, - SFX_WMORI_GENERIC_CRASH_6, - SFX_WMORI_GENERIC_CRASH_7, - SFX_WMORI_GENERIC_CRASH_8, - SFX_WMORI_GUN_PANIC_1, - SFX_WMORI_GUN_PANIC_2, - SFX_WMORI_GUN_PANIC_3, - SFX_WMORI_GUN_PANIC_4, - SFX_WMORI_GUN_PANIC_5, - SFX_WMORI_GUN_PANIC_6, - SFX_WMORI_GUN_PANIC_7, - SFX_WMORI_GUN_PANIC_8, - SFX_WMORI_GUN_PANIC_9, - SFX_WMORI_JACKED_1, - SFX_WMORI_JACKED_2, - SFX_WMORI_JACKED_3, - SFX_WMORI_JACKED_4, - SFX_WMORI_JACKED_5, - SFX_WMORI_JACKED_6, - SFX_WMORI_LOST_1, - SFX_WMORI_LOST_2, - SFX_WMORI_MUGGED_1, - SFX_WMORI_MUGGED_2, - SFX_WMORI_MUGGED_3, - SFX_WMORI_MUGGED_4, - SFX_WMORI_RUN_1, - SFX_WMORI_RUN_2, - SFX_WMORI_RUN_3, - SFX_WMORI_RUN_4, - SFX_WMORI_RUN_5, - SFX_WMORI_RUN_6, - SFX_WMORI_RUN_7, - SFX_WMORI_RUN_8, - SFX_WMORI_RUN_9, - SFX_WMORI_RUN_10, - SFX_WMORI_RUN_11, - SFX_WMORI_RUN_12, - SFX_WMORI_SAVED_1, - SFX_WMORI_SAVED_2, - SFX_WMORI_SHOCKED_1, - SFX_WMORI_SHOCKED_2, - SFX_WMORI_SHOCKED_3, - SFX_WMORI_SHOCKED_4, - SFX_WMORI_TAXI_1, - SFX_WMORI_TAXI_2, - - SFX_WMOBU_BLOCKED_1, - SFX_WMOBU_BLOCKED_2, - SFX_WMOBU_BLOCKED_3, - SFX_WMOBU_BLOCKED_4, - SFX_WMOBU_BLOCKED_5, - SFX_WMOBU_BLOCKED_6, - SFX_WMOBU_BLOCKED_7, - SFX_WMOBU_BUMP_1, - SFX_WMOBU_BUMP_2, - SFX_WMOBU_BUMP_3, - SFX_WMOBU_BUMP_4, - SFX_WMOBU_BUMP_5, - SFX_WMOBU_BUMP_6, - SFX_WMOBU_BUMP_7, - SFX_WMOBU_BUMP_8, - SFX_WMOBU_BUMP_9, - SFX_WMOBU_BUMP_10, - SFX_WMOBU_CAR_CRASH_1, - SFX_WMOBU_CAR_CRASH_2, - SFX_WMOBU_CAR_CRASH_3, - SFX_WMOBU_CAR_CRASH_4, - SFX_WMOBU_CAR_CRASH_5, - SFX_WMOBU_CAR_CRASH_6, - SFX_WMOBU_CAR_CRASH_7, - SFX_WMOBU_DODGE_1, - SFX_WMOBU_DODGE_2, - SFX_WMOBU_DODGE_3, - SFX_WMOBU_DODGE_4, - SFX_WMOBU_DODGE_5, - SFX_WMOBU_DODGE_6, - SFX_WMOBU_DODGE_7, - SFX_WMOBU_DODGE_8, - SFX_WMOBU_EYEING_1, - SFX_WMOBU_EYEING_2, - SFX_WMOBU_FIGHT_1, - SFX_WMOBU_FIGHT_2, - SFX_WMOBU_FIGHT_3, - SFX_WMOBU_GENERIC_CRASH_1, - SFX_WMOBU_GENERIC_CRASH_2, - SFX_WMOBU_GENERIC_CRASH_3, - SFX_WMOBU_GENERIC_CRASH_4, - SFX_WMOBU_GENERIC_CRASH_5, - SFX_WMOBU_GENERIC_CRASH_6, - SFX_WMOBU_GENERIC_CRASH_7, - SFX_WMOBU_GUN_PANIC_1, - SFX_WMOBU_GUN_PANIC_2, - SFX_WMOBU_GUN_PANIC_3, - SFX_WMOBU_GUN_PANIC_4, - SFX_WMOBU_GUN_PANIC_5, - SFX_WMOBU_GUN_PANIC_6, - SFX_WMOBU_JACKED_1, - SFX_WMOBU_JACKED_2, - SFX_WMOBU_JACKED_3, - SFX_WMOBU_JACKED_4, - SFX_WMOBU_JACKED_5, - SFX_WMOBU_JACKED_6, - SFX_WMOBU_JACKED_7, - SFX_WMOBU_LOST_1, - SFX_WMOBU_LOST_2, - SFX_WMOBU_LOST_3, - SFX_WMOBU_MUGGED_1, - SFX_WMOBU_MUGGED_2, - SFX_WMOBU_SAVED_1, - SFX_WMOBU_SAVED_2, - SFX_WMOBU_SAVED_3, - SFX_WMOBU_TAXI_1, - SFX_WMOBU_TAXI_2, - - SFX_BMODK_BLOCKED_1, - SFX_BMODK_BLOCKED_2, - SFX_BMODK_BLOCKED_3, - SFX_BMODK_BLOCKED_4, - SFX_BMODK_BLOCKED_5, - SFX_BMODK_BLOCKED_6, - SFX_BMODK_BLOCKED_7, - SFX_BMODK_BLOCKED_8, - SFX_BMODK_BUMP_1, - SFX_BMODK_BUMP_2, - SFX_BMODK_BUMP_3, - SFX_BMODK_BUMP_4, - SFX_BMODK_BUMP_5, - SFX_BMODK_BUMP_6, - SFX_BMODK_BUMP_7, - SFX_BMODK_BUMP_8, - SFX_BMODK_BUMP_9, - SFX_BMODK_BUMP_10, - SFX_BMODK_CAR_CRASH_1, - SFX_BMODK_CAR_CRASH_2, - SFX_BMODK_CAR_CRASH_3, - SFX_BMODK_CAR_CRASH_4, - SFX_BMODK_CAR_CRASH_5, - SFX_BMODK_CAR_CRASH_6, - SFX_BMODK_CAR_CRASH_7, - SFX_BMODK_CAR_CRASH_8, - SFX_BMODK_CAR_CRASH_9, - SFX_BMODK_CAR_CRASH_10, - SFX_BMODK_UNK, // UNUSED - SFX_BMODK_UNK_147_1, - SFX_BMODK_UNK_147_2, - SFX_BMODK_UNK_147_3, - SFX_BMODK_UNK_147_4, - SFX_BMODK_UNK_147_5, - SFX_BMODK_UNK_147_6, - SFX_BMODK_UNK_147_7, - SFX_BMODK_UNK_147_8, - SFX_BMODK_UNK_147_9, - SFX_BMODK_UNK_147_10, - SFX_BMODK_UNK_147_11, - SFX_BMODK_UNK_147_12, - SFX_BMODK_DODGE_1, - SFX_BMODK_DODGE_2, - SFX_BMODK_DODGE_3, - SFX_BMODK_DODGE_4, - SFX_BMODK_DODGE_5, - SFX_BMODK_DODGE_6, - SFX_BMODK_DODGE_7, - SFX_BMODK_GENERIC_CRASH_1, - SFX_BMODK_GENERIC_CRASH_2, - SFX_BMODK_GENERIC_CRASH_3, - SFX_BMODK_GENERIC_CRASH_4, - SFX_BMODK_GENERIC_CRASH_5, - SFX_BMODK_GENERIC_CRASH_6, - SFX_BMODK_GENERIC_CRASH_7, - SFX_BMODK_GUN_PANIC_1, - SFX_BMODK_GUN_PANIC_2, - SFX_BMODK_GUN_PANIC_3, - SFX_BMODK_GUN_PANIC_4, - SFX_BMODK_INNOCENT_1, - SFX_BMODK_INNOCENT_2, - SFX_BMODK_INNOCENT_3, - SFX_BMODK_JACKED_1, - SFX_BMODK_JACKED_2, - SFX_BMODK_JACKED_3, - SFX_BMODK_JACKED_4, - SFX_BMODK_JACKED_5, - SFX_BMODK_JACKED_6, - SFX_BMODK_JACKED_7, - SFX_BMODK_JACKED_8, - SFX_BMODK_JACKED_9, - SFX_BMODK_MUGGED_1, - SFX_BMODK_MUGGED_2, - SFX_BMODK_RUN_1, - SFX_BMODK_RUN_2, - SFX_BMODK_RUN_3, - SFX_BMODK_RUN_4, - SFX_BMODK_TAXI_1, - - SFX_HFYBE_BUMP_1, - SFX_HFYBE_BUMP_2, - SFX_HFYBE_BUMP_3, - SFX_HFYBE_BUMP_4, - SFX_HFYBE_BUMP_5, - SFX_HFYBE_BUMP_6, - SFX_HFYBE_BUMP_7, - SFX_HFYBE_BUMP_8, - SFX_HFYBE_CAR_CRASH_1, - SFX_HFYBE_CAR_CRASH_2, - SFX_HFYBE_CAR_CRASH_3, - SFX_HFYBE_CAR_CRASH_4, - SFX_HFYBE_CAR_CRASH_5, - SFX_HFYBE_CAR_CRASH_6, - SFX_HFYBE_CHAT_1, - SFX_HFYBE_CHAT_2, - SFX_HFYBE_CHAT_3, - SFX_HFYBE_CHAT_4, - SFX_HFYBE_CHAT_5, - SFX_HFYBE_CHAT_6, - SFX_HFYBE_CHAT_7, - SFX_HFYBE_CHAT_8, - SFX_HFYBE_CHAT_9, - SFX_HFYBE_CHAT_10, - SFX_HFYBE_DODGE_1, - SFX_HFYBE_DODGE_2, - SFX_HFYBE_DODGE_3, - SFX_HFYBE_DODGE_4, - SFX_HFYBE_DODGE_5, - SFX_HFYBE_DODGE_6, - SFX_HFYBE_DODGE_7, - SFX_HFYBE_DODGE_8, - SFX_HFYBE_DODGE_9, - SFX_HFYBE_DODGE_10, - SFX_HFYBE_DODGE_11, - SFX_HFYBE_GENERIC_CRASH_1, - SFX_HFYBE_GENERIC_CRASH_2, - SFX_HFYBE_GENERIC_CRASH_3, - SFX_HFYBE_GENERIC_CRASH_4, - SFX_HFYBE_GENERIC_CRASH_5, - SFX_HFYBE_GENERIC_CRASH_6, - SFX_HFYBE_GENERIC_CRASH_7, - SFX_HFYBE_GENERIC_CRASH_8, - SFX_HFYBE_GUN_PANIC_1, - SFX_HFYBE_GUN_PANIC_2, - SFX_HFYBE_GUN_PANIC_3, - SFX_HFYBE_GUN_PANIC_4, - SFX_HFYBE_GUN_PANIC_5, - SFX_HFYBE_GUN_PANIC_6, - SFX_HFYBE_GUN_PANIC_7, - SFX_HFYBE_JACKED_1, - SFX_HFYBE_JACKED_2, - SFX_HFYBE_JACKED_3, - SFX_HFYBE_JACKED_4, - SFX_HFYBE_JACKED_5, - SFX_HFYBE_JACKED_6, - SFX_HFYBE_JACKED_7, - SFX_HFYBE_LOST_1, - SFX_HFYBE_LOST_2, - - // this is a guess, idk what she's saying - SFX_HFYBE_RUN_1, - SFX_HFYBE_RUN_2, - SFX_HFYBE_RUN_3, - SFX_HFYBE_RUN_4, - SFX_HFYBE_RUN_5, - SFX_HFYBE_RUN_6, - SFX_HFYBE_RUN_7, - - SFX_HFYBE_SHOCKED_1, - SFX_HFYBE_SHOCKED_2, - SFX_HFYBE_TAXI_1, - - SFX_HFYRI_BLOCKED_1, - SFX_HFYRI_BLOCKED_2, - SFX_HFYRI_BLOCKED_3, - SFX_HFYRI_BLOCKED_4, - SFX_HFYRI_BLOCKED_5, - SFX_HFYRI_BLOCKED_6, - SFX_HFYRI_BLOCKED_7, - SFX_HFYRI_BLOCKED_8, - SFX_HFYRI_BUMP_1, - SFX_HFYRI_BUMP_2, - SFX_HFYRI_BUMP_3, - SFX_HFYRI_BUMP_4, - SFX_HFYRI_BUMP_5, - SFX_HFYRI_BUMP_6, - SFX_HFYRI_BUMP_7, - SFX_HFYRI_BUMP_8, - SFX_HFYRI_BUMP_9, - SFX_HFYRI_CAR_CRASH_1, - SFX_HFYRI_CAR_CRASH_2, - SFX_HFYRI_CAR_CRASH_3, - SFX_HFYRI_CAR_CRASH_4, - SFX_HFYRI_CAR_CRASH_5, - SFX_HFYRI_CAR_CRASH_6, - SFX_HFYRI_CAR_CRASH_7, - SFX_HFYRI_CAR_CRASH_8, - SFX_HFYRI_DODGE_1, - SFX_HFYRI_DODGE_2, - SFX_HFYRI_DODGE_3, - SFX_HFYRI_DODGE_4, - SFX_HFYRI_DODGE_5, - SFX_HFYRI_DODGE_6, - SFX_HFYRI_DODGE_7, - SFX_HFYRI_DODGE_8, - SFX_HFYRI_DODGE_9, - SFX_HFYRI_DODGE_10, - SFX_HFYRI_GENERIC_CRASH_1, - SFX_HFYRI_GENERIC_CRASH_2, - SFX_HFYRI_GENERIC_CRASH_3, - SFX_HFYRI_GENERIC_CRASH_4, - SFX_HFYRI_GENERIC_CRASH_5, - SFX_HFYRI_GENERIC_CRASH_6, - SFX_HFYRI_GENERIC_CRASH_7, - SFX_HFYRI_GUN_PANIC_1, - SFX_HFYRI_GUN_PANIC_2, - SFX_HFYRI_GUN_PANIC_3, - SFX_HFYRI_GUN_PANIC_4, - SFX_HFYRI_GUN_PANIC_5, - SFX_HFYRI_JACKED_1, - SFX_HFYRI_JACKED_2, - SFX_HFYRI_JACKED_3, - SFX_HFYRI_JACKED_4, - SFX_HFYRI_JACKED_5, - SFX_HFYRI_JACKED_6, - SFX_HFYRI_LOST_1, - SFX_HFYRI_LOST_2, - SFX_HFYRI_MUGGED_1, - SFX_HFYRI_MUGGED_2, - SFX_HFYRI_MUGGED_3, - SFX_HFYRI_MUGGED_4, - SFX_HFYRI_RUN_1, - SFX_HFYRI_RUN_2, - SFX_HFYRI_RUN_3, - SFX_HFYRI_RUN_4, - SFX_HFYRI_SAVED_1, - SFX_HFYRI_SAVED_2, - SFX_HFYRI_SHOCKED_1, - SFX_HFYRI_SHOCKED_2, - SFX_HFYRI_SHOCKED_3, - SFX_HFYRI_TAXI_1, - SFX_BFOST_BLOCKED_1, - SFX_BFOST_BLOCKED_2, - SFX_BFOST_BLOCKED_3, - SFX_BFOST_BLOCKED_4, - SFX_BFOST_BLOCKED_5, - SFX_BFOST_BLOCKED_6, - SFX_BFOST_BLOCKED_7, - SFX_BFOST_BUMP_1, - SFX_BFOST_BUMP_2, - SFX_BFOST_BUMP_3, - SFX_BFOST_BUMP_4, - SFX_BFOST_BUMP_5, - SFX_BFOST_BUMP_6, - SFX_BFOST_BUMP_7, - SFX_BFOST_BUMP_8, - SFX_BFOST_BUMP_9, - SFX_BFOST_BUMP_10, - SFX_BFOST_CAR_CRASH_1, - SFX_BFOST_CAR_CRASH_2, - SFX_BFOST_CAR_CRASH_3, - SFX_BFOST_CAR_CRASH_4, - SFX_BFOST_CAR_CRASH_5, - SFX_BFOST_CAR_CRASH_6, - SFX_BFOST_CAR_CRASH_7, - SFX_BFOST_CAR_CRASH_8, - SFX_BFOST_CHAT_1, - SFX_BFOST_CHAT_2, - SFX_BFOST_CHAT_3, - SFX_BFOST_CHAT_4, - SFX_BFOST_CHAT_5, - SFX_BFOST_CHAT_6, - SFX_BFOST_CHAT_7, - SFX_BFOST_CHAT_8, - SFX_BFOST_CHAT_9, - SFX_BFOST_CHAT_10, - SFX_BFOST_DODGE_1, - SFX_BFOST_DODGE_2, - SFX_BFOST_DODGE_3, - SFX_BFOST_DODGE_4, - SFX_BFOST_DODGE_5, - SFX_BFOST_DODGE_6, - SFX_BFOST_DODGE_7, - SFX_BFOST_DODGE_8, - SFX_BFOST_DODGE_9, - SFX_BFOST_DODGE_10, - SFX_BFOST_DODGE_11, - SFX_BFOST_GENERIC_CRASH_1, - SFX_BFOST_GENERIC_CRASH_2, - SFX_BFOST_GENERIC_CRASH_3, - SFX_BFOST_GENERIC_CRASH_4, - SFX_BFOST_GENERIC_CRASH_5, - SFX_BFOST_GENERIC_CRASH_6, - SFX_BFOST_GENERIC_CRASH_7, - SFX_BFOST_GENERIC_CRASH_8, - SFX_BFOST_GUN_PANIC_1, - SFX_BFOST_GUN_PANIC_2, - SFX_BFOST_GUN_PANIC_3, - SFX_BFOST_GUN_PANIC_4, - SFX_BFOST_GUN_PANIC_5, - SFX_BFOST_JACKED_1, - SFX_BFOST_JACKED_2, - SFX_BFOST_JACKED_3, - SFX_BFOST_JACKED_4, - SFX_BFOST_JACKED_5, - SFX_BFOST_JACKED_6, - SFX_BFOST_JACKED_7, - SFX_BFOST_JACKED_8, - SFX_BFOST_LOST_1, - SFX_BFOST_LOST_2, - SFX_BFOST_MUGGED_1, - SFX_BFOST_MUGGED_2, - SFX_BFOST_RUN_1, - SFX_BFOST_RUN_2, - SFX_BFOST_RUN_3, - SFX_BFOST_RUN_4, - SFX_BFOST_SAVED_1, - SFX_BFOST_SAVED_2, - SFX_BFOST_TAXI_1, - SFX_BFORI_BLOCKED_1, - SFX_BFORI_BLOCKED_2, - SFX_BFORI_BLOCKED_3, - SFX_BFORI_BLOCKED_4, - SFX_BFORI_BLOCKED_5, - SFX_BFORI_BLOCKED_6, - SFX_BFORI_BLOCKED_7, - SFX_BFORI_BLOCKED_8, - SFX_BFORI_BUMP_1, - SFX_BFORI_BUMP_2, - SFX_BFORI_BUMP_3, - SFX_BFORI_BUMP_4, - SFX_BFORI_BUMP_5, - SFX_BFORI_BUMP_6, - SFX_BFORI_BUMP_7, - SFX_BFORI_BUMP_8, - SFX_BFORI_BUMP_9, - SFX_BFORI_CAR_CRASH_1, - SFX_BFORI_CAR_CRASH_2, - SFX_BFORI_CAR_CRASH_3, - SFX_BFORI_CAR_CRASH_4, - SFX_BFORI_CAR_CRASH_5, - SFX_BFORI_CAR_CRASH_6, - SFX_BFORI_CAR_CRASH_7, - SFX_BFORI_DODGE_1, - SFX_BFORI_DODGE_2, - SFX_BFORI_DODGE_3, - SFX_BFORI_DODGE_4, - SFX_BFORI_DODGE_5, - SFX_BFORI_DODGE_6, - SFX_BFORI_DODGE_7, - SFX_BFORI_DODGE_8, - SFX_BFORI_DODGE_9, - SFX_BFORI_GENERIC_CRASH_1, - SFX_BFORI_GENERIC_CRASH_2, - SFX_BFORI_GENERIC_CRASH_3, - SFX_BFORI_GENERIC_CRASH_4, - SFX_BFORI_GENERIC_CRASH_5, - SFX_BFORI_GENERIC_CRASH_6, - SFX_BFORI_GENERIC_CRASH_7, - SFX_BFORI_GUN_PANIC_1, - SFX_BFORI_GUN_PANIC_2, - SFX_BFORI_GUN_PANIC_3, - SFX_BFORI_GUN_PANIC_4, - SFX_BFORI_GUN_PANIC_5, - SFX_BFORI_JACKED_1, - SFX_BFORI_JACKED_2, - SFX_BFORI_JACKED_3, - SFX_BFORI_JACKED_4, - SFX_BFORI_LOST_1, - SFX_BFORI_LOST_2, - SFX_BFORI_MUGGED_1, - SFX_BFORI_MUGGED_2, - SFX_BFORI_RUN_1, - SFX_BFORI_RUN_2, - SFX_BFORI_RUN_3, - SFX_BFORI_RUN_4, - SFX_BFORI_SAVED_1, - SFX_BFORI_SHOCKED_1, - SFX_BFORI_SHOCKED_2, - SFX_BFORI_TAXI_1, - SFX_BFORI_TAXI_2, - - SFX_BFYST_BLOCKED_1, - SFX_BFYST_BLOCKED_2, - SFX_BFYST_BLOCKED_3, - SFX_BFYST_BLOCKED_4, - SFX_BFYST_BLOCKED_5, - SFX_BFYST_BLOCKED_6, - SFX_BFYST_BLOCKED_7, - SFX_BFYST_BLOCKED_8, - SFX_BFYST_BUMP_1, - SFX_BFYST_BUMP_2, - SFX_BFYST_BUMP_3, - SFX_BFYST_BUMP_4, - SFX_BFYST_BUMP_5, - SFX_BFYST_BUMP_6, - SFX_BFYST_BUMP_7, - SFX_BFYST_BUMP_8, - SFX_BFYST_BUMP_9, - SFX_BFYST_CAR_CRASH_1, - SFX_BFYST_CAR_CRASH_2, - SFX_BFYST_CAR_CRASH_3, - SFX_BFYST_CAR_CRASH_4, - SFX_BFYST_CAR_CRASH_5, - SFX_BFYST_CAR_CRASH_6, - SFX_BFYST_CAR_CRASH_7, - SFX_BFYST_CAR_CRASH_8, - SFX_BFYST_CAR_CRASH_9, - SFX_BFYST_CHAT_1, - SFX_BFYST_CHAT_2, - SFX_BFYST_CHAT_3, - SFX_BFYST_CHAT_4, - SFX_BFYST_CHAT_5, - SFX_BFYST_CHAT_6, - SFX_BFYST_CHAT_7, - SFX_BFYST_CHAT_8, - SFX_BFYST_CHAT_9, - SFX_BFYST_DODGE_1, - SFX_BFYST_DODGE_2, - SFX_BFYST_DODGE_3, - SFX_BFYST_DODGE_4, - SFX_BFYST_DODGE_5, - SFX_BFYST_DODGE_6, - SFX_BFYST_DODGE_7, - SFX_BFYST_DODGE_8, - SFX_BFYST_DODGE_9, - SFX_BFYST_GENERIC_CRASH_1, - SFX_BFYST_GENERIC_CRASH_2, - SFX_BFYST_GENERIC_CRASH_3, - SFX_BFYST_GENERIC_CRASH_4, - SFX_BFYST_GENERIC_CRASH_5, - SFX_BFYST_GENERIC_CRASH_6, - SFX_BFYST_GENERIC_CRASH_7, - SFX_BFYST_GENERIC_CRASH_8, - SFX_BFYST_GUN_PANIC_1, - SFX_BFYST_GUN_PANIC_2, - SFX_BFYST_GUN_PANIC_3, - SFX_BFYST_GUN_PANIC_4, - SFX_BFYST_JACKED_1, - SFX_BFYST_JACKED_2, - SFX_BFYST_JACKED_3, - SFX_BFYST_JACKED_4, - SFX_BFYST_JACKED_5, - SFX_BFYST_LOST_1, - SFX_BFYST_LOST_2, - SFX_BFYST_MUGGED_1, - SFX_BFYST_MUGGED_2, - SFX_BFYST_RUN_1, - SFX_BFYST_RUN_2, - SFX_BFYST_RUN_3, - SFX_BFYST_RUN_4, - SFX_BFYST_RUN_5, - SFX_BFYST_RUN_6, - SFX_BFYST_SAVED_1, - SFX_BFYST_SAVED_2, - SFX_BFYST_TAXI_1, - - SFX_HFORI_BLOCKED_1, - SFX_HFORI_BLOCKED_2, - SFX_HFORI_BLOCKED_3, - SFX_HFORI_BLOCKED_4, - SFX_HFORI_BLOCKED_5, - SFX_HFORI_BLOCKED_6, - SFX_HFORI_BUMP_1, - SFX_HFORI_BUMP_2, - SFX_HFORI_BUMP_3, - SFX_HFORI_BUMP_4, - SFX_HFORI_BUMP_5, - SFX_HFORI_BUMP_6, - SFX_HFORI_BUMP_7, - SFX_HFORI_BUMP_8, - SFX_HFORI_BUMP_9, - SFX_HFORI_BUMP_10, - SFX_HFORI_CAR_CRASH_1, - SFX_HFORI_CAR_CRASH_2, - SFX_HFORI_CAR_CRASH_3, - SFX_HFORI_CAR_CRASH_4, - SFX_HFORI_CAR_CRASH_5, - SFX_HFORI_CAR_CRASH_6, - SFX_HFORI_CAR_CRASH_7, - SFX_HFORI_DODGE_1, - SFX_HFORI_DODGE_2, - SFX_HFORI_DODGE_3, - SFX_HFORI_DODGE_4, - SFX_HFORI_DODGE_5, - SFX_HFORI_DODGE_6, - SFX_HFORI_EYEING_1, - SFX_HFORI_EYEING_2, - SFX_HFORI_GENERIC_CRASH_1, - SFX_HFORI_GENERIC_CRASH_2, - SFX_HFORI_GENERIC_CRASH_3, - SFX_HFORI_GENERIC_CRASH_4, - SFX_HFORI_GENERIC_CRASH_5, - SFX_HFORI_GENERIC_CRASH_6, - SFX_HFORI_GENERIC_CRASH_7, - SFX_HFORI_GUN_PANIC_1, - SFX_HFORI_GUN_PANIC_2, - SFX_HFORI_GUN_PANIC_3, - SFX_HFORI_GUN_PANIC_4, - SFX_HFORI_GUN_PANIC_5, - SFX_HFORI_GUN_PANIC_6, - SFX_HFORI_JACKED_1, - SFX_HFORI_JACKED_2, - SFX_HFORI_JACKED_3, - SFX_HFORI_JACKED_4, - SFX_HFORI_JACKED_5, - SFX_HFORI_JACKED_6, - SFX_HFORI_JACKED_7, - SFX_HFORI_JACKED_8, - SFX_HFORI_JACKED_9, - SFX_HFORI_LOST_1, - SFX_HFORI_LOST_2, - SFX_HFORI_MUGGED_1, - SFX_HFORI_MUGGED_2, - SFX_HFORI_RUN_1, - SFX_HFORI_RUN_2, - SFX_HFORI_RUN_3, - SFX_HFORI_RUN_4, - SFX_HFORI_SAVED_1, - SFX_HFORI_SHOCKED_1, - SFX_HFORI_SHOCKED_2, - SFX_HFORI_TAXI_1, - - SFX_WFYBU_BUMP_1, - SFX_WFYBU_BUMP_2, - SFX_WFYBU_BUMP_3, - SFX_WFYBU_BUMP_4, - SFX_WFYBU_BUMP_5, - SFX_WFYBU_BUMP_6, - SFX_WFYBU_BUMP_7, - SFX_WFYBU_BUMP_8, - SFX_WFYBU_BUMP_9, - SFX_WFYBU_BUMP_10, - SFX_WFYBU_BUMP_11, - SFX_WFYBU_BUMP_12, - SFX_WFYBU_BUMP_13, - SFX_WFYBU_BUMP_14, - SFX_WFYBU_BUMP_15, - SFX_WFYBU_BUMP_16, - SFX_WFYBU_BUMP_17, - SFX_WFYBU_BUMP_18, - SFX_WFYBU_BUMP_19, - SFX_WFYBU_BUMP_20, - SFX_WFYBU_BUMP_21, - SFX_WFYBU_CAR_CRASH_1, - SFX_WFYBU_CAR_CRASH_2, - SFX_WFYBU_CAR_CRASH_3, - SFX_WFYBU_CAR_CRASH_4, - SFX_WFYBU_CAR_CRASH_5, - SFX_WFYBU_CAR_CRASH_6, - SFX_WFYBU_CAR_CRASH_7, - SFX_WFYBU_CAR_CRASH_8, - SFX_WFYBU_CAR_CRASH_9, - SFX_WFYBU_GENERIC_CRASH_1, - SFX_WFYBU_GENERIC_CRASH_2, - SFX_WFYBU_GENERIC_CRASH_3, - SFX_WFYBU_GENERIC_CRASH_4, - SFX_WFYBU_GENERIC_CRASH_5, - SFX_WFYBU_GENERIC_CRASH_6, - SFX_WFYBU_GENERIC_CRASH_7, - SFX_WFYBU_GENERIC_CRASH_8, - SFX_WFYBU_GUN_PANIC_1, - SFX_WFYBU_GUN_PANIC_2, - SFX_WFYBU_GUN_PANIC_3, - SFX_WFYBU_GUN_PANIC_4, - SFX_WFYBU_GUN_PANIC_5, - SFX_WFYBU_GUN_PANIC_6, - SFX_WFYBU_GUN_PANIC_7, - SFX_WFYBU_GUN_PANIC_8, - SFX_WFYBU_JACKED_1, - SFX_WFYBU_JACKED_2, - SFX_WFYBU_JACKED_3, - SFX_WFYBU_JACKED_4, - SFX_WFYBU_JACKED_5, - SFX_WFYBU_JACKED_6, - SFX_WFYBU_JACKED_7, - SFX_WFYBU_JACKED_8, - SFX_WFYBU_MUGGED_1, - SFX_WFYBU_MUGGED_2, - SFX_WFYBU_MUGGED_3, - SFX_WFYBU_MUGGED_4, - SFX_WFYBU_RUN_1, - SFX_WFYBU_RUN_2, - SFX_WFYBU_RUN_3, - SFX_WFYBU_RUN_4, - SFX_WFYBU_RUN_5, - SFX_WFYBU_RUN_6, - SFX_WFYBU_RUN_7, - SFX_WFYBU_RUN_8, - SFX_WFYBU_SHOCKED_1, - SFX_WFYBU_SHOCKED_2, - SFX_WFYBU_SHOCKED_3, - SFX_WFYBU_TAXI_1, - SFX_WFYBU_TAXI_2, - - SFX_WFOTR_BUMP_1, - SFX_WFOTR_BUMP_2, - SFX_WFOTR_BUMP_3, - SFX_WFOTR_BUMP_4, - SFX_WFOTR_BUMP_5, - SFX_WFOTR_BUMP_6, - SFX_WFOTR_BUMP_7, - SFX_WFOTR_BUMP_8, - SFX_WFOTR_BUMP_9, - SFX_WFOTR_BUMP_10, - SFX_WFOTR_BUMP_11, - SFX_WFOTR_CHAT_1, - SFX_WFOTR_CHAT_2, - SFX_WFOTR_CHAT_3, - SFX_WFOTR_CHAT_4, - SFX_WFOTR_CHAT_5, - SFX_WFOTR_CHAT_6, - SFX_WFOTR_CHAT_7, - SFX_WFOTR_CHAT_8, - SFX_WFOTR_CHAT_9, - SFX_WFOTR_DODGE_1, - SFX_WFOTR_DODGE_2, - SFX_WFOTR_DODGE_3, - SFX_WFOTR_DODGE_4, - SFX_WFOTR_DODGE_5, - SFX_WFOTR_DODGE_6, - SFX_WFOTR_DODGE_7, - SFX_WFOTR_DODGE_8, - SFX_WFOTR_DODGE_9, - SFX_WFOTR_GUN_COOL_1, - SFX_WFOTR_GUN_COOL_2, - SFX_WFOTR_GUN_COOL_3, - SFX_WFOTR_GUN_COOL_4, - SFX_WFOTR_GUN_COOL_5, - SFX_WFOTR_GUN_COOL_6, - SFX_WFOTR_RUN_1, - SFX_WFOTR_RUN_2, - SFX_WFOTR_RUN_3, - SFX_WFOTR_RUN_4, - SFX_WFOTR_RUN_5, - SFX_WFOTR_RUN_6, - SFX_WFOTR_SAVED_1, - SFX_WFOTR_SOLICIT_1, - SFX_WFOTR_SOLICIT_2, - SFX_WFOTR_SOLICIT_3, - SFX_WFOTR_SOLICIT_4, - SFX_WFOTR_SOLICIT_5, - SFX_WFOTR_SOLICIT_6, - SFX_WFOTR_SOLICIT_7, - SFX_WFOTR_SOLICIT_8, - SFX_WFOTR_SOLICIT_9, - SFX_WFOTR_TAXI_1, - - SFX_WFYJG_BUMP_1, - SFX_WFYJG_BUMP_2, - SFX_WFYJG_BUMP_3, - SFX_WFYJG_BUMP_4, - SFX_WFYJG_BUMP_5, - SFX_WFYJG_BUMP_6, - SFX_WFYJG_BUMP_7, - SFX_WFYJG_BUMP_8, - SFX_WFYJG_BUMP_9, - SFX_WFYJG_BUMP_10, - SFX_WFYJG_BUMP_11, - SFX_WFYJG_BUMP_12, - SFX_WFYJG_DODGE_1, - SFX_WFYJG_DODGE_2, - SFX_WFYJG_DODGE_3, - SFX_WFYJG_DODGE_4, - SFX_WFYJG_DODGE_5, - SFX_WFYJG_DODGE_6, - SFX_WFYJG_DODGE_7, - SFX_WFYJG_DODGE_8, - SFX_WFYJG_GUN_PANIC_1, - SFX_WFYJG_GUN_PANIC_2, - SFX_WFYJG_GUN_PANIC_3, - SFX_WFYJG_GUN_PANIC_4, - SFX_WFYJG_RUN_1, - SFX_WFYJG_RUN_2, - SFX_WFYJG_RUN_3, - SFX_WFYJG_RUN_4, - SFX_WFYJG_RUN_5, - SFX_WFYJG_RUN_6, - SFX_WFYJG_SAVED_1, - SFX_WFYJG_TAXI_1, - - SFX_WFYSH_BUMP_1, - SFX_WFYSH_BUMP_2, - SFX_WFYSH_BUMP_3, - SFX_WFYSH_BUMP_4, - SFX_WFYSH_BUMP_5, - SFX_WFYSH_BUMP_6, - SFX_WFYSH_BUMP_7, - SFX_WFYSH_BUMP_8, - SFX_WFYSH_BUMP_9, - SFX_WFYSH_BUMP_10, - SFX_WFYSH_BUMP_11, - SFX_WFYSH_BUMP_12, - SFX_WFYSH_CHAT_1, - SFX_WFYSH_CHAT_2, - SFX_WFYSH_CHAT_3, - SFX_WFYSH_CHAT_4, - SFX_WFYSH_CHAT_5, - SFX_WFYSH_CHAT_6, - SFX_WFYSH_CHAT_7, - SFX_WFYSH_CHAT_8, - SFX_WFYSH_CHAT_9, - SFX_WFYSH_CHAT_10, - SFX_WFYSH_DODGE_1, - SFX_WFYSH_DODGE_2, - SFX_WFYSH_DODGE_3, - SFX_WFYSH_DODGE_4, - SFX_WFYSH_DODGE_5, - SFX_WFYSH_DODGE_6, - SFX_WFYSH_DODGE_7, - SFX_WFYSH_DODGE_8, - SFX_WFYSH_DODGE_9, - SFX_WFYSH_DODGE_10, - SFX_WFYSH_DODGE_11, - SFX_WFYSH_GUN_COOL_1, - SFX_WFYSH_GUN_COOL_2, - SFX_WFYSH_GUN_COOL_3, - SFX_WFYSH_GUN_COOL_4, - SFX_WFYSH_GUN_COOL_5, - SFX_WFYSH_GUN_COOL_6, - SFX_WFYSH_GUN_COOL_7, - SFX_WFYSH_GUN_COOL_8, - SFX_WFYSH_GUN_COOL_9, - SFX_WFYSH_LOST_1, - SFX_WFYSH_LOST_2, - SFX_WFYSH_MUGGED_1, - SFX_WFYSH_MUGGED_2, - SFX_WFYSH_RUN_1, - SFX_WFYSH_RUN_2, - SFX_WFYSH_RUN_3, - SFX_WFYSH_RUN_4, - SFX_WFYSH_RUN_5, - SFX_WFYSH_RUN_6, - SFX_WFYSH_RUN_7, - SFX_WFYSH_RUN_8, - SFX_WFYSH_RUN_9, - SFX_WFYSH_RUN_10, - SFX_WFYSH_RUN_11, - SFX_WFYSH_SAVED_1, - SFX_WFYSH_SAVED_2, - SFX_WFYSH_SAVED_3, - SFX_WFYSH_SAVED_4, - SFX_WFYSH_SHOCKED_1, - SFX_WFYSH_SHOCKED_2, - SFX_WFYSH_SHOCKED_3, - SFX_WFYSH_SHOCKED_4, - SFX_WFYSH_SHOCKED_5, - SFX_WFYSH_TAXI_1, - SFX_WFYSH_TAXI_2, - - SFX_WMOTR_BUMP_1, - SFX_WMOTR_BUMP_2, - SFX_WMOTR_BUMP_3, - SFX_WMOTR_BUMP_4, - SFX_WMOTR_BUMP_5, - SFX_WMOTR_BUMP_6, - SFX_WMOTR_BUMP_7, - SFX_WMOTR_BUMP_8, - SFX_WMOTR_BUMP_9, - SFX_WMOTR_BUMP_10, - SFX_WMOTR_CHAT_1, - SFX_WMOTR_CHAT_2, - SFX_WMOTR_CHAT_3, - SFX_WMOTR_CHAT_4, - SFX_WMOTR_CHAT_5, - SFX_WMOTR_CHAT_6, - SFX_WMOTR_CHAT_7, - SFX_WMOTR_CHAT_8, - SFX_WMOTR_CHAT_9, - SFX_WMOTR_CHAT_10, - SFX_WMOTR_CHAT_11, - SFX_WMOTR_CHAT_12, - SFX_WMOTR_CHAT_13, - SFX_WMOTR_DODGE_1, - SFX_WMOTR_DODGE_2, - SFX_WMOTR_DODGE_3, - SFX_WMOTR_DODGE_4, - SFX_WMOTR_DODGE_5, - SFX_WMOTR_DODGE_6, - SFX_WMOTR_DODGE_7, - SFX_WMOTR_DODGE_8, - SFX_WMOTR_DODGE_9, - SFX_WMOTR_DODGE_10, - SFX_WMOTR_DODGE_11, - SFX_WMOTR_DODGE_12, - SFX_WMOTR_DODGE_13, - SFX_WMOTR_DODGE_14, - SFX_WMOTR_DODGE_15, - SFX_WMOTR_DODGE_16, - SFX_WMOTR_DODGE_17, - SFX_WMOTR_EYEING_1, - SFX_WMOTR_EYEING_2, - SFX_WMOTR_FIGHT_1, - SFX_WMOTR_FIGHT_2, - SFX_WMOTR_FIGHT_3, - SFX_WMOTR_FIGHT_4, - SFX_WMOTR_FIGHT_5, - SFX_WMOTR_FIGHT_6, - SFX_WMOTR_GUN_COOL_1, - SFX_WMOTR_GUN_COOL_2, - SFX_WMOTR_GUN_COOL_3, - SFX_WMOTR_GUN_COOL_4, - SFX_WMOTR_GUN_COOL_5, - SFX_WMOTR_SAVED_1, - SFX_WMOTR_SHOCKED_1, - SFX_WMOTR_SHOCKED_2, - SFX_WMOTR_SHOCKED_3, - SFX_WMOTR_SOLICIT_1, - SFX_WMOTR_SOLICIT_2, - SFX_WMOTR_SOLICIT_3, - SFX_WMOTR_SOLICIT_4, - SFX_WMOTR_SOLICIT_5, - SFX_WMOTR_SOLICIT_6, - SFX_WMOTR_SOLICIT_7, - SFX_WMOTR_TAXI_1, - - SFX_BMOBE_BUMP_1, - SFX_BMOBE_BUMP_2, - SFX_BMOBE_BUMP_3, - SFX_BMOBE_BUMP_4, - SFX_BMOBE_BUMP_5, - SFX_BMOBE_CAR_CRASH_1, - SFX_BMOBE_CAR_CRASH_2, - SFX_BMOBE_CAR_CRASH_3, - SFX_BMOBE_CAR_CRASH_4, - SFX_BMOBE_CAR_CRASH_5, - SFX_BMOBE_CAR_CRASH_6, - SFX_BMOBE_CAR_CRASH_7, - SFX_BMOBE_CAR_CRASH_8, - SFX_BMOBE_CAR_CRASH_9, - SFX_BMOBE_CHAT_1, - SFX_BMOBE_CHAT_2, - SFX_BMOBE_CHAT_3, - SFX_BMOBE_CHAT_4, - SFX_BMOBE_CHAT_5, - SFX_BMOBE_CHAT_6, - SFX_BMOBE_CHAT_7, - SFX_BMOBE_CHAT_8, - SFX_BMOBE_CHAT_9, - SFX_BMOBE_CHAT_10, - SFX_BMOBE_DODGE_1, - SFX_BMOBE_DODGE_2, - SFX_BMOBE_DODGE_3, - SFX_BMOBE_DODGE_4, - SFX_BMOBE_DODGE_5, - SFX_BMOBE_DODGE_6, - SFX_BMOBE_DODGE_7, - SFX_BMOBE_DODGE_8, - SFX_BMOBE_DODGE_9, - SFX_BMOBE_DODGE_10, - SFX_BMOBE_DODGE_11, - SFX_BMOBE_FIGHT_1, - SFX_BMOBE_FIGHT_2, - SFX_BMOBE_FIGHT_3, - SFX_BMOBE_FIGHT_4, - SFX_BMOBE_FIGHT_5, - SFX_BMOBE_FIGHT_6, - SFX_BMOBE_FIGHT_7, - SFX_BMOBE_FIGHT_8, - SFX_BMOBE_FIGHT_9, - SFX_BMOBE_FIGHT_10, - SFX_BMOBE_GENERIC_CRASH_1, - SFX_BMOBE_GENERIC_CRASH_2, - SFX_BMOBE_GENERIC_CRASH_3, - SFX_BMOBE_GENERIC_CRASH_4, - SFX_BMOBE_GENERIC_CRASH_5, - SFX_BMOBE_GENERIC_CRASH_6, - SFX_BMOBE_GENERIC_CRASH_7, - SFX_BMOBE_GUN_PANIC_1, - SFX_BMOBE_GUN_PANIC_2, - SFX_BMOBE_GUN_PANIC_3, - SFX_BMOBE_GUN_PANIC_4, - SFX_BMOBE_GUN_PANIC_5, - SFX_BMOBE_JACKED_1, - SFX_BMOBE_JACKED_2, - SFX_BMOBE_JACKED_3, - SFX_BMOBE_JACKED_4, - SFX_BMOBE_JACKED_5, - SFX_BMOBE_JACKED_6, - SFX_BMOBE_MUGGED_1, - SFX_BMOBE_MUGGED_2, - SFX_BMOBE_MUGGED_3, - SFX_BMOBE_MUGGED_4, - SFX_BMOBE_SAVED_1, - SFX_BMOBE_SAVED_2, - SFX_BMOBE_SAVED_3, - SFX_BMOBE_SHOCKED_1, - SFX_BMOBE_SHOCKED_2, - SFX_BMOBE_SHOCKED_3, - SFX_BMOBE_TAXI_1, - - SFX_WMYGO_BUMP_1, - SFX_WMYGO_BUMP_2, - SFX_WMYGO_BUMP_3, - SFX_WMYGO_BUMP_4, - SFX_WMYGO_BUMP_5, - SFX_WMYGO_BUMP_6, - SFX_WMYGO_BUMP_7, - SFX_WMYGO_BUMP_8, - SFX_WMYGO_BUMP_9, - SFX_WMYGO_CAR_CRASH_1, - SFX_WMYGO_CAR_CRASH_2, - SFX_WMYGO_CAR_CRASH_3, - SFX_WMYGO_CAR_CRASH_4, - SFX_WMYGO_CAR_CRASH_5, - SFX_WMYGO_CAR_CRASH_6, - SFX_WMYGO_CAR_CRASH_7, - SFX_WMYGO_CHAT_1, - SFX_WMYGO_CHAT_2, - SFX_WMYGO_CHAT_3, - SFX_WMYGO_CHAT_4, - SFX_WMYGO_CHAT_5, - SFX_WMYGO_CHAT_6, - SFX_WMYGO_CHAT_7, - SFX_WMYGO_CHAT_8, - SFX_WMYGO_CHAT_9, - SFX_WMYGO_CHAT_10, - SFX_WMYGO_DODGE_1, - SFX_WMYGO_DODGE_2, - SFX_WMYGO_DODGE_3, - SFX_WMYGO_DODGE_4, - SFX_WMYGO_DODGE_5, - SFX_WMYGO_DODGE_6, - SFX_WMYGO_DODGE_7, - SFX_WMYGO_DODGE_8, - SFX_WMYGO_DODGE_9, - SFX_WMYGO_DODGE_10, - SFX_WMYGO_DODGE_11, - SFX_WMYGO_EYEING_1, - SFX_WMYGO_EYEING_2, - SFX_WMYGO_GENERIC_CRASH_1, - SFX_WMYGO_GENERIC_CRASH_2, - SFX_WMYGO_GENERIC_CRASH_3, - SFX_WMYGO_GENERIC_CRASH_4, - SFX_WMYGO_GENERIC_CRASH_5, - SFX_WMYGO_GENERIC_CRASH_6, - SFX_WMYGO_GENERIC_CRASH_7, - SFX_WMYGO_GUN_PANIC_1, - SFX_WMYGO_GUN_PANIC_2, - SFX_WMYGO_GUN_PANIC_3, - SFX_WMYGO_GUN_PANIC_4, - SFX_WMYGO_GUN_PANIC_5, - SFX_WMYGO_JACKED_1, - SFX_WMYGO_JACKED_2, - SFX_WMYGO_JACKED_3, - SFX_WMYGO_JACKED_4, - SFX_WMYGO_JACKED_5, - SFX_WMYGO_JACKED_6, - SFX_WMYGO_MUGGED_1, - SFX_WMYGO_MUGGED_2, - SFX_WMYGO_RUN_1, - SFX_WMYGO_RUN_2, - SFX_WMYGO_RUN_3, - SFX_WMYGO_RUN_4, - SFX_WMYGO_RUN_5, - SFX_WMYGO_RUN_6, - SFX_WMYGO_SAVED_1, - SFX_WMYGO_SHOCKED_1, - SFX_WMYGO_SHOCKED_2, - SFX_WMYGO_TAXI_1, - SFX_WMYGO_TAXI_2, - SFX_WMYGO_TAXI_3, - - SFX_WFYBE_BLOCKED_1, - SFX_WFYBE_BLOCKED_2, - SFX_WFYBE_BLOCKED_3, - SFX_WFYBE_BLOCKED_4, - SFX_WFYBE_BLOCKED_5, - SFX_WFYBE_BLOCKED_6, - SFX_WFYBE_BLOCKED_7, - SFX_WFYBE_BUMP_1, - SFX_WFYBE_BUMP_2, - SFX_WFYBE_BUMP_3, - SFX_WFYBE_BUMP_4, - SFX_WFYBE_BUMP_5, - SFX_WFYBE_BUMP_6, - SFX_WFYBE_BUMP_7, - SFX_WFYBE_BUMP_8, - SFX_WFYBE_BUMP_9, - SFX_WFYBE_BUMP_10, - SFX_WFYBE_BUMP_11, - SFX_WFYBE_CAR_CRASH_1, - SFX_WFYBE_CAR_CRASH_2, - SFX_WFYBE_CAR_CRASH_3, - SFX_WFYBE_CAR_CRASH_4, - SFX_WFYBE_CAR_CRASH_5, - SFX_WFYBE_CAR_CRASH_6, - SFX_WFYBE_CHAT_1, - SFX_WFYBE_CHAT_2, - SFX_WFYBE_CHAT_3, - SFX_WFYBE_CHAT_4, - SFX_WFYBE_CHAT_5, - SFX_WFYBE_CHAT_6, - SFX_WFYBE_CHAT_7, - SFX_WFYBE_CHAT_8, - SFX_WFYBE_CHAT_9, - SFX_WFYBE_CHAT_10, - SFX_WFYBE_DODGE_1, - SFX_WFYBE_DODGE_2, - SFX_WFYBE_DODGE_3, - SFX_WFYBE_DODGE_4, - SFX_WFYBE_DODGE_5, - SFX_WFYBE_DODGE_6, - SFX_WFYBE_DODGE_7, - SFX_WFYBE_DODGE_8, - SFX_WFYBE_GENERIC_CRASH_1, - SFX_WFYBE_GENERIC_CRASH_2, - SFX_WFYBE_GENERIC_CRASH_3, - SFX_WFYBE_GENERIC_CRASH_4, - SFX_WFYBE_GENERIC_CRASH_5, - SFX_WFYBE_GENERIC_CRASH_6, - SFX_WFYBE_GUN_PANIC_1, - SFX_WFYBE_GUN_PANIC_2, - SFX_WFYBE_GUN_PANIC_3, - SFX_WFYBE_GUN_PANIC_4, - SFX_WFYBE_GUN_PANIC_5, - SFX_WFYBE_JACKED_1, - SFX_WFYBE_JACKED_2, - SFX_WFYBE_JACKED_3, - SFX_WFYBE_JACKED_4, - SFX_WFYBE_RUN_1, - SFX_WFYBE_RUN_2, - SFX_WFYBE_RUN_3, - SFX_WFYBE_RUN_4, - SFX_WFYBE_RUN_5, - SFX_WFYBE_SAVED_1, - SFX_WFYBE_SHOCKED_1, - SFX_WFYBE_SHOCKED_2, - SFX_WFYBE_SHOCKED_3, - SFX_WFYBE_TAXI_1, - - SFX_WFORI_BLOCKED_1, - SFX_WFORI_BLOCKED_2, - SFX_WFORI_BLOCKED_3, - SFX_WFORI_BLOCKED_4, - SFX_WFORI_BLOCKED_5, - SFX_WFORI_BLOCKED_6, - SFX_WFORI_BLOCKED_7, - SFX_WFORI_BUMP_1, - SFX_WFORI_BUMP_2, - SFX_WFORI_BUMP_3, - SFX_WFORI_BUMP_4, - SFX_WFORI_BUMP_5, - SFX_WFORI_BUMP_6, - SFX_WFORI_BUMP_7, - SFX_WFORI_BUMP_8, - SFX_WFORI_BUMP_9, - SFX_WFORI_BUMP_10, - SFX_WFORI_BUMP_11, - SFX_WFORI_CAR_CRASH_1, - SFX_WFORI_CAR_CRASH_2, - SFX_WFORI_CAR_CRASH_3, - SFX_WFORI_CAR_CRASH_4, - SFX_WFORI_CAR_CRASH_5, - SFX_WFORI_CAR_CRASH_6, - SFX_WFORI_CAR_CRASH_7, - SFX_WFORI_CAR_CRASH_8, - SFX_WFORI_CAR_CRASH_9, - SFX_WFORI_CAR_CRASH_10, - SFX_WFORI_DODGE_1, - SFX_WFORI_DODGE_2, - SFX_WFORI_DODGE_3, - SFX_WFORI_DODGE_4, - SFX_WFORI_DODGE_5, - SFX_WFORI_DODGE_6, - SFX_WFORI_DODGE_7, - SFX_WFORI_DODGE_8, - SFX_WFORI_DODGE_9, - SFX_WFORI_DODGE_10, - SFX_WFORI_DODGE_11, - SFX_WFORI_FIGHT_1, - SFX_WFORI_FIGHT_2, - SFX_WFORI_FIGHT_3, - SFX_WFORI_FIGHT_4, - SFX_WFORI_FIGHT_5, - SFX_WFORI_FIGHT_6, - SFX_WFORI_FIGHT_7, - SFX_WFORI_GENERIC_CRASH_1, - SFX_WFORI_GENERIC_CRASH_2, - SFX_WFORI_GENERIC_CRASH_3, - SFX_WFORI_GENERIC_CRASH_4, - SFX_WFORI_GENERIC_CRASH_5, - SFX_WFORI_GENERIC_CRASH_6, - SFX_WFORI_GENERIC_CRASH_7, - SFX_WFORI_GENERIC_CRASH_8, - SFX_WFORI_GUN_PANIC_1, - SFX_WFORI_GUN_PANIC_2, - SFX_WFORI_GUN_PANIC_3, - SFX_WFORI_GUN_PANIC_4, - SFX_WFORI_GUN_PANIC_5, - SFX_WFORI_GUN_PANIC_6, - SFX_WFORI_JACKED_1, - SFX_WFORI_JACKED_2, - SFX_WFORI_JACKED_3, - SFX_WFORI_JACKED_4, - SFX_WFORI_JACKED_5, - SFX_WFORI_JACKED_6, - SFX_WFORI_LOST_1, - SFX_WFORI_LOST_2, - SFX_WFORI_MUGGED_1, - SFX_WFORI_MUGGED_2, - SFX_WFORI_MUGGED_3, - SFX_WFORI_SAVED_1, - SFX_WFORI_SHOCKED_1, - SFX_WFORI_SHOCKED_2, - SFX_WFORI_SHOCKED_3, - SFX_WFORI_TAXI_1, - - SFX_WFOGO_BUMP_1, - SFX_WFOGO_BUMP_2, - SFX_WFOGO_BUMP_3, - SFX_WFOGO_BUMP_4, - SFX_WFOGO_BUMP_5, - SFX_WFOGO_BUMP_6, - SFX_WFOGO_BUMP_7, - SFX_WFOGO_BUMP_8, - SFX_WFOGO_CAR_CRASH_1, - SFX_WFOGO_CAR_CRASH_2, - SFX_WFOGO_CAR_CRASH_3, - SFX_WFOGO_CAR_CRASH_4, - SFX_WFOGO_CAR_CRASH_5, - SFX_WFOGO_CAR_CRASH_6, - SFX_WFOGO_CAR_CRASH_7, - SFX_WFOGO_CAR_CRASH_8, - SFX_WFOGO_CHAT_1, - SFX_WFOGO_CHAT_2, - SFX_WFOGO_CHAT_3, - SFX_WFOGO_CHAT_4, - SFX_WFOGO_CHAT_5, - SFX_WFOGO_CHAT_6, - SFX_WFOGO_CHAT_7, - SFX_WFOGO_CHAT_8, - SFX_WFOGO_CHAT_9, - SFX_WFOGO_CHAT_10, - SFX_WFOGO_CHAT_11, - SFX_WFOGO_DODGE_1, - SFX_WFOGO_DODGE_2, - SFX_WFOGO_DODGE_3, - SFX_WFOGO_DODGE_4, - SFX_WFOGO_DODGE_5, - SFX_WFOGO_DODGE_6, - SFX_WFOGO_DODGE_7, - SFX_WFOGO_DODGE_8, - SFX_WFOGO_DODGE_9, - SFX_WFOGO_FIGHT_1, - SFX_WFOGO_FIGHT_2, - SFX_WFOGO_FIGHT_3, - SFX_WFOGO_FIGHT_4, - SFX_WFOGO_FIGHT_5, - SFX_WFOGO_FIGHT_6, - SFX_WFOGO_FIGHT_7, - SFX_WFOGO_FIGHT_8, - SFX_WFOGO_FIGHT_9, - SFX_WFOGO_FIGHT_10, - SFX_WFOGO_FIGHT_11, - SFX_WFOGO_FIGHT_12, - SFX_WFOGO_FIGHT_13, - SFX_WFOGO_FIGHT_14, - SFX_WFOGO_GENERIC_CRASH_1, - SFX_WFOGO_GENERIC_CRASH_2, - SFX_WFOGO_GENERIC_CRASH_3, - SFX_WFOGO_GENERIC_CRASH_4, - SFX_WFOGO_GENERIC_CRASH_5, - SFX_WFOGO_GENERIC_CRASH_6, - SFX_WFOGO_GENERIC_CRASH_7, - SFX_WFOGO_GUN_PANIC_1, - SFX_WFOGO_GUN_PANIC_2, - SFX_WFOGO_GUN_PANIC_3, - SFX_WFOGO_GUN_PANIC_4, - SFX_WFOGO_GUN_PANIC_5, - SFX_WFOGO_JACKED_1, - SFX_WFOGO_JACKED_2, - SFX_WFOGO_JACKED_3, - SFX_WFOGO_JACKED_4, - SFX_WFOGO_JACKED_5, - SFX_WFOGO_JACKED_6, - SFX_WFOGO_MUGGED_1, - SFX_WFOGO_MUGGED_2, - SFX_WFOGO_RUN_1, - SFX_WFOGO_RUN_2, - SFX_WFOGO_SAVED_1, - SFX_WFOGO_SHOCKED_1, - SFX_WFOGO_SHOCKED_2, - - SFX_HMYST_BUMP_1, - SFX_HMYST_BUMP_2, - SFX_HMYST_BUMP_3, - SFX_HMYST_BUMP_4, - SFX_HMYST_BUMP_5, - SFX_HMYST_BUMP_6, - SFX_HMYST_BUMP_7, - SFX_HMYST_BUMP_8, - SFX_HMYST_BUMP_9, - SFX_HMYST_BUMP_10, - SFX_HMYST_BUMP_11, - SFX_HMYST_BUMP_12, - SFX_HMYST_BUMP_13, - SFX_HMYST_CHAT_1, - SFX_HMYST_CHAT_2, - SFX_HMYST_CHAT_3, - SFX_HMYST_CHAT_4, - SFX_HMYST_CHAT_5, - SFX_HMYST_CHAT_6, - SFX_HMYST_CHAT_7, - SFX_HMYST_CHAT_8, - SFX_HMYST_CHAT_9, - SFX_HMYST_CHAT_10, - SFX_HMYST_CHAT_11, - SFX_HMYST_DODGE_1, - SFX_HMYST_DODGE_2, - SFX_HMYST_DODGE_3, - SFX_HMYST_DODGE_4, - SFX_HMYST_DODGE_5, - SFX_HMYST_DODGE_6, - SFX_HMYST_EYEING_1, - SFX_HMYST_EYEING_2, - SFX_HMYST_GENERIC_CRASH_1, - SFX_HMYST_GENERIC_CRASH_2, - SFX_HMYST_GENERIC_CRASH_3, - SFX_HMYST_GENERIC_CRASH_4, - SFX_HMYST_GENERIC_CRASH_5, - SFX_HMYST_GENERIC_CRASH_6, - SFX_HMYST_GENERIC_CRASH_7, - SFX_HMYST_GUN_PANIC_1, - SFX_HMYST_GUN_PANIC_2, - SFX_HMYST_GUN_PANIC_3, - SFX_HMYST_GUN_PANIC_4, - SFX_HMYST_GUN_PANIC_5, - SFX_HMYST_GUN_PANIC_6, - SFX_HMYST_RUN_1, - SFX_HMYST_RUN_2, - SFX_HMYST_RUN_3, - SFX_HMYST_RUN_4, - SFX_HMYST_SAVED_1, - SFX_HMYST_SHOCKED_1, - SFX_HMYST_SHOCKED_2, - SFX_HMYST_TAXI_1, - - SFX_WMOCA_BLOCKED_1, - SFX_WMOCA_BLOCKED_2, - SFX_WMOCA_BLOCKED_3, - SFX_WMOCA_BLOCKED_4, - SFX_WMOCA_BLOCKED_5, - SFX_WMOCA_BLOCKED_6, - SFX_WMOCA_BLOCKED_7, - SFX_WMOCA_BLOCKED_8, - SFX_WMOCA_BLOCKED_9, - SFX_WMOCA_BLOCKED_10, - SFX_WMOCA_BLOCKED_11, - SFX_WMOCA_BLOCKED_12, - SFX_WMOCA_BUMP_1, - SFX_WMOCA_BUMP_2, - SFX_WMOCA_BUMP_3, - SFX_WMOCA_BUMP_4, - SFX_WMOCA_BUMP_5, - SFX_WMOCA_BUMP_6, - SFX_WMOCA_CAR_CRASH_1, - SFX_WMOCA_CAR_CRASH_2, - SFX_WMOCA_CAR_CRASH_3, - SFX_WMOCA_CAR_CRASH_4, - SFX_WMOCA_CAR_CRASH_5, - SFX_WMOCA_CAR_CRASH_6, - SFX_WMOCA_CAR_CRASH_7, - SFX_WMOCA_CAR_CRASH_8, - SFX_WMOCA_CAR_CRASH_9, - SFX_WMOCA_CAR_CRASH_10, - SFX_WMOCA_DODGE_1, - SFX_WMOCA_DODGE_2, - SFX_WMOCA_DODGE_3, - SFX_WMOCA_DODGE_4, - SFX_WMOCA_DODGE_5, - SFX_WMOCA_DODGE_6, - SFX_WMOCA_DODGE_7, - SFX_WMOCA_DODGE_8, - SFX_WMOCA_DODGE_9, - SFX_WMOCA_DODGE_10, - SFX_WMOCA_EYEING_1, - SFX_WMOCA_EYEING_2, - SFX_WMOCA_FIGHT_1, - SFX_WMOCA_FIGHT_2, - SFX_WMOCA_FIGHT_3, - SFX_WMOCA_FIGHT_4, - SFX_WMOCA_FIGHT_5, - SFX_WMOCA_FIGHT_6, - SFX_WMOCA_FIGHT_7, - SFX_WMOCA_FIGHT_8, - SFX_WMOCA_GENERIC_CRASH_1, - SFX_WMOCA_GENERIC_CRASH_2, - SFX_WMOCA_GENERIC_CRASH_3, - SFX_WMOCA_GENERIC_CRASH_4, - SFX_WMOCA_GENERIC_CRASH_5, - SFX_WMOCA_GENERIC_CRASH_6, - SFX_WMOCA_GENERIC_CRASH_7, - SFX_WMOCA_GENERIC_CRASH_8, - SFX_WMOCA_GENERIC_CRASH_9, - SFX_WMOCA_GUN_PANIC_1, - SFX_WMOCA_GUN_PANIC_2, - SFX_WMOCA_GUN_PANIC_3, - SFX_WMOCA_GUN_PANIC_4, - SFX_WMOCA_GUN_PANIC_5, - SFX_WMOCA_GUN_PANIC_6, - SFX_WMOCA_JACKED_1, - SFX_WMOCA_JACKED_2, - SFX_WMOCA_JACKED_3, - SFX_WMOCA_JACKED_4, - SFX_WMOCA_JACKED_5, - SFX_WMOCA_JACKED_6, - SFX_WMOCA_JACKED_7, - SFX_WMOCA_JACKED_8, - SFX_WMOCA_JACKED_9, - SFX_WMOCA_JACKED_10, - SFX_WMOCA_JACKING_1, - SFX_WMOCA_JACKING_2, - SFX_WMOCA_JACKING_3, - SFX_WMOCA_JACKING_4, - SFX_WMOCA_JACKING_5, - SFX_WMOCA_JACKING_6, - SFX_WMOCA_JACKING_7, - SFX_WMOCA_JACKING_8, - SFX_WMOCA_JACKING_9, - SFX_WMOCA_JACKING_10, - SFX_WMOCA_JACKING_11, - SFX_WMOCA_MUGGED_1, - SFX_WMOCA_MUGGED_2, - SFX_WMOCA_SAVED_1, - SFX_WMOCA_TAXI_1, - - SFX_WMYBE_BLOCKED_1, - SFX_WMYBE_BLOCKED_2, - SFX_WMYBE_BLOCKED_3, - SFX_WMYBE_BLOCKED_4, - SFX_WMYBE_BLOCKED_5, - SFX_WMYBE_BLOCKED_6, - SFX_WMYBE_BLOCKED_7, - SFX_WMYBE_BLOCKED_8, - SFX_WMYBE_BLOCKED_9, - SFX_WMYBE_BUMP_1, - SFX_WMYBE_BUMP_2, - SFX_WMYBE_BUMP_3, - SFX_WMYBE_BUMP_4, - SFX_WMYBE_BUMP_5, - SFX_WMYBE_BUMP_6, - SFX_WMYBE_BUMP_7, - SFX_WMYBE_BUMP_8, - SFX_WMYBE_BUMP_9, - SFX_WMYBE_BUMP_10, - SFX_WMYBE_BUMP_11, - SFX_WMYBE_BUMP_12, - SFX_WMYBE_BUMP_13, - SFX_WMYBE_BUMP_14, - SFX_WMYBE_CAR_CRASH_1, - SFX_WMYBE_CAR_CRASH_2, - SFX_WMYBE_CAR_CRASH_3, - SFX_WMYBE_CAR_CRASH_4, - SFX_WMYBE_CAR_CRASH_5, - SFX_WMYBE_CAR_CRASH_6, - SFX_WMYBE_CAR_CRASH_7, - SFX_WMYBE_CAR_CRASH_8, - SFX_WMYBE_CHAT_1, - SFX_WMYBE_CHAT_2, - SFX_WMYBE_CHAT_3, - SFX_WMYBE_CHAT_4, - SFX_WMYBE_CHAT_5, - SFX_WMYBE_CHAT_6, - SFX_WMYBE_CHAT_7, - SFX_WMYBE_CHAT_8, - SFX_WMYBE_CHAT_9, - SFX_WMYBE_CHAT_10, - SFX_WMYBE_CHAT_11, - SFX_WMYBE_DODGE_1, - SFX_WMYBE_DODGE_2, - SFX_WMYBE_DODGE_3, - SFX_WMYBE_DODGE_4, - SFX_WMYBE_DODGE_5, - SFX_WMYBE_DODGE_6, - SFX_WMYBE_DODGE_7, - SFX_WMYBE_DODGE_8, - SFX_WMYBE_DODGE_9, - SFX_WMYBE_DODGE_10, - SFX_WMYBE_DODGE_11, - SFX_WMYBE_DODGE_12, - SFX_WMYBE_EYEING_1, - SFX_WMYBE_EYEING_2, - SFX_WMYBE_GENERIC_CRASH_1, - SFX_WMYBE_GENERIC_CRASH_2, - SFX_WMYBE_GENERIC_CRASH_3, - SFX_WMYBE_GENERIC_CRASH_4, - SFX_WMYBE_GENERIC_CRASH_5, - SFX_WMYBE_GENERIC_CRASH_6, - SFX_WMYBE_GENERIC_CRASH_7, - SFX_WMYBE_GENERIC_CRASH_8, - SFX_WMYBE_GUN_PANIC_1, - SFX_WMYBE_GUN_PANIC_2, - SFX_WMYBE_GUN_PANIC_3, - SFX_WMYBE_GUN_PANIC_4, - SFX_WMYBE_GUN_PANIC_5, - SFX_WMYBE_GUN_PANIC_6, - SFX_WMYBE_GUN_PANIC_7, - SFX_WMYBE_GUN_PANIC_8, - SFX_WMYBE_JACKED_1, - SFX_WMYBE_JACKED_2, - SFX_WMYBE_JACKED_3, - SFX_WMYBE_JACKED_4, - SFX_WMYBE_JACKED_5, - SFX_WMYBE_JACKED_6, - SFX_WMYBE_JACKED_7, - SFX_WMYBE_JACKING_1, - SFX_WMYBE_JACKING_2, - SFX_WMYBE_JACKING_3, - SFX_WMYBE_JEER_1, - SFX_WMYBE_JEER_2, - SFX_WMYBE_JEER_3, - SFX_WMYBE_JEER_4, - SFX_WMYBE_JEER_5, - SFX_WMYBE_JEER_6, - SFX_WMYBE_JEER_7, - SFX_WMYBE_LOST_1, - SFX_WMYBE_LOST_2, - SFX_WMYBE_LOST_3, - SFX_WMYBE_RUN_1, - SFX_WMYBE_RUN_2, - SFX_WMYBE_RUN_3, - SFX_WMYBE_RUN_4, - SFX_WMYBE_RUN_5, - SFX_WMYBE_SHOCKED_1, - SFX_WMYBE_SHOCKED_2, - SFX_WMYBE_SHOCKED_3, - SFX_WMYBE_SHOCKED_4, - SFX_WMYBE_SHOCKED_5, - SFX_WMYBE_SHOCKED_6, - - SFX_BFOBE_BLOCKED_1, - SFX_BFOBE_BLOCKED_2, - SFX_BFOBE_BLOCKED_3, - SFX_BFOBE_BLOCKED_4, - SFX_BFOBE_BLOCKED_5, - SFX_BFOBE_BLOCKED_6, - SFX_BFOBE_BLOCKED_7, - SFX_BFOBE_BLOCKED_8, - SFX_BFOBE_BUMP_1, - SFX_BFOBE_BUMP_2, - SFX_BFOBE_BUMP_3, - SFX_BFOBE_BUMP_4, - SFX_BFOBE_BUMP_5, - SFX_BFOBE_BUMP_6, - SFX_BFOBE_BUMP_7, - SFX_BFOBE_BUMP_8, - SFX_BFOBE_CAR_CRASH_1, - SFX_BFOBE_CAR_CRASH_2, - SFX_BFOBE_CAR_CRASH_3, - SFX_BFOBE_CAR_CRASH_4, - SFX_BFOBE_CAR_CRASH_5, - SFX_BFOBE_CAR_CRASH_6, - SFX_BFOBE_CAR_CRASH_7, - SFX_BFOBE_CHAT_1, - SFX_BFOBE_CHAT_2, - SFX_BFOBE_CHAT_3, - SFX_BFOBE_CHAT_4, - SFX_BFOBE_CHAT_5, - SFX_BFOBE_CHAT_6, - SFX_BFOBE_CHAT_7, - SFX_BFOBE_CHAT_8, - SFX_BFOBE_DODGE_1, - SFX_BFOBE_DODGE_2, - SFX_BFOBE_DODGE_3, - SFX_BFOBE_DODGE_4, - SFX_BFOBE_DODGE_5, - SFX_BFOBE_DODGE_6, - SFX_BFOBE_DODGE_7, - SFX_BFOBE_DODGE_8, - SFX_BFOBE_DODGE_9, - SFX_BFOBE_GENERIC_CRASH_1, - SFX_BFOBE_GENERIC_CRASH_2, - SFX_BFOBE_GENERIC_CRASH_3, - SFX_BFOBE_GENERIC_CRASH_4, - SFX_BFOBE_GENERIC_CRASH_5, - SFX_BFOBE_GENERIC_CRASH_6, - SFX_BFOBE_GENERIC_CRASH_7, - SFX_BFOBE_GUN_PANIC_1, - SFX_BFOBE_GUN_PANIC_2, - SFX_BFOBE_GUN_PANIC_3, - SFX_BFOBE_GUN_PANIC_4, - SFX_BFOBE_GUN_PANIC_5, - SFX_BFOBE_JACKED_1, - SFX_BFOBE_JACKED_2, - SFX_BFOBE_JACKED_3, - SFX_BFOBE_JACKED_4, - SFX_BFOBE_JACKED_5, - SFX_BFOBE_JACKING_1, - SFX_BFOBE_JACKING_2, - SFX_BFOBE_JACKING_3, - SFX_BFOBE_JACKING_4, - SFX_BFOBE_MUGGED_1, - SFX_BFOBE_MUGGED_2, - SFX_BFOBE_SHOCKED_1, - SFX_BFOBE_SHOCKED_2, - SFX_BFOBE_TAXI_1, - - SFX_WFYLG_BUMP_1, - SFX_WFYLG_BUMP_2, - SFX_WFYLG_BUMP_3, - SFX_WFYLG_BUMP_4, - SFX_WFYLG_BUMP_5, - SFX_WFYLG_BUMP_6, - SFX_WFYLG_BUMP_7, - SFX_WFYLG_BUMP_8, - SFX_WFYLG_BUMP_9, - SFX_WFYLG_BUMP_10, - SFX_WFYLG_CHAT_1, - SFX_WFYLG_CHAT_2, - SFX_WFYLG_CHAT_3, - SFX_WFYLG_CHAT_4, - SFX_WFYLG_CHAT_5, - SFX_WFYLG_CHAT_6, - SFX_WFYLG_CHAT_7, - SFX_WFYLG_CHAT_8, - SFX_WFYLG_CHAT_9, - SFX_WFYLG_CHAT_10, - SFX_WFYLG_DODGE_1, - SFX_WFYLG_DODGE_2, - SFX_WFYLG_DODGE_3, - SFX_WFYLG_DODGE_4, - SFX_WFYLG_DODGE_5, - SFX_WFYLG_DODGE_6, - SFX_WFYLG_DODGE_7, - SFX_WFYLG_DODGE_8, - SFX_WFYLG_FIGHT_1, - SFX_WFYLG_FIGHT_2, - SFX_WFYLG_FIGHT_3, - SFX_WFYLG_FIGHT_4, - SFX_WFYLG_FIGHT_5, - SFX_WFYLG_FIGHT_6, - SFX_WFYLG_FIGHT_7, - SFX_WFYLG_GUN_COOL_1, - SFX_WFYLG_GUN_COOL_2, - SFX_WFYLG_GUN_COOL_3, - SFX_WFYLG_GUN_COOL_4, - SFX_WFYLG_GUN_COOL_5, - SFX_WFYLG_SAVED_1, - SFX_WFYLG_TAXI_1, - - SFX_WFOST_BLOCKED_1, - SFX_WFOST_BLOCKED_2, - SFX_WFOST_BLOCKED_3, - SFX_WFOST_BLOCKED_4, - SFX_WFOST_BLOCKED_5, - SFX_WFOST_BLOCKED_6, - SFX_WFOST_BLOCKED_7, - SFX_WFOST_BLOCKED_8, - SFX_WFOST_BLOCKED_9, - SFX_WFOST_BLOCKED_10, - SFX_WFOST_BLOCKED_11, - SFX_WFOST_BLOCKED_12, - SFX_WFOST_BUMP_1, - SFX_WFOST_BUMP_2, - SFX_WFOST_BUMP_3, - SFX_WFOST_BUMP_4, - SFX_WFOST_BUMP_5, - SFX_WFOST_BUMP_6, - SFX_WFOST_BUMP_7, - SFX_WFOST_BUMP_8, - SFX_WFOST_BUMP_9, - SFX_WFOST_BUMP_10, - SFX_WFOST_BUMP_11, - SFX_WFOST_BUMP_12, - SFX_WFOST_BUMP_13, - SFX_WFOST_BUMP_14, - SFX_WFOST_BUMP_15, - SFX_WFOST_BUMP_16, - SFX_WFOST_BUMP_17, - SFX_WFOST_BUMP_18, - SFX_WFOST_BUMP_19, - SFX_WFOST_CAR_CRASH_1, - SFX_WFOST_CAR_CRASH_2, - SFX_WFOST_CAR_CRASH_3, - SFX_WFOST_CAR_CRASH_4, - SFX_WFOST_CAR_CRASH_5, - SFX_WFOST_CAR_CRASH_6, - SFX_WFOST_CAR_CRASH_7, - SFX_WFOST_CAR_CRASH_8, - SFX_WFOST_CAR_CRASH_9, - SFX_WFOST_CAR_CRASH_10, - SFX_WFOST_CAR_CRASH_11, - SFX_WFOST_CHAT_1, - SFX_WFOST_CHAT_2, - SFX_WFOST_CHAT_3, - SFX_WFOST_CHAT_4, - SFX_WFOST_CHAT_5, - SFX_WFOST_CHAT_6, - SFX_WFOST_CHAT_7, - SFX_WFOST_CHAT_8, - SFX_WFOST_CHAT_9, - SFX_WFOST_CHAT_10, - SFX_WFOST_CHAT_11, - SFX_WFOST_CHAT_12, - SFX_WFOST_CHAT_13, - SFX_WFOST_CHAT_14, - SFX_WFOST_CHAT_15, - SFX_WFOST_CHAT_16, - SFX_WFOST_DODGE_1, - SFX_WFOST_DODGE_2, - SFX_WFOST_DODGE_3, - SFX_WFOST_DODGE_4, - SFX_WFOST_DODGE_5, - SFX_WFOST_DODGE_6, - SFX_WFOST_DODGE_7, - SFX_WFOST_DODGE_8, - SFX_WFOST_DODGE_9, - SFX_WFOST_DODGE_10, - SFX_WFOST_DODGE_11, - SFX_WFOST_DODGE_12, - SFX_WFOST_GENERIC_CRASH_1, - SFX_WFOST_GENERIC_CRASH_2, - SFX_WFOST_GENERIC_CRASH_3, - SFX_WFOST_GENERIC_CRASH_4, - SFX_WFOST_GENERIC_CRASH_5, - SFX_WFOST_GENERIC_CRASH_6, - SFX_WFOST_GENERIC_CRASH_7, - SFX_WFOST_GENERIC_CRASH_8, - SFX_WFOST_GENERIC_CRASH_9, - SFX_WFOST_GENERIC_CRASH_10, - SFX_WFOST_GUN_PANIC_1, - SFX_WFOST_GUN_PANIC_2, - SFX_WFOST_GUN_PANIC_3, - SFX_WFOST_GUN_PANIC_4, - SFX_WFOST_JACKED_1, - SFX_WFOST_JACKED_2, - SFX_WFOST_JACKED_3, - SFX_WFOST_JACKED_4, - SFX_WFOST_JACKED_5, - SFX_WFOST_JACKED_6, - SFX_WFOST_JACKED_7, - SFX_WFOST_JACKED_8, - SFX_WFOST_LOST_1, - SFX_WFOST_LOST_2, - SFX_WFOST_LOST_3, - SFX_WFOST_MUGGED_1, - SFX_WFOST_MUGGED_2, - SFX_WFOST_MUGGED_3, - SFX_WFOST_MUGGED_4, - SFX_WFOST_MUGGED_5, - SFX_WFOST_RUN_1, - SFX_WFOST_RUN_2, - SFX_WFOST_RUN_3, - SFX_WFOST_RUN_4, - SFX_WFOST_RUN_5, - SFX_WFOST_RUN_6, - SFX_WFOST_RUN_7, - SFX_WFOST_SAVED_1, - SFX_WFOST_SAVED_2, - SFX_WFOST_SAVED_3, - SFX_WFOST_SAVED_4, - SFX_WFOST_TAXI_1, - - SFX_WFYST_BLOCKED_1, - SFX_WFYST_BLOCKED_2, - SFX_WFYST_BLOCKED_3, - SFX_WFYST_BLOCKED_4, - SFX_WFYST_BLOCKED_5, - SFX_WFYST_BLOCKED_6, - SFX_WFYST_BUMP_1, - SFX_WFYST_BUMP_2, - SFX_WFYST_BUMP_3, - SFX_WFYST_BUMP_4, - SFX_WFYST_BUMP_5, - SFX_WFYST_BUMP_6, - SFX_WFYST_BUMP_7, - SFX_WFYST_BUMP_8, - SFX_WFYST_BUMP_9, - SFX_WFYST_BUMP_10, - SFX_WFYST_CAR_CRASH_1, - SFX_WFYST_CAR_CRASH_2, - SFX_WFYST_CAR_CRASH_3, - SFX_WFYST_CAR_CRASH_4, - SFX_WFYST_CAR_CRASH_5, - SFX_WFYST_CAR_CRASH_6, - SFX_WFYST_CAR_CRASH_7, - SFX_WFYST_CAR_CRASH_8, - SFX_WFYST_CHAT_1, - SFX_WFYST_CHAT_2, - SFX_WFYST_CHAT_3, - SFX_WFYST_CHAT_4, - SFX_WFYST_CHAT_5, - SFX_WFYST_CHAT_6, - SFX_WFYST_CHAT_7, - SFX_WFYST_CHAT_8, - SFX_WFYST_CHAT_9, - SFX_WFYST_CHAT_10, - SFX_WFYST_DODGE_1, - SFX_WFYST_DODGE_2, - SFX_WFYST_DODGE_3, - SFX_WFYST_DODGE_4, - SFX_WFYST_DODGE_5, - SFX_WFYST_DODGE_6, - SFX_WFYST_DODGE_7, - SFX_WFYST_DODGE_8, - SFX_WFYST_DODGE_9, - SFX_WFYST_DODGE_10, - SFX_WFYST_FIGHT_1, - SFX_WFYST_FIGHT_2, - SFX_WFYST_FIGHT_3, - SFX_WFYST_FIGHT_4, - SFX_WFYST_FIGHT_5, - SFX_WFYST_FIGHT_6, - SFX_WFYST_FIGHT_7, - SFX_WFYST_GENERIC_CRASH_1, - SFX_WFYST_GENERIC_CRASH_2, - SFX_WFYST_GENERIC_CRASH_3, - SFX_WFYST_GENERIC_CRASH_4, - SFX_WFYST_GENERIC_CRASH_5, - SFX_WFYST_GENERIC_CRASH_6, - SFX_WFYST_GENERIC_CRASH_7, - SFX_WFYST_GENERIC_CRASH_8, - SFX_WFYST_GUN_COOL_1, - SFX_WFYST_GUN_COOL_2, - SFX_WFYST_GUN_COOL_3, - SFX_WFYST_GUN_COOL_4, - SFX_WFYST_GUN_COOL_5, - SFX_WFYST_JACKED_1, - SFX_WFYST_JACKED_2, - SFX_WFYST_JACKED_3, - SFX_WFYST_JACKED_4, - SFX_WFYST_JACKED_5, - SFX_WFYST_JACKED_6, - SFX_WFYST_JACKING_1, - SFX_WFYST_JACKING_2, - SFX_WFYST_JACKING_3, - SFX_WFYST_JACKING_4, - SFX_WFYST_LOST_1, - SFX_WFYST_MUGGED_1, - SFX_WFYST_MUGGED_2, - SFX_WFYST_MUGGING_1, - SFX_WFYST_MUGGING_2, - SFX_WFYST_MUGGING_3, - SFX_WFYST_MUGGING_4, - SFX_WFYST_SAVED_1, - SFX_WFYST_TAXI_1, - - SFX_COP_VOICE_1_ARREST_1, - SFX_COP_VOICE_1_ARREST_2, - SFX_COP_VOICE_1_ARREST_3, - SFX_COP_VOICE_1_ARREST_4, - SFX_COP_VOICE_1_PULLOUTWEAPON_1, - SFX_COP_VOICE_1_PULLOUTWEAPON_2, - SFX_COP_VOICE_1_PULLOUTWEAPON_3, - SFX_COP_VOICE_1_BUMP_1, - SFX_COP_VOICE_1_BUMP_2, - SFX_COP_VOICE_1_BUMP_3, - SFX_COP_VOICE_1_BUMP_4, - SFX_COP_VOICE_1_BUMP_5, - SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_1, - SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_2, - SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_3, - SFX_COP_VOICE_1_COP_LITTLECOPSAROUND_4, - SFX_COP_VOICE_1_GUNAIMEDAT3_1, - SFX_COP_VOICE_1_GUNAIMEDAT3_2, - SFX_COP_VOICE_1_CAR_CRASH_1, - SFX_COP_VOICE_1_CAR_CRASH_2, - SFX_COP_VOICE_1_CAR_CRASH_3, - SFX_COP_VOICE_1_CAR_CRASH_4, - SFX_COP_VOICE_1_DODGE_1, - SFX_COP_VOICE_1_DODGE_2, - SFX_COP_VOICE_1_DODGE_3, - SFX_COP_VOICE_1_FIGHT_1, - SFX_COP_VOICE_1_FIGHT_2, - SFX_COP_VOICE_1_FIGHT_3, - SFX_COP_VOICE_1_FIGHT_4, - SFX_COP_VOICE_1_GUNAIMEDAT2_1, - SFX_COP_VOICE_1_GUNAIMEDAT2_2, - SFX_COP_VOICE_1_SAVED_1, - SFX_COP_VOICE_1_SAVED_2, - SFX_COP_VOICE_1_COP_ASK_FOR_ID_1, - SFX_COP_VOICE_1_COP_ASK_FOR_ID_2, - SFX_COP_VOICE_1_COP_ALONE_1, - SFX_COP_VOICE_1_COP_ALONE_2, - SFX_COP_VOICE_1_COP_ALONE_3, - SFX_COP_VOICE_1_COP_ALONE_4, - SFX_COP_VOICE_1_COP_MANYCOPSAROUND_1, - SFX_COP_VOICE_1_COP_MANYCOPSAROUND_2, - SFX_COP_VOICE_1_COP_TARGETING_1, - SFX_COP_VOICE_1_COP_TARGETING_2, - SFX_COP_VOICE_1_COP_TARGETING_3, - SFX_COP_VOICE_1_COP_TARGETING_4, - - SFX_COP_VOICE_2_ARREST_1, - SFX_COP_VOICE_2_ARREST_2, - SFX_COP_VOICE_2_ARREST_3, - SFX_COP_VOICE_2_ARREST_4, - SFX_COP_VOICE_2_PULLOUTWEAPON_1, - SFX_COP_VOICE_2_PULLOUTWEAPON_2, - SFX_COP_VOICE_2_PULLOUTWEAPON_3, - SFX_COP_VOICE_2_BUMP_1, - SFX_COP_VOICE_2_BUMP_2, - SFX_COP_VOICE_2_BUMP_3, - SFX_COP_VOICE_2_BUMP_4, - SFX_COP_VOICE_2_BUMP_5, - SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_1, - SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_2, - SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_3, - SFX_COP_VOICE_2_COP_LITTLECOPSAROUND_4, - SFX_COP_VOICE_2_GUNAIMEDAT3_1, - SFX_COP_VOICE_2_GUNAIMEDAT3_2, - SFX_COP_VOICE_2_CAR_CRASH_1, - SFX_COP_VOICE_2_CAR_CRASH_2, - SFX_COP_VOICE_2_CAR_CRASH_3, - SFX_COP_VOICE_2_CAR_CRASH_4, - SFX_COP_VOICE_2_DODGE_1, - SFX_COP_VOICE_2_DODGE_2, - SFX_COP_VOICE_2_DODGE_3, - SFX_COP_VOICE_2_FIGHT_1, - SFX_COP_VOICE_2_FIGHT_2, - SFX_COP_VOICE_2_FIGHT_3, - SFX_COP_VOICE_2_FIGHT_4, - SFX_COP_VOICE_2_GUNAIMEDAT2_1, - SFX_COP_VOICE_2_GUNAIMEDAT2_2, - SFX_COP_VOICE_2_SAVED_1, - SFX_COP_VOICE_2_SAVED_2, - SFX_COP_VOICE_2_COP_ASK_FOR_ID_1, - SFX_COP_VOICE_2_COP_ASK_FOR_ID_2, - SFX_COP_VOICE_2_COP_ALONE_1, - SFX_COP_VOICE_2_COP_ALONE_2, - SFX_COP_VOICE_2_COP_ALONE_3, - SFX_COP_VOICE_2_COP_ALONE_4, - SFX_COP_VOICE_2_COP_MANYCOPSAROUND_1, - SFX_COP_VOICE_2_COP_MANYCOPSAROUND_2, - SFX_COP_VOICE_2_COP_TARGETING_1, - SFX_COP_VOICE_2_COP_TARGETING_2, - SFX_COP_VOICE_2_COP_TARGETING_3, - SFX_COP_VOICE_2_COP_TARGETING_4, - - SFX_COP_VOICE_3_ARREST_1, - SFX_COP_VOICE_3_ARREST_2, - SFX_COP_VOICE_3_ARREST_3, - SFX_COP_VOICE_3_ARREST_4, - SFX_COP_VOICE_3_PULLOUTWEAPON_1, - SFX_COP_VOICE_3_PULLOUTWEAPON_2, - SFX_COP_VOICE_3_PULLOUTWEAPON_3, - SFX_COP_VOICE_3_BUMP_1, - SFX_COP_VOICE_3_BUMP_2, - SFX_COP_VOICE_3_BUMP_3, - SFX_COP_VOICE_3_BUMP_4, - SFX_COP_VOICE_3_BUMP_5, - SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_1, - SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_2, - SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_3, - SFX_COP_VOICE_3_COP_LITTLECOPSAROUND_4, - SFX_COP_VOICE_3_GUNAIMEDAT3_1, - SFX_COP_VOICE_3_GUNAIMEDAT3_2, - SFX_COP_VOICE_3_CAR_CRASH_1, - SFX_COP_VOICE_3_CAR_CRASH_2, - SFX_COP_VOICE_3_CAR_CRASH_3, - SFX_COP_VOICE_3_CAR_CRASH_4, - SFX_COP_VOICE_3_DODGE_1, - SFX_COP_VOICE_3_DODGE_2, - SFX_COP_VOICE_3_DODGE_3, - SFX_COP_VOICE_3_FIGHT_1, - SFX_COP_VOICE_3_FIGHT_2, - SFX_COP_VOICE_3_FIGHT_3, - SFX_COP_VOICE_3_FIGHT_4, - SFX_COP_VOICE_3_GUNAIMEDAT2_1, - SFX_COP_VOICE_3_GUNAIMEDAT2_2, - SFX_COP_VOICE_3_SAVED_1, - SFX_COP_VOICE_3_SAVED_2, - SFX_COP_VOICE_3_COP_ASK_FOR_ID_1, - SFX_COP_VOICE_3_COP_ASK_FOR_ID_2, - SFX_COP_VOICE_3_COP_ALONE_1, - SFX_COP_VOICE_3_COP_ALONE_2, - SFX_COP_VOICE_3_COP_ALONE_3, - SFX_COP_VOICE_3_COP_ALONE_4, - SFX_COP_VOICE_3_COP_MANYCOPSAROUND_1, - SFX_COP_VOICE_3_COP_MANYCOPSAROUND_2, - SFX_COP_VOICE_3_COP_TARGETING_1, - SFX_COP_VOICE_3_COP_TARGETING_2, - SFX_COP_VOICE_3_COP_TARGETING_3, - SFX_COP_VOICE_3_COP_TARGETING_4, - - SFX_COP_VOICE_4_ARREST_1, - SFX_COP_VOICE_4_ARREST_2, - SFX_COP_VOICE_4_ARREST_3, - SFX_COP_VOICE_4_ARREST_4, - SFX_COP_VOICE_4_PULLOUTWEAPON_1, - SFX_COP_VOICE_4_PULLOUTWEAPON_2, - SFX_COP_VOICE_4_PULLOUTWEAPON_3, - SFX_COP_VOICE_4_BUMP_1, - SFX_COP_VOICE_4_BUMP_2, - SFX_COP_VOICE_4_BUMP_3, - SFX_COP_VOICE_4_BUMP_4, - SFX_COP_VOICE_4_BUMP_5, - SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_1, - SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_2, - SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_3, - SFX_COP_VOICE_4_COP_LITTLECOPSAROUND_4, - SFX_COP_VOICE_4_GUNAIMEDAT3_1, - SFX_COP_VOICE_4_GUNAIMEDAT3_2, - SFX_COP_VOICE_4_CAR_CRASH_1, - SFX_COP_VOICE_4_CAR_CRASH_2, - SFX_COP_VOICE_4_CAR_CRASH_3, - SFX_COP_VOICE_4_CAR_CRASH_4, - SFX_COP_VOICE_4_DODGE_1, - SFX_COP_VOICE_4_DODGE_2, - SFX_COP_VOICE_4_DODGE_3, - SFX_COP_VOICE_4_FIGHT_1, - SFX_COP_VOICE_4_FIGHT_2, - SFX_COP_VOICE_4_FIGHT_3, - SFX_COP_VOICE_4_FIGHT_4, - SFX_COP_VOICE_4_GUNAIMEDAT2_1, - SFX_COP_VOICE_4_GUNAIMEDAT2_2, - SFX_COP_VOICE_4_SAVED_1, - SFX_COP_VOICE_4_SAVED_2, - SFX_COP_VOICE_4_COP_ASK_FOR_ID_1, - SFX_COP_VOICE_4_COP_ASK_FOR_ID_2, - SFX_COP_VOICE_4_COP_ALONE_1, - SFX_COP_VOICE_4_COP_ALONE_2, - SFX_COP_VOICE_4_COP_ALONE_3, - SFX_COP_VOICE_4_COP_ALONE_4, - SFX_COP_VOICE_4_COP_MANYCOPSAROUND_1, - SFX_COP_VOICE_4_COP_MANYCOPSAROUND_2, - SFX_COP_VOICE_4_COP_TARGETING_1, - SFX_COP_VOICE_4_COP_TARGETING_2, - SFX_COP_VOICE_4_COP_TARGETING_3, - SFX_COP_VOICE_4_COP_TARGETING_4, - - SFX_COP_VOICE_5_ARREST_1, - SFX_COP_VOICE_5_ARREST_2, - SFX_COP_VOICE_5_ARREST_3, - SFX_COP_VOICE_5_ARREST_4, - SFX_COP_VOICE_5_PULLOUTWEAPON_1, - SFX_COP_VOICE_5_PULLOUTWEAPON_2, - SFX_COP_VOICE_5_PULLOUTWEAPON_3, - SFX_COP_VOICE_5_BUMP_1, - SFX_COP_VOICE_5_BUMP_2, - SFX_COP_VOICE_5_BUMP_3, - SFX_COP_VOICE_5_BUMP_4, - SFX_COP_VOICE_5_BUMP_5, - SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_1, - SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_2, - SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_3, - SFX_COP_VOICE_5_COP_LITTLECOPSAROUND_4, - SFX_COP_VOICE_5_GUNAIMEDAT3_1, - SFX_COP_VOICE_5_GUNAIMEDAT3_2, - SFX_COP_VOICE_5_CAR_CRASH_1, - SFX_COP_VOICE_5_CAR_CRASH_2, - SFX_COP_VOICE_5_CAR_CRASH_3, - SFX_COP_VOICE_5_CAR_CRASH_4, - SFX_COP_VOICE_5_DODGE_1, - SFX_COP_VOICE_5_DODGE_2, - SFX_COP_VOICE_5_DODGE_3, - SFX_COP_VOICE_5_FIGHT_1, - SFX_COP_VOICE_5_FIGHT_2, - SFX_COP_VOICE_5_FIGHT_3, - SFX_COP_VOICE_5_FIGHT_4, - SFX_COP_VOICE_5_GUNAIMEDAT2_1, - SFX_COP_VOICE_5_GUNAIMEDAT2_2, - SFX_COP_VOICE_5_SAVED_1, - SFX_COP_VOICE_5_SAVED_2, - SFX_COP_VOICE_5_COP_ASK_FOR_ID_1, - SFX_COP_VOICE_5_COP_ASK_FOR_ID_2, - SFX_COP_VOICE_5_COP_ALONE_1, - SFX_COP_VOICE_5_COP_ALONE_2, - SFX_COP_VOICE_5_COP_ALONE_3, - SFX_COP_VOICE_5_COP_ALONE_4, - SFX_COP_VOICE_5_COP_MANYCOPSAROUND_1, - SFX_COP_VOICE_5_COP_MANYCOPSAROUND_2, - SFX_COP_VOICE_5_COP_TARGETING_1, - SFX_COP_VOICE_5_COP_TARGETING_2, - SFX_COP_VOICE_5_COP_TARGETING_3, - SFX_COP_VOICE_5_COP_TARGETING_4, - - SFX_PLAYER_ANGRY_BUSTED_1, - SFX_PLAYER_ANGRY_BUSTED_2, - SFX_PLAYER_ANGRY_BUSTED_3, - SFX_PLAYER_ANGRY_BUSTED_4, - SFX_PLAYER_ANGRY_BUSTED_5, - SFX_PLAYER_ANGRY_BUSTED_6, - SFX_PLAYER_ANGRY_BUSTED_7, - SFX_PLAYER_ANGRY_BUSTED_8, - SFX_PLAYER_ANGRY_BUSTED_9, - SFX_PLAYER_ANGRY_BUSTED_10, - SFX_PLAYER_ANGRY_BUSTED_11, - SFX_PLAYER_ANGRY_BUSTED_12, - SFX_PLAYER_ANGRY_BUSTED_13, - SFX_PLAYER_ANGRY_BUSTED_14, - SFX_PLAYER_ANGRY_BUSTED_15, - SFX_PLAYER_ANGRY_BUSTED_16, - SFX_PLAYER_ANGRY_BUSTED_17, - SFX_PLAYER_ANGRY_BUSTED_18, - SFX_PLAYER_ANGRY_BUSTED_19, - SFX_PLAYER_ANGRY_BUSTED_20, - SFX_PLAYER_ANGRY_BUSTED_21, - SFX_PLAYER_ANGRY_BUSTED_22, - SFX_PLAYER_ANGRY_BUSTED_23, - SFX_PLAYER_ANGRY_BUSTED_24, - SFX_PLAYER_ANGRY_BUSTED_25, - SFX_PLAYER_ANGRY_BUSTED_26, - SFX_PLAYER_ANGRY_BUSTED_27, - SFX_PLAYER_ANGRY_BUSTED_28, - SFX_PLAYER_ANGRY_BUSTED_29, - SFX_PLAYER_ANGRY_BUSTED_30, - SFX_PLAYER_ANGRY_BUSTED_31, - SFX_PLAYER_ANGRY_BUSTED_32, - SFX_PLAYER_ANGRY_BUSTED_33, - SFX_PLAYER_ANGRY_BUSTED_34, - SFX_PLAYER_ANGRY_BUSTED_35, - SFX_PLAYER_ANGRY_BUSTED_36, - SFX_PLAYER_ANGRY_BUSTED_37, - SFX_PLAYER_ANGRY_BUSTED_38, - SFX_PLAYER_ANGRY_CHASED_1, - SFX_PLAYER_ANGRY_CHASED_2, - SFX_PLAYER_ANGRY_CHASED_3, - SFX_PLAYER_ANGRY_CHASED_4, - SFX_PLAYER_ANGRY_CHASED_5, - SFX_PLAYER_ANGRY_CHASED_6, - SFX_PLAYER_ANGRY_CHASED_7, - SFX_PLAYER_ANGRY_CHASED_8, - SFX_PLAYER_ANGRY_CHASED_9, - SFX_PLAYER_ANGRY_CRASH_1, - SFX_PLAYER_ANGRY_CRASH_2, - SFX_PLAYER_ANGRY_CRASH_3, - SFX_PLAYER_ANGRY_CRASH_4, - SFX_PLAYER_ANGRY_CRASH_5, - SFX_PLAYER_ANGRY_CRASH_6, - SFX_PLAYER_ANGRY_CRASH_7, - SFX_PLAYER_ANGRY_CRASH_8, - SFX_PLAYER_ANGRY_CRASH_9, - SFX_PLAYER_ANGRY_CRASH_10, - SFX_PLAYER_ANGRY_CRASH_11, - SFX_PLAYER_ANGRY_CRASH_12, - SFX_PLAYER_ANGRY_CRASH_13, - SFX_PLAYER_ANGRY_CRASH_14, - SFX_PLAYER_ANGRY_CRASH_15, - SFX_PLAYER_ANGRY_CRASH_16, - SFX_PLAYER_ANGRY_CRASH_17, - SFX_PLAYER_ANGRY_CRASH_18, - SFX_PLAYER_ANGRY_CRASH_19, - SFX_PLAYER_ANGRY_CRASH_20, - SFX_PLAYER_ANGRY_CRASH_21, - SFX_PLAYER_ANGRY_CRASH_22, - SFX_PLAYER_ANGRY_CRASH_23, - SFX_PLAYER_ANGRY_CRASH_24, - SFX_PLAYER_ANGRY_CRASH_25, - SFX_PLAYER_ANGRY_CRASH_26, - SFX_PLAYER_ANGRY_CRASH_27, - SFX_PLAYER_ANGRY_CRASH_28, - SFX_PLAYER_ANGRY_CRASH_29, - SFX_PLAYER_ANGRY_CRASH_30, - SFX_PLAYER_ANGRY_CRASH_31, - SFX_PLAYER_ANGRY_CRASH_32, - SFX_PLAYER_ANGRY_CRASH_33, - SFX_PLAYER_ANGRY_CRASH_34, - SFX_PLAYER_ANGRY_CRASH_35, - SFX_PLAYER_ANGRY_CRASH_36, - SFX_PLAYER_ANGRY_CRASH_37, - SFX_PLAYER_ANGRY_CRASH_38, - SFX_PLAYER_ANGRY_CRASH_39, - SFX_PLAYER_ANGRY_CRASH_40, - SFX_PLAYER_ANGRY_CRASH_41, - SFX_PLAYER_ANGRY_FIGHT_1, - SFX_PLAYER_ANGRY_FIGHT_2, - SFX_PLAYER_ANGRY_FIGHT_3, - SFX_PLAYER_ANGRY_FIGHT_4, - SFX_PLAYER_ANGRY_FIGHT_5, - SFX_PLAYER_ANGRY_FIGHT_6, - SFX_PLAYER_ANGRY_FIGHT_7, - SFX_PLAYER_ANGRY_FIGHT_8, - SFX_PLAYER_ANGRY_FIGHT_9, - SFX_PLAYER_ANGRY_FIGHT_10, - SFX_PLAYER_ANGRY_FIGHT_11, - SFX_PLAYER_ANGRY_FIGHT_12, - SFX_PLAYER_ANGRY_FIGHT_13, - SFX_PLAYER_ANGRY_FIGHT_14, - SFX_PLAYER_ANGRY_FIGHT_15, - SFX_PLAYER_ANGRY_FIGHT_16, - SFX_PLAYER_ANGRY_FIGHT_17, - SFX_PLAYER_ANGRY_FIGHT_18, - SFX_PLAYER_ANGRY_FIGHT_19, - SFX_PLAYER_ANGRY_FIGHT_20, - SFX_PLAYER_ANGRY_FIGHT_21, - SFX_PLAYER_ANGRY_FIGHT_22, - SFX_PLAYER_ANGRY_FIGHT_23, - SFX_PLAYER_ANGRY_FIGHT_24, - SFX_PLAYER_ANGRY_FIGHT_25, - SFX_PLAYER_ANGRY_FIGHT_26, - SFX_PLAYER_ANGRY_FIGHT_27, - SFX_PLAYER_ANGRY_FIGHT_28, - SFX_PLAYER_ANGRY_FIGHT_29, - SFX_PLAYER_ANGRY_FIGHT_30, - SFX_PLAYER_ANGRY_FIGHT_31, - SFX_PLAYER_ANGRY_FIGHT_32, - SFX_PLAYER_ANGRY_FIGHT_33, - SFX_PLAYER_ANGRY_FIGHT_34, - SFX_PLAYER_ANGRY_FIGHT_35, - SFX_PLAYER_ANGRY_FIGHT_36, - SFX_PLAYER_ANGRY_FIGHT_37, - SFX_PLAYER_ANGRY_FIGHT_38, - SFX_PLAYER_ANGRY_FIGHT_39, - SFX_PLAYER_ANGRY_FIGHT_40, - SFX_PLAYER_ANGRY_FIGHT_41, - SFX_PLAYER_ANGRY_FIGHT_42, - SFX_PLAYER_ANGRY_FIGHT_43, - SFX_PLAYER_ANGRY_FIGHT_44, - SFX_PLAYER_ANGRY_FIGHT_45, - SFX_PLAYER_ANGRY_FIGHT_46, - SFX_PLAYER_ANGRY_FIGHT_47, - SFX_PLAYER_ANGRY_FIGHT_48, - SFX_PLAYER_ANGRY_FIGHT_49, - SFX_PLAYER_ANGRY_FIGHT_50, - SFX_PLAYER_ANGRY_FIGHT_51, - SFX_PLAYER_ANGRY_FIGHT_52, - SFX_PLAYER_ANGRY_FIGHT_53, - SFX_PLAYER_ANGRY_FIGHT_54, - SFX_PLAYER_ANGRY_FIGHT_55, - SFX_PLAYER_ANGRY_FIGHT_56, - SFX_PLAYER_ANGRY_FIGHT_57, - SFX_PLAYER_ANGRY_FIGHT_58, - SFX_PLAYER_ANGRY_FIGHT_59, - SFX_PLAYER_ANGRY_FIGHT_60, - SFX_PLAYER_ANGRY_FIGHT_61, - SFX_PLAYER_ANGRY_JACKED_1, - SFX_PLAYER_ANGRY_JACKED_2, - SFX_PLAYER_ANGRY_JACKED_3, - SFX_PLAYER_ANGRY_JACKED_4, - SFX_PLAYER_ANGRY_JACKED_5, - SFX_PLAYER_ANGRY_JACKED_6, - SFX_PLAYER_ANGRY_JACKED_7, - SFX_PLAYER_ANGRY_JACKED_8, - SFX_PLAYER_ANGRY_JACKED_9, - SFX_PLAYER_ANGRY_JACKED_10, - SFX_PLAYER_ANGRY_JACKED_11, - SFX_PLAYER_ANGRY_JACKED_12, - SFX_PLAYER_ANGRY_JACKED_13, - SFX_PLAYER_ANGRY_JACKED_14, - SFX_PLAYER_ANGRY_JACKED_15, - SFX_PLAYER_ANGRY_JACKED_16, - SFX_PLAYER_ANGRY_JACKED_17, - SFX_PLAYER_ANGRY_JACKED_18, - SFX_PLAYER_ANGRY_JACKED_19, - SFX_PLAYER_ANGRY_JACKED_20, - SFX_PLAYER_ANGRY_JACKED_21, - SFX_PLAYER_ANGRY_JACKED_22, - SFX_PLAYER_ANGRY_JACKED_23, - SFX_PLAYER_ANGRY_JACKED_24, - SFX_PLAYER_ANGRY_JACKED_25, - SFX_PLAYER_ANGRY_JACKED_26, - SFX_PLAYER_ANGRY_JACKED_27, - SFX_PLAYER_ANGRY_JACKED_28, - SFX_PLAYER_ANGRY_JACKED_29, - SFX_PLAYER_ANGRY_JACKED_30, - SFX_PLAYER_ANGRY_JACKED_31, - SFX_PLAYER_ANGRY_JACKED_32, - SFX_PLAYER_ANGRY_JACKED_33, - SFX_PLAYER_ANGRY_JACKING_1, - SFX_PLAYER_ANGRY_JACKING_2, - SFX_PLAYER_ANGRY_JACKING_3, - SFX_PLAYER_ANGRY_JACKING_4, - SFX_PLAYER_ANGRY_JACKING_5, - SFX_PLAYER_ANGRY_JACKING_6, - SFX_PLAYER_ANGRY_JACKING_7, - SFX_PLAYER_ANGRY_JACKING_8, - SFX_PLAYER_ANGRY_JACKING_9, - SFX_PLAYER_ANGRY_JACKING_10, - SFX_PLAYER_ANGRY_JACKING_11, - SFX_PLAYER_ANGRY_JACKING_12, - SFX_PLAYER_ANGRY_JACKING_13, - SFX_PLAYER_ANGRY_JACKING_14, - SFX_PLAYER_ANGRY_JACKING_15, - SFX_PLAYER_ANGRY_JACKING_16, - SFX_PLAYER_ANGRY_JACKING_17, - SFX_PLAYER_ANGRY_JACKING_18, - SFX_PLAYER_ANGRY_JACKING_19, - SFX_PLAYER_ANGRY_JACKING_20, - SFX_PLAYER_ANGRY_JACKING_21, - SFX_PLAYER_ANGRY_JACKING_22, - SFX_PLAYER_ANGRY_JACKING_23, - SFX_PLAYER_ANGRY_JACKING_24, - SFX_PLAYER_ANGRY_JACKING_25, - SFX_PLAYER_ANGRY_JACKING_26, - SFX_PLAYER_ANGRY_JACKING_27, - SFX_PLAYER_ANGRY_JACKING_28, - SFX_PLAYER_ANGRY_JACKING_29, - SFX_PLAYER_ANGRY_JACKING_30, - SFX_PLAYER_ANGRY_JACKING_31, - SFX_PLAYER_ANGRY_JACKING_32, - SFX_PLAYER_ANGRY_JACKING_33, - SFX_PLAYER_ANGRY_JACKING_34, - SFX_PLAYER_ANGRY_JACKING_35, - SFX_PLAYER_ANGRY_JACKING_36, - SFX_PLAYER_ANGRY_JACKING_37, - SFX_PLAYER_ANGRY_JACKING_38, - SFX_PLAYER_ANGRY_JACKING_39, - SFX_PLAYER_ANGRY_JACKING_40, - SFX_PLAYER_ANGRY_JACKING_41, - SFX_PLAYER_ANGRY_JACKING_42, - SFX_PLAYER_ANGRY_JACKING_43, - SFX_PLAYER_ANGRY_PICK_UP_CASH_1, - SFX_PLAYER_ANGRY_PICK_UP_CASH_2, - SFX_PLAYER_ANGRY_PICK_UP_CASH_3, - SFX_PLAYER_ANGRY_PICK_UP_CASH_4, - SFX_PLAYER_ANGRY_PICK_UP_CASH_5, - SFX_PLAYER_ANGRY_PICK_UP_CASH_6, - SFX_PLAYER_ANGRY_PICK_UP_CASH_7, - SFX_PLAYER_ANGRY_PICK_UP_CASH_8, - SFX_PLAYER_ANGRY_PICK_UP_CASH_9, - SFX_PLAYER_ANGRY_PICK_UP_CASH_10, - SFX_PLAYER_ANGRY_PICK_UP_CASH_11, - SFX_PLAYER_ANGRY_PICK_UP_CASH_12, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_1, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_2, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_3, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_4, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_5, - SFX_PLAYER_ANGRY_PICK_UP_HOOKER_6, - SFX_PLAYER_ANGRY_PULL_GUN_1, - SFX_PLAYER_ANGRY_PULL_GUN_2, - SFX_PLAYER_ANGRY_PULL_GUN_3, - SFX_PLAYER_ANGRY_PULL_GUN_4, - SFX_PLAYER_ANGRY_PULL_GUN_5, - SFX_PLAYER_ANGRY_PULL_GUN_6, - SFX_PLAYER_ANGRY_PULL_GUN_7, - SFX_PLAYER_ANGRY_PULL_GUN_8, - SFX_PLAYER_ANGRY_PULL_GUN_9, - SFX_PLAYER_ANGRY_PULL_GUN_10, - SFX_PLAYER_ANGRY_PULL_GUN_11, - SFX_PLAYER_ANGRY_PULL_GUN_12, - SFX_PLAYER_ANGRY_PULL_GUN_13, - SFX_PLAYER_ANGRY_PULL_GUN_14, - SFX_PLAYER_ANGRY_PULL_GUN_15, - SFX_PLAYER_ANGRY_PULL_GUN_16, - SFX_PLAYER_ANGRY_PULL_GUN_17, - SFX_PLAYER_ANGRY_PULL_GUN_18, - SFX_PLAYER_ANGRY_PULL_GUN_19, - SFX_PLAYER_ANGRY_PULL_GUN_20, - SFX_PLAYER_ANGRY_PULL_GUN_21, - SFX_PLAYER_ANGRY_PULL_GUN_22, - SFX_PLAYER_ANGRY_PULL_GUN_23, - SFX_PLAYER_ANGRY_PULL_GUN_24, - SFX_PLAYER_ANGRY_PULL_GUN_25, - SFX_PLAYER_ANGRY_PULL_GUN_26, - SFX_PLAYER_ANGRY_PULL_GUN_27, - SFX_PLAYER_ANGRY_PULL_GUN_28, - SFX_PLAYER_ANGRY_PULL_GUN_29, - SFX_PLAYER_ANGRY_PULL_GUN_30, - SFX_PLAYER_ANGRY_PULL_GUN_31, - SFX_PLAYER_ANGRY_PULL_GUN_32, - SFX_PLAYER_ANGRY_PULL_GUN_33, - SFX_PLAYER_ANGRY_PULL_GUN_34, - SFX_PLAYER_ANGRY_PULL_GUN_35, - SFX_PLAYER_ANGRY_PULL_GUN_36, - SFX_PLAYER_ANGRY_PULL_GUN_37, - SFX_PLAYER_ANGRY_PULL_GUN_38, - SFX_PLAYER_ANGRY_PULL_GUN_39, - SFX_PLAYER_ANGRY_PULL_GUN_40, - SFX_PLAYER_ANGRY_PULL_GUN_41, - SFX_PLAYER_ANGRY_PULL_GUN_42, - SFX_PLAYER_ANGRY_PULL_GUN_43, - SFX_PLAYER_ANGRY_PULL_GUN_44, - SFX_PLAYER_ANGRY_PULL_GUN_45, - SFX_PLAYER_ANGRY_PULL_GUN_46, - SFX_PLAYER_ANGRY_PULL_GUN_47, - SFX_PLAYER_ANGRY_PULL_GUN_48, - SFX_PLAYER_ANGRY_PULL_GUN_49, - SFX_PLAYER_ANGRY_PULL_GUN_50, - SFX_PLAYER_ANGRY_PULL_GUN_51, - SFX_PLAYER_ANGRY_PULL_GUN_52, - SFX_PLAYER_ANGRY_SEX_1, - SFX_PLAYER_ANGRY_SEX_2, - SFX_PLAYER_ANGRY_SEX_3, - SFX_PLAYER_ANGRY_SEX_4, - SFX_PLAYER_ANGRY_SEX_5, - SFX_PLAYER_ANGRY_SEX_6, - SFX_PLAYER_ANGRY_SEX_7, - SFX_PLAYER_ANGRY_SEX_8, - SFX_PLAYER_ANGRY_SEX_9, - SFX_PLAYER_ANGRY_SEX_10, - SFX_PLAYER_ANGRY_SEX_11, - SFX_PLAYER_ANGRY_SEX_12, - SFX_PLAYER_ANGRY_SEX_13, - SFX_PLAYER_ANGRY_SEX_14, - SFX_PLAYER_ANGRY_SEX_15, - SFX_PLAYER_ANGRY_SEX_16, - SFX_PLAYER_ANGRY_SEX_17, - SFX_PLAYER_ANGRY_SEX_18, - SFX_PLAYER_ANGRY_SHOOT_1, - SFX_PLAYER_ANGRY_SHOOT_2, - SFX_PLAYER_ANGRY_SHOOT_3, - SFX_PLAYER_ANGRY_SHOOT_4, - SFX_PLAYER_ANGRY_SHOOT_5, - SFX_PLAYER_ANGRY_SHOOT_6, - SFX_PLAYER_ANGRY_SHOOT_7, - SFX_PLAYER_ANGRY_SHOOT_8, - SFX_PLAYER_ANGRY_SHOOT_9, - SFX_PLAYER_ANGRY_SHOOT_10, - SFX_PLAYER_ANGRY_SHOOT_11, - SFX_PLAYER_ANGRY_SHOOT_12, - SFX_PLAYER_ANGRY_SHOOT_13, - SFX_PLAYER_ANGRY_SHOOT_14, - SFX_PLAYER_ANGRY_SHOOT_15, - SFX_PLAYER_ANGRY_SHOOT_16, - SFX_PLAYER_ANGRY_SHOOT_17, - SFX_PLAYER_ANGRY_SHOOT_18, - SFX_PLAYER_ANGRY_SHOOT_19, - SFX_PLAYER_ANGRY_SHOOT_20, - SFX_PLAYER_ANGRY_SHOOT_21, - SFX_PLAYER_ANGRY_SHOOT_22, - SFX_PLAYER_ANGRY_SHOOT_23, - SFX_PLAYER_ANGRY_SHOOT_24, - SFX_PLAYER_ANGRY_SHOOT_25, - SFX_PLAYER_ANGRY_SHOOT_26, - SFX_PLAYER_ANGRY_SHOOT_27, - SFX_PLAYER_ANGRY_SHOOT_28, - SFX_PLAYER_ANGRY_SHOOT_29, - SFX_PLAYER_ANGRY_SHOOT_30, - SFX_PLAYER_ANGRY_SHOOT_31, - SFX_PLAYER_ANGRY_SHOOT_32, - SFX_PLAYER_ANGRY_SHOOT_33, - SFX_PLAYER_ANGRY_SHOOT_34, - SFX_PLAYER_ANGRY_SHOOT_35, - SFX_PLAYER_ANGRY_SHOOT_36, - SFX_PLAYER_ANGRY_SHOOT_37, - SFX_PLAYER_ANGRY_SHOOT_38, - SFX_PLAYER_ANGRY_SHOOT_39, - - SFX_PLAYER_CALM_BUSTED_1, - SFX_PLAYER_CALM_BUSTED_2, - SFX_PLAYER_CALM_BUSTED_3, - SFX_PLAYER_CALM_BUSTED_4, - SFX_PLAYER_CALM_BUSTED_5, - SFX_PLAYER_CALM_BUSTED_6, - SFX_PLAYER_CALM_BUSTED_7, - SFX_PLAYER_CALM_BUSTED_8, - SFX_PLAYER_CALM_BUSTED_9, - SFX_PLAYER_CALM_BUSTED_10, - SFX_PLAYER_CALM_BUSTED_11, - SFX_PLAYER_CALM_BUSTED_12, - SFX_PLAYER_CALM_BUSTED_13, - SFX_PLAYER_CALM_BUSTED_14, - SFX_PLAYER_CALM_BUSTED_15, - SFX_PLAYER_CALM_BUSTED_16, - SFX_PLAYER_CALM_BUSTED_17, - SFX_PLAYER_CALM_BUSTED_18, - SFX_PLAYER_CALM_BUSTED_19, - SFX_PLAYER_CALM_BUSTED_20, - SFX_PLAYER_CALM_BUSTED_21, - SFX_PLAYER_CALM_BUSTED_22, - SFX_PLAYER_CALM_CHASED_1, - SFX_PLAYER_CALM_CHASED_2, - SFX_PLAYER_CALM_CHASED_3, - SFX_PLAYER_CALM_CHASED_4, - SFX_PLAYER_CALM_CHASED_5, - SFX_PLAYER_CALM_CHASED_6, - SFX_PLAYER_CALM_CHASED_7, - SFX_PLAYER_CALM_CHASED_8, - SFX_PLAYER_CALM_CHASED_9, - SFX_PLAYER_CALM_CHASED_10, - SFX_PLAYER_CALM_CHASED_11, - SFX_PLAYER_CALM_CHASED_12, - SFX_PLAYER_CALM_CHASED_13, - SFX_PLAYER_CALM_CHASED_14, - SFX_PLAYER_CALM_CHASED_15, - SFX_PLAYER_CALM_CHASED_16, - SFX_PLAYER_CALM_CHASED_17, - SFX_PLAYER_CALM_CHASED_18, - SFX_PLAYER_CALM_CHASED_19, - SFX_PLAYER_CALM_CHASED_20, - SFX_PLAYER_CALM_CRASH_1, - SFX_PLAYER_CALM_CRASH_2, - SFX_PLAYER_CALM_CRASH_3, - SFX_PLAYER_CALM_CRASH_4, - SFX_PLAYER_CALM_CRASH_5, - SFX_PLAYER_CALM_CRASH_6, - SFX_PLAYER_CALM_CRASH_7, - SFX_PLAYER_CALM_CRASH_8, - SFX_PLAYER_CALM_CRASH_9, - SFX_PLAYER_CALM_CRASH_10, - SFX_PLAYER_CALM_CRASH_11, - SFX_PLAYER_CALM_CRASH_12, - SFX_PLAYER_CALM_CRASH_13, - SFX_PLAYER_CALM_CRASH_14, - SFX_PLAYER_CALM_CRASH_15, - SFX_PLAYER_CALM_CRASH_16, - SFX_PLAYER_CALM_CRASH_17, - SFX_PLAYER_CALM_CRASH_18, - SFX_PLAYER_CALM_CRASH_19, - SFX_PLAYER_CALM_CRASH_20, - SFX_PLAYER_CALM_CRASH_21, - SFX_PLAYER_CALM_CRASH_22, - SFX_PLAYER_CALM_CRASH_23, - SFX_PLAYER_CALM_CRASH_24, - SFX_PLAYER_CALM_CRASH_25, - SFX_PLAYER_CALM_CRASH_26, - SFX_PLAYER_CALM_CRASH_27, - SFX_PLAYER_CALM_CRASH_28, - SFX_PLAYER_CALM_CRASH_29, - SFX_PLAYER_CALM_CRASH_30, - SFX_PLAYER_CALM_CRASH_31, - SFX_PLAYER_CALM_CRASH_32, - SFX_PLAYER_CALM_CRASH_33, - SFX_PLAYER_CALM_CRASH_34, - SFX_PLAYER_CALM_CRASH_35, - SFX_PLAYER_CALM_CRASH_36, - SFX_PLAYER_CALM_CRASH_37, - SFX_PLAYER_CALM_CRASH_38, - SFX_PLAYER_CALM_CRASH_39, - SFX_PLAYER_CALM_CRASH_40, - SFX_PLAYER_CALM_CRASH_41, - SFX_PLAYER_CALM_CRASH_42, - SFX_PLAYER_CALM_CRASH_43, - SFX_PLAYER_CALM_FIGHT_1, - SFX_PLAYER_CALM_FIGHT_2, - SFX_PLAYER_CALM_FIGHT_3, - SFX_PLAYER_CALM_FIGHT_4, - SFX_PLAYER_CALM_FIGHT_5, - SFX_PLAYER_CALM_FIGHT_6, - SFX_PLAYER_CALM_FIGHT_7, - SFX_PLAYER_CALM_FIGHT_8, - SFX_PLAYER_CALM_FIGHT_9, - SFX_PLAYER_CALM_FIGHT_10, - SFX_PLAYER_CALM_FIGHT_11, - SFX_PLAYER_CALM_FIGHT_12, - SFX_PLAYER_CALM_FIGHT_13, - SFX_PLAYER_CALM_FIGHT_14, - SFX_PLAYER_CALM_FIGHT_15, - SFX_PLAYER_CALM_FIGHT_16, - SFX_PLAYER_CALM_FIGHT_17, - SFX_PLAYER_CALM_FIGHT_18, - SFX_PLAYER_CALM_FIGHT_19, - SFX_PLAYER_CALM_FIGHT_20, - SFX_PLAYER_CALM_FIGHT_21, - SFX_PLAYER_CALM_FIGHT_22, - SFX_PLAYER_CALM_FIGHT_23, - SFX_PLAYER_CALM_FIGHT_24, - SFX_PLAYER_CALM_FIGHT_25, - SFX_PLAYER_CALM_FIGHT_26, - SFX_PLAYER_CALM_FIGHT_27, - SFX_PLAYER_CALM_FIGHT_28, - SFX_PLAYER_CALM_FIGHT_29, - SFX_PLAYER_CALM_FIGHT_30, - SFX_PLAYER_CALM_FIGHT_31, - SFX_PLAYER_CALM_FIGHT_32, - SFX_PLAYER_CALM_FIGHT_33, - SFX_PLAYER_CALM_FIGHT_34, - SFX_PLAYER_CALM_FIGHT_35, - SFX_PLAYER_CALM_FIGHT_36, - SFX_PLAYER_CALM_FIGHT_37, - SFX_PLAYER_CALM_FIGHT_38, - SFX_PLAYER_CALM_FIGHT_39, - SFX_PLAYER_CALM_FIGHT_40, - SFX_PLAYER_CALM_FIGHT_41, - SFX_PLAYER_CALM_FIGHT_42, - SFX_PLAYER_CALM_FIGHT_43, - SFX_PLAYER_CALM_FIGHT_44, - SFX_PLAYER_CALM_FIGHT_45, - SFX_PLAYER_CALM_FIGHT_46, - SFX_PLAYER_CALM_FIGHT_47, - SFX_PLAYER_CALM_JACKED_1, - SFX_PLAYER_CALM_JACKED_2, - SFX_PLAYER_CALM_JACKED_3, - SFX_PLAYER_CALM_JACKED_4, - SFX_PLAYER_CALM_JACKED_5, - SFX_PLAYER_CALM_JACKED_6, - SFX_PLAYER_CALM_JACKED_7, - SFX_PLAYER_CALM_JACKED_8, - SFX_PLAYER_CALM_JACKED_9, - SFX_PLAYER_CALM_JACKED_10, - SFX_PLAYER_CALM_JACKED_11, - SFX_PLAYER_CALM_JACKED_12, - SFX_PLAYER_CALM_JACKED_13, - SFX_PLAYER_CALM_JACKED_14, - SFX_PLAYER_CALM_JACKED_15, - SFX_PLAYER_CALM_JACKED_16, - SFX_PLAYER_CALM_JACKED_17, - SFX_PLAYER_CALM_JACKED_18, - SFX_PLAYER_CALM_JACKED_19, - SFX_PLAYER_CALM_JACKED_20, - SFX_PLAYER_CALM_JACKED_21, - SFX_PLAYER_CALM_JACKED_22, - SFX_PLAYER_CALM_JACKED_23, - SFX_PLAYER_CALM_JACKED_24, - SFX_PLAYER_CALM_JACKING_1, - SFX_PLAYER_CALM_JACKING_2, - SFX_PLAYER_CALM_JACKING_3, - SFX_PLAYER_CALM_JACKING_4, - SFX_PLAYER_CALM_JACKING_5, - SFX_PLAYER_CALM_JACKING_6, - SFX_PLAYER_CALM_JACKING_7, - SFX_PLAYER_CALM_JACKING_8, - SFX_PLAYER_CALM_JACKING_9, - SFX_PLAYER_CALM_JACKING_10, - SFX_PLAYER_CALM_JACKING_11, - SFX_PLAYER_CALM_JACKING_12, - SFX_PLAYER_CALM_JACKING_13, - SFX_PLAYER_CALM_JACKING_14, - SFX_PLAYER_CALM_JACKING_15, - SFX_PLAYER_CALM_JACKING_16, - SFX_PLAYER_CALM_JACKING_17, - SFX_PLAYER_CALM_JACKING_18, - SFX_PLAYER_CALM_JACKING_19, - SFX_PLAYER_CALM_JACKING_20, - SFX_PLAYER_CALM_JACKING_21, - SFX_PLAYER_CALM_JACKING_22, - SFX_PLAYER_CALM_JACKING_23, - SFX_PLAYER_CALM_JACKING_24, - SFX_PLAYER_CALM_JACKING_25, - SFX_PLAYER_CALM_JACKING_26, - SFX_PLAYER_CALM_JACKING_27, - SFX_PLAYER_CALM_JACKING_28, - SFX_PLAYER_CALM_JACKING_29, - SFX_PLAYER_CALM_JACKING_30, - SFX_PLAYER_CALM_JACKING_31, - SFX_PLAYER_CALM_JACKING_32, - SFX_PLAYER_CALM_JACKING_33, - SFX_PLAYER_CALM_JACKING_34, - SFX_PLAYER_CALM_JACKING_35, - SFX_PLAYER_CALM_JACKING_36, - SFX_PLAYER_CALM_JACKING_37, - SFX_PLAYER_CALM_JACKING_38, - SFX_PLAYER_CALM_JACKING_39, - SFX_PLAYER_CALM_JACKING_40, - SFX_PLAYER_CALM_PICK_UP_CASH_1, - SFX_PLAYER_CALM_PICK_UP_CASH_2, - SFX_PLAYER_CALM_PICK_UP_CASH_3, - SFX_PLAYER_CALM_PICK_UP_CASH_4, - SFX_PLAYER_CALM_PICK_UP_CASH_5, - SFX_PLAYER_CALM_PICK_UP_CASH_6, - SFX_PLAYER_CALM_PICK_UP_CASH_7, - SFX_PLAYER_CALM_PICK_UP_CASH_8, - SFX_PLAYER_CALM_PICK_UP_CASH_9, - SFX_PLAYER_CALM_PICK_UP_CASH_10, - SFX_PLAYER_CALM_PICK_UP_CASH_11, - SFX_PLAYER_CALM_PICK_UP_HOOKER_1, - SFX_PLAYER_CALM_PICK_UP_HOOKER_2, - SFX_PLAYER_CALM_PICK_UP_HOOKER_3, - SFX_PLAYER_CALM_PICK_UP_HOOKER_4, - SFX_PLAYER_CALM_PICK_UP_HOOKER_5, - SFX_PLAYER_CALM_PICK_UP_HOOKER_6, - SFX_PLAYER_CALM_PICK_UP_HOOKER_7, - SFX_PLAYER_CALM_PICK_UP_HOOKER_8, - SFX_PLAYER_CALM_PICK_UP_HOOKER_9, - SFX_PLAYER_CALM_PICK_UP_HOOKER_10, - SFX_PLAYER_CALM_PICK_UP_HOOKER_11, - SFX_PLAYER_CALM_PICK_UP_HOOKER_12, - SFX_PLAYER_CALM_PICK_UP_HOOKER_13, - SFX_PLAYER_CALM_PICK_UP_HOOKER_14, - SFX_PLAYER_CALM_PICK_UP_HOOKER_15, - SFX_PLAYER_CALM_PICK_UP_HOOKER_16, - SFX_PLAYER_CALM_PICK_UP_HOOKER_17, - SFX_PLAYER_CALM_PICK_UP_HOOKER_18, - SFX_PLAYER_CALM_PICK_UP_HOOKER_19, - SFX_PLAYER_CALM_PICK_UP_HOOKER_20, - SFX_PLAYER_CALM_PICK_UP_HOOKER_21, - SFX_PLAYER_CALM_PICK_UP_HOOKER_22, - SFX_PLAYER_CALM_PULL_GUN_1, - SFX_PLAYER_CALM_PULL_GUN_2, - SFX_PLAYER_CALM_PULL_GUN_3, - SFX_PLAYER_CALM_PULL_GUN_4, - SFX_PLAYER_CALM_PULL_GUN_5, - SFX_PLAYER_CALM_PULL_GUN_6, - SFX_PLAYER_CALM_PULL_GUN_7, - SFX_PLAYER_CALM_PULL_GUN_8, - SFX_PLAYER_CALM_PULL_GUN_9, - SFX_PLAYER_CALM_PULL_GUN_10, - SFX_PLAYER_CALM_PULL_GUN_11, - SFX_PLAYER_CALM_PULL_GUN_12, - SFX_PLAYER_CALM_PULL_GUN_13, - SFX_PLAYER_CALM_PULL_GUN_14, - SFX_PLAYER_CALM_PULL_GUN_15, - SFX_PLAYER_CALM_PULL_GUN_16, - SFX_PLAYER_CALM_PULL_GUN_17, - SFX_PLAYER_CALM_PULL_GUN_18, - SFX_PLAYER_CALM_PULL_GUN_19, - SFX_PLAYER_CALM_PULL_GUN_20, - SFX_PLAYER_CALM_PULL_GUN_21, - SFX_PLAYER_CALM_PULL_GUN_22, - SFX_PLAYER_CALM_PULL_GUN_23, - SFX_PLAYER_CALM_PULL_GUN_24, - SFX_PLAYER_CALM_PULL_GUN_25, - SFX_PLAYER_CALM_PULL_GUN_26, - SFX_PLAYER_CALM_PULL_GUN_27, - SFX_PLAYER_CALM_PULL_GUN_28, - SFX_PLAYER_CALM_PULL_GUN_29, - SFX_PLAYER_CALM_PULL_GUN_30, - SFX_PLAYER_CALM_PULL_GUN_31, - SFX_PLAYER_CALM_PULL_GUN_32, - SFX_PLAYER_CALM_PULL_GUN_33, - SFX_PLAYER_CALM_PULL_GUN_34, - SFX_PLAYER_CALM_PULL_GUN_35, - SFX_PLAYER_CALM_PULL_GUN_36, - SFX_PLAYER_CALM_PULL_GUN_37, - SFX_PLAYER_CALM_PULL_GUN_38, - SFX_PLAYER_CALM_PULL_GUN_39, - SFX_PLAYER_CALM_SEX_1, - SFX_PLAYER_CALM_SEX_2, - SFX_PLAYER_CALM_SEX_3, - SFX_PLAYER_CALM_SEX_4, - SFX_PLAYER_CALM_SEX_5, - SFX_PLAYER_CALM_SEX_6, - SFX_PLAYER_CALM_SEX_7, - SFX_PLAYER_CALM_SEX_8, - SFX_PLAYER_CALM_SHOOT_1, - SFX_PLAYER_CALM_SHOOT_2, - SFX_PLAYER_CALM_SHOOT_3, - SFX_PLAYER_CALM_SHOOT_4, - SFX_PLAYER_CALM_SHOOT_5, - SFX_PLAYER_CALM_SHOOT_6, - SFX_PLAYER_CALM_SHOOT_7, - SFX_PLAYER_CALM_SHOOT_8, - SFX_PLAYER_CALM_SHOOT_9, - SFX_PLAYER_CALM_SHOOT_10, - SFX_PLAYER_CALM_SHOOT_11, - SFX_PLAYER_CALM_SHOOT_12, - SFX_PLAYER_CALM_SHOOT_13, - SFX_PLAYER_CALM_SHOOT_14, - SFX_PLAYER_CALM_SHOOT_15, - SFX_PLAYER_CALM_SHOOT_16, - SFX_PLAYER_CALM_SHOOT_17, - SFX_PLAYER_CALM_SHOOT_18, - SFX_PLAYER_CALM_SHOOT_19, - SFX_PLAYER_CALM_SHOOT_20, - SFX_PLAYER_CALM_SHOOT_21, - SFX_PLAYER_CALM_SHOOT_22, - SFX_PLAYER_CALM_SHOOT_23, - SFX_PLAYER_CALM_SHOOT_24, - SFX_PLAYER_CALM_SHOOT_25, - SFX_PLAYER_CALM_SHOOT_26, - SFX_PLAYER_CALM_SHOOT_27, - SFX_PLAYER_CALM_SHOOT_28, - SFX_PLAYER_CALM_SHOOT_29, - SFX_PLAYER_CALM_SHOOT_30, - SFX_PLAYER_CALM_SHOOT_31, - SFX_PLAYER_CALM_SHOOT_32, - SFX_PLAYER_CALM_SHOOT_33, - SFX_PLAYER_CALM_SHOOT_34, - SFX_PLAYER_CALM_SHOOT_35, - - SFX_PLAYER_PISSED_OFF_CRASH_1, - SFX_PLAYER_PISSED_OFF_CRASH_2, - SFX_PLAYER_PISSED_OFF_CRASH_3, - SFX_PLAYER_PISSED_OFF_CRASH_4, - SFX_PLAYER_PISSED_OFF_CRASH_5, - SFX_PLAYER_PISSED_OFF_CRASH_6, - SFX_PLAYER_PISSED_OFF_CRASH_7, - SFX_PLAYER_PISSED_OFF_CRASH_8, - SFX_PLAYER_PISSED_OFF_CRASH_9, - SFX_PLAYER_PISSED_OFF_CRASH_10, - SFX_PLAYER_PISSED_OFF_CRASH_11, - SFX_PLAYER_PISSED_OFF_CRASH_12, - SFX_PLAYER_PISSED_OFF_CRASH_13, - SFX_PLAYER_PISSED_OFF_CRASH_14, - SFX_PLAYER_PISSED_OFF_CRASH_15, - SFX_PLAYER_PISSED_OFF_CRASH_16, - SFX_PLAYER_PISSED_OFF_CRASH_17, - SFX_PLAYER_PISSED_OFF_CRASH_18, - SFX_PLAYER_PISSED_OFF_CRASH_19, - SFX_PLAYER_PISSED_OFF_CRASH_20, - SFX_PLAYER_PISSED_OFF_CRASH_21, - SFX_PLAYER_PISSED_OFF_CRASH_22, - SFX_PLAYER_PISSED_OFF_CRASH_23, - SFX_PLAYER_PISSED_OFF_CRASH_24, - SFX_PLAYER_PISSED_OFF_CRASH_25, - SFX_PLAYER_PISSED_OFF_CRASH_26, - SFX_PLAYER_PISSED_OFF_CRASH_27, - SFX_PLAYER_PISSED_OFF_CRASH_28, - SFX_PLAYER_PISSED_OFF_CRASH_29, - SFX_PLAYER_PISSED_OFF_CRASH_30, - SFX_PLAYER_PISSED_OFF_CRASH_31, - SFX_PLAYER_PISSED_OFF_CRASH_32, - SFX_PLAYER_PISSED_OFF_CRASH_33, - SFX_PLAYER_PISSED_OFF_CRASH_34, - SFX_PLAYER_PISSED_OFF_CRASH_35, - SFX_PLAYER_PISSED_OFF_CRASH_36, - SFX_PLAYER_PISSED_OFF_CRASH_37, - SFX_PLAYER_PISSED_OFF_CRASH_38, - SFX_PLAYER_PISSED_OFF_CRASH_39, - SFX_PLAYER_PISSED_OFF_CRASH_40, - SFX_PLAYER_PISSED_OFF_CRASH_41, - SFX_PLAYER_PISSED_OFF_CRASH_42, - SFX_PLAYER_PISSED_OFF_CRASH_43, - SFX_PLAYER_PISSED_OFF_CRASH_44, - SFX_PLAYER_PISSED_OFF_FIGHT_1, - SFX_PLAYER_PISSED_OFF_FIGHT_2, - SFX_PLAYER_PISSED_OFF_FIGHT_3, - SFX_PLAYER_PISSED_OFF_FIGHT_4, - SFX_PLAYER_PISSED_OFF_FIGHT_5, - SFX_PLAYER_PISSED_OFF_FIGHT_6, - SFX_PLAYER_PISSED_OFF_FIGHT_7, - SFX_PLAYER_PISSED_OFF_FIGHT_8, - SFX_PLAYER_PISSED_OFF_FIGHT_9, - SFX_PLAYER_PISSED_OFF_FIGHT_10, - SFX_PLAYER_PISSED_OFF_FIGHT_11, - SFX_PLAYER_PISSED_OFF_FIGHT_12, - SFX_PLAYER_PISSED_OFF_FIGHT_13, - SFX_PLAYER_PISSED_OFF_FIGHT_14, - SFX_PLAYER_PISSED_OFF_FIGHT_15, - SFX_PLAYER_PISSED_OFF_FIGHT_16, - SFX_PLAYER_PISSED_OFF_FIGHT_17, - SFX_PLAYER_PISSED_OFF_FIGHT_18, - SFX_PLAYER_PISSED_OFF_FIGHT_19, - SFX_PLAYER_PISSED_OFF_FIGHT_20, - SFX_PLAYER_PISSED_OFF_FIGHT_21, - SFX_PLAYER_PISSED_OFF_FIGHT_22, - SFX_PLAYER_PISSED_OFF_FIGHT_23, - SFX_PLAYER_PISSED_OFF_FIGHT_24, - SFX_PLAYER_PISSED_OFF_FIGHT_25, - SFX_PLAYER_PISSED_OFF_FIGHT_26, - SFX_PLAYER_PISSED_OFF_FIGHT_27, - SFX_PLAYER_PISSED_OFF_FIGHT_28, - SFX_PLAYER_PISSED_OFF_FIGHT_29, - SFX_PLAYER_PISSED_OFF_FIGHT_30, - SFX_PLAYER_PISSED_OFF_FIGHT_31, - SFX_PLAYER_PISSED_OFF_FIGHT_32, - SFX_PLAYER_PISSED_OFF_FIGHT_33, - SFX_PLAYER_PISSED_OFF_FIGHT_34, - SFX_PLAYER_PISSED_OFF_FIGHT_35, - SFX_PLAYER_PISSED_OFF_FIGHT_36, - SFX_PLAYER_PISSED_OFF_FIGHT_37, - SFX_PLAYER_PISSED_OFF_FIGHT_38, - SFX_PLAYER_PISSED_OFF_FIGHT_39, - SFX_PLAYER_PISSED_OFF_FIGHT_40, - SFX_PLAYER_PISSED_OFF_FIGHT_41, - SFX_PLAYER_PISSED_OFF_FIGHT_42, - SFX_PLAYER_PISSED_OFF_FIGHT_43, - SFX_PLAYER_PISSED_OFF_FIGHT_44, - SFX_PLAYER_PISSED_OFF_FIGHT_45, - SFX_PLAYER_PISSED_OFF_FIGHT_46, - SFX_PLAYER_PISSED_OFF_FIGHT_47, - SFX_PLAYER_PISSED_OFF_FIGHT_48, - SFX_PLAYER_PISSED_OFF_FIGHT_49, - SFX_PLAYER_PISSED_OFF_FIGHT_50, - SFX_PLAYER_PISSED_OFF_FIGHT_51, - SFX_PLAYER_PISSED_OFF_FIGHT_52, - SFX_PLAYER_PISSED_OFF_FIGHT_53, - SFX_PLAYER_PISSED_OFF_FIGHT_54, - SFX_PLAYER_PISSED_OFF_FIGHT_55, - SFX_PLAYER_PISSED_OFF_FIGHT_56, - SFX_PLAYER_PISSED_OFF_FIGHT_57, - SFX_PLAYER_PISSED_OFF_FIGHT_58, - SFX_PLAYER_PISSED_OFF_FIGHT_59, - SFX_PLAYER_PISSED_OFF_FIGHT_60, - SFX_PLAYER_PISSED_OFF_FIGHT_61, - SFX_PLAYER_PISSED_OFF_JACKED_1, - SFX_PLAYER_PISSED_OFF_JACKED_2, - SFX_PLAYER_PISSED_OFF_JACKED_3, - SFX_PLAYER_PISSED_OFF_JACKED_4, - SFX_PLAYER_PISSED_OFF_JACKED_5, - SFX_PLAYER_PISSED_OFF_JACKED_6, - SFX_PLAYER_PISSED_OFF_JACKED_7, - SFX_PLAYER_PISSED_OFF_JACKED_8, - SFX_PLAYER_PISSED_OFF_JACKED_9, - SFX_PLAYER_PISSED_OFF_JACKED_10, - SFX_PLAYER_PISSED_OFF_JACKED_11, - SFX_PLAYER_PISSED_OFF_JACKED_12, - SFX_PLAYER_PISSED_OFF_JACKED_13, - SFX_PLAYER_PISSED_OFF_JACKED_14, - SFX_PLAYER_PISSED_OFF_JACKED_15, - SFX_PLAYER_PISSED_OFF_JACKED_16, - SFX_PLAYER_PISSED_OFF_JACKED_17, - SFX_PLAYER_PISSED_OFF_JACKED_18, - SFX_PLAYER_PISSED_OFF_JACKED_19, - SFX_PLAYER_PISSED_OFF_JACKED_20, - SFX_PLAYER_PISSED_OFF_JACKED_21, - SFX_PLAYER_PISSED_OFF_JACKING_1, - SFX_PLAYER_PISSED_OFF_JACKING_2, - SFX_PLAYER_PISSED_OFF_JACKING_3, - SFX_PLAYER_PISSED_OFF_JACKING_4, - SFX_PLAYER_PISSED_OFF_JACKING_5, - SFX_PLAYER_PISSED_OFF_JACKING_6, - SFX_PLAYER_PISSED_OFF_JACKING_7, - SFX_PLAYER_PISSED_OFF_JACKING_8, - SFX_PLAYER_PISSED_OFF_JACKING_9, - SFX_PLAYER_PISSED_OFF_JACKING_10, - SFX_PLAYER_PISSED_OFF_JACKING_11, - SFX_PLAYER_PISSED_OFF_JACKING_12, - SFX_PLAYER_PISSED_OFF_JACKING_13, - SFX_PLAYER_PISSED_OFF_JACKING_14, - SFX_PLAYER_PISSED_OFF_JACKING_15, - SFX_PLAYER_PISSED_OFF_JACKING_16, - SFX_PLAYER_PISSED_OFF_JACKING_17, - SFX_PLAYER_PISSED_OFF_JACKING_18, - SFX_PLAYER_PISSED_OFF_JACKING_19, - SFX_PLAYER_PISSED_OFF_JACKING_20, - SFX_PLAYER_PISSED_OFF_JACKING_21, - SFX_PLAYER_PISSED_OFF_JACKING_22, - SFX_PLAYER_PISSED_OFF_JACKING_23, - SFX_PLAYER_PISSED_OFF_JACKING_24, - SFX_PLAYER_PISSED_OFF_JACKING_25, - SFX_PLAYER_PISSED_OFF_JACKING_26, - SFX_PLAYER_PISSED_OFF_JACKING_27, - SFX_PLAYER_PISSED_OFF_JACKING_28, - SFX_PLAYER_PISSED_OFF_JACKING_29, - SFX_PLAYER_PISSED_OFF_JACKING_30, - SFX_PLAYER_PISSED_OFF_JACKING_31, - SFX_PLAYER_PISSED_OFF_JACKING_32, - SFX_PLAYER_PISSED_OFF_JACKING_33, - SFX_PLAYER_PISSED_OFF_JACKING_34, - SFX_PLAYER_PISSED_OFF_JACKING_35, - SFX_PLAYER_PISSED_OFF_JACKING_36, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_1, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_2, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_3, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_4, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_5, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_6, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_7, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_8, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_9, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_10, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_11, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_12, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_13, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_14, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_15, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_16, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_17, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_18, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_19, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_20, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_21, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_22, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_23, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_24, - SFX_PLAYER_PISSED_OFF_PICK_UP_CASH_25, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_1, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_2, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_3, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_4, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_5, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_6, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_7, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_8, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_9, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_10, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_11, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_12, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_13, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_14, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_15, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_16, - SFX_PLAYER_PISSED_OFF_PICK_UP_HOOKER_17, - SFX_PLAYER_PISSED_OFF_PULL_GUN_1, - SFX_PLAYER_PISSED_OFF_PULL_GUN_2, - SFX_PLAYER_PISSED_OFF_PULL_GUN_3, - SFX_PLAYER_PISSED_OFF_PULL_GUN_4, - SFX_PLAYER_PISSED_OFF_PULL_GUN_5, - SFX_PLAYER_PISSED_OFF_PULL_GUN_6, - SFX_PLAYER_PISSED_OFF_PULL_GUN_7, - SFX_PLAYER_PISSED_OFF_PULL_GUN_8, - SFX_PLAYER_PISSED_OFF_PULL_GUN_9, - SFX_PLAYER_PISSED_OFF_PULL_GUN_10, - SFX_PLAYER_PISSED_OFF_PULL_GUN_11, - SFX_PLAYER_PISSED_OFF_PULL_GUN_12, - SFX_PLAYER_PISSED_OFF_PULL_GUN_13, - SFX_PLAYER_PISSED_OFF_PULL_GUN_14, - SFX_PLAYER_PISSED_OFF_PULL_GUN_15, - SFX_PLAYER_PISSED_OFF_PULL_GUN_16, - SFX_PLAYER_PISSED_OFF_PULL_GUN_17, - SFX_PLAYER_PISSED_OFF_PULL_GUN_18, - SFX_PLAYER_PISSED_OFF_PULL_GUN_19, - SFX_PLAYER_PISSED_OFF_PULL_GUN_20, - SFX_PLAYER_PISSED_OFF_PULL_GUN_21, - SFX_PLAYER_PISSED_OFF_PULL_GUN_22, - SFX_PLAYER_PISSED_OFF_PULL_GUN_23, - SFX_PLAYER_PISSED_OFF_PULL_GUN_24, - SFX_PLAYER_PISSED_OFF_PULL_GUN_25, - SFX_PLAYER_PISSED_OFF_SHOOT_1, - SFX_PLAYER_PISSED_OFF_SHOOT_2, - SFX_PLAYER_PISSED_OFF_SHOOT_3, - SFX_PLAYER_PISSED_OFF_SHOOT_4, - SFX_PLAYER_PISSED_OFF_SHOOT_5, - SFX_PLAYER_PISSED_OFF_SHOOT_6, - SFX_PLAYER_PISSED_OFF_SHOOT_7, - SFX_PLAYER_PISSED_OFF_SHOOT_8, - SFX_PLAYER_PISSED_OFF_SHOOT_9, - SFX_PLAYER_PISSED_OFF_SHOOT_10, - SFX_PLAYER_PISSED_OFF_SHOOT_11, - SFX_PLAYER_PISSED_OFF_SHOOT_12, - SFX_PLAYER_PISSED_OFF_SHOOT_13, - SFX_PLAYER_PISSED_OFF_SHOOT_14, - SFX_PLAYER_PISSED_OFF_SHOOT_15, - SFX_PLAYER_PISSED_OFF_SHOOT_16, - SFX_PLAYER_PISSED_OFF_SHOOT_17, - SFX_PLAYER_PISSED_OFF_SHOOT_18, - SFX_PLAYER_PISSED_OFF_SHOOT_19, - SFX_PLAYER_PISSED_OFF_SHOOT_20, - SFX_PLAYER_PISSED_OFF_SHOOT_21, - SFX_PLAYER_PISSED_OFF_SHOOT_22, - SFX_PLAYER_PISSED_OFF_SHOOT_23, - SFX_PLAYER_PISSED_OFF_SHOOT_24, - SFX_PLAYER_PISSED_OFF_SHOOT_25, - SFX_PLAYER_PISSED_OFF_SHOOT_26, - SFX_PLAYER_PISSED_OFF_SHOOT_27, - SFX_PLAYER_PISSED_OFF_SHOOT_28, - SFX_PLAYER_PISSED_OFF_SHOOT_29, - - SFX_PLAYER_WISECRACKING_BUSTED_1, - SFX_PLAYER_WISECRACKING_BUSTED_2, - SFX_PLAYER_WISECRACKING_BUSTED_3, - SFX_PLAYER_WISECRACKING_BUSTED_4, - SFX_PLAYER_WISECRACKING_BUSTED_5, - SFX_PLAYER_WISECRACKING_BUSTED_6, - SFX_PLAYER_WISECRACKING_BUSTED_7, - SFX_PLAYER_WISECRACKING_BUSTED_8, - SFX_PLAYER_WISECRACKING_BUSTED_9, - SFX_PLAYER_WISECRACKING_BUSTED_10, - SFX_PLAYER_WISECRACKING_BUSTED_11, - SFX_PLAYER_WISECRACKING_BUSTED_12, - SFX_PLAYER_WISECRACKING_BUSTED_13, - SFX_PLAYER_WISECRACKING_BUSTED_14, - SFX_PLAYER_WISECRACKING_BUSTED_15, - SFX_PLAYER_WISECRACKING_BUSTED_16, - SFX_PLAYER_WISECRACKING_BUSTED_17, - SFX_PLAYER_WISECRACKING_BUSTED_18, - SFX_PLAYER_WISECRACKING_BUSTED_19, - SFX_PLAYER_WISECRACKING_BUSTED_20, - SFX_PLAYER_WISECRACKING_CHASED_1, - SFX_PLAYER_WISECRACKING_CHASED_2, - SFX_PLAYER_WISECRACKING_CHASED_3, - SFX_PLAYER_WISECRACKING_CHASED_4, - SFX_PLAYER_WISECRACKING_CHASED_5, - SFX_PLAYER_WISECRACKING_CHASED_6, - SFX_PLAYER_WISECRACKING_CHASED_7, - SFX_PLAYER_WISECRACKING_CRASH_1, - SFX_PLAYER_WISECRACKING_CRASH_2, - SFX_PLAYER_WISECRACKING_CRASH_3, - SFX_PLAYER_WISECRACKING_CRASH_4, - SFX_PLAYER_WISECRACKING_CRASH_5, - SFX_PLAYER_WISECRACKING_CRASH_6, - SFX_PLAYER_WISECRACKING_CRASH_7, - SFX_PLAYER_WISECRACKING_CRASH_8, - SFX_PLAYER_WISECRACKING_CRASH_9, - SFX_PLAYER_WISECRACKING_CRASH_10, - SFX_PLAYER_WISECRACKING_CRASH_11, - SFX_PLAYER_WISECRACKING_CRASH_12, - SFX_PLAYER_WISECRACKING_CRASH_13, - SFX_PLAYER_WISECRACKING_CRASH_14, - SFX_PLAYER_WISECRACKING_CRASH_15, - SFX_PLAYER_WISECRACKING_CRASH_16, - SFX_PLAYER_WISECRACKING_CRASH_17, - SFX_PLAYER_WISECRACKING_CRASH_18, - SFX_PLAYER_WISECRACKING_CRASH_19, - SFX_PLAYER_WISECRACKING_FIGHT_1, - SFX_PLAYER_WISECRACKING_FIGHT_2, - SFX_PLAYER_WISECRACKING_FIGHT_3, - SFX_PLAYER_WISECRACKING_FIGHT_4, - SFX_PLAYER_WISECRACKING_FIGHT_5, - SFX_PLAYER_WISECRACKING_FIGHT_6, - SFX_PLAYER_WISECRACKING_FIGHT_7, - SFX_PLAYER_WISECRACKING_FIGHT_8, - SFX_PLAYER_WISECRACKING_FIGHT_9, - SFX_PLAYER_WISECRACKING_FIGHT_10, - SFX_PLAYER_WISECRACKING_FIGHT_11, - SFX_PLAYER_WISECRACKING_FIGHT_12, - SFX_PLAYER_WISECRACKING_FIGHT_13, - SFX_PLAYER_WISECRACKING_FIGHT_14, - SFX_PLAYER_WISECRACKING_FIGHT_15, - SFX_PLAYER_WISECRACKING_FIGHT_16, - SFX_PLAYER_WISECRACKING_FIGHT_17, - SFX_PLAYER_WISECRACKING_FIGHT_18, - SFX_PLAYER_WISECRACKING_FIGHT_19, - SFX_PLAYER_WISECRACKING_FIGHT_20, - SFX_PLAYER_WISECRACKING_FIGHT_21, - SFX_PLAYER_WISECRACKING_FIGHT_22, - SFX_PLAYER_WISECRACKING_FIGHT_23, - SFX_PLAYER_WISECRACKING_FIGHT_24, - SFX_PLAYER_WISECRACKING_FIGHT_25, - SFX_PLAYER_WISECRACKING_FIGHT_26, - SFX_PLAYER_WISECRACKING_FIGHT_27, - SFX_PLAYER_WISECRACKING_JACKED_1, - SFX_PLAYER_WISECRACKING_JACKED_2, - SFX_PLAYER_WISECRACKING_JACKED_3, - SFX_PLAYER_WISECRACKING_JACKED_4, - SFX_PLAYER_WISECRACKING_JACKED_5, - SFX_PLAYER_WISECRACKING_JACKED_6, - SFX_PLAYER_WISECRACKING_JACKED_7, - SFX_PLAYER_WISECRACKING_JACKED_8, - SFX_PLAYER_WISECRACKING_JACKED_9, - SFX_PLAYER_WISECRACKING_JACKED_10, - SFX_PLAYER_WISECRACKING_JACKED_11, - SFX_PLAYER_WISECRACKING_JACKED_12, - SFX_PLAYER_WISECRACKING_JACKED_13, - SFX_PLAYER_WISECRACKING_JACKED_14, - SFX_PLAYER_WISECRACKING_JACKED_15, - SFX_PLAYER_WISECRACKING_JACKED_16, - SFX_PLAYER_WISECRACKING_JACKED_17, - SFX_PLAYER_WISECRACKING_JACKED_18, - SFX_PLAYER_WISECRACKING_JACKING_1, - SFX_PLAYER_WISECRACKING_JACKING_2, - SFX_PLAYER_WISECRACKING_JACKING_3, - SFX_PLAYER_WISECRACKING_JACKING_4, - SFX_PLAYER_WISECRACKING_JACKING_5, - SFX_PLAYER_WISECRACKING_JACKING_6, - SFX_PLAYER_WISECRACKING_JACKING_7, - SFX_PLAYER_WISECRACKING_JACKING_8, - SFX_PLAYER_WISECRACKING_JACKING_9, - SFX_PLAYER_WISECRACKING_JACKING_10, - SFX_PLAYER_WISECRACKING_JACKING_11, - SFX_PLAYER_WISECRACKING_JACKING_12, - SFX_PLAYER_WISECRACKING_JACKING_13, - SFX_PLAYER_WISECRACKING_JACKING_14, - SFX_PLAYER_WISECRACKING_JACKING_15, - SFX_PLAYER_WISECRACKING_JACKING_16, - SFX_PLAYER_WISECRACKING_JACKING_17, - SFX_PLAYER_WISECRACKING_JACKING_18, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_1, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_2, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_3, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_4, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_5, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_6, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_7, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_8, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_9, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_10, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_11, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_12, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_13, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_14, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_15, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_16, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_17, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_18, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_19, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_20, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_21, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_22, - SFX_PLAYER_WISECRACKING_PICK_UP_CASH_23, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_1, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_2, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_3, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_4, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_5, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_6, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_7, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_8, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_9, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_10, - SFX_PLAYER_WISECRACKING_PICK_UP_HOOKER_11, - SFX_PLAYER_WISECRACKING_PULL_GUN_1, - SFX_PLAYER_WISECRACKING_PULL_GUN_2, - SFX_PLAYER_WISECRACKING_PULL_GUN_3, - SFX_PLAYER_WISECRACKING_PULL_GUN_4, - SFX_PLAYER_WISECRACKING_PULL_GUN_5, - SFX_PLAYER_WISECRACKING_PULL_GUN_6, - SFX_PLAYER_WISECRACKING_PULL_GUN_7, - SFX_PLAYER_WISECRACKING_PULL_GUN_8, - SFX_PLAYER_WISECRACKING_PULL_GUN_9, - SFX_PLAYER_WISECRACKING_PULL_GUN_10, - SFX_PLAYER_WISECRACKING_PULL_GUN_11, - SFX_PLAYER_WISECRACKING_PULL_GUN_12, - SFX_PLAYER_WISECRACKING_PULL_GUN_13, - SFX_PLAYER_WISECRACKING_PULL_GUN_14, - SFX_PLAYER_WISECRACKING_PULL_GUN_15, - SFX_PLAYER_WISECRACKING_PULL_GUN_16, - SFX_PLAYER_WISECRACKING_PULL_GUN_17, - SFX_PLAYER_WISECRACKING_PULL_GUN_18, - SFX_PLAYER_WISECRACKING_PULL_GUN_19, - SFX_PLAYER_WISECRACKING_SEX_1, - SFX_PLAYER_WISECRACKING_SEX_2, - SFX_PLAYER_WISECRACKING_SEX_3, - SFX_PLAYER_WISECRACKING_SEX_4, - SFX_PLAYER_WISECRACKING_SEX_5, - SFX_PLAYER_WISECRACKING_SEX_6, - SFX_PLAYER_WISECRACKING_SEX_7, - SFX_PLAYER_WISECRACKING_SEX_8, - SFX_PLAYER_WISECRACKING_SEX_9, - SFX_PLAYER_WISECRACKING_SEX_10, - SFX_PLAYER_WISECRACKING_SHOOT_1, - SFX_PLAYER_WISECRACKING_SHOOT_2, - SFX_PLAYER_WISECRACKING_SHOOT_3, - SFX_PLAYER_WISECRACKING_SHOOT_4, - SFX_PLAYER_WISECRACKING_SHOOT_5, - SFX_PLAYER_WISECRACKING_SHOOT_6, - SFX_PLAYER_WISECRACKING_SHOOT_7, - SFX_PLAYER_WISECRACKING_SHOOT_8, - SFX_PLAYER_WISECRACKING_SHOOT_9, - SFX_PLAYER_DEATH, - SFX_PLAYER_AFTERSEX_1, - SFX_PLAYER_AFTERSEX_2, - SFX_PLAYER_AFTERSEX_3, - SFX_PLAYER_AFTERSEX_4, - SFX_PLAYER_AFTERSEX_5, - SFX_PLAYER_AFTERSEX_6, - SFX_PLAYER_AFTERSEX_7, - SFX_PLAYER_AFTERSEX_8, - SFX_PLAYER_AFTERSEX_9, - SFX_PLAYER_AFTERSEX_10, - SFX_PLAYER_AFTERSEX_11, - SFX_PLAYER_AFTERSEX_12, - SFX_PLAYER_AFTERSEX_13, - SFX_PLAYER_AFTERSEX_14, - SFX_PLAYER_AFTERSEX_15, - SFX_PLAYER_AFTERSEX_16, - SFX_PLAYER_AFTERSEX_17, - SFX_PLAYER_AFTERSEX_18, - SFX_PLAYER_HIT_BULLET_1, - SFX_PLAYER_HIT_BULLET_2, - SFX_PLAYER_HIT_BULLET_3, - SFX_PLAYER_HIT_BULLET_4, - SFX_PLAYER_HIT_BULLET_5, - SFX_PLAYER_HIT_BULLET_6, - SFX_PLAYER_HIT_BULLET_7, - SFX_PLAYER_HIT_BULLET_8, - SFX_PLAYER_HIT_BULLET_9, - SFX_PLAYER_HIT_BULLET_10, - SFX_PLAYER_HIT_BULLET_11, - SFX_PLAYER_HIT_BULLET_12, - SFX_PLAYER_HIT_BULLET_13, - SFX_PLAYER_HIT_BULLET_14, - SFX_PLAYER_HIT_BULLET_15, - SFX_PLAYER_HIT_BULLET_16, - SFX_PLAYER_HIT_BULLET_17, - SFX_PLAYER_HIT_BULLET_18, - SFX_PLAYER_HIT_BULLET_19, - SFX_PLAYER_HIT_BULLET_20, - SFX_PLAYER_HIT_BULLET_21, - SFX_PLAYER_HIT_BULLET_22, - SFX_PLAYER_HIT_BULLET_23, - SFX_PLAYER_HIT_BULLET_24, - SFX_PLAYER_HIT_BULLET_25, - SFX_PLAYER_HIT_BULLET_26, - SFX_PLAYER_HIT_BULLET_27, - SFX_PLAYER_HIT_BULLET_28, - SFX_PLAYER_HIT_BULLET_29, - SFX_PLAYER_HIT_BULLET_30, - SFX_PLAYER_HIT_BULLET_31, - SFX_PLAYER_HIT_BULLET_32, - SFX_PLAYER_HIT_BULLET_33, - SFX_PLAYER_HIT_GROUND_1, - SFX_PLAYER_HIT_GROUND_2, - SFX_PLAYER_HIT_GROUND_3, - SFX_PLAYER_HIT_GROUND_4, - SFX_PLAYER_HIT_GROUND_5, - SFX_PLAYER_HIT_GROUND_6, - SFX_PLAYER_HIT_GROUND_7, - SFX_PLAYER_HIT_GROUND_8, - SFX_PLAYER_HIT_GROUND_9, - SFX_PLAYER_HIT_GROUND_10, - SFX_PLAYER_HIT_GROUND_11, - SFX_PLAYER_HIT_GROUND_12, - SFX_PLAYER_HIT_GROUND_13, - SFX_PLAYER_HIT_GROUND_14, - SFX_PLAYER_HIT_GROUND_15, - SFX_PLAYER_HIT_GROUND_16, - SFX_PLAYER_HIT_GROUND_17, - SFX_PLAYER_HIT_GROUND_18, - SFX_PLAYER_HIT_GROUND_19, - SFX_PLAYER_HIT_GROUND_20, - SFX_PLAYER_HIT_GROUND_21, - SFX_PLAYER_HIT_GROUND_22, - SFX_PLAYER_HIT_GROUND_23, - SFX_PLAYER_HIT_GROUND_24, - SFX_PLAYER_HIT_GROUND_25, - SFX_PLAYER_HIT_GROUND_26, - SFX_PLAYER_HIT_GROUND_27, - SFX_PLAYER_HIT_GROUND_28, - SFX_PLAYER_HIT_GROUND_29, - SFX_PLAYER_HIT_GROUND_30, - SFX_PLAYER_HIT_GROUND_31, - SFX_PLAYER_HIT_GROUND_32, - SFX_PLAYER_HIT_GROUND_33, - SFX_PLAYER_HIT_GROUND_34, - SFX_PLAYER_HIT_GROUND_35, - SFX_PLAYER_HIT_FIST_1, - SFX_PLAYER_HIT_FIST_2, - SFX_PLAYER_HIT_FIST_3, - SFX_PLAYER_HIT_FIST_4, - SFX_PLAYER_HIT_FIST_5, - SFX_PLAYER_HIT_FIST_6, - SFX_PLAYER_HIT_FIST_7, - SFX_PLAYER_HIT_FIST_8, - SFX_PLAYER_HIT_FIST_9, - SFX_PLAYER_HIT_FIST_10, - SFX_PLAYER_HIT_FIST_11, - SFX_PLAYER_HIT_FIST_12, - SFX_PLAYER_HIT_FIST_13, - SFX_PLAYER_HIT_FIST_14, - SFX_PLAYER_HIT_FIST_15, - SFX_PLAYER_HIT_FIST_16, - SFX_PLAYER_HIT_FIST_17, - SFX_PLAYER_HIT_FIST_18, - SFX_PLAYER_HIT_FIST_19, - SFX_PLAYER_HIT_FIST_20, - SFX_PLAYER_HIT_FIST_21, - SFX_PLAYER_HIT_FIST_22, - SFX_PLAYER_HIT_FIST_23, - SFX_PLAYER_HIT_FIST_24, - SFX_PLAYER_HIT_FIST_25, - SFX_PLAYER_HIT_FIST_26, - SFX_PLAYER_HIT_FIST_27, - SFX_PLAYER_HIT_FIST_28, - SFX_PLAYER_HIT_FIST_29, - SFX_PLAYER_HIT_FIST_30, - SFX_PLAYER_HIT_FIST_31, - SFX_PLAYER_HIT_FIST_32, - SFX_PLAYER_HIT_FIST_33, - SFX_PLAYER_HIT_FIST_34, - SFX_PLAYER_HIT_FIST_35, - SFX_PLAYER_HIT_FIST_36, - SFX_PLAYER_HIT_FIST_37, - SFX_PLAYER_HIT_FIST_38, - SFX_PLAYER_HIT_FIST_39, - SFX_PLAYER_HIT_FIST_40, - SFX_PLAYER_HIT_FIST_41, - SFX_PLAYER_HIT_FIST_42, - SFX_PLAYER_ON_FIRE_1, - SFX_PLAYER_ON_FIRE_2, - SFX_PLAYER_ON_FIRE_3, - SFX_PLAYER_ON_FIRE_4, - SFX_PLAYER_ON_FIRE_5, - SFX_PLAYER_ON_FIRE_6, - SFX_PLAYER_ON_FIRE_7, - SFX_PLAYER_ON_FIRE_8, - SFX_PLAYER_ON_FIRE_9, - SFX_PLAYER_ON_FIRE_10, - SFX_PLAYER_ON_FIRE_11, - SFX_PLAYER_ON_FIRE_12, - SFX_PLAYER_ON_FIRE_13, - SFX_PLAYER_ON_FIRE_14, - SFX_PLAYER_ON_FIRE_15, - SFX_PLAYER_ON_FIRE_16, TOTAL_AUDIO_SAMPLES, NO_SAMPLE, // shorthands - SAMPLEBANK_START = SFX_CAR_HORN_JEEP, + SAMPLEBANK_START = SFX_AIR_BRAKES, SAMPLEBANK_END = SFX_FOOTSTEP_SAND_4, SAMPLEBANK_MAX = SFX_FOOTSTEP_SAND_4 + 1, SAMPLEBANK_PED_START = SFX_FOOTSTEP_SAND_4 + 1, - SAMPLEBANK_PED_END = 9940, + SAMPLEBANK_PED_END = SFX_WORKER2_SPECIAL_CASE_3, SAMPLEBANK_PED_MAX = SAMPLEBANK_PED_END + 1, + + // LCS: TODO + SFX_TRAIN_FAR = NO_SAMPLE, + SFX_TRAIN_NEAR = NO_SAMPLE, }; diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index 8f5fb5b8..7033532c 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -164,8 +164,8 @@ cMusicManager::SetStartingTrackPositions(bool8 isNewGameTimer) if (i < STREAMED_SOUND_CITY_AMBIENT && isNewGameTimer) m_aTracks[i].m_nPosition = NewGameRadioTimers[i]; - else if (i < STREAMED_SOUND_ANNOUNCE_BRIDGE_CLOSED) - m_aTracks[i].m_nPosition = (pos * AudioManager.m_anRandomTable[i % 5]) % m_aTracks[i].m_nLength; + //else if (i < STREAMED_SOUND_ANNOUNCE_BRIDGE_CLOSED) + // m_aTracks[i].m_nPosition = (pos * AudioManager.GetRandomNumber(i % 5)) % m_aTracks[i].m_nLength; else m_aTracks[i].m_nPosition = 0; @@ -315,7 +315,7 @@ cMusicManager::ChangeMusicMode(uint8 mode) #ifdef PAUSE_RADIO_IN_FRONTEND // rewind those streams we weren't listening right now - for( uint32 i = STREAMED_SOUND_RADIO_WILD; i < STREAMED_SOUND_CUTSCENE_ASS_1; i++ ) { + for( uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_BIKER; i++ ) { m_aTracks[i].m_nPosition = GetTrackStartPos(i); m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); } @@ -427,7 +427,7 @@ cMusicManager::ServiceFrontEndMode() #ifdef PAUSE_RADIO_IN_FRONTEND // pause radio - for (uint32 i = STREAMED_SOUND_RADIO_WILD; i < STREAMED_SOUND_CUTSCENE_ASS_1; i++) + for( uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_BIKER; i++ ) m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode(); #endif @@ -595,7 +595,7 @@ cMusicManager::ServiceGameMode() if (!m_bRadioStreamReady) { if(vehicle == nil) { - m_nFrontendTrack = STREAMED_SOUND_RADIO_WAVE; // huh? + m_nFrontendTrack = STREAMED_SOUND_RADIO_LCFR; // huh? return; } if(m_bRadioSetByScript) { @@ -768,7 +768,7 @@ cMusicManager::SetUpCorrectAmbienceTrack() else if (TheCamera.DistanceToWater <= 90.0f) { if (CCullZones::bAtBeachForAudio) { if (CWeather::OldWeatherType != WEATHER_HURRICANE && CWeather::NewWeatherType != WEATHER_HURRICANE || CWeather::Wind <= 1.0f) - m_nFrontendTrack = STREAMED_SOUND_BEACH_AMBIENT; + m_nFrontendTrack = STREAMED_SOUND_SAWMILL; else m_nFrontendTrack = STREAMED_SOUND_HAVANA_BEACH_AMBIENT; } @@ -1320,27 +1320,12 @@ cMusicManager::DisplayRadioStationName() case RADIO_ESPANTOSO: string = TheText.Get("FEA_FM6"); break; case EMOTION: string = TheText.Get("FEA_FM7"); break; case WAVE: string = TheText.Get("FEA_FM8"); break; - case USERTRACK: + case 9: string = TheText.Get("FEA_FM9"); break; + case 10: if (!SampleManager.IsMP3RadioChannelAvailable()) return; string = TheText.Get("FEA_MP3"); break; -#ifdef RADIO_OFF_TEXT - case RADIO_OFF: { - // Otherwise RADIO OFF will be seen after pausing-resuming game and Mission Complete text - if (!m_bRadioStreamReady || !m_bGameplayAllowsRadio) - return; - - extern wchar WideErrorString[]; - - string = TheText.Get("FEA_NON"); - if (string == WideErrorString) { - pCurrentStation = nil; - return; - } - break; - } -#endif - default: return; + default: string = TheText.Get("FEA_NON"); break; }; if (pCurrentStation != string) { @@ -1358,21 +1343,22 @@ cMusicManager::DisplayRadioStationName() CFont::SetJustifyOff(); CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); + CFont::SetDropShadowPosition(2); + CFont::SetScale(PSP_SCREEN_SCALE_X(0.5f), PSP_SCREEN_SCALE_Y(0.88f)); CFont::SetPropOn(); - CFont::SetFontStyle(FONT_STANDARD); + CFont::SetFontStyle(FONT_BANK); CFont::SetCentreOn(); - CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); - CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation); + CFont::SetCentreSize(PSP_SCREEN_SCALE_X(260.0f)); + CFont::SetDropColor(CRGBA(0, 0, 0, 255)); if (gNumRetunePresses) - CFont::SetColor(CRGBA(102, 133, 143, 255)); + CFont::SetColor(CRGBA(77, 155, 210, 255)); else - CFont::SetColor(CRGBA(147, 196, 211, 255)); + CFont::SetColor(CRGBA(77, 155, 210, 255)); - CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_Y(22.0f), pCurrentStation); + CFont::PrintString(SCREEN_WIDTH / 2, PSP_SCREEN_SCALE_Y(7.0f), pCurrentStation); CFont::DrawFonts(); + CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); } } // Always show station text after entering car. Same behaviour as III and SA. @@ -1403,7 +1389,7 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh) bool8 cMusicManager::UsesTaxiRadio(CVehicle *veh) { - if (veh->GetModelIndex() != MI_KAUFMAN) return FALSE; + if (veh->GetModelIndex() != MI_CABBIE) return FALSE; return CTheScripts::bPlayerHasMetDebbieHarry; } diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp index 28c18256..d30b4826 100644 --- a/src/audio/PolRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -38,20 +38,20 @@ cAudioManager::InitialisePoliceRadioZones() strcpy(ZoneSfx[i].m_aName, name); \ ZoneSfx[i].m_nSampleIndex = sample; - SETZONESFX(0, "VICE_C", SFX_POLICE_RADIO_VICE_CITY); - SETZONESFX(1, "IND_ZON", SFX_POLICE_RADIO_VICE_CITY_BEACH); - SETZONESFX(2, "COM_ZON", SFX_POLICE_RADIO_VICE_CITY_MAINLAND); - SETZONESFX(3, "BEACH1", SFX_POLICE_RADIO_OCEAN_BEACH); - SETZONESFX(4, "BEACH2", SFX_POLICE_RADIO_WASHINGTON_BEACH); - SETZONESFX(5, "BEACH3", SFX_POLICE_RADIO_VICE_POINT); - SETZONESFX(6, "GOLFC", SFX_POLICE_RADIO_LEAF_LINKS); - SETZONESFX(7, "STARI", SFX_POLICE_RADIO_STARFISH_ISLAND); - SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICEPORT); - SETZONESFX(9, "HAVANA", SFX_POLICE_RADIO_LITTLE_HAVANA); - SETZONESFX(10, "HAITI", SFX_POLICE_RADIO_LITTLE_HAITI); - SETZONESFX(11, "PORNI", SFX_POLICE_RADIO_PRAWN_ISLAND); - SETZONESFX(12, "DTOWN", SFX_POLICE_RADIO_DOWNTOWN); - SETZONESFX(13, "A_PORT", SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL); + SETZONESFX(0, "VICE_C", SFX_SFX_POLICE_RADIO_VICE_CITY); + SETZONESFX(1, "IND_ZON", SFX_SFX_POLICE_RADIO_VICE_CITY_BEACH); + SETZONESFX(2, "COM_ZON", SFX_SFX_POLICE_RADIO_VICE_CITY_MAINLAND); + SETZONESFX(3, "BEACH1", SFX_SFX_POLICE_RADIO_OCEAN_BEACH); + SETZONESFX(4, "BEACH2", SFX_SFX_POLICE_RADIO_WASHINGTON_BEACH); + SETZONESFX(5, "BEACH3", SFX_SFX_POLICE_RADIO_VICE_POINT); + SETZONESFX(6, "GOLFC", SFX_SFX_POLICE_RADIO_LEAF_LINKS); + SETZONESFX(7, "STARI", SFX_SFX_POLICE_RADIO_STARFISH_ISLAND); + SETZONESFX(8, "DOCKS", SFX_SFX_POLICE_RADIO_VICEPORT); + SETZONESFX(9, "HAVANA", SFX_SFX_POLICE_RADIO_LITTLE_HAVANA); + SETZONESFX(10, "HAITI", SFX_SFX_POLICE_RADIO_LITTLE_HAITI); + SETZONESFX(11, "PORNI", SFX_SFX_POLICE_RADIO_PRAWN_ISLAND); + SETZONESFX(12, "DTOWN", SFX_SFX_POLICE_RADIO_DOWNTOWN); + SETZONESFX(13, "A_PORT", SFX_SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL); #undef SETZONESFX } @@ -307,9 +307,9 @@ cAudioManager::SetupCrimeReport() default: break; } #ifdef FIX_BUGS - m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1); + m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_SFX_CRIME_1 - 1); #else - m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1); + m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_SFX_CRIME_1); #endif m_sPoliceRadioQueue.Add(SFX_IN); rangeX = zone->maxx - zone->minx; @@ -358,85 +358,85 @@ cAudioManager::SetupSuspectLastSeenReport() int32 color_post_modifier; const int32 gCarColourTable[][3] = { - {NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLACK, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_WHITE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {SFX_POLICE_RADIO_BRIGHT, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {SFX_POLICE_RADIO_LIGHT, SFX_SFX_POLICE_RADIO_BLUE, SFX_SFX_POLICE_RADIO_GREY}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, - {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, + {NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE}, @@ -472,7 +472,7 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_RANCHER: case MI_FBIRANCH: case MI_SANDKING: - sample = SFX_POLICE_RADIO_OFFROAD; + sample = SFX_SFX_POLICE_RADIO_OFFROAD; break; case MI_IDAHO: case MI_MANANA: @@ -483,7 +483,7 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_SABRETUR: case MI_VIRGO: case MI_BLISTAC: - sample = SFX_POLICE_RADIO_TUDOOR; + sample = SFX_SFX_POLICE_RADIO_TUDOOR; break; case MI_STINGER: case MI_INFERNUS: @@ -493,14 +493,14 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_COMET: case MI_DELUXO: case MI_HOTRING: - sample = SFX_POLICE_RADIO_SPORTS_CAR; + sample = SFX_SFX_POLICE_RADIO_SPORTS_CAR; break; case MI_LINERUN: - sample = SFX_POLICE_RADIO_RIG; + sample = SFX_SFX_POLICE_RADIO_RIG; break; case MI_PEREN: case MI_REGINA: - sample = SFX_POLICE_RADIO_STATION_WAGON; + sample = SFX_SFX_POLICE_RADIO_STATION_WAGON; break; case MI_SENTINEL: case MI_FBICAR: @@ -511,23 +511,23 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_OCEANIC: case MI_HERMES: case MI_GREENWOO: - sample = SFX_POLICE_RADIO_SEDAN; + sample = SFX_SFX_POLICE_RADIO_SEDAN; break; case MI_RIO: - sample = SFX_POLICE_RADIO_CRUISER; + sample = SFX_SFX_POLICE_RADIO_CRUISER; break; case MI_FIRETRUCK: - sample = SFX_POLICE_RADIO_FIRE_TRUCK; + sample = SFX_SFX_POLICE_RADIO_FIRE_TRUCK; break; case MI_TRASH: - sample = SFX_POLICE_RADIO_GARBAGE_TRUCK; + sample = SFX_SFX_POLICE_RADIO_GARBAGE_TRUCK; break; case MI_STRETCH: case MI_LOVEFIST: - sample = SFX_POLICE_RADIO_STRETCH; + sample = SFX_SFX_POLICE_RADIO_STRETCH; break; case MI_VOODOO: - sample = SFX_POLICE_RADIO_LOWRIDER; + sample = SFX_SFX_POLICE_RADIO_LOWRIDER; break; case MI_PONY: case MI_MOONBEAM: @@ -538,32 +538,31 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_TOPFUN: case MI_BURRITO: case MI_SPAND: - sample = SFX_POLICE_RADIO_VAN; + sample = SFX_SFX_POLICE_RADIO_VAN; break; case MI_MULE: case MI_BARRACKS: case MI_PACKER: case MI_FLATBED: - sample = SFX_POLICE_RADIO_TRUCK; + sample = SFX_SFX_POLICE_RADIO_TRUCK; break; case MI_AMBULAN: - sample = SFX_POLICE_RADIO_AMBULANCE; + sample = SFX_SFX_POLICE_RADIO_AMBULANCE; break; case MI_TAXI: case MI_CABBIE: - case MI_ZEBRA: - case MI_KAUFMAN: - sample = SFX_POLICE_RADIO_TAXI; + case MI_BORGNINE: + sample = SFX_SFX_POLICE_RADIO_TAXI; break; case MI_BOBCAT: case MI_WALTON: - sample = SFX_POLICE_RADIO_PICKUP; + sample = SFX_SFX_POLICE_RADIO_PICKUP; break; case MI_MRWHOOP: - sample = SFX_POLICE_RADIO_ICE_CREAM_VAN; + sample = SFX_SFX_POLICE_RADIO_ICE_CREAM_VAN; break; case MI_BFINJECT: - sample = SFX_POLICE_RADIO_BUGGY; + sample = SFX_SFX_POLICE_RADIO_BUGGY; break; case MI_HUNTER: case MI_CHOPPER: @@ -572,57 +571,57 @@ cAudioManager::SetupSuspectLastSeenReport() case MI_MAVERICK: case MI_VCNMAV: case MI_POLMAV: - sample = SFX_POLICE_RADIO_HELICOPTER; + sample = SFX_SFX_POLICE_RADIO_HELICOPTER; break; case MI_POLICE: - sample = SFX_POLICE_RADIO_POLICE_CAR; + sample = SFX_SFX_POLICE_RADIO_POLICE_CAR; break; case MI_ENFORCER: - sample = SFX_POLICE_RADIO_SWAT_VAN; + sample = SFX_SFX_POLICE_RADIO_SWAT_VAN; break; case MI_PREDATOR: case MI_SQUALO: case MI_SPEEDER: - sample = SFX_POLICE_RADIO_SPEEDBOAT; + sample = SFX_SFX_POLICE_RADIO_SPEEDBOAT; break; case MI_BUS: - sample = SFX_POLICE_RADIO_BUS; + sample = SFX_SFX_POLICE_RADIO_BUS; break; case MI_RHINO: - sample = SFX_POLICE_RADIO_TANK; + sample = SFX_SFX_POLICE_RADIO_TANK; break; case MI_ANGEL: case MI_PCJ600: case MI_FREEWAY: case MI_SANCHEZ: - sample = SFX_POLICE_RADIO_MOTOBIKE; + sample = SFX_SFX_POLICE_RADIO_MOTOBIKE; break; case MI_COACH: - sample = SFX_POLICE_RADIO_COACH; + sample = SFX_SFX_POLICE_RADIO_COACH; break; case MI_ROMERO: - sample = SFX_POLICE_RADIO_HEARSE; + sample = SFX_SFX_POLICE_RADIO_HEARSE; break; case MI_PIZZABOY: case MI_FAGGIO: - sample = SFX_POLICE_RADIO_MOPED; + sample = SFX_SFX_POLICE_RADIO_MOPED; break; case MI_DEADDODO: case MI_SKIMMER: - sample = SFX_POLICE_RADIO_PLANE; + sample = SFX_SFX_POLICE_RADIO_PLANE; break; case MI_REEFER: case MI_TROPIC: case MI_COASTG: case MI_MARQUIS: case MI_JETMAX: - sample = SFX_POLICE_RADIO_BOAT; + sample = SFX_SFX_POLICE_RADIO_BOAT; break; case MI_CADDY: - sample = SFX_POLICE_RADIO_GOLF_CART; + sample = SFX_SFX_POLICE_RADIO_GOLF_CART; break; case MI_DINGHY: - sample = SFX_POLICE_RADIO_DINGHY; + sample = SFX_SFX_POLICE_RADIO_DINGHY; break; default: //debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex()); diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h index 5a14d312..192eafac 100644 --- a/src/audio/audio_enums.h +++ b/src/audio/audio_enums.h @@ -12,8 +12,8 @@ enum eRadioStation EMOTION, WAVE, USERTRACK, - NUM_RADIOS = 10, - POLICE_RADIO = 10, + NUM_RADIOS = 11, + POLICE_RADIO = 11, RADIO_OFF = 10, //TAXI_RADIO, }; @@ -38,1230 +38,72 @@ enum ePlayerMood enum eStreamedSounds { - STREAMED_SOUND_RADIO_WILD, + STREAMED_SOUND_RADIO_HEAD, + STREAMED_SOUND_RADIO_DOUBLE, + STREAMED_SOUND_RADIO_KJAH, + STREAMED_SOUND_RADIO_RISE, + STREAMED_SOUND_RADIO_LIPS, + STREAMED_SOUND_RADIO_MUNDO, + STREAMED_SOUND_RADIO_MSX, STREAMED_SOUND_RADIO_FLASH, - STREAMED_SOUND_RADIO_KCHAT, - STREAMED_SOUND_RADIO_FEVER, - STREAMED_SOUND_RADIO_VROCK, - STREAMED_SOUND_RADIO_VCPR, - STREAMED_SOUND_RADIO_ESPANTOSO, - STREAMED_SOUND_RADIO_EMOTION, - STREAMED_SOUND_RADIO_WAVE, + STREAMED_SOUND_RADIO_LCJ, + STREAMED_SOUND_RADIO_LCFR, STREAMED_SOUND_RADIO_MP3_PLAYER, STREAMED_SOUND_CITY_AMBIENT, STREAMED_SOUND_WATER_AMBIENT, - STREAMED_SOUND_BEACH_AMBIENT, - STREAMED_SOUND_HAVANA_CITY_AMBIENT, - STREAMED_SOUND_HAVANA_WATER_AMBIENT, - STREAMED_SOUND_HAVANA_BEACH_AMBIENT, - STREAMED_SOUND_MALL_AMBIENT, - STREAMED_SOUND_STRIPCLUB_AMBIENT, - STREAMED_SOUND_MALIBU_AMBIENT, - STREAMED_SOUND_HOTEL_AMBIENT, - STREAMED_SOUND_DIRTRING_AMBIENT, - STREAMED_SOUND_LAW4RIOT_AMBIENT, - STREAMED_SOUND_AMBSIL_AMBIENT, + STREAMED_SOUND_SAWMILL, + STREAMED_SOUND_HAVANA_CITY_AMBIENT, // CITY + STREAMED_SOUND_HAVANA_WATER_AMBIENT, // WATER + STREAMED_SOUND_HAVANA_BEACH_AMBIENT, // WATER + STREAMED_SOUND_MALL_AMBIENT, // CITY + STREAMED_SOUND_STRIPCLUB_AMBIENT, // CITY + STREAMED_SOUND_MALIBU_AMBIENT, // CITY + STREAMED_SOUND_HOTEL_AMBIENT, // CITY + STREAMED_SOUND_DIRTRING_AMBIENT, // CITY + STREAMED_SOUND_LAW4RIOT_AMBIENT, // CITY + STREAMED_SOUND_AMBSIL_AMBIENT, // CITY STREAMED_SOUND_RADIO_POLICE, STREAMED_SOUND_RADIO_TAXI, - STREAMED_SOUND_ANNOUNCE_BRIDGE_CLOSED, - STREAMED_SOUND_ANNOUNCE_BRIDGE_OPEN, - STREAMED_SOUND_CUTSCENE_ASS_1, - STREAMED_SOUND_CUTSCENE_ASS_2, - STREAMED_SOUND_CUTSCENE_BANK_1, - STREAMED_SOUND_CUTSCENE_BANK_2A, - STREAMED_SOUND_CUTSCENE_BANK_2B, - STREAMED_SOUND_CUTSCENE_BANK_3A, - STREAMED_SOUND_CUTSCENE_BANK_3B, - STREAMED_SOUND_CUTSCENE_BANK_4, - STREAMED_SOUND_CUTSCENE_BIKE_1, - STREAMED_SOUND_CUTSCENE_BIKE_2, - STREAMED_SOUND_CUTSCENE_BIKE_3, - STREAMED_SOUND_CUTSCENE_BUD_1, - STREAMED_SOUND_CUTSCENE_BUD_2, - STREAMED_SOUND_CUTSCENE_BUD_3, - STREAMED_SOUND_CUTSCENE_CAP_1, - STREAMED_SOUND_CUTSCENE_CAR_1, - STREAMED_SOUND_CUTSCENE_CNT_1A, - STREAMED_SOUND_CUTSCENE_CNT_1B, - STREAMED_SOUND_CUTSCENE_CNT_2, - STREAMED_SOUND_CUTSCENE_COK_1, - STREAMED_SOUND_CUTSCENE_COK_2A, - STREAMED_SOUND_CUTSCENE_COK_2B, - STREAMED_SOUND_CUTSCENE_COK_3, - STREAMED_SOUND_CUTSCENE_COK_4A, - STREAMED_SOUND_CUTSCENE_COK_4A2, - STREAMED_SOUND_CUTSCENE_COK_4B, - STREAMED_SOUND_CUTSCENE_COL_1, - STREAMED_SOUND_CUTSCENE_COL_2, - STREAMED_SOUND_CUTSCENE_COL_3A, - STREAMED_SOUND_CUTSCENE_COL_4A, - STREAMED_SOUND_CUTSCENE_COL_5A, - STREAMED_SOUND_CUTSCENE_COL_5B, - STREAMED_SOUND_CUTSCENE_CUB_1, - STREAMED_SOUND_CUTSCENE_CUB_2, - STREAMED_SOUND_CUTSCENE_CUB_3, - STREAMED_SOUND_CUTSCENE_CUB_4, - STREAMED_SOUND_CUTSCENE_DRUG_1, - STREAMED_SOUND_CUTSCENE_FIN, - STREAMED_SOUND_CUTSCENE_FIN2, + STREAMED_SOUND_NEWS_A, + STREAMED_SOUND_NEWS_B, + STREAMED_SOUND_NEWS_C, + STREAMED_SOUND_NEWS_D, + STREAMED_SOUND_NEWS_E, + STREAMED_SOUND_NEWS_F, + STREAMED_SOUND_NEWS_G, + STREAMED_SOUND_NEWS_H, + STREAMED_SOUND_NEWS_I, + STREAMED_SOUND_NEWS_J, + STREAMED_SOUND_NEWS_K, + STREAMED_SOUND_NEWS_L, + STREAMED_SOUND_NEWS_M, + STREAMED_SOUND_NEWS_N, + STREAMED_SOUND_CUTSCENE_BIKER, + STREAMED_SOUND_CUTSCENE_BONEVOY, + STREAMED_SOUND_CUTSCENE_CAMPAIN, + STREAMED_SOUND_CUTSCENE_CASHCHP, + STREAMED_SOUND_CUTSCENE_CONTBAN, + STREAMED_SOUND_CUTSCENE_CRAZY69, + STREAMED_SOUND_CUTSCENE_CUTTEST, + STREAMED_SOUND_CUTSCENE_DEADLY, + STREAMED_SOUND_CUTSCENE_DONPROB, + STREAMED_SOUND_CUTSCENE_DRIVNMR, + STREAMED_SOUND_CUTSCENE_ELECTON, + STREAMED_SOUND_CUTSCENE_FINAL, + STREAMED_SOUND_CUTSCENE_FINAL_2, + STREAMED_SOUND_CUTSCENE_HOMSWET, + STREAMED_SOUND_CUTSCENE_HOTWHEL, + STREAMED_SOUND_CUTSCENE_KIDNAPP, + STREAMED_SOUND_CUTSCENE_LANDGRB, + STREAMED_SOUND_CUTSCENE_MORGUE, + STREAMED_SOUND_CUTSCENE_OVERDOS, + STREAMED_SOUND_CUTSCENE_RUFJUST, + STREAMED_SOUND_CUTSCENE_SAYONAR, + STREAMED_SOUND_CUTSCENE_SICILAN, + STREAMED_SOUND_CUTSCENE_THEOFER, + STREAMED_SOUND_CUTSCENE_INTRO, STREAMED_SOUND_CUTSCENE_FINALE, - STREAMED_SOUND_CUTSCENE_HAT_1, - STREAMED_SOUND_CUTSCENE_HAT_2, - STREAMED_SOUND_CUTSCENE_HAT_3, - STREAMED_SOUND_CUTSCENE_ICE_1, - STREAMED_SOUND_CUTSCENE_INT_A, - STREAMED_SOUND_CUTSCENE_INT_B, - STREAMED_SOUND_CUTSCENE_INT_D, - STREAMED_SOUND_CUTSCENE_INT_M, - STREAMED_SOUND_CUTSCENE_LAW_1A, - STREAMED_SOUND_CUTSCENE_LAW_1B, - STREAMED_SOUND_CUTSCENE_LAW_2A, - STREAMED_SOUND_CUTSCENE_LAW_2B, - STREAMED_SOUND_CUTSCENE_LAW_2C, - STREAMED_SOUND_CUTSCENE_LAW_3, - STREAMED_SOUND_CUTSCENE_LAW_4, - STREAMED_SOUND_CUTSCENE_PHIL_1, - STREAMED_SOUND_CUTSCENE_PHIL_2, - STREAMED_SOUND_CUTSCENE_PORN_1, - STREAMED_SOUND_CUTSCENE_PORN_2, - STREAMED_SOUND_CUTSCENE_PORN_3, - STREAMED_SOUND_CUTSCENE_PORN_4, - STREAMED_SOUND_CUTSCENE_RESC_1A, - STREAMED_SOUND_CUTSCENE_ROK_1, - STREAMED_SOUND_CUTSCENE_ROK_2, - STREAMED_SOUND_CUTSCENE_ROK_3A, - STREAMED_SOUND_CUTSCENE_STRIPA, - STREAMED_SOUND_CUTSCENE_TAX_1, - STREAMED_SOUND_CUTSCENE_TEX_1, - STREAMED_SOUND_CUTSCENE_TEX_2, - STREAMED_SOUND_CUTSCENE_TEX_3, - STREAMED_SOUND_CUTSCENE_GLIGHT, - STREAMED_SOUND_CUTSCENE_FIST, - STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1, - STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2, STREAMED_SOUND_MISSION_COMPLETED, - STREAMED_SOUND_MISSION_COMPLETED4, - STREAMED_SOUND_MISSION_MOBR1, - STREAMED_SOUND_MISSION_PAGER, - STREAMED_SOUND_MISSION_CARREV, - STREAMED_SOUND_MISSION_BIKEREV, - STREAMED_SOUND_MISSION_LIFTOP, - STREAMED_SOUND_MISSION_LIFTCL, - STREAMED_SOUND_MISSION_LIFTRUN, - STREAMED_SOUND_MISSION_LIFTBEL, - STREAMED_SOUND_MISSION_INLIFT, - STREAMED_SOUND_MISSION_SFX_01, - STREAMED_SOUND_MISSION_SFX_02, - STREAMED_SOUND_MISSION_CAMERAL, - STREAMED_SOUND_MISSION_CAMERAR, - STREAMED_SOUND_MISSION_CHEER1, - STREAMED_SOUND_MISSION_CHEER2, - STREAMED_SOUND_MISSION_CHEER3, - STREAMED_SOUND_MISSION_CHEER4, - STREAMED_SOUND_MISSION_OOH1, - STREAMED_SOUND_MISSION_OOH2, - STREAMED_SOUND_MISSION_RACE1, - STREAMED_SOUND_MISSION_RACE2, - STREAMED_SOUND_MISSION_RACE3, - STREAMED_SOUND_MISSION_RACE4, - STREAMED_SOUND_MISSION_RACE5, - STREAMED_SOUND_MISSION_RACE6, - STREAMED_SOUND_MISSION_RACE7, - STREAMED_SOUND_MISSION_RACE8, - STREAMED_SOUND_MISSION_RACE9, - STREAMED_SOUND_MISSION_RACE10, - STREAMED_SOUND_MISSION_RACE11, - STREAMED_SOUND_MISSION_RACE12, - STREAMED_SOUND_MISSION_RACE13, - STREAMED_SOUND_MISSION_RACE14, - STREAMED_SOUND_MISSION_RACE15, - STREAMED_SOUND_MISSION_HOT1, - STREAMED_SOUND_MISSION_HOT2, - STREAMED_SOUND_MISSION_HOT3, - STREAMED_SOUND_MISSION_HOT4, - STREAMED_SOUND_MISSION_HOT5, - STREAMED_SOUND_MISSION_HOT6, - STREAMED_SOUND_MISSION_HOT7, - STREAMED_SOUND_MISSION_HOT8, - STREAMED_SOUND_MISSION_HOT9, - STREAMED_SOUND_MISSION_HOT10, - STREAMED_SOUND_MISSION_HOT11, - STREAMED_SOUND_MISSION_HOT12, - STREAMED_SOUND_MISSION_HOT13, - STREAMED_SOUND_MISSION_HOT14, - STREAMED_SOUND_MISSION_HOT15, - STREAMED_SOUND_MISSION_LANSTP1, - STREAMED_SOUND_MISSION_LANSTP2, - STREAMED_SOUND_MISSION_LANAMU1, - STREAMED_SOUND_MISSION_LANAMU2, - STREAMED_SOUND_MISSION_AIRHORNL, - STREAMED_SOUND_MISSION_AIRHORNR, - STREAMED_SOUND_MISSION_SNIPSCRL, - STREAMED_SOUND_MISSION_SNIPSHORT, - STREAMED_SOUND_MISSION_BLOWROOF, - STREAMED_SOUND_MISSION_ASS_1, - STREAMED_SOUND_MISSION_ASS_2, - STREAMED_SOUND_MISSION_ASS_3, - STREAMED_SOUND_MISSION_ASS_4, - STREAMED_SOUND_MISSION_ASS_5, - STREAMED_SOUND_MISSION_ASS_6, - STREAMED_SOUND_MISSION_ASS_7, - STREAMED_SOUND_MISSION_ASS_8, - STREAMED_SOUND_MISSION_ASS_9, - STREAMED_SOUND_MISSION_ASS_10, - STREAMED_SOUND_MISSION_ASS_11, - STREAMED_SOUND_MISSION_ASS_12, - STREAMED_SOUND_MISSION_ASS_13, - STREAMED_SOUND_MISSION_ASS_14, - STREAMED_SOUND_MISSION_BIKE1_1, - STREAMED_SOUND_MISSION_BIKE1_2, - STREAMED_SOUND_MISSION_BIKE1_3, - STREAMED_SOUND_MISSION_BNK1_1, - STREAMED_SOUND_MISSION_BNK1_2, - STREAMED_SOUND_MISSION_BNK1_3, - STREAMED_SOUND_MISSION_BNK1_4, - STREAMED_SOUND_MISSION_BNK1_5, - STREAMED_SOUND_MISSION_BNK1_6, - STREAMED_SOUND_MISSION_BNK1_7, - STREAMED_SOUND_MISSION_BNK1_8, - STREAMED_SOUND_MISSION_BNK1_10, - STREAMED_SOUND_MISSION_BNK1_11, - STREAMED_SOUND_MISSION_BNK1_12, - STREAMED_SOUND_MISSION_BNK1_13, - STREAMED_SOUND_MISSION_BNK1_14, - STREAMED_SOUND_MISSION_BNK2_1, - STREAMED_SOUND_MISSION_BNK2_2, - STREAMED_SOUND_MISSION_BNK2_3, - STREAMED_SOUND_MISSION_BNK2_4, - STREAMED_SOUND_MISSION_BNK2_5, - STREAMED_SOUND_MISSION_BNK2_6, - STREAMED_SOUND_MISSION_BNK2_7, - STREAMED_SOUND_MISSION_BNK2_8, - STREAMED_SOUND_MISSION_BNK2_9, - STREAMED_SOUND_MISSION_BNK3_1, - STREAMED_SOUND_MISSION_BNK3_2, - STREAMED_SOUND_MISSION_BNK3_3A, - STREAMED_SOUND_MISSION_BNK3_3B, - STREAMED_SOUND_MISSION_BNK3_3C, - STREAMED_SOUND_MISSION_BNK3_4A, - STREAMED_SOUND_MISSION_BNK3_4B, - STREAMED_SOUND_MISSION_BNK3_4C, - STREAMED_SOUND_MISSION_BNK4_1, - STREAMED_SOUND_MISSION_BNK4_2, - STREAMED_SOUND_MISSION_BNK4_3A, - STREAMED_SOUND_MISSION_BNK4_3B, - STREAMED_SOUND_MISSION_BNK4_3C, - STREAMED_SOUND_MISSION_BNK4_3D, - STREAMED_SOUND_MISSION_BNK4_3E, - STREAMED_SOUND_MISSION_BNK4_3F, - STREAMED_SOUND_MISSION_BNK4_3G, - STREAMED_SOUND_MISSION_BNK4_3H, - STREAMED_SOUND_MISSION_BNK4_3I, - STREAMED_SOUND_MISSION_BNK4_3J, - STREAMED_SOUND_MISSION_BNK4_3K, - STREAMED_SOUND_MISSION_BNK4_3M, - STREAMED_SOUND_MISSION_BNK4_3O, - STREAMED_SOUND_MISSION_BNK4_3P, - STREAMED_SOUND_MISSION_BNK4_3Q, - STREAMED_SOUND_MISSION_BNK4_3R, - STREAMED_SOUND_MISSION_BNK4_3S, - STREAMED_SOUND_MISSION_BNK4_3T, - STREAMED_SOUND_MISSION_BNK4_3U, - STREAMED_SOUND_MISSION_BNK4_3V, - STREAMED_SOUND_MISSION_BNK4_4A, - STREAMED_SOUND_MISSION_BNK4_4B, - STREAMED_SOUND_MISSION_BNK4_5, - STREAMED_SOUND_MISSION_BNK4_6, - STREAMED_SOUND_MISSION_BNK4_7, - STREAMED_SOUND_MISSION_BNK4_8, - STREAMED_SOUND_MISSION_BNK4_9, - STREAMED_SOUND_MISSION_BNK4_10, - STREAMED_SOUND_MISSION_BNK4_11, - STREAMED_SOUND_MISSION_BK4_12A, - STREAMED_SOUND_MISSION_BK4_12B, - STREAMED_SOUND_MISSION_BK4_12C, - STREAMED_SOUND_MISSION_BNK4_13, - STREAMED_SOUND_MISSION_BK4_14A, - STREAMED_SOUND_MISSION_BK4_14B, - STREAMED_SOUND_MISSION_BNK4_15, - STREAMED_SOUND_MISSION_BNK4_16, - STREAMED_SOUND_MISSION_BNK4_17, - STREAMED_SOUND_MISSION_BNK4_18, - STREAMED_SOUND_MISSION_BK4_19A, - STREAMED_SOUND_MISSION_BK4_19B, - STREAMED_SOUND_MISSION_BK4_20A, - STREAMED_SOUND_MISSION_BK4_20B, - STREAMED_SOUND_MISSION_BNK4_21, - STREAMED_SOUND_MISSION_BNK422A, - STREAMED_SOUND_MISSION_BNK422B, - STREAMED_SOUND_MISSION_BK4_23A, - STREAMED_SOUND_MISSION_BK4_23B, - STREAMED_SOUND_MISSION_BK4_23C, - STREAMED_SOUND_MISSION_BK4_23D, - STREAMED_SOUND_MISSION_BK4_24A, - STREAMED_SOUND_MISSION_BK4_24B, - STREAMED_SOUND_MISSION_BNK4_25, - STREAMED_SOUND_MISSION_BNK4_26, - STREAMED_SOUND_MISSION_BNK4_27, - STREAMED_SOUND_MISSION_BNK4_28, - STREAMED_SOUND_MISSION_BNK4_29, - STREAMED_SOUND_MISSION_BNK4_30, - STREAMED_SOUND_MISSION_BK4_31A, - STREAMED_SOUND_MISSION_BK4_31B, - STREAMED_SOUND_MISSION_BNK4_32, - STREAMED_SOUND_MISSION_BK4_34A, - STREAMED_SOUND_MISSION_BK4_34B, - STREAMED_SOUND_MISSION_BK4_35A, - STREAMED_SOUND_MISSION_BK4_35B, - STREAMED_SOUND_MISSION_BNK4_36, - STREAMED_SOUND_MISSION_BNK4_37, - STREAMED_SOUND_MISSION_BNK4_38, - STREAMED_SOUND_MISSION_BNK4_39, - STREAMED_SOUND_MISSION_BK4_40A, - STREAMED_SOUND_MISSION_BK4_40B, - STREAMED_SOUND_MISSION_BNK4_41, - STREAMED_SOUND_MISSION_BNK4_42, - STREAMED_SOUND_MISSION_BNK4_43, - STREAMED_SOUND_MISSION_BNK4_44, - STREAMED_SOUND_MISSION_BNK4_45, - STREAMED_SOUND_MISSION_BNK4_46, - STREAMED_SOUND_MISSION_BNK4_47, - STREAMED_SOUND_MISSION_BNK4_48, - STREAMED_SOUND_MISSION_BNK4_49, - STREAMED_SOUND_MISSION_BNK450A, - STREAMED_SOUND_MISSION_BNK450B, - STREAMED_SOUND_MISSION_BNK4_51, - STREAMED_SOUND_MISSION_BNK4_94, - STREAMED_SOUND_MISSION_BNK4_95, - STREAMED_SOUND_MISSION_BNK4_96, - STREAMED_SOUND_MISSION_BNK4_97, - STREAMED_SOUND_MISSION_BNK4_98, - STREAMED_SOUND_MISSION_BNK4_99, - STREAMED_SOUND_MISSION_BUD1_1, - STREAMED_SOUND_MISSION_BUD1_2, - STREAMED_SOUND_MISSION_BUD1_3, - STREAMED_SOUND_MISSION_BUD1_4, - STREAMED_SOUND_MISSION_BUD1_5, - STREAMED_SOUND_MISSION_BUD1_9, - STREAMED_SOUND_MISSION_BUD1_10, - STREAMED_SOUND_MISSION_BUD2_1, - STREAMED_SOUND_MISSION_BUD2_2, - STREAMED_SOUND_MISSION_BUD2_3, - STREAMED_SOUND_MISSION_BUD2_4, - STREAMED_SOUND_MISSION_BUD2_5, - STREAMED_SOUND_MISSION_BUD2_6, - STREAMED_SOUND_MISSION_BUD2_7, - STREAMED_SOUND_MISSION_BUD3_1, - STREAMED_SOUND_MISSION_BUD3_1A, - STREAMED_SOUND_MISSION_BUD3_1B, - STREAMED_SOUND_MISSION_BUD3_1C, - STREAMED_SOUND_MISSION_BUD3_2, - STREAMED_SOUND_MISSION_BUD3_3, - STREAMED_SOUND_MISSION_BUD3_4, - STREAMED_SOUND_MISSION_BUD3_5, - STREAMED_SOUND_MISSION_BUD3_6, - STREAMED_SOUND_MISSION_BUD3_7, - STREAMED_SOUND_MISSION_BUD3_8A, - STREAMED_SOUND_MISSION_BUD3_8B, - STREAMED_SOUND_MISSION_BUD3_8C, - STREAMED_SOUND_MISSION_BUD3_9A, - STREAMED_SOUND_MISSION_BUD3_9B, - STREAMED_SOUND_MISSION_BUD3_9C, - STREAMED_SOUND_MISSION_CAP1_2, - STREAMED_SOUND_MISSION_CAP1_3, - STREAMED_SOUND_MISSION_CAP1_4, - STREAMED_SOUND_MISSION_CAP1_5, - STREAMED_SOUND_MISSION_CAP1_6, - STREAMED_SOUND_MISSION_CAP1_7, - STREAMED_SOUND_MISSION_CAP1_8, - STREAMED_SOUND_MISSION_CAP1_9, - STREAMED_SOUND_MISSION_CAP1_10, - STREAMED_SOUND_MISSION_CAP1_11, - STREAMED_SOUND_MISSION_CAP1_12, - STREAMED_SOUND_MISSION_CNT1_1, - STREAMED_SOUND_MISSION_CNT1_2, - STREAMED_SOUND_MISSION_CNT1_3, - STREAMED_SOUND_MISSION_CNT1_4, - STREAMED_SOUND_MISSION_CNT1_5, - STREAMED_SOUND_MISSION_CNT2_1, - STREAMED_SOUND_MISSION_CNT2_2, - STREAMED_SOUND_MISSION_CNT2_3, - STREAMED_SOUND_MISSION_CNT2_4, - STREAMED_SOUND_MISSION_COK1_1, - STREAMED_SOUND_MISSION_COK1_2, - STREAMED_SOUND_MISSION_COK1_3, - STREAMED_SOUND_MISSION_COK1_4, - STREAMED_SOUND_MISSION_COK1_5, - STREAMED_SOUND_MISSION_COK1_6, - STREAMED_SOUND_MISSION_COK2_1, - STREAMED_SOUND_MISSION_COK2_2, - STREAMED_SOUND_MISSION_COK2_3, - STREAMED_SOUND_MISSION_COK2_4, - STREAMED_SOUND_MISSION_COK2_5, - STREAMED_SOUND_MISSION_COK2_6, - STREAMED_SOUND_MISSION_COK2_7A, - STREAMED_SOUND_MISSION_COK2_7B, - STREAMED_SOUND_MISSION_COK2_7C, - STREAMED_SOUND_MISSION_COK2_8A, - STREAMED_SOUND_MISSION_COK2_8B, - STREAMED_SOUND_MISSION_COK2_8C, - STREAMED_SOUND_MISSION_COK2_8D, - STREAMED_SOUND_MISSION_COK2_9, - STREAMED_SOUND_MISSION_COK210A, - STREAMED_SOUND_MISSION_COK210B, - STREAMED_SOUND_MISSION_COK210C, - STREAMED_SOUND_MISSION_COK212A, - STREAMED_SOUND_MISSION_COK212B, - STREAMED_SOUND_MISSION_COK2_13, - STREAMED_SOUND_MISSION_COK2_14, - STREAMED_SOUND_MISSION_COK2_15, - STREAMED_SOUND_MISSION_COK2_16, - STREAMED_SOUND_MISSION_COK2_20, - STREAMED_SOUND_MISSION_COK2_21, - STREAMED_SOUND_MISSION_COK2_22, - STREAMED_SOUND_MISSION_COK3_1, - STREAMED_SOUND_MISSION_COK3_2, - STREAMED_SOUND_MISSION_COK3_3, - STREAMED_SOUND_MISSION_COK3_4, - STREAMED_SOUND_MISSION_COK4_1, - STREAMED_SOUND_MISSION_COK4_2, - STREAMED_SOUND_MISSION_COK4_3, - STREAMED_SOUND_MISSION_COK4_4, - STREAMED_SOUND_MISSION_COK4_5, - STREAMED_SOUND_MISSION_COK4_6, - STREAMED_SOUND_MISSION_COK4_7, - STREAMED_SOUND_MISSION_COK4_8, - STREAMED_SOUND_MISSION_COK4_9, - STREAMED_SOUND_MISSION_COK4_9A, - STREAMED_SOUND_MISSION_COK4_10, - STREAMED_SOUND_MISSION_COK4_11, - STREAMED_SOUND_MISSION_COK4_12, - STREAMED_SOUND_MISSION_COK4_13, - STREAMED_SOUND_MISSION_COK4_14, - STREAMED_SOUND_MISSION_COK4_15, - STREAMED_SOUND_MISSION_COK4_16, - STREAMED_SOUND_MISSION_COK4_17, - STREAMED_SOUND_MISSION_COK4_18, - STREAMED_SOUND_MISSION_COK4_19, - STREAMED_SOUND_MISSION_COK4_20, - STREAMED_SOUND_MISSION_COK4_21, - STREAMED_SOUND_MISSION_COK4_22, - STREAMED_SOUND_MISSION_COK4_23, - STREAMED_SOUND_MISSION_COK4_24, - STREAMED_SOUND_MISSION_COK4_25, - STREAMED_SOUND_MISSION_COK4_26, - STREAMED_SOUND_MISSION_COK4_27, - STREAMED_SOUND_MISSION_COL1_1, - STREAMED_SOUND_MISSION_COL1_2, - STREAMED_SOUND_MISSION_COL1_3, - STREAMED_SOUND_MISSION_COL1_4, - STREAMED_SOUND_MISSION_COL1_5, - STREAMED_SOUND_MISSION_COL1_6, - STREAMED_SOUND_MISSION_COL1_7, - STREAMED_SOUND_MISSION_COL1_8, - STREAMED_SOUND_MISSION_COL2_1, - STREAMED_SOUND_MISSION_COL2_2, - STREAMED_SOUND_MISSION_COL2_3, - STREAMED_SOUND_MISSION_COL2_4, - STREAMED_SOUND_MISSION_COL2_5, - STREAMED_SOUND_MISSION_COL2_6A, - STREAMED_SOUND_MISSION_COL2_7, - STREAMED_SOUND_MISSION_COL2_8, - STREAMED_SOUND_MISSION_COL2_9, - STREAMED_SOUND_MISSION_COL2_10, - STREAMED_SOUND_MISSION_COL2_11, - STREAMED_SOUND_MISSION_COL2_12, - STREAMED_SOUND_MISSION_COL2_13, - STREAMED_SOUND_MISSION_COL2_14, - STREAMED_SOUND_MISSION_COL2_15, - STREAMED_SOUND_MISSION_COL2_16, - STREAMED_SOUND_MISSION_COL3_1, - STREAMED_SOUND_MISSION_COL3_2, - STREAMED_SOUND_MISSION_COL3_2A, - STREAMED_SOUND_MISSION_COL3_2B, - STREAMED_SOUND_MISSION_COL3_3, - STREAMED_SOUND_MISSION_COL3_4, - STREAMED_SOUND_MISSION_COL3_5, - STREAMED_SOUND_MISSION_COL3_6, - STREAMED_SOUND_MISSION_COL3_7, - STREAMED_SOUND_MISSION_COL3_8, - STREAMED_SOUND_MISSION_COL3_9, - STREAMED_SOUND_MISSION_COL3_10, - STREAMED_SOUND_MISSION_COL3_11, - STREAMED_SOUND_MISSION_COL3_12, - STREAMED_SOUND_MISSION_COL3_13, - STREAMED_SOUND_MISSION_COL3_14, - STREAMED_SOUND_MISSION_COL3_15, - STREAMED_SOUND_MISSION_COL3_16, - STREAMED_SOUND_MISSION_COL3_17, - STREAMED_SOUND_MISSION_COL3_18, - STREAMED_SOUND_MISSION_COL3_19, - STREAMED_SOUND_MISSION_COL3_20, - STREAMED_SOUND_MISSION_COL3_21, - STREAMED_SOUND_MISSION_COL3_23, - STREAMED_SOUND_MISSION_COL3_24, - STREAMED_SOUND_MISSION_COL3_25, - STREAMED_SOUND_MISSION_COL4_1, - STREAMED_SOUND_MISSION_COL4_2, - STREAMED_SOUND_MISSION_COL4_3, - STREAMED_SOUND_MISSION_COL4_4, - STREAMED_SOUND_MISSION_COL4_5, - STREAMED_SOUND_MISSION_COL4_6, - STREAMED_SOUND_MISSION_COL4_7, - STREAMED_SOUND_MISSION_COL4_8, - STREAMED_SOUND_MISSION_COL4_9, - STREAMED_SOUND_MISSION_COL4_10, - STREAMED_SOUND_MISSION_COL4_11, - STREAMED_SOUND_MISSION_COL4_12, - STREAMED_SOUND_MISSION_COL4_13, - STREAMED_SOUND_MISSION_COL4_14, - STREAMED_SOUND_MISSION_COL4_15, - STREAMED_SOUND_MISSION_COL4_16, - STREAMED_SOUND_MISSION_COL4_17, - STREAMED_SOUND_MISSION_COL4_18, - STREAMED_SOUND_MISSION_COL4_19, - STREAMED_SOUND_MISSION_COL4_20, - STREAMED_SOUND_MISSION_COL4_21, - STREAMED_SOUND_MISSION_COL4_22, - STREAMED_SOUND_MISSION_COL4_23, - STREAMED_SOUND_MISSION_COL4_24, - STREAMED_SOUND_MISSION_COL4_25, - STREAMED_SOUND_MISSION_COL4_26, - STREAMED_SOUND_MISSION_COL5_1, - STREAMED_SOUND_MISSION_COL5_2, - STREAMED_SOUND_MISSION_COL5_3, - STREAMED_SOUND_MISSION_COL5_4, - STREAMED_SOUND_MISSION_COL5_5, - STREAMED_SOUND_MISSION_COL5_6, - STREAMED_SOUND_MISSION_COL5_7, - STREAMED_SOUND_MISSION_COL5_8, - STREAMED_SOUND_MISSION_COL5_9, - STREAMED_SOUND_MISSION_COL5_10, - STREAMED_SOUND_MISSION_COL5_11, - STREAMED_SOUND_MISSION_COL5_12, - STREAMED_SOUND_MISSION_COL5_13, - STREAMED_SOUND_MISSION_COL5_14, - STREAMED_SOUND_MISSION_COL5_15, - STREAMED_SOUND_MISSION_COL5_16, - STREAMED_SOUND_MISSION_COL5_17, - STREAMED_SOUND_MISSION_COL5_18, - STREAMED_SOUND_MISSION_COL5_19, - STREAMED_SOUND_MISSION_COL5_20, - STREAMED_SOUND_MISSION_COL5_21, - STREAMED_SOUND_MISSION_COL5_22, - STREAMED_SOUND_MISSION_CUB1_1, - STREAMED_SOUND_MISSION_CUB1_2, - STREAMED_SOUND_MISSION_CUB1_3, - STREAMED_SOUND_MISSION_CUB1_4, - STREAMED_SOUND_MISSION_CUB1_5, - STREAMED_SOUND_MISSION_CUB1_6, - STREAMED_SOUND_MISSION_CUB1_7, - STREAMED_SOUND_MISSION_CUB1_8, - STREAMED_SOUND_MISSION_CUB1_9, - STREAMED_SOUND_MISSION_CUB1_10, - STREAMED_SOUND_MISSION_CUB2_1, - STREAMED_SOUND_MISSION_CUB2_2, - STREAMED_SOUND_MISSION_CUB2_3A, - STREAMED_SOUND_MISSION_CUB2_3B, - STREAMED_SOUND_MISSION_CUB2_3C, - STREAMED_SOUND_MISSION_CUB2_4A, - STREAMED_SOUND_MISSION_CUB2_5, - STREAMED_SOUND_MISSION_CUB2_6, - STREAMED_SOUND_MISSION_CUB2_7, - STREAMED_SOUND_MISSION_CUB2_8, - STREAMED_SOUND_MISSION_CUB2_9, - STREAMED_SOUND_MISSION_CUB2_10, - STREAMED_SOUND_MISSION_CUB2_11, - STREAMED_SOUND_MISSION_CUB3_1, - STREAMED_SOUND_MISSION_CUB3_2, - STREAMED_SOUND_MISSION_CUB3_3, - STREAMED_SOUND_MISSION_CUB3_4, - STREAMED_SOUND_MISSION_CUB4_1, - STREAMED_SOUND_MISSION_CUB4_2, - STREAMED_SOUND_MISSION_CUB4_3, - STREAMED_SOUND_MISSION_CUB4_4, - STREAMED_SOUND_MISSION_CUB4_5, - STREAMED_SOUND_MISSION_CUB4_5A, - STREAMED_SOUND_MISSION_CUB4_6, - STREAMED_SOUND_MISSION_CUB4_7, - STREAMED_SOUND_MISSION_CUB4_8, - STREAMED_SOUND_MISSION_CUB4_9, - STREAMED_SOUND_MISSION_CUB4_10, - STREAMED_SOUND_MISSION_CUB4_11, - STREAMED_SOUND_MISSION_CUB4_12, - STREAMED_SOUND_MISSION_CUB4_13, - STREAMED_SOUND_MISSION_CUB4_14, - STREAMED_SOUND_MISSION_CUB4_15, - STREAMED_SOUND_MISSION_CUB4_16, - STREAMED_SOUND_MISSION_GOLF_1, - STREAMED_SOUND_MISSION_GOLF_2, - STREAMED_SOUND_MISSION_GOLF_3, - STREAMED_SOUND_MISSION_BAR_1, - STREAMED_SOUND_MISSION_BAR_2, - STREAMED_SOUND_MISSION_BAR_3, - STREAMED_SOUND_MISSION_BAR_4, - STREAMED_SOUND_MISSION_BAR_5, - STREAMED_SOUND_MISSION_BAR_6, - STREAMED_SOUND_MISSION_BAR_7, - STREAMED_SOUND_MISSION_BAR_8, - STREAMED_SOUND_MISSION_STRIP_1, - STREAMED_SOUND_MISSION_STRIP_2, - STREAMED_SOUND_MISSION_STRIP_3, - STREAMED_SOUND_MISSION_STRIP_4, - STREAMED_SOUND_MISSION_STRIP_5, - STREAMED_SOUND_MISSION_STRIP_6, - STREAMED_SOUND_MISSION_STRIP_7, - STREAMED_SOUND_MISSION_STRIP_8, - STREAMED_SOUND_MISSION_STRIP_9, - STREAMED_SOUND_MISSION_STAR_1, - STREAMED_SOUND_MISSION_STAR_2, - STREAMED_SOUND_MISSION_STAR_3, - STREAMED_SOUND_MISSION_STAR_4, - STREAMED_SOUND_MISSION_FIN_1A, - STREAMED_SOUND_MISSION_FIN_1B, - STREAMED_SOUND_MISSION_FIN_1C, - STREAMED_SOUND_MISSION_FIN_2B, - STREAMED_SOUND_MISSION_FIN_2C, - STREAMED_SOUND_MISSION_FIN_3, - STREAMED_SOUND_MISSION_FIN_4, - STREAMED_SOUND_MISSION_FIN_5, - STREAMED_SOUND_MISSION_FIN_6, - STREAMED_SOUND_MISSION_FIN_10, - STREAMED_SOUND_MISSION_FIN_11A, - STREAMED_SOUND_MISSION_FIN_11B, - STREAMED_SOUND_MISSION_FIN_12A, - STREAMED_SOUND_MISSION_FIN_12B, - STREAMED_SOUND_MISSION_FIN_12C, - STREAMED_SOUND_MISSION_FIN_13, - STREAMED_SOUND_MISSION_FINKILL, - STREAMED_SOUND_MISSION_LAW1_1, - STREAMED_SOUND_MISSION_LAW1_2, - STREAMED_SOUND_MISSION_LAW1_3, - STREAMED_SOUND_MISSION_LAW1_4, - STREAMED_SOUND_MISSION_LAW1_5, - STREAMED_SOUND_MISSION_LAW1_6, - STREAMED_SOUND_MISSION_LAW1_7, - STREAMED_SOUND_MISSION_LAW1_8, - STREAMED_SOUND_MISSION_LAW1_9, - STREAMED_SOUND_MISSION_LAW1_10, - STREAMED_SOUND_MISSION_LAW2_1, - STREAMED_SOUND_MISSION_LAW2_2, - STREAMED_SOUND_MISSION_LAW2_3, - STREAMED_SOUND_MISSION_LAW2_4, - STREAMED_SOUND_MISSION_LAW2_5, - STREAMED_SOUND_MISSION_LAW2_6, - STREAMED_SOUND_MISSION_LAW2_7, - STREAMED_SOUND_MISSION_LAW2_8, - STREAMED_SOUND_MISSION_LAW2_9, - STREAMED_SOUND_MISSION_LAW2_10, - STREAMED_SOUND_MISSION_LAW3_1, - STREAMED_SOUND_MISSION_LAW3_2, - STREAMED_SOUND_MISSION_LAW3_3, - STREAMED_SOUND_MISSION_LAW3_4, - STREAMED_SOUND_MISSION_LAW3_5, - STREAMED_SOUND_MISSION_LAW3_6, - STREAMED_SOUND_MISSION_LAW3_10, - STREAMED_SOUND_MISSION_LAW3_11, - STREAMED_SOUND_MISSION_LAW3_12, - STREAMED_SOUND_MISSION_LAW3_13, - STREAMED_SOUND_MISSION_LAW3_14, - STREAMED_SOUND_MISSION_LAW3_16, - STREAMED_SOUND_MISSION_LAW3_17, - STREAMED_SOUND_MISSION_LAW3_18, - STREAMED_SOUND_MISSION_LAW3_19, - STREAMED_SOUND_MISSION_LAW3_20, - STREAMED_SOUND_MISSION_LAW3_21, - STREAMED_SOUND_MISSION_LAW3_22, - STREAMED_SOUND_MISSION_LAW3_23, - STREAMED_SOUND_MISSION_LAW3_24, - STREAMED_SOUND_MISSION_LAW3_25, - STREAMED_SOUND_MISSION_LAW4_1A, - STREAMED_SOUND_MISSION_LAW4_1B, - STREAMED_SOUND_MISSION_LAW4_1C, - STREAMED_SOUND_MISSION_LAW4_1D, - STREAMED_SOUND_MISSION_LAW4_10, - STREAMED_SOUND_MISSION_LAW4_3, - STREAMED_SOUND_MISSION_LAW4_4, - STREAMED_SOUND_MISSION_LAW4_5, - STREAMED_SOUND_MISSION_LAW4_6, - STREAMED_SOUND_MISSION_LAW4_7, - STREAMED_SOUND_MISSION_LAW4_8, - STREAMED_SOUND_MISSION_LAW4_9, - STREAMED_SOUND_MISSION_PHIL1_2, - STREAMED_SOUND_MISSION_PHIL1_3, - STREAMED_SOUND_MISSION_PHIL2_1, - STREAMED_SOUND_MISSION_PHIL2_2, - STREAMED_SOUND_MISSION_PHIL2_3, - STREAMED_SOUND_MISSION_PHIL2_4, - STREAMED_SOUND_MISSION_PHIL2_5, - STREAMED_SOUND_MISSION_PHIL2_6, - STREAMED_SOUND_MISSION_PHIL2_7, - STREAMED_SOUND_MISSION_PHIL2_8, - STREAMED_SOUND_MISSION_PHIL2_9, - STREAMED_SOUND_MISSION_PHIL210, - STREAMED_SOUND_MISSION_PHIL211, - STREAMED_SOUND_MISSION_PORN1_1, - STREAMED_SOUND_MISSION_PORN1_2, - STREAMED_SOUND_MISSION_PORN1_3, - STREAMED_SOUND_MISSION_PRN1_3A, - STREAMED_SOUND_MISSION_PORN1_4, - STREAMED_SOUND_MISSION_PORN1_5, - STREAMED_SOUND_MISSION_PORN1_6, - STREAMED_SOUND_MISSION_PORN1_7, - STREAMED_SOUND_MISSION_PORN1_8, - STREAMED_SOUND_MISSION_PORN1_9, - STREAMED_SOUND_MISSION_PRN1_10, - STREAMED_SOUND_MISSION_PRN1_11, - STREAMED_SOUND_MISSION_PRN1_12, - STREAMED_SOUND_MISSION_PRN1_13, - STREAMED_SOUND_MISSION_PRN1_14, - STREAMED_SOUND_MISSION_PRN1_15, - STREAMED_SOUND_MISSION_PRN1_16, - STREAMED_SOUND_MISSION_PRN1_17, - STREAMED_SOUND_MISSION_PRN1_18, - STREAMED_SOUND_MISSION_PRN1_19, - STREAMED_SOUND_MISSION_PRN1_20, - STREAMED_SOUND_MISSION_PRN1_21, - STREAMED_SOUND_MISSION_PORN3_1, - STREAMED_SOUND_MISSION_PORN3_2, - STREAMED_SOUND_MISSION_PORN3_3, - STREAMED_SOUND_MISSION_PORN3_4, - STREAMED_SOUND_MISSION_PSYCH_1, - STREAMED_SOUND_MISSION_PSYCH_2, - STREAMED_SOUND_MISSION_ROK2_01, - STREAMED_SOUND_MISSION_ROK3_1, - STREAMED_SOUND_MISSION_ROK3_2, - STREAMED_SOUND_MISSION_ROK3_3, - STREAMED_SOUND_MISSION_ROK3_4, - STREAMED_SOUND_MISSION_ROK3_5, - STREAMED_SOUND_MISSION_ROK3_6, - STREAMED_SOUND_MISSION_ROK3_7, - STREAMED_SOUND_MISSION_ROK3_8, - STREAMED_SOUND_MISSION_ROK3_9, - STREAMED_SOUND_MISSION_ROK3_10, - STREAMED_SOUND_MISSION_ROK3_11, - STREAMED_SOUND_MISSION_ROK3_12, - STREAMED_SOUND_MISSION_ROK3_13, - STREAMED_SOUND_MISSION_ROK3_14, - STREAMED_SOUND_MISSION_ROK3_15, - STREAMED_SOUND_MISSION_ROK3_16, - STREAMED_SOUND_MISSION_ROK3_17, - STREAMED_SOUND_MISSION_ROK3_18, - STREAMED_SOUND_MISSION_ROK3_19, - STREAMED_SOUND_MISSION_ROK3_20, - STREAMED_SOUND_MISSION_ROK3_21, - STREAMED_SOUND_MISSION_ROK3_22, - STREAMED_SOUND_MISSION_ROK3_23, - STREAMED_SOUND_MISSION_ROK3_24, - STREAMED_SOUND_MISSION_ROK3_25, - STREAMED_SOUND_MISSION_ROK3_26, - STREAMED_SOUND_MISSION_ROK3_27, - STREAMED_SOUND_MISSION_ROK3_62, - STREAMED_SOUND_MISSION_ROK3_63, - STREAMED_SOUND_MISSION_ROK3_64, - STREAMED_SOUND_MISSION_ROK3_65, - STREAMED_SOUND_MISSION_ROK3_66, - STREAMED_SOUND_MISSION_ROK3_67, - STREAMED_SOUND_MISSION_ROK3_68, - STREAMED_SOUND_MISSION_ROK3_69, - STREAMED_SOUND_MISSION_ROK3_70, - STREAMED_SOUND_MISSION_ROK3_71, - STREAMED_SOUND_MISSION_ROK3_73, - STREAMED_SOUND_MISSION_RESC_1, - STREAMED_SOUND_MISSION_RESC_2, - STREAMED_SOUND_MISSION_RESC_3, - STREAMED_SOUND_MISSION_RESC_4, - STREAMED_SOUND_MISSION_RESC_5, - STREAMED_SOUND_MISSION_RESC_6, - STREAMED_SOUND_MISSION_RESC_7, - STREAMED_SOUND_MISSION_RESC_8, - STREAMED_SOUND_MISSION_RESC_9, - STREAMED_SOUND_MISSION_RESC_10, - STREAMED_SOUND_MISSION_ROK1_1A, - STREAMED_SOUND_MISSION_ROK1_1B, - STREAMED_SOUND_MISSION_ROK1_5, - STREAMED_SOUND_MISSION_ROK1_6, - STREAMED_SOUND_MISSION_ROK1_7, - STREAMED_SOUND_MISSION_ROK1_8, - STREAMED_SOUND_MISSION_ROK1_9, - STREAMED_SOUND_MISSION_TAX1_1, - STREAMED_SOUND_MISSION_TAX1_2, - STREAMED_SOUND_MISSION_TAX1_3, - STREAMED_SOUND_MISSION_TAX1_4, - STREAMED_SOUND_MISSION_TAX1_5, - STREAMED_SOUND_MISSION_TAX2_1, - STREAMED_SOUND_MISSION_TAX2_2, - STREAMED_SOUND_MISSION_TAX2_3, - STREAMED_SOUND_MISSION_TAX2_4, - STREAMED_SOUND_MISSION_TAX2_5, - STREAMED_SOUND_MISSION_TAX2_6, - STREAMED_SOUND_MISSION_TAX2_7, - STREAMED_SOUND_MISSION_TAX3_1, - STREAMED_SOUND_MISSION_TAX3_2, - STREAMED_SOUND_MISSION_TAX3_3, - STREAMED_SOUND_MISSION_TAX3_4, - STREAMED_SOUND_MISSION_TAX3_5, - STREAMED_SOUND_MISSION_TEX1_1, - STREAMED_SOUND_MISSION_TEX1_2, - STREAMED_SOUND_MISSION_TEX1_3, - STREAMED_SOUND_MISSION_TEX1_4, - STREAMED_SOUND_MISSION_TEX1_5, - STREAMED_SOUND_MISSION_TEX1_6, - STREAMED_SOUND_MISSION_TEX2_1, - STREAMED_SOUND_MISSION_TEX3_1, - STREAMED_SOUND_MISSION_TEX3_2, - STREAMED_SOUND_MISSION_TEX3_3, - STREAMED_SOUND_MISSION_TEX3_4, - STREAMED_SOUND_MISSION_TEX3_5, - STREAMED_SOUND_MISSION_TEX3_6, - STREAMED_SOUND_MISSION_TEX3_7, - STREAMED_SOUND_MISSION_TEX3_8, - STREAMED_SOUND_MISSION_HAT_1A, - STREAMED_SOUND_MISSION_INTRO1, - STREAMED_SOUND_MISSION_INTRO2, - STREAMED_SOUND_MISSION_INTRO3, - STREAMED_SOUND_MISSION_INTRO4, - STREAMED_SOUND_MISSION_MOB_01A, - STREAMED_SOUND_MISSION_MOB_01B, - STREAMED_SOUND_MISSION_MOB_01C, - STREAMED_SOUND_MISSION_MOB_02A, - STREAMED_SOUND_MISSION_MOB_02B, - STREAMED_SOUND_MISSION_MOB_02C, - STREAMED_SOUND_MISSION_MOB_03A, - STREAMED_SOUND_MISSION_MOB_03B, - STREAMED_SOUND_MISSION_MOB_03C, - STREAMED_SOUND_MISSION_MOB_03D, - STREAMED_SOUND_MISSION_MOB_03E, - STREAMED_SOUND_MISSION_SHARK_1, - STREAMED_SOUND_MISSION_SHARK_2, - STREAMED_SOUND_MISSION_SHARK_3, - STREAMED_SOUND_MISSION_SHARK_4, - STREAMED_SOUND_MISSION_SHARK_5, - STREAMED_SOUND_MISSION_MOB_04A, - STREAMED_SOUND_MISSION_MOB_04B, - STREAMED_SOUND_MISSION_MOB_04C, - STREAMED_SOUND_MISSION_MOB_04D, - STREAMED_SOUND_MISSION_MOB_05A, - STREAMED_SOUND_MISSION_MOB_05B, - STREAMED_SOUND_MISSION_MOB_05C, - STREAMED_SOUND_MISSION_MOB_05D, - STREAMED_SOUND_MISSION_MOB_06A, - STREAMED_SOUND_MISSION_MOB_06B, - STREAMED_SOUND_MISSION_MOB_06C, - STREAMED_SOUND_MISSION_MOB_07A, - STREAMED_SOUND_MISSION_MOB_07B, - STREAMED_SOUND_MISSION_MOB_08A, - STREAMED_SOUND_MISSION_MOB_08B, - STREAMED_SOUND_MISSION_MOB_08C, - STREAMED_SOUND_MISSION_MOB_08D, - STREAMED_SOUND_MISSION_MOB_08E, - STREAMED_SOUND_MISSION_MOB_08F, - STREAMED_SOUND_MISSION_MOB_08G, - STREAMED_SOUND_MISSION_MOB_09A, - STREAMED_SOUND_MISSION_MOB_09B, - STREAMED_SOUND_MISSION_MOB_09C, - STREAMED_SOUND_MISSION_MOB_09D, - STREAMED_SOUND_MISSION_MOB_09E, - STREAMED_SOUND_MISSION_MOB_09F, - STREAMED_SOUND_MISSION_MOB_10A, - STREAMED_SOUND_MISSION_MOB_10B, - STREAMED_SOUND_MISSION_MOB_10C, - STREAMED_SOUND_MISSION_MOB_10D, - STREAMED_SOUND_MISSION_MOB_10E, - STREAMED_SOUND_MISSION_MOB_11A, - STREAMED_SOUND_MISSION_MOB_11B, - STREAMED_SOUND_MISSION_MOB_11C, - STREAMED_SOUND_MISSION_MOB_11D, - STREAMED_SOUND_MISSION_MOB_11E, - STREAMED_SOUND_MISSION_MOB_11F, - STREAMED_SOUND_MISSION_MOB_14A, - STREAMED_SOUND_MISSION_MOB_14B, - STREAMED_SOUND_MISSION_MOB_14C, - STREAMED_SOUND_MISSION_MOB_14D, - STREAMED_SOUND_MISSION_MOB_14E, - STREAMED_SOUND_MISSION_MOB_14F, - STREAMED_SOUND_MISSION_MOB_14G, - STREAMED_SOUND_MISSION_MOB_14H, - STREAMED_SOUND_MISSION_MOB_16A, - STREAMED_SOUND_MISSION_MOB_16B, - STREAMED_SOUND_MISSION_MOB_16C, - STREAMED_SOUND_MISSION_MOB_16D, - STREAMED_SOUND_MISSION_MOB_16E, - STREAMED_SOUND_MISSION_MOB_16F, - STREAMED_SOUND_MISSION_MOB_16G, - STREAMED_SOUND_MISSION_MOB_17A, - STREAMED_SOUND_MISSION_MOB_17B, - STREAMED_SOUND_MISSION_MOB_17C, - STREAMED_SOUND_MISSION_MOB_17D, - STREAMED_SOUND_MISSION_MOB_17E, - STREAMED_SOUND_MISSION_MOB_17G, - STREAMED_SOUND_MISSION_MOB_17H, - STREAMED_SOUND_MISSION_MOB_17I, - STREAMED_SOUND_MISSION_MOB_17J, - STREAMED_SOUND_MISSION_MOB_17K, - STREAMED_SOUND_MISSION_MOB_17L, - STREAMED_SOUND_MISSION_MOB_18A, - STREAMED_SOUND_MISSION_MOB_18B, - STREAMED_SOUND_MISSION_MOB_18C, - STREAMED_SOUND_MISSION_MOB_18D, - STREAMED_SOUND_MISSION_MOB_18E, - STREAMED_SOUND_MISSION_MOB_18F, - STREAMED_SOUND_MISSION_MOB_18G, - STREAMED_SOUND_MISSION_MOB_20A, - STREAMED_SOUND_MISSION_MOB_20B, - STREAMED_SOUND_MISSION_MOB_20C, - STREAMED_SOUND_MISSION_MOB_20D, - STREAMED_SOUND_MISSION_MOB_20E, - STREAMED_SOUND_MISSION_MOB_24A, - STREAMED_SOUND_MISSION_MOB_24B, - STREAMED_SOUND_MISSION_MOB_24C, - STREAMED_SOUND_MISSION_MOB_24D, - STREAMED_SOUND_MISSION_MOB_24E, - STREAMED_SOUND_MISSION_MOB_24F, - STREAMED_SOUND_MISSION_MOB_24G, - STREAMED_SOUND_MISSION_MOB_24H, - STREAMED_SOUND_MISSION_MOB_25A, - STREAMED_SOUND_MISSION_MOB_25B, - STREAMED_SOUND_MISSION_MOB_25C, - STREAMED_SOUND_MISSION_MOB_25D, - STREAMED_SOUND_MISSION_MOB_26A, - STREAMED_SOUND_MISSION_MOB_26B, - STREAMED_SOUND_MISSION_MOB_26C, - STREAMED_SOUND_MISSION_MOB_26D, - STREAMED_SOUND_MISSION_MOB_26E, - STREAMED_SOUND_MISSION_MOB_29A, - STREAMED_SOUND_MISSION_MOB_29B, - STREAMED_SOUND_MISSION_MOB_29C, - STREAMED_SOUND_MISSION_MOB_29D, - STREAMED_SOUND_MISSION_MOB_29E, - STREAMED_SOUND_MISSION_MOB_29F, - STREAMED_SOUND_MISSION_MOB_29G, - STREAMED_SOUND_MISSION_MOB_30A, - STREAMED_SOUND_MISSION_MOB_30B, - STREAMED_SOUND_MISSION_MOB_30C, - STREAMED_SOUND_MISSION_MOB_30D, - STREAMED_SOUND_MISSION_MOB_30E, - STREAMED_SOUND_MISSION_MOB_30F, - STREAMED_SOUND_MISSION_MOB_33A, - STREAMED_SOUND_MISSION_MOB_33B, - STREAMED_SOUND_MISSION_MOB_33C, - STREAMED_SOUND_MISSION_MOB_33D, - STREAMED_SOUND_MISSION_MOB_34A, - STREAMED_SOUND_MISSION_MOB_34B, - STREAMED_SOUND_MISSION_MOB_34C, - STREAMED_SOUND_MISSION_MOB_34D, - STREAMED_SOUND_MISSION_MOB_35A, - STREAMED_SOUND_MISSION_MOB_35B, - STREAMED_SOUND_MISSION_MOB_35C, - STREAMED_SOUND_MISSION_MOB_35D, - STREAMED_SOUND_MISSION_MOB_36A, - STREAMED_SOUND_MISSION_MOB_36B, - STREAMED_SOUND_MISSION_MOB_36C, - STREAMED_SOUND_MISSION_MOB_40A, - STREAMED_SOUND_MISSION_MOB_40B, - STREAMED_SOUND_MISSION_MOB_40C, - STREAMED_SOUND_MISSION_MOB_40D, - STREAMED_SOUND_MISSION_MOB_40E, - STREAMED_SOUND_MISSION_MOB_40F, - STREAMED_SOUND_MISSION_MOB_40G, - STREAMED_SOUND_MISSION_MOB_40H, - STREAMED_SOUND_MISSION_MOB_40I, - STREAMED_SOUND_MISSION_MOB_41A, - STREAMED_SOUND_MISSION_MOB_41B, - STREAMED_SOUND_MISSION_MOB_41C, - STREAMED_SOUND_MISSION_MOB_41D, - STREAMED_SOUND_MISSION_MOB_41E, - STREAMED_SOUND_MISSION_MOB_41F, - STREAMED_SOUND_MISSION_MOB_41G, - STREAMED_SOUND_MISSION_MOB_41H, - STREAMED_SOUND_MISSION_MOB_42A, - STREAMED_SOUND_MISSION_MOB_42B, - STREAMED_SOUND_MISSION_MOB_42C, - STREAMED_SOUND_MISSION_MOB_42D, - STREAMED_SOUND_MISSION_MOB_42E, - STREAMED_SOUND_MISSION_MOB_43A, - STREAMED_SOUND_MISSION_MOB_43B, - STREAMED_SOUND_MISSION_MOB_43C, - STREAMED_SOUND_MISSION_MOB_43D, - STREAMED_SOUND_MISSION_MOB_43E, - STREAMED_SOUND_MISSION_MOB_43F, - STREAMED_SOUND_MISSION_MOB_43G, - STREAMED_SOUND_MISSION_MOB_43H, - STREAMED_SOUND_MISSION_MOB_45A, - STREAMED_SOUND_MISSION_MOB_45B, - STREAMED_SOUND_MISSION_MOB_45C, - STREAMED_SOUND_MISSION_MOB_45D, - STREAMED_SOUND_MISSION_MOB_45E, - STREAMED_SOUND_MISSION_MOB_45F, - STREAMED_SOUND_MISSION_MOB_45G, - STREAMED_SOUND_MISSION_MOB_45H, - STREAMED_SOUND_MISSION_MOB_45I, - STREAMED_SOUND_MISSION_MOB_45J, - STREAMED_SOUND_MISSION_MOB_45K, - STREAMED_SOUND_MISSION_MOB_45L, - STREAMED_SOUND_MISSION_MOB_45M, - STREAMED_SOUND_MISSION_MOB_45N, - STREAMED_SOUND_MISSION_MOB_46A, - STREAMED_SOUND_MISSION_MOB_46B, - STREAMED_SOUND_MISSION_MOB_46C, - STREAMED_SOUND_MISSION_MOB_46D, - STREAMED_SOUND_MISSION_MOB_46E, - STREAMED_SOUND_MISSION_MOB_46F, - STREAMED_SOUND_MISSION_MOB_46G, - STREAMED_SOUND_MISSION_MOB_46H, - STREAMED_SOUND_MISSION_MOB_47A, - STREAMED_SOUND_MISSION_MOB_52A, - STREAMED_SOUND_MISSION_MOB_52B, - STREAMED_SOUND_MISSION_MOB_52C, - STREAMED_SOUND_MISSION_MOB_52D, - STREAMED_SOUND_MISSION_MOB_52E, - STREAMED_SOUND_MISSION_MOB_52F, - STREAMED_SOUND_MISSION_MOB_52G, - STREAMED_SOUND_MISSION_MOB_52H, - STREAMED_SOUND_MISSION_MOB_54A, - STREAMED_SOUND_MISSION_MOB_54B, - STREAMED_SOUND_MISSION_MOB_54C, - STREAMED_SOUND_MISSION_MOB_54D, - STREAMED_SOUND_MISSION_MOB_54E, - STREAMED_SOUND_MISSION_MOB_55A, - STREAMED_SOUND_MISSION_MOB_55B, - STREAMED_SOUND_MISSION_MOB_55C, - STREAMED_SOUND_MISSION_MOB_55D, - STREAMED_SOUND_MISSION_MOB_55E, - STREAMED_SOUND_MISSION_MOB_55F, - STREAMED_SOUND_MISSION_MOB_56A, - STREAMED_SOUND_MISSION_MOB_56B, - STREAMED_SOUND_MISSION_MOB_56C, - STREAMED_SOUND_MISSION_MOB_56D, - STREAMED_SOUND_MISSION_MOB_56E, - STREAMED_SOUND_MISSION_MOB_56F, - STREAMED_SOUND_MISSION_MOB_57A, - STREAMED_SOUND_MISSION_MOB_57B, - STREAMED_SOUND_MISSION_MOB_57C, - STREAMED_SOUND_MISSION_MOB_57D, - STREAMED_SOUND_MISSION_MOB_57E, - STREAMED_SOUND_MISSION_MOB_58A, - STREAMED_SOUND_MISSION_MOB_58B, - STREAMED_SOUND_MISSION_MOB_58C, - STREAMED_SOUND_MISSION_MOB_58D, - STREAMED_SOUND_MISSION_MOB_58E, - STREAMED_SOUND_MISSION_MOB_58F, - STREAMED_SOUND_MISSION_MOB_58G, - STREAMED_SOUND_MISSION_MOB_61A, - STREAMED_SOUND_MISSION_MOB_61B, - STREAMED_SOUND_MISSION_MOB_62A, - STREAMED_SOUND_MISSION_MOB_62B, - STREAMED_SOUND_MISSION_MOB_62C, - STREAMED_SOUND_MISSION_MOB_62D, - STREAMED_SOUND_MISSION_MOB_63A, - STREAMED_SOUND_MISSION_MOB_63B, - STREAMED_SOUND_MISSION_MOB_63C, - STREAMED_SOUND_MISSION_MOB_63D, - STREAMED_SOUND_MISSION_MOB_63E, - STREAMED_SOUND_MISSION_MOB_63F, - STREAMED_SOUND_MISSION_MOB_63G, - STREAMED_SOUND_MISSION_MOB_63H, - STREAMED_SOUND_MISSION_MOB_63I, - STREAMED_SOUND_MISSION_MOB_63J, - STREAMED_SOUND_MISSION_MOB_66A, - STREAMED_SOUND_MISSION_MOB_66B, - STREAMED_SOUND_MISSION_MOB_68A, - STREAMED_SOUND_MISSION_MOB_68B, - STREAMED_SOUND_MISSION_MOB_68C, - STREAMED_SOUND_MISSION_MOB_68D, - STREAMED_SOUND_MISSION_MOB_70A, - STREAMED_SOUND_MISSION_MOB_70B, - STREAMED_SOUND_MISSION_MOB_71A, - STREAMED_SOUND_MISSION_MOB_71B, - STREAMED_SOUND_MISSION_MOB_71C, - STREAMED_SOUND_MISSION_MOB_71D, - STREAMED_SOUND_MISSION_MOB_71E, - STREAMED_SOUND_MISSION_MOB_71F, - STREAMED_SOUND_MISSION_MOB_71G, - STREAMED_SOUND_MISSION_MOB_71H, - STREAMED_SOUND_MISSION_MOB_71I, - STREAMED_SOUND_MISSION_MOB_71J, - STREAMED_SOUND_MISSION_MOB_71K, - STREAMED_SOUND_MISSION_MOB_71L, - STREAMED_SOUND_MISSION_MOB_71M, - STREAMED_SOUND_MISSION_MOB_71N, - STREAMED_SOUND_MISSION_MOB_72A, - STREAMED_SOUND_MISSION_MOB_72B, - STREAMED_SOUND_MISSION_MOB_72C, - STREAMED_SOUND_MISSION_MOB_72D, - STREAMED_SOUND_MISSION_MOB_72E, - STREAMED_SOUND_MISSION_MOB_72F, - STREAMED_SOUND_MISSION_MOB_72G, - STREAMED_SOUND_MISSION_MOB_73A, - STREAMED_SOUND_MISSION_MOB_73C, - STREAMED_SOUND_MISSION_MOB_73D, - STREAMED_SOUND_MISSION_MOB_73F, - STREAMED_SOUND_MISSION_MOB_73G, - STREAMED_SOUND_MISSION_MOB_73I, - STREAMED_SOUND_MISSION_MOB_95A, - STREAMED_SOUND_MISSION_MOB_96A, - STREAMED_SOUND_MISSION_MOB_98A, - STREAMED_SOUND_MISSION_MOB_99A, - STREAMED_SOUND_MISSION_JOB1_1B, - STREAMED_SOUND_MISSION_JOB1_1C, - STREAMED_SOUND_MISSION_JOB1_1D, - STREAMED_SOUND_MISSION_JOB2_1B, - STREAMED_SOUND_MISSION_JOB2_2, - STREAMED_SOUND_MISSION_JOB2_3, - STREAMED_SOUND_MISSION_JOB2_4, - STREAMED_SOUND_MISSION_JOB2_5, - STREAMED_SOUND_MISSION_JOB2_6, - STREAMED_SOUND_MISSION_JOB2_7, - STREAMED_SOUND_MISSION_JOB2_8, - STREAMED_SOUND_MISSION_JOB2_9, - STREAMED_SOUND_MISSION_JOB3_1, - STREAMED_SOUND_MISSION_JOB3_2, - STREAMED_SOUND_MISSION_JOB3_3, - STREAMED_SOUND_MISSION_JOB4_1, - STREAMED_SOUND_MISSION_JOB4_2, - STREAMED_SOUND_MISSION_JOB4_3, - STREAMED_SOUND_MISSION_JOB5_1, - STREAMED_SOUND_MISSION_JOB5_2, - STREAMED_SOUND_MISSION_JOB5_3, - STREAMED_SOUND_MISSION_BJM1_20, - STREAMED_SOUND_MISSION_BJM1_4, - STREAMED_SOUND_MISSION_BJM1_5, - STREAMED_SOUND_MISSION_MERC_39, - STREAMED_SOUND_MISSION_MONO_1, - STREAMED_SOUND_MISSION_MONO_2, - STREAMED_SOUND_MISSION_MONO_3, - STREAMED_SOUND_MISSION_MONO_4, - STREAMED_SOUND_MISSION_MONO_5, - STREAMED_SOUND_MISSION_MONO_6, - STREAMED_SOUND_MISSION_MONO_7, - STREAMED_SOUND_MISSION_MONO_8, - STREAMED_SOUND_MISSION_MONO_9, - STREAMED_SOUND_MISSION_MONO10, - STREAMED_SOUND_MISSION_MONO11, - STREAMED_SOUND_MISSION_MONO12, - STREAMED_SOUND_MISSION_MONO13, - STREAMED_SOUND_MISSION_MONO14, - STREAMED_SOUND_MISSION_MONO15, - STREAMED_SOUND_MISSION_MONO16, - STREAMED_SOUND_MISSION_FUD_01, - STREAMED_SOUND_MISSION_FUD_02, - STREAMED_SOUND_MISSION_FUD_03, - STREAMED_SOUND_MISSION_FUD_04, - STREAMED_SOUND_MISSION_FUD_05, - STREAMED_SOUND_MISSION_FUD_06, - STREAMED_SOUND_MISSION_FUD_07, - STREAMED_SOUND_MISSION_FUD_08, - STREAMED_SOUND_MISSION_FUD_09, - STREAMED_SOUND_MISSION_FUD_10, - STREAMED_SOUND_MISSION_FUD_11, - STREAMED_SOUND_MISSION_FUD_12, - STREAMED_SOUND_MISSION_FUD_13, - STREAMED_SOUND_MISSION_FUD_14, - STREAMED_SOUND_MISSION_FUD_15, - STREAMED_SOUND_MISSION_FUD_16, - STREAMED_SOUND_MISSION_FUD_17, - STREAMED_SOUND_MISSION_FUD_18, - STREAMED_SOUND_MISSION_FUD_19, - STREAMED_SOUND_MISSION_FUD_20, - STREAMED_SOUND_MISSION_BURG_01, - STREAMED_SOUND_MISSION_BURG_02, - STREAMED_SOUND_MISSION_BURG_03, - STREAMED_SOUND_MISSION_BURG_04, - STREAMED_SOUND_MISSION_BURG_05, - STREAMED_SOUND_MISSION_BURG_06, - STREAMED_SOUND_MISSION_BURG_07, - STREAMED_SOUND_MISSION_BURG_08, - STREAMED_SOUND_MISSION_BURG_09, - STREAMED_SOUND_MISSION_BURG_10, - STREAMED_SOUND_MISSION_BURG_11, - STREAMED_SOUND_MISSION_BURG_12, - STREAMED_SOUND_MISSION_CRUST01, - STREAMED_SOUND_MISSION_CRUST02, - STREAMED_SOUND_MISSION_CRUST03, - STREAMED_SOUND_MISSION_CRUST04, - STREAMED_SOUND_MISSION_CRUST05, - STREAMED_SOUND_MISSION_CRUST06, - STREAMED_SOUND_MISSION_CRUST07, - STREAMED_SOUND_MISSION_CRUST08, - STREAMED_SOUND_MISSION_CRUST09, - STREAMED_SOUND_MISSION_BAND_01, - STREAMED_SOUND_MISSION_BAND_02, - STREAMED_SOUND_MISSION_BAND_03, - STREAMED_SOUND_MISSION_BAND_04, - STREAMED_SOUND_MISSION_BAND_05, - STREAMED_SOUND_MISSION_BAND_06, - STREAMED_SOUND_MISSION_BAND_07, - STREAMED_SOUND_MISSION_BAND_08, - STREAMED_SOUND_MISSION_SHAFT01, - STREAMED_SOUND_MISSION_SHAFT02, - STREAMED_SOUND_MISSION_SHAFT03, - STREAMED_SOUND_MISSION_SHAFT04, - STREAMED_SOUND_MISSION_SHAFT05, - STREAMED_SOUND_MISSION_SHAFT06, - STREAMED_SOUND_MISSION_SHAFT07, - STREAMED_SOUND_MISSION_SHAFT08, - STREAMED_SOUND_MISSION_PISS_01, - STREAMED_SOUND_MISSION_PISS_02, - STREAMED_SOUND_MISSION_PISS_03, - STREAMED_SOUND_MISSION_PISS_04, - STREAMED_SOUND_MISSION_PISS_05, - STREAMED_SOUND_MISSION_PISS_06, - STREAMED_SOUND_MISSION_PISS_07, - STREAMED_SOUND_MISSION_PISS_08, - STREAMED_SOUND_MISSION_PISS_09, - STREAMED_SOUND_MISSION_PISS_10, - STREAMED_SOUND_MISSION_PISS_11, - STREAMED_SOUND_MISSION_PISS_12, - STREAMED_SOUND_MISSION_PISS_13, - STREAMED_SOUND_MISSION_PISS_14, - STREAMED_SOUND_MISSION_PISS_15, - STREAMED_SOUND_MISSION_PISS_16, - STREAMED_SOUND_MISSION_PISS_17, - STREAMED_SOUND_MISSION_PISS_18, - STREAMED_SOUND_MISSION_PISS_19, - STREAMED_SOUND_MISSION_GIMME01, - STREAMED_SOUND_MISSION_GIMME02, - STREAMED_SOUND_MISSION_GIMME03, - STREAMED_SOUND_MISSION_GIMME04, - STREAMED_SOUND_MISSION_GIMME05, - STREAMED_SOUND_MISSION_GIMME06, - STREAMED_SOUND_MISSION_GIMME07, - STREAMED_SOUND_MISSION_GIMME08, - STREAMED_SOUND_MISSION_GIMME09, - STREAMED_SOUND_MISSION_GIMME10, - STREAMED_SOUND_MISSION_GIMME11, - STREAMED_SOUND_MISSION_GIMME12, - STREAMED_SOUND_MISSION_GIMME13, - STREAMED_SOUND_MISSION_GIMME14, - STREAMED_SOUND_MISSION_GIMME15, - STREAMED_SOUND_MISSION_BUST_01, - STREAMED_SOUND_MISSION_BUST_02, - STREAMED_SOUND_MISSION_BUST_03, - STREAMED_SOUND_MISSION_BUST_04, - STREAMED_SOUND_MISSION_BUST_05, - STREAMED_SOUND_MISSION_BUST_06, - STREAMED_SOUND_MISSION_BUST_07, - STREAMED_SOUND_MISSION_BUST_08, - STREAMED_SOUND_MISSION_BUST_09, - STREAMED_SOUND_MISSION_BUST_10, - STREAMED_SOUND_MISSION_BUST_11, - STREAMED_SOUND_MISSION_BUST_12, - STREAMED_SOUND_MISSION_BUST_13, - STREAMED_SOUND_MISSION_BUST_14, - STREAMED_SOUND_MISSION_BUST_15, - STREAMED_SOUND_MISSION_BUST_16, - STREAMED_SOUND_MISSION_BUST_17, - STREAMED_SOUND_MISSION_BUST_18, - STREAMED_SOUND_MISSION_BUST_19, - STREAMED_SOUND_MISSION_BUST_20, - STREAMED_SOUND_MISSION_BUST_21, - STREAMED_SOUND_MISSION_BUST_22, - STREAMED_SOUND_MISSION_BUST_23, - STREAMED_SOUND_MISSION_BUST_24, - STREAMED_SOUND_MISSION_BUST_25, - STREAMED_SOUND_MISSION_BUST_26, - STREAMED_SOUND_MISSION_BUST_27, - STREAMED_SOUND_MISSION_BUST_28, TOTAL_STREAMED_SOUNDS, NO_TRACK, }; @@ -1299,7 +141,7 @@ enum eAudioType #ifdef GTA_PS2 enum { - NUM_CHANNELS_GENERIC = 42, + NUM_CHANNELS_GENERIC = 40, CHANNEL_POLICE_RADIO = NUM_CHANNELS_GENERIC, CHANNEL_MISSION_AUDIO_1, CHANNEL_MISSION_AUDIO_2, @@ -1310,11 +152,13 @@ enum enum { #ifdef PS2_AUDIO_CHANNELS - NUM_CHANNELS_GENERIC = 42, + NUM_CHANNELS_GENERIC = 40, #else - NUM_CHANNELS_GENERIC = 27, + NUM_CHANNELS_GENERIC = 20, #endif CHANNEL_POLICE_RADIO, + CHANNEL_MISSION_AUDIO_1, + CHANNEL_MISSION_AUDIO_2, NUM_CHANNELS }; #endif diff --git a/src/audio/sampman.h b/src/audio/sampman.h index 9b21ddb3..cc73e5c2 100644 --- a/src/audio/sampman.h +++ b/src/audio/sampman.h @@ -112,15 +112,15 @@ enum #endif }; #define MAX_PEDSFX 7 -#define PED_BLOCKSIZE 79000 +#define PED_BLOCKSIZE 160000 #define MAXPROVIDERS 64 #define MAXCHANNELS (NUM_CHANNELS_GENERIC+1) #define MAXCHANNELS_SURROUND (MAXCHANNELS-4) -#define MAX2DCHANNELS 1 +#define MAX2DCHANNELS 3 -#define MAX_STREAMS 3 +#define MAX_STREAMS 1 #define DIGITALRATE 32000 #define DIGITALBITS 16 @@ -134,6 +134,8 @@ enum static_assert( NUM_CHANNELS == MAXCHANNELS + MAX2DCHANNELS, "The number of channels doesn't match with an enum" ); +extern int gBankStartOffset[67]; + class cSampleManager { uint8 m_nEffectsVolume; @@ -245,2460 +247,71 @@ public: extern cSampleManager SampleManager; extern uint32 BankStartOffset[MAX_SFX_BANKS]; -#ifdef PS2_AUDIO_PATHS -static char PS2StreamedNameTable[][40] = -{ - "AUDIO\\MUSIC\\WILD.VB", - "AUDIO\\MUSIC\\FLASH.VB", - "AUDIO\\MUSIC\\KCHAT.VB", // 16 khz - "AUDIO\\MUSIC\\FEVER.VB", - "AUDIO\\MUSIC\\VROCK.VB", - "AUDIO\\MUSIC\\VCPR.VB", // 16 khz - "AUDIO\\MUSIC\\ESPANT.VB", - "AUDIO\\MUSIC\\EMOTION.VB", - "AUDIO\\MUSIC\\WAVE.VB", - "AUDIO\\MUSIC\\MISCOM.VB", - "AUDIO\\MUSIC\\CITY.VB", - "AUDIO\\MUSIC\\WATER.VB", - "AUDIO\\MUSIC\\BEACHAMB.VB", - "AUDIO\\MUSIC\\HCITY.VB", - "AUDIO\\MUSIC\\HWATER.VB", - "AUDIO\\MUSIC\\HBEACH.VB", - "AUDIO\\MUSIC\\MALLAMB.VB", - "AUDIO\\MUSIC\\STRIP.VB", - "AUDIO\\MUSIC\\MALIBU.VB", - "AUDIO\\MUSIC\\HOTEL.VB", - "AUDIO\\MUSIC\\DIRTRING.VB", - "AUDIO\\MUSIC\\LAW4RIOT.VB", - "AUDIO\\MUSIC\\AMBSIL.VB", - "AUDIO\\MUSIC\\POLICE.VB", // 16 khz - "AUDIO\\MUSIC\\TAXI.VB", - "AUDIO\\MUSIC\\BCLOSED.VB", - "AUDIO\\MUSIC\\BOPEN.VB", - "AUDIO\\CUTSCENE\\ASS\\ASS_1.VB", - "AUDIO\\CUTSCENE\\ASS\\ASS_2.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_1.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_2A.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_2B.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_3A.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_3B.VB", - "AUDIO\\CUTSCENE\\BANK\\BANK_4.VB", - "AUDIO\\CUTSCENE\\BIKE\\BIKE_1.VB", - "AUDIO\\CUTSCENE\\BIKE\\BIKE_2.VB", - "AUDIO\\CUTSCENE\\BIKE\\BIKE_3.VB", - "AUDIO\\CUTSCENE\\BUD\\BUD_1.VB", - "AUDIO\\CUTSCENE\\BUD\\BUD_2.VB", - "AUDIO\\CUTSCENE\\BUD\\BUD_3.VB", - "AUDIO\\CUTSCENE\\CAP\\CAP_1.VB", - "AUDIO\\CUTSCENE\\CAR\\CAR_1.VB", - "AUDIO\\CUTSCENE\\CNT\\CNT_1A.VB", - "AUDIO\\CUTSCENE\\CNT\\CNT_1B.VB", - "AUDIO\\CUTSCENE\\CNT\\CNT_2.VB", - "AUDIO\\CUTSCENE\\COK\\COK_1.VB", - "AUDIO\\CUTSCENE\\COK\\COK_2A.VB", - "AUDIO\\CUTSCENE\\COK\\COK_2B.VB", - "AUDIO\\CUTSCENE\\COK\\COK_3.VB", - "AUDIO\\CUTSCENE\\COK\\COK_4A.VB", - "AUDIO\\CUTSCENE\\COK\\COK_4A2.VB", - "AUDIO\\CUTSCENE\\COK\\COK_4B.VB", - "AUDIO\\CUTSCENE\\COL\\COL_1.VB", - "AUDIO\\CUTSCENE\\COL\\COL_2.VB", - "AUDIO\\CUTSCENE\\COL\\COL_3A.VB", - "AUDIO\\CUTSCENE\\COL\\COL_4A.VB", - "AUDIO\\CUTSCENE\\COL\\COL_5A.VB", - "AUDIO\\CUTSCENE\\COL\\COL_5B.VB", - "AUDIO\\CUTSCENE\\CUB\\CUB_1.VB", - "AUDIO\\CUTSCENE\\CUB\\CUB_2.VB", - "AUDIO\\CUTSCENE\\CUB\\CUB_3.VB", - "AUDIO\\CUTSCENE\\CUB\\CUB_4.VB", - "AUDIO\\CUTSCENE\\DRUG\\DRUG_1.VB", - "AUDIO\\CUTSCENE\\FIN\\FIN.VB", - "AUDIO\\CUTSCENE\\FIN\\FIN2.VB", - "AUDIO\\CUTSCENE\\FINALE\\FINALE.VB", - "AUDIO\\CUTSCENE\\HAT\\HAT_1.VB", - "AUDIO\\CUTSCENE\\HAT\\HAT_2.VB", - "AUDIO\\CUTSCENE\\HAT\\HAT_3.VB", - "AUDIO\\CUTSCENE\\ICE\\ICE_1.VB", - "AUDIO\\CUTSCENE\\INT\\INT_A.VB", - "AUDIO\\CUTSCENE\\INT\\INT_B.VB", - "AUDIO\\CUTSCENE\\INT\\INT_D.VB", - "AUDIO\\CUTSCENE\\INT\\INT_M.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_1A.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_1B.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_2A.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_2B.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_2C.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_3.VB", - "AUDIO\\CUTSCENE\\LAW\\LAW_4.VB", - "AUDIO\\CUTSCENE\\PHIL\\PHIL_1.VB", - "AUDIO\\CUTSCENE\\PHIL\\PHIL_2.VB", - "AUDIO\\CUTSCENE\\PORN\\PORN_1.VB", - "AUDIO\\CUTSCENE\\PORN\\PORN_2.VB", - "AUDIO\\CUTSCENE\\PORN\\PORN_3.VB", - "AUDIO\\CUTSCENE\\PORN\\PORN_4.VB", - "AUDIO\\CUTSCENE\\RESC\\RESC_1A.VB", - "AUDIO\\CUTSCENE\\ROK\\ROK_1.VB", - "AUDIO\\CUTSCENE\\ROK\\ROK_2.VB", - "AUDIO\\CUTSCENE\\ROK\\ROK_3A.VB", - "AUDIO\\CUTSCENE\\STRIPA\\STRIPA.VB", - "AUDIO\\CUTSCENE\\TAX\\TAX_1.VB", - "AUDIO\\CUTSCENE\\TEX\\TEX_1.VB", - "AUDIO\\CUTSCENE\\TEX\\TEX_2.VB", - "AUDIO\\CUTSCENE\\TEX\\TEX_3.VB", - "AUDIO\\MUSIC\\GLIGHT.VB", - "AUDIO\\MUSIC\\FIST.VB", - "AUDIO\\MUSIC\\MISCOM.VB", - "AUDIO\\MUSIC\\MISCOM.VB", - "AUDIO\\MUSIC\\MISCOM.VB", - "AUDIO\\MUSIC\\MISCOM.VB", - "AUDIO\\MOBR1.WAV", - "AUDIO\\PAGER.WAV", - "AUDIO\\CARREV.WAV", - "AUDIO\\BIKEREV.WAV", - "AUDIO\\LIFTOP.WAV", - "AUDIO\\LIFTCL.WAV", - "AUDIO\\LIFTRUN.WAV", - "AUDIO\\LIFTBEL.WAV", - "AUDIO\\INLIFT.WAV", - "AUDIO\\SFX_01.WAV", - "AUDIO\\SFX_02.WAV", - "AUDIO\\CAMERAL.WAV", - "AUDIO\\CAMERAR.WAV", - "AUDIO\\CHEER1.WAV", - "AUDIO\\CHEER2.WAV", - "AUDIO\\CHEER3.WAV", - "AUDIO\\CHEER4.WAV", - "AUDIO\\OOH1.WAV", - "AUDIO\\OOH2.WAV", - "AUDIO\\RACE1.WAV", - "AUDIO\\RACE2.WAV", - "AUDIO\\RACE3.WAV", - "AUDIO\\RACE4.WAV", - "AUDIO\\RACE5.WAV", - "AUDIO\\RACE6.WAV", - "AUDIO\\RACE7.WAV", - "AUDIO\\RACE8.WAV", - "AUDIO\\RACE9.WAV", - "AUDIO\\RACE10.WAV", - "AUDIO\\RACE11.WAV", - "AUDIO\\RACE12.WAV", - "AUDIO\\RACE13.WAV", - "AUDIO\\RACE14.WAV", - "AUDIO\\RACE15.WAV", - "AUDIO\\HOT1.WAV", - "AUDIO\\HOT2.WAV", - "AUDIO\\HOT3.WAV", - "AUDIO\\HOT4.WAV", - "AUDIO\\HOT5.WAV", - "AUDIO\\HOT6.WAV", - "AUDIO\\HOT7.WAV", - "AUDIO\\HOT8.WAV", - "AUDIO\\HOT9.WAV", - "AUDIO\\HOT10.WAV", - "AUDIO\\HOT11.WAV", - "AUDIO\\HOT12.WAV", - "AUDIO\\HOT13.WAV", - "AUDIO\\HOT14.WAV", - "AUDIO\\HOT15.WAV", - "AUDIO\\LANSTP1.WAV", - "AUDIO\\LANSTP2.WAV", - "AUDIO\\LANAMU1.WAV", - "AUDIO\\LANAMU2.WAV", - "AUDIO\\AIRHORNL.WAV", - "AUDIO\\AIRHORNR.WAV", - "AUDIO\\SNIPSCRL.WAV", - "AUDIO\\SNIPSHORT.WAV", - "AUDIO\\BLOWROOF.WAV", - "AUDIO\\ASS_1.WAV", - "AUDIO\\ASS_2.WAV", - "AUDIO\\ASS_3.WAV", - "AUDIO\\ASS_4.WAV", - "AUDIO\\ASS_5.WAV", - "AUDIO\\ASS_6.WAV", - "AUDIO\\ASS_7.WAV", - "AUDIO\\ASS_8.WAV", - "AUDIO\\ASS_9.WAV", - "AUDIO\\ASS_10.WAV", - "AUDIO\\ASS_11.WAV", - "AUDIO\\ASS_12.WAV", - "AUDIO\\ASS_13.WAV", - "AUDIO\\ASS_14.WAV", - "AUDIO\\BIKE1_1.WAV", - "AUDIO\\BIKE1_2.WAV", - "AUDIO\\BIKE1_3.WAV", - "AUDIO\\BNK1_1.WAV", - "AUDIO\\BNK1_2.WAV", - "AUDIO\\BNK1_3.WAV", - "AUDIO\\BNK1_4.WAV", - "AUDIO\\BNK1_5.WAV", - "AUDIO\\BNK1_6.WAV", - "AUDIO\\BNK1_7.WAV", - "AUDIO\\BNK1_8.WAV", - "AUDIO\\BNK1_10.WAV", - "AUDIO\\BNK1_11.WAV", - "AUDIO\\BNK1_12.WAV", - "AUDIO\\BNK1_13.WAV", - "AUDIO\\BNK1_14.WAV", - "AUDIO\\BNK2_1.WAV", - "AUDIO\\BNK2_2.WAV", - "AUDIO\\BNK2_3.WAV", - "AUDIO\\BNK2_4.WAV", - "AUDIO\\BNK2_5.WAV", - "AUDIO\\BNK2_6.WAV", - "AUDIO\\BNK2_7.WAV", - "AUDIO\\BNK2_8.WAV", - "AUDIO\\BNK2_9.WAV", - "AUDIO\\BNK3_1.WAV", - "AUDIO\\BNK3_2.WAV", - "AUDIO\\BNK3_3A.WAV", - "AUDIO\\BNK3_3B.WAV", - "AUDIO\\BNK3_3C.WAV", - "AUDIO\\BNK3_4A.WAV", - "AUDIO\\BNK3_4B.WAV", - "AUDIO\\BNK3_4C.WAV", - "AUDIO\\BNK4_1.WAV", - "AUDIO\\BNK4_2.WAV", - "AUDIO\\BNK4_3A.WAV", - "AUDIO\\BNK4_3B.WAV", - "AUDIO\\BNK4_3C.WAV", - "AUDIO\\BNK4_3D.WAV", - "AUDIO\\BNK4_3E.WAV", - "AUDIO\\BNK4_3F.WAV", - "AUDIO\\BNK4_3G.WAV", - "AUDIO\\BNK4_3H.WAV", - "AUDIO\\BNK4_3I.WAV", - "AUDIO\\BNK4_3J.WAV", - "AUDIO\\BNK4_3K.WAV", - "AUDIO\\BNK4_3M.WAV", - "AUDIO\\BNK4_3O.WAV", - "AUDIO\\BNK4_3P.WAV", - "AUDIO\\BNK4_3Q.WAV", - "AUDIO\\BNK4_3R.WAV", - "AUDIO\\BNK4_3S.WAV", - "AUDIO\\BNK4_3T.WAV", - "AUDIO\\BNK4_3U.WAV", - "AUDIO\\BNK4_3V.WAV", - "AUDIO\\BNK4_4A.WAV", - "AUDIO\\BNK4_4B.WAV", - "AUDIO\\BNK4_5.WAV", - "AUDIO\\BNK4_6.WAV", - "AUDIO\\BNK4_7.WAV", - "AUDIO\\BNK4_8.WAV", - "AUDIO\\BNK4_9.WAV", - "AUDIO\\BNK4_10.WAV", - "AUDIO\\BNK4_11.WAV", - "AUDIO\\BK4_12A.WAV", - "AUDIO\\BK4_12B.WAV", - "AUDIO\\BK4_12C.WAV", - "AUDIO\\BNK4_13.WAV", - "AUDIO\\BK4_14A.WAV", - "AUDIO\\BK4_14B.WAV", - "AUDIO\\BNK4_15.WAV", - "AUDIO\\BNK4_16.WAV", - "AUDIO\\BNK4_17.WAV", - "AUDIO\\BNK4_18.WAV", - "AUDIO\\BK4_19A.WAV", - "AUDIO\\BK4_19B.WAV", - "AUDIO\\BK4_20A.WAV", - "AUDIO\\BK4_20B.WAV", - "AUDIO\\BNK4_21.WAV", - "AUDIO\\BNK422A.WAV", - "AUDIO\\BNK422B.WAV", - "AUDIO\\BK4_23A.WAV", - "AUDIO\\BK4_23B.WAV", - "AUDIO\\BK4_23C.WAV", - "AUDIO\\BK4_23D.WAV", - "AUDIO\\BK4_24A.WAV", - "AUDIO\\BK4_24B.WAV", - "AUDIO\\BNK4_25.WAV", - "AUDIO\\BNK4_26.WAV", - "AUDIO\\BNK4_27.WAV", - "AUDIO\\BNK4_28.WAV", - "AUDIO\\BNK4_29.WAV", - "AUDIO\\BNK4_30.WAV", - "AUDIO\\BK4_31A.WAV", - "AUDIO\\BK4_31B.WAV", - "AUDIO\\BNK4_32.WAV", - "AUDIO\\BK4_34A.WAV", - "AUDIO\\BK4_34B.WAV", - "AUDIO\\BK4_35A.WAV", - "AUDIO\\BK4_35B.WAV", - "AUDIO\\BNK4_36.WAV", - "AUDIO\\BNK4_37.WAV", - "AUDIO\\BNK4_38.WAV", - "AUDIO\\BNK4_39.WAV", - "AUDIO\\BK4_40A.WAV", - "AUDIO\\BK4_40B.WAV", - "AUDIO\\BNK4_41.WAV", - "AUDIO\\BNK4_42.WAV", - "AUDIO\\BNK4_43.WAV", - "AUDIO\\BNK4_44.WAV", - "AUDIO\\BNK4_45.WAV", - "AUDIO\\BNK4_46.WAV", - "AUDIO\\BNK4_47.WAV", - "AUDIO\\BNK4_48.WAV", - "AUDIO\\BNK4_49.WAV", - "AUDIO\\BNK450A.WAV", - "AUDIO\\BNK450B.WAV", - "AUDIO\\BNK4_51.WAV", - "AUDIO\\BNK4_94.WAV", - "AUDIO\\BNK4_95.WAV", - "AUDIO\\BNK4_96.WAV", - "AUDIO\\BNK4_97.WAV", - "AUDIO\\BNK4_98.WAV", - "AUDIO\\BNK4_99.WAV", - "AUDIO\\BUD1_1.WAV", - "AUDIO\\BUD1_2.WAV", - "AUDIO\\BUD1_3.WAV", - "AUDIO\\BUD1_4.WAV", - "AUDIO\\BUD1_5.WAV", - "AUDIO\\BUD1_9.WAV", - "AUDIO\\BUD1_10.WAV", - "AUDIO\\BUD2_1.WAV", - "AUDIO\\BUD2_2.WAV", - "AUDIO\\BUD2_3.WAV", - "AUDIO\\BUD2_4.WAV", - "AUDIO\\BUD2_5.WAV", - "AUDIO\\BUD2_6.WAV", - "AUDIO\\BUD2_7.WAV", - "AUDIO\\BUD3_1.WAV", - "AUDIO\\BUD3_1A.WAV", - "AUDIO\\BUD3_1B.WAV", - "AUDIO\\BUD3_1C.WAV", - "AUDIO\\BUD3_2.WAV", - "AUDIO\\BUD3_3.WAV", - "AUDIO\\BUD3_4.WAV", - "AUDIO\\BUD3_5.WAV", - "AUDIO\\BUD3_6.WAV", - "AUDIO\\BUD3_7.WAV", - "AUDIO\\BUD3_8A.WAV", - "AUDIO\\BUD3_8B.WAV", - "AUDIO\\BUD3_8C.WAV", - "AUDIO\\BUD3_9A.WAV", - "AUDIO\\BUD3_9B.WAV", - "AUDIO\\BUD3_9C.WAV", - "AUDIO\\CAP1_2.WAV", - "AUDIO\\CAP1_3.WAV", - "AUDIO\\CAP1_4.WAV", - "AUDIO\\CAP1_5.WAV", - "AUDIO\\CAP1_6.WAV", - "AUDIO\\CAP1_7.WAV", - "AUDIO\\CAP1_8.WAV", - "AUDIO\\CAP1_9.WAV", - "AUDIO\\CAP1_10.WAV", - "AUDIO\\CAP1_11.WAV", - "AUDIO\\CAP1_12.WAV", - "AUDIO\\CNT1_1.WAV", - "AUDIO\\CNT1_2.WAV", - "AUDIO\\CNT1_3.WAV", - "AUDIO\\CNT1_4.WAV", - "AUDIO\\CNT1_5.WAV", - "AUDIO\\CNT2_1.WAV", - "AUDIO\\CNT2_2.WAV", - "AUDIO\\CNT2_3.WAV", - "AUDIO\\CNT2_4.WAV", - "AUDIO\\COK1_1.WAV", - "AUDIO\\COK1_2.WAV", - "AUDIO\\COK1_3.WAV", - "AUDIO\\COK1_4.WAV", - "AUDIO\\COK1_5.WAV", - "AUDIO\\COK1_6.WAV", - "AUDIO\\COK2_1.WAV", - "AUDIO\\COK2_2.WAV", - "AUDIO\\COK2_3.WAV", - "AUDIO\\COK2_4.WAV", - "AUDIO\\COK2_5.WAV", - "AUDIO\\COK2_6.WAV", - "AUDIO\\COK2_7A.WAV", - "AUDIO\\COK2_7B.WAV", - "AUDIO\\COK2_7C.WAV", - "AUDIO\\COK2_8A.WAV", - "AUDIO\\COK2_8B.WAV", - "AUDIO\\COK2_8C.WAV", - "AUDIO\\COK2_8D.WAV", - "AUDIO\\COK2_9.WAV", - "AUDIO\\COK210A.WAV", - "AUDIO\\COK210B.WAV", - "AUDIO\\COK210C.WAV", - "AUDIO\\COK212A.WAV", - "AUDIO\\COK212B.WAV", - "AUDIO\\COK2_13.WAV", - "AUDIO\\COK2_14.WAV", - "AUDIO\\COK2_15.WAV", - "AUDIO\\COK2_16.WAV", - "AUDIO\\COK2_20.WAV", - "AUDIO\\COK2_21.WAV", - "AUDIO\\COK2_2.WAV", // this is probably a typo of COK2_22 - "AUDIO\\COK3_1.WAV", - "AUDIO\\COK3_2.WAV", - "AUDIO\\COK3_3.WAV", - "AUDIO\\COK3_4.WAV", - "AUDIO\\COK4_1.WAV", - "AUDIO\\COK4_2.WAV", - "AUDIO\\COK4_3.WAV", - "AUDIO\\COK4_4.WAV", - "AUDIO\\COK4_5.WAV", - "AUDIO\\COK4_6.WAV", - "AUDIO\\COK4_7.WAV", - "AUDIO\\COK4_8.WAV", - "AUDIO\\COK4_9.WAV", - "AUDIO\\COK4_9A.WAV", - "AUDIO\\COK4_10.WAV", - "AUDIO\\COK4_11.WAV", - "AUDIO\\COK4_12.WAV", - "AUDIO\\COK4_13.WAV", - "AUDIO\\COK4_14.WAV", - "AUDIO\\COK4_15.WAV", - "AUDIO\\COK4_16.WAV", - "AUDIO\\COK4_17.WAV", - "AUDIO\\COK4_18.WAV", - "AUDIO\\COK4_19.WAV", - "AUDIO\\COK4_20.WAV", - "AUDIO\\COK4_21.WAV", - "AUDIO\\COK4_22.WAV", - "AUDIO\\COK4_23.WAV", - "AUDIO\\COK4_24.WAV", - "AUDIO\\COK4_25.WAV", - "AUDIO\\COK4_26.WAV", - "AUDIO\\COK4_27.WAV", - "AUDIO\\COL1_1.WAV", - "AUDIO\\COL1_2.WAV", - "AUDIO\\COL1_3.WAV", - "AUDIO\\COL1_4.WAV", - "AUDIO\\COL1_5.WAV", - "AUDIO\\COL1_6.WAV", - "AUDIO\\COL1_7.WAV", - "AUDIO\\COL1_8.WAV", - "AUDIO\\COL2_1.WAV", - "AUDIO\\COL2_2.WAV", - "AUDIO\\COL2_3.WAV", - "AUDIO\\COL2_4.WAV", - "AUDIO\\COL2_5.WAV", - "AUDIO\\COL2_6A.WAV", - "AUDIO\\COL2_7.WAV", - "AUDIO\\COL2_8.WAV", - "AUDIO\\COL2_9.WAV", - "AUDIO\\COL2_10.WAV", - "AUDIO\\COL2_11.WAV", - "AUDIO\\COL2_12.WAV", - "AUDIO\\COL2_13.WAV", - "AUDIO\\COL2_14.WAV", - "AUDIO\\COL2_15.WAV", - "AUDIO\\COL2_16.WAV", - "AUDIO\\COL3_1.WAV", - "AUDIO\\COL3_2.WAV", - "AUDIO\\COL3_2A.WAV", - "AUDIO\\COL3_2B.WAV", - "AUDIO\\COL3_3.WAV", - "AUDIO\\COL3_4.WAV", - "AUDIO\\COL3_5.WAV", - "AUDIO\\COL3_6.WAV", - "AUDIO\\COL3_7.WAV", - "AUDIO\\COL3_8.WAV", - "AUDIO\\COL3_9.WAV", - "AUDIO\\COL3_10.WAV", - "AUDIO\\COL3_11.WAV", - "AUDIO\\COL3_12.WAV", - "AUDIO\\COL3_13.WAV", - "AUDIO\\COL3_14.WAV", - "AUDIO\\COL3_15.WAV", - "AUDIO\\COL3_16.WAV", - "AUDIO\\COL3_17.WAV", - "AUDIO\\COL3_18.WAV", - "AUDIO\\COL3_19.WAV", - "AUDIO\\COL3_20.WAV", - "AUDIO\\COL3_21.WAV", - "AUDIO\\COL3_23.WAV", - "AUDIO\\COL3_24.WAV", - "AUDIO\\COL3_25.WAV", - "AUDIO\\COL4_1.WAV", - "AUDIO\\COL4_2.WAV", - "AUDIO\\COL4_3.WAV", - "AUDIO\\COL4_4.WAV", - "AUDIO\\COL4_5.WAV", - "AUDIO\\COL4_6.WAV", - "AUDIO\\COL4_7.WAV", - "AUDIO\\COL4_8.WAV", - "AUDIO\\COL4_9.WAV", - "AUDIO\\COL4_10.WAV", - "AUDIO\\COL4_11.WAV", - "AUDIO\\COL4_12.WAV", - "AUDIO\\COL4_13.WAV", - "AUDIO\\COL4_14.WAV", - "AUDIO\\COL4_15.WAV", - "AUDIO\\COL4_16.WAV", - "AUDIO\\COL4_17.WAV", - "AUDIO\\COL4_18.WAV", - "AUDIO\\COL4_19.WAV", - "AUDIO\\COL4_20.WAV", - "AUDIO\\COL4_21.WAV", - "AUDIO\\COL4_22.WAV", - "AUDIO\\COL4_23.WAV", - "AUDIO\\COL4_24.WAV", - "AUDIO\\COL4_25.WAV", - "AUDIO\\COL4_26.WAV", - "AUDIO\\COL5_1.WAV", - "AUDIO\\COL5_2.WAV", - "AUDIO\\COL5_3.WAV", - "AUDIO\\COL5_4.WAV", - "AUDIO\\COL5_5.WAV", - "AUDIO\\COL5_6.WAV", - "AUDIO\\COL5_7.WAV", - "AUDIO\\COL5_8.WAV", - "AUDIO\\COL5_9.WAV", - "AUDIO\\COL5_10.WAV", - "AUDIO\\COL5_11.WAV", - "AUDIO\\COL5_12.WAV", - "AUDIO\\COL5_13.WAV", - "AUDIO\\COL5_14.WAV", - "AUDIO\\COL5_15.WAV", - "AUDIO\\COL5_16.WAV", - "AUDIO\\COL5_17.WAV", - "AUDIO\\COL5_18.WAV", - "AUDIO\\COL5_19.WAV", - "AUDIO\\COL5_20.WAV", - "AUDIO\\COL5_21.WAV", - "AUDIO\\COL5_22.WAV", - "AUDIO\\CUB1_1.WAV", - "AUDIO\\CUB1_2.WAV", - "AUDIO\\CUB1_3.WAV", - "AUDIO\\CUB1_4.WAV", - "AUDIO\\CUB1_5.WAV", - "AUDIO\\CUB1_6.WAV", - "AUDIO\\CUB1_7.WAV", - "AUDIO\\CUB1_8.WAV", - "AUDIO\\CUB1_9.WAV", - "AUDIO\\CUB1_10.WAV", - "AUDIO\\CUB2_1.WAV", - "AUDIO\\CUB2_2.WAV", - "AUDIO\\CUB2_3A.WAV", - "AUDIO\\CUB2_3B.WAV", - "AUDIO\\CUB2_3C.WAV", - "AUDIO\\CUB2_4A.WAV", - "AUDIO\\CUB2_5.WAV", - "AUDIO\\CUB2_6.WAV", - "AUDIO\\CUB2_7.WAV", - "AUDIO\\CUB2_8.WAV", - "AUDIO\\CUB2_9.WAV", - "AUDIO\\CUB2_10.WAV", - "AUDIO\\CUB2_11.WAV", - "AUDIO\\CUB3_1.WAV", - "AUDIO\\CUB3_2.WAV", - "AUDIO\\CUB3_3.WAV", - "AUDIO\\CUB3_4.WAV", - "AUDIO\\CUB4_1.WAV", - "AUDIO\\CUB4_2.WAV", - "AUDIO\\CUB4_3.WAV", - "AUDIO\\CUB4_4.WAV", - "AUDIO\\CUB4_5.WAV", - "AUDIO\\CUB4_5A.WAV", - "AUDIO\\CUB4_6.WAV", - "AUDIO\\CUB4_7.WAV", - "AUDIO\\CUB4_8.WAV", - "AUDIO\\CUB4_9.WAV", - "AUDIO\\CUB4_10.WAV", - "AUDIO\\CUB4_11.WAV", - "AUDIO\\CUB4_12.WAV", - "AUDIO\\CUB4_13.WAV", - "AUDIO\\CUB4_14.WAV", - "AUDIO\\CUB4_15.WAV", - "AUDIO\\CUB4_16.WAV", - "AUDIO\\GOLF_1.WAV", - "AUDIO\\GOLF_2.WAV", - "AUDIO\\GOLF_3.WAV", - "AUDIO\\BAR_1.WAV", - "AUDIO\\BAR_2.WAV", - "AUDIO\\BAR_3.WAV", - "AUDIO\\BAR_4.WAV", - "AUDIO\\BAR_5.WAV", - "AUDIO\\BAR_6.WAV", - "AUDIO\\BAR_7.WAV", - "AUDIO\\BAR_8.WAV", - "AUDIO\\STRIP_1.WAV", - "AUDIO\\STRIP_2.WAV", - "AUDIO\\STRIP_3.WAV", - "AUDIO\\STRIP_4.WAV", - "AUDIO\\STRIP_5.WAV", - "AUDIO\\STRIP_6.WAV", - "AUDIO\\STRIP_7.WAV", - "AUDIO\\STRIP_8.WAV", - "AUDIO\\STRIP_9.WAV", - "AUDIO\\STAR_1.WAV", - "AUDIO\\STAR_2.WAV", - "AUDIO\\STAR_3.WAV", - "AUDIO\\STAR_4.WAV", - "AUDIO\\FIN_1A.WAV", - "AUDIO\\FIN_1B.WAV", - "AUDIO\\FIN_1C.WAV", - "AUDIO\\FIN_2B.WAV", - "AUDIO\\FIN_2C.WAV", - "AUDIO\\FIN_3.WAV", - "AUDIO\\FIN_4.WAV", - "AUDIO\\FIN_5.WAV", - "AUDIO\\FIN_6.WAV", - "AUDIO\\FIN_10.WAV", - "AUDIO\\FIN_11A.WAV", - "AUDIO\\FIN_11B.WAV", - "AUDIO\\FIN_12A.WAV", - "AUDIO\\FIN_12B.WAV", - "AUDIO\\FIN_12C.WAV", - "AUDIO\\FIN_13.WAV", - "AUDIO\\FINKILL.WAV", - "AUDIO\\LAW1_1.WAV", - "AUDIO\\LAW1_2.WAV", - "AUDIO\\LAW1_3.WAV", - "AUDIO\\LAW1_4.WAV", - "AUDIO\\LAW1_5.WAV", - "AUDIO\\LAW1_6.WAV", - "AUDIO\\LAW1_7.WAV", - "AUDIO\\LAW1_8.WAV", - "AUDIO\\LAW1_9.WAV", - "AUDIO\\LAW1_10.WAV", - "AUDIO\\LAW2_1.WAV", - "AUDIO\\LAW2_2.WAV", - "AUDIO\\LAW2_3.WAV", - "AUDIO\\LAW2_4.WAV", - "AUDIO\\LAW2_5.WAV", - "AUDIO\\LAW2_6.WAV", - "AUDIO\\LAW2_7.WAV", - "AUDIO\\LAW2_8.WAV", - "AUDIO\\LAW2_9.WAV", - "AUDIO\\LAW2_10.WAV", - "AUDIO\\LAW3_1.WAV", - "AUDIO\\LAW3_2.WAV", - "AUDIO\\LAW3_3.WAV", - "AUDIO\\LAW3_4.WAV", - "AUDIO\\LAW3_5.WAV", - "AUDIO\\LAW3_6.WAV", - "AUDIO\\LAW3_10.WAV", - "AUDIO\\LAW3_11.WAV", - "AUDIO\\LAW3_12.WAV", - "AUDIO\\LAW3_13.WAV", - "AUDIO\\LAW3_14.WAV", - "AUDIO\\LAW3_16.WAV", - "AUDIO\\LAW3_17.WAV", - "AUDIO\\LAW3_18.WAV", - "AUDIO\\LAW3_19.WAV", - "AUDIO\\LAW3_20.WAV", - "AUDIO\\LAW3_21.WAV", - "AUDIO\\LAW3_22.WAV", - "AUDIO\\LAW3_23.WAV", - "AUDIO\\LAW3_24.WAV", - "AUDIO\\LAW3_25.WAV", - "AUDIO\\LAW4_1A.WAV", - "AUDIO\\LAW4_1B.WAV", - "AUDIO\\LAW4_1C.WAV", - "AUDIO\\LAW4_1D.WAV", - "AUDIO\\LAW4_10.WAV", - "AUDIO\\LAW4_3.WAV", - "AUDIO\\LAW4_4.WAV", - "AUDIO\\LAW4_5.WAV", - "AUDIO\\LAW4_6.WAV", - "AUDIO\\LAW4_7.WAV", - "AUDIO\\LAW4_8.WAV", - "AUDIO\\LAW4_9.WAV", - "AUDIO\\PHIL1_2.WAV", - "AUDIO\\PHIL1_3.WAV", - "AUDIO\\PHIL2_1.WAV", - "AUDIO\\PHIL2_2.WAV", - "AUDIO\\PHIL2_3.WAV", - "AUDIO\\PHIL2_4.WAV", - "AUDIO\\PHIL2_5.WAV", - "AUDIO\\PHIL2_6.WAV", - "AUDIO\\PHIL2_7.WAV", - "AUDIO\\PHIL2_8.WAV", - "AUDIO\\PHIL2_9.WAV", - "AUDIO\\PHIL210.WAV", - "AUDIO\\PHIL211.WAV", - "AUDIO\\PORN1_1.WAV", - "AUDIO\\PORN1_2.WAV", - "AUDIO\\PORN1_3.WAV", - "AUDIO\\PRN1_3A.WAV", - "AUDIO\\PORN1_4.WAV", - "AUDIO\\PORN1_5.WAV", - "AUDIO\\PORN1_6.WAV", - "AUDIO\\PORN1_7.WAV", - "AUDIO\\PORN1_8.WAV", - "AUDIO\\PORN1_9.WAV", - "AUDIO\\PRN1_10.WAV", - "AUDIO\\PRN1_11.WAV", - "AUDIO\\PRN1_12.WAV", - "AUDIO\\PRN1_13.WAV", - "AUDIO\\PRN1_14.WAV", - "AUDIO\\PRN1_15.WAV", - "AUDIO\\PRN1_16.WAV", - "AUDIO\\PRN1_17.WAV", - "AUDIO\\PRN1_18.WAV", - "AUDIO\\PRN1_19.WAV", - "AUDIO\\PRN1_20.WAV", - "AUDIO\\PRN1_21.WAV", - "AUDIO\\PORN3_1.WAV", - "AUDIO\\PORN3_2.WAV", - "AUDIO\\PORN3_3.WAV", - "AUDIO\\PORN3_4.WAV", - "AUDIO\\PSYCH_1.WAV", - "AUDIO\\PSYCH_2.WAV", - "AUDIO\\ROK2_01.WAV", - "AUDIO\\ROK3_1.WAV", - "AUDIO\\ROK3_2.WAV", - "AUDIO\\ROK3_3.WAV", - "AUDIO\\ROK3_4.WAV", - "AUDIO\\ROK3_5.WAV", - "AUDIO\\ROK3_6.WAV", - "AUDIO\\ROK3_7.WAV", - "AUDIO\\ROK3_8.WAV", - "AUDIO\\ROK3_9.WAV", - "AUDIO\\ROK3_10.WAV", - "AUDIO\\ROK3_11.WAV", - "AUDIO\\ROK3_12.WAV", - "AUDIO\\ROK3_13.WAV", - "AUDIO\\ROK3_14.WAV", - "AUDIO\\ROK3_15.WAV", - "AUDIO\\ROK3_16.WAV", - "AUDIO\\ROK3_17.WAV", - "AUDIO\\ROK3_18.WAV", - "AUDIO\\ROK3_19.WAV", - "AUDIO\\ROK3_20.WAV", - "AUDIO\\ROK3_21.WAV", - "AUDIO\\ROK3_22.WAV", - "AUDIO\\ROK3_23.WAV", - "AUDIO\\ROK3_24.WAV", - "AUDIO\\ROK3_25.WAV", - "AUDIO\\ROK3_26.WAV", - "AUDIO\\ROK3_27.WAV", - "AUDIO\\ROK3_62.WAV", - "AUDIO\\ROK3_63.WAV", - "AUDIO\\ROK3_64.WAV", - "AUDIO\\ROK3_65.WAV", - "AUDIO\\ROK3_66.WAV", - "AUDIO\\ROK3_67.WAV", - "AUDIO\\ROK3_68.WAV", - "AUDIO\\ROK3_69.WAV", - "AUDIO\\ROK3_70.WAV", - "AUDIO\\ROK3_71.WAV", - "AUDIO\\ROK3_73.WAV", - "AUDIO\\RESC_1.WAV", - "AUDIO\\RESC_2.WAV", - "AUDIO\\RESC_3.WAV", - "AUDIO\\RESC_4.WAV", - "AUDIO\\RESC_5.WAV", - "AUDIO\\RESC_6.WAV", - "AUDIO\\RESC_7.WAV", - "AUDIO\\RESC_8.WAV", - "AUDIO\\RESC_9.WAV", - "AUDIO\\RESC_10.WAV", - "AUDIO\\ROK1_1A.WAV", - "AUDIO\\ROK1_1B.WAV", - "AUDIO\\ROK1_5.WAV", - "AUDIO\\ROK1_6.WAV", - "AUDIO\\ROK1_7.WAV", - "AUDIO\\ROK1_8.WAV", - "AUDIO\\ROK1_9.WAV", - "AUDIO\\TAX1_1.WAV", - "AUDIO\\TAX1_2.WAV", - "AUDIO\\TAX1_3.WAV", - "AUDIO\\TAX1_4.WAV", - "AUDIO\\TAX1_5.WAV", - "AUDIO\\TAX2_1.WAV", - "AUDIO\\TAX2_2.WAV", - "AUDIO\\TAX2_3.WAV", - "AUDIO\\TAX2_4.WAV", - "AUDIO\\TAX2_5.WAV", - "AUDIO\\TAX2_6.WAV", - "AUDIO\\TAX2_7.WAV", - "AUDIO\\TAX3_1.WAV", - "AUDIO\\TAX3_2.WAV", - "AUDIO\\TAX3_3.WAV", - "AUDIO\\TAX3_4.WAV", - "AUDIO\\TAX3_5.WAV", - "AUDIO\\TEX1_1.WAV", - "AUDIO\\TEX1_2.WAV", - "AUDIO\\TEX1_3.WAV", - "AUDIO\\TEX1_4.WAV", - "AUDIO\\TEX1_5.WAV", - "AUDIO\\TEX1_6.WAV", - "AUDIO\\TEX2_1.WAV", - "AUDIO\\TEX3_1.WAV", - "AUDIO\\TEX3_2.WAV", - "AUDIO\\TEX3_3.WAV", - "AUDIO\\TEX3_4.WAV", - "AUDIO\\TEX3_5.WAV", - "AUDIO\\TEX3_6.WAV", - "AUDIO\\TEX3_7.WAV", - "AUDIO\\TEX3_8.WAV", - "AUDIO\\HAT_1A.WAV", - "AUDIO\\INTRO1.WAV", - "AUDIO\\INTRO2.WAV", - "AUDIO\\INTRO3.WAV", - "AUDIO\\INTRO4.WAV", - "AUDIO\\MOB_01A.WAV", - "AUDIO\\MOB_01B.WAV", - "AUDIO\\MOB_01C.WAV", - "AUDIO\\MOB_02A.WAV", - "AUDIO\\MOB_02B.WAV", - "AUDIO\\MOB_02C.WAV", - "AUDIO\\MOB_03A.WAV", - "AUDIO\\MOB_03B.WAV", - "AUDIO\\MOB_03C.WAV", - "AUDIO\\MOB_03D.WAV", - "AUDIO\\MOB_03E.WAV", - "AUDIO\\SHARK_1.WAV", - "AUDIO\\SHARK_2.WAV", - "AUDIO\\SHARK_3.WAV", - "AUDIO\\SHARK_4.WAV", - "AUDIO\\SHARK_5.WAV", - "AUDIO\\MOB_04A.WAV", - "AUDIO\\MOB_04B.WAV", - "AUDIO\\MOB_04C.WAV", - "AUDIO\\MOB_04D.WAV", - "AUDIO\\MOB_05A.WAV", - "AUDIO\\MOB_05B.WAV", - "AUDIO\\MOB_05C.WAV", - "AUDIO\\MOB_05D.WAV", - "AUDIO\\MOB_06A.WAV", - "AUDIO\\MOB_06B.WAV", - "AUDIO\\MOB_06C.WAV", - "AUDIO\\MOB_07A.WAV", - "AUDIO\\MOB_07B.WAV", - "AUDIO\\MOB_08A.WAV", - "AUDIO\\MOB_08B.WAV", - "AUDIO\\MOB_08C.WAV", - "AUDIO\\MOB_08D.WAV", - "AUDIO\\MOB_08E.WAV", - "AUDIO\\MOB_08F.WAV", - "AUDIO\\MOB_08G.WAV", - "AUDIO\\MOB_09A.WAV", - "AUDIO\\MOB_09B.WAV", - "AUDIO\\MOB_09C.WAV", - "AUDIO\\MOB_09D.WAV", - "AUDIO\\MOB_09E.WAV", - "AUDIO\\MOB_09F.WAV", - "AUDIO\\MOB_10A.WAV", - "AUDIO\\MOB_10B.WAV", - "AUDIO\\MOB_10C.WAV", - "AUDIO\\MOB_10D.WAV", - "AUDIO\\MOB_10E.WAV", - "AUDIO\\MOB_11A.WAV", - "AUDIO\\MOB_11B.WAV", - "AUDIO\\MOB_11C.WAV", - "AUDIO\\MOB_11D.WAV", - "AUDIO\\MOB_11E.WAV", - "AUDIO\\MOB_11F.WAV", - "AUDIO\\MOB_14A.WAV", - "AUDIO\\MOB_14B.WAV", - "AUDIO\\MOB_14C.WAV", - "AUDIO\\MOB_14D.WAV", - "AUDIO\\MOB_14E.WAV", - "AUDIO\\MOB_14F.WAV", - "AUDIO\\MOB_14G.WAV", - "AUDIO\\MOB_14H.WAV", - "AUDIO\\MOB_16A.WAV", - "AUDIO\\MOB_16B.WAV", - "AUDIO\\MOB_16C.WAV", - "AUDIO\\MOB_16D.WAV", - "AUDIO\\MOB_16E.WAV", - "AUDIO\\MOB_16F.WAV", - "AUDIO\\MOB_16G.WAV", - "AUDIO\\MOB_17A.WAV", - "AUDIO\\MOB_17B.WAV", - "AUDIO\\MOB_17C.WAV", - "AUDIO\\MOB_17D.WAV", - "AUDIO\\MOB_17E.WAV", - "AUDIO\\MOB_17G.WAV", - "AUDIO\\MOB_17H.WAV", - "AUDIO\\MOB_17I.WAV", - "AUDIO\\MOB_17J.WAV", - "AUDIO\\MOB_17K.WAV", - "AUDIO\\MOB_17L.WAV", - "AUDIO\\MOB_18A.WAV", - "AUDIO\\MOB_18B.WAV", - "AUDIO\\MOB_18C.WAV", - "AUDIO\\MOB_18D.WAV", - "AUDIO\\MOB_18E.WAV", - "AUDIO\\MOB_18F.WAV", - "AUDIO\\MOB_18G.WAV", - "AUDIO\\MOB_20A.WAV", - "AUDIO\\MOB_20B.WAV", - "AUDIO\\MOB_20C.WAV", - "AUDIO\\MOB_20D.WAV", - "AUDIO\\MOB_20E.WAV", - "AUDIO\\MOB_24A.WAV", - "AUDIO\\MOB_24B.WAV", - "AUDIO\\MOB_24C.WAV", - "AUDIO\\MOB_24D.WAV", - "AUDIO\\MOB_24E.WAV", - "AUDIO\\MOB_24F.WAV", - "AUDIO\\MOB_24G.WAV", - "AUDIO\\MOB_24H.WAV", - "AUDIO\\MOB_25A.WAV", - "AUDIO\\MOB_25B.WAV", - "AUDIO\\MOB_25C.WAV", - "AUDIO\\MOB_25D.WAV", - "AUDIO\\MOB_26A.WAV", - "AUDIO\\MOB_26B.WAV", - "AUDIO\\MOB_26C.WAV", - "AUDIO\\MOB_26D.WAV", - "AUDIO\\MOB_26E.WAV", - "AUDIO\\MOB_29A.WAV", - "AUDIO\\MOB_29B.WAV", - "AUDIO\\MOB_29C.WAV", - "AUDIO\\MOB_29D.WAV", - "AUDIO\\MOB_29E.WAV", - "AUDIO\\MOB_29F.WAV", - "AUDIO\\MOB_29G.WAV", - "AUDIO\\MOB_30A.WAV", - "AUDIO\\MOB_30B.WAV", - "AUDIO\\MOB_30C.WAV", - "AUDIO\\MOB_30D.WAV", - "AUDIO\\MOB_30E.WAV", - "AUDIO\\MOB_30F.WAV", - "AUDIO\\MOB_33A.WAV", - "AUDIO\\MOB_33B.WAV", - "AUDIO\\MOB_33C.WAV", - "AUDIO\\MOB_33D.WAV", - "AUDIO\\MOB_34A.WAV", - "AUDIO\\MOB_34B.WAV", - "AUDIO\\MOB_34C.WAV", - "AUDIO\\MOB_34D.WAV", - "AUDIO\\MOB_35A.WAV", - "AUDIO\\MOB_35B.WAV", - "AUDIO\\MOB_35C.WAV", - "AUDIO\\MOB_35D.WAV", - "AUDIO\\MOB_36A.WAV", - "AUDIO\\MOB_36B.WAV", - "AUDIO\\MOB_36C.WAV", - "AUDIO\\MOB_40A.WAV", - "AUDIO\\MOB_40B.WAV", - "AUDIO\\MOB_40C.WAV", - "AUDIO\\MOB_40D.WAV", - "AUDIO\\MOB_40E.WAV", - "AUDIO\\MOB_40F.WAV", - "AUDIO\\MOB_40G.WAV", - "AUDIO\\MOB_40H.WAV", - "AUDIO\\MOB_40I.WAV", - "AUDIO\\MOB_41A.WAV", - "AUDIO\\MOB_41B.WAV", - "AUDIO\\MOB_41C.WAV", - "AUDIO\\MOB_41D.WAV", - "AUDIO\\MOB_41E.WAV", - "AUDIO\\MOB_41F.WAV", - "AUDIO\\MOB_41G.WAV", - "AUDIO\\MOB_41H.WAV", - "AUDIO\\MOB_42A.WAV", - "AUDIO\\MOB_42B.WAV", - "AUDIO\\MOB_42C.WAV", - "AUDIO\\MOB_42D.WAV", - "AUDIO\\MOB_42E.WAV", - "AUDIO\\MOB_43A.WAV", - "AUDIO\\MOB_43B.WAV", - "AUDIO\\MOB_43C.WAV", - "AUDIO\\MOB_43D.WAV", - "AUDIO\\MOB_43E.WAV", - "AUDIO\\MOB_43F.WAV", - "AUDIO\\MOB_43G.WAV", - "AUDIO\\MOB_43H.WAV", - "AUDIO\\MOB_45A.WAV", - "AUDIO\\MOB_45B.WAV", - "AUDIO\\MOB_45C.WAV", - "AUDIO\\MOB_45D.WAV", - "AUDIO\\MOB_45E.WAV", - "AUDIO\\MOB_45F.WAV", - "AUDIO\\MOB_45G.WAV", - "AUDIO\\MOB_45H.WAV", - "AUDIO\\MOB_45I.WAV", - "AUDIO\\MOB_45J.WAV", - "AUDIO\\MOB_45K.WAV", - "AUDIO\\MOB_45L.WAV", - "AUDIO\\MOB_45M.WAV", - "AUDIO\\MOB_45N.WAV", - "AUDIO\\MOB_46A.WAV", - "AUDIO\\MOB_46B.WAV", - "AUDIO\\MOB_46C.WAV", - "AUDIO\\MOB_46D.WAV", - "AUDIO\\MOB_46E.WAV", - "AUDIO\\MOB_46F.WAV", - "AUDIO\\MOB_46G.WAV", - "AUDIO\\MOB_46H.WAV", - "AUDIO\\MOB_47A.WAV", - "AUDIO\\MOB_52A.WAV", - "AUDIO\\MOB_52B.WAV", - "AUDIO\\MOB_52C.WAV", - "AUDIO\\MOB_52D.WAV", - "AUDIO\\MOB_52E.WAV", - "AUDIO\\MOB_52F.WAV", - "AUDIO\\MOB_52G.WAV", - "AUDIO\\MOB_52H.WAV", - "AUDIO\\MOB_54A.WAV", - "AUDIO\\MOB_54B.WAV", - "AUDIO\\MOB_54C.WAV", - "AUDIO\\MOB_54D.WAV", - "AUDIO\\MOB_54E.WAV", - "AUDIO\\MOB_55A.WAV", - "AUDIO\\MOB_55B.WAV", - "AUDIO\\MOB_55C.WAV", - "AUDIO\\MOB_55D.WAV", - "AUDIO\\MOB_55E.WAV", - "AUDIO\\MOB_55F.WAV", - "AUDIO\\MOB_56A.WAV", - "AUDIO\\MOB_56B.WAV", - "AUDIO\\MOB_56C.WAV", - "AUDIO\\MOB_56D.WAV", - "AUDIO\\MOB_56E.WAV", - "AUDIO\\MOB_56F.WAV", - "AUDIO\\MOB_57A.WAV", - "AUDIO\\MOB_57B.WAV", - "AUDIO\\MOB_57C.WAV", - "AUDIO\\MOB_57D.WAV", - "AUDIO\\MOB_57E.WAV", - "AUDIO\\MOB_58A.WAV", - "AUDIO\\MOB_58B.WAV", - "AUDIO\\MOB_58C.WAV", - "AUDIO\\MOB_58D.WAV", - "AUDIO\\MOB_58E.WAV", - "AUDIO\\MOB_58F.WAV", - "AUDIO\\MOB_58G.WAV", - "AUDIO\\MOB_61A.WAV", - "AUDIO\\MOB_61B.WAV", - "AUDIO\\MOB_62A.WAV", - "AUDIO\\MOB_62B.WAV", - "AUDIO\\MOB_62C.WAV", - "AUDIO\\MOB_62D.WAV", - "AUDIO\\MOB_63A.WAV", - "AUDIO\\MOB_63B.WAV", - "AUDIO\\MOB_63C.WAV", - "AUDIO\\MOB_63D.WAV", - "AUDIO\\MOB_63E.WAV", - "AUDIO\\MOB_63F.WAV", - "AUDIO\\MOB_63G.WAV", - "AUDIO\\MOB_63H.WAV", - "AUDIO\\MOB_63I.WAV", - "AUDIO\\MOB_63J.WAV", - "AUDIO\\MOB_66A.WAV", - "AUDIO\\MOB_66B.WAV", - "AUDIO\\MOB_68A.WAV", - "AUDIO\\MOB_68B.WAV", - "AUDIO\\MOB_68C.WAV", - "AUDIO\\MOB_68D.WAV", - "AUDIO\\MOB_70A.WAV", - "AUDIO\\MOB_70B.WAV", - "AUDIO\\MOB_71A.WAV", - "AUDIO\\MOB_71B.WAV", - "AUDIO\\MOB_71C.WAV", - "AUDIO\\MOB_71D.WAV", - "AUDIO\\MOB_71E.WAV", - "AUDIO\\MOB_71F.WAV", - "AUDIO\\MOB_71G.WAV", - "AUDIO\\MOB_71H.WAV", - "AUDIO\\MOB_71I.WAV", - "AUDIO\\MOB_71J.WAV", - "AUDIO\\MOB_71K.WAV", - "AUDIO\\MOB_71L.WAV", - "AUDIO\\MOB_71M.WAV", - "AUDIO\\MOB_71N.WAV", - "AUDIO\\MOB_72A.WAV", - "AUDIO\\MOB_72B.WAV", - "AUDIO\\MOB_72C.WAV", - "AUDIO\\MOB_72D.WAV", - "AUDIO\\MOB_72E.WAV", - "AUDIO\\MOB_72F.WAV", - "AUDIO\\MOB_72G.WAV", - "AUDIO\\MOB_73A.WAV", - "AUDIO\\MOB_73C.WAV", - "AUDIO\\MOB_73D.WAV", - "AUDIO\\MOB_73F.WAV", - "AUDIO\\MOB_73G.WAV", - "AUDIO\\MOB_73I.WAV", - "AUDIO\\MOB_95A.WAV", - "AUDIO\\MOB_96A.WAV", - "AUDIO\\MOB_98A.WAV", - "AUDIO\\MOB_99A.WAV", - "AUDIO\\JOB1_1B.WAV", - "AUDIO\\JOB1_1C.WAV", - "AUDIO\\JOB1_1D.WAV", - "AUDIO\\JOB2_1B.WAV", - "AUDIO\\JOB2_2.WAV", - "AUDIO\\JOB2_3.WAV", - "AUDIO\\JOB2_4.WAV", - "AUDIO\\JOB2_5.WAV", - "AUDIO\\JOB2_6.WAV", - "AUDIO\\JOB2_7.WAV", - "AUDIO\\JOB2_8.WAV", - "AUDIO\\JOB2_9.WAV", - "AUDIO\\JOB3_1.WAV", - "AUDIO\\JOB3_2.WAV", - "AUDIO\\JOB3_3.WAV", - "AUDIO\\JOB4_1.WAV", - "AUDIO\\JOB4_2.WAV", - "AUDIO\\JOB4_3.WAV", - "AUDIO\\JOB5_1.WAV", - "AUDIO\\JOB5_2.WAV", - "AUDIO\\JOB5_3.WAV", - "AUDIO\\BJM1_20.WAV", - "AUDIO\\BJM1_4.WAV", - "AUDIO\\BJM1_5.WAV", - "AUDIO\\MERC_39.WAV", - "AUDIO\\MONO_1.WAV", - "AUDIO\\MONO_2.WAV", - "AUDIO\\MONO_3.WAV", - "AUDIO\\MONO_4.WAV", - "AUDIO\\MONO_5.WAV", - "AUDIO\\MONO_6.WAV", - "AUDIO\\MONO_7.WAV", - "AUDIO\\MONO_8.WAV", - "AUDIO\\MONO_9.WAV", - "AUDIO\\MONO10.WAV", - "AUDIO\\MONO11.WAV", - "AUDIO\\MONO12.WAV", - "AUDIO\\MONO13.WAV", - "AUDIO\\MONO14.WAV", - "AUDIO\\MONO15.WAV", - "AUDIO\\MONO16.WAV", - "AUDIO\\FUD_01.WAV", - "AUDIO\\FUD_02.WAV", - "AUDIO\\FUD_03.WAV", - "AUDIO\\FUD_04.WAV", - "AUDIO\\FUD_05.WAV", - "AUDIO\\FUD_06.WAV", - "AUDIO\\FUD_07.WAV", - "AUDIO\\FUD_08.WAV", - "AUDIO\\FUD_09.WAV", - "AUDIO\\FUD_10.WAV", - "AUDIO\\FUD_11.WAV", - "AUDIO\\FUD_12.WAV", - "AUDIO\\FUD_13.WAV", - "AUDIO\\FUD_14.WAV", - "AUDIO\\FUD_15.WAV", - "AUDIO\\FUD_16.WAV", - "AUDIO\\FUD_17.WAV", - "AUDIO\\FUD_18.WAV", - "AUDIO\\FUD_19.WAV", - "AUDIO\\FUD_20.WAV", - "AUDIO\\BURG_01.WAV", - "AUDIO\\BURG_02.WAV", - "AUDIO\\BURG_03.WAV", - "AUDIO\\BURG_04.WAV", - "AUDIO\\BURG_05.WAV", - "AUDIO\\BURG_06.WAV", - "AUDIO\\BURG_07.WAV", - "AUDIO\\BURG_08.WAV", - "AUDIO\\BURG_09.WAV", - "AUDIO\\BURG_10.WAV", - "AUDIO\\BURG_11.WAV", - "AUDIO\\BURG_12.WAV", - "AUDIO\\CRUST01.WAV", - "AUDIO\\CRUST02.WAV", - "AUDIO\\CRUST03.WAV", - "AUDIO\\CRUST04.WAV", - "AUDIO\\CRUST05.WAV", - "AUDIO\\CRUST06.WAV", - "AUDIO\\CRUST07.WAV", - "AUDIO\\CRUST08.WAV", - "AUDIO\\CRUST09.WAV", - "AUDIO\\BAND_01.WAV", - "AUDIO\\BAND_02.WAV", - "AUDIO\\BAND_03.WAV", - "AUDIO\\BAND_04.WAV", - "AUDIO\\BAND_05.WAV", - "AUDIO\\BAND_06.WAV", - "AUDIO\\BAND_07.WAV", - "AUDIO\\BAND_08.WAV", - "AUDIO\\SHAFT01.WAV", - "AUDIO\\SHAFT02.WAV", - "AUDIO\\SHAFT03.WAV", - "AUDIO\\SHAFT04.WAV", - "AUDIO\\SHAFT05.WAV", - "AUDIO\\SHAFT06.WAV", - "AUDIO\\SHAFT07.WAV", - "AUDIO\\SHAFT08.WAV", - "AUDIO\\PISS_01.WAV", - "AUDIO\\PISS_02.WAV", - "AUDIO\\PISS_03.WAV", - "AUDIO\\PISS_04.WAV", - "AUDIO\\PISS_05.WAV", - "AUDIO\\PISS_06.WAV", - "AUDIO\\PISS_07.WAV", - "AUDIO\\PISS_08.WAV", - "AUDIO\\PISS_09.WAV", - "AUDIO\\PISS_10.WAV", - "AUDIO\\PISS_11.WAV", - "AUDIO\\PISS_12.WAV", - "AUDIO\\PISS_13.WAV", - "AUDIO\\PISS_14.WAV", - "AUDIO\\PISS_15.WAV", - "AUDIO\\PISS_16.WAV", - "AUDIO\\PISS_17.WAV", - "AUDIO\\PISS_18.WAV", - "AUDIO\\PISS_19.WAV", - "AUDIO\\GIMME01.WAV", - "AUDIO\\GIMME02.WAV", - "AUDIO\\GIMME03.WAV", - "AUDIO\\GIMME04.WAV", - "AUDIO\\GIMME05.WAV", - "AUDIO\\GIMME06.WAV", - "AUDIO\\GIMME07.WAV", - "AUDIO\\GIMME08.WAV", - "AUDIO\\GIMME09.WAV", - "AUDIO\\GIMME10.WAV", - "AUDIO\\GIMME11.WAV", - "AUDIO\\GIMME12.WAV", - "AUDIO\\GIMME13.WAV", - "AUDIO\\GIMME14.WAV", - "AUDIO\\GIMME15.WAV", - "AUDIO\\BUST_01.WAV", - "AUDIO\\BUST_02.WAV", - "AUDIO\\BUST_03.WAV", - "AUDIO\\BUST_04.WAV", - "AUDIO\\BUST_05.WAV", - "AUDIO\\BUST_06.WAV", - "AUDIO\\BUST_07.WAV", - "AUDIO\\BUST_08.WAV", - "AUDIO\\BUST_09.WAV", - "AUDIO\\BUST_10.WAV", - "AUDIO\\BUST_11.WAV", - "AUDIO\\BUST_12.WAV", - "AUDIO\\BUST_13.WAV", - "AUDIO\\BUST_14.WAV", - "AUDIO\\BUST_15.WAV", - "AUDIO\\BUST_16.WAV", - "AUDIO\\BUST_17.WAV", - "AUDIO\\BUST_18.WAV", - "AUDIO\\BUST_19.WAV", - "AUDIO\\BUST_20.WAV", - "AUDIO\\BUST_21.WAV", - "AUDIO\\BUST_22.WAV", - "AUDIO\\BUST_23.WAV", - "AUDIO\\BUST_24.WAV", - "AUDIO\\BUST_25.WAV", - "AUDIO\\BUST_26.WAV", - "AUDIO\\BUST_27.WAV", - "AUDIO\\BUST_28.WAV", -}; -#endif - -static char StreamedNameTable[][25] = -{ - "AUDIO\\WILD.ADF", - "AUDIO\\FLASH.ADF", - "AUDIO\\KCHAT.ADF", - "AUDIO\\FEVER.ADF", - "AUDIO\\VROCK.ADF", - "AUDIO\\VCPR.ADF", - "AUDIO\\ESPANT.ADF", - "AUDIO\\EMOTION.ADF", - "AUDIO\\WAVE.ADF", - "AUDIO\\MISCOM.MP3", - "AUDIO\\CITY.MP3", - "AUDIO\\WATER.MP3", - "AUDIO\\BEACHAMB.MP3", - "AUDIO\\HCITY.MP3", - "AUDIO\\HWATER.MP3", - "AUDIO\\HBEACH.MP3", - "AUDIO\\MALLAMB.MP3", - "AUDIO\\STRIP.MP3", - "AUDIO\\MALIBU.MP3", - "AUDIO\\HOTEL.MP3", - "AUDIO\\DIRTRING.MP3", - "AUDIO\\LAW4RIOT.MP3", - "AUDIO\\AMBSIL.MP3", - "AUDIO\\POLICE.MP3", - "AUDIO\\TAXI.MP3", - "AUDIO\\BCLOSED.MP3", - "AUDIO\\BOPEN.MP3", - "AUDIO\\ASS_1.MP3", - "AUDIO\\ASS_2.MP3", - "AUDIO\\BANK_1.MP3", - "AUDIO\\BANK_2A.MP3", - "AUDIO\\BANK_2B.MP3", - "AUDIO\\BANK_3A.MP3", - "AUDIO\\BANK_3B.MP3", - "AUDIO\\BANK_4.MP3", - "AUDIO\\BIKE_1.MP3", - "AUDIO\\BIKE_2.MP3", - "AUDIO\\BIKE_3.MP3", - "AUDIO\\BUD_1.MP3", - "AUDIO\\BUD_2.MP3", - "AUDIO\\BUD_3.MP3", - "AUDIO\\CAP_1.MP3", - "AUDIO\\CAR_1.MP3", - "AUDIO\\CNT_1A.MP3", - "AUDIO\\CNT_1B.MP3", - "AUDIO\\CNT_2.MP3", - "AUDIO\\COK_1.MP3", - "AUDIO\\COK_2A.MP3", - "AUDIO\\COK_2B.MP3", - "AUDIO\\COK_3.MP3", - "AUDIO\\COK_4A.MP3", - "AUDIO\\COK_4A2.MP3", - "AUDIO\\COK_4B.MP3", - "AUDIO\\COL_1.MP3", - "AUDIO\\COL_2.MP3", - "AUDIO\\COL_3A.MP3", - "AUDIO\\COL_4A.MP3", - "AUDIO\\COL_5A.MP3", - "AUDIO\\COL_5B.MP3", - "AUDIO\\CUB_1.MP3", - "AUDIO\\CUB_2.MP3", - "AUDIO\\CUB_3.MP3", - "AUDIO\\CUB_4.MP3", - "AUDIO\\DRUG_1.MP3", - "AUDIO\\FIN.MP3", - "AUDIO\\FIN2.MP3", - "AUDIO\\FINALE.MP3", - "AUDIO\\HAT_1.MP3", - "AUDIO\\HAT_2.MP3", - "AUDIO\\HAT_3.MP3", - "AUDIO\\ICE_1.MP3", - "AUDIO\\INT_A.MP3", - "AUDIO\\INT_B.MP3", - "AUDIO\\INT_D.MP3", - "AUDIO\\INT_M.MP3", - "AUDIO\\LAW_1A.MP3", - "AUDIO\\LAW_1B.MP3", - "AUDIO\\LAW_2A.MP3", - "AUDIO\\LAW_2B.MP3", - "AUDIO\\LAW_2C.MP3", - "AUDIO\\LAW_3.MP3", - "AUDIO\\LAW_4.MP3", - "AUDIO\\PHIL_1.MP3", - "AUDIO\\PHIL_2.MP3", - "AUDIO\\PORN_1.MP3", - "AUDIO\\PORN_2.MP3", - "AUDIO\\PORN_3.MP3", - "AUDIO\\PORN_4.MP3", - "AUDIO\\RESC_1A.MP3", - "AUDIO\\ROK_1.MP3", - "AUDIO\\ROK_2.MP3", - "AUDIO\\ROK_3A.MP3", - "AUDIO\\STRIPA.MP3", - "AUDIO\\TAX_1.MP3", - "AUDIO\\TEX_1.MP3", - "AUDIO\\TEX_2.MP3", - "AUDIO\\TEX_3.MP3", - "AUDIO\\GLIGHT.MP3", - "AUDIO\\FIST.MP3", - "AUDIO\\MISCOM.MP3", - "AUDIO\\MISCOM.MP3", - "AUDIO\\MISCOM.MP3", - "AUDIO\\MISCOM.MP3", - "AUDIO\\MOBR1.WAV", - "AUDIO\\PAGER.WAV", - "AUDIO\\CARREV.WAV", - "AUDIO\\BIKEREV.WAV", - "AUDIO\\LIFTOP.WAV", - "AUDIO\\LIFTCL.WAV", - "AUDIO\\LIFTRUN.WAV", - "AUDIO\\LIFTBEL.WAV", - "AUDIO\\INLIFT.WAV", - "AUDIO\\SFX_01.WAV", - "AUDIO\\SFX_02.WAV", - "AUDIO\\CAMERAL.WAV", - "AUDIO\\CAMERAR.WAV", - "AUDIO\\CHEER1.WAV", - "AUDIO\\CHEER2.WAV", - "AUDIO\\CHEER3.WAV", - "AUDIO\\CHEER4.WAV", - "AUDIO\\OOH1.WAV", - "AUDIO\\OOH2.WAV", - "AUDIO\\RACE1.WAV", - "AUDIO\\RACE2.WAV", - "AUDIO\\RACE3.WAV", - "AUDIO\\RACE4.WAV", - "AUDIO\\RACE5.WAV", - "AUDIO\\RACE6.WAV", - "AUDIO\\RACE7.WAV", - "AUDIO\\RACE8.WAV", - "AUDIO\\RACE9.WAV", - "AUDIO\\RACE10.WAV", - "AUDIO\\RACE11.WAV", - "AUDIO\\RACE12.WAV", - "AUDIO\\RACE13.WAV", - "AUDIO\\RACE14.WAV", - "AUDIO\\RACE15.WAV", - "AUDIO\\HOT1.WAV", - "AUDIO\\HOT2.WAV", - "AUDIO\\HOT3.WAV", - "AUDIO\\HOT4.WAV", - "AUDIO\\HOT5.WAV", - "AUDIO\\HOT6.WAV", - "AUDIO\\HOT7.WAV", - "AUDIO\\HOT8.WAV", - "AUDIO\\HOT9.WAV", - "AUDIO\\HOT10.WAV", - "AUDIO\\HOT11.WAV", - "AUDIO\\HOT12.WAV", - "AUDIO\\HOT13.WAV", - "AUDIO\\HOT14.WAV", - "AUDIO\\HOT15.WAV", - "AUDIO\\LANSTP1.WAV", - "AUDIO\\LANSTP2.WAV", - "AUDIO\\LANAMU1.WAV", - "AUDIO\\LANAMU2.WAV", - "AUDIO\\AIRHORNL.WAV", - "AUDIO\\AIRHORNR.WAV", - "AUDIO\\SNIPSCRL.WAV", - "AUDIO\\SNIPSHORT.WAV", - "AUDIO\\BLOWROOF.WAV", - "AUDIO\\ASS_1.WAV", - "AUDIO\\ASS_2.WAV", - "AUDIO\\ASS_3.WAV", - "AUDIO\\ASS_4.WAV", - "AUDIO\\ASS_5.WAV", - "AUDIO\\ASS_6.WAV", - "AUDIO\\ASS_7.WAV", - "AUDIO\\ASS_8.WAV", - "AUDIO\\ASS_9.WAV", - "AUDIO\\ASS_10.WAV", - "AUDIO\\ASS_11.WAV", - "AUDIO\\ASS_12.WAV", - "AUDIO\\ASS_13.WAV", - "AUDIO\\ASS_14.WAV", - "AUDIO\\BIKE1_1.WAV", - "AUDIO\\BIKE1_2.WAV", - "AUDIO\\BIKE1_3.WAV", - "AUDIO\\BNK1_1.WAV", - "AUDIO\\BNK1_2.WAV", - "AUDIO\\BNK1_3.WAV", - "AUDIO\\BNK1_4.WAV", - "AUDIO\\BNK1_5.WAV", - "AUDIO\\BNK1_6.WAV", - "AUDIO\\BNK1_7.WAV", - "AUDIO\\BNK1_8.WAV", - "AUDIO\\BNK1_10.WAV", - "AUDIO\\BNK1_11.WAV", - "AUDIO\\BNK1_12.WAV", - "AUDIO\\BNK1_13.WAV", - "AUDIO\\BNK1_14.WAV", - "AUDIO\\BNK2_1.WAV", - "AUDIO\\BNK2_2.WAV", - "AUDIO\\BNK2_3.WAV", - "AUDIO\\BNK2_4.WAV", - "AUDIO\\BNK2_5.WAV", - "AUDIO\\BNK2_6.WAV", - "AUDIO\\BNK2_7.WAV", - "AUDIO\\BNK2_8.WAV", - "AUDIO\\BNK2_9.WAV", - "AUDIO\\BNK3_1.WAV", - "AUDIO\\BNK3_2.WAV", - "AUDIO\\BNK3_3A.WAV", - "AUDIO\\BNK3_3B.WAV", - "AUDIO\\BNK3_3C.WAV", - "AUDIO\\BNK3_4A.WAV", - "AUDIO\\BNK3_4B.WAV", - "AUDIO\\BNK3_4C.WAV", - "AUDIO\\BNK4_1.WAV", - "AUDIO\\BNK4_2.WAV", - "AUDIO\\BNK4_3A.WAV", - "AUDIO\\BNK4_3B.WAV", - "AUDIO\\BNK4_3C.WAV", - "AUDIO\\BNK4_3D.WAV", - "AUDIO\\BNK4_3E.WAV", - "AUDIO\\BNK4_3F.WAV", - "AUDIO\\BNK4_3G.WAV", - "AUDIO\\BNK4_3H.WAV", - "AUDIO\\BNK4_3I.WAV", - "AUDIO\\BNK4_3J.WAV", - "AUDIO\\BNK4_3K.WAV", - "AUDIO\\BNK4_3M.WAV", - "AUDIO\\BNK4_3O.WAV", - "AUDIO\\BNK4_3P.WAV", - "AUDIO\\BNK4_3Q.WAV", - "AUDIO\\BNK4_3R.WAV", - "AUDIO\\BNK4_3S.WAV", - "AUDIO\\BNK4_3T.WAV", - "AUDIO\\BNK4_3U.WAV", - "AUDIO\\BNK4_3V.WAV", - "AUDIO\\BNK4_4A.WAV", - "AUDIO\\BNK4_4B.WAV", - "AUDIO\\BNK4_5.WAV", - "AUDIO\\BNK4_6.WAV", - "AUDIO\\BNK4_7.WAV", - "AUDIO\\BNK4_8.WAV", - "AUDIO\\BNK4_9.WAV", - "AUDIO\\BNK4_10.WAV", - "AUDIO\\BNK4_11.WAV", - "AUDIO\\BK4_12A.WAV", - "AUDIO\\BK4_12B.WAV", - "AUDIO\\BK4_12C.WAV", - "AUDIO\\BNK4_13.WAV", - "AUDIO\\BK4_14A.WAV", - "AUDIO\\BK4_14B.WAV", - "AUDIO\\BNK4_15.WAV", - "AUDIO\\BNK4_16.WAV", - "AUDIO\\BNK4_17.WAV", - "AUDIO\\BNK4_18.WAV", - "AUDIO\\BK4_19A.WAV", - "AUDIO\\BK4_19B.WAV", - "AUDIO\\BK4_20A.WAV", - "AUDIO\\BK4_20B.WAV", - "AUDIO\\BNK4_21.WAV", - "AUDIO\\BNK422A.WAV", - "AUDIO\\BNK422B.WAV", - "AUDIO\\BK4_23A.WAV", - "AUDIO\\BK4_23B.WAV", - "AUDIO\\BK4_23C.WAV", - "AUDIO\\BK4_23D.WAV", - "AUDIO\\BK4_24A.WAV", - "AUDIO\\BK4_24B.WAV", - "AUDIO\\BNK4_25.WAV", - "AUDIO\\BNK4_26.WAV", - "AUDIO\\BNK4_27.WAV", - "AUDIO\\BNK4_28.WAV", - "AUDIO\\BNK4_29.WAV", - "AUDIO\\BNK4_30.WAV", - "AUDIO\\BK4_31A.WAV", - "AUDIO\\BK4_31B.WAV", - "AUDIO\\BNK4_32.WAV", - "AUDIO\\BK4_34A.WAV", - "AUDIO\\BK4_34B.WAV", - "AUDIO\\BK4_35A.WAV", - "AUDIO\\BK4_35B.WAV", - "AUDIO\\BNK4_36.WAV", - "AUDIO\\BNK4_37.WAV", - "AUDIO\\BNK4_38.WAV", - "AUDIO\\BNK4_39.WAV", - "AUDIO\\BK4_40A.WAV", - "AUDIO\\BK4_40B.WAV", - "AUDIO\\BNK4_41.WAV", - "AUDIO\\BNK4_42.WAV", - "AUDIO\\BNK4_43.WAV", - "AUDIO\\BNK4_44.WAV", - "AUDIO\\BNK4_45.WAV", - "AUDIO\\BNK4_46.WAV", - "AUDIO\\BNK4_47.WAV", - "AUDIO\\BNK4_48.WAV", - "AUDIO\\BNK4_49.WAV", - "AUDIO\\BNK450A.WAV", - "AUDIO\\BNK450B.WAV", - "AUDIO\\BNK4_51.WAV", - "AUDIO\\BNK4_94.WAV", - "AUDIO\\BNK4_95.WAV", - "AUDIO\\BNK4_96.WAV", - "AUDIO\\BNK4_97.WAV", - "AUDIO\\BNK4_98.WAV", - "AUDIO\\BNK4_99.WAV", - "AUDIO\\BUD1_1.WAV", - "AUDIO\\BUD1_2.WAV", - "AUDIO\\BUD1_3.WAV", - "AUDIO\\BUD1_4.WAV", - "AUDIO\\BUD1_5.WAV", - "AUDIO\\BUD1_9.WAV", - "AUDIO\\BUD1_10.WAV", - "AUDIO\\BUD2_1.WAV", - "AUDIO\\BUD2_2.WAV", - "AUDIO\\BUD2_3.WAV", - "AUDIO\\BUD2_4.WAV", - "AUDIO\\BUD2_5.WAV", - "AUDIO\\BUD2_6.WAV", - "AUDIO\\BUD2_7.WAV", - "AUDIO\\BUD3_1.WAV", - "AUDIO\\BUD3_1A.WAV", - "AUDIO\\BUD3_1B.WAV", - "AUDIO\\BUD3_1C.WAV", - "AUDIO\\BUD3_2.WAV", - "AUDIO\\BUD3_3.WAV", - "AUDIO\\BUD3_4.WAV", - "AUDIO\\BUD3_5.WAV", - "AUDIO\\BUD3_6.WAV", - "AUDIO\\BUD3_7.WAV", - "AUDIO\\BUD3_8A.WAV", - "AUDIO\\BUD3_8B.WAV", - "AUDIO\\BUD3_8C.WAV", - "AUDIO\\BUD3_9A.WAV", - "AUDIO\\BUD3_9B.WAV", - "AUDIO\\BUD3_9C.WAV", - "AUDIO\\CAP1_2.WAV", - "AUDIO\\CAP1_3.WAV", - "AUDIO\\CAP1_4.WAV", - "AUDIO\\CAP1_5.WAV", - "AUDIO\\CAP1_6.WAV", - "AUDIO\\CAP1_7.WAV", - "AUDIO\\CAP1_8.WAV", - "AUDIO\\CAP1_9.WAV", - "AUDIO\\CAP1_10.WAV", - "AUDIO\\CAP1_11.WAV", - "AUDIO\\CAP1_12.WAV", - "AUDIO\\CNT1_1.WAV", - "AUDIO\\CNT1_2.WAV", - "AUDIO\\CNT1_3.WAV", - "AUDIO\\CNT1_4.WAV", - "AUDIO\\CNT1_5.WAV", - "AUDIO\\CNT2_1.WAV", - "AUDIO\\CNT2_2.WAV", - "AUDIO\\CNT2_3.WAV", - "AUDIO\\CNT2_4.WAV", - "AUDIO\\COK1_1.WAV", - "AUDIO\\COK1_2.WAV", - "AUDIO\\COK1_3.WAV", - "AUDIO\\COK1_4.WAV", - "AUDIO\\COK1_5.WAV", - "AUDIO\\COK1_6.WAV", - "AUDIO\\COK2_1.WAV", - "AUDIO\\COK2_2.WAV", - "AUDIO\\COK2_3.WAV", - "AUDIO\\COK2_4.WAV", - "AUDIO\\COK2_5.WAV", - "AUDIO\\COK2_6.WAV", - "AUDIO\\COK2_7A.WAV", - "AUDIO\\COK2_7B.WAV", - "AUDIO\\COK2_7C.WAV", - "AUDIO\\COK2_8A.WAV", - "AUDIO\\COK2_8B.WAV", - "AUDIO\\COK2_8C.WAV", - "AUDIO\\COK2_8D.WAV", - "AUDIO\\COK2_9.WAV", - "AUDIO\\COK210A.WAV", - "AUDIO\\COK210B.WAV", - "AUDIO\\COK210C.WAV", - "AUDIO\\COK212A.WAV", - "AUDIO\\COK212B.WAV", - "AUDIO\\COK2_13.WAV", - "AUDIO\\COK2_14.WAV", - "AUDIO\\COK2_15.WAV", - "AUDIO\\COK2_16.WAV", - "AUDIO\\COK2_20.WAV", - "AUDIO\\COK2_21.WAV", - "AUDIO\\COK2_2.WAV", // this is probably a typo of COK2_22 - "AUDIO\\COK3_1.WAV", - "AUDIO\\COK3_2.WAV", - "AUDIO\\COK3_3.WAV", - "AUDIO\\COK3_4.WAV", - "AUDIO\\COK4_1.WAV", - "AUDIO\\COK4_2.WAV", - "AUDIO\\COK4_3.WAV", - "AUDIO\\COK4_4.WAV", - "AUDIO\\COK4_5.WAV", - "AUDIO\\COK4_6.WAV", - "AUDIO\\COK4_7.WAV", - "AUDIO\\COK4_8.WAV", - "AUDIO\\COK4_9.WAV", - "AUDIO\\COK4_9A.WAV", - "AUDIO\\COK4_10.WAV", - "AUDIO\\COK4_11.WAV", - "AUDIO\\COK4_12.WAV", - "AUDIO\\COK4_13.WAV", - "AUDIO\\COK4_14.WAV", - "AUDIO\\COK4_15.WAV", - "AUDIO\\COK4_16.WAV", - "AUDIO\\COK4_17.WAV", - "AUDIO\\COK4_18.WAV", - "AUDIO\\COK4_19.WAV", - "AUDIO\\COK4_20.WAV", - "AUDIO\\COK4_21.WAV", - "AUDIO\\COK4_22.WAV", - "AUDIO\\COK4_23.WAV", - "AUDIO\\COK4_24.WAV", - "AUDIO\\COK4_25.WAV", - "AUDIO\\COK4_26.WAV", - "AUDIO\\COK4_27.WAV", - "AUDIO\\COL1_1.WAV", - "AUDIO\\COL1_2.WAV", - "AUDIO\\COL1_3.WAV", - "AUDIO\\COL1_4.WAV", - "AUDIO\\COL1_5.WAV", - "AUDIO\\COL1_6.WAV", - "AUDIO\\COL1_7.WAV", - "AUDIO\\COL1_8.WAV", - "AUDIO\\COL2_1.WAV", - "AUDIO\\COL2_2.WAV", - "AUDIO\\COL2_3.WAV", - "AUDIO\\COL2_4.WAV", - "AUDIO\\COL2_5.WAV", - "AUDIO\\COL2_6A.WAV", - "AUDIO\\COL2_7.WAV", - "AUDIO\\COL2_8.WAV", - "AUDIO\\COL2_9.WAV", - "AUDIO\\COL2_10.WAV", - "AUDIO\\COL2_11.WAV", - "AUDIO\\COL2_12.WAV", - "AUDIO\\COL2_13.WAV", - "AUDIO\\COL2_14.WAV", - "AUDIO\\COL2_15.WAV", - "AUDIO\\COL2_16.WAV", - "AUDIO\\COL3_1.WAV", - "AUDIO\\COL3_2.WAV", - "AUDIO\\COL3_2A.WAV", - "AUDIO\\COL3_2B.WAV", - "AUDIO\\COL3_3.WAV", - "AUDIO\\COL3_4.WAV", - "AUDIO\\COL3_5.WAV", - "AUDIO\\COL3_6.WAV", - "AUDIO\\COL3_7.WAV", - "AUDIO\\COL3_8.WAV", - "AUDIO\\COL3_9.WAV", - "AUDIO\\COL3_10.WAV", - "AUDIO\\COL3_11.WAV", - "AUDIO\\COL3_12.WAV", - "AUDIO\\COL3_13.WAV", - "AUDIO\\COL3_14.WAV", - "AUDIO\\COL3_15.WAV", - "AUDIO\\COL3_16.WAV", - "AUDIO\\COL3_17.WAV", - "AUDIO\\COL3_18.WAV", - "AUDIO\\COL3_19.WAV", - "AUDIO\\COL3_20.WAV", - "AUDIO\\COL3_21.WAV", - "AUDIO\\COL3_23.WAV", - "AUDIO\\COL3_24.WAV", - "AUDIO\\COL3_25.WAV", - "AUDIO\\COL4_1.WAV", - "AUDIO\\COL4_2.WAV", - "AUDIO\\COL4_3.WAV", - "AUDIO\\COL4_4.WAV", - "AUDIO\\COL4_5.WAV", - "AUDIO\\COL4_6.WAV", - "AUDIO\\COL4_7.WAV", - "AUDIO\\COL4_8.WAV", - "AUDIO\\COL4_9.WAV", - "AUDIO\\COL4_10.WAV", - "AUDIO\\COL4_11.WAV", - "AUDIO\\COL4_12.WAV", - "AUDIO\\COL4_13.WAV", - "AUDIO\\COL4_14.WAV", - "AUDIO\\COL4_15.WAV", - "AUDIO\\COL4_16.WAV", - "AUDIO\\COL4_17.WAV", - "AUDIO\\COL4_18.WAV", - "AUDIO\\COL4_19.WAV", - "AUDIO\\COL4_20.WAV", - "AUDIO\\COL4_21.WAV", - "AUDIO\\COL4_22.WAV", - "AUDIO\\COL4_23.WAV", - "AUDIO\\COL4_24.WAV", - "AUDIO\\COL4_25.WAV", - "AUDIO\\COL4_26.WAV", - "AUDIO\\COL5_1.WAV", - "AUDIO\\COL5_2.WAV", - "AUDIO\\COL5_3.WAV", - "AUDIO\\COL5_4.WAV", - "AUDIO\\COL5_5.WAV", - "AUDIO\\COL5_6.WAV", - "AUDIO\\COL5_7.WAV", - "AUDIO\\COL5_8.WAV", - "AUDIO\\COL5_9.WAV", - "AUDIO\\COL5_10.WAV", - "AUDIO\\COL5_11.WAV", - "AUDIO\\COL5_12.WAV", - "AUDIO\\COL5_13.WAV", - "AUDIO\\COL5_14.WAV", - "AUDIO\\COL5_15.WAV", - "AUDIO\\COL5_16.WAV", - "AUDIO\\COL5_17.WAV", - "AUDIO\\COL5_18.WAV", - "AUDIO\\COL5_19.WAV", - "AUDIO\\COL5_20.WAV", - "AUDIO\\COL5_21.WAV", - "AUDIO\\COL5_22.WAV", - "AUDIO\\CUB1_1.WAV", - "AUDIO\\CUB1_2.WAV", - "AUDIO\\CUB1_3.WAV", - "AUDIO\\CUB1_4.WAV", - "AUDIO\\CUB1_5.WAV", - "AUDIO\\CUB1_6.WAV", - "AUDIO\\CUB1_7.WAV", - "AUDIO\\CUB1_8.WAV", - "AUDIO\\CUB1_9.WAV", - "AUDIO\\CUB1_10.WAV", - "AUDIO\\CUB2_1.WAV", - "AUDIO\\CUB2_2.WAV", - "AUDIO\\CUB2_3A.WAV", - "AUDIO\\CUB2_3B.WAV", - "AUDIO\\CUB2_3C.WAV", - "AUDIO\\CUB2_4A.WAV", - "AUDIO\\CUB2_5.WAV", - "AUDIO\\CUB2_6.WAV", - "AUDIO\\CUB2_7.WAV", - "AUDIO\\CUB2_8.WAV", - "AUDIO\\CUB2_9.WAV", - "AUDIO\\CUB2_10.WAV", - "AUDIO\\CUB2_11.WAV", - "AUDIO\\CUB3_1.WAV", - "AUDIO\\CUB3_2.WAV", - "AUDIO\\CUB3_3.WAV", - "AUDIO\\CUB3_4.WAV", - "AUDIO\\CUB4_1.WAV", - "AUDIO\\CUB4_2.WAV", - "AUDIO\\CUB4_3.WAV", - "AUDIO\\CUB4_4.WAV", - "AUDIO\\CUB4_5.WAV", - "AUDIO\\CUB4_5A.WAV", - "AUDIO\\CUB4_6.WAV", - "AUDIO\\CUB4_7.WAV", - "AUDIO\\CUB4_8.WAV", - "AUDIO\\CUB4_9.WAV", - "AUDIO\\CUB4_10.WAV", - "AUDIO\\CUB4_11.WAV", - "AUDIO\\CUB4_12.WAV", - "AUDIO\\CUB4_13.WAV", - "AUDIO\\CUB4_14.WAV", - "AUDIO\\CUB4_15.WAV", - "AUDIO\\CUB4_16.WAV", - "AUDIO\\GOLF_1.WAV", - "AUDIO\\GOLF_2.WAV", - "AUDIO\\GOLF_3.WAV", - "AUDIO\\BAR_1.WAV", - "AUDIO\\BAR_2.WAV", - "AUDIO\\BAR_3.WAV", - "AUDIO\\BAR_4.WAV", - "AUDIO\\BAR_5.WAV", - "AUDIO\\BAR_6.WAV", - "AUDIO\\BAR_7.WAV", - "AUDIO\\BAR_8.WAV", - "AUDIO\\STRIP_1.WAV", - "AUDIO\\STRIP_2.WAV", - "AUDIO\\STRIP_3.WAV", - "AUDIO\\STRIP_4.WAV", - "AUDIO\\STRIP_5.WAV", - "AUDIO\\STRIP_6.WAV", - "AUDIO\\STRIP_7.WAV", - "AUDIO\\STRIP_8.WAV", - "AUDIO\\STRIP_9.WAV", - "AUDIO\\STAR_1.WAV", - "AUDIO\\STAR_2.WAV", - "AUDIO\\STAR_3.WAV", - "AUDIO\\STAR_4.WAV", - "AUDIO\\FIN_1A.WAV", - "AUDIO\\FIN_1B.WAV", - "AUDIO\\FIN_1C.WAV", - "AUDIO\\FIN_2B.WAV", - "AUDIO\\FIN_2C.WAV", - "AUDIO\\FIN_3.WAV", - "AUDIO\\FIN_4.WAV", - "AUDIO\\FIN_5.WAV", - "AUDIO\\FIN_6.WAV", - "AUDIO\\FIN_10.WAV", - "AUDIO\\FIN_11A.WAV", - "AUDIO\\FIN_11B.WAV", - "AUDIO\\FIN_12A.WAV", - "AUDIO\\FIN_12B.WAV", - "AUDIO\\FIN_12C.WAV", - "AUDIO\\FIN_13.WAV", - "AUDIO\\FINKILL.WAV", - "AUDIO\\LAW1_1.WAV", - "AUDIO\\LAW1_2.WAV", - "AUDIO\\LAW1_3.WAV", - "AUDIO\\LAW1_4.WAV", - "AUDIO\\LAW1_5.WAV", - "AUDIO\\LAW1_6.WAV", - "AUDIO\\LAW1_7.WAV", - "AUDIO\\LAW1_8.WAV", - "AUDIO\\LAW1_9.WAV", - "AUDIO\\LAW1_10.WAV", - "AUDIO\\LAW2_1.WAV", - "AUDIO\\LAW2_2.WAV", - "AUDIO\\LAW2_3.WAV", - "AUDIO\\LAW2_4.WAV", - "AUDIO\\LAW2_5.WAV", - "AUDIO\\LAW2_6.WAV", - "AUDIO\\LAW2_7.WAV", - "AUDIO\\LAW2_8.WAV", - "AUDIO\\LAW2_9.WAV", - "AUDIO\\LAW2_10.WAV", - "AUDIO\\LAW3_1.WAV", - "AUDIO\\LAW3_2.WAV", - "AUDIO\\LAW3_3.WAV", - "AUDIO\\LAW3_4.WAV", - "AUDIO\\LAW3_5.WAV", - "AUDIO\\LAW3_6.WAV", - "AUDIO\\LAW3_10.WAV", - "AUDIO\\LAW3_11.WAV", - "AUDIO\\LAW3_12.WAV", - "AUDIO\\LAW3_13.WAV", - "AUDIO\\LAW3_14.WAV", - "AUDIO\\LAW3_16.WAV", - "AUDIO\\LAW3_17.WAV", - "AUDIO\\LAW3_18.WAV", - "AUDIO\\LAW3_19.WAV", - "AUDIO\\LAW3_20.WAV", - "AUDIO\\LAW3_21.WAV", - "AUDIO\\LAW3_22.WAV", - "AUDIO\\LAW3_23.WAV", - "AUDIO\\LAW3_24.WAV", - "AUDIO\\LAW3_25.WAV", - "AUDIO\\LAW4_1A.WAV", - "AUDIO\\LAW4_1B.WAV", - "AUDIO\\LAW4_1C.WAV", - "AUDIO\\LAW4_1D.WAV", - "AUDIO\\LAW4_10.WAV", - "AUDIO\\LAW4_3.WAV", - "AUDIO\\LAW4_4.WAV", - "AUDIO\\LAW4_5.WAV", - "AUDIO\\LAW4_6.WAV", - "AUDIO\\LAW4_7.WAV", - "AUDIO\\LAW4_8.WAV", - "AUDIO\\LAW4_9.WAV", - "AUDIO\\PHIL1_2.WAV", - "AUDIO\\PHIL1_3.WAV", - "AUDIO\\PHIL2_1.WAV", - "AUDIO\\PHIL2_2.WAV", - "AUDIO\\PHIL2_3.WAV", - "AUDIO\\PHIL2_4.WAV", - "AUDIO\\PHIL2_5.WAV", - "AUDIO\\PHIL2_6.WAV", - "AUDIO\\PHIL2_7.WAV", - "AUDIO\\PHIL2_8.WAV", - "AUDIO\\PHIL2_9.WAV", - "AUDIO\\PHIL210.WAV", - "AUDIO\\PHIL211.WAV", - "AUDIO\\PORN1_1.WAV", - "AUDIO\\PORN1_2.WAV", - "AUDIO\\PORN1_3.WAV", - "AUDIO\\PRN1_3A.WAV", - "AUDIO\\PORN1_4.WAV", - "AUDIO\\PORN1_5.WAV", - "AUDIO\\PORN1_6.WAV", - "AUDIO\\PORN1_7.WAV", - "AUDIO\\PORN1_8.WAV", - "AUDIO\\PORN1_9.WAV", - "AUDIO\\PRN1_10.WAV", - "AUDIO\\PRN1_11.WAV", - "AUDIO\\PRN1_12.WAV", - "AUDIO\\PRN1_13.WAV", - "AUDIO\\PRN1_14.WAV", - "AUDIO\\PRN1_15.WAV", - "AUDIO\\PRN1_16.WAV", - "AUDIO\\PRN1_17.WAV", - "AUDIO\\PRN1_18.WAV", - "AUDIO\\PRN1_19.WAV", - "AUDIO\\PRN1_20.WAV", - "AUDIO\\PRN1_21.WAV", - "AUDIO\\PORN3_1.WAV", - "AUDIO\\PORN3_2.WAV", - "AUDIO\\PORN3_3.WAV", - "AUDIO\\PORN3_4.WAV", - "AUDIO\\PSYCH_1.WAV", - "AUDIO\\PSYCH_2.WAV", - "AUDIO\\ROK2_01.WAV", - "AUDIO\\ROK3_1.WAV", - "AUDIO\\ROK3_2.WAV", - "AUDIO\\ROK3_3.WAV", - "AUDIO\\ROK3_4.WAV", - "AUDIO\\ROK3_5.WAV", - "AUDIO\\ROK3_6.WAV", - "AUDIO\\ROK3_7.WAV", - "AUDIO\\ROK3_8.WAV", - "AUDIO\\ROK3_9.WAV", - "AUDIO\\ROK3_10.WAV", - "AUDIO\\ROK3_11.WAV", - "AUDIO\\ROK3_12.WAV", - "AUDIO\\ROK3_13.WAV", - "AUDIO\\ROK3_14.WAV", - "AUDIO\\ROK3_15.WAV", - "AUDIO\\ROK3_16.WAV", - "AUDIO\\ROK3_17.WAV", - "AUDIO\\ROK3_18.WAV", - "AUDIO\\ROK3_19.WAV", - "AUDIO\\ROK3_20.WAV", - "AUDIO\\ROK3_21.WAV", - "AUDIO\\ROK3_22.WAV", - "AUDIO\\ROK3_23.WAV", - "AUDIO\\ROK3_24.WAV", - "AUDIO\\ROK3_25.WAV", - "AUDIO\\ROK3_26.WAV", - "AUDIO\\ROK3_27.WAV", - "AUDIO\\ROK3_62.WAV", - "AUDIO\\ROK3_63.WAV", - "AUDIO\\ROK3_64.WAV", - "AUDIO\\ROK3_65.WAV", - "AUDIO\\ROK3_66.WAV", - "AUDIO\\ROK3_67.WAV", - "AUDIO\\ROK3_68.WAV", - "AUDIO\\ROK3_69.WAV", - "AUDIO\\ROK3_70.WAV", - "AUDIO\\ROK3_71.WAV", - "AUDIO\\ROK3_73.WAV", - "AUDIO\\RESC_1.WAV", - "AUDIO\\RESC_2.WAV", - "AUDIO\\RESC_3.WAV", - "AUDIO\\RESC_4.WAV", - "AUDIO\\RESC_5.WAV", - "AUDIO\\RESC_6.WAV", - "AUDIO\\RESC_7.WAV", - "AUDIO\\RESC_8.WAV", - "AUDIO\\RESC_9.WAV", - "AUDIO\\RESC_10.WAV", - "AUDIO\\ROK1_1A.WAV", - "AUDIO\\ROK1_1B.WAV", - "AUDIO\\ROK1_5.WAV", - "AUDIO\\ROK1_6.WAV", - "AUDIO\\ROK1_7.WAV", - "AUDIO\\ROK1_8.WAV", - "AUDIO\\ROK1_9.WAV", - "AUDIO\\TAX1_1.WAV", - "AUDIO\\TAX1_2.WAV", - "AUDIO\\TAX1_3.WAV", - "AUDIO\\TAX1_4.WAV", - "AUDIO\\TAX1_5.WAV", - "AUDIO\\TAX2_1.WAV", - "AUDIO\\TAX2_2.WAV", - "AUDIO\\TAX2_3.WAV", - "AUDIO\\TAX2_4.WAV", - "AUDIO\\TAX2_5.WAV", - "AUDIO\\TAX2_6.WAV", - "AUDIO\\TAX2_7.WAV", - "AUDIO\\TAX3_1.WAV", - "AUDIO\\TAX3_2.WAV", - "AUDIO\\TAX3_3.WAV", - "AUDIO\\TAX3_4.WAV", - "AUDIO\\TAX3_5.WAV", - "AUDIO\\TEX1_1.WAV", - "AUDIO\\TEX1_2.WAV", - "AUDIO\\TEX1_3.WAV", - "AUDIO\\TEX1_4.WAV", - "AUDIO\\TEX1_5.WAV", - "AUDIO\\TEX1_6.WAV", - "AUDIO\\TEX2_1.WAV", - "AUDIO\\TEX3_1.WAV", - "AUDIO\\TEX3_2.WAV", - "AUDIO\\TEX3_3.WAV", - "AUDIO\\TEX3_4.WAV", - "AUDIO\\TEX3_5.WAV", - "AUDIO\\TEX3_6.WAV", - "AUDIO\\TEX3_7.WAV", - "AUDIO\\TEX3_8.WAV", - "AUDIO\\HAT_1A.WAV", - "AUDIO\\INTRO1.WAV", - "AUDIO\\INTRO2.WAV", - "AUDIO\\INTRO3.WAV", - "AUDIO\\INTRO4.WAV", - "AUDIO\\MOB_01A.WAV", - "AUDIO\\MOB_01B.WAV", - "AUDIO\\MOB_01C.WAV", - "AUDIO\\MOB_02A.WAV", - "AUDIO\\MOB_02B.WAV", - "AUDIO\\MOB_02C.WAV", - "AUDIO\\MOB_03A.WAV", - "AUDIO\\MOB_03B.WAV", - "AUDIO\\MOB_03C.WAV", - "AUDIO\\MOB_03D.WAV", - "AUDIO\\MOB_03E.WAV", - "AUDIO\\SHARK_1.WAV", - "AUDIO\\SHARK_2.WAV", - "AUDIO\\SHARK_3.WAV", - "AUDIO\\SHARK_4.WAV", - "AUDIO\\SHARK_5.WAV", - "AUDIO\\MOB_04A.WAV", - "AUDIO\\MOB_04B.WAV", - "AUDIO\\MOB_04C.WAV", - "AUDIO\\MOB_04D.WAV", - "AUDIO\\MOB_05A.WAV", - "AUDIO\\MOB_05B.WAV", - "AUDIO\\MOB_05C.WAV", - "AUDIO\\MOB_05D.WAV", - "AUDIO\\MOB_06A.WAV", - "AUDIO\\MOB_06B.WAV", - "AUDIO\\MOB_06C.WAV", - "AUDIO\\MOB_07A.WAV", - "AUDIO\\MOB_07B.WAV", - "AUDIO\\MOB_08A.WAV", - "AUDIO\\MOB_08B.WAV", - "AUDIO\\MOB_08C.WAV", - "AUDIO\\MOB_08D.WAV", - "AUDIO\\MOB_08E.WAV", - "AUDIO\\MOB_08F.WAV", - "AUDIO\\MOB_08G.WAV", - "AUDIO\\MOB_09A.WAV", - "AUDIO\\MOB_09B.WAV", - "AUDIO\\MOB_09C.WAV", - "AUDIO\\MOB_09D.WAV", - "AUDIO\\MOB_09E.WAV", - "AUDIO\\MOB_09F.WAV", - "AUDIO\\MOB_10A.WAV", - "AUDIO\\MOB_10B.WAV", - "AUDIO\\MOB_10C.WAV", - "AUDIO\\MOB_10D.WAV", - "AUDIO\\MOB_10E.WAV", - "AUDIO\\MOB_11A.WAV", - "AUDIO\\MOB_11B.WAV", - "AUDIO\\MOB_11C.WAV", - "AUDIO\\MOB_11D.WAV", - "AUDIO\\MOB_11E.WAV", - "AUDIO\\MOB_11F.WAV", - "AUDIO\\MOB_14A.WAV", - "AUDIO\\MOB_14B.WAV", - "AUDIO\\MOB_14C.WAV", - "AUDIO\\MOB_14D.WAV", - "AUDIO\\MOB_14E.WAV", - "AUDIO\\MOB_14F.WAV", - "AUDIO\\MOB_14G.WAV", - "AUDIO\\MOB_14H.WAV", - "AUDIO\\MOB_16A.WAV", - "AUDIO\\MOB_16B.WAV", - "AUDIO\\MOB_16C.WAV", - "AUDIO\\MOB_16D.WAV", - "AUDIO\\MOB_16E.WAV", - "AUDIO\\MOB_16F.WAV", - "AUDIO\\MOB_16G.WAV", - "AUDIO\\MOB_17A.WAV", - "AUDIO\\MOB_17B.WAV", - "AUDIO\\MOB_17C.WAV", - "AUDIO\\MOB_17D.WAV", - "AUDIO\\MOB_17E.WAV", - "AUDIO\\MOB_17G.WAV", - "AUDIO\\MOB_17H.WAV", - "AUDIO\\MOB_17I.WAV", - "AUDIO\\MOB_17J.WAV", - "AUDIO\\MOB_17K.WAV", - "AUDIO\\MOB_17L.WAV", - "AUDIO\\MOB_18A.WAV", - "AUDIO\\MOB_18B.WAV", - "AUDIO\\MOB_18C.WAV", - "AUDIO\\MOB_18D.WAV", - "AUDIO\\MOB_18E.WAV", - "AUDIO\\MOB_18F.WAV", - "AUDIO\\MOB_18G.WAV", - "AUDIO\\MOB_20A.WAV", - "AUDIO\\MOB_20B.WAV", - "AUDIO\\MOB_20C.WAV", - "AUDIO\\MOB_20D.WAV", - "AUDIO\\MOB_20E.WAV", - "AUDIO\\MOB_24A.WAV", - "AUDIO\\MOB_24B.WAV", - "AUDIO\\MOB_24C.WAV", - "AUDIO\\MOB_24D.WAV", - "AUDIO\\MOB_24E.WAV", - "AUDIO\\MOB_24F.WAV", - "AUDIO\\MOB_24G.WAV", - "AUDIO\\MOB_24H.WAV", - "AUDIO\\MOB_25A.WAV", - "AUDIO\\MOB_25B.WAV", - "AUDIO\\MOB_25C.WAV", - "AUDIO\\MOB_25D.WAV", - "AUDIO\\MOB_26A.WAV", - "AUDIO\\MOB_26B.WAV", - "AUDIO\\MOB_26C.WAV", - "AUDIO\\MOB_26D.WAV", - "AUDIO\\MOB_26E.WAV", - "AUDIO\\MOB_29A.WAV", - "AUDIO\\MOB_29B.WAV", - "AUDIO\\MOB_29C.WAV", - "AUDIO\\MOB_29D.WAV", - "AUDIO\\MOB_29E.WAV", - "AUDIO\\MOB_29F.WAV", - "AUDIO\\MOB_29G.WAV", - "AUDIO\\MOB_30A.WAV", - "AUDIO\\MOB_30B.WAV", - "AUDIO\\MOB_30C.WAV", - "AUDIO\\MOB_30D.WAV", - "AUDIO\\MOB_30E.WAV", - "AUDIO\\MOB_30F.WAV", - "AUDIO\\MOB_33A.WAV", - "AUDIO\\MOB_33B.WAV", - "AUDIO\\MOB_33C.WAV", - "AUDIO\\MOB_33D.WAV", - "AUDIO\\MOB_34A.WAV", - "AUDIO\\MOB_34B.WAV", - "AUDIO\\MOB_34C.WAV", - "AUDIO\\MOB_34D.WAV", - "AUDIO\\MOB_35A.WAV", - "AUDIO\\MOB_35B.WAV", - "AUDIO\\MOB_35C.WAV", - "AUDIO\\MOB_35D.WAV", - "AUDIO\\MOB_36A.WAV", - "AUDIO\\MOB_36B.WAV", - "AUDIO\\MOB_36C.WAV", - "AUDIO\\MOB_40A.WAV", - "AUDIO\\MOB_40B.WAV", - "AUDIO\\MOB_40C.WAV", - "AUDIO\\MOB_40D.WAV", - "AUDIO\\MOB_40E.WAV", - "AUDIO\\MOB_40F.WAV", - "AUDIO\\MOB_40G.WAV", - "AUDIO\\MOB_40H.WAV", - "AUDIO\\MOB_40I.WAV", - "AUDIO\\MOB_41A.WAV", - "AUDIO\\MOB_41B.WAV", - "AUDIO\\MOB_41C.WAV", - "AUDIO\\MOB_41D.WAV", - "AUDIO\\MOB_41E.WAV", - "AUDIO\\MOB_41F.WAV", - "AUDIO\\MOB_41G.WAV", - "AUDIO\\MOB_41H.WAV", - "AUDIO\\MOB_42A.WAV", - "AUDIO\\MOB_42B.WAV", - "AUDIO\\MOB_42C.WAV", - "AUDIO\\MOB_42D.WAV", - "AUDIO\\MOB_42E.WAV", - "AUDIO\\MOB_43A.WAV", - "AUDIO\\MOB_43B.WAV", - "AUDIO\\MOB_43C.WAV", - "AUDIO\\MOB_43D.WAV", - "AUDIO\\MOB_43E.WAV", - "AUDIO\\MOB_43F.WAV", - "AUDIO\\MOB_43G.WAV", - "AUDIO\\MOB_43H.WAV", - "AUDIO\\MOB_45A.WAV", - "AUDIO\\MOB_45B.WAV", - "AUDIO\\MOB_45C.WAV", - "AUDIO\\MOB_45D.WAV", - "AUDIO\\MOB_45E.WAV", - "AUDIO\\MOB_45F.WAV", - "AUDIO\\MOB_45G.WAV", - "AUDIO\\MOB_45H.WAV", - "AUDIO\\MOB_45I.WAV", - "AUDIO\\MOB_45J.WAV", - "AUDIO\\MOB_45K.WAV", - "AUDIO\\MOB_45L.WAV", - "AUDIO\\MOB_45M.WAV", - "AUDIO\\MOB_45N.WAV", - "AUDIO\\MOB_46A.WAV", - "AUDIO\\MOB_46B.WAV", - "AUDIO\\MOB_46C.WAV", - "AUDIO\\MOB_46D.WAV", - "AUDIO\\MOB_46E.WAV", - "AUDIO\\MOB_46F.WAV", - "AUDIO\\MOB_46G.WAV", - "AUDIO\\MOB_46H.WAV", - "AUDIO\\MOB_47A.WAV", - "AUDIO\\MOB_52A.WAV", - "AUDIO\\MOB_52B.WAV", - "AUDIO\\MOB_52C.WAV", - "AUDIO\\MOB_52D.WAV", - "AUDIO\\MOB_52E.WAV", - "AUDIO\\MOB_52F.WAV", - "AUDIO\\MOB_52G.WAV", - "AUDIO\\MOB_52H.WAV", - "AUDIO\\MOB_54A.WAV", - "AUDIO\\MOB_54B.WAV", - "AUDIO\\MOB_54C.WAV", - "AUDIO\\MOB_54D.WAV", - "AUDIO\\MOB_54E.WAV", - "AUDIO\\MOB_55A.WAV", - "AUDIO\\MOB_55B.WAV", - "AUDIO\\MOB_55C.WAV", - "AUDIO\\MOB_55D.WAV", - "AUDIO\\MOB_55E.WAV", - "AUDIO\\MOB_55F.WAV", - "AUDIO\\MOB_56A.WAV", - "AUDIO\\MOB_56B.WAV", - "AUDIO\\MOB_56C.WAV", - "AUDIO\\MOB_56D.WAV", - "AUDIO\\MOB_56E.WAV", - "AUDIO\\MOB_56F.WAV", - "AUDIO\\MOB_57A.WAV", - "AUDIO\\MOB_57B.WAV", - "AUDIO\\MOB_57C.WAV", - "AUDIO\\MOB_57D.WAV", - "AUDIO\\MOB_57E.WAV", - "AUDIO\\MOB_58A.WAV", - "AUDIO\\MOB_58B.WAV", - "AUDIO\\MOB_58C.WAV", - "AUDIO\\MOB_58D.WAV", - "AUDIO\\MOB_58E.WAV", - "AUDIO\\MOB_58F.WAV", - "AUDIO\\MOB_58G.WAV", - "AUDIO\\MOB_61A.WAV", - "AUDIO\\MOB_61B.WAV", - "AUDIO\\MOB_62A.WAV", - "AUDIO\\MOB_62B.WAV", - "AUDIO\\MOB_62C.WAV", - "AUDIO\\MOB_62D.WAV", - "AUDIO\\MOB_63A.WAV", - "AUDIO\\MOB_63B.WAV", - "AUDIO\\MOB_63C.WAV", - "AUDIO\\MOB_63D.WAV", - "AUDIO\\MOB_63E.WAV", - "AUDIO\\MOB_63F.WAV", - "AUDIO\\MOB_63G.WAV", - "AUDIO\\MOB_63H.WAV", - "AUDIO\\MOB_63I.WAV", - "AUDIO\\MOB_63J.WAV", - "AUDIO\\MOB_66A.WAV", - "AUDIO\\MOB_66B.WAV", - "AUDIO\\MOB_68A.WAV", - "AUDIO\\MOB_68B.WAV", - "AUDIO\\MOB_68C.WAV", - "AUDIO\\MOB_68D.WAV", - "AUDIO\\MOB_70A.WAV", - "AUDIO\\MOB_70B.WAV", - "AUDIO\\MOB_71A.WAV", - "AUDIO\\MOB_71B.WAV", - "AUDIO\\MOB_71C.WAV", - "AUDIO\\MOB_71D.WAV", - "AUDIO\\MOB_71E.WAV", - "AUDIO\\MOB_71F.WAV", - "AUDIO\\MOB_71G.WAV", - "AUDIO\\MOB_71H.WAV", - "AUDIO\\MOB_71I.WAV", - "AUDIO\\MOB_71J.WAV", - "AUDIO\\MOB_71K.WAV", - "AUDIO\\MOB_71L.WAV", - "AUDIO\\MOB_71M.WAV", - "AUDIO\\MOB_71N.WAV", - "AUDIO\\MOB_72A.WAV", - "AUDIO\\MOB_72B.WAV", - "AUDIO\\MOB_72C.WAV", - "AUDIO\\MOB_72D.WAV", - "AUDIO\\MOB_72E.WAV", - "AUDIO\\MOB_72F.WAV", - "AUDIO\\MOB_72G.WAV", - "AUDIO\\MOB_73A.WAV", - "AUDIO\\MOB_73C.WAV", - "AUDIO\\MOB_73D.WAV", - "AUDIO\\MOB_73F.WAV", - "AUDIO\\MOB_73G.WAV", - "AUDIO\\MOB_73I.WAV", - "AUDIO\\MOB_95A.WAV", - "AUDIO\\MOB_96A.WAV", - "AUDIO\\MOB_98A.WAV", - "AUDIO\\MOB_99A.WAV", - "AUDIO\\JOB1_1B.WAV", - "AUDIO\\JOB1_1C.WAV", - "AUDIO\\JOB1_1D.WAV", - "AUDIO\\JOB2_1B.WAV", - "AUDIO\\JOB2_2.WAV", - "AUDIO\\JOB2_3.WAV", - "AUDIO\\JOB2_4.WAV", - "AUDIO\\JOB2_5.WAV", - "AUDIO\\JOB2_6.WAV", - "AUDIO\\JOB2_7.WAV", - "AUDIO\\JOB2_8.WAV", - "AUDIO\\JOB2_9.WAV", - "AUDIO\\JOB3_1.WAV", - "AUDIO\\JOB3_2.WAV", - "AUDIO\\JOB3_3.WAV", - "AUDIO\\JOB4_1.WAV", - "AUDIO\\JOB4_2.WAV", - "AUDIO\\JOB4_3.WAV", - "AUDIO\\JOB5_1.WAV", - "AUDIO\\JOB5_2.WAV", - "AUDIO\\JOB5_3.WAV", - "AUDIO\\BJM1_20.WAV", - "AUDIO\\BJM1_4.WAV", - "AUDIO\\BJM1_5.WAV", - "AUDIO\\MERC_39.WAV", - "AUDIO\\MONO_1.WAV", - "AUDIO\\MONO_2.WAV", - "AUDIO\\MONO_3.WAV", - "AUDIO\\MONO_4.WAV", - "AUDIO\\MONO_5.WAV", - "AUDIO\\MONO_6.WAV", - "AUDIO\\MONO_7.WAV", - "AUDIO\\MONO_8.WAV", - "AUDIO\\MONO_9.WAV", - "AUDIO\\MONO10.WAV", - "AUDIO\\MONO11.WAV", - "AUDIO\\MONO12.WAV", - "AUDIO\\MONO13.WAV", - "AUDIO\\MONO14.WAV", - "AUDIO\\MONO15.WAV", - "AUDIO\\MONO16.WAV", - "AUDIO\\FUD_01.WAV", - "AUDIO\\FUD_02.WAV", - "AUDIO\\FUD_03.WAV", - "AUDIO\\FUD_04.WAV", - "AUDIO\\FUD_05.WAV", - "AUDIO\\FUD_06.WAV", - "AUDIO\\FUD_07.WAV", - "AUDIO\\FUD_08.WAV", - "AUDIO\\FUD_09.WAV", - "AUDIO\\FUD_10.WAV", - "AUDIO\\FUD_11.WAV", - "AUDIO\\FUD_12.WAV", - "AUDIO\\FUD_13.WAV", - "AUDIO\\FUD_14.WAV", - "AUDIO\\FUD_15.WAV", - "AUDIO\\FUD_16.WAV", - "AUDIO\\FUD_17.WAV", - "AUDIO\\FUD_18.WAV", - "AUDIO\\FUD_19.WAV", - "AUDIO\\FUD_20.WAV", - "AUDIO\\BURG_01.WAV", - "AUDIO\\BURG_02.WAV", - "AUDIO\\BURG_03.WAV", - "AUDIO\\BURG_04.WAV", - "AUDIO\\BURG_05.WAV", - "AUDIO\\BURG_06.WAV", - "AUDIO\\BURG_07.WAV", - "AUDIO\\BURG_08.WAV", - "AUDIO\\BURG_09.WAV", - "AUDIO\\BURG_10.WAV", - "AUDIO\\BURG_11.WAV", - "AUDIO\\BURG_12.WAV", - "AUDIO\\CRUST01.WAV", - "AUDIO\\CRUST02.WAV", - "AUDIO\\CRUST03.WAV", - "AUDIO\\CRUST04.WAV", - "AUDIO\\CRUST05.WAV", - "AUDIO\\CRUST06.WAV", - "AUDIO\\CRUST07.WAV", - "AUDIO\\CRUST08.WAV", - "AUDIO\\CRUST09.WAV", - "AUDIO\\BAND_01.WAV", - "AUDIO\\BAND_02.WAV", - "AUDIO\\BAND_03.WAV", - "AUDIO\\BAND_04.WAV", - "AUDIO\\BAND_05.WAV", - "AUDIO\\BAND_06.WAV", - "AUDIO\\BAND_07.WAV", - "AUDIO\\BAND_08.WAV", - "AUDIO\\SHAFT01.WAV", - "AUDIO\\SHAFT02.WAV", - "AUDIO\\SHAFT03.WAV", - "AUDIO\\SHAFT04.WAV", - "AUDIO\\SHAFT05.WAV", - "AUDIO\\SHAFT06.WAV", - "AUDIO\\SHAFT07.WAV", - "AUDIO\\SHAFT08.WAV", - "AUDIO\\PISS_01.WAV", - "AUDIO\\PISS_02.WAV", - "AUDIO\\PISS_03.WAV", - "AUDIO\\PISS_04.WAV", - "AUDIO\\PISS_05.WAV", - "AUDIO\\PISS_06.WAV", - "AUDIO\\PISS_07.WAV", - "AUDIO\\PISS_08.WAV", - "AUDIO\\PISS_09.WAV", - "AUDIO\\PISS_10.WAV", - "AUDIO\\PISS_11.WAV", - "AUDIO\\PISS_12.WAV", - "AUDIO\\PISS_13.WAV", - "AUDIO\\PISS_14.WAV", - "AUDIO\\PISS_15.WAV", - "AUDIO\\PISS_16.WAV", - "AUDIO\\PISS_17.WAV", - "AUDIO\\PISS_18.WAV", - "AUDIO\\PISS_19.WAV", - "AUDIO\\GIMME01.WAV", - "AUDIO\\GIMME02.WAV", - "AUDIO\\GIMME03.WAV", - "AUDIO\\GIMME04.WAV", - "AUDIO\\GIMME05.WAV", - "AUDIO\\GIMME06.WAV", - "AUDIO\\GIMME07.WAV", - "AUDIO\\GIMME08.WAV", - "AUDIO\\GIMME09.WAV", - "AUDIO\\GIMME10.WAV", - "AUDIO\\GIMME11.WAV", - "AUDIO\\GIMME12.WAV", - "AUDIO\\GIMME13.WAV", - "AUDIO\\GIMME14.WAV", - "AUDIO\\GIMME15.WAV", - "AUDIO\\BUST_01.WAV", - "AUDIO\\BUST_02.WAV", - "AUDIO\\BUST_03.WAV", - "AUDIO\\BUST_04.WAV", - "AUDIO\\BUST_05.WAV", - "AUDIO\\BUST_06.WAV", - "AUDIO\\BUST_07.WAV", - "AUDIO\\BUST_08.WAV", - "AUDIO\\BUST_09.WAV", - "AUDIO\\BUST_10.WAV", - "AUDIO\\BUST_11.WAV", - "AUDIO\\BUST_12.WAV", - "AUDIO\\BUST_13.WAV", - "AUDIO\\BUST_14.WAV", - "AUDIO\\BUST_15.WAV", - "AUDIO\\BUST_16.WAV", - "AUDIO\\BUST_17.WAV", - "AUDIO\\BUST_18.WAV", - "AUDIO\\BUST_19.WAV", - "AUDIO\\BUST_20.WAV", - "AUDIO\\BUST_21.WAV", - "AUDIO\\BUST_22.WAV", - "AUDIO\\BUST_23.WAV", - "AUDIO\\BUST_24.WAV", - "AUDIO\\BUST_25.WAV", - "AUDIO\\BUST_26.WAV", - "AUDIO\\BUST_27.WAV", - "AUDIO\\BUST_28.WAV", +static char StreamedNameTable[][40] = { + "AUDIO\\MUSIC\\HEAD", + "AUDIO\\MUSIC\\DOUBLE", + "AUDIO\\MUSIC\\KJAH", + "AUDIO\\MUSIC\\RISE", + "AUDIO\\MUSIC\\LIPS", + "AUDIO\\MUSIC\\MUNDO", + "AUDIO\\MUSIC\\MSX", + "AUDIO\\MUSIC\\FLASH", + "AUDIO\\MUSIC\\LCJ", + "AUDIO\\MUSIC\\LCFR", + "AUDIO\\MUSIC\\MISCOM2", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\WATER", + "AUDIO\\MUSIC\\SAWMILL", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\WATER", + "AUDIO\\MUSIC\\WATER", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\CITY", + "AUDIO\\MUSIC\\POLICE", + "AUDIO\\MUSIC\\TAXI", + "AUDIO\\NEWS\\NEWS_A", + "AUDIO\\NEWS\\NEWS_B", + "AUDIO\\NEWS\\NEWS_C", + "AUDIO\\NEWS\\NEWS_D", + "AUDIO\\NEWS\\NEWS_E", + "AUDIO\\NEWS\\NEWS_F", + "AUDIO\\NEWS\\NEWS_G", + "AUDIO\\NEWS\\NEWS_H", + "AUDIO\\NEWS\\NEWS_I", + "AUDIO\\NEWS\\NEWS_J", + "AUDIO\\NEWS\\NEWS_K", + "AUDIO\\NEWS\\NEWS_L", + "AUDIO\\NEWS\\NEWS_M", + "AUDIO\\NEWS\\NEWS_N", + "AUDIO\\CUTSCENE\\BIKER", + "AUDIO\\CUTSCENE\\BONEVOY", + "AUDIO\\CUTSCENE\\CAMPAIN", + "AUDIO\\CUTSCENE\\CASHCHP", + "AUDIO\\CUTSCENE\\CONTBAN", + "AUDIO\\CUTSCENE\\CRAZY69", + "AUDIO\\CUTSCENE\\CRAZY69", + "AUDIO\\CUTSCENE\\DEADLY", + "AUDIO\\CUTSCENE\\DONPROB", + "AUDIO\\CUTSCENE\\DRIVNMR", + "AUDIO\\CUTSCENE\\ELECTON", + "AUDIO\\CUTSCENE\\FINAL", + "AUDIO\\CUTSCENE\\FINAL_2", + "AUDIO\\CUTSCENE\\HOMSWET", + "AUDIO\\CUTSCENE\\HOTWHEL", + "AUDIO\\CUTSCENE\\KIDNAPP", + "AUDIO\\CUTSCENE\\LANDGRB", + "AUDIO\\CUTSCENE\\MORGUE", + "AUDIO\\CUTSCENE\\OVERDOS", + "AUDIO\\CUTSCENE\\RUFJUST", + "AUDIO\\CUTSCENE\\SAYONAR", + "AUDIO\\CUTSCENE\\SICILAN", + "AUDIO\\CUTSCENE\\THEOFER", + "AUDIO\\CUTSCENE\\INTRO", + "AUDIO\\MUSIC\\FINALE", + "AUDIO\\MUSIC\\MISCOM2" };
\ No newline at end of file diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index f94768cb..06aac379 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -324,6 +324,80 @@ cSampleManager::~cSampleManager(void) } +int gBankStartOffset[67]; + +void +SetUpDebugBanksInfo() +{ + gBankStartOffset[3] = SFX_FE_BACK; + gBankStartOffset[4] = SFX_CAR_ACCEL_1; + gBankStartOffset[5] = SFX_CAR_ACCEL_2; + gBankStartOffset[9] = SFX_CAR_ACCEL_6; + gBankStartOffset[10] = SFX_CAR_ACCEL_7; + gBankStartOffset[1] = SFX_EMPTY; + gBankStartOffset[11] = SFX_CAR_ACCEL_8; + gBankStartOffset[7] = SFX_CAR_ACCEL_4; + gBankStartOffset[15] = SFX_CAR_ACCEL_12; + gBankStartOffset[13] = SFX_CAR_ACCEL_10; + gBankStartOffset[16] = SFX_CAR_CHAINSAW_IDLE; + gBankStartOffset[0] = SFX_AIR_BRAKES; + gBankStartOffset[17] = SFX_RC_IDLE; + gBankStartOffset[6] = SFX_CAR_ACCEL_3; + gBankStartOffset[19] = SFX_CAR_ACCEL_16; + gBankStartOffset[12] = SFX_CAR_ACCEL_9; + gBankStartOffset[2] = SFX_AMBULAN_VOICE_1_VAN_1; + gBankStartOffset[21] = SFX_CAR_ACCEL_18; + gBankStartOffset[22] = SFX_CAR_ACCEL_19; + gBankStartOffset[8] = SFX_CAR_ACCEL_5; + gBankStartOffset[23] = SFX_CAR_ACCEL_20; + gBankStartOffset[14] = SFX_CAR_ACCEL_11; + gBankStartOffset[20] = SFX_CAR_ACCEL_17; + gBankStartOffset[18] = SFX_CAR_RC_HELI; + gBankStartOffset[25] = SFX_CAR_AFTER_ACCEL_21; + gBankStartOffset[26] = SFX_CAR_FINGER_OFF_ACCEL_21; + gBankStartOffset[27] = SFX_CAR_ACCEL_22; + gBankStartOffset[28] = SFX_CAR_AFTER_ACCEL_22; + gBankStartOffset[29] = SFX_CAR_FINGER_OFF_ACCEL_22; + gBankStartOffset[24] = SFX_CAR_ACCEL_21; + gBankStartOffset[30] = SFX_HELI_APACHE_1; + gBankStartOffset[31] = SFX_HELI_UNUSED_1; + gBankStartOffset[32] = SFX_HELI_UNUSED_2; + gBankStartOffset[33] = SFX_HELI_UNUSED_3; + gBankStartOffset[34] = SFX_HELI_UNUSED_4; + gBankStartOffset[35] = SFX_SEAPLANE_LOW; + gBankStartOffset[37] = SFX_PLANE_UNUSED_2; + gBankStartOffset[38] = SFX_PLANE_UNUSED_3; + gBankStartOffset[39] = SFX_PLANE_UNUSED_4; + gBankStartOffset[40] = SFX_BUILDINGS_BANK_ALARM; + gBankStartOffset[41] = SFX_BUILDING_SNORE; + gBankStartOffset[36] = SFX_PLANE_UNUSED_1; + gBankStartOffset[43] = SFX_BUILDING_BAR_2; + gBankStartOffset[44] = SFX_BUILDING_BAR_3; + gBankStartOffset[45] = SFX_BUILDING_BAR_4; + gBankStartOffset[46] = SFX_BUILDING_MAL1; + gBankStartOffset[47] = SFX_BUILDING_MAL2; + gBankStartOffset[42] = SFX_BUILDING_BAR_1; + gBankStartOffset[49] = SFX_BUILDING_STR1; + gBankStartOffset[50] = SFX_BUILDING_STR2; + gBankStartOffset[51] = SFX_BUILDING_STR3; + gBankStartOffset[52] = SFX_BUILDING_CHURCH; + gBankStartOffset[53] = SFX_BUILDING_FAN_1; + gBankStartOffset[48] = SFX_BUILDING_MAL3; + gBankStartOffset[55] = SFX_BUILDING_INSECTS_1; + gBankStartOffset[56] = SFX_BUILDING_INSECTS_2; + gBankStartOffset[54] = SFX_BUILDING_FAN_2; + gBankStartOffset[57] = SFX_CLUB_1; + gBankStartOffset[58] = SFX_CLUB_2; + gBankStartOffset[59] = SFX_CLUB_3; + gBankStartOffset[60] = SFX_CLUB_4; + gBankStartOffset[61] = SFX_FOOTSTEP_GRASS_1; + gBankStartOffset[62] = SFX_FOOTSTEP_GRAVEL_1; + gBankStartOffset[63] = SFX_FOOTSTEP_WOOD_1; + gBankStartOffset[64] = SFX_FOOTSTEP_METAL_1; + gBankStartOffset[65] = SFX_FOOTSTEP_WATER_1; + gBankStartOffset[66] = SFX_FOOTSTEP_SAND_1; +} + void cSampleManager::SetSpeakerConfig(int32 which) { @@ -1027,9 +1101,18 @@ cSampleManager::Initialise(void) { strcpy(filepath, m_szCDRomRootPath); strcat(filepath, StreamedNameTable[0]); + strcat(filepath, ".VB"); FILE *f = fopen(filepath, "rb"); + if ( !f ) + { + strcpy(filepath, m_szCDRomRootPath); + strcat(filepath, StreamedNameTable[0]); + strcat(filepath, ".MP3"); + f = fopen(filepath, "rb"); + } + if ( f ) { fclose(f); @@ -1055,26 +1138,16 @@ cSampleManager::Initialise(void) m_szCDRomRootPath[0] = '\0'; strcpy(m_WavFilesPath, m_szCDRomRootPath); - + /* #ifdef AUDIO_CACHE if ( CreateCache ) #endif for ( int32 i = STREAMED_SOUND_MISSION_MOBR1; i < TOTAL_STREAMED_SOUNDS; i++ ) { -#ifdef PS2_AUDIO_PATHS strcpy(filepath, m_szCDRomRootPath); - strcat(filepath, PS2StreamedNameTable[i]); - + strcat(filepath, StreamedNameTable[i]); + mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); - - if ( !mp3Stream[0] ) -#endif - { - strcpy(filepath, m_szCDRomRootPath); - strcat(filepath, StreamedNameTable[i]); - - mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); - } if ( mp3Stream[0] ) { @@ -1092,7 +1165,7 @@ cSampleManager::Initialise(void) return FALSE; } } - + */ // Find path of MP3s (originally in CD-Rom) // if NO_CDCHECK is NOT defined but AUDIO_CACHE is defined, we still need to find MP3s' path, but will exit after the first file #ifndef NO_CDCHECK @@ -1110,20 +1183,18 @@ cSampleManager::Initialise(void) { #endif - for (int32 i = 0; i < STREAMED_SOUND_MISSION_MOBR1; i++) + for (int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++) { -#ifdef PS2_AUDIO_PATHS strcpy(filepath, m_MP3FilesPath); - strcat(filepath, PS2StreamedNameTable[i]); + strcat(filepath, StreamedNameTable[i]); + strcat(filepath, ".VB"); mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); - - if ( !mp3Stream[0] ) -#endif + if (!mp3Stream[0]) { strcpy(filepath, m_MP3FilesPath); strcat(filepath, StreamedNameTable[i]); - + strcat(filepath, ".MP3"); mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); } @@ -1161,26 +1232,16 @@ cSampleManager::Initialise(void) #endif if ( !bFileNotFound ) { - +/* #ifdef AUDIO_CACHE if ( CreateCache ) #endif for ( int32 i = STREAMED_SOUND_MISSION_COMPLETED4; i < STREAMED_SOUND_MISSION_PAGER; i++ ) { -#ifdef PS2_AUDIO_PATHS strcpy(filepath, m_MiscomPath); - strcat(filepath, PS2StreamedNameTable[i]); - - mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); - - if ( !mp3Stream[0] ) -#endif - { - strcpy(filepath, m_MiscomPath); - strcat(filepath, StreamedNameTable[i]); + strcat(filepath, StreamedNameTable[i]); - mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); - } + mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); if ( mp3Stream[0] ) { @@ -1197,7 +1258,7 @@ cSampleManager::Initialise(void) bFileNotFound = TRUE; break; } - } + }*/ } m_bInitialised = !bFileNotFound; @@ -1726,6 +1787,8 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -1755,6 +1818,8 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -1855,6 +1920,8 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { nChannelVolume[nChannel] = vol; @@ -1882,6 +1949,8 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { #ifndef FIX_BUGS if ( opened_samples[nChannel - MAXCHANNELS] ) // BUG @@ -1903,6 +1972,8 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -1929,6 +2000,8 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -1955,6 +2028,8 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -1981,6 +2056,8 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -2012,6 +2089,8 @@ cSampleManager::StartChannel(uint32 nChannel) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -2038,6 +2117,8 @@ cSampleManager::StopChannel(uint32 nChannel) switch ( nChannel ) { case CHANNEL_POLICE_RADIO: + case CHANNEL_MISSION_AUDIO_1: + case CHANNEL_MISSION_AUDIO_2: { b2d = TRUE; break; @@ -2073,18 +2154,18 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) } char filepath[MAX_PATH]; -#ifdef PS2_AUDIO_PATHS - strcpy(filepath, nFile < STREAMED_SOUND_MISSION_COMPLETED4 ? m_MP3FilesPath : (nFile < STREAMED_SOUND_MISSION_MOBR1 ? m_MiscomPath : m_WavFilesPath)); - strcat(filepath, PS2StreamedNameTable[nFile]); - + + strcpy(filepath, m_MP3FilesPath); + strcat(filepath, StreamedNameTable[nFile]); + strcat(filepath, ".VB"); + mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0); - if ( !mp3Stream[nStream] ) -#endif + if(!mp3Stream[nStream]) { - strcpy(filepath, nFile < STREAMED_SOUND_MISSION_COMPLETED4 ? m_MP3FilesPath : (nFile < STREAMED_SOUND_MISSION_MOBR1 ? m_MiscomPath : m_WavFilesPath)); + strcpy(filepath, m_MP3FilesPath); strcat(filepath, StreamedNameTable[nFile]); - + strcat(filepath, ".MP3"); mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0); } @@ -2148,19 +2229,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) // Try to continue from previous song, if already started if(!_GetMP3PosFromStreamPos(&position, &e) && !e) { nFile = 0; -#ifdef PS2_AUDIO_PATHS strcpy(filename, m_MiscomPath); - strcat(filename, PS2StreamedNameTable[nFile]); - - mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); + strcat(filename, StreamedNameTable[nFile]); + strcat(filename, ".VB"); + mp3Stream[nStream] = + AIL_open_stream(DIG, filename, 0); - if ( !mp3Stream[nStream] ) -#endif + if(!mp3Stream[nStream]) { - strcpy(filename, m_MiscomPath); + strcpy(filename, m_MP3FilesPath); strcat(filename, StreamedNameTable[nFile]); - mp3Stream[nStream] = - AIL_open_stream(DIG, filename, 0); + strcat(filename, ".MP3"); + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); } if(mp3Stream[nStream]) { AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); @@ -2205,19 +2285,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { nFile = 0; _bIsMp3Active = 0; -#ifdef PS2_AUDIO_PATHS strcpy(filename, m_MiscomPath); - strcat(filename, PS2StreamedNameTable[nFile]); - - mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); + strcat(filename, StreamedNameTable[nFile]); + strcat(filename, ".VB"); - if ( !mp3Stream[nStream] ) -#endif + mp3Stream[nStream] = + AIL_open_stream(DIG, filename, 0); + if(!mp3Stream[nStream]) { strcpy(filename, m_MiscomPath); strcat(filename, StreamedNameTable[nFile]); - mp3Stream[nStream] = - AIL_open_stream(DIG, filename, 0); + strcat(filename, ".MP3"); + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); } if(mp3Stream[nStream]) { AIL_set_stream_loop_count( @@ -2259,20 +2338,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) position = 0; nFile = 0; } -#ifdef PS2_AUDIO_PATHS strcpy(filename, m_MiscomPath); - strcat(filename, PS2StreamedNameTable[nFile]); - + strcat(filename, StreamedNameTable[nFile]); + strcat(filename, ".VB"); + mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); - - if ( !mp3Stream[nStream] ) -#endif + if( !mp3Stream[nStream] ) { strcpy(filename, m_MiscomPath); strcat(filename, StreamedNameTable[nFile]); + strcat(filename, ".MP3"); mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0); } - if ( mp3Stream[nStream] ) { AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1); @@ -2396,6 +2473,8 @@ cSampleManager::IsStreamPlaying(uint8 nStream) bool8 cSampleManager::InitialiseSampleBanks(void) { + SetUpDebugBanksInfo(); + int32 nBank = SFX_BANK_0; fpSampleDescHandle = fopen(SampleBankDescFilename, "rb"); @@ -2419,7 +2498,7 @@ cSampleManager::InitialiseSampleBanks(void) fclose(fpSampleDescHandle); fpSampleDescHandle = NULL; - + for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ ) { #ifdef FIX_BUGS diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 3441c202..473e7ead 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -301,7 +301,7 @@ set_new_provider(int index) static bool8 IsThisTrackAt16KHz(uint32 track) { - return track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE; + return false;// track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE; } cSampleManager::cSampleManager(void) @@ -314,6 +314,80 @@ cSampleManager::~cSampleManager(void) } +int gBankStartOffset[67]; + +void +SetUpDebugBanksInfo() +{ + gBankStartOffset[3] = SFX_FE_BACK; + gBankStartOffset[4] = SFX_CAR_ACCEL_1; + gBankStartOffset[5] = SFX_CAR_ACCEL_2; + gBankStartOffset[9] = SFX_CAR_ACCEL_6; + gBankStartOffset[10] = SFX_CAR_ACCEL_7; + gBankStartOffset[1] = SFX_EMPTY; + gBankStartOffset[11] = SFX_CAR_ACCEL_8; + gBankStartOffset[7] = SFX_CAR_ACCEL_4; + gBankStartOffset[15] = SFX_CAR_ACCEL_12; + gBankStartOffset[13] = SFX_CAR_ACCEL_10; + gBankStartOffset[16] = SFX_CAR_CHAINSAW_IDLE; + gBankStartOffset[0] = SFX_AIR_BRAKES; + gBankStartOffset[17] = SFX_RC_IDLE; + gBankStartOffset[6] = SFX_CAR_ACCEL_3; + gBankStartOffset[19] = SFX_CAR_ACCEL_16; + gBankStartOffset[12] = SFX_CAR_ACCEL_9; + gBankStartOffset[2] = SFX_AMBULAN_VOICE_1_VAN_1; + gBankStartOffset[21] = SFX_CAR_ACCEL_18; + gBankStartOffset[22] = SFX_CAR_ACCEL_19; + gBankStartOffset[8] = SFX_CAR_ACCEL_5; + gBankStartOffset[23] = SFX_CAR_ACCEL_20; + gBankStartOffset[14] = SFX_CAR_ACCEL_11; + gBankStartOffset[20] = SFX_CAR_ACCEL_17; + gBankStartOffset[18] = SFX_CAR_RC_HELI; + gBankStartOffset[25] = SFX_CAR_AFTER_ACCEL_21; + gBankStartOffset[26] = SFX_CAR_FINGER_OFF_ACCEL_21; + gBankStartOffset[27] = SFX_CAR_ACCEL_22; + gBankStartOffset[28] = SFX_CAR_AFTER_ACCEL_22; + gBankStartOffset[29] = SFX_CAR_FINGER_OFF_ACCEL_22; + gBankStartOffset[24] = SFX_CAR_ACCEL_21; + gBankStartOffset[30] = SFX_HELI_APACHE_1; + gBankStartOffset[31] = SFX_HELI_UNUSED_1; + gBankStartOffset[32] = SFX_HELI_UNUSED_2; + gBankStartOffset[33] = SFX_HELI_UNUSED_3; + gBankStartOffset[34] = SFX_HELI_UNUSED_4; + gBankStartOffset[35] = SFX_SEAPLANE_LOW; + gBankStartOffset[37] = SFX_PLANE_UNUSED_2; + gBankStartOffset[38] = SFX_PLANE_UNUSED_3; + gBankStartOffset[39] = SFX_PLANE_UNUSED_4; + gBankStartOffset[40] = SFX_BUILDINGS_BANK_ALARM; + gBankStartOffset[41] = SFX_BUILDING_SNORE; + gBankStartOffset[36] = SFX_PLANE_UNUSED_1; + gBankStartOffset[43] = SFX_BUILDING_BAR_2; + gBankStartOffset[44] = SFX_BUILDING_BAR_3; + gBankStartOffset[45] = SFX_BUILDING_BAR_4; + gBankStartOffset[46] = SFX_BUILDING_MAL1; + gBankStartOffset[47] = SFX_BUILDING_MAL2; + gBankStartOffset[42] = SFX_BUILDING_BAR_1; + gBankStartOffset[49] = SFX_BUILDING_STR1; + gBankStartOffset[50] = SFX_BUILDING_STR2; + gBankStartOffset[51] = SFX_BUILDING_STR3; + gBankStartOffset[52] = SFX_BUILDING_CHURCH; + gBankStartOffset[53] = SFX_BUILDING_FAN_1; + gBankStartOffset[48] = SFX_BUILDING_MAL3; + gBankStartOffset[55] = SFX_BUILDING_INSECTS_1; + gBankStartOffset[56] = SFX_BUILDING_INSECTS_2; + gBankStartOffset[54] = SFX_BUILDING_FAN_2; + gBankStartOffset[57] = SFX_CLUB_1; + gBankStartOffset[58] = SFX_CLUB_2; + gBankStartOffset[59] = SFX_CLUB_3; + gBankStartOffset[60] = SFX_CLUB_4; + gBankStartOffset[61] = SFX_FOOTSTEP_GRASS_1; + gBankStartOffset[62] = SFX_FOOTSTEP_GRAVEL_1; + gBankStartOffset[63] = SFX_FOOTSTEP_WOOD_1; + gBankStartOffset[64] = SFX_FOOTSTEP_METAL_1; + gBankStartOffset[65] = SFX_FOOTSTEP_WATER_1; + gBankStartOffset[66] = SFX_FOOTSTEP_SAND_1; +} + void cSampleManager::SetSpeakerConfig(int32 nConfig) { @@ -759,7 +833,7 @@ cSampleManager::Initialise(void) { if ( _bSampmanInitialised ) return TRUE; - + SetUpDebugBanksInfo(); EFXInit(); for(int i = 0; i < MAX_STREAMS; i++) @@ -920,11 +994,21 @@ cSampleManager::Initialise(void) for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ ) { - if ( aStream[0] && ( -#ifdef PS2_AUDIO_PATHS - aStream[0]->Open(PS2StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) || -#endif - aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000)) ) + bool opened = false; + char filename[MAX_PATH]; + sprintf(filename, "%s.VB", StreamedNameTable[i]); + if ( aStream[0] ) + opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000); + + if ( !opened ) + { + sprintf(filename, "%s.MP3", StreamedNameTable[i]); + if ( aStream[0] ) + { + opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000); + } + } + if ( opened ) { uint32 tatalms = aStream[0]->GetLengthMS(); aStream[0]->Close(); @@ -1550,7 +1634,7 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < NUM_CHANNELS ); - if ( nChannel == CHANNEL_POLICE_RADIO ) + if( nChannel >= CHANNEL_POLICE_RADIO ) { uint32 vol = nVolume; if ( vol > MAX_VOLUME ) vol = MAX_VOLUME; @@ -1575,7 +1659,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < NUM_CHANNELS ); - if ( nChannel == CHANNEL_POLICE_RADIO ) + if ( nChannel >= CHANNEL_POLICE_RADIO ) { aChannel[nChannel].SetPan(nPan); } @@ -1631,7 +1715,9 @@ cSampleManager::StopChannel(uint32 nChannel) void cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) -{ +{ + char filename[MAX_PATH]; + ASSERT( nStream < MAX_STREAMS ); if ( nFile < TOTAL_STREAMED_SOUNDS ) @@ -1639,11 +1725,15 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) CStream *stream = aStream[nStream]; stream->Close(); -#ifdef PS2_AUDIO_PATHS - if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000)) -#endif - stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - if ( !stream->Setup() ) + sprintf(filename, "%s.VB", StreamedNameTable[nFile]); + bool opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + if ( !opened ) + { + sprintf(filename, "%s.MP3", StreamedNameTable[nFile]); + opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + } + + if ( opened && !stream->Setup() ) { stream->Close(); } @@ -1703,12 +1793,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) if(!_GetMP3PosFromStreamPos(&position, &e) && !e) { nFile = 0; + sprintf(filename, "%s.VB", StreamedNameTable[nFile]); + CStream *stream = aStream[nStream]; -#ifdef PS2_AUDIO_PATHS - if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000)) -#endif - stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - if ( stream->Setup() ) { + bool opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + + if ( !opened ) + { + sprintf(filename, "%s.MP3", StreamedNameTable[nFile]); + opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + } + + if ( opened && stream->Setup() ) { stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); nStreamLoopedFlag[nStream] = TRUE; if (position != 0) @@ -1759,14 +1855,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { nFile = 0; _bIsMp3Active = 0; + sprintf(filename, "%s.VB", StreamedNameTable[nFile]); - CStream *stream = aStream[nStream]; -#ifdef PS2_AUDIO_PATHS - if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000)) -#endif - stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + CStream* stream = aStream[nStream]; + bool opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); - if (stream->Setup()) { + if ( !opened ) + { + sprintf(filename, "%s.MP3", StreamedNameTable[nFile]); + opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + } + + if (opened && stream->Setup()) { stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); nStreamLoopedFlag[nStream] = TRUE; if (position != 0) @@ -1807,16 +1907,19 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) position = 0; nFile = 0; } - strcpy(filename, StreamedNameTable[nFile]); - + sprintf(filename, "%s.VB", StreamedNameTable[nFile]); + CStream *stream = aStream[nStream]; + + bool opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); -#ifdef PS2_AUDIO_PATHS - if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000)) -#endif - stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + if ( !opened ) + { + sprintf(filename, "%s.MP3", StreamedNameTable[nFile]); + opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000); + } - if ( stream->Setup() ) { + if ( opened && stream->Setup() ) { stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1); nStreamLoopedFlag[nStream] = TRUE; if (position != 0) diff --git a/src/collision/ColBox.h b/src/collision/ColBox.h index 0df55925..721756b4 100644 --- a/src/collision/ColBox.h +++ b/src/collision/ColBox.h @@ -19,4 +19,12 @@ struct CColBox : public CBox using CBox::Set; CColBox& operator=(const CColBox &other); -};
\ No newline at end of file +}; + +// no name for this +// bounds for a number of triangles +struct CColTriBBox : public CBox +{ + int32 first; + int32 last; +}; diff --git a/src/collision/ColLine.h b/src/collision/ColLine.h index 21587a06..a2cb9a0b 100644 --- a/src/collision/ColLine.h +++ b/src/collision/ColLine.h @@ -4,9 +4,9 @@ struct CColLine { // NB: this has to be compatible with two CVuVectors CVector p0; - int pad0; +// int pad0; CVector p1; - int pad1; +// int pad1; CColLine(void) { }; CColLine(const CVector &p0, const CVector &p1) { this->p0 = p0; this->p1 = p1; }; diff --git a/src/collision/ColModel.cpp b/src/collision/ColModel.cpp index 2224a804..944f76d8 100644 --- a/src/collision/ColModel.cpp +++ b/src/collision/ColModel.cpp @@ -1,4 +1,5 @@ #include "common.h" +#include "main.h" #include "ColModel.h" #include "Collision.h" #include "Game.h" @@ -7,6 +8,10 @@ CColModel::CColModel(void) { + boundingSphere.Set(0.0001f, CVector(0.0f, 0.0f, 0.0f)); + boundingBox.Set(CVector(0.0f, 0.0f, 0.0f), CVector(0.0f, 0.0f, 0.0f)); + numTriBBoxes = 0; + triBBoxes = nil; numSpheres = 0; spheres = nil; numLines = 0; @@ -18,14 +23,18 @@ CColModel::CColModel(void) triangles = nil; trianglePlanes = nil; level = LEVEL_GENERIC; // generic col slot - ownsCollisionVolumes = true; +// ownsCollisionVolumes = true; } CColModel::~CColModel(void) { - RemoveCollisionVolumes(); + if(!gNASTY_NASTY_MEM_SHUTDOWN_HACK){ + RemoveTrianglePlanes(); + RemoveCollisionVolumes(); + } } +//--LCS: no pool used, but maybe we better keep it? void* CColModel::operator new(size_t) throw() { @@ -43,19 +52,28 @@ CColModel::operator delete(void *p, size_t) throw() void CColModel::RemoveCollisionVolumes(void) { - if(ownsCollisionVolumes){ - RwFree(spheres); - RwFree(lines); - RwFree(boxes); - RwFree(vertices); - RwFree(triangles); - CCollision::RemoveTrianglePlanes(this); +#ifdef FIX_BUGS + // why is this missing? + if(ownsCollisionVolumes) +#endif + if(!gUseChunkFiles){ + delete[] triBBoxes; + delete[] spheres; + delete[] lines; + delete[] boxes; + delete[] vertices; + delete[] triangles; } + CCollision::RemoveTrianglePlanes(this); numSpheres = 0; + numTriBBoxes = 0; numLines = 0; numBoxes = 0; numTriangles = 0; spheres = nil; +#ifdef FIX_BUGS + triBBoxes = nil; +#endif lines = nil; boxes = nil; vertices = nil; @@ -68,7 +86,7 @@ CColModel::CalculateTrianglePlanes(void) PUSH_MEMID(MEMID_COLLISION); // HACK: allocate space for one more element to stuff the link pointer into - trianglePlanes = (CColTrianglePlane*)RwMalloc(sizeof(CColTrianglePlane) * (numTriangles+1)); + trianglePlanes = new CColTrianglePlane[numTriangles+1]; REGISTER_MEMPTR(&trianglePlanes); for(int i = 0; i < numTriangles; i++) trianglePlanes[i].Set(vertices, triangles[i]); @@ -79,8 +97,10 @@ CColModel::CalculateTrianglePlanes(void) void CColModel::RemoveTrianglePlanes(void) { - RwFree(trianglePlanes); - trianglePlanes = nil; + if(trianglePlanes){ + delete[] trianglePlanes; + trianglePlanes = nil; + } } void @@ -112,20 +132,33 @@ CColModel::operator=(const CColModel &other) boundingSphere = other.boundingSphere; boundingBox = other.boundingBox; + // copy tri bboxes + if(other.numTriBBoxes){ + if(numTriBBoxes != other.numTriBBoxes){ + numTriBBoxes = other.numTriBBoxes; + delete[] triBBoxes; + triBBoxes = new CColTriBBox[numTriBBoxes]; + } + for(i = 0; i < numTriBBoxes; i++) + triBBoxes[i] = other.triBBoxes[i]; + }else{ + numTriBBoxes = 0; + delete[] triBBoxes; + triBBoxes = nil; + } + // copy spheres if(other.numSpheres){ if(numSpheres != other.numSpheres){ numSpheres = other.numSpheres; - if(spheres) - RwFree(spheres); - spheres = (CColSphere*)RwMalloc(numSpheres*sizeof(CColSphere)); + delete[] spheres; + spheres = new CColSphere[numSpheres]; } for(i = 0; i < numSpheres; i++) spheres[i] = other.spheres[i]; }else{ numSpheres = 0; - if(spheres) - RwFree(spheres); + delete[] spheres; spheres = nil; } @@ -133,16 +166,14 @@ CColModel::operator=(const CColModel &other) if(other.numLines){ if(numLines != other.numLines){ numLines = other.numLines; - if(lines) - RwFree(lines); - lines = (CColLine*)RwMalloc(numLines*sizeof(CColLine)); + delete[] lines; + lines = new CColLine[numLines]; } for(i = 0; i < numLines; i++) lines[i] = other.lines[i]; }else{ numLines = 0; - if(lines) - RwFree(lines); + delete[] lines; lines = nil; } @@ -150,23 +181,21 @@ CColModel::operator=(const CColModel &other) if(other.numBoxes){ if(numBoxes != other.numBoxes){ numBoxes = other.numBoxes; - if(boxes) - RwFree(boxes); - boxes = (CColBox*)RwMalloc(numBoxes*sizeof(CColBox)); + delete[] boxes; + boxes = new CColBox[numBoxes]; } for(i = 0; i < numBoxes; i++) boxes[i] = other.boxes[i]; }else{ numBoxes = 0; - if(boxes) - RwFree(boxes); + delete[] boxes; boxes = nil; } // copy mesh if(other.numTriangles){ // copy vertices - numVerts = 0; + numVerts = -1; for(i = 0; i < other.numTriangles; i++){ if(other.triangles[i].a > numVerts) numVerts = other.triangles[i].a; @@ -176,10 +205,9 @@ CColModel::operator=(const CColModel &other) numVerts = other.triangles[i].c; } numVerts++; - if(vertices) - RwFree(vertices); + delete[] vertices; if(numVerts){ - vertices = (CompressedVector*)RwMalloc(numVerts*sizeof(CompressedVector)); + vertices = new CompressedVector[numVerts]; for(i = 0; i < numVerts; i++) vertices[i] = other.vertices[i]; } @@ -187,20 +215,54 @@ CColModel::operator=(const CColModel &other) // copy triangles if(numTriangles != other.numTriangles){ numTriangles = other.numTriangles; - if(triangles) - RwFree(triangles); - triangles = (CColTriangle*)RwMalloc(numTriangles*sizeof(CColTriangle)); + delete[] triangles; + triangles = new CColTriangle[numTriangles]; } for(i = 0; i < numTriangles; i++) triangles[i] = other.triangles[i]; }else{ numTriangles = 0; - if(triangles) - RwFree(triangles); + delete[] triangles; triangles = nil; - if(vertices) - RwFree(vertices); + delete[] vertices; vertices = nil; } return *this; } + +bool +CColModel::Write(base::cRelocatableChunkWriter &writer, bool allocSpace) +{ + int numVerts = -1; + for(int i = 0; i < numTriangles; i++){ + if(triangles[i].a > numVerts) + numVerts = triangles[i].a; + if(triangles[i].b > numVerts) + numVerts = triangles[i].b; + if(triangles[i].c > numVerts) + numVerts = triangles[i].c; + } + numVerts++; + + if(allocSpace) + writer.AllocateRaw(this, sizeof(*this), 16, false, true); + writer.AllocateRaw(spheres, sizeof(*spheres)*numSpheres, 16, false, true); + writer.AddPatch(&spheres); + writer.AllocateRaw(lines, sizeof(*lines)*numLines, 16, false, true); + writer.AddPatch(&lines); + writer.AllocateRaw(boxes, sizeof(*boxes)*numBoxes, 16, false, true); + writer.AddPatch(&boxes); + if(triBBoxes && numTriBBoxes != 0){ + writer.AllocateRaw(triBBoxes, sizeof(*triBBoxes)*numTriBBoxes, 16, false, true); + writer.AddPatch(&triBBoxes); + }else + triBBoxes = nil; + if(numTriangles != 0){ + writer.AllocateRaw(vertices, sizeof(*vertices)*numVerts, 2, false, true); + writer.AddPatch(&vertices); + writer.AllocateRaw(triangles, sizeof(*triangles)*numTriangles, 2, false, true); + writer.AddPatch(&triangles); + RemoveTrianglePlanes(); + } + return 1; +} diff --git a/src/collision/ColModel.h b/src/collision/ColModel.h index 64f05f76..ce6dcd6d 100644 --- a/src/collision/ColModel.h +++ b/src/collision/ColModel.h @@ -15,11 +15,13 @@ struct CColModel int16 numBoxes; int16 numTriangles; int8 numLines; + int8 numTriBBoxes; uint8 level; // colstore slot but probably still named level bool ownsCollisionVolumes; CColSphere *spheres; CColLine *lines; CColBox *boxes; + CColTriBBox *triBBoxes; CompressedVector *vertices; CColTriangle *triangles; CColTrianglePlane *trianglePlanes; @@ -36,4 +38,6 @@ struct CColModel void *operator new(size_t) throw(); void operator delete(void *p, size_t) throw(); CColModel& operator=(const CColModel& other); + + bool Write(base::cRelocatableChunkWriter &writer, bool allocSpace); };
\ No newline at end of file diff --git a/src/collision/ColPoint.h b/src/collision/ColPoint.h index a15b2345..36801efc 100644 --- a/src/collision/ColPoint.h +++ b/src/collision/ColPoint.h @@ -3,15 +3,13 @@ struct CColPoint { CVector point; - int pad1; + float depth; // the surface normal on the surface of point CVector normal; - int pad2; uint8 surfaceA; uint8 pieceA; uint8 surfaceB; uint8 pieceB; - float depth; const CVector &GetNormal() { return normal; } float GetDepth() { return depth; } diff --git a/src/collision/ColSphere.h b/src/collision/ColSphere.h index f86b282a..3f18d8c0 100644 --- a/src/collision/ColSphere.h +++ b/src/collision/ColSphere.h @@ -2,10 +2,11 @@ #include "SurfaceTable.h" -struct CSphere +// TODO(LCS): maybe this was in a union with CVuVector? or is the alignment manual? +struct TYPEALIGN(16) CSphere { // NB: this has to be compatible with a CVuVector - CVector center; + RwV3d center; float radius; void Set(float radius, const CVector ¢er) { this->center = center; this->radius = radius; } }; diff --git a/src/collision/ColStore.cpp b/src/collision/ColStore.cpp index c74bf5ba..c50e6cbd 100644 --- a/src/collision/ColStore.cpp +++ b/src/collision/ColStore.cpp @@ -1,5 +1,7 @@ #include "common.h" +#include "main.h" +#include "smallHeap.h" #include "templates.h" #include "General.h" #include "ModelInfo.h" @@ -8,6 +10,9 @@ #include "Script.h" #include "Timer.h" #include "Camera.h" +#include "World.h" +#include "Zones.h" +#include "Garages.h" #include "Frontend.h" #include "Physical.h" #include "ColStore.h" @@ -15,16 +20,55 @@ #include "Pools.h" CPool<ColDef,ColDef> *CColStore::ms_pColPool; +bool CColStore::m_onlyBB; #ifndef MASTER bool bDispColInMem; #endif +// LCS: file done except unused: +// CColStore::LoadCol(int,char const*) +// CColStore::LoadAllBoundingBoxes(void) +// CColStore::Write(base::cRelocatableChunkWriter &) + +const CVector& +LevelPos(eLevelName level) +{ + static CVector pos[4] = { + CVector(1060.0f, -800.0f, 0.0f), + CVector(1060.0f, -800.0f, 0.0f), + CVector(350.0f, -624.0f, 0.0f), + CVector(-670.0f, -511.0f, 0.0f) + }; + return pos[level]; +}; + +static eLevelName +PosLevel(const CVector &pos) +{ + static eLevelName lastPlayerLevel = LEVEL_INDUSTRIAL; + static eLevelName lastOtherLevel = LEVEL_INDUSTRIAL; + + if(Abs(FindPlayerCoors().x - pos.x) < 5.0f && + Abs(FindPlayerCoors().y - pos.y) < 5.0f && + Abs(FindPlayerCoors().z - pos.z) < 5.0f){ + if(CGame::currLevel != LEVEL_GENERIC) + lastPlayerLevel = CGame::currLevel; + return lastPlayerLevel; + }else{ + eLevelName lvl = CTheZones::GetLevelFromPosition(&pos); + if(lvl != LEVEL_GENERIC) + lastOtherLevel = lvl; + return lastOtherLevel; + } +} + void CColStore::Initialise(void) { - if(ms_pColPool == nil) + if(ms_pColPool == nil){ ms_pColPool = new CPool<ColDef,ColDef>(COLSTORESIZE, "CollisionFiles"); - AddColSlot("generic"); // slot 0. not streamed + AddColSlot("generic"); // slot 0. not streamed + } #ifndef MASTER VarConsole.Add("Display collision in memory", &bDispColInMem, true); #endif @@ -38,7 +82,9 @@ CColStore::Shutdown(void) RemoveColSlot(i); if(ms_pColPool) delete ms_pColPool; +#ifdef FIX_BUGS ms_pColPool = nil; +#endif } int @@ -119,11 +165,34 @@ CColStore::LoadCol(int32 slot, uint8 *buffer, int32 bufsize) return success; } +struct ColChunkEntry +{ + int32 modelId; // -1 marks end + CColModel *colModel; +}; + +void +CColStore::LoadColCHK(int32 slot, void *data, void *chunk) +{ + ColDef *def = GetSlot(slot); + def->chunk = chunk; + CStreaming::RegisterPointer(&def->chunk, 1, true); + for(ColChunkEntry *entry = (ColChunkEntry*)data; entry->modelId != -1; entry++){ + CBaseModelInfo *mi = CModelInfo::GetModelInfo(entry->modelId); + mi->SetColModel(entry->colModel, true); // we own this? can that work? + CStreaming::RegisterPointer(&mi->m_colModel, 1, true); + } + def->isLoaded = true; +} + +CColModel nullCollision; + void CColStore::RemoveCol(int32 slot) { int id; - GetSlot(slot)->isLoaded = false; + ColDef *def = GetSlot(slot); + def->isLoaded = false; for(id = 0; id < MODELINFOSIZE; id++){ CBaseModelInfo *mi = CModelInfo::GetModelInfo(id); if(mi){ @@ -132,6 +201,23 @@ CColStore::RemoveCol(int32 slot) col->RemoveCollisionVolumes(); } } + if(gUseChunkFiles){ + for(id = 0; id < MODELINFOSIZE; id++){ + CBaseModelInfo *mi = CModelInfo::GetModelInfo(id); + if(mi){ + CColModel *col = mi->GetColModel(); + if(col && col->level == slot){ + mi->SetColModel(&nullCollision); + CStreaming::UnregisterPointer(&mi->m_colModel, 1); + } + } + } + if(def->chunk){ + CStreaming::UnregisterPointer(&def->chunk, 1); + cSmallHeap::msInstance.Free(def->chunk); + def->chunk = nil; + } + } } void @@ -156,29 +242,49 @@ CColStore::RemoveAllCollision(void) } static bool bLoadAtSecondPosition; -static CVector2D secondPosition; +static CVector secondPosition; void -CColStore::AddCollisionNeededAtPosn(const CVector2D &pos) +CColStore::AddCollisionNeededAtPosn(const CVector &pos) { bLoadAtSecondPosition = true; secondPosition = pos; } void -CColStore::LoadCollision(const CVector2D &pos) +CColStore::LoadCollision(const CVector &pos, eLevelName level) { int i; if(CStreaming::ms_disableStreaming) return; + if(level == LEVEL_GENERIC) + level = PosLevel(pos); + + eLevelName allowedLevel = (eLevelName)CTheScripts::AllowedCollision[0]; + if(allowedLevel == LEVEL_GENERIC) + allowedLevel = (eLevelName)CTheScripts::AllowedCollision[1]; + + bool requestedSomething = false; + for(i = 1; i < COLSTORESIZE; i++){ - if(GetSlot(i) == nil) + if(GetSlot(i) == nil || !DoScriptsWantThisIn(i)) continue; bool wantThisOne = false; + if(strcmp(GetColName(i), "indust") == 0){ + if(allowedLevel != LEVEL_GENERIC && level != LEVEL_INDUSTRIAL) + wantThisOne = allowedLevel == LEVEL_INDUSTRIAL; + else + wantThisOne = level == LEVEL_INDUSTRIAL; + }else if(GetBoundingBox(i).IsPointInside(LevelPos(level))) + wantThisOne = true; + else if(allowedLevel != LEVEL_GENERIC && GetBoundingBox(i).IsPointInside(LevelPos(allowedLevel))) + wantThisOne = true; + +/* // LCS: removed if(GetBoundingBox(i).IsPointInside(pos) || bLoadAtSecondPosition && GetBoundingBox(i).IsPointInside(secondPosition, -119.0f) || strcmp(GetColName(i), "yacht") == 0){ @@ -203,28 +309,38 @@ CColStore::LoadCollision(const CVector2D &pos) } } } +*/ - if(wantThisOne) + if(wantThisOne){ CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY); - else + requestedSomething = true; + }else CStreaming::RemoveCol(i); } + if(requestedSomething){ + CTimer::Suspend(); + // BUG? request was done with priority but now loading non-priority? + CStreaming::LoadAllRequestedModels(false); + CGarages::SetupAnyGaragesForThisIsland(); + CTimer::Resume(); + } bLoadAtSecondPosition = false; } void -CColStore::RequestCollision(const CVector2D &pos) +CColStore::RequestCollision(const CVector &pos) { int i; for(i = 1; i < COLSTORESIZE; i++) - if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -115.0f)) + if(GetSlot(i) && DoScriptsWantThisIn(i) && GetBoundingBox(i).IsPointInside(LevelPos(PosLevel(pos)), -115.0f)) CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY); } void -CColStore::EnsureCollisionIsInMemory(const CVector2D &pos) +CColStore::EnsureCollisionIsInMemory(const CVector &pos) { +/* // LCS: removed int i; if(CStreaming::ms_disableStreaming) @@ -240,16 +356,48 @@ CColStore::EnsureCollisionIsInMemory(const CVector2D &pos) CStreaming::LoadAllRequestedModels(false); CTimer::Resume(); } +*/ } bool -CColStore::HasCollisionLoaded(const CVector2D &pos) +CColStore::DoScriptsWantThisIn(int32 slot) +{ + if(slot == 0) + return false; + ColDef *coldef = GetSlot(slot); + if(coldef == nil) + return false; + if(strcmp(coldef->name, "fortstaunton") == 0) + return !CTheScripts::IsFortStauntonDestroyed(); + if(strcmp(coldef->name, "fortdestroyed") == 0) + return CTheScripts::IsFortStauntonDestroyed(); + return true; +} + +bool +CColStore::HasCollisionLoaded(eLevelName level) { int i; + const CVector &pos = LevelPos(level); for(i = 1; i < COLSTORESIZE; i++) - if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -115.0f) && + if(GetSlot(i) && DoScriptsWantThisIn(i) && + (!CGeneral::faststricmp(GetColName(i), "indust") && level == LEVEL_INDUSTRIAL || + GetBoundingBox(i).IsPointInside(pos)) && !GetSlot(i)->isLoaded) return false; return true; } + +bool +CColStore::HasCollisionLoaded(const CVector &pos) +{ + return HasCollisionLoaded(PosLevel(pos)); +} + +void +CColStore::Load(bool onlyBB, CPool<ColDef> *pool) +{ + ms_pColPool = pool; + m_onlyBB = onlyBB; +} diff --git a/src/collision/ColStore.h b/src/collision/ColStore.h index 8e2a3a70..d09bbf8f 100644 --- a/src/collision/ColStore.h +++ b/src/collision/ColStore.h @@ -9,11 +9,13 @@ struct ColDef { // made up name char name[20]; int16 minIndex; int16 maxIndex; + void *chunk; }; class CColStore { static CPool<ColDef,ColDef> *ms_pColPool; + static bool m_onlyBB; public: static void Initialise(void); @@ -25,14 +27,18 @@ public: static CRect &GetBoundingBox(int32 slot); static void IncludeModelIndex(int32 slot, int32 modelIndex); static bool LoadCol(int32 storeID, uint8 *buffer, int32 bufsize); + static void LoadColCHK(int32 slot, void *data, void *chunk); static void RemoveCol(int32 slot); - static void AddCollisionNeededAtPosn(const CVector2D &pos); + static void AddCollisionNeededAtPosn(const CVector &pos); static void LoadAllCollision(void); static void RemoveAllCollision(void); - static void LoadCollision(const CVector2D &pos); - static void RequestCollision(const CVector2D &pos); - static void EnsureCollisionIsInMemory(const CVector2D &pos); - static bool HasCollisionLoaded(const CVector2D &pos); + static void LoadCollision(const CVector &pos, eLevelName level = LEVEL_GENERIC); + static void RequestCollision(const CVector &pos); + static void EnsureCollisionIsInMemory(const CVector &pos); + static bool DoScriptsWantThisIn(int32 slot); + static bool HasCollisionLoaded(eLevelName level); + static bool HasCollisionLoaded(const CVector &pos); + static void Load(bool, CPool<ColDef> *pool); static ColDef *GetSlot(int slot) { assert(slot >= 0); diff --git a/src/collision/ColTriangle.h b/src/collision/ColTriangle.h index a2580c58..5ce543b5 100644 --- a/src/collision/ColTriangle.h +++ b/src/collision/ColTriangle.h @@ -62,6 +62,7 @@ struct CColTrianglePlane } #endif #else + // TODO(LCS): LCS actually uses CompressedVector too CVector normal; float dist; uint8 dir; diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp index 0ffcd09a..bb2c2e71 100644 --- a/src/collision/Collision.cpp +++ b/src/collision/Collision.cpp @@ -24,6 +24,10 @@ #include "Camera.h" #include "ColStore.h" +// gotta figure out how they handled CSphere exactly +// so using this to remind me to look into it again. +#define CVECTORHACK(rwv3d) CVector(rwv3d) + #ifdef VU_COLLISION #include "VuCollision.h" @@ -398,7 +402,7 @@ CCollision::TestLineSphere(const CColLine &line, const CColSphere &sph) // The length of the tangent would be this: Sqrt((c-p0)^2 - r^2). // Negative if p0 is inside the sphere! This breaks the test! float tansq = 4.0f * linesq * - (sph.center.MagnitudeSqr() - 2.0f*DotProduct(sph.center, line.p0) + line.p0.MagnitudeSqr() - sph.radius*sph.radius); + (CVECTORHACK(sph.center).MagnitudeSqr() - 2.0f*DotProduct(sph.center, line.p0) + line.p0.MagnitudeSqr() - sph.radius*sph.radius); float diffsq = projline*projline - tansq; // if diffsq < 0 that means the line is a passant, so no intersection if(diffsq < 0.0f) @@ -477,9 +481,9 @@ CCollision::TestSphereTriangle(const CColSphere &sphere, case 2: // closest to an edge // looks like original game as DistToLine manually inlined - if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center); - else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center); - else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center); + if(!insideAB) dist = DistToLine(&va, &vb, &CVECTORHACK(sphere.center)); + else if(!insideAC) dist = DistToLine(&va, &vc, &CVECTORHACK(sphere.center)); + else if(!insideBC) dist = DistToLine(&vb, &vc, &CVECTORHACK(sphere.center)); else assert(0); break; case 3: @@ -1295,9 +1299,9 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere, case 2: // closest to an edge // looks like original game as DistToLine manually inlined - if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center, p); - else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center, p); - else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center, p); + if(!insideAB) dist = DistToLine(&va, &vb, &CVECTORHACK(sphere.center), p); + else if(!insideAC) dist = DistToLine(&va, &vc, &CVECTORHACK(sphere.center), p); + else if(!insideBC) dist = DistToLine(&vb, &vc, &CVECTORHACK(sphere.center), p); else assert(0); break; case 3: diff --git a/src/collision/TempColModels.cpp b/src/collision/TempColModels.cpp index 0c0d4376..148b86fe 100644 --- a/src/collision/TempColModels.cpp +++ b/src/collision/TempColModels.cpp @@ -1,22 +1,25 @@ #include "common.h" +#include "main.h" #include "TempColModels.h" #include "Game.h" -CColModel CTempColModels::ms_colModelPed1; +// LCS: haven't yet checked the numbers but they probably haven't changed + CColModel CTempColModels::ms_colModelPed2; -CColModel CTempColModels::ms_colModelBBox; CColModel CTempColModels::ms_colModelBumper1; CColModel CTempColModels::ms_colModelWheel1; CColModel CTempColModels::ms_colModelPanel1; CColModel CTempColModels::ms_colModelBodyPart2; CColModel CTempColModels::ms_colModelBodyPart1; -CColModel CTempColModels::ms_colModelCutObj[5]; +CColModel CTempColModels::ms_colModelCutObj[10]; CColModel CTempColModels::ms_colModelPedGroundHit; CColModel CTempColModels::ms_colModelBoot1; CColModel CTempColModels::ms_colModelDoor1; CColModel CTempColModels::ms_colModelBonnet1; -CColModel CTempColModels::ms_colModelWeapon; +CColModel CTempColModels::ms_colModelFerryDocked; + +CTempColModels *gpTempColModels; CColSphere s_aPedSpheres[3]; @@ -34,6 +37,7 @@ CColSphere s_aBootSpheres[4]; CColSphere s_aWheelSpheres[2]; CColSphere s_aBodyPartSpheres1[2]; CColSphere s_aBodyPartSpheres2[2]; +CColBox S_aFerryDockedBoxes[1]; void CTempColModels::Initialise(void) @@ -44,11 +48,26 @@ CTempColModels::Initialise(void) colmodel.level = LEVEL_GENERIC;\ colmodel.ownsCollisionVolumes = false; - int i; + if(gMakeResources){ + if(gpTempColModels == nil){ + gpTempColModels = new CTempColModels; + gpTempColModels->Initialise(); + return; + } + + ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); + ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f)); + ms_colModelBBox.level = LEVEL_GENERIC; - ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); - ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f)); - ms_colModelBBox.level = LEVEL_GENERIC; + ms_colModelPed1.boundingSphere.Set(1.25f, CVector(0.0f, 0.0f, 0.0f)); + ms_colModelPed1.boundingBox.Set(CVector(-0.35f, -0.35f, -1.0f), CVector(0.35f, 0.35f, 0.9f)); + SET_COLMODEL_SPHERES(ms_colModelPed1, s_aPedSpheres); + + ms_colModelWeapon.boundingSphere.Set(0.25f, CVector(0.0f, 0.0f, 0.0f)); + ms_colModelWeapon.boundingBox.Set(CVector(-0.25f, -0.25f, -0.25f), CVector(0.25f, 0.25f, 0.25f)); + } + + int i; for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) { ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); @@ -74,10 +93,6 @@ CTempColModels::Initialise(void) s_aPedSpheres[i].piece = 0; } - ms_colModelPed1.boundingSphere.Set(1.25f, CVector(0.0f, 0.0f, 0.0f)); - ms_colModelPed1.boundingBox.Set(CVector(-0.35f, -0.35f, -1.0f), CVector(0.35f, 0.35f, 0.9f)); - SET_COLMODEL_SPHERES(ms_colModelPed1, s_aPedSpheres); - // Ped 2 Spheres s_aPed2Spheres[0].radius = 0.3f; @@ -294,13 +309,47 @@ CTempColModels::Initialise(void) SET_COLMODEL_SPHERES(ms_colModelBodyPart2, s_aBodyPartSpheres2); - ms_colModelWeapon.boundingSphere.radius = 0.25f; - ms_colModelWeapon.boundingBox.min.x = -0.25f; - ms_colModelWeapon.boundingBox.min.y = -0.25f; - ms_colModelWeapon.boundingBox.min.z = -0.25f; - ms_colModelWeapon.boundingBox.max.x = 0.25f; - ms_colModelWeapon.boundingBox.max.y = 0.25f; - ms_colModelWeapon.boundingBox.max.z = 0.25f; + // Ferry Docked + + S_aFerryDockedBoxes[0].Set(CVector(-6.3f, -22.78f, -2.0f), CVector(6.3f, 22.78f, 2.8f), SURFACE_THICK_METAL_PLATE, SURFACE_DEFAULT); + + ms_colModelFerryDocked.boundingSphere.Set(35.0f, CVector(0.0f, -0.0f, 0.0f)); + ms_colModelFerryDocked.boundingBox.Set(S_aFerryDockedBoxes[0].min, S_aFerryDockedBoxes[0].max); + ms_colModelFerryDocked.spheres = nil; + ms_colModelFerryDocked.numSpheres = 0; + ms_colModelFerryDocked.boxes = S_aFerryDockedBoxes; + ms_colModelFerryDocked.numBoxes = ARRAY_SIZE(S_aFerryDockedBoxes); + ms_colModelFerryDocked.level = LEVEL_GENERIC; + #undef SET_COLMODEL_SPHERES } + +void +CTempColModels::Write(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), 0x10, false, true); + + ms_colModelBBox.Write(writer, false); + writer.AddPatch(&ms_colModelBBox); + + ms_colModelPed1.Write(writer, false); + writer.AddPatch(&ms_colModelPed1); + + ms_colModelWeapon.Write(writer, false); + writer.AddPatch(&ms_colModelWeapon); + + for(int i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) + ms_colModelCutObj[i].Write(writer, true); + ms_colModelPed2.Write(writer, true); + ms_colModelPedGroundHit.Write(writer, true); + ms_colModelDoor1.Write(writer, true); + ms_colModelBumper1.Write(writer, true); + ms_colModelPanel1.Write(writer, true); + ms_colModelBonnet1.Write(writer, true); + ms_colModelBoot1.Write(writer, true); + ms_colModelWheel1.Write(writer, true); + ms_colModelBodyPart1.Write(writer, true); + ms_colModelBodyPart2.Write(writer, true); + ms_colModelFerryDocked.Write(writer, true); +} diff --git a/src/collision/TempColModels.h b/src/collision/TempColModels.h index 1a888723..0f1f06c3 100644 --- a/src/collision/TempColModels.h +++ b/src/collision/TempColModels.h @@ -5,20 +5,25 @@ class CTempColModels { public: - static CColModel ms_colModelPed1; + CColModel ms_colModelPed1; + CColModel ms_colModelBBox; + CColModel ms_colModelWeapon; + static CColModel ms_colModelPed2; - static CColModel ms_colModelBBox; static CColModel ms_colModelBumper1; static CColModel ms_colModelWheel1; static CColModel ms_colModelPanel1; static CColModel ms_colModelBodyPart2; static CColModel ms_colModelBodyPart1; - static CColModel ms_colModelCutObj[5]; + static CColModel ms_colModelCutObj[10]; static CColModel ms_colModelPedGroundHit; static CColModel ms_colModelBoot1; static CColModel ms_colModelDoor1; static CColModel ms_colModelBonnet1; - static CColModel ms_colModelWeapon; + static CColModel ms_colModelFerryDocked; - static void Initialise(void); + void Initialise(void); + void Write(base::cRelocatableChunkWriter &writer); }; + +extern CTempColModels *gpTempColModels; diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp index 1e63cf30..e7c76a9c 100644 --- a/src/control/Bridge.cpp +++ b/src/control/Bridge.cpp @@ -161,3 +161,23 @@ bool CBridge::ThisIsABridgeObjectMovingUp(int index) return false; #endif } + +void CBridge::ForceBridgeState(uint8 state) +{ +#ifdef GTA_BRIDGE + State = state; + switch (state) + { + case STATE_BRIDGE_LOCKED: + case STATE_LIFT_PART_MOVING_DOWN: + case STATE_LIFT_PART_ABOUT_TO_MOVE_UP: + ThePaths.SetLinksBridgeLights(-330.0f, -230.0f, -700.0f, -588.0f, true); + break; + case STATE_BRIDGE_ALWAYS_UNLOCKED: + ThePaths.SetLinksBridgeLights(-330.0f, -230.0f, -700.0f, -588.0f, false); + break; + default: + break; + } +#endif +}
\ No newline at end of file diff --git a/src/control/Bridge.h b/src/control/Bridge.h index c5702629..e639d4c1 100644 --- a/src/control/Bridge.h +++ b/src/control/Bridge.h @@ -8,7 +8,8 @@ enum bridgeStates { STATE_LIFT_PART_MOVING_DOWN, STATE_LIFT_PART_IS_DOWN, STATE_LIFT_PART_ABOUT_TO_MOVE_UP, - STATE_LIFT_PART_MOVING_UP + STATE_LIFT_PART_MOVING_UP, + STATE_BRIDGE_ALWAYS_UNLOCKED }; class CBridge @@ -25,4 +26,5 @@ public: static bool ShouldLightsBeFlashing(); static void FindBridgeEntities(); static bool ThisIsABridgeObjectMovingUp(int); + static void ForceBridgeState(uint8 state); }; diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp index 8e79fee1..45652b23 100644 --- a/src/control/CarAI.cpp +++ b/src/control/CarAI.cpp @@ -4,6 +4,7 @@ #include "Accident.h" #include "AutoPilot.h" +#include "Bridge.h" #include "CarCtrl.h" #include "General.h" #include "HandlingMgr.h" @@ -72,6 +73,18 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle) case STATUS_PLAYER_DISABLED: break; case STATUS_SIMPLE: + { + if (pVehicle->m_pCurGroundEntity && CBridge::ThisIsABridgeObjectMovingUp(pVehicle->m_pCurGroundEntity->GetModelIndex())) + pVehicle->SetStatus(STATUS_PHYSICS); + CColPoint colPoint; + CEntity* pEntity; + if ((pVehicle->m_randomSeed & 0x3F) == (CTimer::GetFrameCounter() & 0x3F) && + !CWorld::ProcessVerticalLine(pVehicle->GetPosition(), -2.0f, colPoint, pEntity, true, false, false, false, true, false, nil)) { + debug("FLOATING CAR TURNED INTO PHYSICS CAR!\n"); + pVehicle->SetStatus(STATUS_PHYSICS); + } + } + // fallthough case STATUS_PHYSICS: switch (pVehicle->AutoPilot.m_nCarMission) { case MISSION_RAMPLAYER_FARAWAY: diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index 5e4e62ee..f50111ec 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -11,6 +11,7 @@ #include "Cranes.h" #include "Curves.h" #include "CutsceneMgr.h" +#include "Frontend.h" #include "Gangs.h" #include "Game.h" #include "Garages.h" @@ -77,10 +78,11 @@ #define DISTANCE_BETWEEN_CAR_AND_DEAD_PED (6.0f) #define PROBABILITY_OF_PASSENGER_IN_VEHICLE (0.125f) -#define ONSCREEN_DESPAWN_RANGE (120.0f) -#define MINIMAL_DISTANCE_TO_SPAWN_ONSCREEN (100.0f) -#define REQUEST_ONSCREEN_DISTANCE ((ONSCREEN_DESPAWN_RANGE + MINIMAL_DISTANCE_TO_SPAWN_ONSCREEN) / 2) -#define OFFSCREEN_DESPAWN_RANGE (40.0f) +#define ONSCREEN_DESPAWN_RANGE (190.0f) +#define MINIMAL_DISTANCE_TO_SPAWN_ONSCREEN (130.0f) +#define REQUEST_ONSCREEN_DISTANCE (140.0f) +#define OFFSCREEN_DESPAWN_RANGE (60.0f) +#define MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN (40.0f) #define EXTENDED_RANGE_DESPAWN_MULTIPLIER (1.5f) bool CCarCtrl::bMadDriversCheat; @@ -94,7 +96,7 @@ int32 CCarCtrl::NumRandomCars; int32 CCarCtrl::NumParkedCars; int32 CCarCtrl::NumPermanentCars; int8 CCarCtrl::CountDownToCarsAtStart; -int32 CCarCtrl::MaxNumberOfCarsInUse = 12; +int32 CCarCtrl::MaxNumberOfCarsInUse = 30; uint32 CCarCtrl::LastTimeLawEnforcerCreated; uint32 CCarCtrl::LastTimeFireTruckCreated; uint32 CCarCtrl::LastTimeAmbulanceCreated; @@ -109,6 +111,8 @@ int32 CCarCtrl::LoadedCarsArray[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY]; CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP]; uint32 aCarsToKeepTime[MAX_CARS_TO_KEEP]; +bool gbEmergencyVehiclesEnabled = true; + void CCarCtrl::GenerateRandomCars() { @@ -158,14 +162,19 @@ CCarCtrl::GenerateOneRandomCar() carClass = COPS; carModel = ChoosePoliceCarModel(); }else{ - carModel = ChooseModel(&zone, &carClass); - if (carModel == -1 || (carClass == COPS && pWanted->GetWantedLevel() >= 1)) - /* All cop spawns with wanted level are handled by condition above. */ - /* In particular it means that cop cars never spawn if player has wanted level of 1. */ - return; + for (int i = 0; i < 5; i++) { + carModel = ChooseModel(&zone, &carClass); + if (carModel == -1) + return; + if (!(carClass == COPS && pWanted->GetWantedLevel() >= 1)) + /* All cop spawns with wanted level are handled by condition above. */ + /* In particular it means that cop cars never spawn if player has wanted level of 1. */ + break; + } } float frontX, frontY; float preferredDistance, angleLimit; + float requestMultiplier = 1.0f; bool invertAngleLimitTest; CVector spawnPosition; int32 curNodeId, nextNodeId; @@ -185,11 +194,14 @@ CCarCtrl::GenerateOneRandomCar() angleLimit = -1.0f; bTopDownCamera = true; invertAngleLimitTest = true; - preferredDistance = OFFSCREEN_DESPAWN_RANGE + 15.0f; + preferredDistance = MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN + 15.0f; /* BUG: testForCollision not initialized in original game. */ testForCollision = false; }else if (!pPlayerVehicle){ /* Player is not in vehicle. */ + requestMultiplier = 13.0f / 20.0f; + if (FrontEndMenuManager.m_PrefsUseWideScreen) // TODO(LCS): static + requestMultiplier *= 4.0f / 3.0f; testForCollision = true; frontX = TheCamera.CamFrontXNorm; frontY = TheCamera.CamFrontYNorm; @@ -199,95 +211,105 @@ CCarCtrl::GenerateOneRandomCar() /* Forward to his current direction (camera direction). */ angleLimit = 0.707f; /* 45 degrees */ invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; break; case 1: /* Spawn a vehicle close to player to his side. */ /* Kinda not within camera angle. */ angleLimit = 0.707f; /* 45 degrees */ invertAngleLimitTest = false; - preferredDistance = OFFSCREEN_DESPAWN_RANGE; + preferredDistance = MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN; break; } - }else if (fPlayerVehicleSpeed > 0.4f){ /* 72 km/h */ + } + else { + requestMultiplier = 13.0f / 20.0f; + if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON && !FrontEndMenuManager.m_PrefsUseWideScreen) + requestMultiplier *= 0.9f; + if (FrontEndMenuManager.m_PrefsUseWideScreen) // TODO(LCS): static + requestMultiplier *= 4.0f / 3.0f; + if (fPlayerVehicleSpeed > 0.4f) { /* 72 km/h */ /* Player is moving fast in vehicle */ /* Prefer spawning vehicles very far away from him. */ - frontX = vecPlayerVehicleSpeed.x / fPlayerVehicleSpeed; - frontY = vecPlayerVehicleSpeed.y / fPlayerVehicleSpeed; - testForCollision = false; - switch (CTimer::GetFrameCounter() & 3) { - case 0: - case 1: - /* Spawn a vehicle in a very narrow gap in front of a player */ - angleLimit = 0.85f; /* approx 30 degrees */ - invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; - break; - case 2: - /* Spawn a vehicle relatively far away from player. */ - /* Forward to his current direction (camera direction). */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; - break; - case 3: - /* Spawn a vehicle close to player to his side. */ - /* Kinda not within camera angle. */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = false; - preferredDistance = OFFSCREEN_DESPAWN_RANGE; - break; + frontX = vecPlayerVehicleSpeed.x / fPlayerVehicleSpeed; + frontY = vecPlayerVehicleSpeed.y / fPlayerVehicleSpeed; + testForCollision = false; + switch (CTimer::GetFrameCounter() & 3) { + case 0: + case 1: + /* Spawn a vehicle in a very narrow gap in front of a player */ + angleLimit = 0.85f; /* approx 30 degrees */ + invertAngleLimitTest = true; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; + break; + case 2: + /* Spawn a vehicle relatively far away from player. */ + /* Forward to his current direction (camera direction). */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = true; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; + break; + case 3: + /* Spawn a vehicle close to player to his side. */ + /* Kinda not within camera angle. */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = false; + preferredDistance = MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN; + break; + } } - }else if (fPlayerVehicleSpeed > 0.1f){ /* 18 km/h */ - /* Player is moving moderately fast in vehicle */ - /* Spawn more vehicles to player's side. */ - frontX = vecPlayerVehicleSpeed.x / fPlayerVehicleSpeed; - frontY = vecPlayerVehicleSpeed.y / fPlayerVehicleSpeed; - testForCollision = false; - switch (CTimer::GetFrameCounter() & 3) { - case 0: - /* Spawn a vehicle in a very narrow gap in front of a player */ - angleLimit = 0.85f; /* approx 30 degrees */ - invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; - break; - case 1: - /* Spawn a vehicle relatively far away from player. */ - /* Forward to his current direction (camera direction). */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; - break; - case 2: - case 3: - /* Spawn a vehicle close to player to his side. */ - /* Kinda not within camera angle. */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = false; - preferredDistance = OFFSCREEN_DESPAWN_RANGE; - break; + else if (fPlayerVehicleSpeed > 0.1f) { /* 18 km/h */ + /* Player is moving moderately fast in vehicle */ + /* Spawn more vehicles to player's side. */ + frontX = vecPlayerVehicleSpeed.x / fPlayerVehicleSpeed; + frontY = vecPlayerVehicleSpeed.y / fPlayerVehicleSpeed; + testForCollision = false; + switch (CTimer::GetFrameCounter() & 3) { + case 0: + /* Spawn a vehicle in a very narrow gap in front of a player */ + angleLimit = 0.85f; /* approx 30 degrees */ + invertAngleLimitTest = true; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; + break; + case 1: + /* Spawn a vehicle relatively far away from player. */ + /* Forward to his current direction (camera direction). */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = true; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; + break; + case 2: + case 3: + /* Spawn a vehicle close to player to his side. */ + /* Kinda not within camera angle. */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = false; + preferredDistance = MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN; + break; + } } - }else{ - /* Player is in vehicle but moving very slow. */ - /* Then use camera direction instead of vehicle direction. */ - testForCollision = true; - frontX = TheCamera.CamFrontXNorm; - frontY = TheCamera.CamFrontYNorm; - switch (CTimer::GetFrameCounter() & 1) { - case 0: - /* Spawn a vehicle relatively far away from player. */ - /* Forward to his current direction (camera direction). */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = true; - preferredDistance = REQUEST_ONSCREEN_DISTANCE * TheCamera.GenerationDistMultiplier; - break; - case 1: - /* Spawn a vehicle close to player to his side. */ - /* Kinda not within camera angle. */ - angleLimit = 0.707f; /* 45 degrees */ - invertAngleLimitTest = false; - preferredDistance = OFFSCREEN_DESPAWN_RANGE; - break; + else { + /* Player is in vehicle but moving very slow. */ + /* Then use camera direction instead of vehicle direction. */ + testForCollision = true; + frontX = TheCamera.CamFrontXNorm; + frontY = TheCamera.CamFrontYNorm; + switch (CTimer::GetFrameCounter() & 1) { + case 0: + /* Spawn a vehicle relatively far away from player. */ + /* Forward to his current direction (camera direction). */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = true; + preferredDistance = REQUEST_ONSCREEN_DISTANCE * requestMultiplier * TheCamera.GenerationDistMultiplier; + break; + case 1: + /* Spawn a vehicle close to player to his side. */ + /* Kinda not within camera angle. */ + angleLimit = 0.707f; /* 45 degrees */ + invertAngleLimitTest = false; + preferredDistance = MINIMAL_DISTANCE_TO_SPAWN_OFFSCREEN; + break; + } } } if (!ThePaths.GenerateCarCreationCoors(vecTargetPos.x, vecTargetPos.y, frontX, frontY, @@ -297,6 +319,8 @@ CCarCtrl::GenerateOneRandomCar() CPathNode* pCurNode = &ThePaths.m_pathNodes[curNodeId]; CPathNode* pNextNode = &ThePaths.m_pathNodes[nextNodeId]; bool bBoatGenerated = false; + if (!OkToCreateVehicleAtThisPosition(spawnPosition)) + return; if ((CGeneral::GetRandomNumber() & 0xF) > Min(pCurNode->spawnRate, pNextNode->spawnRate)) return; if (pCurNode->bWaterPath) { @@ -596,12 +620,12 @@ CCarCtrl::GenerateOneRandomCar() return; } }else{ - if ((vecTargetPos - pVehicle->GetPosition()).Magnitude2D() > TheCamera.GenerationDistMultiplier * (pVehicle->bExtendedRange ? EXTENDED_RANGE_DESPAWN_MULTIPLIER : 1.0f) * ONSCREEN_DESPAWN_RANGE || - (vecTargetPos - pVehicle->GetPosition()).Magnitude2D() < TheCamera.GenerationDistMultiplier * MINIMAL_DISTANCE_TO_SPAWN_ONSCREEN) { + if ((vecTargetPos - pVehicle->GetPosition()).Magnitude2D() > TheCamera.GenerationDistMultiplier * requestMultiplier * (pVehicle->bExtendedRange ? EXTENDED_RANGE_DESPAWN_MULTIPLIER : 1.0f) * ONSCREEN_DESPAWN_RANGE || + (vecTargetPos - pVehicle->GetPosition()).Magnitude2D() < TheCamera.GenerationDistMultiplier * requestMultiplier * MINIMAL_DISTANCE_TO_SPAWN_ONSCREEN) { delete pVehicle; return; } - if ((TheCamera.GetPosition() - pVehicle->GetPosition()).Magnitude2D() < 82.5f * TheCamera.GenerationDistMultiplier || bTopDownCamera) { + if ((TheCamera.GetPosition() - pVehicle->GetPosition()).Magnitude2D() < 105.0f * requestMultiplier * TheCamera.GenerationDistMultiplier || bTopDownCamera) { delete pVehicle; return; } @@ -651,13 +675,13 @@ CCarCtrl::GenerateOneRandomCar() int nMadDrivers; switch (pVehicle->GetVehicleAppearance()) { case VEHICLE_APPEARANCE_BIKE: - nMadDrivers = 30; + nMadDrivers = 20; break; case VEHICLE_APPEARANCE_BOAT: nMadDrivers = 40; break; default: - nMadDrivers = 6; + nMadDrivers = 3; break; } if ((CGeneral::GetRandomNumber() & 0x7F) < nMadDrivers || bMadDriversCheat) { @@ -716,12 +740,6 @@ CCarCtrl::GenerateOneRandomCar() } } -bool -CCarCtrl::BoatWithTallMast(int32 mi) -{ - return mi == MI_RIO || mi == MI_TROPIC || mi == MI_MARQUIS; -} - int32 CCarCtrl::ChooseBoatModel(int32 rating) { @@ -941,6 +959,7 @@ CCarCtrl::RemoveCarsIfThePoolGetsFull(void) } } if (pClosestVehicle) { + debug(":::::::::::\'Nearest removed\' cause pools was full -> NumRandomCars %d\n", NumRandomCars); CWorld::Remove(pClosestVehicle); delete pClosestVehicle; } @@ -963,7 +982,10 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle) return; } float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D(); - float threshold = OFFSCREEN_DESPAWN_RANGE; + float despawnMultiplier = 1.0f; + if (FindPlayerVehicle() && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON && !FrontEndMenuManager.m_PrefsUseWideScreen) + despawnMultiplier = 0.75f; + float threshold = OFFSCREEN_DESPAWN_RANGE * despawnMultiplier; if (pVehicle->GetIsOnScreen() || TheCamera.Cams[TheCamera.ActiveCam].LookingLeft || TheCamera.Cams[TheCamera.ActiveCam].LookingRight || @@ -976,7 +998,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle) pVehicle->bIsCarParkVehicle || CTimer::GetTimeInMilliseconds() < pVehicle->m_nSetPieceExtendedRangeTime ){ - threshold = ONSCREEN_DESPAWN_RANGE * TheCamera.GenerationDistMultiplier; + threshold = ONSCREEN_DESPAWN_RANGE * despawnMultiplier * TheCamera.GenerationDistMultiplier; } if (TheCamera.GetForward().z < -0.9f) threshold = 70.0f; @@ -1569,7 +1591,7 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float if (pVehicle->AutoPilot.m_nCarMission == MISSION_RAMCAR_CLOSE && pOtherEntity == pVehicle->AutoPilot.m_pTargetCar) return; CVector2D vecDiff = pOtherCar->GetPosition() - pVehicle->GetPosition(); - float angleBetweenVehicles = CGeneral::GetATanOfXY(vecDiff.x, vecDiff.y); + float angleBetweenVehicles = GetATanOfXY(vecDiff.x, vecDiff.y); float distance = vecDiff.Magnitude(); if (distance < 1.0f) return; @@ -1579,7 +1601,7 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float return; CVector2D forward = pVehicle->GetForward(); forward.Normalise(); - float forwardAngle = CGeneral::GetATanOfXY(forward.x, forward.y); + float forwardAngle = GetATanOfXY(forward.x, forward.y); float angleDiff = angleBetweenVehicles - forwardAngle; float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * Sin(angleDiff)); float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * Cos(angleDiff)); @@ -1588,16 +1610,12 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float diffToLeftAngle = ABS(diffToLeftAngle); float angleToWeave = lengthToEvade / 2; if (diffToLeftAngle < angleToWeave){ - *pAngleToWeaveLeft = angleBetweenVehicles - angleToWeave; - while (*pAngleToWeaveLeft < -PI) - *pAngleToWeaveLeft += TWOPI; + *pAngleToWeaveLeft = LimitRadianAngle(angleBetweenVehicles - angleToWeave); } float diffToRightAngle = LimitRadianAngle(angleBetweenVehicles - *pAngleToWeaveRight); diffToRightAngle = ABS(diffToRightAngle); if (diffToRightAngle < angleToWeave){ - *pAngleToWeaveRight = angleBetweenVehicles + angleToWeave; - while (*pAngleToWeaveRight > PI) - *pAngleToWeaveRight -= TWOPI; + *pAngleToWeaveRight = LimitRadianAngle(angleBetweenVehicles + angleToWeave); } } @@ -1629,23 +1647,19 @@ void CCarCtrl::WeaveForPed(CEntity* pOtherEntity, CVehicle* pVehicle, float* pAn return; CPed* pPed = (CPed*)pOtherEntity; CVector2D vecDiff = pPed->GetPosition() - pVehicle->GetPosition(); - float angleBetweenVehicleAndPed = CGeneral::GetATanOfXY(vecDiff.x, vecDiff.y); + float angleBetweenVehicleAndPed = GetATanOfXY(vecDiff.x, vecDiff.y); float distance = vecDiff.Magnitude(); float lengthToEvade = (WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x + PED_WIDTH_TO_WEAVE) / distance; float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicleAndPed - *pAngleToWeaveLeft); diffToLeftAngle = ABS(diffToLeftAngle); float angleToWeave = lengthToEvade / 2; if (diffToLeftAngle < angleToWeave) { - *pAngleToWeaveLeft = angleBetweenVehicleAndPed - angleToWeave; - while (*pAngleToWeaveLeft < -PI) - *pAngleToWeaveLeft += TWOPI; + *pAngleToWeaveLeft = LimitRadianAngle(angleBetweenVehicleAndPed - angleToWeave); } float diffToRightAngle = LimitRadianAngle(angleBetweenVehicleAndPed - *pAngleToWeaveRight); diffToRightAngle = ABS(diffToRightAngle); if (diffToRightAngle < angleToWeave) { - *pAngleToWeaveRight = angleBetweenVehicleAndPed + angleToWeave; - while (*pAngleToWeaveRight > PI) - *pAngleToWeaveRight -= TWOPI; + *pAngleToWeaveRight = LimitRadianAngle(angleBetweenVehicleAndPed + angleToWeave); } } @@ -1701,23 +1715,19 @@ void CCarCtrl::WeaveForObject(CEntity* pOtherEntity, CVehicle* pVehicle, float* rightCoef * pObject->GetRight() + forwardCoef * pObject->GetForward() - pVehicle->GetPosition(); - float angleBetweenVehicleAndObject = CGeneral::GetATanOfXY(vecDiff.x, vecDiff.y); + float angleBetweenVehicleAndObject = GetATanOfXY(vecDiff.x, vecDiff.y); float distance = vecDiff.Magnitude(); float lengthToEvade = (WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x + OBJECT_WIDTH_TO_WEAVE) / distance; float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicleAndObject - *pAngleToWeaveLeft); diffToLeftAngle = ABS(diffToLeftAngle); float angleToWeave = lengthToEvade / 2; if (diffToLeftAngle < angleToWeave) { - *pAngleToWeaveLeft = angleBetweenVehicleAndObject - angleToWeave; - while (*pAngleToWeaveLeft < -PI) - *pAngleToWeaveLeft += TWOPI; + *pAngleToWeaveLeft = LimitRadianAngle(angleBetweenVehicleAndObject - angleToWeave); } float diffToRightAngle = LimitRadianAngle(angleBetweenVehicleAndObject - *pAngleToWeaveRight); diffToRightAngle = ABS(diffToRightAngle); if (diffToRightAngle < angleToWeave) { - *pAngleToWeaveRight = angleBetweenVehicleAndObject + angleToWeave; - while (*pAngleToWeaveRight > PI) - *pAngleToWeaveRight -= TWOPI; + *pAngleToWeaveRight = LimitRadianAngle(angleBetweenVehicleAndObject + angleToWeave); } } @@ -1759,7 +1769,7 @@ bool CCarCtrl::PickNextNodeAccordingStrategy(CVehicle* pVehicle) void CCarCtrl::PickNextNodeRandomly(CVehicle* pVehicle) { if (pVehicle->m_nRouteSeed) - CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed); + CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed++); int32 prevNode = pVehicle->AutoPilot.m_nCurrentRouteNode; int32 curNode = pVehicle->AutoPilot.m_nNextRouteNode; uint8 totalLinks = ThePaths.m_pathNodes[curNode].numLinks; @@ -1845,13 +1855,15 @@ void CCarCtrl::PickNextNodeRandomly(CVehicle* pVehicle) pNextPathNode = &ThePaths.m_pathNodes[pVehicle->AutoPilot.m_nNextRouteNode]; if ((!pNextPathNode->bDisabled || pPrevPathNode->bDisabled) && (!pNextPathNode->bBetweenLevels || pPrevPathNode->bBetweenLevels || !pVehicle->AutoPilot.m_bStayInCurrentLevel)) - /* Nice way to exit loop but this will fail because this is used for indexing! */ - nextLink = 1000; + break; } } - if (nextLink < 999) + if (nextLink >= totalLinks) { /* If everything else failed, turn vehicle around */ + nextLink = 0; + debug("Couldn\'t find ANYTHING. Just go back from where we came.\n"); pVehicle->AutoPilot.m_nNextRouteNode = prevNode; + } } pNextPathNode = &ThePaths.m_pathNodes[pVehicle->AutoPilot.m_nNextRouteNode]; pNextLink = &ThePaths.m_carPathLinks[ThePaths.m_carPathConnections[nextLink + pCurPathNode->firstLink]]; @@ -1964,7 +1976,7 @@ void CCarCtrl::PickNextNodeToChaseCar(CVehicle* pVehicle, float targetX, float t #endif { if (pVehicle->m_nRouteSeed) - CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed); + CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed++); int prevNode = pVehicle->AutoPilot.m_nCurrentRouteNode; int curNode = pVehicle->AutoPilot.m_nNextRouteNode; CPathNode* pPrevNode = &ThePaths.m_pathNodes[prevNode]; @@ -1984,7 +1996,7 @@ void CCarCtrl::PickNextNodeToChaseCar(CVehicle* pVehicle, float targetX, float t int nextLink; if (numNodes != 1 && numNodes != 2 || pTargetNode[0] == pCurNode){ if (numNodes != 2 || pTargetNode[1] == pCurNode) { - float currentAngle = CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); + float currentAngle = GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); nextLink = 0; float lowestAngleChange = 10.0f; int numLinks = pCurNode->numLinks; @@ -1994,7 +2006,7 @@ void CCarCtrl::PickNextNodeToChaseCar(CVehicle* pVehicle, float targetX, float t if (conNode == prevNode && i > 1) continue; CPathNode* pTestNode = &ThePaths.m_pathNodes[conNode]; - float angle = CGeneral::GetATanOfXY(pTestNode->GetX() - pCurNode->GetX(), pTestNode->GetY() - pCurNode->GetY()); + float angle = GetATanOfXY(pTestNode->GetX() - pCurNode->GetX(), pTestNode->GetY() - pCurNode->GetY()); angle = LimitRadianAngle(angle - currentAngle); angle = ABS(angle); if (angle < lowestAngleChange) { @@ -2412,6 +2424,16 @@ void CCarCtrl::SteerAICarWithPhysics_OnlyMission(CVehicle* pVehicle, float* pSwe *pHandbrake = true; return; case MISSION_CRUISE: + if (CTrafficLights::ShouldCarStopForBridge(pVehicle)) { + *pAccel = 0.0f; + *pBrake = 1.0f; + *pHandbrake = true; +#ifdef FIX_BUGS + *pSwerve = 0.0f; +#endif + break; + } + // fallthough case MISSION_RAMPLAYER_FARAWAY: case MISSION_BLOCKPLAYER_FARAWAY: case MISSION_GOTOCOORDS: @@ -2482,11 +2504,19 @@ void CCarCtrl::SteerAICarWithPhysics_OnlyMission(CVehicle* pVehicle, float* pSwe *pHandbrake = false; return; case MISSION_RAMCAR_CLOSE: + if (!pVehicle->AutoPilot.m_pTargetCar) { + debug("NO TARGET VEHICLE FOR MISSION_RAMCAR_CLOSE\n"); + return; + } SteerAICarWithPhysicsHeadingForTarget(pVehicle, pVehicle->AutoPilot.m_pTargetCar, pVehicle->AutoPilot.m_pTargetCar->GetPosition().x, pVehicle->AutoPilot.m_pTargetCar->GetPosition().y, pSwerve, pAccel, pBrake, pHandbrake); return; case MISSION_BLOCKCAR_CLOSE: + if (!pVehicle->AutoPilot.m_pTargetCar) { + debug("NO TARGET VEHICLE FOR MISSION_BLOCKCAR_CLOSE\n"); + return; + } SteerAICarWithPhysicsTryingToBlockTarget(pVehicle, pVehicle->AutoPilot.m_pTargetCar->GetPosition().x, pVehicle->AutoPilot.m_pTargetCar->GetPosition().y, @@ -2495,6 +2525,9 @@ void CCarCtrl::SteerAICarWithPhysics_OnlyMission(CVehicle* pVehicle, float* pSwe pSwerve, pAccel, pBrake, pHandbrake); return; case MISSION_BLOCKCAR_HANDBRAKESTOP: + if (!pVehicle->AutoPilot.m_pTargetCar) { + return; + } SteerAICarWithPhysicsTryingToBlockTarget_Stop(pVehicle, pVehicle->AutoPilot.m_pTargetCar->GetPosition().x, pVehicle->AutoPilot.m_pTargetCar->GetPosition().y, @@ -2572,8 +2605,8 @@ void CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget(CVehicle* pVehicle, float { CVector2D forward = pVehicle->GetForward(); forward.Normalise(); - float angleToTarget = CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); - float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); + float angleToTarget = GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); + float angleForward = GetATanOfXY(forward.x, forward.y); float steerAngle = LimitRadianAngle(angleToTarget - angleForward); steerAngle = Clamp(steerAngle, -DEFAULT_MAX_STEER_ANGLE, DEFAULT_MAX_STEER_ANGLE); #ifdef FIX_BUGS @@ -2604,8 +2637,8 @@ void CCarCtrl::SteerAIBoatWithPhysicsAttackingPlayer(CVehicle* pVehicle, float* CVector2D forward = pVehicle->GetForward(); forward.Normalise(); CVector2D vecToProjection = FindPlayerCoors() + FindPlayerSpeed() * projection * GAME_SPEED_TO_CARAI_SPEED; - float angleToTarget = CGeneral::GetATanOfXY(vecToProjection.x - pVehicle->GetPosition().x, vecToProjection.y - pVehicle->GetPosition().y); - float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); + float angleToTarget = GetATanOfXY(vecToProjection.x - pVehicle->GetPosition().x, vecToProjection.y - pVehicle->GetPosition().y); + float angleForward = GetATanOfXY(forward.x, forward.y); float steerAngle = LimitRadianAngle(angleToTarget - angleForward); #ifdef FIX_BUGS float speedTarget = pVehicle->AutoPilot.GetCruiseSpeed(); @@ -2693,7 +2726,7 @@ void CCarCtrl::SteerAIHeliTowardsTargetCoors(CAutomobile* pHeli) if (distanceToTarget < 8.0f && pHeli->m_fHeliOrientation < 0.0f) ZTurnSpeedTarget = 0.0f; else { - float fAngleTarget = CGeneral::GetATanOfXY(vecToTarget.x, vecToTarget.y) + PI; + float fAngleTarget = GetATanOfXY(vecToTarget.x, vecToTarget.y) + PI; if (pHeli->m_fHeliOrientation >= 0.0f) fAngleTarget = pHeli->m_fHeliOrientation; fAngleTarget -= pHeli->m_fOrientation; @@ -2736,7 +2769,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane) CVector2D vecToTarget = pPlane->AutoPilot.m_vecDestinationCoors - pPlane->GetPosition(); float fForwardZ = (pPlane->AutoPilot.m_vecDestinationCoors.z - pPlane->GetPosition().z) / vecToTarget.Magnitude(); fForwardZ = Clamp(fForwardZ, -0.3f, 0.3f); - float angle = CGeneral::GetATanOfXY(vecToTarget.x, vecToTarget.y); + float angle = GetATanOfXY(vecToTarget.x, vecToTarget.y); while (angle > TWOPI) angle -= TWOPI; float difference = LimitRadianAngle(angle - pPlane->m_fOrientation); @@ -2833,8 +2866,8 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv projectedPosition.y = positionOnCurrentLinkIncludingLane.y; } CVector2D distanceToProjectedPosition = projectedPosition - pVehicle->GetPosition(); - float angleCurrentLink = CGeneral::GetATanOfXY(distanceToProjectedPosition.x, distanceToProjectedPosition.y); - float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); + float angleCurrentLink = GetATanOfXY(distanceToProjectedPosition.x, distanceToProjectedPosition.y); + float angleForward = GetATanOfXY(forward.x, forward.y); if (pVehicle->AutoPilot.m_nDrivingStyle == DRIVINGSTYLE_AVOID_CARS) angleCurrentLink = FindAngleToWeaveThroughTraffic(pVehicle, nil, angleCurrentLink, angleForward); float steerAngle = LimitRadianAngle(angleCurrentLink - angleForward); @@ -2879,11 +2912,11 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv pCurrentLink->GetY() - ((pVehicle->AutoPilot.m_nCurrentLane + pCurrentLink->OneWayLaneOffset()) * LANE_WIDTH) * currentPathLinkForward.x); trajectory -= pVehicle->GetPosition(); float speedAngleMultiplier = FindSpeedMultiplier( - CGeneral::GetATanOfXY(trajectory.x, trajectory.y) - angleForward, + GetATanOfXY(trajectory.x, trajectory.y) - angleForward, MIN_ANGLE_FOR_SPEED_LIMITING, MAX_ANGLE_FOR_SPEED_LIMITING, MIN_LOWERING_SPEED_COEFFICIENT); float tmpWideMultiplier = FindSpeedMultiplier( - CGeneral::GetATanOfXY(currentPathLinkForward.x, currentPathLinkForward.y) - - CGeneral::GetATanOfXY(nextPathLinkForwardX, nextPathLinkForwardY), + GetATanOfXY(currentPathLinkForward.x, currentPathLinkForward.y) - + GetATanOfXY(nextPathLinkForwardX, nextPathLinkForwardY), MIN_ANGLE_FOR_SPEED_LIMITING_BETWEEN_NODES, MAX_ANGLE_FOR_SPEED_LIMITING, MIN_LOWERING_SPEED_COEFFICIENT); float speedNodesMultiplier; if (scalarDistanceToNextNode > DISTANCE_TO_NEXT_NODE_TO_CONSIDER_SLOWING_DOWN || pVehicle->AutoPilot.m_nCruiseSpeed < 12) @@ -2917,8 +2950,8 @@ void CCarCtrl::SteerAICarWithPhysicsHeadingForTarget(CVehicle* pVehicle, CPhysic *pHandbrake = false; CVector2D forward = pVehicle->GetForward(); forward.Normalise(); - float angleToTarget = CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); - float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); + float angleToTarget = GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); + float angleForward = GetATanOfXY(forward.x, forward.y); if (pVehicle->AutoPilot.m_nDrivingStyle == DRIVINGSTYLE_AVOID_CARS) angleToTarget = FindAngleToWeaveThroughTraffic(pVehicle, pTarget, angleToTarget, angleForward); float steerAngle = LimitRadianAngle(angleToTarget - angleForward); @@ -3124,7 +3157,7 @@ bool CCarCtrl::JoinCarWithRoadSystemGotoCoors(CVehicle* pVehicle, CVector vecTar void CCarCtrl::FindLinksToGoWithTheseNodes(CVehicle* pVehicle) { if (pVehicle->m_nRouteSeed) - CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed); + CGeneral::SetRandomSeed(pVehicle->m_nRouteSeed++); int nextLink; CPathNode* pCurNode = &ThePaths.m_pathNodes[pVehicle->AutoPilot.m_nCurrentRouteNode]; for (nextLink = 0; nextLink < 12; nextLink++) @@ -3166,10 +3199,12 @@ void CCarCtrl::GenerateEmergencyServicesCar(void) return; if (CGame::IsInInterior()) return; + if (TheCamera.m_WideScreenOn) // TODO(LCS): verify + return; if (NumFiretrucksOnDuty + NumAmbulancesOnDuty + NumParkedCars + NumMissionCars + NumLawEnforcerCars + NumRandomCars > MaxNumberOfCarsInUse) return; - if (NumAmbulancesOnDuty == 0){ + if (NumAmbulancesOnDuty == 0 && gbEmergencyVehiclesEnabled){ if (gAccidentManager.CountActiveAccidents() < 2){ if (CStreaming::HasModelLoaded(MI_AMBULAN)) CStreaming::SetModelIsDeletable(MI_MEDIC); @@ -3189,7 +3224,7 @@ void CCarCtrl::GenerateEmergencyServicesCar(void) } } } - if (NumFiretrucksOnDuty == 0){ + if (NumFiretrucksOnDuty == 0 && gbEmergencyVehiclesEnabled){ if (gFireManager.GetTotalActiveFires() < 3){ if (CStreaming::HasModelLoaded(MI_FIRETRUCK)) CStreaming::SetModelIsDeletable(MI_FIREMAN); @@ -3353,6 +3388,17 @@ bool CCarCtrl::MapCouldMoveInThisArea(float x, float y) #endif } +bool +CCarCtrl::BoatWithTallMast(int32 mi) +{ + return mi == MI_RIO || mi == MI_TROPIC || mi == MI_MARQUIS; +} + +bool CCarCtrl::OkToCreateVehicleAtThisPosition(const CVector& pos) +{ + return true; +} + float CCarCtrl::FindSpeedMultiplierWithSpeedFromNodes(int8 type) { switch (type) @@ -3362,3 +3408,8 @@ float CCarCtrl::FindSpeedMultiplierWithSpeedFromNodes(int8 type) } return 1.0f; } + +void CCarCtrl::RenderDebugInfo(CVehicle*) +{ + //TODO(LCS) +} diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h index 5efbe275..edf1f41e 100644 --- a/src/control/CarCtrl.h +++ b/src/control/CarCtrl.h @@ -1,6 +1,7 @@ #pragma once #include "PathFind.h" #include "Boat.h" +#include "General.h" #include "Vehicle.h" #define GAME_SPEED_TO_METERS_PER_SECOND 50.0f @@ -130,6 +131,10 @@ public: static void SteerAIBoatWithPhysicsAttackingPlayer(CVehicle*, float*, float*, float*, bool*); static void SteerAICarBlockingPlayerForwardAndBack(CVehicle*, float*, float*, float*, bool*); + static bool OkToCreateVehicleAtThisPosition(const CVector&); + static void RenderDebugInfo(CVehicle*); + static float GetATanOfXY(float x, float y) { float t = CGeneral::GetATanOfXY(x, y); if (t < 0.0f) t += TWOPI; return t; } + static float GetPositionAlongCurrentCurve(CVehicle* pVehicle) { uint32 timeInCurve = CTimer::GetTimeInMilliseconds() - pVehicle->AutoPilot.m_nTimeEnteredCurve; @@ -138,11 +143,7 @@ public: static float LimitRadianAngle(float angle) { - while (angle < -PI) - angle += TWOPI; - while (angle > PI) - angle -= TWOPI; - return angle; + return CGeneral::LimitRadianAngle(angle); } static bool bMadDriversCheat; @@ -171,4 +172,5 @@ public: static int32 LoadedCarsArray[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY]; }; -extern CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
\ No newline at end of file +extern CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP]; +extern bool gbEmergencyVehiclesEnabled;
\ No newline at end of file diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp index 11df7b43..595845c1 100644 --- a/src/control/GameLogic.cpp +++ b/src/control/GameLogic.cpp @@ -46,6 +46,7 @@ float CGameLogic::AfterDeathStartPointOrientation[NUM_SHORTCUT_START_POINTS]; CVector CGameLogic::ShortCutDropOffForMission; float CGameLogic::ShortCutDropOffOrientationForMission; bool CGameLogic::MissionDropOffReadyToBeUsed; +char CGameLogic::mStoredPlayerOutfit[8] = "plr3"; #define SHORTCUT_TAXI_COST (9) #define TOTAL_BUSTED_AUDIO (28) @@ -89,7 +90,7 @@ CGameLogic::SortOutStreamingAndMemory(const CVector &pos) CStreaming::DeleteRwObjectsAfterDeath(pos); CStreaming::RemoveUnusedModelsInLoadedList(); CGame::DrasticTidyUpMemory(true); - CWorld::Players[CWorld::PlayerInFocus].m_pPed->Undress("player"); + CWorld::Players[CWorld::PlayerInFocus].m_pPed->Undress(mStoredPlayerOutfit); CStreaming::LoadSceneCollision(pos); CStreaming::LoadScene(pos); CWorld::Players[CWorld::PlayerInFocus].m_pPed->Dress(); @@ -392,7 +393,7 @@ CGameLogic::RestorePlayerStuffDuringResurrection(CPlayerPed *pPlayerPed, CVector CWorld::Add(pPlayerPed); CHud::ResetWastedText(); CStreaming::StreamZoneModels(pos); - clearWaterDrop = true; + //clearWaterDrop = true; } void @@ -419,7 +420,7 @@ CGameLogic::SetUpShortCut(CVector vStartPos, float fStartAngle, CVector vEndPos, ShortCutStartOrientation = fStartAngle; ShortCutDestination = vEndPos; ShortCutDestinationOrientation = fEndAngle; - CStreaming::RequestModel(MI_KAUFMAN, 0); + CStreaming::RequestModel(MI_CABBIE, 0); } void @@ -451,11 +452,11 @@ CGameLogic::UpdateShortCut() { switch (ShortCutState) { case SHORTCUT_INIT: - if (!CStreaming::HasModelLoaded(MI_KAUFMAN)) { - CStreaming::RequestModel(MI_KAUFMAN, 0); + if (!CStreaming::HasModelLoaded(MI_CABBIE)) { + CStreaming::RequestModel(MI_CABBIE, 0); return; } - pShortCutTaxi = new CAutomobile(MI_KAUFMAN, RANDOM_VEHICLE); + pShortCutTaxi = new CAutomobile(MI_CABBIE, RANDOM_VEHICLE); if (!pShortCutTaxi) return; pShortCutTaxi->SetPosition(ShortCutStart); diff --git a/src/control/GameLogic.h b/src/control/GameLogic.h index 9b774cc7..a12b4031 100644 --- a/src/control/GameLogic.h +++ b/src/control/GameLogic.h @@ -48,4 +48,5 @@ public: static CVector ShortCutDropOffForMission; static float ShortCutDropOffOrientationForMission; static bool MissionDropOffReadyToBeUsed; + static char mStoredPlayerOutfit[8]; };
\ No newline at end of file diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 34ed11eb..8978fac4 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -8,6 +8,7 @@ #include "DMAudio.h" #include "General.h" #include "Font.h" +#include "Frontend.h" #include "HandlingMgr.h" #include "Hud.h" #include "Messages.h" @@ -15,7 +16,9 @@ #include "Pad.h" #include "Particle.h" #include "PlayerPed.h" +#include "Radar.h" #include "Replay.h" +#include "Script.h" #include "Stats.h" #include "Streaming.h" #include "Text.h" @@ -37,7 +40,7 @@ #define RESPRAY_PRICE (100) // Distances -#define DISTANCE_TO_CALL_OFF_CHASE (10.0f) +#define DISTANCE_TO_CALL_OFF_CHASE (50.0f) #define DISTANCE_FOR_MRWHOOP_HACK (0.5f) #define DISTANCE_TO_ACTIVATE_GARAGE (8.0f) #define DISTANCE_TO_ACTIVATE_KEEPCAR_GARAGE (17.0f) @@ -94,10 +97,10 @@ const int32 gaCarsToCollectInCraigsGarages[TOTAL_COLLECTCARS_GARAGES][TOTAL_COLLECTCARS_CARS] = { - { MI_LANDSTAL, MI_IDAHO, MI_ESPERANT, MI_STALLION, MI_RANCHER, MI_BLISTAC }, - { MI_SABRE, MI_VIRGO, MI_SENTINEL, MI_STRETCH, MI_WASHING, MI_ADMIRAL }, - { MI_CHEETAH, MI_INFERNUS, MI_BANSHEE, MI_PHEONIX, MI_COMET, MI_STINGER }, - { MI_VOODOO, MI_CUBAN, MI_CADDY, MI_BAGGAGE, MI_MRWHOOP, MI_PIZZABOY } + { MI_HEARSE, MI_FAGGIO, MI_FREEWAY, MI_SPIDER, MI_MANANA, MI_SHELBY, MI_PONTIAC, MI_ESPRIT, MI_HOTROD, MI_PCJ600, MI_SENTINEL, MI_INFERNUS, MI_BANSHEE, MI_PATRIOT, MI_BFINJECT, MI_LANDSTAL }, + { MI_HEARSE, MI_FAGGIO, MI_FREEWAY, MI_SPIDER, MI_MANANA, MI_SHELBY, MI_PONTIAC, MI_ESPRIT, MI_HOTROD, MI_PCJ600, MI_SENTINEL, MI_INFERNUS, MI_BANSHEE, MI_PATRIOT, MI_BFINJECT, MI_LANDSTAL }, + { MI_HEARSE, MI_FAGGIO, MI_FREEWAY, MI_SPIDER, MI_MANANA, MI_SHELBY, MI_PONTIAC, MI_ESPRIT, MI_HOTROD, MI_PCJ600, MI_SENTINEL, MI_INFERNUS, MI_BANSHEE, MI_PATRIOT, MI_BFINJECT, MI_LANDSTAL }, + { MI_HEARSE, MI_FAGGIO, MI_FREEWAY, MI_SPIDER, MI_MANANA, MI_SHELBY, MI_PONTIAC, MI_ESPRIT, MI_HOTROD, MI_PCJ600, MI_SENTINEL, MI_INFERNUS, MI_BANSHEE, MI_PATRIOT, MI_BFINJECT, MI_LANDSTAL }, }; const int32 gaCarsToCollectIn60Seconds[] = { MI_CHEETAH, MI_TAXI, MI_ESPERANT, MI_SENTINEL, MI_IDAHO }; @@ -121,6 +124,7 @@ CStoredCar CGarages::aCarsInSafeHouses[TOTAL_HIDEOUT_GARAGES][NUM_GARAGE_STORED_ int32 hGarages = AEHANDLE_NONE; CGarage CGarages::aGarages[NUM_GARAGES]; bool CGarages::bCamShouldBeOutisde; +uint8 CGarages::CrusherRewardMultiplier; #ifndef MASTER bool bPrintNearestObject; @@ -131,6 +135,7 @@ void CGarages::Init(void) #ifndef MASTER VarConsole.Add("Print nearest object", &bPrintNearestObject, true); #endif + CrusherRewardMultiplier = 1; CrushedCarId = -1; NumGarages = 0; MessageEndTime = 0; @@ -211,7 +216,7 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X pGarage->m_fSupX = Max(Max(X1, X2), X3); pGarage->m_fInfY = Min(Min(Min(Y1, Y2), Y3), Y2 + Y3 - Y1); pGarage->m_fSupY = Max(Max(Y1, Y2), Y3); - pGarage->m_vecCorner1 = CVector(X1, Y1, Z1); + pGarage->m_vecCorner1 = CVector2D(X1, Y1); pGarage->m_fInfZ = Z1; pGarage->m_vDir1 = CVector2D(X2 - X1, Y2 - Y1); pGarage->m_vDir2 = CVector2D(X3 - X1, Y3 - Y1); @@ -229,6 +234,22 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X pGarage->m_bRecreateDoorOnNextRefresh = false; pGarage->m_bRotatedDoor = false; pGarage->m_bCameraFollowsPlayer = false; + pGarage->m_nTimeToStartAction = 0; + pGarage->field_2 = false; + pGarage->m_nTargetModelIndex = targetId; + pGarage->m_bCollectedCarsState = 0; + pGarage->m_bDeactivated = false; + pGarage->m_bResprayHappened = false; + pGarage->m_bInitialized = false; + pGarage->m_bSSGarageAcceptedVehicle = false; + pGarage->m_bSSGarageStateChanging = false; + pGarage->m_bInitialized = InitDoorGubbins(NumGarages, type); + return NumGarages++; +} + +bool CGarages::InitDoorGubbins(uint32 id, uint8 type) +{ + CGarage* pGarage = &aGarages[id]; pGarage->RefreshDoorPointers(true); if (pGarage->m_pDoor1) { pGarage->m_fDoor1Z = pGarage->m_pDoor1->GetPosition().z; @@ -243,12 +264,6 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X pGarage->m_fDoorHeight = pGarage->m_pDoor1 ? FindDoorHeightForMI(pGarage->m_pDoor1->GetModelIndex()) : 4.0f; pGarage->m_fDoorPos = 0.0f; pGarage->m_eGarageState = GS_FULLYCLOSED; - pGarage->m_nTimeToStartAction = 0; - pGarage->field_2 = false; - pGarage->m_nTargetModelIndex = targetId; - pGarage->m_bCollectedCarsState = 0; - pGarage->m_bDeactivated = false; - pGarage->m_bResprayHappened = false; switch (type) { case GARAGE_MISSION: case GARAGE_COLLECTORSITEMS: @@ -257,7 +272,6 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X case GARAGE_COLLECTCARS_2: case GARAGE_COLLECTCARS_3: case GARAGE_FORCARTOCOMEOUTOF: - case GARAGE_60SECONDS: case GARAGE_MISSION_KEEPCAR: case GARAGE_FOR_SCRIPT_TO_OPEN: case GARAGE_HIDEOUT_ONE: @@ -284,6 +298,7 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X case GARAGE_BOMBSHOP2: case GARAGE_BOMBSHOP3: case GARAGE_RESPRAY: + case GARAGE_CRATE_GARAGE: pGarage->m_eGarageState = GS_OPENED; pGarage->m_fDoorPos = pGarage->m_fDoorHeight; break; @@ -298,7 +313,16 @@ int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X pGarage->UpdateCrusherAngle(); else pGarage->UpdateDoorsHeight(); - return NumGarages++; + return pGarage->m_fDoorHeight > 0.0f; +} + +void CGarages::SetupAnyGaragesForThisIsland(void) +{ + for (uint32 i = 0; i < NumGarages; i++) { + CGarage* pGarage = &aGarages[i]; + if (!pGarage->m_bInitialized) + pGarage->m_bInitialized = InitDoorGubbins(i, pGarage->m_eGarageType); + } } void CGarages::ChangeGarageType(int16 garage, uint8 type, int32 mi) @@ -309,8 +333,27 @@ void CGarages::ChangeGarageType(int16 garage, uint8 type, int32 mi) pGarage->m_eGarageState = GS_FULLYCLOSED; } +void CGarages::LockGarage(int16 garage, bool state) +{ + CGarage* pGarage = &aGarages[garage]; + pGarage->m_bLocked = state; + if (pGarage->m_bLocked) { + pGarage->m_fDoorPos = 0.0f; + pGarage->m_eGarageState = GS_FULLYCLOSED; + pGarage->m_nTimeToStartAction = CTimer::GetTimeInMilliseconds() + 2000; + pGarage->UpdateDoorsHeight(); + } + else { + pGarage->m_eGarageState = GS_OPENING; + } +} + void CGarage::Update() { +#ifdef GTA_NETWORK + if (/* gIsMultiplayerGame && */m_eGarageType != GARAGE_CRATE_GARAGE) // TODO(multiplayer) + return; +#endif if (m_eGarageType != GARAGE_CRUSHER) { switch (m_eGarageState) { case GS_FULLYCLOSED: @@ -348,7 +391,7 @@ void CGarage::Update() if (m_bDeactivated && m_eGarageState == GS_FULLYCLOSED) return; if (m_bRotatedDoor) { -#ifdef GTA_PS2 +#if defined GTA_PS2 || defined GTA_PSP if (m_eGarageState == GS_OPENING) { if (m_pDoor1) { if (FindPlayerPed()->m_pCurrentPhysSurface == m_pDoor1) @@ -432,7 +475,10 @@ void CGarage::Update() #else if (FindPlayerVehicle()) #endif + { ((CAutomobile*)(FindPlayerVehicle()))->m_fFireBlowUpTimer = 0.0f; + FindPlayerVehicle()->m_bGarageTurnedLightsOff = true; + } CWorld::CallOffChaseForArea( m_fInfX - DISTANCE_TO_CALL_OFF_CHASE, m_fInfY - DISTANCE_TO_CALL_OFF_CHASE, @@ -440,6 +486,7 @@ void CGarage::Update() m_fSupY + DISTANCE_TO_CALL_OFF_CHASE); break; case GS_FULLYCLOSED: + m_fDoorPos = 0.0f; if (CTimer::GetTimeInMilliseconds() > m_nTimeToStartAction) { m_eGarageState = GS_OPENING; DMAudio.PlayFrontEndSound(SOUND_GARAGE_OPENING, 1); @@ -474,11 +521,8 @@ void CGarage::Update() FindPlayerVehicle()->GetRight() = -FindPlayerVehicle()->GetRight(); } bChangedColour = false; -#ifdef FIX_BUGS - if (!FindPlayerVehicle()->IsCar() || !((CAutomobile*)(FindPlayerVehicle()))->bFixedColour) { -#else - if (!((CAutomobile*)(FindPlayerVehicle()))->bFixedColour) { -#endif + if ((!FindPlayerVehicle()->IsCar() || !((CAutomobile*)(FindPlayerVehicle()))->bFixedColour) && + (!FindPlayerVehicle()->IsBike() || !((CBike*)(FindPlayerVehicle()))->bFixedColour)) { uint8 colour1, colour2; uint16 attempt; FindPlayerVehicle()->GetModelInfo()->ChooseVehicleColour(colour1, colour2); @@ -491,12 +535,36 @@ void CGarage::Update() FindPlayerVehicle()->m_currentColour1 = colour1; FindPlayerVehicle()->m_currentColour2 = colour2; if (bChangedColour) { + CVector vCorners[] = { + CVector(m_fInfX, m_fInfY, 0.0f), CVector(m_fInfX, m_fSupY, 0.0f), + CVector(m_fSupX, m_fInfY, 0.0f), CVector(m_fSupX, m_fSupY, 0.0f) + }; + CVector vMiddles[] = { + CVector(m_fInfX + (m_fSupX - m_fInfX) / 2, m_fInfY, 0.0f), CVector(m_fInfX, m_fInfY + (m_fSupY - m_fInfY) / 2, 0.0f), + CVector(m_fInfX + (m_fSupX - m_fInfX) / 2, m_fSupY, 0.0f), CVector(m_fSupX, m_fInfY + (m_fSupY - m_fInfY) / 2, 0.0f), + }; + int nClosestCornerToCamera = 0; + int nClosestMiddleToCamera = 0; + for (int i = 1; i < 4; i++) { + if ((vCorners[nClosestCornerToCamera] - TheCamera.GetPosition()).Magnitude() > + (vCorners[i] - TheCamera.GetPosition()).Magnitude()) + nClosestCornerToCamera = i; + if ((vMiddles[nClosestMiddleToCamera] - TheCamera.GetPosition()).Magnitude() > + (vMiddles[i] - TheCamera.GetPosition()).Magnitude()) + nClosestMiddleToCamera = i; + } + CVector vDirectionCenterToMiddle = vMiddles[nClosestMiddleToCamera] - CVector(GetGarageCenterX(), GetGarageCenterY(), 0.0f); + vDirectionCenterToMiddle.Normalise(); + for (int i = 0; i < NUM_PARTICLES_IN_RESPRAY; i++) { - CVector pos; - pos.x = CGeneral::GetRandomNumberInRange(m_fInfX + 0.5f, m_fSupX - 0.5f); - pos.y = CGeneral::GetRandomNumberInRange(m_fInfY + 0.5f, m_fSupY - 0.5f); - pos.z = CGeneral::GetRandomNumberInRange(m_fDoor1Z - 3.0f, m_fDoor1Z + 1.0f); - CParticle::AddParticle(PARTICLE_GARAGEPAINT_SPRAY, pos, CVector(0.0f, 0.0f, 0.0f), nil, 0.0f, CVehicleModelInfo::ms_vehicleColourTable[colour1]); + CVector pos(vMiddles[nClosestMiddleToCamera] - vDirectionCenterToMiddle * 0.5f); + CVector dir(CrossProduct(vDirectionCenterToMiddle, CVector(0.0f, 0.0f, 1.0f))); + float fDirMultiplier = (vCorners[nClosestCornerToCamera] - vMiddles[nClosestMiddleToCamera]).Magnitude(); + pos += dir * CGeneral::GetRandomNumberInRange(-1.0f, 1.0f) * fDirMultiplier; // TODO: base::RandomReal? + pos += vDirectionCenterToMiddle * CGeneral::GetRandomNumberInRange(-6.0f, 0.4f); + dir = vDirectionCenterToMiddle * 0.04f; + pos.z = m_fInfZ + CGeneral::GetRandomNumberInRange(-0.4f, 0.0f); + CParticle::AddParticle(PARTICLE_GARAGEPAINT_SPRAY, pos, dir, nil, 0.0f, CVehicleModelInfo::mspInfo->ms_vehicleColourTable[colour1]); } } } @@ -506,8 +574,11 @@ void CGarage::Update() if (!CGarages::RespraysAreFree) { CWorld::Players[CWorld::PlayerInFocus].m_nMoney = Max(0, CWorld::Players[CWorld::PlayerInFocus].m_nMoney - RESPRAY_PRICE); CStats::AutoPaintingBudget += RESPRAY_PRICE; + CGarages::TriggerMessage("GA_2", -1, 4000, -1); // New engine and paint job. The cops won't recognize you! + } + else { + CGarages::TriggerMessage("GA_17", -1, 4000, -1); } - CGarages::TriggerMessage("GA_2", -1, 4000, -1); // New engine and paint job. The cops won't recognize you! } else if (bChangedColour) { if (CGeneral::GetRandomTrueFalse()) @@ -532,6 +603,8 @@ void CGarage::Update() UpdateDoorsHeight(); break; case GS_OPENEDCONTAINSCAR: + if (FindPlayerVehicle()) + FindPlayerVehicle()->m_bGarageTurnedLightsOff = false; if (IsPlayerOutsideGarage()) m_eGarageState = GS_OPENED; break; @@ -544,9 +617,20 @@ void CGarage::Update() case GARAGE_BOMBSHOP1: case GARAGE_BOMBSHOP2: case GARAGE_BOMBSHOP3: + if (m_bLocked) { + UpdateDoorsHeight(); + break; + } switch (m_eGarageState) { case GS_OPENED: + UpdateDoorsHeight(); if (IsStaticPlayerCarEntirelyInside()) { + if (FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE) { + CGarages::TriggerMessage("GA_22", -1, 4000, -1); + m_eGarageState = GS_OPENEDCONTAINSCAR; + DMAudio.PlayFrontEndSound(SOUND_GARAGE_BOMB_ALREADY_SET, 1); + break; + } if (!FindPlayerVehicle() || FindPlayerVehicle()->m_bombType) { CGarages::TriggerMessage("GA_5", -1, 4000, -1); //"Your car is already fitted with a bomb" m_eGarageState = GS_OPENEDCONTAINSCAR; @@ -573,6 +657,8 @@ void CGarage::Update() m_nTimeToStartAction = CTimer::GetTimeInMilliseconds() + TIME_TO_SETUP_BOMB; DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_CLOSED, 1.0f); } + if (FindPlayerVehicle()) + FindPlayerVehicle()->m_bGarageTurnedLightsOff = true; UpdateDoorsHeight(); if (m_eGarageType == GARAGE_BOMBSHOP3) CStreaming::RequestModel(MI_BOMB, STREAMFLAGS_DONT_REMOVE); @@ -589,13 +675,25 @@ void CGarage::Update() if (!CGarages::BombsAreFree) CWorld::Players[CWorld::PlayerInFocus].m_nMoney = Max(0, CWorld::Players[CWorld::PlayerInFocus].m_nMoney - BOMB_PRICE); if (FindPlayerVehicle() && (FindPlayerVehicle()->IsCar() || FindPlayerVehicle()->IsBike())) { -#if (!defined GTA_PS2 || defined FIX_BUGS) +#if (!defined GTA_PS2 || defined FIX_BUGS) // <- this remained in CAutomobile in LCS FindPlayerVehicle()->m_bombType = CGarages::GetBombTypeForGarageType(m_eGarageType); FindPlayerVehicle()->m_pBombRigger = FindPlayerPed(); #else // PS2 version contained a bug: CBike was casted to CAutomobile, but due to coincidence it didn't corrupt memory ((CAutomobile*)(FindPlayerVehicle()))->m_bombType = CGarages::GetBombTypeForGarageType(m_eGarageType); ((CAutomobile*)(FindPlayerVehicle()))->m_pBombRigger = FindPlayerPed(); #endif + // what is this + uint32 i = CPools::GetVehiclePool()->GetSize(); + while (i--) { + CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); + if (pVehicle) { + if (pVehicle->IsCar() && pVehicle->GetStatus() == STATUS_WRECKED) { + CAutomobile* pCar = (CAutomobile*)pVehicle; + pCar->m_pBombRigger = nil; + pCar->m_pBlowUpEntity = nil; + } + } + } if (m_eGarageType == GARAGE_BOMBSHOP3) CGarages::GivePlayerDetonator(); CStats::KgsOfExplosivesUsed += KGS_OF_EXPLOSIVES_IN_BOMB; @@ -634,6 +732,7 @@ void CGarage::Update() CHud::SetHelpMessage(TheText.Get("GA_8"), false); // Use the detonator to activate the bomb. break; } + CGarages::TriggerMessage(CGarages::BombsAreFree ? "GA_24" : "GA_23", -1, 4000, -1); CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_GARAGE); FindPlayerPed()->m_pWanted->m_bIgnoredByCops = false; } @@ -651,6 +750,8 @@ void CGarage::Update() UpdateDoorsHeight(); break; case GS_OPENEDCONTAINSCAR: + if (FindPlayerVehicle()) + FindPlayerVehicle()->m_bGarageTurnedLightsOff = false; if (IsPlayerOutsideGarage()) m_eGarageState = GS_OPENED; break; @@ -664,16 +765,12 @@ void CGarage::Update() switch (m_eGarageState) { case GS_OPENED: if (((CVector2D)FindPlayerCoors() - CVector2D(GetGarageCenterX(), GetGarageCenterY())).MagnitudeSqr() > SQR(DISTANCE_TO_CLOSE_MISSION_GARAGE)) { - if ((CTimer::GetFrameCounter() & 0x1F) == 0 -#ifndef GTA_PS2 - && (!m_pTarget || IsEntityTouching3D(m_pTarget)) -#endif - ) { + if ((CTimer::GetFrameCounter() & 0x1F) == 0 && !IsAnyOtherCarTouchingGarage(nil)) { m_eGarageState = GS_CLOSING; m_bClosingWithoutTargetCar = true; } } - else if (!FindPlayerVehicle() && m_pTarget && IsEntityEntirelyInside3D(m_pTarget, 0.0f) && + else if (m_pTarget && IsEntityEntirelyInside3D(m_pTarget, 0.0f) && IsEntityEntirelyOutside(FindPlayerVehicle() ? (CEntity*)FindPlayerVehicle() : (CEntity*)FindPlayerPed(), 2.0f)) { CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_GARAGE); FindPlayerPed()->m_pWanted->m_bIgnoredByCops = true; @@ -685,7 +782,11 @@ void CGarage::Update() if (m_pTarget) ThrowCarsNearDoorOutOfGarage(m_pTarget); m_fDoorPos = Max(0.0f, m_fDoorPos - (m_bRotatedDoor ? ROTATED_DOOR_CLOSE_SPEED : DEFAULT_DOOR_CLOSE_SPEED) * CTimer::GetTimeStep()); - if (m_fDoorPos == 0.0f) { + if (!IsEntityEntirelyOutside(FindPlayerPed(), 1.0f)) { + printf("FIX FOR IE GARAGE TRAPPING PLAYER\n"); + m_eGarageState = GS_OPENING; + } + else if (m_fDoorPos == 0.0f) { DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_CLOSED, 1.0f); if (m_bClosingWithoutTargetCar) m_eGarageState = GS_FULLYCLOSED; @@ -781,22 +882,21 @@ void CGarage::Update() UpdateDoorsHeight(); break; case GS_FULLYCLOSED: + if (CTheScripts::IsPlayerOnAMission()) { + m_pTarget = nil; + break; + } + if (!IsEntityEntirelyOutside(FindPlayerPed(), 0.0f)) { + printf("FIX FOR IE GARAGE TRAPPING PLAYER\n"); + m_eGarageState = GS_OPENING; + } if (FindPlayerVehicle() && CalcSmallestDistToGarageDoorSquared( FindPlayerVehicle()->GetPosition().x, FindPlayerVehicle()->GetPosition().y ) < SQR(DISTANCE_TO_ACTIVATE_GARAGE)) { if (DoesCraigNeedThisCar(FindPlayerVehicle()->GetModelIndex())) { - if (FindPlayerVehicle()->VehicleCreatedBy == MISSION_VEHICLE) - CGarages::TriggerMessage("GA_1A", -1, 5000, -1); // Come back when you're not so busy... - else - m_eGarageState = GS_OPENING; - } - else { - if (HasCraigCollectedThisCar(FindPlayerVehicle()->GetModelIndex())) - CGarages::TriggerMessage("GA_20", -1, 5000, -1); // We got more of these than we can shift. Sorry man, no deal. - else if (FindPlayerSpeed().Magnitude() < MAX_SPEED_TO_SHOW_COLLECTED_MESSAGE) - CGarages::TriggerMessage("GA_19", -1, 5000, -1); // We're not interested in that model. + m_eGarageState = GS_OPENING; } } m_pTarget = nil; @@ -832,6 +932,7 @@ void CGarage::Update() m_eGarageState = GS_FULLYCLOSED; DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_CLOSED, 1.0f); } + UpdateDoorsHeight(); if (!IsGarageEmpty()) m_eGarageState = GS_OPENING; break; @@ -852,8 +953,169 @@ void CGarage::Update() break; } break; + case GARAGE_CRATE_GARAGE: +#ifdef GTA_NETWORK + { + switch (m_eGarageState) { + case GS_OPENED: + if (m_pSSVehicle) { + // if (m_pSSVehicle->GetVehiclePointer() && IsEntityEntirelyInside3D(m_pSSVehicle->GetVehiclePointer()) + { + if (m_pSSTargetCar) + m_pSSTargetCar->CleanUpOldReference((CEntity**)&m_pSSTargetCar); + // m_pSSTargetCar = m_pSSVehicle->GetVehiclePointer(); + m_pSSTargetCar->RegisterReference((CEntity**)&m_pSSTargetCar); + } + // else + { + if (m_pSSTargetCar) + m_pSSTargetCar->CleanUpOldReference((CEntity**)&m_pSSTargetCar); + m_pSSTargetCar = nil; + } + if (m_pSSTargetCar) { + if (!FindPlayerVehicle()/* && m_pSSTargetCar == m_pSSVehicle->GetVehiclePointer() */) + { + if (IsEntityEntirelyOutside(FindPlayerPed(), 6.0f)) { + if (FindPlayerPed()->m_fHealth > 0.0f) { + CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_GARAGE); + m_eGarageState = GS_CLOSING; + m_bSSGarageStateChanging = true; + } + } + } + } + } + break; + case GS_CLOSING: + m_fDoorPos = Max(0.0f, m_fDoorPos - (m_bRotatedDoor ? ROTATED_DOOR_CLOSE_SPEED : DEFAULT_DOOR_CLOSE_SPEED) * CTimer::GetTimeStep()); + if (m_fDoorPos == 0.0f) { + // if (? == m_nSSGarageState) + { + if (m_pSSTargetCar) { + // if (m_pSSVehicle->GetVehiclePointer()) + { + if (IsEntityEntirelyInside3D(/* m_pSSVehicle->GetVehiclePointer() */nil, 0.0f)) { + if (m_pSSTargetCar) + m_pSSTargetCar->CleanUpOldReference((CEntity**)&m_pSSTargetCar); + CWorld::Remove(m_pSSTargetCar); + delete m_pSSTargetCar; + m_pSSTargetCar = nil; + m_pSSVehicle = nil; + m_bSSGarageAcceptedVehicle = true; + printf("Destroying Car Inside Crate....\n"); + } + } + } + } + // TODO: some loop :( + CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_GARAGE); + m_eGarageState = GS_FULLYCLOSED; + DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_CLOSED, 1.0f); + } + UpdateDoorsHeight(); + if (!IsGarageEmpty()) + m_eGarageState = GS_OPENING; + break; + case GS_FULLYCLOSED: + { + // if (? == m_nSSGarageState) + { + if (CalcDistToGarageRectangleSquared(FindPlayerPed()->GetPosition().x, FindPlayerPed()->GetPosition().y) > SQR(10.0f)) + m_eGarageState = GS_OPENING; + } + break; + } + case GS_OPENING: + m_fDoorPos = Min(m_fDoorHeight, m_fDoorPos + (m_bRotatedDoor ? ROTATED_DOOR_OPEN_SPEED : DEFAULT_DOOR_OPEN_SPEED) * CTimer::GetTimeStep()); + if (m_fDoorPos == m_fDoorHeight) { + m_bSSGarageStateChanging = false; + m_eGarageState = GS_OPENED; + DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_OPENED, 1.0f); + } + UpdateDoorsHeight(); + break; + } + break; + } +#endif case GARAGE_CRUSHER: + { + switch (m_eGarageState) { + case GS_OPENED: + { + int i = CPools::GetVehiclePool()->GetSize() * (CTimer::GetFrameCounter() % CRUSHER_VEHICLE_TEST_SPAN) / CRUSHER_VEHICLE_TEST_SPAN; + int end = CPools::GetVehiclePool()->GetSize() * (CTimer::GetFrameCounter() % CRUSHER_VEHICLE_TEST_SPAN + 1) / CRUSHER_VEHICLE_TEST_SPAN; + for (; i < end; i++) { + CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); + if (!pVehicle) + continue; + if ((pVehicle->IsCar() || pVehicle->IsBike()) && IsEntityEntirelyInside3D(pVehicle, 0.0f)) { + m_eGarageState = GS_WAITINGFORCAR; + m_pTarget = pVehicle; + m_nTimeCrusherCraneActivated = CTimer::GetTimeInMilliseconds(); + m_pTarget->RegisterReference((CEntity**)&m_pTarget); + } + } + break; + } + case GS_CLOSING: + if (m_pTarget) { + m_fDoorPos = Max(0.0f, m_fDoorPos - CRUSHER_CRANE_SPEED * CTimer::GetTimeStep()); + if (m_fDoorPos < TWOPI / 5) { + m_pTarget->bUsesCollision = false; + m_pTarget->bAffectedByGravity = false; + m_pTarget->SetMoveSpeed(0.0f, 0.0f, 0.0f); + } + else { + m_pTarget->SetMoveSpeed(m_pTarget->GetMoveSpeed() * Pow(0.8f, CTimer::GetTimeStep())); + } + if (m_fDoorPos == 0.0f) { + CGarages::CrushedCarId = CPools::GetVehiclePool()->GetIndex(m_pTarget); + float reward = Min(CRUSHER_MAX_REWARD, CRUSHER_MIN_REWARD + m_pTarget->pHandling->nMonetaryValue * m_pTarget->m_fHealth * CRUSHER_REWARD_COEFFICIENT); + CWorld::Players[CWorld::PlayerInFocus].m_nMoney += reward * CGarages::CrusherRewardMultiplier; + CMessages::AddMessageWithNumber(TheText.Get("CRUSHED"), 5000, 1, reward* CGarages::CrusherRewardMultiplier, -1, -1, -1, -1, -1); + DestroyVehicleAndDriverAndPassengers(m_pTarget); + //++CStats::CarsCrushed; // TODO + m_pTarget = nil; + m_eGarageState = GS_AFTERDROPOFF; + m_nTimeToStartAction = CTimer::GetTimeInMilliseconds() + TIME_TO_CRUSH_CAR; + DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_CLOSED, 1.0f); + } + } + else + m_eGarageState = GS_OPENING; + UpdateCrusherAngle(); + break; + case GS_AFTERDROPOFF: + if (CTimer::GetTimeInMilliseconds() <= m_nTimeToStartAction) { + UpdateCrusherShake((myrand() & 0xFF - 128) * 0.0002f, (myrand() & 0xFF - 128) * 0.0002f); + } + else { + UpdateCrusherShake(0.0f, 0.0f); + m_eGarageState = GS_OPENING; + } + break; + case GS_OPENING: + m_fDoorPos = Min(HALFPI, m_fDoorPos + CTimer::GetTimeStep() * CRUSHER_CRANE_SPEED); + if (m_fDoorPos == HALFPI) { + m_eGarageState = GS_OPENED; + DMAudio.PlayOneShot(hGarages, SOUND_GARAGE_DOOR_OPENED, 1.0f); + } + UpdateCrusherAngle(); + break; + case GS_WAITINGFORCAR: + if (m_pTarget) { + if (CTimer::GetTimeInMilliseconds() - m_nTimeCrusherCraneActivated > 3000) + m_eGarageState = GS_CLOSING; + } + break; + default: + break; + } + if (!FindPlayerVehicle() && (CTimer::GetFrameCounter() & 0x1F) == 0x17 && IsEntityEntirelyInside3D(FindPlayerPed(), 0.0f)) + FindPlayerPed()->InflictDamage(nil, WEAPONTYPE_RAMMEDBYCAR, 300.0f, PEDPIECE_TORSO, 0); break; + } case GARAGE_MISSION_KEEPCAR: case GARAGE_MISSION_KEEPCAR_REMAINCLOSED: switch (m_eGarageState) { @@ -1011,7 +1273,10 @@ void CGarage::Update() break; case GS_FULLYCLOSED: { - float distance = CalcDistToGarageRectangleSquared(FindPlayerCoors().x, FindPlayerCoors().y); + float distance = INFINITY; + if (CWorld::Players[CWorld::PlayerInFocus].m_pPed) { + distance = CalcDistToGarageRectangleSquared(FindPlayerCoors().x, FindPlayerCoors().y); + } if (distance < SQR(DISTANCE_TO_OPEN_HIDEOUT_GARAGE_ON_FOOT) || distance < SQR(DISTANCE_TO_OPEN_HIDEOUT_GARAGE_IN_CAR) && FindPlayerVehicle()) { if (FindPlayerVehicle() && CGarages::CountCarsInHideoutGarage(m_eGarageType) >= FindMaxNumStoredCarsForGarage()) { @@ -1203,8 +1468,15 @@ bool CGarage::IsEntityEntirelyInside3D(CEntity* pEntity, float fMargin) for (int i = 0; i < pColModel->numSpheres; i++) { CVector pos = pEntity->GetMatrix() * pColModel->spheres[i].center; float radius = pColModel->spheres[i].radius; - if (!IsPointInsideGarage(pos, fMargin - radius)) - return false; + if (m_eGarageType == GARAGE_CRATE_GARAGE) { + if (pos.x + radius < m_fInfX - fMargin || pos.x - radius > m_fSupX + fMargin || + pos.y + radius < m_fInfY - fMargin || pos.y - radius > m_fSupX + fMargin) + return false; + } + else { + if (!IsPointInsideGarage(pos, fMargin - radius)) + return false; + } } return true; } @@ -1218,12 +1490,23 @@ bool CGarage::IsEntityEntirelyOutside(CEntity * pEntity, float fMargin) for (int i = 0; i < pColModel->numSpheres; i++) { CVector pos = pEntity->GetMatrix() * pColModel->spheres[i].center; float radius = pColModel->spheres[i].radius; - if (IsPointInsideGarage(pos, fMargin + radius)) - return false; + if (m_eGarageType == GARAGE_CRATE_GARAGE) { + if (pos.x + radius > m_fInfX - fMargin && pos.x - radius < m_fSupX + fMargin && + pos.y + radius > m_fInfY - fMargin && pos.y - radius < m_fSupX + fMargin) + return false; + } + else { + if (IsPointInsideGarage(pos, fMargin + radius)) + return false; + } } return true; } +#ifdef GTA_NETWORK +// some CGarage method (0x134E7C) +#endif + bool CGarage::IsGarageEmpty() { int16 num; @@ -1394,23 +1677,20 @@ void CGarage::RemoveCarsBlockingDoorNotInside() void CGarages::PrintMessages() { if (CTimer::GetTimeInMilliseconds() > MessageStartTime && CTimer::GetTimeInMilliseconds() < MessageEndTime) { + // CRadar::m_FadeDownRadar = true; // TODO CFont::DrawFonts(); - CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f)); + float x_scale = FrontEndMenuManager.m_PrefsUseWideScreen ? 0.34506f : 0.3834f; + CFont::SetScale(PSP_SCREEN_SCALE_X(x_scale), PSP_SCREEN_SCALE_Y(0.71f)); CFont::SetPropOn(); CFont::SetJustifyOff(); CFont::SetBackgroundOff(); -#ifdef FIX_BUGS - CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 50)); -#else - CFont::SetCentreSize(SCREEN_WIDTH - 50); -#endif CFont::SetCentreOn(); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetColor(CRGBA(27, 89, 130, 255)); CFont::SetDropShadowPosition(2); CFont::SetDropColor(CRGBA(0, 0, 0, 255)); - - float y_offset = SCREEN_SCALE_Y(140.0f); + CFont::SetCentreSize(PSP_SCREEN_SCALE_X(454.0f)); + float y_offset = PSP_SCREEN_SCALE_Y(170.0f); if (MessageNumberInString2 >= 0) { CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, MessageNumberInString2, -1, -1, -1, -1, gUString); @@ -1431,6 +1711,7 @@ bool CGarages::IsCarSprayable(CVehicle * pVehicle) switch (pVehicle->GetModelIndex()) { case MI_FIRETRUCK: case MI_AMBULAN: + case MI_FBICAR: case MI_POLICE: case MI_ENFORCER: case MI_BUS: @@ -1438,9 +1719,6 @@ bool CGarages::IsCarSprayable(CVehicle * pVehicle) case MI_BARRACKS: case MI_DODO: case MI_COACH: -#ifndef GTA_PS2 - case MI_FBIRANCH: -#endif return false; default: break; @@ -1497,6 +1775,7 @@ void CGarage::UpdateCrusherAngle() void CGarage::UpdateCrusherShake(float X, float Y) { + /* RefreshDoorPointers(false); m_pDoor1->GetMatrix().GetPosition().x += X; m_pDoor1->GetMatrix().GetPosition().y += Y; @@ -1510,6 +1789,7 @@ void CGarage::UpdateCrusherShake(float X, float Y) m_pDoor2->UpdateRwFrame(); m_pDoor2->GetMatrix().GetPosition().x -= X; m_pDoor2->GetMatrix().GetPosition().y -= Y; + */ } void CGarage::RefreshDoorPointers(bool bCreate) @@ -1575,6 +1855,7 @@ void CGarages::TriggerMessage(const char* text, int16 num1, uint16 time, int16 n MessageEndTime = CTimer::GetTimeInMilliseconds() - 500 + time; } else { + CMessages::AddToPreviousBriefArray(TheText.Get(text), -1, -1, -1, -1, -1, -1, nil); strcpy(MessageIDString, text); MessageStartTime = CTimer::GetTimeInMilliseconds(); MessageEndTime = CTimer::GetTimeInMilliseconds() + time; @@ -1620,7 +1901,8 @@ int32 CGarages::QueryCarsCollected(int16 garage) bool CGarages::HasImportExportGarageCollectedThisCar(int16 garage, int8 car) { - return CarTypesCollected[GetCarsCollectedIndexForGarageType(aGarages[garage].m_eGarageType)] & (BIT(car)); + uint32 total; + return CarTypesCollected[GetCarsCollectedIndexForGarageType(aGarages[garage].m_eGarageType, total)] & (BIT(car)); } bool CGarages::IsGarageOpen(int16 garage) @@ -1640,8 +1922,9 @@ bool CGarages::HasThisCarBeenCollected(int16 garage, uint8 id) bool CGarage::DoesCraigNeedThisCar(int32 mi) { - int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType); - for (int i = 0; i < TOTAL_COLLECTCARS_CARS; i++) { + uint32 total; + int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType, total); + for (int i = 0; i < total; i++) { if (mi == gaCarsToCollectInCraigsGarages[ct][i] || (gaCarsToCollectInCraigsGarages[ct][i] == MI_CHEETAH && mi == MI_VICECHEE)) return (CGarages::CarTypesCollected[ct] & BIT(i)) == 0; } @@ -1650,9 +1933,10 @@ bool CGarage::DoesCraigNeedThisCar(int32 mi) bool CGarage::HasCraigCollectedThisCar(int32 mi) { - int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType); - for (int i = 0; i < TOTAL_COLLECTCARS_CARS; i++) { - if (mi == gaCarsToCollectInCraigsGarages[ct][i] || (gaCarsToCollectInCraigsGarages[ct][i] == MI_CHEETAH && mi == MI_VICECHEE)) + uint32 total; + int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType, total); + for (int i = 0; i < total; i++) { + if (mi == gaCarsToCollectInCraigsGarages[ct][i]) return CGarages::CarTypesCollected[ct] & BIT(i); } return false; @@ -1660,24 +1944,21 @@ bool CGarage::HasCraigCollectedThisCar(int32 mi) bool CGarage::MarkThisCarAsCollectedForCraig(int32 mi) { - int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType); + uint32 total; + int ct = CGarages::GetCarsCollectedIndexForGarageType(m_eGarageType, total); int index; - for (index = 0; index < TOTAL_COLLECTCARS_CARS; index++) { - if (mi == gaCarsToCollectInCraigsGarages[ct][index] || (gaCarsToCollectInCraigsGarages[ct][index] == MI_CHEETAH && mi == MI_VICECHEE)) + for (index = 0; index < total; index++) { + if (mi == gaCarsToCollectInCraigsGarages[ct][index]) break; } - if (index >= TOTAL_COLLECTCARS_CARS) + if (index >= total) return false; CGarages::CarTypesCollected[ct] |= BIT(index); - CWorld::Players[CWorld::PlayerInFocus].m_nMoney += IMPORT_REWARD; - for (int i = 0; i < TOTAL_COLLECTCARS_CARS; i++) { + for (int i = 0; i < total; i++) { if ((CGarages::CarTypesCollected[ct] & BIT(i)) == 0) { - CGarages::TriggerMessage("GA_13", -1, 5000, -1); // Delivered like a pro. Complete the list and there'll be a bonus for you. return false; } } - CWorld::Players[CWorld::PlayerInFocus].m_nMoney += IMPORT_ALLCARS_REWARD; - CGarages::TriggerMessage("GA_14", -1, 5000, -1); // All the cars. NICE! Here's a little something. return true; } @@ -1745,15 +2026,17 @@ void CGarage::FindDoorsEntities() } } if (m_pDoor1 && m_pDoor2) { - CVector2D vecDoor1ToGarage(m_pDoor1->GetPosition().x - GetGarageCenterX(), m_pDoor1->GetPosition().y - GetGarageCenterY()); - CVector2D vecDoor2ToGarage(m_pDoor2->GetPosition().x - GetGarageCenterX(), m_pDoor2->GetPosition().y - GetGarageCenterY()); - if (DotProduct2D(vecDoor1ToGarage, vecDoor2ToGarage) > 0.0f) { - if (vecDoor1ToGarage.MagnitudeSqr() >= vecDoor2ToGarage.MagnitudeSqr()) { - m_pDoor1 = m_pDoor2; - m_bDoor1IsDummy = m_bDoor2IsDummy; - } - m_pDoor2 = nil; - m_bDoor2IsDummy = false; + if (m_pDoor1->GetModelIndex() != MI_CRUSHERBODY && m_pDoor1->GetModelIndex() != MI_CRUSHERLID) { + CVector2D vecDoor1ToGarage(m_pDoor1->GetPosition().x - GetGarageCenterX(), m_pDoor1->GetPosition().y - GetGarageCenterY()); + CVector2D vecDoor2ToGarage(m_pDoor2->GetPosition().x - GetGarageCenterX(), m_pDoor2->GetPosition().y - GetGarageCenterY()); + if (DotProduct2D(vecDoor1ToGarage, vecDoor2ToGarage) > 0.0f) { + if (vecDoor1ToGarage.MagnitudeSqr() >= vecDoor2ToGarage.MagnitudeSqr()) { + m_pDoor1 = m_pDoor2; + m_bDoor1IsDummy = m_bDoor2IsDummy; + } + m_pDoor2 = nil; + m_bDoor2IsDummy = false; + } } } if (m_pDoor1) @@ -1772,8 +2055,27 @@ void CGarage::FindDoorsEntitiesSectorList(CPtrList& list, bool dummy) pEntity->m_scanCode = CWorld::GetCurrentScanCode(); if (!pEntity || !CGarages::IsModelIndexADoor(pEntity->GetModelIndex())) continue; - if (!IsPointInsideGarage(pEntity->GetPosition(), 2.0f)) + if (Abs(pEntity->GetPosition().x - GetGarageCenterX()) >= 20.0f || + Abs(pEntity->GetPosition().y - GetGarageCenterY()) >= 20.0f) + continue; + if (pEntity->GetModelIndex() == MI_CRUSHERBODY) { + m_pDoor1 = pEntity; + m_bDoor1IsDummy = dummy; + if (dummy) + m_bDoor1PoolIndex = (CPools::GetDummyPool()->GetIndex((CDummy*)pEntity)) & 0x7F; + else + m_bDoor1PoolIndex = (CPools::GetObjectPool()->GetIndex((CObject*)pEntity)) & 0x7F; continue; + } + if (pEntity->GetModelIndex() == MI_CRUSHERLID) { + m_pDoor2 = pEntity; + m_bDoor2IsDummy = dummy; + if (dummy) + m_bDoor2PoolIndex = (CPools::GetDummyPool()->GetIndex((CDummy*)pEntity)) & 0x7F; + else + m_bDoor2PoolIndex = (CPools::GetObjectPool()->GetIndex((CObject*)pEntity)) & 0x7F; + continue; + } if (!m_pDoor1) { m_pDoor1 = pEntity; m_bDoor1IsDummy = dummy; @@ -1830,26 +2132,48 @@ bool CGarages::HasCarBeenCrushed(int32 handle) void CStoredCar::StoreCar(CVehicle* pVehicle) { m_nModelIndex = pVehicle->GetModelIndex(); - m_vecPos = pVehicle->GetPosition(); - m_vecAngle = pVehicle->GetForward(); + m_fPosX = pVehicle->GetPosition().x; + m_fPosY = pVehicle->GetPosition().y; + m_fPosZ = pVehicle->GetPosition().z; + m_fForwardX = pVehicle->GetForward().x; + m_fForwardY = pVehicle->GetForward().y; + m_fForwardZ = pVehicle->GetForward().z; + m_fTractionMultiplier = 1.0f; m_nPrimaryColor = pVehicle->m_currentColour1; m_nSecondaryColor = pVehicle->m_currentColour2; m_nRadioStation = pVehicle->m_nRadioStation; m_nVariationA = pVehicle->m_aExtras[0]; m_nVariationB = pVehicle->m_aExtras[1]; m_nFlags = 0; + if (pVehicle->bRewardVehicle) m_nFlags |= FLAG_REWARD_VEHICLE; if (pVehicle->bBulletProof) m_nFlags |= FLAG_BULLETPROOF; if (pVehicle->bFireProof) m_nFlags |= FLAG_FIREPROOF; if (pVehicle->bExplosionProof) m_nFlags |= FLAG_EXPLOSIONPROOF; if (pVehicle->bCollisionProof) m_nFlags |= FLAG_COLLISIONPROOF; if (pVehicle->bMeleeProof) m_nFlags |= FLAG_MELEEPROOF; - if (pVehicle->IsCar() || pVehicle->IsBike()) - m_nCarBombType = ((CAutomobile*)pVehicle)->m_bombType; // NB: cast to CAutomobile is original behaviour + if (pVehicle->bTyresDontBurst) m_nFlags |= FLAG_TIRES_INVULNERABLE; + if (pVehicle->bTakeLessDamage) m_nFlags |= FLAG_STRONG; + if (pVehicle->bIsHeavy) m_nFlags |= FLAG_HEAVY; + if (pVehicle->IsCar()) { + CAutomobile* pAutomobile = (CAutomobile*)pVehicle; + if (pAutomobile->bFixedColour) m_nFlags |= FLAG_PERMANENT_COLOUR; + if (pAutomobile->m_bombType) m_nFlags |= FLAG_BOMB; + if (pAutomobile->bNotDamagedUpsideDown) m_nFlags |= FLAG_NOT_DAMAGED_UPSIDEDOWN; + m_fTractionMultiplier = pAutomobile->m_fTraction; + } + else if (pVehicle->IsBike()) { + CBike* pBike = (CBike*)pVehicle; + if (pBike->bFixedColour) m_nFlags |= FLAG_PERMANENT_COLOUR; + m_fTractionMultiplier = pBike->m_fTraction; + } } CVehicle* CStoredCar::RestoreCar() { CStreaming::RequestModel(m_nModelIndex, STREAMFLAGS_DEPENDENCY); + uint8 owner = RANDOM_VEHICLE; + if (m_nFlags & FLAG_REWARD_VEHICLE) + owner = MISSION_VEHICLE; if (!CStreaming::HasModelLoaded(m_nModelIndex)) return nil; #ifdef FIX_BUGS @@ -1862,19 +2186,19 @@ CVehicle* CStoredCar::RestoreCar() } CVehicle* pVehicle; if (CModelInfo::IsBoatModel(m_nModelIndex)) - pVehicle = new CBoat(m_nModelIndex, RANDOM_VEHICLE); + pVehicle = new CBoat(m_nModelIndex, owner); else if (CModelInfo::IsBikeModel(m_nModelIndex)) { - CBike* pBike = new CBike(m_nModelIndex, RANDOM_VEHICLE); + CBike* pBike = new CBike(m_nModelIndex, owner); pBike->bIsStanding = true; pVehicle = pBike; } else - pVehicle = new CAutomobile(m_nModelIndex, RANDOM_VEHICLE); - pVehicle->SetPosition(m_vecPos); + pVehicle = new CAutomobile(m_nModelIndex, owner); + pVehicle->SetPosition(m_fPosX, m_fPosY, m_fPosZ); pVehicle->SetStatus(STATUS_ABANDONED); - pVehicle->GetForward() = m_vecAngle; - pVehicle->GetRight() = CVector(m_vecAngle.y, -m_vecAngle.x, 0.0f); + pVehicle->GetForward() = CVector(m_fForwardX, m_fForwardY, m_fForwardZ); + pVehicle->GetRight() = CVector(m_fForwardY, -m_fForwardX, 0.0f); pVehicle->GetUp() = CVector(0.0f, 0.0f, 1.0f); pVehicle->pDriver = nil; pVehicle->m_currentColour1 = m_nPrimaryColor; @@ -1891,11 +2215,36 @@ CVehicle* CStoredCar::RestoreCar() } pVehicle->bHasBeenOwnedByPlayer = true; pVehicle->m_nDoorLock = CARLOCK_UNLOCKED; + if (m_nFlags & FLAG_REWARD_VEHICLE) pVehicle->bRewardVehicle = true; if (m_nFlags & FLAG_BULLETPROOF) pVehicle->bBulletProof = true; if (m_nFlags & FLAG_FIREPROOF) pVehicle->bFireProof = true; if (m_nFlags & FLAG_EXPLOSIONPROOF) pVehicle->bExplosionProof = true; if (m_nFlags & FLAG_COLLISIONPROOF) pVehicle->bCollisionProof = true; if (m_nFlags & FLAG_MELEEPROOF) pVehicle->bMeleeProof = true; + if (m_nFlags & FLAG_TIRES_INVULNERABLE) pVehicle->bTyresDontBurst = true; + if (m_nFlags & FLAG_STRONG) pVehicle->bTakeLessDamage = true; + if (m_nFlags & FLAG_HEAVY) { + pVehicle->bIsHeavy = true; + pVehicle->m_fMass = pVehicle->pHandling->GetMass(); + pVehicle->m_fTurnMass = pVehicle->pHandling->GetTurnMass(); + } + else { + pVehicle->bIsHeavy = false; + pVehicle->m_fMass = pVehicle->pHandling->GetMass() * 3.0f; + pVehicle->m_fTurnMass = pVehicle->pHandling->GetTurnMass() * 5.0f; + } + if (pVehicle->IsCar()) { + CAutomobile* pAutomobile = (CAutomobile*)pVehicle; + if (m_nFlags & FLAG_PERMANENT_COLOUR) pAutomobile->bFixedColour = true; + if (m_nFlags & FLAG_BOMB) pAutomobile->m_bombType = CARBOMB_TIMED; + if (m_nFlags & FLAG_NOT_DAMAGED_UPSIDEDOWN) pAutomobile->bNotDamagedUpsideDown = true; + m_fTractionMultiplier = pAutomobile->m_fTraction; + } + else if (pVehicle->IsBike()) { + CBike* pBike = (CBike*)pVehicle; + if (m_nFlags & FLAG_PERMANENT_COLOUR) pBike->bFixedColour = true; + m_fTractionMultiplier = pBike->m_fTraction; + } return pVehicle; } @@ -1910,13 +2259,23 @@ void CGarage::StoreAndRemoveCarsForThisHideout(CStoredCar* aCars, int32 nMax) if (!pVehicle) continue; if (IsPointInsideGarage(pVehicle->GetPosition())) { - if (pVehicle->VehicleCreatedBy != MISSION_VEHICLE) { - if (index < Max(NUM_GARAGE_STORED_CARS, nMax) && !EntityHasASphereWayOutsideGarage(pVehicle, 1.0f)) - aCars[index++].StoreCar(pVehicle); +#if defined GTA_PS2 || defined GTA_MOBILE + if (pVehicle->GetStatus() == STATUS_WRECKED) { CWorld::Players[CWorld::PlayerInFocus].CancelPlayerEnteringCars(pVehicle); CWorld::Remove(pVehicle); delete pVehicle; } + else if (pVehicle->m_bombType == CARBOMB_NONE || pVehicle->bRewardVehicle) // <- probably condition looked different +#endif + { + if (pVehicle->VehicleCreatedBy != MISSION_VEHICLE || pVehicle->bRewardVehicle) { + if (index < Max(NUM_GARAGE_STORED_CARS, nMax) && !EntityHasASphereWayOutsideGarage(pVehicle, 1.0f)) + aCars[index++].StoreCar(pVehicle); + CWorld::Players[CWorld::PlayerInFocus].CancelPlayerEnteringCars(pVehicle); + CWorld::Remove(pVehicle); + delete pVehicle; + } + } } } // why? @@ -2067,7 +2426,7 @@ void CGarage::PlayerArrestedOrDied() case GARAGE_COLLECTCARS_2: case GARAGE_COLLECTCARS_3: case GARAGE_FORCARTOCOMEOUTOF: - case GARAGE_60SECONDS: + case GARAGE_CRATE_GARAGE: case GARAGE_MISSION_KEEPCAR: case GARAGE_FOR_SCRIPT_TO_OPEN: case GARAGE_HIDEOUT_ONE: @@ -2254,14 +2613,12 @@ void CGarages::SetAllDoorsBackToOriginalHeight() } } +#define GARAGE_SIZE 208 + void CGarages::Save(uint8 * buf, uint32 * size) { -//INITSAVEBUF - *size = 7876; // for some reason it's not actual size again - //*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage)); -#if !defined THIS_IS_STUPID && defined COMPATIBLE_SAVES - memset(buf + 7340, 0, *size - 7340); // garbage data is written otherwise -#endif +INITSAVEBUF + *size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * GARAGE_SIZE); CloseHideOutGaragesBeforeSave(); WriteSaveBuf(buf, NumGarages); WriteSaveBuf(buf, (uint32)BombsAreFree); @@ -2302,12 +2659,16 @@ void CGarages::Save(uint8 * buf, uint32 * size) WriteSaveBuf(buf, aGarages[i].m_vDir1); WriteSaveBuf(buf, aGarages[i].m_vDir2); WriteSaveBuf(buf, aGarages[i].m_fSupZ); + WriteSaveBuf(buf, aGarages[i].m_vecSSGaragePos); + WriteSaveBuf(buf, aGarages[i].m_fSSGarageAngle); WriteSaveBuf(buf, aGarages[i].m_fDir1Len); WriteSaveBuf(buf, aGarages[i].m_fDir2Len); WriteSaveBuf(buf, aGarages[i].m_fInfX); WriteSaveBuf(buf, aGarages[i].m_fSupX); WriteSaveBuf(buf, aGarages[i].m_fInfY); WriteSaveBuf(buf, aGarages[i].m_fSupY); + WriteSaveBuf(buf, aGarages[i].m_nTimeCrusherCraneActivated); + ZeroSaveBuf(buf, 4); WriteSaveBuf(buf, aGarages[i].m_fDoorPos); WriteSaveBuf(buf, aGarages[i].m_fDoorHeight); WriteSaveBuf(buf, aGarages[i].m_fDoor1X); @@ -2320,33 +2681,26 @@ void CGarages::Save(uint8 * buf, uint32 * size) WriteSaveBuf(buf, aGarages[i].m_bCollectedCarsState); ZeroSaveBuf(buf, 3 + 4); ZeroSaveBuf(buf, sizeof(aGarages[i].m_sStoredCar)); + WriteSaveBuf(buf, aGarages[i].m_bInitialized); + ZeroSaveBuf(buf, 3); +#ifdef GTA_NETWORK + ZeroSaveBuf(buf, 4); +#endif + WriteSaveBuf(buf, aGarages[i].m_bSSGarageAcceptedVehicle); + WriteSaveBuf(buf, aGarages[i].m_bLocked); + WriteSaveBuf(buf, aGarages[i].m_nSSGarageState); + WriteSaveBuf(buf, aGarages[i].m_bSSGarageStateChanging); #else WriteSaveBuf(buf, aGarages[i]); #endif } -//VALIDATESAVEBUF(*size); -} - -const CStoredCar &CStoredCar::operator=(const CStoredCar & other) -{ - m_nModelIndex = other.m_nModelIndex; - m_vecPos = other.m_vecPos; - m_vecAngle = other.m_vecAngle; - m_nFlags = other.m_nFlags; - m_nPrimaryColor = other.m_nPrimaryColor; - m_nSecondaryColor = other.m_nSecondaryColor; - m_nRadioStation = other.m_nRadioStation; - m_nVariationA = other.m_nVariationA; - m_nVariationB = other.m_nVariationB; - m_nCarBombType = other.m_nCarBombType; - return *this; +VALIDATESAVEBUF(*size); } void CGarages::Load(uint8* buf, uint32 size) { -//INITSAVEBUF - assert(size == 7876); - //assert(size == (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage))); +INITSAVEBUF + assert(size == (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * GARAGE_SIZE)); CloseHideOutGaragesBeforeSave(); ReadSaveBuf(&NumGarages, buf); int32 tempInt; @@ -2390,12 +2744,16 @@ void CGarages::Load(uint8* buf, uint32 size) ReadSaveBuf(&aGarages[i].m_vDir1, buf); ReadSaveBuf(&aGarages[i].m_vDir2, buf); ReadSaveBuf(&aGarages[i].m_fSupZ, buf); + ReadSaveBuf(&aGarages[i].m_vecSSGaragePos, buf); + ReadSaveBuf(&aGarages[i].m_fSSGarageAngle, buf); ReadSaveBuf(&aGarages[i].m_fDir1Len, buf); ReadSaveBuf(&aGarages[i].m_fDir2Len, buf); ReadSaveBuf(&aGarages[i].m_fInfX, buf); ReadSaveBuf(&aGarages[i].m_fSupX, buf); ReadSaveBuf(&aGarages[i].m_fInfY, buf); ReadSaveBuf(&aGarages[i].m_fSupY, buf); + ReadSaveBuf(&aGarages[i].m_nTimeCrusherCraneActivated, buf); + SkipSaveBuf(buf, 4); ReadSaveBuf(&aGarages[i].m_fDoorPos, buf); ReadSaveBuf(&aGarages[i].m_fDoorHeight, buf); ReadSaveBuf(&aGarages[i].m_fDoor1X, buf); @@ -2408,6 +2766,15 @@ void CGarages::Load(uint8* buf, uint32 size) ReadSaveBuf(&aGarages[i].m_bCollectedCarsState, buf); SkipSaveBuf(buf, 3 + 4); SkipSaveBuf(buf, sizeof(aGarages[i].m_sStoredCar)); + ReadSaveBuf(&aGarages[i].m_bInitialized, buf); + SkipSaveBuf(buf, 3); +#ifdef GTA_NETWORK + SkipSaveBuf(buf, 4); +#endif + ReadSaveBuf(&aGarages[i].m_bSSGarageAcceptedVehicle, buf); + ReadSaveBuf(&aGarages[i].m_bLocked, buf); + ReadSaveBuf(&aGarages[i].m_nSSGarageState, buf); + ReadSaveBuf(&aGarages[i].m_bSSGarageStateChanging, buf); #else ReadSaveBuf(&aGarages[i], buf); #endif @@ -2421,17 +2788,37 @@ void CGarages::Load(uint8* buf, uint32 size) else aGarages[i].UpdateDoorsHeight(); } -//VALIDATESAVEBUF(size); +VALIDATESAVEBUF(size); MessageEndTime = 0; bCamShouldBeOutisde = false; MessageStartTime = 0; + hGarages = DMAudio.CreateEntity(AUDIOTYPE_GARAGE, (void*)1); + if (hGarages >= 0) + DMAudio.SetEntityStatus(hGarages, TRUE); } bool CGarages::IsModelIndexADoor(uint32 id) { - return id == MI_GARAGEDOOR2 || + return id == MI_GARAGEDOOR1 || + id == MI_GARAGEDOOR17 || + id == MI_GARAGEDOOR27 || + id == MI_GARAGEDOOR28 || + id == MI_GARAGEDOOR29 || + id == MI_GARAGEDOOR30 || + id == MI_GARAGEDOOR31 || + id == MI_GARAGEDOOR32 || + id == MI_GARAGEDOOR33 || + id == MI_GARAGEDOOR34 || + id == MI_GARAGEDOOR35 || + id == MI_GARAGEDOOR36 || + id == MI_GARAGEDOOR37 || + id == MI_GARAGEDOOR38 || + id == MI_GARAGEDOOR39 || + id == MI_CRUSHERBODY || + id == MI_CRUSHERLID || + id == MI_GARAGEDOOR2 || id == MI_GARAGEDOOR3 || id == MI_GARAGEDOOR4 || id == MI_GARAGEDOOR5 || @@ -2453,7 +2840,8 @@ CGarages::IsModelIndexADoor(uint32 id) id == MI_GARAGEDOOR23 || id == MI_GARAGEDOOR24 || id == MI_GARAGEDOOR25 || - id == MI_GARAGEDOOR26; + id == MI_GARAGEDOOR26 || + id == MI_DOOR2_SJL; } void CGarages::StopCarFromBlowingUp(CAutomobile* pCar) @@ -2493,3 +2881,109 @@ bool CGarage::IsPlayerEntirelyInsideGarage() { return IsEntityEntirelyInside3D(FindPlayerVehicle() ? (CEntity*)FindPlayerVehicle() : (CEntity*)FindPlayerPed(), 0.0f); } + +int16 CGarages::AddCrateGarage(CVector pos, float angle) +{ + CMatrix matrix; + matrix.SetUnity(); + matrix.SetRotateZOnly(DEGTORAD(angle)); + CStreaming::RequestModel(MI_CRATE_SJL, STREAMFLAGS_DEPENDENCY); +#ifdef FIX_BUGS + CStreaming::LoadAllRequestedModels(false); +#endif + CObject* pCrate = new CObject(MI_CRATE_SJL, false); + pCrate->ObjectCreatedBy = MISSION_OBJECT; + pCrate->SetPosition(pos); + pCrate->SetOrientation(0.0f, 0.0f, DEGTORAD(angle)); + pCrate->GetMatrix().UpdateRW(); + pCrate->UpdateRwFrame(); + pCrate->bAffectedByGravity = false; + pCrate->m_phy_flagA08 = true; + pCrate->bExplosionProof = true; + pCrate->bIsStatic = false; + + CStreaming::RequestModel(MI_DOOR1_SJL, STREAMFLAGS_DEPENDENCY); +#ifdef FIX_BUGS + CStreaming::LoadAllRequestedModels(false); +#endif + CObject* pDoor1 = new CObject(MI_DOOR1_SJL, false); + pDoor1->ObjectCreatedBy = MISSION_OBJECT; + CVector vDoor1Pos = matrix * CVector(0.0f, 5.64f, 5.168f); + pDoor1->SetPosition(vDoor1Pos); + pDoor1->SetOrientation(0.0f, 0.0f, DEGTORAD(angle)); + pDoor1->GetMatrix().UpdateRW(); + pDoor1->UpdateRwFrame(); + pDoor1->bAffectedByGravity = false; + pDoor1->m_phy_flagA08 = true; + pDoor1->bExplosionProof = true; + pDoor1->bIsStatic = false; + + CStreaming::RequestModel(MI_DOOR2_SJL, STREAMFLAGS_DEPENDENCY); +#ifdef FIX_BUGS + CStreaming::LoadAllRequestedModels(false); +#endif + CObject* pDoor2 = new CObject(MI_DOOR2_SJL, false); + pDoor2->ObjectCreatedBy = MISSION_OBJECT; + CVector vDoor2Pos = matrix * CVector(0.0f, -5.64f, 5.168f); + pDoor2->SetPosition(vDoor2Pos); + pDoor2->SetOrientation(0.0f, 0.0f, DEGTORAD(angle)); + pDoor2->GetMatrix().UpdateRW(); + pDoor2->UpdateRwFrame(); + pDoor2->bAffectedByGravity = false; + pDoor2->m_phy_flagA08 = true; + pDoor2->bExplosionProof = true; + pDoor2->bIsStatic = false; + + CWorld::Add(pCrate); + CWorld::Add(pDoor1); + CWorld::Add(pDoor2); + + CVector corner = matrix * CVector(-3.0f, -3.5f, -0.5f) + pos; + CVector xplane = matrix * CVector(0.0f, 2.0f, 0.0f) + pos; + CVector yplane = matrix * CVector(0.0f, 0.0f, 0.0f) + pos; + + printf("Posttrans Corner[%f][%f][%f] XPlane[%f][%f][%f] YPlane[%f][%f][%f]", + corner.x, corner.y, corner.z, xplane.x, xplane.y, xplane.z, yplane.x, yplane.y, yplane.z); + int16 index = AddOne(corner.x, corner.y, corner.z, xplane.x, xplane.y, yplane.x, yplane.y, pos.z + 4.0f, GARAGE_CRATE_GARAGE, 0); + SetLeaveCameraForThisGarage(index); + CGarage* pGarage = &aGarages[index]; + pGarage->m_bSSGarageAcceptedVehicle = false; + pGarage->m_bSSGarageStateChanging = false; + pGarage->m_vecSSGaragePos = pos; + pGarage->m_fSSGarageAngle = angle; + return index; +} + +#ifdef GTA_NETWORK +void CGarages::RemoveAllCrateGarages() +{ + for (uint32 i = 0; i < NUM_GARAGES; i++) { + CGarage* pGarage = &aGarages[i]; + if (pGarage->m_eGarageType == GARAGE_CRATE_GARAGE) { + pGarage->m_eGarageType = GARAGE_NONE; + pGarage->m_bSSGarageStateChanging = false; + pGarage->m_bSSGarageAcceptedVehicle = false; + pGarage->m_pSSVehicle = nil; + --NumGarages; + } + } +} + +bool CGarages::HasSSGarageAcceptedVehicle(int16 garage) +{ + return aGarages[garage].m_bSSGarageAcceptedVehicle; +} + +void CGarages::SetVehicleForSSGarage(bool state, int16 garage, void* pVehicle) +{ + CGarage* pGarage = &aGarages[garage]; + pGarage->m_pSSVehicle = pVehicle; + pGarage->m_nSSGarageState = state; + pGarage->m_bSSGarageAcceptedVehicle = false; + if (!pVehicle) { + if (pGarage->m_pSSTargetCar) + pGarage->m_pSSTargetCar->CleanUpOldReference((CEntity**)pGarage->m_pSSTargetCar); + pGarage->m_pSSTargetCar = nil; + } +} +#endif diff --git a/src/control/Garages.h b/src/control/Garages.h index 358d404d..5230b657 100644 --- a/src/control/Garages.h +++ b/src/control/Garages.h @@ -15,6 +15,7 @@ enum eGarageState GS_OPENEDCONTAINSCAR, GS_CLOSEDCONTAINSCAR, GS_AFTERDROPOFF, + GS_WAITINGFORCAR }; enum eGarageType @@ -31,7 +32,7 @@ enum eGarageType GARAGE_COLLECTCARS_2, GARAGE_COLLECTCARS_3, GARAGE_FORCARTOCOMEOUTOF, - GARAGE_60SECONDS, + GARAGE_CRATE_GARAGE, GARAGE_CRUSHER, GARAGE_MISSION_KEEPCAR, GARAGE_FOR_SCRIPT_TO_OPEN, @@ -58,7 +59,7 @@ enum { TOTAL_COLLECTCARS_GARAGES = 4, TOTAL_HIDEOUT_GARAGES = 12, - TOTAL_COLLECTCARS_CARS = 6 + TOTAL_COLLECTCARS_CARS = 16 }; class CStoredCar @@ -69,10 +70,22 @@ class CStoredCar FLAG_EXPLOSIONPROOF = 0x4, FLAG_COLLISIONPROOF = 0x8, FLAG_MELEEPROOF = 0x10, + FLAG_TIRES_INVULNERABLE = 0x20, + FLAG_STRONG = 0x40, + FLAG_HEAVY = 0x80, + FLAG_PERMANENT_COLOUR = 0x100, + FLAG_BOMB = 0x200, + FLAG_NOT_DAMAGED_UPSIDEDOWN = 0x400, + FLAG_REWARD_VEHICLE = 0x8000 }; int32 m_nModelIndex; - CVector m_vecPos; - CVector m_vecAngle; + float m_fPosX; + float m_fPosY; + float m_fPosZ; + float m_fForwardX; + float m_fForwardY; + float m_fForwardZ; + float m_fTractionMultiplier; int32 m_nFlags; int8 m_nPrimaryColor; int8 m_nSecondaryColor; @@ -84,7 +97,6 @@ public: void Init() { m_nModelIndex = 0; } void Clear() { m_nModelIndex = 0; } bool HasCar() { return m_nModelIndex != 0; } - const CStoredCar &operator=(const CStoredCar& other); void StoreCar(CVehicle*); CVehicle* RestoreCar(); }; @@ -118,12 +130,16 @@ public: CVector2D m_vDir1; CVector2D m_vDir2; float m_fSupZ; + CVector m_vecSSGaragePos; + float m_fSSGarageAngle; float m_fDir1Len; float m_fDir2Len; float m_fInfX; float m_fSupX; float m_fInfY; float m_fSupY; + uint32 m_nTimeCrusherCraneActivated; + CVehicle* m_pSSTargetCar; float m_fDoorPos; float m_fDoorHeight; float m_fDoor1X; @@ -136,6 +152,14 @@ public: uint8 m_bCollectedCarsState; CVehicle *m_pTarget; CStoredCar m_sStoredCar; // not needed + bool m_bInitialized; +#ifdef GTA_NETWORK + void* m_pSSVehicle; // some multiplayer vehicle structure, +104 == GetVehiclePointer +#endif + bool m_bSSGarageAcceptedVehicle; + bool m_bLocked; + bool m_nSSGarageState; + bool m_bSSGarageStateChanging; void OpenThisGarage(); void CloseThisGarage(); @@ -222,6 +246,7 @@ public: static CGarage aGarages[NUM_GARAGES]; static CStoredCar aCarsInSafeHouses[TOTAL_HIDEOUT_GARAGES][NUM_GARAGE_STORED_CARS]; static bool bCamShouldBeOutisde; + static uint8 CrusherRewardMultiplier; static void Init(void); #ifndef PS2 @@ -269,13 +294,13 @@ public: static void CloseHideOutGaragesBeforeSave(void); static int32 CountCarsInHideoutGarage(uint8); static int32 GetBombTypeForGarageType(uint8 type) { return type - GARAGE_BOMBSHOP1 + 1; } - static int32 GetCarsCollectedIndexForGarageType(uint8 type) + static int32 GetCarsCollectedIndexForGarageType(uint8 type, uint32& total) { switch (type) { - case GARAGE_COLLECTCARS_1: return 0; - case GARAGE_COLLECTCARS_2: return 1; - case GARAGE_COLLECTCARS_3: return 2; - case GARAGE_COLLECTCARS_4: return 3; + case GARAGE_COLLECTCARS_1: total = TOTAL_COLLECTCARS_CARS; return 0; + case GARAGE_COLLECTCARS_2: total = 0; return 1; + case GARAGE_COLLECTCARS_3: total = 0; return 2; + case GARAGE_COLLECTCARS_4: total = 0; return 3; default: assert(0); } return 0; @@ -300,4 +325,15 @@ public: } static bool IsThisGarageTypeSafehouse(uint8 type) { return FindSafeHouseIndexForGarageType(type) >= 0; } + static bool InitDoorGubbins(uint32, uint8); + static void SetupAnyGaragesForThisIsland(void); + static void LockGarage(int16, bool); + static int16 AddCrateGarage(CVector, float); + +#ifdef GTA_NETWORK + static void RemoveAllCrateGarages(); + static bool HasSSGarageAcceptedVehicle(int16 garage); + static void SetVehicleForSSGarage(bool state, int16 garage, void* pVehicle); // void* -> ? +#endif + }; diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index 80d40b45..f9d58687 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -1763,18 +1763,18 @@ CPathFind::TestCoorsCloseness(CVector target, uint8 type, CVector start) float dist; if(type == PATH_CAR) - DoPathSearch(type, start, -1, target, pNodeList, &DummyResult, 32, nil, &dist, 999999.88f, -1); + DoPathSearch(type, start, -1, target, pNodeList, &DummyResult, 32, nil, &dist, 170.0f, -1); else DoPathSearch(type, start, -1, target, nil, &DummyResult2, 0, nil, &dist, 50.0f, -1); #ifdef FIX_BUGS // dist has GenerationDistMultiplier as a factor, so our reference dist should have it too if(type == PATH_CAR) - return dist < 150.0f*TheCamera.GenerationDistMultiplier; + return dist < 180.0f*TheCamera.GenerationDistMultiplier; else return dist < 100.0f*TheCamera.GenerationDistMultiplier; #else if(type == PATH_CAR) - return dist < 150.0f; + return dist < 180.0f; else return dist < 100.0f; #endif diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index ab3e0c7c..9233a172 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -1738,4 +1738,20 @@ CPed::CreateDeadPedPickupCoors(float *x, float *y, float *z) *y = GetPosition().y; *z = GetPosition().z + 0.4f; #undef NUMBER_OF_ATTEMPTS -}
\ No newline at end of file +} + +float CPickups::GetValue(int index) +{ + int i = GetActualPickupIndex(index); + if (i == -1) + return 0.0f; + return aPickUps[i].m_fRevenue; +} + +void CPickups::SetValue(int index, float value) +{ + int i = GetActualPickupIndex(index); + if (i == -1) + return; + aPickUps[i].m_fRevenue = value; +} diff --git a/src/control/Pickups.h b/src/control/Pickups.h index 0de7f827..fd8b15cd 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -117,6 +117,9 @@ public: static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType); static CPickup *FindPickUpForThisObject(CEntity*); + + static float GetValue(int); + static void SetValue(int, float); }; extern uint16 AmmoForWeapon[WEAPONTYPE_TOTALWEAPONS + 1]; diff --git a/src/control/Remote.cpp b/src/control/Remote.cpp index 047b19f3..dc025549 100644 --- a/src/control/Remote.cpp +++ b/src/control/Remote.cpp @@ -9,7 +9,7 @@ #include "PlayerInfo.h" #include "Vehicle.h" -void +CVehicle* CRemote::GivePlayerRemoteControlledCar(float x, float y, float z, float rot, uint16 model) { CAutomobile *car = new CAutomobile(model, MISSION_VEHICLE); @@ -40,6 +40,7 @@ CRemote::GivePlayerRemoteControlledCar(float x, float y, float z, float rot, uin TheCamera.SetZoomValueCamStringScript(0); } else TheCamera.TakeControl(car, CCam::MODE_BEHINDCAR, INTERPOLATION, CAMCONTROL_SCRIPT); + return car; } void diff --git a/src/control/Remote.h b/src/control/Remote.h index 72cabb7c..4c40dd96 100644 --- a/src/control/Remote.h +++ b/src/control/Remote.h @@ -3,6 +3,6 @@ class CRemote { public: - static void GivePlayerRemoteControlledCar(float, float, float, float, uint16); + static CVehicle* GivePlayerRemoteControlledCar(float, float, float, float, uint16); static void TakeRemoteControlledCarFromPlayer(bool blowUp = true); }; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 71b28f7a..8d7dbf85 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -1285,7 +1285,7 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca DMAudio.SetEffectsFadeVol(0); DMAudio.SetMusicFadeVol(0); CEscalators::Shutdown(); - CWaterCreatures::RemoveAll(); + //CWaterCreatures::RemoveAll(); int current; for (current = 0; current < NUM_REPLAYBUFFERS; current++) if (BufferStatus[current] == REPLAYBUFFER_RECORD) diff --git a/src/control/Replay.h b/src/control/Replay.h index 5dd8b651..98e02577 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -46,7 +46,7 @@ enum { struct CStoredDetailedAnimationState { - uint8 aAnimId[NUM_MAIN_ANIMS_IN_REPLAY]; + uint16 aAnimId[NUM_MAIN_ANIMS_IN_REPLAY]; uint8 aCurTime[NUM_MAIN_ANIMS_IN_REPLAY]; uint8 aSpeed[NUM_MAIN_ANIMS_IN_REPLAY]; uint8 aBlendAmount[NUM_MAIN_ANIMS_IN_REPLAY]; @@ -54,7 +54,7 @@ struct CStoredDetailedAnimationState uint8 aFunctionCallbackID[NUM_MAIN_ANIMS_IN_REPLAY]; uint16 aFlags[NUM_MAIN_ANIMS_IN_REPLAY]; uint8 aGroupId[NUM_MAIN_ANIMS_IN_REPLAY]; - uint8 aAnimId2[NUM_PARTIAL_ANIMS_IN_REPLAY]; + uint16 aAnimId2[NUM_PARTIAL_ANIMS_IN_REPLAY]; uint8 aCurTime2[NUM_PARTIAL_ANIMS_IN_REPLAY]; uint8 aSpeed2[NUM_PARTIAL_ANIMS_IN_REPLAY]; uint8 aBlendAmount2[NUM_PARTIAL_ANIMS_IN_REPLAY]; diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 76ab9471..f52dda03 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -11,15 +11,14 @@ #include "CivilianPed.h" #include "Clock.h" #include "CopPed.h" +#include "Coronas.h" #include "Debug.h" #include "DMAudio.h" #include "EmergencyPed.h" #include "FileMgr.h" #include "Frontend.h" #include "General.h" -#ifdef MISSION_REPLAY #include "GenericGameStorage.h" -#endif #include "HandlingMgr.h" #include "Heli.h" #include "Hud.h" @@ -49,16 +48,19 @@ #include "Timecycle.h" #include "TxdStore.h" #include "Bike.h" +#include "smallHeap.h" #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #include <stdarg.h> #endif -uint8 CTheScripts::ScriptSpace[SIZE_SCRIPT_SPACE]; +//--LCS: file done except TODOs and command table +uint8* CTheScripts::ScriptSpace; CRunningScript CTheScripts::ScriptsArray[MAX_NUM_SCRIPTS]; intro_text_line CTheScripts::IntroTextLines[MAX_NUM_INTRO_TEXT_LINES]; intro_script_rectangle CTheScripts::IntroRectangles[MAX_NUM_INTRO_RECTANGLES]; CSprite2d CTheScripts::ScriptSprites[MAX_NUM_SCRIPT_SRPITES]; script_sphere_struct CTheScripts::ScriptSphereArray[MAX_NUM_SCRIPT_SPHERES]; +tCollectiveData CTheScripts::CollectiveArray[MAX_NUM_COLLECTIVES]; tUsedObject CTheScripts::UsedObjectArray[MAX_NUM_USED_OBJECTS]; int32 CTheScripts::MultiScriptArray[MAX_NUM_MISSION_SCRIPTS]; tBuildingSwap CTheScripts::BuildingSwapArray[MAX_NUM_BUILDING_SWAPS]; @@ -94,10 +96,19 @@ uint32 CTheScripts::LastMissionPassedTime; uint16 CTheScripts::NumberOfExclusiveMissionScripts; bool CTheScripts::bPlayerHasMetDebbieHarry; bool CTheScripts::bPlayerIsInTheStatium; -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) -int16 CTheScripts::CardStack[CARDS_IN_DECK * MAX_DECKS]; -int16 CTheScripts::CardStackPosition; -#endif +int CTheScripts::AllowedCollision[MAX_ALLOWED_COLLISIONS]; +int CTheScripts::FSDestroyedFlag; +short* CTheScripts::SavedVarIndices; +int CTheScripts::NumSaveVars; +int gScriptsFile = -1; +int CTheScripts::NextProcessId = 1; +bool CTheScripts::InTheScripts; +CRunningScript* pCurrent; +uint16 CTheScripts::NumTrueGlobals; +uint16 CTheScripts::MostGlobals; +CVector gVectorSetInLua; +int CTheScripts::NextScriptCoronaID; +base::cSList<script_corona> CTheScripts::mCoronas; #ifdef MISSION_REPLAY @@ -354,6 +365,11 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_WHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_WHILENOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_ENDWHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_214, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_215, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_216, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_217, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_218, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_ANDOR, INPUT_ARGUMENTS(ARGTYPE_ANDOR,), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_LAUNCH_MISSION, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_MISSION_HAS_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), @@ -408,7 +424,7 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_ADD_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_IS_SCORE_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_STORE_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_CAR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_CAR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL_NO_DROP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_IS_WANTED_LEVEL_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), @@ -1216,7 +1232,7 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_IS_CAR_PASSENGER_SEAT_FREE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_GET_CHAR_IN_CAR_PASSENGER_SEAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), REGISTER_COMMAND(COMMAND_SET_CHAR_IS_CHRIS_CRIMINAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_START_CREDITS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_START_CREDITS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_STOP_CREDITS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_ARE_CREDITS_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_CREATE_SINGLE_PARTICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), @@ -1304,7 +1320,7 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_SHUT_CHAR_UP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_SET_ENABLE_RC_DETONATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_SET_CAR_RANDOM_ROUTE_SEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_IS_ANY_PICKUP_AT_COORDS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_ANY_PICKUP_AT_COORDS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_GET_FIRST_PICKUP_COORDS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), REGISTER_COMMAND(COMMAND_GET_NEXT_PICKUP_COORDS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), REGISTER_COMMAND(COMMAND_REMOVE_ALL_CHAR_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), @@ -1576,39 +1592,222 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_REGISTER_FIRE_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_IS_AUSTRALIAN_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_DISARM_CAR_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), -#if (defined GTAVC_JP_PATCH || defined SUPPORT_JAPANESE_SCRIPT) REGISTER_COMMAND(COMMAND_IS_JAPANESE_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), -#elif (!defined GTA_PS2) - REGISTER_COMMAND(COMMAND_SET_ONSCREEN_COUNTER_FLASH_WHEN_FIRST_DISPLAYED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), -#endif -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - REGISTER_COMMAND(COMMAND_SHUFFLE_CARD_DECKS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_FETCH_NEXT_CARD, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_GET_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_IS_DEBUG_CAMERA_ON, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), - REGISTER_COMMAND(COMMAND_ADD_TO_OBJECT_ROTATION_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_SET_OBJECT_ROTATION_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_IS_OBJECT_STATIC, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), - REGISTER_COMMAND(COMMAND_GET_ANGLE_BETWEEN_2D_VECTORS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_DO_2D_RECTANGLES_COLLIDE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""), - REGISTER_COMMAND(COMMAND_GET_OBJECT_ROTATION_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_ADD_VELOCITY_RELATIVE_TO_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_GET_OBJECT_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), -#endif -#if (defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT) - REGISTER_COMMAND(COMMAND_MARK_CUTSCENE_START, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_MARK_CUTSCENE_END, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_CUTSCENE_SCROLL, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), -#elif (defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - REGISTER_COMMAND(COMMAND_IS_MISSION_SKIP, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_SET_IN_AMMUNATION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_DO_SAVE_GAME, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_IS_RETRY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), - REGISTER_COMMAND(COMMAND_DUMMY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_MARK_CUTSCENE_START, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_MARK_CUTSCENE_END, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_CUTSCENE_SCROLL, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), -#endif + REGISTER_COMMAND(COMMAND_1442, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1443, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_DISTANCE_BETWEEN_2D_POINTS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_DISTANCE_BETWEEN_3D_POINTS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DOT_PRODUCT_2D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DOT_PRODUCT_3D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DEBUG_PRINT_WITH_1_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_DEBUG_PRINT_WITH_2_FLOATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_DEBUG_PRINT_WITH_3_FLOATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_PAD_BUTTON_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_NAVIGATION_ARROW, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CLEAR_NAVIGATION_ARROW, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CALL, INPUT_ARGUMENTS(ARGTYPE_FUNCTION, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CALLNOT, INPUT_ARGUMENTS(ARGTYPE_FUNCTION, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CAR_AUTOMOBILE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CAR_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CAR_PLANE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CAR_HELI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_1460, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1461, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1462, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1463, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1464, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1465, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1466, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1467, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1468, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1469, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1470, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1471, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1472, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1473, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1474, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1475, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1476, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_RETURN_IF_TRUE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_RETURN_TRUE_IF_TRUE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_BEHIND, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_RC_HELI_HEIGHT_LIMIT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CREATE_SCRIPT_CORONA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REMOVE_SCRIPT_CORONA, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_BOAT_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CAR_DRIVER_BEING_JACKED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_IN_FRONT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAR_TILTED_BY_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_WEAPON_TYPE_FOR_PICKUP_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_PLAYER_USING_FIRST_PERSON_WEAPON_CAMERA, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_1489, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1490, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1491, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_DEBUG_MENU_ACTIVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_DRAW_HUD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_AREA_NO_CHECKS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_IN_AREA_NO_CHECKS_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_STORE_CAR_COLLIDED_WITH_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DISABLE_FERRY_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ENABLE_FERRY_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_CLOSEST_DOCKED_FERRY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_OPEN_FERRY_DOOR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CLOSE_FERRY_DOOR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_FERRY_DOOR_OPEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_FERRY_DOOR_CLOSED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SKIP_FERRY_TO_NEXT_DOCK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_DROPS_WEAPONS_ON_DEATH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CHAR_CROUCHING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_GET_FERRY_BOARDING_SPACE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_FERRY_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_FERRIES_DISABLED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_COMPLETE_FERRY_DOOR_MOVEMENT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_OVERRIDE_CAR_REMOTE_CONTROL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CANCEL_REMOTE_MODE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_CAR_SOLD, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_WITH_CAR_SALES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_BRIDGE_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_OBJECT_TURN_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_OBJECT_MASS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_HAS_CUTSCENE_LOADED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_UNIQUE_JUMPS_FOUND, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_HIDDEN_PACKAGES_COLLECTED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_BIKE_SOLD, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_WITH_BIKE_SALES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_PACKAGE_SMUGGLED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_SMUGGLER_WASTED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_FASTEST_SMUGGLING_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_DIVE_FROM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_WRECK_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_IN_COACH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_COLLECTING_TRASH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_HITMAN_KILLED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_GUARDIAN_ANGEL_MISSION_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_HIGHEST_GUARDIAN_ANGEL_JUSTICE_DISHED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_BEST_BANDIT_LAP_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_BEST_BANDIT_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_MOST_TIME_LEFT_TRAIN_RACE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_HIGHEST_TRAIN_CASH_EARNED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_FASTEST_HELI_RACE_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_BEST_HELI_RACE_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_OUTFIT_CHANGE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_STREET_RACE_FASTEST_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_STREET_RACE_FASTEST_LAP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_STREET_RACE_BEST_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_HAS_OBJECT_BEEN_DAMAGED_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_CLEAR_OBJECT_LAST_WEAPON_DAMAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAR_TURN_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAR_MOVE_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_OBJECT_PROOFS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_CAMERA_PED_ZOOM_INDICATOR, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAMERA_PED_ZOOM_INDICATOR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_CAR_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAR_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_DEBUG_MENU_ON, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_OPEN_VAN_BACK_DOORS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_CHAR_THREAT_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_FREEZE_PED_ZOOM_SWITCH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_OBJECT_RENDERED_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_IN_AREA_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_PLAYER_MADE_SAFE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_IF_FREE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_E3_BUILD, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_DECLARE_FORT_STAUNTON_DESTROYED_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CLEAR_BIG_MESSAGES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CLEAR_AREA_OF_OBJECTS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_LOAD_NON_STANDARD_PED_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_UNLOAD_NON_STANDARD_PED_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1566, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_BUILD_WORLD_GEOMETRY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_STORE_BUILDING_SWAP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_MULTIPLAYER_ACTIVE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_GET_MULTIPLAYER_MODE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_MULTIPLAYER_SCRIPT_DONE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_MULTIPLAYER_SERVER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_MULTIPLAYER_TEAM_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_GET_MULTIPLAYER_TEAM_ID, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DOES_SHORTCUT_TAXI_EXIST, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_ONSCREEN_TIMER_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_ONSCREEN_TIMER_BACKGROUND_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REMOVE_CAR_BOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_POINT_3D_MARKER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_VECTOR_FROM_MULTIPLAYER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_FOREVER_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SWITCH_FERRY_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_MAX_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_SHOOT_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_ATTACK_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_HELI_ROTOR_BLADES_FULLSPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CRUSHER_REWARD_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SWAP_BUILDINGS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_STREAM_BUILDING_SWAPS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_IS_WORLD_STREAMING_COMPLETE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SWAP_TO_STREAMED_SECTOR, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_ATTACKS_PLAYER_WITH_COPS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_FACE_PLANT_DISTANCE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_MAX_SECONDS_ON_CARNAGE_LEFT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_MAX_KILLS_ON_RC_TRIAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_HIGHEST_LEVEL_SLASH_TV, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_WITH_SLASH_TV, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_TOTAL_KILLS_ON_SLASH_TV, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_NOODLES_DELIVERED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_SCRAPYARD_CHALLENGE_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_9MM_MAYHEM_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_SCOOTER_SHOOTER_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_MONEY_MADE_FROM_TOURIST, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_TOURISTS_TAKEN_TO_SPOTS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_EXPORTED_CARS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_TOTAL_EXPORT_CARS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_DIRT_BIKE_FASTEST_LAP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_DIRT_BIKE_FASTEST_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_DIRT_BIKE_AIR_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_ARROW_3D_MARKER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_NOW_OVERRIDE_FADE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_PICKUP_VALUE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_PICKUP_VALUE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_DEVELOPER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_DEVELOPER_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_WICHITA_WIPEOUT_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ATTACH_OBJECT_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_DETACH_OBJECT_FROM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_PAD_STICKS_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_SUBTITLE_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_SUBTITLE_NOW_OVERRIDE_FADE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_SUBTITLE_NOW_NO_BRIEF, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_NOW_NO_BRIEF, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_ANGLE_BETWEEN_POINTS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_OVERRIDE_CHAR_MOVE_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_1627, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ENABLE_EMERGENCY_VEHICLES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_ADD_UNLOCKED_COSTUME, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CLEAR_MULTIPLAYER_SPLASH_SCREEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_NOW_NO_BRIEF, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_OBJECT_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_OBJECT_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CHANGE_ONSCREEN_COUNTER_PREFIX, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_STORE_PLAYER_OUTFIT, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_PLAYER_CURRENT_WEAPON_AMMO_IN_CLIP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_WAIT_STATE_REPEAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_BEST_TIME_GOGO_FAGGIO, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_LOCK_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_FINAL_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_ALLOWED_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_REGISTER_GUARDIAN_ANGEL_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_2_STRINGS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_GET_PLAYER_STORED_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), + REGISTER_COMMAND(COMMAND_DISABLE_PAUSE_MENU, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_IS_CHANNEL_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CLOCK_EVENT_WARNING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_EXTRA_COLOUR_LIGHT_DIRECTION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CHAR_CAN_BE_TARGETTED_BY_LEADER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_NO_BRIEF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_FOREVER_NO_BRIEF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_ALWAYS_NO_BRIEF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_PRINT_HELP_FOREVER_ALWAYS_NO_BRIEF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_SET_CAR_IS_REWARD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_FREEZE_ALL_PLAYER_FOLLOWERS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), }; #undef REGISTER_COMMAND #undef INPUT_ARGUMENTS @@ -1652,7 +1851,7 @@ void FlushLog() const uint32 CRunningScript::nSaveStructSize = #ifdef COMPATIBLE_SAVES - 136; + 536; #else sizeof(CRunningScript); #endif @@ -1681,6 +1880,23 @@ cleanup_entity_struct* CMissionCleanup::FindFree() return nil; } +void SleepThisPed(cleanup_entity_struct* pCleanup, CPed* pPed) +{ + printf("*** SLEEPING PED %i %i\n", pCleanup->id, pPed->GetModelIndex()); + if (!pPed->GetIsStatic()) + pPed->RemoveFromMovingList(); + pPed->bIsStaticWaitingForCollision = true; +} + +void WakeThisPed(cleanup_entity_struct* pCleanup, CPed* pPed) +{ + printf("*** WAKING UP PED %i %i\n", pCleanup->id, pPed->GetModelIndex()); + pPed->bIsStaticWaitingForCollision = false; + if (!pPed->bIsStatic) + pPed->AddToMovingList(); + +} + void CMissionCleanup::AddEntityToList(int32 id, uint8 type) { cleanup_entity_struct* pNew = FindFree(); @@ -1750,46 +1966,100 @@ void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObjects() { CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(m_sEntities[i].id); if (pVehicle) { - if (pVehicle->bIsStaticWaitingForCollision) { - if (CColStore::HasCollisionLoaded(pVehicle->GetPosition())) { - pVehicle->bIsStaticWaitingForCollision = false; + eLevelName level = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); + if (level == LEVEL_GENERIC) + level = CGame::currLevel; + if (!CColStore::HasCollisionLoaded(level)) { + if (!pVehicle->bIsStaticWaitingForCollision) { + if (!pVehicle->IsHeli() && !pVehicle->IsPlane() && pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI && + pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT && pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE) { + printf("*** SLEEPING VEHICLE %i %i\n", m_sEntities[i].id, pVehicle->GetModelIndex()); if (!pVehicle->GetIsStatic()) - pVehicle->AddToMovingList(); + pVehicle->RemoveFromMovingList(); + pVehicle->bIsStaticWaitingForCollision = true; + } } } - } - break; - } - case CLEANUP_CHAR: - { - CPed* pPed = CPools::GetPedPool()->GetAt(m_sEntities[i].id); - if (pPed) { - if (pPed->bIsStaticWaitingForCollision) { - if (CColStore::HasCollisionLoaded(pPed->GetPosition())) { - pPed->bIsStaticWaitingForCollision = false; - if (!pPed->GetIsStatic()) - pPed->AddToMovingList(); + else { + if (pVehicle->bIsStaticWaitingForCollision) { + printf("*** WAKING UP VEHICLE %i %i\n", m_sEntities[i].id, pVehicle->GetModelIndex()); + pVehicle->bIsStaticWaitingForCollision = false; + if (!pVehicle->bIsStatic) + pVehicle->AddToMovingList(); } } } - break; } + break; case CLEANUP_OBJECT: - { CObject* pObject = CPools::GetObjectPool()->GetAt(m_sEntities[i].id); if (pObject) { - if (pObject->bIsStaticWaitingForCollision) { - if (CColStore::HasCollisionLoaded(pObject->GetPosition())) { - pObject->bIsStaticWaitingForCollision = false; + eLevelName level = CTheZones::GetLevelFromPosition(&pObject->GetPosition()); + if (level == LEVEL_GENERIC) + level = CGame::currLevel; + if (!CColStore::HasCollisionLoaded(level)) { + if (!pObject->bIsStaticWaitingForCollision) { if (!pObject->GetIsStatic()) + pObject->RemoveFromMovingList(); + pObject->bIsStaticWaitingForCollision = true; + } + } + else { + if (pObject->bIsStaticWaitingForCollision) { + pObject->bIsStaticWaitingForCollision = false; + if (!pObject->bIsStatic) pObject->AddToMovingList(); } } } - break; } - default: - break; + } + for (int i = 0; i < MAX_CLEANUP; i++) { + switch (m_sEntities[i].type) { + case CLEANUP_CHAR: + { + CPed* pPed = CPools::GetPedPool()->GetAt(m_sEntities[i].id); + if (pPed) { + eLevelName level = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); + if (level == LEVEL_GENERIC) + level = CGame::currLevel; + if (!pPed->bIsStaticWaitingForCollision) { + if (pPed->bInVehicle) { + if (pPed->m_pMyVehicle->GetIsStatic()) { + SleepThisPed(&m_sEntities[i], pPed); + continue; + } + } + if (!CColStore::HasCollisionLoaded(level)) { + if (pPed->bInVehicle && pPed->m_pMyVehicle->GetIsStatic() || + pPed->m_attachedTo && pPed->m_attachedTo->GetIsStatic()) + SleepThisPed(&m_sEntities[i], pPed); + } + } + else { + if (!pPed->bInVehicle) { + if (CColStore::HasCollisionLoaded(level)) { + if (!(pPed->bInVehicle && pPed->m_pMyVehicle->GetIsStatic() || + pPed->m_attachedTo && pPed->m_attachedTo->GetIsStatic())) + WakeThisPed(&m_sEntities[i], pPed); + } + } + else { + if (!pPed->m_pMyVehicle->GetIsStatic()) { + WakeThisPed(&m_sEntities[i], pPed); + continue; + } + if (CColStore::HasCollisionLoaded(level)) { + if (!(pPed->bInVehicle && pPed->m_pMyVehicle->GetIsStatic() || + pPed->m_attachedTo && pPed->m_attachedTo->GetIsStatic())) + WakeThisPed(&m_sEntities[i], pPed); + } + } + } + + } + } + break; } } } @@ -1801,6 +2071,8 @@ void CMissionCleanup::Process() CCarCtrl::CarDensityMultiplier = 1.0f; CPed::nThreatReactionRangeMultiplier = 1; CPed::nEnterCarRangeMultiplier = 1; + for (int i = 0; i < MAX_ALLOWED_COLLISIONS; i++) + CTheScripts::AllowedCollision[i] = 0; FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = 1.0f; CRoadBlocks::ClearScriptRoadBlocks(); CRouteNode::Initialise(); @@ -1808,20 +2080,19 @@ void CMissionCleanup::Process() TheCamera.Restore(); TheCamera.SetWideScreenOff(); CSpecialFX::bLiftCam = false; - CSpecialFX::bVideoCam = false; - CTimeCycle::StopExtraColour(0); + // TODO(LCS): CHud::m_ClockEventWarningMinutes = 0; + // TODO(LCS): CHud::m_ClockEventFlashTimer = 0; + CTimeCycle::StopExtraColour(0); // TODO: thiscall for (int i = 0; i < MISSION_AUDIO_SLOTS; i++) DMAudio.ClearMissionAudio(i); CWeather::ReleaseWeather(); for (int i = 0; i < NUM_OF_SPECIAL_CHARS; i++) CStreaming::SetMissionDoesntRequireSpecialChar(i); - for (int i = 0; i < NUM_OF_CUTSCENE_OBJECTS; i++) - CStreaming::SetMissionDoesntRequireModel(MI_CUTOBJ01 + i); CStreaming::ms_disableStreaming = false; - CHud::m_ItemToFlash = -1; - CHud::SetHelpMessage(nil, false); + if (CHud::m_ItemToFlash != ITEM_ARMOUR && CHud::m_ItemToFlash != ITEM_HEALTH) + CHud::m_ItemToFlash = -1; + CHud::SetHelpMessage(nil, false); // nil, false, false, true TODO(LCS) CUserDisplay::OnscnTimer.m_bDisabled = false; - CTheScripts::RemoveScriptTextureDictionary(); CWorld::Players[0].m_pPed->m_pWanted->m_bIgnoredByCops = false; CWorld::Players[0].m_pPed->m_pWanted->m_bIgnoredByEveryone = false; CWorld::Players[0].MakePlayerSafe(false); @@ -1829,10 +2100,11 @@ void CMissionCleanup::Process() CWorld::Players[0].m_pPed->m_nDrunkCountdown = 0; CPad::GetPad(0)->SetDrunkInputDelay(0); CWorld::Players[0].m_bDriveByAllowed = true; + CPad::GetPad(0)->unk_B4 = 1.0f; + CPad::GetPad(0)->unk_B8 = 0.5f; DMAudio.ShutUpPlayerTalking(FALSE); CVehicle::bDisableRemoteDetonation = false; CVehicle::bDisableRemoteDetonationOnContact = false; - CGameLogic::ClearShortCut(); CTheScripts::RiotIntensity = 0; CTheScripts::StoreVehicleIndex = -1; CTheScripts::StoreVehicleWasRandom = true; @@ -1868,6 +2140,10 @@ void CMissionCleanup::Process() } RemoveEntityFromList(m_sEntities[i].id, m_sEntities[i].type); } + for (int i = 1; i < NUMSTREAMINFO; i++) { + if (CStreaming::IsScriptOwnedModel(i)) + CStreaming::SetMissionDoesntRequireModel(i); + } #ifdef SECUROM if ((myrand() & 3) == 2){ // if pirated game @@ -1896,7 +2172,7 @@ bool CUpsideDownCarCheck::IsCarUpsideDown(int32 id) 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; @@ -2035,109 +2311,157 @@ bool CStuckCarCheck::HasCarBeenStuckForAWhile(int32 id) return false; } -void CRunningScript::CollectParameters(uint32* pIp, int16 total) +void CRunningScript::CollectParameters(uint32* pIp, int16 total, int* pParameters) { - for (int16 i = 0; i < total; i++){ - uint16 varIndex; + while (total--){ switch (CTheScripts::Read1ByteFromScript(pIp)) { - case ARGUMENT_INT32: - case ARGUMENT_FLOAT: - ScriptParams[i] = CTheScripts::Read4BytesFromScript(pIp); + case ARGUMENT_END: + return; + case ARGUMENT_INT_ZERO: + *pParameters = 0; break; - case ARGUMENT_GLOBALVAR: - varIndex = CTheScripts::Read2BytesFromScript(pIp); - script_assert(varIndex >= 8 && varIndex < CTheScripts::GetSizeOfVariableSpace()); - ScriptParams[i] = *((int32*)&CTheScripts::ScriptSpace[varIndex]); + case ARGUMENT_FLOAT_ZERO: + *pParameters = 0; break; - case ARGUMENT_LOCALVAR: - varIndex = CTheScripts::Read2BytesFromScript(pIp); - script_assert(varIndex >= 0 && varIndex < ARRAY_SIZE(m_anLocalVariables)); - ScriptParams[i] = m_anLocalVariables[varIndex]; + case ARGUMENT_FLOAT_1BYTE: + *pParameters = (uint32)(uint8)CTheScripts::Read1ByteFromScript(pIp) << 24; + break; + case ARGUMENT_FLOAT_2BYTES: + *pParameters = (uint32)(uint16)CTheScripts::Read2BytesFromScript(pIp) << 16; + break; + case ARGUMENT_FLOAT_3BYTES: + *pParameters = (uint32)(uint8)CTheScripts::Read1ByteFromScript(pIp) << 8; + *pParameters |= (uint32)(uint16)CTheScripts::Read2BytesFromScript(pIp) << 16; + break; + case ARGUMENT_INT32: + case ARGUMENT_FLOAT: + *pParameters = CTheScripts::Read4BytesFromScript(pIp); break; case ARGUMENT_INT8: - ScriptParams[i] = CTheScripts::Read1ByteFromScript(pIp); + *pParameters = CTheScripts::Read1ByteFromScript(pIp); break; case ARGUMENT_INT16: - ScriptParams[i] = CTheScripts::Read2BytesFromScript(pIp); + *pParameters = CTheScripts::Read2BytesFromScript(pIp); break; default: - script_assert(0); + *pIp -= 1; + *pParameters = *GetPointerToScriptVariable(pIp, 0); break; } + pParameters++; } } #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT -int CRunningScript::CollectParameterForDebug(char* buf, bool& var) +int32* GetPointerToScriptVariableForDebug(CRunningScript* pScript, uint32* pIp, char* buf) { - uint16 varIndex; char tmpstr[24]; + uint8 type = CTheScripts::Read1ByteFromScript(pIp); + if (type >= ARGUMENT_GLOBAL_ARRAY) { + uint8 index_in_block = CTheScripts::Read1ByteFromScript(pIp); + uint8 index_id = CTheScripts::Read1ByteFromScript(pIp); + uint8 size = CTheScripts::Read1ByteFromScript(pIp); + script_assert(size > 0); + script_assert(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id] < size); + uint8 index = Min(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id], size - 1); + sprintf(tmpstr, " $%d[%d@ (%d)]", ((int)(type - ARGUMENT_GLOBAL_ARRAY) << 8) + index_in_block, index_id, pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id]); + strcat(buf, tmpstr); + return (int32*)&CTheScripts::ScriptSpace[4 * (((int)(type - ARGUMENT_GLOBAL_ARRAY) << 8) + index + index_in_block)]; + } + else if (type >= ARGUMENT_GLOBAL) { + uint8 index_in_block = CTheScripts::Read1ByteFromScript(pIp); + sprintf(tmpstr, " $%d", ((int)(type - ARGUMENT_GLOBAL) << 8) + index_in_block); + strcat(buf, tmpstr); + return (int32*)&CTheScripts::ScriptSpace[4 * (((int)(type - ARGUMENT_GLOBAL) << 8) + index_in_block)]; + } + else if (type >= ARGUMENT_LOCAL_ARRAY) { + uint8 index_id = CTheScripts::Read1ByteFromScript(pIp); + uint8 size = CTheScripts::Read1ByteFromScript(pIp); + script_assert(size > 0); + script_assert(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id] < size); + uint8 index = Min(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id], size - 1); + sprintf(tmpstr, " %d@[%d@ (%d)]", (type - ARGUMENT_LOCAL_ARRAY), index_id, pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id]); + strcat(buf, tmpstr); + return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL_ARRAY) + index]; + } + else if (type >= ARGUMENT_LOCAL) { + sprintf(tmpstr, " %d@", (type - ARGUMENT_LOCAL)); + strcat(buf, tmpstr); + return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)]; + } + else if (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? + } + script_assert(false && "wrong type for variable"); + return nil; +} + +int CRunningScript::CollectParameterForDebug(char* buf, bool& var) +{ var = false; + int tmp; switch (CTheScripts::Read1ByteFromScript(&m_nIp)) { + case ARGUMENT_END: + return 0; // TODO(LCS) + case ARGUMENT_INT_ZERO: + return 0; + case ARGUMENT_FLOAT_ZERO: + return 0; + case ARGUMENT_FLOAT_1BYTE: + return (uint32)(uint8)CTheScripts::Read1ByteFromScript(&m_nIp) << 24; + case ARGUMENT_FLOAT_2BYTES: + return (uint32)(uint16)CTheScripts::Read2BytesFromScript(&m_nIp) << 16; + case ARGUMENT_FLOAT_3BYTES: + tmp = (uint32)(uint8)CTheScripts::Read1ByteFromScript(&m_nIp) << 8; + tmp |= (uint32)(uint16)CTheScripts::Read2BytesFromScript(&m_nIp) << 16; + return tmp; case ARGUMENT_INT32: case ARGUMENT_FLOAT: return CTheScripts::Read4BytesFromScript(&m_nIp); - case ARGUMENT_GLOBALVAR: - varIndex = CTheScripts::Read2BytesFromScript(&m_nIp); - script_assert(varIndex >= 8 && varIndex < CTheScripts::GetSizeOfVariableSpace()); - var = true; - sprintf(tmpstr, " $%d", varIndex / 4); - strcat(buf, tmpstr); - return *((int32*)&CTheScripts::ScriptSpace[varIndex]); - case ARGUMENT_LOCALVAR: - varIndex = CTheScripts::Read2BytesFromScript(&m_nIp); - script_assert(varIndex >= 0 && varIndex < ARRAY_SIZE(m_anLocalVariables)); - var = true; - sprintf(tmpstr, " %d@", varIndex); - strcat(buf, tmpstr); - return m_anLocalVariables[varIndex]; case ARGUMENT_INT8: return CTheScripts::Read1ByteFromScript(&m_nIp); case ARGUMENT_INT16: return CTheScripts::Read2BytesFromScript(&m_nIp); default: - PrintToLog("%s - script assertion failed in CollectParameterForDebug", buf); - script_assert(0); - break; + var = true; + --m_nIp; + return *GetPointerToScriptVariableForDebug(this, &m_nIp, buf); } return 0; } void CRunningScript::GetStoredParameterForDebug(char* buf) { - uint16 varIndex; - char tmpstr[24]; - switch (CTheScripts::Read1ByteFromScript(&m_nIp)) { - case ARGUMENT_GLOBALVAR: - varIndex = CTheScripts::Read2BytesFromScript(&m_nIp); - sprintf(tmpstr, " $%d", varIndex / 4); - strcat(buf, tmpstr); - break; - case ARGUMENT_LOCALVAR: - varIndex = CTheScripts::Read2BytesFromScript(&m_nIp); - sprintf(tmpstr, " %d@", varIndex); - strcat(buf, tmpstr); - break; - default: - PrintToLog("%s - script_assertion failed in GetStoredParameterForDebug", buf); - script_assert(0); - } + GetPointerToScriptVariableForDebug(this, &m_nIp, buf); } #endif int32 CRunningScript::CollectNextParameterWithoutIncreasingPC(uint32 ip) { uint32* pIp = &ip; + int tmp; switch (CTheScripts::Read1ByteFromScript(pIp)) { + case ARGUMENT_END: + return 0; // TODO(LCS) + case ARGUMENT_INT_ZERO: + return 0; + case ARGUMENT_FLOAT_ZERO: + return 0; + case ARGUMENT_FLOAT_1BYTE: + return (uint32)(uint8)CTheScripts::Read1ByteFromScript(pIp) << 24; + case ARGUMENT_FLOAT_2BYTES: + return (uint32)(uint16)CTheScripts::Read2BytesFromScript(pIp) << 16; + case ARGUMENT_FLOAT_3BYTES: + tmp = (uint32)(uint8)CTheScripts::Read1ByteFromScript(pIp) << 8; + tmp |= (uint32)(uint16)CTheScripts::Read2BytesFromScript(pIp) << 16; + return tmp; case ARGUMENT_INT32: return CTheScripts::Read4BytesFromScript(pIp); - case ARGUMENT_GLOBALVAR: - return *((int32*)&CTheScripts::ScriptSpace[(uint16)CTheScripts::Read2BytesFromScript(pIp)]); - case ARGUMENT_LOCALVAR: - return m_anLocalVariables[CTheScripts::Read2BytesFromScript(pIp)]; case ARGUMENT_INT8: return CTheScripts::Read1ByteFromScript(pIp); case ARGUMENT_INT16: @@ -2145,7 +2469,8 @@ int32 CRunningScript::CollectNextParameterWithoutIncreasingPC(uint32 ip) case ARGUMENT_FLOAT: return CTheScripts::Read4BytesFromScript(pIp); default: - script_assert(0); + (*pIp)--; + return *GetPointerToScriptVariable(pIp, 0); } return -1; } @@ -2153,38 +2478,61 @@ int32 CRunningScript::CollectNextParameterWithoutIncreasingPC(uint32 ip) void CRunningScript::StoreParameters(uint32* pIp, int16 number) { for (int16 i = 0; i < number; i++){ - switch (CTheScripts::Read1ByteFromScript(pIp)) { - case ARGUMENT_GLOBALVAR: - *(int32*)&CTheScripts::ScriptSpace[(uint16)CTheScripts::Read2BytesFromScript(pIp)] = ScriptParams[i]; - break; - case ARGUMENT_LOCALVAR: - m_anLocalVariables[CTheScripts::Read2BytesFromScript(pIp)] = ScriptParams[i]; - break; - default: - script_assert(0); - } + *GetPointerToScriptVariable(pIp, 0) = ScriptParams[i]; } } +int32* GetPointerToScriptVariable(CRunningScript* pScript, uint32* pIp) +{ + uint8 type = CTheScripts::Read1ByteFromScript(pIp); + if (type >= ARGUMENT_GLOBAL_ARRAY) { + uint8 index_in_block = CTheScripts::Read1ByteFromScript(pIp); + uint8 index_id = CTheScripts::Read1ByteFromScript(pIp); + uint8 size = CTheScripts::Read1ByteFromScript(pIp); + script_assert(size > 0); + script_assert(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id] < size); + uint8 index = Min(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id], size - 1); + return (int32*)&CTheScripts::ScriptSpace[4 * (((int)(type - ARGUMENT_GLOBAL_ARRAY) << 8) + index + index_in_block)]; + } + else if (type >= ARGUMENT_GLOBAL) { + uint8 index_in_block = CTheScripts::Read1ByteFromScript(pIp); + return (int32*)&CTheScripts::ScriptSpace[4 * (((int)(type - ARGUMENT_GLOBAL) << 8) + index_in_block)]; + } + else if (type >= ARGUMENT_LOCAL_ARRAY) { + uint8 index_id = CTheScripts::Read1ByteFromScript(pIp); + uint8 size = CTheScripts::Read1ByteFromScript(pIp); + script_assert(size > 0); + script_assert(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id] < size); + uint8 index = Min(pScript->m_anLocalVariables[pScript->m_nLocalsPointer + index_id], size - 1); + return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL_ARRAY) + index]; + } + else if (type >= ARGUMENT_LOCAL) { + return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)]; + } + else if (type >= ARGUMENT_TIMER) { + return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)]; + } + script_assert(false && "wrong type for variable"); + return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)]; +} + int32 *CRunningScript::GetPointerToScriptVariable(uint32* pIp, int16 type) { - switch (CTheScripts::Read1ByteFromScript(pIp)) - { - case ARGUMENT_GLOBALVAR: - script_assert(type == VAR_GLOBAL); - return (int32*)&CTheScripts::ScriptSpace[(uint16)CTheScripts::Read2BytesFromScript(pIp)]; - case ARGUMENT_LOCALVAR: - script_assert(type == VAR_LOCAL); - return &m_anLocalVariables[CTheScripts::Read2BytesFromScript(pIp)]; - default: - script_assert(0); + return ::GetPointerToScriptVariable(this, pIp); +} + +int CTheScripts::GetSaveVarIndex(int var) +{ + for (int i = 0; i < NumSaveVars; i++) { + if (SavedVarIndices[i] == var) + return i; } - return nil; + return -1; } void CRunningScript::Init() { - strcpy(m_abScriptName, "noname"); + sprintf(m_abScriptName, "id%02i", m_nId); next = prev = nil; SetIP(0); for (int i = 0; i < MAX_STACK_DEPTH; i++) @@ -2195,13 +2543,28 @@ void CRunningScript::Init() m_bCondResult = false; m_bIsMissionScript = false; m_bSkipWakeTime = false; - for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) + for (int i = 0; i < NUM_LOCAL_VARS + 8 + NUM_TIMERS; i++) m_anLocalVariables[i] = 0; m_nAndOrState = 0; m_bNotFlag = false; m_bDeatharrestEnabled = true; m_bDeatharrestExecuted = false; m_bMissionFlag = false; + m_nLocalsPointer = 0; +} + +void CTheScripts::Shutdown() +{ + if (gScriptsFile != -1) { + CFileMgr::CloseFile(gScriptsFile); + gScriptsFile = -1; + } + if (ScriptSpace) { + base::cMainMemoryManager::Instance()->Free(ScriptSpace); + ScriptSpace = nil; + FSDestroyedFlag = false; + OnAMissionFlag = 0; + } } #ifdef USE_DEBUG_SCRIPT_LOADER @@ -2220,17 +2583,17 @@ int open_script() scriptToLoad = 2; switch (scriptToLoad) { case 0: scriptfile = "main.scm"; break; - case 1: scriptfile = "freeroam_miami.scm"; break; + case 1: scriptfile = "freeroam_lcs.scm"; break; case 2: scriptfile = "main_d.scm"; break; } return CFileMgr::OpenFile(scriptfile, "rb"); } #endif -void CTheScripts::Init() +bool CTheScripts::Init(bool loaddata) { - for (int i = 0; i < SIZE_SCRIPT_SPACE; i++) - ScriptSpace[i] = 0; + bool retval = false; + printf("CTheScripts::Init\n"); pActiveScripts = pIdleScripts = nil; for (int i = 0; i < MAX_NUM_SCRIPTS; i++){ ScriptsArray[i].Init(); @@ -2239,25 +2602,47 @@ void CTheScripts::Init() MissionCleanUp.Init(); UpsideDownCars.Init(); StuckCars.Init(); - CFileMgr::SetDir("data"); -#ifdef USE_DEBUG_SCRIPT_LOADER - int mainf = open_script(); -#else - int mainf = CFileMgr::OpenFile("main.scm", "rb"); -#endif - CFileMgr::Read(mainf, (char*)ScriptSpace, SIZE_MAIN_SCRIPT); - CFileMgr::CloseFile(mainf); - CFileMgr::SetDir(""); StoreVehicleIndex = -1; StoreVehicleWasRandom = true; OnAMissionFlag = 0; LastMissionPassedTime = (uint32)-1; + for (int i = 0; i < MAX_NUM_COLLECTIVES; i++) { + CollectiveArray[i].colIndex = -1; + CollectiveArray[i].pedIndex = 0; + } + NextFreeCollectiveIndex = 0; LastRandomPedId = -1; for (int i = 0; i < MAX_NUM_USED_OBJECTS; i++){ memset(&UsedObjectArray[i].name, 0, sizeof(UsedObjectArray[i].name)); UsedObjectArray[i].index = 0; } +#if defined FIX_BUGS || (!defined GTA_PS2 && !defined GTA_PSP) + for (base::cSList<script_corona>::tSItem* i = CTheScripts::mCoronas.first; i;) { + base::cSList<script_corona>::tSItem* next = i->next; + delete i; + i = next; + } + CTheScripts::mCoronas.first = nil; +#endif NumberOfUsedObjects = 0; + if (ScriptSpace) + Shutdown(); + CFileMgr::SetDir("DATA"); +#ifdef USE_DEBUG_SCRIPT_LOADER + int mainf = open_script(); +#else + int mainf = CFileMgr::OpenFile("main.scm", "rb"); +#endif + CFileMgr::Read(mainf, (char*)&MainScriptSize, sizeof(MainScriptSize)); + int nLargestMissionSize = 0; + CFileMgr::Read(mainf, (char*)&nLargestMissionSize, sizeof(nLargestMissionSize)); + if (!cSmallHeap::msInstance.IsLocked()) + cSmallHeap::msInstance.Lock(); + ScriptSpace = (uint8*)base::cMainMemoryManager::Instance()->Allocate(MainScriptSize + nLargestMissionSize); + memset(ScriptSpace, 0, MainScriptSize + nLargestMissionSize); + CFileMgr::Read(mainf, (char*)ScriptSpace, MainScriptSize); + gScriptsFile = mainf; + CFileMgr::SetDir(""); ReadObjectNamesFromScript(); UpdateObjectIndices(); bAlreadyRunningAMissionScript = false; @@ -2267,11 +2652,10 @@ void CTheScripts::Init() NumberOfExclusiveMissionScripts = 0; NumberOfMissionScripts = 0; LargestMissionScriptSize = 0; - MainScriptSize = 0; ReadMultiScriptFileOffsetsFromScript(); FailCurrentMission = 0; DbgFlag = false; - NumScriptDebugLines = 0; + //NumScriptDebugLines = 0; RiotIntensity = 0; bPlayerHasMetDebbieHarry = false; bPlayerIsInTheStatium = false; @@ -2295,7 +2679,7 @@ void CTheScripts::Init() IntroRectangles[i].m_sColor = CRGBA(255, 255, 255, 255); } NumberOfIntroRectanglesThisFrame = 0; - RemoveScriptTextureDictionary(); + //RemoveScriptTextureDictionary(); // TODO(LCS) - probably not needed for (int i = 0; i < MAX_NUM_BUILDING_SWAPS; i++){ BuildingSwapArray[i].m_pBuilding = nil; BuildingSwapArray[i].m_nNewModel = -1; @@ -2303,6 +2687,12 @@ void CTheScripts::Init() } for (int i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) InvisibilitySettingArray[i] = nil; + if (loaddata) { + printf("loaddata = true\n"); + retval = GenericLoad(); + } + for (int i = 0; i < MAX_ALLOWED_COLLISIONS; i++) + AllowedCollision[i] = 0; #if defined USE_ADVANCED_SCRIPT_DEBUG_OUTPUT && SCRIPT_LOG_FILE_LEVEL == 2 CFileMgr::SetDirMyDocuments(); @@ -2313,8 +2703,10 @@ void CTheScripts::Init() PrintToLog(init_msg); CFileMgr::SetDir(""); #endif + return retval; } +/* void CTheScripts::RemoveScriptTextureDictionary() { for (int i = 0; i < ARRAY_SIZE(CTheScripts::ScriptSprites); i++) @@ -2323,6 +2715,7 @@ void CTheScripts::RemoveScriptTextureDictionary() if (slot != -1) CTxdStore::RemoveTxd(slot); } +*/ void CRunningScript::RemoveScriptFromList(CRunningScript** ppScript) { @@ -2348,6 +2741,7 @@ CRunningScript* CTheScripts::StartNewScript(uint32 ip) CRunningScript* pNew = pIdleScripts; script_assert(pNew); pNew->RemoveScriptFromList(&pIdleScripts); + pNew->m_nId = NextProcessId++; pNew->Init(); pNew->SetIP(ip); pNew->AddScriptToList(&pActiveScripts); @@ -2359,6 +2753,8 @@ void CTheScripts::Process() { if (CReplay::IsPlayingBack()) return; + if (!ScriptSpace) + return; CommandsExecuted = 0; ScriptsUpdated = 0; float timeStep = CTimer::GetTimeStepInMilliseconds(); @@ -2430,6 +2826,7 @@ void CTheScripts::Process() #endif CRunningScript* script = pActiveScripts; + InTheScripts = true; while (script != nil){ CRunningScript* next = script->GetNext(); ++ScriptsUpdated; @@ -2439,6 +2836,11 @@ void CTheScripts::Process() if (script && !script->m_bIsActive) script = nil; } + InTheScripts = false; + for (base::cSList<script_corona>::tSItem* i = CTheScripts::mCoronas.first; i; i = i->next) { + CCoronas::RegisterCorona((uint32)(uintptr)i, i->item.r, i->item.g, i->item.b, 255, CVector(i->item.x, i->item.y, i->item.z), + -i->item.size, 450.0f, i->item.type, i->item.flareType, 1, 0, 0, 0.0f); + } DbgFlag = false; #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT PrintToLog("Script processing done, ScriptsUpdated: %d, CommandsExecuted: %d\n", ScriptsUpdated, CommandsExecuted); @@ -2464,6 +2866,7 @@ void CRunningScript::Process() #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT PrintToLog("\n\nProcessing script %s (id %d)\n\n", m_abScriptName, this - CTheScripts::ScriptsArray); #endif + pCurrent = this; if (m_bIsMissionScript) DoDeatharrestCheck(); if (m_bMissionFlag && CTheScripts::FailCurrentMission == 1 && m_nStackPointer == 1) @@ -2496,34 +2899,59 @@ int8 CRunningScript::ProcessOneCommand() #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT char commandInfo[1024]; uint32 ip = m_nIp; + uint8 nInputParams; + uint8 nOutputParameters; + uint8 nLocalsOffset; if (command < ARRAY_SIZE(commands)) { script_assert(commands[command].id == command); m_nIp -= 2; - sprintf(commandInfo, m_nIp >= SIZE_MAIN_SCRIPT ? "M<%5d> " : "<%6d> ", m_nIp >= SIZE_MAIN_SCRIPT ? m_nIp - SIZE_MAIN_SCRIPT : m_nIp); + sprintf(commandInfo, m_nIp >= CTheScripts::MainScriptSize ? "M<%5d> " : "<%6d> ", m_nIp >= CTheScripts::MainScriptSize ? m_nIp - CTheScripts::MainScriptSize : m_nIp); m_nIp += 2; if (m_bNotFlag) strcat(commandInfo, "NOT "); if (commands[command].position == -1) strcat(commandInfo, commands[command].name + sizeof("COMMAND_") - 1); - for (int i = 0; commands[command].input[i] != ARGTYPE_NONE; i++) { + if (commands[command].input[0] == ARGTYPE_FUNCTION) { char tmp[32]; bool var = false; - int value; - switch (commands[command].input[i]) { - case ARGTYPE_INT: - case ARGTYPE_PED_HANDLE: - case ARGTYPE_VEHICLE_HANDLE: - case ARGTYPE_OBJECT_HANDLE: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%d)" : " %d", value); break; - case ARGTYPE_FLOAT: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%.3f)" : " %.3f", *(float*)&value); break; - case ARGTYPE_STRING: sprintf(tmp, " '%s'", (const char*)&CTheScripts::ScriptSpace[m_nIp]); m_nIp += KEY_LENGTH_IN_SCRIPT; break; - case ARGTYPE_LABEL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s(%d))" : " %s(%d)", value >= 0 ? "G" : "L", abs(value)); break; - case ARGTYPE_BOOL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s)" : " %s", value ? "TRUE" : "FALSE"); break; - case ARGTYPE_ANDOR: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, " %d %ss", (value + 1) % 10, value / 10 == 0 ? "AND" : "OR"); break; - default: script_assert(0); - } + nInputParams = CTheScripts::Read1ByteFromScript(&m_nIp); + nOutputParameters = CTheScripts::Read1ByteFromScript(&m_nIp); + nLocalsOffset = CTheScripts::Read1ByteFromScript(&m_nIp); + int value = CollectParameterForDebug(commandInfo, var); + sprintf(tmp, var ? " (%s(%d))" : " %s(%d)", value >= 0 ? "G" : "L", abs(value)); strcat(commandInfo, tmp); - if (commands[command].position == i) - strcat(commandInfo, commands[command].name_override); + strcat(commandInfo, "{"); + for (int i = 0; i < nInputParams; i++) { + if (i != 0) + strcat(commandInfo, ", "); + value = CollectParameterForDebug(commandInfo, var); + sprintf(tmp, var ? "(%d)" : "%d", value); + strcat(commandInfo, tmp); + + } + strcat(commandInfo, "}"); + } + else { + for (int i = 0; commands[command].input[i] != ARGTYPE_NONE; i++) { + char tmp[32]; + bool var = false; + int value; + switch (commands[command].input[i]) { + case ARGTYPE_INT: + case ARGTYPE_PED_HANDLE: + case ARGTYPE_VEHICLE_HANDLE: + case ARGTYPE_OBJECT_HANDLE: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%d)" : " %d", value); break; + case ARGTYPE_FLOAT: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%.3f)" : " %.3f", *(float*)&value); break; + case ARGTYPE_STRING: sprintf(tmp, " '%s'", (const char*)&CTheScripts::ScriptSpace[m_nIp]); m_nIp += KEY_LENGTH_IN_SCRIPT; break; + case ARGTYPE_LABEL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s(%d))" : " %s(%d)", value >= 0 ? "G" : "L", abs(value)); break; + case ARGTYPE_BOOL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s)" : " %s", value ? "TRUE" : "FALSE"); break; + case ARGTYPE_ANDOR: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, " %d %ss", (value) % 10, value / 10 == 0 ? "AND" : "OR"); break; + default: script_assert(0); + } + strcat(commandInfo, tmp); + if (commands[command].position == i) + strcat(commandInfo, commands[command].name_override); + } } uint32 t = m_nIp; m_nIp = ip; @@ -2534,32 +2962,38 @@ int8 CRunningScript::ProcessOneCommand() retval = ProcessCommands0To99(command); else if (command < 200) retval = ProcessCommands100To199(command); - else if (command < 300) + else if (command < 305) retval = ProcessCommands200To299(command); - else if (command < 400) + else if (command < 405) retval = ProcessCommands300To399(command); - else if (command < 500) + else if (command < 505) retval = ProcessCommands400To499(command); - else if (command < 600) + else if (command < 605) retval = ProcessCommands500To599(command); - else if (command < 700) + else if (command < 705) retval = ProcessCommands600To699(command); - else if (command < 800) + else if (command < 805) retval = ProcessCommands700To799(command); - else if (command < 900) + else if (command < 905) retval = ProcessCommands800To899(command); - else if (command < 1000) + else if (command < 1005) retval = ProcessCommands900To999(command); - else if (command < 1100) + else if (command < 1105) retval = ProcessCommands1000To1099(command); - else if (command < 1200) + else if (command < 1205) retval = ProcessCommands1100To1199(command); - else if (command < 1300) + else if (command < 1305) retval = ProcessCommands1200To1299(command); - else if (command < 1400) + else if (command < 1405) retval = ProcessCommands1300To1399(command); - else if (command < 1500) + else if (command < 1497) retval = ProcessCommands1400To1499(command); + else if (command < 1600) + retval = ProcessCommands1500To1599(command); + else if (command < 1700) + retval = ProcessCommands1600To1699(command); + else + script_assert(false); #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT if (command < ARRAY_SIZE(commands)) { if (commands[command].cond || commands[command].output[0] != ARGTYPE_NONE) { @@ -2569,15 +3003,17 @@ int8 CRunningScript::ProcessOneCommand() uint32 t = m_nIp; m_nIp = ip; ip = t; - for (int i = 0; commands[command].output[i] != ARGTYPE_NONE; i++) { - char tmp[32]; - switch (commands[command].output[i]) { - case ARGTYPE_INT: - case ARGTYPE_PED_HANDLE: - case ARGTYPE_VEHICLE_HANDLE: - case ARGTYPE_OBJECT_HANDLE: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%d)", ScriptParams[i]); strcat(commandInfo, tmp); break; - case ARGTYPE_FLOAT: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%8.3f)", *(float*)&ScriptParams[i]); strcat(commandInfo, tmp); break; - default: script_assert(0 && "Script only returns INTs and FLOATs"); + if (commands[command].input[0] != ARGTYPE_FUNCTION) { + for (int i = 0; commands[command].output[i] != ARGTYPE_NONE; i++) { + char tmp[32]; + switch (commands[command].output[i]) { + case ARGTYPE_INT: + case ARGTYPE_PED_HANDLE: + case ARGTYPE_VEHICLE_HANDLE: + case ARGTYPE_OBJECT_HANDLE: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%d)", ScriptParams[i]); strcat(commandInfo, tmp); break; + case ARGTYPE_FLOAT: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%8.3f)", *(float*)&ScriptParams[i]); strcat(commandInfo, tmp); break; + default: script_assert(0 && "Script only returns INTs and FLOATs"); + } } } m_nIp = ip; @@ -2606,16 +3042,18 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) float *fScriptVar1; int *nScriptVar1; switch (command) { + /* case COMMAND_NOP: return 0; + */ case COMMAND_WAIT: CollectParameters(&m_nIp, 1); - m_nWakeTime = CTimer::GetTimeInMilliseconds() + ScriptParams[0]; + m_nWakeTime = CTimer::GetTimeInMilliseconds() + GET_INTEGER_PARAM(0); m_bSkipWakeTime = false; return 1; case COMMAND_GOTO: CollectParameters(&m_nIp, 1); - SetIP(ScriptParams[0] >= 0 ? ScriptParams[0] : SIZE_MAIN_SCRIPT - ScriptParams[0]); + SetIP(GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::MainScriptSize - GET_INTEGER_PARAM(0)); /* Known issue: GOTO to 0. It might have been "better" to use > instead of >= */ /* simply because it never makes sense to jump to start of the script */ /* but jumping to start of a custom mission is an issue for simple mission-like scripts */ @@ -2624,174 +3062,174 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) return 0; case COMMAND_SHAKE_CAM: CollectParameters(&m_nIp, 1); - CamShakeNoPos(&TheCamera, ScriptParams[0] / 1000.0f); + CamShakeNoPos(&TheCamera, GET_INTEGER_PARAM(0) / 1000.0f); return 0; case COMMAND_SET_VAR_INT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr = ScriptParams[0]; + *ptr = GET_INTEGER_PARAM(0); return 0; } case COMMAND_SET_VAR_FLOAT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr = *(float*)&ScriptParams[0]; + *(float*)ptr = GET_FLOAT_PARAM(0); return 0; } case COMMAND_SET_LVAR_INT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr = ScriptParams[0]; + *ptr = GET_INTEGER_PARAM(0); return 0; } case COMMAND_SET_LVAR_FLOAT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr = *(float*)&ScriptParams[0]; + *(float*)ptr = GET_FLOAT_PARAM(0); return 0; } case COMMAND_ADD_VAL_TO_INT_VAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr += ScriptParams[0]; + *ptr += GET_INTEGER_PARAM(0); return 0; } case COMMAND_ADD_VAL_TO_FLOAT_VAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr += *(float*)&ScriptParams[0]; + *(float*)ptr += GET_FLOAT_PARAM(0); return 0; } case COMMAND_ADD_VAL_TO_INT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr += ScriptParams[0]; + *ptr += GET_INTEGER_PARAM(0); return 0; } case COMMAND_ADD_VAL_TO_FLOAT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr += *(float*)&ScriptParams[0]; + *(float*)ptr += GET_FLOAT_PARAM(0); return 0; } case COMMAND_SUB_VAL_FROM_INT_VAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr -= ScriptParams[0]; + *ptr -= GET_INTEGER_PARAM(0); return 0; } case COMMAND_SUB_VAL_FROM_FLOAT_VAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr -= *(float*)&ScriptParams[0]; + *(float*)ptr -= GET_FLOAT_PARAM(0); return 0; } case COMMAND_SUB_VAL_FROM_INT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr -= ScriptParams[0]; + *ptr -= GET_INTEGER_PARAM(0); return 0; } case COMMAND_SUB_VAL_FROM_FLOAT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr -= *(float*)&ScriptParams[0]; + *(float*)ptr -= GET_FLOAT_PARAM(0); return 0; } case COMMAND_MULT_INT_VAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr *= ScriptParams[0]; + *ptr *= GET_INTEGER_PARAM(0); return 0; } case COMMAND_MULT_FLOAT_VAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr *= *(float*)&ScriptParams[0]; + *(float*)ptr *= GET_FLOAT_PARAM(0); return 0; } case COMMAND_MULT_INT_LVAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr *= ScriptParams[0]; + *ptr *= GET_INTEGER_PARAM(0); return 0; } case COMMAND_MULT_FLOAT_LVAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr *= *(float*)&ScriptParams[0]; + *(float*)ptr *= GET_FLOAT_PARAM(0); return 0; } case COMMAND_DIV_INT_VAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr /= ScriptParams[0]; + *ptr /= GET_INTEGER_PARAM(0); return 0; } case COMMAND_DIV_FLOAT_VAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr /= *(float*)&ScriptParams[0]; + *(float*)ptr /= GET_FLOAT_PARAM(0); return 0; } case COMMAND_DIV_INT_LVAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr /= ScriptParams[0]; + *ptr /= GET_INTEGER_PARAM(0); return 0; } case COMMAND_DIV_FLOAT_LVAR_BY_VAL: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr /= *(float*)&ScriptParams[0]; + *(float*)ptr /= GET_FLOAT_PARAM(0); return 0; } case COMMAND_IS_INT_VAR_GREATER_THAN_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr > ScriptParams[0]); + UpdateCompareFlag(*ptr > GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_GREATER_THAN_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr > ScriptParams[0]); + UpdateCompareFlag(*ptr > GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_NUMBER_GREATER_THAN_INT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(ScriptParams[0] > *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) > *ptr); return 0; } case COMMAND_IS_NUMBER_GREATER_THAN_INT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(ScriptParams[0] > *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) > *ptr); return 0; } case COMMAND_IS_INT_VAR_GREATER_THAN_INT_VAR: @@ -2826,28 +3264,28 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr > *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr > GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_FLOAT_LVAR_GREATER_THAN_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr > *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr > GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(*(float*)&ScriptParams[0] > *(float*)ptr); + UpdateCompareFlag(GET_FLOAT_PARAM(0) > *(float*)ptr); return 0; } case COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(*(float*)&ScriptParams[0] > *(float*)ptr); + UpdateCompareFlag(GET_FLOAT_PARAM(0) > *(float*)ptr); return 0; } case COMMAND_IS_FLOAT_VAR_GREATER_THAN_FLOAT_VAR: @@ -2882,28 +3320,28 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr >= ScriptParams[0]); + UpdateCompareFlag(*ptr >= GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr >= ScriptParams[0]); + UpdateCompareFlag(*ptr >= GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(ScriptParams[0] >= *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) >= *ptr); return 0; } case COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(ScriptParams[0] >= *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) >= *ptr); return 0; } case COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_VAR: @@ -2938,28 +3376,28 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr >= *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr >= GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr >= *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr >= GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(*(float*)&ScriptParams[0] >= *(float*)ptr); + UpdateCompareFlag(GET_FLOAT_PARAM(0) >= *(float*)ptr); return 0; } case COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(*(float*)&ScriptParams[0] >= *(float*)ptr); + UpdateCompareFlag(GET_FLOAT_PARAM(0) >= *(float*)ptr); return 0; } case COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_VAR: @@ -2994,14 +3432,14 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr == ScriptParams[0]); + UpdateCompareFlag(*ptr == GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_EQUAL_TO_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr == ScriptParams[0]); + UpdateCompareFlag(*ptr == GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_VAR_EQUAL_TO_INT_VAR: @@ -3034,14 +3472,14 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr == *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr == GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_FLOAT_LVAR_EQUAL_TO_NUMBER: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*(float*)ptr == *(float*)&ScriptParams[0]); + UpdateCompareFlag(*(float*)ptr == GET_FLOAT_PARAM(0)); return 0; } case COMMAND_IS_FLOAT_VAR_EQUAL_TO_FLOAT_VAR: @@ -3070,17 +3508,15 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) //case COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_VAR: //case COMMAND_IS_FLOAT_LVAR_NOT_EQUAL_TO_FLOAT_LVAR: //case COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_LVAR: - /* case COMMAND_GOTO_IF_TRUE: CollectParameters(&m_nIp, 1); if (m_bCondResult) - SetIP(ScriptParams[0] >= 0 ? ScriptParams[0] : SIZE_MAIN_SCRIPT - ScriptParams[0]); + SetIP(GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::MainScriptSize - GET_INTEGER_PARAM(0)); return 0; - */ case COMMAND_GOTO_IF_FALSE: CollectParameters(&m_nIp, 1); if (!m_bCondResult) - SetIP(ScriptParams[0] >= 0 ? ScriptParams[0] : SIZE_MAIN_SCRIPT - ScriptParams[0]); + SetIP(GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::MainScriptSize - GET_INTEGER_PARAM(0)); /* Check COMMAND_GOTO note. */ return 0; case COMMAND_TERMINATE_THIS_SCRIPT: @@ -3106,47 +3542,19 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) case COMMAND_START_NEW_SCRIPT: { CollectParameters(&m_nIp, 1); - script_assert(ScriptParams[0] >= 0); - CRunningScript* pNew = CTheScripts::StartNewScript(ScriptParams[0]); - pNew->m_bIsActive = true; - int8 type = CTheScripts::Read1ByteFromScript(&m_nIp); - float tmp; - for (int i = 0; type != ARGUMENT_END; type = CTheScripts::Read1ByteFromScript(&m_nIp), i++) { - switch (type) { - case ARGUMENT_INT32: - pNew->m_anLocalVariables[i] = CTheScripts::Read4BytesFromScript(&m_nIp); - break; - case ARGUMENT_GLOBALVAR: - pNew->m_anLocalVariables[i] = *(int32*)&CTheScripts::ScriptSpace[(uint16)CTheScripts::Read2BytesFromScript(&m_nIp)]; - break; - case ARGUMENT_LOCALVAR: - pNew->m_anLocalVariables[i] = m_anLocalVariables[CTheScripts::Read2BytesFromScript(&m_nIp)]; - break; - case ARGUMENT_INT8: - pNew->m_anLocalVariables[i] = CTheScripts::Read1ByteFromScript(&m_nIp); - break; - case ARGUMENT_INT16: - pNew->m_anLocalVariables[i] = CTheScripts::Read2BytesFromScript(&m_nIp); - break; - case ARGUMENT_FLOAT: - tmp = CTheScripts::ReadFloatFromScript(&m_nIp); - pNew->m_anLocalVariables[i] = *(int32*)&tmp; - break; - default: - break; - } - } + script_assert(GET_INTEGER_PARAM(0) >= 0); + CRunningScript* pNew = CTheScripts::StartNewScript(GET_INTEGER_PARAM(0)); + CollectParameters(&m_nIp, NUM_LOCAL_VARS, pNew->m_anLocalVariables); return 0; } case COMMAND_GOSUB: CollectParameters(&m_nIp, 1); script_assert(m_nStackPointer < MAX_STACK_DEPTH); m_anStack[m_nStackPointer++] = m_nIp; - SetIP(ScriptParams[0] >= 0 ? ScriptParams[0] : SIZE_MAIN_SCRIPT - ScriptParams[0]); + SetIP(GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::MainScriptSize - GET_INTEGER_PARAM(0)); return 0; case COMMAND_RETURN: - script_assert(m_nStackPointer > 0); /* No more SSU */ - SetIP(m_anStack[--m_nStackPointer]); + ReturnFromGosubOrFunction(); return 0; case COMMAND_LINE: CollectParameters(&m_nIp, 6); @@ -3155,7 +3563,7 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) case COMMAND_CREATE_PLAYER: { CollectParameters(&m_nIp, 4); - int32 index = ScriptParams[0]; + int32 index = GET_INTEGER_PARAM(0); script_assert(index < NUMPLAYERS); printf("&&&&&&&&&&&&&Creating player: %d\n", index); if (!CStreaming::HasModelLoaded(MI_PLAYER)) { @@ -3165,14 +3573,14 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) CPlayerPed::SetupPlayerPed(index); CWorld::Players[index].m_pPed->CharCreatedBy = MISSION_CHAR; CPlayerPed::DeactivatePlayerPed(index); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += CWorld::Players[index].m_pPed->GetDistanceFromCentreOfMassToBaseOfModel(); CWorld::Players[index].m_pPed->SetPosition(pos); CTheScripts::ClearSpaceForMissionEntity(pos, CWorld::Players[index].m_pPed); CPlayerPed::ReactivatePlayerPed(index); - ScriptParams[0] = index; + SET_INTEGER_PARAM(0, index); StoreParameters(&m_nIp, 1); return 0; } @@ -3180,23 +3588,23 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) { CVector pos; CollectParameters(&m_nIp, 1); - if (CWorld::Players[ScriptParams[0]].m_pPed->bInVehicle) - pos = CWorld::Players[ScriptParams[0]].m_pPed->m_pMyVehicle->GetPosition(); + if (CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->bInVehicle && CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->m_pMyVehicle) + pos = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->m_pMyVehicle->GetPosition(); else - pos = CWorld::Players[ScriptParams[0]].m_pPed->GetPosition(); - *(CVector*)&ScriptParams[0] = pos; + pos = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->GetPosition(); + SET_VECTOR_PARAM(0, pos); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_SET_PLAYER_COORDINATES: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[1]; - int index = ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(1); + int index = GET_INTEGER_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CPlayerPed* ped = CWorld::Players[index].m_pPed; - if (ped->bInVehicle) { + if (ped->bInVehicle && ped->m_pMyVehicle) { pos.z += ped->m_pMyVehicle->GetDistanceFromCentreOfMassToBaseOfModel(); ped->m_pMyVehicle->Teleport(pos); // removed dumb stuff that was present here CTheScripts::ClearSpaceForMissionEntity(pos, ped->m_pMyVehicle); @@ -3244,39 +3652,43 @@ int8 CRunningScript::ProcessCommands0To99(int32 command) case COMMAND_IS_PLAYER_IN_AREA_2D: { CollectParameters(&m_nIp, 6); - CPlayerPed* ped = CWorld::Players[ScriptParams[0]].m_pPed; - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + CPlayerPed* ped = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); if (!ped->bInVehicle) UpdateCompareFlag(ped->IsWithinArea(x1, y1, x2, y2)); else UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); + */ return 0; } case COMMAND_IS_PLAYER_IN_AREA_3D: { CollectParameters(&m_nIp, 8); - CPlayerPed* ped = CWorld::Players[ScriptParams[0]].m_pPed; - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float z1 = *(float*)&ScriptParams[3]; - float x2 = *(float*)&ScriptParams[4]; - float y2 = *(float*)&ScriptParams[5]; - float z2 = *(float*)&ScriptParams[6]; + CPlayerPed* ped = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float z1 = GET_FLOAT_PARAM(3); + float x2 = GET_FLOAT_PARAM(4); + float y2 = GET_FLOAT_PARAM(5); + float z2 = GET_FLOAT_PARAM(6); if (ped->bInVehicle) UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2)); else UpdateCompareFlag(ped->IsWithinArea(x1, y1, z1, x2, y2, z2)); - if (ScriptParams[7]) + if (GET_INTEGER_PARAM(7)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2); + */ return 0; } case COMMAND_ADD_INT_VAR_TO_INT_VAR: @@ -3423,33 +3835,25 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr += CTimer::GetTimeStep() * *(float*)&ScriptParams[0]; + *(float*)ptr += CTimer::GetTimeStep() * GET_FLOAT_PARAM(0); return 0; } case COMMAND_ADD_TIMED_VAL_TO_FLOAT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr += CTimer::GetTimeStep() * *(float*)&ScriptParams[0]; + *(float*)ptr += CTimer::GetTimeStep() * GET_FLOAT_PARAM(0); return 0; } case COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_VAR: fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); *fScriptVar1 += CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); return 0; -#ifdef FIX_BUGS case COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_LVAR: -#else - case COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_VAR: -#endif fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); *fScriptVar1 += CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); return 0; -#ifdef FIX_BUGS case COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_VAR: -#else - case COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_LVAR: -#endif fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); *fScriptVar1 += CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); return 0; @@ -3461,33 +3865,25 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *(float*)ptr -= CTimer::GetTimeStep() * *(float*)&ScriptParams[0]; + *(float*)ptr -= CTimer::GetTimeStep() * GET_FLOAT_PARAM(0); return 0; } case COMMAND_SUB_TIMED_VAL_FROM_FLOAT_LVAR: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *(float*)ptr -= CTimer::GetTimeStep() * *(float*)&ScriptParams[0]; + *(float*)ptr -= CTimer::GetTimeStep() * GET_FLOAT_PARAM(0); return 0; } case COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_VAR: fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); *fScriptVar1 -= CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); return 0; -#ifdef FIX_BUGS // in SA it was fixed by reversing their order in enum case COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_LVAR: -#else - case COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_VAR: -#endif fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); *fScriptVar1 -= CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); return 0; -#ifdef FIX_BUGS case COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_VAR: -#else - case COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_LVAR: -#endif fScriptVar1 = (float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); *fScriptVar1 -= CTimer::GetTimeStep() * *(float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); return 0; @@ -3636,46 +4032,46 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_CREATE_CHAR: { CollectParameters(&m_nIp, 5); - switch (ScriptParams[1]) { + switch (GET_INTEGER_PARAM(1)) { case MI_COP: - if (ScriptParams[0] == PEDTYPE_COP) - ScriptParams[1] = COP_STREET; + if (GET_INTEGER_PARAM(0) == PEDTYPE_COP) + SET_INTEGER_PARAM(1, COP_STREET); break; case MI_SWAT: - if (ScriptParams[0] == PEDTYPE_COP) - ScriptParams[1] = COP_SWAT; + if (GET_INTEGER_PARAM(0) == PEDTYPE_COP) + SET_INTEGER_PARAM(1, COP_SWAT); break; case MI_FBI: - if (ScriptParams[0] == PEDTYPE_COP) - ScriptParams[1] = COP_FBI; + if (GET_INTEGER_PARAM(0) == PEDTYPE_COP) + SET_INTEGER_PARAM(1, COP_FBI); break; case MI_ARMY: - if (ScriptParams[0] == PEDTYPE_COP) - ScriptParams[1] = COP_ARMY; + if (GET_INTEGER_PARAM(0) == PEDTYPE_COP) + SET_INTEGER_PARAM(1, COP_ARMY); break; case MI_MEDIC: - if (ScriptParams[0] == PEDTYPE_EMERGENCY) - ScriptParams[1] = PEDTYPE_EMERGENCY; + if (GET_INTEGER_PARAM(0) == PEDTYPE_EMERGENCY) + SET_INTEGER_PARAM(1, PEDTYPE_EMERGENCY); break; case MI_FIREMAN: - if (ScriptParams[0] == PEDTYPE_FIREMAN) - ScriptParams[1] = PEDTYPE_FIREMAN; + if (GET_INTEGER_PARAM(0) == PEDTYPE_FIREMAN) + SET_INTEGER_PARAM(1, PEDTYPE_FIREMAN); break; default: break; } CPed* ped; - if (ScriptParams[0] == PEDTYPE_COP) - ped = new CCopPed((eCopType)ScriptParams[1]); - else if (ScriptParams[0] == PEDTYPE_EMERGENCY || ScriptParams[0] == PEDTYPE_FIREMAN) - ped = new CEmergencyPed(ScriptParams[1]); + if (GET_INTEGER_PARAM(0) == PEDTYPE_COP) + ped = new CCopPed((eCopType)GET_INTEGER_PARAM(1)); + else if (GET_INTEGER_PARAM(0) == PEDTYPE_EMERGENCY || GET_INTEGER_PARAM(0) == PEDTYPE_FIREMAN) + ped = new CEmergencyPed(GET_INTEGER_PARAM(1)); else - ped = new CCivilianPed((ePedType)ScriptParams[0], ScriptParams[1]); + ped = new CCivilianPed((ePedType)GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); ped->CharCreatedBy = MISSION_CHAR; ped->bRespondsToThreats = false; ped->bAllowMedicsToReviveMe = false; ped->bIsPlayerFriend = false; - CVector pos = *(CVector*)&ScriptParams[2]; + CVector pos = GET_VECTOR_PARAM(2); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += 1.0f; @@ -3687,29 +4083,29 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) CWorld::Add(ped); ped->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pos); CPopulation::ms_nTotalMissionPeds++; - ScriptParams[0] = CPools::GetPedPool()->GetIndex(ped); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(ped)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_DELETE_CHAR: { CollectParameters(&m_nIp, 1); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); CTheScripts::RemoveThisPed(ped); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_CHAR_WANDER_DIR: { CollectParameters(&m_nIp, 2); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); ped->ClearAll(); - int8 path = ScriptParams[1]; - if (ScriptParams[1] < 0 || ScriptParams[1] > 7) + int8 path = GET_INTEGER_PARAM(1); + if (GET_INTEGER_PARAM(1) < 0 || GET_INTEGER_PARAM(1) > 7) // Max number GetRandomNumberInRange returns is max-1 #ifdef FIX_BUGS path = CGeneral::GetRandomNumberInRange(0, 8); @@ -3724,19 +4120,19 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_CHAR_FOLLOW_PATH: { CollectParameters(&m_nIp, 6); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); if (ped->GetPedState() == PED_ATTACK || ped->GetPedState() == PED_FIGHT || !ped->IsPedInControl()) return 0; - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float radius = *(float*)&ScriptParams[4]; + float radius = GET_FLOAT_PARAM(4); eMoveState state; - switch (ScriptParams[5]) { + switch (GET_INTEGER_PARAM(5)) { case 0: state = PEDMOVE_WALK; break; case 1: state = PEDMOVE_RUN; break; - default: assert(0); + default: state = PEDMOVE_WALK; break; } ped->ClearAll(); ped->m_pathNodeTimer = 0; @@ -3746,7 +4142,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_CHAR_SET_IDLE: { CollectParameters(&m_nIp, 1); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); ped->bScriptObjectiveCompleted = false; ped->SetObjective(OBJECTIVE_WAIT_ON_FOOT); @@ -3755,7 +4151,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_GET_CHAR_COORDINATES: { CollectParameters(&m_nIp, 1); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); CVehicle* vehicle; CVector pos; @@ -3768,21 +4164,21 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) pos = vehicle->GetPosition(); else pos = ped->GetPosition(); - *(CVector*)&ScriptParams[0] = pos; + SET_VECTOR_PARAM(0, pos); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_SET_CHAR_COORDINATES: { CollectParameters(&m_nIp, 4); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); CVehicle* vehicle; if (ped->bInVehicle) vehicle = ped->m_pMyVehicle; else vehicle = nil; - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); // removed dumb stuff again @@ -3805,72 +4201,74 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) } return 0; } - /* case COMMAND_IS_CHAR_STILL_ALIVE: { CollectParameters(&m_nIp, 1); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); - UpdateCompareFlag(ped && ped->GetPedState() != PED_DEAD && ped->GetPedState() != PED_DIE); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + UpdateCompareFlag(ped && !ped->DyingOrDead()); return 0; } - */ case COMMAND_IS_CHAR_IN_AREA_2D: { CollectParameters(&m_nIp, 6); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); CVehicle* vehicle; if (ped->bInVehicle) vehicle = ped->m_pMyVehicle; else vehicle = nil; - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); if (vehicle) UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, x2, y2)); else UpdateCompareFlag(ped->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); + */ return 0; } case COMMAND_IS_CHAR_IN_AREA_3D: { CollectParameters(&m_nIp, 8); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); CVehicle* vehicle; if (ped->bInVehicle) vehicle = ped->m_pMyVehicle; else vehicle = nil; - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float z1 = *(float*)&ScriptParams[3]; - float x2 = *(float*)&ScriptParams[4]; - float y2 = *(float*)&ScriptParams[5]; - float z2 = *(float*)&ScriptParams[6]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float z1 = GET_FLOAT_PARAM(3); + float x2 = GET_FLOAT_PARAM(4); + float y2 = GET_FLOAT_PARAM(5); + float z2 = GET_FLOAT_PARAM(6); if (vehicle) UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2)); else UpdateCompareFlag(ped->IsWithinArea(x1, y1, z1, x2, y2, z2)); - if (ScriptParams[7]) + if (GET_INTEGER_PARAM(7)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2); + */ return 0; } case COMMAND_CREATE_CAR: { CollectParameters(&m_nIp, 4); int32 handle; - if (CModelInfo::IsBoatModel(ScriptParams[0])) { - CBoat* boat = new CBoat(ScriptParams[0], MISSION_VEHICLE); - CVector pos = *(CVector*)&ScriptParams[1]; + if (CModelInfo::IsBoatModel(GET_INTEGER_PARAM(0))) { + CBoat* boat = new CBoat(GET_INTEGER_PARAM(0), MISSION_VEHICLE); + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += boat->GetDistanceFromCentreOfMassToBaseOfModel(); @@ -3889,13 +4287,13 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) else { CVehicle* car; - if (!CModelInfo::IsBikeModel(ScriptParams[0])) - car = new CAutomobile(ScriptParams[0], MISSION_VEHICLE); + if (!CModelInfo::IsBikeModel(GET_INTEGER_PARAM(0))) + car = new CAutomobile(GET_INTEGER_PARAM(0), MISSION_VEHICLE); else { - car = new CBike(ScriptParams[0], MISSION_VEHICLE); + car = new CBike(GET_INTEGER_PARAM(0), MISSION_VEHICLE); ((CBike*)(car))->bIsStanding = true; } - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); @@ -3910,14 +4308,14 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) car->AutoPilot.m_nCruiseSpeed = car->AutoPilot.m_fMaxTrafficSpeed = 9.0f; car->AutoPilot.m_nCurrentLane = car->AutoPilot.m_nNextLane = 0; car->bEngineOn = false; - car->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pos); + car->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pos); // TODO: gpTheZones car->bHasBeenOwnedByPlayer = true; if (m_bIsMissionScript) car->bIsStaticWaitingForCollision = true; CWorld::Add(car); handle = CPools::GetVehiclePool()->GetIndex(car); } - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(handle, CLEANUP_CAR); @@ -3926,25 +4324,26 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_DELETE_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (car) { CWorld::Remove(car); CWorld::RemoveReferencesToDeletedObject(car); delete car; } if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CAR); return 0; } case COMMAND_CAR_GOTO_COORDINATES: { CollectParameters(&m_nIp, 4); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); + uint8 nOldMission = car->AutoPilot.m_nCarMission; if (CCarCtrl::JoinCarWithRoadSystemGotoCoors(car, pos, false)) car->AutoPilot.m_nCarMission = MISSION_GOTOCOORDS_STRAIGHT; else @@ -3952,13 +4351,14 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) car->SetStatus(STATUS_PHYSICS); car->bEngineOn = true; car->AutoPilot.m_nCruiseSpeed = Max(1, car->AutoPilot.m_nCruiseSpeed); - car->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); + if (nOldMission != car->AutoPilot.m_nCarMission) + car->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); return 0; } case COMMAND_CAR_WANDER_RANDOMLY: { CollectParameters(&m_nIp, 1); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); CCarCtrl::JoinCarWithRoadSystem(car); car->AutoPilot.m_nCarMission = MISSION_CRUISE; @@ -3970,7 +4370,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_CAR_SET_IDLE: { CollectParameters(&m_nIp, 1); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); car->AutoPilot.m_nCarMission = MISSION_NONE; return 0; @@ -3978,18 +4378,18 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_GET_CAR_COORDINATES: { CollectParameters(&m_nIp, 1); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); - *(CVector*)&ScriptParams[0] = car->GetPosition(); + SET_VECTOR_PARAM(0, car->GetPosition()); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_SET_CAR_COORDINATES: { CollectParameters(&m_nIp, 4); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); @@ -4035,80 +4435,84 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) } return 0; } - /* case COMMAND_IS_CAR_STILL_ALIVE: { CollectParameters(&m_nIp, 1); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(car && car->GetStatus() != STATUS_WRECKED && (car->IsBoat() || !car->bIsInWater)); return 0; } - */ case COMMAND_SET_CAR_CRUISE_SPEED: { CollectParameters(&m_nIp, 2); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); #if defined MISSION_REPLAY && defined SIMPLIER_MISSIONS - car->AutoPilot.m_nCruiseSpeed = *(float*)&ScriptParams[1]; + car->AutoPilot.m_nCruiseSpeed = GET_FLOAT_PARAM(1); if (missionRetryScriptIndex == 40 && car->GetModelIndex() == MI_CHEETAH) // Turismo car->AutoPilot.m_nCruiseSpeed = 8 * car->AutoPilot.m_nCruiseSpeed / 10; car->AutoPilot.m_nCruiseSpeed = Min(car->AutoPilot.m_nCruiseSpeed, 60.0f * car->pHandling->Transmission.fMaxCruiseVelocity); #else - car->AutoPilot.m_nCruiseSpeed = Min(*(float*)&ScriptParams[1], 60.0f * car->pHandling->Transmission.fMaxCruiseVelocity); + car->AutoPilot.m_nCruiseSpeed = Min(GET_FLOAT_PARAM(1), 60.0f * car->pHandling->Transmission.fMaxCruiseVelocity); #endif return 0; } case COMMAND_SET_CAR_DRIVING_STYLE: { CollectParameters(&m_nIp, 2); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); - car->AutoPilot.m_nDrivingStyle = (uint8)ScriptParams[1]; + car->AutoPilot.m_nDrivingStyle = (uint8)GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_CAR_MISSION: { CollectParameters(&m_nIp, 2); - CVehicle* car = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* car = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(car); - car->AutoPilot.m_nCarMission = (uint8)ScriptParams[1]; - car->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); + if ((uint8)GET_INTEGER_PARAM(1) != car->AutoPilot.m_nCarMission) { + car->AutoPilot.m_nCarMission = (uint8)GET_INTEGER_PARAM(1); + car->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); + } car->bEngineOn = true; return 0; } case COMMAND_IS_CAR_IN_AREA_2D: { CollectParameters(&m_nIp, 6); - CVehicle* vehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* vehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(vehicle); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); UpdateCompareFlag(vehicle->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); + */ return 0; } case COMMAND_IS_CAR_IN_AREA_3D: { CollectParameters(&m_nIp, 8); - CVehicle* vehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* vehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(vehicle); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float z1 = *(float*)&ScriptParams[3]; - float x2 = *(float*)&ScriptParams[4]; - float y2 = *(float*)&ScriptParams[5]; - float z2 = *(float*)&ScriptParams[6]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float z1 = GET_FLOAT_PARAM(3); + float x2 = GET_FLOAT_PARAM(4); + float y2 = GET_FLOAT_PARAM(5); + float z2 = GET_FLOAT_PARAM(6); UpdateCompareFlag(vehicle->IsWithinArea(x1, y1, z1, x2, y2, z2)); - if (ScriptParams[7]) + if (GET_INTEGER_PARAM(7)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2); + */ return 0; } case COMMAND_SPECIAL_0: @@ -4129,56 +4533,54 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) AllowMissionReplay = 1; #endif CollectParameters(&m_nIp, 2); - CMessages::AddBigMessage(key, ScriptParams[0], ScriptParams[1] - 1); + CMessages::AddBigMessage(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) - 1); return 0; } case COMMAND_PRINT: { wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddMessage(key, ScriptParams[0], ScriptParams[1]); + CMessages::AddMessage(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; } case COMMAND_PRINT_NOW: { wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddMessageJumpQ(key, ScriptParams[0], ScriptParams[1]); + CMessages::AddMessageJumpQ(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; } - /* case COMMAND_PRINT_SOON: { wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddMessageSoon(key, ScriptParams[0], ScriptParams[1]); + CMessages::AddMessageSoon(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; } - */ case COMMAND_CLEAR_PRINTS: CMessages::ClearMessages(); return 0; case COMMAND_GET_TIME_OF_DAY: - ScriptParams[0] = CClock::GetHours(); - ScriptParams[1] = CClock::GetMinutes(); + SET_INTEGER_PARAM(0, CClock::GetHours()); + SET_INTEGER_PARAM(1, CClock::GetMinutes()); StoreParameters(&m_nIp, 2); return 0; case COMMAND_SET_TIME_OF_DAY: CollectParameters(&m_nIp, 2); - CClock::SetGameClock(ScriptParams[0], ScriptParams[1]); + CClock::SetGameClock(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_GET_MINUTES_TO_TIME_OF_DAY: CollectParameters(&m_nIp, 2); - ScriptParams[0] = CClock::GetGameClockMinutesUntil(ScriptParams[0], ScriptParams[1]); + SET_INTEGER_PARAM(0, CClock::GetGameClockMinutesUntil(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_IS_POINT_ON_SCREEN: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= -100) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - UpdateCompareFlag(TheCamera.IsSphereVisible(pos, *(float*)&ScriptParams[3])); + UpdateCompareFlag(TheCamera.IsSphereVisible(pos, GET_FLOAT_PARAM(3))); return 0; } case COMMAND_DEBUG_ON: @@ -4187,14 +4589,14 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) case COMMAND_DEBUG_OFF: CTheScripts::DbgFlag = false; return 0; - /* case COMMAND_RETURN_TRUE: UpdateCompareFlag(true); + ReturnFromGosubOrFunction(); return 0; case COMMAND_RETURN_FALSE: UpdateCompareFlag(false); + ReturnFromGosubOrFunction(); return 0; - */ //case COMMAND_VAR_INT: default: script_assert(0); @@ -4221,18 +4623,21 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_WHILE: case COMMAND_WHILENOT: case COMMAND_ENDWHILE: + case COMMAND_214: + case COMMAND_215: + case COMMAND_216: + case COMMAND_217: + case COMMAND_218: */ case COMMAND_ANDOR: CollectParameters(&m_nIp, 1); - m_nAndOrState = ScriptParams[0]; + m_nAndOrState = GET_INTEGER_PARAM(0); if (m_nAndOrState == ANDOR_NONE){ m_bCondResult = false; // pointless }else if (m_nAndOrState >= ANDS_1 && m_nAndOrState <= ANDS_8){ m_bCondResult = true; - m_nAndOrState++; }else if (m_nAndOrState >= ORS_1 && m_nAndOrState <= ORS_8){ m_bCondResult = false; - m_nAndOrState++; }else{ script_assert(0 && "COMMAND_ANDOR: invalid ANDOR state"); } @@ -4240,7 +4645,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_LAUNCH_MISSION: { CollectParameters(&m_nIp, 1); - CRunningScript* pNew = CTheScripts::StartNewScript(ScriptParams[0]); + CRunningScript* pNew = CTheScripts::StartNewScript(GET_INTEGER_PARAM(0)); pNew->m_bIsMissionScript = true; return 0; } @@ -4254,7 +4659,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_STORE_CAR_CHAR_IS_IN: { CollectParameters(&m_nIp, 1); - CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* ped = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(ped); CVehicle* pCurrent = nil; if (ped->bInVehicle) { @@ -4299,14 +4704,14 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) break; } } - ScriptParams[0] = CTheScripts::StoreVehicleIndex; + SET_INTEGER_PARAM(0, CTheScripts::StoreVehicleIndex); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_STORE_CAR_PLAYER_IS_IN: { CollectParameters(&m_nIp, 1); - CPed* ped = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* ped = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(ped); if (!ped->bInVehicle) return 0; // No value written to output variable @@ -4350,15 +4755,15 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) break; } } - ScriptParams[0] = CTheScripts::StoreVehicleIndex; + SET_INTEGER_PARAM(0, CTheScripts::StoreVehicleIndex); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_CHAR_IN_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CVehicle* pCheckedVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle* pCheckedVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); CVehicle* pActualVehicle = pPed->bInVehicle ? pPed->m_pMyVehicle : nil; UpdateCompareFlag(pActualVehicle && pActualVehicle == pCheckedVehicle); return 0; @@ -4366,51 +4771,51 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_IS_PLAYER_IN_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pCheckedVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CVehicle* pCheckedVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle == pCheckedVehicle); return 0; } case COMMAND_IS_CHAR_IN_MODEL: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); CVehicle* pActualVehicle = pPed->bInVehicle ? pPed->m_pMyVehicle : nil; - UpdateCompareFlag(pActualVehicle && pActualVehicle->GetModelIndex() == ScriptParams[1]); + UpdateCompareFlag(pActualVehicle && pActualVehicle->GetModelIndex() == GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_PLAYER_IN_MODEL: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; - UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetModelIndex() == ScriptParams[1]); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetModelIndex() == GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_CHAR_IN_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle); return 0; } case COMMAND_IS_PLAYER_IN_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle); return 0; } case COMMAND_IS_BUTTON_PRESSED: { CollectParameters(&m_nIp, 2); - UpdateCompareFlag(GetPadState(ScriptParams[0], ScriptParams[1]) != 0); + UpdateCompareFlag(GetPadState(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)) != 0); return 0; } /* case COMMAND_GET_PAD_STATE: { CollectParameters(&m_nIp, 1); - ScriptParams[0] = GetPadState(ScriptParams[0], ScriptParams[1]); + SET_INTEGER_PARAM(0, GetPadState(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1))); StoreParameters(&m_nIp, 1); return 0; } @@ -4470,10 +4875,10 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_CREATE_OBJECT: { CollectParameters(&m_nIp, 4); - int mi = ScriptParams[0] >= 0 ? ScriptParams[0] : CTheScripts::UsedObjectArray[-ScriptParams[0]].index; + int mi = GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::UsedObjectArray[-GET_INTEGER_PARAM(0)].index; CObject* pObj = new CObject(mi, false); pObj->ObjectCreatedBy = MISSION_OBJECT; - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += pObj->GetDistanceFromCentreOfMassToBaseOfModel(); @@ -4481,73 +4886,72 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) pObj->SetOrientation(0.0f, 0.0f, 0.0f); pObj->GetMatrix().UpdateRW(); pObj->UpdateRwFrame(); - CBaseModelInfo* pModelInfo = CModelInfo::GetModelInfo(mi); - if (pModelInfo->IsBuilding() && ((CSimpleModelInfo*)pModelInfo)->m_isBigBuilding) - pObj->SetupBigBuilding(); CTheScripts::ClearSpaceForMissionEntity(pos, pObj); CWorld::Add(pObj); - ScriptParams[0] = CPools::GetObjectPool()->GetIndex(pObj); + SET_INTEGER_PARAM(0, CPools::GetObjectPool()->GetIndex(pObj)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_OBJECT); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_OBJECT); return 0; } case COMMAND_DELETE_OBJECT: { CollectParameters(&m_nIp, 1); - CObject* pObj = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObj = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); if (pObj){ CWorld::Remove(pObj); CWorld::RemoveReferencesToDeletedObject(pObj); delete pObj; } if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_OBJECT); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_OBJECT); return 0; } case COMMAND_ADD_SCORE: CollectParameters(&m_nIp, 2); - CWorld::Players[ScriptParams[0]].m_nMoney += ScriptParams[1]; - if (CWorld::Players[ScriptParams[0]].m_nMoney < 0) - CWorld::Players[ScriptParams[0]].m_nMoney = 0; + CWorld::Players[GET_INTEGER_PARAM(0)].m_nMoney += GET_INTEGER_PARAM(1); + if (CWorld::Players[GET_INTEGER_PARAM(0)].m_nMoney < 0) + CWorld::Players[GET_INTEGER_PARAM(0)].m_nMoney = 0; return 0; case COMMAND_IS_SCORE_GREATER: CollectParameters(&m_nIp, 2); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_nMoney > ScriptParams[1]); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_nMoney > GET_INTEGER_PARAM(1)); return 0; case COMMAND_STORE_SCORE: CollectParameters(&m_nIp, 1); - ScriptParams[0] = CWorld::Players[ScriptParams[0]].m_nMoney; + SET_INTEGER_PARAM(0, CWorld::Players[GET_INTEGER_PARAM(0)].m_nMoney); StoreParameters(&m_nIp, 1); return 0; case COMMAND_GIVE_REMOTE_CONTROLLED_CAR_TO_PLAYER: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CRemote::GivePlayerRemoteControlledCar(pos.x, pos.y, pos.z, DEGTORAD(*(float*)&ScriptParams[4]), MI_RCBANDIT); + CVehicle* pVehicle = CRemote::GivePlayerRemoteControlledCar(pos.x, pos.y, pos.z, DEGTORAD(GET_FLOAT_PARAM(4)), MI_RCBANDIT); + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex(pVehicle)); + StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ALTER_WANTED_LEVEL: CollectParameters(&m_nIp, 2); - CWorld::Players[ScriptParams[0]].m_pPed->SetWantedLevel(ScriptParams[1]); + CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->SetWantedLevel(GET_INTEGER_PARAM(1)); return 0; case COMMAND_ALTER_WANTED_LEVEL_NO_DROP: CollectParameters(&m_nIp, 2); - CWorld::Players[ScriptParams[0]].m_pPed->SetWantedLevelNoDrop(ScriptParams[1]); + CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->SetWantedLevelNoDrop(GET_INTEGER_PARAM(1)); return 0; case COMMAND_IS_WANTED_LEVEL_GREATER: CollectParameters(&m_nIp, 2); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_pPed->m_pWanted->GetWantedLevel() > ScriptParams[1]); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->m_pWanted->GetWantedLevel() > GET_INTEGER_PARAM(1)); return 0; case COMMAND_CLEAR_WANTED_LEVEL: CollectParameters(&m_nIp, 1); - CWorld::Players[ScriptParams[0]].m_pPed->SetWantedLevel(0); + CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->SetWantedLevel(0); return 0; case COMMAND_SET_DEATHARREST_STATE: CollectParameters(&m_nIp, 1); - m_bDeatharrestEnabled = (ScriptParams[0] == 1); + m_bDeatharrestEnabled = (GET_INTEGER_PARAM(0) == 1); return 0; case COMMAND_HAS_DEATHARREST_BEEN_EXECUTED: UpdateCompareFlag(m_bDeatharrestExecuted); @@ -4556,51 +4960,54 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_ADD_AMMO_TO_PLAYER: { CollectParameters(&m_nIp, 3); - CWorld::Players[ScriptParams[0]].m_pPed->GrantAmmo((eWeaponType)ScriptParams[1], ScriptParams[2]); + CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->GrantAmmo((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } */ case COMMAND_ADD_AMMO_TO_CHAR: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->GrantAmmo((eWeaponType)ScriptParams[1], ScriptParams[2]); + pPed->GrantAmmo((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); 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[GET_INTEGER_PARAM(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); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_WBState == WBSTATE_WASTED); return 0; case COMMAND_IS_CHAR_DEAD: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - UpdateCompareFlag(!pPed || pPed->DyingOrDead()); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + UpdateCompareFlag(!pPed || pPed->DyingOrDead() || pPed->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE); return 0; } case COMMAND_IS_CAR_DEAD: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(!pVehicle || pVehicle->GetStatus() == STATUS_WRECKED || pVehicle->bIsDrowning); return 0; } case COMMAND_SET_CHAR_THREAT_SEARCH: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_fearFlags |= ScriptParams[1]; + pPed->m_fearFlags |= GET_INTEGER_PARAM(1); return 0; } //case COMMAND_SET_CHAR_THREAT_REACTION: case COMMAND_SET_CHAR_OBJ_NO_OBJ: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->ClearObjective(); @@ -4613,7 +5020,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_IS_PLAYER_IN_ZONE: { CollectParameters(&m_nIp, 1); - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; char label[12]; CTheScripts::ReadTextLabelFromScript(&m_nIp, label); int zoneToCheck = CTheZones::FindZoneByLabelAndReturnIndex(label, ZONE_DEFAULT); @@ -4626,15 +5033,15 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) } case COMMAND_IS_PLAYER_PRESSING_HORN: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_pPed->GetPedState() == PED_DRIVING && - CPad::GetPad(ScriptParams[0])->GetHorn()); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed->GetPedState() == PED_DRIVING && + CPad::GetPad(GET_INTEGER_PARAM(0))->GetHorn()); return 0; case COMMAND_HAS_CHAR_SPOTTED_PLAYER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - UpdateCompareFlag(pPed->OurPedCanSeeThisOne(CWorld::Players[ScriptParams[1]].m_pPed)); + UpdateCompareFlag(pPed->OurPedCanSeeThisOne(CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed)); return 0; } //case COMMAND_ORDER_CHAR_TO_BACKDOOR: @@ -4642,7 +5049,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_IS_CHAR_OBJECTIVE_PASSED: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bScriptObjectiveCompleted); return 0; @@ -4654,43 +5061,43 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) case COMMAND_CREATE_CHAR_INSIDE_CAR: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - switch (ScriptParams[2]) { + switch (GET_INTEGER_PARAM(2)) { case MI_COP: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_STREET; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_STREET); break; case MI_SWAT: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_SWAT; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_SWAT); break; case MI_FBI: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_FBI; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_FBI); break; case MI_ARMY: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_ARMY; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_ARMY); break; case MI_MEDIC: - if (ScriptParams[1] == PEDTYPE_EMERGENCY) - ScriptParams[2] = PEDTYPE_EMERGENCY; + if (GET_INTEGER_PARAM(1) == PEDTYPE_EMERGENCY) + SET_INTEGER_PARAM(2, PEDTYPE_EMERGENCY); break; case MI_FIREMAN: - if (ScriptParams[1] == PEDTYPE_FIREMAN) - ScriptParams[2] = PEDTYPE_FIREMAN; + if (GET_INTEGER_PARAM(1) == PEDTYPE_FIREMAN) + SET_INTEGER_PARAM(2, PEDTYPE_FIREMAN); break; default: break; } CPed* pPed; - if (ScriptParams[1] == PEDTYPE_COP) - pPed = new CCopPed((eCopType)ScriptParams[2]); - else if (ScriptParams[1] == PEDTYPE_EMERGENCY || ScriptParams[1] == PEDTYPE_FIREMAN) - pPed = new CEmergencyPed(ScriptParams[2]); + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + pPed = new CCopPed((eCopType)GET_INTEGER_PARAM(2)); + else if (GET_INTEGER_PARAM(1) == PEDTYPE_EMERGENCY || GET_INTEGER_PARAM(1) == PEDTYPE_FIREMAN) + pPed = new CEmergencyPed(GET_INTEGER_PARAM(2)); else - pPed = new CCivilianPed((ePedType)ScriptParams[1], ScriptParams[2]); + pPed = new CCivilianPed((ePedType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); pPed->CharCreatedBy = MISSION_CHAR; pPed->bRespondsToThreats = false; pPed->bAllowMedicsToReviveMe = false; @@ -4700,7 +5107,6 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) pPed->SetPosition(pVehicle->GetPosition()); pPed->SetOrientation(0.0f, 0.0f, 0.0f); pPed->SetPedState(PED_DRIVING); - CPopulation::ms_nTotalMissionPeds++; script_assert(!pVehicle->pDriver); pVehicle->pDriver = pPed; pVehicle->pDriver->RegisterReference((CEntity**)&pVehicle->pDriver); @@ -4715,17 +5121,18 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) pPed->AddInCarAnims(pVehicle, true); pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); CWorld::Add(pPed); - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPed); + CPopulation::ms_nTotalMissionPeds++; + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPed)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_WARP_PLAYER_FROM_CAR_TO_COORD: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[1]; - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; + CVector pos = GET_VECTOR_PARAM(1); + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); if (pPlayer->m_pPed->bInVehicle){ @@ -4768,6 +5175,24 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) return -1; } +void CRunningScript::ReturnFromGosubOrFunction() +{ + uint32 val = m_nIp = m_anStack[--m_nStackPointer]; + if (!(m_nIp & BIT(STACKVALUE_IS_FUNCTION_CALL_BIT))) + return; + if (m_nIp & BIT(STACKVALUE_INVERT_RETURN_BIT)) + m_bCondResult = !m_bCondResult; + m_nIp = m_nIp & STACKVALUE_IP_MASK; + uint8 nInputParameters = CTheScripts::Read1ByteFromScript(&m_nIp); + uint8 nOutputParameters = CTheScripts::Read1ByteFromScript(&m_nIp); + uint8 nLocalsOffset = CTheScripts::Read1ByteFromScript(&m_nIp); + for (int i = 0; i < nOutputParameters; i++) + ScriptParams[i] = m_anLocalVariables[m_nLocalsPointer + nInputParameters + i]; + m_nIp += val >> STACKVALUE_IP_PARAMS_OFFSET; + m_nLocalsPointer -= nLocalsOffset; + StoreParameters(&m_nIp, nOutputParameters); +} + #ifdef MISSION_REPLAY bool CRunningScript::CanAllowMissionReplay() @@ -4838,23 +5263,19 @@ CTheScripts::SwitchToMission(int32 mission) CStats::LastMissionPassedName[0] = '\0'; #endif CTimer::Suspend(); - int offset = CTheScripts::MultiScriptArray[mission]; -#ifdef USE_DEBUG_SCRIPT_LOADER - CFileMgr::ChangeDir("\\data\\"); - int handle = CFileMgr::OpenFile(scriptfile, "rb"); - CFileMgr::ChangeDir("\\"); -#else - CFileMgr::ChangeDir("\\"); - int handle = CFileMgr::OpenFile("data\\main.scm", "rb"); -#endif - CFileMgr::Seek(handle, offset, 0); - CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT); - CFileMgr::CloseFile(handle); - CRunningScript* pMissionScript = CTheScripts::StartNewScript(SIZE_MAIN_SCRIPT); + int offset = CTheScripts::MultiScriptArray[mission] + 8; + int size = CTheScripts::MultiScriptArray[mission + 1] - CTheScripts::MultiScriptArray[mission]; + if (size <= 0) + size = CTheScripts::LargestMissionScriptSize; + CFileMgr::Seek(gScriptsFile, offset, 0); + CFileMgr::Read(gScriptsFile, (const char*)&CTheScripts::ScriptSpace[CTheScripts::MainScriptSize], size); + CRunningScript* pMissionScript = CTheScripts::StartNewScript(CTheScripts::MainScriptSize); CTimer::Resume(); pMissionScript->m_bIsMissionScript = true; pMissionScript->m_bMissionFlag = true; CTheScripts::bAlreadyRunningAMissionScript = true; + memset(&CTheScripts::ScriptSpace[CTheScripts::NumTrueGlobals * 4 + 8], 0, CTheScripts::MostGlobals * 4); CGameLogic::ClearShortCut(); + pMissionScript->Process(); } #endif diff --git a/src/control/Script.h b/src/control/Script.h index 80c05363..8b54f28f 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -1,7 +1,9 @@ #pragma once -#include "Font.h" +#include "Font.h" +#include "Ped.h" #include "PedType.h" #include "Text.h" +#include "sList.h" #include "Sprite2d.h" class CEntity; @@ -17,7 +19,7 @@ class CRunningScript; extern int32 ScriptParams[32]; void FlushLog(); -#define script_assert(_Expression) FlushLog(); assert(_Expression); +#define script_assert(_Expression) { FlushLog(); assert(_Expression); } #define PICKUP_PLACEMENT_OFFSET (0.5f) #define PED_FIND_Z_OFFSET (5.0f) @@ -28,9 +30,9 @@ void FlushLog(); #define UPSIDEDOWN_TURN_SPEED_THRESHOLD (0.02f) #define UPSIDEDOWN_TIMER_THRESHOLD (1000) -#define SPHERE_MARKER_R (252) -#define SPHERE_MARKER_G (138) -#define SPHERE_MARKER_B (242) +#define SPHERE_MARKER_R (255) +#define SPHERE_MARKER_G (255) +#define SPHERE_MARKER_B (128) #define SPHERE_MARKER_A (228) #define SPHERE_MARKER_PULSE_PERIOD 2048 #define SPHERE_MARKER_PULSE_FRACTION 0.1f @@ -47,7 +49,15 @@ void FlushLog(); #define KEY_LENGTH_IN_SCRIPT (8) -//#define GTA_SCRIPT_COLLECTIVE +#define GET_INTEGER_PARAM(i) (ScriptParams[i]) +#define GET_FLOAT_PARAM(i) (*(float*)&ScriptParams[i]) +#define GET_VECTOR_PARAM(i) (CVector(GET_FLOAT_PARAM(i), GET_FLOAT_PARAM(i+1), GET_FLOAT_PARAM(i+2))) + +#define SET_INTEGER_PARAM(i, x) ScriptParams[i] = x +#define SET_FLOAT_PARAM(i, x) *(float*)&ScriptParams[i] = x +#define SET_VECTOR_PARAM(i, v) { *(float*)&ScriptParams[i] = (v).x; *(float*)&ScriptParams[i+1] = (v).y; *(float*)&ScriptParams[i+2] = (v).z; } + +#define GTA_SCRIPT_COLLECTIVE struct intro_script_rectangle { @@ -215,15 +225,33 @@ public: }; enum { + MAX_STACK_DEPTH = 16, + NUM_LOCAL_VARS = 96, + NUM_TIMERS = 2, + NUM_GLOBAL_SLOTS = 26 +}; + +enum { ARGUMENT_END = 0, + ARGUMENT_INT_ZERO, + ARGUMENT_FLOAT_ZERO, + ARGUMENT_FLOAT_1BYTE, + ARGUMENT_FLOAT_2BYTES, + ARGUMENT_FLOAT_3BYTES, ARGUMENT_INT32, - ARGUMENT_GLOBALVAR, - ARGUMENT_LOCALVAR, ARGUMENT_INT8, ARGUMENT_INT16, - ARGUMENT_FLOAT + ARGUMENT_FLOAT, + ARGUMENT_TIMER, + ARGUMENT_LOCAL = ARGUMENT_TIMER + NUM_TIMERS, + ARGUMENT_LOCAL_ARRAY = ARGUMENT_LOCAL + NUM_LOCAL_VARS, + ARGUMENT_GLOBAL = ARGUMENT_LOCAL_ARRAY + NUM_LOCAL_VARS, + ARGUMENT_GLOBAL_ARRAY = ARGUMENT_GLOBAL + NUM_GLOBAL_SLOTS, + MAX_ARGUMENT = ARGUMENT_GLOBAL_ARRAY + NUM_GLOBAL_SLOTS }; +static_assert(MAX_ARGUMENT <= 256, "MAX_ARGUMENT must be less or equal to 256"); + struct tCollectiveData { int32 colIndex; @@ -247,11 +275,18 @@ struct tBuildingSwap int32 m_nOldModel; }; - -enum { - MAX_STACK_DEPTH = 6, - NUM_LOCAL_VARS = 16, - NUM_TIMERS = 2 +struct script_corona +{ + int id; + float x; + float y; + float z; + float size; + uint8 r; + uint8 g; + uint8 b; + int type; + int flareType; }; class CRunningScript @@ -276,14 +311,25 @@ class CRunningScript ORS_8 }; + enum { + STACKVALUE_IP_BITS = 22, + STACKVALUE_INVERT_RETURN_BIT = STACKVALUE_IP_BITS, + STACKVALUE_IS_FUNCTION_CALL_BIT, + STACKVALUE_IP_PARAMS_OFFSET, + + STACKVALUE_IP_MASK = ((1 << STACKVALUE_IP_BITS) - 1) + }; + public: CRunningScript* next; CRunningScript* prev; + int32 m_nId; char m_abScriptName[8]; uint32 m_nIp; uint32 m_anStack[MAX_STACK_DEPTH]; uint16 m_nStackPointer; - int32 m_anLocalVariables[NUM_LOCAL_VARS + NUM_TIMERS]; + int32 m_anLocalVariables[NUM_LOCAL_VARS + 8 + NUM_TIMERS]; // TODO(LCS): figure out why 106 + int32 m_nLocalsPointer; bool m_bIsActive; bool m_bCondResult; bool m_bIsMissionScript; @@ -303,8 +349,8 @@ public: void Load(uint8*& buf); void UpdateTimers(float timeStep) { - m_anLocalVariables[NUM_LOCAL_VARS] += timeStep; - m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep; + for (int i = 0; i < NUM_TIMERS; i++) + m_anLocalVariables[NUM_LOCAL_VARS + 8 + i] += timeStep; } void Init(); @@ -315,14 +361,37 @@ public: static const uint32 nSaveStructSize; - void CollectParameters(uint32*, int16); + void CollectParameters(uint32*, int16, int* pParams = (int*)&ScriptParams); int32 CollectNextParameterWithoutIncreasingPC(uint32); int32* GetPointerToScriptVariable(uint32*, int16); void StoreParameters(uint32*, int16); int8 ProcessOneCommand(); void DoDeatharrestCheck(); - void UpdateCompareFlag(bool); + void UpdateCompareFlag(bool flag) + { + if (m_bNotFlag) + flag = !flag; + if (m_nAndOrState == ANDOR_NONE) { + m_bCondResult = flag; + return; + } + if (m_nAndOrState >= ANDS_1 && m_nAndOrState <= ANDS_8) { + m_bCondResult &= flag; + if (m_nAndOrState == ANDS_1) { + m_nAndOrState = ANDOR_NONE; + return; + } + } + else { + m_bCondResult |= flag; + if (m_nAndOrState <= ORS_1) { + m_nAndOrState = ANDOR_NONE; + return; + } + } + m_nAndOrState--; + } int16 GetPadState(uint16, uint16); int8 ProcessCommands0To99(int32); @@ -340,7 +409,10 @@ public: int8 ProcessCommands1200To1299(int32); int8 ProcessCommands1300To1399(int32); int8 ProcessCommands1400To1499(int32); + int8 ProcessCommands1500To1599(int32); + int8 ProcessCommands1600To1699(int32); + uint32 CollectLocateParameters(uint32*, bool); void LocatePlayerCommand(int32, uint32*); void LocatePlayerCharCommand(int32, uint32*); void LocatePlayerCarCommand(int32, uint32*); @@ -378,9 +450,10 @@ public: bool ThisIsAValidRandomCop(uint32 mi, int cop, int swat, int fbi, int army, int miami); bool ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal); + bool CheckDamagedWeaponType(int32 actual, int32 type); + + void ReturnFromGosubOrFunction(); - bool CheckDamagedWeaponType(int32 actual, int32 type); - }; @@ -390,37 +463,30 @@ enum { }; enum { -#ifdef PS2 - SIZE_MAIN_SCRIPT = 205512, -#else - SIZE_MAIN_SCRIPT = 225512, -#endif - SIZE_MISSION_SCRIPT = 35000, - SIZE_SCRIPT_SPACE = SIZE_MAIN_SCRIPT + SIZE_MISSION_SCRIPT -}; - -enum { MAX_NUM_SCRIPTS = 128, MAX_NUM_INTRO_TEXT_LINES = 48, MAX_NUM_INTRO_RECTANGLES = 16, MAX_NUM_SCRIPT_SRPITES = 16, MAX_NUM_SCRIPT_SPHERES = 16, - MAX_NUM_USED_OBJECTS = 220, - MAX_NUM_MISSION_SCRIPTS = 120, - MAX_NUM_BUILDING_SWAPS = 25, - MAX_NUM_INVISIBILITY_SETTINGS = 20, - MAX_NUM_STORED_LINES = 1024 + MAX_NUM_COLLECTIVES = 32, + MAX_NUM_USED_OBJECTS = 305, + MAX_NUM_MISSION_SCRIPTS = 150, + MAX_NUM_BUILDING_SWAPS = 80, + MAX_NUM_INVISIBILITY_SETTINGS = 52, + MAX_NUM_STORED_LINES = 1024, + MAX_ALLOWED_COLLISIONS = 2 }; class CTheScripts { public: - static uint8 ScriptSpace[SIZE_SCRIPT_SPACE]; + static uint8* ScriptSpace; static CRunningScript ScriptsArray[MAX_NUM_SCRIPTS]; static intro_text_line IntroTextLines[MAX_NUM_INTRO_TEXT_LINES]; static intro_script_rectangle IntroRectangles[MAX_NUM_INTRO_RECTANGLES]; static CSprite2d ScriptSprites[MAX_NUM_SCRIPT_SRPITES]; static script_sphere_struct ScriptSphereArray[MAX_NUM_SCRIPT_SPHERES]; + static tCollectiveData CollectiveArray[MAX_NUM_COLLECTIVES]; static tUsedObject UsedObjectArray[MAX_NUM_USED_OBJECTS]; static int32 MultiScriptArray[MAX_NUM_MISSION_SCRIPTS]; static tBuildingSwap BuildingSwapArray[MAX_NUM_BUILDING_SWAPS]; @@ -452,20 +518,24 @@ public: static uint16 ScriptsUpdated; static uint32 LastMissionPassedTime; static uint16 NumberOfExclusiveMissionScripts; -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) -#define CARDS_IN_SUIT (13) -#define NUM_SUITS (4) -#define MAX_DECKS (6) -#define CARDS_IN_DECK (CARDS_IN_SUIT * NUM_SUITS) -#define CARDS_IN_STACK (CARDS_IN_DECK * MAX_DECKS) - static int16 CardStack[CARDS_IN_STACK]; - static int16 CardStackPosition; -#endif + static bool bPlayerIsInTheStatium; static uint8 RiotIntensity; static bool bPlayerHasMetDebbieHarry; - static void Init(); + static int AllowedCollision[MAX_ALLOWED_COLLISIONS]; + static short* SavedVarIndices; + static int NumSaveVars; + static int FSDestroyedFlag; + static int NextProcessId; + static bool InTheScripts; + static CRunningScript* pCurrent; + static uint16 NumTrueGlobals; + static uint16 MostGlobals; + static base::cSList<script_corona> mCoronas; + static int NextScriptCoronaID; + + static bool Init(bool loaddata = false); static void Process(); static CRunningScript* StartTestScript(); @@ -475,11 +545,13 @@ public: static void UndoBuildingSwaps(); static void UndoEntityInvisibilitySettings(); + /* static void ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, uint32 col, uint32 col2); static void RenderTheScriptDebugLines(); + */ static void SaveAllScripts(uint8*, uint32*); - static void LoadAllScripts(uint8*, uint32); + static bool LoadAllScripts(uint8*, uint32); static bool IsDebugOn() { return DbgFlag; }; static void InvertDebugFlag() { DbgFlag = !DbgFlag; } @@ -535,10 +607,12 @@ public: static void DrawScriptSpheres(); static void HighlightImportantArea(uint32, float, float, float, float, float); static void HighlightImportantAngledArea(uint32, float, float, float, float, float, float, float, float, float); + /* static void DrawDebugSquare(float, float, float, float); static void DrawDebugAngledSquare(float, float, float, float, float, float, float, float); static void DrawDebugCube(float, float, float, float, float, float); static void DrawDebugAngledCube(float, float, float, float, float, float, float, float, float, float); + */ static void AddToInvisibilitySwapArray(CEntity*, bool); static void AddToBuildingSwapArray(CBuilding*, int32, int32); @@ -547,7 +621,7 @@ public: static int32 AddScriptSphere(int32 id, CVector pos, float radius); static int32 GetNewUniqueScriptSphereIndex(int32 index); static void RemoveScriptSphere(int32 index); - static void RemoveScriptTextureDictionary(); + //static void RemoveScriptTextureDictionary(); public: static void RemoveThisPed(CPed* pPed); @@ -556,6 +630,10 @@ public: static void SwitchToMission(int32 mission); #endif + static int GetSaveVarIndex(int); + static void Shutdown(void); + static void SwapNearestBuildingModel(float, float, float, float, int, int); + #ifdef GTA_SCRIPT_COLLECTIVE static void AdvanceCollectiveIndex() { @@ -575,8 +653,14 @@ public: static void SetObjectiveForAllPedsInCollective(int, eObjective); #endif + static bool IsFortStauntonDestroyed() { return FSDestroyedFlag && *(int32*)&ScriptSpace[FSDestroyedFlag] == 1; } + }; +extern int ScriptParams[32]; + +VALIDATE_SIZE(uStackReturnValue, 4); + #ifdef USE_DEBUG_SCRIPT_LOADER extern int scriptToLoad; #endif @@ -599,3 +683,7 @@ void RetryMission(int, int); #ifdef USE_DEBUG_SCRIPT_LOADER extern int scriptToLoad; #endif + +extern int gScriptsFile; +extern CVector gVectorSetInLua; + diff --git a/src/control/Script10.cpp b/src/control/Script10.cpp new file mode 100644 index 00000000..ce822505 --- /dev/null +++ b/src/control/Script10.cpp @@ -0,0 +1,421 @@ +#include "common.h" + +#include "Script.h" +#include "ScriptCommands.h" + +#include "CarCtrl.h" +#include "DMAudio.h" +#include "Frontend.h" +#include "GameLogic.h" +#include "Garages.h" +#include "General.h" +#include "Hud.h" +#include "Messages.h" +#include "Object.h" +#include "Pad.h" +#include "Pickups.h" +#include "PlayerPed.h" +#include "Pools.h" +#include "Vehicle.h" +#include "SpecialFX.h" +#include "Stats.h" +#include "User.h" +#include "Weather.h" +#include "World.h" + +bool gDeveloperFlag; + +int8 CRunningScript::ProcessCommands1600To1699(int32 command) +{ + switch (command) { + case COMMAND_ADD_NOODLES_DELIVERED: + CollectParameters(&m_nIp, 1); + // CStats::NoodlesDelievered += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_SCRAPYARD_CHALLENGE_SCORE: + CollectParameters(&m_nIp, 1); + //CStats::TopScrapyardChallengeScore = Max(CStats::TopScrapyardChallengeScore, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_9MM_MAYHEM_SCORE: + CollectParameters(&m_nIp, 1); + //CStats::Top9mmMayhemScore = Max(CStats::Top9mmMayhemScore, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_SCOOTER_SHOOTER_SCORE: + CollectParameters(&m_nIp, 1); + //CStats::TopScooterShooterScore = Max(CStats::TopScooterShooterScore, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_ADD_MONEY_MADE_FROM_TOURIST: + CollectParameters(&m_nIp, 1); + // CStats::MoneyMadeFromTourist += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_ADD_TOURISTS_TAKEN_TO_SPOTS: + CollectParameters(&m_nIp, 1); + // CStats::TouristsTakenToSpots += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_ADD_EXPORTED_CARS: + CollectParameters(&m_nIp, 1); + // CStats::NumberOfExportedCars += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_SET_TOTAL_EXPORT_CARS: + CollectParameters(&m_nIp, 1); + // CStats::TotalNumberOfCarExport = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_DIRT_BIKE_FASTEST_LAP: + CollectParameters(&m_nIp, 2); + // CStats::RegisterDirtBikeFastestLap(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_REGISTER_DIRT_BIKE_FASTEST_TIME: + CollectParameters(&m_nIp, 2); + // CStats::RegisterDirtBikeFastestTime(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_REGISTER_DIRT_BIKE_AIR_TIME: + CollectParameters(&m_nIp, 1); + //CStats::DirtBikeMostAir = Max(CStats::DirtBikeMostAir, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_ADD_ARROW_3D_MARKER: + { + uint32 ip = m_nIp; + uint32 id = (uint32)(uintptr)GetPointerToScriptVariable(&ip, 0); + CollectParameters(&m_nIp, 10); + CVector pos = GET_VECTOR_PARAM(0); + CVector dir = GET_VECTOR_PARAM(3); + pos.z += GET_FLOAT_PARAM(9) + 7.0f; + //C3dMarkers::PlaceMarker(id, MARKERTYPE_ARROW, pos, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8), 200, 1, 3.2f, 1, dir, 1.0f, 0, 0); - TODO + return 0; + } + case COMMAND_PRINT_NOW_OVERRIDE_FADE: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 2); + CMessages::AddMessageJumpQ(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); // true, true + return 0; + } + case COMMAND_GET_PICKUP_VALUE: + { + CollectParameters(&m_nIp, 1); + SET_INTEGER_PARAM(0, CPickups::GetValue(GET_INTEGER_PARAM(0))); + return 0; + } + case COMMAND_SET_PICKUP_VALUE: + { + CollectParameters(&m_nIp, 2); + CPickups::SetValue(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + } + case COMMAND_IS_DEVELOPER: + UpdateCompareFlag(gDeveloperFlag); + return 0; + case COMMAND_SET_DEVELOPER_FLAG: + CollectParameters(&m_nIp, 1); + gDeveloperFlag = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_WICHITA_WIPEOUT_SCORE: + CollectParameters(&m_nIp, 1); + //CStats::TopWichitaWipeoutScore = Max(CStats::TopWichitaWipeoutScore, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_ATTACH_OBJECT_TO_CAR: + { + CollectParameters(&m_nIp, 5); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + script_assert(pVehicle); + CVector offset = GET_VECTOR_PARAM(2); + // pObject->AttachObjectToEntity(pVehicle, offset); + return 0; + } + case COMMAND_DETACH_OBJECT_FROM_CAR: + { + CollectParameters(&m_nIp, 1); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + // if (pObject && pObject->m_pAttachedTo) + // pObject->DettachObjectFromEntity(); + return 0; + } + case COMMAND_SET_PAD_STICKS_MULTIPLIER: + { + CollectParameters(&m_nIp, 2); + CPad::GetPad(0)->unk_B4 = GET_FLOAT_PARAM(0); + CPad::GetPad(0)->unk_B8 = GET_FLOAT_PARAM(1); + return 0; + } + case COMMAND_PRINT_SUBTITLE_NOW: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 2); + if (FrontEndMenuManager.m_PrefsShowSubtitles) + CMessages::AddMessageJumpQ(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); // false, true + else + CMessages::AddToPreviousBriefArray(key, -1, -1, -1, -1, -1, -1, nil); + return 0; + } + case COMMAND_PRINT_SUBTITLE_NOW_OVERRIDE_FADE: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 2); + if (FrontEndMenuManager.m_PrefsShowSubtitles) + CMessages::AddMessageJumpQ(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); // true, true + else + CMessages::AddToPreviousBriefArray(key, -1, -1, -1, -1, -1, -1, nil); + return 0; + } + case COMMAND_PRINT_SUBTITLE_NOW_NO_BRIEF: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 2); + if (FrontEndMenuManager.m_PrefsShowSubtitles) + CMessages::AddMessageJumpQ(key, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); // false, false + else + CMessages::AddToPreviousBriefArray(key, -1, -1, -1, -1, -1, -1, nil); + return 0; + } + case COMMAND_PRINT_WITH_NUMBER_NOW_NO_BRIEF: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 3); + CMessages::AddMessageJumpQWithNumber(key, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); // 0 + return 0; + } + case COMMAND_GET_ANGLE_BETWEEN_POINTS: + { + CollectParameters(&m_nIp, 4); + SET_FLOAT_PARAM(0, CGeneral::GetAngleBetweenPoints(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(3))); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_OVERRIDE_CHAR_MOVE_ANIM: + { + CollectParameters(&m_nIp, 1); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bOverrideMoveAnim = true; + return 0; + } + case COMMAND_1627: + { + CollectParameters(&m_nIp, 1); + // something related to debug menu, not implemented + return 0; + } + case COMMAND_ENABLE_EMERGENCY_VEHICLES: + { + CollectParameters(&m_nIp, 1); + gbEmergencyVehiclesEnabled = GET_INTEGER_PARAM(0) != 0; + return 0; + } + case COMMAND_ADD_UNLOCKED_COSTUME: + CollectParameters(&m_nIp, 1); + // CStats::AddUnlockedCostume(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_CLEAR_MULTIPLAYER_SPLASH_SCREEN: + // ClearMultiplayerSplashScreen(); + return 0; + case COMMAND_PRINT_WITH_2_NUMBERS_NOW_NO_BRIEF: + { + wchar* key = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 4); + CMessages::AddMessageJumpQWithNumber(key, GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1); // 0 + return 0; + } + case COMMAND_GET_OBJECT_ORIENTATION: + { + CollectParameters(&m_nIp, 1); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pObject->GetForward().z)))); + SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y)))); + SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetRight().z, pObject->GetUp().z)))); + StoreParameters(&m_nIp, 3); + return 0; + } + case COMMAND_SET_OBJECT_ORIENTATION: + { + CollectParameters(&m_nIp, 4); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + pObject->SetOrientation(DEGTORAD(GET_FLOAT_PARAM(2)), DEGTORAD(GET_FLOAT_PARAM(1)), DEGTORAD(GET_FLOAT_PARAM(3))); + return 0; + } + case COMMAND_CHANGE_ONSCREEN_COUNTER_PREFIX: + { + uint16 offset = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; + CollectParameters(&m_nIp, 1); + //CUserDisplay::OnscnTimer.ChangeCounterPrefix(offset, GET_INTEGER_PARAMS(0)); + return 0; + } + case COMMAND_STORE_PLAYER_OUTFIT: + { + char tmp[12]; // TODO + CTheScripts::ReadTextLabelFromScript(&m_nIp, tmp); + for (int i = 0; i < KEY_LENGTH_IN_SCRIPT; i++) + CGameLogic::mStoredPlayerOutfit[i] = tmp[i]; + printf("STORED PLAYOUR OUTFIT : %s\n", CGameLogic::mStoredPlayerOutfit); + m_nIp += KEY_LENGTH_IN_SCRIPT; + return 0; + } + case COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_STRING: + { + char onscreen_str1[12]; + uint16 var = (uint8*)GetPointerToScriptVariable(&m_nIp, 0) - CTheScripts::ScriptSpace; + CollectParameters(&m_nIp, 2); + wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); + strncpy(onscreen_str1, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); + m_nIp += KEY_LENGTH_IN_SCRIPT; + CUserDisplay::OnscnTimer.AddCounter(var, GET_INTEGER_PARAM(1), onscreen_str1, 0); // TODO - second set of data + return 0; + } + case COMMAND_SET_PLAYER_CURRENT_WEAPON_AMMO_IN_CLIP: + { + CollectParameters(&m_nIp, 1); + CWeapon* pWeapon = FindPlayerPed()->GetWeapon(); + if (pWeapon && GET_INTEGER_PARAM(0)) + pWeapon->m_nAmmoInClip = GET_INTEGER_PARAM(0); + return 0; + } + case COMMAND_SET_CHAR_WAIT_STATE_REPEAT: + { + CollectParameters(&m_nIp, 3); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + if (pPed) + pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) >= 0 ? &GET_INTEGER_PARAM(2) : nil, true); + return 0; + } + case COMMAND_REGISTER_BEST_TIME_GOGO_FAGGIO: + CollectParameters(&m_nIp, 1); + // CStats::RegisterBestTimeGoGoFaggio(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_LOCK_GARAGE: + CollectParameters(&m_nIp, 2); + CGarages::LockGarage(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_IS_FINAL_GAME: +#ifdef FINAL + UpdateCompareFlag(true); +#else + UpdateCompareFlag(false); +#endif + return 0; + case COMMAND_SET_ALLOWED_COLLISION: + { + CollectParameters(&m_nIp, 2); + CTheScripts::AllowedCollision[0] = GET_INTEGER_PARAM(0); + CTheScripts::AllowedCollision[1] = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_REGISTER_GUARDIAN_ANGEL_LEVEL: + CollectParameters(&m_nIp, 3); + //CStats::GuardianAngelHighestLevel_Ind = Max(CStats::GuardianAngelHighestLevel_Ind, GET_INTEGER_PARAM(0)); + //CStats::GuardianAngelHighestLevel_Com = Max(CStats::GuardianAngelHighestLevel_Com, GET_INTEGER_PARAM(1)); + //CStats::GuardianAngelHighestLevel_Sub = Max(CStats::GuardianAngelHighestLevel_Sub, GET_INTEGER_PARAM(2)); + return 0; + case COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_2_STRINGS: + { + char onscreen_str1[12]; + char onscreen_str2[12]; + uint16 var = (uint8*)GetPointerToScriptVariable(&m_nIp, 0) - CTheScripts::ScriptSpace; + CollectParameters(&m_nIp, 3); + wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); + strncpy(onscreen_str1, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); + m_nIp += KEY_LENGTH_IN_SCRIPT; + wchar* text2 = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); + strncpy(onscreen_str2, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); + m_nIp += KEY_LENGTH_IN_SCRIPT; + CUserDisplay::OnscnTimer.AddCounter(var, GET_INTEGER_PARAM(1), onscreen_str1, 0); // TODO - second set of data + return 0; + } + case COMMAND_GET_PLAYER_STORED_WEAPON: + { + CollectParameters(&m_nIp, 1); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + script_assert(pPed); + SET_INTEGER_PARAM(0, pPed->m_storedWeapon); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_DISABLE_PAUSE_MENU: + CollectParameters(&m_nIp, 1); + // FrontEndMenuManager.mDisablePauseMenu = GET_INTEGER_PARAM(0) != 0; // TODO: static + member + return 0; + case COMMAND_IS_CHANNEL_PLAYING: + CollectParameters(&m_nIp, 1); + //UpdateCompareFlag(DMAudio.IsChannelPlaying(GET_INTEGER_PARAM(0)); + UpdateCompareFlag(false); + return 0; + case COMMAND_SET_CLOCK_EVENT_WARNING: + CollectParameters(&m_nIp, 3); + /* + if (CHud::m_ClockEventWarningMinutes || GET_INTEGER_PARAMS(2)){ + CHud::m_ClockEventWarningMinutes = GET_INTEGER_PARAMS(2); + CHud::m_ClockEventMinutes = GET_INTEGER_PARAMS(1); + CHud::m_ClockEventHours = GET_INTEGER_PARAMS(0); + CHud::m_ClockEventFlashTimer = 0; + } + */ + return 0; + case COMMAND_SET_EXTRA_COLOUR_LIGHT_DIRECTION: + CollectParameters(&m_nIp, 3); + // CWeather::ExtraColourLightDir = GET_VECTOR_PARAM(0); + // CWeather::ExtraColourLightDir.Normalise(); + return 0; + case COMMAND_SET_CHAR_CAN_BE_TARGETTED_BY_LEADER: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bCanBeTargettedByLeader = GET_INTEGER_PARAM(1) != 0; + return 0; + } + case COMMAND_PRINT_HELP_NO_BRIEF: + { + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false); // + false, false + return 0; + } + case COMMAND_PRINT_HELP_FOREVER_NO_BRIEF: + { + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false, true); // + false + return 0; + } + case COMMAND_PRINT_HELP_ALWAYS_NO_BRIEF: + { + // CHud::mAlwaysAllowHelpText = true; + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false); // + false, false + return 0; + } + case COMMAND_PRINT_HELP_FOREVER_ALWAYS_NO_BRIEF: + { + // CHud::mAlwaysAllowHelpText = true; + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false, true); // + false + return 0; + } + case COMMAND_SET_CAR_IS_REWARD: + { + CollectParameters(&m_nIp, 2); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + pVehicle->bRewardVehicle = (GET_INTEGER_PARAM(1) != 0); + return 0; + } + case COMMAND_FREEZE_ALL_PLAYER_FOLLOWERS: + { + CollectParameters(&m_nIp, 2); + CPlayerPed* pPlayerPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + script_assert(pPlayerPed); + for (int i = 0; i < CPools::GetVehiclePool()->GetSize(); i++) { + CPed* pPed = CPools::GetPedPool()->GetSlot(i); + if (pPed && IsPedPointerValid(pPed)) { + if (pPed->m_leader == pPlayerPed || (pPed->m_objective == OBJECTIVE_FOLLOW_CHAR_IN_FORMATION && pPed->m_pedInObjective == pPlayerPed)) + pPed->bIsFrozen = (GET_INTEGER_PARAM(1) != 0); + } + } + return 0; + } + default: + script_assert(0); + } + return -1; +}
\ No newline at end of file diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp index 4e7a1c3e..6f6e89cc 100644 --- a/src/control/Script2.cpp +++ b/src/control/Script2.cpp @@ -28,6 +28,8 @@ #include "World.h" #include "Zones.h" +// LCS: file done except TODOs + int8 CRunningScript::ProcessCommands300To399(int32 command) { switch (command) { @@ -35,12 +37,10 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) //case COMMAND_SET_PLAYER_INVINCIBLE: //case COMMAND_SET_CHAR_GRAPHIC_TYPE: //case COMMAND_SET_PLAYER_GRAPHIC_TYPE: - /* case COMMAND_HAS_PLAYER_BEEN_ARRESTED: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_BUSTED); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_WBState == WBSTATE_BUSTED); return 0; - */ //case COMMAND_STOP_CHAR_DRIVING: //case COMMAND_KILL_CHAR: //case COMMAND_SET_FAVOURITE_CAR_MODEL_FOR_CHAR: @@ -49,25 +49,25 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_CHANGE_CAR_LOCK: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->m_nDoorLock = (eCarLock)ScriptParams[1]; + pVehicle->m_nDoorLock = (eCarLock)GET_INTEGER_PARAM(1); return 0; } case COMMAND_SHAKE_CAM_WITH_POINT: CollectParameters(&m_nIp, 4); - TheCamera.CamShake(ScriptParams[0] / 1000.0f, - *(float*)&ScriptParams[1], - *(float*)&ScriptParams[2], - *(float*)&ScriptParams[3]); + TheCamera.CamShake(GET_INTEGER_PARAM(0) / 1000.0f, + GET_FLOAT_PARAM(1), + GET_FLOAT_PARAM(2), + GET_FLOAT_PARAM(3)); return 0; */ case COMMAND_IS_CAR_MODEL: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->GetModelIndex() == ScriptParams[1]); + UpdateCompareFlag(pVehicle->GetModelIndex() == GET_INTEGER_PARAM(1)); return 0; } //case COMMAND_IS_CAR_REMAP: @@ -77,15 +77,15 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_IS_CAR_DEAD_IN_AREA_2D: { CollectParameters(&m_nIp, 6); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); UpdateCompareFlag(pVehicle->GetStatus() == STATUS_WRECKED && pVehicle->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); @@ -94,17 +94,17 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_IS_CAR_DEAD_IN_AREA_3D: { CollectParameters(&m_nIp, 8); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float z1 = *(float*)&ScriptParams[3]; - float x2 = *(float*)&ScriptParams[4]; - float y2 = *(float*)&ScriptParams[5]; - float z2 = *(float*)&ScriptParams[6]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float z1 = GET_FLOAT_PARAM(3); + float x2 = GET_FLOAT_PARAM(4); + float y2 = GET_FLOAT_PARAM(5); + float z2 = GET_FLOAT_PARAM(6); UpdateCompareFlag(pVehicle->GetStatus() == STATUS_WRECKED && pVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2)); - if (ScriptParams[7]) + if (GET_INTEGER_PARAM(7)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2); if (CTheScripts::DbgFlag) CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2); @@ -121,38 +121,45 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) //case COMMAND_SET_CAR_FLAMEPROOF: //case COMMAND_SET_CAR_ROCKETPROOF: //case COMMAND_IS_CARBOMB_ACTIVE: - //case COMMAND_GIVE_CAR_ALARM: + case COMMAND_GIVE_CAR_ALARM: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + pVehicle->m_nAlarmState = -1; + return 0; + } //case COMMAND_PUT_CAR_ON_TRAILER: - /* case COMMAND_IS_CAR_CRUSHED: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CGarages::HasCarBeenCrushed(ScriptParams[0])); + UpdateCompareFlag(CGarages::HasCarBeenCrushed(GET_INTEGER_PARAM(0))); return 0; - */ - //case COMMAND_CREATE_GANG_CAR: + //case COMMAND_CREATE_GANG_CAR: case COMMAND_CREATE_CAR_GENERATOR: { CollectParameters(&m_nIp, 12); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z > MAP_Z_LOW_LIMIT) pos.z += 0.015f; - ScriptParams[0] = CTheCarGenerators::CreateCarGenerator( - pos.x, pos.y, pos.z, *(float*)&ScriptParams[3], - ScriptParams[4], ScriptParams[5], ScriptParams[6], ScriptParams[7], - ScriptParams[8], ScriptParams[9], ScriptParams[10], ScriptParams[11]); + SET_INTEGER_PARAM(0, CTheCarGenerators::CreateCarGenerator( + pos.x, pos.y, pos.z, GET_FLOAT_PARAM(3), + GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), + GET_INTEGER_PARAM(8), GET_INTEGER_PARAM(9), GET_INTEGER_PARAM(10), GET_INTEGER_PARAM(11))); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SWITCH_CAR_GENERATOR: { CollectParameters(&m_nIp, 2); - CCarGenerator* pCarGen = &CTheCarGenerators::CarGeneratorArray[ScriptParams[0]]; - if (ScriptParams[1] == 0){ + CCarGenerator* pCarGen = &CTheCarGenerators::CarGeneratorArray[GET_INTEGER_PARAM(0)]; + if (GET_INTEGER_PARAM(1) == 0) { pCarGen->SwitchOff(); - }else if (ScriptParams[1] <= 100){ + } + else if (GET_INTEGER_PARAM(1) <= 100) { pCarGen->SwitchOn(); - pCarGen->SetUsesRemaining(ScriptParams[1]); - }else{ + pCarGen->SetUsesRemaining(GET_INTEGER_PARAM(1)); + } + else { pCarGen->SwitchOn(); } return 0; @@ -162,40 +169,34 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 3); - CUserDisplay::Pager.AddMessage(text, ScriptParams[0], ScriptParams[1], ScriptParams[2]); + CUserDisplay::Pager.AddMessage(text, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } */ case COMMAND_DISPLAY_ONSCREEN_TIMER: { - script_assert(CTheScripts::ScriptSpace[m_nIp] == ARGUMENT_GLOBALVAR); - m_nIp++; - uint16 offset = CTheScripts::Read2BytesFromScript(&m_nIp); + uint16 offset = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; CollectParameters(&m_nIp, 1); - CUserDisplay::OnscnTimer.AddClock(offset, nil, ScriptParams[0] != 0); + CUserDisplay::OnscnTimer.AddClock(offset, nil, GET_INTEGER_PARAM(0) != 0); return 0; } case COMMAND_CLEAR_ONSCREEN_TIMER: { - script_assert(CTheScripts::ScriptSpace[m_nIp] == ARGUMENT_GLOBALVAR); - m_nIp++; - CUserDisplay::OnscnTimer.ClearClock((uint16)CTheScripts::Read2BytesFromScript(&m_nIp)); + uint16 offset = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; + CUserDisplay::OnscnTimer.ClearClock(offset); return 0; } case COMMAND_DISPLAY_ONSCREEN_COUNTER: { - script_assert(CTheScripts::ScriptSpace[m_nIp] == ARGUMENT_GLOBALVAR); - m_nIp++; - int16 counter = CTheScripts::Read2BytesFromScript(&m_nIp); + uint16 counter = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; CollectParameters(&m_nIp, 1); - CUserDisplay::OnscnTimer.AddCounter(counter, ScriptParams[0], nil, 0); + CUserDisplay::OnscnTimer.AddCounter(counter, GET_INTEGER_PARAM(0), nil, 0); return 0; } case COMMAND_CLEAR_ONSCREEN_COUNTER: { - script_assert(CTheScripts::ScriptSpace[m_nIp] == ARGUMENT_GLOBALVAR); - m_nIp++; - CUserDisplay::OnscnTimer.ClearCounter((uint16)CTheScripts::Read2BytesFromScript(&m_nIp)); + uint16 counter = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; + CUserDisplay::OnscnTimer.ClearCounter(counter); return 0; } case COMMAND_SET_ZONE_CAR_INFO: @@ -219,7 +220,7 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) return 0; } while (zone >= 0) { - CTheZones::SetZoneCarInfo(zone, ScriptParams[0], ScriptParams[1], ScriptParams[11], gangDensities); + CTheZones::SetZoneCarInfo(zone, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(11), gangDensities); zone = CTheZones::FindNextZoneByLabelAndReturnIndex(label, ZONE_INFO); } return 0; @@ -228,7 +229,7 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_IS_CHAR_IN_ZONE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); char label[12]; CTheScripts::ReadTextLabelFromScript(&m_nIp, label); @@ -239,39 +240,70 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) UpdateCompareFlag(CTheZones::PointLiesWithinZone(&pos, CTheZones::GetNavigationZone(zone))); return 0; } - //case COMMAND_SET_CAR_DENSITY: - //case COMMAND_SET_PED_DENSITY: + case COMMAND_SET_CAR_DENSITY: + { + char label[12]; + CTheScripts::ReadTextLabelFromScript(&m_nIp, label); + int16 zone = CTheZones::FindZoneByLabelAndReturnIndex(label, ZONE_INFO); + m_nIp += 8; + CollectParameters(&m_nIp, 2); + if (zone < 0) { + debug("Couldn't find zone - %s\n", label); + return 0; + } + while (zone >= 0) { + CTheZones::SetCarDensity(zone, ScriptParams[0], ScriptParams[1]); + zone = CTheZones::FindNextZoneByLabelAndReturnIndex(label, ZONE_INFO); + } + return 0; + } + case COMMAND_SET_PED_DENSITY: + { + char label[12]; + CTheScripts::ReadTextLabelFromScript(&m_nIp, label); + int16 zone = CTheZones::FindZoneByLabelAndReturnIndex(label, ZONE_INFO); + m_nIp += KEY_LENGTH_IN_SCRIPT; + CollectParameters(&m_nIp, 2); + if (zone < 0) { + debug("Couldn't find zone - %s\n", label); + return 0; + } + while (zone >= 0) { + CTheZones::SetPedDensity(zone, ScriptParams[0], ScriptParams[1]); + zone = CTheZones::FindNextZoneByLabelAndReturnIndex(label, ZONE_INFO); + } + return 0; + } case COMMAND_POINT_CAMERA_AT_PLAYER: { CollectParameters(&m_nIp, 3); - // ScriptParams[0] is unused. - TheCamera.TakeControl(nil, ScriptParams[1], ScriptParams[2], CAMCONTROL_SCRIPT); + TheCamera.TakeControl(nil, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), CAMCONTROL_SCRIPT); return 0; } case COMMAND_POINT_CAMERA_AT_CAR: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (pVehicle) - TheCamera.TakeControl(pVehicle, ScriptParams[1], ScriptParams[2], CAMCONTROL_SCRIPT); + TheCamera.TakeControl(pVehicle, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), CAMCONTROL_SCRIPT); return 0; } case COMMAND_POINT_CAMERA_AT_CHAR: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); if (pPed) - TheCamera.TakeControl(pPed, ScriptParams[1], ScriptParams[2], CAMCONTROL_SCRIPT); + TheCamera.TakeControl(pPed, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), CAMCONTROL_SCRIPT); return 0; } case COMMAND_RESTORE_CAMERA: TheCamera.Restore(); return 0; - /* - case COMMAND_SHAKE_PAD: - CPad::GetPad(ScriptParams[0])->StartShake(ScriptParams[1], ScriptParams[2]); - return 0; - */ + /* + case COMMAND_SHAKE_PAD: + CPad::GetPad(GET_INTEGER_PARAM(0))->StartShake(GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); + return 0; + */ case COMMAND_SET_ZONE_PED_INFO: { char label[12]; @@ -284,61 +316,61 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) return 0; } while (zone >= 0) { - CTheZones::SetZonePedInfo(zone, ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], - ScriptParams[4], ScriptParams[5], ScriptParams[6], ScriptParams[7], ScriptParams[8], ScriptParams[9], ScriptParams[10], ScriptParams[11]); + CTheZones::SetZonePedInfo(zone, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), + GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8), GET_INTEGER_PARAM(9), GET_INTEGER_PARAM(10), GET_INTEGER_PARAM(11)); zone = CTheZones::FindNextZoneByLabelAndReturnIndex(label, ZONE_INFO); } return 0; } case COMMAND_SET_TIME_SCALE: CollectParameters(&m_nIp, 1); - CTimer::SetTimeScale(*(float*)&ScriptParams[0]); - return 0; - /* - case COMMAND_IS_CAR_IN_AIR: - { - CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); - script_assert(pVehicle && pVehicle->IsCar()); - CAutomobile* pCar = (CAutomobile*)pVehicle; - UpdateCompareFlag(pCar->GetAllWheelsOffGround()); - return 0; - } - */ + CTimer::SetTimeScale(GET_FLOAT_PARAM(0)); + return 0; + /* + case COMMAND_IS_CAR_IN_AIR: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle && pVehicle->IsCar()); + CAutomobile* pCar = (CAutomobile*)pVehicle; + UpdateCompareFlag(pCar->GetAllWheelsOffGround()); + return 0; + } + */ case COMMAND_SET_FIXED_CAMERA_POSITION: { CollectParameters(&m_nIp, 6); TheCamera.SetCamPositionForFixedMode( - CVector(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2]), - CVector(*(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5])); + CVector(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2)), + CVector(GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), GET_FLOAT_PARAM(5))); return 0; } case COMMAND_POINT_CAMERA_AT_POINT: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - TheCamera.TakeControlNoEntity(pos, ScriptParams[3], CAMCONTROL_SCRIPT); + TheCamera.TakeControlNoEntity(pos, GET_INTEGER_PARAM(3), CAMCONTROL_SCRIPT); return 0; } case COMMAND_ADD_BLIP_FOR_CAR_OLD: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CRadar::SetEntityBlip(BLIP_CAR, ScriptParams[0], ScriptParams[1], (eBlipDisplay)ScriptParams[2]); + SET_INTEGER_PARAM(0, CRadar::SetEntityBlip(BLIP_CAR, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), (eBlipDisplay)GET_INTEGER_PARAM(2))); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_BLIP_FOR_CHAR_OLD: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CRadar::SetEntityBlip(BLIP_CHAR, ScriptParams[0], ScriptParams[1], (eBlipDisplay)ScriptParams[2]); + SET_INTEGER_PARAM(0, CRadar::SetEntityBlip(BLIP_CHAR, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), (eBlipDisplay)GET_INTEGER_PARAM(2))); StoreParameters(&m_nIp, 1); return 0; } @@ -346,57 +378,61 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_ADD_BLIP_FOR_OBJECT_OLD: { CollectParameters(&m_nIp, 3); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CRadar::SetEntityBlip(BLIP_OBJECT, ScriptParams[0], ScriptParams[1], (eBlipDisplay)ScriptParams[2]); + SET_INTEGER_PARAM(0, CRadar::SetEntityBlip(BLIP_OBJECT, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), (eBlipDisplay)GET_INTEGER_PARAM(2))); StoreParameters(&m_nIp, 1); return 0; } */ case COMMAND_REMOVE_BLIP: CollectParameters(&m_nIp, 1); - CRadar::ClearBlip(ScriptParams[0]); + CRadar::ClearBlip(GET_INTEGER_PARAM(0)); return 0; case COMMAND_CHANGE_BLIP_COLOUR: CollectParameters(&m_nIp, 2); - CRadar::ChangeBlipColour(ScriptParams[0], ScriptParams[1]); + CRadar::ChangeBlipColour(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_DIM_BLIP: CollectParameters(&m_nIp, 2); - CRadar::ChangeBlipBrightness(ScriptParams[0], ScriptParams[1]); + CRadar::ChangeBlipBrightness(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_ADD_BLIP_FOR_COORD_OLD: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CRadar::SetCoordBlip(BLIP_COORD, pos, ScriptParams[3], (eBlipDisplay)ScriptParams[4]); + SET_INTEGER_PARAM(0, CRadar::SetCoordBlip(BLIP_COORD, pos, GET_INTEGER_PARAM(3), (eBlipDisplay)GET_INTEGER_PARAM(4))); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_CHANGE_BLIP_SCALE: CollectParameters(&m_nIp, 2); - CRadar::ChangeBlipScale(ScriptParams[0], ScriptParams[1]); + CRadar::ChangeBlipScale(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_SET_FADING_COLOUR: CollectParameters(&m_nIp, 3); - TheCamera.SetFadeColour(ScriptParams[0], ScriptParams[1], ScriptParams[2]); + TheCamera.SetFadeColour(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; case COMMAND_DO_FADE: + { + // unknown empty call on PS2, not mobile CollectParameters(&m_nIp, 2); - TheCamera.Fade(ScriptParams[0] / 1000.0f, ScriptParams[1]); + float fFadeTime = GET_INTEGER_PARAM(0); + TheCamera.Fade(fFadeTime > 2 ? fFadeTime / 1000.0f : 0.0f, GET_INTEGER_PARAM(1)); return 0; + } case COMMAND_GET_FADING_STATUS: UpdateCompareFlag(TheCamera.GetFading()); return 0; case COMMAND_ADD_HOSPITAL_RESTART: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; - float angle = *(float*)&ScriptParams[3]; + CVector pos = GET_VECTOR_PARAM(0); + float angle = GET_FLOAT_PARAM(3); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRestart::AddHospitalRestartPoint(pos, angle); @@ -405,8 +441,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_ADD_POLICE_RESTART: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; - float angle = *(float*)&ScriptParams[3]; + CVector pos = GET_VECTOR_PARAM(0); + float angle = GET_FLOAT_PARAM(3); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRestart::AddPoliceRestartPoint(pos, angle); @@ -415,8 +451,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_OVERRIDE_NEXT_RESTART: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; - float angle = *(float*)&ScriptParams[3]; + CVector pos = GET_VECTOR_PARAM(0); + float angle = GET_FLOAT_PARAM(3); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRestart::OverrideNextRestart(pos, angle); @@ -426,9 +462,9 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_DRAW_SHADOW: { CollectParameters(&m_nIp, 10); - CVector pos = *(CVector*)&ScriptParams[1]; - float angle = *(float*)&ScriptParams[4]; - float length = *(float*)&ScriptParams[5]; + CVector pos = GET_VECTOR_PARAM(1); + float angle = GET_FLOAT_PARAM(4); + float length = GET_FLOAT_PARAM(5); float x, y; if (angle != 0.0f){ y = Cos(angle) * length; @@ -441,40 +477,40 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) float frontY = y; float sideX = y; float sideY = x; - CShadows::StoreShadowToBeRendered(ScriptParams[0], &pos, frontX, frontY, sideX, sideY, - ScriptParams[6], ScriptParams[7], ScriptParams[8], ScriptParams[9]); + CShadows::StoreShadowToBeRendered(GET_INTEGER_PARAM(0), &pos, frontX, frontY, sideX, sideY, + GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8), GET_INTEGER_PARAM(9)); return 0; } */ case COMMAND_GET_PLAYER_HEADING: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; float angle = pPed->bInVehicle ? pPed->m_pMyVehicle->GetForward().Heading() : pPed->GetForward().Heading(); angle = RADTODEG(angle); if (angle < 0.0f) angle += 360.0f; if (angle > 360.0f) angle -= 360.0f; - *(float*)&ScriptParams[0] = angle; + SET_FLOAT_PARAM(0, angle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_PLAYER_HEADING: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); if (pPed->bInVehicle) return 0; - pPed->m_fRotationDest = pPed->m_fRotationCur = DEGTORAD(*(float*)&ScriptParams[1]); - pPed->SetHeading(DEGTORAD(*(float*)&ScriptParams[1])); + pPed->m_fRotationDest = pPed->m_fRotationCur = DEGTORAD(GET_FLOAT_PARAM(1)); + pPed->SetHeading(DEGTORAD(GET_FLOAT_PARAM(1))); return 0; } case COMMAND_GET_CHAR_HEADING: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); float angle = pPed->bInVehicle ? pPed->m_pMyVehicle->GetForward().Heading() : pPed->GetForward().Heading(); angle = RADTODEG(angle); @@ -482,25 +518,25 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) angle += 360.0f; if (angle > 360.0f) angle -= 360.0f; - *(float*)&ScriptParams[0] = angle; + SET_FLOAT_PARAM(0, angle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CHAR_HEADING: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); if (pPed->bInVehicle) return 0; - pPed->m_fRotationDest = pPed->m_fRotationCur = DEGTORAD(*(float*)&ScriptParams[1]); - pPed->SetHeading(DEGTORAD(*(float*)&ScriptParams[1])); + pPed->m_fRotationDest = pPed->m_fRotationCur = DEGTORAD(GET_FLOAT_PARAM(1)); + pPed->SetHeading(DEGTORAD(GET_FLOAT_PARAM(1))); return 0; } case COMMAND_GET_CAR_HEADING: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); float angle = pVehicle->GetForward().Heading(); angle = RADTODEG(angle); @@ -508,22 +544,22 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) angle += 360.0f; if (angle > 360.0f) angle -= 360.0f; - *(float*)&ScriptParams[0] = angle; + SET_FLOAT_PARAM(0, angle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CAR_HEADING: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->SetHeading(DEGTORAD(*(float*)&ScriptParams[1])); + pVehicle->SetHeading(DEGTORAD(GET_FLOAT_PARAM(1))); return 0; } case COMMAND_GET_OBJECT_HEADING: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); float angle = pObject->GetForward().Heading(); angle = RADTODEG(angle); @@ -531,39 +567,39 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) angle += 360.0f; if (angle > 360.0f) angle -= 360.0f; - *(float*)&ScriptParams[0] = angle; + SET_FLOAT_PARAM(0, angle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_OBJECT_HEADING: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CWorld::Remove(pObject); - pObject->SetHeading(DEGTORAD(*(float*)&ScriptParams[1])); + pObject->SetHeading(DEGTORAD(GET_FLOAT_PARAM(1))); pObject->GetMatrix().UpdateRW(); pObject->UpdateRwFrame(); CWorld::Add(pObject); return 0; } - /* case COMMAND_IS_PLAYER_TOUCHING_OBJECT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pObject); CPhysical* pEntityToTest = pPed->bInVehicle ? (CPhysical*)pPed->m_pMyVehicle : pPed; UpdateCompareFlag(pEntityToTest->GetHasCollidedWith(pObject)); return 0; } + /* case COMMAND_IS_CHAR_TOUCHING_OBJECT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pObject); CPhysical* pEntityToTest = pPed->bInVehicle ? (CPhysical*)pPed->m_pMyVehicle : pPed; UpdateCompareFlag(pEntityToTest->GetHasCollidedWith(pObject)); @@ -573,121 +609,119 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_SET_PLAYER_AMMO: { CollectParameters(&m_nIp, 3); - CWorld::Players[0].m_pPed->SetAmmo((eWeaponType)ScriptParams[1], ScriptParams[2]); + CWorld::Players[0].m_pPed->SetAmmo((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } - /* case COMMAND_SET_CHAR_AMMO: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - pPed->SetAmmo((eWeaponType)ScriptParams[1], ScriptParams[2]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + pPed->SetAmmo((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } - */ //case COMMAND_SET_CAR_AMMO: //case COMMAND_LOAD_CAMERA_SPLINE: //case COMMAND_MOVE_CAMERA_ALONG_SPLINE: //case COMMAND_GET_CAMERA_POSITION_ALONG_SPLINE: case COMMAND_DECLARE_MISSION_FLAG: - CTheScripts::OnAMissionFlag = (uint16)CTheScripts::Read2BytesFromScript(&++m_nIp); + CTheScripts::OnAMissionFlag = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; return 0; case COMMAND_DECLARE_MISSION_FLAG_FOR_CONTACT: return 0; - //case COMMAND_DECLARE_BASE_BRIEF_ID_FOR_CONTACT: + //case COMMAND_DECLARE_BASE_BRIEF_ID_FOR_CONTACT: case COMMAND_IS_PLAYER_HEALTH_GREATER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; - UpdateCompareFlag(pPed->m_fHealth > ScriptParams[1]); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + UpdateCompareFlag(pPed->m_fHealth > GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_CHAR_HEALTH_GREATER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - UpdateCompareFlag(pPed->m_fHealth > ScriptParams[1]); + UpdateCompareFlag(pPed->m_fHealth > GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_CAR_HEALTH_GREATER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->m_fHealth > ScriptParams[1]); + UpdateCompareFlag(pVehicle->m_fHealth > GET_INTEGER_PARAM(1)); return 0; } case COMMAND_ADD_BLIP_FOR_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int handle = CRadar::SetEntityBlip(BLIP_CAR, ScriptParams[0], 0, BLIP_DISPLAY_BOTH); + int handle = CRadar::SetEntityBlip(BLIP_CAR, GET_INTEGER_PARAM(0), 0, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_BLIP_FOR_CHAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int handle = CRadar::SetEntityBlip(BLIP_CHAR, ScriptParams[0], 1, BLIP_DISPLAY_BOTH); + int handle = CRadar::SetEntityBlip(BLIP_CHAR, GET_INTEGER_PARAM(0), 1, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_BLIP_FOR_OBJECT: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int handle = CRadar::SetEntityBlip(BLIP_OBJECT, ScriptParams[0], 6, BLIP_DISPLAY_BOTH); + int handle = CRadar::SetEntityBlip(BLIP_OBJECT, GET_INTEGER_PARAM(0), 6, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_BLIP_FOR_CONTACT_POINT: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int handle = CRadar::SetCoordBlip(BLIP_CONTACT_POINT, pos, 2, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_BLIP_FOR_COORD: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int handle = CRadar::SetCoordBlip(BLIP_COORD, pos, 5, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_CHANGE_BLIP_DISPLAY: CollectParameters(&m_nIp, 2); - CRadar::ChangeBlipDisplay(ScriptParams[0], (eBlipDisplay)ScriptParams[1]); + CRadar::ChangeBlipDisplay(GET_INTEGER_PARAM(0), (eBlipDisplay)GET_INTEGER_PARAM(1)); return 0; case COMMAND_ADD_ONE_OFF_SOUND: { CollectParameters(&m_nIp, 4); - switch (ScriptParams[3]) { + switch (GET_INTEGER_PARAM(3)) { case SCRIPT_SOUND_PART_MISSION_COMPLETE: DMAudio.PlayFrontEndSound(SOUND_PART_MISSION_COMPLETE, 0); return 0; @@ -712,14 +746,20 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case SCRIPT_SOUND_IMRAN_ARM_BOMB: DMAudio.PlayFrontEndSound(SOUND_AMMUNATION_IMRAN_ARM_BOMB, 0); return 0; + case 0x46: // TODO + DMAudio.PlayFrontEndSound(0xC4, 0); + return 0; + case 0x47: // TODO + DMAudio.PlayFrontEndSound(0xCD, 0); + return 0; default: break; } - if (!DMAudio.IsAudioInitialised()) + if (!DMAudio.IsAudioInitialised()) // LCS doesn't have it. Why? return 0; cAudioScriptObject* obj = new cAudioScriptObject(); - obj->Posn = *(CVector*)&ScriptParams[0]; - obj->AudioId = ScriptParams[3]; + obj->Posn = GET_VECTOR_PARAM(0); + obj->AudioId = GET_INTEGER_PARAM(3); obj->AudioEntity = AEHANDLE_NONE; DMAudio.CreateOneShotScriptObject(obj); return 0; @@ -727,23 +767,23 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_ADD_CONTINUOUS_SOUND: { CollectParameters(&m_nIp, 4); - if (DMAudio.IsAudioInitialised()) { + if (DMAudio.IsAudioInitialised()) { // LCS doesn't have it. Why? cAudioScriptObject* obj = new cAudioScriptObject(); - obj->Posn = *(CVector*)&ScriptParams[0]; - obj->AudioId = ScriptParams[3]; + obj->Posn = GET_VECTOR_PARAM(0); + obj->AudioId = GET_INTEGER_PARAM(3); obj->AudioEntity = DMAudio.CreateLoopingScriptObject(obj); - ScriptParams[0] = CPools::GetAudioScriptObjectPool()->GetIndex(obj); + SET_INTEGER_PARAM(0, CPools::GetAudioScriptObjectPool()->GetIndex(obj)); } else - ScriptParams[0] = -1; + SET_INTEGER_PARAM(0, -1); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_REMOVE_SOUND: { CollectParameters(&m_nIp, 1); - cAudioScriptObject* obj = CPools::GetAudioScriptObjectPool()->GetAt(ScriptParams[0]); - if (!obj){ + cAudioScriptObject* obj = CPools::GetAudioScriptObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + if (!obj) { debug("REMOVE_SOUND - Sound doesn't exist\n"); return 0; } @@ -754,9 +794,9 @@ int8 CRunningScript::ProcessCommands300To399(int32 command) case COMMAND_IS_CAR_STUCK_ON_ROOF: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(CTheScripts::UpsideDownCars.HasCarBeenUpsideDownForAWhile(ScriptParams[0])); + UpdateCompareFlag(CTheScripts::UpsideDownCars.HasCarBeenUpsideDownForAWhile(GET_INTEGER_PARAM(0))); return 0; } default: @@ -771,22 +811,22 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_ADD_UPSIDEDOWN_CAR_CHECK: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CTheScripts::UpsideDownCars.AddCarToCheck(ScriptParams[0]); + CTheScripts::UpsideDownCars.AddCarToCheck(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_REMOVE_UPSIDEDOWN_CAR_CHECK: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); - CTheScripts::UpsideDownCars.RemoveCarFromCheck(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + CTheScripts::UpsideDownCars.RemoveCarFromCheck(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_SET_CHAR_OBJ_WAIT_ON_FOOT: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_WAIT_ON_FOOT); @@ -795,7 +835,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_ON_FOOT_TILL_SAFE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE); @@ -804,32 +844,31 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_GUARD_SPOT: { CollectParameters(&m_nIp, 4); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_GUARD_SPOT, pos); return 0; } - /* case COMMAND_SET_CHAR_OBJ_GUARD_AREA: { CollectParameters(&m_nIp, 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - float infX = *(float*)&ScriptParams[1]; - float infY = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - if (infX > supX){ - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + float infX = GET_FLOAT_PARAM(1); + float infY = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + if (infX > supX) { + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; @@ -843,13 +882,12 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_WAIT_IN_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_WAIT_IN_CAR); return 0; } - */ case COMMAND_IS_PLAYER_IN_AREA_ON_FOOT_2D: case COMMAND_IS_PLAYER_IN_AREA_IN_CAR_2D: case COMMAND_IS_PLAYER_STOPPED_IN_AREA_2D: @@ -887,17 +925,17 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_GIVE_WEAPON_TO_PLAYER: { CollectParameters(&m_nIp, 3); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->m_nSelectedWepSlot = pPed->GiveWeapon((eWeaponType)ScriptParams[1], ScriptParams[2]); + pPed->m_nSelectedWepSlot = pPed->GiveWeapon((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_GIVE_WEAPON_TO_CHAR: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->SetCurrentWeapon(pPed->GiveWeapon((eWeaponType)ScriptParams[1], ScriptParams[2])); + pPed->SetCurrentWeapon(pPed->GiveWeapon((eWeaponType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2))); if (pPed->bInVehicle && pPed->m_pMyVehicle) pPed->RemoveWeaponModel(CWeaponInfo::GetWeaponInfo(pPed->m_weapons[pPed->m_currentWeapon].m_eWeaponType)->m_nModelId); return 0; @@ -906,23 +944,35 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_PLAYER_CONTROL: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; - if (ScriptParams[1]){ + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; + if (FindPlayerPed()) { + if (FindPlayerPed()->GetPedState() != PED_JUMP) { + FindPlayerPed()->bIsLanding = false; + FindPlayerPed()->bIsInTheAir = false; + } + FindPlayerPed()->RestoreHeadingRate(); + } + if (GET_INTEGER_PARAM(1)) { pPlayer->MakePlayerSafe(false); - if (strcmp(m_abScriptName, "serg1") == 0) // Four Iron - pPlayer->m_pPed->ClearFollowPath(); - }else{ + if (FindPlayerPed()->GetStatus() != PED_DRIVING && !FindPlayerPed()->m_attachedTo) { + // FindPlayerPed()->SetIdleAndResetAnim(); // TODO! + } + } + else { pPlayer->MakePlayerSafe(true); + if (FindPlayerPed()->GetPedState() > PED_STATES_NO_AI && FindPlayerPed()->GetPedState() != PED_DRIVING && TheCamera.GetScreenFadeStatus() == FADE_2) { + // FindPlayerPed()->SetIdleAndResetAnim(); // TODO! + } } return 0; } case COMMAND_FORCE_WEATHER: CollectParameters(&m_nIp, 1); - CWeather::ForceWeather(ScriptParams[0]); + CWeather::ForceWeather(GET_INTEGER_PARAM(0)); return 0; case COMMAND_FORCE_WEATHER_NOW: CollectParameters(&m_nIp, 1); - CWeather::ForceWeatherNow(ScriptParams[0]); + CWeather::ForceWeatherNow(GET_INTEGER_PARAM(0)); return 0; case COMMAND_RELEASE_WEATHER: CWeather::ReleaseWeather(); @@ -930,9 +980,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CURRENT_PLAYER_WEAPON: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; - for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++){ - if (pPed->m_weapons[i].m_eWeaponType == ScriptParams[1]) + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) { + if (pPed->m_weapons[i].m_eWeaponType == GET_INTEGER_PARAM(1)) pPed->m_nSelectedWepSlot = i; } return 0; @@ -940,9 +990,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CURRENT_CHAR_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) { - if (pPed->m_weapons[i].m_eWeaponType == ScriptParams[1]) + if (pPed->m_weapons[i].m_eWeaponType == GET_INTEGER_PARAM(1)) pPed->SetCurrentWeapon(i); } return 0; @@ -951,18 +1001,18 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_GET_OBJECT_COORDINATES: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - *(CVector*)&ScriptParams[0] = pObject->GetPosition(); + SET_VECTOR_PARAM(0, pObject->GetPosition()); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_SET_OBJECT_COORDINATES: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pObject->Teleport(pos); @@ -970,13 +1020,13 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) return 0; } case COMMAND_GET_GAME_TIMER: - ScriptParams[0] = CTimer::GetTimeInMilliseconds(); + SET_INTEGER_PARAM(0, CTimer::GetTimeInMilliseconds()); StoreParameters(&m_nIp, 1); return 0; case COMMAND_TURN_CHAR_TO_FACE_COORD: { CollectParameters(&m_nIp, 4); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVehicle* pVehicle; CVector pos; @@ -988,11 +1038,11 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) pos = pVehicle->GetPosition(); else pos = pPed->GetPosition(); - float heading = CGeneral::GetATanOfXY(pos.x - *(float*)&ScriptParams[1], pos.y - *(float*)&ScriptParams[2]); + float heading = CGeneral::GetATanOfXY(pos.x - GET_FLOAT_PARAM(1), pos.y - GET_FLOAT_PARAM(2)); heading += HALFPI; if (heading > TWOPI) heading -= TWOPI; - if (!pVehicle){ + if (!pVehicle) { pPed->m_fRotationCur = heading; pPed->m_fRotationDest = heading; pPed->SetHeading(heading); @@ -1002,7 +1052,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_TURN_PLAYER_TO_FACE_COORD: { CollectParameters(&m_nIp, 4); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); CVehicle* pVehicle; CVector pos; @@ -1014,7 +1064,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) pos = pVehicle->GetPosition(); else pos = pPed->GetPosition(); - float heading = CGeneral::GetATanOfXY(pos.x - *(float*)&ScriptParams[1], pos.y - *(float*)&ScriptParams[2]); + float heading = CGeneral::GetATanOfXY(pos.x - GET_FLOAT_PARAM(1), pos.y - GET_FLOAT_PARAM(2)); heading += HALFPI; if (heading > TWOPI) heading -= TWOPI; @@ -1028,16 +1078,16 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_STORE_WANTED_LEVEL: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - ScriptParams[0] = pPed->m_pWanted->GetWantedLevel(); + SET_INTEGER_PARAM(0, pPed->m_pWanted->GetWantedLevel()); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_CAR_STOPPED: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(CTheScripts::IsVehicleStopped(pVehicle)); return 0; @@ -1045,94 +1095,94 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_MARK_CHAR_AS_NO_LONGER_NEEDED: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); CTheScripts::CleanUpThisPed(pPed); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_MARK_CAR_AS_NO_LONGER_NEEDED: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); CTheScripts::CleanUpThisVehicle(pVehicle); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CAR); return 0; } case COMMAND_MARK_OBJECT_AS_NO_LONGER_NEEDED: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); CTheScripts::CleanUpThisObject(pObject); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_OBJECT); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_OBJECT); return 0; } case COMMAND_DONT_REMOVE_CHAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_DONT_REMOVE_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CAR); return 0; } case COMMAND_DONT_REMOVE_OBJECT: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_OBJECT); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_OBJECT); return 0; } case COMMAND_CREATE_CHAR_AS_PASSENGER: { CollectParameters(&m_nIp, 4); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - switch (ScriptParams[2]) { + switch (GET_INTEGER_PARAM(2)) { case MI_COP: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_STREET; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_STREET); break; case MI_SWAT: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_SWAT; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_SWAT); break; case MI_FBI: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_FBI; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_FBI); break; case MI_ARMY: - if (ScriptParams[1] == PEDTYPE_COP) - ScriptParams[2] = COP_ARMY; + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + SET_INTEGER_PARAM(2, COP_ARMY); break; case MI_MEDIC: - if (ScriptParams[1] == PEDTYPE_EMERGENCY) - ScriptParams[2] = PEDTYPE_EMERGENCY; + if (GET_INTEGER_PARAM(1) == PEDTYPE_EMERGENCY) + SET_INTEGER_PARAM(2, PEDTYPE_EMERGENCY); break; case MI_FIREMAN: - if (ScriptParams[1] == PEDTYPE_FIREMAN) - ScriptParams[2] = PEDTYPE_FIREMAN; + if (GET_INTEGER_PARAM(1) == PEDTYPE_FIREMAN) + SET_INTEGER_PARAM(2, PEDTYPE_FIREMAN); break; default: break; } CPed* pPed; - if (ScriptParams[1] == PEDTYPE_COP) - pPed = new CCopPed((eCopType)ScriptParams[2]); - else if (ScriptParams[1] == PEDTYPE_EMERGENCY || ScriptParams[1] == PEDTYPE_FIREMAN) - pPed = new CEmergencyPed(ScriptParams[2]); + if (GET_INTEGER_PARAM(1) == PEDTYPE_COP) + pPed = new CCopPed((eCopType)GET_INTEGER_PARAM(2)); + else if (GET_INTEGER_PARAM(1) == PEDTYPE_EMERGENCY || GET_INTEGER_PARAM(1) == PEDTYPE_FIREMAN) + pPed = new CEmergencyPed(GET_INTEGER_PARAM(2)); else - pPed = new CCivilianPed((ePedType)ScriptParams[1], ScriptParams[2]); + pPed = new CCivilianPed((ePedType)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); pPed->CharCreatedBy = MISSION_CHAR; pPed->bRespondsToThreats = false; pPed->bAllowMedicsToReviveMe = false; @@ -1143,8 +1193,8 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) pPed->SetOrientation(0.0f, 0.0f, 0.0f); CPopulation::ms_nTotalMissionPeds++; CWorld::Add(pPed); - if (ScriptParams[3] >= 0) - pVehicle->AddPassenger(pPed, ScriptParams[3]); + if (GET_INTEGER_PARAM(3) >= 0) + pVehicle->AddPassenger(pPed, GET_INTEGER_PARAM(3)); else pVehicle->AddPassenger(pPed); pPed->m_pMyVehicle = pVehicle; @@ -1154,18 +1204,18 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) pPed->bUsesCollision = false; pPed->AddInCarAnims(pVehicle, false); pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPed); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPed)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_SET_CHAR_OBJ_KILL_CHAR_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, pTarget); return 0; @@ -1173,9 +1223,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, pTarget); return 0; @@ -1183,9 +1233,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_KILL_CHAR_ANY_MEANS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_KILL_CHAR_ANY_MEANS, pTarget); return 0; @@ -1193,9 +1243,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_KILL_CHAR_ANY_MEANS, pTarget); return 0; @@ -1204,9 +1254,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pTarget); return 0; @@ -1215,9 +1265,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pTarget); return 0; @@ -1225,9 +1275,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pTarget); return 0; @@ -1235,9 +1285,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pTarget); return 0; @@ -1245,9 +1295,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_GOTO_CHAR_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_GOTO_CHAR_ON_FOOT, pTarget); return 0; @@ -1255,9 +1305,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_GOTO_PLAYER_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_GOTO_CHAR_ON_FOOT, pTarget); return 0; @@ -1265,9 +1315,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_LEAVE_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle); return 0; @@ -1275,9 +1325,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_PASSENGER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_ENTER_CAR_AS_PASSENGER, pVehicle); return 0; @@ -1285,9 +1335,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_DRIVER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle); return 0; @@ -1297,9 +1347,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_DESTROY_OBJECT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_DESTROY_OBJECT, pObject); return 0; @@ -1307,30 +1357,29 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_DESTROY_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_DESTROY_CAR, pVehicle); return 0; } - /* case COMMAND_SET_CHAR_OBJ_GOTO_AREA_ON_FOOT: { CollectParameters(&m_nIp, 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - float infX = *(float*)&ScriptParams[1]; - float infY = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; + float infX = GET_FLOAT_PARAM(1); + float infY = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; @@ -1341,32 +1390,31 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) pPed->SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, pos, radius); return 0; } - */ //case COMMAND_SET_CHAR_OBJ_GOTO_AREA_IN_CAR: //case COMMAND_SET_CHAR_OBJ_FOLLOW_CAR_ON_FOOT_WITH_OFFSET: //case COMMAND_SET_CHAR_OBJ_GUARD_ATTACK: case COMMAND_SET_CHAR_AS_LEADER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->SetObjective(OBJECTIVE_SET_LEADER, pTarget); return 0; } case COMMAND_SET_PLAYER_AS_LEADER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTarget = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; pPed->SetObjective(OBJECTIVE_SET_LEADER, pTarget); return 0; } case COMMAND_LEAVE_GROUP: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->ClearLeader(); return 0; @@ -1374,60 +1422,66 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SET_CHAR_OBJ_FOLLOW_ROUTE: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; - pPed->SetObjective(OBJECTIVE_FOLLOW_ROUTE, ScriptParams[1], ScriptParams[2]); + pPed->SetObjective(OBJECTIVE_FOLLOW_ROUTE, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_ADD_ROUTE_POINT: { CollectParameters(&m_nIp, 4); - CRouteNode::AddRoutePoint(ScriptParams[0], *(CVector*)&ScriptParams[1]); + CRouteNode::AddRoutePoint(GET_INTEGER_PARAM(0), GET_VECTOR_PARAM(1)); return 0; } case COMMAND_PRINT_WITH_NUMBER_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 3); - CMessages::AddBigMessageWithNumber(text, ScriptParams[1], ScriptParams[2] - 1, ScriptParams[0], -1, -1, -1, -1, -1); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) - 1, GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); return 0; } case COMMAND_PRINT_WITH_NUMBER: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 3); - CMessages::AddMessageWithNumber(text, ScriptParams[1], ScriptParams[2], ScriptParams[0], -1, -1, -1, -1, -1); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); return 0; } case COMMAND_PRINT_WITH_NUMBER_NOW: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 3); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[1], ScriptParams[2], ScriptParams[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: + { + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 3); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); return 0; } - //case COMMAND_PRINT_WITH_NUMBER_SOON: case COMMAND_SWITCH_ROADS_ON: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; - if (infX > supX){ - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); + if (infX > supX) { + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } - if (infY > supY){ - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + if (infY > supY) { + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } - if (infZ > supZ){ - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + if (infZ > supZ) { + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.SwitchRoadsOffInArea(infX, supX, infY, supY, infZ, supZ, false); return 0; @@ -1435,23 +1489,23 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_SWITCH_ROADS_OFF: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.SwitchRoadsOffInArea(infX, supX, infY, supY, infZ, supZ, true); return 0; @@ -1459,85 +1513,83 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_GET_NUMBER_OF_PASSENGERS: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = pVehicle->m_nNumPassengers; + SET_INTEGER_PARAM(0, pVehicle->m_nNumPassengers); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_MAXIMUM_NUMBER_OF_PASSENGERS: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = pVehicle->m_nNumMaxPassengers; + SET_INTEGER_PARAM(0, pVehicle->m_nNumMaxPassengers); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CAR_DENSITY_MULTIPLIER: { CollectParameters(&m_nIp, 1); - CCarCtrl::CarDensityMultiplier = *(float*)&ScriptParams[0]; + CCarCtrl::CarDensityMultiplier = GET_FLOAT_PARAM(0); return 0; } case COMMAND_SET_CAR_HEAVY: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - if (ScriptParams[1] != 0) { + if (GET_INTEGER_PARAM(1) != 0) { pVehicle->bIsHeavy = true; - pVehicle->m_fMass = 3.0f * pVehicle->pHandling->fMass; - pVehicle->m_fTurnMass = 5.0f * pVehicle->pHandling->fTurnMass; + pVehicle->m_fMass = 3.0f * pVehicle->pHandling->fMass; // TODO: tHandlingData::GetMass() + pVehicle->m_fTurnMass = 5.0f * pVehicle->pHandling->fTurnMass; // TODO: tHandlingData::GetTurnMass() } else { pVehicle->bIsHeavy = false; - pVehicle->m_fMass = pVehicle->pHandling->fMass; - pVehicle->m_fTurnMass = pVehicle->pHandling->fTurnMass; + pVehicle->m_fMass = pVehicle->pHandling->fMass; // TODO: tHandlingData::GetMass() + pVehicle->m_fTurnMass = pVehicle->pHandling->fTurnMass; // TODO: tHandlingData::GetTurnMass() } return 0; } case COMMAND_CLEAR_CHAR_THREAT_SEARCH: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->m_fearFlags = 0; return 0; } - /* case COMMAND_ACTIVATE_CRANE: { CollectParameters(&m_nIp, 10); - float infX = *(float*)&ScriptParams[2]; - float infY = *(float*)&ScriptParams[3]; - float supX = *(float*)&ScriptParams[4]; - float supY = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(2); + float infY = GET_FLOAT_PARAM(3); + float supX = GET_FLOAT_PARAM(4); + float supY = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[4]; - supX = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(4); + supX = GET_FLOAT_PARAM(2); } if (infY > supY) { - infY = *(float*)&ScriptParams[5]; - supY = *(float*)&ScriptParams[3]; + infY = GET_FLOAT_PARAM(5); + supY = GET_FLOAT_PARAM(3); } CCranes::ActivateCrane(infX, supX, infY, supY, - *(float*)&ScriptParams[6], *(float*)&ScriptParams[7], *(float*)&ScriptParams[8], - DEGTORAD(*(float*)&ScriptParams[9]), false, false, - *(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + GET_FLOAT_PARAM(6), GET_FLOAT_PARAM(7), GET_FLOAT_PARAM(8), + DEGTORAD(GET_FLOAT_PARAM(9)), false, false, + GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1)); return 0; } case COMMAND_DEACTIVATE_CRANE: { CollectParameters(&m_nIp, 2); - CCranes::DeActivateCrane(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + CCranes::DeActivateCrane(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1)); return 0; } - */ case COMMAND_SET_MAX_WANTED_LEVEL: { CollectParameters(&m_nIp, 1); - CWanted::SetMaximumWantedLevel(ScriptParams[0]); + CWanted::SetMaximumWantedLevel(GET_INTEGER_PARAM(0)); return 0; } //case COMMAND_SAVE_VAR_INT: @@ -1545,7 +1597,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) case COMMAND_IS_CAR_IN_AIR_PROPER: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(pVehicle->m_nCollisionRecords == 0); return 0; diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp index acd3988f..b0f529c0 100644 --- a/src/control/Script3.cpp +++ b/src/control/Script3.cpp @@ -6,6 +6,7 @@ #include "Boat.h" #include "CarCtrl.h" #include "Clock.h" +#include "ColStore.h" #include "Coronas.h" #include "Cranes.h" #include "CutsceneMgr.h" @@ -36,23 +37,25 @@ #include "Bike.h" #include "Wanted.h" +// LCS: file done except TODOs + int8 CRunningScript::ProcessCommands500To599(int32 command) { switch (command) { case COMMAND_IS_CAR_UPSIDEDOWN: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->GetUp().z <= -0.97f); + UpdateCompareFlag(pVehicle->GetUp().z <= UPSIDEDOWN_UP_THRESHOLD); return 0; } case COMMAND_GET_PLAYER_CHAR: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPed); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPed)); StoreParameters(&m_nIp, 1); return 0; } @@ -62,9 +65,9 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_SET_POLICE_IGNORE_PLAYER: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pPed->m_pWanted->m_bIgnoredByCops = true; CWorld::StopAllLawEnforcersInTheirTracks(); } @@ -78,8 +81,8 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 4); - CUserDisplay::Pager.AddMessageWithNumber(text, ScriptParams[0], -1, -1, -1, -1, -1, - ScriptParams[1], ScriptParams[2], ScriptParams[3]); + CUserDisplay::Pager.AddMessageWithNumber(text, GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1, + GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); return 0; } */ @@ -87,21 +90,21 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CDarkel::StartFrenzy((eWeaponType)ScriptParams[0], ScriptParams[1], ScriptParams[2], - ScriptParams[3], text, ScriptParams[4], ScriptParams[5], - ScriptParams[6], ScriptParams[7] != 0, false); + CDarkel::StartFrenzy((eWeaponType)GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), + GET_INTEGER_PARAM(3), text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), + GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7) != 0, false); return 0; } case COMMAND_READ_KILL_FRENZY_STATUS: { - ScriptParams[0] = CDarkel::ReadStatus(); + SET_INTEGER_PARAM(0, CDarkel::ReadStatus()); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SQRT: { CollectParameters(&m_nIp, 1); - *(float*)&ScriptParams[0] = Sqrt(*(float*)&ScriptParams[0]); + SET_FLOAT_PARAM(0, Sqrt(GET_FLOAT_PARAM(0))); StoreParameters(&m_nIp, 1); return 0; } @@ -123,39 +126,40 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) return 0; case COMMAND_GENERATE_RANDOM_FLOAT_IN_RANGE: CollectParameters(&m_nIp, 2); - *(float*)&ScriptParams[0] = CGeneral::GetRandomNumberInRange(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + SET_FLOAT_PARAM(0, CGeneral::GetRandomNumberInRange(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_GENERATE_RANDOM_INT_IN_RANGE: CollectParameters(&m_nIp, 2); - ScriptParams[0] = CGeneral::GetRandomNumberInRange(ScriptParams[0], ScriptParams[1]); + SET_INTEGER_PARAM(0, CGeneral::GetRandomNumberInRange(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_LOCK_CAR_DOORS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->m_nDoorLock = (eCarLock)ScriptParams[1]; + pVehicle->m_nDoorLock = (eCarLock)GET_INTEGER_PARAM(1); return 0; } case COMMAND_EXPLODE_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); + pVehicle->bCanBeDamaged = true; pVehicle->BlowUpCar(nil); return 0; } case COMMAND_ADD_EXPLOSION: CollectParameters(&m_nIp, 4); - CExplosion::AddExplosion(nil, nil, (eExplosionType)ScriptParams[3], *(CVector*)&ScriptParams[0], 0, true); + CExplosion::AddExplosion(nil, nil, (eExplosionType)GET_INTEGER_PARAM(3), GET_VECTOR_PARAM(0), 0, true); // last argument is 0 (default? - TODO) return 0; case COMMAND_IS_CAR_UPRIGHT: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(pVehicle->GetUp().z >= 0.0f); return 0; @@ -163,8 +167,8 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_TURN_CHAR_TO_FACE_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pSourcePed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); CVehicle* pVehicle = pSourcePed->bInVehicle ? pSourcePed->m_pMyVehicle : nil; CVector2D sourcePos = pSourcePed->bInVehicle ? pVehicle->GetPosition() : pSourcePed->GetPosition(); CVector2D targetPos = pTargetPed->bInVehicle ? pTargetPed->m_pMyVehicle->GetPosition() : pTargetPed->GetPosition(); @@ -181,8 +185,8 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_TURN_CHAR_TO_FACE_PLAYER: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pTargetPed = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pSourcePed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pTargetPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; CVehicle* pVehicle = pSourcePed->bInVehicle ? pSourcePed->m_pMyVehicle : nil; CVector2D sourcePos = pSourcePed->bInVehicle ? pVehicle->GetPosition() : pSourcePed->GetPosition(); CVector2D targetPos = pTargetPed->bInVehicle ? pTargetPed->m_pMyVehicle->GetPosition() : pTargetPed->GetPosition(); @@ -199,8 +203,8 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_TURN_PLAYER_TO_FACE_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CWorld::Players[ScriptParams[0]].m_pPed; - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pSourcePed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); CVehicle* pVehicle = pSourcePed->bInVehicle ? pSourcePed->m_pMyVehicle : nil; CVector2D sourcePos = pSourcePed->bInVehicle ? pVehicle->GetPosition() : pSourcePed->GetPosition(); CVector2D targetPos = pTargetPed->bInVehicle ? pTargetPed->m_pMyVehicle->GetPosition() : pTargetPed->GetPosition(); @@ -217,11 +221,11 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_SET_CHAR_OBJ_GOTO_COORD_ON_FOOT: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVector target; - target.x = *(float*)&ScriptParams[1]; - target.y = *(float*)&ScriptParams[2]; + target.x = GET_FLOAT_PARAM(1); + target.y = GET_FLOAT_PARAM(2); target.z = CWorld::FindGroundZForCoord(target.x, target.y); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, target); @@ -231,63 +235,61 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_CREATE_PICKUP: { CollectParameters(&m_nIp, 5); - int16 model = ScriptParams[0]; + int16 model = GET_INTEGER_PARAM(0); if (model < 0) model = CTheScripts::UsedObjectArray[-model].index; - CVector pos = *(CVector*)&ScriptParams[2]; + CVector pos = GET_VECTOR_PARAM(2); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, model, ScriptParams[1], 0); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, model, GET_INTEGER_PARAM(1), 0)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_HAS_PICKUP_BEEN_COLLECTED: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CPickups::IsPickUpPickedUp(ScriptParams[0]) != 0); + UpdateCompareFlag(CPickups::IsPickUpPickedUp(GET_INTEGER_PARAM(0)) != 0); return 0; case COMMAND_REMOVE_PICKUP: CollectParameters(&m_nIp, 1); - CPickups::RemovePickUp(ScriptParams[0]); + CPickups::RemovePickUp(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SET_TAXI_LIGHTS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); - ((CAutomobile*)pVehicle)->SetTaxiLight(ScriptParams[1] != 0); + ((CAutomobile*)pVehicle)->SetTaxiLight(GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_PRINT_BIG_Q: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddBigMessageQ(text, ScriptParams[0], ScriptParams[1] - 1); + CMessages::AddBigMessageQ(text, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) - 1); return 0; } - /* case COMMAND_PRINT_WITH_NUMBER_BIG_Q: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 3); - CMessages::AddBigMessageWithNumberQ(text, ScriptParams[1], ScriptParams[2] - 1, - ScriptParams[0], -1, -1, -1, -1, -1); + CMessages::AddBigMessageWithNumberQ(text, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) - 1, + GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1); return 0; } - */ case COMMAND_SET_GARAGE: { CollectParameters(&m_nIp, 9); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float X2 = *(float*)&ScriptParams[3]; - float Y2 = *(float*)&ScriptParams[4]; - float supX = *(float*)&ScriptParams[5]; - float supY = *(float*)&ScriptParams[6]; - float supZ = *(float*)&ScriptParams[7]; - ScriptParams[0] = CGarages::AddOne(infX, infY, infZ, X2, Y2, supX, supY, supZ, ScriptParams[8], 0); + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float X2 = GET_FLOAT_PARAM(3); + float Y2 = GET_FLOAT_PARAM(4); + float supX = GET_FLOAT_PARAM(5); + float supY = GET_FLOAT_PARAM(6); + float supZ = GET_FLOAT_PARAM(7); + SET_INTEGER_PARAM(0, CGarages::AddOne(infX, infY, infZ, X2, Y2, supX, supY, supZ, GET_INTEGER_PARAM(8), 0)); StoreParameters(&m_nIp, 1); return 0; } @@ -295,15 +297,15 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_SET_GARAGE_WITH_CAR_MODEL: { CollectParameters(&m_nIp, 10); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float X2 = *(float*)&ScriptParams[3]; - float Y2 = *(float*)&ScriptParams[4]; - float supX = *(float*)&ScriptParams[5]; - float supY = *(float*)&ScriptParams[6]; - float supZ = *(float*)&ScriptParams[7]; - ScriptParams[0] = CGarages::AddOne(infX, infY, infZ, X2, Y2, supX, supY, supZ, ScriptParams[8], ScriptParams[9]); + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float X2 = GET_FLOAT_PARAM(3); + float Y2 = GET_FLOAT_PARAM(4); + float supX = GET_FLOAT_PARAM(5); + float supY = GET_FLOAT_PARAM(6); + float supZ = GET_FLOAT_PARAM(7); + SET_INTEGER_PARAM(0, CGarages::AddOne(infX, infY, infZ, X2, Y2, supX, supY, supZ, GET_INTEGER_PARAM(8), GET_INTEGER_PARAM(9))); StoreParameters(&m_nIp, 1); return 0; } @@ -312,34 +314,34 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) { CollectParameters(&m_nIp, 2); CVehicle* pTarget; - if (ScriptParams[1] >= 0) { - pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + if (GET_INTEGER_PARAM(1) >= 0) { + pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); } else { pTarget = nil; } - CGarages::SetTargetCarForMissonGarage(ScriptParams[0], pTarget); + CGarages::SetTargetCarForMissonGarage(GET_INTEGER_PARAM(0), pTarget); return 0; } case COMMAND_IS_CAR_IN_MISSION_GARAGE: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CGarages::HasCarBeenDroppedOffYet(ScriptParams[0])); + UpdateCompareFlag(CGarages::HasCarBeenDroppedOffYet(GET_INTEGER_PARAM(0))); return 0; -/* case COMMAND_SET_FREE_BOMBS: CollectParameters(&m_nIp, 1); - CGarages::SetFreeBombs(ScriptParams[0] != 0); + CGarages::SetFreeBombs(GET_INTEGER_PARAM(0) != 0); return 0; + /* case COMMAND_SET_POWERPOINT: { CollectParameters(&m_nIp, 7); - float f1 = *(float*)&ScriptParams[0]; - float f2 = *(float*)&ScriptParams[1]; - float f3 = *(float*)&ScriptParams[2]; - float f4 = *(float*)&ScriptParams[3]; - float f5 = *(float*)&ScriptParams[4]; - float f6 = *(float*)&ScriptParams[5]; + float f1 = GET_FLOAT_PARAM(0); + float f2 = GET_FLOAT_PARAM(1); + float f3 = GET_FLOAT_PARAM(2); + float f4 = GET_FLOAT_PARAM(3); + float f5 = GET_FLOAT_PARAM(4); + float f6 = GET_FLOAT_PARAM(5); float temp; if (f1 > f4) { @@ -360,43 +362,43 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) f6 = temp; } - CPowerPoints::GenerateNewOne(f1, f2, f3, f4, f5, f6, *(uint8*)&ScriptParams[6]); + CPowerPoints::GenerateNewOne(f1, f2, f3, f4, f5, f6, *(uint8*)&GET_INTEGER_PARAM(6)); return 0; } case COMMAND_SET_ALL_TAXI_LIGHTS: CollectParameters(&m_nIp, 1); - CAutomobile::SetAllTaxiLights(ScriptParams[0] != 0); + CAutomobile::SetAllTaxiLights(GET_INTEGER_PARAM(0) != 0); return 0; + */ case COMMAND_IS_CAR_ARMED_WITH_ANY_BOMB: { CollectParameters(&m_nIp, 1); - CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pCar); script_assert(pCar->m_vehType == VEHICLE_TYPE_CAR); UpdateCompareFlag(pCar->m_bombType != 0); //TODO: enum return 0; } - */ case COMMAND_APPLY_BRAKES_TO_PLAYERS_CAR: CollectParameters(&m_nIp, 2); - CPad::GetPad(ScriptParams[0])->bApplyBrakes = (ScriptParams[1] != 0); + CPad::GetPad(GET_INTEGER_PARAM(0))->bApplyBrakes = (GET_INTEGER_PARAM(1) != 0); return 0; case COMMAND_SET_PLAYER_HEALTH: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->m_fHealth = Min(ScriptParams[1], CWorld::Players[ScriptParams[0]].m_nMaxHealth); + pPed->m_fHealth = Min(GET_INTEGER_PARAM(1), CWorld::Players[GET_INTEGER_PARAM(0)].m_nMaxHealth); return 0; } case COMMAND_SET_CHAR_HEALTH: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) { - pPed->m_fHealth = ScriptParams[1]; + if (GET_INTEGER_PARAM(1)) { + pPed->m_fHealth = GET_INTEGER_PARAM(1); } else if (pPed->bInVehicle) { pPed->SetDead(); @@ -404,86 +406,84 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) pPed->FlagToDestroyWhenNextProcessed(); } else { - pPed->SetDie(); + pPed->SetDie(); // last argument = 13 (default? TODO) } return 0; } case COMMAND_SET_CAR_HEALTH: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->m_fHealth = ScriptParams[1]; + pVehicle->m_fHealth = GET_INTEGER_PARAM(1); return 0; } case COMMAND_GET_PLAYER_HEALTH: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - ScriptParams[0] = pPed->m_fHealth; + SET_INTEGER_PARAM(0, pPed->m_fHealth); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_CHAR_HEALTH: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - ScriptParams[0] = pPed->m_fHealth; + SET_INTEGER_PARAM(0, pPed->m_fHealth); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_CAR_HEALTH: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = pVehicle->m_fHealth; + SET_INTEGER_PARAM(0, pVehicle->m_fHealth); StoreParameters(&m_nIp, 1); return 0; } - /* case COMMAND_IS_CAR_ARMED_WITH_BOMB: { CollectParameters(&m_nIp, 2); - CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pCar); - script_assert(pCar->m_vehType == VEHICLE_TYPE_CAR); - UpdateCompareFlag(pCar->m_bombType == ScriptParams[1]); + //script_assert(pCar->m_vehType == VEHICLE_TYPE_CAR); + UpdateCompareFlag(pCar->m_bombType == GET_INTEGER_PARAM(1)); return 0; } - */ case COMMAND_CHANGE_CAR_COLOUR: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); - if (ScriptParams[1] >= 256 || ScriptParams[2] >= 256) + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + if (GET_INTEGER_PARAM(1) >= 256 || GET_INTEGER_PARAM(2) >= 256) debug("CHANGE_CAR_COLOUR - Colours must be less than %d", 256); - pVehicle->m_currentColour1 = ScriptParams[1]; - pVehicle->m_currentColour2 = ScriptParams[2]; + pVehicle->m_currentColour1 = GET_INTEGER_PARAM(1); + pVehicle->m_currentColour2 = GET_INTEGER_PARAM(2); return 0; } case COMMAND_SWITCH_PED_ROADS_ON: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.SwitchPedRoadsOffInArea(infX, supX, infY, supY, infZ, supZ, false); return 0; @@ -491,23 +491,23 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_SWITCH_PED_ROADS_OFF: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.SwitchPedRoadsOffInArea(infX, supX, infY, supY, infZ, supZ, true); return 0; @@ -515,20 +515,20 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_CHAR_LOOK_AT_CHAR_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pSourcePed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pSourcePed); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTargetPed); - pSourcePed->SetLookFlag(pTargetPed, true); + pSourcePed->SetLookFlag(pTargetPed, true, true); pSourcePed->SetLookTimer(60000); return 0; } case COMMAND_CHAR_LOOK_AT_PLAYER_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pSourcePed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pSourcePed); - CPed* pTargetPed = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pTargetPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; script_assert(pTargetPed); pSourcePed->SetLookFlag(pTargetPed, true); pSourcePed->SetLookTimer(60000); @@ -537,9 +537,9 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_PLAYER_LOOK_AT_CHAR_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pSourcePed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pSourcePed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pSourcePed); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTargetPed); pSourcePed->SetLookFlag(pTargetPed, true); pSourcePed->SetLookTimer(60000); @@ -548,7 +548,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_STOP_CHAR_LOOKING: { CollectParameters(&m_nIp, 1); - CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pSourcePed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pSourcePed); pSourcePed->ClearLookFlag(); pSourcePed->bKeepTryingToLook = false; @@ -559,7 +559,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_STOP_PLAYER_LOOKING: { CollectParameters(&m_nIp, 1); - CPed* pSourcePed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pSourcePed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pSourcePed); pSourcePed->ClearLookFlag(); pSourcePed->bKeepTryingToLook = false; @@ -570,7 +570,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) /* case COMMAND_SWITCH_HELICOPTER: CollectParameters(&m_nIp, 1); - CHeli::ActivateHeli(ScriptParams[0] != 0); + CHeli::ActivateHeli(GET_INTEGER_PARAM(0) != 0); return 0; */ //case COMMAND_SET_GANG_ATTITUDE: @@ -578,33 +578,33 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) //case COMMAND_SET_GANG_PLAYER_ATTITUDE: case COMMAND_SET_GANG_PED_MODELS: CollectParameters(&m_nIp, 3); - CGangs::SetGangPedModels(ScriptParams[0], ScriptParams[1], ScriptParams[2]); + CGangs::SetGangPedModels(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; case COMMAND_SET_GANG_CAR_MODEL: CollectParameters(&m_nIp, 2); - CGangs::SetGangVehicleModel(ScriptParams[0], ScriptParams[1]); + CGangs::SetGangVehicleModel(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_SET_GANG_WEAPONS: CollectParameters(&m_nIp, 3); - CGangs::SetGangWeapons(ScriptParams[0], (eWeaponType)ScriptParams[1], (eWeaponType)ScriptParams[2]); + CGangs::SetGangWeapons(GET_INTEGER_PARAM(0), (eWeaponType)GET_INTEGER_PARAM(1), (eWeaponType)GET_INTEGER_PARAM(2)); return 0; /* case COMMAND_SET_CHAR_OBJ_RUN_TO_AREA: { CollectParameters(&m_nIp, 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - float infX = *(float*)&ScriptParams[1]; - float infY = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; + float infX = GET_FLOAT_PARAM(1); + float infY = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; @@ -619,11 +619,11 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_SET_CHAR_OBJ_RUN_TO_COORD: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVector pos; - pos.x = *(float*)&ScriptParams[1]; - pos.y = *(float*)&ScriptParams[2]; + pos.x = GET_FLOAT_PARAM(1); + pos.y = GET_FLOAT_PARAM(2); pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_RUN_TO_AREA, pos); @@ -633,9 +633,9 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_IS_PLAYER_TOUCHING_OBJECT_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); bool isTouching = false; if (pPed->bInVehicle) isTouching = false; @@ -647,9 +647,9 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_IS_CHAR_TOUCHING_OBJECT_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); bool isTouching = false; if (pPed->InVehicle()) isTouching = false; @@ -666,110 +666,115 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) strncpy(name, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); for (int i = 0; i < KEY_LENGTH_IN_SCRIPT; i++) name[i] = tolower(name[i]); - CStreaming::RequestSpecialChar(ScriptParams[0] - 1, name, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + CStreaming::RequestSpecialChar(GET_INTEGER_PARAM(0) - 1, name, STREAMFLAGS_DEPENDENCY | (m_bIsMissionScript ? STREAMFLAGS_SCRIPTOWNED : STREAMFLAGS_AMBIENT_SCRIPT_OWNED)); m_nIp += KEY_LENGTH_IN_SCRIPT; return 0; } case COMMAND_HAS_SPECIAL_CHARACTER_LOADED: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CStreaming::HasSpecialCharLoaded(ScriptParams[0] - 1)); + UpdateCompareFlag(CStreaming::HasSpecialCharLoaded(GET_INTEGER_PARAM(0) - 1)); return 0; } /* case COMMAND_FLASH_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bHasBlip = (ScriptParams[1] != 0); + pVehicle->bHasBlip = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_FLASH_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bHasBlip = (ScriptParams[1] != 0); + pPed->bHasBlip = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_FLASH_OBJECT: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->bHasBlip = (ScriptParams[1] != 0); + pObject->bHasBlip = (GET_INTEGER_PARAM(1) != 0); return 0; } */ case COMMAND_IS_PLAYER_IN_REMOTE_MODE: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].IsPlayerInRemoteMode()); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].IsPlayerInRemoteMode()); return 0; - /* case COMMAND_ARM_CAR_WITH_BOMB: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); - ((CAutomobile*)pVehicle)->m_bombType = ScriptParams[1]; + ((CAutomobile*)pVehicle)->m_bombType = GET_INTEGER_PARAM(1); ((CAutomobile*)pVehicle)->m_pBombRigger = FindPlayerPed(); return 0; } - */ case COMMAND_SET_CHAR_PERSONALITY: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->SetPedStats((ePedStats)ScriptParams[1]); + pPed->SetPedStats((ePedStats)GET_INTEGER_PARAM(1)); return 0; } case COMMAND_SET_CUTSCENE_OFFSET: CollectParameters(&m_nIp, 3); - CCutsceneMgr::SetCutsceneOffset(*(CVector*)&ScriptParams[0]); + CCutsceneMgr::SetCutsceneOffset(GET_VECTOR_PARAM(0)); return 0; case COMMAND_SET_ANIM_GROUP_FOR_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_animGroup = (AssocGroupId)ScriptParams[1]; + pPed->m_animGroup = (AssocGroupId)GET_INTEGER_PARAM(1); + pPed->bOverrideMoveAnim = false; return 0; } /* case COMMAND_SET_ANIM_GROUP_FOR_PLAYER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->m_animGroup = (AssocGroupId)ScriptParams[1]; + pPed->m_animGroup = (AssocGroupId)GET_INTEGER_PARAM(1); return 0; } */ case COMMAND_REQUEST_MODEL: { CollectParameters(&m_nIp, 1); - int model = ScriptParams[0]; + int model = GET_INTEGER_PARAM(0); if (model < 0) model = CTheScripts::UsedObjectArray[-model].index; - CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_NOFADE | STREAMFLAGS_SCRIPTOWNED); + CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_NOFADE | (m_bIsMissionScript ? STREAMFLAGS_SCRIPTOWNED : STREAMFLAGS_AMBIENT_SCRIPT_OWNED)); + if (model == MI_MINIGUN) +#ifdef FIX_BUGS + CStreaming::RequestModel(MI_MINIGUN2, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_NOFADE | (m_bIsMissionScript ? STREAMFLAGS_SCRIPTOWNED : STREAMFLAGS_AMBIENT_SCRIPT_OWNED)); +#else + CStreaming::RequestModel(MI_MINIGUN2, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_NOFADE | STREAMFLAGS_SCRIPTOWNED); +#endif return 0; } case COMMAND_HAS_MODEL_LOADED: { CollectParameters(&m_nIp, 1); - int model = ScriptParams[0]; + int model = GET_INTEGER_PARAM(0); if (model < 0) model = CTheScripts::UsedObjectArray[-model].index; - UpdateCompareFlag(CStreaming::HasModelLoaded(model)); + UpdateCompareFlag(CStreaming::HasModelLoaded(model)/* || cWorldStream::Instance()->pDynamic(model, 0) */); // TODO return 0; } case COMMAND_MARK_MODEL_AS_NO_LONGER_NEEDED: { CollectParameters(&m_nIp, 1); - int model = ScriptParams[0]; + int model = GET_INTEGER_PARAM(0); if (model < 0) model = CTheScripts::UsedObjectArray[-model].index; CStreaming::SetMissionDoesntRequireModel(model); @@ -778,7 +783,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) case COMMAND_GRAB_PHONE: { CollectParameters(&m_nIp, 2); - ScriptParams[0] = gPhoneInfo.GrabPhone(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + SET_INTEGER_PARAM(0, gPhoneInfo.GrabPhone(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1))); StoreParameters(&m_nIp, 1); return 0; } @@ -787,80 +792,85 @@ int8 CRunningScript::ProcessCommands500To599(int32 command) { CollectParameters(&m_nIp, 1); wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text, nil, nil, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text, nil, nil, nil, nil, nil); return 0; } case COMMAND_SET_PHONE_MESSAGE: { CollectParameters(&m_nIp, 1); wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text, nil, nil, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text, nil, nil, nil, nil, nil); return 0; } case COMMAND_HAS_PHONE_DISPLAYED_MESSAGE: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(gPhoneInfo.HasMessageBeenDisplayed(ScriptParams[0])); + UpdateCompareFlag(gPhoneInfo.HasMessageBeenDisplayed(GET_INTEGER_PARAM(0))); return 0; } */ case COMMAND_TURN_PHONE_OFF: { CollectParameters(&m_nIp, 1); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], nil, nil, nil, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), nil, nil, nil, nil, nil, nil); return 0; } case COMMAND_DRAW_CORONA: { + uint32 ip = m_nIp; + int32* ptr = GetPointerToScriptVariable(&ip, 0); CollectParameters(&m_nIp, 9); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CCoronas::RegisterCorona((uintptr)this + m_nIp, ScriptParams[6], ScriptParams[7], ScriptParams[8], - 255, pos, *(float*)&ScriptParams[3], 450.0f, ScriptParams[4], ScriptParams[5], 1, 0, 0, 0.0f); + CCoronas::RegisterCorona((uintptr)ptr, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8), + 255, pos, -GET_FLOAT_PARAM(3), 450.0f, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), 1, 0, 0, 0.0f); return 0; } + /* case COMMAND_DRAW_LIGHT: { CollectParameters(&m_nIp, 6); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); CVector unused(0.0f, 0.0f, 0.0f); - CPointLights::AddLight(0, *(CVector*)&ScriptParams[0], CVector(0.0f, 0.0f, 0.0f), 12.0f, - ScriptParams[3] / 255.0f, ScriptParams[4] / 255.0f, ScriptParams[5] / 255.0f, 0, true); + CPointLights::AddLight(0, GET_VECTOR_PARAM(0), CVector(0.0f, 0.0f, 0.0f), 12.0f, + GET_INTEGER_PARAM(3) / 255.0f, GET_INTEGER_PARAM(4) / 255.0f, GET_INTEGER_PARAM(5) / 255.0f, 0, true); return 0; } - //case COMMAND_STORE_WEATHER: - //case COMMAND_RESTORE_WEATHER: + */ + case COMMAND_STORE_WEATHER: + CWeather::StoreWeatherState(); + return 0; + case COMMAND_RESTORE_WEATHER: + CWeather::RestoreWeatherState(); case COMMAND_STORE_CLOCK: CClock::StoreClock(); return 0; case COMMAND_RESTORE_CLOCK: CClock::RestoreClock(); return 0; - /* case COMMAND_RESTART_CRITICAL_MISSION: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CRestart::OverrideNextRestart(pos, *(float*)&ScriptParams[3]); + CRestart::OverrideNextRestart(pos, GET_FLOAT_PARAM(3)); if (CWorld::Players[CWorld::PlayerInFocus].m_WBState != WBSTATE_PLAYING) printf("RESTART_CRITICAL_MISSION - Player state is not PLAYING\n"); CWorld::Players[CWorld::PlayerInFocus].PlayerFailedCriticalMission(); return 0; } - */ case COMMAND_IS_PLAYER_PLAYING: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_PLAYING); + UpdateCompareFlag(CWorld::Players[GET_INTEGER_PARAM(0)].m_WBState == WBSTATE_PLAYING); return 0; } #ifdef GTA_SCRIPT_COLLECTIVE case COMMAND_SET_COLL_OBJ_NO_OBJ: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_NONE); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_NONE); return 0; #endif default: @@ -875,134 +885,134 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) #ifdef GTA_SCRIPT_COLLECTIVE case COMMAND_SET_COLL_OBJ_WAIT_ON_FOOT: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_WAIT_ON_FOOT); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_WAIT_ON_FOOT); return 0; case COMMAND_SET_COLL_OBJ_FLEE_ON_FOOT_TILL_SAFE: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE); return 0; case COMMAND_SET_COLL_OBJ_GUARD_SPOT: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GUARD_AREA, pos); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GUARD_AREA, pos); return 0; } case COMMAND_SET_COLL_OBJ_GUARD_AREA: { CollectParameters(&m_nIp, 5); - float infX = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(3); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } - float infY = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[4]; + float infY = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(4); if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; pos.y = (infY + supY) / 2; pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); float radius = Max(pos.x - infX, pos.y - infY); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GUARD_AREA, pos, radius); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GUARD_AREA, pos, radius); return 0; } case COMMAND_SET_COLL_OBJ_WAIT_IN_CAR: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_WAIT_IN_CAR); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_WAIT_IN_CAR); return 0; case COMMAND_SET_COLL_OBJ_KILL_CHAR_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_KILL_CHAR_ON_FOOT, pPed); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_KILL_CHAR_ON_FOOT, pPed); return 0; } case COMMAND_SET_COLL_OBJ_KILL_PLAYER_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[1]].m_pPed; - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_KILL_CHAR_ON_FOOT, pPed); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_KILL_CHAR_ON_FOOT, pPed); return 0; } case COMMAND_SET_COLL_OBJ_KILL_CHAR_ANY_MEANS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_KILL_CHAR_ANY_MEANS, pPed); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_KILL_CHAR_ANY_MEANS, pPed); return 0; } case COMMAND_SET_COLL_OBJ_KILL_PLAYER_ANY_MEANS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[1]].m_pPed; - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_KILL_CHAR_ANY_MEANS, pPed); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_KILL_CHAR_ANY_MEANS, pPed); return 0; } case COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pPed); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pPed); return 0; } case COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[1]].m_pPed; - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pPed); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, pPed); return 0; } case COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pPed); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pPed); return 0; } case COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[1]].m_pPed; - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pPed); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS, pPed); return 0; } case COMMAND_SET_COLL_OBJ_GOTO_CHAR_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GOTO_CHAR_ON_FOOT, pPed); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GOTO_CHAR_ON_FOOT, pPed); return 0; } case COMMAND_SET_COLL_OBJ_GOTO_PLAYER_ON_FOOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[1]].m_pPed; - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GOTO_CHAR_ON_FOOT, pPed); + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GOTO_CHAR_ON_FOOT, pPed); return 0; } case COMMAND_SET_COLL_OBJ_LEAVE_CAR: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_LEAVE_CAR); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_LEAVE_CAR); return 0; case COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_PASSENGER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_ENTER_CAR_AS_PASSENGER, pVehicle); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_ENTER_CAR_AS_PASSENGER, pVehicle); return 0; } case COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_DRIVER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle); return 0; } /* @@ -1013,31 +1023,31 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) case COMMAND_SET_COLL_OBJ_DESTROY_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_DESTROY_CAR, pVehicle); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_DESTROY_CAR, pVehicle); return 0; } case COMMAND_SET_COLL_OBJ_GOTO_AREA_ON_FOOT: { CollectParameters(&m_nIp, 5); - float infX = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(3); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } - float infY = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[4]; + float infY = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(4); if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; pos.y = (infY + supY) / 2; pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); float radius = Max(pos.x - infX, pos.y - infY); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GOTO_AREA_ON_FOOT, pos, radius); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GOTO_AREA_ON_FOOT, pos, radius); return 0; } /* @@ -1047,66 +1057,66 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) */ case COMMAND_SET_COLL_OBJ_FOLLOW_ROUTE: CollectParameters(&m_nIp, 3); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_FOLLOW_ROUTE, ScriptParams[1], ScriptParams[2]); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_FOLLOW_ROUTE, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; case COMMAND_SET_COLL_OBJ_GOTO_COORD_ON_FOOT: { CollectParameters(&m_nIp, 3); - CVector pos(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2], CWorld::FindGroundZForCoord(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2])); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GOTO_AREA_ON_FOOT, pos); + CVector pos(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), CWorld::FindGroundZForCoord(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2))); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GOTO_AREA_ON_FOOT, pos); return 0; } //case COMMAND_SET_COLL_OBJ_GOTO_COORD_IN_CAR: case COMMAND_SET_COLL_OBJ_RUN_TO_AREA: { CollectParameters(&m_nIp, 5); - float infX = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(3); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } - float infY = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[4]; + float infY = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(4); if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; pos.y = (infY + supY) / 2; pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); float radius = Max(pos.x - infX, pos.y - infY); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_RUN_TO_AREA, pos, radius); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_RUN_TO_AREA, pos, radius); return 0; } case COMMAND_SET_COLL_OBJ_RUN_TO_COORD: { CollectParameters(&m_nIp, 3); - CVector pos(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2], CWorld::FindGroundZForCoord(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2])); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_RUN_TO_AREA, pos); + CVector pos(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), CWorld::FindGroundZForCoord(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2))); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_RUN_TO_AREA, pos); return 0; } case COMMAND_ADD_PEDS_IN_AREA_TO_COLL: { CollectParameters(&m_nIp, 3); - float X = *(float*)&ScriptParams[0]; - float Y = *(float*)&ScriptParams[1]; + float X = GET_FLOAT_PARAM(0); + float Y = GET_FLOAT_PARAM(1); float Z = CWorld::FindGroundZForCoord(X, Y); - float radius = *(float*)&ScriptParams[2]; - ScriptParams[0] = CTheScripts::AddPedsInAreaToCollective(X, Y, Z, radius); + float radius = GET_FLOAT_PARAM(2); + SET_INTEGER_PARAM(0, CTheScripts::AddPedsInAreaToCollective(X, Y, Z, radius)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_PEDS_IN_VEHICLE_TO_COLL: CollectParameters(&m_nIp, 1); - ScriptParams[0] = CTheScripts::AddPedsInVehicleToCollective(ScriptParams[0]); + SET_INTEGER_PARAM(0, CTheScripts::AddPedsInVehicleToCollective(GET_INTEGER_PARAM(0))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_CLEAR_COLL: CollectParameters(&m_nIp, 1); for (int i = 0; i < MAX_NUM_COLLECTIVES; i++) { - if (CTheScripts::CollectiveArray[i].colIndex == ScriptParams[0]) { + if (CTheScripts::CollectiveArray[i].colIndex == GET_INTEGER_PARAM(0)) { CTheScripts::CollectiveArray[i].colIndex = -1; CTheScripts::CollectiveArray[i].pedIndex = 0; } @@ -1175,7 +1185,7 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) total++; } } - ScriptParams[0] = total; + SET_INTEGER_PARAM(0, total); StoreParameters(&m_nIp, 1); return 0; } @@ -1183,72 +1193,77 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) case COMMAND_SET_CHAR_HEED_THREATS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bRespondsToThreats = (ScriptParams[1] != 0); + pPed->bRespondsToThreats = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_PLAYER_HEED_THREATS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->bRespondsToThreats = (ScriptParams[1] != 0); + pPed->bRespondsToThreats = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_GET_CONTROLLER_MODE: #if defined(GTA_PC) && !defined(DETECT_PAD_INPUT_SWITCH) - ScriptParams[0] = 0; + SET_INTEGER_PARAM(0, 0); #else - ScriptParams[0] = CPad::IsAffectedByController ? CPad::GetPad(0)->Mode : 0; + SET_INTEGER_PARAM(0, CPad::IsAffectedByController ? CPad::GetPad(0)->Mode : 0); #endif StoreParameters(&m_nIp, 1); return 0; case COMMAND_SET_CAN_RESPRAY_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); //assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); // they DO call this for bikes, we don't really want to destroy the structure... #ifdef FIX_BUGS if (pVehicle->m_vehType == VEHICLE_TYPE_CAR) #endif - ((CAutomobile*)pVehicle)->bFixedColour = (ScriptParams[1] == 0); + ((CAutomobile*)pVehicle)->bFixedColour = (GET_INTEGER_PARAM(1) == 0); +#ifdef FIX_BUGS + else if (pVehicle->m_vehType == VEHICLE_TYPE_BIKE) + ((CBike*)pVehicle)->bFixedColour = (GET_INTEGER_PARAM(1) == 0); +#endif return 0; } - /* case COMMAND_IS_TAXI: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(pVehicle->IsTaxi()); return 0; } - */ case COMMAND_UNLOAD_SPECIAL_CHARACTER: CollectParameters(&m_nIp, 1); - CStreaming::SetMissionDoesntRequireSpecialChar(ScriptParams[0] - 1); + if (m_bIsMissionScript) + CStreaming::SetMissionDoesntRequireSpecialChar(GET_INTEGER_PARAM(0) - 1); + //else + // CStreaming::SetAmbientMissionDoesntRequireSpecialChar(GET_INTEGER_PARAM(0) - 1); // TODO return 0; case COMMAND_RESET_NUM_OF_MODELS_KILLED_BY_PLAYER: CDarkel::ResetModelsKilledByPlayer(); return 0; case COMMAND_GET_NUM_OF_MODELS_KILLED_BY_PLAYER: CollectParameters(&m_nIp, 1); - ScriptParams[0] = CDarkel::QueryModelsKilledByPlayer(ScriptParams[0]); + SET_INTEGER_PARAM(0, CDarkel::QueryModelsKilledByPlayer(GET_INTEGER_PARAM(0))); StoreParameters(&m_nIp, 1); return 0; /* case COMMAND_ACTIVATE_GARAGE: CollectParameters(&m_nIp, 1); - CGarages::ActivateGarage(ScriptParams[0]); + CGarages::ActivateGarage(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SWITCH_TAXI_TIMER: { CollectParameters(&m_nIp, 1); - if (ScriptParams[0] != 0){ + if (GET_INTEGER_PARAM(0) != 0){ CWorld::Players[CWorld::PlayerInFocus].m_nUnusedTaxiTimer = CTimer::GetTimeInMilliseconds(); CWorld::Players[CWorld::PlayerInFocus].m_bUnusedTaxiThing = true; }else{ @@ -1260,10 +1275,10 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) case COMMAND_CREATE_OBJECT_NO_OFFSET: { CollectParameters(&m_nIp, 4); - int mi = ScriptParams[0] >= 0 ? ScriptParams[0] : CTheScripts::UsedObjectArray[-ScriptParams[0]].index; + int mi = GET_INTEGER_PARAM(0) >= 0 ? GET_INTEGER_PARAM(0) : CTheScripts::UsedObjectArray[-GET_INTEGER_PARAM(0)].index; CObject* pObj = new CObject(mi, false); ; pObj->ObjectCreatedBy = MISSION_OBJECT; - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pObj->SetPosition(pos); @@ -1275,37 +1290,37 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) pObj->SetupBigBuilding(); CTheScripts::ClearSpaceForMissionEntity(pos, pObj); CWorld::Add(pObj); - ScriptParams[0] = CPools::GetObjectPool()->GetIndex(pObj); + SET_INTEGER_PARAM(0, CPools::GetObjectPool()->GetIndex(pObj)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_OBJECT); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_OBJECT); return 0; } - /* case COMMAND_IS_BOAT: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->m_vehType == VEHICLE_TYPE_BOAT); + UpdateCompareFlag(pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT); return 0; } + /* case COMMAND_SET_CHAR_OBJ_GOTO_AREA_ANY_MEANS: { CollectParameters(&m_nIp, 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - float infX = *(float*)&ScriptParams[1]; - float infY = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; + float infX = GET_FLOAT_PARAM(1); + float infY = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; @@ -1316,105 +1331,107 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) pPed->SetObjective(OBJECTIVE_GOTO_AREA_ANY_MEANS, pos, radius); return 0; } - */ #ifdef GTA_SCRIPT_COLLECTIVE case COMMAND_SET_COLL_OBJ_GOTO_AREA_ANY_MEANS: { CollectParameters(&m_nIp, 5); - float infX = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(3); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(1); } - float infY = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[4]; + float infY = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(4); if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(2); } CVector pos; pos.x = (infX + supX) / 2; pos.y = (infY + supY) / 2; pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); float radius = Max(pos.x - infX, pos.y - infY); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_GOTO_AREA_ANY_MEANS, pos, radius); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_GOTO_AREA_ANY_MEANS, pos, radius); return 0; } #endif +*/ case COMMAND_IS_PLAYER_STOPPED: { CollectParameters(&m_nIp, 1); - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; UpdateCompareFlag(CTheScripts::IsPlayerStopped(pPlayer)); return 0; } - /* case COMMAND_IS_CHAR_STOPPED: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); 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_nWakeTime = CTimer::GetTimeInMilliseconds() + GET_INTEGER_PARAM(0); + if (GET_INTEGER_PARAM(1) != 0) m_bSkipWakeTime = true; return 1; + /* case COMMAND_ADD_PARTICLE_EFFECT: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CParticleObject::AddObject(ScriptParams[0], pos, ScriptParams[4] != 0); + CParticleObject::AddObject(GET_INTEGER_PARAM(0), pos, GET_INTEGER_PARAM(4) != 0); return 0; } */ case COMMAND_SWITCH_WIDESCREEN: CollectParameters(&m_nIp, 1); - if (ScriptParams[0] != 0) + if (GET_INTEGER_PARAM(0) != 0) TheCamera.SetWideScreenOn(); - else + else { + // TODO: unknown field TheCamera.SetWideScreenOff(); + } return 0; /* case COMMAND_ADD_SPRITE_BLIP_FOR_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int id = CRadar::SetEntityBlip(BLIP_CAR, ScriptParams[0], 0, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[1]); - ScriptParams[0] = id; + int id = CRadar::SetEntityBlip(BLIP_CAR, GET_INTEGER_PARAM(0), 0, BLIP_DISPLAY_BOTH); + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(1)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_SPRITE_BLIP_FOR_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int id = CRadar::SetEntityBlip(BLIP_CHAR, ScriptParams[0], 1, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[1]); - ScriptParams[0] = id; + int id = CRadar::SetEntityBlip(BLIP_CHAR, GET_INTEGER_PARAM(0), 1, BLIP_DISPLAY_BOTH); + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(1)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_SPRITE_BLIP_FOR_OBJECT: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int id = CRadar::SetEntityBlip(BLIP_OBJECT, ScriptParams[0], 6, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[1]); - ScriptParams[0] = id; + int id = CRadar::SetEntityBlip(BLIP_OBJECT, GET_INTEGER_PARAM(0), 6, BLIP_DISPLAY_BOTH); + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(1)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } @@ -1422,67 +1439,67 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) case COMMAND_ADD_SPRITE_BLIP_FOR_CONTACT_POINT: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int id = CRadar::SetCoordBlip(BLIP_CONTACT_POINT, pos, 2, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[3]); - ScriptParams[0] = id; + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(3)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_SPRITE_BLIP_FOR_COORD: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - int id = CRadar::SetCoordBlip(BLIP_COORD, pos, 5, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[3]); - ScriptParams[0] = id; + int id = CRadar::SetCoordBlip(BLIP_COORD, pos, 4, BLIP_DISPLAY_BOTH); + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(3)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CHAR_ONLY_DAMAGED_BY_PLAYER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bOnlyDamagedByPlayer = (ScriptParams[1] != 0); + pPed->bOnlyDamagedByPlayer = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_CAR_ONLY_DAMAGED_BY_PLAYER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bOnlyDamagedByPlayer = (ScriptParams[1] != 0); + pVehicle->bOnlyDamagedByPlayer = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_CHAR_PROOFS: { CollectParameters(&m_nIp, 6); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bBulletProof = (ScriptParams[1] != 0); - pPed->bFireProof = (ScriptParams[2] != 0); - pPed->bExplosionProof = (ScriptParams[3] != 0); - pPed->bCollisionProof = (ScriptParams[4] != 0); - pPed->bMeleeProof = (ScriptParams[5] != 0); + pPed->bBulletProof = (GET_INTEGER_PARAM(1) != 0); + pPed->bFireProof = (GET_INTEGER_PARAM(2) != 0); + pPed->bExplosionProof = (GET_INTEGER_PARAM(3) != 0); + pPed->bCollisionProof = (GET_INTEGER_PARAM(4) != 0); + pPed->bMeleeProof = (GET_INTEGER_PARAM(5) != 0); return 0; } case COMMAND_SET_CAR_PROOFS: { CollectParameters(&m_nIp, 6); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bBulletProof = (ScriptParams[1] != 0); - pVehicle->bFireProof = (ScriptParams[2] != 0); - pVehicle->bExplosionProof = (ScriptParams[3] != 0); - pVehicle->bCollisionProof = (ScriptParams[4] != 0); - pVehicle->bMeleeProof = (ScriptParams[5] != 0); + pVehicle->bBulletProof = (GET_INTEGER_PARAM(1) != 0); + pVehicle->bFireProof = (GET_INTEGER_PARAM(2) != 0); + pVehicle->bExplosionProof = (GET_INTEGER_PARAM(3) != 0); + pVehicle->bCollisionProof = (GET_INTEGER_PARAM(4) != 0); + pVehicle->bMeleeProof = (GET_INTEGER_PARAM(5) != 0); return 0; } case COMMAND_IS_PLAYER_IN_ANGLED_AREA_2D: @@ -1502,16 +1519,16 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) /* case COMMAND_DEACTIVATE_GARAGE: CollectParameters(&m_nIp, 1); - CGarages::DeActivateGarage(ScriptParams[0]); + CGarages::DeActivateGarage(GET_INTEGER_PARAM(0)); return 0; case COMMAND_GET_NUMBER_OF_CARS_COLLECTED_BY_GARAGE: CollectParameters(&m_nIp, 1); - ScriptParams[0] = CGarages::QueryCarsCollected(ScriptParams[0]); + SET_INTEGER_PARAM(0, CGarages::QueryCarsCollected(GET_INTEGER_PARAM(0))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_HAS_CAR_BEEN_TAKEN_TO_GARAGE: CollectParameters(&m_nIp, 2); - UpdateCompareFlag(CGarages::HasThisCarBeenCollected(ScriptParams[0], ScriptParams[1] - 1)); + UpdateCompareFlag(CGarages::HasThisCarBeenCollected(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) - 1)); return 0; */ default: @@ -1526,54 +1543,55 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) /* case COMMAND_SET_SWAT_REQUIRED: CollectParameters(&m_nIp, 1); - FindPlayerPed()->m_pWanted->m_bSwatRequired = (ScriptParams[0] != 0); + FindPlayerPed()->m_pWanted->m_bSwatRequired = (GET_INTEGER_PARAM(0) != 0); return 0; case COMMAND_SET_FBI_REQUIRED: CollectParameters(&m_nIp, 1); - FindPlayerPed()->m_pWanted->m_bFbiRequired = (ScriptParams[0] != 0); + FindPlayerPed()->m_pWanted->m_bFbiRequired = (GET_INTEGER_PARAM(0) != 0); return 0; case COMMAND_SET_ARMY_REQUIRED: CollectParameters(&m_nIp, 1); - FindPlayerPed()->m_pWanted->m_bArmyRequired = (ScriptParams[0] != 0); + FindPlayerPed()->m_pWanted->m_bArmyRequired = (GET_INTEGER_PARAM(0) != 0); return 0; */ case COMMAND_IS_CAR_IN_WATER: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(pVehicle && pVehicle->bIsInWater); return 0; } case COMMAND_GET_CLOSEST_CHAR_NODE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CPathNode* pNode = &ThePaths.m_pathNodes[ThePaths.FindNodeClosestToCoors(pos, 1, 999999.9f, true)]; - *(CVector*)&ScriptParams[0] = pNode->GetPosition(); + CPathNode* pNode = &ThePaths.m_pathNodes[ThePaths.FindNodeClosestToCoors(pos, 1, 800.0f, true)]; + SET_VECTOR_PARAM(0, pNode->GetPosition()); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_GET_CLOSEST_CAR_NODE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - *(CVector*)&ScriptParams[0] = ThePaths.FindNodeCoorsForScript(ThePaths.FindNodeClosestToCoors(pos, 0, 999999.9f, true, true)); + SET_VECTOR_PARAM(0, ThePaths.FindNodeCoorsForScript(ThePaths.FindNodeClosestToCoors(pos, 0, 800.0f, true, true))); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_CAR_GOTO_COORDINATES_ACCURATE: { CollectParameters(&m_nIp, 4); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += pVehicle->GetDistanceFromCentreOfMassToBaseOfModel(); + uint8 nOldMission = pVehicle->AutoPilot.m_nCarMission; if (CCarCtrl::JoinCarWithRoadSystemGotoCoors(pVehicle, pos, false)) pVehicle->AutoPilot.m_nCarMission = MISSION_GOTO_COORDS_STRAIGHT_ACCURATE; else @@ -1581,19 +1599,20 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) pVehicle->SetStatus(STATUS_PHYSICS); pVehicle->bEngineOn = true; pVehicle->AutoPilot.m_nCruiseSpeed = Max(1, pVehicle->AutoPilot.m_nCruiseSpeed); - pVehicle->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); + if (nOldMission != pVehicle->AutoPilot.m_nCarMission) + pVehicle->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); return 0; } /* case COMMAND_START_PACMAN_RACE: CollectParameters(&m_nIp, 1); - CPacManPickups::StartPacManRace(ScriptParams[0]); + CPacManPickups::StartPacManRace(GET_INTEGER_PARAM(0)); return 0; case COMMAND_START_PACMAN_RECORD: CPacManPickups::StartPacManRecord(); return 0; case COMMAND_GET_NUMBER_OF_POWER_PILLS_EATEN: - ScriptParams[0] = CPacManPickups::QueryPowerPillsEatenInRace(); + SET_INTEGER_PARAM(0, CPacManPickups::QueryPowerPillsEatenInRace()); StoreParameters(&m_nIp, 1); return 0; case COMMAND_CLEAR_PACMAN: @@ -1602,14 +1621,14 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_START_PACMAN_SCRAMBLE: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CPacManPickups::StartPacManScramble(pos, *(float*)&ScriptParams[3], ScriptParams[4]); + CPacManPickups::StartPacManScramble(pos, GET_FLOAT_PARAM(3), GET_INTEGER_PARAM(4)); return 0; } case COMMAND_GET_NUMBER_OF_POWER_PILLS_CARRIED: - ScriptParams[0] = CPacManPickups::QueryPowerPillsCarriedByPlayer(); + SET_INTEGER_PARAM(0, CPacManPickups::QueryPowerPillsCarriedByPlayer()); StoreParameters(&m_nIp, 1); return 0; case COMMAND_CLEAR_NUMBER_OF_POWER_PILLS_CARRIED: @@ -1619,7 +1638,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_CAR_ON_SCREEN: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(TheCamera.IsSphereVisible(pVehicle->GetBoundCentre(), pVehicle->GetBoundRadius())); return 0; @@ -1627,7 +1646,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_CHAR_ON_SCREEN: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(TheCamera.IsSphereVisible(pPed->GetBoundCentre(), pPed->GetBoundRadius())); return 0; @@ -1635,67 +1654,65 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_OBJECT_ON_SCREEN: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); UpdateCompareFlag(TheCamera.IsSphereVisible(pObject->GetBoundCentre(), pObject->GetBoundRadius())); return 0; } - /* case COMMAND_GOSUB_FILE: { CollectParameters(&m_nIp, 2); script_assert(m_nStackPointer < MAX_STACK_DEPTH); m_anStack[m_nStackPointer++] = m_nIp; - SetIP(ScriptParams[0]); - // ScriptParams[1] == filename + SetIP(GET_INTEGER_PARAM(0)); + // GET_INTEGER_PARAM(1) == filename return 0; } - */ case COMMAND_GET_GROUND_Z_FOR_3D_COORD: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); bool success; - *(float*)&ScriptParams[0] = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &success); + SET_FLOAT_PARAM(0, CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &success)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_START_SCRIPT_FIRE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - ScriptParams[0] = gFireManager.StartScriptFire(pos, nil, 0.8f, 1); + SET_INTEGER_PARAM(0, gFireManager.StartScriptFire(pos, nil, 0.8f, 1)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_SCRIPT_FIRE_EXTINGUISHED: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(gFireManager.IsScriptFireExtinguish(ScriptParams[0])); + UpdateCompareFlag(gFireManager.IsScriptFireExtinguish(GET_INTEGER_PARAM(0))); return 0; case COMMAND_REMOVE_SCRIPT_FIRE: CollectParameters(&m_nIp, 1); - gFireManager.RemoveScriptFire(ScriptParams[0]); + gFireManager.RemoveScriptFire(GET_INTEGER_PARAM(0)); return 0; /* case COMMAND_SET_COMEDY_CONTROLS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bComedyControls = (ScriptParams[1] != 0); + pVehicle->bComedyControls = (GET_INTEGER_PARAM(1) != 0); return 0; } */ case COMMAND_BOAT_GOTO_COORDS: { CollectParameters(&m_nIp, 4); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_BOAT); CBoat* pBoat = (CBoat*)pVehicle; - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) CWaterLevel::GetWaterLevel(pos.x, pos.y, pos.z, &pos.z, false); pBoat->AutoPilot.m_nCarMission = MISSION_GOTOCOORDS_ASTHECROWSWIMS; @@ -1709,7 +1726,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_BOAT_STOP: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_BOAT); CBoat* pBoat = (CBoat*)pVehicle; @@ -1722,49 +1739,53 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_PLAYER_SHOOTING_IN_AREA: { CollectParameters(&m_nIp, 6); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); + */ return 0; } case COMMAND_IS_CHAR_SHOOTING_IN_AREA: { CollectParameters(&m_nIp, 6); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - float x1 = *(float*)&ScriptParams[1]; - float y1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; + float x1 = GET_FLOAT_PARAM(1); + float y1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2)); - if (ScriptParams[5]) + if (GET_INTEGER_PARAM(5)) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) CTheScripts::DrawDebugSquare(x1, y1, x2, y2); + */ return 0; } case COMMAND_IS_CURRENT_PLAYER_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - UpdateCompareFlag(ScriptParams[1] == pPed->GetWeapon()->m_eWeaponType); + UpdateCompareFlag(GET_INTEGER_PARAM(1) == pPed->GetWeapon()->m_eWeaponType); return 0; } case COMMAND_IS_CURRENT_CHAR_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - UpdateCompareFlag(ScriptParams[1] == pPed->GetWeapon()->m_eWeaponType); + UpdateCompareFlag(GET_INTEGER_PARAM(1) == pPed->GetWeapon()->m_eWeaponType); return 0; } /* @@ -1774,7 +1795,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_ADD_POWER_PILL: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CPacManPickups::GenerateOnePMPickUp(pos); @@ -1784,23 +1805,22 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_SET_BOAT_CRUISE_SPEED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_BOAT); CBoat* pBoat = (CBoat*)pVehicle; - pBoat->AutoPilot.m_nCruiseSpeed = *(float*)&ScriptParams[1]; + pBoat->AutoPilot.m_nCruiseSpeed = GET_FLOAT_PARAM(1); return 0; } - /* case COMMAND_GET_RANDOM_CHAR_IN_AREA: { - CollectParameters(&m_nIp, 4); + CollectParameters(&m_nIp, 7); int ped_handle = -1; CVector pos = FindPlayerCoors(); - float x1 = *(float*)&ScriptParams[0]; - float y1 = *(float*)&ScriptParams[1]; - float x2 = *(float*)&ScriptParams[2]; - float y2 = *(float*)&ScriptParams[3]; + float x1 = GET_FLOAT_PARAM(0); + float y1 = GET_FLOAT_PARAM(1); + float x2 = GET_FLOAT_PARAM(2); + float y2 = GET_FLOAT_PARAM(3); int i = CPools::GetPedPool()->GetSize(); while (--i && ped_handle == -1){ CPed* pPed = CPools::GetPedPool()->GetSlot(i); @@ -1816,9 +1836,9 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) continue; if (pPed->bFadeOut) continue; -// if (pPed->GetModelIndex() == MI_SCUM_WOM || pPed->GetModelIndex() == MI_SCUM_MAN) -// continue; - if (!ThisIsAValidRandomPed(pPed->m_nPedType)) + if (pPed->m_nWaitState != WAITSTATE_FALSE) + continue; + if (!ThisIsAValidRandomPed(pPed->m_nPedType, GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7))) continue; if (pPed->bIsLeader || pPed->m_leader) continue; @@ -1836,11 +1856,10 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); } - ScriptParams[0] = ped_handle; + SET_INTEGER_PARAM(0, ped_handle); StoreParameters(&m_nIp, 1); return 0; } - */ case COMMAND_GET_RANDOM_CHAR_IN_ZONE: { char zone[KEY_LENGTH_IN_SCRIPT]; @@ -1869,7 +1888,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) continue; if (pPed->m_nWaitState != WAITSTATE_FALSE) continue; - if (!ThisIsAValidRandomPed(pPed->m_nPedType, ScriptParams[0], ScriptParams[1], ScriptParams[2])) + if (!ThisIsAValidRandomPed(pPed->m_nPedType, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2))) continue; if (pPed->bIsLeader || pPed->m_leader) continue; @@ -1891,14 +1910,14 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); } - ScriptParams[0] = ped_handle; + SET_INTEGER_PARAM(0, ped_handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_PLAYER_IN_TAXI: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->IsTaxi()); return 0; @@ -1906,7 +1925,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_PLAYER_SHOOTING: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bIsShooting); return 0; @@ -1914,7 +1933,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_CHAR_SHOOTING: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bIsShooting); return 0; @@ -1922,28 +1941,28 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_CREATE_MONEY_PICKUP: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_MONEY, PICKUP_MONEY, ScriptParams[3]); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_MONEY, PICKUP_MONEY, GET_INTEGER_PARAM(3))); // MI_MONEY -> gpModelIndices[...] StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CHAR_ACCURACY: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_wepAccuracy = ScriptParams[1]; + pPed->m_wepAccuracy = GET_INTEGER_PARAM(1) * 1.25f; return 0; } case COMMAND_GET_CAR_SPEED: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - *(float*)&ScriptParams[0] = pVehicle->GetSpeed().Magnitude() * GAME_SPEED_TO_METERS_PER_SECOND; + SET_FLOAT_PARAM(0, pVehicle->GetSpeed().Magnitude() * GAME_SPEED_TO_METERS_PER_SECOND); StoreParameters(&m_nIp, 1); return 0; } @@ -1951,15 +1970,17 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { char name[KEY_LENGTH_IN_SCRIPT]; strncpy(name, (const char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); + // unknown call FUN_29df68(name) on PS2 m_nIp += KEY_LENGTH_IN_SCRIPT; + CColStore::RemoveAllCollision(); CCutsceneMgr::LoadCutsceneData(name); return 0; } case COMMAND_CREATE_CUTSCENE_OBJECT: { CollectParameters(&m_nIp, 1); - CCutsceneObject* pCutObj = CCutsceneMgr::CreateCutsceneObject(ScriptParams[0]); - ScriptParams[0] = CPools::GetObjectPool()->GetIndex(pCutObj); + CCutsceneObject* pCutObj = CCutsceneMgr::CreateCutsceneObject(GET_INTEGER_PARAM(0)); + SET_INTEGER_PARAM(0, CPools::GetObjectPool()->GetIndex(pCutObj)); StoreParameters(&m_nIp, 1); return 0; } @@ -1967,7 +1988,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { CollectParameters(&m_nIp, 1); char name[KEY_LENGTH_IN_SCRIPT]; - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); strncpy(name, (const char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); m_nIp += KEY_LENGTH_IN_SCRIPT; @@ -1975,16 +1996,23 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) return 0; } case COMMAND_START_CUTSCENE: - CCutsceneMgr::ms_cutsceneLoadStatus = 1; + CCutsceneMgr::StartCutscene(); return 0; case COMMAND_GET_CUTSCENE_TIME: - ScriptParams[0] = CCutsceneMgr::GetCutsceneTimeInMilleseconds(); + SET_INTEGER_PARAM(0, CCutsceneMgr::GetCutsceneTimeInMilleseconds()); StoreParameters(&m_nIp, 1); return 0; case COMMAND_HAS_CUTSCENE_FINISHED: - UpdateCompareFlag(CCutsceneMgr::HasCutsceneFinished()); + { + bool bFinished = CCutsceneMgr::HasCutsceneFinished(); + if (bFinished) + printf("cutscene has now finished\n"); + UpdateCompareFlag(bFinished); return 0; + } case COMMAND_CLEAR_CUTSCENE: + // unknown call on PS2 FUN_29DFA0(); + printf("clear cutscene\n"); CCutsceneMgr::DeleteCutsceneData(); return 0; case COMMAND_RESTORE_CAMERA_JUMPCUT: @@ -1993,37 +2021,37 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_CREATE_COLLECTABLE1: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; - CPickups::GenerateNewOne(pos, MI_COLLECTABLE1, PICKUP_COLLECTABLE1, 0); + CPickups::GenerateNewOne(pos, MI_COLLECTABLE1, PICKUP_COLLECTABLE1, 0); // TODO: gpModelIndices return 0; } case COMMAND_SET_COLLECTABLE1_TOTAL: CollectParameters(&m_nIp, 1); - CWorld::Players[CWorld::PlayerInFocus].m_nTotalPackages = ScriptParams[0]; + CWorld::Players[CWorld::PlayerInFocus].m_nTotalPackages = GET_INTEGER_PARAM(0); return 0; /* case COMMAND_IS_PROJECTILE_IN_AREA: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } UpdateCompareFlag(CProjectileInfo::IsProjectileInRange(infX, supX, infY, supY, infZ, supZ, false)); if (CTheScripts::DbgFlag) @@ -2033,23 +2061,23 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_DESTROY_PROJECTILES_IN_AREA: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } UpdateCompareFlag(CProjectileInfo::IsProjectileInRange(infX, supX, infY, supY, infZ, supZ, true)); if (CTheScripts::DbgFlag) @@ -2059,7 +2087,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_DROP_MINE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GenerateNewOne(pos, MI_CARMINE, PICKUP_MINE_INACTIVE, 0); @@ -2068,7 +2096,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_DROP_NAUTICAL_MINE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GenerateNewOne(pos, MI_NAUTICALMINE, PICKUP_MINE_INACTIVE, 0); @@ -2078,9 +2106,9 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_CHAR_MODEL: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - UpdateCompareFlag(ScriptParams[1] == pPed->GetModelIndex()); + UpdateCompareFlag(GET_INTEGER_PARAM(1) == pPed->GetModelIndex()); return 0; } case COMMAND_LOAD_SPECIAL_MODEL: @@ -2090,7 +2118,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) strncpy(name, (const char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); for (int i = 0; i < KEY_LENGTH_IN_SCRIPT; i++) name[i] = tolower(name[i]); - CStreaming::RequestSpecialModel(ScriptParams[0], name, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + CStreaming::RequestSpecialModel(GET_INTEGER_PARAM(0), name, STREAMFLAGS_DEPENDENCY | (m_bIsMissionScript ? STREAMFLAGS_SCRIPTOWNED : STREAMFLAGS_AMBIENT_SCRIPT_OWNED)); m_nIp += KEY_LENGTH_IN_SCRIPT; return 0; } @@ -2098,102 +2126,98 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) //case COMMAND_SET_CUTSCENE_HEAD_ANIM: case COMMAND_SIN: CollectParameters(&m_nIp, 1); - *(float*)&ScriptParams[0] = Sin(DEGTORAD(*(float*)&ScriptParams[0])); + SET_FLOAT_PARAM(0, Sin(DEGTORAD(GET_FLOAT_PARAM(0)))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_COS: CollectParameters(&m_nIp, 1); - *(float*)&ScriptParams[0] = Cos(DEGTORAD(*(float*)&ScriptParams[0])); + SET_FLOAT_PARAM(0, Cos(DEGTORAD(GET_FLOAT_PARAM(0)))); StoreParameters(&m_nIp, 1); return 0; case COMMAND_GET_CAR_FORWARD_X: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); float forwardX = pVehicle->GetForward().x / pVehicle->GetForward().Magnitude2D(); - *(float*)&ScriptParams[0] = forwardX; + SET_FLOAT_PARAM(0, forwardX); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_CAR_FORWARD_Y: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); float forwardY = pVehicle->GetForward().y / pVehicle->GetForward().Magnitude2D(); - *(float*)&ScriptParams[0] = forwardY; + SET_FLOAT_PARAM(0, forwardY); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_CHANGE_GARAGE_TYPE: CollectParameters(&m_nIp, 2); - CGarages::ChangeGarageType(ScriptParams[0], ScriptParams[1], 0); + CGarages::ChangeGarageType(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), 0); return 0; - /* case COMMAND_ACTIVATE_CRUSHER_CRANE: { CollectParameters(&m_nIp, 10); - float infX = *(float*)&ScriptParams[2]; - float infY = *(float*)&ScriptParams[3]; - float supX = *(float*)&ScriptParams[4]; - float supY = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(2); + float infY = GET_FLOAT_PARAM(3); + float supX = GET_FLOAT_PARAM(4); + float supY = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[4]; - supX = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(4); + supX = GET_FLOAT_PARAM(2); } if (infY > supY) { - infY = *(float*)&ScriptParams[5]; - supY = *(float*)&ScriptParams[3]; + infY = GET_FLOAT_PARAM(5); + supY = GET_FLOAT_PARAM(3); } CCranes::ActivateCrane(infX, supX, infY, supY, - *(float*)&ScriptParams[6], *(float*)&ScriptParams[7], *(float*)&ScriptParams[8], - DEGTORAD(*(float*)&ScriptParams[9]), true, false, - *(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + GET_FLOAT_PARAM(6), GET_FLOAT_PARAM(7), GET_FLOAT_PARAM(8), + DEGTORAD(GET_FLOAT_PARAM(9)), true, false, + GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1)); return 0; } case COMMAND_PRINT_WITH_2_NUMBERS: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 4); - CMessages::AddMessageWithNumber(text, ScriptParams[2], ScriptParams[3], ScriptParams[0], ScriptParams[1], -1, -1, -1, -1); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1); return 0; } - */ case COMMAND_PRINT_WITH_2_NUMBERS_NOW: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 4); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[2], ScriptParams[3], ScriptParams[0], ScriptParams[1], -1, -1, -1, -1); + CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1); return 0; } - /* case COMMAND_PRINT_WITH_2_NUMBERS_SOON: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 4); - CMessages::AddMessageSoonWithNumber(text, ScriptParams[2], ScriptParams[3], ScriptParams[0], ScriptParams[1], -1, -1, -1, -1); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1); return 0; } - */ case COMMAND_PRINT_WITH_3_NUMBERS: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 5); - CMessages::AddMessageWithNumber(text, ScriptParams[3], ScriptParams[4], ScriptParams[0], ScriptParams[1], ScriptParams[2], -1, -1, -1); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), -1, -1, -1); return 0; } - /* case COMMAND_PRINT_WITH_3_NUMBERS_NOW: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 5); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[3], ScriptParams[4], ScriptParams[0], ScriptParams[1], ScriptParams[2], -1, -1, -1); + CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), -1, -1, -1); return 0; } + /* case COMMAND_PRINT_WITH_3_NUMBERS_SOON: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 5); - CMessages::AddMessageSoonWithNumber(text, ScriptParams[3], ScriptParams[4], ScriptParams[0], ScriptParams[1], ScriptParams[2], -1, -1, -1); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), -1, -1, -1); return 0; } */ @@ -2201,7 +2225,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 6); - CMessages::AddMessageWithNumber(text, ScriptParams[4], ScriptParams[5], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], -1, -1); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), -1, -1); return 0; } /* @@ -2209,35 +2233,35 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 6); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[4], ScriptParams[5], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], -1, -1); + CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), -1, -1); return 0; } case COMMAND_PRINT_WITH_4_NUMBERS_SOON: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 6); - CMessages::AddMessageSoonWithNumber(text, ScriptParams[4], ScriptParams[5], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], -1, -1); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), -1, -1); return 0; } case COMMAND_PRINT_WITH_5_NUMBERS: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 7); - CMessages::AddMessageWithNumber(text, ScriptParams[5], ScriptParams[6], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], -1); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), -1); return 0; } case COMMAND_PRINT_WITH_5_NUMBERS_NOW: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 7); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[5], ScriptParams[6], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], -1); + CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), -1); return 0; } case COMMAND_PRINT_WITH_5_NUMBERS_SOON: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 7); - CMessages::AddMessageSoonWithNumber(text, ScriptParams[5], ScriptParams[6], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], -1); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), -1); return 0; } */ @@ -2245,7 +2269,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CMessages::AddMessageWithNumber(text, ScriptParams[6], ScriptParams[7], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], ScriptParams[5]); + CMessages::AddMessageWithNumber(text, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5)); return 0; } /* @@ -2253,71 +2277,69 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CMessages::AddMessageJumpQWithNumber(text, ScriptParams[6], ScriptParams[7], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], ScriptParams[5]); + CMessages::AddMessageJumpQWithNumber(text, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5)); return 0; } case COMMAND_PRINT_WITH_6_NUMBERS_SOON: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CMessages::AddMessageSoonWithNumber(text, ScriptParams[6], ScriptParams[7], ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], ScriptParams[5]); + CMessages::AddMessageSoonWithNumber(text, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5)); return 0; } + */ case COMMAND_SET_CHAR_OBJ_FOLLOW_CHAR_IN_FORMATION: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FOLLOW_CHAR_IN_FORMATION, pTargetPed); - pPed->SetFormation((eFormation)ScriptParams[2]); + pPed->SetFormation((eFormation)GET_INTEGER_PARAM(2)); return 0; } - */ case COMMAND_PLAYER_MADE_PROGRESS: CollectParameters(&m_nIp, 1); - CStats::ProgressMade += ScriptParams[0]; + CStats::ProgressMade += GET_INTEGER_PARAM(0); return 0; case COMMAND_SET_PROGRESS_TOTAL: CollectParameters(&m_nIp, 1); - CStats::TotalProgressInGame = ScriptParams[0]; - if (CGame::germanGame) - CStats::TotalProgressInGame -= 2; + CStats::TotalProgressInGame = GET_INTEGER_PARAM(0); return 0; case COMMAND_REGISTER_JUMP_DISTANCE: CollectParameters(&m_nIp, 1); - CStats::MaximumJumpDistance = Max(CStats::MaximumJumpDistance, *(float*)&ScriptParams[0]); + CStats::MaximumJumpDistance = Max(CStats::MaximumJumpDistance, GET_FLOAT_PARAM(0)); return 0; case COMMAND_REGISTER_JUMP_HEIGHT: CollectParameters(&m_nIp, 1); - CStats::MaximumJumpHeight = Max(CStats::MaximumJumpHeight, *(float*)&ScriptParams[0]); + CStats::MaximumJumpHeight = Max(CStats::MaximumJumpHeight, GET_FLOAT_PARAM(0)); return 0; case COMMAND_REGISTER_JUMP_FLIPS: CollectParameters(&m_nIp, 1); - CStats::MaximumJumpFlips = Max(CStats::MaximumJumpFlips, ScriptParams[0]); + CStats::MaximumJumpFlips = Max(CStats::MaximumJumpFlips, GET_INTEGER_PARAM(0)); return 0; case COMMAND_REGISTER_JUMP_SPINS: CollectParameters(&m_nIp, 1); - CStats::MaximumJumpSpins = Max(CStats::MaximumJumpSpins, ScriptParams[0]); + CStats::MaximumJumpSpins = Max(CStats::MaximumJumpSpins, GET_INTEGER_PARAM(0)); return 0; case COMMAND_REGISTER_JUMP_STUNT: CollectParameters(&m_nIp, 1); - CStats::BestStuntJump = Max(CStats::BestStuntJump, ScriptParams[0]); + CStats::BestStuntJump = Max(CStats::BestStuntJump, GET_INTEGER_PARAM(0)); return 0; case COMMAND_REGISTER_UNIQUE_JUMP_FOUND: ++CStats::NumberOfUniqueJumpsFound; return 0; case COMMAND_SET_UNIQUE_JUMPS_TOTAL: CollectParameters(&m_nIp, 1); - CStats::TotalNumberOfUniqueJumps = ScriptParams[0]; + CStats::TotalNumberOfUniqueJumps = GET_INTEGER_PARAM(0); return 0; case COMMAND_REGISTER_PASSENGER_DROPPED_OFF_TAXI: ++CStats::PassengersDroppedOffWithTaxi; return 0; case COMMAND_REGISTER_MONEY_MADE_TAXI: CollectParameters(&m_nIp, 1); - CStats::MoneyMadeWithTaxi += ScriptParams[0]; + CStats::MoneyMadeWithTaxi += GET_INTEGER_PARAM(0); return 0; case COMMAND_REGISTER_MISSION_GIVEN: ++CStats::MissionsGiven; @@ -2337,9 +2359,9 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_SET_CHAR_RUNNING: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bIsRunning = (ScriptParams[1] != 0); + pPed->bIsRunning = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_REMOVE_ALL_SCRIPT_FIRES: @@ -2349,32 +2371,32 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_FIRST_CAR_COLOUR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->m_currentColour1 == ScriptParams[1]); + UpdateCompareFlag(pVehicle->m_currentColour1 == GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_SECOND_CAR_COLOUR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(pVehicle->m_currentColour2 == ScriptParams[1]); + UpdateCompareFlag(pVehicle->m_currentColour2 == GET_INTEGER_PARAM(1)); return 0; } */ case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); bool result = false; if (!pPed) printf("HAS_CHAR_BEEN_DAMAGED_BY_WEAPON - Character doesn't exist\n"); else { - if (ScriptParams[1] == WEAPONTYPE_ANYMELEE || ScriptParams[1] == WEAPONTYPE_ANYWEAPON) - result = CheckDamagedWeaponType(pPed->m_lastWepDam, ScriptParams[1]); + if (GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYMELEE || GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYWEAPON) + result = CheckDamagedWeaponType(pPed->m_lastWepDam, GET_INTEGER_PARAM(1)); else - result = ScriptParams[1] == pPed->m_lastWepDam; + result = GET_INTEGER_PARAM(1) == pPed->m_lastWepDam; } UpdateCompareFlag(result); return 0; @@ -2382,15 +2404,15 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_WEAPON: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); bool result = false; if (!pVehicle) printf("HAS_CAR_BEEN_DAMAGED_BY_WEAPON - Vehicle doesn't exist\n"); else { - if (ScriptParams[1] == WEAPONTYPE_ANYMELEE || ScriptParams[1] == WEAPONTYPE_ANYWEAPON) - result = CheckDamagedWeaponType(pVehicle->m_nLastWeaponDamage, ScriptParams[1]); + if (GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYMELEE || GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYWEAPON) + result = CheckDamagedWeaponType(pVehicle->m_nLastWeaponDamage, GET_INTEGER_PARAM(1)); else - result = ScriptParams[1] == pVehicle->m_nLastWeaponDamage; + result = GET_INTEGER_PARAM(1) == pVehicle->m_nLastWeaponDamage; } UpdateCompareFlag(result); return 0; @@ -2398,8 +2420,8 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) case COMMAND_IS_CHAR_IN_CHARS_GROUP: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pLeader = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pLeader = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pPed); script_assert(pLeader); UpdateCompareFlag(pPed->m_leader == pLeader && !pPed->bWaitForLeaderToComeCloser); diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index ac632b15..7ff785d5 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -41,19 +41,12 @@ #include "Bike.h" #include "Wanted.h" +// LCS: file done except TODOs + #ifdef FIX_BUGS static bool IsSlideObjectUsedWrongByScript(const CVector& posTarget, const CVector& slideBy) { - if (posTarget == CVector(-559.476f, 784.807f, 23.279f) && slideBy == CVector(0.0f, 10.0f, 0.0f)) - return true; // G-Spotlight bottom elevator, east side - if (posTarget == CVector(-559.476f, 779.64f, 23.279f) && slideBy == CVector(0.0f, 10.0f, 0.0f)) - return true; // G-Spotlight bottom elevator, west side - if (posTarget == CVector(-553.563f, 790.595f, 97.917f) && slideBy == CVector(0.0f, 10.0f, 0.0f)) - return true; // G-Spotlight top elevator, east side - if (posTarget == CVector(-553.563f, 785.427f, 97.917f) && slideBy == CVector(0.0f, 10.0f, 0.0f)) - return true; // G-Spotlight top elevator, west side - if (posTarget == CVector(-866.689f, -572.095f, 15.573f) && slideBy == CVector(0.0f, 0.0f, 4.5f)) - return true; // Cherry Popper garage door + // TODO? return false; } #endif @@ -65,8 +58,8 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_IS_CHAR_IN_PLAYERS_GROUP: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pLeader = CWorld::Players[ScriptParams[1]].m_pPed; + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pLeader = CWorld::Players[GET_INTEGER_PARAM(1)].m_pPed; script_assert(pPed); script_assert(pLeader); UpdateCompareFlag(pPed->m_leader == pLeader && !pPed->bWaitForLeaderToComeCloser); @@ -75,7 +68,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_EXPLODE_CHAR_HEAD: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->InflictDamage(nil, WEAPONTYPE_SNIPERRIFLE, 1000.0f, PEDPIECE_HEAD, 0); return 0; @@ -83,7 +76,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_EXPLODE_PLAYER_HEAD: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); pPed->InflictDamage(nil, WEAPONTYPE_SNIPERRIFLE, 1000.0f, PEDPIECE_HEAD, 0); return 0; @@ -91,9 +84,9 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_ANCHOR_BOAT: { CollectParameters(&m_nIp, 2); - CBoat* pBoat = (CBoat*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CBoat* pBoat = (CBoat*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pBoat && pBoat->m_vehType == VEHICLE_TYPE_BOAT); - pBoat->m_bIsAnchored = (ScriptParams[1] != 0); + pBoat->m_bIsAnchored = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_ZONE_GROUP: @@ -108,7 +101,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) return 0; } while (zone_id >= 0) { - CTheZones::SetPedGroup(zone_id, ScriptParams[0], ScriptParams[1]); + CTheZones::SetPedGroup(zone_id, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); zone_id = CTheZones::FindNextZoneByLabelAndReturnIndex(zone, ZONE_INFO); } return 0; @@ -116,18 +109,18 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_START_CAR_FIRE: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = gFireManager.StartScriptFire(pVehicle->GetPosition(), pVehicle, 0.8f, 1); + SET_INTEGER_PARAM(0, gFireManager.StartScriptFire(pVehicle->GetPosition(), pVehicle, 0.8f, 1)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_START_CHAR_FIRE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - ScriptParams[0] = gFireManager.StartScriptFire(pPed->GetPosition(), pPed, 0.8f, 1); + SET_INTEGER_PARAM(0, gFireManager.StartScriptFire(pPed->GetPosition(), pPed, 0.8f, 1)); StoreParameters(&m_nIp, 1); return 0; } @@ -136,10 +129,10 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 5); int handle = -1; uint32 i = CPools::GetVehiclePool()->GetSize(); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(3); while (i--) { CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); if (!pVehicle) @@ -148,7 +141,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) continue; if (!pVehicle->bUsesCollision) continue; - if (ScriptParams[4] != pVehicle->GetModelIndex() && ScriptParams[4] >= 0) + if (GET_INTEGER_PARAM(4) != pVehicle->GetModelIndex() && GET_INTEGER_PARAM(4) >= 0) continue; if (pVehicle->VehicleCreatedBy != RANDOM_VEHICLE) continue; @@ -161,7 +154,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(handle, CLEANUP_CAR); } - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } @@ -181,7 +174,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); if (!pVehicle) continue; - if (ScriptParams[0] != pVehicle->GetModelIndex() && ScriptParams[0] >= 0) + if (GET_INTEGER_PARAM(0) != pVehicle->GetModelIndex() && GET_INTEGER_PARAM(0) >= 0) continue; if (pVehicle->VehicleCreatedBy != RANDOM_VEHICLE) continue; @@ -194,7 +187,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(handle, CLEANUP_CAR); } - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } @@ -202,38 +195,38 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_HAS_RESPRAY_HAPPENED: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CGarages::HasResprayHappened(ScriptParams[0])); + UpdateCompareFlag(CGarages::HasResprayHappened(GET_INTEGER_PARAM(0))); return 0; } case COMMAND_SET_CAMERA_ZOOM: { CollectParameters(&m_nIp, 1); if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FOLLOWPED) - TheCamera.SetZoomValueFollowPedScript(ScriptParams[0]); + TheCamera.SetZoomValueFollowPedScript(GET_INTEGER_PARAM(0)); else if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_CAM_ON_A_STRING) - TheCamera.SetZoomValueCamStringScript(ScriptParams[0]); + TheCamera.SetZoomValueCamStringScript(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_CREATE_PICKUP_WITH_AMMO: { CollectParameters(&m_nIp, 6); - int16 model = ScriptParams[0]; + int16 model = GET_INTEGER_PARAM(0); if (model < 0) model = CTheScripts::UsedObjectArray[-model].index; - CVector pos = *(CVector*)&ScriptParams[3]; + CVector pos = GET_VECTOR_PARAM(3); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, model, ScriptParams[1], ScriptParams[2]); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, model, GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2))); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CAR_RAM_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CCarAI::TellCarToRamOtherCar(pVehicle, pTarget); return 0; @@ -242,9 +235,9 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_SET_CAR_BLOCK_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CCarAI::TellCarToBlockOtherCar(pVehicle, pTarget); return 0; @@ -252,115 +245,112 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_SET_CHAR_OBJ_CATCH_TRAIN: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_CATCH_TRAIN); return 0; } - */ #ifdef GTA_SCRIPT_COLLECTIVE case COMMAND_SET_COLL_OBJ_CATCH_TRAIN: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_CATCH_TRAIN); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_CATCH_TRAIN); return 0; #endif + */ case COMMAND_SET_PLAYER_NEVER_GETS_TIRED: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; - pPlayer->m_bInfiniteSprint = (ScriptParams[1] != 0); + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayer->m_bInfiniteSprint = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_PLAYER_FAST_RELOAD: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayer = &CWorld::Players[ScriptParams[0]]; - pPlayer->m_bFastReload = (ScriptParams[1] != 0); + CPlayerInfo* pPlayer = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayer->m_bFastReload = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_CHAR_BLEEDING: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bPedIsBleeding = (ScriptParams[1] != 0); + pPed->bPedIsBleeding = (GET_INTEGER_PARAM(1) != 0); return 0; } /* case COMMAND_SET_CAR_FUNNY_SUSPENSION: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); // no action return 0; - } + */ case COMMAND_SET_CAR_BIG_WHEELS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); CAutomobile* pCar = (CAutomobile*)pVehicle; - pCar->bBigWheels = (ScriptParams[1] != 0); + pCar->bBigWheels = (GET_INTEGER_PARAM(1) != 0); return 0; } - */ case COMMAND_SET_FREE_RESPRAYS: CollectParameters(&m_nIp, 1); - CGarages::SetFreeResprays(ScriptParams[0] != 0); + CGarages::SetFreeResprays(GET_INTEGER_PARAM(0) != 0); return 0; case COMMAND_SET_PLAYER_VISIBLE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->bIsVisible = (ScriptParams[1] != 0); + pPed->bIsVisible = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_SET_CHAR_VISIBLE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bIsVisible = (ScriptParams[1] != 0); + pPed->bIsVisible = (GET_INTEGER_PARAM(1) != 0); return 0; } - /* case COMMAND_SET_CAR_VISIBLE: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bIsVisible = (ScriptParams[1] != 0); + pVehicle->bIsVisible = (GET_INTEGER_PARAM(1) != 0); return 0; } - */ case COMMAND_IS_AREA_OCCUPIED: { CollectParameters(&m_nIp, 11); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } int16 total; CWorld::FindObjectsIntersectingCube(CVector(infX, infY, infZ), CVector(supX, supY, supZ), &total, 2, nil, - !!ScriptParams[6], !!ScriptParams[7], !!ScriptParams[8], !!ScriptParams[9], !!ScriptParams[10]); + !!GET_INTEGER_PARAM(6), !!GET_INTEGER_PARAM(7), !!GET_INTEGER_PARAM(8), !!GET_INTEGER_PARAM(9), !!GET_INTEGER_PARAM(10)); UpdateCompareFlag(total > 0); return 0; } @@ -376,15 +366,15 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) return 0; case COMMAND_SAVE_PLAYER_FROM_FIRES: CollectParameters(&m_nIp, 1); - gFireManager.ExtinguishPoint(CWorld::Players[ScriptParams[0]].GetPos(), 3.0f); + gFireManager.ExtinguishPoint(CWorld::Players[GET_INTEGER_PARAM(0)].GetPos(), 3.0f); return 0; */ case COMMAND_DISPLAY_TEXT: { CollectParameters(&m_nIp, 2); wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = *(float*)&ScriptParams[0]; - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = *(float*)&ScriptParams[1]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = GET_FLOAT_PARAM(0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = GET_FLOAT_PARAM(1); uint16 len = CMessages::GetWideStringLength(text); for (uint16 i = 0; i < len; i++) CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_Text[i] = text[i]; @@ -396,47 +386,47 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_SET_TEXT_SCALE: { CollectParameters(&m_nIp, 2); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fScaleX = *(float*)&ScriptParams[0]; - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fScaleY = *(float*)&ScriptParams[1]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fScaleX = GET_FLOAT_PARAM(0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fScaleY = GET_FLOAT_PARAM(1); return 0; } case COMMAND_SET_TEXT_COLOUR: { CollectParameters(&m_nIp, 4); CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_sColor = - CRGBA(ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3]); + CRGBA(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); return 0; } case COMMAND_SET_TEXT_JUSTIFY: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bJustify = (ScriptParams[0] != 0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bJustify = (GET_INTEGER_PARAM(0) != 0); return 0; } case COMMAND_SET_TEXT_CENTRE: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bCentered = (ScriptParams[0] != 0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bCentered = (GET_INTEGER_PARAM(0) != 0); return 0; } case COMMAND_SET_TEXT_WRAPX: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fWrapX = *(float*)&ScriptParams[0]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fWrapX = GET_FLOAT_PARAM(0); return 0; } /* case COMMAND_SET_TEXT_CENTRE_SIZE: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fCenterSize = *(float*)&ScriptParams[0]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fCenterSize = GET_FLOAT_PARAM(0); return 0; } */ case COMMAND_SET_TEXT_BACKGROUND: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bBackground = (ScriptParams[0] != 0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bBackground = (GET_INTEGER_PARAM(0) != 0); return 0; } /* @@ -444,53 +434,56 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) { CollectParameters(&m_nIp, 4); CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_sBackgroundColor = - CRGBA(ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3]); + CRGBA(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); return 0; } case COMMAND_SET_TEXT_BACKGROUND_ONLY_TEXT: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bBackgroundOnly = (ScriptParams[0] != 0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bBackgroundOnly = (GET_INTEGER_PARAM(0) != 0); return 0; } */ case COMMAND_SET_TEXT_PROPORTIONAL: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bTextProportional = (ScriptParams[0] != 0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bTextProportional = (GET_INTEGER_PARAM(0) != 0); return 0; } /* case COMMAND_SET_TEXT_FONT: { CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_nFont = ScriptParams[0]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_nFont = GET_INTEGER_PARAM(0); return 0; } + */ case COMMAND_INDUSTRIAL_PASSED: - CStats::IndustrialPassed = true; - DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN); + CollectParameters(&m_nIp, 1); + CStats::IndustrialPassed = GET_INTEGER_PARAM(0); return 0; case COMMAND_COMMERCIAL_PASSED: - CStats::CommercialPassed = true; - DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN); + CollectParameters(&m_nIp, 1); + CStats::CommercialPassed = GET_INTEGER_PARAM(0); return 0; case COMMAND_SUBURBAN_PASSED: - CStats::SuburbanPassed = true; + CollectParameters(&m_nIp, 1); + CStats::SuburbanPassed = GET_INTEGER_PARAM(0); return 0; - */ case COMMAND_ROTATE_OBJECT: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); + float fx = pObject->GetForward().x; + float fy = pObject->GetForward().y; float heading = LimitAngleOnCircle( RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y))); - float headingTarget = *(float*)&ScriptParams[1]; + float headingTarget = GET_FLOAT_PARAM(1); #ifdef FIX_BUGS - float rotateBy = *(float*)&ScriptParams[2] * CTimer::GetTimeStepFix(); + float rotateBy = GET_FLOAT_PARAM(2) * CTimer::GetTimeStepFix(); #else - float rotateBy = *(float*)&ScriptParams[2]; + float rotateBy = GET_FLOAT_PARAM(2); #endif if (headingTarget == heading) { // using direct comparasion here is fine UpdateCompareFlag(true); @@ -504,7 +497,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) else newHeading = rotateBy < angleCounterclockwise ? heading - rotateBy : headingTarget; bool obstacleInPath = false; - if (ScriptParams[3]) { + if (GET_INTEGER_PARAM(3)) { CVector pos = pObject->GetPosition(); tmp_matrix.SetRotateZ(DEGTORAD(newHeading)); tmp_matrix.GetPosition() += pos; @@ -536,11 +529,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_SLIDE_OBJECT: { CollectParameters(&m_nIp, 8); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CVector pos = pObject->GetPosition(); - CVector posTarget = *(CVector*)&ScriptParams[1]; - CVector slideBy = *(CVector*)&ScriptParams[4]; + CVector posTarget = GET_VECTOR_PARAM(1); + CVector slideBy = GET_VECTOR_PARAM(4); #ifdef FIX_BUGS // the check is a hack for original script, where some objects are moved // via SLIDE_OBJECT instead of SET_OBJECT_POSITION @@ -568,7 +561,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) else newPosition.z = posDiff.z < slideBy.z ? posTarget.z : pos.z - slideBy.z; bool obstacleInPath = false; - if (ScriptParams[7]) { + if (GET_INTEGER_PARAM(7)) { tmp_matrix = pObject->GetMatrix(); tmp_matrix.GetPosition() = newPosition; CColModel* pColModel = pObject->GetColModel(); @@ -597,7 +590,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_REMOVE_CHAR_ELEGANTLY: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); if (pPed && pPed->CharCreatedBy == MISSION_CHAR){ CWorld::RemoveReferencesToDeletedObject(pPed); if (pPed->bInVehicle && pPed->m_pMyVehicle) @@ -613,15 +606,15 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) } } if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.RemoveEntityFromList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_SET_CHAR_STAY_IN_SAME_PLACE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bKindaStayInSamePlace = (ScriptParams[1] != 0); + pPed->bKindaStayInSamePlace = (GET_INTEGER_PARAM(1) != 0); return 0; } /* @@ -632,7 +625,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_UNDRESS_CHAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); char name[KEY_LENGTH_IN_SCRIPT]; CTheScripts::ReadTextLabelFromScript(&m_nIp, name); @@ -645,7 +638,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_DRESS_CHAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->Dress(); return 0; @@ -655,37 +648,39 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 1); CTimer::Suspend(); CStreaming::DeleteAllRwObjects(); - CRecordDataForChase::StartChaseScene(*(float*)&ScriptParams[0]); + CRecordDataForChase::StartChaseScene(GET_FLOAT_PARAM(0)); CTimer::Resume(); return 0; case COMMAND_STOP_CHASE_SCENE: CRecordDataForChase::CleanUpChaseScene(); return 0; + */ case COMMAND_IS_EXPLOSION_IN_AREA: { CollectParameters(&m_nIp, 7); - float infX = *(float*)&ScriptParams[1]; - float infY = *(float*)&ScriptParams[2]; - float infZ = *(float*)&ScriptParams[3]; - float supX = *(float*)&ScriptParams[4]; - float supY = *(float*)&ScriptParams[5]; - float supZ = *(float*)&ScriptParams[6]; + float infX = GET_FLOAT_PARAM(1); + float infY = GET_FLOAT_PARAM(2); + float infZ = GET_FLOAT_PARAM(3); + float supX = GET_FLOAT_PARAM(4); + float supY = GET_FLOAT_PARAM(5); + float supZ = GET_FLOAT_PARAM(6); if (infX > supX) { - infX = *(float*)&ScriptParams[4]; - supX = *(float*)&ScriptParams[1]; + infX = GET_FLOAT_PARAM(4); + supX = GET_FLOAT_PARAM(1); } if (infY > supY) { - infY = *(float*)&ScriptParams[5]; - supY = *(float*)&ScriptParams[2]; + infY = GET_FLOAT_PARAM(5); + supY = GET_FLOAT_PARAM(2); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - UpdateCompareFlag(CExplosion::TestForExplosionInArea((eExplosionType)ScriptParams[0], + UpdateCompareFlag(CExplosion::TestForExplosionInArea((eExplosionType)GET_INTEGER_PARAM(0), infX, supX, infY, supY, infZ, supZ)); return 0; } + /* case COMMAND_IS_EXPLOSION_IN_ZONE: { CollectParameters(&m_nIp, 1); @@ -695,7 +690,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) if (zone_id != -1) m_nIp += KEY_LENGTH_IN_SCRIPT; CZone* pZone = CTheZones::GetNavigationZone(zone_id); - UpdateCompareFlag(CExplosion::TestForExplosionInArea((eExplosionType)ScriptParams[0], + UpdateCompareFlag(CExplosion::TestForExplosionInArea((eExplosionType)GET_INTEGER_PARAM(0), pZone->minx, pZone->maxx, pZone->miny, pZone->maxy, pZone->minz, pZone->maxz)); return 0; } @@ -708,17 +703,17 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_FIND_DROP_OFF_PLANE_COORDINATES: { CVector pos = CPlane::FindDropOffCesnaCoordinates(); - *(CVector*)&ScriptParams[0] = pos; + SET_VECTOR_PARAM(0, pos); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_CREATE_FLOATING_PACKAGE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0)); StoreParameters(&m_nIp, 1); return 0; } @@ -726,58 +721,58 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_PLACE_OBJECT_RELATIVE_TO_CAR: { CollectParameters(&m_nIp, 5); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); - CVector offset = *(CVector*)&ScriptParams[2]; + CVector offset = GET_VECTOR_PARAM(2); CPhysical::PlacePhysicalRelativeToOtherPhysical(pVehicle, pObject, offset); return 0; } case COMMAND_MAKE_OBJECT_TARGETTABLE: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CPlayerPed* pPlayerPed = CWorld::Players[CWorld::PlayerInFocus].m_pPed; script_assert(pPlayerPed); - pPlayerPed->MakeObjectTargettable(ScriptParams[0]); + pPlayerPed->MakeObjectTargettable(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_ADD_ARMOUR_TO_PLAYER: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPlayerPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPlayerPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPlayerPed); - pPlayerPed->m_fArmour = Clamp(pPlayerPed->m_fArmour + ScriptParams[1], 0.0f, CWorld::Players[ScriptParams[0]].m_nMaxArmour); + pPlayerPed->m_fArmour = Clamp(pPlayerPed->m_fArmour + GET_INTEGER_PARAM(1), 0.0f, CWorld::Players[GET_INTEGER_PARAM(0)].m_nMaxArmour); return 0; } case COMMAND_ADD_ARMOUR_TO_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_fArmour = Clamp(pPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f); + pPed->m_fArmour = Clamp(pPed->m_fArmour + GET_INTEGER_PARAM(1), 0.0f, 100.0f); return 0; } case COMMAND_OPEN_GARAGE: { CollectParameters(&m_nIp, 1); - CGarages::OpenGarage(ScriptParams[0]); + CGarages::OpenGarage(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_CLOSE_GARAGE: { CollectParameters(&m_nIp, 1); - CGarages::CloseGarage(ScriptParams[0]); + CGarages::CloseGarage(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_WARP_CHAR_FROM_CAR_TO_COORD: { CollectParameters(&m_nIp, 4); - CPed *pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed *pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); if (pPed->bInVehicle){ @@ -848,11 +843,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE: { CollectParameters(&m_nIp, 6); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float range = *(float*)&ScriptParams[3]; - int mi = ScriptParams[4] < 0 ? CTheScripts::UsedObjectArray[-ScriptParams[4]].index : ScriptParams[4]; + float range = GET_FLOAT_PARAM(3); + int mi = GET_INTEGER_PARAM(4) < 0 ? CTheScripts::UsedObjectArray[-GET_INTEGER_PARAM(4)].index : GET_INTEGER_PARAM(4); int16 total; CEntity* apEntities[16]; CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true); @@ -870,27 +865,25 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) } } if (pClosestEntity) { - pClosestEntity->bIsVisible = (ScriptParams[5] != 0); - CTheScripts::AddToInvisibilitySwapArray(pClosestEntity, ScriptParams[5] != 0); + pClosestEntity->bIsVisible = (GET_INTEGER_PARAM(5) != 0); + CTheScripts::AddToInvisibilitySwapArray(pClosestEntity, GET_INTEGER_PARAM(5) != 0); } return 0; } - /* case COMMAND_HAS_CHAR_SPOTTED_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); UpdateCompareFlag(pPed->OurPedCanSeeThisOne(pTarget)); return 0; } - */ case COMMAND_SET_CHAR_OBJ_HAIL_TAXI: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_HAIL_TAXI); @@ -899,110 +892,113 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_HAS_OBJECT_BEEN_DAMAGED: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); UpdateCompareFlag(pObject->bRenderDamaged || !pObject->bIsVisible); return 0; } - /* case COMMAND_START_KILL_FRENZY_HEADSHOT: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CDarkel::StartFrenzy((eWeaponType)ScriptParams[0], ScriptParams[1], ScriptParams[2], - ScriptParams[3], text, ScriptParams[4], ScriptParams[5], - ScriptParams[6], ScriptParams[7] != 0, true); + CDarkel::StartFrenzy((eWeaponType)GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), + GET_INTEGER_PARAM(3), text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), + GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7) != 0, true); return 0; } case COMMAND_ACTIVATE_MILITARY_CRANE: { CollectParameters(&m_nIp, 10); - float infX = *(float*)&ScriptParams[2]; - float infY = *(float*)&ScriptParams[3]; - float supX = *(float*)&ScriptParams[4]; - float supY = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(2); + float infY = GET_FLOAT_PARAM(3); + float supX = GET_FLOAT_PARAM(4); + float supY = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[4]; - supX = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(4); + supX = GET_FLOAT_PARAM(2); } if (infY > supY) { - infY = *(float*)&ScriptParams[5]; - supY = *(float*)&ScriptParams[3]; + infY = GET_FLOAT_PARAM(5); + supY = GET_FLOAT_PARAM(3); } CCranes::ActivateCrane(infX, supX, infY, supY, - *(float*)&ScriptParams[6], *(float*)&ScriptParams[7], *(float*)&ScriptParams[8], - DEGTORAD(*(float*)&ScriptParams[9]), false, true, - *(float*)&ScriptParams[0], *(float*)&ScriptParams[1]); + GET_FLOAT_PARAM(6), GET_FLOAT_PARAM(7), GET_FLOAT_PARAM(8), + DEGTORAD(GET_FLOAT_PARAM(9)), false, true, + GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1)); return 0; } - */ case COMMAND_WARP_PLAYER_INTO_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); pPed->SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle); pPed->WarpPedIntoCar(pVehicle); + pPed->RestorePreviousObjective(); return 0; } case COMMAND_WARP_CHAR_INTO_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); pPed->SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle); pPed->WarpPedIntoCar(pVehicle); + pPed->RestorePreviousObjective(); return 0; } - //case COMMAND_SWITCH_CAR_RADIO: + case COMMAND_SWITCH_CAR_RADIO: + CollectParameters(&m_nIp, 1); + DMAudio.ChangeMusicMode(GET_INTEGER_PARAM(0)); + return 0; //case COMMAND_SET_AUDIO_STREAM: case COMMAND_PRINT_WITH_2_NUMBERS_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 4); - CMessages::AddBigMessageWithNumber(text, ScriptParams[2], ScriptParams[3] - 1, ScriptParams[0], ScriptParams[1], -1, -1, -1, -1); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3) - 1, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1); return 0; } - /* case COMMAND_PRINT_WITH_3_NUMBERS_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 5); - CMessages::AddBigMessageWithNumber(text, ScriptParams[3], ScriptParams[4] - 1, ScriptParams[0], ScriptParams[1], ScriptParams[2], -1, -1, -1); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4) - 1, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), -1, -1, -1); return 0; } + /* case COMMAND_PRINT_WITH_4_NUMBERS_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 6); - CMessages::AddBigMessageWithNumber(text, ScriptParams[4], ScriptParams[5] - 1, ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], -1, -1); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5) - 1, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), -1, -1); return 0; } case COMMAND_PRINT_WITH_5_NUMBERS_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 7); - CMessages::AddBigMessageWithNumber(text, ScriptParams[5], ScriptParams[6] - 1, ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], -1); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6) - 1, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), -1); return 0; } case COMMAND_PRINT_WITH_6_NUMBERS_BIG: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 8); - CMessages::AddBigMessageWithNumber(text, ScriptParams[6], ScriptParams[7] - 1, ScriptParams[0], ScriptParams[1], ScriptParams[2], ScriptParams[3], ScriptParams[4], ScriptParams[5]); + CMessages::AddBigMessageWithNumber(text, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7) - 1, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5)); return 0; } */ case COMMAND_SET_CHAR_WAIT_STATE: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->SetWaitState((eWaitState)ScriptParams[1], ScriptParams[2] >= 0 ? &ScriptParams[2] : nil); + pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) >= 0 ? &GET_INTEGER_PARAM(2) : nil); return 0; } case COMMAND_SET_CAMERA_BEHIND_PLAYER: @@ -1011,14 +1007,14 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) /* case COMMAND_SET_MOTION_BLUR: CollectParameters(&m_nIp, 1); - TheCamera.SetMotionBlur(0, 0, 0, 0, ScriptParams[0]); + TheCamera.SetMotionBlur(0, 0, 0, 0, GET_INTEGER_PARAM(0)); return 0; case COMMAND_PRINT_STRING_IN_STRING: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* string = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddMessageWithString(text, ScriptParams[0], ScriptParams[1], string); + CMessages::AddMessageWithString(text, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), string); return 0; } */ @@ -1045,7 +1041,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) ped->bRespondsToThreats = false; ped->bAllowMedicsToReviveMe = false; ped->bIsPlayerFriend = false; - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += 1.0f; @@ -1057,16 +1053,16 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CWorld::Add(ped); ped->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pos); CPopulation::ms_nTotalMissionPeds++; - ScriptParams[0] = CPools::GetPedPool()->GetIndex(ped); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(ped)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_STEAL_ANY_CAR); @@ -1078,7 +1074,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 1); wchar* text1 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text1, text2, nil, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text1, text2, nil, nil, nil, nil); return 0; } case COMMAND_SET_2_PHONE_MESSAGES: @@ -1086,7 +1082,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) CollectParameters(&m_nIp, 1); wchar* text1 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text1, text2, nil, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text1, text2, nil, nil, nil, nil); return 0; } case COMMAND_SET_3_REPEATED_PHONE_MESSAGES: @@ -1095,7 +1091,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) wchar* text1 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text1, text2, text3, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text1, text2, text3, nil, nil, nil); return 0; } case COMMAND_SET_3_PHONE_MESSAGES: @@ -1104,7 +1100,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) wchar* text1 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text1, text2, text3, nil, nil, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text1, text2, text3, nil, nil, nil); return 0; } case COMMAND_SET_4_REPEATED_PHONE_MESSAGES: @@ -1114,7 +1110,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text1, text2, text3, text4, nil, nil); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text1, text2, text3, text4, nil, nil); return 0; } case COMMAND_SET_4_PHONE_MESSAGES: @@ -1124,30 +1120,30 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) wchar* text2 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text1, text2, text3, text4, nil, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text1, text2, text3, text4, nil, nil); return 0; } */ case COMMAND_IS_SNIPER_BULLET_IN_AREA: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } UpdateCompareFlag(CBulletInfo::TestForSniperBullet(infX, supX, infY, supY, infZ, supZ)); return 0; @@ -1156,33 +1152,33 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) case COMMAND_GIVE_PLAYER_DETONATOR: CGarages::GivePlayerDetonator(); return 0; - */ #ifdef GTA_SCRIPT_COLLECTIVE case COMMAND_SET_COLL_OBJ_STEAL_ANY_CAR: CollectParameters(&m_nIp, 1); - CTheScripts::SetObjectiveForAllPedsInCollective(ScriptParams[0], OBJECTIVE_STEAL_ANY_CAR); + CTheScripts::SetObjectiveForAllPedsInCollective(GET_INTEGER_PARAM(0), OBJECTIVE_STEAL_ANY_CAR); return 0; #endif + */ case COMMAND_SET_OBJECT_VELOCITY: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->SetMoveSpeed(*(CVector*)&ScriptParams[1] * METERS_PER_SECOND_TO_GAME_SPEED); + pObject->SetMoveSpeed(GET_VECTOR_PARAM(1) * METERS_PER_SECOND_TO_GAME_SPEED); return 0; } case COMMAND_SET_OBJECT_COLLISION: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->bUsesCollision = (ScriptParams[1] != 0); + pObject->bUsesCollision = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_IS_ICECREAM_JINGLE_ON: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); // Adding this check to correspond to command name. // All original game scripts always assume that the vehicle is actually Mr. Whoopee, @@ -1207,7 +1203,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) wchar* source = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* pstr = CTheScripts::GetTextByKeyFromScript(&m_nIp); CollectParameters(&m_nIp, 2); - CMessages::AddMessageJumpQWithString(source, ScriptParams[0], ScriptParams[1], pstr); + CMessages::AddMessageJumpQWithString(source, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), pstr); return 0; } //case COMMAND_PRINT_STRING_IN_STRING_SOON: @@ -1220,7 +1216,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text5 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text1, text2, text3, text4, text5, nil); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text1, text2, text3, text4, text5, nil); return 0; } case COMMAND_SET_5_PHONE_MESSAGES: @@ -1231,7 +1227,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) wchar* text3 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text5 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text1, text2, text3, text4, text5, nil); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text1, text2, text3, text4, text5, nil); return 0; } case COMMAND_SET_6_REPEATED_PHONE_MESSAGES: @@ -1243,7 +1239,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text5 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text6 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_Repeatedly(ScriptParams[0], text1, text2, text3, text4, text5, text6); + gPhoneInfo.SetPhoneMessage_Repeatedly(GET_INTEGER_PARAM(0), text1, text2, text3, text4, text5, text6); return 0; } case COMMAND_SET_6_PHONE_MESSAGES: @@ -1255,19 +1251,19 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) wchar* text4 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text5 = CTheScripts::GetTextByKeyFromScript(&m_nIp); wchar* text6 = CTheScripts::GetTextByKeyFromScript(&m_nIp); - gPhoneInfo.SetPhoneMessage_JustOnce(ScriptParams[0], text1, text2, text3, text4, text5, text6); + gPhoneInfo.SetPhoneMessage_JustOnce(GET_INTEGER_PARAM(0), text1, text2, text3, text4, text5, text6); return 0; } */ case COMMAND_IS_POINT_OBSCURED_BY_A_MISSION_ENTITY: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0] - *(float*)&ScriptParams[3]; - float supX = *(float*)&ScriptParams[0] + *(float*)&ScriptParams[3]; - float infY = *(float*)&ScriptParams[1] - *(float*)&ScriptParams[4]; - float supY = *(float*)&ScriptParams[1] + *(float*)&ScriptParams[4]; - float infZ = *(float*)&ScriptParams[2] - *(float*)&ScriptParams[5]; - float supZ = *(float*)&ScriptParams[2] + *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0) - GET_FLOAT_PARAM(3); + float supX = GET_FLOAT_PARAM(0) + GET_FLOAT_PARAM(3); + float infY = GET_FLOAT_PARAM(1) - GET_FLOAT_PARAM(4); + float supY = GET_FLOAT_PARAM(1) + GET_FLOAT_PARAM(4); + float infZ = GET_FLOAT_PARAM(2) - GET_FLOAT_PARAM(5); + float supZ = GET_FLOAT_PARAM(2) + GET_FLOAT_PARAM(5); if (infX > supX) { float tmp = infX; infX = supX; @@ -1304,19 +1300,20 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_ADD_TO_OBJECT_VELOCITY: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->AddToMoveSpeed(*(CVector*)&ScriptParams[1] * METERS_PER_SECOND_TO_GAME_SPEED); + pObject->AddToMoveSpeed(GET_VECTOR_PARAM(1) * METERS_PER_SECOND_TO_GAME_SPEED); return 0; } + /* case COMMAND_DRAW_SPRITE: { CollectParameters(&m_nIp, 9); CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_bIsUsed = true; - CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_nTextureId = ScriptParams[0] - 1; + CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_nTextureId = GET_INTEGER_PARAM(0) - 1; CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sRect = CRect( - *(float*)&ScriptParams[1], *(float*)&ScriptParams[2], *(float*)&ScriptParams[1] + *(float*)&ScriptParams[3], *(float*)&ScriptParams[2] + *(float*)&ScriptParams[4]); - CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sColor = CRGBA(ScriptParams[5], ScriptParams[6], ScriptParams[7], ScriptParams[8]); + GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(1) + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(2) + GET_FLOAT_PARAM(4)); + CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sColor = CRGBA(GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8)); CTheScripts::NumberOfIntroRectanglesThisFrame++; return 0; } @@ -1326,8 +1323,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_bIsUsed = true; CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_nTextureId = -1; CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sRect = CRect( - *(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[0] + *(float*)&ScriptParams[2], *(float*)&ScriptParams[1] + *(float*)&ScriptParams[3]); - CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sColor = CRGBA(ScriptParams[4], ScriptParams[5], ScriptParams[6], ScriptParams[7]); + GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(0) + GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(1) + GET_FLOAT_PARAM(3)); + CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_sColor = CRGBA(GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7)); CTheScripts::NumberOfIntroRectanglesThisFrame++; return 0; } @@ -1341,7 +1338,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) int slot = CTxdStore::FindTxdSlot("script"); CTxdStore::PushCurrentTxd(); CTxdStore::SetCurrentTxd(slot); - CTheScripts::ScriptSprites[ScriptParams[0] - 1].SetTexture(str); + CTheScripts::ScriptSprites[GET_INTEGER_PARAM(0) - 1].SetTexture(str); CTxdStore::PopCurrentTxd(); return 0; } @@ -1363,12 +1360,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CTheScripts::RemoveScriptTextureDictionary(); return 0; } + */ case COMMAND_SET_OBJECT_DYNAMIC: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { if (pObject->bIsStatic) { pObject->SetIsStatic(false); pObject->AddToMovingList(); @@ -1386,11 +1384,11 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_SET_CHAR_ANIM_SPEED: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CAnimBlendAssociation* pAssoc = RpAnimBlendClumpGetFirstAssociation(pPed->GetClump()); if (pAssoc) - pAssoc->speed = *(float*)&ScriptParams[1]; + pAssoc->speed = GET_FLOAT_PARAM(1); return 0; } */ @@ -1398,126 +1396,127 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) { CollectParameters(&m_nIp, 1); DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND); - DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE); + DMAudio.PlayFrontEndTrack(GET_INTEGER_PARAM(0) + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE); + //DMAudio.SaveAnnouncementsWhenMissionPassedPlayed(); // TODO! return 0; } case COMMAND_CLEAR_AREA: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CWorld::ClearExcitingStuffFromArea(pos, *(float*)&ScriptParams[3], ScriptParams[4]); + CWorld::ClearExcitingStuffFromArea(pos, GET_FLOAT_PARAM(3), GET_INTEGER_PARAM(4)); return 0; } case COMMAND_FREEZE_ONSCREEN_TIMER: CollectParameters(&m_nIp, 1); - CUserDisplay::OnscnTimer.m_bDisabled = ScriptParams[0] != 0; + CUserDisplay::OnscnTimer.m_bDisabled = GET_INTEGER_PARAM(0) != 0; return 0; case COMMAND_SWITCH_CAR_SIREN: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->m_bSirenOrAlarm = ScriptParams[1] != 0; + pVehicle->m_bSirenOrAlarm = GET_INTEGER_PARAM(1) != 0; return 0; } /* case COMMAND_SWITCH_PED_ROADS_ON_ANGLED: { CollectParameters(&m_nIp, 7); - ThePaths.SwitchRoadsInAngledArea(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2], - *(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5], *(float*)&ScriptParams[6], 0, 1); + ThePaths.SwitchRoadsInAngledArea(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), GET_FLOAT_PARAM(5), GET_FLOAT_PARAM(6), 0, 1); return 0; } + */ case COMMAND_SWITCH_PED_ROADS_OFF_ANGLED: CollectParameters(&m_nIp, 7); - ThePaths.SwitchRoadsInAngledArea(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2], - *(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5], *(float*)&ScriptParams[6], 0, 0); + ThePaths.SwitchRoadsInAngledArea(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), GET_FLOAT_PARAM(5), GET_FLOAT_PARAM(6), 0, 0); return 0; + /* case COMMAND_SWITCH_ROADS_ON_ANGLED: CollectParameters(&m_nIp, 7); - ThePaths.SwitchRoadsInAngledArea(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2], - *(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5], *(float*)&ScriptParams[6], 1, 1); + ThePaths.SwitchRoadsInAngledArea(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), GET_FLOAT_PARAM(5), GET_FLOAT_PARAM(6), 1, 1); return 0; case COMMAND_SWITCH_ROADS_OFF_ANGLED: CollectParameters(&m_nIp, 7); - ThePaths.SwitchRoadsInAngledArea(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2], - *(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5], *(float*)&ScriptParams[6], 1, 0); + ThePaths.SwitchRoadsInAngledArea(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), GET_FLOAT_PARAM(5), GET_FLOAT_PARAM(6), 1, 0); return 0; - */ + */ case COMMAND_SET_CAR_WATERTIGHT: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); if (pVehicle->IsBike()) { CBike* pBike = (CBike*)pVehicle; - pBike->bWaterTight = ScriptParams[1] != 0; + pBike->bWaterTight = GET_INTEGER_PARAM(1) != 0; } else if (pVehicle->IsCar()) { CAutomobile* pCar = (CAutomobile*)pVehicle; - pCar->bWaterTight = ScriptParams[1] != 0; + pCar->bWaterTight = GET_INTEGER_PARAM(1) != 0; } return 0; } case COMMAND_ADD_MOVING_PARTICLE_EFFECT: { CollectParameters(&m_nIp, 12); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float size = Max(0.0f, *(float*)&ScriptParams[7]); - eParticleObjectType type = (eParticleObjectType)ScriptParams[0]; + float size = Max(0.0f, GET_FLOAT_PARAM(7)); + eParticleObjectType type = (eParticleObjectType)GET_INTEGER_PARAM(0); RwRGBA color; - if (type == POBJECT_SMOKE_TRAIL){ + if (type == POBJECT_SMOKE_TRAIL){ // 17 in LCS -- assuming enum is the same color.alpha = -1; - color.red = ScriptParams[8]; - color.green = ScriptParams[9]; - color.blue = ScriptParams[10]; + color.red = GET_INTEGER_PARAM(8); + color.green = GET_INTEGER_PARAM(9); + color.blue = GET_INTEGER_PARAM(10); }else{ color.alpha = color.red = color.blue = color.green = 0; } - CVector target = *(CVector*)&ScriptParams[4]; - CParticleObject::AddObject(type, pos, target, size, ScriptParams[11], color, 1); + CVector target = GET_VECTOR_PARAM(4); + CParticleObject::AddObject(type, pos, target, size, GET_INTEGER_PARAM(11), color, 1); return 0; } case COMMAND_SET_CHAR_CANT_BE_DRAGGED_OUT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bDontDragMeOutCar = ScriptParams[1] != 0; + pPed->bDontDragMeOutCar = GET_INTEGER_PARAM(1) != 0; return 0; } case COMMAND_TURN_CAR_TO_FACE_COORD: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); const CVector& pos = pVehicle->GetPosition(); - float heading = CGeneral::GetATanOfXY(pos.x - *(float*)&ScriptParams[1], pos.y - *(float*)&ScriptParams[2]) + HALFPI; + float heading = CGeneral::GetATanOfXY(pos.x - GET_FLOAT_PARAM(1), pos.y - GET_FLOAT_PARAM(2)) + HALFPI; if (heading > TWOPI) heading -= TWOPI; pVehicle->SetHeading(heading); return 0; } - /* case COMMAND_IS_CRANE_LIFTING_CAR: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[2]); - UpdateCompareFlag(CCranes::IsThisCarPickedUp(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], pVehicle)); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(2)); + UpdateCompareFlag(CCranes::IsThisCarPickedUp(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), pVehicle)); return 0; } - */ case COMMAND_DRAW_SPHERE: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - C3dMarkers::PlaceMarkerSet((uintptr)this + m_nIp, MARKERTYPE_CYLINDER, pos, *(float*)&ScriptParams[3], + C3dMarkers::PlaceMarkerSet((uintptr)this + m_nIp, MARKERTYPE_CYLINDER, pos, GET_FLOAT_PARAM(3), SPHERE_MARKER_R, SPHERE_MARKER_G, SPHERE_MARKER_B, SPHERE_MARKER_A, SPHERE_MARKER_PULSE_PERIOD, SPHERE_MARKER_PULSE_FRACTION, 0); return 0; @@ -1525,15 +1524,15 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_SET_CAR_STATUS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->SetStatus(ScriptParams[1]); + pVehicle->SetStatus(GET_INTEGER_PARAM(1)); return 0; } case COMMAND_IS_CHAR_MALE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->m_nPedType != PEDTYPE_CIVFEMALE && pPed->m_nPedType != PEDTYPE_PROSTITUTE); return 0; @@ -1551,11 +1550,11 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_CHANGE_GARAGE_TYPE_WITH_CAR_MODEL: { CollectParameters(&m_nIp, 3); - CGarages::ChangeGarageType(ScriptParams[0], ScriptParams[1], ScriptParams[2]); + CGarages::ChangeGarageType(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_FIND_DRUG_PLANE_COORDINATES: - *(CVector*)&ScriptParams[0] = CPlane::FindDrugPlaneCoordinates(); + SET_VECTOR_PARAM(0, CPlane::FindDrugPlaneCoordinates()); StoreParameters(&m_nIp, 3); return 0; */ @@ -1570,33 +1569,33 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) return 0; case COMMAND_POLICE_RADIO_MESSAGE: CollectParameters(&m_nIp, 3); - DMAudio.PlaySuspectLastSeen(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2]); + DMAudio.PlaySuspectLastSeen(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2)); return 0; case COMMAND_SET_CAR_STRONG: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bTakeLessDamage = ScriptParams[1] != 0; + pVehicle->bTakeLessDamage = GET_INTEGER_PARAM(1) != 0; return 0; } case COMMAND_REMOVE_ROUTE: CollectParameters(&m_nIp, 1); - CRouteNode::RemoveRoute(ScriptParams[0]); + CRouteNode::RemoveRoute(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SWITCH_RUBBISH: CollectParameters(&m_nIp, 1); - CRubbish::SetVisibility(ScriptParams[0] != 0); + CRubbish::SetVisibility(GET_INTEGER_PARAM(0) != 0); return 0; case COMMAND_REMOVE_PARTICLE_EFFECTS_IN_AREA: { CollectParameters(&m_nIp, 6); - float x1 = *(float*)&ScriptParams[0]; - float y1 = *(float*)&ScriptParams[1]; - float z1 = *(float*)&ScriptParams[2]; - float x2 = *(float*)&ScriptParams[3]; - float y2 = *(float*)&ScriptParams[4]; - float z2 = *(float*)&ScriptParams[5]; + float x1 = GET_FLOAT_PARAM(0); + float y1 = GET_FLOAT_PARAM(1); + float z1 = GET_FLOAT_PARAM(2); + float x2 = GET_FLOAT_PARAM(3); + float y2 = GET_FLOAT_PARAM(4); + float z2 = GET_FLOAT_PARAM(5); CParticleObject* tmp = CParticleObject::pCloseListHead; while (tmp) { CParticleObject* next = tmp->m_pNext; @@ -1615,15 +1614,15 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) } case COMMAND_SWITCH_STREAMING: CollectParameters(&m_nIp, 1); - CStreaming::ms_disableStreaming = ScriptParams[0] == 0; + CStreaming::ms_disableStreaming = GET_INTEGER_PARAM(0) == 0; return 0; case COMMAND_IS_GARAGE_OPEN: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CGarages::IsGarageOpen(ScriptParams[0])); + UpdateCompareFlag(CGarages::IsGarageOpen(GET_INTEGER_PARAM(0))); return 0; case COMMAND_IS_GARAGE_CLOSED: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CGarages::IsGarageClosed(ScriptParams[0])); + UpdateCompareFlag(CGarages::IsGarageClosed(GET_INTEGER_PARAM(0))); return 0; /* case COMMAND_START_CATALINA_HELI: @@ -1642,45 +1641,17 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_SWAP_NEAREST_BUILDING_MODEL: { CollectParameters(&m_nIp, 6); - CVector pos = *(CVector*)&ScriptParams[0]; - if (pos.z <= MAP_Z_LOW_LIMIT) - pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float radius = *(float*)&ScriptParams[3]; - int mi1 = ScriptParams[4] >= 0 ? ScriptParams[4] : CTheScripts::UsedObjectArray[-ScriptParams[4]].index; - int mi2 = ScriptParams[5] >= 0 ? ScriptParams[5] : CTheScripts::UsedObjectArray[-ScriptParams[5]].index; - int16 total; - CEntity* apEntities[16]; - CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false); - if (total == 0) - CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities); - if (total == 0) - CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities); - CEntity* pClosestEntity = nil; - float min_dist = 2.0f * radius; - for (int i = 0; i < total; i++) { - float dist = (apEntities[i]->GetPosition() - pos).Magnitude(); - if (dist < min_dist) { - min_dist = dist; - pClosestEntity = apEntities[i]; - } - } - if (!pClosestEntity) { - printf("Failed to find building\n"); - return 0; - } - CBuilding* pReplacedBuilding = ((CBuilding*)pClosestEntity); - pReplacedBuilding->ReplaceWithNewModel(mi2); - CTheScripts::AddToBuildingSwapArray(pReplacedBuilding, mi1, mi2); + CTheScripts::SwapNearestBuildingModel(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(3), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5)); return 0; } case COMMAND_SWITCH_WORLD_PROCESSING: CollectParameters(&m_nIp, 1); - CWorld::bProcessCutsceneOnly = ScriptParams[0] == 0; + CWorld::bProcessCutsceneOnly = GET_INTEGER_PARAM(0) == 0; return 0; case COMMAND_REMOVE_ALL_PLAYER_WEAPONS: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); pPed->ClearWeapons(); return 0; @@ -1689,7 +1660,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_GRAB_CATALINA_HELI: { CHeli* pHeli = CHeli::FindPointerToCatalinasHeli(); - ScriptParams[0] = pHeli ? CPools::GetVehiclePool()->GetIndex(pHeli) : -1; + SET_INTEGER_PARAM(0, pHeli ? CPools::GetVehiclePool()->GetIndex(pHeli) : -1); StoreParameters(&m_nIp, 1); return 0; } @@ -1697,46 +1668,46 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_CLEAR_AREA_OF_CARS: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } CWorld::ClearCarsFromArea(infX, infY, infZ, supX, supY, supZ); return 0; } case COMMAND_SET_ROTATING_GARAGE_DOOR: CollectParameters(&m_nIp, 1); - CGarages::SetGarageDoorToRotate(ScriptParams[0]); + CGarages::SetGarageDoorToRotate(GET_INTEGER_PARAM(0)); return 0; case COMMAND_ADD_SPHERE: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float radius = *(float*)&ScriptParams[3]; + float radius = GET_FLOAT_PARAM(3); CTheScripts::GetActualScriptSphereIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CTheScripts::AddScriptSphere((uintptr)this + m_nIp, pos, radius); + SET_INTEGER_PARAM(0, CTheScripts::AddScriptSphere((uintptr)this + m_nIp, pos, radius)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_REMOVE_SPHERE: CollectParameters(&m_nIp, 1); - CTheScripts::RemoveScriptSphere(ScriptParams[0]); + CTheScripts::RemoveScriptSphere(GET_INTEGER_PARAM(0)); return 0; /* case COMMAND_CATALINA_HELI_FLY_AWAY: @@ -1746,9 +1717,9 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_SET_EVERYONE_IGNORE_PLAYER: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pPed->m_pWanted->m_bIgnoredByEveryone = true; CWorld::StopAllLawEnforcersInTheirTracks(); } @@ -1760,49 +1731,47 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_STORE_CAR_CHAR_IS_IN_NO_SAVE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVehicle* pVehicle = pPed->bInVehicle ? pPed->m_pMyVehicle : nil; - ScriptParams[0] = CPools::GetVehiclePool()->GetIndex(pVehicle); + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex(pVehicle)); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_STORE_CAR_PLAYER_IS_IN_NO_SAVE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); CVehicle* pVehicle = pPed->bInVehicle ? pPed->m_pMyVehicle : nil; - ScriptParams[0] = CPools::GetVehiclePool()->GetIndex(pVehicle); + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex(pVehicle)); StoreParameters(&m_nIp, 1); return 0; } /* case COMMAND_IS_PHONE_DISPLAYING_MESSAGE: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(gPhoneInfo.IsMessageBeingDisplayed(ScriptParams[0])); + UpdateCompareFlag(gPhoneInfo.IsMessageBeingDisplayed(GET_INTEGER_PARAM(0))); return 0; */ case COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_STRING: { - script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); - uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); + uint16 var = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; CollectParameters(&m_nIp, 1); wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); // ??? strncpy(onscreen_str, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); m_nIp += KEY_LENGTH_IN_SCRIPT; - CUserDisplay::OnscnTimer.AddClock(var, onscreen_str, ScriptParams[0] != 0); + CUserDisplay::OnscnTimer.AddClock(var, onscreen_str, GET_INTEGER_PARAM(0) != 0); return 0; } case COMMAND_DISPLAY_ONSCREEN_COUNTER_WITH_STRING: { - script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); - uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); + uint16 var = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; CollectParameters(&m_nIp, 1); wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); // ??? strncpy(onscreen_str, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); m_nIp += KEY_LENGTH_IN_SCRIPT; - CUserDisplay::OnscnTimer.AddCounter(var, ScriptParams[0], onscreen_str, 0); + CUserDisplay::OnscnTimer.AddCounter(var, GET_INTEGER_PARAM(0), onscreen_str, 0); return 0; } case COMMAND_CREATE_RANDOM_CAR_FOR_CAR_PARK: @@ -1821,6 +1790,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) continue; if (CModelInfo::IsCarModel(model) || CModelInfo::IsBikeModel(model)) { switch (model) { + // TODO(LCS): do it right + // apparently leeds didn't :lmao: case MI_LANDSTAL: case MI_LINERUN: case MI_RIO: @@ -1846,13 +1817,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case MI_ANGEL: case MI_COACH: case MI_RCBANDIT: - case MI_ROMERO: - case MI_PACKER: - case MI_SENTXS: + //case MI_ROMERO: + //case MI_PACKER: + //case MI_SENTXS: case MI_SQUALO: case MI_SEASPAR: case MI_PIZZABOY: - case MI_GANGBUR: + //case MI_GANGBUR: case MI_AIRTRAIN: case MI_DEADDODO: case MI_SPEEDER: @@ -1861,44 +1832,44 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case MI_FLATBED: case MI_YANKEE: case MI_CADDY: - case MI_ZEBRA: + //case MI_ZEBRA: case MI_TOPFUN: case MI_SKIMMER: case MI_RCBARON: case MI_RCRAIDER: case MI_SPARROW: case MI_PATRIOT: - case MI_LOVEFIST: + //case MI_LOVEFIST: case MI_COASTG: case MI_DINGHY: - case MI_HERMES: - case MI_SABRETUR: + //case MI_HERMES: + //case MI_SABRETUR: case MI_PHEONIX: - case MI_WALTON: + //case MI_WALTON: case MI_COMET: - case MI_DELUXO: - case MI_BURRITO: - case MI_SPAND: + //case MI_DELUXO: + //case MI_BURRITO: + //case MI_SPAND: case MI_MARQUIS: case MI_BAGGAGE: - case MI_KAUFMAN: + //case MI_KAUFMAN: case MI_MAVERICK: case MI_VCNMAV: - case MI_RANCHER: + //case MI_RANCHER: case MI_FBIRANCH: case MI_JETMAX: - case MI_HOTRING: + //case MI_HOTRING: case MI_SANDKING: - case MI_BLISTAC: + //case MI_BLISTAC: case MI_POLMAV: - case MI_BOXVILLE: - case MI_BENSON: - case MI_MESA: + //case MI_BOXVILLE: + //case MI_BENSON: + //case MI_MESA: case MI_RCGOBLIN: - case MI_HOTRINA: - case MI_HOTRINB: - case MI_BLOODRA: - case MI_BLOODRB: + //case MI_HOTRINA: + //case MI_HOTRINB: + //case MI_BLOODRA: + //case MI_BLOODRB: case MI_VICECHEE: model = -1; break; @@ -1913,23 +1884,23 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case MI_MOONBEAM: case MI_ESPERANT: case MI_TAXI: - case MI_WASHING: + //case MI_WASHING: case MI_BOBCAT: case MI_BANSHEE: - case MI_CABBIE: + //case MI_CABBIE: case MI_STALLION: case MI_RUMPO: - case MI_ADMIRAL: + //case MI_ADMIRAL: case MI_PCJ600: case MI_FAGGIO: case MI_FREEWAY: - case MI_GLENDALE: - case MI_OCEANIC: + //case MI_GLENDALE: + //case MI_OCEANIC: case MI_SANCHEZ: - case MI_SABRE: - case MI_REGINA: - case MI_VIRGO: - case MI_GREENWOO: + //case MI_SABRE: + //case MI_REGINA: + //case MI_VIRGO: + //case MI_GREENWOO: break; default: printf("CREATE_RANDOM_CAR_FOR_CAR_PARK - Unknown car model %d\n", CStreaming::ms_vehiclesLoaded[index]); @@ -1951,10 +1922,10 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) } else car = new CAutomobile(model, RANDOM_VEHICLE); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); car->SetPosition(pos); - car->SetHeading(DEGTORAD(*(float*)&ScriptParams[3])); + car->SetHeading(DEGTORAD(GET_FLOAT_PARAM(3))); CTheScripts::ClearSpaceForMissionEntity(pos, car); car->SetStatus(STATUS_ABANDONED); car->bIsLocked = false; @@ -1970,37 +1941,33 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CWorld::Add(car); return 0; } - /* case COMMAND_IS_COLLISION_IN_MEMORY: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CCollision::ms_collisionInMemory == ScriptParams[0]); + UpdateCompareFlag(CGame::currLevel == GET_INTEGER_PARAM(0)); return 0; - */ case COMMAND_SET_WANTED_MULTIPLIER: CollectParameters(&m_nIp, 1); - FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = *(float*)&ScriptParams[0]; + FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = GET_FLOAT_PARAM(0); return 0; case COMMAND_SET_CAMERA_IN_FRONT_OF_PLAYER: TheCamera.SetCameraDirectlyInFrontForFollowPed_CamOnAString(); return 0; - /* case COMMAND_IS_CAR_VISIBLY_DAMAGED: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(pVehicle->bIsDamaged); return 0; } - */ case COMMAND_DOES_OBJECT_EXIST: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CPools::GetObjectPool()->GetAt(ScriptParams[0])); + UpdateCompareFlag(CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0))); return 0; case COMMAND_LOAD_SCENE: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); #ifdef FIX_BUGS CTimer::Suspend(); #else @@ -2017,20 +1984,20 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_ADD_STUCK_CAR_CHECK: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CTheScripts::StuckCars.AddCarToCheck(ScriptParams[0], *(float*)&ScriptParams[1], ScriptParams[2]); + CTheScripts::StuckCars.AddCarToCheck(GET_INTEGER_PARAM(0), GET_FLOAT_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_REMOVE_STUCK_CAR_CHECK: { CollectParameters(&m_nIp, 1); - CTheScripts::StuckCars.RemoveCarFromCheck(ScriptParams[0]); + CTheScripts::StuckCars.RemoveCarFromCheck(GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_CAR_STUCK: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CTheScripts::StuckCars.HasCarBeenStuckForAWhile(ScriptParams[0])); + UpdateCompareFlag(CTheScripts::StuckCars.HasCarBeenStuckForAWhile(GET_INTEGER_PARAM(0))); return 0; case COMMAND_LOAD_MISSION_AUDIO: { @@ -2039,41 +2006,41 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) for (int i = 0; i < KEY_LENGTH_IN_SCRIPT; i++) str[i] = tolower(str[i]); m_nIp += KEY_LENGTH_IN_SCRIPT; - DMAudio.PreloadMissionAudio(ScriptParams[0] - 1, str); + DMAudio.PreloadMissionAudio(GET_INTEGER_PARAM(0) - 1, str); return 0; } case COMMAND_HAS_MISSION_AUDIO_LOADED: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(ScriptParams[0] - 1) == 1); + UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(GET_INTEGER_PARAM(0) - 1) == 1); return 0; } case COMMAND_PLAY_MISSION_AUDIO: CollectParameters(&m_nIp, 1); - DMAudio.PlayLoadedMissionAudio(ScriptParams[0] - 1); + DMAudio.PlayLoadedMissionAudio(GET_INTEGER_PARAM(0) - 1); return 0; case COMMAND_HAS_MISSION_AUDIO_FINISHED: { CollectParameters(&m_nIp, 1); - UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(ScriptParams[0] - 1)); + UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(GET_INTEGER_PARAM(0) - 1)); return 0; } case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); int node = ThePaths.FindNodeClosestToCoors(pos, 0, 999999.9f, true, true); - *(CVector*)&ScriptParams[0] = ThePaths.FindNodeCoorsForScript(node); - *(float*)&ScriptParams[3] = ThePaths.FindNodeOrientationForCarPlacement(node); + SET_VECTOR_PARAM(0, ThePaths.FindNodeCoorsForScript(node)); + SET_FLOAT_PARAM(3, ThePaths.FindNodeOrientationForCarPlacement(node)); StoreParameters(&m_nIp, 4); return 0; } case COMMAND_HAS_IMPORT_GARAGE_SLOT_BEEN_FILLED: { CollectParameters(&m_nIp, 2); - UpdateCompareFlag(CGarages::HasImportExportGarageCollectedThisCar(ScriptParams[0], ScriptParams[1] - 1)); + UpdateCompareFlag(CGarages::HasImportExportGarageCollectedThisCar(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) - 1)); return 0; } case COMMAND_CLEAR_THIS_PRINT: @@ -2091,8 +2058,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_SET_MISSION_AUDIO_POSITION: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[1]; - DMAudio.SetMissionAudioLocation(ScriptParams[0] - 1, pos.x, pos.y, pos.z); + CVector pos = GET_VECTOR_PARAM(1); + DMAudio.SetMissionAudioLocation(GET_INTEGER_PARAM(0) - 1, pos.x, pos.y, pos.z); return 0; } case COMMAND_ACTIVATE_SAVE_MENU: @@ -2108,15 +2075,15 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) return 0; case COMMAND_NO_SPECIAL_CAMERA_FOR_THIS_GARAGE: CollectParameters(&m_nIp, 1); - CGarages::SetLeaveCameraForThisGarage(ScriptParams[0]); + CGarages::SetLeaveCameraForThisGarage(GET_INTEGER_PARAM(0)); return 0; /* case COMMAND_ADD_BLIP_FOR_PICKUP_OLD: { CollectParameters(&m_nIp, 3); - CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(ScriptParams[0])].m_pObject; + CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(GET_INTEGER_PARAM(0))].m_pObject; CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CRadar::SetEntityBlip(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(pObject), ScriptParams[1], (eBlipDisplay)ScriptParams[2]); + SET_INTEGER_PARAM(0, CRadar::SetEntityBlip(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(pObject), GET_INTEGER_PARAM(1), (eBlipDisplay)GET_INTEGER_PARAM(2))); StoreParameters(&m_nIp, 1); return 0; } @@ -2124,11 +2091,11 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_ADD_BLIP_FOR_PICKUP: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(ScriptParams[0])].m_pObject; + CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(GET_INTEGER_PARAM(0))].m_pObject; CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int handle = CRadar::SetEntityBlip(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(pObject), 6, BLIP_DISPLAY_BOTH); CRadar::ChangeBlipScale(handle, 3); - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } @@ -2136,52 +2103,55 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) case COMMAND_ADD_SPRITE_BLIP_FOR_PICKUP: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(ScriptParams[0])].m_pObject; + CObject* pObject = CPickups::aPickUps[CPickups::GetActualPickupIndex(GET_INTEGER_PARAM(0))].m_pObject; CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int handle = CRadar::SetEntityBlip(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(pObject), 6, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(handle, ScriptParams[1]); - ScriptParams[0] = handle; + CRadar::SetBlipSprite(handle, GET_INTEGER_PARAM(1)); + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } */ case COMMAND_SET_PED_DENSITY_MULTIPLIER: CollectParameters(&m_nIp, 1); - CPopulation::PedDensityMultiplier = *(float*)&ScriptParams[0]; + CPopulation::PedDensityMultiplier = GET_FLOAT_PARAM(0); return 0; case COMMAND_FORCE_RANDOM_PED_TYPE: CollectParameters(&m_nIp, 1); - CPopulation::m_AllRandomPedsThisType = ScriptParams[0]; + CPopulation::m_AllRandomPedsThisType = GET_INTEGER_PARAM(0); return 0; /* case COMMAND_SET_TEXT_DRAW_BEFORE_FADE: CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bTextBeforeFade = ScriptParams[0] != 0; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bTextBeforeFade = GET_INTEGER_PARAM(0) != 0; return 0; */ case COMMAND_GET_COLLECTABLE1S_COLLECTED: - ScriptParams[0] = CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages; + SET_INTEGER_PARAM(0, CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages); StoreParameters(&m_nIp, 1); return 0; case COMMAND_SET_CHAR_OBJ_LEAVE_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pPed->m_pMyVehicle); return 0; } + /* case COMMAND_SET_SPRITES_DRAW_BEFORE_FADE: CollectParameters(&m_nIp, 1); - CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_bBeforeFade = ScriptParams[0] != 0; + CTheScripts::IntroRectangles[CTheScripts::NumberOfIntroRectanglesThisFrame].m_bBeforeFade = GET_INTEGER_PARAM(0) != 0; return 0; + */ case COMMAND_SET_TEXT_RIGHT_JUSTIFY: CollectParameters(&m_nIp, 1); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bRightJustify = ScriptParams[0] != 0; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_bRightJustify = GET_INTEGER_PARAM(0) != 0; return 0; case COMMAND_PRINT_HELP: { + /* maybe will be useful? TODO if (CCamera::m_bUseMouse3rdPerson && ( strcmp((char*)&CTheScripts::ScriptSpace[m_nIp], "HELP15") == 0 || strcmp((char*)&CTheScripts::ScriptSpace[m_nIp], "GUN_2A") == 0 || @@ -2190,16 +2160,18 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) m_nIp += KEY_LENGTH_IN_SCRIPT; return 0; } + */ wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); CHud::SetHelpMessage(text, false); return 0; } case COMMAND_CLEAR_HELP: + //CHud::gLastPrintForeverString = false; TODO CHud::SetHelpMessage(nil, false); return 0; case COMMAND_FLASH_HUD_OBJECT: CollectParameters(&m_nIp, 1); - CHud::m_ItemToFlash = ScriptParams[0]; + CHud::m_ItemToFlash = GET_INTEGER_PARAM(0); return 0; default: script_assert(0); @@ -2264,6 +2236,38 @@ void CTheScripts::RemoveScriptSphere(int32 index) ScriptSphereArray[index].m_Id = 0; } +void CTheScripts::SwapNearestBuildingModel(float x, float y, float z, float radius, int mi1, int mi2) +{ + CVector pos(x, y, z); + if (pos.z <= MAP_Z_LOW_LIMIT) + pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); + if (mi1 < 0) + mi1 = CTheScripts::UsedObjectArray[-mi1].index; + if (mi2 < 0) + mi2 = CTheScripts::UsedObjectArray[-mi2].index; + int16 total; + CEntity* apEntities[16]; + CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false); + if (total == 0) + CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities); + if (total == 0) + CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities); + CEntity* pClosestEntity = nil; + float min_dist = 2.0f * radius; + for (int i = 0; i < total; i++) { + float dist = (apEntities[i]->GetPosition() - pos).Magnitude(); + if (dist < min_dist) { + min_dist = dist; + pClosestEntity = apEntities[i]; + } + } + CBuilding* pReplacedBuilding = ((CBuilding*)pClosestEntity); + if (pReplacedBuilding) { + pReplacedBuilding->ReplaceWithNewModel(mi2); + AddToBuildingSwapArray(pReplacedBuilding, mi1, mi2); + } +} + void CTheScripts::AddToBuildingSwapArray(CBuilding* pBuilding, int32 old_model, int32 new_model) { int i = 0; diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index f65724c2..8544f604 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -18,32 +18,20 @@ #include "main.h" #include "SaveBuf.h" -void CRunningScript::UpdateCompareFlag(bool flag) +// LCS: file done except TODOs + +uint32 CRunningScript::CollectLocateParameters(uint32* pIp, bool b3D) { - if (m_bNotFlag) - flag = !flag; - if (m_nAndOrState == ANDOR_NONE) { - m_bCondResult = flag; - return; - } - if (m_nAndOrState >= ANDS_1 && m_nAndOrState <= ANDS_8) { - m_bCondResult &= flag; - if (m_nAndOrState == ANDS_1) { - m_nAndOrState = ANDOR_NONE; - return; - } - } - else if (m_nAndOrState >= ORS_1 && m_nAndOrState <= ORS_8) { - m_bCondResult |= flag; - if (m_nAndOrState == ORS_1) { - m_nAndOrState = ANDOR_NONE; - return; - } - } - else { - return; - } - m_nAndOrState--; + CollectParameters(pIp, 1); + uint32 id = (uintptr)this + (*pIp - 16); + uint32 ip = *pIp; + uint8 type = CTheScripts::Read1ByteFromScript(&ip); + if (type >= ARGUMENT_LOCAL) { + ip--; + id = (uint32)(uintptr)GetPointerToScriptVariable(&ip, 0); + } + CollectParameters(pIp, b3D ? 7 : 5, &(ScriptParams[1])); + return id; } void CRunningScript::LocatePlayerCommand(int32 command, uint32* pIp) @@ -63,8 +51,8 @@ void CRunningScript::LocatePlayerCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; + uint32 id = CollectLocateParameters(pIp, b3D); + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; switch (command) { case COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_2D: case COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_3D: @@ -80,37 +68,23 @@ void CRunningScript::LocatePlayerCommand(int32 command, uint32* pIp) default: break; } - X = *(float*)&ScriptParams[1]; - Y = *(float*)&ScriptParams[2]; + X = GET_FLOAT_PARAM(1); + Y = GET_FLOAT_PARAM(2); if (b3D) { - Z = *(float*)&ScriptParams[3]; - dX = *(float*)&ScriptParams[4]; - dY = *(float*)&ScriptParams[5]; - dZ = *(float*)&ScriptParams[6]; - debug = ScriptParams[7]; + Z = GET_FLOAT_PARAM(3); + dX = GET_FLOAT_PARAM(4); + dY = GET_FLOAT_PARAM(5); + dZ = GET_FLOAT_PARAM(6); + debug = GET_INTEGER_PARAM(7); } else { - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } + CVector pos = pPlayerInfo->GetPos(); if (!decided) { - CVector pos = pPlayerInfo->GetPos(); result = false; - bool in_area; - if (b3D) { - in_area = X - dX <= pos.x && - X + dX >= pos.x && - Y - dY <= pos.y && - Y + dY >= pos.y && - Z - dZ <= pos.z && - Z + dZ >= pos.z; - } else { - in_area = X - dX <= pos.x && - X + dX >= pos.x && - Y - dY <= pos.y && - Y + dY >= pos.y; - } - if (in_area) { + if (Abs(pos.x - X) < dX && Abs(pos.y - Y) < dY && (!b3D || Abs(pos.z - Z) < dZ)) { switch (command) { case COMMAND_LOCATE_PLAYER_ANY_MEANS_2D: case COMMAND_LOCATE_PLAYER_ANY_MEANS_3D: @@ -137,14 +111,16 @@ void CRunningScript::LocatePlayerCommand(int32 command, uint32* pIp) } } UpdateCompareFlag(result); - if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + if (debug && Abs(pos.x - X) < 80.0f && Abs(pos.y - Y) < 80.0f) + CTheScripts::HighlightImportantArea(id, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocatePlayerCharCommand(int32 command, uint32* pIp) @@ -162,8 +138,8 @@ void CRunningScript::LocatePlayerCharCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CVector pos = pPlayerInfo->GetPos(); if (pTarget->bInVehicle) { @@ -175,14 +151,14 @@ void CRunningScript::LocatePlayerCharCommand(int32 command, uint32* pIp) Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; } - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = false; bool in_area; @@ -226,12 +202,14 @@ void CRunningScript::LocatePlayerCharCommand(int32 command, uint32* pIp) #else CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dX, b3D ? Z : MAP_Z_LOW_LIMIT); #endif + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocatePlayerCarCommand(int32 command, uint32* pIp) @@ -249,21 +227,21 @@ void CRunningScript::LocatePlayerCarCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CVector pos = pPlayerInfo->GetPos(); X = pTarget->GetPosition().x; Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = false; bool in_area; @@ -303,12 +281,14 @@ void CRunningScript::LocatePlayerCarCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCharCommand(int32 command, uint32* pIp) @@ -328,8 +308,8 @@ void CRunningScript::LocateCharCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVector pos = pPed->InVehicle() ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition(); switch (command) { @@ -347,19 +327,19 @@ void CRunningScript::LocateCharCommand(int32 command, uint32* pIp) default: break; } - X = *(float*)&ScriptParams[1]; - Y = *(float*)&ScriptParams[2]; + X = GET_FLOAT_PARAM(1); + Y = GET_FLOAT_PARAM(2); if (b3D) { - Z = *(float*)&ScriptParams[3]; - dX = *(float*)&ScriptParams[4]; - dY = *(float*)&ScriptParams[5]; - dZ = *(float*)&ScriptParams[6]; - debug = ScriptParams[7]; + Z = GET_FLOAT_PARAM(3); + dX = GET_FLOAT_PARAM(4); + dY = GET_FLOAT_PARAM(5); + dZ = GET_FLOAT_PARAM(6); + debug = GET_INTEGER_PARAM(7); } else { - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (!decided) { result = false; @@ -406,13 +386,15 @@ void CRunningScript::LocateCharCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCharCharCommand(int32 command, uint32* pIp) @@ -430,9 +412,9 @@ void CRunningScript::LocateCharCharCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CVector pos = pPed->bInVehicle ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition(); if (pTarget->bInVehicle) { @@ -445,14 +427,14 @@ void CRunningScript::LocateCharCharCommand(int32 command, uint32* pIp) Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; } - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = false; bool in_area; @@ -496,12 +478,14 @@ void CRunningScript::LocateCharCharCommand(int32 command, uint32* pIp) #else CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dX, b3D ? Z : MAP_Z_LOW_LIMIT); #endif + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCharCarCommand(int32 command, uint32* pIp) @@ -519,22 +503,22 @@ void CRunningScript::LocateCharCarCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CVector pos = pPed->bInVehicle ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition(); X = pTarget->GetPosition().x; Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = false; bool in_area; @@ -574,12 +558,14 @@ void CRunningScript::LocateCharCarCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCharObjectCommand(int32 command, uint32* pIp) @@ -597,22 +583,22 @@ void CRunningScript::LocateCharObjectCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CObject* pTarget = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pTarget = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); CVector pos = pPed->bInVehicle ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition(); X = pTarget->GetPosition().x; Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = false; bool in_area; @@ -652,12 +638,14 @@ void CRunningScript::LocateCharObjectCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCarCommand(int32 command, uint32* pIp) @@ -673,8 +661,8 @@ void CRunningScript::LocateCarCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CVector pos = pVehicle->GetPosition(); switch (command) { @@ -688,19 +676,19 @@ void CRunningScript::LocateCarCommand(int32 command, uint32* pIp) default: break; } - X = *(float*)&ScriptParams[1]; - Y = *(float*)&ScriptParams[2]; + X = GET_FLOAT_PARAM(1); + Y = GET_FLOAT_PARAM(2); if (b3D) { - Z = *(float*)&ScriptParams[3]; - dX = *(float*)&ScriptParams[4]; - dY = *(float*)&ScriptParams[5]; - dZ = *(float*)&ScriptParams[6]; - debug = ScriptParams[7]; + Z = GET_FLOAT_PARAM(3); + dX = GET_FLOAT_PARAM(4); + dY = GET_FLOAT_PARAM(5); + dZ = GET_FLOAT_PARAM(6); + debug = GET_INTEGER_PARAM(7); } else { - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (!decided) { result = false; @@ -723,13 +711,15 @@ void CRunningScript::LocateCarCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateObjectCommand(int32 command, uint32* pIp) @@ -744,23 +734,23 @@ void CRunningScript::LocateObjectCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CVector pos = pObject->GetPosition(); - X = *(float*)&ScriptParams[1]; - Y = *(float*)&ScriptParams[2]; + X = GET_FLOAT_PARAM(1); + Y = GET_FLOAT_PARAM(2); if (b3D) { - Z = *(float*)&ScriptParams[3]; - dX = *(float*)&ScriptParams[4]; - dY = *(float*)&ScriptParams[5]; - dZ = *(float*)&ScriptParams[6]; - debug = ScriptParams[7]; + Z = GET_FLOAT_PARAM(3); + dX = GET_FLOAT_PARAM(4); + dY = GET_FLOAT_PARAM(5); + dZ = GET_FLOAT_PARAM(6); + debug = GET_INTEGER_PARAM(7); } else { - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } result = false; bool in_area; @@ -781,13 +771,15 @@ void CRunningScript::LocateObjectCommand(int32 command, uint32* pIp) result = in_area; UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateSniperBulletCommand(int32 command, uint32* pIp) @@ -803,30 +795,32 @@ void CRunningScript::LocateSniperBulletCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 7 : 5); - X = *(float*)&ScriptParams[0]; - Y = *(float*)&ScriptParams[1]; + X = GET_FLOAT_PARAM(0); + Y = GET_FLOAT_PARAM(1); if (b3D) { - Z = *(float*)&ScriptParams[2]; - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - dZ = *(float*)&ScriptParams[5]; - debug = ScriptParams[6]; + Z = GET_FLOAT_PARAM(2); + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + dZ = GET_FLOAT_PARAM(5); + debug = GET_INTEGER_PARAM(6); } else { - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; - debug = ScriptParams[4]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); + debug = GET_INTEGER_PARAM(4); } result = CBulletInfo::TestForSniperBullet(X - dX, X + dX, Y - dY, Y + dY, b3D ? Z - dZ : -1000.0f, b3D ? Z + dZ : 1000.0f); UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::PlayerInAreaCheckCommand(int32 command, uint32* pIp) @@ -846,8 +840,8 @@ void CRunningScript::PlayerInAreaCheckCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; + uint32 id = CollectLocateParameters(pIp, b3D); + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; switch (command) { case COMMAND_IS_PLAYER_STOPPED_IN_AREA_3D: case COMMAND_IS_PLAYER_STOPPED_IN_AREA_ON_FOOT_3D: @@ -863,23 +857,23 @@ void CRunningScript::PlayerInAreaCheckCommand(int32 command, uint32* pIp) default: break; } - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - debug = ScriptParams[7]; + debug = GET_INTEGER_PARAM(7); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (infX > supX) { float tmp = infX; @@ -938,12 +932,14 @@ void CRunningScript::PlayerInAreaCheckCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(infX, infY, infZ, supX, supY, supZ); else CTheScripts::DrawDebugSquare(infX, infY, supX, supY); } + */ } void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) @@ -964,7 +960,7 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 9 : 7); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; switch (command) { case COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_3D: case COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_ON_FOOT_3D: @@ -980,25 +976,25 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) default: break; } - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - side2length = *(float*)&ScriptParams[7]; - debug = ScriptParams[8]; + side2length = GET_FLOAT_PARAM(7); + debug = GET_INTEGER_PARAM(8); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - side2length = *(float*)&ScriptParams[5]; - debug = ScriptParams[6]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + side2length = GET_FLOAT_PARAM(5); + debug = GET_INTEGER_PARAM(6); } float initAngle = CGeneral::GetRadianAngleBetweenPoints(infX, infY, supX, supY) + HALFPI; while (initAngle < 0.0f) @@ -1061,6 +1057,7 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) if (debug) CTheScripts::HighlightImportantAngledArea((uintptr)this + m_nIp, infX, infY, supX, supY, rotatedSupX, rotatedSupY, rotatedInfX, rotatedInfY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugAngledCube(infX, infY, infZ, supX, supY, supZ, @@ -1069,6 +1066,7 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp) CTheScripts::DrawDebugAngledSquare(infX, infY, supX, supY, rotatedSupX, rotatedSupY, rotatedInfX, rotatedInfY); } + */ } void CRunningScript::CharInAreaCheckCommand(int32 command, uint32* pIp) @@ -1088,8 +1086,8 @@ void CRunningScript::CharInAreaCheckCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVector pos = pPed->InVehicle() ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition(); switch (command) { @@ -1107,23 +1105,23 @@ void CRunningScript::CharInAreaCheckCommand(int32 command, uint32* pIp) default: break; } - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - debug = ScriptParams[7]; + debug = GET_INTEGER_PARAM(7); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (infX > supX) { float tmp = infX; @@ -1180,13 +1178,15 @@ void CRunningScript::CharInAreaCheckCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(infX, infY, infZ, supX, supY, supZ); else CTheScripts::DrawDebugSquare(infX, infY, supX, supY); } + */ } void CRunningScript::CarInAreaCheckCommand(int32 command, uint32* pIp) @@ -1202,8 +1202,8 @@ void CRunningScript::CarInAreaCheckCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CVector pos = pVehicle->GetPosition(); switch (command) { @@ -1217,23 +1217,23 @@ void CRunningScript::CarInAreaCheckCommand(int32 command, uint32* pIp) default: break; } - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - debug = ScriptParams[7]; + debug = GET_INTEGER_PARAM(7); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (infX > supX) { float tmp = infX; @@ -1278,13 +1278,15 @@ void CRunningScript::CarInAreaCheckCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(infX, infY, infZ, supX, supY, supZ); else CTheScripts::DrawDebugSquare(infX, infY, supX, supY); } + */ } void CRunningScript::ObjectInAreaCheckCommand(int32 command, uint32* pIp) @@ -1299,27 +1301,27 @@ void CRunningScript::ObjectInAreaCheckCommand(int32 command, uint32* pIp) b3D = false; break; } - CollectParameters(pIp, b3D ? 8 : 6); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + uint32 id = CollectLocateParameters(pIp, b3D); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CVector pos = pObject->GetPosition(); - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - debug = ScriptParams[7]; + debug = GET_INTEGER_PARAM(7); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (infX > supX) { float tmp = infX; @@ -1360,13 +1362,15 @@ void CRunningScript::ObjectInAreaCheckCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(infX, infY, infZ, supX, supY, supZ); else CTheScripts::DrawDebugSquare(infX, infY, supX, supY); } + */ } void CRunningScript::DoDeatharrestCheck() @@ -1387,7 +1391,8 @@ void CRunningScript::DoDeatharrestCheck() script_assert(m_nStackPointer > 0); while (m_nStackPointer > 1) --m_nStackPointer; - m_nIp = m_anStack[--m_nStackPointer]; + ReturnFromGosubOrFunction(); + m_nLocalsPointer = 0; CMessages::ClearSmallMessagesOnly(); *(int32*)&CTheScripts::ScriptSpace[CTheScripts::OnAMissionFlag] = 0; m_bDeatharrestExecuted = true; @@ -1441,24 +1446,24 @@ void CRunningScript::LocateCollectiveCommand(int32 command, uint32* pIp) b3D = true; break; } - CollectParameters(pIp, b3D ? 8 : 6); - X = *(float*)&ScriptParams[1]; - Y = *(float*)&ScriptParams[2]; + uint32 id = CollectLocateParameters(pIp, b3D); + X = GET_FLOAT_PARAM(1); + Y = GET_FLOAT_PARAM(2); if (b3D) { - Z = *(float*)&ScriptParams[3]; - dX = *(float*)&ScriptParams[4]; - dY = *(float*)&ScriptParams[5]; - dZ = *(float*)&ScriptParams[6]; - debug = ScriptParams[7]; + Z = GET_FLOAT_PARAM(3); + dX = GET_FLOAT_PARAM(4); + dY = GET_FLOAT_PARAM(5); + dZ = GET_FLOAT_PARAM(6); + debug = GET_INTEGER_PARAM(7); } else { - dX = *(float*)&ScriptParams[3]; - dY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dX = GET_FLOAT_PARAM(3); + dY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } result = true; for (int i = 0; i < MAX_NUM_COLLECTIVES && result; i++) { - if (ScriptParams[0] != CTheScripts::CollectiveArray[i].colIndex) + if (GET_INTEGER_PARAM(0) != CTheScripts::CollectiveArray[i].colIndex) continue; CPed* pPed = CPools::GetPedPool()->GetAt(CTheScripts::CollectiveArray[i].pedIndex); if (!pPed) { @@ -1519,13 +1524,15 @@ void CRunningScript::LocateCollectiveCommand(int32 command, uint32* pIp) } UpdateCompareFlag(result); if (debug) - CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + CTheScripts::HighlightImportantArea(id, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCollectiveCharCommand(int32 command, uint32* pIp) @@ -1543,7 +1550,7 @@ void CRunningScript::LocateCollectiveCharCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); if (pTarget->bInVehicle) { X = pTarget->m_pMyVehicle->GetPosition().x; @@ -1555,18 +1562,18 @@ void CRunningScript::LocateCollectiveCharCommand(int32 command, uint32* pIp) Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; } - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = true; for (int i = 0; i < MAX_NUM_COLLECTIVES && result; i++) { - if (ScriptParams[0] != CTheScripts::CollectiveArray[i].colIndex) + if (GET_INTEGER_PARAM(0) != CTheScripts::CollectiveArray[i].colIndex) continue; CPed* pPed = CPools::GetPedPool()->GetAt(CTheScripts::CollectiveArray[i].pedIndex); if (!pPed) { @@ -1611,12 +1618,14 @@ void CRunningScript::LocateCollectiveCharCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCollectiveCarCommand(int32 command, uint32* pIp) @@ -1634,23 +1643,23 @@ void CRunningScript::LocateCollectiveCarCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pTarget = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); X = pTarget->GetPosition().x; Y = pTarget->GetPosition().y; Z = pTarget->GetPosition().z; - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = true; for (int i = 0; i < MAX_NUM_COLLECTIVES && result; i++) { - if (ScriptParams[0] != CTheScripts::CollectiveArray[i].colIndex) + if (GET_INTEGER_PARAM(0) != CTheScripts::CollectiveArray[i].colIndex) continue; CPed* pPed = CPools::GetPedPool()->GetAt(CTheScripts::CollectiveArray[i].pedIndex); if (!pPed) { @@ -1695,12 +1704,14 @@ void CRunningScript::LocateCollectiveCarCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::LocateCollectivePlayerCommand(int32 command, uint32* pIp) @@ -1718,22 +1729,22 @@ void CRunningScript::LocateCollectivePlayerCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 6 : 5); - CVector pos = CWorld::Players[ScriptParams[1]].GetPos(); + CVector pos = CWorld::Players[GET_INTEGER_PARAM(1)].GetPos(); X = pos.x; Y = pos.y; Z = pos.z; - dX = *(float*)&ScriptParams[2]; - dY = *(float*)&ScriptParams[3]; + dX = GET_FLOAT_PARAM(2); + dY = GET_FLOAT_PARAM(3); if (b3D) { - dZ = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + dZ = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } else { - debug = ScriptParams[4]; + debug = GET_INTEGER_PARAM(4); } result = true; for (int i = 0; i < MAX_NUM_COLLECTIVES && result; i++) { - if (ScriptParams[0] != CTheScripts::CollectiveArray[i].colIndex) + if (GET_INTEGER_PARAM(0) != CTheScripts::CollectiveArray[i].colIndex) continue; CPed* pPed = CPools::GetPedPool()->GetAt(CTheScripts::CollectiveArray[i].pedIndex); if (!pPed) { @@ -1778,12 +1789,14 @@ void CRunningScript::LocateCollectivePlayerCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, X - dX, Y - dY, X + dX, Y + dY, b3D ? Z : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(X - dX, Y - dY, Z - dZ, X + dX, Y + dY, Z + dZ); else CTheScripts::DrawDebugSquare(X - dX, Y - dY, X + dX, Y + dY); } + */ } void CRunningScript::CollectiveInAreaCheckCommand(int32 command, uint32* pIp) @@ -1804,23 +1817,23 @@ void CRunningScript::CollectiveInAreaCheckCommand(int32 command, uint32* pIp) break; } CollectParameters(pIp, b3D ? 8 : 6); - infX = *(float*)&ScriptParams[1]; - infY = *(float*)&ScriptParams[2]; + infX = GET_FLOAT_PARAM(1); + infY = GET_FLOAT_PARAM(2); if (b3D) { - infZ = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[6]; + infZ = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(6); if (infZ > supZ) { - infZ = *(float*)&ScriptParams[6]; - supZ = *(float*)&ScriptParams[3]; + infZ = GET_FLOAT_PARAM(6); + supZ = GET_FLOAT_PARAM(3); } - debug = ScriptParams[7]; + debug = GET_INTEGER_PARAM(7); } else { - supX = *(float*)&ScriptParams[3]; - supY = *(float*)&ScriptParams[4]; - debug = ScriptParams[5]; + supX = GET_FLOAT_PARAM(3); + supY = GET_FLOAT_PARAM(4); + debug = GET_INTEGER_PARAM(5); } if (infX > supX) { float tmp = infX; @@ -1834,7 +1847,7 @@ void CRunningScript::CollectiveInAreaCheckCommand(int32 command, uint32* pIp) } result = true; for (int i = 0; i < MAX_NUM_COLLECTIVES && result; i++) { - if (ScriptParams[0] != CTheScripts::CollectiveArray[i].colIndex) + if (GET_INTEGER_PARAM(0) != CTheScripts::CollectiveArray[i].colIndex) continue; CPed* pPed = CPools::GetPedPool()->GetAt(CTheScripts::CollectiveArray[i].pedIndex); if (!pPed) { @@ -1896,12 +1909,14 @@ void CRunningScript::CollectiveInAreaCheckCommand(int32 command, uint32* pIp) UpdateCompareFlag(result); if (debug) CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, infX, infY, supX, supY, b3D ? (infZ + supZ) / 2 : MAP_Z_LOW_LIMIT); + /* if (CTheScripts::DbgFlag) { if (b3D) CTheScripts::DrawDebugCube(infX, infY, infZ, supX, supY, supZ); else CTheScripts::DrawDebugSquare(infX, infY, supX, supY); } + */ } #endif @@ -1988,8 +2003,9 @@ void CTheScripts::PrintListSizes() debug("active: %d, idle: %d", active, idle); } -uint32 DbgLineColour = 0x0000FFFF; // r = 0, g = 0, b = 255, a = 255 +//uint32 DbgLineColour = 0x0000FFFF; // r = 0, g = 0, b = 255, a = 255 +/* void CTheScripts::DrawDebugSquare(float infX, float infY, float supX, float supY) { CColPoint tmpCP; @@ -2096,9 +2112,10 @@ void CTheScripts::RenderTheScriptDebugLines() NumScriptDebugLines = 0; RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)0); } +*/ -#define SCRIPT_DATA_SIZE sizeof(CTheScripts::OnAMissionFlag) +\ - 4 * sizeof(uint32) * MAX_NUM_BUILDING_SWAPS + 2 * sizeof(uint32) * MAX_NUM_INVISIBILITY_SETTINGS + 5 * sizeof(uint32) +#define SCRIPT_DATA_SIZE sizeof(CTheScripts::OnAMissionFlag) + sizeof(tCollectiveData) * MAX_NUM_COLLECTIVES +\ + 4 * sizeof(uint32) * MAX_NUM_BUILDING_SWAPS + 2 * sizeof(uint32) * MAX_NUM_INVISIBILITY_SETTINGS + 4 * sizeof(uint32) void CTheScripts::SaveAllScripts(uint8* buf, uint32* size) { @@ -2107,7 +2124,7 @@ INITSAVEBUF uint32 runningScripts = 0; for (CRunningScript* pScript = pActiveScripts; pScript; pScript = pScript->GetNext()) runningScripts++; - *size = CRunningScript::nSaveStructSize * runningScripts + varSpace + SCRIPT_DATA_SIZE + SAVE_HEADER_SIZE + 3 * sizeof(uint32); + *size = CRunningScript::nSaveStructSize * runningScripts + varSpace + SCRIPT_DATA_SIZE + SAVE_HEADER_SIZE + 5 * sizeof(uint32); WriteSaveHeader(buf, 'S', 'C', 'R', '\0', *size - SAVE_HEADER_SIZE); WriteSaveBuf(buf, varSpace); for (uint32 i = 0; i < varSpace; i++) @@ -2119,6 +2136,9 @@ INITSAVEBUF WriteSaveBuf(buf, script_data_size); WriteSaveBuf(buf, OnAMissionFlag); WriteSaveBuf(buf, LastMissionPassedTime); + for (uint32 i = 0; i < MAX_NUM_COLLECTIVES; i++) + WriteSaveBuf(buf, CollectiveArray[i]); + WriteSaveBuf(buf, NextFreeCollectiveIndex); for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) { CBuilding* pBuilding = BuildingSwapArray[i].m_pBuilding; uint32 type, handle; @@ -2180,24 +2200,37 @@ INITSAVEBUF VALIDATESAVEBUF(*size) } -void CTheScripts::LoadAllScripts(uint8* buf, uint32 size) +bool CTheScripts::LoadAllScripts(uint8* buf, uint32 size) { - Init(); INITSAVEBUF CheckSaveHeader(buf, 'S', 'C', 'R', '\0', size - SAVE_HEADER_SIZE); uint32 varSpace, type, handle; uint32 tmp; ReadSaveBuf(&varSpace, buf); - for (uint32 i = 0; i < varSpace; i++) - ReadSaveBuf(&ScriptSpace[i], buf); + if (*(int32*)&ScriptSpace[0] != *(int32*)&buf[0] || *(int32*)&ScriptSpace[4] != *(int32*)&buf[4]) { + printf("\n===================================================\nSave Game Mismatch!!!\n"); + return false; + } + for (uint32 i = 0; i < varSpace; i++) { // this is not exactly what function does + if (i < 8) + ReadSaveBuf(&ScriptSpace[i], buf); + else if (GetSaveVarIndex(i / 4 * 4) != -1) + ReadSaveBuf(&ScriptSpace[i], buf); + else + SkipSaveBuf(buf, 1); + } ReadSaveBuf(&tmp, buf); script_assert(tmp == SCRIPT_DATA_SIZE); ReadSaveBuf(&OnAMissionFlag, buf); ReadSaveBuf(&LastMissionPassedTime, buf); + for (uint32 i = 0; i < MAX_NUM_COLLECTIVES; i++) + ReadSaveBuf(&CollectiveArray[i], buf); + ReadSaveBuf(&NextFreeCollectiveIndex, buf); for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) { ReadSaveBuf(&type, buf); ReadSaveBuf(&handle, buf); + /* switch (type) { case 0: BuildingSwapArray[i].m_pBuilding = nil; @@ -2211,14 +2244,19 @@ INITSAVEBUF default: script_assert(false); } - ReadSaveBuf(&BuildingSwapArray[i].m_nNewModel, buf); - ReadSaveBuf(&BuildingSwapArray[i].m_nOldModel, buf); + */ + /*BuildingSwapArray[i].m_nNewModel = ReadSaveBuf<uint32>(buf);*/ + /*BuildingSwapArray[i].m_nOldModel = ReadSaveBuf<uint32>(buf);*/ + SkipSaveBuf(buf, 8); + /* if (BuildingSwapArray[i].m_pBuilding) BuildingSwapArray[i].m_pBuilding->ReplaceWithNewModel(BuildingSwapArray[i].m_nNewModel); + */ } for (uint32 i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) { ReadSaveBuf(&type, buf); ReadSaveBuf(&handle, buf); + /* switch (type) { case 0: InvisibilitySettingArray[i] = nil; @@ -2240,12 +2278,16 @@ INITSAVEBUF } if (InvisibilitySettingArray[i]) InvisibilitySettingArray[i]->bIsVisible = false; + */ } bool tmpBool; ReadSaveBuf(&tmpBool, buf); script_assert(tmpBool == bUsingAMultiScriptFile); - ReadSaveBuf(&bPlayerHasMetDebbieHarry, buf); - SkipSaveBuf(buf, 2); + ///*bPlayerHasMetDebbieHarry = */ReadSaveBuf<uint8>(buf); + //ReadSaveBuf<uint16>(buf); + + SkipSaveBuf(buf, 3); + ReadSaveBuf(&tmp, buf); script_assert(tmp == MainScriptSize); ReadSaveBuf(&tmp, buf); @@ -2258,7 +2300,8 @@ INITSAVEBUF uint32 runningScripts; ReadSaveBuf(&runningScripts, buf); for (uint32 i = 0; i < runningScripts; i++) - StartNewScript(0)->Load(buf); + CRunningScript().Load(buf); + return true; VALIDATESAVEBUF(size) } @@ -2268,6 +2311,7 @@ void CRunningScript::Save(uint8*& buf) { #ifdef COMPATIBLE_SAVES ZeroSaveBuf(buf, 8); + WriteSaveBuf<int32>(buf, m_nId); for (int i = 0; i < 8; i++) WriteSaveBuf(buf, m_abScriptName[i]); WriteSaveBuf(buf, m_nIp); @@ -2279,10 +2323,11 @@ void CRunningScript::Save(uint8*& buf) WriteSaveBuf(buf, m_nStackPointer); ZeroSaveBuf(buf, 2); #ifdef CHECK_STRUCT_SIZES - static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18"); + static_assert(NUM_LOCAL_VARS + 8 + NUM_TIMERS == 106, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 106"); #endif - for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) + for (int i = 0; i < NUM_LOCAL_VARS + 8 + NUM_TIMERS; i++) WriteSaveBuf(buf, m_anLocalVariables[i]); + WriteSaveBuf(buf, m_nLocalsPointer); WriteSaveBuf(buf, m_bIsActive); WriteSaveBuf(buf, m_bCondResult); WriteSaveBuf(buf, m_bIsMissionScript); @@ -2303,6 +2348,7 @@ void CRunningScript::Load(uint8*& buf) { #ifdef COMPATIBLE_SAVES SkipSaveBuf(buf, 8); + ReadSaveBuf(&m_nId, buf); for (int i = 0; i < 8; i++) ReadSaveBuf(&m_abScriptName[i], buf); ReadSaveBuf(&m_nIp, buf); @@ -2314,10 +2360,11 @@ void CRunningScript::Load(uint8*& buf) ReadSaveBuf(&m_nStackPointer, buf); SkipSaveBuf(buf, 2); #ifdef CHECK_STRUCT_SIZES - static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18"); + static_assert(NUM_LOCAL_VARS + 8 + NUM_TIMERS == 106, "Compatibility loss: NUM_LOCAL_VARS + 8 + NUM_TIMERS != 106"); #endif - for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++) + for (int i = 0; i < NUM_LOCAL_VARS + 8 + NUM_TIMERS; i++) ReadSaveBuf(&m_anLocalVariables[i], buf); + ReadSaveBuf(&m_nLocalsPointer, buf); ReadSaveBuf(&m_bIsActive, buf); ReadSaveBuf(&m_bCondResult, buf); ReadSaveBuf(&m_bIsMissionScript, buf); @@ -2696,8 +2743,14 @@ void CTheScripts::CleanUpThisPed(CPed* pPed) } else { if (pPed->m_pMyVehicle->m_vehType == VEHICLE_TYPE_CAR) { - pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pPed->m_pMyVehicle); - pPed->bWanderPathAfterExitingCar = true; + if ((pPed->m_fHealth < 1.0f && !pPed->IsPedHeadAbovePos(-0.3f)) || pPed->bBodyPartJustCameOff) { + pPed->SetObjective(OBJECTIVE_LEAVE_CAR_AND_DIE, pPed->m_pMyVehicle); + pPed->bWanderPathAfterExitingCar = false; + } + else { + pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pPed->m_pMyVehicle); + pPed->bWanderPathAfterExitingCar = true; + } } } } @@ -2710,6 +2763,7 @@ void CTheScripts::CleanUpThisPed(CPed* pPed) flees = true; } pPed->ClearObjective(); + pPed->SetWaitState(WAITSTATE_FALSE, nil); // third parameter is 0 TODO? pPed->bRespondsToThreats = true; pPed->bScriptObjectiveCompleted = false; pPed->bKindaStayInSamePlace = false; @@ -2753,6 +2807,9 @@ void CTheScripts::ReadObjectNamesFromScript() { int32 varSpace = GetSizeOfVariableSpace(); uint32 ip = varSpace + 8; + NumSaveVars = Read4BytesFromScript(&ip); + SavedVarIndices = (short*)&ScriptSpace[ip]; + ip += 2 * NumSaveVars; NumberOfUsedObjects = Read2BytesFromScript(&ip); ip += 2; for (uint16 i = 0; i < NumberOfUsedObjects; i++) { @@ -2764,30 +2821,16 @@ void CTheScripts::ReadObjectNamesFromScript() void CTheScripts::UpdateObjectIndices() { - char name[USED_OBJECT_NAME_LENGTH]; char error[112]; for (int i = 1; i < NumberOfUsedObjects; i++) { - bool found = false; - for (int j = 0; j < MODELINFOSIZE && !found; j++) { - CBaseModelInfo* pModel = CModelInfo::GetModelInfo(j); - if (!pModel) - continue; - strcpy(name, pModel->GetModelName()); -#ifdef FIX_BUGS - for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++) -#else - for (int k = 0; k < USED_OBJECT_NAME_LENGTH; k++) -#endif - name[k] = toupper(name[k]); - if (strcmp(name, UsedObjectArray[i].name) == 0) { - found = true; - UsedObjectArray[i].index = j; - } - } - if (!found) { + UsedObjectArray[i].index = -1; + CModelInfo::GetModelInfo(UsedObjectArray[i].name, &UsedObjectArray[i].index); +#ifndef FINAL + if (UsedObjectArray[i].index == -1) { sprintf(error, "CTheScripts::UpdateObjectIndices - Couldn't find %s", UsedObjectArray[i].name); debug("%s\n", error); } +#endif } } @@ -2797,7 +2840,8 @@ void CTheScripts::ReadMultiScriptFileOffsetsFromScript() uint32 ip = varSpace + 3; int32 objectSize = Read4BytesFromScript(&ip); ip = objectSize + 8; - MainScriptSize = Read4BytesFromScript(&ip); + NumTrueGlobals = Read2BytesFromScript(&ip); + MostGlobals = Read2BytesFromScript(&ip); LargestMissionScriptSize = Read4BytesFromScript(&ip); NumberOfMissionScripts = Read2BytesFromScript(&ip); NumberOfExclusiveMissionScripts = Read2BytesFromScript(&ip); diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp index 4d7121f2..0e1256fd 100644 --- a/src/control/Script6.cpp +++ b/src/control/Script6.cpp @@ -17,6 +17,7 @@ #ifdef MISSION_REPLAY #include "GenericGameStorage.h" #endif +#include "Hud.h" #include "Messages.h" #include "Pad.h" #include "Particle.h" @@ -38,6 +39,8 @@ #include "Pickups.h" #include "Fluff.h" +// LCS: file done except TODOs + #ifdef USE_DEBUG_SCRIPT_LOADER extern const char* scriptfile; #endif @@ -83,43 +86,40 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) { switch (command) { //case COMMAND_FLASH_RADAR_BLIP: - /* case COMMAND_IS_CHAR_IN_CONTROL: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(pPed->IsPedInControl()); return 0; } - */ case COMMAND_SET_GENERATE_CARS_AROUND_CAMERA: CollectParameters(&m_nIp, 1); - CCarCtrl::bCarsGeneratedAroundCamera = (ScriptParams[0] != 0); + CCarCtrl::bCarsGeneratedAroundCamera = (GET_INTEGER_PARAM(0) != 0); return 0; case COMMAND_CLEAR_SMALL_PRINTS: CMessages::ClearSmallMessagesOnly(); + //CHud::ClearSmallMessages(); // TODO return 0; - /* case COMMAND_HAS_MILITARY_CRANE_COLLECTED_ALL_CARS: UpdateCompareFlag(CCranes::HaveAllCarsBeenCollectedByMilitaryCrane()); return 0; - */ case COMMAND_SET_UPSIDEDOWN_CAR_NOT_DAMAGED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); CAutomobile* pCar = (CAutomobile*)pVehicle; - pCar->bNotDamagedUpsideDown = (ScriptParams[1] != 0); + pCar->bNotDamagedUpsideDown = (GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_CAN_PLAYER_START_MISSION: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPlayerPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPlayerPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPlayerPed); - UpdateCompareFlag(pPlayerPed->IsPedInControl() || pPlayerPed->m_nPedState == PED_DRIVING); + UpdateCompareFlag(pPlayerPed->CanStartMission() || pPlayerPed->m_nPedState == PED_DRIVING); return 0; } case COMMAND_MAKE_PLAYER_SAFE_FOR_CUTSCENE: @@ -129,46 +129,46 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) AllowMissionReplay = 0; SaveGameForPause(3); #endif - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - CPad::GetPad(ScriptParams[0])->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE); + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + CPad::GetPad(GET_INTEGER_PARAM(0))->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE); pPlayerInfo->MakePlayerSafe(true); CCutsceneMgr::StartCutsceneProcessing(); return 0; } case COMMAND_USE_TEXT_COMMANDS: CollectParameters(&m_nIp, 1); - CTheScripts::UseTextCommands = (ScriptParams[0] != 0) ? 2 : 1; + CTheScripts::UseTextCommands = (GET_INTEGER_PARAM(0) != 0) ? 2 : 1; return 0; case COMMAND_SET_THREAT_FOR_PED_TYPE: CollectParameters(&m_nIp, 2); - CPedType::AddThreat(ScriptParams[0], ScriptParams[1]); + CPedType::AddThreat(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_CLEAR_THREAT_FOR_PED_TYPE: CollectParameters(&m_nIp, 2); - CPedType::RemoveThreat(ScriptParams[0], ScriptParams[1]); + CPedType::RemoveThreat(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_GET_CAR_COLOURS: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = pVehicle->m_currentColour1; - ScriptParams[1] = pVehicle->m_currentColour2; + SET_INTEGER_PARAM(0, pVehicle->m_currentColour1); + SET_INTEGER_PARAM(1, pVehicle->m_currentColour2); StoreParameters(&m_nIp, 2); return 0; } case COMMAND_SET_ALL_CARS_CAN_BE_DAMAGED: CollectParameters(&m_nIp, 1); - CWorld::SetAllCarsCanBeDamaged(ScriptParams[0] != 0); - if (!ScriptParams[0]) + CWorld::SetAllCarsCanBeDamaged(GET_INTEGER_PARAM(0) != 0); + if (!GET_INTEGER_PARAM(0)) CWorld::ExtinguishAllCarFiresInArea(FindPlayerCoors(), 4000.0f); return 0; case COMMAND_SET_CAR_CAN_BE_DAMAGED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); - pVehicle->bCanBeDamaged = ScriptParams[1] != 0; - if (!ScriptParams[1]) + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + pVehicle->bCanBeDamaged = GET_INTEGER_PARAM(1) != 0; + if (!GET_INTEGER_PARAM(1)) pVehicle->ExtinguishCarFire(); return 0; } @@ -178,7 +178,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) { CollectParameters(&m_nIp, 1); CTimer::Stop(); - CGame::currLevel = (eLevelName)ScriptParams[0]; + CGame::currLevel = (eLevelName)GET_INTEGER_PARAM(0); ISLAND_LOADING_IS(LOW) { CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); @@ -194,18 +194,18 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) return 0; } case COMMAND_GET_BODY_CAST_HEALTH: - // ScriptParams[0] = CObject::nBodyCastHealth; + // SET_INTEGER_PARAM(0, CObject::nBodyCastHealth); // StoreParameters(&m_nIp, 1); return 0; */ case COMMAND_SET_CHARS_CHATTING: { CollectParameters(&m_nIp, 3); - CPed* pPed1 = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pPed2 = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pPed1 = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pPed2 = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pPed1 && pPed2); - pPed1->SetChat(pPed2, ScriptParams[2]); - pPed2->SetChat(pPed1, ScriptParams[2]); + pPed1->SetChat(pPed2, GET_INTEGER_PARAM(2)); + pPed2->SetChat(pPed1, GET_INTEGER_PARAM(2)); return 0; } //case COMMAND_MAKE_PLAYER_SAFE: @@ -213,9 +213,9 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_SET_CAR_STAYS_IN_CURRENT_LEVEL: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - if (ScriptParams[1]) + if (GET_INTEGER_PARAM(1)) pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); else pVehicle->m_nZoneLevel = LEVEL_GENERIC; @@ -224,9 +224,9 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) + if (GET_INTEGER_PARAM(1)) pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); else pPed->m_nZoneLevel = LEVEL_GENERIC; @@ -236,16 +236,16 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_SET_DRUNK_INPUT_DELAY: { CollectParameters(&m_nIp, 2); - assert(ScriptParams[1] < CPad::DRUNK_STEERING_BUFFER_SIZE); - CPad::GetPad(ScriptParams[0])->SetDrunkInputDelay(ScriptParams[1]); + assert(GET_INTEGER_PARAM(1) < CPad::DRUNK_STEERING_BUFFER_SIZE); + CPad::GetPad(GET_INTEGER_PARAM(0))->SetDrunkInputDelay(GET_INTEGER_PARAM(1)); return 0; } case COMMAND_SET_CHAR_MONEY: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_nPedMoney = ScriptParams[1]; + pPed->m_nPedMoney = GET_INTEGER_PARAM(1); pPed->bMoneyHasBeenGivenByScript = true; return 0; } @@ -253,10 +253,10 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_GET_OFFSET_FROM_OBJECT_IN_WORLD_COORDS: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - CVector result = Multiply3x3(pObject->GetMatrix(), *(CVector*)&ScriptParams[1]) + pObject->GetPosition(); - *(CVector*)&ScriptParams[0] = result; + CVector result = Multiply3x3(pObject->GetMatrix(), GET_VECTOR_PARAM(1)) + pObject->GetPosition(); + SET_VECTOR_PARAM(0, result); StoreParameters(&m_nIp, 3); return 0; } @@ -268,34 +268,34 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) return 0; case COMMAND_REGISTER_AMBULANCE_LEVEL: CollectParameters(&m_nIp, 1); - CStats::RegisterLevelAmbulanceMission(ScriptParams[0]); + CStats::RegisterLevelAmbulanceMission(GET_INTEGER_PARAM(0)); return 0; case COMMAND_REGISTER_FIRE_EXTINGUISHED: CStats::AnotherFireExtinguished(); return 0; case COMMAND_TURN_PHONE_ON: CollectParameters(&m_nIp, 1); - gPhoneInfo.m_aPhones[ScriptParams[0]].m_nState = PHONE_STATE_9; + gPhoneInfo.m_aPhones[GET_INTEGER_PARAM(0)].m_nState = PHONE_STATE_9; return 0; /* case COMMAND_REGISTER_LONGEST_DODO_FLIGHT: CollectParameters(&m_nIp, 1); - CStats::RegisterLongestFlightInDodo(ScriptParams[0]); + CStats::RegisterLongestFlightInDodo(GET_INTEGER_PARAM(0)); return 0; */ case COMMAND_GET_OFFSET_FROM_CAR_IN_WORLD_COORDS: { CollectParameters(&m_nIp, 4); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CVector result = Multiply3x3(pVehicle->GetMatrix(), *(CVector*)&ScriptParams[1]) + pVehicle->GetPosition(); - *(CVector*)&ScriptParams[0] = result; + CVector result = Multiply3x3(pVehicle->GetMatrix(), GET_VECTOR_PARAM(1)) + pVehicle->GetPosition(); + SET_VECTOR_PARAM(0, result); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_SET_TOTAL_NUMBER_OF_KILL_FRENZIES: CollectParameters(&m_nIp, 1); - CStats::SetTotalNumberKillFrenzies(ScriptParams[0]); + CStats::SetTotalNumberKillFrenzies(GET_INTEGER_PARAM(0)); return 0; case COMMAND_BLOW_UP_RC_BUGGY: CWorld::Players[CWorld::PlayerInFocus].BlowUpRCBuggy(true); @@ -303,7 +303,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) /* case COMMAND_REMOVE_CAR_FROM_CHASE: CollectParameters(&m_nIp, 1); - CRecordDataForChase::RemoveCarFromChase(ScriptParams[0]); + CRecordDataForChase::RemoveCarFromChase(GET_INTEGER_PARAM(0)); return 0; */ case COMMAND_IS_FRENCH_GAME: @@ -314,57 +314,57 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) return 0; case COMMAND_CLEAR_MISSION_AUDIO: CollectParameters(&m_nIp, 1); - DMAudio.ClearMissionAudio(ScriptParams[0] - 1); + DMAudio.ClearMissionAudio(GET_INTEGER_PARAM(0) - 1); return 0; /* case COMMAND_SET_FADE_IN_AFTER_NEXT_ARREST: CollectParameters(&m_nIp, 1); - CRestart::bFadeInAfterNextArrest = !!ScriptParams[0]; + CRestart::bFadeInAfterNextArrest = !!GET_INTEGER_PARAM(0); return 0; case COMMAND_SET_FADE_IN_AFTER_NEXT_DEATH: CollectParameters(&m_nIp, 1); - CRestart::bFadeInAfterNextDeath = !!ScriptParams[0]; + CRestart::bFadeInAfterNextDeath = !!GET_INTEGER_PARAM(0); return 0; case COMMAND_SET_GANG_PED_MODEL_PREFERENCE: CollectParameters(&m_nIp, 2); - CGangs::SetGangPedModelOverride(ScriptParams[0], ScriptParams[1]); + CGangs::SetGangPedModelOverride(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; */ case COMMAND_SET_CHAR_USE_PEDNODE_SEEK: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) + if (GET_INTEGER_PARAM(1)) pPed->m_pNextPathNode = nil; - pPed->bUsePedNodeSeek = !!ScriptParams[1]; + pPed->bUsePedNodeSeek = !!GET_INTEGER_PARAM(1); return 0; } /* case COMMAND_SWITCH_VEHICLE_WEAPONS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bGunSwitchedOff = !ScriptParams[1]; + pVehicle->bGunSwitchedOff = !GET_INTEGER_PARAM(1); return 0; } + */ case COMMAND_SET_GET_OUT_OF_JAIL_FREE: CollectParameters(&m_nIp, 2); - CWorld::Players[ScriptParams[0]].m_bGetOutOfJailFree = !!ScriptParams[1]; + CWorld::Players[GET_INTEGER_PARAM(0)].m_bGetOutOfJailFree = !!GET_INTEGER_PARAM(1); return 0; - */ case COMMAND_SET_FREE_HEALTH_CARE: CollectParameters(&m_nIp, 2); - CWorld::Players[ScriptParams[0]].m_bGetOutOfHospitalFree = !!ScriptParams[1]; + CWorld::Players[GET_INTEGER_PARAM(0)].m_bGetOutOfHospitalFree = !!GET_INTEGER_PARAM(1); return 0; /* case COMMAND_IS_CAR_DOOR_CLOSED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(!pVehicle->IsDoorMissing((eDoors)ScriptParams[1]) && pVehicle->IsDoorClosed((eDoors)ScriptParams[1])); + UpdateCompareFlag(!pVehicle->IsDoorMissing((eDoors)GET_INTEGER_PARAM(1)) && pVehicle->IsDoorClosed((eDoors)GET_INTEGER_PARAM(1))); return 0; } */ @@ -374,51 +374,49 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) { CollectParameters(&m_nIp, 1); - if (CTheScripts::NumberOfExclusiveMissionScripts > 0 && ScriptParams[0] <= UINT16_MAX - 2) - return 0; + if (CTheScripts::NumberOfExclusiveMissionScripts > 0) { + if (GET_INTEGER_PARAM(0) < UINT16_MAX - 1) + return 0; + SET_INTEGER_PARAM(0, UINT16_MAX - GET_INTEGER_PARAM(0)); + } #ifdef MISSION_REPLAY - missionRetryScriptIndex = ScriptParams[0]; + missionRetryScriptIndex = GET_INTEGER_PARAM(0); if (missionRetryScriptIndex == 19) CStats::LastMissionPassedName[0] = '\0'; #endif CTimer::Suspend(); - int offset = CTheScripts::MultiScriptArray[ScriptParams[0]]; -#ifdef USE_DEBUG_SCRIPT_LOADER - CFileMgr::ChangeDir("\\data\\"); - int handle = CFileMgr::OpenFile(scriptfile, "rb"); - CFileMgr::ChangeDir("\\"); -#else - CFileMgr::ChangeDir("\\"); - int handle = CFileMgr::OpenFile("data\\main.scm", "rb"); -#endif - CFileMgr::Seek(handle, offset, 0); - CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT); - CFileMgr::CloseFile(handle); - CRunningScript* pMissionScript = CTheScripts::StartNewScript(SIZE_MAIN_SCRIPT); + int offset = CTheScripts::MultiScriptArray[GET_INTEGER_PARAM(0)] + 8; + int size = CTheScripts::MultiScriptArray[GET_INTEGER_PARAM(0) + 1] - CTheScripts::MultiScriptArray[GET_INTEGER_PARAM(0)]; + if (size <= 0) + size = CTheScripts::LargestMissionScriptSize; + CFileMgr::Seek(gScriptsFile, offset, 0); + CFileMgr::Read(gScriptsFile, (const char*)&CTheScripts::ScriptSpace[CTheScripts::MainScriptSize], size); // TODO + CRunningScript* pMissionScript = CTheScripts::StartNewScript(CTheScripts::MainScriptSize); CTimer::Resume(); pMissionScript->m_bIsMissionScript = true; pMissionScript->m_bMissionFlag = true; CTheScripts::bAlreadyRunningAMissionScript = true; - CGameLogic::ClearShortCut(); + memset(&CTheScripts::ScriptSpace[CTheScripts::NumTrueGlobals * 4 + 8], 0, CTheScripts::MostGlobals * 4); + pMissionScript->Process(); return 0; } case COMMAND_SET_OBJECT_DRAW_LAST: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->bDrawLast = !!ScriptParams[1]; + pObject->bDrawLast = !!GET_INTEGER_PARAM(1); return 0; } case COMMAND_GET_AMMO_IN_PLAYER_WEAPON: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - ScriptParams[0] = 0; + SET_INTEGER_PARAM(0, 0); for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) { - if (pPed->GetWeapon(i).m_eWeaponType == (eWeaponType)ScriptParams[1]) - ScriptParams[0] = pPed->GetWeapon(i).m_nAmmoTotal; + if (pPed->GetWeapon(i).m_eWeaponType == (eWeaponType)GET_INTEGER_PARAM(1)) + SET_INTEGER_PARAM(0, pPed->GetWeapon(i).m_nAmmoTotal); } StoreParameters(&m_nIp, 1); return 0; @@ -427,83 +425,69 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_GET_AMMO_IN_CHAR_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CWeapon* pWeaponSlot = &pPed->m_weapons[ScriptParams[1]]; - if (pWeaponSlot->m_eWeaponType == (eWeaponType)ScriptParams[1]) - ScriptParams[0] = pWeaponSlot->m_nAmmoTotal; + CWeapon* pWeaponSlot = &pPed->m_weapons[GET_INTEGER_PARAM(1)]; + if (pWeaponSlot->m_eWeaponType == (eWeaponType)GET_INTEGER_PARAM(1)) + SET_INTEGER_PARAM(0, pWeaponSlot->m_nAmmoTotal); else - ScriptParams[0] = 0; + SET_INTEGER_PARAM(0, 0); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_REGISTER_KILL_FRENZY_PASSED: CStats::AnotherKillFrenzyPassed(); return 0; + */ case COMMAND_SET_CHAR_SAY: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - switch (ScriptParams[1]) { - case SCRIPT_SOUND_CHUNKY_RUN_SHOUT: - pPed->Say(SOUND_PED_FLEE_RUN); - break; - case SCRIPT_SOUND_SECURITY_GUARD_AWAY_SHOUT: - pPed->Say(SOUND_PED_FLEE_RUN); - break; - case SCRIPT_SOUND_SWAT_PED_SHOUT: - pPed->Say(SOUND_PED_PURSUIT_SWAT); - break; - case SCRIPT_SOUND_AMMUNATION_CHAT_1: - pPed->Say(SOUND_AMMUNATION_WELCOME_1); - break; - case SCRIPT_SOUND_AMMUNATION_CHAT_2: - pPed->Say(SOUND_AMMUNATION_WELCOME_2); - break; - case SCRIPT_SOUND_AMMUNATION_CHAT_3: - pPed->Say(SOUND_AMMUNATION_WELCOME_3); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + switch (GET_INTEGER_PARAM(1)) { + case 15: + pPed->Say(0x93); // TODO break; default: break; } return 0; } - */ case COMMAND_SET_NEAR_CLIP: CollectParameters(&m_nIp, 1); - TheCamera.SetNearClipScript(*(float*)&ScriptParams[0]); + TheCamera.SetNearClipScript(GET_FLOAT_PARAM(0)); return 0; case COMMAND_SET_RADIO_CHANNEL: CollectParameters(&m_nIp, 2); - DMAudio.SetRadioChannel(ScriptParams[0], ScriptParams[1]); + // if (base::cSingleton<cCustomSoundTrack>::Instance()->unk()) - TODO on PS2, but it's not on mobile + DMAudio.SetRadioChannel(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; /* case COMMAND_OVERRIDE_HOSPITAL_LEVEL: CollectParameters(&m_nIp, 1); - CRestart::OverrideHospitalLevel = ScriptParams[0]; + CRestart::OverrideHospitalLevel = GET_INTEGER_PARAM(0); return 0; case COMMAND_OVERRIDE_POLICE_STATION_LEVEL: CollectParameters(&m_nIp, 1); - CRestart::OverridePoliceStationLevel = ScriptParams[0]; + CRestart::OverridePoliceStationLevel = GET_INTEGER_PARAM(0); return 0; case COMMAND_FORCE_RAIN: CollectParameters(&m_nIp, 1); - CWeather::bScriptsForceRain = !!ScriptParams[0]; + CWeather::bScriptsForceRain = !!GET_INTEGER_PARAM(0); return 0; + */ case COMMAND_DOES_GARAGE_CONTAIN_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); - UpdateCompareFlag(CGarages::IsThisCarWithinGarageArea(ScriptParams[0], pVehicle)); + UpdateCompareFlag(CGarages::IsThisCarWithinGarageArea(GET_INTEGER_PARAM(0), pVehicle)); return 0; } - */ case COMMAND_SET_CAR_TRACTION: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); - float fTraction = *(float*)&ScriptParams[1]; + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + float fTraction = GET_FLOAT_PARAM(1); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR || pVehicle->m_vehType == VEHICLE_TYPE_BIKE); if (pVehicle->m_vehType == VEHICLE_TYPE_CAR) ((CAutomobile*)pVehicle)->m_fTraction = fTraction; @@ -521,33 +505,32 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_CONVERT_METRES_TO_FEET: { CollectParameters(&m_nIp, 1); - float fMeterValue = *(float*)&ScriptParams[0]; + float fMeterValue = GET_FLOAT_PARAM(0); float fFeetValue = fMeterValue / METERS_IN_FOOT; - *(float*)&ScriptParams[0] = fFeetValue; + SET_FLOAT_PARAM(0, fFeetValue); StoreParameters(&m_nIp, 1); return 0; } - /* case COMMAND_MARK_ROADS_BETWEEN_LEVELS: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.MarkRoadsBetweenLevelsInArea(infX, supX, infY, supY, infZ, supZ); return 0; @@ -555,123 +538,136 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_MARK_PED_ROADS_BETWEEN_LEVELS: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } ThePaths.PedMarkRoadsBetweenLevelsInArea(infX, supX, infY, supY, infZ, supZ); return 0; } - */ case COMMAND_SET_CAR_AVOID_LEVEL_TRANSITIONS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->AutoPilot.m_bStayInCurrentLevel = !!ScriptParams[1]; + pVehicle->AutoPilot.m_bStayInCurrentLevel = !!GET_INTEGER_PARAM(1); return 0; } /* case COMMAND_SET_CHAR_AVOID_LEVEL_TRANSITIONS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pPed); // not implemented return 0; } case COMMAND_IS_THREAT_FOR_PED_TYPE: CollectParameters(&m_nIp, 2); - UpdateCompareFlag(CPedType::IsThreat(ScriptParams[0], ScriptParams[1])); + UpdateCompareFlag(CPedType::IsThreat(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1))); return 0; */ case COMMAND_CLEAR_AREA_OF_CHARS: { CollectParameters(&m_nIp, 6); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float infZ = *(float*)&ScriptParams[2]; - float supX = *(float*)&ScriptParams[3]; - float supY = *(float*)&ScriptParams[4]; - float supZ = *(float*)&ScriptParams[5]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); if (infX > supX) { - infX = *(float*)&ScriptParams[3]; - supX = *(float*)&ScriptParams[0]; + infX = GET_FLOAT_PARAM(3); + supX = GET_FLOAT_PARAM(0); } if (infY > supY) { - infY = *(float*)&ScriptParams[4]; - supY = *(float*)&ScriptParams[1]; + infY = GET_FLOAT_PARAM(4); + supY = GET_FLOAT_PARAM(1); } if (infZ > supZ) { - infZ = *(float*)&ScriptParams[5]; - supZ = *(float*)&ScriptParams[2]; + infZ = GET_FLOAT_PARAM(5); + supZ = GET_FLOAT_PARAM(2); } CWorld::ClearPedsFromArea(infX, infY, infZ, supX, supY, supZ); return 0; } case COMMAND_SET_TOTAL_NUMBER_OF_MISSIONS: CollectParameters(&m_nIp, 1); - CStats::SetTotalNumberMissions(CGame::germanGame ? ScriptParams[0] - 2 : ScriptParams[0]); + CStats::SetTotalNumberMissions(CGame::germanGame ? GET_INTEGER_PARAM(0) - 2 : GET_INTEGER_PARAM(0)); return 0; case COMMAND_CONVERT_METRES_TO_FEET_INT: CollectParameters(&m_nIp, 1); - ScriptParams[0] *= FEET_IN_METER; + GET_INTEGER_PARAM(0) *= FEET_IN_METER; StoreParameters(&m_nIp, 1); return 0; case COMMAND_REGISTER_FASTEST_TIME: CollectParameters(&m_nIp, 2); - CStats::RegisterFastestTime(ScriptParams[0], ScriptParams[1]); + CStats::RegisterFastestTime(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_REGISTER_HIGHEST_SCORE: CollectParameters(&m_nIp, 2); - CStats::RegisterHighestScore(ScriptParams[0], ScriptParams[1]); + CStats::RegisterHighestScore(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; - //case COMMAND_WARP_CHAR_INTO_CAR_AS_PASSENGER: + case COMMAND_WARP_CHAR_INTO_CAR_AS_PASSENGER: + { + CollectParameters(&m_nIp, 3); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + script_assert(pPed); + script_assert(pVehicle); + if (GET_INTEGER_PARAM(2) < 0) + pPed->WarpPedIntoCarAsPassenger(pVehicle, GET_INTEGER_PARAM(2)); + else { + script_assert(GET_INTEGER_PARAM(2) >= 0 && GET_INTEGER_PARAM(2) < ARRAY_SIZE(pVehicle->pPassengers)); + pPed->WarpPedIntoCarAsPassenger(pVehicle, GET_INTEGER_PARAM(2)); + } + return 0; + + } case COMMAND_IS_CAR_PASSENGER_SEAT_FREE: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - UpdateCompareFlag(ScriptParams[1] < pVehicle->m_nNumMaxPassengers && pVehicle->pPassengers[ScriptParams[1]] == nil); + UpdateCompareFlag(GET_INTEGER_PARAM(1) < pVehicle->m_nNumMaxPassengers && pVehicle->pPassengers[GET_INTEGER_PARAM(1)] == nil); return 0; } - /* case COMMAND_GET_CHAR_IN_CAR_PASSENGER_SEAT: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - script_assert(ScriptParams[1] >= 0 && ScriptParams[1] < ARRAY_SIZE(pVehicle->pPassengers)); - CPed* pPassenger = pVehicle->pPassengers[ScriptParams[1]]; - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPassenger); + script_assert(GET_INTEGER_PARAM(1) >= 0 && GET_INTEGER_PARAM(1) < ARRAY_SIZE(pVehicle->pPassengers)); + CPed* pPassenger = pVehicle->pPassengers[GET_INTEGER_PARAM(1)]; + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPassenger)); StoreParameters(&m_nIp, 1); return 0; } - */ case COMMAND_SET_CHAR_IS_CHRIS_CRIMINAL: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bChrisCriminal = !!ScriptParams[1]; + pPed->bChrisCriminal = !!GET_INTEGER_PARAM(1); return 0; } case COMMAND_START_CREDITS: - CCredits::Start(); + CollectParameters(&m_nIp, 1); + CCredits::Start(); // TODO: CCredits::Start(GET_INTEGER_PARAM(0)) return 0; case COMMAND_STOP_CREDITS: CCredits::Stop(); @@ -681,16 +677,16 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) return 0; case COMMAND_CREATE_SINGLE_PARTICLE: CollectParameters(&m_nIp, 8); - CParticle::AddParticle((tParticleType)ScriptParams[0], *(CVector*)&ScriptParams[1], - *(CVector*)&ScriptParams[4], nil, *(float*)&ScriptParams[7], 0, 0, 0, 0); + CParticle::AddParticle((tParticleType)GET_INTEGER_PARAM(0), GET_VECTOR_PARAM(1), + GET_VECTOR_PARAM(4), nil, GET_FLOAT_PARAM(7), 0, 0, 0, 0); return 0; /* case COMMAND_SET_CHAR_IGNORE_LEVEL_TRANSITIONS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) + if (GET_INTEGER_PARAM(1)) pPed->m_nZoneLevel = LEVEL_IGNORE; else pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition()); @@ -699,11 +695,11 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_GET_CHASE_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CRecordDataForChase::TurnChaseCarIntoScriptCar(ScriptParams[0]); - ScriptParams[0] = CPools::GetVehiclePool()->GetIndex(pVehicle); + CVehicle* pVehicle = CRecordDataForChase::TurnChaseCarIntoScriptCar(GET_INTEGER_PARAM(0)); + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex(pVehicle)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CAR); return 0; } case COMMAND_START_BOAT_FOAM_ANIMATION: @@ -712,7 +708,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_UPDATE_BOAT_FOAM_ANIMATION: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CSpecialParticleStuff::UpdateBoatFoamAnimation(&pObject->GetMatrix()); return 0; @@ -720,12 +716,12 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) */ case COMMAND_SET_MUSIC_DOES_FADE: CollectParameters(&m_nIp, 1); - TheCamera.m_bIgnoreFadingStuffForMusic = (ScriptParams[0] == 0); + TheCamera.m_bIgnoreFadingStuffForMusic = (GET_INTEGER_PARAM(0) == 0); return 0; /* case COMMAND_SET_INTRO_IS_PLAYING: CollectParameters(&m_nIp, 1); - if (ScriptParams[0]) { + if (GET_INTEGER_PARAM(0)) { CGame::playingIntro = true; CStreaming::RemoveCurrentZonesModels(); } else { @@ -737,17 +733,16 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) CStreaming::LoadAllRequestedModels(false); } return 0; - */ case COMMAND_SET_PLAYER_HOOKER: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - if (ScriptParams[1] < 0) { + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + if (GET_INTEGER_PARAM(1) < 0) { pPlayerInfo->m_pHooker = nil; pPlayerInfo->m_nNextSexFrequencyUpdateTime = 0; pPlayerInfo->m_nNextSexMoneyUpdateTime = 0; } else { - CPed* pHooker = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pHooker = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pHooker); pPlayerInfo->m_pHooker = (CCivilianPed*)pHooker; pPlayerInfo->m_nSexFrequency = 1000; @@ -756,8 +751,10 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) } return 0; } + */ case COMMAND_PLAY_END_OF_GAME_TUNE: - DMAudio.PlayPreloadedCutSceneMusic(); + DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND); + DMAudio.PlayFrontEndTrack(STREAMED_SOUND_CUTSCENE_FINALE, 1); // third parameter is 1 return 0; case COMMAND_STOP_END_OF_GAME_TUNE: DMAudio.StopCutSceneMusic(); @@ -766,25 +763,25 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_GET_CAR_MODEL: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - ScriptParams[0] = pVehicle->GetModelIndex(); + SET_INTEGER_PARAM(0, pVehicle->GetModelIndex()); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_PLAYER_SITTING_IN_CAR: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); UpdateCompareFlag(pPed->GetPedState() == PED_DRIVING && pPed->m_objective != OBJECTIVE_LEAVE_CAR && pPed->m_pMyVehicle == pVehicle); return 0; } case COMMAND_IS_PLAYER_SITTING_IN_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->GetPedState() == PED_DRIVING && pPed->m_objective != OBJECTIVE_LEAVE_CAR); return 0; @@ -792,7 +789,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) /* case COMMAND_SET_SCRIPT_FIRE_AUDIO: CollectParameters(&m_nIp, 2); - gFireManager.SetScriptFireAudio(ScriptParams[0], !!ScriptParams[1]); + gFireManager.SetScriptFireAudio(GET_INTEGER_PARAM(0), !!GET_INTEGER_PARAM(1)); return 0; */ case COMMAND_ARE_ANY_CAR_CHEATS_ACTIVATED: @@ -801,16 +798,16 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_SET_CHAR_SUFFERS_CRITICAL_HITS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bNoCriticalHits = (ScriptParams[1] == 0); + pPed->bNoCriticalHits = (GET_INTEGER_PARAM(1) == 0); return 0; } /* case COMMAND_IS_PLAYER_LIFTING_A_PHONE: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->GetPedState() == PED_MAKE_CALL); return 0; @@ -819,9 +816,9 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_IS_CHAR_SITTING_IN_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); UpdateCompareFlag(pPed->GetPedState() == PED_DRIVING && pPed->m_objective != OBJECTIVE_LEAVE_CAR && pPed->m_pMyVehicle == pVehicle); return 0; @@ -829,7 +826,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_IS_CHAR_SITTING_IN_ANY_CAR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->GetPedState() == PED_DRIVING && pPed->m_objective != OBJECTIVE_LEAVE_CAR); return 0; @@ -837,7 +834,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_IS_PLAYER_ON_FOOT: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(!pPed->bInVehicle && pPed->m_objective != OBJECTIVE_ENTER_CAR_AS_PASSENGER && pPed->m_objective != OBJECTIVE_ENTER_CAR_AS_DRIVER); @@ -846,7 +843,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_IS_CHAR_ON_FOOT: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(!pPed->bInVehicle && pPed->m_objective != OBJECTIVE_ENTER_CAR_AS_PASSENGER && pPed->m_objective != OBJECTIVE_ENTER_CAR_AS_DRIVER); @@ -866,7 +863,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_LOAD_COLLISION_WITH_SCREEN: CollectParameters(&m_nIp, 1); CTimer::Stop(); - CGame::currLevel = (eLevelName)ScriptParams[0]; + CGame::currLevel = (eLevelName)GET_INTEGER_PARAM(0); if (CGame::currLevel != CCollision::ms_collisionInMemory) { ISLAND_LOADING_IS(LOW) { @@ -910,9 +907,9 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_SET_CAR_IGNORE_LEVEL_TRANSITIONS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - if (ScriptParams[1]) + if (GET_INTEGER_PARAM(1)) pVehicle->m_nZoneLevel = LEVEL_IGNORE; else pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); @@ -921,61 +918,55 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_MAKE_CRAIGS_CAR_A_BIT_STRONGER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR); CAutomobile* pCar = (CAutomobile*)pVehicle; - pCar->bMoreResistantToDamage = ScriptParams[1]; + pCar->bMoreResistantToDamage = GET_INTEGER_PARAM(1); return 0; } */ case COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CCarCtrl::JoinCarWithRoadSystemGotoCoors(pVehicle, FindPlayerCoors(), false); return 0; } case COMMAND_LOAD_END_OF_GAME_TUNE: - DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE); - printf("Start preload end of game audio\n"); - DMAudio.PreloadCutSceneMusic(STREAMED_SOUND_CUTSCENE_FINALE); - printf("End preload end of game audio\n"); return 0; - /* case COMMAND_ENABLE_PLAYER_CONTROL_CAMERA: CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CAMERA); return 0; - */ case COMMAND_SET_OBJECT_ROTATION: { CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); CWorld::Remove(pObject); pObject->SetOrientation( - DEGTORAD(*(float*)&ScriptParams[1]), - DEGTORAD(*(float*)&ScriptParams[2]), - DEGTORAD(*(float*)&ScriptParams[3])); + DEGTORAD(GET_FLOAT_PARAM(1)), + DEGTORAD(GET_FLOAT_PARAM(2)), + DEGTORAD(GET_FLOAT_PARAM(3))); pObject->GetMatrix().UpdateRW(); pObject->UpdateRwFrame(); CWorld::Add(pObject); return 0; } case COMMAND_GET_DEBUG_CAMERA_COORDINATES: - *(CVector*)&ScriptParams[0] = TheCamera.Cams[2].Source; + SET_VECTOR_PARAM(0, TheCamera.Cams[2].Source); StoreParameters(&m_nIp, 3); return 0; /* case COMMAND_GET_DEBUG_CAMERA_FRONT_VECTOR: - *(CVector*)&ScriptParams[0] = TheCamera.Cams[2].Front; + SET_VECTOR_PARAM(0, TheCamera.Cams[2].Front); StoreParameters(&m_nIp, 3); return 0; case COMMAND_IS_PLAYER_TARGETTING_ANY_CHAR: { CollectParameters(&m_nIp, 1); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); CEntity* pTarget = pPed->m_pPointGunAt; UpdateCompareFlag(pTarget && pTarget->IsPed()); @@ -985,13 +976,13 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_PLAYER_TARGETTING_CHAR: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CPed* pTestedPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTestedPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTestedPed); CEntity* pTarget = pPed->m_pPointGunAt; bool bTargetting = pTarget && pTarget->IsPed() && pTarget == pTestedPed; - // PC shit +#ifdef GTA_PC static int nCounter = 0; nCounter = Max(0, nCounter - 1); if (!pPed->GetWeapon()->IsTypeMelee() && !bTargetting) { @@ -1018,22 +1009,50 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) } } } +#endif UpdateCompareFlag(bTargetting); return 0; } - /* case COMMAND_IS_PLAYER_TARGETTING_OBJECT: { CollectParameters(&m_nIp, 2); - CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPlayerPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CObject* pTestedObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pTestedObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTestedObject); CEntity* pTarget = pPed->m_pPointGunAt; - UpdateCompareFlag(pTarget && pTarget->IsObject() && pTarget == pTestedObject); + bool bTargetting = pTarget && pTarget->IsObject() && pTarget == pTestedObject; +#ifdef GTA_PC // we will never know if section is real + static int nCounter = 0; + nCounter = Max(0, nCounter - 1); + if (!pPed->GetWeapon()->IsTypeMelee() && !bTargetting) { + if ((pTestedObject->GetPosition() - TheCamera.GetPosition()).Magnitude() < 10.0f) { + CVector vTestedPos(pTestedObject->GetPosition().x, pTestedObject->GetPosition().y, pTestedObject->GetPosition().z); + CVector vScreenPos; + float w, h; + if (CSprite::CalcScreenCoors(vTestedPos, &vScreenPos, &w, &h, false)) { + CVector2D vCrosshairPosition(CCamera::m_f3rdPersonCHairMultX * RsGlobal.maximumWidth, CCamera::m_f3rdPersonCHairMultY * RsGlobal.maximumHeight); + float fScreenDistance = ((CVector2D)vScreenPos - vCrosshairPosition).Magnitude(); + if (SCREEN_STRETCH_X(0.45f) > fScreenDistance / w) { + CColPoint point; + CEntity* entity; + if (!CWorld::ProcessLineOfSight(TheCamera.GetPosition() + 2.0f * TheCamera.GetForward(), + vTestedPos, point, entity, true, true, true, true, true, false) || + entity == pTestedObject) { + nCounter += 2; + if (nCounter > 20) { + bTargetting = true; + nCounter = 20; + } + } + } + } + } + } + UpdateCompareFlag(bTargetting); +#endif return 0; } - */ case COMMAND_TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME: { CTheScripts::ReadTextLabelFromScript(&m_nIp, tmp); @@ -1055,10 +1074,10 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) { CollectParameters(&m_nIp, 2); wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = *(float*)&ScriptParams[0]; - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = *(float*)&ScriptParams[1]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = GET_FLOAT_PARAM(0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = GET_FLOAT_PARAM(1); CollectParameters(&m_nIp, 1); - CMessages::InsertNumberInString(text, ScriptParams[0], -1, -1, -1, -1, -1, + CMessages::InsertNumberInString(text, GET_INTEGER_PARAM(0), -1, -1, -1, -1, -1, CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame++].m_Text); return 0; } @@ -1066,10 +1085,10 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) { CollectParameters(&m_nIp, 2); wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = *(float*)&ScriptParams[0]; - CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = *(float*)&ScriptParams[1]; + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtX = GET_FLOAT_PARAM(0); + CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame].m_fAtY = GET_FLOAT_PARAM(1); CollectParameters(&m_nIp, 2); - CMessages::InsertNumberInString(text, ScriptParams[0], ScriptParams[1], -1, -1, -1, -1, + CMessages::InsertNumberInString(text, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), -1, -1, -1, -1, CTheScripts::IntroTextLines[CTheScripts::NumberOfIntroTextLinesThisFrame++].m_Text); return 0; } @@ -1081,11 +1100,11 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) return 0; /* CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float range = *(float*)&ScriptParams[3]; - int mi = ScriptParams[4] < 0 ? CTheScripts::UsedObjectArray[-ScriptParams[4]].index : ScriptParams[4]; + float range = GET_FLOAT_PARAM(3); + int mi = GET_INTEGER_PARAM(4) < 0 ? CTheScripts::UsedObjectArray[-GET_INTEGER_PARAM(4)].index : GET_INTEGER_PARAM(4); int16 total; CEntity* apEntities[16]; CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, false, false, false, true, true); @@ -1117,9 +1136,9 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) script_assert(pClosestEntity->IsObject()); CObject* pObject = (CObject*)pClosestEntity; pObject->ObjectCreatedBy = MISSION_OBJECT; - ScriptParams[0] = CPools::GetObjectPool()->GetIndex(pObject); + SET_INTEGER_PARAM(0, CPools::GetObjectPool()->GetIndex(pObject)); } else { - ScriptParams[0] = -1; + SET_INTEGER_PARAM(0, -1); } StoreParameters(&m_nIp, 1); return 0; @@ -1129,11 +1148,11 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_PLACE_OBJECT_RELATIVE_TO_OBJECT: { CollectParameters(&m_nIp, 5); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - CObject* pTarget = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject* pTarget = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTarget); - CVector offset = *(CVector*)&ScriptParams[2]; + CVector offset = GET_VECTOR_PARAM(2); CPhysical::PlacePhysicalRelativeToOtherPhysical(pTarget, pObject, offset); return 0; } @@ -1141,79 +1160,81 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_SET_ALL_OCCUPANTS_OF_CAR_LEAVE_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CCarAI::TellOccupantsToLeaveCar(pVehicle); return 0; } case COMMAND_SET_INTERPOLATION_PARAMETERS: CollectParameters(&m_nIp, 2); - TheCamera.SetParametersForScriptInterpolation(*(float*)&ScriptParams[0], 100.0f - *(float*)&ScriptParams[0], ScriptParams[1]); + TheCamera.SetParametersForScriptInterpolation(GET_FLOAT_PARAM(0), 100.0f - GET_FLOAT_PARAM(0), GET_INTEGER_PARAM(1)); return 0; /* case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_TOWARDS_POINT: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float destX = *(float*)&ScriptParams[3]; - float destY = *(float*)&ScriptParams[4]; + float destX = GET_FLOAT_PARAM(3); + float destY = GET_FLOAT_PARAM(4); int32 nid = ThePaths.FindNodeClosestToCoors(pos, 0, 999999.9f, true, true); CPathNode* pNode = &ThePaths.m_pathNodes[nid]; - *(CVector*)&ScriptParams[0] = pNode->GetPosition(); - *(float*)&ScriptParams[3] = ThePaths.FindNodeOrientationForCarPlacementFacingDestination(nid, destX, destY, true); + SET_VECTOR_PARAM(0, pNode->GetPosition()); + SET_FLOAT_PARAM(3, ThePaths.FindNodeOrientationForCarPlacementFacingDestination(nid, destX, destY, true)); StoreParameters(&m_nIp, 4); return 0; } case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_AWAY_POINT: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - float destX = *(float*)&ScriptParams[3]; - float destY = *(float*)&ScriptParams[4]; + float destX = GET_FLOAT_PARAM(3); + float destY = GET_FLOAT_PARAM(4); int32 nid = ThePaths.FindNodeClosestToCoors(pos, 0, 999999.9f, true, true); CPathNode* pNode = &ThePaths.m_pathNodes[nid]; - *(CVector*)&ScriptParams[0] = pNode->GetPosition(); - *(float*)&ScriptParams[3] = ThePaths.FindNodeOrientationForCarPlacementFacingDestination(nid, destX, destY, false); + SET_VECTOR_PARAM(0, pNode->GetPosition()); + SET_FLOAT_PARAM(3, ThePaths.FindNodeOrientationForCarPlacementFacingDestination(nid, destX, destY, false)); StoreParameters(&m_nIp, 4); return 0; } */ case COMMAND_GET_DEBUG_CAMERA_POINT_AT: - *(CVector*)&ScriptParams[0] = TheCamera.Cams[2].Source + TheCamera.Cams[2].Front; + SET_VECTOR_PARAM(0, TheCamera.Cams[2].Source + TheCamera.Cams[2].Front); StoreParameters(&m_nIp, 3); return 0; case COMMAND_ATTACH_CHAR_TO_CAR: { CollectParameters(&m_nIp, 8); - CPed *pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CVehicle *pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); - pPed->AttachPedToEntity(pVehicle, *(CVector*)&ScriptParams[2], ScriptParams[5], DEGTORAD(*(float*)&ScriptParams[6]), (eWeaponType)ScriptParams[7]); + CPed *pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle *pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + pPed->AttachPedToEntity(pVehicle, GET_VECTOR_PARAM(2), GET_INTEGER_PARAM(5), DEGTORAD(GET_FLOAT_PARAM(6)), (eWeaponType)GET_INTEGER_PARAM(7)); return 0; } case COMMAND_DETACH_CHAR_FROM_CAR: { CollectParameters(&m_nIp, 1); - CPed *pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - if (pPed && pPed->m_attachedTo) + CPed *pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + if (pPed && pPed->m_attachedTo) { pPed->DettachPedFromEntity(); + pPed->bIsAimingGun = false; + } return 0; } case COMMAND_SET_CAR_CHANGE_LANE: // for some reason changed in SA { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->AutoPilot.m_bStayInFastLane = !ScriptParams[1]; + pVehicle->AutoPilot.m_bStayInFastLane = !GET_INTEGER_PARAM(1); return 0; } case COMMAND_CLEAR_CHAR_LAST_WEAPON_DAMAGE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); if (pPed) pPed->m_lastWepDam = -1; else @@ -1223,7 +1244,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_CLEAR_CAR_LAST_WEAPON_DAMAGE: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (pVehicle) pVehicle->m_nLastWeaponDamage = -1; else @@ -1235,10 +1256,10 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) CollectParameters(&m_nIp, 9); int ped_handle = -1; CVector pos = FindPlayerCoors(); - float x1 = *(float*)&ScriptParams[0]; - float y1 = *(float*)&ScriptParams[1]; - float x2 = *(float*)&ScriptParams[2]; - float y2 = *(float*)&ScriptParams[3]; + float x1 = GET_FLOAT_PARAM(0); + float y1 = GET_FLOAT_PARAM(1); + float x2 = GET_FLOAT_PARAM(2); + float y2 = GET_FLOAT_PARAM(3); int i = CPools::GetPedPool()->GetSize(); while (--i && ped_handle == -1) { CPed* pPed = CPools::GetPedPool()->GetSlot(i); @@ -1248,7 +1269,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) continue; if (pPed->m_nPedType != PEDTYPE_COP) continue; - if (!ThisIsAValidRandomCop(pPed->GetModelIndex(), ScriptParams[4], ScriptParams[5], ScriptParams[6], ScriptParams[7], ScriptParams[8])) + if (!ThisIsAValidRandomCop(pPed->GetModelIndex(), GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8))) continue; if (pPed->CharCreatedBy != RANDOM_CHAR) continue; @@ -1274,7 +1295,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); } - ScriptParams[0] = ped_handle; + SET_INTEGER_PARAM(0, ped_handle); StoreParameters(&m_nIp, 1); return 0; } @@ -1322,7 +1343,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); } - ScriptParams[0] = ped_handle; + SET_INTEGER_PARAM(0, ped_handle); StoreParameters(&m_nIp, 1); return 0; } @@ -1330,9 +1351,9 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_SET_CHAR_OBJ_FLEE_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_FLEE_CAR, pVehicle); @@ -1341,20 +1362,20 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_GET_DRIVER_OF_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); CPed* pDriver = pVehicle->pDriver; if (pDriver) - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pDriver); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pDriver)); else - ScriptParams[0] = -1; + SET_INTEGER_PARAM(0, -1); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_NUMBER_OF_FOLLOWERS: { CollectParameters(&m_nIp, 1); - CPed* pLeader = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pLeader = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pLeader); int total = 0; int i = CPools::GetPedPool()->GetSize(); @@ -1365,34 +1386,34 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) if (pPed->m_leader == pLeader) total++; } - ScriptParams[0] = total; + SET_INTEGER_PARAM(0, total); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER: { CollectParameters(&m_nIp, 6); - CVector pos = *(CVector*)&ScriptParams[1]; + CVector pos = GET_VECTOR_PARAM(1); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CRemote::GivePlayerRemoteControlledCar(pos.x, pos.y, pos.z, DEGTORAD(*(float*)&ScriptParams[4]), ScriptParams[5]); + CRemote::GivePlayerRemoteControlledCar(pos.x, pos.y, pos.z, DEGTORAD(GET_FLOAT_PARAM(4)), GET_INTEGER_PARAM(5)); return 0; } case COMMAND_GET_CURRENT_PLAYER_WEAPON: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - ScriptParams[0] = pPed->GetWeapon()->m_eWeaponType; + SET_INTEGER_PARAM(0, pPed->GetWeapon()->m_eWeaponType); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_CURRENT_CHAR_WEAPON: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - ScriptParams[0] = pPed->GetWeapon()->m_eWeaponType; + SET_INTEGER_PARAM(0, pPed->GetWeapon()->m_eWeaponType); StoreParameters(&m_nIp, 1); return 0; } @@ -1407,36 +1428,36 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_SET_CAR_TEMP_ACTION: { CollectParameters(&m_nIp, 3); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->AutoPilot.m_nTempAction = (uint8)ScriptParams[1]; - pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + ScriptParams[2]; + pVehicle->AutoPilot.m_nTempAction = (uint8)GET_INTEGER_PARAM(1); + pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + GET_INTEGER_PARAM(2); return 0; } /* case COMMAND_SET_CAR_HANDBRAKE_TURN_RIGHT: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); pVehicle->AutoPilot.m_nTempAction = TEMPACT_HANDBRAKETURNRIGHT; - pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + ScriptParams[1]; + pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_CAR_HANDBRAKE_STOP: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); pVehicle->AutoPilot.m_nTempAction = TEMPACT_HANDBRAKESTRAIGHT; - pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + ScriptParams[1]; + pVehicle->AutoPilot.m_nTimeTempAction = CTimer::GetTimeInMilliseconds() + GET_INTEGER_PARAM(1); return 0; } */ case COMMAND_IS_CHAR_ON_ANY_BIKE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle&& pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE); return 0; @@ -1446,16 +1467,16 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_LOCATE_SNIPER_BULLET_3D: LocateSniperBulletCommand(command, &m_nIp); return 0; - */ case COMMAND_GET_NUMBER_OF_SEATS_IN_MODEL: CollectParameters(&m_nIp, 1); - ScriptParams[0] = CVehicleModelInfo::GetMaximumNumberOfPassengersFromNumberOfDoors(ScriptParams[0]) + 1; + SET_INTEGER_PARAM(0, CVehicleModelInfo::GetMaximumNumberOfPassengersFromNumberOfDoors(GET_INTEGER_PARAM(0)) + 1); StoreParameters(&m_nIp, 1); return 0; + */ case COMMAND_IS_PLAYER_ON_ANY_BIKE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE); return 0; @@ -1464,7 +1485,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_CHAR_LYING_DOWN: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bFallenDown); return 0; @@ -1473,9 +1494,9 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_CAN_CHAR_SEE_DEAD_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - int pedtype = ScriptParams[1]; + int pedtype = GET_INTEGER_PARAM(1); bool can = false; for (int i = 0; i < pPed->m_numNearPeds; i++) { CPed* pTestPed = pPed->m_nearPeds[i]; @@ -1487,69 +1508,75 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) } case COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER: CollectParameters(&m_nIp, 1); - CPed::nEnterCarRangeMultiplier = *(float*)&ScriptParams[0]; + CPed::nEnterCarRangeMultiplier = GET_FLOAT_PARAM(0); return 0; case COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER: CollectParameters(&m_nIp, 1); - CPed::nThreatReactionRangeMultiplier = *(float*)&ScriptParams[0]; + CPed::nThreatReactionRangeMultiplier = GET_FLOAT_PARAM(0); + if (CPed::nThreatReactionRangeMultiplier < 1) + CPed::nThreatReactionRangeMultiplier = 1; return 0; case COMMAND_SET_CHAR_CEASE_ATTACK_TIMER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->m_ceaseAttackTimer = ScriptParams[1]; + pPed->m_ceaseAttackTimer = GET_INTEGER_PARAM(1); return 0; } case COMMAND_GET_REMOTE_CONTROLLED_CAR: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CWorld::Players[ScriptParams[0]].m_pRemoteVehicle; + CVehicle* pVehicle = CWorld::Players[GET_INTEGER_PARAM(0)].m_pRemoteVehicle; if (pVehicle) - ScriptParams[0] = CPools::GetVehiclePool()->GetIndex(pVehicle); + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex(pVehicle)); else - ScriptParams[0] = -1; + SET_INTEGER_PARAM(0, -1); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_PC_VERSION: +#ifdef GTA_PC UpdateCompareFlag(true); +#else + UpdateCompareFlag(false); +#endif return 0; //case COMMAND_REPLAY: //case COMMAND_IS_REPLAY_PLAYING: case COMMAND_IS_MODEL_AVAILABLE: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CModelInfo::GetModelInfo(ScriptParams[0]) != nil); + UpdateCompareFlag(CModelInfo::GetModelInfo(GET_INTEGER_PARAM(0)) != nil); return 0; case COMMAND_SHUT_CHAR_UP: CollectParameters(&m_nIp, 2); - DMAudio.SetPedTalkingStatus(CPools::GetPedPool()->GetAt(ScriptParams[0]), ScriptParams[1] == 0); + DMAudio.SetPedTalkingStatus(CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)), GET_INTEGER_PARAM(1) == 0); return 0; case COMMAND_SET_ENABLE_RC_DETONATE: CollectParameters(&m_nIp, 1); - CVehicle::bDisableRemoteDetonation = !ScriptParams[0]; + CVehicle::bDisableRemoteDetonation = !GET_INTEGER_PARAM(0); return 0; case COMMAND_SET_CAR_RANDOM_ROUTE_SEED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->m_nRouteSeed = ScriptParams[1]; + pVehicle->m_nRouteSeed = GET_INTEGER_PARAM(1); return 0; } case COMMAND_IS_ANY_PICKUP_AT_COORDS: { - CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; - CRunningScript::UpdateCompareFlag(CPickups::TestForPickupsInBubble(pos, 0.5f)); + CollectParameters(&m_nIp, 4); + CVector pos = GET_VECTOR_PARAM(0); + CRunningScript::UpdateCompareFlag(CPickups::TestForPickupsInBubble(pos, GET_FLOAT_PARAM(3))); return 0; } - case COMMAND_GET_FIRST_PICKUP_COORDS: - case COMMAND_GET_NEXT_PICKUP_COORDS: + //case COMMAND_GET_FIRST_PICKUP_COORDS: + //case COMMAND_GET_NEXT_PICKUP_COORDS: case COMMAND_REMOVE_ALL_CHAR_WEAPONS: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->ClearWeapons(); return 0; @@ -1557,11 +1584,26 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_HAS_PLAYER_GOT_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; + script_assert(pPed); + bool bFound = false; + for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) { + if (pPed->GetWeapon(i).m_eWeaponType == GET_INTEGER_PARAM(1)) { + bFound = true; + break; + } + } + UpdateCompareFlag(bFound); + return 0; + } + case COMMAND_HAS_CHAR_GOT_WEAPON: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); bool bFound = false; for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) { - if (pPed->GetWeapon(i).m_eWeaponType == ScriptParams[1]) { + if (pPed->GetWeapon(i).m_eWeaponType == GET_INTEGER_PARAM(1)) { bFound = true; break; } @@ -1569,31 +1611,30 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) UpdateCompareFlag(bFound); return 0; } - //case COMMAND_HAS_CHAR_GOT_WEAPON: //case COMMAND_IS_PLAYER_FACING_CHAR: case COMMAND_SET_TANK_DETONATE_CARS: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle && pVehicle->m_vehType == VEHICLE_TYPE_CAR); - ((CAutomobile*)pVehicle)->bTankDetonateCars = ScriptParams[1]; + ((CAutomobile*)pVehicle)->bTankDetonateCars = GET_INTEGER_PARAM(1); return 0; } case COMMAND_GET_POSITION_OF_ANALOGUE_STICKS: { CollectParameters(&m_nIp, 1); - CPad* pPad = CPad::GetPad(ScriptParams[0]); - ScriptParams[0] = pPad->NewState.LeftStickX; - ScriptParams[1] = pPad->NewState.LeftStickY; - ScriptParams[2] = pPad->NewState.RightStickX; - ScriptParams[3] = pPad->NewState.RightStickY; + CPad* pPad = CPad::GetPad(GET_INTEGER_PARAM(0)); + SET_INTEGER_PARAM(0, pPad->NewState.LeftStickX); + SET_INTEGER_PARAM(1, pPad->NewState.LeftStickY); + SET_INTEGER_PARAM(2, pPad->NewState.RightStickX); + SET_INTEGER_PARAM(3, pPad->NewState.RightStickY); StoreParameters(&m_nIp, 4); return 0; } case COMMAND_IS_CAR_ON_FIRE: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); bool bOnFire = false; if (pVehicle->m_pCarFire) @@ -1608,35 +1649,35 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_CAR_TYRE_BURST: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); bool bIsBurst = false; CBike* pBike = (CBike*)pVehicle; if (pVehicle->IsBike()) { - if (ScriptParams[1] == 4) { + if (GET_INTEGER_PARAM(1) == 4) { for (int i = 0; i < 2; i++) { if (pBike->m_wheelStatus[i] == WHEEL_STATUS_BURST) bIsBurst = true; } } else { - if (ScriptParams[1] == 2) - ScriptParams[1] = 0; - if (ScriptParams[1] == 3) - ScriptParams[1] = 1; - bIsBurst = pBike->m_wheelStatus[ScriptParams[1]] == WHEEL_STATUS_BURST; + if (GET_INTEGER_PARAM(1) == 2) + SET_INTEGER_PARAM(1, 0); + if (GET_INTEGER_PARAM(1) == 3) + SET_INTEGER_PARAM(1, 1); + bIsBurst = pBike->m_wheelStatus[GET_INTEGER_PARAM(1)] == WHEEL_STATUS_BURST; } } else { CAutomobile* pCar = (CAutomobile*)pVehicle; - if (ScriptParams[1] == 4) { + if (GET_INTEGER_PARAM(1) == 4) { for (int i = 0; i < 4; i++) { if (pCar->Damage.GetWheelStatus(i) == WHEEL_STATUS_BURST) bIsBurst = true; } } else - bIsBurst = pCar->Damage.GetWheelStatus(ScriptParams[1] == WHEEL_STATUS_BURST); + bIsBurst = pCar->Damage.GetWheelStatus(GET_INTEGER_PARAM(1) == WHEEL_STATUS_BURST); } UpdateCompareFlag(bIsBurst); return 0; @@ -1652,85 +1693,85 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) while (counter < 3 && CScriptPaths::aArray[counter].m_state != SCRIPT_PATH_DISABLED) { counter++; } - CScriptPaths::aArray[counter].InitialiseOne(ScriptParams[0], *(float*)&ScriptParams[1]); - ScriptParams[0] = counter; + CScriptPaths::aArray[counter].InitialiseOne(GET_INTEGER_PARAM(0), GET_FLOAT_PARAM(1)); + SET_INTEGER_PARAM(0, counter); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_START_OBJECT_ON_PATH: { CollectParameters(&m_nIp, 2); - CObject *pObj = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject *pObj = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); assert(pObj); - CScriptPaths::aArray[ScriptParams[1]].SetObjectToControl(pObj); + CScriptPaths::aArray[GET_INTEGER_PARAM(1)].SetObjectToControl(pObj); return 0; } case COMMAND_SET_OBJECT_PATH_SPEED: { CollectParameters(&m_nIp, 2); - CScriptPaths::aArray[ScriptParams[0]].m_fSpeed = *(float*)&ScriptParams[1]; + CScriptPaths::aArray[GET_INTEGER_PARAM(0)].m_fSpeed = GET_FLOAT_PARAM(1); return 0; } case COMMAND_SET_OBJECT_PATH_POSITION: { CollectParameters(&m_nIp, 2); - CScriptPaths::aArray[ScriptParams[0]].m_fPosition = *(float*)&ScriptParams[1]; + CScriptPaths::aArray[GET_INTEGER_PARAM(0)].m_fPosition = GET_FLOAT_PARAM(1); return 0; } //case COMMAND_GET_OBJECT_DISTANCE_ALONG_PATH: case COMMAND_CLEAR_OBJECT_PATH: { CollectParameters(&m_nIp, 1); - CScriptPaths::aArray[ScriptParams[0]].Clear(); + CScriptPaths::aArray[GET_INTEGER_PARAM(0)].Clear(); return 0; } case COMMAND_HELI_GOTO_COORDS: { CollectParameters(&m_nIp, 5); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle && pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI); - ((CAutomobile*)pVehicle)->TellHeliToGoToCoors(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2], *(float*)&ScriptParams[3], ScriptParams[4]); + ((CAutomobile*)pVehicle)->TellHeliToGoToCoors(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(3), GET_INTEGER_PARAM(4)); return 0; } case COMMAND_IS_INT_VAR_EQUAL_TO_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr == ScriptParams[0]); + UpdateCompareFlag(*ptr == GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_EQUAL_TO_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr == ScriptParams[0]); + UpdateCompareFlag(*ptr == GET_INTEGER_PARAM(0)); return 0; } case COMMAND_GET_DEAD_CHAR_PICKUP_COORDS: { CollectParameters(&m_nIp, 1); - CPed *pTarget = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed *pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); CVector pos; pTarget->CreateDeadPedPickupCoors(&pos.x, &pos.y, &pos.z); - *(CVector*)&ScriptParams[0] = pos; + SET_VECTOR_PARAM(0, pos); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_CREATE_PROTECTION_PICKUP: { CollectParameters(&m_nIp, 5); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_PICKUP_REVENUE, PICKUP_ASSET_REVENUE, ScriptParams[3], ScriptParams[4]); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_REVENUE, PICKUP_ASSET_REVENUE, GET_INTEGER_PARAM(3), GET_INTEGER_PARAM(4))); // TODO: gpModelIndices StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_CHAR_IN_ANY_BOAT: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT); return 0; @@ -1738,7 +1779,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_PLAYER_IN_ANY_BOAT: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT); return 0; @@ -1746,7 +1787,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_CHAR_IN_ANY_HELI: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI); return 0; @@ -1754,7 +1795,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_PLAYER_IN_ANY_HELI: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI); return 0; @@ -1762,7 +1803,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_CHAR_IN_ANY_PLANE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE); return 0; @@ -1770,7 +1811,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_PLAYER_IN_ANY_PLANE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI); return 0; @@ -1778,7 +1819,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) case COMMAND_IS_CHAR_IN_WATER: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(pPed && pPed->bIsInWater); return 0; } @@ -1786,14 +1827,14 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - *ptr = ScriptParams[0]; + *ptr = GET_INTEGER_PARAM(0); return 0; } case COMMAND_SET_LVAR_INT_TO_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - *ptr = ScriptParams[0]; + *ptr = GET_INTEGER_PARAM(0); return 0; } default: diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp index 71099cc4..de389a13 100644 --- a/src/control/Script7.cpp +++ b/src/control/Script7.cpp @@ -13,6 +13,7 @@ #include "General.h" #include "Glass.h" #include "Fluff.h" +#include "KeyGen.h" #include "Hud.h" #include "MBlur.h" #include "Pad.h" @@ -31,6 +32,8 @@ #include "World.h" #include "Zones.h" +// LCS: file done except TODOs + int8 CRunningScript::ProcessCommands1200To1299(int32 command) { switch (command) { @@ -38,66 +41,66 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr > ScriptParams[0]); + UpdateCompareFlag(*ptr > GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_GREATER_THAN_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr > ScriptParams[0]); + UpdateCompareFlag(*ptr > GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_CONSTANT_GREATER_THAN_INT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(ScriptParams[0] > *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) > *ptr); return 0; } case COMMAND_IS_CONSTANT_GREATER_THAN_INT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(ScriptParams[0] > *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) > *ptr); return 0; } case COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr >= ScriptParams[0]); + UpdateCompareFlag(*ptr >= GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_CONSTANT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); CollectParameters(&m_nIp, 1); - UpdateCompareFlag(*ptr >= ScriptParams[0]); + UpdateCompareFlag(*ptr >= GET_INTEGER_PARAM(0)); return 0; } case COMMAND_IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_VAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - UpdateCompareFlag(ScriptParams[0] >= *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) >= *ptr); return 0; } case COMMAND_IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_LVAR: { CollectParameters(&m_nIp, 1); int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - UpdateCompareFlag(ScriptParams[0] >= *ptr); + UpdateCompareFlag(GET_INTEGER_PARAM(0) >= *ptr); return 0; } case COMMAND_GET_CHAR_WEAPON_IN_SLOT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - ScriptParams[0] = pPed->GetWeapon(ScriptParams[1] - 1).m_eWeaponType; - ScriptParams[1] = pPed->GetWeapon(ScriptParams[1] - 1).m_nAmmoTotal; - ScriptParams[2] = CPickups::ModelForWeapon((eWeaponType)ScriptParams[0]); + SET_INTEGER_PARAM(0, pPed->GetWeapon(GET_INTEGER_PARAM(1) - 1).m_eWeaponType); + SET_INTEGER_PARAM(1, pPed->GetWeapon(GET_INTEGER_PARAM(1) - 1).m_nAmmoTotal); + SET_INTEGER_PARAM(2, CPickups::ModelForWeapon((eWeaponType)GET_INTEGER_PARAM(0))); StoreParameters(&m_nIp, 3); return 0; } @@ -106,16 +109,16 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) CollectParameters(&m_nIp, 5); int node1, node2; float angle; - ThePaths.FindNodePairClosestToCoors(*(CVector*)&ScriptParams[0], PATH_CAR, &node1, &node2, &angle, - *(float*)&ScriptParams[3], *(float*)&ScriptParams[4], true, true); + ThePaths.FindNodePairClosestToCoors(GET_VECTOR_PARAM(0), PATH_CAR, &node1, &node2, &angle, + GET_FLOAT_PARAM(3), GET_FLOAT_PARAM(4), true, true); if (node1 == -1) { for (int i = 0; i < 7; i++) ScriptParams[i] = 0; } else { - *(CVector*)&ScriptParams[0] = ThePaths.FindNodeCoorsForScript(node1); - *(CVector*)&ScriptParams[3] = ThePaths.FindNodeCoorsForScript(node2); - *(float*)&ScriptParams[6] = angle; + SET_VECTOR_PARAM(0, ThePaths.FindNodeCoorsForScript(node1)); + SET_VECTOR_PARAM(3, ThePaths.FindNodeCoorsForScript(node2)); + SET_FLOAT_PARAM(6, angle); } StoreParameters(&m_nIp, 7); return 0; @@ -123,9 +126,9 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_CAR_FORWARD_SPEED: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - float speed = *(float*)&ScriptParams[1] / GAME_SPEED_TO_CARAI_SPEED; + float speed = GET_FLOAT_PARAM(1) / GAME_SPEED_TO_CARAI_SPEED; pVehicle->SetMoveSpeed(pVehicle->GetForward() * speed); if (pVehicle->IsRealHeli() && pVehicle->IsCar()) ((CAutomobile*)pVehicle)->m_aWheelSpeed[1] = 0.22f; @@ -133,8 +136,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) } case COMMAND_SET_AREA_VISIBLE: CollectParameters(&m_nIp, 1); - CGame::currArea = ScriptParams[0]; - CStreaming::RemoveBuildingsNotInArea(ScriptParams[0]); + CGame::currArea = GET_INTEGER_PARAM(0); + CStreaming::RemoveBuildingsNotInArea(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SET_CUTSCENE_ANIM_TO_LOOP: { @@ -147,28 +150,28 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_MARK_CAR_AS_CONVOY_CAR: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bPartOfConvoy = ScriptParams[1]; + pVehicle->bPartOfConvoy = GET_INTEGER_PARAM(1); return 0; } case COMMAND_RESET_HAVOC_CAUSED_BY_PLAYER: { CollectParameters(&m_nIp, 1); - CWorld::Players[ScriptParams[0]].m_nHavocLevel = 0; + CWorld::Players[GET_INTEGER_PARAM(0)].m_nHavocLevel = 0; return 0; } case COMMAND_GET_HAVOC_CAUSED_BY_PLAYER: { CollectParameters(&m_nIp, 1); - ScriptParams[0] = CWorld::Players[ScriptParams[0]].m_nHavocLevel; + SET_INTEGER_PARAM(0, CWorld::Players[GET_INTEGER_PARAM(0)].m_nHavocLevel); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_CREATE_SCRIPT_ROADBLOCK: { CollectParameters(&m_nIp, 6); - CRoadBlocks::RegisterScriptRoadBlock(*(CVector*)&ScriptParams[0], *(CVector*)&ScriptParams[3]); + CRoadBlocks::RegisterScriptRoadBlock(GET_VECTOR_PARAM(0), GET_VECTOR_PARAM(3)); return 0; } case COMMAND_CLEAR_ALL_SCRIPT_ROADBLOCKS: @@ -179,9 +182,9 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_CHAR_OBJ_WALK_TO_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTargetPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_GOTO_CHAR_ON_FOOT_WALKING, pTargetPed); @@ -191,17 +194,17 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS: { CollectParameters(&m_nIp, 4); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVector result = Multiply3x3(pPed->GetMatrix(), *(CVector*)&ScriptParams[1]) + pPed->GetPosition(); - *(CVector*)&ScriptParams[0] = result; + CVector result = Multiply3x3(pPed->GetMatrix(), GET_VECTOR_PARAM(1)) + pPed->GetPosition(); + SET_VECTOR_PARAM(0, result); StoreParameters(&m_nIp, 3); return 0; } case COMMAND_HAS_CHAR_BEEN_PHOTOGRAPHED: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); bool result = false; if (pPed->bHasBeenPhotographed) { @@ -214,9 +217,9 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_CHAR_OBJ_AIM_GUN_AT_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pTargetPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pTargetPed); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_AIM_GUN_AT, pTargetPed); @@ -225,14 +228,21 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SWITCH_SECURITY_CAMERA: { CollectParameters(&m_nIp, 1); - CSpecialFX::bVideoCam = ScriptParams[0] != 0; + if (GET_INTEGER_PARAM(0) != 0) { + // TheCamera.MBlur.? = 3; TODO(LCS) + CSpecialFX::bVideoCam = true; + } + else { + // TheCamera.MBlur.Reset(); + CSpecialFX::bVideoCam = false; + } return 0; } //case COMMAND_IS_CHAR_IN_FLYING_VEHICLE: case COMMAND_IS_PLAYER_IN_FLYING_VEHICLE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && (pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI || pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE)); return 0; @@ -244,27 +254,27 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_ADD_SHORT_RANGE_SPRITE_BLIP_FOR_COORD: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int id = CRadar::SetShortRangeCoordBlip(BLIP_COORD, pos, 5, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[3]); - ScriptParams[0] = id; + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(3)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_ADD_MONEY_SPENT_ON_CLOTHES: CollectParameters(&m_nIp, 1); - CStats::MoneySpentOnFashion(ScriptParams[0]); + //CStats::MoneySpentOnFashion(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SET_HELI_ORIENTATION: { CollectParameters(&m_nIp, 2); - CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pHeli && pHeli->IsCar() && pHeli->IsRealHeli()); - float fAngle = DEGTORAD(*(float*)&ScriptParams[1] - 90.0f); + float fAngle = DEGTORAD(GET_FLOAT_PARAM(1) - 90.0f); while (fAngle < 0.0f) fAngle += TWOPI; while (fAngle > TWOPI) @@ -275,7 +285,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_CLEAR_HELI_ORIENTATION: { CollectParameters(&m_nIp, 1); - CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pHeli && pHeli->IsCar() && pHeli->IsRealHeli()); pHeli->ClearHeliOrientation(); return 0; @@ -283,66 +293,75 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_PLANE_GOTO_COORDS: { CollectParameters(&m_nIp, 5); - CAutomobile* pPlane = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pPlane = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPlane && pPlane->IsCar() && pPlane->IsRealPlane()); - pPlane->TellPlaneToGoToCoors(*(float*)&ScriptParams[1], *(float*)&ScriptParams[2], *(float*)&ScriptParams[3], ScriptParams[4]); + pPlane->TellPlaneToGoToCoors(GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2), GET_FLOAT_PARAM(3), GET_INTEGER_PARAM(4)); return 0; } case COMMAND_GET_NTH_CLOSEST_CAR_NODE: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); + if (pos.z <= MAP_Z_LOW_LIMIT) + pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); + SET_VECTOR_PARAM(0, ThePaths.FindNodeCoorsForScript(ThePaths.FindNthNodeClosestToCoors(pos, 0, 999999.9f, true, true, GET_INTEGER_PARAM(3) - 1))); + StoreParameters(&m_nIp, 3); + return 0; + } + case COMMAND_GET_NTH_CLOSEST_CHAR_NODE: + { + CollectParameters(&m_nIp, 4); + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - *(CVector*)&ScriptParams[0] = ThePaths.FindNodeCoorsForScript(ThePaths.FindNthNodeClosestToCoors(pos, 0, 999999.9f, true, true, ScriptParams[3] - 1)); + SET_VECTOR_PARAM(0, ThePaths.FindNodeCoorsForScript(ThePaths.FindNthNodeClosestToCoors(pos, 1, 999999.9f, true, true, GET_INTEGER_PARAM(3) - 1))); StoreParameters(&m_nIp, 3); return 0; } - //case COMMAND_GET_NTH_CLOSEST_CHAR_NODE: case COMMAND_DRAW_WEAPONSHOP_CORONA: { CollectParameters(&m_nIp, 9); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); - CCoronas::RegisterCorona((uintptr)this + m_nIp, ScriptParams[6], ScriptParams[7], ScriptParams[8], 255, pos, *(float*)&ScriptParams[3], - 150.0f, ScriptParams[4], ScriptParams[5], 1, 0, 0, 0.0f, false, 0.2f); + CCoronas::RegisterCorona((uintptr)this + m_nIp, GET_INTEGER_PARAM(6), GET_INTEGER_PARAM(7), GET_INTEGER_PARAM(8), 255, pos, -GET_FLOAT_PARAM(3), + 150.0f, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), 1, 0, 0, 0.0f, false, 0.2f); return 0; } case COMMAND_SET_ENABLE_RC_DETONATE_ON_CONTACT: { CollectParameters(&m_nIp, 1); - CVehicle::bDisableRemoteDetonationOnContact = (ScriptParams[0] == 0); + CVehicle::bDisableRemoteDetonationOnContact = (GET_INTEGER_PARAM(0) == 0); return 0; } case COMMAND_FREEZE_CHAR_POSITION: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bIsFrozen = ScriptParams[1]; + pPed->bIsFrozen = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_CHAR_DROWNS_IN_WATER: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bDrownsInWater = ScriptParams[1]; + pPed->bDrownsInWater = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_OBJECT_RECORDS_COLLISIONS: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->bUseCollisionRecords = ScriptParams[1]; + pObject->bUseCollisionRecords = GET_INTEGER_PARAM(1); return 0; } case COMMAND_HAS_OBJECT_COLLIDED_WITH_ANYTHING: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); UpdateCompareFlag(pObject->m_nCollisionRecords != 0); return 0; @@ -352,13 +371,15 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) CWorld::Players[CWorld::PlayerInFocus].BlowUpRCBuggy(false); return 0; } - //case COMMAND_HAS_PHOTOGRAPH_BEEN_TAKEN: + case COMMAND_HAS_PHOTOGRAPH_BEEN_TAKEN: + UpdateCompareFlag(CWeapon::bPhotographHasBeenTaken); + return 0; case COMMAND_GET_CHAR_ARMOUR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - ScriptParams[0] = pPed->m_fArmour; + SET_INTEGER_PARAM(0, pPed->m_fArmour); StoreParameters(&m_nIp, 1); return 0; } @@ -366,23 +387,23 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_HELI_STABILISER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bHeliMinimumTilt = ScriptParams[1]; + pVehicle->bHeliMinimumTilt = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_CAR_STRAIGHT_LINE_DISTANCE: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->AutoPilot.m_nSwitchDistance = ScriptParams[1]; + pVehicle->AutoPilot.m_nSwitchDistance = GET_INTEGER_PARAM(1); return 0; } case COMMAND_POP_CAR_BOOT: { CollectParameters(&m_nIp, 1); - CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pCar&& pCar->IsCar()); pCar->PopBoot(); return 0; @@ -390,21 +411,22 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SHUT_PLAYER_UP: { CollectParameters(&m_nIp, 2); - DMAudio.ShutUpPlayerTalking(!!ScriptParams[1]); + DMAudio.ShutUpPlayerTalking(!!GET_INTEGER_PARAM(1)); return 0; } case COMMAND_SET_PLAYER_MOOD: { CollectParameters(&m_nIp, 3); - DMAudio.SetPlayersMood(ScriptParams[1], ScriptParams[2]); + DMAudio.SetPlayersMood(GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_REQUEST_COLLISION: { CollectParameters(&m_nIp, 2); - CVector2D pos; - pos.x = *(float*)&ScriptParams[0]; - pos.y = *(float*)&ScriptParams[1]; + CVector pos; + pos.x = GET_FLOAT_PARAM(0); + pos.y = GET_FLOAT_PARAM(1); + pos.z = 0.0f; CColStore::RequestCollision(pos); return 0; } @@ -415,9 +437,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_IS_OBJECT_IN_WATER: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - script_assert(pObject); - UpdateCompareFlag(pObject->bIsInWater); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + UpdateCompareFlag(pObject && pObject->bIsInWater); return 0; } //case COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR_EVEN_MISSION_CAR: @@ -428,11 +449,11 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_CHAR_CROUCH: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pPed->bCrouchWhenShooting = true; - pPed->SetDuck(ScriptParams[2], true); + pPed->SetDuck(GET_INTEGER_PARAM(2), true); } else { pPed->ClearDuck(true); @@ -460,7 +481,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) return 0; } while (zone >= 0) { - CTheZones::SetZoneCivilianCarInfo(zone, ScriptParams[0], carDensities, boatDensities); + CTheZones::SetZoneCivilianCarInfo(zone, GET_INTEGER_PARAM(0), carDensities, boatDensities); zone = CTheZones::FindNextZoneByLabelAndReturnIndex(label, ZONE_INFO); } return 0; @@ -470,7 +491,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) char key[KEY_LENGTH_IN_SCRIPT]; CTheScripts::ReadTextLabelFromScript(&m_nIp, key); m_nIp += KEY_LENGTH_IN_SCRIPT; - CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex(key), STREAMFLAGS_SCRIPTOWNED); + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex(key), (m_bIsMissionScript ? STREAMFLAGS_SCRIPTOWNED : STREAMFLAGS_AMBIENT_SCRIPT_OWNED)); return 0; } case COMMAND_HAS_ANIMATION_LOADED: @@ -487,12 +508,13 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) CTheScripts::ReadTextLabelFromScript(&m_nIp, key); m_nIp += KEY_LENGTH_IN_SCRIPT; CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex(key)); + // + empty function on PS2 return 0; } case COMMAND_IS_CHAR_WAITING_FOR_WORLD_COLLISION: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bIsStaticWaitingForCollision); return 0; @@ -500,87 +522,101 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_IS_CAR_WAITING_FOR_WORLD_COLLISION: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); UpdateCompareFlag(pVehicle->bIsStaticWaitingForCollision); return 0; } + /* case COMMAND_IS_OBJECT_WAITING_FOR_WORLD_COLLISION: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); UpdateCompareFlag(pObject->bIsStaticWaitingForCollision); return 0; } + */ case COMMAND_SET_CHAR_SHUFFLE_INTO_DRIVERS_SEAT: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); pPed->PedShuffle(); return 0; } case COMMAND_ATTACH_CHAR_TO_OBJECT: { CollectParameters(&m_nIp, 8); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); - pPed->AttachPedToEntity(pObject, *(CVector*)&ScriptParams[2], ScriptParams[5], DEGTORAD(ScriptParams[6]), (eWeaponType)ScriptParams[7]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); + pPed->AttachPedToEntity(pObject, GET_VECTOR_PARAM(2), GET_INTEGER_PARAM(5), DEGTORAD(GET_INTEGER_PARAM(6)), (eWeaponType)GET_INTEGER_PARAM(7)); return 0; } case COMMAND_SET_CHAR_AS_PLAYER_FRIEND: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bIsPlayerFriend = ScriptParams[2]; + pPed->bIsPlayerFriend = GET_INTEGER_PARAM(2); return 0; } //case COMMAND_DISPLAY_NTH_ONSCREEN_COUNTER: case COMMAND_DISPLAY_NTH_ONSCREEN_COUNTER_WITH_STRING: { char onscreen_str[12]; - script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); - uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); + //script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); + uint16 var = (uint8*)GetPointerToScriptVariable(&m_nIp, 0) - CTheScripts::ScriptSpace; CollectParameters(&m_nIp, 2); wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); // ??? strncpy(onscreen_str, (char*)&CTheScripts::ScriptSpace[m_nIp], KEY_LENGTH_IN_SCRIPT); m_nIp += KEY_LENGTH_IN_SCRIPT; - CUserDisplay::OnscnTimer.AddCounter(var, ScriptParams[0], onscreen_str, ScriptParams[1] - 1); + CUserDisplay::OnscnTimer.AddCounter(var, GET_INTEGER_PARAM(0), onscreen_str, GET_INTEGER_PARAM(1) - 1); // TODO: last params are -1, nil, 0 return 0; } case COMMAND_ADD_SET_PIECE: { CollectParameters(&m_nIp, 13); - CSetPieces::AddOne(ScriptParams[0], - *(CVector2D*)&ScriptParams[1], *(CVector2D*)&ScriptParams[3], - *(CVector2D*)&ScriptParams[5], *(CVector2D*)&ScriptParams[7], - *(CVector2D*)&ScriptParams[9], *(CVector2D*)&ScriptParams[11]); + float fTriggerInfX = GET_FLOAT_PARAM(1); + float fTriggerInfY = GET_FLOAT_PARAM(2); + float fTriggerSupX = GET_FLOAT_PARAM(3); + float fTriggerSupY = GET_FLOAT_PARAM(4); + float fSpawn1X = GET_FLOAT_PARAM(5); + float fSpawn1Y = GET_FLOAT_PARAM(6); + float fTarget1X = GET_FLOAT_PARAM(7); + float fTarget1Y = GET_FLOAT_PARAM(8); + float fSpawn2X = GET_FLOAT_PARAM(9); + float fSpawn2Y = GET_FLOAT_PARAM(10); + float fTarget2X = GET_FLOAT_PARAM(11); + float fTarget2Y = GET_FLOAT_PARAM(12); + CSetPieces::AddOne(GET_INTEGER_PARAM(0), + CVector2D(fTriggerInfX, fTriggerInfY), CVector2D(fTriggerSupX, fTriggerSupY), + CVector2D(fSpawn1X, fSpawn1Y), CVector2D(fTarget1X, fTarget1Y), + CVector2D(fSpawn2X, fSpawn2Y), CVector2D(fTarget2X, fTarget2Y)); return 0; } case COMMAND_SET_EXTRA_COLOURS: { CollectParameters(&m_nIp, 2); - CTimeCycle::StartExtraColour(ScriptParams[0]-1, ScriptParams[1] != 0); + CTimeCycle::StartExtraColour(GET_INTEGER_PARAM(0)-1, GET_INTEGER_PARAM(1) != 0); return 0; } case COMMAND_CLEAR_EXTRA_COLOURS: { CollectParameters(&m_nIp, 1); - CTimeCycle::StopExtraColour(ScriptParams[0]); + CTimeCycle::StopExtraColour(GET_INTEGER_PARAM(0)); return 0; } //case COMMAND_CLOSE_CAR_BOOT: case COMMAND_GET_WHEELIE_STATS: { CollectParameters(&m_nIp, 1); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - ScriptParams[0] = pPlayerInfo->m_nLastTimeCarSpentOnTwoWheels; - *(float*)&ScriptParams[1] = pPlayerInfo->m_nLastDistanceCarTravelledOnTwoWheels; - ScriptParams[2] = pPlayerInfo->m_nLastTimeSpentOnWheelie; - *(float*)&ScriptParams[3] = pPlayerInfo->m_nLastDistanceTravelledOnWheelie; - ScriptParams[4] = pPlayerInfo->m_nLastTimeSpentOnStoppie; - *(float*)&ScriptParams[5] = pPlayerInfo->m_nLastDistanceTravelledOnStoppie; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + SET_INTEGER_PARAM(0, pPlayerInfo->m_nLastTimeCarSpentOnTwoWheels); + SET_FLOAT_PARAM(1, pPlayerInfo->m_nLastDistanceCarTravelledOnTwoWheels); + SET_INTEGER_PARAM(2, pPlayerInfo->m_nLastTimeSpentOnWheelie); + SET_FLOAT_PARAM(3, pPlayerInfo->m_nLastDistanceTravelledOnWheelie); + SET_INTEGER_PARAM(4, pPlayerInfo->m_nLastTimeSpentOnStoppie); + SET_FLOAT_PARAM(5, pPlayerInfo->m_nLastDistanceTravelledOnStoppie); StoreParameters(&m_nIp, 6); pPlayerInfo->m_nLastTimeCarSpentOnTwoWheels = 0; pPlayerInfo->m_nLastDistanceCarTravelledOnTwoWheels = 0.0f; @@ -594,23 +630,23 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_BURST_CAR_TYRE: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (pVehicle->IsBike()) { - if (ScriptParams[1] == 2) - ScriptParams[1] = 0; - else if (ScriptParams[1] == 3) - ScriptParams[1] = 1; - pVehicle->BurstTyre(ScriptParams[1], true); + if (GET_INTEGER_PARAM(1) == 2) + SET_INTEGER_PARAM(1, 0); + else if (GET_INTEGER_PARAM(1) == 3) + SET_INTEGER_PARAM(1, 1); + pVehicle->BurstTyre(GET_INTEGER_PARAM(1), true); } else { - pVehicle->BurstTyre(ScriptParams[1], true); + pVehicle->BurstTyre(GET_INTEGER_PARAM(1), true); } return 0; } case COMMAND_IS_CHAR_OBJ_NO_OBJ: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->m_prevObjective == OBJECTIVE_NONE && pPed->m_objective == OBJECTIVE_NONE); return 0; @@ -623,26 +659,26 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) m_nIp += KEY_LENGTH_IN_SCRIPT; for (int i = 0; i < KEY_LENGTH_IN_SCRIPT; i++) key[i] = tolower(key[i]); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - UpdateCompareFlag(strcmp(key, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetModelName()) == 0); + UpdateCompareFlag(CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetNameHashKey() == CKeyGen::GetUppercaseKey(key)); return 0; } case COMMAND_SET_PLAYER_CAN_DO_DRIVE_BY: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - pPlayerInfo->m_bDriveByAllowed = ScriptParams[1]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayerInfo->m_bDriveByAllowed = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_CHAR_OBJ_SPRINT_TO_COORD: { CollectParameters(&m_nIp, 3); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); CVector pos; - pos.x = *(float*)&ScriptParams[1]; - pos.y = *(float*)&ScriptParams[2]; + pos.x = GET_FLOAT_PARAM(1); + pos.y = GET_FLOAT_PARAM(2); pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pPed->bScriptObjectiveCompleted = false; pPed->SetObjective(OBJECTIVE_SPRINT_TO_AREA, pos); @@ -651,7 +687,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_CREATE_SWAT_ROPE: { CollectParameters(&m_nIp, 3); - CRopes::CreateRopeWithSwatComingDown(*(CVector*)&ScriptParams[0]); + CRopes::CreateRopeWithSwatComingDown(GET_VECTOR_PARAM(0)); return 0; } //case COMMAND_SET_FIRST_PERSON_CONTROL_CAMERA: @@ -659,19 +695,19 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SET_CAR_MODEL_COMPONENTS: { CollectParameters(&m_nIp, 3); - CVehicleModelInfo::SetComponentsToUse(ScriptParams[1], ScriptParams[2]); + CVehicleModelInfo::SetComponentsToUse(GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_SWITCH_LIFT_CAMERA: { CollectParameters(&m_nIp, 1); - CSpecialFX::bLiftCam = ScriptParams[0] != 0; + CSpecialFX::bLiftCam = GET_INTEGER_PARAM(0) != 0; return 0; } case COMMAND_CLOSE_ALL_CAR_DOORS: { CollectParameters(&m_nIp, 1); - CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pCar&& pCar->IsCar()); pCar->CloseAllDoors(); return 0; @@ -679,21 +715,25 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_GET_DISTANCE_BETWEEN_COORDS_2D: { CollectParameters(&m_nIp, 4); - *(float*)&ScriptParams[0] = (*(CVector2D*)&ScriptParams[0] - *(CVector2D*)&ScriptParams[2]).Magnitude(); + float X1 = GET_FLOAT_PARAM(0); + float Y1 = GET_FLOAT_PARAM(1); + float X2 = GET_FLOAT_PARAM(2); + float Y2 = GET_FLOAT_PARAM(3); + SET_FLOAT_PARAM(0, (CVector2D(X1, Y1) - CVector2D(X2, Y2)).Magnitude()); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_GET_DISTANCE_BETWEEN_COORDS_3D: { CollectParameters(&m_nIp, 6); - *(float*)&ScriptParams[0] = (*(CVector*)&ScriptParams[0] - *(CVector*)&ScriptParams[3]).Magnitude(); + SET_FLOAT_PARAM(0, (GET_VECTOR_PARAM(0) - GET_VECTOR_PARAM(3)).Magnitude()); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_POP_CAR_BOOT_USING_PHYSICS: { CollectParameters(&m_nIp, 1); - CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pCar = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pCar && pCar->IsCar()); pCar->PopBootUsingPhysics(); return 0; @@ -702,7 +742,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_IS_CHAR_LEAVING_VEHICLE_TO_DIE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE); return 0; @@ -710,25 +750,29 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) case COMMAND_SORT_OUT_OBJECT_COLLISION_WITH_CAR: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->m_pCollidingEntity = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + pObject->m_pCollidingEntity = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); return 0; } //case COMMAND_GET_MAX_WANTED_LEVEL: case COMMAND_IS_CHAR_WANDER_PATH_CLEAR: { CollectParameters(&m_nIp, 5); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - UpdateCompareFlag(CWorld::IsWanderPathClear(pPed->GetPosition(), *(CVector*)&ScriptParams[0], *(float*)&ScriptParams[3], 4)); + UpdateCompareFlag(CWorld::IsWanderPathClear(pPed->GetPosition(), GET_VECTOR_PARAM(0), GET_FLOAT_PARAM(3), 4)); return 0; } //case COMMAND_PRINT_HELP_WITH_NUMBER: case COMMAND_PRINT_HELP_FOREVER: { wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); - CHud::SetHelpMessage(text, false, true); + CHud::SetHelpMessage(text, false, true); // + true + if (text != CHud::gLastPrintForeverString) { + CHud::gLastPrintForeverString = text; + DMAudio.PlayFrontEndSound(SOUND_HUD, 0); + } return 0; } //case COMMAND_PRINT_HELP_FOREVER_WITH_NUMBER: @@ -744,10 +788,10 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_CHAR_CAN_BE_DAMAGED_BY_MEMBERS_OF_GANG: { CollectParameters(&m_nIp, 3); - CPed* pTarget = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pTarget = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pTarget); - uint8 flag = 1 << (uint8)ScriptParams[1]; - if (ScriptParams[2]) + uint8 flag = 1 << (uint8)GET_INTEGER_PARAM(1); + if (GET_INTEGER_PARAM(2)) pTarget->m_gangFlags |= flag; else pTarget->m_gangFlags &= ~flag; @@ -760,7 +804,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_CREATE_LOCKED_PROPERTY_PICKUP: { CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; char key[KEY_LENGTH_IN_SCRIPT]; @@ -768,14 +812,14 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) m_nIp += KEY_LENGTH_IN_SCRIPT; // TheText.Get(key); CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY, PICKUP_PROPERTY_LOCKED, 0, 0, false, key); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY, PICKUP_PROPERTY_LOCKED, 0, 0, false, key)); // TODO: gpModelIndices StoreParameters(&m_nIp, 1); return 0; } case COMMAND_CREATE_FORSALE_PROPERTY_PICKUP: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; char key[KEY_LENGTH_IN_SCRIPT]; @@ -783,24 +827,24 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) m_nIp += KEY_LENGTH_IN_SCRIPT; // TheText.Get(key); CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY_FORSALE, PICKUP_PROPERTY_FORSALE, ScriptParams[3], 0, false, key); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY_FORSALE, PICKUP_PROPERTY_FORSALE, GET_INTEGER_PARAM(3), 0, false, key)); // TODO: gpModelIndices StoreParameters(&m_nIp, 1); return 0; } case COMMAND_FREEZE_CAR_POSITION: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bIsFrozen = ScriptParams[1]; - pVehicle->bInfiniteMass = ScriptParams[1]; + pVehicle->bIsFrozen = GET_INTEGER_PARAM(1); + pVehicle->bInfiniteMass = GET_INTEGER_PARAM(1); return 0; } case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CHAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - CPed* pTestedPed = CPools::GetPedPool()->GetAt(ScriptParams[1]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pTestedPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); bool result = false; if (pPed) { if (pPed->m_lastDamEntity) { @@ -814,16 +858,75 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) UpdateCompareFlag(result); return 0; } - //case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CAR: - //case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CHAR: - //case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CAR: - //case COMMAND_GET_RADIO_CHANNEL: + case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CAR: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle* pTestedVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + bool result = false; + if (pPed) { + if (pPed->m_lastDamEntity) { + if (pPed->m_lastDamEntity == pTestedVehicle) + result = true; + } + } + else + debug("HAS_CHAR_BEEN_DAMAGED_BY_CAR - Character doesn't exist\n"); + UpdateCompareFlag(result); + return 0; + } + case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CHAR: + { + CollectParameters(&m_nIp, 2); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pTestedPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + bool result = false; + if (pVehicle) { + if (pVehicle->m_pLastDamageEntity) { + if (pVehicle->m_pLastDamageEntity == pTestedPed) + result = true; + if (pTestedPed->bInVehicle && pVehicle->m_pLastDamageEntity == pTestedPed->m_pMyVehicle) + result = true; + } + } + else + debug("HAS_CAR_BEEN_DAMAGED_BY_CHAR - Car doesn't exist\n"); + UpdateCompareFlag(result); + return 0; + } + case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CAR: + { + CollectParameters(&m_nIp, 2); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle* pTestedVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + bool result = false; + if (pVehicle) { + if (pVehicle->m_pLastDamageEntity) { + if (pVehicle->m_pLastDamageEntity == pTestedVehicle) + result = true; + } + } + else + debug("HAS_CAR_BEEN_DAMAGED_BY_CAR - First car doesn't exist\n"); + UpdateCompareFlag(result); + return 0; + } + case COMMAND_GET_RADIO_CHANNEL: + { + uint8 radio = DMAudio.GetRadioInCar(); + if (radio < NUM_RADIOS || radio == STREAMED_SOUND_MISSION_COMPLETED) + SET_INTEGER_PARAM(0, radio); + else + SET_INTEGER_PARAM(0, -1); + StoreParameters(&m_nIp, 1); + return 0; + } //case COMMAND_DISPLAY_TEXT_WITH_3_NUMBERS: //case COMMAND_IS_CAR_DROWNING_IN_WATER: case COMMAND_IS_CHAR_DROWNING_IN_WATER: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); UpdateCompareFlag(pPed && pPed->bIsDrowning); return 0; } @@ -837,7 +940,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) CollectParameters(&m_nIp, 3); bool shattered = false; - if ( CGlass::HasGlassBeenShatteredAtCoors(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2]) ) + if ( CGlass::HasGlassBeenShatteredAtCoors(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1), GET_FLOAT_PARAM(2)) ) shattered = true; UpdateCompareFlag(shattered); @@ -846,14 +949,14 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_ATTACH_CUTSCENE_OBJECT_TO_BONE: { CollectParameters(&m_nIp, 3); - CCutsceneMgr::AttachObjectToBone(CPools::GetObjectPool()->GetAt(ScriptParams[0]), CPools::GetObjectPool()->GetAt(ScriptParams[1]), ScriptParams[2]); + CCutsceneMgr::AttachObjectToBone(CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)), CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)), GET_INTEGER_PARAM(2)); return 0; } case COMMAND_ATTACH_CUTSCENE_OBJECT_TO_COMPONENT: { CollectParameters(&m_nIp, 2); - CObject *obj1 = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CObject *obj2 = CPools::GetObjectPool()->GetAt(ScriptParams[1]); + CObject *obj1 = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + CObject *obj2 = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(1)); char key[KEY_LENGTH_IN_SCRIPT]; CTheScripts::ReadTextLabelFromScript(&m_nIp, key); @@ -865,26 +968,26 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_CHAR_STAY_IN_CAR_WHEN_JACKED: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bStayInCarOnJack = ScriptParams[1]; + pPed->bStayInCarOnJack = GET_INTEGER_PARAM(1); return 0; } //case COMMAND_IS_MISSION_AUDIO_LOADING: case COMMAND_ADD_MONEY_SPENT_ON_WEAPONS: CollectParameters(&m_nIp, 1); - CStats::MoneySpentOnWeapons(ScriptParams[0]); + CStats::MoneySpentOnWeapons(GET_INTEGER_PARAM(0)); return 0; case COMMAND_ADD_MONEY_SPENT_ON_PROPERTY: CollectParameters(&m_nIp, 1); - CStats::MoneySpentOnProperty(ScriptParams[0]); + //CStats::MoneySpentOnProperty(GET_INTEGER_PARAM(0)); return 0; //case COMMAND_ADD_MONEY_SPENT_ON_AUTO_PAINTING: case COMMAND_SET_CHAR_ANSWERING_MOBILE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - if (ScriptParams[1]) + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + if (GET_INTEGER_PARAM(1)) pPed->SetAnswerMobile(); else pPed->ClearAnswerMobile(); @@ -893,8 +996,8 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_PLAYER_DRUNKENNESS: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - pPlayerInfo->m_pPed->m_nDrunkenness = ScriptParams[1]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayerInfo->m_pPed->m_nDrunkenness = GET_INTEGER_PARAM(1); pPlayerInfo->m_pPed->m_nFadeDrunkenness = 0; if (pPlayerInfo->m_pPed->m_nDrunkenness == 0) CMBlur::ClearDrunkBlur(); @@ -906,21 +1009,21 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) //case COMMAND_ADD_LOAN_SHARK_VISITS: case COMMAND_ADD_STORES_KNOCKED_OFF: CollectParameters(&m_nIp, 1); - CStats::NumOfStoresKnockedOff(ScriptParams[0]); + //CStats::NumOfStoresKnockedOff(GET_INTEGER_PARAM(0)); return 0; //case COMMAND_ADD_MOVIE_STUNTS: case COMMAND_ADD_NUMBER_OF_ASSASSINATIONS: CollectParameters(&m_nIp, 1); - CStats::NumOfAssassinations(ScriptParams[0]); + //CStats::NumOfAssassinations(GET_INTEGER_PARAM(0)); return 0; case COMMAND_ADD_PIZZAS_DELIVERED: CollectParameters(&m_nIp, 1); - CStats::NumOfPizzasDelivered(ScriptParams[0]); + CStats::NumOfPizzasDelivered(GET_INTEGER_PARAM(0)); return 0; //case COMMAND_ADD_GARBAGE_PICKUPS: case COMMAND_ADD_ICE_CREAMS_SOLD: CollectParameters(&m_nIp, 1); - CStats::NumOfIceCreamSold(ScriptParams[0]); + CStats::NumOfIceCreamSold(GET_INTEGER_PARAM(0)); return 0; //case COMMAND_SET_TOP_SHOOTING_RANGE_SCORE: //case COMMAND_ADD_SHOOTING_RANGE_RANK: @@ -930,15 +1033,15 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_CHAR_IN_PLAYERS_GROUP_CAN_FIGHT: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bDontFight = !ScriptParams[1]; + pPed->bDontFight = !GET_INTEGER_PARAM(1); return 0; } case COMMAND_CLEAR_CHAR_WAIT_STATE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->ClearWaitState(); return 0; @@ -948,17 +1051,17 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) CollectParameters(&m_nIp, 5); int handle = -1; uint32 i = CPools::GetVehiclePool()->GetSize(); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(3); while (i--) { CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); if (!pVehicle) continue; if (pVehicle->GetVehicleAppearance() != VEHICLE_APPEARANCE_CAR && pVehicle->GetVehicleAppearance() != VEHICLE_APPEARANCE_BIKE) continue; - if (ScriptParams[4] != pVehicle->GetModelIndex() && ScriptParams[4] >= 0) + if (GET_INTEGER_PARAM(4) != pVehicle->GetModelIndex() && GET_INTEGER_PARAM(4) >= 0) continue; if (pVehicle->VehicleCreatedBy != RANDOM_VEHICLE) continue; @@ -966,30 +1069,30 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) continue; handle = CPools::GetVehiclePool()->GetIndex(pVehicle); } - ScriptParams[0] = handle; + SET_INTEGER_PARAM(0, handle); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_SET_CAN_BURST_CAR_TYRES: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - pVehicle->bTyresDontBurst = !ScriptParams[1]; + pVehicle->bTyresDontBurst = !GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_PLAYER_AUTO_AIM: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - pPed->bDoomAim = ScriptParams[1]; + pPed->bDoomAim = GET_INTEGER_PARAM(1); return 0; } case COMMAND_FIRE_HUNTER_GUN: { CollectParameters(&m_nIp, 1); - CVehicle *pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle *pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nGunFiringTime + 150) { CWeapon gun(WEAPONTYPE_HELICANNON, 5000); CVector worldGunPos = (pVehicle->GetMatrix() * vecHunterGunPos) + (CTimer::GetTimeStep() * pVehicle->m_vecMoveSpeed); @@ -1002,27 +1105,27 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) } case COMMAND_SET_PROPERTY_AS_OWNED: CollectParameters(&m_nIp, 1); - CStats::AddPropertyAsOwned(ScriptParams[0]); + CStats::AddPropertyAsOwned(GET_INTEGER_PARAM(0)); return 0; case COMMAND_ADD_BLOOD_RING_KILLS: CollectParameters(&m_nIp, 1); - CStats::AddNumBloodRingKills(ScriptParams[0]); + CStats::AddNumBloodRingKills(GET_INTEGER_PARAM(0)); return 0; case COMMAND_SET_LONGEST_TIME_IN_BLOOD_RING: CollectParameters(&m_nIp, 1); - CStats::LongestTimeInBloodRing(ScriptParams[0]); + CStats::LongestTimeInBloodRing(GET_INTEGER_PARAM(0)); return 0; case COMMAND_REMOVE_EVERYTHING_FOR_HUGE_CUTSCENE: { - CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver(); + //CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver(); return 0; } case COMMAND_IS_PLAYER_TOUCHING_VEHICLE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); CPhysical* pTestedEntity = pPed; if (pPed->bInVehicle && pPed->m_pMyVehicle) pTestedEntity = pPed->m_pMyVehicle; @@ -1033,15 +1136,15 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_CHECK_FOR_PED_MODEL_AROUND_PLAYER: { CollectParameters(&m_nIp, 6); - CVector d1 = CWorld::Players[ScriptParams[0]].GetPos() - *(CVector*)&ScriptParams[1]; - CVector d2 = CWorld::Players[ScriptParams[0]].GetPos() + *(CVector*)&ScriptParams[1]; + CVector d1 = CWorld::Players[GET_INTEGER_PARAM(0)].GetPos() - GET_VECTOR_PARAM(1); + CVector d2 = CWorld::Players[GET_INTEGER_PARAM(0)].GetPos() + GET_VECTOR_PARAM(1); int i = CPools::GetPedPool()->GetSize(); bool result = false; while (i--) { CPed* pPed = CPools::GetPedPool()->GetSlot(i); if (!pPed) continue; - if (ScriptParams[4] != pPed->GetModelIndex() && ScriptParams[5] != pPed->GetModelIndex()) + if (GET_INTEGER_PARAM(4) != pPed->GetModelIndex() && GET_INTEGER_PARAM(5) != pPed->GetModelIndex()) continue; if (pPed->IsWithinArea(d1.x, d1.y, d1.z, d2.x, d2.y, d2.z)) result = true; @@ -1052,7 +1155,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_CLEAR_CHAR_FOLLOW_PATH: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); if (pPed->GetPedState() == PED_FOLLOW_PATH) { pPed->RestorePreviousState(); @@ -1063,15 +1166,15 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_CHAR_CAN_BE_SHOT_IN_VEHICLE: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bCanBeShotInVehicle = ScriptParams[1]; + pPed->bCanBeShotInVehicle = GET_INTEGER_PARAM(1); return 0; } case COMMAND_ATTACH_CUTSCENE_OBJECT_TO_VEHICLE: { CollectParameters(&m_nIp, 2); - CCutsceneMgr::AttachObjectToParent(CPools::GetObjectPool()->GetAt(ScriptParams[0]), CPools::GetVehiclePool()->GetAt(ScriptParams[1])); + CCutsceneMgr::AttachObjectToParent(CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)), CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1))); return 0; } case COMMAND_LOAD_MISSION_TEXT: @@ -1085,39 +1188,48 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_TONIGHTS_EVENT: { CollectParameters(&m_nIp, 1); - CScrollBar::TonightsEvent = ScriptParams[0]; + CScrollBar::TonightsEvent = GET_INTEGER_PARAM(0); return 0; } case COMMAND_CLEAR_CHAR_LAST_DAMAGE_ENTITY: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); if (pPed) pPed->m_lastDamEntity = nil; else debug("CLEAR_CHAR_LAST_DAMAGE_ENTITY - Character doesn't exist\n"); return 0; } - //case COMMAND_CLEAR_CAR_LAST_DAMAGE_ENTITY: + case COMMAND_CLEAR_CAR_LAST_DAMAGE_ENTITY: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + if (pVehicle) + pVehicle->m_pLastDamageEntity = nil; + else + debug("CLEAR_CAR_LAST_DAMAGE_ENTITY - Car doesn't exist\n"); + return 0; + } case COMMAND_FREEZE_OBJECT_POSITION: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->bIsFrozen = ScriptParams[1]; - pObject->bInfiniteMass = ScriptParams[1]; + pObject->bIsFrozen = GET_INTEGER_PARAM(1); + pObject->bInfiniteMass = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_PLAYER_HAS_MET_DEBBIE_HARRY: { CollectParameters(&m_nIp, 1); - CTheScripts::bPlayerHasMetDebbieHarry = ScriptParams[0]; + CTheScripts::bPlayerHasMetDebbieHarry = GET_INTEGER_PARAM(0); return 0; } case COMMAND_SET_RIOT_INTENSITY: { CollectParameters(&m_nIp, 1); - CTheScripts::RiotIntensity = ScriptParams[0]; + CTheScripts::RiotIntensity = GET_INTEGER_PARAM(0); return 0; } //case COMMAND_IS_CAR_IN_ANGLED_AREA_2D: @@ -1127,27 +1239,28 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) { CollectParameters(&m_nIp, 8); CGameLogic::SetUpShortCut( - *(CVector*)&ScriptParams[0], *(float*)&ScriptParams[3], - *(CVector*)&ScriptParams[4], *(float*)&ScriptParams[7]); + GET_VECTOR_PARAM(0), GET_FLOAT_PARAM(3), + GET_VECTOR_PARAM(4), GET_FLOAT_PARAM(7)); return 0; } case COMMAND_CLEAR_TAXI_SHORTCUT: CGameLogic::ClearShortCut(); + CGameLogic::RemoveShortCutDropOffPointForMission(); return 0; //case COMMAND_SET_CHAR_OBJ_GOTO_CAR_ON_FOOT: //case COMMAND_GET_CLOSEST_WATER_NODE: case COMMAND_ADD_PORN_LEAFLET_TO_RUBBISH: CollectParameters(&m_nIp, 1); - CStats::PamphletMissionPassed = ScriptParams[0]; + CStats::PamphletMissionPassed = GET_INTEGER_PARAM(0); return 0; case COMMAND_CREATE_CLOTHES_PICKUP: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_PICKUP_CLOTHES, PICKUP_ON_STREET, ScriptParams[3]); + SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_CLOTHES, PICKUP_ON_STREET, GET_INTEGER_PARAM(3))); // TODO: gpModelIndices StoreParameters(&m_nIp, 1); return 0; } @@ -1155,30 +1268,32 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_MAKE_PLAYER_FIRE_PROOF: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - pPlayerInfo->m_bFireproof = ScriptParams[1]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayerInfo->m_bFireproof = GET_INTEGER_PARAM(1); return 0; } case COMMAND_INCREASE_PLAYER_MAX_HEALTH: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - pPlayerInfo->m_nMaxHealth += ScriptParams[1]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayerInfo->m_nMaxHealth += GET_INTEGER_PARAM(1); pPlayerInfo->m_pPed->m_fHealth = pPlayerInfo->m_nMaxHealth; + CHud::m_ItemToFlash = ITEM_HEALTH; return 0; } case COMMAND_INCREASE_PLAYER_MAX_ARMOUR: { CollectParameters(&m_nIp, 2); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - pPlayerInfo->m_nMaxArmour += ScriptParams[1]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + pPlayerInfo->m_nMaxArmour += GET_INTEGER_PARAM(1); pPlayerInfo->m_pPed->m_fArmour = pPlayerInfo->m_nMaxArmour; + CHud::m_ItemToFlash = ITEM_ARMOUR; return 0; } case COMMAND_CREATE_RANDOM_CHAR_AS_DRIVER: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); CPed* pPed = CPopulation::AddPedInCar(pVehicle, true); pPed->CharCreatedBy = MISSION_CHAR; pPed->bRespondsToThreats = false; @@ -1200,16 +1315,16 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) pVehicle->bEngineOn = true; pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); CPopulation::ms_nTotalMissionPeds++; - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPed); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPed)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_CREATE_RANDOM_CHAR_AS_PASSENGER: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); CPed* pPed = CPopulation::AddPedInCar(pVehicle, false); pPed->CharCreatedBy = MISSION_CHAR; pPed->bRespondsToThreats = false; @@ -1221,8 +1336,8 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) pPed->SetOrientation(0.0f, 0.0f, 0.0f); CPopulation::ms_nTotalMissionPeds++; pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition()); - if (ScriptParams[1] >= 0) - pVehicle->AddPassenger(pPed, ScriptParams[1]); + if (GET_INTEGER_PARAM(1) >= 0) + pVehicle->AddPassenger(pPed, GET_INTEGER_PARAM(1)); else pVehicle->AddPassenger(pPed); @@ -1230,32 +1345,32 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) pPed->m_pMyVehicle->RegisterReference((CEntity**)&pPed->m_pMyVehicle); pPed->bInVehicle = true; pPed->SetPedState(PED_DRIVING); - ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPed); + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex(pPed)); StoreParameters(&m_nIp, 1); if (m_bIsMissionScript) - CTheScripts::MissionCleanUp.AddEntityToList(ScriptParams[0], CLEANUP_CHAR); + CTheScripts::MissionCleanUp.AddEntityToList(GET_INTEGER_PARAM(0), CLEANUP_CHAR); return 0; } case COMMAND_SET_CHAR_IGNORE_THREATS_BEHIND_OBJECTS: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bIgnoreThreatsBehindObjects = ScriptParams[1]; + pPed->bIgnoreThreatsBehindObjects = GET_INTEGER_PARAM(1); return 0; } case COMMAND_ENSURE_PLAYER_HAS_DRIVE_BY_WEAPON: { CollectParameters(&m_nIp, 2); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); if (pPed->bInVehicle) { if (pPed->GetWeapon(WEAPONSLOT_SUBMACHINEGUN).m_eWeaponType) { - if (pPed->GetWeapon(WEAPONSLOT_SUBMACHINEGUN).m_nAmmoTotal < ScriptParams[1]) - pPed->SetAmmo(pPed->GetWeapon(WEAPONSLOT_SUBMACHINEGUN).m_eWeaponType, ScriptParams[1]); + if (pPed->GetWeapon(WEAPONSLOT_SUBMACHINEGUN).m_nAmmoTotal < GET_INTEGER_PARAM(1)) + pPed->SetAmmo(pPed->GetWeapon(WEAPONSLOT_SUBMACHINEGUN).m_eWeaponType, GET_INTEGER_PARAM(1)); } else { - pPed->GiveWeapon(WEAPONTYPE_UZI, ScriptParams[1], true); + pPed->GiveWeapon(WEAPONTYPE_UZI, GET_INTEGER_PARAM(1), true); if (pPed->m_storedWeapon == WEAPONTYPE_UNIDENTIFIED) pPed->m_storedWeapon = pPed->GetWeapon()->m_eWeaponType; pPed->SetCurrentWeapon(WEAPONTYPE_UZI); @@ -1266,7 +1381,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_MAKE_HELI_COME_CRASHING_DOWN: { CollectParameters(&m_nIp, 1); - CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pHeli && pHeli->IsCar() && pHeli->IsRealHeli()); pHeli->bHeliDestroyed = true; return 0; @@ -1274,24 +1389,24 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_ADD_EXPLOSION_NO_SOUND: { CollectParameters(&m_nIp, 4); - CExplosion::AddExplosion(nil, nil, (eExplosionType)ScriptParams[3], *(CVector*)&ScriptParams[0], 0, false); + CExplosion::AddExplosion(nil, nil, (eExplosionType)GET_INTEGER_PARAM(3), GET_VECTOR_PARAM(0), 0, false); return 0; } case COMMAND_SET_OBJECT_AREA_VISIBLE: { CollectParameters(&m_nIp, 2); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); - pObject->m_area = ScriptParams[1]; + pObject->m_area = GET_INTEGER_PARAM(1); return 0; } //case COMMAND_WAS_VEHICLE_EVER_POLICE: case COMMAND_SET_CHAR_NEVER_TARGETTED: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bNeverEverTargetThisPed = ScriptParams[1]; + pPed->bNeverEverTargetThisPed = GET_INTEGER_PARAM(1); return 0; } case COMMAND_LOAD_UNCOMPRESSED_ANIM: @@ -1310,7 +1425,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_CHAR_CROUCH_WHEN_THREATENED: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); pPed->bCrouchWhenScared = true; return 0; @@ -1318,7 +1433,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_IS_CHAR_IN_ANY_POLICE_VEHICLE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle && pPed->m_pMyVehicle->IsLawEnforcementVehicle() && @@ -1327,27 +1442,42 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) } case COMMAND_DOES_CHAR_EXIST: CollectParameters(&m_nIp, 1); - UpdateCompareFlag(CPools::GetPedPool()->GetAt(ScriptParams[0]) != 0); + UpdateCompareFlag(CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)) != 0); return 0; - //case COMMAND_DOES_VEHICLE_EXIST: + case COMMAND_DOES_VEHICLE_EXIST: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + bool bExist = false; + if (pVehicle) { + int index = GET_INTEGER_PARAM(0) >> 8; +#ifdef FIX_BUGS + bExist = (index >= 0 && index < NUMVEHICLES); // epic fail +#else + bExist = (index > 0 && index < NUMVEHICLES); +#endif + } + UpdateCompareFlag(bExist); + return 0; + } //case COMMAND_ADD_SHORT_RANGE_BLIP_FOR_CONTACT_POINT: case COMMAND_ADD_SHORT_RANGE_SPRITE_BLIP_FOR_CONTACT_POINT: { CollectParameters(&m_nIp, 4); - CVector pos = *(CVector*)&ScriptParams[0]; + CVector pos = GET_VECTOR_PARAM(0); if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); CRadar::GetActualBlipArrayIndex(CollectNextParameterWithoutIncreasingPC(m_nIp)); int id = CRadar::SetShortRangeCoordBlip(BLIP_COORD, pos, 2, BLIP_DISPLAY_BOTH); - CRadar::SetBlipSprite(id, ScriptParams[3]); - ScriptParams[0] = id; + CRadar::SetBlipSprite(id, GET_INTEGER_PARAM(3)); + SET_INTEGER_PARAM(0, id); StoreParameters(&m_nIp, 1); return 0; } case COMMAND_IS_CHAR_STUCK: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->m_nWaitState == WAITSTATE_STUCK); return 0; @@ -1355,15 +1485,15 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_SET_ALL_TAXIS_HAVE_NITRO: { CollectParameters(&m_nIp, 1); - CVehicle::bAllTaxisHaveNitro = ScriptParams[0] != 0; + CVehicle::bAllTaxisHaveNitro = GET_INTEGER_PARAM(0) != 0; return 0; } case COMMAND_SET_CHAR_STOP_SHOOT_DONT_SEEK_ENTITY: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pPed->bKindaStayInSamePlace = true; pPed->bStopAndShoot = true; } @@ -1377,9 +1507,9 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command) case COMMAND_FREEZE_CAR_POSITION_AND_DONT_LOAD_COLLISION: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pVehicle->bIsFrozen = true; pVehicle->bInfiniteMass = true; if (m_bIsMissionScript) { diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 56d7ed90..38c28069 100644 --- a/src/control/Script8.cpp +++ b/src/control/Script8.cpp @@ -4,7 +4,7 @@ #include "ScriptCommands.h" #include "DMAudio.h" -#if ((defined GTAVC_JP_PATCH || defined SUPPORT_JAPANESE_SCRIPT) && defined MORE_LANGUAGES) +#ifdef MORE_LANGUAGES #include "Frontend.h" #endif #include "GameLogic.h" @@ -12,13 +12,10 @@ #ifdef MISSION_REPLAY #include "GenericGameStorage.h" #endif -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) -#include "General.h" -#include "maths.h" -#endif #include "Hud.h" #include "Pad.h" #include "PedAttractor.h" +#include "Pickups.h" #include "Population.h" #include "Pools.h" #include "RpAnimBlend.h" @@ -29,19 +26,20 @@ #include "World.h" #include "Zones.h" +// LCS: file done except TODOs (also check commented out strings) + int8 CRunningScript::ProcessCommands1400To1499(int32 command) { switch (command) { case COMMAND_REGISTER_VIGILANTE_LEVEL: CollectParameters(&m_nIp, 1); - CStats::RegisterLevelVigilanteMission(ScriptParams[0]); + CStats::RegisterLevelVigilanteMission(GET_INTEGER_PARAM(0)); return 0; case COMMAND_CLEAR_ALL_CHAR_ANIMS: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); - script_assert(pPed); - if (!pPed->bInVehicle) { + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + if (pPed && pPed->GetPedState() != PED_DRIVING && pPed->GetPedState() != PED_AIM_GUN) { pPed->m_pVehicleAnim = nil; pPed->RestartNonPartialAnims(); RpAnimBlendClumpRemoveAllAssociations(pPed->GetClump()); @@ -62,7 +60,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } case COMMAND_SET_MAXIMUM_NUMBER_OF_CARS_IN_GARAGE: CollectParameters(&m_nIp, 2); - CGarages::SetMaxNumStoredCarsForGarage(ScriptParams[0], ScriptParams[1]); + CGarages::SetMaxNumStoredCarsForGarage(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_WANTED_STARS_ARE_FLASHING: { @@ -72,25 +70,25 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } case COMMAND_SET_ALLOW_HURRICANES: CollectParameters(&m_nIp, 1); - CStats::NoMoreHurricanes = ScriptParams[0]; + CStats::NoMoreHurricanes = GET_INTEGER_PARAM(0); return 0; case COMMAND_PLAY_ANNOUNCEMENT: { CollectParameters(&m_nIp, 1); - DMAudio.PlayRadioAnnouncement(ScriptParams[0] + STREAMED_SOUND_ANNOUNCE_BRIDGE_CLOSED); + DMAudio.PlayRadioAnnouncement(GET_INTEGER_PARAM(0) + STREAMED_SOUND_NEWS_A); return 0; } case COMMAND_SET_PLAYER_IS_IN_STADIUM: { CollectParameters(&m_nIp, 1); - CTheScripts::bPlayerIsInTheStatium = ScriptParams[0]; + CTheScripts::bPlayerIsInTheStatium = GET_INTEGER_PARAM(0); return 0; } case COMMAND_GET_BUS_FARES_COLLECTED_BY_PLAYER: { CollectParameters(&m_nIp, 1); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; - ScriptParams[0] = pPlayerInfo->m_pPed->m_nLastBusFareCollected; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; + SET_INTEGER_PARAM(0, pPlayerInfo->m_pPed->m_nLastBusFareCollected); pPlayerInfo->m_pPed->m_nLastBusFareCollected = 0; StoreParameters(&m_nIp, 1); return 0; @@ -98,11 +96,11 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_SET_CHAR_OBJ_BUY_ICE_CREAM: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); script_assert(pVehicle); - ScriptParams[0] = 0; + SET_INTEGER_PARAM(0, 0); if (pPed->m_objective == OBJECTIVE_NONE && !pPed->bHasAlreadyUsedAttractor) { C2dEffect* pEffect = (C2dEffect*)GetPedAttractorManager()->GetEffectForIceCreamVan(pVehicle, pPed->GetPosition()); // has to be casted, because inner methods are const if (pEffect) { @@ -111,7 +109,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) if ((pPed->GetPosition() - pos).MagnitudeSqr() < SQR(20.0f)) { if (GetPedAttractorManager()->HasEmptySlot(pEffect) && GetPedAttractorManager()->IsApproachable(pEffect, pVehicle->GetMatrix(), 0, pPed)) { if (GetPedAttractorManager()->RegisterPedWithAttractor(pPed, pEffect, pVehicle->GetMatrix())) - ScriptParams[0] = 1; + SET_INTEGER_PARAM(0, 1); } } } @@ -121,16 +119,17 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } case COMMAND_DISPLAY_RADAR: CollectParameters(&m_nIp, 1); - CHud::m_HideRadar = ScriptParams[0] == 0; + CHud::m_HideRadar = GET_INTEGER_PARAM(0) == 0; + // on PS2 two flags are set, on mobile none return 0; case COMMAND_REGISTER_BEST_POSITION: CollectParameters(&m_nIp, 2); - CStats::RegisterBestPosition(ScriptParams[0], ScriptParams[1]); + CStats::RegisterBestPosition(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); return 0; case COMMAND_IS_PLAYER_IN_INFO_ZONE: { CollectParameters(&m_nIp, 1); - CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; + CPlayerInfo* pPlayerInfo = &CWorld::Players[GET_INTEGER_PARAM(0)]; char key[KEY_LENGTH_IN_SCRIPT]; memset(key, 0, KEY_LENGTH_IN_SCRIPT); CTheScripts::ReadTextLabelFromScript(&m_nIp, key); @@ -143,7 +142,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_CLEAR_CHAR_ICE_CREAM_PURCHASE: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); if (pPed->m_attractor) GetPedAttractorManager()->DeRegisterPed(pPed, pPed->m_attractor); @@ -155,7 +154,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_HAS_CHAR_ATTEMPTED_ATTRACTOR: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bHasAlreadyUsedAttractor); return 0; @@ -163,9 +162,9 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_SET_LOAD_COLLISION_FOR_CAR_FLAG: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pVehicle->bDontLoadCollision = false; if (m_bMissionFlag) { CWorld::Remove(pVehicle); @@ -186,9 +185,9 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_SET_LOAD_COLLISION_FOR_CHAR_FLAG: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - if (ScriptParams[1]) { + if (GET_INTEGER_PARAM(1)) { pPed->bDontLoadCollision = false; if (m_bMissionFlag) { CWorld::Remove(pPed); @@ -210,31 +209,31 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_ADD_BIG_GUN_FLASH: { CollectParameters(&m_nIp, 6); - CWeapon::AddGunFlashBigGuns(*(CVector*)&ScriptParams[0], *(CVector*)&ScriptParams[3]); + CWeapon::AddGunFlashBigGuns(GET_VECTOR_PARAM(0), GET_VECTOR_PARAM(3)); return 0; } case COMMAND_HAS_CHAR_BOUGHT_ICE_CREAM: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(pPed->bBoughtIceCream); return 0; } case COMMAND_GET_PROGRESS_PERCENTAGE: - *(float*)&ScriptParams[0] = CStats::GetPercentageProgress(); + SET_FLOAT_PARAM(0, CStats::GetPercentageProgress()); StoreParameters(&m_nIp, 1); return 0; case COMMAND_SET_SHORTCUT_PICKUP_POINT: { CollectParameters(&m_nIp, 4); - CGameLogic::AddShortCutPointAfterDeath(*(CVector*)&ScriptParams[0], *(float*)&ScriptParams[3]); + CGameLogic::AddShortCutPointAfterDeath(GET_VECTOR_PARAM(0), GET_FLOAT_PARAM(3)); return 0; } case COMMAND_SET_SHORTCUT_DROPOFF_POINT_FOR_MISSION: { CollectParameters(&m_nIp, 4); - CGameLogic::AddShortCutDropOffPointForMission(*(CVector*)&ScriptParams[0], *(float*)&ScriptParams[3]); + CGameLogic::AddShortCutDropOffPointForMission(GET_VECTOR_PARAM(0), GET_FLOAT_PARAM(3)); return 0; } case COMMAND_GET_RANDOM_ICE_CREAM_CUSTOMER_IN_AREA: @@ -242,10 +241,10 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) CollectParameters(&m_nIp, 7); int ped_handle = -1; CVector pos = FindPlayerCoors(); - float x1 = *(float*)&ScriptParams[0]; - float y1 = *(float*)&ScriptParams[1]; - float x2 = *(float*)&ScriptParams[2]; - float y2 = *(float*)&ScriptParams[3]; + float x1 = GET_FLOAT_PARAM(0); + float y1 = GET_FLOAT_PARAM(1); + float x2 = GET_FLOAT_PARAM(2); + float y2 = GET_FLOAT_PARAM(3); int i = CPools::GetPedPool()->GetSize(); while (--i && ped_handle == -1) { CPed* pPed = CPools::GetPedPool()->GetSlot(i); @@ -267,7 +266,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) continue; if (pPed->m_attractor) continue; - if (!ThisIsAValidRandomPed(pPed->m_nPedType, ScriptParams[4], ScriptParams[5], ScriptParams[6])) + if (!ThisIsAValidRandomPed(pPed->m_nPedType, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6))) continue; if (pPed->bIsLeader || pPed->m_leader) continue; @@ -285,7 +284,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) if (m_bIsMissionScript) CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); } - ScriptParams[0] = ped_handle; + SET_INTEGER_PARAM(0, ped_handle); StoreParameters(&m_nIp, 1); return 0; } @@ -294,10 +293,10 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 4); uint32 i = CPools::GetVehiclePool()->GetSize(); - float infX = *(float*)&ScriptParams[0]; - float infY = *(float*)&ScriptParams[1]; - float supX = *(float*)&ScriptParams[2]; - float supY = *(float*)&ScriptParams[3]; + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(3); while (i--) { CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); if (!pVehicle) @@ -309,22 +308,23 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } case COMMAND_SET_GANG_ATTACK_PLAYER_WITH_COPS: CollectParameters(&m_nIp, 2); - CGangs::SetWillAttackPlayerWithCops((ePedType)((int)PEDTYPE_GANG1 + ScriptParams[0]), !!ScriptParams[1]); + CGangs::SetWillAttackPlayerWithCops((ePedType)((int)PEDTYPE_GANG1 + GET_INTEGER_PARAM(0)), !!GET_INTEGER_PARAM(1)); return 0; case COMMAND_SET_CHAR_FRIGHTENED_IN_JACKED_CAR: { CollectParameters(&m_nIp, 2); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); - pPed->bHeldHostageInCar = ScriptParams[1]; + pPed->bHeldHostageInCar = GET_INTEGER_PARAM(1); + pPed->b1A4_2 = GET_INTEGER_PARAM(1); return 0; } case COMMAND_SET_VEHICLE_TO_FADE_IN: { CollectParameters(&m_nIp, 2); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); - CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), ScriptParams[1]); + CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), GET_INTEGER_PARAM(1)); return 0; } case COMMAND_REGISTER_ODDJOB_MISSION_PASSED: @@ -336,7 +336,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_IS_PLAYER_IN_SHORTCUT_TAXI: { CollectParameters(&m_nIp, 1); - CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; + CPed* pPed = CWorld::Players[GET_INTEGER_PARAM(0)].m_pPed; script_assert(pPed); UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle && pPed->m_pMyVehicle == CGameLogic::pShortCutTaxi); return 0; @@ -344,7 +344,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_IS_CHAR_DUCKING: { CollectParameters(&m_nIp, 1); - CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pPed); UpdateCompareFlag(RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_DUCK_DOWN) != nil); return 0; @@ -352,24 +352,24 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI: { CollectParameters(&m_nIp, 3); - CObject* pHeli = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pHeli = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); bool found = false; float waterLevel = -1000.0f; CVector pos = pHeli->GetPosition(); - float radius = *(float*)&ScriptParams[1]; + float radius = GET_FLOAT_PARAM(1); float ground = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &found); if (!CWaterLevel::GetWaterLevel(pos.x, pos.y, pos.z, &waterLevel, false)) waterLevel = 0.0f; if (waterLevel > ground) ground = waterLevel; - if (ScriptParams[2] > 8) - ScriptParams[2] = 8; - CVehicle::HeliDustGenerate(pHeli, (pos.z - ground - 1.0f - radius) * 0.3 + radius, ground, ScriptParams[2]); + if (GET_INTEGER_PARAM(2) > 8) + SET_INTEGER_PARAM(2, 8); + CVehicle::HeliDustGenerate(pHeli, (pos.z - ground - 1.0f - radius) * 0.3 + radius, ground, GET_INTEGER_PARAM(2)); return 0; } case COMMAND_REGISTER_FIRE_LEVEL: CollectParameters(&m_nIp, 1); - CStats::RegisterLevelFireMission(ScriptParams[0]); + CStats::RegisterLevelFireMission(GET_INTEGER_PARAM(0)); return 0; case COMMAND_IS_AUSTRALIAN_GAME: UpdateCompareFlag(false); // should we make some check? @@ -377,14 +377,13 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_DISARM_CAR_BOMB: { CollectParameters(&m_nIp, 1); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); if (pVehicle->m_bombType != CARBOMB_NONE) { pVehicle->m_bombType = CARBOMB_NONE; pVehicle->m_pBombRigger = nil; } return 0; } -#if (defined GTAVC_JP_PATCH || defined SUPPORT_JAPANESE_SCRIPT) case COMMAND_IS_JAPANESE_GAME: #ifdef MORE_LANGUAGES UpdateCompareFlag(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_JAPANESE); @@ -394,220 +393,404 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) UpdateCompareFlag(false); #endif return 0; -#elif (!defined GTA_PS2) - case COMMAND_SET_ONSCREEN_COUNTER_FLASH_WHEN_FIRST_DISPLAYED: + case COMMAND_1442: + CollectParameters(&m_nIp, 4); + return 0; + //case COMMAND_1443: + case COMMAND_GET_DISTANCE_BETWEEN_2D_POINTS: { - script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); - uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); - CollectParameters(&m_nIp, 1); - //CUserDisplay::OnscnTimer.SetCounterFlashWhenFirstDisplayed(var, ScriptParams[0]); + CollectParameters(&m_nIp, 4); + float X1 = GET_FLOAT_PARAM(0); + float Y1 = GET_FLOAT_PARAM(1); + float X2 = GET_FLOAT_PARAM(2); + float Y2 = GET_FLOAT_PARAM(3); + float fDistance = Sqrt((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2)); + SET_FLOAT_PARAM(0, fDistance); + StoreParameters(&m_nIp, 1); return 0; } -#endif -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - case COMMAND_SHUFFLE_CARD_DECKS: + case COMMAND_GET_DISTANCE_BETWEEN_3D_POINTS: { - CollectParameters(&m_nIp, 1); - script_assert(ScriptParams[0] >= 0 && ScriptParams[0] <= 6); - for (int i = 0; i < CARDS_IN_STACK; i++) - CTheScripts::CardStack[i] = 0; - int16 seq[CARDS_IN_STACK]; - for (int i = 0; i < MAX_DECKS * CARDS_IN_DECK; i++) - seq[i] = i; - int cards_left = CARDS_IN_DECK * ScriptParams[0]; - for (int k = 1; k < CARDS_IN_DECK + 1; k++) { - for (int deck = 0; deck < ScriptParams[0]; deck++) { - int index = CGeneral::GetRandomNumberInRange(0, cards_left); - CTheScripts::CardStack[seq[index]] = k; - for (int l = index; l < cards_left; l++) { - if (l + 1 < CARDS_IN_STACK) - seq[l] = seq[l + 1]; - else - seq[l] = 0; - } - --cards_left; - } - } - CTheScripts::CardStackPosition = 0; + CollectParameters(&m_nIp, 6); + float X1 = GET_FLOAT_PARAM(0); + float Y1 = GET_FLOAT_PARAM(1); + float Z1 = GET_FLOAT_PARAM(2); + float X2 = GET_FLOAT_PARAM(3); + float Y2 = GET_FLOAT_PARAM(4); + float Z2 = GET_FLOAT_PARAM(5); + float fDistance = Sqrt((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2) + (Z1 - Z2) * (Z1 - Z2)); + SET_FLOAT_PARAM(0, fDistance); + StoreParameters(&m_nIp, 1); return 0; } - case COMMAND_FETCH_NEXT_CARD: + case COMMAND_DOT_PRODUCT_2D: { - if (CTheScripts::CardStack[CTheScripts::CardStackPosition] == 0) - CTheScripts::CardStackPosition = 0; - ScriptParams[0] = CTheScripts::CardStack[CTheScripts::CardStackPosition++]; - if (CTheScripts::CardStackPosition == CARDS_IN_DECK * MAX_DECKS) - CTheScripts::CardStackPosition = 0; + CollectParameters(&m_nIp, 4); + float X1 = GET_FLOAT_PARAM(0); + float Y1 = GET_FLOAT_PARAM(1); + float X2 = GET_FLOAT_PARAM(2); + float Y2 = GET_FLOAT_PARAM(3); + float fDistance = X1 * X2 + Y1 * Y2; + SET_FLOAT_PARAM(0, fDistance); StoreParameters(&m_nIp, 1); return 0; } - case COMMAND_GET_OBJECT_VELOCITY: + case COMMAND_DOT_PRODUCT_3D: { - CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(CVector*)&ScriptParams[0] = GAME_SPEED_TO_METERS_PER_SECOND * pObject->GetMoveSpeed(); - StoreParameters(&m_nIp, 3); + CollectParameters(&m_nIp, 6); + float X1 = GET_FLOAT_PARAM(0); + float Y1 = GET_FLOAT_PARAM(1); + float Z1 = GET_FLOAT_PARAM(2); + float X2 = GET_FLOAT_PARAM(3); + float Y2 = GET_FLOAT_PARAM(4); + float Z2 = GET_FLOAT_PARAM(5); + float fDistance = X1 * X2 + Y1 * Y2 + Z1 * Z2; + SET_FLOAT_PARAM(0, fDistance); + StoreParameters(&m_nIp, 1); return 0; } - case COMMAND_IS_DEBUG_CAMERA_ON: - UpdateCompareFlag(TheCamera.WorldViewerBeingUsed); + case COMMAND_DEBUG_PRINT_WITH_1_FLOAT: return 0; - case COMMAND_ADD_TO_OBJECT_ROTATION_VELOCITY: + case COMMAND_DEBUG_PRINT_WITH_2_FLOATS: + return 0; + case COMMAND_DEBUG_PRINT_WITH_3_FLOATS: + return 0; + case COMMAND_GET_PAD_BUTTON_STATE: { - CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CVector newSpeed = pObject->GetTurnSpeed() + *(CVector*)&ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; - if (pObject->bIsStatic) { - pObject->SetIsStatic(false); - pObject->AddToMovingList(); + CollectParameters(&m_nIp, 1); + switch (GET_INTEGER_PARAM(0)) { + case 0: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetOddJobTrigger()); break; + case 1: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetBrake()); break; + case 2: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetSteeringLeftRight()); break; + case 3: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetSteeringUpDown()); break; + case 4: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetCarGunLeftRight()); break; + case 5: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetCarGunUpDown()); break; + case 6: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetPedWalkLeftRight()); break; + case 7: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetPedWalkUpDown()); break; + case 8: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetLookLeft()); break; + case 9: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetLookRight()); break; + case 10: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetLookBehindForCar()); break; + case 11: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetLookBehindForPed()); break; + case 12: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetHorn()); break; + case 13: SET_INTEGER_PARAM(0, CPad::GetPad(0)->HornJustDown()); break; + case 14: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetCarGunFired()); break; + case 15: SET_INTEGER_PARAM(0, CPad::GetPad(0)->CarGunJustDown()); break; + case 16: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetHandBrake()); break; + case 17: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetBrake()); break; + case 18: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetExitVehicle()); break; + case 19: SET_INTEGER_PARAM(0, CPad::GetPad(0)->ExitVehicleJustDown()); break; + case 20: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetWeapon()); break; + case 21: SET_INTEGER_PARAM(0, CPad::GetPad(0)->WeaponJustDown()); break; + case 22: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetAccelerate()); break; + case 23: SET_INTEGER_PARAM(0, CPad::GetPad(0)->CycleCameraModeUpJustDown()); break; + case 24: SET_INTEGER_PARAM(0, CPad::GetPad(0)->CycleWeaponLeftJustDown()); break; + case 25: SET_INTEGER_PARAM(0, CPad::GetPad(0)->CycleWeaponRightJustDown()); break; + case 26: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetTarget()); break; + case 27: SET_INTEGER_PARAM(0, CPad::GetPad(0)->TargetJustDown()); break; + case 28: SET_INTEGER_PARAM(0, CPad::GetPad(0)->JumpJustDown()); break; + case 29: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetSprint()); break; + case 30: SET_INTEGER_PARAM(0, CPad::GetPad(0)->ShiftTargetLeftJustDown()); break; + case 31: SET_INTEGER_PARAM(0, CPad::GetPad(0)->ForceCameraBehindPlayer()); break; + case 32: SET_INTEGER_PARAM(0, CPad::GetPad(0)->SniperZoomIn()); break; + case 33: SET_INTEGER_PARAM(0, CPad::GetPad(0)->SniperZoomOut()); break; + case 34: SET_INTEGER_PARAM(0, CPad::GetPad(0)->SniperModeLookLeftRight()); break; + case 35: SET_INTEGER_PARAM(0, CPad::GetPad(0)->SniperModeLookUpDown()); break; + case 36: SET_INTEGER_PARAM(0, CPad::GetPad(0)->LookAroundLeftRight()); break; + case 37: SET_INTEGER_PARAM(0, CPad::GetPad(0)->LookAroundUpDown()); break; + case 38: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiLeft()); break; + case 39: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiRight()); break; + case 40: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiUp()); break; + case 41: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiDown()); break; + case 42: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiSelect()); break; + case 43: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GuiBack()); break; + case 44: SET_INTEGER_PARAM(0, CPad::GetPad(0)->GetSkipCutscene()); if (GET_INTEGER_PARAM(0)) TheCamera.m_bIgnoreFadingStuffForMusic = false; break; // spectacular hack } - pObject->SetTurnSpeed(newSpeed.x, newSpeed.y, newSpeed.z); + StoreParameters(&m_nIp, 1); return 0; } - case COMMAND_SET_OBJECT_ROTATION_VELOCITY: + case COMMAND_SET_NAVIGATION_ARROW: { - CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CVector newSpeed = *(CVector*)&ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; - if (pObject->bIsStatic) { - pObject->SetIsStatic(false); - pObject->AddToMovingList(); - } - pObject->SetTurnSpeed(newSpeed.x, newSpeed.y, newSpeed.z); + CollectParameters(&m_nIp, 3); + // cNavArrow::SetTarget(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(0)); // TODO, although it's unused return 0; } - case COMMAND_IS_OBJECT_STATIC: + case COMMAND_CLEAR_NAVIGATION_ARROW: { - CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - UpdateCompareFlag(pObject->GetIsStatic()); + // cNavArrow::ClearTarget(); // TODO, although it's unused return 0; } - case COMMAND_GET_ANGLE_BETWEEN_2D_VECTORS: + case COMMAND_CALL: + case COMMAND_CALLNOT: { - CollectParameters(&m_nIp, 4); - CVector2D v1 = *(CVector2D*)&ScriptParams[0]; - CVector2D v2 = *(CVector2D*)&ScriptParams[2]; - float c = DotProduct2D(v1, v2) / (v1.Magnitude() * v2.Magnitude()); -#ifdef FIX_BUGS // command is a SA leftover where it was fixed to this - *(float*)&ScriptParams[0] = RADTODEG(Acos(c)); -#else - *(float*)&ScriptParams[0] = Acos(c); -#endif + m_anStack[m_nStackPointer++] = m_nIp | BIT(STACKVALUE_IS_FUNCTION_CALL_BIT) | ((command == COMMAND_CALLNOT) ? BIT(STACKVALUE_INVERT_RETURN_BIT) : 0); + uint8 nInputParams = CTheScripts::Read1ByteFromScript(&m_nIp); + uint8 nOutputParameters = CTheScripts::Read1ByteFromScript(&m_nIp); + uint8 nLocalsOffset = CTheScripts::Read1ByteFromScript(&m_nIp); + uint32 nIPBeforeParameters = m_nIp; + CollectParameters(&m_nIp, 1); + if (nInputParams) + CollectParameters(&m_nIp, nInputParams, &m_anLocalVariables[m_nLocalsPointer + nLocalsOffset]); + m_nLocalsPointer += nLocalsOffset; + m_anStack[m_nStackPointer - 1] |= (m_nIp - nIPBeforeParameters) << STACKVALUE_IP_PARAMS_OFFSET; + if (GET_INTEGER_PARAM(0) < 0) + m_nIp = CTheScripts::MainScriptSize - GET_INTEGER_PARAM(0); + else + m_nIp = GET_INTEGER_PARAM(0); return 0; } - case COMMAND_DO_2D_RECTANGLES_COLLIDE: + case COMMAND_IS_CAR_AUTOMOBILE: { - CollectParameters(&m_nIp, 8); - float infX1 = *(float*)&ScriptParams[0] - *(float*)&ScriptParams[2] * 0.5; // NB: not float - float supX1 = *(float*)&ScriptParams[0] + *(float*)&ScriptParams[2] * 0.5; - float infX2 = *(float*)&ScriptParams[4] - *(float*)&ScriptParams[6] * 0.5; - float supX2 = *(float*)&ScriptParams[4] + *(float*)&ScriptParams[6] * 0.5; - float infY1 = *(float*)&ScriptParams[1] - *(float*)&ScriptParams[3] * 0.5; - float supY1 = *(float*)&ScriptParams[1] + *(float*)&ScriptParams[3] * 0.5; - float infY2 = *(float*)&ScriptParams[5] - *(float*)&ScriptParams[7] * 0.5; - float supY2 = *(float*)&ScriptParams[5] + *(float*)&ScriptParams[7] * 0.5; - bool collide = true; - if (infY2 > supY1) - collide = false; - if (infY1 > supY2) - collide = false; - if (infX2 > supX1) - collide = false; - if (infX1 > supX2) - collide = false; - UpdateCompareFlag(collide); + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + UpdateCompareFlag(pVehicle->GetModelIndex() >= MI_FIRST_VEHICLE && pVehicle->GetModelIndex() < MI_FERRY); return 0; } - case COMMAND_GET_OBJECT_ROTATION_VELOCITY: + case COMMAND_IS_CAR_BIKE: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(CVector*)&ScriptParams[0] = pObject->GetTurnSpeed() * GAME_SPEED_TO_METERS_PER_SECOND; - StoreParameters(&m_nIp, 3); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + UpdateCompareFlag(pVehicle->GetModelIndex() >= MI_ANGEL && pVehicle->GetModelIndex() <= MI_SANCHEZ); return 0; } - case COMMAND_ADD_VELOCITY_RELATIVE_TO_OBJECT_VELOCITY: + return 0; + case COMMAND_IS_CAR_PLANE: { - CollectParameters(&m_nIp, 4); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CVector vecAddition = *(CVector*)&ScriptParams[1] * CTimer::GetTimeStep() / GAME_SPEED_TO_METERS_PER_SECOND; - if (!pObject->bIsStatic) { - CVector vecCurrSpeed = pObject->GetSpeed(); - vecCurrSpeed.Normalise(); - if (vecCurrSpeed.z != 1.0) { // NB: not float! - CVector vx = CrossProduct(vecCurrSpeed, CVector(0.0f, 0.0f, 1.0f)); - vx.Normalise(); - CVector vz = CrossProduct(vx, vecCurrSpeed); - vz.Normalise(); - CVector vecNewSpeed = pObject->GetSpeed() + vecAddition.x * vx + vecAddition.y * vecCurrSpeed + vecAddition.z * vecCurrSpeed; - if (pObject->bIsStatic) { - pObject->SetIsStatic(false); - pObject->AddToMovingList(); - } - pObject->SetMoveSpeed(vecNewSpeed); - } - } + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + UpdateCompareFlag(pVehicle->GetModelIndex() >= MI_AIRTRAIN && pVehicle->GetModelIndex() <= MI_DEADDODO); return 0; } - case COMMAND_GET_OBJECT_SPEED: + case COMMAND_IS_CAR_HELI: { CollectParameters(&m_nIp, 1); - CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(float*)&ScriptParams[0] = pObject->GetMoveSpeed().Magnitude() * GAME_SPEED_TO_METERS_PER_SECOND; - StoreParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + UpdateCompareFlag(pVehicle->GetModelIndex() >= MI_ESCAPE && pVehicle->GetModelIndex() <= MI_CHOPPER); return 0; } +#ifdef FIX_BUGS + case COMMAND_1476: // they DO have it in script + return 0; #endif -#if (defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - case COMMAND_IS_MISSION_SKIP: -#ifdef MISSION_REPLAY - ScriptParams[0] = MissionSkipLevel; -#else - ScriptParams[0] = 0; -#endif + case COMMAND_RETURN_IF_TRUE: + if (m_bCondResult) { + ReturnFromGosubOrFunction(); + } + return 0; + case COMMAND_RETURN_TRUE_IF_TRUE: + if (m_bCondResult) { + UpdateCompareFlag(false); + ReturnFromGosubOrFunction(); + } + return 0; + case COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_BEHIND: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bOnlyAllowedToSitBehind = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_SET_RC_HELI_HEIGHT_LIMIT: + CollectParameters(&m_nIp, 1); + // CVehicle::rcHeliHeightLimit = GET_FLOAT_PARAM(0); // TODO + return 0; + case COMMAND_CREATE_SCRIPT_CORONA: + { + CollectParameters(&m_nIp, 9); + base::cSList<script_corona>::tSItem* pCorona = new base::cSList<script_corona>::tSItem(); + pCorona->item.x = GET_FLOAT_PARAM(0); + pCorona->item.y = GET_FLOAT_PARAM(1); + pCorona->item.z = GET_FLOAT_PARAM(2); + pCorona->item.id = CTheScripts::NextScriptCoronaID++; + if (pCorona->item.z <= MAP_Z_LOW_LIMIT) + pCorona->item.z = CWorld::FindGroundZForCoord(pCorona->item.x, pCorona->item.y); + pCorona->item.size = GET_FLOAT_PARAM(3); + pCorona->item.r = GET_INTEGER_PARAM(6); + pCorona->item.g = GET_INTEGER_PARAM(7); + pCorona->item.b = GET_INTEGER_PARAM(8); + pCorona->item.type = GET_INTEGER_PARAM(4); + pCorona->item.flareType = GET_INTEGER_PARAM(5); + SET_INTEGER_PARAM(0, pCorona->item.id); + CTheScripts::mCoronas.Insert(pCorona); StoreParameters(&m_nIp, 1); return 0; - case COMMAND_SET_IN_AMMUNATION: + } + case COMMAND_REMOVE_SCRIPT_CORONA: + { CollectParameters(&m_nIp, 1); -#ifdef MISSION_REPLAY - IsInAmmunation = ScriptParams[0]; -#endif + for (base::cSList<script_corona>::tSItem* i = CTheScripts::mCoronas.first; i; i = i->next) { + if (i->item.id == GET_INTEGER_PARAM(0)) { + CTheScripts::mCoronas.Remove(i); + delete i; + break; + } + } return 0; - case COMMAND_DO_SAVE_GAME: + } + case COMMAND_IS_BOAT_IN_WATER: + { CollectParameters(&m_nIp, 1); -#ifdef MISSION_REPLAY - SaveGameForPause(ScriptParams[0]); -#endif + CBoat* pVehicle = (CBoat*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle && pVehicle->IsBoat()); + UpdateCompareFlag(pVehicle->bBoatInWater); return 0; - case COMMAND_IS_RETRY: -#ifdef MISSION_REPLAY - if (strcmp(m_abScriptName, "porno4") != 0) - ScriptParams[0] = AllowMissionReplay; -#ifdef FIX_BUGS - else - ScriptParams[0] = gbTryingPorn4Again; -#else - else if (gbTryingPorn4Again) - ScriptParams[0] = 1; -#endif -#else - ScriptParams[0] = 0; + } + case COMMAND_IS_CAR_DRIVER_BEING_JACKED: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + UpdateCompareFlag(pVehicle->bIsBeingCarJacked); + return 0; + } + case COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_IN_FRONT: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bOnlyAllowedToSitInFront = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_SET_CAR_TILTED_BY_CHAR: + { + CollectParameters(&m_nIp, 2); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(1)); + script_assert(pVehicle); + pVehicle->ApplyTurnForce(0.0f, 0.0f, CGeneral::GetRandomNumberInRange(-0.8f, -1.2f)* pPed->m_fMass, + pPed->GetPosition().x - pVehicle->GetPosition().x, pPed->GetPosition().y - pVehicle->GetPosition().y, 0.0f); + DMAudio.PlayOneShot(pVehicle->m_audioEntityId, SOUND_CAR_JERK, 0.0f); + return 0; + } + case COMMAND_GET_WEAPON_TYPE_FOR_PICKUP_IN_AREA: + { + CollectParameters(&m_nIp, 4); + float X = GET_FLOAT_PARAM(0); + float Y = GET_FLOAT_PARAM(1); + float Z = GET_FLOAT_PARAM(2); + float radius = GET_FLOAT_PARAM(3); + int model = -1; + bool found = false; + for (uint32 i = 0; i < NUMPICKUPS; i++) { + CPickup* pPickup = &CPickups::aPickUps[i]; + if (pPickup->m_eType != PICKUP_NONE) { + CVector fDist = pPickup->m_vecPos - CVector(X, Y, Z); +#ifndef FIX_BUGS // this breaks ALL pickups! + pPickup->m_eModelIndex = 4; #endif + if (fDist.Magnitude() < radius && pPickup->m_pObject) { + found = true; + model = CPickups::WeaponForModel(pPickup->m_pObject->GetModelIndex()); + } + } + } + SET_INTEGER_PARAM(0, model); StoreParameters(&m_nIp, 1); + } + case COMMAND_IS_PLAYER_USING_FIRST_PERSON_WEAPON_CAMERA: + CollectParameters(&m_nIp, 1); + UpdateCompareFlag(TheCamera.Using1stPersonWeaponMode()); return 0; - case COMMAND_DUMMY: + //case COMMAND_1489: + //case COMMAND_1490: + //case COMMAND_1491: + case COMMAND_SET_DEBUG_MENU_ACTIVE: + CollectParameters(&m_nIp, 1); + // this sets two values on PS2, but not on mobile - TODO? return 0; -#endif -#if (defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - // it is unknown what these commands do but they don't take parameters - case COMMAND_MARK_CUTSCENE_START: + case COMMAND_SET_DRAW_HUD: + CollectParameters(&m_nIp, 1); + CHud::m_Wants_To_Draw_Hud = (GET_INTEGER_PARAM(0) != 0); return 0; - case COMMAND_MARK_CUTSCENE_END: + case COMMAND_GET_RANDOM_CHAR_IN_AREA_NO_CHECKS: + { + CollectParameters(&m_nIp, 4); + int ped_handle = -1; + CVector pos = FindPlayerCoors(); + float x1 = GET_FLOAT_PARAM(0); + float y1 = GET_FLOAT_PARAM(1); + float x2 = GET_FLOAT_PARAM(2); + float y2 = GET_FLOAT_PARAM(3); + int i = CPools::GetPedPool()->GetSize(); + while (--i && ped_handle == -1) { + CPed* pPed = CPools::GetPedPool()->GetSlot(i); + if (!pPed) + continue; + if (pPed->bRemoveFromWorld) + continue; + if (pPed->bFadeOut) + continue; + if (pPed->m_nWaitState != WAITSTATE_FALSE) + continue; + if (!pPed->IsWithinArea(x1, y1, x2, y2)) + continue; + if (pos.z - PED_FIND_Z_OFFSET > pPed->GetPosition().z) + continue; + if (pos.z + PED_FIND_Z_OFFSET < pPed->GetPosition().z) + continue; + ped_handle = CPools::GetPedPool()->GetIndex(pPed); + CTheScripts::LastRandomPedId = ped_handle; + pPed->CharCreatedBy = MISSION_CHAR; + pPed->bRespondsToThreats = false; + ++CPopulation::ms_nTotalMissionPeds; + if (m_bIsMissionScript) + CTheScripts::MissionCleanUp.AddEntityToList(ped_handle, CLEANUP_CHAR); + } + SET_INTEGER_PARAM(0, ped_handle); + StoreParameters(&m_nIp, 1); return 0; - case COMMAND_CUTSCENE_SCROLL: + } + case COMMAND_GET_RANDOM_CAR_IN_AREA_NO_CHECKS_NO_SAVE: + { + CollectParameters(&m_nIp, 4); + int handle = -1; + uint32 i = CPools::GetVehiclePool()->GetSize(); + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(3); + while (i-- && handle == -1) { + CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); + if (!pVehicle) + continue; + if (!pVehicle->IsWithinArea(infX, infY, supX, supY)) + continue; + handle = CPools::GetVehiclePool()->GetIndex(pVehicle); + } + SET_INTEGER_PARAM(0, handle); + StoreParameters(&m_nIp, 1); return 0; + } + case COMMAND_STORE_CAR_COLLIDED_WITH_NO_SAVE: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + if (!pVehicle) + printf("STORE_CAR_COLLIDED_WITH_NO_SAVE - Car doesn\'t exist\n"); + else { + if (pVehicle->m_pLastDamageEntity == nil) + SET_INTEGER_PARAM(0, -1); + else { + // what they are doing is not very safe as m_pLastDamageEntity doesn't have to be CVehicle +#ifdef FIX_BUGS + if (!pVehicle->m_pLastDamageEntity->IsVehicle()) { + SET_INTEGER_PARAM(0, -1); + } + else #endif + { + SET_INTEGER_PARAM(0, CPools::GetVehiclePool()->GetIndex((CVehicle*)pVehicle->m_pLastDamageEntity)); + pVehicle->m_pLastDamageEntity = nil; + } + } + } + StoreParameters(&m_nIp, 1); + return 0; + } default: script_assert(0); } diff --git a/src/control/Script9.cpp b/src/control/Script9.cpp new file mode 100644 index 00000000..5793ca50 --- /dev/null +++ b/src/control/Script9.cpp @@ -0,0 +1,775 @@ +#include "common.h" + +#include "Script.h" +#include "ScriptCommands.h" + +#include "Bridge.h" +#include "CarCtrl.h" +#include "Camera.h" +#include "CutsceneMgr.h" +#include "Ferry.h" +#include "Garages.h" +#include "GameLogic.h" +#include "Hud.h" +#include "Messages.h" +#include "Object.h" +#include "Pad.h" +#include "Ped.h" +#include "Pools.h" +#include "Remote.h" +#include "SpecialFX.h" +#include "Stats.h" +#include "Vehicle.h" +#include "World.h" + +// LCS: file done except TODOs (also check commented out strings) + +int8 CRunningScript::ProcessCommands1500To1599(int32 command) +{ + switch (command) { + case COMMAND_DISABLE_FERRY_PATH: + { + CollectParameters(&m_nIp, 1); + CFerry::DissableFerryPath(GET_INTEGER_PARAM(0)); + return 0; + } + case COMMAND_ENABLE_FERRY_PATH: + { + CollectParameters(&m_nIp, 1); + CFerry::EnableFerryPath(GET_INTEGER_PARAM(0)); + return 0; + } + case COMMAND_GET_CLOSEST_DOCKED_FERRY: + { + CollectParameters(&m_nIp, 2); + CFerry* pFerry = CFerry::GetClosestFerry(GET_FLOAT_PARAM(0), GET_FLOAT_PARAM(1)); + int id = -1; + if (pFerry && pFerry->IsDocked()) + id = pFerry->m_nFerryId; + SET_INTEGER_PARAM(0, id); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_OPEN_FERRY_DOOR: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + pFerry->OpenDoor(); + return 0; + } + case COMMAND_CLOSE_FERRY_DOOR: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + pFerry->CloseDoor(); + return 0; + } + case COMMAND_IS_FERRY_DOOR_OPEN: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + UpdateCompareFlag(pFerry->IsDoorOpen()); + return 0; + } + case COMMAND_IS_FERRY_DOOR_CLOSED: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + UpdateCompareFlag(pFerry->IsDoorClosed()); + return 0; + } + case COMMAND_SKIP_FERRY_TO_NEXT_DOCK: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + pFerry->SkipFerryToNextDock(); + return 0; + } + case COMMAND_SET_CHAR_DROPS_WEAPONS_ON_DEATH: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bDropsWeaponsOnDeath = (GET_INTEGER_PARAM(1) != 0); + return 0; + } + case COMMAND_IS_CHAR_CROUCHING: + { + CollectParameters(&m_nIp, 1); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + UpdateCompareFlag(pPed->bIsDucking); + return 0; + } + case COMMAND_GET_FERRY_BOARDING_SPACE: + { + CollectParameters(&m_nIp, 4); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + CVector space = pFerry->GetBoardingSpace((CFerry::eSpaceUse)GET_INTEGER_PARAM(1), (CFerry::eSpaceStyle)GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); + SET_FLOAT_PARAM(0, space.x); + SET_FLOAT_PARAM(1, space.y); + StoreParameters(&m_nIp, 2); + return 0; + } + case COMMAND_GET_FERRY_HEADING: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + float fHeading = Atan2(-pFerry->GetForward().x, pFerry->GetForward().y); + SET_FLOAT_PARAM(0, fHeading); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_SET_FERRIES_DISABLED: + { + CollectParameters(&m_nIp, 2); + CFerry::SetFerriesDisabled(GET_INTEGER_PARAM(1)); + return 0; + } + case COMMAND_COMPLETE_FERRY_DOOR_MOVEMENT: + { + CollectParameters(&m_nIp, 1); + CFerry* pFerry = CFerry::GetFerry(GET_INTEGER_PARAM(0)); + script_assert(pFerry); + pFerry->CompleteDorrMovement(); + return 0; + } + case COMMAND_OVERRIDE_CAR_REMOTE_CONTROL: + { + CollectParameters(&m_nIp, 2); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + pVehicle->SetStatus(STATUS_PLAYER_REMOTE); + CVehicle::bDisableRemoteDetonation = true; + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = pVehicle; + pVehicle->RegisterReference((CEntity**)&CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle); + if (pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI || pVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE) { + TheCamera.TakeControl(pVehicle, CCam::MODE_CAM_ON_A_STRING, GET_INTEGER_PARAM(1) ? INTERPOLATION : JUMP_CUT, CAMCONTROL_SCRIPT); + TheCamera.SetZoomValueCamStringScript(0); + } + else { + TheCamera.TakeControl(pVehicle, CCam::MODE_1STPERSON, GET_INTEGER_PARAM(1) ? INTERPOLATION : JUMP_CUT, CAMCONTROL_SCRIPT); + script_assert(pVehicle->IsCar()); + ((CAutomobile*)pVehicle)->Damage.m_bSmashedDoorDoesntClose = true; + } + if (m_bIsMissionScript) + CTheScripts::MissionCleanUp.RemoveEntityFromList(GET_INTEGER_PARAM(0), CLEANUP_CAR); + if (FindPlayerVehicle()) + FindPlayerVehicle()->bCanBeDamaged = false; + return 0; + } + case COMMAND_CANCEL_REMOTE_MODE: + { + if (FindPlayerVehicle()) + FindPlayerVehicle()->bCanBeDamaged = true; + CRemote::TakeRemoteControlledCarFromPlayer(false); + CWorld::Players[CWorld::PlayerInFocus].field_D6 = false; + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = nil; + TheCamera.Restore(); + return 0; + } + case COMMAND_REGISTER_CAR_SOLD: + // CStats::CarsSold++; + return 0; + case COMMAND_ADD_MONEY_MADE_WITH_CAR_SALES: + CollectParameters(&m_nIp, 1); + // CStats::MoneyMadeWithCarSales += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_SET_BRIDGE_STATE: + { + CollectParameters(&m_nIp, 1); +#ifdef GTA_BRIDGE + /* + * 0 = locked + * 1 = unlocked + * 2 = operational + */ + switch (GET_INTEGER_PARAM(0)) { + case 0: CBridge::ForceBridgeState(STATE_BRIDGE_LOCKED); break; + case 1: CBridge::ForceBridgeState(STATE_BRIDGE_ALWAYS_UNLOCKED); break; + case 2: + if (CBridge::State == STATE_LIFT_PART_IS_DOWN || CBridge::State == STATE_BRIDGE_ALWAYS_UNLOCKED) + CBridge::ForceBridgeState(STATE_LIFT_PART_ABOUT_TO_MOVE_UP); + else + CBridge::ForceBridgeState(STATE_LIFT_PART_MOVING_DOWN); + break; + default: script_assert(false); + } +#endif + return 0; + } + case COMMAND_SET_OBJECT_TURN_SPEED: + { + CollectParameters(&m_nIp, 4); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + CVector vSpeed = GET_VECTOR_PARAM(1) / GAME_SPEED_TO_METERS_PER_SECOND; + pObject->SetTurnSpeed(vSpeed.x, vSpeed.y, vSpeed.z); + return 0; + } + case COMMAND_SET_OBJECT_MASS: + { + CollectParameters(&m_nIp, 4); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + pObject->m_fMass = GET_FLOAT_PARAM(1); + pObject->m_fTurnMass = GET_FLOAT_PARAM(2); + pObject->m_fAirResistance = GET_FLOAT_PARAM(3); + if (pObject->m_fMass < 99998.0f) { + pObject->bInfiniteMass = false; + pObject->m_phy_flagA08 = false; + pObject->bAffectedByGravity = true; + } + else { + pObject->bInfiniteMass = true; + pObject->m_phy_flagA08 = true; + pObject->bAffectedByGravity = false; + } + return 0; + } + case COMMAND_HAS_CUTSCENE_LOADED: + UpdateCompareFlag(CCutsceneMgr::ms_cutsceneLoadStatus == CUTSCENE_LOADED); + return 0; + case COMMAND_SET_UNIQUE_JUMPS_FOUND: + CollectParameters(&m_nIp, 1); + CStats::NumberOfUniqueJumpsFound = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_SET_HIDDEN_PACKAGES_COLLECTED: + CollectParameters(&m_nIp, 1); + CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_BIKE_SOLD: + // CStats::BikesSold++; + return 0; + case COMMAND_ADD_MONEY_MADE_WITH_BIKE_SALES: + CollectParameters(&m_nIp, 1); + // CStats::MoneyMadeWithBikeSales += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_PACKAGE_SMUGGLED: + // CStats::PackagesSmuggled++; + return 0; + case COMMAND_REGISTER_SMUGGLER_WASTED: + // CStats::SmugglersWasted++; + return 0; + case COMMAND_REGISTER_FASTEST_SMUGGLING_TIME: + CollectParameters(&m_nIp, 1); + // CStats::RegisterFastestSmugglingTime(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_SET_CHAR_DIVE_FROM_CAR: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(1)); + script_assert(pPed); + pPed->bRespondsToThreats = true; + pPed->SetEvasiveDive(pVehicle, 1); + return 0; + } + case COMMAND_WRECK_CAR: + { + CollectParameters(&m_nIp, 1); + CAutomobile* pVehicle = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + script_assert(pVehicle->IsCar()); + pVehicle->m_fHealth = 0.0f; + pVehicle->SetStatus(STATUS_WRECKED); + pVehicle->bRenderScorched = true; + pVehicle->Damage.FuckCarCompletely(); + if (pVehicle->GetModelIndex() != MI_RCBANDIT) { + pVehicle->SetBumperDamage(CAR_BUMP_FRONT, VEHBUMPER_FRONT); + pVehicle->SetBumperDamage(CAR_BUMP_REAR, VEHBUMPER_REAR); + pVehicle->SetDoorDamage(CAR_BONNET, DOOR_BONNET); + pVehicle->SetDoorDamage(CAR_BOOT, DOOR_BOOT); + pVehicle->SetDoorDamage(CAR_DOOR_LF, DOOR_FRONT_LEFT); + pVehicle->SetDoorDamage(CAR_DOOR_RF, DOOR_FRONT_RIGHT); + pVehicle->SetDoorDamage(CAR_DOOR_LR, DOOR_REAR_LEFT); + pVehicle->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT); + } + pVehicle->m_bombType = CARBOMB_NONE; + pVehicle->bEngineOn = false; + pVehicle->bLightsOn = false; + pVehicle->m_fHealth = 0.0f; + pVehicle->m_nBombTimer = 0; + pVehicle->m_bSirenOrAlarm = false; + return 0; + } + case COMMAND_ADD_MONEY_MADE_IN_COACH: + CollectParameters(&m_nIp, 1); + // CStats::MoneyMadeInCoach += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_ADD_MONEY_MADE_COLLECTING_TRASH: + CollectParameters(&m_nIp, 1); + // CStats::MoneyMadeCollectingTrash += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_REGISTER_HITMAN_KILLED: + // CStats::HitmenKilled++; + return 0; + case COMMAND_REGISTER_GUARDIAN_ANGEL_MISSION_PASSED: + // CStats::GaurdianAngelMissionsPassed++; + return 0; + case COMMAND_REGISTER_HIGHEST_GUARDIAN_ANGEL_JUSTICE_DISHED: + CollectParameters(&m_nIp, 1); + // CStats::RegisterHighestGaurdianAngelJusticeDished(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_BEST_BANDIT_LAP_TIME: + CollectParameters(&m_nIp, 2); + // CStats::RegisterBestBanditLapTime(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_REGISTER_BEST_BANDIT_POSITION: + CollectParameters(&m_nIp, 2); + // CStats::RegisterBestBanditPosition(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_REGISTER_MOST_TIME_LEFT_TRAIN_RACE: + CollectParameters(&m_nIp, 1); + // CStats::RegisterMostTimeLeftTrainRace(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_HIGHEST_TRAIN_CASH_EARNED: + CollectParameters(&m_nIp, 1); + // CStats::RegisterHighestTrainCashEarned(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_FASTEST_HELI_RACE_TIME: + // CStats::RegisterFastestHeliRaceTime(GET_INTEGER_PARAM(0)); + CollectParameters(&m_nIp, 1); + return 0; + case COMMAND_REGISTER_BEST_HELI_RACE_POSITION: + // CStats::RegisterBestHeliRacePosition(GET_INTEGER_PARAM(0)); + CollectParameters(&m_nIp, 1); + return 0; + case COMMAND_REGISTER_OUTFIT_CHANGE: + // CStats::NumberOutfitChanges++; + return 0; + case COMMAND_REGISTER_STREET_RACE_FASTEST_TIME: + // CStats::RegisterStreetRaceFastestTime(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + CollectParameters(&m_nIp, 2); + return 0; + case COMMAND_REGISTER_STREET_RACE_FASTEST_LAP: + CollectParameters(&m_nIp, 2); + // CStats::RegisterStreetRaceFastestLap(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_REGISTER_STREET_RACE_BEST_POSITION: + CollectParameters(&m_nIp, 2); + // CStats::RegisterStreetRaceBestPosition(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + case COMMAND_HAS_OBJECT_BEEN_DAMAGED_BY_WEAPON: + { + CollectParameters(&m_nIp, 2); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + bool result = false; + if (!pObject) { + printf("HAS_OBJECT_BEEN_DAMAGED_BY_WEAPON - Object doesn\'t exist\n"); + } + else { + if (GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYMELEE || GET_INTEGER_PARAM(1) == WEAPONTYPE_ANYWEAPON) + result = CheckDamagedWeaponType(pObject->m_nLastWeaponToDamage, GET_INTEGER_PARAM(1)); + else + result = GET_INTEGER_PARAM(1) == pObject->m_nLastWeaponToDamage; + } + UpdateCompareFlag(result); + return 0; + } + case COMMAND_CLEAR_OBJECT_LAST_WEAPON_DAMAGE: + { + CollectParameters(&m_nIp, 1); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + if (!pObject) + printf("CLEAR_OBJECT_LAST_WEAPON_DAMAGE - pObject doesn\'t exist"); + else + pObject->m_nLastWeaponToDamage = -1; + return 0; + } + case COMMAND_SET_CAR_TURN_SPEED: + { + CollectParameters(&m_nIp, 4); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + CVector vSpeed = GET_VECTOR_PARAM(1) / GAME_SPEED_TO_METERS_PER_SECOND; + pVehicle->SetTurnSpeed(vSpeed.x, vSpeed.y, vSpeed.z); + return 0; + } + case COMMAND_SET_CAR_MOVE_SPEED: + { + CollectParameters(&m_nIp, 4); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + CVector vSpeed = GET_VECTOR_PARAM(1) / GAME_SPEED_TO_METERS_PER_SECOND; + pVehicle->SetMoveSpeed(vSpeed); + return 0; + } + case COMMAND_SET_OBJECT_PROOFS: + { + CollectParameters(&m_nIp, 6); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + pObject->bBulletProof = (GET_INTEGER_PARAM(1) != 0); + pObject->bFireProof = (GET_INTEGER_PARAM(2) != 0); + pObject->bExplosionProof = (GET_INTEGER_PARAM(3) != 0); + pObject->bCollisionProof = (GET_INTEGER_PARAM(4) != 0); + pObject->bMeleeProof = (GET_INTEGER_PARAM(5) != 0); + return 0; + } + case COMMAND_GET_CAMERA_PED_ZOOM_INDICATOR: + if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FOLLOWPED) + SET_INTEGER_PARAM(0, TheCamera.PedZoomIndicator); + else + SET_INTEGER_PARAM(0, -1); + StoreParameters(&m_nIp, 1); + return 0; + case COMMAND_SET_CAMERA_PED_ZOOM_INDICATOR: + CollectParameters(&m_nIp, 1); + if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FOLLOWPED) + TheCamera.PedZoomIndicator = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_GET_CAR_ORIENTATION: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pVehicle->GetForward().z)))); + SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetForward().x, pVehicle->GetForward().y)))); + SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetRight().z, pVehicle->GetUp().z)))); + StoreParameters(&m_nIp, 3); + return 0; + } + case COMMAND_SET_CAR_ORIENTATION: + { + CollectParameters(&m_nIp, 4); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + pVehicle->SetOrientation(DEGTORAD(GET_FLOAT_PARAM(2)), DEGTORAD(GET_FLOAT_PARAM(1)), DEGTORAD(GET_FLOAT_PARAM(3))); + return 0; + } + case COMMAND_IS_DEBUG_MENU_ON: + // on PS2 it's something actual - TODO + UpdateCompareFlag(false); + return 0; + case COMMAND_OPEN_VAN_BACK_DOORS: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + assert(pVehicle); + pVehicle->ProcessOpenDoor(CAR_DOOR_RR, ANIM_STD_VAN_OPEN_DOOR_REAR_RHS, 1.0f); + pVehicle->ProcessOpenDoor(CAR_DOOR_LR, ANIM_STD_VAN_OPEN_DOOR_REAR_LHS, 1.0f); + return 0; + } + case COMMAND_GET_CHAR_THREAT_CHAR: + { + CollectParameters(&m_nIp, 1); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + SET_INTEGER_PARAM(0, 0); + CEntity* pThreat = pPed->m_threatEntity; + if (pThreat && pThreat->IsPed()) + SET_INTEGER_PARAM(0, CPools::GetPedPool()->GetIndex((CPed*)pThreat)); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_FREEZE_PED_ZOOM_SWITCH: + CollectParameters(&m_nIp, 1); + TheCamera.m_bFreezePedZoomSwitch = GET_INTEGER_PARAM(0); + return 0; + case COMMAND_SET_OBJECT_RENDERED_DAMAGED: + { + CollectParameters(&m_nIp, 1); + CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pObject); + pObject->bRenderDamaged = true; + return 0; + } + case COMMAND_GET_RANDOM_CAR_IN_AREA_NO_SAVE: + { + CollectParameters(&m_nIp, 5); + int handle = -1; + uint32 i = CPools::GetVehiclePool()->GetSize(); + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float supX = GET_FLOAT_PARAM(2); + float supY = GET_FLOAT_PARAM(3); + while (i-- && handle == -1) { + CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); + if (!pVehicle) + continue; + if (pVehicle->GetVehicleAppearance() != VEHICLE_APPEARANCE_CAR && pVehicle->GetVehicleAppearance() != VEHICLE_APPEARANCE_BIKE) + continue; +#ifdef FIX_BUGS + if (pVehicle->m_fHealth <= 0.0f) +#else + if (pVehicle->m_fHealth == 0.0f) +#endif + continue; + if (pVehicle->GetModelIndex() != GET_INTEGER_PARAM(4) && GET_INTEGER_PARAM(4) >= 0) + continue; + if (pVehicle->VehicleCreatedBy != RANDOM_VEHICLE) + continue; + if (!pVehicle->IsWithinArea(infX, infY, supX, supY)) + continue; + handle = CPools::GetVehiclePool()->GetIndex(pVehicle); + } + SET_INTEGER_PARAM(0, handle); + StoreParameters(&m_nIp, 1); + return 0; + } + case COMMAND_IS_PLAYER_MADE_SAFE: + { + UpdateCompareFlag(CPad::GetPad(0)->IsPlayerControlsDisabledBy(PLAYERCONTROL_PLAYERINFO)); + return 0; + } + case COMMAND_PRINT_IF_FREE: + { + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CollectParameters(&m_nIp, 2); + //CMessages::AddMessageIfFree(text, GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); TODO + return 0; + } + case COMMAND_IS_E3_BUILD: + UpdateCompareFlag(false); + return 0; + case COMMAND_DECLARE_FORT_STAUNTON_DESTROYED_FLAG: + CTheScripts::FSDestroyedFlag = (uint8*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL) - CTheScripts::ScriptSpace; + return 0; + case COMMAND_CLEAR_BIG_MESSAGES: + //CMessages::ClearBigMessagesOnly(); TODO + //CHud::ClearBigMessagesExcept(2, 2); TODO + CGarages::MessageEndTime = CGarages::MessageStartTime; + return 0; + case COMMAND_CLEAR_AREA_OF_OBJECTS: + { + CollectParameters(&m_nIp, 6); + uint32 i = CPools::GetObjectPool()->GetSize(); + float infX = GET_FLOAT_PARAM(0); + float infY = GET_FLOAT_PARAM(1); + float infZ = GET_FLOAT_PARAM(2); + float supX = GET_FLOAT_PARAM(3); + float supY = GET_FLOAT_PARAM(4); + float supZ = GET_FLOAT_PARAM(5); + while (i--) { + CObject* pObject = CPools::GetObjectPool()->GetSlot(i); + if (pObject && pObject->CanBeDeleted() && pObject->IsWithinArea(infX, infY, infZ, supX, supY, supZ)) { + pObject->DeleteRwObject(); + CWorld::Remove(pObject); + delete pObject; + } + } + i = CPools::GetDummyPool()->GetSize(); + while (i--) { + CDummy* pDummy = CPools::GetDummyPool()->GetSlot(i); + if (pDummy && pDummy->IsObject() && pDummy->IsWithinArea(infX, infY, infZ, supX, supY, supZ)) { + pDummy->DeleteRwObject(); + CWorld::Remove(pDummy); + delete pDummy; + } + } + return 0; + } + case COMMAND_LOAD_NON_STANDARD_PED_ANIM: + CollectParameters(&m_nIp, 1); + CPed::LoadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_UNLOAD_NON_STANDARD_PED_ANIM: + CollectParameters(&m_nIp, 1); + CPed::UnloadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_1566: + CollectParameters(&m_nIp, 1); + return 0; + case COMMAND_BUILD_WORLD_GEOMETRY: + CollectParameters(&m_nIp, 1); + if (/*gBuildWorldGeom*/ false) { + //base::cWorldGeom::GetInstance()->Build(GET_INTEGER_PARAM(0)); + UpdateCompareFlag(true); + } + else { + UpdateCompareFlag(false); + } + return 0; + case COMMAND_STORE_BUILDING_SWAP: + CollectParameters(&m_nIp, 4); + // base::cWorldGeom::GetInstance()->StoreBuildingSwap(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3) != 0); + return 0; + case COMMAND_IS_MULTIPLAYER_ACTIVE: + UpdateCompareFlag(false); // TODO? + return 0; + case COMMAND_GET_MULTIPLAYER_MODE: + SET_INTEGER_PARAM(0, 0); // TODO + StoreParameters(&m_nIp, 1); + return 0; + case COMMAND_MULTIPLAYER_SCRIPT_DONE: + //gbStartingScriptsFromLua = false; TODO? + return 0; + case COMMAND_IS_MULTIPLAYER_SERVER: + UpdateCompareFlag(false); // TODO? + return 0; + case COMMAND_IS_MULTIPLAYER_TEAM_GAME: + UpdateCompareFlag(false); // TODO? + return 0; + case COMMAND_GET_MULTIPLAYER_TEAM_ID: + SET_INTEGER_PARAM(0, 0); // TODO + StoreParameters(&m_nIp, 1); + return 0; + case COMMAND_DOES_SHORTCUT_TAXI_EXIST: + UpdateCompareFlag(CGameLogic::pShortCutTaxi != nil); + return 0; + case COMMAND_SET_ONSCREEN_TIMER_COLOUR: + CollectParameters(&m_nIp, 4); + // gbColour = CRGBA(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); + return 0; + case COMMAND_SET_ONSCREEN_TIMER_BACKGROUND_COLOUR: + CollectParameters(&m_nIp, 4); + // gbColour2 = CRGBA(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3)); + return 0; + case COMMAND_REMOVE_CAR_BOOT: + { + CollectParameters(&m_nIp, 1); + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pVehicle); + script_assert(pVehicle->IsCar()); + CAutomobile* pAutomobile = (CAutomobile*)pVehicle; + pAutomobile->Damage.SetDoorStatus(DOOR_BOOT, DOOR_STATUS_MISSING); + pAutomobile->SetDoorDamage(CAR_BOOT, DOOR_BOOT, true); + return 0; + } + case COMMAND_ADD_POINT_3D_MARKER: + { + uint32 ip = m_nIp; + uint32 id = (uint32)(uintptr)GetPointerToScriptVariable(&ip, 0); + static CVector vPreviousLocation; + CollectParameters(&m_nIp, 7); + CVector pos = GET_VECTOR_PARAM(0); + if (pos.z <= MAP_Z_LOW_LIMIT) + pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); + if (vPreviousLocation != pos) { + //C3dMarkers::CopyMarker(id, id - 1, 1, 1); + } + // TODO: 5 is not a valid type + //C3dMarkers::PlaceMarker(id, 5, pos, GET_FLOAT_PARAM(3) * 0.7f, GET_INTEGER_PARAM(4), GET_INTEGER_PARAM(5), GET_INTEGER_PARAM(6), 255, 128, 0.0f, 1); // TODO: 0, 100.0f, 1, 0 + vPreviousLocation = pos; + return 0; + } + case COMMAND_GET_VECTOR_FROM_MULTIPLAYER: + SET_VECTOR_PARAM(0, gVectorSetInLua); + StoreParameters(&m_nIp, 3); + return 0; + case COMMAND_PRINT_HELP_ALWAYS: + { + // CHud::mAlwaysAllowHelpText = true; // TODO + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false); // + false, true + return 0; + } + case COMMAND_PRINT_HELP_FOREVER_ALWAYS: + { + // CHud::mAlwaysAllowHelpText = true; // TODO + wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp); + CHud::SetHelpMessage(text, false, true); // + true + return 0; + } + case COMMAND_SWITCH_FERRY_COLLISION: + CollectParameters(&m_nIp, 1); + CFerry::SwitchFerryCollision(GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_SET_CHAR_MAX_HEALTH: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->m_fHealth = GET_INTEGER_PARAM(1); + pPed->m_fMaxHealth = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_SET_CHAR_SHOOT_TIMER: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->m_nScriptShootTimer = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_SET_CHAR_ATTACK_TIMER: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->m_nScriptAttackTimer = GET_INTEGER_PARAM(1); + return 0; + } + case COMMAND_SET_HELI_ROTOR_BLADES_FULLSPEED: + { + CollectParameters(&m_nIp, 1); + CAutomobile* pHeli = (CAutomobile*)CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pHeli); + if (pHeli->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI) + pHeli->m_aWheelSpeed[1] = 0.22f; + return 0; + } + case COMMAND_SET_CRUSHER_REWARD_MULTIPLIER: + { + CollectParameters(&m_nIp, 1); + // CGarages::CrusherRewardMultiplier = GET_INTEGER_PARAM(0); + return 0; + } + case COMMAND_SWAP_BUILDINGS: + { + CollectParameters(&m_nIp, 2); + // base::cWorldStream::Instance()->SwapBuilding(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1)); + return 0; + } + case COMMAND_STREAM_BUILDING_SWAPS: + { + // UpdateCompareFlag(base::cWorldStream::Instance()->StreamBuildingSwaps()); + UpdateCompareFlag(true); + return 0; + } + case COMMAND_IS_WORLD_STREAMING_COMPLETE: + { + // UpdateCompareFlag(base::cWorldStream::Instance()->IsStreamingComplet()); + UpdateCompareFlag(true); + return 0; + } + case COMMAND_SWAP_TO_STREAMED_SECTOR: + { + // base::cWorldStream::Instance()->SwapToStreamedSector(); + return 0; + } + case COMMAND_SET_CHAR_ATTACKS_PLAYER_WITH_COPS: + { + CollectParameters(&m_nIp, 2); + CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0)); + script_assert(pPed); + pPed->bAttacksPlayerWithCops = (GET_INTEGER_PARAM(1) != 0); + return 0; + } + case COMMAND_REGISTER_FACE_PLANT_DISTANCE: + CollectParameters(&m_nIp, 1); + //CStats::LongestFacePlantDist = Max(CStats::LongestFacePlantDist, GET_FLOAT_PARAM(0)); + return 0; + case COMMAND_REGISTER_MAX_SECONDS_ON_CARNAGE_LEFT: + CollectParameters(&m_nIp, 1); + //CStats::MaxSecondsOnCarnageLeft = Max(CStats::MaxSecondsOnCarnageLeft, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_MAX_KILLS_ON_RC_TRIAD: + CollectParameters(&m_nIp, 1); + //CStats::MaxKillsOnRcTriad = Max(CStats::MaxKillsOnRcTriad, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_REGISTER_HIGHEST_LEVEL_SLASH_TV: + CollectParameters(&m_nIp, 1); + //CStats::HighestLevelSlashTv = Max(CStats::HighestLevelSlashTv, GET_INTEGER_PARAM(0)); + return 0; + case COMMAND_ADD_MONEY_MADE_WITH_SLASH_TV: + CollectParameters(&m_nIp, 1); + //CStats::MoneyMadeWithSlashTv += GET_INTEGER_PARAM(0); + return 0; + case COMMAND_ADD_TOTAL_KILLS_ON_SLASH_TV: + CollectParameters(&m_nIp, 1); + //CStats::TotalKillsOnSlashTV += GET_INTEGER_PARAM(0); + return 0; + default: + script_assert(0); + } + return -1; +}
\ No newline at end of file diff --git a/src/control/ScriptCommands.h b/src/control/ScriptCommands.h index 9863e852..93f670a9 100644 --- a/src/control/ScriptCommands.h +++ b/src/control/ScriptCommands.h @@ -215,6 +215,11 @@ enum { COMMAND_WHILE, COMMAND_WHILENOT, COMMAND_ENDWHILE, + COMMAND_214, + COMMAND_215, + COMMAND_216, + COMMAND_217, + COMMAND_218, COMMAND_ANDOR, COMMAND_LAUNCH_MISSION, COMMAND_MISSION_HAS_FINISHED, @@ -1437,39 +1442,222 @@ enum { COMMAND_REGISTER_FIRE_LEVEL, COMMAND_IS_AUSTRALIAN_GAME, COMMAND_DISARM_CAR_BOMB, -#if (defined GTAVC_JP_PATCH || defined SUPPORT_JAPANESE_SCRIPT) COMMAND_IS_JAPANESE_GAME, -#elif (!defined GTA_PS2) - COMMAND_SET_ONSCREEN_COUNTER_FLASH_WHEN_FIRST_DISPLAYED, -#endif -#if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - COMMAND_SHUFFLE_CARD_DECKS, - COMMAND_FETCH_NEXT_CARD, - COMMAND_GET_OBJECT_VELOCITY, - COMMAND_IS_DEBUG_CAMERA_ON, - COMMAND_ADD_TO_OBJECT_ROTATION_VELOCITY, - COMMAND_SET_OBJECT_ROTATION_VELOCITY, - COMMAND_IS_OBJECT_STATIC, - COMMAND_GET_ANGLE_BETWEEN_2D_VECTORS, - COMMAND_DO_2D_RECTANGLES_COLLIDE, - COMMAND_GET_OBJECT_ROTATION_VELOCITY, - COMMAND_ADD_VELOCITY_RELATIVE_TO_OBJECT_VELOCITY, - COMMAND_GET_OBJECT_SPEED, -#endif -#if (defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT) - COMMAND_MARK_CUTSCENE_START, - COMMAND_MARK_CUTSCENE_END, - COMMAND_CUTSCENE_SCROLL, -#elif (defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) - COMMAND_IS_MISSION_SKIP, - COMMAND_SET_IN_AMMUNATION, - COMMAND_DO_SAVE_GAME, - COMMAND_IS_RETRY, - COMMAND_DUMMY, - COMMAND_MARK_CUTSCENE_START, - COMMAND_MARK_CUTSCENE_END, - COMMAND_CUTSCENE_SCROLL, -#endif + COMMAND_1442, + COMMAND_1443, + COMMAND_GET_DISTANCE_BETWEEN_2D_POINTS, + COMMAND_GET_DISTANCE_BETWEEN_3D_POINTS, + COMMAND_DOT_PRODUCT_2D, + COMMAND_DOT_PRODUCT_3D, + COMMAND_DEBUG_PRINT_WITH_1_FLOAT, + COMMAND_DEBUG_PRINT_WITH_2_FLOATS, + COMMAND_DEBUG_PRINT_WITH_3_FLOATS, + COMMAND_GET_PAD_BUTTON_STATE, + COMMAND_SET_NAVIGATION_ARROW, + COMMAND_CLEAR_NAVIGATION_ARROW, + COMMAND_CALL, + COMMAND_CALLNOT, + COMMAND_IS_CAR_AUTOMOBILE, + COMMAND_IS_CAR_BIKE, + COMMAND_IS_CAR_PLANE, + COMMAND_IS_CAR_HELI, + COMMAND_1460, + COMMAND_1461, + COMMAND_1462, + COMMAND_1463, + COMMAND_1464, + COMMAND_1465, + COMMAND_1466, + COMMAND_1467, + COMMAND_1468, + COMMAND_1469, + COMMAND_1470, + COMMAND_1471, + COMMAND_1472, + COMMAND_1473, + COMMAND_1474, + COMMAND_1475, + COMMAND_1476, + COMMAND_RETURN_IF_TRUE, + COMMAND_RETURN_TRUE_IF_TRUE, + COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_BEHIND, + COMMAND_SET_RC_HELI_HEIGHT_LIMIT, + COMMAND_CREATE_SCRIPT_CORONA, + COMMAND_REMOVE_SCRIPT_CORONA, + COMMAND_IS_BOAT_IN_WATER, + COMMAND_IS_CAR_DRIVER_BEING_JACKED, + COMMAND_SET_CHAR_ONLY_ALLOWED_TO_SIT_IN_FRONT, + COMMAND_SET_CAR_TILTED_BY_CHAR, + COMMAND_GET_WEAPON_TYPE_FOR_PICKUP_IN_AREA, + COMMAND_IS_PLAYER_USING_FIRST_PERSON_WEAPON_CAMERA, + COMMAND_1489, + COMMAND_1490, + COMMAND_1491, + COMMAND_SET_DEBUG_MENU_ACTIVE, + COMMAND_SET_DRAW_HUD, + COMMAND_GET_RANDOM_CHAR_IN_AREA_NO_CHECKS, + COMMAND_GET_RANDOM_CAR_IN_AREA_NO_CHECKS_NO_SAVE, + COMMAND_STORE_CAR_COLLIDED_WITH_NO_SAVE, + COMMAND_DISABLE_FERRY_PATH, + COMMAND_ENABLE_FERRY_PATH, + COMMAND_GET_CLOSEST_DOCKED_FERRY, + COMMAND_OPEN_FERRY_DOOR, + COMMAND_CLOSE_FERRY_DOOR, + COMMAND_IS_FERRY_DOOR_OPEN, + COMMAND_IS_FERRY_DOOR_CLOSED, + COMMAND_SKIP_FERRY_TO_NEXT_DOCK, + COMMAND_SET_CHAR_DROPS_WEAPONS_ON_DEATH, + COMMAND_IS_CHAR_CROUCHING, + COMMAND_GET_FERRY_BOARDING_SPACE, + COMMAND_GET_FERRY_HEADING, + COMMAND_SET_FERRIES_DISABLED, + COMMAND_COMPLETE_FERRY_DOOR_MOVEMENT, + COMMAND_OVERRIDE_CAR_REMOTE_CONTROL, + COMMAND_CANCEL_REMOTE_MODE, + COMMAND_REGISTER_CAR_SOLD, + COMMAND_ADD_MONEY_MADE_WITH_CAR_SALES, + COMMAND_SET_BRIDGE_STATE, + COMMAND_SET_OBJECT_TURN_SPEED, + COMMAND_SET_OBJECT_MASS, + COMMAND_HAS_CUTSCENE_LOADED, + COMMAND_SET_UNIQUE_JUMPS_FOUND, + COMMAND_SET_HIDDEN_PACKAGES_COLLECTED, + COMMAND_REGISTER_BIKE_SOLD, + COMMAND_ADD_MONEY_MADE_WITH_BIKE_SALES, + COMMAND_REGISTER_PACKAGE_SMUGGLED, + COMMAND_REGISTER_SMUGGLER_WASTED, + COMMAND_REGISTER_FASTEST_SMUGGLING_TIME, + COMMAND_SET_CHAR_DIVE_FROM_CAR, + COMMAND_WRECK_CAR, + COMMAND_ADD_MONEY_MADE_IN_COACH, + COMMAND_ADD_MONEY_MADE_COLLECTING_TRASH, + COMMAND_REGISTER_HITMAN_KILLED, + COMMAND_REGISTER_GUARDIAN_ANGEL_MISSION_PASSED, + COMMAND_REGISTER_HIGHEST_GUARDIAN_ANGEL_JUSTICE_DISHED, + COMMAND_REGISTER_BEST_BANDIT_LAP_TIME, + COMMAND_REGISTER_BEST_BANDIT_POSITION, + COMMAND_REGISTER_MOST_TIME_LEFT_TRAIN_RACE, + COMMAND_REGISTER_HIGHEST_TRAIN_CASH_EARNED, + COMMAND_REGISTER_FASTEST_HELI_RACE_TIME, + COMMAND_REGISTER_BEST_HELI_RACE_POSITION, + COMMAND_REGISTER_OUTFIT_CHANGE, + COMMAND_REGISTER_STREET_RACE_FASTEST_TIME, + COMMAND_REGISTER_STREET_RACE_FASTEST_LAP, + COMMAND_REGISTER_STREET_RACE_BEST_POSITION, + COMMAND_HAS_OBJECT_BEEN_DAMAGED_BY_WEAPON, + COMMAND_CLEAR_OBJECT_LAST_WEAPON_DAMAGE, + COMMAND_SET_CAR_TURN_SPEED, + COMMAND_SET_CAR_MOVE_SPEED, + COMMAND_SET_OBJECT_PROOFS, + COMMAND_GET_CAMERA_PED_ZOOM_INDICATOR, + COMMAND_SET_CAMERA_PED_ZOOM_INDICATOR, + COMMAND_GET_CAR_ORIENTATION, + COMMAND_SET_CAR_ORIENTATION, + COMMAND_IS_DEBUG_MENU_ON, + COMMAND_OPEN_VAN_BACK_DOORS, + COMMAND_GET_CHAR_THREAT_CHAR, + COMMAND_FREEZE_PED_ZOOM_SWITCH, + COMMAND_SET_OBJECT_RENDERED_DAMAGED, + COMMAND_GET_RANDOM_CAR_IN_AREA_NO_SAVE, + COMMAND_IS_PLAYER_MADE_SAFE, + COMMAND_PRINT_IF_FREE, + COMMAND_IS_E3_BUILD, + COMMAND_DECLARE_FORT_STAUNTON_DESTROYED_FLAG, + COMMAND_CLEAR_BIG_MESSAGES, + COMMAND_CLEAR_AREA_OF_OBJECTS, + COMMAND_LOAD_NON_STANDARD_PED_ANIM, + COMMAND_UNLOAD_NON_STANDARD_PED_ANIM, + COMMAND_1566, + COMMAND_BUILD_WORLD_GEOMETRY, + COMMAND_STORE_BUILDING_SWAP, + COMMAND_IS_MULTIPLAYER_ACTIVE, + COMMAND_GET_MULTIPLAYER_MODE, + COMMAND_MULTIPLAYER_SCRIPT_DONE, + COMMAND_IS_MULTIPLAYER_SERVER, + COMMAND_IS_MULTIPLAYER_TEAM_GAME, + COMMAND_GET_MULTIPLAYER_TEAM_ID, + COMMAND_DOES_SHORTCUT_TAXI_EXIST, + COMMAND_SET_ONSCREEN_TIMER_COLOUR, + COMMAND_SET_ONSCREEN_TIMER_BACKGROUND_COLOUR, + COMMAND_REMOVE_CAR_BOOT, + COMMAND_ADD_POINT_3D_MARKER, + COMMAND_GET_VECTOR_FROM_MULTIPLAYER, + COMMAND_PRINT_HELP_ALWAYS, + COMMAND_PRINT_HELP_FOREVER_ALWAYS, + COMMAND_SWITCH_FERRY_COLLISION, + COMMAND_SET_CHAR_MAX_HEALTH, + COMMAND_SET_CHAR_SHOOT_TIMER, + COMMAND_SET_CHAR_ATTACK_TIMER, + COMMAND_SET_HELI_ROTOR_BLADES_FULLSPEED, + COMMAND_SET_CRUSHER_REWARD_MULTIPLIER, + COMMAND_SWAP_BUILDINGS, + COMMAND_STREAM_BUILDING_SWAPS, + COMMAND_IS_WORLD_STREAMING_COMPLETE, + COMMAND_SWAP_TO_STREAMED_SECTOR, + COMMAND_SET_CHAR_ATTACKS_PLAYER_WITH_COPS, + COMMAND_REGISTER_FACE_PLANT_DISTANCE, + COMMAND_REGISTER_MAX_SECONDS_ON_CARNAGE_LEFT, + COMMAND_REGISTER_MAX_KILLS_ON_RC_TRIAD, + COMMAND_REGISTER_HIGHEST_LEVEL_SLASH_TV, + COMMAND_ADD_MONEY_MADE_WITH_SLASH_TV, + COMMAND_ADD_TOTAL_KILLS_ON_SLASH_TV, + COMMAND_ADD_NOODLES_DELIVERED, + COMMAND_REGISTER_SCRAPYARD_CHALLENGE_SCORE, + COMMAND_REGISTER_9MM_MAYHEM_SCORE, + COMMAND_REGISTER_SCOOTER_SHOOTER_SCORE, + COMMAND_ADD_MONEY_MADE_FROM_TOURIST, + COMMAND_ADD_TOURISTS_TAKEN_TO_SPOTS, + COMMAND_ADD_EXPORTED_CARS, + COMMAND_SET_TOTAL_EXPORT_CARS, + COMMAND_REGISTER_DIRT_BIKE_FASTEST_LAP, + COMMAND_REGISTER_DIRT_BIKE_FASTEST_TIME, + COMMAND_REGISTER_DIRT_BIKE_AIR_TIME, + COMMAND_ADD_ARROW_3D_MARKER, + COMMAND_PRINT_NOW_OVERRIDE_FADE, + COMMAND_GET_PICKUP_VALUE, + COMMAND_SET_PICKUP_VALUE, + COMMAND_IS_DEVELOPER, + COMMAND_SET_DEVELOPER_FLAG, + COMMAND_REGISTER_WICHITA_WIPEOUT_SCORE, + COMMAND_ATTACH_OBJECT_TO_CAR, + COMMAND_DETACH_OBJECT_FROM_CAR, + COMMAND_SET_PAD_STICKS_MULTIPLIER, + COMMAND_PRINT_SUBTITLE_NOW, + COMMAND_PRINT_SUBTITLE_NOW_OVERRIDE_FADE, + COMMAND_PRINT_SUBTITLE_NOW_NO_BRIEF, + COMMAND_PRINT_WITH_NUMBER_NOW_NO_BRIEF, + COMMAND_GET_ANGLE_BETWEEN_POINTS, + COMMAND_OVERRIDE_CHAR_MOVE_ANIM, + COMMAND_1627, + COMMAND_ENABLE_EMERGENCY_VEHICLES, + COMMAND_ADD_UNLOCKED_COSTUME, + COMMAND_CLEAR_MULTIPLAYER_SPLASH_SCREEN, + COMMAND_PRINT_WITH_2_NUMBERS_NOW_NO_BRIEF, + COMMAND_GET_OBJECT_ORIENTATION, + COMMAND_SET_OBJECT_ORIENTATION, + COMMAND_CHANGE_ONSCREEN_COUNTER_PREFIX, + COMMAND_STORE_PLAYER_OUTFIT, + COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_STRING, + COMMAND_SET_PLAYER_CURRENT_WEAPON_AMMO_IN_CLIP, + COMMAND_SET_CHAR_WAIT_STATE_REPEAT, + COMMAND_REGISTER_BEST_TIME_GOGO_FAGGIO, + COMMAND_LOCK_GARAGE, + COMMAND_IS_FINAL_GAME, + COMMAND_SET_ALLOWED_COLLISION, + COMMAND_REGISTER_GUARDIAN_ANGEL_LEVEL, + COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_NUMBER_AND_2_STRINGS, + COMMAND_GET_PLAYER_STORED_WEAPON, + COMMAND_DISABLE_PAUSE_MENU, + COMMAND_IS_CHANNEL_PLAYING, + COMMAND_SET_CLOCK_EVENT_WARNING, + COMMAND_SET_EXTRA_COLOUR_LIGHT_DIRECTION, + COMMAND_SET_CHAR_CAN_BE_TARGETTED_BY_LEADER, + COMMAND_PRINT_HELP_NO_BRIEF, + COMMAND_PRINT_HELP_FOREVER_NO_BRIEF, + COMMAND_PRINT_HELP_ALWAYS_NO_BRIEF, + COMMAND_PRINT_HELP_FOREVER_ALWAYS_NO_BRIEF, + COMMAND_SET_CAR_IS_REWARD, + COMMAND_FREEZE_ALL_PLAYER_FOLLOWERS, #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT LAST_SCRIPT_COMMAND #endif @@ -1488,7 +1676,9 @@ enum eScriptArgument ARGTYPE_PED_HANDLE, ARGTYPE_VEHICLE_HANDLE, ARGTYPE_OBJECT_HANDLE, - ARGTYPE_ANDOR + ARGTYPE_ANDOR, + ARGTYPE_LIST, + ARGTYPE_FUNCTION }; struct tScriptCommandData diff --git a/src/control/TrafficLights.cpp b/src/control/TrafficLights.cpp index e484d3be..a3cba9b9 100644 --- a/src/control/TrafficLights.cpp +++ b/src/control/TrafficLights.cpp @@ -114,6 +114,32 @@ CTrafficLights::DisplayActualLight(CEntity *ent) CBrightLights::RegisterOne(pos1, ent->GetUp(), ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN); CBrightLights::RegisterOne(pos2, ent->GetUp(), -ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN); + + // TODO(LCS): check coordinates + static const float top = -0.127f; + static const float bot = -0.539f; + static const float mid = bot + (top - bot) / 3.0f; + static const float left = 1.256f; + static const float right = 0.706f; + phase = CTrafficLights::LightForPeds(); + if (phase == PED_LIGHTS_DONT_WALK) { + CVector p0(2.7f, right, top); + CVector p1(2.7f, left, top); + CVector p2(2.7f, right, mid); + CVector p3(2.7f, left, mid); + CShinyTexts::RegisterOne(ent->GetMatrix() * p0, ent->GetMatrix() * p1, ent->GetMatrix() * p2, ent->GetMatrix() * p3, + 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, + SHINYTEXT_WALK, 255, 0, 0, 60.0f); + } + else if (phase == PED_LIGHTS_WALK || CTimer::GetTimeInMilliseconds() & 0x100) { + CVector p0(2.7f, right, mid); + CVector p1(2.7f, left, mid); + CVector p2(2.7f, right, bot); + CVector p3(2.7f, left, bot); + CShinyTexts::RegisterOne(ent->GetMatrix() * p0, ent->GetMatrix() * p1, ent->GetMatrix() * p2, ent->GetMatrix() * p3, + 1.0f, 0.5f, 0.0f, 0.5f, 1.0f, 1.0f, 0.0f, 1.0f, + SHINYTEXT_WALK, 255, 255, 255, 60.0f); + } } else if (MI_TRAFFICLIGHTS_VERTICAL == m) { CBaseModelInfo* mi = CModelInfo::GetModelInfo(ent->GetModelIndex()); diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp index 562b9c15..dc9b44cb 100644 --- a/src/core/AnimViewer.cpp +++ b/src/core/AnimViewer.cpp @@ -81,7 +81,7 @@ CAnimViewer::Initialise(void) { CCollision::Init(); CWorld::Initialise(); mod_HandlingManager.Initialise(); - CTempColModels::Initialise(); + gpTempColModels->Initialise(); CAnimManager::Initialise(); CModelInfo::Initialise(); CParticle::Initialise(); diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index cafbd340..3204613d 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -121,6 +121,7 @@ CCam::Process(void) else TargetOrientation = CGeneral::GetATanOfXY(CamTargetEntity->GetForward().x, CamTargetEntity->GetForward().y); +/* LCS: removed CVector Fwd(0.0f, 0.0f, 0.0f); Fwd.x = CamTargetEntity->GetForward().x; Fwd.y = CamTargetEntity->GetForward().y; @@ -138,6 +139,9 @@ CCam::Process(void) else TargetSpeedVar = -Min(Sqrt(SQR(FwdSpeedX) + SQR(FwdSpeedY))/1.8f, 0.5f); SpeedVar = 0.895f*SpeedVar + 0.105*TargetSpeedVar; +*/ + SpeedVar = 0.0f; + TargetSpeedVar = 0.0f; }else{ if(CamTargetEntity == FindPlayerPed()){ // Some fancy smoothing of player position and speed diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index e7cd65a0..6e632c7c 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -114,6 +114,7 @@ CCamera::Init(void) m_1rstPersonRunCloseToAWall = false; m_fPositionAlongSpline = 0.0f; m_bCameraJustRestored = false; + m_bFreezePedZoomSwitch = false; Cams[0].Init(); Cams[1].Init(); Cams[2].Init(); @@ -985,7 +986,7 @@ CCamera::CamControl(void) // Change user selected mode if(CPad::GetPad(0)->CycleCameraModeUpJustDown() && !CReplay::IsPlayingBack() && (m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) && - !m_WideScreenOn && !m_bFailedCullZoneTestPreviously && !m_bFirstPersonBeingUsed){ + !m_WideScreenOn && !m_bFailedCullZoneTestPreviously && !m_bFirstPersonBeingUsed && !m_bFreezePedZoomSwitch){ if(FrontEndMenuManager.m_ControlMethod == CONTROL_STANDARD){ if(PedZoomIndicator == CAM_ZOOM_3) PedZoomIndicator = CAM_ZOOM_1; @@ -3863,7 +3864,7 @@ CCamera::GetScreenFadeStatus(void) } - +//--LCS: TODO void CCamera::RenderMotionBlur(void) { @@ -3872,7 +3873,8 @@ CCamera::RenderMotionBlur(void) CMBlur::MotionBlurRender(m_pRwCamera, m_BlurRed, m_BlurGreen, m_BlurBlue, - m_motionBlur, m_BlurType, m_imotionBlurAddAlpha); +// m_motionBlur, m_BlurType, m_imotionBlurAddAlpha); + m_motionBlur, m_BlurType, 32); // hack hack } void diff --git a/src/core/Camera.h b/src/core/Camera.h index 39ecb760..66a89f21 100644 --- a/src/core/Camera.h +++ b/src/core/Camera.h @@ -368,6 +368,7 @@ public: bool m_bVehicleSuspenHigh; bool m_bEnable1rstPersonCamCntrlsScript; bool m_bAllow1rstPersonWeaponsCamera; + bool m_bFreezePedZoomSwitch; bool m_bFailedCullZoneTestPreviously; bool m_FadeTargetIsSplashScreen; diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp index a3298343..0aa841ae 100644 --- a/src/core/Clock.cpp +++ b/src/core/Clock.cpp @@ -18,6 +18,7 @@ uint16 CClock::ms_Stored_nGameClockSeconds; uint32 CClock::ms_nMillisecondsPerGameMinute; uint32 CClock::ms_nLastClockTick; bool CClock::ms_bClockHasBeenStored; +float CClock::ms_EnvMapTimeMultiplicator; #ifndef MASTER bool gbFreezeTime; @@ -33,6 +34,7 @@ CClock::Initialise(uint32 scale) ms_nMillisecondsPerGameMinute = scale; ms_nLastClockTick = CTimer::GetTimeInMilliseconds(); ms_bClockHasBeenStored = false; + ms_EnvMapTimeMultiplicator = 1.0f; debug("CClock ready\n"); #ifndef MASTER VarConsole.Add("Time (hour of day)", &ms_nGameClockHours, 1, 0, 23, true); @@ -134,3 +136,10 @@ CClock::RestoreClock(void) ms_nGameClockMinutes = ms_Stored_nGameClockMinutes; ms_nGameClockSeconds = ms_Stored_nGameClockSeconds; } + +void +CClock::CalcEnvMapTimeMultiplicator(void) +{ + float nightness = Abs(ms_nGameClockHours/24.0f - 0.5f); + ms_EnvMapTimeMultiplicator = SQR(1.0f - nightness);; +} diff --git a/src/core/Clock.h b/src/core/Clock.h index a611cd50..808e61f4 100644 --- a/src/core/Clock.h +++ b/src/core/Clock.h @@ -12,6 +12,7 @@ public: static uint32 ms_nMillisecondsPerGameMinute; static uint32 ms_nLastClockTick; static bool ms_bClockHasBeenStored; + static float ms_EnvMapTimeMultiplicator; static void Initialise(uint32 scale); static void Update(void); @@ -21,6 +22,8 @@ public: static void StoreClock(void); static void RestoreClock(void); + static void CalcEnvMapTimeMultiplicator(void); + static uint8 GetHours(void) { return ms_nGameClockHours; } static uint8 GetMinutes(void) { return ms_nGameClockMinutes; } static int16 GetSeconds(void) { return ms_nGameClockSeconds; } diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index dbf2cad9..e2b66286 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -291,7 +291,7 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) { int i; - model.boundingSphere.radius = *(float*)(buf); + model.boundingSphere.radius = Max(*(float*)(buf), 0.1f); model.boundingSphere.center.x = *(float*)(buf+4); model.boundingSphere.center.y = *(float*)(buf+8); model.boundingSphere.center.z = *(float*)(buf+12); @@ -304,10 +304,13 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) model.numSpheres = *(int16*)(buf+40); buf += 44; if(model.numSpheres > 0){ - model.spheres = (CColSphere*)RwMalloc(model.numSpheres*sizeof(CColSphere)); + model.spheres = new CColSphere[model.numSpheres]; REGISTER_MEMPTR(&model.spheres); for(i = 0; i < model.numSpheres; i++){ - model.spheres[i].Set(*(float*)buf, *(CVector*)(buf+4), buf[16], buf[17]); + float radius = *(float*)buf; + if(radius > model.boundingSphere.radius) + model.boundingSphere.radius = radius + 0.01f; + model.spheres[i].Set(radius, *(CVector*)(buf+4), buf[16], buf[17]); buf += 20; } }else @@ -316,7 +319,7 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) model.numLines = *(int16*)buf; buf += 4; if(model.numLines > 0){ - //model.lines = (CColLine*)RwMalloc(model.numLines*sizeof(CColLine)); + //model.lines = new CColLine[model.numLines];; REGISTER_MEMPTR(&model.lines); for(i = 0; i < model.numLines; i++){ //model.lines[i].Set(*(CVector*)buf, *(CVector*)(buf+12)); @@ -330,7 +333,7 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) model.numBoxes = *(int16*)buf; buf += 4; if(model.numBoxes > 0){ - model.boxes = (CColBox*)RwMalloc(model.numBoxes*sizeof(CColBox)); + model.boxes = new CColBox[model.numBoxes]; REGISTER_MEMPTR(&model.boxes); for(i = 0; i < model.numBoxes; i++){ model.boxes[i].Set(*(CVector*)buf, *(CVector*)(buf+12), buf[24], buf[25]); @@ -342,7 +345,7 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) int32 numVertices = *(int16*)buf; buf += 4; if(numVertices > 0){ - model.vertices = (CompressedVector*)RwMalloc(numVertices*sizeof(CompressedVector)); + model.vertices = new CompressedVector[numVertices]; REGISTER_MEMPTR(&model.vertices); for(i = 0; i < numVertices; i++){ model.vertices[i].Set(*(float*)buf, *(float*)(buf+4), *(float*)(buf+8)); @@ -360,14 +363,64 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname) model.numTriangles = *(int16*)buf; buf += 4; if(model.numTriangles > 0){ - model.triangles = (CColTriangle*)RwMalloc(model.numTriangles*sizeof(CColTriangle)); + model.triangles = new CColTriangle[model.numTriangles]; REGISTER_MEMPTR(&model.triangles); for(i = 0; i < model.numTriangles; i++){ model.triangles[i].Set(*(int32*)buf, *(int32*)(buf+4), *(int32*)(buf+8), buf[12]); buf += 16; + + // skip small triangles + CVector vA = model.vertices[model.triangles[i].a].Get(); + CVector vB = model.vertices[model.triangles[i].b].Get(); + CVector vC = model.vertices[model.triangles[i].c].Get(); + float area = CrossProduct(vA - vB, vA - vC).Magnitude(); + if(area < 0.001f || vA == vB || vA == vC || vB == vC){ + i--; + model.numTriangles--; + } } }else model.triangles = nil; + + SplitColTrianglesIntoSections(model); +} + +void +CFileLoader::SplitColTrianglesIntoSections(CColModel &model) +{ + if(model.triangles == nil || model.numTriangles == 0) + return; + + model.numTriBBoxes = 1; + model.triBBoxes = new CColTriBBox[1]; + model.triBBoxes[0].first = 0; + model.triBBoxes[0].last = model.numTriangles-1; + CVector v = model.vertices[model.triangles[0].a].Get(); + model.triBBoxes[0].Set(v, v); + + for(int i = 0; i < model.numTriangles; i++){ + CVector vA = model.vertices[model.triangles[i].a].Get(); + CVector vB = model.vertices[model.triangles[i].b].Get(); + CVector vC = model.vertices[model.triangles[i].c].Get(); + model.triBBoxes[0].min.x = Min(vA.x, model.triBBoxes[0].min.x); + model.triBBoxes[0].min.y = Min(vA.y, model.triBBoxes[0].min.y); + model.triBBoxes[0].min.z = Min(vA.z, model.triBBoxes[0].min.z); + model.triBBoxes[0].min.x = Min(vB.x, model.triBBoxes[0].min.x); + model.triBBoxes[0].min.y = Min(vB.y, model.triBBoxes[0].min.y); + model.triBBoxes[0].min.z = Min(vB.z, model.triBBoxes[0].min.z); + model.triBBoxes[0].min.x = Min(vC.x, model.triBBoxes[0].min.x); + model.triBBoxes[0].min.y = Min(vC.y, model.triBBoxes[0].min.y); + model.triBBoxes[0].min.z = Min(vC.z, model.triBBoxes[0].min.z); + model.triBBoxes[0].max.x = Max(vA.x, model.triBBoxes[0].max.x); + model.triBBoxes[0].max.y = Max(vA.y, model.triBBoxes[0].max.y); + model.triBBoxes[0].max.z = Max(vA.z, model.triBBoxes[0].max.z); + model.triBBoxes[0].max.x = Max(vB.x, model.triBBoxes[0].max.x); + model.triBBoxes[0].max.y = Max(vB.y, model.triBBoxes[0].max.y); + model.triBBoxes[0].max.z = Max(vB.z, model.triBBoxes[0].max.z); + model.triBBoxes[0].max.x = Max(vC.x, model.triBBoxes[0].max.x); + model.triBBoxes[0].max.y = Max(vC.y, model.triBBoxes[0].max.y); + model.triBBoxes[0].max.z = Max(vC.z, model.triBBoxes[0].max.z); + } } static void @@ -608,11 +661,14 @@ CFileLoader::LoadObjectTypes(const char *filename) int section; int pathIndex; int id, pathType; - int minID, maxID; + //int minID, maxID; + + for(int i = 0; i < ARRAY_SIZE(m_sTempIdeData); i++) + m_sTempIdeData[i].id = -1; section = NONE; - minID = INT32_MAX; - maxID = -1; + //minID = INT32_MAX; + //maxID = -1; pathIndex = -1; debug("Loading object types from %s...\n", filename); @@ -636,13 +692,13 @@ CFileLoader::LoadObjectTypes(const char *filename) }else switch(section){ case OBJS: id = LoadObject(line); - if(id > maxID) maxID = id; - if(id < minID) minID = id; + //if(id > maxID) maxID = id; + //if(id < minID) minID = id; break; case TOBJ: id = LoadTimeObject(line); - if(id > maxID) maxID = id; - if(id < minID) minID = id; + //if(id > maxID) maxID = id; + //if(id < minID) minID = id; break; case WEAP: LoadWeaponObject(line); @@ -679,10 +735,10 @@ CFileLoader::LoadObjectTypes(const char *filename) } CFileMgr::CloseFile(fd); - for(id = minID; id <= maxID; id++){ + for(id = 0; id < MODELINFOSIZE; id++){ CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(id); if(mi && mi->IsBuilding()) - mi->SetupBigBuilding(minID, maxID); + mi->SetupBigBuilding(); } } @@ -715,6 +771,13 @@ CFileLoader::LoadObject(const char *line) if(sscanf(line, "%d %s %s %d", &id, model, txd, &numObjs) != 4) return 0; // game returns return value + for(int i = 0; i < ARRAY_SIZE(m_sTempIdeData); i++) + if(m_sTempIdeData[i].id == -1){ + m_sTempIdeData[i].id = id; + strcpy(m_sTempIdeData[i].name, model); + break; + } + switch(numObjs){ case 1: sscanf(line, "%d %s %s %d %f %d", @@ -763,6 +826,13 @@ CFileLoader::LoadTimeObject(const char *line) if(sscanf(line, "%d %s %s %d", &id, model, txd, &numObjs) != 4) return 0; // game returns return value + for(int i = 0; i < ARRAY_SIZE(m_sTempIdeData); i++) + if(m_sTempIdeData[i].id < 0){ + m_sTempIdeData[i].id = id; + strcpy(m_sTempIdeData[i].name, model); + break; + } + switch(numObjs){ case 1: sscanf(line, "%d %s %s %d %f %d %d %d", @@ -793,7 +863,7 @@ CFileLoader::LoadTimeObject(const char *line) mi->m_firstDamaged = damaged; mi->SetTimes(timeOn, timeOff); mi->SetTexDictionary(txd); - other = mi->FindOtherTimeModel(); + other = mi->FindOtherTimeModel(model); if(other) other->SetOtherTimeModel(id); MatchModelString(model, id); @@ -817,7 +887,7 @@ CFileLoader::LoadWeaponObject(const char *line) mi->m_lodDistances[0] = dist; mi->SetTexDictionary(txd); mi->SetAnimFile(animFile); - mi->SetColModel(&CTempColModels::ms_colModelWeapon); + mi->SetColModel(&gpTempColModels->ms_colModelWeapon); MatchModelString(model, id); return id; } @@ -833,7 +903,7 @@ CFileLoader::LoadClumpObject(const char *line) mi = CModelInfo::AddClumpModel(id); mi->SetModelName(model); mi->SetTexDictionary(txd); - mi->SetColModel(&CTempColModels::ms_colModelBBox); + mi->SetColModel(&gpTempColModels->ms_colModelBBox); } } @@ -845,14 +915,15 @@ CFileLoader::LoadVehicleObject(const char *line) char type[8], handlingId[16], gamename[32], animFile[16], vehclass[12]; uint32 frequency, comprules; int32 level, misc; - float wheelScale; + float wheelScale, normalSplay; CVehicleModelInfo *mi; char *p; - sscanf(line, "%d %s %s %s %s %s %s %s %d %d %x %d %f", + sscanf(line, "%d %s %s %s %s %s %s %s %d %d %x %d %f %f", &id, model, txd, type, handlingId, gamename, animFile, vehclass, - &frequency, &level, &comprules, &misc, &wheelScale); + &frequency, &level, &comprules, &misc, &wheelScale, + &normalSplay); mi = CModelInfo::AddVehicleModel(id); mi->SetModelName(model); @@ -872,6 +943,8 @@ CFileLoader::LoadVehicleObject(const char *line) mi->m_vehicleType = VEHICLE_TYPE_BOAT; }else if(strcmp(type, "train") == 0){ mi->m_vehicleType = VEHICLE_TYPE_TRAIN; + }else if(strcmp(type, "ferry") == 0){ + mi->m_vehicleType = VEHICLE_TYPE_FERRY; }else if(strcmp(type, "heli") == 0){ mi->m_vehicleType = VEHICLE_TYPE_HELI; }else if(strcmp(type, "plane") == 0){ @@ -937,7 +1010,7 @@ CFileLoader::LoadPedObject(const char *line) mi->SetModelName(model); mi->SetTexDictionary(txd); mi->SetAnimFile(animFile); - mi->SetColModel(&CTempColModels::ms_colModelPed1); + mi->SetColModel(&gpTempColModels->ms_colModelPed1); mi->m_pedType = CPedType::FindPedType(pedType); mi->m_pedStatType = CPedStats::GetPedStatType(pedStats); for(animGroupId = 0; animGroupId < NUM_ANIM_ASSOC_GROUPS; animGroupId++) diff --git a/src/core/FileLoader.h b/src/core/FileLoader.h index 077e7bdd..3a7d43a7 100644 --- a/src/core/FileLoader.h +++ b/src/core/FileLoader.h @@ -11,6 +11,7 @@ public: static bool LoadCollisionFileFirstTime(uint8 *buffer, uint32 size, uint8 colSlot); static bool LoadCollisionFile(uint8 *buffer, uint32 size, uint8 colSlot); static void LoadCollisionModel(uint8 *buf, struct CColModel &model, char *name); + static void SplitColTrianglesIntoSections(CColModel &model); static void LoadModelFile(const char *filename); static RpAtomic *FindRelatedModelInfoCB(RpAtomic *atomic, void *data); static void LoadClumpFile(const char *filename); diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 632a69ab..975cc7da 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -36,15 +36,16 @@ #include "User.h" #include "sampman.h" +// --LCS: changed a bit to have lcs feel, needs more work // Similar story to Hud.cpp: // Game has colors inlined in code. // For easier modification we collect them here: -const CRGBA LABEL_COLOR(255, 150, 225, 255); +const CRGBA LABEL_COLOR(115, 173, 216, 255); const CRGBA SELECTIONBORDER_COLOR(25, 130, 70, 255); const CRGBA MENUOPTION_COLOR = LABEL_COLOR; -const CRGBA SELECTEDMENUOPTION_COLOR = LABEL_COLOR; -const CRGBA HEADER_COLOR = LABEL_COLOR; -const CRGBA DARKMENUOPTION_COLOR(195, 90, 165, 255); +const CRGBA SELECTEDMENUOPTION_COLOR(255, 255, 255, 255); +const CRGBA HEADER_COLOR(197, 0, 0, 255); +const CRGBA DARKMENUOPTION_COLOR(115/2, 173/2, 216 / 2, 255); const CRGBA SLIDERON_COLOR(97, 194, 247, 255); const CRGBA SLIDEROFF_COLOR(27, 89, 130, 255); const CRGBA LIST_BACKGROUND_COLOR(49, 101, 148, 130); @@ -53,6 +54,19 @@ const CRGBA RADIO_SELECTOR_COLOR = SLIDEROFF_COLOR; const CRGBA INACTIVE_RADIO_COLOR(100, 100, 255, 100); const CRGBA SCROLLBAR_COLOR = LABEL_COLOR; +#if 0 +// Mobile +#define DEFAULT_BRIGHTNESS 0x150 +#define MIN_BRIGHTNESS 180 +#define MAX_BRIGHTNESS 700 +#else +// PS2, also PSP probably +// 8 bars (32 step) +#define DEFAULT_BRIGHTNESS 0x120 +#define MIN_BRIGHTNESS 0x80 +#define MAX_BRIGHTNESS 0x180 +#endif + #define MAP_MIN_SIZE 162.f #define MAP_SIZE_TO_ALLOW_X_MOVE 297.f @@ -187,7 +201,7 @@ wchar* CMenuManager::m_pDialogText = nil; #endif #define SET_FONT_FOR_MENU_HEADER \ - CFont::SetRightJustifyOn(); \ + CFont::SetRightJustifyOff(); \ CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); \ CFont::SetScale(MENU_X(MENUHEADER_WIDTH), MENU_Y(MENUHEADER_HEIGHT)); \ CFont::SetDropShadowPosition(0); @@ -471,7 +485,7 @@ CMenuManager::CMenuManager() m_PrefsMusicVolume = 49; m_PrefsRadioStation = 0; m_PrefsStereoMono = 1; - m_PrefsBrightness = 256; + m_PrefsBrightness = DEFAULT_BRIGHTNESS; m_PrefsLOD = CRenderer::ms_lodDistScale; m_KeyPressedCode = -1; m_bFrontEnd_ReloadObrTxtGxt = false; @@ -696,8 +710,8 @@ CMenuManager::CheckSliderMovement(int value) { switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) { case MENUACTION_BRIGHTNESS: - m_PrefsBrightness += value * 24.19f; - m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 384); + m_PrefsBrightness += value * 32.0f; + m_PrefsBrightness = Clamp(m_PrefsBrightness, MIN_BRIGHTNESS, MAX_BRIGHTNESS); break; case MENUACTION_DRAWDIST: if(value > 0) @@ -917,14 +931,14 @@ CMenuManager::DrawStandardMenus(bool activeScreen) #endif switch (m_nCurrScreen) { - case MENUPAGE_CHOOSE_LOAD_SLOT: + /*case MENUPAGE_CHOOSE_LOAD_SLOT: case MENUPAGE_CHOOSE_DELETE_SLOT: case MENUPAGE_CHOOSE_SAVE_SLOT: CSprite2d::Draw2DPolygon(MENU_X_LEFT_ALIGNED(38.0f), MENU_Y(85.0f), MENU_X_LEFT_ALIGNED(615.0f), MENU_Y(75.0f), MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(320.0f), MENU_X_LEFT_ALIGNED(605.0f), MENU_Y(330.0f), CRGBA(LIST_BACKGROUND_COLOR.r, LIST_BACKGROUND_COLOR.g, LIST_BACKGROUND_COLOR.b, FadeIn(LIST_BACKGROUND_COLOR.a))); - break; + break;*/ case MENUPAGE_SOUND_SETTINGS: PrintRadioSelector(); break; @@ -940,11 +954,11 @@ CMenuManager::DrawStandardMenus(bool activeScreen) if (aScreens[m_nCurrScreen].m_ScreenName[0] != '\0') { SET_FONT_FOR_MENU_HEADER - CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255))); - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); + //CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255))); + //CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255))); - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); + CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); } // Label @@ -1020,18 +1034,21 @@ CMenuManager::DrawStandardMenus(bool activeScreen) #endif wchar* rightText = nil; wchar* leftText; - if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot >= SAVESLOT_1 && aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot <= SAVESLOT_8) { + /*if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot >= SAVESLOT_1 && aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot <= SAVESLOT_8) { CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MEDIUMTEXT_X_SCALE), MENU_Y(MEDIUMTEXT_Y_SCALE)); CFont::SetDropShadowPosition(0); - } else { - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + } else {*/ + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE)); CFont::SetDropShadowPosition(2); CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255))); - CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255))); - } + if (i == m_nCurrOption && itemsAreSelectable) + CFont::SetColor(CRGBA(SELECTEDMENUOPTION_COLOR.r, SELECTEDMENUOPTION_COLOR.g, SELECTEDMENUOPTION_COLOR.b, FadeIn(255))); + else + CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255))); + //} if (aScreens[m_nCurrScreen].m_aEntries[i].m_Align == MENUALIGN_LEFT) { CFont::SetCentreOff(); CFont::SetRightJustifyOff(); @@ -1387,7 +1404,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen) // Actually bottomRight and bottomLeft should be exchanged here(although this is original code). // So this shows us either R* didn't use same struct for menu BG and highlight, or they just kept fields as x1,y1 etc. Yikes. - if (m_nOptionHighlightTransitionBlend == 0) { + /*if (m_nOptionHighlightTransitionBlend == 0) { if (m_firstStartCounter == 255 && m_nMenuFadeAlpha == 255 && !bMenuChangeOngoing) { CSprite2d::Draw2DPolygon(MENU_X_LEFT_ALIGNED(menuOptionHighlight.topLeft_x), MENU_Y(menuOptionHighlight.topLeft_y), MENU_X_LEFT_ALIGNED(menuOptionHighlight.topRight_x), MENU_Y(menuOptionHighlight.topRight_y), @@ -1423,7 +1440,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen) MENU_X_LEFT_ALIGNED(menuOptionHighlight.bottomRight_x), MENU_Y(menuOptionHighlight.bottomRight_y), MENU_X_LEFT_ALIGNED(menuOptionHighlight.bottomLeft_x), MENU_Y(menuOptionHighlight.bottomLeft_y), SELECTIONBORDER_COLOR); } - } + }*/ static uint32 lastBlendChange = 0; if (m_nOptionHighlightTransitionBlend <= 255) { @@ -1455,7 +1472,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen) CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MEDIUMTEXT_X_SCALE), MENU_Y(MEDIUMTEXT_Y_SCALE)); } else { - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE)); } CFont::PrintString(MENU_X_LEFT_ALIGNED(DEFAULT_SCREEN_WIDTH - RIGHT_ALIGNED_TEXT_RIGHT_MARGIN(xMargin)), MENU_Y(aScreens[m_nCurrScreen].m_aEntries[i].m_Y MINUS_SCROLL_OFFSET), rightText); @@ -1506,7 +1523,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen) int lastActiveBarX; switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) { case MENUACTION_BRIGHTNESS: - ProcessSlider(m_PrefsBrightness / 384.0f, 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true); + ProcessSlider((float)(m_PrefsBrightness - MIN_BRIGHTNESS) / (MAX_BRIGHTNESS - MIN_BRIGHTNESS), 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true); break; case MENUACTION_DRAWDIST: ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, 99.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true); @@ -2038,18 +2055,18 @@ CMenuManager::DrawControllerSetupScreen() // Shadow CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255))); - if (m_ControlMethod == CONTROL_STANDARD) - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_STI")); - else if (m_ControlMethod == CONTROL_CLASSIC) - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_CTI")); + //if (m_ControlMethod == CONTROL_STANDARD) + // CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_STI")); + //else if (m_ControlMethod == CONTROL_CLASSIC) + // CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_CTI")); // Real header CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255))); if (m_ControlMethod == CONTROL_STANDARD) - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_STI")); + CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_STI")); else if (m_ControlMethod == CONTROL_CLASSIC) - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_CTI")); + CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_CTI")); wchar *actionTexts[33]; actionTexts[0] = TheText.Get("FEC_FIR"); @@ -2202,7 +2219,7 @@ CMenuManager::DrawControllerSetupScreen() } // Back button and it's shadow - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE)); CFont::SetRightJustifyOn(); CFont::SetDropShadowPosition(2); @@ -2261,7 +2278,7 @@ CMenuManager::DrawBackground(bool transitionCall) PrintMap(); // Left border - CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(menuBg.bottomLeft_x), SCREEN_STRETCH_Y(menuBg.bottomLeft_y), 0.0f, SCREEN_HEIGHT, + /*CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(menuBg.bottomLeft_x), SCREEN_STRETCH_Y(menuBg.bottomLeft_y), 0.0f, SCREEN_HEIGHT, SCREEN_STRETCH_X(menuBg.topLeft_x), SCREEN_STRETCH_Y(menuBg.topLeft_y), 0.0f, 0.0f, CRGBA(0, 0, 0, 255)); // Top border @@ -2274,7 +2291,7 @@ CMenuManager::DrawBackground(bool transitionCall) // Right border CSprite2d::Draw2DPolygon(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_STRETCH_X(menuBg.bottomRight_x), SCREEN_STRETCH_Y(menuBg.bottomRight_y), - SCREEN_WIDTH, 0.0f, SCREEN_STRETCH_X(menuBg.topRight_x), SCREEN_STRETCH_Y(menuBg.topRight_y), CRGBA(0, 0, 0, 255)); + SCREEN_WIDTH, 0.0f, SCREEN_STRETCH_X(menuBg.topRight_x), SCREEN_STRETCH_Y(menuBg.topRight_y), CRGBA(0, 0, 0, 255));*/ } else { m_nMenuFadeAlpha = 255; m_firstStartCounter = 255; @@ -2283,7 +2300,7 @@ CMenuManager::DrawBackground(bool transitionCall) PrintMap(); // Left border - CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(menuBg.bottomLeft_x), SCREEN_STRETCH_Y(menuBg.bottomLeft_y), 0.0f, SCREEN_HEIGHT, + /*CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(menuBg.bottomLeft_x), SCREEN_STRETCH_Y(menuBg.bottomLeft_y), 0.0f, SCREEN_HEIGHT, SCREEN_STRETCH_X(menuBg.topLeft_x), SCREEN_STRETCH_Y(menuBg.topLeft_y), 0.0f, 0.0f, CRGBA(0, 0, 0, 255)); // Top border @@ -2296,7 +2313,7 @@ CMenuManager::DrawBackground(bool transitionCall) // Right border CSprite2d::Draw2DPolygon(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_STRETCH_X(menuBg.bottomRight_x), SCREEN_STRETCH_Y(menuBg.bottomRight_y), - SCREEN_WIDTH, 0.0f, SCREEN_STRETCH_X(menuBg.topRight_x), SCREEN_STRETCH_Y(menuBg.topRight_y), CRGBA(0, 0, 0, 255)); + SCREEN_WIDTH, 0.0f, SCREEN_STRETCH_X(menuBg.topRight_x), SCREEN_STRETCH_Y(menuBg.topRight_y), CRGBA(0, 0, 0, 255));*/ } } else { menuBg.SaveCurrentCoors(); @@ -2386,9 +2403,9 @@ CMenuManager::DrawBackground(bool transitionCall) if (CTimer::GetTimeInMillisecondsPauseMode() - LastFade > 30 || forceFadeInCounter > 30 ) { - m_nMenuFadeAlpha += 20; + m_nMenuFadeAlpha += 50; if (m_firstStartCounter < 255) { - m_firstStartCounter = Min(m_firstStartCounter + 20, 255); + m_firstStartCounter = Min(m_firstStartCounter + 50, 255); } LastFade = CTimer::GetTimeInMillisecondsPauseMode(); #ifdef FIX_BUGS @@ -2447,12 +2464,12 @@ CMenuManager::DrawBackground(bool transitionCall) CFont::DrawFonts(); SetFrontEndRenderStates(); - if (m_nCurrScreen != MENUPAGE_OUTRO) - if (m_firstStartCounter == 255) { - m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, 255)); - } else { - m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, FadeIn(255))); - } + //if (m_nCurrScreen != MENUPAGE_OUTRO) + // if (m_firstStartCounter == 255) { + // m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, 255)); + // } else { + // m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, FadeIn(255))); + // } if (m_ShowEmptyBindingError) { static uint32 lastBindingError = CTimer::GetTimeInMillisecondsPauseMode(); @@ -2571,11 +2588,11 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen) MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM)), CRGBA(LIST_BACKGROUND_COLOR.r, LIST_BACKGROUND_COLOR.g, LIST_BACKGROUND_COLOR.b, FadeIn(LIST_BACKGROUND_COLOR.a))); SET_FONT_FOR_MENU_HEADER - CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255))); - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_PS")); + //CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255))); + //CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_PS")); CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255))); - CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_PS")); + CFont::PrintString(SCREEN_STRETCH_X(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_PS")); // Header (Skin - Date) if (m_nCurrExLayer == HOVEROPTION_LIST) { @@ -2755,7 +2772,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen) // Big apply button if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) { - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); switch (m_PrefsLanguage) { case LANGUAGE_FRENCH: CFont::SetScale(MENU_X(1.1f), MENU_Y(1.9f)); @@ -2775,7 +2792,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen) CFont::SetRightJustifyOff(); CFont::PrintString(MENU_X_LEFT_ALIGNED(24.0f), MENU_Y(220.0f), TheText.Get("FET_APP")); } - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE)); @@ -2847,7 +2864,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen) m_nHoverOption = HOVEROPTION_NOT_HOVERING; } } - CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE)); CFont::SetRightJustifyOn(); CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255))); @@ -3286,7 +3303,7 @@ CMenuManager::SmallMessageScreen(const char* text) void CMenuManager::PrintBriefs() { - CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); + CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); CFont::SetRightJustifyOff(); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MEDIUMTEXT_X_SCALE), MENU_Y(MEDIUMTEXT_Y_SCALE)); @@ -3442,9 +3459,9 @@ CMenuManager::Process(void) #ifdef XBOX_MESSAGE_SCREEN ProcessDialogTimer(); #endif - - if (TheCamera.GetScreenFadeStatus() != FADE_0) - return; + // tmp hack to get saving to work + //if (TheCamera.GetScreenFadeStatus() != FADE_0) + // return; InitialiseChangedLanguageSettings(); @@ -4743,7 +4760,8 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u break; case MENUACTION_CANCELGAME: DMAudio.Service(); - SwitchToNewScreen(MENUPAGE_OUTRO); + RsEventHandler(rsQUITAPP, nil); + //SwitchToNewScreen(MENUPAGE_OUTRO); break; case MENUACTION_RESUME: #ifdef LEGACY_MENU_OPTIONS @@ -4815,7 +4833,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE); SaveSettings(); } else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) { - m_PrefsBrightness = 256; + m_PrefsBrightness = DEFAULT_BRIGHTNESS; m_PrefsLOD = 1.2f; #ifdef LEGACY_MENU_OPTIONS m_PrefsVsync = true; @@ -5673,7 +5691,7 @@ CMenuManager::DrawQuitGameScreen(void) static CSprite2d *splash = nil; if (splash == nil) - splash = LoadSplash("OUTRO"); + splash = LoadSplash("sceelee"); m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(28.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, 255 - alpha)); diff --git a/src/core/Game.cpp b/src/core/Game.cpp index c5e5224d..93137a49 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -22,6 +22,7 @@ #include "Darkel.h" #include "Debug.h" #include "EventList.h" +#include "Ferry.h" #include "FileLoader.h" #include "FileMgr.h" #include "Fire.h" @@ -322,7 +323,7 @@ bool CGame::InitialiseOnceAfterRW(void) { TheText.Load(); CTimer::Initialise(); - CTempColModels::Initialise(); + gpTempColModels->Initialise(); mod_HandlingManager.Initialise(); CSurfaceTable::Initialise("DATA\\SURFACE.DAT"); CPedStats::Initialise(); @@ -372,13 +373,16 @@ bool CGame::Initialise(const char* datFile) CPools::Initialise(); + if(gMakeResources) + CVehicleModelInfo::Load(nil); + #ifndef GTA_PS2 CIniFile::LoadIniFile(); #endif #ifdef USE_TEXTURE_POOL _TexturePoolsUnknown(false); #endif - currLevel = LEVEL_BEACH; + currLevel = LEVEL_INDUSTRIAL; currArea = AREA_MAIN_MAP; PUSH_MEMID(MEMID_TEXTURES); @@ -449,7 +453,7 @@ bool CGame::Initialise(const char* datFile) CdStreamAddImage("MODELS\\GTA3.IMG"); - CFileLoader::LoadLevel("DATA\\DEFAULT.DAT"); +// CFileLoader::LoadLevel("DATA\\DEFAULT.DAT"); CFileLoader::LoadLevel(datFile); LoadingScreen("Loading the Game", "Add Particles", nil); @@ -544,6 +548,7 @@ bool CGame::Initialise(const char* datFile) LoadingScreen("Loading the Game", "Position dynamic objects", nil); LoadingScreen("Loading the Game", "Initialise vehicle paths", nil); + CFerry::InitFerrys(); CTrain::InitTrains(); CPlane::InitPlanes(); CCredits::Init(); @@ -592,7 +597,7 @@ bool CGame::ShutDown(void) CPlane::Shutdown(); CTrain::Shutdown(); CScriptPaths::Shutdown(); - CWaterCreatures::RemoveAll(); + //CWaterCreatures::RemoveAll(); CSpecialFX::Shutdown(); CGarages::Shutdown(); CMovingThings::Shutdown(); @@ -643,7 +648,7 @@ bool CGame::ShutDown(void) return true; } -void CGame::ReInitGameObjectVariables(void) +bool CGame::ReInitGameObjectVariables(bool load) { CGameLogic::InitAtStartOfGame(); #ifdef PS2_MENU @@ -666,8 +671,9 @@ void CGame::ReInitGameObjectVariables(void) CDraw::SetFOV(120.0f); CDraw::ms_fLODDistance = 500.0f; CStreaming::RequestBigBuildings(LEVEL_GENERIC); - CStreaming::RemoveIslandsNotUsed(LEVEL_BEACH); - CStreaming::RemoveIslandsNotUsed(LEVEL_MAINLAND); + CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL); + CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL); + CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN); CStreaming::LoadAllRequestedModels(false); currArea = AREA_MAIN_MAP; CPed::Initialise(); @@ -687,7 +693,7 @@ void CGame::ReInitGameObjectVariables(void) gPhoneInfo.Initialise(); PUSH_MEMID(MEMID_SCRIPT); - CTheScripts::Init(); + bool res = CTheScripts::Init(load); CGangs::Initialise(); POP_MEMID(); @@ -700,12 +706,14 @@ void CGame::ReInitGameObjectVariables(void) CStats::Init(); CPickups::Init(); CPacManPickups::Init(); - CGarages::Init(); + if (!load) + CGarages::Init(); CSpecialFX::Init(); CRopes::Init(); CWaterCannons::Init(); CScriptPaths::Init(); CParticle::ReloadConfig(); + CParticle::SetPixelData(); #ifdef PS2_MENU if ( !TheMemoryCard.m_bWantToLoad ) @@ -717,12 +725,15 @@ void CGame::ReInitGameObjectVariables(void) CTheScripts::StartTestScript(); CTheScripts::Process(); TheCamera.Process(); + CFerry::InitFerrys(); CTrain::InitTrains(); CPlane::InitPlanes(); } for (int32 i = 0; i < MAX_PADS; i++) CPad::GetPad(i)->Clear(true); + + return res; } void CGame::ReloadIPLs(void) @@ -753,7 +764,7 @@ void CGame::ShutDownForRestart(void) CRadar::RemoveRadarSections(); FrontEndMenuManager.UnloadTextures(); CParticleObject::RemoveAllExpireableParticleObjects(); - CWaterCreatures::RemoveAll(); + //CWaterCreatures::RemoveAll(); CSetPieces::Init(); CPedType::Shutdown(); CSpecialFX::Shutdown(); @@ -793,15 +804,15 @@ void CGame::InitialiseWhenRestarting(void) RestoreForStartLoad(); } - ReInitGameObjectVariables(); + bool bLoadSuccessful = ReInitGameObjectVariables(FrontEndMenuManager.m_bWantToLoad); if ( FrontEndMenuManager.m_bWantToLoad == true ) { - FrontEndMenuManager.m_bWantToLoad = false; InitRadioStationPositionList(); - if ( GenericLoad() == true ) + if ( bLoadSuccessful == true ) { DMAudio.ResetTimers(CTimer::GetTimeInMilliseconds()); + CFerry::InitFerrys(); CTrain::InitTrains(); CPlane::InitPlanes(); } @@ -817,8 +828,8 @@ void CGame::InitialiseWhenRestarting(void) ShutDownForRestart(); CTimer::Stop(); CTimer::Initialise(); - FrontEndMenuManager.m_bWantToLoad = false; - ReInitGameObjectVariables(); + //FrontEndMenuManager.m_bWantToLoad = false; + ReInitGameObjectVariables(false); currLevel = LEVEL_GENERIC; CCollision::SortOutCollisionAfterLoad(); } @@ -827,6 +838,7 @@ void CGame::InitialiseWhenRestarting(void) #endif } + FrontEndMenuManager.m_bWantToLoad = true; CTimer::Update(); DMAudio.ChangeMusicMode(MUSICMODE_GAME); @@ -837,6 +849,20 @@ void CGame::InitialiseWhenRestarting(void) void CGame::Process(void) { + if (FrontEndMenuManager.m_bWantToLoad) { + CTheScripts::StartTestScript(); + CTheScripts::Process(); + TheCamera.Process(); + CStreaming::LoadScene(TheCamera.GetPosition()); + //CGame::GenerateTempPedAtStartOfNetworkGame(); + if (!CStreaming::HasModelLoaded(MI_PLAYER)){ + CStreaming::RequestSpecialModel(MI_PLAYER, "player", STREAMFLAGS_DEPENDENCY | STREAMFLAGS_DONT_REMOVE); + CStreaming::LoadAllRequestedModels(false); + } + TheCamera.Process(); + CStreaming::LoadScene(TheCamera.GetPosition()); + FrontEndMenuManager.m_bWantToLoad = false; + } CPad::UpdatePads(); #ifdef USE_CUSTOM_ALLOCATOR ProcessTidyUpMemory(); @@ -858,9 +884,9 @@ void CGame::Process(void) gameProcessPirateCheck = 2; } #endif - uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond(); + //uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond(); CStreaming::Update(); - uint32 processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime; + //uint32 processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime; CWindModifiers::Number = 0; if (!CTimer::GetIsPaused()) { @@ -885,6 +911,7 @@ void CGame::Process(void) CCollision::Update(); CScriptPaths::Update(); + CFerry::UpdateFerrys(); CTrain::UpdateTrains(); CPlane::UpdatePlanes(); CHeli::UpdateHelis(); @@ -899,20 +926,20 @@ void CGame::Process(void) CEventList::Update(); CParticle::Update(); gFireManager.Update(); - if (processTime >= 2) { - CPopulation::Update(false); - } else { - uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond(); + //if (processTime >= 2) { + // CPopulation::Update(false); + //} else { + // uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond(); CPopulation::Update(true); - processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime; - } + // processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime; + //} CWeapon::UpdateWeapons(); if (!CCutsceneMgr::IsRunning()) CTheCarGenerators::Process(); if (!CReplay::IsPlayingBack()) CCranes::UpdateCranes(); CClouds::Update(); - CMovingThings::Update(); + //CMovingThings::Update(); // TODO CWaterCannons::Update(); CUserDisplay::Process(); CReplay::Update(); @@ -943,7 +970,7 @@ void CGame::Process(void) if (!CReplay::IsPlayingBack()) { PUSH_MEMID(MEMID_CARS); - if (processTime < 2) + //if (processTime < 2) CCarCtrl::GenerateRandomCars(); CRoadBlocks::GenerateRoadBlocks(); CCarCtrl::RemoveDistantCars(); diff --git a/src/core/Game.h b/src/core/Game.h index 4052eb00..e6016888 100644 --- a/src/core/Game.h +++ b/src/core/Game.h @@ -3,8 +3,10 @@ enum eLevelName { LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel LEVEL_GENERIC = 0, - LEVEL_BEACH, - LEVEL_MAINLAND, + LEVEL_INDUSTRIAL, + LEVEL_COMMERCIAL, + LEVEL_SUBURBAN, + LEVEL_UNDERGROUND, NUM_LEVELS }; @@ -60,7 +62,7 @@ public: static void FinalShutdown(void); static bool Initialise(const char *datFile); static bool ShutDown(void); - static void ReInitGameObjectVariables(void); + static bool ReInitGameObjectVariables(bool); static void ReloadIPLs(void); static void ShutDownForRestart(void); static void InitialiseWhenRestarting(void); @@ -78,4 +80,4 @@ public: static void ProcessTidyUpMemory(void); }; -inline bool IsAreaVisible(int area) { return area == CGame::currArea || area == AREA_EVERYWHERE; } +inline bool IsAreaVisible(int area) { return true; } diff --git a/src/core/IniFile.cpp b/src/core/IniFile.cpp index b9033530..3dd98865 100644 --- a/src/core/IniFile.cpp +++ b/src/core/IniFile.cpp @@ -8,7 +8,7 @@ #include "Population.h" float CIniFile::PedNumberMultiplier = 0.6f; -float CIniFile::CarNumberMultiplier = 0.6f; +float CIniFile::CarNumberMultiplier = 0.8f; void CIniFile::LoadIniFile() { @@ -25,5 +25,5 @@ void CIniFile::LoadIniFile() } CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier; CPopulation::MaxNumberOfPedsInUseInterior = 40.0f * PedNumberMultiplier; - CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier; + CCarCtrl::MaxNumberOfCarsInUse = 30.0f * CarNumberMultiplier; }
\ No newline at end of file diff --git a/src/core/KeyGen.cpp b/src/core/KeyGen.cpp new file mode 100644 index 00000000..c95ab4b1 --- /dev/null +++ b/src/core/KeyGen.cpp @@ -0,0 +1,106 @@ +#include "common.h" +#include "KeyGen.h" +#include <ctype.h> + +uint32 CKeyGen::keyTable[256] = +{ + 0, 0x77073096, 0xEE0E612C, 0x990951BA, + 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, + 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, + 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, + 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, + 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, + 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, + 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, + 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, + 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, + 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, + 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, + 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, + 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, + 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, + 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, + 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, + 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, + 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, + 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, + 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, + 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, + 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, + 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, + 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, + 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, + 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, + 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, + 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, + 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, + 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, + 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, + 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, + 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, + 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, + 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, + 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, + 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, + 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, + 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, + 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, + 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, + 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, + 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, + 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D +}; + +uint32 +CKeyGen::GetKey(const char *str, int size) +{ + uint32 key = 0xffffffff; + for (int i = 0; i < size; i++) + key = keyTable[(key ^ str[i]) & 0xFF] ^ (key >> 8); + return key; +} + +uint32 +CKeyGen::GetKey(const char *str) +{ + uint32 key = 0xffffffff; + while(*str != '\0') + key = keyTable[(key ^ *(str++)) & 0xFF] ^ (key >> 8); + return key; +} + +uint32 +CKeyGen::GetUppercaseKey(const char *str) +{ + uint32 key = 0xffffffff; + while (*str != '\0') + key = keyTable[(key ^ toupper(*(str++))) & 0xFF] ^ (key >> 8); + return key; +} + +uint32 +CKeyGen::AppendStringToKey(uint32 key, const char *str) +{ + while (*str != '\0') + key = keyTable[(key ^ *(str++)) & 0xFF] ^ (key >> 8); + return key; +}
\ No newline at end of file diff --git a/src/core/KeyGen.h b/src/core/KeyGen.h new file mode 100644 index 00000000..129859ce --- /dev/null +++ b/src/core/KeyGen.h @@ -0,0 +1,11 @@ +#pragma once + +class CKeyGen +{ + static uint32 keyTable[256]; +public: + static uint32 GetKey(const char *str, int size); + static uint32 GetKey(const char *str); + static uint32 GetUppercaseKey(const char *str); + static uint32 AppendStringToKey(uint32 key, const char *str); +};
\ No newline at end of file diff --git a/src/core/Leeds.cpp b/src/core/Leeds.cpp new file mode 100644 index 00000000..cda50605 --- /dev/null +++ b/src/core/Leeds.cpp @@ -0,0 +1,14 @@ +#include "common.h" +#include "Leeds.h" + +void LoadResource(RpAtomic *atomic) {} +void LoadResource(RpClump *clump) {} + + +void SaveResource(RwTexture *tex, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RwTexDictionary *txd, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RpMaterial *mat, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RpMaterialList *matlist, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RpGeometry *geo, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RpAtomic *atomic, base::cRelocatableChunkWriter &writer) {} +void SaveResource(RpClump *clump, base::cRelocatableChunkWriter &writer) {} diff --git a/src/core/Leeds.h b/src/core/Leeds.h new file mode 100644 index 00000000..bf71d7e0 --- /dev/null +++ b/src/core/Leeds.h @@ -0,0 +1,36 @@ +#pragma once + +/* +PatchElementModelInfo(RslElement *,void *) +ChunkName(char const*) +DestroyAndFreeResourceImage(void) +WriteOrder(char const*) +UnpatchTextures(void) +IsChunked(int) +SaveResourceImage(void) +LoadResourceImage(void) +SaveResource(RslNode *,base::cRelocatableChunkWriter &) +SaveResource(RslTAnimTree *,base::cRelocatableChunkWriter &) +SaveResource(RslSkin *,base::cRelocatableChunkWriter &) +SaveResource(CAnimBlendTree *,base::cRelocatableChunkWriter &) +PatchElementTextures(RslElement *) +PatchElementGroupTextures(RslElementGroup *) +*/ + +void LoadResource(RpAtomic *atomic); +void LoadResource(RpClump *clump); + +/* +cRelocatableChunkWriterGTA::Save(char const*,uint,uint,bool) +cRelocatableChunkGTA::cRelocatableChunkGTA(char const*,uint,uint,bool) +SaveAnimBlock(int) +SaveModel(int,bool) +*/ + +void SaveResource(RwTexture *tex, base::cRelocatableChunkWriter &writer); +void SaveResource(RwTexDictionary *txd, base::cRelocatableChunkWriter &writer); +void SaveResource(RpMaterial *mat, base::cRelocatableChunkWriter &writer); +void SaveResource(RpMaterialList *matlist, base::cRelocatableChunkWriter &writer); +void SaveResource(RpGeometry *geo, base::cRelocatableChunkWriter &writer); +void SaveResource(RpAtomic *atomic, base::cRelocatableChunkWriter &writer); +void SaveResource(RpClump *clump, base::cRelocatableChunkWriter &writer); diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index e75510e5..86c218fa 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -88,6 +88,7 @@ extern bool gbFastTime; extern bool gGravityCheat; #endif +/* LCS: removed void SpecialCarCheats() { if ( !CVehicle::bCheat9 ) @@ -136,6 +137,7 @@ void SpecialCarCheats() CPad::bHasPlayerCheated = true; } } +*/ void PickUpChicksCheat() { @@ -361,7 +363,7 @@ void ChangePlayerCheat() do { do { - modelId = CGeneral::GetRandomNumberInRange(0, MI_PGA); + modelId = CGeneral::GetRandomNumberInRange(0, MI_GANG18); anotherModelId = modelId+1; } while (!CModelInfo::GetModelInfo(anotherModelId)); } while (anotherModelId >= MI_SPECIAL01 && anotherModelId <= MI_SPECIAL04 || modelId == MI_TAXI_D); @@ -580,16 +582,18 @@ void SuicideCheat(void) { } void DoChicksWithGunsCheat(void) { +/* // broken in LCS CHud::SetHelpMessage(TheText.Get("CHEAT1"), true); CStreaming::SetModelIsDeletable(CGangs::GetGangPedModel1(GANG_PLAYER)); CStreaming::SetModelIsDeletable(CGangs::GetGangPedModel2(GANG_PLAYER)); CStreaming::SetModelTxdIsDeletable(CGangs::GetGangPedModel1(GANG_PLAYER)); CStreaming::SetModelTxdIsDeletable(CGangs::GetGangPedModel2(GANG_PLAYER)); CStreaming::RemoveCurrentZonesModels(); - CGangs::SetGangPedModels(GANG_PLAYER, MI_HFYBE, MI_WFYBE); + CGangs::SetGangPedModels(GANG_PLAYER, MI_CAS_WOM, MI_HOS_WOM); CGangs::SetGangWeapons(GANG_PLAYER, WEAPONTYPE_M4, WEAPONTYPE_M4); CStats::CheatedCount += 1000; CPad::bHasPlayerCheated = true; +*/ } ////////////////////////////////////////////////////////////////////////// @@ -1411,6 +1415,8 @@ void CPad::AddToPCCheatString(char c) KeyBoardCheatString[0] = ' '; BlackCarsCheat(); } +/* + // LCS: removed for now // "TRAVELINSTYLE" else if (!Cheat_strncmp(KeyBoardCheatString, "HQ`U`iLSFaNZ[")) { KeyBoardCheatString[0] = ' '; @@ -1506,6 +1512,7 @@ void CPad::AddToPCCheatString(char c) KeyBoardCheatString[0] = ' '; ChangePlayerModel("igdiaz"); } +*/ // DEEPFRIEDMARSBARS else if (!Cheat_strncmp(KeyBoardCheatString, "VWHC`mDTEPVZMpRK")) { KeyBoardCheatString[0] = ' '; @@ -1521,11 +1528,13 @@ void CPad::AddToPCCheatString(char c) KeyBoardCheatString[0] = ' '; BackToTheFuture(); } +/* LCS: removed // LOADSOFLITTLETHINGS else if (!Cheat_strncmp(KeyBoardCheatString, "VLUJUoHSU_VTMo`J]bV")) { KeyBoardCheatString[0] = ' '; SpecialCarCheats(); } +*/ // HOPINGIRL else if (!Cheat_strncmp(KeyBoardCheatString, "OWPH[dSVI")) { KeyBoardCheatString[0] = ' '; diff --git a/src/core/Pad.h b/src/core/Pad.h index f141ed6c..748482e7 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -164,6 +164,8 @@ public: int32 LastTimeTouched; int32 AverageWeapon; int32 AverageEntries; + float unk_B4; + float unk_B8; #ifdef DETECT_PAD_INPUT_SWITCH static bool IsAffectedByController; @@ -275,6 +277,16 @@ public: uint32 InputHowLongAgo(void); void SetDrunkInputDelay(int32 delay) { DrunkDrivingBufferUsed = delay; } + // TODO(LCS): properly, this is just to get some estimation for script + int16 GetOddJobTrigger() { return GetRightShockJustDown(); } + int16 GuiLeft() { return GetAnaloguePadLeft() || GetDPadLeftJustDown(); } + int16 GuiRight() { return GetAnaloguePadRight() || GetDPadRightJustDown(); } + int16 GuiUp() { return GetAnaloguePadUp() || GetDPadUpJustDown(); } + int16 GuiDown() { return GetAnaloguePadDown() || GetDPadDownJustDown(); } + int16 GuiSelect() { return GetCrossJustDown(); } + int16 GuiBack() { return GetTriangleJustDown(); } + int16 GetSkipCutscene() { return GetCrossJustDown(); } + #ifdef XINPUT static int XInputJoy1; static int XInputJoy2; diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 36d05b82..2e3372f1 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -418,8 +418,10 @@ CPlayerInfo::Process(void) CTimer::Update(); } m_bInRemoteMode = false; - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bRemoveFromWorld = true; - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = nil; + if (CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle) { + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bRemoveFromWorld = true; + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = nil; + } if (FindPlayerVehicle()) { FindPlayerVehicle()->SetStatus(STATUS_PLAYER); } diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index f58f4687..5c92206f 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -56,7 +56,7 @@ CSprite2d CRadar::SpraySprite; CSprite2d CRadar::TShirtSprite; CSprite2d CRadar::TommySprite; CSprite2d CRadar::PhoneSprite; -CSprite2d CRadar::RadioWildstyleSprite; +/*CSprite2d CRadar::RadioWildstyleSprite; CSprite2d CRadar::RadioFlashSprite; CSprite2d CRadar::RadioKChatSprite; CSprite2d CRadar::RadioFeverSprite; @@ -64,7 +64,39 @@ CSprite2d CRadar::RadioVRockSprite; CSprite2d CRadar::RadioVCPRSprite; CSprite2d CRadar::RadioEspantosoSprite; CSprite2d CRadar::RadioEmotionSprite; -CSprite2d CRadar::RadioWaveSprite; +CSprite2d CRadar::RadioWaveSprite;*/ +CSprite2d CRadar::EightBallSprite; +CSprite2d CRadar::BurnerSprite; +CSprite2d CRadar::CiprianiSprite; +CSprite2d CRadar::DonaldSprite; +CSprite2d CRadar::JosephSprite; +CSprite2d CRadar::LeoneSprite; +CSprite2d CRadar::MariaSprite; +CSprite2d CRadar::McraySprite; +CSprite2d CRadar::ToshikoSprite; +CSprite2d CRadar::VincenzoSprite; +CSprite2d CRadar::BombSprite; +CSprite2d CRadar::ClothesShopSprite; +CSprite2d CRadar::PropertyRedSprite; +CSprite2d CRadar::PhilCassidySprite; +CSprite2d CRadar::PowerupSprite; +CSprite2d CRadar::MPBase; +CSprite2d CRadar::MPCheckPoint; +CSprite2d CRadar::MPPlayer; +CSprite2d CRadar::MPObjective; +CSprite2d CRadar::MPCar; +CSprite2d CRadar::MPTank; +CSprite2d CRadar::MPCarLockup; +CSprite2d CRadar::MPTargetPlayer; +CSprite2d CRadar::MapHereSprite0; +CSprite2d CRadar::MapHereSprite1; +CSprite2d CRadar::MapHereSprite2; +CSprite2d CRadar::MapHereSprite3; +CSprite2d CRadar::MapHereSprite4; +CSprite2d CRadar::MapHereSprite5; +CSprite2d CRadar::MapHereSprite6; +CSprite2d CRadar::MapHereSprite7; +CSprite2d CRadar::MapWayPoint; CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = { nil, @@ -98,15 +130,38 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = { &TShirtSprite, &TommySprite, &PhoneSprite, - &RadioWildstyleSprite, - &RadioFlashSprite, - &RadioKChatSprite, - &RadioFeverSprite, - &RadioVRockSprite, - &RadioVCPRSprite, - &RadioEspantosoSprite, - &RadioEmotionSprite, - &RadioWaveSprite + &EightBallSprite, + &BurnerSprite, + &CiprianiSprite, + &DonaldSprite, + &JosephSprite, + &LeoneSprite, + &MariaSprite, + &McraySprite, + &ToshikoSprite, + &VincenzoSprite, + &BombSprite, + &ClothesShopSprite, + &PropertyRedSprite, + &PhilCassidySprite, + &PowerupSprite, + &MPBase, + &MPCheckPoint, + &MPPlayer, + &MPObjective, + &MPCar, + &MPTank, + &MPCarLockup, + &MPTargetPlayer, + &MapHereSprite0, + &MapHereSprite1, + &MapHereSprite2, + &MapHereSprite3, + &MapHereSprite4, + &MapHereSprite5, + &MapHereSprite6, + &MapHereSprite7, + &MapWayPoint, }; // Why this doesn't coincide with world coordinates i don't know @@ -1067,7 +1122,7 @@ CRadar::LoadTextures() TShirtSprite.SetTexture("tshirt"); TommySprite.SetTexture("tommy"); PhoneSprite.SetTexture("phone"); - RadioWildstyleSprite.SetTexture("RWildstyle"); + /*RadioWildstyleSprite.SetTexture("RWildstyle"); RadioFlashSprite.SetTexture("RFlash"); RadioKChatSprite.SetTexture("RKchat"); RadioFeverSprite.SetTexture("RFever"); @@ -1075,7 +1130,39 @@ CRadar::LoadTextures() RadioVCPRSprite.SetTexture("RVCPR"); RadioEspantosoSprite.SetTexture("REspantoso"); RadioEmotionSprite.SetTexture("REmotion"); - RadioWaveSprite.SetTexture("RWave"); + RadioWaveSprite.SetTexture("RWave");*/ + EightBallSprite.SetTexture("radar_8Ball"); + BurnerSprite.SetTexture("radar_Burner"); + CiprianiSprite.SetTexture("radar_Cipriani"); + DonaldSprite.SetTexture("radar_Donald"); + JosephSprite.SetTexture("radar_Joseph"); + LeoneSprite.SetTexture("radar_Leone"); + MariaSprite.SetTexture("radar_Maria"); + McraySprite.SetTexture("radar_McRay"); + ToshikoSprite.SetTexture("radar_Toshiko"); + VincenzoSprite.SetTexture("radar_Vincenzo"); + BombSprite.SetTexture("radar_Bomb"); + ClothesShopSprite.SetTexture("radar_cShop"); + PropertyRedSprite.SetTexture("radar_propertyR"); + PhilCassidySprite.SetTexture("radar_flag"); + PowerupSprite.SetTexture("radar_powerup"); + MPBase.SetTexture("mp_base"); + MPCheckPoint.SetTexture("radar_mp_checkpoint"); + MPPlayer.SetTexture("mp_player"); + MPObjective.SetTexture("mp_objective"); + MPCar.SetTexture("mp_car"); + MPTank.SetTexture("mp_tank"); + MPCarLockup.SetTexture("mp_carlockup"); + MPTargetPlayer.SetTexture("mp_targetplayer"); + MapHereSprite0.SetTexture("radar_arrow"); + MapHereSprite1.SetTexture("radar_arrow_01"); + MapHereSprite2.SetTexture("radar_arrow_02"); + MapHereSprite3.SetTexture("radar_arrow_03"); + MapHereSprite4.SetTexture("radar_arrow_04"); + MapHereSprite5.SetTexture("radar_arrow_05"); + MapHereSprite6.SetTexture("radar_arrow_06"); + MapHereSprite7.SetTexture("radar_arrow_07"); + MapWayPoint.SetTexture("radar_player_target"); CTxdStore::PopCurrentTxd(); } @@ -1175,6 +1262,7 @@ void CRadar::SetRadarMarkerState(int32 counter, bool flag) } void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) { + /* float f1 = radius * 1.4f; float f2 = radius * 0.5f; CVector p1, p2; @@ -1194,6 +1282,7 @@ void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) { p1 = pos - TheCamera.GetRight()*f1; p2 = pos - TheCamera.GetRight()*f2; CTheScripts::ScriptDebugLine3D(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z, color, color); + */ } void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha) @@ -1261,7 +1350,39 @@ void CRadar::Shutdown() TShirtSprite.Delete(); TommySprite.Delete(); PhoneSprite.Delete(); - RadioWildstyleSprite.Delete(); + EightBallSprite.Delete(); + BurnerSprite.Delete(); + CiprianiSprite.Delete(); + DonaldSprite.Delete(); + JosephSprite.Delete(); + LeoneSprite.Delete(); + MariaSprite.Delete(); + McraySprite.Delete(); + ToshikoSprite.Delete(); + VincenzoSprite.Delete(); + BombSprite.Delete(); + ClothesShopSprite.Delete(); + PropertyRedSprite.Delete(); + PhilCassidySprite.Delete(); + PowerupSprite.Delete(); + MPBase.Delete(); + MPCheckPoint.Delete(); + MPPlayer.Delete(); + MPObjective.Delete(); + MPCar.Delete(); + MPTank.Delete(); + MPCarLockup.Delete(); + MPTargetPlayer.Delete(); + MapHereSprite0.Delete(); + MapHereSprite1.Delete(); + MapHereSprite2.Delete(); + MapHereSprite3.Delete(); + MapHereSprite4.Delete(); + MapHereSprite5.Delete(); + MapHereSprite6.Delete(); + MapHereSprite7.Delete(); + MapWayPoint.Delete(); + /*RadioWildstyleSprite.Delete(); RadioFlashSprite.Delete(); RadioKChatSprite.Delete(); RadioFeverSprite.Delete(); @@ -1269,7 +1390,7 @@ void CRadar::Shutdown() RadioVCPRSprite.Delete(); RadioEspantosoSprite.Delete(); RadioEmotionSprite.Delete(); - RadioWaveSprite.Delete(); + RadioWaveSprite.Delete();*/ RemoveRadarSections(); } @@ -1712,7 +1833,7 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite) case RADAR_SPRITE_PHONE: text = TheText.Get("LG_25"); break; - case RADAR_SPRITE_RADIO_WILDSTYLE: + /*case RADAR_SPRITE_RADIO_WILDSTYLE: text = TheText.Get("LG_26"); break; case RADAR_SPRITE_RADIO_FLASH: @@ -1738,8 +1859,9 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite) break; case RADAR_SPRITE_RADIO_WAVE: text = TheText.Get("LG_34"); - break; + 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 0829dda6..3e61f8db 100644 --- a/src/core/Radar.h +++ b/src/core/Radar.h @@ -16,9 +16,9 @@ #define OBJECTBLIP_MARKER_COLOR_B 242 #define OBJECTBLIP_MARKER_COLOR_A 255 -#define COORDBLIP_MARKER_COLOR_R 252 -#define COORDBLIP_MARKER_COLOR_G 138 -#define COORDBLIP_MARKER_COLOR_B 242 +#define COORDBLIP_MARKER_COLOR_R 255 +#define COORDBLIP_MARKER_COLOR_G 255 +#define COORDBLIP_MARKER_COLOR_B 128 #define COORDBLIP_MARKER_COLOR_A 228 #define NUM_MAP_LEGENDS 75 @@ -83,15 +83,38 @@ enum eRadarSprite RADAR_SPRITE_TSHIRT, RADAR_SPRITE_TOMMY, RADAR_SPRITE_PHONE, - RADAR_SPRITE_RADIO_WILDSTYLE, - RADAR_SPRITE_RADIO_FLASH, - RADAR_SPRITE_RADIO_KCHAT, - RADAR_SPRITE_RADIO_FEVER, - RADAR_SPRITE_RADIO_VROCK, - RADAR_SPRITE_RADIO_VCPR, - RADAR_SPRITE_RADIO_ESPANTOSO, - RADAR_SPRITE_RADIO_EMOTION, - RADAR_SPRITE_RADIO_WAVE, + RADAR_SPRITE_EIGHTBALL, + RADAR_SPRITE_BURNER, + RADAR_SPRITE_CIPRIANI, + RADAR_SPRITE_DONALD, + RADAR_SPRITE_JOSEPH, + RADAR_SPRITE_LEONE, + RADAR_SPRITE_MARIA, + RADAR_SPRITE_MCRAY, + RADAR_SPRITE_TOSHIKO, + RADAR_SPRITE_VINCENZO, // tmp + RADAR_SPRITE_BOMB, + RADAR_SPRITE_CLOTHES, + RADAR_SPRITE_PROPERTY_RED, + RADAR_SPRITE_PHIL_CASSIDY, + RADAR_SPRITE_POWERUP, + RADAR_SPRITE_MPBASE, + RADAR_SPRITE_MPCHECKPOINT, + RADAR_SPRITE_MPPLAYER, + RADAR_SPRITE_MPOBJECTIVE, + RADAR_SPRITE_MPCAR, + RADAR_SPRITE_MPTANK, + RADAR_SPRITE_MPCARLOCKUP, + RADAR_SPRITE_MPTARGETPLAYER, + RADAR_SPRITE_MAPHERE0, + RADAR_SPRITE_MAPHERE1, + RADAR_SPRITE_MAPHERE2, + RADAR_SPRITE_MAPHERE3, + RADAR_SPRITE_MAPHERE4, + RADAR_SPRITE_MAPHERE5, + RADAR_SPRITE_MAPHERE6, + RADAR_SPRITE_MAPHERE7, + RADAR_SPRITE_MAPWAYPOINT, RADAR_SPRITE_COUNT }; @@ -214,7 +237,7 @@ public: static CSprite2d TShirtSprite; static CSprite2d TommySprite; static CSprite2d PhoneSprite; - static CSprite2d RadioWildstyleSprite; +/* static CSprite2d RadioWildstyleSprite; static CSprite2d RadioFlashSprite; static CSprite2d RadioKChatSprite; static CSprite2d RadioFeverSprite; @@ -222,7 +245,39 @@ public: static CSprite2d RadioVCPRSprite; static CSprite2d RadioEspantosoSprite; static CSprite2d RadioEmotionSprite; - static CSprite2d RadioWaveSprite; + static CSprite2d RadioWaveSprite;*/ + static CSprite2d EightBallSprite; + static CSprite2d BurnerSprite; + static CSprite2d CiprianiSprite; + static CSprite2d DonaldSprite; + static CSprite2d JosephSprite; + static CSprite2d LeoneSprite; + static CSprite2d MariaSprite; + static CSprite2d McraySprite; + static CSprite2d ToshikoSprite; + static CSprite2d VincenzoSprite; + static CSprite2d BombSprite; + static CSprite2d ClothesShopSprite; + static CSprite2d PropertyRedSprite; + static CSprite2d PhilCassidySprite; + static CSprite2d PowerupSprite; + static CSprite2d MPBase; + static CSprite2d MPCheckPoint; + static CSprite2d MPPlayer; + static CSprite2d MPObjective; + static CSprite2d MPCar; + static CSprite2d MPTank; + static CSprite2d MPCarLockup; + static CSprite2d MPTargetPlayer; + static CSprite2d MapHereSprite0; + static CSprite2d MapHereSprite1; + static CSprite2d MapHereSprite2; + static CSprite2d MapHereSprite3; + static CSprite2d MapHereSprite4; + static CSprite2d MapHereSprite5; + static CSprite2d MapHereSprite6; + static CSprite2d MapHereSprite7; + static CSprite2d MapWayPoint; static CSprite2d *RadarSprites[RADAR_SPRITE_COUNT]; static float cachedCos; static float cachedSin; diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 6d980e18..03b78392 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -37,6 +37,7 @@ #include "Font.h" #include "Frontend.h" #include "VarConsole.h" +#include "KeyGen.h" bool CStreaming::ms_disableStreaming; bool CStreaming::ms_bLoadingBigModel; @@ -76,10 +77,16 @@ size_t CStreaming::ms_memoryAvailable; int32 desiredNumVehiclesLoaded = 12; -CEntity *pIslandLODmainlandEntity; -CEntity *pIslandLODbeachEntity; -int32 islandLODmainland; -int32 islandLODbeach; +CEntity *pIslandLODindustEntity; +CEntity *pIslandLODcomIndEntity; +CEntity *pIslandLODcomSubEntity; +CEntity *pIslandLODsubIndEntity; +CEntity *pIslandLODsubComEntity; +int32 islandLODindust; +int32 islandLODcomInd; +int32 islandLODcomSub; +int32 islandLODsubInd; +int32 islandLODsubCom; #ifndef MASTER bool gbPrintStats; @@ -242,12 +249,21 @@ CStreaming::Init2(void) // find island LODs - pIslandLODmainlandEntity = nil; - pIslandLODbeachEntity = nil; - islandLODmainland = -1; - islandLODbeach = -1; - CModelInfo::GetModelInfo("IslandLODmainland", &islandLODmainland); - CModelInfo::GetModelInfo("IslandLODbeach", &islandLODbeach); + pIslandLODindustEntity = nil; + pIslandLODcomIndEntity = nil; + pIslandLODcomSubEntity = nil; + pIslandLODsubIndEntity = nil; + pIslandLODsubComEntity = nil; + islandLODindust = -1; + islandLODcomInd = -1; + islandLODcomSub = -1; + islandLODsubInd = -1; + islandLODsubCom = -1; + CModelInfo::GetModelInfo("IslandLODInd", &islandLODindust); + CModelInfo::GetModelInfo("IslandLODcomIND", &islandLODcomInd); + CModelInfo::GetModelInfo("IslandLODcomSUB", &islandLODcomSub); + CModelInfo::GetModelInfo("IslandLODsubIND", &islandLODsubInd); + CModelInfo::GetModelInfo("IslandLODsubCOM", &islandLODsubCom); #ifndef MASTER VarConsole.Add("Streaming Debug", &gbPrintStats, true); @@ -919,65 +935,61 @@ CStreaming::RequestIslands(eLevelName level) { ISLAND_LOADING_ISNT(HIGH) switch(level){ - case LEVEL_MAINLAND: - if(islandLODbeach != -1) - RequestModel(islandLODbeach, BIGBUILDINGFLAGS); + case LEVEL_INDUSTRIAL: + RequestModel(islandLODcomInd, BIGBUILDINGFLAGS); + RequestModel(islandLODsubInd, BIGBUILDINGFLAGS); break; - case LEVEL_BEACH: - if(islandLODmainland != -1) - RequestModel(islandLODmainland, BIGBUILDINGFLAGS); + case LEVEL_COMMERCIAL: + RequestModel(islandLODindust, BIGBUILDINGFLAGS); + RequestModel(islandLODsubCom, BIGBUILDINGFLAGS); + break; + case LEVEL_SUBURBAN: + RequestModel(islandLODindust, BIGBUILDINGFLAGS); + RequestModel(islandLODcomSub, BIGBUILDINGFLAGS); break; default: break; } } -static char *IGnames[] = { - "player", - "player2", - "player3", - "player4", - "player5", - "player6", - "player7", - "player8", - "player9", - "play10", - "play11", - "igken", - "igcandy", - "igsonny", - "igbuddy", - "igjezz", - "ighlary", - "igphil", - "igmerc", - "igdick", - "igdiaz", +const char *csPlayerNames[] = +{ + "csplr", + "csplr2", + "csplr3", + "csplr4", + "csplr5", + "csplr6", + "csplr7", + "csplr8", + "csplr9", + "csplr10", + "csplr11", + "csplr12", + "csplr13", + "csplr14", + "csplr15", + "csplr16", "" }; -static char *CSnames[] = { - "csplay", - "csplay2", - "csplay3", - "csplay4", - "csplay5", - "csplay6", - "csplay7", - "csplay8", - "csplay9", - "csplay10", - "csplay11", - "csken", - "cscandy", - "cssonny", - "csbuddy", - "csjezz", - "cshlary", - "csphil", - "csmerc", - "csdick", - "csdiaz", +const char* playerNames[] = +{ + "plr", + "plr2", + "plr3", + "plr4", + "plr5", + "plr6", + "plr7", + "plr8", + "plr9", + "plr10", + "plr11", + "plr12", + "plr13", + "plr14", + "plr15", + "plr16", "" }; @@ -991,15 +1003,17 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag int i, n; mi = CModelInfo::GetModelInfo(modelId); - if(strncasecmp("CSPlay", modelName, 6) == 0){ - char *curname = CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName(); - for(int i = 0; CSnames[i][0]; i++){ - if(strcasecmp(curname, IGnames[i]) == 0){ - modelName = CSnames[i]; + if (CKeyGen::GetUppercaseKey(modelName) == CKeyGen::GetUppercaseKey("cstoni_a")) { + i = 0; + while (csPlayerNames[i][0] != '\0') { + if (CModelInfo::GetModelInfo(0)->GetNameHashKey() == CKeyGen::GetUppercaseKey(playerNames[i])) { + modelName = csPlayerNames[i]; break; } + i++; } } + if(!CGeneral::faststrcmp(mi->GetModelName(), modelName)){ // Already have the correct name, just request it RequestModel(modelId, flags); @@ -1134,10 +1148,9 @@ CStreaming::RemoveModel(int32 id) void CStreaming::RemoveUnusedBuildings(eLevelName level) { - if(level != LEVEL_BEACH) - RemoveBuildings(LEVEL_BEACH); - if(level != LEVEL_MAINLAND) - RemoveBuildings(LEVEL_MAINLAND); + for(int i = LEVEL_INDUSTRIAL; i < NUM_LEVELS; i++) + if(level != i) + RemoveBuildings((eLevelName)i); } void @@ -1260,10 +1273,9 @@ CStreaming::RemoveUnusedBigBuildings(eLevelName level) { ISLAND_LOADING_IS(LOW) { - if(level != LEVEL_BEACH) - RemoveBigBuildings(LEVEL_BEACH); - if(level != LEVEL_MAINLAND) - RemoveBigBuildings(LEVEL_MAINLAND); + for(int i = LEVEL_INDUSTRIAL; i < NUM_LEVELS; i++) + if(level != i) + RemoveBuildings((eLevelName)i); } RemoveIslandsNotUsed(level); } @@ -1285,29 +1297,53 @@ void CStreaming::RemoveIslandsNotUsed(eLevelName level) { int i; - if(pIslandLODmainlandEntity == nil) + if(pIslandLODindustEntity == nil) for(i = CPools::GetBuildingPool()->GetSize()-1; i >= 0; i--){ CBuilding *building = CPools::GetBuildingPool()->GetSlot(i); if(building == nil) continue; - if(building->GetModelIndex() == islandLODmainland) - pIslandLODmainlandEntity = building; - if(building->GetModelIndex() == islandLODbeach) - pIslandLODbeachEntity = building; + if(building->GetModelIndex() == islandLODindust) + pIslandLODindustEntity = building; + else if(building->GetModelIndex() == islandLODcomInd) + pIslandLODcomIndEntity = building; + else if(building->GetModelIndex() == islandLODcomSub) + pIslandLODcomSubEntity = building; + else if(building->GetModelIndex() == islandLODsubInd) + pIslandLODsubIndEntity = building; + else if(building->GetModelIndex() == islandLODsubCom) + pIslandLODsubComEntity = building; } #ifdef NO_ISLAND_LOADING if(FrontEndMenuManager.m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_HIGH) { - DeleteIsland(pIslandLODmainlandEntity); - DeleteIsland(pIslandLODbeachEntity); + DeleteIsland(pIslandLODindustEntity); + DeleteIsland(pIslandLODcomIndEntity); + DeleteIsland(pIslandLODcomSubEntity); + DeleteIsland(pIslandLODsubIndEntity); + DeleteIsland(pIslandLODsubComEntity); } else #endif switch(level){ - case LEVEL_MAINLAND: - DeleteIsland(pIslandLODmainlandEntity); + case LEVEL_INDUSTRIAL: + DeleteIsland(pIslandLODindustEntity); + DeleteIsland(pIslandLODcomSubEntity); + DeleteIsland(pIslandLODsubComEntity); break; - case LEVEL_BEACH: - DeleteIsland(pIslandLODbeachEntity); - + case LEVEL_COMMERCIAL: + DeleteIsland(pIslandLODcomIndEntity); + DeleteIsland(pIslandLODcomSubEntity); + DeleteIsland(pIslandLODsubIndEntity); + break; + case LEVEL_SUBURBAN: + DeleteIsland(pIslandLODsubIndEntity); + DeleteIsland(pIslandLODsubComEntity); + DeleteIsland(pIslandLODcomIndEntity); + break; + default: + DeleteIsland(pIslandLODindustEntity); + DeleteIsland(pIslandLODcomIndEntity); + DeleteIsland(pIslandLODcomSubEntity); + DeleteIsland(pIslandLODsubIndEntity); + DeleteIsland(pIslandLODsubComEntity); break; } } @@ -1569,6 +1605,7 @@ CStreaming::IsObjectInCdImage(int32 id) void CStreaming::SetModelIsDeletable(int32 id) { + assert(id >= 0); // guard against fake IDs ms_aInfoForModel[id].m_flags &= ~STREAMFLAGS_DONT_REMOVE; if ((id >= STREAM_OFFSET_TXD && id < STREAM_OFFSET_COL || CModelInfo::GetModelInfo(id)->GetModelType() != MITYPE_VEHICLE) && (ms_aInfoForModel[id].m_flags & STREAMFLAGS_SCRIPTOWNED) == 0){ @@ -1647,11 +1684,11 @@ CStreaming::StreamVehiclesAndPeds(void) } if(FindPlayerPed()->m_pWanted->AreFbiRequired()){ - RequestModel(MI_FBIRANCH, STREAMFLAGS_DONT_REMOVE); + RequestModel(MI_FBICAR, STREAMFLAGS_DONT_REMOVE); RequestModel(MI_FBI, STREAMFLAGS_DONT_REMOVE); }else{ - SetModelIsDeletable(MI_FBIRANCH); - if(!HasModelLoaded(MI_FBIRANCH)) + SetModelIsDeletable(MI_FBICAR); + if(!HasModelLoaded(MI_FBICAR)) SetModelIsDeletable(MI_FBI); } @@ -1671,6 +1708,7 @@ CStreaming::StreamVehiclesAndPeds(void) else SetModelIsDeletable(MI_CHOPPER); +/* LCS: removed if (FindPlayerPed()->m_pWanted->AreMiamiViceRequired()) { SetModelIsDeletable(MI_VICE1); SetModelIsDeletable(MI_VICE2); @@ -1712,6 +1750,7 @@ CStreaming::StreamVehiclesAndPeds(void) SetModelIsDeletable(MI_VICE7); SetModelIsDeletable(MI_VICE8); } +*/ if(timeBeforeNextLoad >= 0) timeBeforeNextLoad--; @@ -3146,6 +3185,46 @@ CStreaming::LoadSceneCollision(const CVector &pos) CStreaming::LoadAllRequestedModels(false); } +//--LCS: TODO PSP and PS2 +// some things commented out that might be Rsl3D dependent +void CStreaming::RegisterPointer(void *ptr, int, bool) {} +RpAtomic *CStreaming::RegisterAtomic(RpAtomic *atomic, void *) +{ + return atomic; +} +void CStreaming::RegisterClump(RpClump *clump) +{ + RpClumpForAllAtomics(clump, RegisterAtomic, nil); +} +RpAtomic *CStreaming::RegisterInstance(RpAtomic *atomic, void *) +{ +// RegisterPointer(&atomic->geometry, 2, true); + return atomic; +} +void CStreaming::RegisterInstance(RpClump *clump) +{ + RpClumpForAllAtomics(clump, RegisterInstance, nil); +} + +void CStreaming::UnregisterPointer(void *ptr, int) {} +RpAtomic *CStreaming::UnregisterAtomic(RpAtomic *atomic, void *) +{ + return atomic; +} +void CStreaming::UnregisterClump(RpClump *clump) +{ + RpClumpForAllAtomics(clump, UnregisterAtomic, nil); +} +RpAtomic *CStreaming::UnregisterInstance(RpAtomic *atomic, void *) +{ +// UnregisterPointer(&atomic->geometry, 2); + return atomic; +} +void CStreaming::UnregisterInstance(RpClump *clump) +{ + RpClumpForAllAtomics(clump, UnregisterInstance, nil); +} + void CStreaming::MemoryCardSave(uint8 *buf, uint32 *size) { diff --git a/src/core/Streaming.h b/src/core/Streaming.h index 4ddf0b3b..1ca43671 100644 --- a/src/core/Streaming.h +++ b/src/core/Streaming.h @@ -17,7 +17,10 @@ enum StreamFlags STREAMFLAGS_PRIORITY = 0x08, STREAMFLAGS_NOFADE = 0x10, STREAMFLAGS_20 = 0x20, // TODO(MIAMI): what's this + STREAMFLAGS_40 = 0x40, // TODO(LCS): what's this + STREAMFLAGS_AMBIENT_SCRIPT_OWNED = 0x80, + // TODO(LCS): STREAMFLAGS_AMBIENT_SCRIPT_OWNED in STREAMFLAGS_CANT_REMOVE? check CColStore STREAMFLAGS_CANT_REMOVE = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED, STREAMFLAGS_KEEP_IN_MEMORY = STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED|STREAMFLAGS_DEPENDENCY, }; @@ -127,6 +130,7 @@ public: static bool HasColLoaded(int32 id) { return HasModelLoaded(id+STREAM_OFFSET_COL); } static bool HasAnimLoaded(int32 id) { return HasModelLoaded(id+STREAM_OFFSET_ANIM); } static bool CanRemoveModel(int32 id) { return (ms_aInfoForModel[id].m_flags & STREAMFLAGS_CANT_REMOVE) == 0; } + static bool IsScriptOwnedModel(int32 id) { return (ms_aInfoForModel[id].m_flags & STREAMFLAGS_SCRIPTOWNED); } static bool CanRemoveTxd(int32 id) { return CanRemoveModel(id+STREAM_OFFSET_TXD); } static bool CanRemoveCol(int32 id) { return CanRemoveModel(id+STREAM_OFFSET_COL); } static bool CanRemoveAnim(int32 id) { return CanRemoveModel(id+STREAM_OFFSET_ANIM); } @@ -210,6 +214,17 @@ public: static void LoadScene(const CVector &pos); static void LoadSceneCollision(const CVector &pos); + static void RegisterPointer(void *ptr, int, bool); + static RpAtomic *RegisterAtomic(RpAtomic *atomic, void *); + static void RegisterClump(RpClump *clump); + static RpAtomic *RegisterInstance(RpAtomic *atomic, void *); + static void RegisterInstance(RpClump *clump); + static void UnregisterPointer(void *ptr, int); + static RpAtomic *UnregisterAtomic(RpAtomic *atomic, void *); + static void UnregisterClump(RpClump *clump); + static RpAtomic *UnregisterInstance(RpAtomic *atomic, void *); + static void UnregisterInstance(RpClump *clump); + static void MemoryCardSave(uint8 *buffer, uint32 *length); static void MemoryCardLoad(uint8 *buffer, uint32 length); @@ -217,3 +232,10 @@ public: static void PrintStreamingBufferState(); }; + +// LCS(TODO): put them into CStreaming::mspInst +extern int32 islandLODindust; +extern int32 islandLODcomInd; +extern int32 islandLODcomSub; +extern int32 islandLODsubInd; +extern int32 islandLODsubCom; diff --git a/src/core/World.cpp b/src/core/World.cpp index 841aab40..43af9f12 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -1788,56 +1788,35 @@ void CWorld::RepositionOneObject(CEntity *pEntity) { int16 modelId = pEntity->GetModelIndex(); - if (modelId == MI_PARKINGMETER || modelId == MI_PHONEBOOTH1 || modelId == MI_WASTEBIN || - modelId == MI_BIN || modelId == MI_POSTBOX1 || modelId == MI_NEWSSTAND || modelId == MI_TRAFFICCONE || - modelId == MI_DUMP1 || modelId == MI_ROADWORKBARRIER1 || modelId == MI_BUSSIGN1 || modelId == MI_NOPARKINGSIGN1 || - modelId == MI_PHONESIGN || modelId == MI_FIRE_HYDRANT || modelId == MI_BOLLARDLIGHT || - modelId == MI_PARKTABLE || modelId == MI_PARKINGMETER2 || modelId == MI_TELPOLE02 || - modelId == MI_PARKBENCH || modelId == MI_BARRIER1 || IsTreeModel(modelId) - ) { + if (IsLightThatNeedsRepositioning(modelId) || IsTreeModel(modelId) || modelId == MI_PARKINGMETER || + modelId == MI_PHONEBOOTH1 || modelId == MI_WASTEBIN || modelId == MI_BIN || modelId == MI_POSTBOX1 || + modelId == MI_NEWSSTAND || modelId == MI_TRAFFICCONE || modelId == MI_DUMP1 || + modelId == MI_ROADWORKBARRIER1 || modelId == MI_BUSSIGN1 || modelId == MI_NOPARKINGSIGN1 || + modelId == MI_PHONESIGN || modelId == MI_TAXISIGN || modelId == MI_FISHSTALL01 || + modelId == MI_FISHSTALL02 || modelId == MI_FISHSTALL03 || modelId == MI_FISHSTALL04 || + modelId == MI_BAGELSTAND2 || modelId == MI_FIRE_HYDRANT || modelId == MI_BOLLARDLIGHT || + modelId == MI_PARKTABLE) { CVector& position = pEntity->GetMatrix().GetPosition(); - CColModel* pColModel = pEntity->GetColModel(); - float fBoundingBoxMinZ = pColModel->boundingBox.min.z; - float fHeight = pColModel->boundingBox.max.z - pColModel->boundingBox.min.z; - if (fHeight < OBJECT_REPOSITION_OFFSET_Z) fHeight = OBJECT_REPOSITION_OFFSET_Z; + float fBoundingBoxMinZ = pEntity->GetColModel()->boundingBox.min.z; position.z = FindGroundZFor3DCoord(position.x, position.y, - position.z + fHeight, nil) - - fBoundingBoxMinZ; + position.z + OBJECT_REPOSITION_OFFSET_Z, nil) - + fBoundingBoxMinZ; pEntity->GetMatrix().UpdateRW(); pEntity->UpdateRwFrame(); - } else if(IsLightThatNeedsRepositioning(modelId)) { - CVector position = pEntity->GetMatrix().GetPosition(); - CColModel* pColModel = pEntity->GetColModel(); - float fBoundingBoxMinZ = pColModel->boundingBox.min.z; - float fHeight = pColModel->boundingBox.max.z - pColModel->boundingBox.min.z; - if (fHeight < OBJECT_REPOSITION_OFFSET_Z) fHeight = OBJECT_REPOSITION_OFFSET_Z; - if (pColModel->numBoxes == 1) - position = pEntity->GetMatrix() * CVector( - (pColModel->boxes[0].min.x + pColModel->boxes[0].max.x) / 2, - (pColModel->boxes[0].min.y + pColModel->boxes[0].max.y) / 2, - pColModel->boxes[0].min.z); - else if (pColModel->numSpheres > 0) { - position.z = 1000.0f; - for (int i = 0; i < pColModel->numSpheres; i++) { - if (pColModel->spheres[i].center.z < position.z) - position = pColModel->spheres[i].center; - } - if (position.z < 1000.0f) - position = pEntity->GetMatrix() * position; - } - pEntity->GetMatrix().GetPosition().z = FindGroundZFor3DCoord(position.x, position.y, pEntity->GetMatrix().GetPosition().z + fHeight, nil) - fBoundingBoxMinZ; - pEntity->GetMatrix().UpdateRW(); - pEntity->UpdateRwFrame(); - - } - if(modelId == MI_BUOY) { + } else if(modelId == MI_BUOY) { + float fWaterLevel = 0.0f; bool bFound = true; const CVector &position = pEntity->GetPosition(); float fGroundZ = FindGroundZFor3DCoord(position.x, position.y, position.z + OBJECT_REPOSITION_OFFSET_Z, &bFound); - CColModel *pColModel = pEntity->GetColModel(); - float fHeight = pColModel->boundingBox.max.z - pColModel->boundingBox.min.z; - pEntity->GetMatrix().GetPosition().z = 0.2f * fHeight + 6.0f - 0.5f * fHeight; + if(CWaterLevel::GetWaterLevelNoWaves(position.x, position.y, position.z + OBJECT_REPOSITION_OFFSET_Z, + &fWaterLevel)) { + if(!bFound || fWaterLevel > fGroundZ) { + CColModel *pColModel = pEntity->GetColModel(); + float fHeight = pColModel->boundingBox.max.z - pColModel->boundingBox.min.z; + pEntity->GetMatrix().GetPosition().z = 0.2f * fHeight + fWaterLevel - 0.5f * fHeight; + } + } } } @@ -1927,16 +1906,7 @@ CWorld::Process(void) for(int i = 0; i < NUMCUTSCENEOBJECTS; i++) { CCutsceneObject *csObj = CCutsceneMgr::GetCutsceneObject(i); if(csObj && csObj->m_entryInfoList.first) { - if(csObj->m_rwObject && RwObjectGetType(csObj->m_rwObject) == rpCLUMP && - RpAnimBlendClumpGetFirstAssociation(csObj->GetClump())) { - if (csObj->IsObject()) - RpAnimBlendClumpUpdateAnimations(csObj->GetClump(), CTimer::GetTimeStepNonClippedInSeconds()); - else { - if (!csObj->bOffscreen) - csObj->bOffscreen = !csObj->GetIsOnScreen(); - RpAnimBlendClumpUpdateAnimations(csObj->GetClump(), CTimer::GetTimeStepInSeconds(), !csObj->bOffscreen); - } - } + csObj->UpdateAnim(); csObj->ProcessControl(); csObj->ProcessCollision(); csObj->GetMatrix().UpdateRW(); @@ -1948,26 +1918,40 @@ CWorld::Process(void) } else { for(CPtrNode *node = ms_listMovingEntityPtrs.first; node; node = node->next) { CEntity *movingEnt = (CEntity *)node->item; - if(!movingEnt->bRemoveFromWorld && movingEnt->m_rwObject && RwObjectGetType(movingEnt->m_rwObject) == rpCLUMP && - RpAnimBlendClumpGetFirstAssociation(movingEnt->GetClump())) { - if (movingEnt->IsObject()) - RpAnimBlendClumpUpdateAnimations(movingEnt->GetClump(), CTimer::GetTimeStepNonClippedInSeconds()); - else { - if (!movingEnt->bOffscreen) - movingEnt->bOffscreen = !movingEnt->GetIsOnScreen(); - RpAnimBlendClumpUpdateAnimations(movingEnt->GetClump(), CTimer::GetTimeStepInSeconds(), !movingEnt->bOffscreen); - } - } + if(!movingEnt->bRemoveFromWorld) + movingEnt->UpdateAnim(); } for(CPtrNode *node = ms_listMovingEntityPtrs.first; node; node = node->next) { CPhysical *movingEnt = (CPhysical *)node->item; if(movingEnt->bRemoveFromWorld) { RemoveEntityInsteadOfProcessingIt(movingEnt); } else { - movingEnt->ProcessControl(); + if(!CCutsceneMgr::IsCutsceneProcessing() || movingEnt->UpdatesInCutscene()) + movingEnt->ProcessControl(); if(movingEnt->GetIsStatic()) { movingEnt->RemoveFromMovingList(); } } } + for(int y = 0; y < NUMSECTORS_Y; y++) + for(int x = 0; x < NUMSECTORS_X; x++){ + CPtrNode *node; + CSector *sect = CWorld::GetSector(x, y); + for(node = sect->m_lists[ENTITYLIST_PEDS].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_PEDS_OVERLAP].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_VEHICLES].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_VEHICLES_OVERLAP].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_OBJECTS].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_OBJECTS_OVERLAP].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_DUMMIES].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + for(node = sect->m_lists[ENTITYLIST_DUMMIES_OVERLAP].first; node; node = node->next) + ((CEntity*)node->item)->UpdateDistanceFade(); + } bForceProcessControl = true; for(CPtrNode *node = ms_listMovingEntityPtrs.first; node; node = node->next) { CPhysical *movingEnt = (CPhysical *)node->item; @@ -2154,8 +2138,8 @@ CWorld::TriggerExplosionSectorList(CPtrList &list, const CVector &position, floa } else { CVector pos = pEntity->GetPosition(); pos.z -= 0.5f; - CParticleObject::AddObject(POBJECT_FIRE_HYDRANT, - pos, true); + CParticleObject::AddObject(POBJECT_FIRE_HYDRANT, pos, true); + CParticleObject::AddObject(POBJECT_FIRE_HYDRANT_STEAM, pos, true); pObject->bHasBeenDamaged = true; } } @@ -2310,3 +2294,17 @@ CWorld::IsWanderPathClear(CVector const& point1, CVector const& point2, float di } return true; } + +void +CWorld::CheckObjectsEffectedByFire(float x, float y, float z, float radius, CEntity* reason) +{ + int32 i = CPools::GetObjectPool()->GetSize(); + while (i--) { + CObject* pObject = CPools::GetObjectPool()->GetSlot(i); + if (pObject) { + if (Abs(pObject->GetPosition().z - z) < 5.0f && Abs(pObject->GetPosition().x - x) < radius && + Abs(pObject->GetPosition().y - y) < radius) + pObject->m_nLastWeaponToDamage = WEAPONTYPE_FLAMETHROWER; + } + } +} diff --git a/src/core/World.h b/src/core/World.h index 81eb5d4c..8da080b5 100644 --- a/src/core/World.h +++ b/src/core/World.h @@ -5,19 +5,19 @@ #include "PlayerInfo.h" #include "Collision.h" -/* Sectors span from -2400 to 1600 in x and -2000 to 2000 y. - * With 80x80 sectors, each is 50x50 units. */ +/* Sectors span from -2000 to 2000 in x and y. + * With 100x100 sectors, each is 40x40 units. */ -#define SECTOR_SIZE_X (50.0f) -#define SECTOR_SIZE_Y (50.0f) +#define SECTOR_SIZE_X (40.0f) +#define SECTOR_SIZE_Y (40.0f) -#define NUMSECTORS_X (80) -#define NUMSECTORS_Y (80) +#define NUMSECTORS_X (100) +#define NUMSECTORS_Y (100) #define WORLD_SIZE_X (NUMSECTORS_X * SECTOR_SIZE_X) #define WORLD_SIZE_Y (NUMSECTORS_Y * SECTOR_SIZE_Y) -#define WORLD_MIN_X (-2400.0f) +#define WORLD_MIN_X (-2000.0f) #define WORLD_MIN_Y (-2000.0f) #define WORLD_MAX_X (WORLD_MIN_X + WORLD_SIZE_X) @@ -29,6 +29,7 @@ enum { ENTITYLIST_BUILDINGS, ENTITYLIST_BUILDINGS_OVERLAP, + ENTITYLIST_UNKNOWN, ENTITYLIST_OBJECTS, ENTITYLIST_OBJECTS_OVERLAP, ENTITYLIST_VEHICLES, @@ -154,6 +155,7 @@ public: static void TriggerExplosion(const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer); static void TriggerExplosionSectorList(CPtrList& list, const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer); static void UseDetonator(CEntity *pEntity); + static void CheckObjectsEffectedByFire(float, float, float, float, CEntity*); // NB: following functions are unused (TODO?) static void CastShadow(float, float, float, float); diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp index 93eca199..5a53ee29 100644 --- a/src/core/Zones.cpp +++ b/src/core/Zones.cpp @@ -87,20 +87,20 @@ CTheZones::Init(void) TotalNumberOfInfoZones = 1; strcpy(InfoZoneArray[0].name, "CITYINF"); - InfoZoneArray[0].minx = -2400.0f; + InfoZoneArray[0].minx = -2000.0f; InfoZoneArray[0].miny = -2000.0f; InfoZoneArray[0].minz = -500.0f; - InfoZoneArray[0].maxx = 1600.0f; + InfoZoneArray[0].maxx = 2000.0f; InfoZoneArray[0].maxy = 2000.0f; InfoZoneArray[0].maxz = 500.0f; InfoZoneArray[0].level = LEVEL_GENERIC; InfoZoneArray[0].type = ZONE_INFO; strcpy(NavigationZoneArray[0].name, "VICE_C"); - NavigationZoneArray[0].minx = -2400.0f; + NavigationZoneArray[0].minx = -2000.0f; NavigationZoneArray[0].miny = -2000.0f; NavigationZoneArray[0].minz = -500.0f; - NavigationZoneArray[0].maxx = 1600.0f; + NavigationZoneArray[0].maxx = 2000.0f; NavigationZoneArray[0].maxy = 2000.0f; NavigationZoneArray[0].maxz = 500.0f; NavigationZoneArray[0].level = LEVEL_GENERIC; @@ -114,10 +114,10 @@ CTheZones::Init(void) } TotalNumberOfMapZones = 1; strcpy(MapZoneArray[0].name, "THEMAP"); - MapZoneArray[0].minx = -2400.0f; + MapZoneArray[0].minx = -2000.0f; MapZoneArray[0].miny = -2000.0f; MapZoneArray[0].minz = -500.0f; - MapZoneArray[0].maxx = 1600.0f; + MapZoneArray[0].maxx = 2000.0f; MapZoneArray[0].maxy = 2000.0f; MapZoneArray[0].maxz = 500.0f; MapZoneArray[0].level = LEVEL_GENERIC; diff --git a/src/core/common.h b/src/core/common.h index 6f6acd49..bb6b93d3 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -115,6 +115,8 @@ typedef ptrdiff_t ssize_t; #endif #include "config.h" +#include "memoryManager.h" +#include "relocatableChunk.h" #include <rphanim.h> #include <rpskin.h> @@ -212,6 +214,18 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x) #endif +// these are temp marcos while we don't implement all PSP UI coordinates +#define PSP_DEFAULT_SCREEN_WIDTH (480) +#define PSP_DEFAULT_SCREEN_HEIGHT (272) + +#define PSP_SCALE_TO_PS2_X(a) ((float)a * ((float)DEFAULT_SCREEN_WIDTH / (float)PSP_DEFAULT_SCREEN_WIDTH)) +#define PSP_SCALE_TO_PS2_Y(a) ((float)a * ((float)DEFAULT_SCREEN_HEIGHT / (float)PSP_DEFAULT_SCREEN_HEIGHT)) + +#define PSP_SCREEN_SCALE_X(a) ((a) * (float) SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH) +#define PSP_SCREEN_SCALE_Y(a) ((a) * (float) SCREEN_WIDTH / PSP_DEFAULT_SCREEN_WIDTH) +#define PSP_SCREEN_SCALE_FROM_RIGHT(a) (SCREEN_WIDTH - PSP_SCREEN_SCALE_X(a)) +#define PSP_SCREEN_SCALE_FROM_BOTTOM(a) (SCREEN_HEIGHT - PSP_SCREEN_SCALE_Y(a)) + #include "maths.h" #include "Vector.h" #ifdef GTA_PS2 diff --git a/src/core/config.h b/src/core/config.h index 307f55d3..bee60489 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -12,15 +12,15 @@ enum Config { MAX_CDIMAGES = 8, // additional cdimages MAX_CDCHANNELS = 5, - MODELINFOSIZE = 6500, // 4900 on PS2 - TXDSTORESIZE = 1385, - COLSTORESIZE = 31, + MODELINFOSIZE = 4900, + TXDSTORESIZE = 1200, + COLSTORESIZE = 15, EXTRADIRSIZE = 256, CUTSCENEDIRSIZE = 512, SIMPLEMODELSIZE = 3885, TIMEMODELSIZE = 385, - CLUMPMODELSIZE = 5, + CLUMPMODELSIZE = 10, WEAPONMODELSIZE = 37, PEDMODELSIZE = 130, VEHICLEMODELSIZE = 110, @@ -31,19 +31,19 @@ enum Config { NUMOBJECTINFO = 210, // Pool sizes - NUMPTRNODES = 50000, - NUMENTRYINFOS = 3200, - NUMPEDS = 140, - NUMVEHICLES = 110, - NUMBUILDINGS = 7000, - NUMTREADABLES = 1, - NUMOBJECTS = 460, - NUMDUMMIES = 2340, + NUMPTRNODES = 50000, // only 30100 + NUMENTRYINFOS = 4000, + NUMPEDS = 140, // only 70 + NUMVEHICLES = 110, // only 70 + NUMBUILDINGS = 7000, // only 6757 + NUMTREADABLES = 1300, + NUMOBJECTS = 475, + NUMDUMMIES = 3000, NUMAUDIOSCRIPTOBJECTS = 192, NUMCOLMODELS = 4400, NUMCUTSCENEOBJECTS = 50, // not a pool in VC - NUMANIMBLOCKS = 35, + NUMANIMBLOCKS = 60, NUMANIMATIONS = 450, NUMTEMPOBJECTS = 40, @@ -63,20 +63,20 @@ enum Config { NUMREFERENCES = 800, // Zones - NUMAUDIOZONES = 14, + NUMAUDIOZONES = 36, NUMINFOZONES = 169, - NUMMAPZONES = 39, - NUMNAVIGZONES = 20, + NUMMAPZONES = 110, + NUMNAVIGZONES = 70, // Cull zones - NUMATTRIBZONES = 704, + NUMATTRIBZONES = 900, NUMOCCLUSIONVOLUMES = 350, NUMACTIVEOCCLUDERS = 48, PATHNODESIZE = 4500, - NUMWEATHERS = 7, + NUMWEATHERS = 8, NUMHOURS = 24, NUMEXTRADIRECTIONALS = 4, @@ -102,7 +102,7 @@ enum Config { NUMPACMANPICKUPS = 256, NUMEVENTS = 64, - NUM_CARGENS = 185, + NUM_CARGENS = 195, // 500 on mobile NUM_PATH_NODES_IN_AUTOPILOT = 8, @@ -116,7 +116,7 @@ enum Config { NUM_WATERCANNONS = 3, NUMPEDROUTES = 200, - NUMPHONES = 50, + NUMPHONES = 60, NUMPEDGROUPS = 67, NUMMODELSPERPEDGROUP = 16, MAXZONEPEDSLOADED = 8, @@ -140,14 +140,16 @@ enum Config { NUM_GARAGE_STORED_CARS = 4, - NUM_CRANES = 8, + NUM_CRANES = 11, NUM_ESCALATORS = 22, NUM_WATER_CREATURES = 8, NUM_EXPLOSIONS = 48, NUM_SETPIECES = 96, - NUM_SHORTCUT_START_POINTS = 16 + NUM_SHORTCUT_START_POINTS = 16, + + NUM_FERRY_PATHS = 1 }; // We don't expect to compile for PS2 or Xbox @@ -156,6 +158,9 @@ enum Config { //#define GTA_PS2 //#define GTA_XBOX +#define GTA_TRAIN +#define GTA_BRIDGE + // Version defines #define GTAVC_PS2 400 #define GTAVC_PC_10 410 @@ -177,7 +182,7 @@ enum Config { # define PS2_MENU #elif defined GTA_PC # define PC_PLAYER_CONTROLS // mouse player/cam mode -# define GTA_REPLAY +//# define GTA_REPLAY # define GTA_SCENE_EDIT # define PC_MENU # define PC_WATER @@ -267,9 +272,9 @@ enum Config { #endif #define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds. -#define MORE_LANGUAGES // Add more translations to the game +//#define MORE_LANGUAGES // Add more translations to the game #define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms -#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES +//#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES #define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS #define NO_MOVIES // add option to disable intro videos @@ -297,7 +302,7 @@ enum Config { #define USE_TXD_CDIMAGE // generate and load textures from txd.img #define PS2_ALPHA_TEST // emulate ps2 alpha test #define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number -#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time +//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time #define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync #define ANISOTROPIC_FILTERING // set all textures to max anisotropic filtering //#define USE_TEXTURE_POOL @@ -317,6 +322,7 @@ enum Config { // Water & Particle #undef PC_WATER #define WATER_CHEATS +//#define PSP_WATERCANNON //#define USE_CUTSCENE_SHADOW_FOR_PED // requires COMPATIBLE_SAVES //#define DISABLE_CUTSCENE_SHADOWS @@ -359,7 +365,7 @@ enum Config { # ifdef CUSTOM_FRONTEND_OPTIONS # define GRAPHICS_MENU_OPTIONS // otherwise Display settings will be scrollable -# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU +//# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU # define CUTSCENE_BORDERS_SWITCH # define MULTISAMPLING // adds MSAA option # define INVERT_LOOK_FOR_PAD // enable the hidden option @@ -381,7 +387,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #endif //#define SIMPLIER_MISSIONS // apply simplifications from mobile #define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT -#define SCRIPT_LOG_FILE_LEVEL 0 // 0 == no log, 1 == overwrite every frame, 2 == full log +#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log #if SCRIPT_LOG_FILE_LEVEL == 0 #undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT @@ -417,9 +423,9 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually // Audio #define RADIO_SCROLL_TO_PREV_STATION // Won't work without FIX_BUGS -#define AUDIO_CACHE // cache sound lengths to speed up the cold boot -#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 43 (PC has 28 originally) -#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds) +//#define AUDIO_CACHE // cache sound lengths to speed up the cold boot +#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 41 (PSP and mobile have 21 originally) +//#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds) //#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files #define MULTITHREADED_AUDIO // for streams. requires C++11 or later diff --git a/src/core/main.cpp b/src/core/main.cpp index e84c6eeb..4a61267d 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -81,12 +81,20 @@ GlobalScene Scene; -uint8 work_buff[55000]; +uint8 work_buff[102400]; char gString[256]; char gString2[512]; wchar gUString[256]; wchar gUString2[256]; +// leeds +bool gMakeResources = true; +bool gUseChunkFiles = false; +bool gSecondExportPass; +bool gUseModelResources; +bool gUseResources; +bool gNASTY_NASTY_MEM_SHUTDOWN_HACK; // rather unused + float FramesPerSecond = 30.0f; bool gbPrintShite = false; @@ -108,7 +116,7 @@ RwRGBA gColourTop; bool gameAlreadyInitialised; float NumberOfChunksLoaded; -#define TOTALNUMCHUNKS 95.0f +#define TOTALNUMCHUNKS 52.0f bool g_SlowMode = false; char version_name[64]; @@ -135,7 +143,7 @@ bool gbPrintMemoryUsage; #endif #ifdef NEW_RENDERER -bool gbNewRenderer; +bool gbNewRenderer = true; #endif #ifdef FIX_BUGS // need to clear stencil for mblur fx. no idea why it works in the original game @@ -606,11 +614,11 @@ GetRandomSplashScreen(void) static char splashName[128]; static int splashIndex[12] = { 1, 2, - 3, 4, - 5, 11, - 6, 8, - 9, 10, - 7, 12 + 3, 0, + 1, 2, + 3, 0, + 1, 2, + 3, 0 }; index = splashIndex[2*index2 + CGeneral::GetRandomNumberInRange(0, 2)]; @@ -624,11 +632,12 @@ GetRandomSplashScreen(void) Const char* GetLevelSplashScreen(int level) { - static Const char *splashScreens[4] = { + static Const char *splashScreens[5] = { nil, "splash1", "splash2", "splash3", + "loadsc0", }; return splashScreens[level]; @@ -640,6 +649,7 @@ ResetLoadingScreenBar() NumberOfChunksLoaded = 0.0f; } +//--LCS: not the real thing void LoadingScreen(const char *str1, const char *str2, const char *splashscreen) { @@ -651,7 +661,7 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen) #endif #ifndef RANDOMSPLASH - splashscreen = "LOADSC0"; + splashscreen = "SCEELEE"; #endif splash = LoadSplash(splashscreen); @@ -673,24 +683,27 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen) NumberOfChunksLoaded += 1; #ifndef RANDOMSPLASH + // this looks nice float hpos = SCREEN_SCALE_X(40); float length = SCREEN_WIDTH - SCREEN_SCALE_X(80); - float top = SCREEN_HEIGHT - SCREEN_SCALE_Y(14); - float bottom = top + SCREEN_SCALE_Y(5); + float top = SCREEN_HEIGHT - SCREEN_SCALE_Y(30); + float bottom = top + SCREEN_SCALE_Y(8); #else - float hpos = SCREEN_STRETCH_X(40); - float length = SCREEN_STRETCH_X(440); - // this is rather weird - float top = SCREEN_STRETCH_Y(407.4f - 7.0f/3.0f); - float bottom = SCREEN_STRETCH_Y(407.4f + 7.0f/3.0f); + // should correspond to PS2 position + float hpos = SCREEN_STRETCH_X(44); + float length = SCREEN_STRETCH_X(176); + float top = SCREEN_STRETCH_Y(420); + float bottom = top + SCREEN_STRETCH_Y(8); #endif - CSprite2d::DrawRect(CRect(hpos-1.0f, top-1.0f, hpos+length+1.0f, bottom+1.0f), CRGBA(40, 53, 68, 255)); + CSprite2d::DrawRect(CRect(hpos+4.0f, top+6.0f, hpos+length+4.0f, bottom+6.0f), CRGBA(0, 0, 0, 200)); - CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(155, 50, 125, 255)); + CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(0, 0, 0, 255)); + + CSprite2d::DrawRect(CRect(hpos+1.0f, top+1.0f, hpos+length-1.0f, bottom-1.0f), CRGBA(99, 99, 99, 255)); length *= NumberOfChunksLoaded/TOTALNUMCHUNKS; - CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(255, 150, 225, 255)); + CSprite2d::DrawRect(CRect(hpos+1.0f, top+1.0f, hpos+length-1.0f, bottom-1.0f), CRGBA(126, 15, 0, 255)); // this is done by the game but is unused CFont::SetBackgroundOff(); @@ -705,7 +718,7 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen) // my attempt static wchar tmpstr[80]; float yscale = SCREEN_SCALE_Y(0.9f); - top -= 45*yscale; + top = bottom+5*yscale; CFont::SetScale(SCREEN_SCALE_X(0.75f), yscale); CFont::SetPropOn(); CFont::SetRightJustifyOff(); @@ -726,12 +739,13 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen) } } +//--LCS: slightly fixed void LoadingIslandScreen(const char *levelName) { CSprite2d *splash; - splash = LoadSplash(nil); + splash = LoadSplash(GetLevelSplashScreen(CGame::currLevel)); if(!DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255)) return; @@ -1230,10 +1244,10 @@ MattRenderScene(void) /// CWorld::AdvanceCurrentScanCode(); // CMattRenderer::ResetRenderStates /// CRenderer::ClearForFrame(); // before ConstructRenderList - // CClock::CalcEnvMapTimeMultiplicator + CClock::CalcEnvMapTimeMultiplicator(); RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE); CWaterLevel::RenderWater(); // actually CMattRenderer::RenderWater - // CClock::ms_EnvMapTimeMultiplicator = 1.0f; + CClock::ms_EnvMapTimeMultiplicator = 1.0f; // cWorldStream::ClearDynamics /// CRenderer::ConstructRenderList(); // before PreRender if(gbRenderWorld0) @@ -1246,6 +1260,8 @@ if(gbRenderWorld1) if(gbRenderRoads) CRenderer::RenderRoads(); + CRenderer::GenerateEnvironmentMap(); // should be after static shadows, but that's weird + CRenderer::RenderPeds(); // not sure where to put these since LCS has no underwater entities @@ -1286,7 +1302,6 @@ RenderEffects_new(void) PUSH_RENDERGROUP("RenderEffects_new"); /* // stupid to do this before the whole world is drawn! CShadows::RenderStaticShadows(); - // CRenderer::GenerateEnvironmentMap CShadows::RenderStoredShadows(); CSkidmarks::Render(); CRubbish::Render(); @@ -1373,7 +1388,7 @@ void RenderDebugShit(void) { PUSH_RENDERGROUP("RenderDebugShit"); - CTheScripts::RenderTheScriptDebugLines(); + //CTheScripts::RenderTheScriptDebugLines(); #ifndef FINAL if(gbShowCollisionLines) CRenderer::RenderCollisionLines(); diff --git a/src/core/main.h b/src/core/main.h index 803afb14..3fa26e78 100644 --- a/src/core/main.h +++ b/src/core/main.h @@ -18,7 +18,7 @@ struct GlobalScene }; extern GlobalScene Scene; -extern uint8 work_buff[55000]; +extern uint8 work_buff[102400]; extern char gString[256]; extern char gString2[512]; extern wchar gUString[256]; @@ -35,6 +35,14 @@ extern bool gbShowTimebars; extern bool gbPrintMemoryUsage; #endif +// leeds +extern bool gMakeResources; +extern bool gUseChunkFiles; +extern bool gSecondExportPass; +extern bool gUseModelResources; +extern bool gUseResources; +extern bool gNASTY_NASTY_MEM_SHUTDOWN_HACK; + class CSprite2d; bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha); diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 37c0a7ae..c66ce82a 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -132,20 +132,20 @@ CustomFrontendOptionsPopulate(void) int fd; // These work only if we have neo folder, so they're dynamically added #ifdef EXTENDED_PIPELINES - const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" }; + const char *pipelineNames[] = { "FED_PSP", "FED_PS2","FED_MOB" }; const char *off_on[] = { "FEM_OFF", "FEM_ON" }; fd = CFileMgr::OpenFile("neo/neo.txd","r"); if (fd) { #ifdef GRAPHICS_MENU_OPTIONS FrontendOptionSetCursor(MENUPAGE_GRAPHICS_SETTINGS, -3, false); - FrontendOptionAddSelect("FED_VPL", 0, 0, MENUALIGN_LEFT, vehPipelineNames, ARRAY_SIZE(vehPipelineNames), (int8*)&CustomPipes::VehiclePipeSwitch, false, nil, "Graphics", "VehiclePipeline"); - FrontendOptionAddSelect("FED_PRM", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::RimlightEnable, false, nil, "Graphics", "NeoRimLight"); + FrontendOptionAddSelect("FED_VPL", 0, 0, MENUALIGN_LEFT, pipelineNames, ARRAY_SIZE(pipelineNames), (int8*)&CustomPipes::VehiclePipeSwitch, false, nil, "Graphics", "VehiclePipeline"); + FrontendOptionAddSelect("FED_WPL", 0, 0, MENUALIGN_LEFT, pipelineNames, ARRAY_SIZE(pipelineNames), (int8*)&CustomPipes::WorldPipeSwitch, false, nil, "Graphics", "WorldPipeline"); FrontendOptionAddSelect("FED_WLM", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::LightmapEnable, false, nil, "Graphics", "NeoLightMaps"); FrontendOptionAddSelect("FED_RGL", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::GlossEnable, false, nil, "Graphics", "NeoRoadGloss"); #else FrontendOptionSetCursor(MENUPAGE_DISPLAY_SETTINGS, -3, false); - FrontendOptionAddSelect("FED_VPL", 0, 0, MENUALIGN_LEFT, vehPipelineNames, ARRAY_SIZE(vehPipelineNames), (int8*)&CustomPipes::VehiclePipeSwitch, false, nil, "Graphics", "VehiclePipeline"); - FrontendOptionAddSelect("FED_PRM", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::RimlightEnable, false, nil, "Graphics", "NeoRimLight"); + FrontendOptionAddSelect("FED_VPL", 0, 0, MENUALIGN_LEFT, pipelineNames, ARRAY_SIZE(pipelineNames), (int8*)&CustomPipes::VehiclePipeSwitch, false, nil, "Graphics", "VehiclePipeline"); + FrontendOptionAddSelect("FED_WPL", 0, 0, MENUALIGN_LEFT, pipelineNames, ARRAY_SIZE(pipelineNames), (int8*)&CustomPipes::WorldPipeSwitch, false, nil, "Graphics", "WorldPipeline"); FrontendOptionAddSelect("FED_WLM", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::LightmapEnable, false, nil, "Graphics", "NeoLightMaps"); FrontendOptionAddSelect("FED_RGL", 0, 0, MENUALIGN_LEFT, off_on, 2, (int8*)&CustomPipes::GlossEnable, false, nil, "Graphics", "NeoRoadGloss"); #endif @@ -192,7 +192,7 @@ CustomFrontendOptionsPopulate(void) #define MINI_CASE_SENSITIVE #include "ini.h" -mINI::INIFile ini("reVC.ini"); +mINI::INIFile ini("reLCS.ini"); mINI::INIStructure cfg; bool ReadIniIfExists(const char *cat, const char *key, uint32 *out) @@ -693,7 +693,6 @@ void FastWeatherCheat(); void OnlyRenderWheelsCheat(); void ChittyChittyBangBangCheat(); void StrongGripCheat(); -void SpecialCarCheats(); void PickUpChicksCheat(); DebugMenuEntry *carCol1; @@ -812,17 +811,15 @@ SwitchToMission(void) #endif static const char *carnames[] = { - "landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "rio", "firetruk", "trash", "stretch", "manana", - "infernus", "voodoo", "pony", "mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", "washing", - "bobcat", "mrwhoop", "bfinject", "hunter", "police", "enforcer", "securica", "banshee", "predator", "bus", - "rhino", "barracks", "cuban", "chopper", "angel", "coach", "cabbie", "stallion", "rumpo", "rcbandit", "romero", - "packer", "sentxs", "admiral", "squalo", "seaspar", "pizzaboy", "gangbur", "airtrain", "deaddodo", "speeder", - "reefer", "tropic", "flatbed", "yankee", "caddy", "zebra", "topfun", "skimmer", "pcj600", "faggio", "freeway", - "rcbaron", "rcraider", "glendale", "oceanic", "sanchez", "sparrow", "patriot", "lovefist", "coastg", "dinghy", - "hermes", "sabre", "sabretur", "pheonix", "walton", "regina", "comet", "deluxo", "burrito", "spand", "marquis", - "baggage", "kaufman", "maverick", "vcnmav", "rancher", "fbiranch", "virgo", "greenwoo", "jetmax", "hotring", - "sandking", "blistac", "polmav", "boxville", "benson", "mesa", "rcgoblin", "hotrina", "hotrinb", - "bloodra", "bloodrb", "vicechee" + "spider", "landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "patriot", "firetruk", "trash", "stretch", + "manana", "infernus", "blista", "pony", "mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", + "kuruma", "bobcat", "mrwhoop", "bfinject", "hearse", "police", "enforcer", "securica", "banshee", "bus", "rhino", + "barracks", "dodo", "coach", "cabbie", "stallion", "rumpo", "rcbandit", "bellyup", "mrwongs", "mafia", "yardie", + "yakuza", "diablos", "columb", "hoods", "panlant", "flatbed", "yankee", "borgnine", "toyz", "campvan", "ballot", + "shelby", "pontiac", "esprit", "ammotruk", "hotrod", "Sindacco_Car", "Forelli_Car", "ferry", "ghost", "speeder", + "reefer", "predator", "train", "escape", "chopper", "airtrain", "deaddodo", "angel", "pizzaboy", "noodleboy", + "pcj600", "faggio", "freeway", "angel2", "sanchez2", "sanchez", "rcgoblin", "rcraider", "hunter", "maverick", + "polmav", "vcnmav" }; static CTweakVar** TweakVarsList; @@ -952,11 +949,10 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Cheats", "Only render wheels", OnlyRenderWheelsCheat); DebugMenuAddCmd("Cheats", "Chitty chitty bang bang", ChittyChittyBangBangCheat); DebugMenuAddCmd("Cheats", "Strong grip", StrongGripCheat); - DebugMenuAddCmd("Cheats", "Special car", SpecialCarCheats); DebugMenuAddCmd("Cheats", "Pickup chicks", PickUpChicksCheat); static int spawnCarId = MI_LANDSTAL; - e = DebugMenuAddVar("Spawn", "Spawn Car ID", &spawnCarId, nil, 1, MI_LANDSTAL, MI_VICECHEE, carnames); + e = DebugMenuAddVar("Spawn", "Spawn Car ID", &spawnCarId, nil, 1, MI_SPIDER, MI_VCNMAV, carnames); DebugMenuEntrySetWrap(e, true); DebugMenuAddCmd("Spawn", "Spawn Car", [](){ if(spawnCarId == MI_CHOPPER || @@ -971,22 +967,19 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Spawn", "Spawn Stinger", [](){ SpawnCar(MI_STINGER); }); DebugMenuAddCmd("Spawn", "Spawn Infernus", [](){ SpawnCar(MI_INFERNUS); }); DebugMenuAddCmd("Spawn", "Spawn Cheetah", [](){ SpawnCar(MI_CHEETAH); }); - DebugMenuAddCmd("Spawn", "Spawn Phoenix", [](){ SpawnCar(MI_PHEONIX); }); + DebugMenuAddCmd("Spawn", "Spawn Esprit", [](){ SpawnCar(MI_ESPRIT); }); DebugMenuAddCmd("Spawn", "Spawn Banshee", [](){ SpawnCar(MI_BANSHEE); }); DebugMenuAddCmd("Spawn", "Spawn Esperanto", [](){ SpawnCar(MI_ESPERANT); }); DebugMenuAddCmd("Spawn", "Spawn Stallion", [](){ SpawnCar(MI_STALLION); }); - DebugMenuAddCmd("Spawn", "Spawn Admiral", [](){ SpawnCar(MI_ADMIRAL); }); - DebugMenuAddCmd("Spawn", "Spawn Washington", [](){ SpawnCar(MI_WASHING); }); + DebugMenuAddCmd("Spawn", "Spawn Mafia", [](){ SpawnCar(MI_MAFIA); }); + DebugMenuAddCmd("Spawn", "Spawn Kuruma", [](){ SpawnCar(MI_KURUMA); }); DebugMenuAddCmd("Spawn", "Spawn Taxi", [](){ SpawnCar(MI_TAXI); }); DebugMenuAddCmd("Spawn", "Spawn Police", [](){ SpawnCar(MI_POLICE); }); DebugMenuAddCmd("Spawn", "Spawn Enforcer", [](){ SpawnCar(MI_ENFORCER); }); - DebugMenuAddCmd("Spawn", "Spawn Cuban", [](){ SpawnCar(MI_CUBAN); }); - DebugMenuAddCmd("Spawn", "Spawn Voodoo", [](){ SpawnCar(MI_VOODOO); }); + DebugMenuAddCmd("Spawn", "Spawn Diablo", [](){ SpawnCar(MI_DIABLOS); }); + DebugMenuAddCmd("Spawn", "Spawn Yardie", [](){ SpawnCar(MI_YARDIE); }); DebugMenuAddCmd("Spawn", "Spawn BF injection", [](){ SpawnCar(MI_BFINJECT); }); DebugMenuAddCmd("Spawn", "Spawn Maverick", [](){ SpawnCar(MI_MAVERICK); }); - DebugMenuAddCmd("Spawn", "Spawn VCN Maverick", [](){ SpawnCar(MI_VCNMAV); }); - DebugMenuAddCmd("Spawn", "Spawn Sparrow", [](){ SpawnCar(MI_SPARROW); }); - DebugMenuAddCmd("Spawn", "Spawn Sea Sparrow", [](){ SpawnCar(MI_SEASPAR); }); DebugMenuAddCmd("Spawn", "Spawn Hunter", [](){ SpawnCar(MI_HUNTER); }); DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); }); DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); }); @@ -994,10 +987,9 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Spawn", "Spawn PCJ 600", [](){ SpawnCar(MI_PCJ600); }); DebugMenuAddCmd("Spawn", "Spawn Faggio", [](){ SpawnCar(MI_FAGGIO); }); DebugMenuAddCmd("Spawn", "Spawn Freeway", [](){ SpawnCar(MI_FREEWAY); }); - DebugMenuAddCmd("Spawn", "Spawn Squalo", [](){ SpawnCar(MI_SQUALO); }); - DebugMenuAddCmd("Spawn", "Spawn Skimmer", [](){ SpawnCar(MI_SKIMMER); }); DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil); + DebugMenuAddVar("Render", "Brightness", &FrontEndMenuManager.m_PrefsBrightness, nil, 16, 0, 700, nil); #ifdef PROPER_SCALING DebugMenuAddVarBool8("Render", "Proper Scaling", &CDraw::ms_bProperScaling, nil); #endif @@ -1037,8 +1029,8 @@ extern bool gbRenderWorld2; #endif #ifdef EXTENDED_COLOURFILTER - static const char *filternames[] = { "None", "Simple", "Normal", "Mobile" }; - e = DebugMenuAddVar("Render", "Colourfilter", &CPostFX::EffectSwitch, nil, 1, CPostFX::POSTFX_OFF, CPostFX::POSTFX_MOBILE, filternames); + static const char *filternames[] = { "None", "PSP", "PS2" }; + e = DebugMenuAddVar("Render", "Colourfilter", &CPostFX::EffectSwitch, nil, 1, CPostFX::POSTFX_OFF, CPostFX::POSTFX_PS2, filternames); DebugMenuEntrySetWrap(e, true); DebugMenuAddVar("Render", "Intensity", &CPostFX::Intensity, nil, 0.05f, 0, 10.0f); DebugMenuAddVarBool8("Render", "Blur", &CPostFX::BlurOn, nil); @@ -1054,18 +1046,25 @@ extern bool gbRenderWorld2; DebugMenuAddVarBool32("Render", "MatFX env map use matcolor", &rw::MatFX::envMapUseMatColor, nil); #endif #ifdef EXTENDED_PIPELINES - static const char *vehpipenames[] = { "MatFX", "Neo" }; + static const char *worldpipenames[] = { "PSP", "PS2", "Mobile" }; + e = DebugMenuAddVar("Render", "World Rendering", &CustomPipes::WorldPipeSwitch, nil, + 1, CustomPipes::WORLDPIPE_PSP, CustomPipes::WORLDPIPE_MOBILE, worldpipenames); + DebugMenuEntrySetWrap(e, true); + static const char *vehpipenames[] = { "PSP", "PS2", "Mobile" }; e = DebugMenuAddVar("Render", "Vehicle Pipeline", &CustomPipes::VehiclePipeSwitch, nil, - 1, CustomPipes::VEHICLEPIPE_MATFX, CustomPipes::VEHICLEPIPE_NEO, vehpipenames); + 1, CustomPipes::VEHICLEPIPE_PSP, CustomPipes::VEHICLEPIPE_MOBILE, vehpipenames); DebugMenuEntrySetWrap(e, true); - DebugMenuAddVar("Render", "Neo Vehicle Shininess", &CustomPipes::VehicleShininess, nil, 0.1f, 0, 1.0f); - DebugMenuAddVar("Render", "Neo Vehicle Specularity", &CustomPipes::VehicleSpecularity, nil, 0.1f, 0, 1.0f); + DebugMenuAddVarBool8("Render", "Glass Cars cheat", &CustomPipes::gGlassCarsCheat, nil); +extern bool gbRenderDebugEnvMap; + DebugMenuAddVarBool8("Render", "Show Env map", &gbRenderDebugEnvMap, nil); +// DebugMenuAddVar("Render", "Neo Vehicle Shininess", &CustomPipes::VehicleShininess, nil, 0.1f, 0, 1.0f); +// DebugMenuAddVar("Render", "Neo Vehicle Specularity", &CustomPipes::VehicleSpecularity, nil, 0.1f, 0, 1.0f); DebugMenuAddVarBool8("Render", "Neo Ped Rim light enable", &CustomPipes::RimlightEnable, nil); DebugMenuAddVar("Render", "Mult", &CustomPipes::RimlightMult, nil, 0.1f, 0, 1.0f); - DebugMenuAddVarBool8("Render", "Neo World Lightmaps enable", &CustomPipes::LightmapEnable, nil); - DebugMenuAddVar("Render", "Mult", &CustomPipes::LightmapMult, nil, 0.1f, 0, 1.0f); - DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil); - DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f); +// DebugMenuAddVarBool8("Render", "Neo World Lightmaps enable", &CustomPipes::LightmapEnable, nil); +// DebugMenuAddVar("Render", "Mult", &CustomPipes::LightmapMult, nil, 0.1f, 0, 1.0f); +// DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil); +// DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f); #endif DebugMenuAddVarBool8("Debug Render", "Show Ped Paths", &gbShowPedPaths, nil); DebugMenuAddVarBool8("Debug Render", "Show Car Paths", &gbShowCarPaths, nil); @@ -1119,24 +1118,30 @@ extern bool gbRenderWorld2; #ifdef MISSION_SWITCHER DebugMenuEntry *missionEntry; static const char* missions[] = { - "Initial", "Intro", "An Old Friend", "The Party", "Back Alley Brawl", "Jury Fury", "Riot", - "Treacherous Swine", "Mall Shootout", "Guardian Angels", "Sir, Yes Sir!", "All Hands On Deck!", - "The Chase", "Phnom Penh '86", "The Fastest Boat", "Supply & Demand", "Rub Out", "Death Row", - "Four Iron", "Demolition Man", "Two Bit Hit", "No Escape?", "The Shootist", "The Driver", - "The Job", "Gun Runner", "Boomshine Saigon", "Recruitment Drive", "Dildo Dodo", "Martha's Mug Shot", - "G-spotlight", "Shakedown", "Bar Brawl", "Cop Land", "Spilling the Beans", "Hit the Courier", - "Printworks Buy", "Sunshine Autos", "Interglobal Films Buy", "Cherry Popper Icecreams Buy", - "Kaufman Cabs Buy", "Malibu Club Buy", "The Boatyard Buy", "Pole Position Club Buy", "El Swanko Casa Buy", - "Links View Apartment Buy", "Hyman Condo Buy", "Ocean Heighs Aprt. Buy", "1102 Washington Street Buy", - "Vice Point Buy", "Skumole Shack Buy", "Cap the Collector", "Keep your Friends Close...", - "Alloy Wheels of Steel", "Messing with the Man", "Hog Tied", "Stunt Boat Challenge", "Cannon Fodder", - "Naval Engagement", "Trojan Voodoo", "Juju Scramble", "Bombs Away!", "Dirty Lickin's", "Love Juice", - "Psycho Killer", "Publicity Tour", "Weapon Range", "Road Kill", "Waste the Wife", "Autocide", - "Check Out at the Check In", "Loose Ends", "V.I.P.", "Friendly Rivalry", "Cabmaggedon", "TAXI DRIVER", - "PARAMEDIC", "FIREFIGHTER", "VIGILANTE", "HOTRING", "BLOODRING", "DIRTRING", "Sunshine Autos Races", - "Distribution", "Downtown Chopper Checkpoint", "Ocean Beach Chopper Checkpoint", "Vice Point Chopper Checkpoint", - "Little Haiti Chopper Checkpoint", "Trial by Dirt", "Test Track", "PCJ Playground", "Cone Crazy", - "PIZZA BOY", "RC Raider Pickup", "RC Bandit Race", "RC Baron Race", "Checkpoint Charlie" + "initial: objects", "initial: hidden packages", "initial: car generators", "initial: pickups", "initial: unique stunt jumps", + "initial: player", "initial: general info", "initial: lods", "initial: weapons", "Home Sweet Home", "Taxi-Driver Sub-Mission", + "Paramedic Sub-Mission", "Vigilante Sub-Mission", "Karmageddon", "Firefighter Sub-Mission", "Trash Dash", "RC Triad Take-Down", + "Thrashin' RC", "Ragin' RC", "Chasin' RC", "GO GO Faggio", "Noodleboy", "Pizzaboy", "Wong Side Of The Tracks", "Bumps and Grinds: Course 1", + "Bumps and Grinds: Course 2", "Bumps and Grinds: Course 3", "Bumps and Grinds: Course 4", "Bumps and Grinds: Course 5", "Bumps and Grinds: Course 6", + "Bumps and Grinds: Course 7", "Bumps and Grinds: Course 8", "Bumps and Grinds: Course 9", "Bumps and Grinds: Course 10", "Car Salesman", "Bike Salesman", + "RACE: Low-Rider Rumble", "RACE: Deimos Dash", "RACE: Wi-Cheetah Run", "RACE: Red Light Racing", "RACE: Torrington TT", "RACE: Gangsta GP", + "Scooter Shooter", "AWOL Angel", "9mm Mayhem", "Scrapyard Challenge", "See the Sight Before your Flight", "SlashTV", "Slacker (Vincenzo)", + "Dealing Revenge (Vincenzo)", "Snuff (Vincenzo)", "Smash and Grab (Vincenzo)", "Hot Wheels (Vincenzo)", "The Portland Chainsaw Masquerade (Vincenzo)", + "The Offer (Salvatore)", "Ho Selecta! (Salvatore)", "Frighteners (Salvatore)", "Rollercoaster Ride (Salvatore)", "Contra-Banned (Salvatore)", + "Sindacco Sabotage (Salvatore)", "The Trouble with Triads (Salvatore)", "Driving Mr Leone (Salvatore)", "conversation (JD)", "Bone Voyeur! (JD)", + "Don in 60 Seconds (JD)", "A Volatile Situation (JD)", "Blow up 'Dolls' (JD)", "Salvatore's Salvation (JD)", "The Guns of Leone (JD)", + "Calm before the Storm (JD)", "The Made Man (JD)", "Snappy Dresser (Ma Cipriani)", "Big Rumble in Little China (Ma Cipriani)", "Grease Sucho (Ma Cipriani)", + "Dead Meat (Ma Cipriani)", "No Son of Mine (Ma Cipriani)", "Shop 'til you Strop (Maria)", "Taken for a Ride (Maria)", "Booby Prize (Maria)", + "Biker Heat (Maria)", "Overdose of Trouble (Maria)", "Making Toni (Salvatore)", "A Walk In The Park (Salvatore)", "Caught In The Act (Salvatore)", + "Search And Rescue (Salvatore)", "Taking The Peace (Salvatore)", "Shoot The Messenger (Salvatore)", "Sayonara Sindaccos (Leon McAffrey)", + "The Whole 9 Yardies (Leon McAffrey)", "Crazy '69' (Leon McAffrey)", "Night Of The Livid Dreads (Leon McAffrey)", "Munitions Dump (Leon McAffrey)", + "The Morgue Party Candidate (Donald Love)", "Steering The Vote (Donald Love)", "Cam-Pain (Donald Love)", "Friggin' The Riggin' (Donald Love)", + "Love & Bullets (Donald Love)", "Counterfeit Count (Donald Love)", "Love On The Rocks (Donald Love)", "L.C. Confidential (Church Confessional)", + "The Passion Of The Heist (Church Confessional)", "Karmageddon (Church Confessional)", "False Idols (Church Confessional)", "Rough Justice (Salvatore)", + "Dead Reckoning (Salvatore)", "Shogun Showdown (Salvatore)", "The Shoreside Redemption (Salvatore)", "The Sicilian Gambit (Salvatore)", + "Panlantic Land Grab (Donald Love)", "Stop the Press (Donald Love)", "Morgue Party Resurrection (Donald Love)", "No Money, Mo' Problems (Donald Love)", + "Bringing the House Down (Donald Love)", "Love on the Run (Donald Love)", "More Deadly than the Male (Toshiko Kasen)", "Cash Clash (Toshiko Kasen)", + "A Date with Death (Toshiko Kasen)", "Cash in Kazuki's Chips (Toshiko Kasen)" }; missionEntry = DebugMenuAddVar("Game", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions); @@ -1194,7 +1199,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con strcat_s(re3_buff, re3_buffsize, "(Press Retry to debug the application)"); - nCode = ::MessageBoxA(nil, re3_buff, "REVC Assertion Failed!", + nCode = ::MessageBoxA(nil, re3_buff, "RELCS Assertion Failed!", MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL); if (nCode == IDABORT) @@ -1215,7 +1220,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con abort(); #else // TODO - printf("\nREVC ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr); + printf("\nRELCS ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr); assert(false); #endif } @@ -1267,14 +1272,14 @@ void re3_usererror(const char *format, ...) vsprintf_s(re3_buff, re3_buffsize, format, va); va_end(va); - ::MessageBoxA(nil, re3_buff, "REVC Error!", + ::MessageBoxA(nil, re3_buff, "RELCS Error!", MB_OK|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL); raise(SIGABRT); _exit(3); #else vsprintf(re3_buff, format, va); - printf("\nREVC Error!\n\t%s\n",re3_buff); + printf("\nRELCS Error!\n\t%s\n",re3_buff); assert(false); #endif } diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index b2fcfbc7..cd50923a 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -1,10 +1,10 @@ #include "common.h" -#include "VuVector.h" #include "General.h" #include "RwHelper.h" #include "ModelIndices.h" #include "Timer.h" +#include "Streaming.h" #include "Entity.h" #include "Object.h" #include "World.h" @@ -27,6 +27,12 @@ #include "Dummy.h" #include "WindModifiers.h" #include "SaveBuf.h" +#include "SpecialFX.h" +#include "VisibilityPlugins.h" +#include "RpAnimBlend.h" +#include "CutsceneMgr.h" + +//--LCS: file done except TODO for distance alpha int gBuildings; @@ -79,6 +85,11 @@ CEntity::CEntity(void) bUnderwater = false; bHasPreRenderEffects = false; + bIsTreeModel = false; + m_flagG2 = false; + m_flagG4 = false; + m_flagG8 = false; + m_scanCode = 0; m_modelIndex = -1; m_rwObject = nil; @@ -97,6 +108,8 @@ void CEntity::SetModelIndex(uint32 id) { m_modelIndex = id; + bIsTreeModel = IsTreeModel(m_modelIndex); + bDrawLast |= bIsTreeModel; bHasPreRenderEffects = HasPreRenderEffects(); CreateRwObject(); } @@ -105,6 +118,8 @@ void CEntity::SetModelIndexNoCreate(uint32 id) { m_modelIndex = id; + bIsTreeModel = IsTreeModel(m_modelIndex); + bDrawLast |= bIsTreeModel; bHasPreRenderEffects = HasPreRenderEffects(); } @@ -127,6 +142,7 @@ CEntity::CreateRwObject(void) else if(RwObjectGetType(m_rwObject) == rpCLUMP) GetMatrix().AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false); + // useless IsTextureLoaded(); mi->AddRef(); } } @@ -183,9 +199,11 @@ CEntity::DeleteRwObject(void) if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC){ f = RpAtomicGetFrame((RpAtomic*)m_rwObject); + CStreaming::UnregisterInstance((RpAtomic*)m_rwObject, nil); RpAtomicDestroy((RpAtomic*)m_rwObject); RwFrameDestroy(f); }else if(RwObjectGetType(m_rwObject) == rpCLUMP){ + CStreaming::UnregisterInstance((RpClump*)m_rwObject); if(IsClumpSkinned((RpClump*)m_rwObject)) RpClumpForAllAtomics((RpClump*)m_rwObject, AtomicRemoveAnimFromSkinCB, nil); RpClumpDestroy((RpClump*)m_rwObject); @@ -251,9 +269,18 @@ CEntity::UpdateRwFrame(void) RwFrameUpdateObjects((RwFrame*)rwObjectGetParent(m_rwObject)); } +bool +PauseEntityAnims(void) +{ + return CSpecialFX::bSnapShotActive; +} + void CEntity::UpdateRpHAnim(void) { + if(PauseEntityAnims()) + return; + if(IsClumpSkinned(GetClump())){ RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump()); RpHAnimHierarchyUpdateMatrices(hier); @@ -315,9 +342,10 @@ CEntity::PreRender(void) if(!bHasPreRenderEffects) return; + // separate function in LCS but we don't know the name switch(m_type){ case ENTITY_TYPE_BUILDING: - if(IsTreeModel(GetModelIndex())){ + if(bIsTreeModel){ float dist = (TheCamera.GetPosition() - GetPosition()).Magnitude2D(); CObject::fDistToNearestTree = Min(CObject::fDistToNearestTree, dist); ModifyMatrixForTreeInWind(); @@ -416,12 +444,50 @@ void CEntity::Render(void) { if(m_rwObject){ - bImBeingRendered = true; - if(RwObjectGetType(m_rwObject) == rpATOMIC) - RpAtomicRender((RpAtomic*)m_rwObject); - else - RpClumpRender((RpClump*)m_rwObject); - bImBeingRendered = false; + if(CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject) != 0){ + // NB: LCS does not use bImBeingRendered here, + // but that may be due to the streamed world. better keep it for safety + bImBeingRendered = true; + if(RwObjectGetType(m_rwObject) == rpATOMIC) + RpAtomicRender((RpAtomic*)m_rwObject); + else + RpClumpRender((RpClump*)m_rwObject); + bImBeingRendered = false; + } + } +} + +void +CEntity::UpdateDistanceFade(void) +{ +// TODO(LCS): +// increasing and decreasing alpha depending on bDistanceFade doesn't make any sense +// so disable this whole thing until it does. +return; + int alpha = CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject); + if(CCutsceneMgr::IsRunning() || TheCamera.WorldViewerBeingUsed) + alpha = 255; + else if(bDistanceFade) + alpha = Max(alpha-16, 0); + else if(alpha < 255) + alpha = Min(alpha+32, 255); + CVisibilityPlugins::SetObjectDistanceAlpha(m_rwObject, alpha); +} + +void +CEntity::UpdateAnim(void) +{ + if(PauseEntityAnims()) + return; + + if(m_rwObject && RwObjectGetType(m_rwObject) == rpCLUMP && RpAnimBlendClumpGetFirstAssociation(GetClump())) { + if (IsObject()) + RpAnimBlendClumpUpdateAnimations(GetClump(), CTimer::GetTimeStepNonClippedInSeconds()); + else { + if (!bOffscreen) + bOffscreen = !GetIsOnScreen(); + RpAnimBlendClumpUpdateAnimations(GetClump(), CTimer::GetTimeStepInSeconds(), !bOffscreen); + } } } @@ -434,6 +500,12 @@ CEntity::GetIsTouching(CVUVECTOR const ¢er, float radius) } bool +CEntity::GetIsTouching(CEntity *other) +{ + return sq(GetBoundRadius()+other->GetBoundRadius()) > (GetBoundCentre()-other->GetBoundCentre()).MagnitudeSqr(); +} + +bool CEntity::IsVisible(void) { return m_rwObject && bIsVisible && GetIsOnScreen(); @@ -634,10 +706,15 @@ CEntity::SetupBigBuilding(void) m_level = CTheZones::GetLevelFromPosition(&GetPosition()); if(mi->m_lodDistances[0] <= 2000.0f) bStreamBIGBuilding = true; - if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist) + if(m_modelIndex == islandLODindust || + m_modelIndex == islandLODcomInd || + m_modelIndex == islandLODcomSub || + m_modelIndex == islandLODsubInd || + m_modelIndex == islandLODsubCom || + mi->m_lodDistances[0] > 5000.0f || mi->m_ignoreDrawDist) m_level = LEVEL_GENERIC; - else if(m_level == LEVEL_GENERIC) - printf("%s isn't in a level\n", mi->GetModelName()); +// else if(m_level == LEVEL_GENERIC) +// printf("%s isn't in a level\n", mi->GetModelName()); } float WindTabel[] = { diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 957ee3bf..239292c5 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -26,6 +26,8 @@ enum eEntityStatus STATUS_WRECKED, STATUS_TRAIN_MOVING, STATUS_TRAIN_NOT_MOVING, + STATUS_FERRY_MOVING, + STATUS_FERRY_NOT_MOVING, STATUS_HELI, STATUS_PLANE, STATUS_PLAYER_REMOTE, @@ -43,6 +45,7 @@ private: uint32 m_status : 5; public: // flagsA + // LCS flagsB 02 uint32 bUsesCollision : 1; // does entity use collision uint32 bCollisionProcessed : 1; // has object been processed by a ProcessEntityCollision function uint32 bIsStatic : 1; // is entity static @@ -50,6 +53,7 @@ public: uint32 bPedPhysics : 1; uint32 bIsStuck : 1; // is entity stuck uint32 bIsInSafePosition : 1; // is entity in a collision free safe position + // LCS flagsC uint32 bUseCollisionRecords : 1; // flagsB @@ -60,6 +64,7 @@ public: uint32 bRenderScorched : 1; uint32 bHasBlip : 1; uint32 bIsBIGBuilding : 1; // Set if this entity is a big building + // LCS flagsD uint32 bStreamBIGBuilding : 1; // set when draw dist <= 2000 // flagsC @@ -70,6 +75,7 @@ public: uint32 bMeleeProof : 1; uint32 bOnlyDamagedByPlayer : 1; uint32 bStreamingDontDelete : 1; // Dont let the streaming remove this + // LCS flagsE uint32 bRemoveFromWorld : 1; // remove this entity next time it should be processed // flagsD @@ -80,6 +86,7 @@ public: uint32 bDrawLast : 1; // draw object last uint32 bNoBrightHeadLights : 1; uint32 bDoNotRender : 1; //-- only applies to CObjects apparently + // LCS flagsF uint32 bDistanceFade : 1; // Fade entity because it is far away // flagsE @@ -91,6 +98,12 @@ public: uint32 bUnderwater : 1; // this object is underwater change drawing order uint32 bHasPreRenderEffects : 1; // Object has a prerender effects attached to it + // LCS flagsG + uint32 bIsTreeModel : 1; + uint32 m_flagG2 : 1; + uint32 m_flagG4 : 1; + uint32 m_flagG8 : 1; + uint16 m_scanCode; uint16 m_randomSeed; int16 m_modelIndex; @@ -118,6 +131,7 @@ public: virtual void Add(void); virtual void Remove(void); + virtual bool UpdatesInCutscene(void) { return false; } virtual void SetModelIndex(uint32 id); virtual void SetModelIndexNoCreate(uint32 id); virtual void CreateRwObject(void); @@ -129,6 +143,7 @@ public: virtual void Teleport(CVector v) {} virtual void PreRender(void); virtual void Render(void); + virtual void UpdateAnim(void); virtual bool SetupLighting(void); virtual void RemoveLighting(bool); virtual void FlagToDestroyWhenNextProcessed(void) {} @@ -148,11 +163,13 @@ public: return (RpClump*)m_rwObject; } + void UpdateDistanceFade(void); void GetBoundCentre(CVUVECTOR &out); CVector GetBoundCentre(void); float GetBoundRadius(void); float GetDistanceFromCentreOfMassToBaseOfModel(void); bool GetIsTouching(CVUVECTOR const ¢er, float r); + bool GetIsTouching(CEntity *other); bool GetIsOnScreen(void); bool GetIsOnScreenComplex(void); bool IsVisible(void); diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index e9ae3065..fd635b90 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -21,9 +21,7 @@ #include "Pickups.h" #include "Physical.h" -#ifdef WALLCLIMB_CHEAT bool gGravityCheat; -#endif CPhysical::CPhysical(void) @@ -357,7 +355,7 @@ CPhysical::ProcessEntityCollision(CEntity *ent, CColPoint *colpoints) return numSpheres; } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ProcessControl(void) { @@ -425,7 +423,7 @@ CPhysical::GetSpeed(const CVector &r) return m_vecMoveSpeed + m_vecMoveFriction + CrossProduct(m_vecTurnFriction + m_vecTurnSpeed, r); } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyMoveSpeed(void) { @@ -435,13 +433,13 @@ CPhysical::ApplyMoveSpeed(void) GetMatrix().Translate(m_vecMoveSpeed * CTimer::GetTimeStep()); } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyTurnSpeed(void) { if(bIsFrozen){ m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); - }else{ + }else if(!m_vecTurnSpeed.IsZero()){ // Move the coordinate axes by their speed // Note that this denormalizes the matrix CVector turnvec = m_vecTurnSpeed*CTimer::GetTimeStep(); @@ -451,29 +449,36 @@ CPhysical::ApplyTurnSpeed(void) } } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyMoveForce(float jx, float jy, float jz) { m_vecMoveSpeed += CVector(jx, jy, jz)*(1.0f/m_fMass); + m_vecTurnSpeed.x = Clamp(m_vecTurnSpeed.x, -4.0f, 4.0f); + m_vecTurnSpeed.y = Clamp(m_vecTurnSpeed.y, -4.0f, 4.0f); + m_vecTurnSpeed.z = Clamp(m_vecTurnSpeed.z, -4.0f, 4.0f); } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyTurnForce(float jx, float jy, float jz, float px, float py, float pz) { CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz)); m_vecTurnSpeed += turnimpulse*(1.0f/m_fTurnMass); + m_vecTurnSpeed.x = Clamp(m_vecTurnSpeed.x, -4.0f, 4.0f); + m_vecTurnSpeed.y = Clamp(m_vecTurnSpeed.y, -4.0f, 4.0f); + m_vecTurnSpeed.z = Clamp(m_vecTurnSpeed.z, -4.0f, 4.0f); } +//--LCS: done void CPhysical::ApplyFrictionMoveForce(float jx, float jy, float jz) { m_vecMoveFriction += CVector(jx, jy, jz)*(1.0f/m_fMass); } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyFrictionTurnForce(float jx, float jy, float jz, float px, float py, float pz) { @@ -482,7 +487,7 @@ CPhysical::ApplyFrictionTurnForce(float jx, float jy, float jz, float px, float m_vecTurnFriction += turnimpulse*(1.0f/m_fTurnMass); } -// --MIAMI: Proof-read once +//--LCS: done bool CPhysical::ApplySpringCollision(float springConst, CVector &springDir, CVector &point, float springRatio, float bias) { @@ -496,16 +501,16 @@ CPhysical::ApplySpringCollision(float springConst, CVector &springDir, CVector & return true; } -// --MIAMI: Proof-read once +//--LCS: done bool -CPhysical::ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir) +CPhysical::ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir, float &impulse) { float compression = 1.0f - springRatio; if(compression > 0.0f){ if(DotProduct(springDir, forceDir) > 0.0f) forceDir *= -1.0f; float step = Min(CTimer::GetTimeStep(), 3.0f); - float impulse = GRAVITY*m_fMass*step * springConst * compression * bias*2.0f; + impulse = GRAVITY*m_fMass*step * springConst * compression * bias*2.0f; if(bIsHeavy) impulse *= 0.75f; ApplyMoveForce(forceDir*impulse); @@ -514,10 +519,13 @@ CPhysical::ApplySpringCollisionAlt(float springConst, CVector &springDir, CVecto return true; } -// --MIAMI: Proof-read once +float DAMPING_LIMIT_OF_SPRING_FORCE = 0.999f; +float DAMPING_LIMIT_IN_FRAME= 0.25f; + +//--LCS: done // What exactly is speed? bool -CPhysical::ApplySpringDampening(float damping, CVector &springDir, CVector &point, CVector &speed) +CPhysical::ApplySpringDampening(float damping, float dampingLimit, CVector &springDir, CVector &point, CVector &speed) { float speedA = DotProduct(speed, springDir); float speedB = DotProduct(GetSpeed(point), springDir); @@ -526,28 +534,42 @@ CPhysical::ApplySpringDampening(float damping, CVector &springDir, CVector &poin return true; #endif float step = Min(CTimer::GetTimeStep(), 3.0f); - float impulse = -damping * (speedA + speedB)/2.0f * m_fMass * step * 0.53f; + damping *= step; if(bIsHeavy) - impulse *= 2.0f; + damping *= 2.0f; + damping = Clamp(damping, -DAMPING_LIMIT_IN_FRAME, DAMPING_LIMIT_IN_FRAME); // what is this? - float a = m_fTurnMass / ((point.MagnitudeSqr() + 1.0f) * 2.0f * m_fMass); - a = Min(a, 1.0f); - float b = Abs(impulse / (speedB * m_fMass)); - if(a < b) - impulse *= a/b; + float fSpeed = -speedA * damping; + if(fSpeed > 0.0f && fSpeed+speedB > 0.0f){ + if(speedB < 0.0f) + fSpeed = -speedB; + else + fSpeed = 0.0f; + }else if(fSpeed < 0.0f && fSpeed+speedB < 0.0f){ + if(speedB > 0.0f) + fSpeed = -speedB; + else + fSpeed = 0.0f; + } + + CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + float impulse = fSpeed*GetMass(point-com, springDir); + float limit = Abs(dampingLimit)*DAMPING_LIMIT_OF_SPRING_FORCE; + if(impulse > limit) + impulse = limit; ApplyMoveForce(springDir*impulse); ApplyTurnForce(springDir*impulse, point); return true; } +//--LCS: done void CPhysical::ApplyGravity(void) { if (!bAffectedByGravity) return; -#ifdef WALLCLIMB_CHEAT if (gGravityCheat && this == FindPlayerVehicle()) { static CVector gravityUp(0.0f, 0.0f, 1.0f), surfaceUp(0.0f, 0.0f, 1.0f); CVector belowCar = GetPosition() - 2.0f*GetUp(); @@ -566,10 +588,10 @@ CPhysical::ApplyGravity(void) m_vecMoveSpeed -= GRAVITY * CTimer::GetTimeStep() * gravityUp; return; } -#endif m_vecMoveSpeed.z -= GRAVITY * CTimer::GetTimeStep(); } +//--LCS: done void CPhysical::ApplyFriction(void) { @@ -579,7 +601,7 @@ CPhysical::ApplyFriction(void) m_vecTurnFriction = CVector(0.0f, 0.0f, 0.0f); } -// --MIAMI: Proof-read once +//--LCS: done void CPhysical::ApplyAirResistance(void) { @@ -587,8 +609,8 @@ CPhysical::ApplyAirResistance(void) float f = Pow(m_fAirResistance, CTimer::GetTimeStep()); m_vecMoveSpeed *= f; m_vecTurnSpeed *= f; - }else if(GetStatus() != STATUS_GHOST){ - float f = Pow(1.0f/Abs(1.0f + m_fAirResistance*0.5f*m_vecMoveSpeed.MagnitudeSqr()), CTimer::GetTimeStep()); + }else{ + float f = Pow(1.0f - m_fAirResistance*m_vecMoveSpeed.Magnitude(), CTimer::GetTimeStep()); m_vecMoveSpeed *= f; m_vecTurnSpeed *= 0.99f; } @@ -697,6 +719,7 @@ CPhysical::ApplyCollision(CPhysical *B, CColPoint &colpoint, float &impulseA, fl int16 model = B->GetModelIndex(); if(model == MI_FIRE_HYDRANT && !Bobj->bHasBeenDamaged){ CParticleObject::AddObject(POBJECT_FIRE_HYDRANT, B->GetPosition() - CVector(0.0f, 0.0f, 0.5f), true); + CParticleObject::AddObject(POBJECT_FIRE_HYDRANT_STEAM, B->GetPosition() - CVector(0.0f, 0.0f, 0.5f), true); Bobj->bHasBeenDamaged = true; }else if(model == MI_PARKINGMETER || model == MI_PARKINGMETER2){ CPickups::CreateSomeMoney(GetPosition(), CGeneral::GetRandomNumber()%100); @@ -2312,3 +2335,44 @@ CPhysical::ProcessCollision(void) m_fElasticity = savedElasticity; RemoveAndAdd(); } + + + +// TEMP old VC code until bikes are done +bool +CPhysical::ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir) +{ + float compression = 1.0f - springRatio; + if(compression > 0.0f){ + if(DotProduct(springDir, forceDir) > 0.0f) + forceDir *= -1.0f; + float step = Min(CTimer::GetTimeStep(), 3.0f); + float impulse = GRAVITY*m_fMass*step * springConst * compression * bias*2.0f; + if(bIsHeavy) + impulse *= 0.75f; + ApplyMoveForce(forceDir*impulse); + ApplyTurnForce(forceDir*impulse, point); + } + return true; +} +bool +CPhysical::ApplySpringDampening(float damping, CVector &springDir, CVector &point, CVector &speed) +{ + float speedA = DotProduct(speed, springDir); + float speedB = DotProduct(GetSpeed(point), springDir); + float step = Min(CTimer::GetTimeStep(), 3.0f); + float impulse = -damping * (speedA + speedB)/2.0f * m_fMass * step * 0.53f; + if(bIsHeavy) + impulse *= 2.0f; + + // what is this? + float a = m_fTurnMass / ((point.MagnitudeSqr() + 1.0f) * 2.0f * m_fMass); + a = Min(a, 1.0f); + float b = Abs(impulse / (speedB * m_fMass)); + if(a < b) + impulse *= a/b; + + ApplyMoveForce(springDir*impulse); + ApplyTurnForce(springDir*impulse, point); + return true; +} diff --git a/src/entities/Physical.h b/src/entities/Physical.h index 926b9762..290c267c 100644 --- a/src/entities/Physical.h +++ b/src/entities/Physical.h @@ -158,8 +158,8 @@ public: void ApplyFrictionTurnForce(const CVector &j, const CVector &p) { ApplyFrictionTurnForce(j.x, j.y, j.z, p.x, p.y, p.z); } // springRatio: 1.0 fully extended, 0.0 fully compressed bool ApplySpringCollision(float springConst, CVector &springDir, CVector &point, float springRatio, float bias); - bool ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir); - bool ApplySpringDampening(float damping, CVector &springDir, CVector &point, CVector &speed); + bool ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir, float &impulse); + bool ApplySpringDampening(float damping, float dampingLimit, CVector &springDir, CVector &point, CVector &speed); void ApplyGravity(void); void ApplyFriction(void); void ApplyAirResistance(void); @@ -174,4 +174,8 @@ public: bool ProcessCollisionSectorList(CPtrList *lists); bool CheckCollision(void); bool CheckCollision_SimpleCar(void); + + // TEMP + bool ApplySpringCollisionAlt(float springConst, CVector &springDir, CVector &point, float springRatio, float bias, CVector &forceDir); + bool ApplySpringDampening(float damping, CVector &springDir, CVector &point, CVector &speed); }; diff --git a/src/extras/custompipes.cpp b/src/extras/custompipes.cpp index a485138e..a874343d 100644 --- a/src/extras/custompipes.cpp +++ b/src/extras/custompipes.cpp @@ -46,13 +46,14 @@ CustomMatCopy(void *dst, void *src, int32, int32) rw::TexDictionary *neoTxd; +bool gGlassCarsCheat; bool bRenderingEnvMap; -int32 EnvMapSize = 128; +int32 EnvMapSize = 512; rw::Camera *EnvMapCam; rw::Texture *EnvMapTex; rw::Texture *EnvMaskTex; -static rw::RWDEVICE::Im2DVertex EnvScreenQuad[4]; -static int16 QuadIndices[6] = { 0, 1, 2, 0, 2, 3 }; +rw::RWDEVICE::Im2DVertex EnvScreenQuad[4]; +int16 QuadIndices[6] = { 0, 1, 2, 0, 2, 3 }; static rw::Camera* CreateEnvMapCam(rw::World *world) @@ -341,7 +342,7 @@ ReadTweakValueTable(char *fp, InterpolatedValue &interp) * Neo Vehicle pipe */ -int32 VehiclePipeSwitch = VEHICLEPIPE_MATFX; +int32 VehiclePipeSwitch = VEHICLEPIPE_PS2; float VehicleShininess = 1.0f; float VehicleSpecularity = 1.0f; InterpolatedFloat Fresnel(0.4f); @@ -369,6 +370,7 @@ AttachVehiclePipe(rw::Clump *clump) * Neo World pipe */ +int32 WorldPipeSwitch = WORLDPIPE_PS2; bool LightmapEnable; float LightmapMult = 1.0f; InterpolatedFloat WorldLightmapBlend(1.0f); diff --git a/src/extras/custompipes.h b/src/extras/custompipes.h index 7ad239f0..faf99efc 100644 --- a/src/extras/custompipes.h +++ b/src/extras/custompipes.h @@ -75,16 +75,23 @@ void CustomPipeInit(void); void CustomPipeShutdown(void); void SetTxdFindCallback(void); +extern bool gGlassCarsCheat; extern bool bRenderingEnvMap; extern int32 EnvMapSize; extern rw::Camera *EnvMapCam; extern rw::Texture *EnvMapTex; extern rw::Texture *EnvMaskTex; +extern rw::RWDEVICE::Im2DVertex EnvScreenQuad[4]; +extern int16 QuadIndices[6]; void EnvMapRender(void); enum { - VEHICLEPIPE_MATFX, - VEHICLEPIPE_NEO + VEHICLEPIPE_PSP, + VEHICLEPIPE_PS2, + VEHICLEPIPE_MOBILE, + +// maybe later again... + VEHICLEPIPE_NEO = -1 }; extern int32 VehiclePipeSwitch; extern float VehicleShininess; @@ -99,6 +106,12 @@ void DestroyVehiclePipe(void); void AttachVehiclePipe(rw::Atomic *atomic); void AttachVehiclePipe(rw::Clump *clump); +enum { + WORLDPIPE_PSP, + WORLDPIPE_PS2, + WORLDPIPE_MOBILE +}; +extern int32 WorldPipeSwitch; extern bool LightmapEnable; extern float LightmapMult; extern InterpolatedFloat WorldLightmapBlend; @@ -133,8 +146,6 @@ void AttachRimPipe(rw::Clump *clump); } -#endif - namespace WorldRender{ extern int numBlendInsts[3]; void AtomicFirstPass(RpAtomic *atomic, int pass); @@ -143,3 +154,4 @@ void RenderBlendPass(int pass); } #endif +#endif diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index 3ad824e3..cb5fcadc 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -2,6 +2,10 @@ #include "common.h" #ifdef RW_D3D9 +#ifdef EXTENDED_PIPELINES + +#include "rpmatfx.h" + #include "main.h" #include "RwHelper.h" #include "Lights.h" @@ -14,13 +18,12 @@ #include "World.h" #include "custompipes.h" -#ifdef EXTENDED_PIPELINES - #ifndef LIBRW #error "Need librw for EXTENDED_PIPELINES" #endif -extern RwTexture *gpWhiteTexture; // from vehicle model info +//extern RwTexture *gpWhiteTexture; // from vehicle model info +static RwTexture *gpWhiteTexture; // nil works as white in librw currently namespace CustomPipes { @@ -36,13 +39,212 @@ enum { VSLOC_eye = rw::d3d::VSLOC_afterLights, VSLOC_reflProps, - VSLOC_specLights + VSLOC_specLights, + + // Leeds building, Leeds vehicle mobile + VSLOC_emissive = rw::d3d::VSLOC_afterLights, + VSLOC_ambient, + VSLOC_viewMat, // only vehicle + + // Leeds vehicle PS2 + VSLOC_texMat = rw::d3d::VSLOC_afterLights, + + PSLOC_colorscale = 1, + PSLOC_shininess, + PSLOC_skyTop, + PSLOC_skyBot }; /* - * Neo Vehicle pipe + * Leeds & Neo Vehicle pipe */ +static void *leedsVehicle_VS; +static void *leedsVehicle_mobile_VS; +static void *leedsVehicle_blend_PS; +static void *leedsVehicle_add_PS; +static void *leedsVehicle_mobile_PS; + +static rw::RawMatrix normal2texcoord_flipU = { + { -0.5f, 0.0f, 0.0f }, 0.0f, + { 0.0f, -0.5f, 0.0f }, 0.0f, + { 0.0f, 0.0f, 1.0f }, 0.0f, + { 0.5f, 0.5f, 0.0f }, 1.0f +}; + +void +uploadEnvMatrix(rw::Frame *frame) +{ + using namespace rw; + Matrix invMat; + if(frame == nil) + frame = engine->currentCamera->getFrame(); + + RawMatrix envMtx, invMtx; + Matrix tmp = *frame->getLTM(); + // Now the weird part: we remove the camera pitch + tmp.at.z = 0.0f; + tmp.at = normalize(tmp.at); + tmp.right.x = -tmp.at.y; + tmp.right.y = tmp.at.x; + tmp.right.z = 0.0f;; + tmp.up.set(0.0f, 0.0f, 1.0f); + tmp.pos.set(0.0f, 0.0f, 0.0f); + tmp.flags = Matrix::TYPEORTHONORMAL; + + Matrix::invert(&invMat, &tmp); + convMatrix(&invMtx, &invMat); + RawMatrix::mult(&envMtx, &invMtx, &normal2texcoord_flipU); + d3d::d3ddevice->SetVertexShaderConstantF(VSLOC_texMat, (float*)&envMtx, 4); +} + +void +leedsVehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) +{ + using namespace rw; + using namespace rw::d3d; + using namespace rw::d3d9; + + int vsBits; + setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); + setIndices(header->indexBuffer); + setVertexDeclaration(header->vertexDeclaration); + + vsBits = lightingCB_Shader(atomic); + uploadMatrices(atomic->getFrame()->getLTM()); + + setVertexShader(leedsVehicle_VS); + if(gGlassCarsCheat) + setPixelShader(leedsVehicle_blend_PS); + else + setPixelShader(leedsVehicle_add_PS); + + d3d::setTexture(1, EnvMapTex); + uploadEnvMatrix(nil); + + SetRenderState(SRCBLEND, BLENDONE); + + float colorscale[4]; + colorscale[3] = 1.0f; + + InstanceData *inst = header->inst; + for(rw::uint32 i = 0; i < header->numMeshes; i++){ + Material *m = inst->material; + + SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); + + float coef = 0.0f; + if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){ + coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f; + if(gGlassCarsCheat) + coef = 1.0f; + } + d3ddevice->SetPixelShaderConstantF(PSLOC_shininess, (float*)&coef, 1); + + setMaterial(m->color, m->surfaceProps); + + float cs = 1.0f; + // how does the PS2 handle this actually? probably scaled material color? + if(VehiclePipeSwitch == VEHICLEPIPE_PSP && m->texture) + cs = 2.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + d3ddevice->SetPixelShaderConstantF(PSLOC_colorscale, colorscale, 1); + + if(m->texture) + d3d::setTexture(0, m->texture); + else + d3d::setTexture(0, gpWhiteTexture); + + drawInst(header, inst); + inst++; + } + + d3d::setTexture(1, nil); + + SetRenderState(SRCBLEND, BLENDSRCALPHA); +} + +void +uploadWorldLights(void) +{ + using namespace rw; + using namespace rw::d3d; + using namespace rw::d3d9; + + RGBAf amb, emiss; + amb.red = CTimeCycle::GetAmbientRed(); + amb.green = CTimeCycle::GetAmbientGreen(); + amb.blue = CTimeCycle::GetAmbientBlue(); + amb.alpha = 1.0f; + emiss = pAmbient->color; + + d3ddevice->SetVertexShaderConstantF(VSLOC_ambient, (float*)&amb, 1); + d3ddevice->SetVertexShaderConstantF(VSLOC_emissive, (float*)&emiss, 1); +} + +void +leedsVehicleRenderCB_mobile(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) +{ + using namespace rw; + using namespace rw::d3d; + using namespace rw::d3d9; + + int vsBits; + setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); + setIndices(header->indexBuffer); + setVertexDeclaration(header->vertexDeclaration); + + vsBits = lightingCB_Shader(atomic); + uploadMatrices(atomic->getFrame()->getLTM()); + + setVertexShader(leedsVehicle_mobile_VS); + setPixelShader(leedsVehicle_mobile_PS); + + uploadWorldLights(); + + RGBAf skyTop, skyBot; + skyTop.red = CTimeCycle::GetSkyTopRed()/255.0f; + skyTop.green = CTimeCycle::GetSkyTopGreen()/255.0f; + skyTop.blue = CTimeCycle::GetSkyTopBlue()/255.0f; + skyBot.red = CTimeCycle::GetSkyBottomRed()/255.0f; + skyBot.green = CTimeCycle::GetSkyBottomGreen()/255.0f; + skyBot.blue = CTimeCycle::GetSkyBottomBlue()/255.0f; + + d3ddevice->SetPixelShaderConstantF(PSLOC_skyTop, (float*)&skyTop, 1); + d3ddevice->SetPixelShaderConstantF(PSLOC_skyBot, (float*)&skyBot, 1); + + d3ddevice->SetVertexShaderConstantF(VSLOC_viewMat, (float*)&rw::engine->currentCamera->devView, 4); + + d3d::setTexture(1, EnvMapTex); + + InstanceData *inst = header->inst; + for(rw::uint32 i = 0; i < header->numMeshes; i++){ + Material *m = inst->material; + + SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); + + float coef = 0.0f; + if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){ + coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f; + if(gGlassCarsCheat) + coef = 1.0f; + } + d3ddevice->SetPixelShaderConstantF(PSLOC_shininess, (float*)&coef, 1); + + setMaterial(m->color, m->surfaceProps); + + if(m->texture) + d3d::setTexture(0, m->texture); + else + d3d::setTexture(0, gpWhiteTexture); + + drawInst(header, inst); + inst++; + } + + d3d::setTexture(1, nil); +} + static void *neoVehicle_VS; static void *neoVehicle_PS; @@ -83,13 +285,17 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) using namespace rw::d3d9; // TODO: make this less of a kludge - if(VehiclePipeSwitch == VEHICLEPIPE_MATFX){ - matFXGlobals.pipelines[rw::platform]->render(atomic); + if(VehiclePipeSwitch == VEHICLEPIPE_PSP || VehiclePipeSwitch == VEHICLEPIPE_PS2){ + leedsVehicleRenderCB(atomic, header); + // matFXGlobals.pipelines[rw::platform]->render(atomic); + return; + } + if(VehiclePipeSwitch == VEHICLEPIPE_MOBILE){ + leedsVehicleRenderCB_mobile(atomic, header); return; } int vsBits; - rw::uint32 flags = atomic->geometry->flags; setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices(header->indexBuffer); setVertexDeclaration(header->vertexDeclaration); @@ -121,7 +327,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) reflProps[3] = m->surfaceProps.specular == 0.0f ? 0.0f : VehicleSpecularity; d3ddevice->SetVertexShaderConstantF(VSLOC_reflProps, reflProps, 1); - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); if(m->texture) d3d::setTexture(0, m->texture); @@ -141,15 +347,15 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) void CreateVehiclePipe(void) { - if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) - printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); - else{ - char *fp = (char*)work_buff; - fp = ReadTweakValueTable(fp, Fresnel); - fp = ReadTweakValueTable(fp, Power); - fp = ReadTweakValueTable(fp, DiffColor); - fp = ReadTweakValueTable(fp, SpecColor); - } +// if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) +// printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); +// else{ +// char *fp = (char*)work_buff; +// fp = ReadTweakValueTable(fp, Fresnel); +// fp = ReadTweakValueTable(fp, Power); +// fp = ReadTweakValueTable(fp, DiffColor); +// fp = ReadTweakValueTable(fp, SpecColor); +// } #include "shaders/obj/neoVehicle_VS.inc" neoVehicle_VS = rw::d3d::createVertexShader(neoVehicle_VS_cso); @@ -159,6 +365,26 @@ CreateVehiclePipe(void) neoVehicle_PS = rw::d3d::createPixelShader(neoVehicle_PS_cso); assert(neoVehicle_PS); +#include "shaders/obj/leedsDefault_ENV_VS.inc" + leedsVehicle_VS = rw::d3d::createVertexShader(leedsDefault_ENV_VS_cso); + assert(leedsVehicle_VS); + +#include "shaders/obj/leedsVehicle_mobile_VS.inc" + leedsVehicle_mobile_VS = rw::d3d::createVertexShader(leedsVehicle_mobile_VS_cso); + assert(leedsVehicle_mobile_VS); + +#include "shaders/obj/leedsDefault_BLEND_PS.inc" + leedsVehicle_blend_PS = rw::d3d::createPixelShader(leedsDefault_BLEND_PS_cso); + assert(leedsVehicle_blend_PS); + +#include "shaders/obj/leedsDefault_ADD_PS.inc" + leedsVehicle_add_PS = rw::d3d::createPixelShader(leedsDefault_ADD_PS_cso); + assert(leedsVehicle_add_PS); + +#include "shaders/obj/leedsVehicle_mobile_PS.inc" + leedsVehicle_mobile_PS = rw::d3d::createPixelShader(leedsVehicle_mobile_PS_cso); + assert(leedsVehicle_mobile_PS); + rw::d3d9::ObjPipeline *pipe = rw::d3d9::ObjPipeline::create(); pipe->instanceCB = rw::d3d9::defaultInstanceCB; @@ -176,6 +402,15 @@ DestroyVehiclePipe(void) rw::d3d::destroyPixelShader(neoVehicle_PS); neoVehicle_PS = nil; + rw::d3d::destroyVertexShader(leedsVehicle_VS); + leedsVehicle_VS = nil; + + rw::d3d::destroyPixelShader(leedsVehicle_blend_PS); + leedsVehicle_blend_PS = nil; + + rw::d3d::destroyPixelShader(leedsVehicle_add_PS); + leedsVehicle_add_PS = nil; + ((rw::d3d9::ObjPipeline*)vehiclePipe)->destroy(); vehiclePipe = nil; } @@ -183,11 +418,12 @@ DestroyVehiclePipe(void) /* - * Neo World pipe + * Leeds World pipe */ -static void *neoWorld_VS; -static void *neoWorldVC_PS; +static void *leedsBuilding_VS; +static void *leedsBuilding_mobile_VS; +static void *scale_PS; static void worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) @@ -196,79 +432,64 @@ worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) using namespace rw::d3d; using namespace rw::d3d9; - if(!LightmapEnable){ - defaultRenderCB_Shader(atomic, header); - return; - } - - int vsBits; setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices(header->indexBuffer); setVertexDeclaration(header->vertexDeclaration); - vsBits = lightingCB_Shader(atomic); + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + setVertexShader(CustomPipes::leedsBuilding_mobile_VS); + else + setVertexShader(CustomPipes::leedsBuilding_VS); + setPixelShader(scale_PS); + uploadMatrices(atomic->getFrame()->getLTM()); + uploadWorldLights(); - float lightfactor[4]; + float colorscale[4]; + colorscale[3] = 1.0f; InstanceData *inst = header->inst; for(rw::uint32 i = 0; i < header->numMeshes; i++){ Material *m = inst->material; - if(MatFX::getEffects(m) == MatFX::DUAL){ - setVertexShader(neoWorld_VS); - - MatFX *matfx = MatFX::get(m); - Texture *dualtex = matfx->getDualTexture(); - if(dualtex == nil) - goto notex; - d3d::setTexture(1, dualtex); - lightfactor[0] = lightfactor[1] = lightfactor[2] = WorldLightmapBlend.Get()*LightmapMult; - }else{ - notex: - setVertexShader(default_amb_VS); - - d3d::setTexture(1, nil); - lightfactor[0] = lightfactor[1] = lightfactor[2] = 0.0f; - } - lightfactor[3] = m->color.alpha/255.0f; - d3d::setTexture(0, m->texture); - d3ddevice->SetPixelShaderConstantF(1, lightfactor, 1); - - SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); - - RGBA color = { 255, 255, 255, m->color.alpha }; - setMaterial(color, m->surfaceProps); + float cs = 1.0f; + if(WorldPipeSwitch != WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + d3ddevice->SetPixelShaderConstantF(PSLOC_colorscale, colorscale, 1); if(m->texture) d3d::setTexture(0, m->texture); else - d3d::setTexture(0, gpWhiteTexture); - setPixelShader(neoWorldVC_PS); + d3d::setTexture(0, gpWhiteTexture); // actually we don't even render this + + setMaterial(m->color, m->surfaceProps, WorldPipeSwitch == WORLDPIPE_PS2 ? 0.5f : 1.0f); + + SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); drawInst(header, inst); inst++; } - d3d::setTexture(1, nil); } void CreateWorldPipe(void) { - if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) - printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); - else - ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); - -#include "shaders/obj/default_UV2_VS.inc" - neoWorld_VS = rw::d3d::createVertexShader(default_UV2_VS_cso); - assert(neoWorld_VS); - -#include "shaders/obj/neoWorldVC_PS.inc" - neoWorldVC_PS = rw::d3d::createPixelShader(neoWorldVC_PS_cso); - assert(neoWorldVC_PS); - +// if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) +// printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); +// else +// ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); + +#include "shaders/obj/leedsBuilding_VS.inc" + leedsBuilding_VS = rw::d3d::createVertexShader(leedsBuilding_VS_cso); + assert(leedsBuilding_VS); +#include "shaders/obj/leedsBuilding_mobile_VS.inc" + leedsBuilding_mobile_VS = rw::d3d::createVertexShader(leedsBuilding_mobile_VS_cso); + assert(leedsBuilding_mobile_VS); +#include "shaders/obj/scale_PS.inc" + scale_PS = rw::d3d::createPixelShader(scale_PS_cso); + assert(scale_PS); rw::d3d9::ObjPipeline *pipe = rw::d3d9::ObjPipeline::create(); pipe->instanceCB = rw::d3d9::defaultInstanceCB; @@ -280,10 +501,12 @@ CreateWorldPipe(void) void DestroyWorldPipe(void) { - rw::d3d::destroyVertexShader(neoWorld_VS); - neoWorld_VS = nil; - rw::d3d::destroyPixelShader(neoWorldVC_PS); - neoWorldVC_PS = nil; + rw::d3d::destroyVertexShader(leedsBuilding_VS); + leedsBuilding_VS = nil; + rw::d3d::destroyVertexShader(leedsBuilding_mobile_VS); + leedsBuilding_mobile_VS = nil; + rw::d3d::destroyPixelShader(scale_PS); + scale_PS = nil; ((rw::d3d9::ObjPipeline*)worldPipe)->destroy(); @@ -422,7 +645,6 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) } int vsBits; - rw::uint32 flags = atomic->geometry->flags; setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices(header->indexBuffer); setVertexDeclaration(header->vertexDeclaration); @@ -440,7 +662,7 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); if(m->texture){ d3d::setTexture(0, m->texture); @@ -466,7 +688,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) } int vsBits; - rw::uint32 flags = atomic->geometry->flags; + setStreamSource(0, (IDirect3DVertexBuffer9*)header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices((IDirect3DIndexBuffer9*)header->indexBuffer); @@ -487,7 +709,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); if(inst->material->texture){ d3d::setTexture(0, m->texture); @@ -555,12 +777,7 @@ DestroyRimLightPipes(void) } -#endif - #ifdef NEW_RENDERER -#ifndef LIBRW -#error "Need librw for NEW_PIPELINES" -#endif namespace WorldRender { @@ -613,16 +830,20 @@ AtomicFirstPass(RpAtomic *atomic, int pass) assert(building->instHeader->platform == PLATFORM_D3D9); building->fadeAlpha = 255; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); - rw::uint32 flags = atomic->geometry->flags; bool setupDone = false; bool defer = false; SetMatrix(building, atomic->getFrame()->getLTM()); + float colorscale[4]; + InstanceData *inst = building->instHeader->inst; for(rw::uint32 i = 0; i < building->instHeader->numMeshes; i++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; + if(inst->vertexAlpha || m->color.alpha != 255 || IsTextureTransparent(m->texture)){ defer = true; @@ -634,22 +855,29 @@ AtomicFirstPass(RpAtomic *atomic, int pass) setStreamSource(0, building->instHeader->vertexStream[0].vertexBuffer, 0, building->instHeader->vertexStream[0].stride); setIndices(building->instHeader->indexBuffer); setVertexDeclaration(building->instHeader->vertexDeclaration); - setVertexShader(default_amb_VS); - d3ddevice->SetVertexShaderConstantF(VSLOC_combined, (float*)&building->combinedMat, 4); - if(building->lighting) - setAmbient(pAmbient->color); + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + setVertexShader(CustomPipes::leedsBuilding_mobile_VS); else - setAmbient(black); + setVertexShader(CustomPipes::leedsBuilding_VS); + setPixelShader(CustomPipes::scale_PS); + d3ddevice->SetVertexShaderConstantF(VSLOC_combined, (float*)&building->combinedMat, 4); + + CustomPipes::uploadWorldLights(); + + colorscale[3] = 1.0f; + setupDone = true; } - setMaterial(flags, m->color, m->surfaceProps); + float cs = 1.0f; + if(CustomPipes::WorldPipeSwitch != CustomPipes::WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + d3ddevice->SetPixelShaderConstantF(CustomPipes::PSLOC_colorscale, colorscale, 1); - if(m->texture){ - d3d::setTexture(0, m->texture); - setPixelShader(default_tex_PS); - }else - setPixelShader(default_PS); + d3d::setTexture(0, m->texture); + + setMaterial(m->color, m->surfaceProps, CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_PS2 ? 0.5f : 1.0f); drawInst(building->instHeader, inst); } @@ -683,7 +911,16 @@ RenderBlendPass(int pass) using namespace rw::d3d; using namespace rw::d3d9; - setVertexShader(default_amb_VS); + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + setVertexShader(CustomPipes::leedsBuilding_mobile_VS); + else + setVertexShader(CustomPipes::leedsBuilding_VS); + setPixelShader(CustomPipes::scale_PS); + + CustomPipes::uploadWorldLights(); + + float colorscale[4]; + colorscale[3] = 1.0f; int i; for(i = 0; i < numBlendInsts[pass]; i++){ @@ -693,26 +930,26 @@ RenderBlendPass(int pass) setIndices(building->instHeader->indexBuffer); setVertexDeclaration(building->instHeader->vertexDeclaration); d3ddevice->SetVertexShaderConstantF(VSLOC_combined, (float*)&building->combinedMat, 4); - if(building->lighting) - setAmbient(pAmbient->color); - else - setAmbient(black); InstanceData *inst = building->instHeader->inst; for(rw::uint32 j = 0; j < building->instHeader->numMeshes; j++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; if(!inst->vertexAlpha && m->color.alpha == 255 && !IsTextureTransparent(m->texture) && building->fadeAlpha == 255) continue; // already done this one + float cs = 1.0f; + if(CustomPipes::WorldPipeSwitch != CustomPipes::WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + d3ddevice->SetPixelShaderConstantF(CustomPipes::PSLOC_colorscale, colorscale, 1); + + d3d::setTexture(0, m->texture); + rw::RGBA color = m->color; color.alpha = (color.alpha * building->fadeAlpha)/255; - setMaterial(color, m->surfaceProps); // always modulate here - - if(m->texture){ - d3d::setTexture(0, m->texture); - setPixelShader(default_tex_PS); - }else - setPixelShader(default_PS); + setMaterial(color, m->surfaceProps, CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_PS2 ? 0.5f : 1.0f); drawInst(building->instHeader, inst); } @@ -722,3 +959,4 @@ RenderBlendPass(int pass) #endif #endif +#endif diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index d74e40db..e70bd6db 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -1,6 +1,10 @@ #include "common.h" #ifdef RW_OPENGL +#ifdef EXTENDED_PIPELINES + +#include "rpmatfx.h" + #include "main.h" #include "RwHelper.h" #include "Lights.h" @@ -13,8 +17,6 @@ #include "World.h" #include "custompipes.h" -#ifdef EXTENDED_PIPELINES - #ifndef LIBRW #error "Need librw for EXTENDED_PIPELINES" #endif @@ -33,14 +35,211 @@ static int32 u_reflProps; static int32 u_specDir; static int32 u_specColor; +static int32 u_amb; +static int32 u_emiss; +static int32 u_colorscale; + +static int32 u_texMatrix; +static int32 u_fxparams; + +static int32 u_skyTop; +static int32 u_skyBot; + #define U(i) currentShader->uniformLocations[i] /* - * Neo Vehicle pipe + * Leeds & Neo Vehicle pipe */ +rw::gl3::Shader *leedsVehicleShader_add; +rw::gl3::Shader *leedsVehicleShader_blend; +rw::gl3::Shader *leedsVehicleShader_mobile; + rw::gl3::Shader *neoVehicleShader; +static rw::RawMatrix normal2texcoord_flipU = { + { -0.5f, 0.0f, 0.0f }, 0.0f, + { 0.0f, -0.5f, 0.0f }, 0.0f, + { 0.0f, 0.0f, 1.0f }, 0.0f, + { 0.5f, 0.5f, 0.0f }, 1.0f +}; + +static void +uploadEnvMatrix(rw::Frame *frame) +{ + using namespace rw; + using namespace rw::gl3; + + Matrix invMat; + if(frame == nil) + frame = engine->currentCamera->getFrame(); + + // cache the matrix across multiple meshes + static RawMatrix envMtx; +// can't do it, frame matrix may change +// if(frame != lastEnvFrame){ +// lastEnvFrame = frame; + { + + Matrix tmp = *frame->getLTM(); + // Now the weird part: we remove the camera pitch + tmp.at.z = 0.0f; + tmp.at = normalize(tmp.at); + tmp.right.x = -tmp.at.y; + tmp.right.y = tmp.at.x; + tmp.right.z = 0.0f;; + tmp.up.set(0.0f, 0.0f, 1.0f); + tmp.pos.set(0.0f, 0.0f, 0.0f); + tmp.flags = Matrix::TYPEORTHONORMAL; + + RawMatrix invMtx; + Matrix::invert(&invMat, &tmp); + convMatrix(&invMtx, &invMat); + RawMatrix::mult(&envMtx, &invMtx, &normal2texcoord_flipU); + } + glUniformMatrix4fv(U(u_texMatrix), 1, GL_FALSE, (float*)&envMtx); +} + +static void +leedsVehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) +{ + using namespace rw; + using namespace rw::gl3; + + Material *m; + + setWorldMatrix(atomic->getFrame()->getLTM()); + lightingCB(atomic); + + setupVertexInput(header); + + InstanceData *inst = header->inst; + rw::int32 n = header->numMeshes; + + if(gGlassCarsCheat) + leedsVehicleShader_blend->use(); + else + leedsVehicleShader_add->use(); + + setTexture(1, EnvMapTex); + uploadEnvMatrix(nil); + + SetRenderState(SRCBLEND, BLENDONE); + + float colorscale[4]; + colorscale[3] = 1.0f; + + while(n--){ + m = inst->material; + + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); + + float coef = 0.0f; + if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){ + coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f; + if(gGlassCarsCheat) + coef = 1.0f; + } + glUniform1f(U(u_fxparams), coef); + + setMaterial(m->color, m->surfaceProps); + + float cs = 1.0f; + // how does the PS2 handle this actually? probably scaled material color? + if(VehiclePipeSwitch == VEHICLEPIPE_PSP && m->texture) + cs = 2.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + glUniform4fv(U(u_colorscale), 1, colorscale); + + setTexture(0, m->texture); + + drawInst(header, inst); + inst++; + } + + setTexture(1, nil); + + SetRenderState(SRCBLEND, BLENDSRCALPHA); + + teardownVertexInput(header); +} + +void +uploadWorldLights(void) +{ + using namespace rw; + using namespace rw::gl3; + + RGBAf amb, emiss; + amb.red = CTimeCycle::GetAmbientRed(); + amb.green = CTimeCycle::GetAmbientGreen(); + amb.blue = CTimeCycle::GetAmbientBlue(); + amb.alpha = 1.0f; + emiss = pAmbient->color; + + glUniform4fv(U(CustomPipes::u_amb), 1, (float*)&amb); + glUniform4fv(U(CustomPipes::u_emiss), 1, (float*)&emiss); +} + +static void +leedsVehicleRenderCB_mobile(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) +{ + using namespace rw; + using namespace rw::gl3; + + Material *m; + + setWorldMatrix(atomic->getFrame()->getLTM()); + lightingCB(atomic); + + setupVertexInput(header); + + InstanceData *inst = header->inst; + rw::int32 n = header->numMeshes; + + leedsVehicleShader_mobile->use(); + + uploadWorldLights(); + + RGBAf skyTop, skyBot; + skyTop.red = CTimeCycle::GetSkyTopRed()/255.0f; + skyTop.green = CTimeCycle::GetSkyTopGreen()/255.0f; + skyTop.blue = CTimeCycle::GetSkyTopBlue()/255.0f; + skyBot.red = CTimeCycle::GetSkyBottomRed()/255.0f; + skyBot.green = CTimeCycle::GetSkyBottomGreen()/255.0f; + skyBot.blue = CTimeCycle::GetSkyBottomBlue()/255.0f; + + glUniform3fv(U(u_skyTop), 1, (float*)&skyTop); + glUniform3fv(U(u_skyBot), 1, (float*)&skyBot); + + setTexture(1, EnvMapTex); + + while(n--){ + m = inst->material; + + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); + + float coef = 0.0f; + if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){ + coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f; + if(gGlassCarsCheat) + coef = 1.0f; + } + glUniform1f(U(u_fxparams), coef); + + setMaterial(m->color, m->surfaceProps); + + setTexture(0, m->texture); + + drawInst(header, inst); + inst++; + } + + setTexture(1, nil); + + teardownVertexInput(header); +} + static void uploadSpecLights(void) { @@ -80,14 +279,18 @@ vehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) using namespace rw::gl3; // TODO: make this less of a kludge - if(VehiclePipeSwitch == VEHICLEPIPE_MATFX){ - matFXGlobals.pipelines[rw::platform]->render(atomic); + if(VehiclePipeSwitch == VEHICLEPIPE_PSP || VehiclePipeSwitch == VEHICLEPIPE_PS2){ + leedsVehicleRenderCB(atomic, header); +// matFXGlobals.pipelines[rw::platform]->render(atomic); + return; + } + if(VehiclePipeSwitch == VEHICLEPIPE_MOBILE){ + leedsVehicleRenderCB_mobile(atomic, header); return; } Material *m; - rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); @@ -114,7 +317,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); setTexture(0, m->texture); @@ -141,15 +344,15 @@ CreateVehiclePipe(void) using namespace rw; using namespace rw::gl3; - if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) - printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); - else{ - char *fp = (char*)work_buff; - fp = ReadTweakValueTable(fp, Fresnel); - fp = ReadTweakValueTable(fp, Power); - fp = ReadTweakValueTable(fp, DiffColor); - fp = ReadTweakValueTable(fp, SpecColor); - } +// if(CFileMgr::LoadFile("neo/carTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) +// printf("Error: couldn't open 'neo/carTweakingTable.dat'\n"); +// else{ +// char *fp = (char*)work_buff; +// fp = ReadTweakValueTable(fp, Fresnel); +// fp = ReadTweakValueTable(fp, Power); +// fp = ReadTweakValueTable(fp, DiffColor); +// fp = ReadTweakValueTable(fp, SpecColor); +// } { @@ -161,6 +364,27 @@ CreateVehiclePipe(void) assert(neoVehicleShader); } + { +#include "shaders/obj/leedsDefault_vert.inc" +#include "shaders/obj/leedsDefault_frag.inc" + const char *vs[] = { shaderDecl, header_vert_src, "#define ENVMAP\n", leedsDefault_vert_src, nil }; + const char *fs_add[] = { shaderDecl, header_frag_src, "#define PASS_ADD\n", leedsDefault_frag_src, nil }; + const char *fs_blend[] = { shaderDecl, header_frag_src, "#define PASS_BLEND\n", leedsDefault_frag_src, nil }; + leedsVehicleShader_add = Shader::create(vs, fs_add); + assert(leedsVehicleShader_add); + leedsVehicleShader_blend = Shader::create(vs, fs_blend); + assert(leedsVehicleShader_blend); + } + + { +#include "shaders/obj/leedsVehicle_mobile_frag.inc" +#include "shaders/obj/leedsVehicle_mobile_vert.inc" + const char *vs[] = { shaderDecl, header_vert_src, leedsVehicle_mobile_vert_src, nil }; + const char *fs[] = { shaderDecl, header_frag_src, leedsVehicle_mobile_frag_src, nil }; + leedsVehicleShader_mobile = Shader::create(vs, fs); + assert(leedsVehicleShader_mobile); + } + rw::gl3::ObjPipeline *pipe = rw::gl3::ObjPipeline::create(); pipe->instanceCB = rw::gl3::defaultInstanceCB; @@ -175,6 +399,15 @@ DestroyVehiclePipe(void) neoVehicleShader->destroy(); neoVehicleShader = nil; + leedsVehicleShader_add->destroy(); + leedsVehicleShader_add = nil; + + leedsVehicleShader_blend->destroy(); + leedsVehicleShader_blend = nil; + + leedsVehicleShader_mobile->destroy(); + leedsVehicleShader_mobile = nil; + ((rw::gl3::ObjPipeline*)vehiclePipe)->destroy(); vehiclePipe = nil; } @@ -182,10 +415,11 @@ DestroyVehiclePipe(void) /* - * Neo World pipe + * Leeds World pipe */ -rw::gl3::Shader *neoWorldShader; +rw::gl3::Shader *leedsWorldShader; +rw::gl3::Shader *leedsWorldShader_mobile; static void worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) @@ -193,54 +427,43 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) using namespace rw; using namespace rw::gl3; - if(!LightmapEnable){ - gl3::defaultRenderCB(atomic, header); - return; - } - Material *m; setWorldMatrix(atomic->getFrame()->getLTM()); - lightingCB(atomic); setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; - neoWorldShader->use(); + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + CustomPipes::leedsWorldShader_mobile->use(); + else + CustomPipes::leedsWorldShader->use(); + + uploadWorldLights(); - float lightfactor[4]; + float colorscale[4]; + colorscale[3] = 1.0f; while(n--){ m = inst->material; - if(MatFX::getEffects(m) == MatFX::DUAL){ - MatFX *matfx = MatFX::get(m); - Texture *dualtex = matfx->getDualTexture(); - if(dualtex == nil) - goto notex; - setTexture(1, dualtex); - lightfactor[0] = lightfactor[1] = lightfactor[2] = WorldLightmapBlend.Get()*LightmapMult; - }else{ - notex: - setTexture(1, nil); - lightfactor[0] = lightfactor[1] = lightfactor[2] = 0.0f; - } - lightfactor[3] = m->color.alpha/255.0f; - glUniform4fv(U(u_lightMap), 1, lightfactor); - - RGBA color = { 255, 255, 255, m->color.alpha }; - setMaterial(color, m->surfaceProps); + float cs = 1.0f; + if(WorldPipeSwitch != WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + glUniform4fv(U(u_colorscale), 1, colorscale); setTexture(0, m->texture); + setMaterial(m->color, m->surfaceProps, CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_PS2 ? 0.5f : 1.0f); + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); drawInst(header, inst); inst++; } - setTexture(1, nil); teardownVertexInput(header); } @@ -250,18 +473,22 @@ CreateWorldPipe(void) using namespace rw; using namespace rw::gl3; - if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) - printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); - else - ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); +// if(CFileMgr::LoadFile("neo/worldTweakingTable.dat", work_buff, sizeof(work_buff), "r") <= 0) +// printf("Error: couldn't open 'neo/worldTweakingTable.dat'\n"); +// else +// ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); { -#include "shaders/obj/neoWorldVC_frag.inc" -#include "shaders/obj/default_UV2_vert.inc" - const char *vs[] = { shaderDecl, header_vert_src, default_UV2_vert_src, nil }; - const char *fs[] = { shaderDecl, header_frag_src, neoWorldVC_frag_src, nil }; - neoWorldShader = Shader::create(vs, fs); - assert(neoWorldShader); +#include "shaders/obj/scale_frag.inc" +#include "shaders/obj/leedsBuilding_vert.inc" +#include "shaders/obj/leedsBuilding_mobile_vert.inc" + const char *vs[] = { shaderDecl, header_vert_src, leedsBuilding_vert_src, nil }; + const char *vs_mobile[] = { shaderDecl, header_vert_src, leedsBuilding_mobile_vert_src, nil }; + const char *fs[] = { shaderDecl, header_frag_src, scale_frag_src, nil }; + leedsWorldShader = Shader::create(vs, fs); + assert(leedsWorldShader); + leedsWorldShader_mobile = Shader::create(vs_mobile, fs); + assert(leedsWorldShader_mobile); } @@ -275,8 +502,10 @@ CreateWorldPipe(void) void DestroyWorldPipe(void) { - neoWorldShader->destroy(); - neoWorldShader = nil; + leedsWorldShader->destroy(); + leedsWorldShader = nil; + leedsWorldShader_mobile->destroy(); + leedsWorldShader_mobile = nil; ((rw::gl3::ObjPipeline*)worldPipe)->destroy(); worldPipe = nil; @@ -312,12 +541,7 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) V3d eyePos = rw::engine->currentCamera->getFrame()->getLTM()->pos; glUniform3fv(U(u_eye), 1, (float*)&eyePos); - float reflProps[4]; - reflProps[0] = GlossMult; - reflProps[1] = 0.0f; - reflProps[2] = 0.0f; - reflProps[3] = 0.0f; - glUniform4fv(U(u_reflProps), 1, reflProps); + glUniform4fv(U(u_reflProps), 1, (float*)&GlossMult); SetRenderState(VERTEXALPHA, TRUE); SetRenderState(SRCBLEND, BLENDONE); @@ -426,7 +650,6 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; - rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); @@ -444,7 +667,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); setTexture(0, m->texture); @@ -469,7 +692,6 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; - rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); @@ -485,7 +707,7 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps); setTexture(0, m->texture); @@ -577,17 +799,22 @@ CustomPipeRegisterGL(void) u_reflProps = rw::gl3::registerUniform("u_reflProps"); u_specDir = rw::gl3::registerUniform("u_specDir"); u_specColor = rw::gl3::registerUniform("u_specColor"); -} + u_amb = rw::gl3::registerUniform("u_amb"); + u_emiss = rw::gl3::registerUniform("u_emiss"); + u_colorscale = rw::gl3::registerUniform("u_colorscale"); + + u_texMatrix = rw::gl3::registerUniform("u_texMatrix"); + u_fxparams = rw::gl3::registerUniform("u_fxparams"); + u_skyTop = rw::gl3::registerUniform("u_skyTop"); + u_skyBot = rw::gl3::registerUniform("u_skyBot"); } -#endif + +} #ifdef NEW_RENDERER -#ifndef LIBRW -#error "Need librw for NEW_PIPELINES" -#endif namespace WorldRender { @@ -628,25 +855,20 @@ AtomicFirstPass(RpAtomic *atomic, int pass) assert(building->instHeader->platform == PLATFORM_GL3); building->fadeAlpha = 255; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); - rw::uint32 flags = atomic->geometry->flags; - - WorldLights lights; - lights.numAmbients = 1; - lights.numDirectionals = 0; - lights.numLocals = 0; - if(building->lighting) - lights.ambient = pAmbient->color; - else - lights.ambient = black; bool setupDone = false; bool defer = false; building->matrix = *atomic->getFrame()->getLTM(); + float colorscale[4]; + InstanceData *inst = building->instHeader->inst; for(rw::uint32 i = 0; i < building->instHeader->numMeshes; i++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; + if(inst->vertexAlpha || m->color.alpha != 255 || IsTextureTransparent(m->texture)){ defer = true; @@ -655,14 +877,27 @@ AtomicFirstPass(RpAtomic *atomic, int pass) // alright we're rendering this atomic if(!setupDone){ - defaultShader->use(); + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + CustomPipes::leedsWorldShader_mobile->use(); + else + CustomPipes::leedsWorldShader->use(); setWorldMatrix(&building->matrix); setupVertexInput(building->instHeader); - setLights(&lights); + + CustomPipes::uploadWorldLights(); + + colorscale[3] = 1.0f; + setupDone = true; } - setMaterial(flags, m->color, m->surfaceProps); + setMaterial(m->color, m->surfaceProps, CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_PS2 ? 0.5f : 1.0f); + + float cs = 1.0f; + if(CustomPipes::WorldPipeSwitch != CustomPipes::WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + glUniform4fv(U(CustomPipes::u_colorscale), 1, colorscale); setTexture(0, m->texture); @@ -697,11 +932,15 @@ RenderBlendPass(int pass) using namespace rw; using namespace rw::gl3; - defaultShader->use(); - WorldLights lights; - lights.numAmbients = 1; - lights.numDirectionals = 0; - lights.numLocals = 0; + if(CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_MOBILE) + CustomPipes::leedsWorldShader_mobile->use(); + else + CustomPipes::leedsWorldShader->use(); + + CustomPipes::uploadWorldLights(); + + float colorscale[4]; + colorscale[3] = 1.0f; int i; for(i = 0; i < numBlendInsts[pass]; i++){ @@ -709,21 +948,24 @@ RenderBlendPass(int pass) setupVertexInput(building->instHeader); setWorldMatrix(&building->matrix); - if(building->lighting) - lights.ambient = pAmbient->color; - else - lights.ambient = black; - setLights(&lights); InstanceData *inst = building->instHeader->inst; for(rw::uint32 j = 0; j < building->instHeader->numMeshes; j++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; if(!inst->vertexAlpha && m->color.alpha == 255 && !IsTextureTransparent(m->texture) && building->fadeAlpha == 255) continue; // already done this one rw::RGBA color = m->color; color.alpha = (color.alpha * building->fadeAlpha)/255; - setMaterial(color, m->surfaceProps); // always modulate here + setMaterial(color, m->surfaceProps, CustomPipes::WorldPipeSwitch == CustomPipes::WORLDPIPE_PS2 ? 0.5f : 1.0f); + + float cs = 1.0f; + if(CustomPipes::WorldPipeSwitch != CustomPipes::WORLDPIPE_MOBILE && m->texture) + cs = 255/128.0f; + colorscale[0] = colorscale[1] = colorscale[2] = cs; + glUniform4fv(U(CustomPipes::u_colorscale), 1, colorscale); setTexture(0, m->texture); @@ -736,3 +978,4 @@ RenderBlendPass(int pass) #endif #endif +#endif diff --git a/src/extras/postfx.cpp b/src/extras/postfx.cpp index ee6c3964..84c1d059 100644 --- a/src/extras/postfx.cpp +++ b/src/extras/postfx.cpp @@ -16,23 +16,25 @@ RwRaster *CPostFX::pFrontBuffer; RwRaster *CPostFX::pBackBuffer; bool CPostFX::bJustInitialised; -int CPostFX::EffectSwitch = POSTFX_NORMAL; +int CPostFX::EffectSwitch = POSTFX_PS2; bool CPostFX::BlurOn = false; bool CPostFX::MotionBlurOn = false; static RwIm2DVertex Vertex[4]; static RwIm2DVertex Vertex2[4]; static RwImVertexIndex Index[6] = { 0, 1, 2, 0, 2, 3 }; +static RwIm2DVertex BlurVertex[12]; +static RwImVertexIndex BlurIndex[18] = { 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11 }; #ifdef RW_D3D9 -void *colourfilterVC_PS; +void *colourfilterLCS_PS; void *contrast_PS; #endif #ifdef RW_OPENGL int32 u_blurcolor; int32 u_contrastAdd; int32 u_contrastMult; -rw::gl3::Shader *colourFilterVC; +rw::gl3::Shader *colourFilterLCS; rw::gl3::Shader *contrast; #endif @@ -146,8 +148,8 @@ CPostFX::Open(RwCamera *cam) #ifdef RW_D3D9 -#include "shaders/obj/colourfilterVC_PS.inc" - colourfilterVC_PS = rw::d3d::createPixelShader(colourfilterVC_PS_cso); +#include "shaders/obj/colourfilterLCS_PS.inc" + colourfilterLCS_PS = rw::d3d::createPixelShader(colourfilterLCS_PS_cso); #include "shaders/obj/contrastPS.inc" contrast_PS = rw::d3d::createPixelShader(contrastPS_cso); #endif @@ -156,11 +158,11 @@ CPostFX::Open(RwCamera *cam) { #include "shaders/obj/im2d_vert.inc" -#include "shaders/obj/colourfilterVC_frag.inc" +#include "shaders/obj/colourfilterLCS_frag.inc" const char *vs[] = { shaderDecl, header_vert_src, im2d_vert_src, nil }; - const char *fs[] = { shaderDecl, header_frag_src, colourfilterVC_frag_src, nil }; - colourFilterVC = Shader::create(vs, fs); - assert(colourFilterVC); + const char *fs[] = { shaderDecl, header_frag_src, colourfilterLCS_frag_src, nil }; + colourFilterLCS = Shader::create(vs, fs); + assert(colourFilterLCS); } { @@ -187,9 +189,9 @@ CPostFX::Close(void) pBackBuffer = nil; } #ifdef RW_D3D9 - if(colourfilterVC_PS){ - rw::d3d::destroyPixelShader(colourfilterVC_PS); - colourfilterVC_PS = nil; + if(colourfilterLCS_PS){ + rw::d3d::destroyPixelShader(colourfilterLCS_PS); + colourfilterLCS_PS = nil; } if(contrast_PS){ rw::d3d::destroyPixelShader(contrast_PS); @@ -197,9 +199,9 @@ CPostFX::Close(void) } #endif #ifdef RW_OPENGL - if(colourFilterVC){ - colourFilterVC->destroy(); - colourFilterVC = nil; + if(colourFilterLCS){ + colourFilterLCS->destroy(); + colourFilterLCS = nil; } if(contrast){ contrast->destroy(); @@ -208,9 +210,44 @@ CPostFX::Close(void) #endif } +static float blurOffset = 0.6f;//3.0f/16.0f; // not quite sure sure about this +static float blurIntensity = 0.25f; + void CPostFX::RenderOverlayBlur(RwCamera *cam, int32 r, int32 g, int32 b, int32 a) { + memcpy(BlurVertex, Vertex, sizeof(Vertex)); + memcpy(BlurVertex+4, Vertex, sizeof(Vertex)); + memcpy(BlurVertex+8, Vertex, sizeof(Vertex)); + int intensity = 255*blurIntensity; + int i; + for(i = 0; i < 4; i++){ + RwIm2DVertexSetScreenX(&BlurVertex[i], RwIm2DVertexGetScreenX(&BlurVertex[i]) + blurOffset); + RwIm2DVertexSetIntRGBA(&BlurVertex[i], 255, 255, 255, intensity); + } + for(i = 4; i < 8; i++){ + RwIm2DVertexSetScreenX(&BlurVertex[i], RwIm2DVertexGetScreenX(&BlurVertex[i]) + blurOffset); + RwIm2DVertexSetScreenY(&BlurVertex[i], RwIm2DVertexGetScreenY(&BlurVertex[i]) + blurOffset); + RwIm2DVertexSetIntRGBA(&BlurVertex[i], 255, 255, 255, intensity); + } + for(i = 8; i < 12; i++){ + RwIm2DVertexSetScreenY(&BlurVertex[i], RwIm2DVertexGetScreenY(&BlurVertex[i]) + blurOffset); + RwIm2DVertexSetIntRGBA(&BlurVertex[i], 255, 255, 255, intensity); + } + + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, pBackBuffer); + RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); + + RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, BlurVertex, 12, BlurIndex, 18); + + // this sucks: should render colourfilter with blending instead + // but can't change equation to subtraction for PSP here + GetBackBuffer(cam); + +/* the old way RwRenderStateSet(rwRENDERSTATETEXTURERASTER, pFrontBuffer); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); @@ -243,6 +280,7 @@ CPostFX::RenderOverlayBlur(RwCamera *cam, int32 r, int32 g, int32 b, int32 a) RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, Vertex, 4, Index, 6); RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, BlurOn ? Vertex2 : Vertex, 4, Index, 6); +*/ } void @@ -294,15 +332,15 @@ CPostFX::RenderOverlayShader(RwCamera *cam, int32 r, int32 g, int32 b, int32 a) blurcolors[0] = r*f/255.0f; blurcolors[1] = g*f/255.0f; blurcolors[2] = b*f/255.0f; - blurcolors[3] = 30/255.0f; + blurcolors[3] = EffectSwitch == POSTFX_PSP ? -1.0f : 1.0f; #ifdef RW_D3D9 rw::d3d::d3ddevice->SetPixelShaderConstantF(10, blurcolors, 1); - rw::d3d::im2dOverridePS = colourfilterVC_PS; + rw::d3d::im2dOverridePS = colourfilterLCS_PS; #endif #ifdef RW_OPENGL - rw::gl3::im2dOverrideShader = colourFilterVC; - colourFilterVC->use(); - glUniform4fv(colourFilterVC->uniformLocations[u_blurcolor], 1, blurcolors); + rw::gl3::im2dOverrideShader = colourFilterLCS; + colourFilterLCS->use(); + glUniform4fv(colourFilterLCS->uniformLocations[u_blurcolor], 1, blurcolors); #endif } RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, Vertex, 4, Index, 6); @@ -342,11 +380,8 @@ CPostFX::NeedBackBuffer(void) case POSTFX_SIMPLE: // no actual rendering here return false; - case POSTFX_NORMAL: - if(MotionBlurOn) - return false; - else - return true; + case POSTFX_PSP: + case POSTFX_PS2: case POSTFX_MOBILE: return true; } @@ -357,24 +392,11 @@ bool CPostFX::NeedFrontBuffer(int32 type) { // Last frame -- needed for motion blur - if(CMBlur::Drunkness > 0.0f) + if(MotionBlurOn) return true; if(type == MOTION_BLUR_SNIPER) return true; - switch(EffectSwitch){ - case POSTFX_OFF: - case POSTFX_SIMPLE: - // no actual rendering here - return false; - case POSTFX_NORMAL: - if(MotionBlurOn) - return true; - else - return false; - case POSTFX_MOBILE: - return false; - } return false; } @@ -391,11 +413,17 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu { PUSH_RENDERGROUP("CPostFX::Render"); + // LCS PS2 blur is drawn in three passes: + // blend frame with current frame 3 times to blur a bit + // blend one more time with colour filter + // motion blur like normal + if(pFrontBuffer == nil) Open(cam); assert(pFrontBuffer); assert(pBackBuffer); +/* // LCS: don't need that anymore if(type == MOTION_BLUR_LIGHT_SCENE){ SmoothColor(red, green, blue, blur); red = AvgRed; @@ -403,6 +431,7 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu blue = AvgBlue; blur = AvgAlpha; } +*/ if(NeedBackBuffer()) GetBackBuffer(cam); @@ -410,10 +439,15 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu DefinedState(); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); - RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); + if(BlurOn) + RenderOverlayBlur(cam, 0, 0, 0, 0); + + RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST); + + // TODO(LCS): check this out if(type == MOTION_BLUR_SNIPER){ if(!bJustInitialised) RenderOverlaySniper(cam, red, green, blue, blur); @@ -422,21 +456,16 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu case POSTFX_SIMPLE: // no actual rendering here break; - case POSTFX_NORMAL: - if(MotionBlurOn){ - if(!bJustInitialised) - RenderOverlayBlur(cam, red, green, blue, blur); - }else{ - RenderOverlayShader(cam, red, green, blue, blur); - } - break; + case POSTFX_PSP: + case POSTFX_PS2: case POSTFX_MOBILE: RenderOverlayShader(cam, red, green, blue, blur); break; } - if(!bJustInitialised) - RenderMotionBlur(cam, 175.0f * CMBlur::Drunkness); + if(MotionBlurOn) + if(!bJustInitialised) + RenderMotionBlur(cam, bluralpha); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); diff --git a/src/extras/postfx.h b/src/extras/postfx.h index db702bf3..232c151b 100644 --- a/src/extras/postfx.h +++ b/src/extras/postfx.h @@ -7,9 +7,12 @@ class CPostFX public: enum { POSTFX_OFF, - POSTFX_SIMPLE, - POSTFX_NORMAL, - POSTFX_MOBILE + POSTFX_PSP, + POSTFX_PS2, + + // not so sensible for the moment + POSTFX_SIMPLE = -1, + POSTFX_MOBILE = -2 }; static RwRaster *pFrontBuffer; static RwRaster *pBackBuffer; diff --git a/src/extras/shaders/colourfilterLCS.frag b/src/extras/shaders/colourfilterLCS.frag new file mode 100644 index 00000000..272ebb03 --- /dev/null +++ b/src/extras/shaders/colourfilterLCS.frag @@ -0,0 +1,20 @@ +uniform sampler2D tex0; +uniform vec4 u_blurcolor; + +FSIN vec4 v_color; +FSIN vec2 v_tex0; +FSIN float v_fog; + +void +main(void) +{ + vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); + dst += dst*u_blurcolor; + + vec4 color; + color.rgb = dst.rgb; + color.a = 1.0; + + FRAGCOLOR(color); +} + diff --git a/src/extras/shaders/colourfilterLCS_PS.hlsl b/src/extras/shaders/colourfilterLCS_PS.hlsl new file mode 100644 index 00000000..df1beefc --- /dev/null +++ b/src/extras/shaders/colourfilterLCS_PS.hlsl @@ -0,0 +1,10 @@ +sampler2D tex : register(s0); +float4 blurcol : register(c10); + +float4 main(in float2 texcoord : TEXCOORD0) : COLOR0 +{ + float4 dst = tex2D(tex, texcoord.xy); + dst += dst*blurcol*blurcol.a; + dst.a = 1.0; + return dst; +} diff --git a/src/extras/shaders/colourfilterVC.frag b/src/extras/shaders/colourfilterVC.frag deleted file mode 100644 index 283aa817..00000000 --- a/src/extras/shaders/colourfilterVC.frag +++ /dev/null @@ -1,27 +0,0 @@ -uniform sampler2D tex0; -uniform vec4 u_blurcolor; - -FSIN vec4 v_color; -FSIN vec2 v_tex0; -FSIN float v_fog; - -void -main(void) -{ - float a = u_blurcolor.a; - vec4 doublec = clamp(u_blurcolor*2.0, 0.0, 1.0); - vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); - vec4 prev = dst; - for(int i = 0; i < 5; i++){ - vec4 tmp = dst*(1.0-a) + prev*doublec*a; - tmp += prev*u_blurcolor; - tmp += prev*u_blurcolor; - prev = clamp(tmp, 0.0, 1.0); - } - vec4 color; - color.rgb = prev.rgb; - color.a = 1.0; - - FRAGCOLOR(color); -} - diff --git a/src/extras/shaders/colourfilterVC_PS.hlsl b/src/extras/shaders/colourfilterVC_PS.hlsl deleted file mode 100644 index 90d3b50c..00000000 --- a/src/extras/shaders/colourfilterVC_PS.hlsl +++ /dev/null @@ -1,23 +0,0 @@ -sampler2D tex : register(s0); -float4 blurcol : register(c10); - -//float4 blurcols[10] : register(c15); - - -float4 main(in float2 texcoord : TEXCOORD0) : COLOR0 -{ - float a = blurcol.a; - - float4 doublec = saturate(blurcol*2); - float4 dst = tex2D(tex, texcoord.xy); - float4 prev = dst; - for(int i = 0; i < 5; i++){ -// float4 doublec = saturate(blurcol*2); - float4 tmp = dst*(1-a) + prev*doublec*a; - tmp += prev*blurcol; - tmp += prev*blurcol; - prev = saturate(tmp); - } - prev.a = 1.0; - return prev; -} diff --git a/src/extras/shaders/leedsBuilding.vert b/src/extras/shaders/leedsBuilding.vert new file mode 100644 index 00000000..766cd081 --- /dev/null +++ b/src/extras/shaders/leedsBuilding.vert @@ -0,0 +1,28 @@ +uniform vec4 u_amb; +uniform vec4 u_emiss; + +#define surfEmissive (u_surfProps.w) + +VSIN(ATTRIB_POS) vec3 in_pos; + +VSOUT vec4 v_color; +VSOUT vec2 v_tex0; +VSOUT float v_fog; + +void +main(void) +{ + vec4 Vertex = u_world * vec4(in_pos, 1.0); + gl_Position = u_proj * u_view * Vertex; + vec3 Normal = mat3(u_world) * in_normal; + + v_tex0 = in_tex0; + + v_color = in_color; + v_color.rgb *= u_amb.rgb; + v_color.rgb += u_emiss.rgb*surfEmissive; + v_color = clamp(v_color, 0.0, 1.0); + v_color.a *= u_matColor.a; + + v_fog = DoFog(gl_Position.w); +} diff --git a/src/extras/shaders/leedsBuilding_VS.hlsl b/src/extras/shaders/leedsBuilding_VS.hlsl new file mode 100644 index 00000000..1ed939cc --- /dev/null +++ b/src/extras/shaders/leedsBuilding_VS.hlsl @@ -0,0 +1,43 @@ +#include "standardConstants.h" + +#define surfEmissive (surfProps.w) + +float4 emissive : register(c41); +float4 ambient : register(c42); + +struct VS_in +{ + float4 Position : POSITION; + float3 Normal : NORMAL; + float2 TexCoord : TEXCOORD0; + float4 Prelight : COLOR0; +}; + +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; // also fog + float4 Color : COLOR0; +}; + + +VS_out main(in VS_in input) +{ + VS_out output; + + output.Position = mul(combinedMat, input.Position); + float3 Vertex = mul(worldMat, input.Position).xyz; + float3 Normal = mul(normalMat, input.Normal); + + output.TexCoord0.xy = input.TexCoord; + + output.Color = input.Prelight; + output.Color.rgb *= ambient.rgb; + output.Color.rgb += emissive.rgb*surfEmissive; + + output.Color = clamp(output.Color, 0.0, 1.0); + output.Color.a *= matCol.a; + + output.TexCoord0.z = clamp((output.Position.w - fogEnd)*fogRange, fogDisable, 1.0); + + return output; +} diff --git a/src/extras/shaders/leedsBuilding_mobile.vert b/src/extras/shaders/leedsBuilding_mobile.vert new file mode 100644 index 00000000..f06628ee --- /dev/null +++ b/src/extras/shaders/leedsBuilding_mobile.vert @@ -0,0 +1,52 @@ +uniform vec4 u_amb; +uniform vec4 u_emiss; + +#define surfEmissive (u_surfProps.w) + +#define vertContrast (1.5) +#define vertBrightness (0.25) +#define ambientContrast (1.2) +#define ambientBrightness (0.1) +#define emissiveContrast (1.25) +#define emissiveBrightness (0.05) + + +VSIN(ATTRIB_POS) vec3 in_pos; + +VSOUT vec4 v_color; +VSOUT vec2 v_tex0; +VSOUT float v_fog; + +void +main(void) +{ + vec4 Vertex = u_world * vec4(in_pos, 1.0); + gl_Position = u_proj * u_view * Vertex; + vec3 Normal = mat3(u_world) * in_normal; + + v_tex0 = in_tex0; + + vec4 vertCol = in_color; + vec4 amb = u_amb; + vec4 emiss = u_emiss; + + vertCol.xyz = ((vertCol.xyz - 0.5) * max(vertContrast, 0.0)) + 0.5; + vertCol.xyz += vertBrightness; + vertCol.xyz = max(vertCol.xyz, vec3(0.0,0.0,0.0)); + + amb.xyz = ((amb.xyz - 0.5) * max(ambientContrast, 0.0)) + 0.5; + amb.xyz += ambientBrightness; + amb.xyz = max(amb.xyz, vec3(0.0,0.0,0.0)); + + emiss.xyz = ((emiss.xyz - 0.5) * max(emissiveContrast, 0.0)) + 0.5; + emiss.xyz += emissiveBrightness; + emiss.xyz = max(emiss.xyz, vec3(0.0,0.0,0.0)); + v_color.xyz = emiss.xyz + (vertCol.xyz * amb.xyz); + v_color.w = vertCol.w; + + + v_color = clamp(v_color, 0.0, 1.0); + v_color.a *= u_matColor.a; + + v_fog = DoFog(gl_Position.w); +} diff --git a/src/extras/shaders/leedsBuilding_mobile_VS.hlsl b/src/extras/shaders/leedsBuilding_mobile_VS.hlsl new file mode 100644 index 00000000..23accf64 --- /dev/null +++ b/src/extras/shaders/leedsBuilding_mobile_VS.hlsl @@ -0,0 +1,64 @@ +#include "standardConstants.h" + +#define surfEmissive (surfProps.w) + +#define vertContrast (1.5) +#define vertBrightness (0.25) +#define ambientContrast (1.2) +#define ambientBrightness (0.1) +#define emissiveContrast (1.25) +#define emissiveBrightness (0.05) + +float4 emissive : register(c41); +float4 ambient : register(c42); + +struct VS_in +{ + float4 Position : POSITION; + float3 Normal : NORMAL; + float2 TexCoord : TEXCOORD0; + float4 Prelight : COLOR0; +}; + +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; // also fog + float4 Color : COLOR0; +}; + + +VS_out main(in VS_in input) +{ + VS_out output; + + output.Position = mul(combinedMat, input.Position); + float3 Vertex = mul(worldMat, input.Position).xyz; + float3 Normal = mul(normalMat, input.Normal); + + output.TexCoord0.xy = input.TexCoord; + + float4 vertCol = input.Prelight; + float4 amb = ambient; + float4 emiss = emissive; + + vertCol.xyz = ((vertCol.xyz - 0.5) * max(vertContrast, 0.0)) + 0.5; + vertCol.xyz += vertBrightness; + vertCol.xyz = max(vertCol.xyz, float3(0.0,0.0,0.0)); + + amb.xyz = ((amb.xyz - 0.5) * max(ambientContrast, 0.0)) + 0.5; + amb.xyz += ambientBrightness; + amb.xyz = max(amb.xyz, float3(0.0,0.0,0.0)); + + emiss.xyz = ((emiss.xyz - 0.5) * max(emissiveContrast, 0.0)) + 0.5; + emiss.xyz += emissiveBrightness; + emiss.xyz = max(emiss.xyz, float3(0.0,0.0,0.0)); + output.Color.xyz = emiss.xyz + (vertCol.xyz * amb.xyz); + output.Color.w = vertCol.w; + + output.Color = clamp(output.Color, 0.0, 1.0); + output.Color.a *= matCol.a; + + output.TexCoord0.z = clamp((output.Position.w - fogEnd)*fogRange, fogDisable, 1.0); + + return output; +} diff --git a/src/extras/shaders/leedsDefault.frag b/src/extras/shaders/leedsDefault.frag new file mode 100644 index 00000000..3955e6a5 --- /dev/null +++ b/src/extras/shaders/leedsDefault.frag @@ -0,0 +1,48 @@ +uniform sampler2D tex0; +uniform sampler2D tex1; + +uniform float u_fxparams; +uniform vec4 u_colorscale; + +#define shininess (u_fxparams) + +FSIN vec4 v_color; +FSIN vec2 v_tex0; +#if defined(PASS_BLEND) || defined(PASS_ADD) +FSIN vec2 v_tex1; +#endif +FSIN float v_fog; + +void +main(void) +{ + vec4 pass1 = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale; + pass1.rgb = clamp(pass1.rgb, 0.0, 1.0); + pass1.rgb = mix(u_fogColor.rgb, pass1.rgb, v_fog); + + vec4 color; +#if defined(PASS_BLEND) || defined(PASS_ADD) + vec4 pass2 = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y)); + pass2.a *= shininess; + pass2.rgb = mix(vec3(0.0, 0.0, 0.0), pass2.rgb, v_fog); + + // We simulate drawing this in two passes. +#if defined(PASS_ADD) + // First pass with standard blending, second with addition + // We premultiply alpha so render state should be one. + color.rgb = pass1.rgb*pass1.a + pass2.rgb*pass2.a; + color.a = pass1.a; +#elif defined(PASS_BLEND) + // We premultiply alpha so render state should be one. + color.rgb = pass1.rgb*pass1.a*(1.0-pass2.a) + pass2.rgb*pass2.a; + color.a = pass1.a*(1.0-pass2.a) + pass2.a; +#endif + +#else + color = pass1; +#endif + + DoAlphaTest(color.a); + + FRAGCOLOR(color); +} diff --git a/src/extras/shaders/leedsDefault.vert b/src/extras/shaders/leedsDefault.vert new file mode 100644 index 00000000..9cb18a66 --- /dev/null +++ b/src/extras/shaders/leedsDefault.vert @@ -0,0 +1,51 @@ +#ifdef ENVMAP +uniform mat4 u_texMatrix; +#endif +#ifdef SKIN +uniform mat4 u_boneMatrices[64]; +#endif + +VSIN(ATTRIB_POS) vec3 in_pos; + +VSOUT vec4 v_color; +VSOUT vec2 v_tex0; +#ifdef ENVMAP +VSOUT vec2 v_tex1; +#endif +VSOUT float v_fog; + +void +main(void) +{ +#ifdef SKIN + vec3 SkinVertex = vec3(0.0, 0.0, 0.0); + vec3 SkinNormal = vec3(0.0, 0.0, 0.0); + for(int i = 0; i < 4; i++){ + SkinVertex += (u_boneMatrices[int(in_indices[i])] * vec4(in_pos, 1.0)).xyz * in_weights[i]; + SkinNormal += (mat3(u_boneMatrices[int(in_indices[i])]) * in_normal) * in_weights[i]; + } + + vec4 Vertex = u_world * vec4(SkinVertex, 1.0); + gl_Position = u_proj * u_view * Vertex; + vec3 Normal = mat3(u_world) * SkinNormal; +#else + vec4 Vertex = u_world * vec4(in_pos, 1.0); + gl_Position = u_proj * u_view * Vertex; + vec3 Normal = mat3(u_world) * in_normal; +#endif + + v_tex0 = in_tex0; +#ifdef ENVMAP + v_tex1 = (u_texMatrix * vec4(Normal, 1.0)).xy; +#endif + + v_color = in_color; + v_color.rgb += u_ambLight.rgb*surfAmbient; + v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse; + // PS2 clamps before material color + // PSP clamps after...maybe another constant for this? + v_color = clamp(v_color, 0.0, 1.0); + v_color *= u_matColor; + + v_fog = DoFog(gl_Position.w); +} diff --git a/src/extras/shaders/leedsDefault_PS_x.hlsl b/src/extras/shaders/leedsDefault_PS_x.hlsl new file mode 100644 index 00000000..0b546523 --- /dev/null +++ b/src/extras/shaders/leedsDefault_PS_x.hlsl @@ -0,0 +1,49 @@ +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; +#if defined(PASS_BLEND) || defined(PASS_ADD) + float2 TexCoord1 : TEXCOORD1; +#endif + float4 Color : COLOR0; +}; + +sampler2D diffTex : register(s0); +sampler2D envTex : register(s1); + +float4 fogColor : register(c0); + +float4 colorscale : register(c1); +float4 fxparams : register(c2); + +#define shininess (fxparams.x) + +float4 main(VS_out input) : COLOR +{ + float4 pass1 = input.Color*tex2D(diffTex, input.TexCoord0.xy)*colorscale; + pass1.rgb = clamp(pass1.rgb, 0.0, 1.0); + pass1.rgb = lerp(fogColor.rgb, pass1.rgb, input.TexCoord0.z); + + float4 color; +#if defined(PASS_BLEND) || defined(PASS_ADD) + float4 pass2 = tex2D(envTex, input.TexCoord1.xy); + pass2.a *= shininess; + pass2.rgb = lerp(float3(0.0, 0.0, 0.0), pass2.rgb, input.TexCoord0.z); + + // We simulate drawing this in two passes. +#if defined(PASS_ADD) + // First pass with standard blending, second with addition + // We premultiply alpha so render state should be one. + color.rgb = pass1.rgb*pass1.a + pass2.rgb*pass2.a; + color.a = pass1.a; +#elif defined(PASS_BLEND) + // We premultiply alpha so render state should be one. + color.rgb = pass1.rgb*pass1.a*(1.0-pass2.a) + pass2.rgb*pass2.a; + color.a = pass1.a*(1.0-pass2.a) + pass2.a; +#endif + +#else + color = pass1; +#endif + + return color; +} diff --git a/src/extras/shaders/leedsDefault_VS_x.hlsl b/src/extras/shaders/leedsDefault_VS_x.hlsl new file mode 100644 index 00000000..58bee097 --- /dev/null +++ b/src/extras/shaders/leedsDefault_VS_x.hlsl @@ -0,0 +1,72 @@ +#include "standardConstants.h" + +#ifdef ENVMAP +float4x4 texMat : register(c41); +#endif +#ifdef SKIN +float4x3 boneMatrices[64] : register(c41); +#endif + +struct VS_in +{ + float4 Position : POSITION; + float3 Normal : NORMAL; + float2 TexCoord : TEXCOORD0; + float4 Prelight : COLOR0; +#ifdef SKIN + float4 Weights : BLENDWEIGHT; + int4 Indices : BLENDINDICES; +#endif +}; + +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; // also fog +#ifdef ENVMAP + float2 TexCoord1 : TEXCOORD1; +#endif + float4 Color : COLOR0; +}; + + +VS_out main(in VS_in input) +{ + VS_out output; + +#ifdef SKIN + int j; + float3 SkinVertex = float3(0.0, 0.0, 0.0); + float3 SkinNormal = float3(0.0, 0.0, 0.0); + for(j = 0; j < 4; j++){ + SkinVertex += mul(input.Position, boneMatrices[input.Indices[j]]).xyz * input.Weights[j]; + SkinNormal += mul(input.Normal, (float3x3)boneMatrices[input.Indices[j]]).xyz * input.Weights[j]; + } + output.Position = mul(combinedMat, SkinVertex); +// float3 V = mul(worldMat, SkinVertex).xyz; + float3 N = mul(normalMat, SkinNormal); +#else + output.Position = mul(combinedMat, input.Position); +// float3 V = mul(worldMat, input.Position).xyz; + float3 N = mul(normalMat, input.Normal); +#endif + + output.TexCoord0.xy = input.TexCoord; +#ifdef ENVMAP + output.TexCoord1 = mul(texMat, float4(N, 1.0)).xy; +#endif + + output.Color = input.Prelight; + output.Color.rgb += ambientLight.rgb * surfAmbient; + + int i; + for(i = 0; i < numDirLights; i++) + output.Color.xyz += DoDirLight(lights[i+firstDirLight], N)*surfDiffuse; + // PS2 clamps before material color + // PSP clamps after...maybe another constant for this? + output.Color = clamp(output.Color, 0.0, 1.0); + output.Color *= matCol; + + output.TexCoord0.z = clamp((output.Position.w - fogEnd)*fogRange, fogDisable, 1.0); + + return output; +} diff --git a/src/extras/shaders/leedsVehicle_mobile.frag b/src/extras/shaders/leedsVehicle_mobile.frag new file mode 100644 index 00000000..467379dd --- /dev/null +++ b/src/extras/shaders/leedsVehicle_mobile.frag @@ -0,0 +1,76 @@ +uniform sampler2D tex0; +uniform sampler2D tex1; + +uniform float u_fxparams; +uniform vec3 u_skyTop; +uniform vec3 u_skyBot; + +#define shininess (u_fxparams) + +// matfx: +// case 1 normal envmap +// custom1 (4.0, 1.0, 1.0, coef) +// custom2 (0.25, 3.0, 1.0, 1.0) +// case 2 too strong +// custom1 (4.0, 1.0, 2.0, coef) +// custom2 (0.5, 3.0, 1.0, 1.0) +// ???: practically no fresnel +// custom1 (4.0, 1.25, 0.01, coef) +// custom2 (1.0, 2.0, 1.1, 2.0) + +#define power (4.0) + +#define preMult (1.0) +#define postMult (1.0) +#define minRefl (0.25) +#define maxRefl (3.0) +#define minOpacity (1.0) +#define maxOpacity (1.0) + +//#define preMult (1.0) +//#define postMult (2.0) +//#define minRefl (0.5) +//#define maxRefl (3.0) +//#define minOpacity (1.0) +//#define maxOpacity (1.0) + +//#define preMult (1.25) +//#define postMult (0.01) +//#define minRefl (1.0) +//#define maxRefl (2.0) +//#define minOpacity (1.1) +//#define maxOpacity (2.0) + +FSIN vec4 v_color; +FSIN vec2 v_tex0; +FSIN vec2 v_tex1; +FSIN float v_fog; +FSIN vec2 v_reflData; + +#define v_NdotV (v_reflData.x) +#define v_lightingCont (v_reflData.y) + +void +main(void) +{ + vec4 pass1 = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); + + vec3 envtex = texture(tex1, v_tex1).rgb; // V flipped + vec3 skyColour = mix(u_skyBot, u_skyTop, envtex.g); + vec3 envOut = mix(envtex.rrr, skyColour, envtex.b); + + float fresnel = mix(shininess, shininess * 2.0, v_NdotV); + fresnel = pow(v_NdotV * preMult, power); + fresnel = clamp(fresnel * postMult, 0.0, 1.0); + float reflectivity = v_lightingCont * mix(minRefl, maxRefl, fresnel)*shininess; + + float opacity = mix(minOpacity, maxOpacity, fresnel)*pass1.a; + vec4 color = pass1 + vec4(reflectivity * envOut, 0.0); + color.a = opacity; + + color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog); + + DoAlphaTest(color.a); + + FRAGCOLOR(color); +} diff --git a/src/extras/shaders/leedsVehicle_mobile.vert b/src/extras/shaders/leedsVehicle_mobile.vert new file mode 100644 index 00000000..b2123fa4 --- /dev/null +++ b/src/extras/shaders/leedsVehicle_mobile.vert @@ -0,0 +1,40 @@ +uniform vec4 u_amb; +uniform vec4 u_emiss; + +VSIN(ATTRIB_POS) vec3 in_pos; + +VSOUT vec4 v_color; +VSOUT vec2 v_tex0; +VSOUT vec2 v_tex1; +VSOUT float v_fog; +VSOUT vec2 v_reflData; + +#define v_NdotV (v_reflData.x) +#define v_lightingCont (v_reflData.y) + +void +main(void) +{ + vec4 Vertex = u_world * vec4(in_pos, 1.0); + gl_Position = u_proj * u_view * Vertex; + vec3 Normal = mat3(u_world) * in_normal; + + v_tex0 = in_tex0; + + vec3 ViewNormal = mat3(u_view) * Normal; + v_tex1 = (ViewNormal.xy + vec2(1.0, 1.0))*0.5; + + v_color = in_color; + vec4 combinedAmbient = mix(u_emiss, u_amb, Normal.z); + v_color.rgb += combinedAmbient.rgb*surfAmbient; + v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse; + v_lightingCont = max(0.5, (v_color.r + v_color.g + v_color.b) / 3.0); + v_color *= u_matColor; + + // for fresnel + vec3 camPos = -u_view[3].xyz * mat3(u_view); + vec3 viewVec = normalize(Vertex.xyz - camPos); + v_NdotV = 1.0 - dot(-Normal.xyz, viewVec.xyz); + + v_fog = DoFog(gl_Position.w); +} diff --git a/src/extras/shaders/leedsVehicle_mobile_PS.hlsl b/src/extras/shaders/leedsVehicle_mobile_PS.hlsl new file mode 100644 index 00000000..a343b32f --- /dev/null +++ b/src/extras/shaders/leedsVehicle_mobile_PS.hlsl @@ -0,0 +1,53 @@ +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; + float2 TexCoord1 : TEXCOORD1; + float2 ReflData : TEXCOORD2; + float4 Color : COLOR0; +}; + +#define NdotV (input.ReflData.x) +#define lightingCont (input.ReflData.y) + +sampler2D diffTex : register(s0); +sampler2D envTex : register(s1); + +float4 fogColor : register(c0); + +float4 fxparams : register(c2); +float3 skyTop : register(c3); +float3 skyBot : register(c4); + +#define shininess (fxparams.x) + +#define power (4.0) + +#define preMult (1.0) +#define postMult (1.0) +#define minRefl (0.25) +#define maxRefl (3.0) +#define minOpacity (1.0) +#define maxOpacity (1.0) + + +float4 main(VS_out input) : COLOR +{ + float4 pass1 = input.Color*tex2D(diffTex, input.TexCoord0.xy); + + float3 envtex = tex2D(envTex, float2(input.TexCoord1.x, 1.0-input.TexCoord1.y)).rgb; // V flipped + float3 skyColour = lerp(skyBot, skyTop, envtex.g); + float3 envOut = lerp(envtex.rrr, skyColour, envtex.b); + + float fresnel = lerp(shininess, shininess * 2.0, NdotV); + fresnel = pow(NdotV * preMult, power); + fresnel = clamp(fresnel * postMult, 0.0, 1.0); + float reflectivity = lightingCont * lerp(minRefl, maxRefl, fresnel)*shininess; + + float opacity = lerp(minOpacity, maxOpacity, fresnel)*pass1.a; + float4 color = pass1 + float4(reflectivity * envOut, 0.0); + color.a = opacity; + + color.rgb = lerp(fogColor.rgb, color.rgb, input.TexCoord0.z); + + return color; +} diff --git a/src/extras/shaders/leedsVehicle_mobile_VS.hlsl b/src/extras/shaders/leedsVehicle_mobile_VS.hlsl new file mode 100644 index 00000000..3085c5e4 --- /dev/null +++ b/src/extras/shaders/leedsVehicle_mobile_VS.hlsl @@ -0,0 +1,57 @@ +#include "standardConstants.h" + +float4 emissive : register(c41); +float4 ambient : register(c42); +float4x4 viewMat : register(c43); + +struct VS_in +{ + float4 Position : POSITION; + float3 Normal : NORMAL; + float2 TexCoord : TEXCOORD0; + float4 Prelight : COLOR0; +}; + +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; // also fog + float2 TexCoord1 : TEXCOORD1; + float2 ReflData : TEXCOORD2; + float4 Color : COLOR0; +}; + +#define NdotV (output.ReflData.x) +#define lightingCont (output.ReflData.y) + +VS_out main(in VS_in input) +{ + VS_out output; + + output.Position = mul(combinedMat, input.Position); + float3 V = mul(worldMat, input.Position).xyz; + float3 N = mul(normalMat, input.Normal); + + output.TexCoord0.xy = input.TexCoord; + + float4 ViewNormal = mul(viewMat, float4(N, 0.0)); + output.TexCoord1 = (ViewNormal.xy + float2(1.0, 1.0))*0.5; + + output.Color = input.Prelight; + float4 combinedAmbient = lerp(emissive, ambient, N.z); + output.Color.rgb += combinedAmbient.rgb * surfAmbient; + + int i; + for(i = 0; i < numDirLights; i++) + output.Color.xyz += DoDirLight(lights[i+firstDirLight], N)*surfDiffuse; + lightingCont = max(0.5, (output.Color.r + output.Color.g + output.Color.b) / 3.0); + output.Color *= matCol; + + // for fresnel + float3 camPos = mul(-viewMat._m03_m13_m23, (float3x3)(viewMat)); + float3 viewVec = normalize(V.xyz - camPos); + NdotV = 1.0 - dot(-N.xyz, viewVec.xyz); + + output.TexCoord0.z = clamp((output.Position.w - fogEnd)*fogRange, fogDisable, 1.0); + + return output; +} diff --git a/src/extras/shaders/make_hlsl.cmd b/src/extras/shaders/make_hlsl.cmd deleted file mode 100644 index dee95283..00000000 --- a/src/extras/shaders/make_hlsl.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -for %%f in (*PS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T ps_2_0 /nologo /E main /Fo obj\%%~nf.cso %%f -for %%f in (*VS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T vs_2_0 /nologo /E main /Fo obj\%%~nf.cso %%f diff --git a/src/extras/shaders/obj/colourfilterLCS_PS.cso b/src/extras/shaders/obj/colourfilterLCS_PS.cso Binary files differnew file mode 100644 index 00000000..17f2d612 --- /dev/null +++ b/src/extras/shaders/obj/colourfilterLCS_PS.cso diff --git a/src/extras/shaders/obj/colourfilterLCS_PS.inc b/src/extras/shaders/obj/colourfilterLCS_PS.inc new file mode 100644 index 00000000..20738662 --- /dev/null +++ b/src/extras/shaders/obj/colourfilterLCS_PS.inc @@ -0,0 +1,28 @@ +static unsigned char colourfilterLCS_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, + 0x01, 0x00, 0x2a, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x6c, 0x75, 0x72, + 0x63, 0x6f, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, + 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, + 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, + 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, + 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xb0, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, + 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, + 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xff, 0xa0, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/colourfilterLCS_frag.inc b/src/extras/shaders/obj/colourfilterLCS_frag.inc new file mode 100644 index 00000000..886f0671 --- /dev/null +++ b/src/extras/shaders/obj/colourfilterLCS_frag.inc @@ -0,0 +1,22 @@ +const char *colourfilterLCS_frag_src = +"uniform sampler2D tex0;\n" +"uniform vec4 u_blurcolor;\n" + +"FSIN vec4 v_color;\n" +"FSIN vec2 v_tex0;\n" +"FSIN float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" +" dst += dst*u_blurcolor;\n" + +" vec4 color;\n" +" color.rgb = dst.rgb;\n" +" color.a = 1.0;\n" + +" FRAGCOLOR(color);\n" +"}\n" + +; diff --git a/src/extras/shaders/obj/colourfilterVC_PS.cso b/src/extras/shaders/obj/colourfilterVC_PS.cso Binary files differdeleted file mode 100644 index 4b0e9f3f..00000000 --- a/src/extras/shaders/obj/colourfilterVC_PS.cso +++ /dev/null diff --git a/src/extras/shaders/obj/colourfilterVC_PS.inc b/src/extras/shaders/obj/colourfilterVC_PS.inc deleted file mode 100644 index daa18360..00000000 --- a/src/extras/shaders/obj/colourfilterVC_PS.inc +++ /dev/null @@ -1,56 +0,0 @@ -static unsigned char colourfilterVC_PS_cso[] = { - 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, - 0x1c, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, - 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, - 0x01, 0x00, 0x2a, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x6c, 0x75, 0x72, - 0x63, 0x6f, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, - 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, - 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, - 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, - 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, - 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xb0, - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, - 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, - 0x00, 0x08, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x17, 0x80, - 0x0a, 0x00, 0xe4, 0xa0, 0x0a, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, - 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, - 0x12, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x0a, 0x00, 0xff, 0xa0, - 0x02, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, - 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, - 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, - 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, - 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, - 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, - 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, - 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, - 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, - 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, - 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 -}; diff --git a/src/extras/shaders/obj/colourfilterVC_frag.inc b/src/extras/shaders/obj/colourfilterVC_frag.inc deleted file mode 100644 index b61322d9..00000000 --- a/src/extras/shaders/obj/colourfilterVC_frag.inc +++ /dev/null @@ -1,29 +0,0 @@ -const char *colourfilterVC_frag_src = -"uniform sampler2D tex0;\n" -"uniform vec4 u_blurcolor;\n" - -"FSIN vec4 v_color;\n" -"FSIN vec2 v_tex0;\n" -"FSIN float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" float a = u_blurcolor.a;\n" -" vec4 doublec = clamp(u_blurcolor*2.0, 0.0, 1.0);\n" -" vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" vec4 prev = dst;\n" -" for(int i = 0; i < 5; i++){\n" -" vec4 tmp = dst*(1.0-a) + prev*doublec*a;\n" -" tmp += prev*u_blurcolor;\n" -" tmp += prev*u_blurcolor;\n" -" prev = clamp(tmp, 0.0, 1.0);\n" -" }\n" -" vec4 color;\n" -" color.rgb = prev.rgb;\n" -" color.a = 1.0;\n" - -" FRAGCOLOR(color);\n" -"}\n" - -; diff --git a/src/extras/shaders/obj/leedsBuilding_VS.cso b/src/extras/shaders/obj/leedsBuilding_VS.cso Binary files differnew file mode 100644 index 00000000..6720364d --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_VS.cso diff --git a/src/extras/shaders/obj/leedsBuilding_VS.inc b/src/extras/shaders/obj/leedsBuilding_VS.inc new file mode 100644 index 00000000..490a8c01 --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_VS.inc @@ -0,0 +1,57 @@ +static unsigned char leedsBuilding_VS_cso[] = { + 0x00, 0x02, 0xfe, 0xff, 0xfe, 0xff, 0x4a, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, + 0x06, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0xea, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00, + 0x01, 0x00, 0xaa, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xac, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, + 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x29, 0x00, 0x01, 0x00, 0xa6, 0x00, 0x9c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xd1, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, + 0x01, 0x00, 0x3a, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd9, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x32, 0x00, + 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x36, 0x00, 0x9c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x00, + 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, + 0x4d, 0x61, 0x74, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x76, 0x65, 0x00, 0x66, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x00, 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x6c, 0x00, 0x73, 0x75, 0x72, 0x66, + 0x50, 0x72, 0x6f, 0x70, 0x73, 0x00, 0x76, 0x73, 0x5f, 0x32, 0x5f, 0x30, + 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, + 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, + 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, + 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, + 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x04, 0x00, 0x0f, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, + 0x02, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, + 0x29, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x0d, 0x00, 0xff, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x90, 0x2a, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, + 0x02, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x55, 0xa0, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0xff, 0x80, + 0x0c, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0xd0, + 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, + 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0xff, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0e, 0x00, 0x55, 0xa1, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, + 0x0e, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x55, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, + 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsBuilding_mobile_VS.cso b/src/extras/shaders/obj/leedsBuilding_mobile_VS.cso Binary files differnew file mode 100644 index 00000000..c3ac2b9b --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_mobile_VS.cso diff --git a/src/extras/shaders/obj/leedsBuilding_mobile_VS.inc b/src/extras/shaders/obj/leedsBuilding_mobile_VS.inc new file mode 100644 index 00000000..1433ca3f --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_mobile_VS.inc @@ -0,0 +1,70 @@ +static unsigned char leedsBuilding_mobile_VS_cso[] = { + 0x00, 0x02, 0xfe, 0xff, 0xfe, 0xff, 0x42, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, + 0x05, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0xcc, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00, + 0x01, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, + 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x29, 0x00, 0x01, 0x00, 0xa6, 0x00, 0x88, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, + 0x01, 0x00, 0x3a, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc5, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x32, 0x00, + 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6d, 0x62, 0x69, + 0x65, 0x6e, 0x74, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x62, + 0x69, 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x74, 0x00, 0x03, 0x00, 0x03, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x00, 0x66, 0x6f, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x00, 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x6c, 0x00, + 0x76, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, + 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, + 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, + 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, 0x05, + 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0xc0, 0x3f, + 0x00, 0x00, 0x40, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, + 0x05, 0x00, 0x0f, 0xa0, 0x9a, 0x99, 0x99, 0x3f, 0x9a, 0x99, 0x19, 0x3f, + 0x00, 0x00, 0xa0, 0x3f, 0xcd, 0xcc, 0x0c, 0x3f, 0x51, 0x00, 0x00, 0x05, + 0x06, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x0a, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x55, 0xa0, 0x04, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xff, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x04, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x00, 0x80, + 0x2a, 0x00, 0x90, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0e, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x55, 0xa0, + 0x0b, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0e, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, + 0x01, 0x00, 0x00, 0x80, 0x29, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xaa, 0xa0, + 0x05, 0x00, 0xff, 0xa0, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, + 0x02, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xff, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xf9, 0x80, + 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, + 0x02, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x06, 0x00, 0x00, 0xa0, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0xff, 0x80, + 0x0c, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0xd0, + 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, + 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0xff, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0e, 0x00, 0x55, 0xa1, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, + 0x0e, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, + 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsBuilding_mobile_vert.inc b/src/extras/shaders/obj/leedsBuilding_mobile_vert.inc new file mode 100644 index 00000000..56bb8a80 --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_mobile_vert.inc @@ -0,0 +1,54 @@ +const char *leedsBuilding_mobile_vert_src = +"uniform vec4 u_amb;\n" +"uniform vec4 u_emiss;\n" + +"#define surfEmissive (u_surfProps.w)\n" + +"#define vertContrast (1.5)\n" +"#define vertBrightness (0.25)\n" +"#define ambientContrast (1.2)\n" +"#define ambientBrightness (0.1)\n" +"#define emissiveContrast (1.25)\n" +"#define emissiveBrightness (0.05)\n" + + +"VSIN(ATTRIB_POS) vec3 in_pos;\n" + +"VSOUT vec4 v_color;\n" +"VSOUT vec2 v_tex0;\n" +"VSOUT float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" +" gl_Position = u_proj * u_view * Vertex;\n" +" vec3 Normal = mat3(u_world) * in_normal;\n" + +" v_tex0 = in_tex0;\n" + +" vec4 vertCol = in_color;\n" +" vec4 amb = u_amb;\n" +" vec4 emiss = u_emiss;\n" + +" vertCol.xyz = ((vertCol.xyz - 0.5) * max(vertContrast, 0.0)) + 0.5;\n" +" vertCol.xyz += vertBrightness;\n" +" vertCol.xyz = max(vertCol.xyz, vec3(0.0,0.0,0.0));\n" +" \n" +" amb.xyz = ((amb.xyz - 0.5) * max(ambientContrast, 0.0)) + 0.5;\n" +" amb.xyz += ambientBrightness;\n" +" amb.xyz = max(amb.xyz, vec3(0.0,0.0,0.0));\n" +" \n" +" emiss.xyz = ((emiss.xyz - 0.5) * max(emissiveContrast, 0.0)) + 0.5;\n" +" emiss.xyz += emissiveBrightness;\n" +" emiss.xyz = max(emiss.xyz, vec3(0.0,0.0,0.0));\n" +" v_color.xyz = emiss.xyz + (vertCol.xyz * amb.xyz);\n" +" v_color.w = vertCol.w;\n" + + +" v_color = clamp(v_color, 0.0, 1.0);\n" +" v_color.a *= u_matColor.a;\n" + +" v_fog = DoFog(gl_Position.w);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/leedsBuilding_vert.inc b/src/extras/shaders/obj/leedsBuilding_vert.inc new file mode 100644 index 00000000..33c5eccc --- /dev/null +++ b/src/extras/shaders/obj/leedsBuilding_vert.inc @@ -0,0 +1,30 @@ +const char *leedsBuilding_vert_src = +"uniform vec4 u_amb;\n" +"uniform vec4 u_emiss;\n" + +"#define surfEmissive (u_surfProps.w)\n" + +"VSIN(ATTRIB_POS) vec3 in_pos;\n" + +"VSOUT vec4 v_color;\n" +"VSOUT vec2 v_tex0;\n" +"VSOUT float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" +" gl_Position = u_proj * u_view * Vertex;\n" +" vec3 Normal = mat3(u_world) * in_normal;\n" + +" v_tex0 = in_tex0;\n" + +" v_color = in_color;\n" +" v_color.rgb *= u_amb.rgb;\n" +" v_color.rgb += u_emiss.rgb*surfEmissive;\n" +" v_color = clamp(v_color, 0.0, 1.0);\n" +" v_color.a *= u_matColor.a;\n" + +" v_fog = DoFog(gl_Position.w);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/leedsDefault_ADD_PS.cso b/src/extras/shaders/obj/leedsDefault_ADD_PS.cso Binary files differnew file mode 100644 index 00000000..db862fdb --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_ADD_PS.cso diff --git a/src/extras/shaders/obj/leedsDefault_ADD_PS.inc b/src/extras/shaders/obj/leedsDefault_ADD_PS.inc new file mode 100644 index 00000000..7a04522f --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_ADD_PS.inc @@ -0,0 +1,47 @@ +static unsigned char leedsDefault_ADD_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x47, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x05, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0xde, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x06, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x06, 0x00, 0xbc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd5, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x64, 0x69, 0x66, 0x66, 0x54, 0x65, 0x78, 0x00, 0x04, 0x00, 0x0c, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x65, 0x6e, 0x76, 0x54, 0x65, 0x78, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x66, 0x78, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, + 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, + 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, + 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, + 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, + 0x31, 0x00, 0xab, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x07, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, + 0x00, 0x08, 0x0f, 0xa0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, + 0x01, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x01, 0x00, 0xe4, 0xb0, 0x01, 0x08, 0xe4, 0xa0, 0x42, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, + 0x02, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0x90, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, + 0x01, 0x00, 0x17, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x12, 0x00, 0x00, 0x04, + 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, + 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsDefault_BLEND_PS.cso b/src/extras/shaders/obj/leedsDefault_BLEND_PS.cso Binary files differnew file mode 100644 index 00000000..e875c795 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_BLEND_PS.cso diff --git a/src/extras/shaders/obj/leedsDefault_BLEND_PS.inc b/src/extras/shaders/obj/leedsDefault_BLEND_PS.inc new file mode 100644 index 00000000..be3a6d96 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_BLEND_PS.inc @@ -0,0 +1,53 @@ +static unsigned char leedsDefault_BLEND_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x47, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x05, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0xde, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x06, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x06, 0x00, 0xbc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd5, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x64, 0x69, 0x66, 0x66, 0x54, 0x65, 0x78, 0x00, 0x04, 0x00, 0x0c, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x65, 0x6e, 0x76, 0x54, 0x65, 0x78, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x66, 0x78, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, + 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, + 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, + 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, + 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, + 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, 0xa0, + 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x07, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, + 0x00, 0x08, 0x0f, 0xa0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, + 0x01, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, 0x42, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x01, 0x08, 0xe4, 0xa0, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x12, 0x00, 0x00, 0x04, + 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x00, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, + 0x00, 0x00, 0xff, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xb0, + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x80, + 0x02, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x08, 0x80, + 0x02, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x08, 0x80, + 0x01, 0x00, 0xff, 0x80, 0x03, 0x00, 0xff, 0x81, 0x03, 0x00, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, + 0x01, 0x00, 0xff, 0x80, 0x02, 0x00, 0x00, 0x80, 0x12, 0x00, 0x00, 0x04, + 0x03, 0x00, 0x07, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, + 0x03, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsDefault_ENV_VS.cso b/src/extras/shaders/obj/leedsDefault_ENV_VS.cso Binary files differnew file mode 100644 index 00000000..57db3798 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_ENV_VS.cso diff --git a/src/extras/shaders/obj/leedsDefault_ENV_VS.inc b/src/extras/shaders/obj/leedsDefault_ENV_VS.inc new file mode 100644 index 00000000..ed27d470 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_ENV_VS.inc @@ -0,0 +1,103 @@ +static unsigned char leedsDefault_ENV_VS_cso[] = { + 0x00, 0x02, 0xfe, 0xff, 0xfe, 0xff, 0x8d, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, + 0x0a, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0xf5, 0x01, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x00, + 0x01, 0x00, 0x3e, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, + 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x10, 0x00, 0x01, 0x00, 0x42, 0x00, 0x2c, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, + 0x01, 0x00, 0x3a, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x01, 0x00, 0x00, 0x02, 0x00, 0x11, 0x00, 0x18, 0x00, 0x46, 0x00, + 0x90, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x32, 0x00, 0xf4, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xa7, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, + 0x03, 0x00, 0x22, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc4, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0xd4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x36, 0x00, 0xf4, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xee, 0x01, 0x00, 0x00, 0x02, 0x00, 0x29, 0x00, + 0x04, 0x00, 0xa6, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x62, + 0x69, 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x74, 0x00, 0x03, 0x00, 0x03, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x00, 0xab, + 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x00, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, + 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x00, 0xab, 0x4b, 0x01, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, + 0x64, 0x01, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x6d, 0x01, 0x00, 0x00, + 0x54, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, + 0x08, 0x00, 0x03, 0x00, 0x78, 0x01, 0x00, 0x00, 0x6d, 0x61, 0x74, 0x43, + 0x6f, 0x6c, 0x00, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, + 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x75, 0x6d, 0x44, + 0x69, 0x72, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x00, 0xab, 0xab, 0xab, + 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x73, 0x75, 0x72, 0x66, 0x50, 0x72, 0x6f, 0x70, + 0x73, 0x00, 0x74, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x00, 0x76, 0x73, 0x5f, + 0x32, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, + 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, + 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, + 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x0a, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0f, 0x90, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0xe4, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, + 0x03, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0x55, 0x90, + 0x09, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, + 0x08, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x0a, 0x00, 0xe4, 0xa0, + 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, + 0x01, 0x00, 0x01, 0x80, 0x0d, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x04, + 0x01, 0x00, 0x07, 0x80, 0x0f, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x80, + 0x03, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x08, 0x80, + 0x04, 0x00, 0x00, 0xa0, 0x26, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0xf0, + 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x80, + 0x10, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x01, 0x80, + 0x03, 0x00, 0x00, 0x80, 0x04, 0x00, 0x55, 0xa0, 0x2e, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x01, 0xb0, 0x03, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x04, + 0x03, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x13, 0x20, 0xe4, 0xa1, + 0x00, 0x00, 0x00, 0xb0, 0x0b, 0x00, 0x00, 0x03, 0x03, 0x00, 0x01, 0x80, + 0x03, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x04, + 0x03, 0x00, 0x07, 0x80, 0x03, 0x00, 0x00, 0x80, 0x11, 0x20, 0xe4, 0xa0, + 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, + 0x03, 0x00, 0xe4, 0x80, 0x0d, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0xe4, 0x80, + 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, + 0x04, 0x00, 0xaa, 0xa0, 0x27, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, + 0x02, 0x00, 0x08, 0x80, 0x03, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0xa0, + 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0xaa, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xd0, + 0x01, 0x00, 0xe4, 0x80, 0x0c, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x55, 0x80, 0x2a, 0x00, 0xe4, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x80, 0x29, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x03, 0x80, 0x2b, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0xe0, + 0x00, 0x00, 0xe4, 0x80, 0x2c, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0e, 0x00, 0x55, 0xa1, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, + 0x0e, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0xaa, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, + 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsDefault_frag.inc b/src/extras/shaders/obj/leedsDefault_frag.inc new file mode 100644 index 00000000..312a32a3 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_frag.inc @@ -0,0 +1,50 @@ +const char *leedsDefault_frag_src = +"uniform sampler2D tex0;\n" +"uniform sampler2D tex1;\n" + +"uniform float u_fxparams;\n" +"uniform vec4 u_colorscale;\n" + +"#define shininess (u_fxparams)\n" + +"FSIN vec4 v_color;\n" +"FSIN vec2 v_tex0;\n" +"#if defined(PASS_BLEND) || defined(PASS_ADD)\n" +"FSIN vec2 v_tex1;\n" +"#endif\n" +"FSIN float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 pass1 = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale;\n" +" pass1.rgb = clamp(pass1.rgb, 0.0, 1.0);\n" +" pass1.rgb = mix(u_fogColor.rgb, pass1.rgb, v_fog);\n" + +" vec4 color;\n" +"#if defined(PASS_BLEND) || defined(PASS_ADD)\n" +" vec4 pass2 = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));\n" +" pass2.a *= shininess;\n" +" pass2.rgb = mix(vec3(0.0, 0.0, 0.0), pass2.rgb, v_fog);\n" + +" // We simulate drawing this in two passes.\n" +"#if defined(PASS_ADD)\n" +" // First pass with standard blending, second with addition\n" +" // We premultiply alpha so render state should be one.\n" +" color.rgb = pass1.rgb*pass1.a + pass2.rgb*pass2.a;\n" +" color.a = pass1.a;\n" +"#elif defined(PASS_BLEND)\n" +" // We premultiply alpha so render state should be one.\n" +" color.rgb = pass1.rgb*pass1.a*(1.0-pass2.a) + pass2.rgb*pass2.a;\n" +" color.a = pass1.a*(1.0-pass2.a) + pass2.a;\n" +"#endif\n" + +"#else\n" +" color = pass1;\n" +"#endif\n" + +" DoAlphaTest(color.a);\n" + +" FRAGCOLOR(color);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/leedsDefault_vert.inc b/src/extras/shaders/obj/leedsDefault_vert.inc new file mode 100644 index 00000000..4ff94fd4 --- /dev/null +++ b/src/extras/shaders/obj/leedsDefault_vert.inc @@ -0,0 +1,53 @@ +const char *leedsDefault_vert_src = +"#ifdef ENVMAP\n" +"uniform mat4 u_texMatrix;\n" +"#endif\n" +"#ifdef SKIN\n" +"uniform mat4 u_boneMatrices[64];\n" +"#endif\n" + +"VSIN(ATTRIB_POS) vec3 in_pos;\n" + +"VSOUT vec4 v_color;\n" +"VSOUT vec2 v_tex0;\n" +"#ifdef ENVMAP\n" +"VSOUT vec2 v_tex1;\n" +"#endif\n" +"VSOUT float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +"#ifdef SKIN\n" +" vec3 SkinVertex = vec3(0.0, 0.0, 0.0);\n" +" vec3 SkinNormal = vec3(0.0, 0.0, 0.0);\n" +" for(int i = 0; i < 4; i++){\n" +" SkinVertex += (u_boneMatrices[int(in_indices[i])] * vec4(in_pos, 1.0)).xyz * in_weights[i];\n" +" SkinNormal += (mat3(u_boneMatrices[int(in_indices[i])]) * in_normal) * in_weights[i];\n" +" }\n" + +" vec4 Vertex = u_world * vec4(SkinVertex, 1.0);\n" +" gl_Position = u_proj * u_view * Vertex;\n" +" vec3 Normal = mat3(u_world) * SkinNormal;\n" +"#else\n" +" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" +" gl_Position = u_proj * u_view * Vertex;\n" +" vec3 Normal = mat3(u_world) * in_normal;\n" +"#endif\n" + +" v_tex0 = in_tex0;\n" +"#ifdef ENVMAP\n" +" v_tex1 = (u_texMatrix * vec4(Normal, 1.0)).xy;\n" +"#endif\n" + +" v_color = in_color;\n" +" v_color.rgb += u_ambLight.rgb*surfAmbient;\n" +" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse;\n" +" // PS2 clamps before material color\n" +" // PSP clamps after...maybe another constant for this?\n" +" v_color = clamp(v_color, 0.0, 1.0);\n" +" v_color *= u_matColor;\n" + +" v_fog = DoFog(gl_Position.w);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_PS.cso b/src/extras/shaders/obj/leedsVehicle_mobile_PS.cso Binary files differnew file mode 100644 index 00000000..b6f70b5b --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_PS.cso diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_PS.inc b/src/extras/shaders/obj/leedsVehicle_mobile_PS.inc new file mode 100644 index 00000000..946b1c7a --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_PS.inc @@ -0,0 +1,63 @@ +static unsigned char leedsVehicle_mobile_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x51, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x06, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xac, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x06, 0x00, + 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xd0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe9, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0x12, 0x00, + 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x0e, 0x00, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x69, 0x66, 0x66, 0x54, 0x65, 0x78, 0x00, + 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x76, 0x54, 0x65, 0x78, 0x00, 0xab, + 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x78, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x00, 0x73, 0x6b, 0x79, 0x42, 0x6f, 0x74, 0x00, + 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x73, 0x6b, 0x79, 0x54, 0x6f, 0x70, 0x00, 0x70, + 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, + 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, + 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0xbf, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, + 0x05, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x30, 0x40, 0x00, 0x00, 0x80, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0xb0, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x90, 0x01, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, + 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x81, + 0x03, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x03, 0x80, + 0x01, 0x00, 0xe4, 0xb0, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xd2, 0xa0, + 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x01, 0x08, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, + 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0xa0, + 0x12, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x02, 0x00, 0xaa, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x08, 0x80, 0x02, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0xb0, + 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x18, 0x80, 0x03, 0x00, 0xff, 0x80, + 0x03, 0x00, 0xff, 0x80, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x08, 0x80, + 0x03, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x55, 0xa0, + 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x03, 0x00, 0xff, 0x80, + 0x02, 0x00, 0x55, 0xb0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, + 0x03, 0x00, 0xff, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, + 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x03, 0x00, 0xff, 0x80, + 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x12, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_VS.cso b/src/extras/shaders/obj/leedsVehicle_mobile_VS.cso Binary files differnew file mode 100644 index 00000000..85796f30 --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_VS.cso diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_VS.inc b/src/extras/shaders/obj/leedsVehicle_mobile_VS.inc new file mode 100644 index 00000000..aa8859b1 --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_VS.inc @@ -0,0 +1,132 @@ +static unsigned char leedsVehicle_mobile_VS_cso[] = { + 0x00, 0x02, 0xfe, 0xff, 0xfe, 0xff, 0x99, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0x2e, 0x02, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, + 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x27, 0x02, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00, + 0x01, 0x00, 0xaa, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, + 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x29, 0x00, 0x01, 0x00, 0xa6, 0x00, 0x14, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x49, 0x01, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x42, 0x00, 0x54, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x64, 0x01, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x3a, 0x00, + 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x11, 0x00, 0x18, 0x00, 0x46, 0x00, 0xb8, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, + 0x01, 0x00, 0x32, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xcf, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x03, 0x00, 0x22, 0x00, + 0xdc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, + 0x01, 0x00, 0x36, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x02, 0x00, 0x00, 0x02, 0x00, 0x2b, 0x00, 0x04, 0x00, 0xae, 0x00, + 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x02, 0x00, 0x00, + 0x02, 0x00, 0x04, 0x00, 0x04, 0x00, 0x12, 0x00, 0x30, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x00, + 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, + 0x4d, 0x61, 0x74, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x76, 0x65, 0x00, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x00, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x00, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, 0x73, 0x01, 0x00, 0x00, + 0x7c, 0x01, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, + 0x95, 0x01, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x03, 0x00, 0xa0, 0x01, 0x00, 0x00, + 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x6c, 0x00, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x4d, 0x61, 0x74, 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, + 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x6e, 0x75, 0x6d, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, + 0x00, 0xab, 0xab, 0xab, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x75, 0x72, 0x66, + 0x50, 0x72, 0x6f, 0x70, 0x73, 0x00, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x61, + 0x74, 0x00, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x00, 0x76, + 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, + 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, + 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x51, 0x00, 0x00, 0x05, + 0x0f, 0x00, 0x0f, 0xa0, 0xab, 0xaa, 0xaa, 0x3e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, + 0x0a, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0f, 0x90, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0xe4, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, + 0x03, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x55, 0x90, + 0x05, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, + 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x06, 0x00, 0xe4, 0xa0, + 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x07, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, + 0x2e, 0x00, 0xe4, 0xa0, 0x08, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, + 0x01, 0x00, 0xe4, 0x81, 0x2b, 0x00, 0xe4, 0xa0, 0x08, 0x00, 0x00, 0x03, + 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, 0xe4, 0x81, 0x2c, 0x00, 0xe4, 0xa0, + 0x08, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, 0x81, + 0x2d, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x81, 0x24, 0x00, 0x00, 0x02, + 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0x55, 0x90, 0x09, 0x00, 0xe4, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x08, 0x00, 0xe4, 0xa0, + 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, + 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, + 0x00, 0x00, 0xe4, 0x81, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x06, 0x80, 0x00, 0x00, 0x55, 0x80, 0x2c, 0x00, 0xd0, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x06, 0x80, 0x2b, 0x00, 0xd0, 0xa0, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, + 0x01, 0x00, 0x06, 0x80, 0x2d, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xaa, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x06, 0x80, + 0x01, 0x00, 0xe4, 0x80, 0x0b, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe9, 0x80, 0x0b, 0x00, 0x55, 0xa0, + 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0x80, 0x29, 0x00, 0xe4, 0xa0, + 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0e, 0x80, 0x02, 0x00, 0x90, 0x81, + 0x2a, 0x00, 0x90, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0e, 0x80, + 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x29, 0x00, 0x90, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0e, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x0d, 0x00, 0x00, 0xa0, 0x03, 0x00, 0x90, 0x90, 0x01, 0x00, 0x00, 0x02, + 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, 0xf9, 0x80, 0x01, 0x00, 0x00, 0x02, + 0x03, 0x00, 0x01, 0x80, 0x0b, 0x00, 0xaa, 0xa0, 0x26, 0x00, 0x00, 0x01, + 0x00, 0x00, 0xe4, 0xf0, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, 0x02, 0x80, + 0x03, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x02, 0x80, 0x03, 0x00, 0x55, 0x80, 0x0b, 0x00, 0xff, 0xa0, + 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0xb0, 0x03, 0x00, 0x55, 0x80, + 0x08, 0x00, 0x00, 0x04, 0x03, 0x00, 0x02, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x13, 0x20, 0xe4, 0xa1, 0x00, 0x00, 0x00, 0xb0, 0x0b, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x02, 0x80, 0x03, 0x00, 0x55, 0x80, 0x0b, 0x00, 0xaa, 0xa0, + 0x05, 0x00, 0x00, 0x04, 0x03, 0x00, 0x0e, 0x80, 0x03, 0x00, 0x55, 0x80, + 0x11, 0x20, 0x90, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x04, + 0x02, 0x00, 0x07, 0x80, 0x03, 0x00, 0xf9, 0x80, 0x0d, 0x00, 0xaa, 0xa0, + 0x02, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, 0x01, 0x80, + 0x03, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0xa0, 0x27, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x08, 0x80, 0x03, 0x00, 0xff, 0x90, + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xd0, 0x02, 0x00, 0xe4, 0x80, + 0x0c, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0xe0, + 0x01, 0x00, 0x00, 0x81, 0x0b, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x80, + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0xaa, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xa0, 0x0b, 0x00, 0x00, 0x03, + 0x02, 0x00, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x55, 0xa0, + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, + 0x0e, 0x00, 0x55, 0xa1, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, + 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, + 0x0b, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_frag.inc b/src/extras/shaders/obj/leedsVehicle_mobile_frag.inc new file mode 100644 index 00000000..8098599c --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_frag.inc @@ -0,0 +1,78 @@ +const char *leedsVehicle_mobile_frag_src = +"uniform sampler2D tex0;\n" +"uniform sampler2D tex1;\n" + +"uniform float u_fxparams;\n" +"uniform vec3 u_skyTop;\n" +"uniform vec3 u_skyBot;\n" + +"#define shininess (u_fxparams)\n" + +"// matfx:\n" +"// case 1 normal envmap\n" +"// custom1 (4.0, 1.0, 1.0, coef)\n" +"// custom2 (0.25, 3.0, 1.0, 1.0)\n" +"// case 2 too strong\n" +"// custom1 (4.0, 1.0, 2.0, coef)\n" +"// custom2 (0.5, 3.0, 1.0, 1.0)\n" +"// ???: practically no fresnel\n" +"// custom1 (4.0, 1.25, 0.01, coef)\n" +"// custom2 (1.0, 2.0, 1.1, 2.0)\n" + +"#define power (4.0)\n" + +"#define preMult (1.0)\n" +"#define postMult (1.0)\n" +"#define minRefl (0.25)\n" +"#define maxRefl (3.0)\n" +"#define minOpacity (1.0)\n" +"#define maxOpacity (1.0)\n" + +"//#define preMult (1.0)\n" +"//#define postMult (2.0)\n" +"//#define minRefl (0.5)\n" +"//#define maxRefl (3.0)\n" +"//#define minOpacity (1.0)\n" +"//#define maxOpacity (1.0)\n" + +"//#define preMult (1.25)\n" +"//#define postMult (0.01)\n" +"//#define minRefl (1.0)\n" +"//#define maxRefl (2.0)\n" +"//#define minOpacity (1.1)\n" +"//#define maxOpacity (2.0)\n" + +"FSIN vec4 v_color;\n" +"FSIN vec2 v_tex0;\n" +"FSIN vec2 v_tex1;\n" +"FSIN float v_fog;\n" +"FSIN vec2 v_reflData;\n" + +"#define v_NdotV (v_reflData.x)\n" +"#define v_lightingCont (v_reflData.y)\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 pass1 = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" + +" vec3 envtex = texture(tex1, v_tex1).rgb; // V flipped\n" +" vec3 skyColour = mix(u_skyBot, u_skyTop, envtex.g);\n" +" vec3 envOut = mix(envtex.rrr, skyColour, envtex.b);\n" + +" float fresnel = mix(shininess, shininess * 2.0, v_NdotV);\n" +" fresnel = pow(v_NdotV * preMult, power);\n" +" fresnel = clamp(fresnel * postMult, 0.0, 1.0);\n" +" float reflectivity = v_lightingCont * mix(minRefl, maxRefl, fresnel)*shininess;\n" + +" float opacity = mix(minOpacity, maxOpacity, fresnel)*pass1.a;\n" +" vec4 color = pass1 + vec4(reflectivity * envOut, 0.0);\n" +" color.a = opacity;\n" + +" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" + +" DoAlphaTest(color.a);\n" + +" FRAGCOLOR(color);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/leedsVehicle_mobile_vert.inc b/src/extras/shaders/obj/leedsVehicle_mobile_vert.inc new file mode 100644 index 00000000..3609e369 --- /dev/null +++ b/src/extras/shaders/obj/leedsVehicle_mobile_vert.inc @@ -0,0 +1,42 @@ +const char *leedsVehicle_mobile_vert_src = +"uniform vec4 u_amb;\n" +"uniform vec4 u_emiss;\n" + +"VSIN(ATTRIB_POS) vec3 in_pos;\n" + +"VSOUT vec4 v_color;\n" +"VSOUT vec2 v_tex0;\n" +"VSOUT vec2 v_tex1;\n" +"VSOUT float v_fog;\n" +"VSOUT vec2 v_reflData;\n" + +"#define v_NdotV (v_reflData.x)\n" +"#define v_lightingCont (v_reflData.y)\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" +" gl_Position = u_proj * u_view * Vertex;\n" +" vec3 Normal = mat3(u_world) * in_normal;\n" + +" v_tex0 = in_tex0;\n" + +" vec3 ViewNormal = mat3(u_view) * Normal;\n" +" v_tex1 = (ViewNormal.xy + vec2(1.0, 1.0))*0.5;\n" + +" v_color = in_color;\n" +" vec4 combinedAmbient = mix(u_emiss, u_amb, Normal.z);\n" +" v_color.rgb += combinedAmbient.rgb*surfAmbient;\n" +" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse;\n" +" v_lightingCont = max(0.5, (v_color.r + v_color.g + v_color.b) / 3.0);\n" +" v_color *= u_matColor;\n" + +" // for fresnel\n" +" vec3 camPos = -u_view[3].xyz * mat3(u_view);\n" +" vec3 viewVec = normalize(Vertex.xyz - camPos);\n" +" v_NdotV = 1.0 - dot(-Normal.xyz, viewVec.xyz);\n" + +" v_fog = DoFog(gl_Position.w);\n" +"}\n" +; diff --git a/src/extras/shaders/obj/scale_PS.cso b/src/extras/shaders/obj/scale_PS.cso Binary files differnew file mode 100644 index 00000000..7d8e0734 --- /dev/null +++ b/src/extras/shaders/obj/scale_PS.cso diff --git a/src/extras/shaders/obj/scale_PS.inc b/src/extras/shaders/obj/scale_PS.inc new file mode 100644 index 00000000..e8f42e38 --- /dev/null +++ b/src/extras/shaders/obj/scale_PS.inc @@ -0,0 +1,31 @@ +static unsigned char scale_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x34, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x94, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x06, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x63, 0x61, + 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x67, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x74, 0x65, 0x78, 0x30, 0x00, 0xab, 0xab, + 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, + 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, + 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0xb0, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, + 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, + 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x17, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x12, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, + 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/obj/scale_frag.inc b/src/extras/shaders/obj/scale_frag.inc new file mode 100644 index 00000000..14082bb9 --- /dev/null +++ b/src/extras/shaders/obj/scale_frag.inc @@ -0,0 +1,21 @@ +const char *scale_frag_src = +"uniform sampler2D tex0;\n" +"uniform vec4 u_colorscale;\n" + +"FSIN vec4 v_color;\n" +"FSIN vec2 v_tex0;\n" +"FSIN float v_fog;\n" + +"void\n" +"main(void)\n" +"{\n" +" vec4 color;\n" +" color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale;\n" +" color.rgb = clamp(color.rgb, 0.0, 1.0);\n" +" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" +" DoAlphaTest(color.a);\n" + +" FRAGCOLOR(color);\n" +"}\n" + +; diff --git a/src/extras/shaders/scale.frag b/src/extras/shaders/scale.frag new file mode 100644 index 00000000..7d9d1ff4 --- /dev/null +++ b/src/extras/shaders/scale.frag @@ -0,0 +1,19 @@ +uniform sampler2D tex0; +uniform vec4 u_colorscale; + +FSIN vec4 v_color; +FSIN vec2 v_tex0; +FSIN float v_fog; + +void +main(void) +{ + vec4 color; + color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale; + color.rgb = clamp(color.rgb, 0.0, 1.0); + color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog); + DoAlphaTest(color.a); + + FRAGCOLOR(color); +} + diff --git a/src/extras/shaders/scale_PS.hlsl b/src/extras/shaders/scale_PS.hlsl new file mode 100644 index 00000000..54da9c82 --- /dev/null +++ b/src/extras/shaders/scale_PS.hlsl @@ -0,0 +1,19 @@ +struct VS_out { + float4 Position : POSITION; + float3 TexCoord0 : TEXCOORD0; + float4 Color : COLOR0; +}; + +sampler2D tex0 : register(s0); + +float4 fogColor : register(c0); +float4 colorscale : register(c1); + +float4 main(VS_out input) : COLOR +{ + float4 color = input.Color; + color *= tex2D(tex0, input.TexCoord0.xy)*colorscale; + color.rgb = clamp(color.rgb, 0.0, 1.0); + color.rgb = lerp(fogColor.rgb, color.rgb, input.TexCoord0.z); + return color; +} diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 1faf6ee6..dde7d03d 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -394,7 +394,7 @@ RwStream *RwStreamOpen(RwStreamType type, RwStreamAccessType accessType, const v return nil; } } -RwBool RwStreamClose(RwStream * stream, void *pData) { stream->close(); rwFree(stream); return true; } +RwBool RwStreamClose(RwStream * stream, void *pData) { if (!stream) return false; stream->close(); rwFree(stream); return true; } RwUInt32 RwStreamRead(RwStream * stream, void *buffer, RwUInt32 length) { return stream->read8(buffer, length); } RwStream *RwStreamWrite(RwStream * stream, const void *buffer, RwUInt32 length) { stream->write8(buffer, length); return stream; } RwStream *RwStreamSkip(RwStream * stream, RwUInt32 offset) { stream->seek(offset); return stream; } @@ -411,6 +411,9 @@ void RwIm2DVertexSetRecipCameraZ(RwIm2DVertex *vert, RwReal recipz) { vert->setR void RwIm2DVertexSetScreenX(RwIm2DVertex *vert, RwReal scrnx) { vert->setScreenX(scrnx); } void RwIm2DVertexSetScreenY(RwIm2DVertex *vert, RwReal scrny) { vert->setScreenY(scrny); } void RwIm2DVertexSetScreenZ(RwIm2DVertex *vert, RwReal scrnz) { vert->setScreenZ(scrnz); } +float RwIm2DVertexGetScreenX(RwIm2DVertex *vert) { return vert->getScreenX(); } +float RwIm2DVertexGetScreenY(RwIm2DVertex *vert) { return vert->getScreenY(); } +float RwIm2DVertexGetScreenZ(RwIm2DVertex *vert) { return vert->getScreenZ(); } void RwIm2DVertexSetU(RwIm2DVertex *vert, RwReal texU, RwReal recipz) { vert->setU(texU, recipz); } void RwIm2DVertexSetV(RwIm2DVertex *vert, RwReal texV, RwReal recipz) { vert->setV(texV, recipz); } void RwIm2DVertexSetIntRGBA(RwIm2DVertex *vert, RwUInt8 red, RwUInt8 green, RwUInt8 blue, RwUInt8 alpha) { vert->setColor(red, green, blue, alpha); } diff --git a/src/fakerw/rpworld.h b/src/fakerw/rpworld.h index f10a3754..8e3b09f0 100644 --- a/src/fakerw/rpworld.h +++ b/src/fakerw/rpworld.h @@ -13,6 +13,7 @@ //struct RpMaterial; typedef rw::Material RpMaterial; +typedef rw::MaterialList RpMaterialList; typedef RpMaterial *(*RpMaterialCallBack)(RpMaterial *material, void *data); diff --git a/src/fakerw/rwcore.h b/src/fakerw/rwcore.h index e5d21865..7a142abd 100644 --- a/src/fakerw/rwcore.h +++ b/src/fakerw/rwcore.h @@ -34,6 +34,9 @@ void RwIm2DVertexSetRecipCameraZ(RwIm2DVertex *vert, RwReal recipz); void RwIm2DVertexSetScreenX(RwIm2DVertex *vert, RwReal scrnx); void RwIm2DVertexSetScreenY(RwIm2DVertex *vert, RwReal scrny); void RwIm2DVertexSetScreenZ(RwIm2DVertex *vert, RwReal scrnz); +float RwIm2DVertexGetScreenX(RwIm2DVertex *vert); +float RwIm2DVertexGetScreenY(RwIm2DVertex *vert); +float RwIm2DVertexGetScreenZ(RwIm2DVertex *vert); void RwIm2DVertexSetU(RwIm2DVertex *vert, RwReal texU, RwReal recipz); void RwIm2DVertexSetV(RwIm2DVertex *vert, RwReal texV, RwReal recipz); void RwIm2DVertexSetIntRGBA(RwIm2DVertex *vert, RwUInt8 red, RwUInt8 green, RwUInt8 blue, RwUInt8 alpha); diff --git a/src/leeds/base/memoryManager.cpp b/src/leeds/base/memoryManager.cpp new file mode 100644 index 00000000..57e7d954 --- /dev/null +++ b/src/leeds/base/memoryManager.cpp @@ -0,0 +1,75 @@ +#include "common.h" +#include "memoryManager.h" + +namespace base +{ + cMemoryManager::cMemoryManager() + { + + } + + void* cMemoryManager::Allocate(uint32 size) + { + void* buf = malloc(size); + memset(buf, 0, size); + return buf; + } + + void* cMemoryManager::AllocateAligned(uint32 size) + { + void* buf = malloc(size); + memset(buf, 0, size); + return buf; + } + + void* cMemoryManager::Realloc(void* buf, uint32 newSize, bool unk) + { + return realloc(buf, newSize); + } + + void cMemoryManager::Free(void* buf) + { + if (buf) + free(buf); + } + + bool cMemoryManager::IsFree(void* buf) + { + return buf == nil; + } + + + cMainMemoryManager* cMainMemoryManager::m_pInstance = nil; + + cMainMemoryManager::cMainMemoryManager() + { + assert(m_pInstance == nil); + m_pInstance = this; + Init(nil, 0); + } + + void cMainMemoryManager::Init(void*, uint32) + { + + } +}; + +void* operator new(size_t size) +{ + return base::cMainMemoryManager::Instance()->Allocate(size); +} + +void* operator new[](size_t size) +{ + return base::cMainMemoryManager::Instance()->Allocate(size); +} + +void operator delete(void* buf) noexcept +{ + base::cMainMemoryManager::Instance()->Free(buf); +} + +void operator delete[](void* buf) noexcept +{ + base::cMainMemoryManager::Instance()->Free(buf); +}
\ No newline at end of file diff --git a/src/leeds/base/memoryManager.h b/src/leeds/base/memoryManager.h new file mode 100644 index 00000000..91124cd1 --- /dev/null +++ b/src/leeds/base/memoryManager.h @@ -0,0 +1,39 @@ +#pragma once + +namespace base +{ + class cMemoryManager + { + public: + cMemoryManager(); + void* Allocate(uint32 size); + void* AllocateAligned(uint32 size); + void* Realloc(void* buf, uint32 newSize, bool unk); + void Free(void* buf); + bool IsFree(void* buf); + }; + + class cMainMemoryManager : public cMemoryManager + { + static cMainMemoryManager* m_pInstance; + static void Init(void*, uint32); + + public: + cMainMemoryManager(); + static cMainMemoryManager *Instance() + { + static cMainMemoryManager instance; + return &instance; + } + }; + + class cMemoryBlock + { + // TODO + }; +} + +void* operator new(size_t size); +void* operator new[](size_t size); +void operator delete(void* buf) noexcept; +void operator delete[](void* buf) noexcept;
\ No newline at end of file diff --git a/src/leeds/base/relocatableChunk.cpp b/src/leeds/base/relocatableChunk.cpp new file mode 100644 index 00000000..5cb5a426 --- /dev/null +++ b/src/leeds/base/relocatableChunk.cpp @@ -0,0 +1,36 @@ +#include "common.h" +#include "relocatableChunk.h" + +namespace base +{ + // TODO(LCS): add actual code (all of these are stubs) + + void* cRelocatableChunk::Load(void* data, bool bShrink) { return nil; } + void* cRelocatableChunk::Load(const char* name, bool bShrink) { return nil; } + void cRelocatableChunk::Fixup(const sChunkHeader& header, void* data) {} + void cRelocatableChunk::Fixup(void* data) {} + void* cRelocatableChunk::Shrink(const sChunkHeader& header, void* data) { return nil; } + void* cRelocatableChunk::Shrink(void* data) { return nil; } + + cRelocatableChunkClassInfo::cRelocatableChunkClassInfo(const char* class_name, const void* pVmt, int size) {} + + cRelocatableChunkWriter::cRelocatableChunkWriter() {} + cRelocatableChunkWriter::~cRelocatableChunkWriter() {} + + void cRelocatableChunkWriter::AddPatch(void* addr) {} + void cRelocatableChunkWriter::AddPatchWithInfo(const char* str, int unk, void* addr) {} + void cRelocatableChunkWriter::AllocateRaw(void* addr, uint32 size, uint32 align, bool a5, bool a6) {} + + void cRelocatableChunkWriter::Clear() {} + void cRelocatableChunkWriter::Class(void* ptr, const cRelocatableChunkClassInfo& classInfo) {} + void cRelocatableChunkWriter::DebugFileLine(void*) {} + + void cRelocatableChunkWriter::PatchFunc(void* ptr) {} + + bool cRelocatableChunkWriter::IsAllocated(void* addr) { return false; } + + void cRelocatableChunkWriter::Reserve(int, int) {} + + void cRelocatableChunkWriter::Save(const char* filename, uint32 a3, uint32 a4, bool a5) {} + void cRelocatableChunkWriter::Save(void* file, uint32 a3, uint32 a4, bool a5, sChunkHeader* pHeader) {} +};
\ No newline at end of file diff --git a/src/leeds/base/relocatableChunk.h b/src/leeds/base/relocatableChunk.h new file mode 100644 index 00000000..2658aa21 --- /dev/null +++ b/src/leeds/base/relocatableChunk.h @@ -0,0 +1,53 @@ +#pragma once + +namespace base +{ + // TODO(LCS): add actual struct fields + + struct sChunkHeader; + struct sDataBlock; + struct sFileLine; + + class cRelocatableChunk + { + public: + void* Load(void* data, bool bShrink); + void* Load(const char* name, bool bShrink); + void Fixup(const sChunkHeader& header, void* data); + void Fixup(void* data); + void* Shrink(const sChunkHeader& header, void* data); + void* Shrink(void* data); + }; + +#define VTABLE_ADDR(obj) ((void*)obj) // TODO: make this portable + + class cRelocatableChunkClassInfo + { + public: + cRelocatableChunkClassInfo(const char* class_name, const void* pVmt, int size); + }; + + class cRelocatableChunkWriter + { + public: + cRelocatableChunkWriter(); + ~cRelocatableChunkWriter(); + + void AddPatch(void* addr); + void AddPatchWithInfo(const char* str, int unk, void* addr); + void AllocateRaw(void* addr, uint32 size, uint32 align, bool a5 = false, bool a6 = false); + + void Clear(); + void Class(void* ptr, const cRelocatableChunkClassInfo& classInfo); + void DebugFileLine(void*); + + void PatchFunc(void* ptr); + + bool IsAllocated(void* addr); + + void Reserve(int, int); + + void Save(const char* filename, uint32 a3, uint32 a4, bool a5); + void Save(void* file, uint32 a3, uint32 a4, bool a5, sChunkHeader* pHeader); + }; +};
\ No newline at end of file diff --git a/src/leeds/base/sList.h b/src/leeds/base/sList.h new file mode 100644 index 00000000..378d8e31 --- /dev/null +++ b/src/leeds/base/sList.h @@ -0,0 +1,35 @@ +#pragma once + +namespace base +{ + +template<typename T> +class cSList +{ +public: + struct tSItem + { + tSItem* next; + T item; + }; + // extra field on PS2 + tSItem* first; + + cSList() { first = nil; } + void Insert(tSItem* item) { tSItem* n = first; first = item; item->next = n; } + void Remove(tSItem* item) { + if (first == item) { + first = item->next; + return; + } + tSItem* i = first; + while (i && i->next != item) + i = i->next; + assert(i); + i->next = item->next; + + } + +}; + +}
\ No newline at end of file diff --git a/src/leeds/smallHeap.cpp b/src/leeds/smallHeap.cpp new file mode 100644 index 00000000..262113af --- /dev/null +++ b/src/leeds/smallHeap.cpp @@ -0,0 +1,20 @@ +#include "common.h" +#include "smallHeap.h" + +cSmallHeap cSmallHeap::msInstance; + +cSmallHeap::cSmallHeap() +{ + bLocked = false; + bUnk = false; +} + +void cSmallHeap::Lock() +{ + // TODO: PS2 code +} + +void cSmallHeap::Unlock() +{ + // TODO: PS2 code +}
\ No newline at end of file diff --git a/src/leeds/smallHeap.h b/src/leeds/smallHeap.h new file mode 100644 index 00000000..f2897688 --- /dev/null +++ b/src/leeds/smallHeap.h @@ -0,0 +1,17 @@ +#pragma once + +#include "memoryManager.h" + +class cSmallHeap : public base::cMemoryManager +{ + bool bLocked; + bool bUnk; +public: + cSmallHeap(); + void Lock(); + void Unlock(); + + bool IsLocked() const { return bLocked; } + + static cSmallHeap msInstance; +};
\ No newline at end of file diff --git a/src/math/Vector.cpp b/src/math/Vector.cpp index ee76e555..e29d4335 100644 --- a/src/math/Vector.cpp +++ b/src/math/Vector.cpp @@ -44,3 +44,18 @@ operator*(const CMatrix &mat, const CVector &vec) mat.ry * vec.x + mat.fy * vec.y + mat.uy * vec.z + mat.py, mat.rz * vec.x + mat.fz * vec.y + mat.uz * vec.z + mat.pz); } + +void +RwV3dTransformPoints(CVector * pointsOut, const CVector * pointsIn, RwInt32 numPoints, const RwMatrix * matrix) +{ + while(numPoints--){ + float x = pointsIn->x*matrix->right.x + pointsIn->y*matrix->up.x + pointsIn->z*matrix->at.x + matrix->pos.x; + float y = pointsIn->x*matrix->right.y + pointsIn->y*matrix->up.y + pointsIn->z*matrix->at.y + matrix->pos.y; + float z = pointsIn->x*matrix->right.z + pointsIn->y*matrix->up.z + pointsIn->z*matrix->at.z + matrix->pos.z; + pointsOut->x = x; + pointsOut->y = y; + pointsOut->z = z; + pointsOut++; + pointsIn++; + } +} diff --git a/src/math/Vector.h b/src/math/Vector.h index 02128454..87895806 100644 --- a/src/math/Vector.h +++ b/src/math/Vector.h @@ -1,8 +1,12 @@ #pragma once +// TODO(LCS): this should have 16 byte alignment but VS doesn't like passing aligned values by value +// need a solution for this eventually if we ever want to load original assets class CVector : public RwV3d { public: + float w; + CVector(void) {} CVector(float x, float y, float z) { @@ -126,4 +130,7 @@ class CMatrix; CVector Multiply3x3(const CMatrix &mat, const CVector &vec); CVector Multiply3x3(const CVector &vec, const CMatrix &mat); -CVector operator*(const CMatrix &mat, const CVector &vec);
\ No newline at end of file +CVector operator*(const CMatrix &mat, const CVector &vec); + +// we need this because CVector and RwV3d have different size now +void RwV3dTransformPoints(CVector * pointsOut, const CVector * pointsIn, RwInt32 numPoints, const RwMatrix * matrix); diff --git a/src/math/VuVector.h b/src/math/VuVector.h index 41584095..ccaa4cfb 100644 --- a/src/math/VuVector.h +++ b/src/math/VuVector.h @@ -3,10 +3,10 @@ class TYPEALIGN(16) CVuVector : public CVector { public: - float w; +// float w; // in CVector now CVuVector(void) {} CVuVector(float x, float y, float z) : CVector(x, y, z) {} - CVuVector(float x, float y, float z, float w) : CVector(x, y, z), w(w) {} + CVuVector(float x, float y, float z, float w) : CVector(x, y, z)/*, w(w)*/ { this->w = w;} CVuVector(const CVector &v) : CVector(v.x, v.y, v.z) {} CVuVector(const RwV3d &v) : CVector(v) {} /* diff --git a/src/modelinfo/BaseModelInfo.cpp b/src/modelinfo/BaseModelInfo.cpp index 709420fd..6d1a7c79 100644 --- a/src/modelinfo/BaseModelInfo.cpp +++ b/src/modelinfo/BaseModelInfo.cpp @@ -1,11 +1,15 @@ #include "common.h" #include "templates.h" +#include "main.h" #include "TxdStore.h" #include "2dEffect.h" #include "BaseModelInfo.h" #include "ModelInfo.h" -#include "ColModel.h" +#include "KeyGen.h" +#include "Streaming.h" +#include "smallHeap.h" +#include "TempColModels.h" CBaseModelInfo::CBaseModelInfo(ModelInfoType type) { @@ -17,6 +21,11 @@ CBaseModelInfo::CBaseModelInfo(ModelInfoType type) m_type = type; m_num2dEffects = 0; m_bOwnsColModel = false; + m_nameKey = 0; + m_unk1 = 0; + m_unk2 = 0; + m_name = new char[MAX_MODEL_NAME]; + *(int32*)m_name = 0; } void @@ -24,6 +33,7 @@ CBaseModelInfo::Shutdown(void) { DeleteCollisionModel(); DeleteRwObject(); + DeleteChunk(); m_2dEffectsID = -1; m_num2dEffects = 0; m_txdSlot = -1; @@ -33,11 +43,11 @@ CBaseModelInfo::Shutdown(void) void CBaseModelInfo::DeleteCollisionModel(void) { - if(m_colModel && m_bOwnsColModel){ + if(!gUseChunkFiles && m_colModel && m_bOwnsColModel){ if(m_colModel) delete m_colModel; - m_colModel = nil; } + m_colModel = nil; } void @@ -50,8 +60,10 @@ CBaseModelInfo::AddRef(void) void CBaseModelInfo::RemoveRef(void) { - m_refCount--; - RemoveTexDictionaryRef(); + if(m_refCount > 0){ + m_refCount--; + RemoveTexDictionaryRef(); + } } void @@ -70,12 +82,24 @@ CBaseModelInfo::AddTexDictionaryRef(void) } void +CBaseModelInfo::AddTexDictionaryRefGu(void) +{ + CTxdStore::AddRefGu(m_txdSlot); +} + +void CBaseModelInfo::RemoveTexDictionaryRef(void) { CTxdStore::RemoveRef(m_txdSlot); } void +CBaseModelInfo::RemoveTexDictionaryRefGu(void) +{ + CTxdStore::RemoveRefGu(m_txdSlot); +} + +void CBaseModelInfo::Init2dEffects(void) { m_2dEffectsID = -1; @@ -101,3 +125,60 @@ CBaseModelInfo::Get2dEffect(int n) else return nil; } + + +void +CBaseModelInfo::SetModelName(const char *name) +{ + m_nameKey = CKeyGen::GetUppercaseKey(name); + if (!gUseChunkFiles) + strcpy(m_name, name); +} + +void +CBaseModelInfo::DeleteChunk(void) +{ + // BUG? what if we're not using chunks? + if(m_chunk){ + CStreaming::UnregisterPointer(&m_chunk, 2); + cSmallHeap::msInstance.Free(m_chunk); + m_chunk = nil; + } +} + +inline int +GetColmodelID(CColModel *model) +{ + int colModelid = 0; + if(model == &gpTempColModels->ms_colModelBBox) colModelid = 1; + if(model == &gpTempColModels->ms_colModelPed1) colModelid = 2; + if(model == &gpTempColModels->ms_colModelWeapon) colModelid = 3; + if(model == &CTempColModels::ms_colModelPed2) colModelid = 4; + if(model == &CTempColModels::ms_colModelPedGroundHit) colModelid = 5; + if(model == &CTempColModels::ms_colModelDoor1) colModelid = 6; + if(model == &CTempColModels::ms_colModelBumper1) colModelid = 7; + if(model == &CTempColModels::ms_colModelPanel1) colModelid = 8; + if(model == &CTempColModels::ms_colModelBonnet1) colModelid = 9; + if(model == &CTempColModels::ms_colModelBoot1) colModelid = 10; + if(model == &CTempColModels::ms_colModelWheel1) colModelid = 11; + if(model == &CTempColModels::ms_colModelBodyPart1) colModelid = 12; + if(model == &CTempColModels::ms_colModelBodyPart2) colModelid = 13; + if(model == &CTempColModels::ms_colModelCutObj[0]) colModelid = 14; + if(model == &CTempColModels::ms_colModelCutObj[1]) colModelid = 15; + if(model == &CTempColModels::ms_colModelCutObj[2]) colModelid = 16; + if(model == &CTempColModels::ms_colModelCutObj[3]) colModelid = 17; + if(model == &CTempColModels::ms_colModelCutObj[4]) colModelid = 18; + return colModelid; +} + +void +CBaseModelInfo::Write(base::cRelocatableChunkWriter &writer) +{ + m_chunk = nil; + RcWriteThis(writer); + if(m_colModel){ + if(m_bOwnsColModel || GetColmodelID(m_colModel) != 0) + m_colModel->Write(writer, true); + writer.AddPatch(&m_colModel); + } +} diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h index 2d1dc8ac..c9ea13bb 100644 --- a/src/modelinfo/BaseModelInfo.h +++ b/src/modelinfo/BaseModelInfo.h @@ -2,7 +2,7 @@ struct CColModel; -#define MAX_MODEL_NAME (21) +#define MAX_MODEL_NAME (24) enum ModelInfoType { @@ -23,11 +23,19 @@ class C2dEffect; class CBaseModelInfo { protected: - char m_name[MAX_MODEL_NAME]; + uint32 m_unk1; + uint32 m_unk2; + uint32 m_nameKey; + union { + char *m_name; // if not using chunks + void *m_chunk; // else + }; uint8 m_type; uint8 m_num2dEffects; bool m_bOwnsColModel; +public: // need this in colstore CColModel *m_colModel; +protected: int16 m_2dEffectsID; int16 m_objectId; uint16 m_refCount; @@ -35,7 +43,11 @@ protected: public: CBaseModelInfo(ModelInfoType type); +#ifdef FIX_BUGS + virtual ~CBaseModelInfo() { delete []m_name; } +#else virtual ~CBaseModelInfo() {} +#endif virtual void Shutdown(void); virtual void DeleteRwObject(void) = 0; virtual RwObject *CreateInstance(void) = 0; @@ -45,13 +57,24 @@ public: virtual void ConvertAnimFileIndex(void) {} virtual int GetAnimFileIndex(void) { return -1; } + virtual void LoadModel(void *model, const void *chunk) = 0; + virtual void DeleteChunk(void); + // this writes the modelinfo struct, possibly including actual RW models + virtual void Write(base::cRelocatableChunkWriter &writer); + // this writes the RW models + virtual void *WriteModel(base::cRelocatableChunkWriter &writer) { return nil; } // = 0; // this is not in the vtable for some reason??? + // these allocate the space for a modelinfo struct and patch the vtable pointer + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer) = 0; + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer) = 0; + // one day it becomes virtual uint8 GetModelType() const { return m_type; } bool IsBuilding(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME; } bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME || m_type == MITYPE_WEAPON; } bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE; } char *GetModelName(void) { return m_name; } - void SetModelName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); } + void SetModelName(const char *name); + uint32 GetNameHashKey() { return m_nameKey; } void SetColModel(CColModel *col, bool owns = false){ m_colModel = col; m_bOwnsColModel = owns; } CColModel *GetColModel(void) { return m_colModel; } @@ -65,7 +88,9 @@ public: void RemoveRef(void); void SetTexDictionary(const char *name); void AddTexDictionaryRef(void); + void AddTexDictionaryRefGu(void); void RemoveTexDictionaryRef(void); + void RemoveTexDictionaryRefGu(void); void Init2dEffects(void); void Add2dEffect(C2dEffect *fx); C2dEffect *Get2dEffect(int n); diff --git a/src/modelinfo/ClumpModelInfo.cpp b/src/modelinfo/ClumpModelInfo.cpp index ba18bfa7..00c2c0fe 100644 --- a/src/modelinfo/ClumpModelInfo.cpp +++ b/src/modelinfo/ClumpModelInfo.cpp @@ -1,17 +1,30 @@ #include "common.h" +#include "main.h" #include "RwHelper.h" #include "General.h" #include "NodeName.h" #include "VisibilityPlugins.h" #include "ModelInfo.h" #include "AnimManager.h" +#include "Streaming.h" +#include "Leeds.h" + +base::cRelocatableChunkClassInfo CClumpModelInfo::msClassInfo("CElementGroupModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); // the real name +CClumpModelInfo CClumpModelInfo::msClassInstance; void CClumpModelInfo::DeleteRwObject(void) { if(m_clump){ - RpClumpDestroy(m_clump); + if(!gUseChunkFiles) + RpClumpDestroy(m_clump); + else{ + CStreaming::UnregisterClump(m_clump); + CStreaming::UnregisterPointer(&m_clump, 2); + DeleteChunk(); + } + m_clump = nil; RemoveTexDictionaryRef(); if(GetAnimFileIndex() != -1) @@ -52,6 +65,7 @@ CClumpModelInfo::CreateInstance(RwMatrix *m) if(m_clump){ RpClump *clump = (RpClump*)CreateInstance(); *RwFrameGetMatrix(RpClumpGetFrame(clump)) = *m; + CStreaming::RegisterInstance(clump); return (RwObject*)clump; } return nil; @@ -73,14 +87,15 @@ CClumpModelInfo::SetClump(RpClump *clump) if(GetAnimFileIndex() != -1) CAnimManager::AddAnimBlockRef(GetAnimFileIndex()); if(IsClumpSkinned(clump)){ - int i; + //int i; RpHAnimHierarchy *hier; - RpAtomic *skinAtomic; - RpSkin *skin; + //RpAtomic *skinAtomic; + //RpSkin *skin; hier = GetAnimHierarchyFromClump(clump); assert(hier); RpClumpForAllAtomics(clump, SetHierarchyForSkinAtomic, hier); +/* skinAtomic = GetFirstAtomic(clump); assert(skinAtomic); @@ -94,6 +109,7 @@ CClumpModelInfo::SetClump(RpClump *clump) weights->w2 /= sum; weights->w3 /= sum; } +*/ RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS)); } } @@ -203,3 +219,47 @@ CClumpModelInfo::GetFrameFromId(RpClump *clump, int32 id) RwFrameForAllChildren(RpClumpGetFrame(clump), FindFrameFromIdCB, &assoc); return assoc.frame; } + + +void +CClumpModelInfo::LoadModel(void *clump, const void *chunk) +{ + m_chunk = (void*)chunk; + m_clump = (RpClump*)clump; + LoadResource(m_clump); + CStreaming::RegisterPointer(&m_chunk, 2, true); + CStreaming::RegisterClump(m_clump); + CStreaming::RegisterPointer(&m_clump, 2, true); +} + +void +CClumpModelInfo::Write(base::cRelocatableChunkWriter &writer) +{ + CBaseModelInfo::Write(writer); + if(m_clump){ + writer.AddPatch(&m_clump); + SaveResource(m_clump, writer); + } +} + +void* +CClumpModelInfo::WriteModel(base::cRelocatableChunkWriter &writer) +{ + if(m_clump) + SaveResource(m_clump, writer); + return m_clump; +} + +void +CClumpModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} + +void +CClumpModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/ClumpModelInfo.h b/src/modelinfo/ClumpModelInfo.h index 0113d340..b8507e5f 100644 --- a/src/modelinfo/ClumpModelInfo.h +++ b/src/modelinfo/ClumpModelInfo.h @@ -35,6 +35,9 @@ public: char *m_animFileName; }; + static base::cRelocatableChunkClassInfo msClassInfo; + static CClumpModelInfo msClassInstance; + CClumpModelInfo(void) : CBaseModelInfo(MITYPE_CLUMP) { m_animFileIndex = -1; } CClumpModelInfo(ModelInfoType id) : CBaseModelInfo(id) { m_animFileIndex = -1; } ~CClumpModelInfo() {} @@ -48,6 +51,12 @@ public: virtual void ConvertAnimFileIndex(void); virtual int GetAnimFileIndex(void) { return m_animFileIndex; } + virtual void LoadModel(void *model, const void *chunk); + virtual void Write(base::cRelocatableChunkWriter &writer); + virtual void *WriteModel(base::cRelocatableChunkWriter &writer); + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); + static RpAtomic *SetAtomicRendererCB(RpAtomic *atomic, void *data); void SetFrameIds(RwObjectNameIdAssocation *assocs); static RwFrame *FindFrameFromNameCB(RwFrame *frame, void *data); diff --git a/src/modelinfo/ModelIndices.cpp b/src/modelinfo/ModelIndices.cpp index 98c7fb38..83539404 100644 --- a/src/modelinfo/ModelIndices.cpp +++ b/src/modelinfo/ModelIndices.cpp @@ -2,17 +2,25 @@ #include "General.h" #include "ModelIndices.h" +#include "main.h" -#define X(name, var) int16 var = -1; +CModelIndices *gpModelIndices; + +/*#define X(name, var) int16 var = -1; MODELINDICES -#undef X +#undef X*/ void InitModelIndices(void) { -#define X(name, var) var = -1; +/*#define X(name, var) var = -1; MODELINDICES -#undef X +#undef X*/ + if (gMakeResources) + { + gpModelIndices = new CModelIndices; + memset(gpModelIndices, -1, sizeof(CModelIndices)); + } } void diff --git a/src/modelinfo/ModelIndices.h b/src/modelinfo/ModelIndices.h index 836c4092..317ac679 100644 --- a/src/modelinfo/ModelIndices.h +++ b/src/modelinfo/ModelIndices.h @@ -2,8 +2,591 @@ #include "ModelInfo.h" +struct CModelIndices +{ + int16 TRAFFICLIGHTS; + int16 TLIGHT_POST; + int16 TLIGHT_WALK; + int16 TLIGHT_BOX1; + int16 TLIGHT_BOX2; + int16 TRAFFICLIGHTS_VERTICAL; + int16 TRAFFICLIGHTS_MIAMI; + int16 TRAFFICLIGHTS_TWOVERTICAL; + int16 SINGLESTREETLIGHTS1; + int16 SINGLESTREETLIGHTS2; + int16 SINGLESTREETLIGHTS3; + int16 DOUBLESTREETLIGHTS; + int16 STREETLAMP1; + int16 STREETLAMP2; + int16 ROADSFORROADBLOCKSSTART; + int16 ROADSFORROADBLOCKSEND; + int16 TREE2; + int16 TREE3; + int16 TREE6; + int16 TREE8; + int16 TREE1; + int16 TREE4; + int16 TREE5; + int16 TREE7; + int16 TREE9; + int16 TREE10; + int16 TREE11; + int16 TREE12; + int16 TREE13; + int16 TREE14; + int16 CRANE_1; + int16 CRANE_2; + int16 CRANE_3; + int16 CRANE_4; + int16 CRANE_5; + int16 CRANE_6; + int16 PARKINGMETER; + int16 PARKINGMETER2; + int16 MALLFAN; + int16 HOTELFAN_NIGHT; + int16 HOTELFAN_DAY; + int16 HOTROOMFAN; + int16 PHONEBOOTH1; + int16 WASTEBIN; + int16 BIN; + int16 POSTBOX1; + int16 NEWSSTAND; + int16 TRAFFICCONE; + int16 DUMP1; + int16 ROADWORKBARRIER1; + int16 BUSSIGN1; + int16 NOPARKINGSIGN1; + int16 PHONESIGN; + int16 TAXISIGN; + int16 FISHSTALL01; + int16 FISHSTALL02; + int16 FISHSTALL03; + int16 FISHSTALL04; + int16 BAGELSTAND2; + int16 FIRE_HYDRANT; + int16 COLLECTABLE1; + int16 MONEY; + int16 CARMINE; + int16 GARAGEDOOR1; + int16 GARAGEDOOR2; + int16 GARAGEDOOR3; + int16 GARAGEDOOR4; + int16 GARAGEDOOR5; + int16 GARAGEDOOR6; + int16 GARAGEDOOR7; + int16 GARAGEDOOR9; + int16 GARAGEDOOR10; + int16 GARAGEDOOR11; + int16 GARAGEDOOR12; + int16 GARAGEDOOR13; + int16 GARAGEDOOR14; + int16 GARAGEDOOR15; + int16 GARAGEDOOR16; + int16 GARAGEDOOR17; + int16 GARAGEDOOR18; + int16 GARAGEDOOR19; + int16 GARAGEDOOR20; + int16 GARAGEDOOR21; + int16 GARAGEDOOR22; + int16 GARAGEDOOR23; + int16 GARAGEDOOR24; + int16 GARAGEDOOR25; + int16 GARAGEDOOR26; + int16 GARAGEDOOR27; + int16 GARAGEDOOR28; + int16 GARAGEDOOR29; + int16 GARAGEDOOR30; + int16 GARAGEDOOR31; + int16 GARAGEDOOR32; + int16 GARAGEDOOR33; + int16 GARAGEDOOR34; + int16 GARAGEDOOR35; + int16 GARAGEDOOR36; + int16 GARAGEDOOR37; + int16 GARAGEDOOR38; + int16 GARAGEDOOR39; + int16 TESTRAMP1; // UNUSED + int16 TESTRAMP2; + int16 NAUTICALMINE; + int16 CRUSHERBODY; + int16 CRUSHERLID; + int16 DONKEYMAG; + int16 BULLION; + int16 FLOATPACKAGE1; + int16 BRIEFCASE; + int16 CHINABANNER1; + int16 CHINABANNER2; + int16 CHINABANNER3; + int16 CHINABANNER4; + int16 CHINABANNER5; + int16 CHINABANNER6; + int16 CHINABANNER7; + int16 CHINABANNER8; + int16 CHINABANNER9; + int16 CHINABANNER10; + int16 CHINABANNER11; + int16 CHINABANNER12; + int16 CHINALANTERN; + int16 GLASS1; + int16 GLASS2; + int16 GLASS3; + int16 GLASS4; + int16 GLASS5; + int16 GLASS6; + int16 GLASS7; + int16 GLASS8; + int16 BRIDGELIFT; + int16 BRIDGEWEIGHT; + int16 BRIDGEROADSEGMENT; + int16 EXPLODINGBARREL; + int16 ITALYBANNER1; + int16 MEGADAMAGE; + int16 REGENERATOR; + int16 INVISIBLE; + int16 GOOD_CAR; + int16 BAD_CAR; + int16 PICKUP_ADRENALINE; + int16 PICKUP_BODYARMOUR; + int16 PICKUP_INFO; + int16 PICKUP_HEALTH; + int16 PICKUP_BONUS; + int16 PICKUP_BRIBE; + int16 PICKUP_KILLFRENZY; + int16 PICKUP_CAMERA; + int16 PICKUP_REVENUE; + int16 PICKUP_SAVEGAME; + int16 PICKUP_PROPERTY; + int16 PICKUP_PROPERTY_FORSALE; + int16 PICKUP_CLOTHES; + int16 BOLLARDLIGHT; + int16 CA_SP1; + int16 CA_SP2; + int16 CA_SP3; + int16 CA_SP4; + int16 PACKAGE1IZZY; + int16 MAGNET; + int16 RAILTRACKS; + int16 FENCE; + int16 FENCE2; + int16 PETROLPUMP; + int16 PETROLPUMP2; + int16 BODYCAST; + int16 IZZY_CONFDOOR; + int16 SHIPDOOR; + int16 IZZY_JDDOOR; + int16 IZZY_JDDOOR_SLIDER; + int16 LITEHOUSE_GATE; + int16 COFFEE; + int16 BUOY; + int16 PARKTABLE; + int16 SUBWAY1; + int16 SUBWAY2; + int16 SUBWAY3; + int16 SUBWAY4; + int16 SUBWAY5; + int16 SUBWAY6; + int16 SUBWAY7; + int16 SUBWAY8; + int16 SUBWAY9; + int16 SUBWAY10; + int16 SUBWAY11; + int16 SUBWAY12; + int16 SUBWAY13; + int16 SUBWAY14; + int16 SUBWAY15; + int16 SUBWAY16; + int16 SUBWAY17; + int16 SUBWAY18; + int16 SUBPLATFORM_IND; + int16 SUBPLATFORM_COMS; + int16 SUBPLATFORM_COMS2; + int16 SUBPLATFORM_COMN; + int16 SUBPLATFORM_SUB; + int16 SUBPLATFORM_SUB2; + int16 FILES; + int16 LAMPPOST1; + int16 VEG_PALM01; + int16 VEG_PALM02; + int16 VEG_PALM03; + int16 VEG_PALM04; + int16 VEG_PALM05; + int16 VEG_PALM06; + int16 VEG_PALM07; + int16 VEG_PALM08; + int16 MLAMPPOST; + int16 BARRIER1; + int16 LITTLEHA_POLICE; + int16 TELPOLE02; + int16 TRAFFICLIGHT01; + int16 PARKBENCH; + int16 PLC_STINGER; + int16 LIGHTBEAM; + int16 AIRPORTRADAR; + int16 RCBOMB; + int16 JM_SALRADIO; + int16 BEACHBALL; + int16 SANDCASTLE1; + int16 SANDCASTLE2; + int16 JELLYFISH; + int16 JELLYFISH01; + int16 FISH1SINGLE; + int16 FISH1S; + int16 FISH2SINGLE; + int16 FISH2S; + int16 FISH3SINGLE; + int16 FISH3S; + int16 TURTLE; + int16 DOLPHIN; + int16 SHARK; + int16 SUBMARINE; + int16 ESCALATORSTEP; + int16 LOUNGE_WOOD_UP; + int16 LOUNGE_TOWEL_UP; + int16 LOUNGE_WOOD_DN; + int16 LOTION; + int16 BEACHTOWEL01; + int16 BEACHTOWEL02; + int16 BEACHTOWEL03; + int16 BEACHTOWEL04; + int16 BLIMP_NIGHT; + int16 BLIMP_DAY; + int16 YT_MAIN_BODY; + int16 YT_MAIN_BODY2; + int16 SMALL_HELIX; + int16 PT_BARRIER; + int16 SUBWAYGATE; + int16 IN_PMBRIDRAMP3; + int16 IN_PMBRIDG2_UPGS; + int16 IN_PMBRIDGE2; + int16 IN_PMBRIDG1_UPGS; + int16 PM_LIGHTRIG3; + int16 PM_LIGHTRIG1; + int16 IN_PMSCAFF_UPS; + int16 IN_PM_CONCBLOK2; + int16 IN_PMSCAFFH_NS; + int16 IN_PM_GRAVL_JMP; + int16 IN_PM_SCAFFCOVR; + int16 IN_PM_GIRDER2; + int16 IN_PM_SCAFFH_WE; + int16 IN_PM_SIXCONC2; + int16 IN_BMBRIDRAMP3; + int16 IN_BMBRIDG2_UPGS; + int16 IN_BMBRIDGE2; + int16 IN_BMBRIDG1_UPGS; + int16 BM_LIGHTRIG3; + int16 BM_LIGHTRIG1; + int16 IN_BMSCAFF_UPS; + int16 IN_BM_CONCBLOK2; + int16 IN_BMSCAFFH_NS; + int16 IN_BM_GRAVL_JMP; + int16 IN_BM_SCAFFCOVR; + int16 IN_BM_GIRDER2; + int16 IN_BM_SCAFFH_WE; + int16 IN_BM_SIXCONC2; + int16 CRATE_SJL; + int16 DOOR1_SJL; + int16 DOOR2_SJL; + int16 SJL_PORTACABIN; + int16 SJL_PORTACABINRED; + int16 advert_test; // txd +}; + +extern CModelIndices *gpModelIndices; + +#define MI_TRAFFICLIGHTS gpModelIndices->TRAFFICLIGHTS +#define MI_TLIGHT_POST gpModelIndices->TLIGHT_POST +#define MI_TLIGHT_WALK gpModelIndices->TLIGHT_WALK +#define MI_TLIGHT_BOX1 gpModelIndices->TLIGHT_BOX1 +#define MI_TLIGHT_BOX2 gpModelIndices->TLIGHT_BOX2 +#define MI_TRAFFICLIGHTS_VERTICAL gpModelIndices->TRAFFICLIGHTS_VERTICAL +#define MI_TRAFFICLIGHTS_MIAMI gpModelIndices->TRAFFICLIGHTS_MIAMI +#define MI_TRAFFICLIGHTS_TWOVERTICAL gpModelIndices->TRAFFICLIGHTS_TWOVERTICAL +#define MI_SINGLESTREETLIGHTS1 gpModelIndices->SINGLESTREETLIGHTS1 +#define MI_SINGLESTREETLIGHTS2 gpModelIndices->SINGLESTREETLIGHTS2 +#define MI_SINGLESTREETLIGHTS3 gpModelIndices->SINGLESTREETLIGHTS3 +#define MI_DOUBLESTREETLIGHTS gpModelIndices->DOUBLESTREETLIGHTS +#define MI_STREETLAMP1 gpModelIndices->STREETLAMP1 +#define MI_STREETLAMP2 gpModelIndices->STREETLAMP2 +#define MI_ROADSFORROADBLOCKSSTART gpModelIndices->ROADSFORROADBLOCKSSTART +#define MI_ROADSFORROADBLOCKSEND gpModelIndices->ROADSFORROADBLOCKSEND +#define MI_TREE2 gpModelIndices->TREE2 +#define MI_TREE3 gpModelIndices->TREE3 +#define MI_TREE6 gpModelIndices->TREE6 +#define MI_TREE8 gpModelIndices->TREE8 +#define MI_TREE1 gpModelIndices->TREE1 +#define MI_TREE4 gpModelIndices->TREE4 +#define MI_TREE5 gpModelIndices->TREE5 +#define MI_TREE7 gpModelIndices->TREE7 +#define MI_TREE9 gpModelIndices->TREE9 +#define MI_TREE10 gpModelIndices->TREE10 +#define MI_TREE11 gpModelIndices->TREE11 +#define MI_TREE12 gpModelIndices->TREE12 +#define MI_TREE13 gpModelIndices->TREE13 +#define MI_TREE14 gpModelIndices->TREE14 +#define MODELID_CRANE_1 gpModelIndices->CRANE_1 +#define MODELID_CRANE_2 gpModelIndices->CRANE_2 +#define MODELID_CRANE_3 gpModelIndices->CRANE_3 +#define MODELID_CRANE_4 gpModelIndices->CRANE_4 +#define MODELID_CRANE_5 gpModelIndices->CRANE_5 +#define MODELID_CRANE_6 gpModelIndices->CRANE_6 +#define MI_PARKINGMETER gpModelIndices->PARKINGMETER +#define MI_PARKINGMETER2 gpModelIndices->PARKINGMETER2 +#define MI_MALLFAN gpModelIndices->MALLFAN +#define MI_HOTELFAN_NIGHT gpModelIndices->HOTELFAN_NIGHT +#define MI_HOTELFAN_DAY gpModelIndices->HOTELFAN_DAY +#define MI_HOTROOMFAN gpModelIndices->HOTROOMFAN +#define MI_PHONEBOOTH1 gpModelIndices->PHONEBOOTH1 +#define MI_WASTEBIN gpModelIndices->WASTEBIN +#define MI_BIN gpModelIndices->BIN +#define MI_POSTBOX1 gpModelIndices->POSTBOX1 +#define MI_NEWSSTAND gpModelIndices->NEWSSTAND +#define MI_TRAFFICCONE gpModelIndices->TRAFFICCONE +#define MI_DUMP1 gpModelIndices->DUMP1 +#define MI_ROADWORKBARRIER1 gpModelIndices->ROADWORKBARRIER1 +#define MI_BUSSIGN1 gpModelIndices->BUSSIGN1 +#define MI_NOPARKINGSIGN1 gpModelIndices->NOPARKINGSIGN1 +#define MI_PHONESIGN gpModelIndices->PHONESIGN +#define MI_TAXISIGN gpModelIndices->TAXISIGN +#define MI_FISHSTALL01 gpModelIndices->FISHSTALL01 +#define MI_FISHSTALL02 gpModelIndices->FISHSTALL02 +#define MI_FISHSTALL03 gpModelIndices->FISHSTALL03 +#define MI_FISHSTALL04 gpModelIndices->FISHSTALL04 +#define MI_BAGELSTAND2 gpModelIndices->BAGELSTAND2 +#define MI_FIRE_HYDRANT gpModelIndices->FIRE_HYDRANT +#define MI_COLLECTABLE1 gpModelIndices->COLLECTABLE1 +#define MI_MONEY gpModelIndices->MONEY +#define MI_CARMINE gpModelIndices->CARMINE +#define MI_GARAGEDOOR1 gpModelIndices->GARAGEDOOR1 +#define MI_GARAGEDOOR2 gpModelIndices->GARAGEDOOR2 +#define MI_GARAGEDOOR3 gpModelIndices->GARAGEDOOR3 +#define MI_GARAGEDOOR4 gpModelIndices->GARAGEDOOR4 +#define MI_GARAGEDOOR5 gpModelIndices->GARAGEDOOR5 +#define MI_GARAGEDOOR6 gpModelIndices->GARAGEDOOR6 +#define MI_GARAGEDOOR7 gpModelIndices->GARAGEDOOR7 +#define MI_GARAGEDOOR9 gpModelIndices->GARAGEDOOR9 +#define MI_GARAGEDOOR10 gpModelIndices->GARAGEDOOR10 +#define MI_GARAGEDOOR11 gpModelIndices->GARAGEDOOR11 +#define MI_GARAGEDOOR12 gpModelIndices->GARAGEDOOR12 +#define MI_GARAGEDOOR13 gpModelIndices->GARAGEDOOR13 +#define MI_GARAGEDOOR14 gpModelIndices->GARAGEDOOR14 +#define MI_GARAGEDOOR15 gpModelIndices->GARAGEDOOR15 +#define MI_GARAGEDOOR16 gpModelIndices->GARAGEDOOR16 +#define MI_GARAGEDOOR17 gpModelIndices->GARAGEDOOR17 +#define MI_GARAGEDOOR18 gpModelIndices->GARAGEDOOR18 +#define MI_GARAGEDOOR19 gpModelIndices->GARAGEDOOR19 +#define MI_GARAGEDOOR20 gpModelIndices->GARAGEDOOR20 +#define MI_GARAGEDOOR21 gpModelIndices->GARAGEDOOR21 +#define MI_GARAGEDOOR22 gpModelIndices->GARAGEDOOR22 +#define MI_GARAGEDOOR23 gpModelIndices->GARAGEDOOR23 +#define MI_GARAGEDOOR24 gpModelIndices->GARAGEDOOR24 +#define MI_GARAGEDOOR25 gpModelIndices->GARAGEDOOR25 +#define MI_GARAGEDOOR26 gpModelIndices->GARAGEDOOR26 +#define MI_GARAGEDOOR27 gpModelIndices->GARAGEDOOR27 +#define MI_GARAGEDOOR28 gpModelIndices->GARAGEDOOR28 +#define MI_GARAGEDOOR29 gpModelIndices->GARAGEDOOR29 +#define MI_GARAGEDOOR30 gpModelIndices->GARAGEDOOR30 +#define MI_GARAGEDOOR31 gpModelIndices->GARAGEDOOR31 +#define MI_GARAGEDOOR32 gpModelIndices->GARAGEDOOR32 +#define MI_GARAGEDOOR33 gpModelIndices->GARAGEDOOR33 +#define MI_GARAGEDOOR34 gpModelIndices->GARAGEDOOR34 +#define MI_GARAGEDOOR35 gpModelIndices->GARAGEDOOR35 +#define MI_GARAGEDOOR36 gpModelIndices->GARAGEDOOR36 +#define MI_GARAGEDOOR37 gpModelIndices->GARAGEDOOR37 +#define MI_GARAGEDOOR38 gpModelIndices->GARAGEDOOR38 +#define MI_GARAGEDOOR39 gpModelIndices->GARAGEDOOR39 +#define MI_TESTRAMP1 gpModelIndices->TESTRAMP1 // UNUSED +#define MI_TESTRAMP2 gpModelIndices->TESTRAMP2 +#define MI_NAUTICALMINE gpModelIndices->NAUTICALMINE +#define MI_CRUSHERBODY gpModelIndices->CRUSHERBODY +#define MI_CRUSHERLID gpModelIndices->CRUSHERLID +#define MI_DONKEYMAG gpModelIndices->DONKEYMAG +#define MI_BULLION gpModelIndices->BULLION +#define MI_FLOATPACKAGE1 gpModelIndices->FLOATPACKAGE1 +#define MI_BRIEFCASE gpModelIndices->BRIEFCASE +#define MI_CHINABANNER1 gpModelIndices->CHINABANNER1 +#define MI_CHINABANNER2 gpModelIndices->CHINABANNER2 +#define MI_CHINABANNER3 gpModelIndices->CHINABANNER3 +#define MI_CHINABANNER4 gpModelIndices->CHINABANNER4 +#define MI_CHINABANNER5 gpModelIndices->CHINABANNER5 +#define MI_CHINABANNER6 gpModelIndices->CHINABANNER6 +#define MI_CHINABANNER7 gpModelIndices->CHINABANNER7 +#define MI_CHINABANNER8 gpModelIndices->CHINABANNER8 +#define MI_CHINABANNER9 gpModelIndices->CHINABANNER9 +#define MI_CHINABANNER10 gpModelIndices->CHINABANNER10 +#define MI_CHINABANNER11 gpModelIndices->CHINABANNER11 +#define MI_CHINABANNER12 gpModelIndices->CHINABANNER12 +#define MI_CHINALANTERN gpModelIndices->CHINALANTERN +#define MI_GLASS1 gpModelIndices->GLASS1 +#define MI_GLASS2 gpModelIndices->GLASS2 +#define MI_GLASS3 gpModelIndices->GLASS3 +#define MI_GLASS4 gpModelIndices->GLASS4 +#define MI_GLASS5 gpModelIndices->GLASS5 +#define MI_GLASS6 gpModelIndices->GLASS6 +#define MI_GLASS7 gpModelIndices->GLASS7 +#define MI_GLASS8 gpModelIndices->GLASS8 +#define MI_BRIDGELIFT gpModelIndices->BRIDGELIFT +#define MI_BRIDGEWEIGHT gpModelIndices->BRIDGEWEIGHT +#define MI_BRIDGEROADSEGMENT gpModelIndices->BRIDGEROADSEGMENT +#define MI_EXPLODINGBARREL gpModelIndices->EXPLODINGBARREL +#define MI_ITALYBANNER1 gpModelIndices->ITALYBANNER1 +#define MI_MEGADAMAGE gpModelIndices->MEGADAMAGE +#define MI_REGENERATOR gpModelIndices->REGENERATOR +#define MI_INVISIBLE gpModelIndices->INVISIBLE +#define MI_GOOD_CAR gpModelIndices->GOOD_CAR +#define MI_BAD_CAR gpModelIndices->BAD_CAR +#define MI_PICKUP_ADRENALINE gpModelIndices->PICKUP_ADRENALINE +#define MI_PICKUP_BODYARMOUR gpModelIndices->PICKUP_BODYARMOUR +#define MI_PICKUP_INFO gpModelIndices->PICKUP_INFO +#define MI_PICKUP_HEALTH gpModelIndices->PICKUP_HEALTH +#define MI_PICKUP_BONUS gpModelIndices->PICKUP_BONUS +#define MI_PICKUP_BRIBE gpModelIndices->PICKUP_BRIBE +#define MI_PICKUP_KILLFRENZY gpModelIndices->PICKUP_KILLFRENZY +#define MI_PICKUP_CAMERA gpModelIndices->PICKUP_CAMERA +#define MI_PICKUP_REVENUE gpModelIndices->PICKUP_REVENUE +#define MI_PICKUP_SAVEGAME gpModelIndices->PICKUP_SAVEGAME +#define MI_PICKUP_PROPERTY gpModelIndices->PICKUP_PROPERTY +#define MI_PICKUP_PROPERTY_FORSALE gpModelIndices->PICKUP_PROPERTY_FORSALE +#define MI_PICKUP_CLOTHES gpModelIndices->PICKUP_CLOTHES +#define MI_BOLLARDLIGHT gpModelIndices->BOLLARDLIGHT +#define MI_CA_SP1 gpModelIndices->CA_SP1 +#define MI_CA_SP2 gpModelIndices->CA_SP2 +#define MI_CA_SP3 gpModelIndices->CA_SP3 +#define MI_CA_SP4 gpModelIndices->CA_SP4 +#define MI_PACKAGE1IZZY gpModelIndices->PACKAGE1IZZY +#define MI_MAGNET gpModelIndices->MAGNET +#define MI_RAILTRACKS gpModelIndices->RAILTRACKS +#define MI_FENCE gpModelIndices->FENCE +#define MI_FENCE2 gpModelIndices->FENCE2 +#define MI_PETROLPUMP gpModelIndices->PETROLPUMP +#define MI_PETROLPUMP2 gpModelIndices->PETROLPUMP2 +#define MI_BODYCAST gpModelIndices->BODYCAST +#define MI_IZZY_CONFDOOR gpModelIndices->IZZY_CONFDOOR +#define MI_SHIPDOOR gpModelIndices->SHIPDOOR +#define MI_IZZY_JDDOOR gpModelIndices->IZZY_JDDOOR +#define MI_IZZY_JDDOOR_SLIDER gpModelIndices->IZZY_JDDOOR_SLIDER +#define MI_LITEHOUSE_GATE gpModelIndices->LITEHOUSE_GATE +#define MI_COFFEE gpModelIndices->COFFEE +#define MI_BUOY gpModelIndices->BUOY +#define MI_PARKTABLE gpModelIndices->PARKTABLE +#define MI_SUBWAY1 gpModelIndices->SUBWAY1 +#define MI_SUBWAY2 gpModelIndices->SUBWAY2 +#define MI_SUBWAY3 gpModelIndices->SUBWAY3 +#define MI_SUBWAY4 gpModelIndices->SUBWAY4 +#define MI_SUBWAY5 gpModelIndices->SUBWAY5 +#define MI_SUBWAY6 gpModelIndices->SUBWAY6 +#define MI_SUBWAY7 gpModelIndices->SUBWAY7 +#define MI_SUBWAY8 gpModelIndices->SUBWAY8 +#define MI_SUBWAY9 gpModelIndices->SUBWAY9 +#define MI_SUBWAY10 gpModelIndices->SUBWAY10 +#define MI_SUBWAY11 gpModelIndices->SUBWAY11 +#define MI_SUBWAY12 gpModelIndices->SUBWAY12 +#define MI_SUBWAY13 gpModelIndices->SUBWAY13 +#define MI_SUBWAY14 gpModelIndices->SUBWAY14 +#define MI_SUBWAY15 gpModelIndices->SUBWAY15 +#define MI_SUBWAY16 gpModelIndices->SUBWAY16 +#define MI_SUBWAY17 gpModelIndices->SUBWAY17 +#define MI_SUBWAY18 gpModelIndices->SUBWAY18 +#define MI_SUBPLATFORM_IND gpModelIndices->SUBPLATFORM_IND +#define MI_SUBPLATFORM_COMS gpModelIndices->SUBPLATFORM_COMS +#define MI_SUBPLATFORM_COMS2 gpModelIndices->SUBPLATFORM_COMS2 +#define MI_SUBPLATFORM_COMN gpModelIndices->SUBPLATFORM_COMN +#define MI_SUBPLATFORM_SUB gpModelIndices->SUBPLATFORM_SUB +#define MI_SUBPLATFORM_SUB2 gpModelIndices->SUBPLATFORM_SUB2 +#define MI_FILES gpModelIndices->FILES +#define MI_LAMPPOST1 gpModelIndices->LAMPPOST1 +#define MI_VEG_PALM01 gpModelIndices->VEG_PALM01 +#define MI_VEG_PALM02 gpModelIndices->VEG_PALM02 +#define MI_VEG_PALM03 gpModelIndices->VEG_PALM03 +#define MI_VEG_PALM04 gpModelIndices->VEG_PALM04 +#define MI_VEG_PALM05 gpModelIndices->VEG_PALM05 +#define MI_VEG_PALM06 gpModelIndices->VEG_PALM06 +#define MI_VEG_PALM07 gpModelIndices->VEG_PALM07 +#define MI_VEG_PALM08 gpModelIndices->VEG_PALM08 +#define MI_MLAMPPOST gpModelIndices->MLAMPPOST +#define MI_BARRIER1 gpModelIndices->BARRIER1 +#define MI_LITTLEHA_POLICE gpModelIndices->LITTLEHA_POLICE +#define MI_TELPOLE02 gpModelIndices->TELPOLE02 +#define MI_TRAFFICLIGHT01 gpModelIndices->TRAFFICLIGHT01 +#define MI_PARKBENCH gpModelIndices->PARKBENCH +#define MI_PLC_STINGER gpModelIndices->PLC_STINGER +#define MI_LIGHTBEAM gpModelIndices->LIGHTBEAM +#define MI_AIRPORTRADAR gpModelIndices->AIRPORTRADAR +#define MI_RCBOMB gpModelIndices->RCBOMB +#define MI_JM_SALRADIO gpModelIndices->JM_SALRADIO +#define MI_BEACHBALL gpModelIndices->BEACHBALL +#define MI_SANDCASTLE1 gpModelIndices->SANDCASTLE1 +#define MI_SANDCASTLE2 gpModelIndices->SANDCASTLE2 +#define MI_JELLYFISH gpModelIndices->JELLYFISH +#define MI_JELLYFISH01 gpModelIndices->JELLYFISH01 +#define MI_FISH1SINGLE gpModelIndices->FISH1SINGLE +#define MI_FISH1S gpModelIndices->FISH1S +#define MI_FISH2SINGLE gpModelIndices->FISH2SINGLE +#define MI_FISH2S gpModelIndices->FISH2S +#define MI_FISH3SINGLE gpModelIndices->FISH3SINGLE +#define MI_FISH3S gpModelIndices->FISH3S +#define MI_TURTLE gpModelIndices->TURTLE +#define MI_DOLPHIN gpModelIndices->DOLPHIN +#define MI_SHARK gpModelIndices->SHARK +#define MI_SUBMARINE gpModelIndices->SUBMARINE +#define MI_ESCALATORSTEP gpModelIndices->ESCALATORSTEP +#define MI_LOUNGE_WOOD_UP gpModelIndices->LOUNGE_WOOD_UP +#define MI_LOUNGE_TOWEL_UP gpModelIndices->LOUNGE_TOWEL_UP +#define MI_LOUNGE_WOOD_DN gpModelIndices->LOUNGE_WOOD_DN +#define MI_LOTION gpModelIndices->LOTION +#define MI_BEACHTOWEL01 gpModelIndices->BEACHTOWEL01 +#define MI_BEACHTOWEL02 gpModelIndices->BEACHTOWEL02 +#define MI_BEACHTOWEL03 gpModelIndices->BEACHTOWEL03 +#define MI_BEACHTOWEL04 gpModelIndices->BEACHTOWEL04 +#define MI_BLIMP_NIGHT gpModelIndices->BLIMP_NIGHT +#define MI_BLIMP_DAY gpModelIndices->BLIMP_DAY +#define MI_YT_MAIN_BODY gpModelIndices->YT_MAIN_BODY +#define MI_YT_MAIN_BODY2 gpModelIndices->YT_MAIN_BODY2 +#define MI_SMALL_HELIX gpModelIndices->SMALL_HELIX +#define MI_PT_BARRIER gpModelIndices->PT_BARRIER +#define MI_SUBWAYGATE gpModelIndices->SUBWAYGATE +#define MI_IN_PMBRIDRAMP3 gpModelIndices->IN_PMBRIDRAMP3 +#define MI_IN_PMBRIDG2_UPGS gpModelIndices->IN_PMBRIDG2_UPGS +#define MI_IN_PMBRIDGE2 gpModelIndices->IN_PMBRIDGE2 +#define MI_IN_PMBRIDG1_UPGS gpModelIndices->IN_PMBRIDG1_UPGS +#define MI_PM_LIGHTRIG3 gpModelIndices->PM_LIGHTRIG3 +#define MI_PM_LIGHTRIG1 gpModelIndices->PM_LIGHTRIG1 +#define MI_IN_PMSCAFF_UPS gpModelIndices->IN_PMSCAFF_UPS +#define MI_IN_PM_CONCBLOK2 gpModelIndices->IN_PM_CONCBLOK2 +#define MI_IN_PMSCAFFH_NS gpModelIndices->IN_PMSCAFFH_NS +#define MI_IN_PM_GRAVL_JMP gpModelIndices->IN_PM_GRAVL_JMP +#define MI_IN_PM_SCAFFCOVR gpModelIndices->IN_PM_SCAFFCOVR +#define MI_IN_PM_GIRDER2 gpModelIndices->IN_PM_GIRDER2 +#define MI_IN_PM_SCAFFH_WE gpModelIndices->IN_PM_SCAFFH_WE +#define MI_IN_PM_SIXCONC2 gpModelIndices->IN_PM_SIXCONC2 +#define MI_IN_BMBRIDRAMP3 gpModelIndices->IN_BMBRIDRAMP3 +#define MI_IN_BMBRIDG2_UPGS gpModelIndices->IN_BMBRIDG2_UPGS +#define MI_IN_BMBRIDGE2 gpModelIndices->IN_BMBRIDGE2 +#define MI_IN_BMBRIDG1_UPGS gpModelIndices->IN_BMBRIDG1_UPGS +#define MI_BM_LIGHTRIG3 gpModelIndices->BM_LIGHTRIG3 +#define MI_BM_LIGHTRIG1 gpModelIndices->BM_LIGHTRIG1 +#define MI_IN_BMSCAFF_UPS gpModelIndices->IN_BMSCAFF_UPS +#define MI_IN_BM_CONCBLOK2 gpModelIndices->IN_BM_CONCBLOK2 +#define MI_IN_BMSCAFFH_NS gpModelIndices->IN_BMSCAFFH_NS +#define MI_IN_BM_GRAVL_JMP gpModelIndices->IN_BM_GRAVL_JMP +#define MI_IN_BM_SCAFFCOVR gpModelIndices->IN_BM_SCAFFCOVR +#define MI_IN_BM_GIRDER2 gpModelIndices->IN_BM_GIRDER2 +#define MI_IN_BM_SCAFFH_WE gpModelIndices->IN_BM_SCAFFH_WE +#define MI_IN_BM_SIXCONC2 gpModelIndices->IN_BM_SIXCONC2 +#define MI_CRATE_SJL gpModelIndices->CRATE_SJL +#define MI_DOOR1_SJL gpModelIndices->DOOR1_SJL +#define MI_DOOR2_SJL gpModelIndices->DOOR2_SJL +#define MI_SJL_PORTACABIN gpModelIndices->SJL_PORTACABIN +#define MI_SJL_PORTACABINRED gpModelIndices->SJL_PORTACABINRED + #define MODELINDICES \ X("fire_hydrant", MI_FIRE_HYDRANT) \ + X("fire_hydrant", MI_FIRE_HYDRANT) /* BUG: second time */ \ + X("bagelstnd02", MI_BAGELSTAND2) \ + X("fish01", MI_FISHSTALL01) \ + X("fishstall02", MI_FISHSTALL02) \ + X("fishstall03", MI_FISHSTALL03) \ + X("fishstall04", MI_FISHSTALL04) \ + X("taxisign", MI_TAXISIGN) \ X("phonesign", MI_PHONESIGN) \ X("noparkingsign1", MI_NOPARKINGSIGN1) \ X("bussign1", MI_BUSSIGN1) \ @@ -16,12 +599,17 @@ X("wastebin", MI_WASTEBIN) \ X("phonebooth1", MI_PHONEBOOTH1) \ X("parkingmeter", MI_PARKINGMETER) \ + X("trafficlight1", MI_TRAFFICLIGHTS) \ + X("tlight_post", MI_TLIGHT_POST) \ + X("tlight_walk", MI_TLIGHT_WALK) \ + X("tlight_box1", MI_TLIGHT_BOX1) \ + X("tlight_box2", MI_TLIGHT_BOX2) \ X("parkingmeterg", MI_PARKINGMETER2) \ X("mall_fans", MI_MALLFAN) \ X("htl_fan_rotate_nt", MI_HOTELFAN_NIGHT) \ X("htl_fan_rotate_dy", MI_HOTELFAN_DAY) \ X("hotroomfan", MI_HOTROOMFAN) \ - X("trafficlight1", MI_TRAFFICLIGHTS) \ + X("trafficlight1", MI_TRAFFICLIGHTS) /* BUG: second time */ \ X("MTraffic4", MI_TRAFFICLIGHTS_VERTICAL) \ X("MTraffic1", MI_TRAFFICLIGHTS_MIAMI) \ X("MTraffic2", MI_TRAFFICLIGHTS_TWOVERTICAL) \ @@ -31,47 +619,110 @@ X("doublestreetlght1", MI_DOUBLESTREETLIGHTS) \ X("Streetlamp1", MI_STREETLAMP1) \ X("Streetlamp2", MI_STREETLAMP2) \ + X("rd_Road2A10", MI_ROADSFORROADBLOCKSSTART) \ + X("rd_Road1A30", MI_ROADSFORROADBLOCKSEND) \ + X("veg_tree1", MI_TREE1) \ X("veg_tree3", MI_TREE2) \ X("veg_treea1", MI_TREE3) \ + X("veg_treenew01", MI_TREE4) \ + X("veg_treenew05", MI_TREE5) \ X("veg_treeb1", MI_TREE6) \ + X("veg_treenew10", MI_TREE7) \ X("veg_treea3", MI_TREE8) \ - X("doc_crane_cab0", MODELID_CRANE_1) \ - X("doc_crane_cab01", MODELID_CRANE_2) \ - X("doc_crane_cab02", MODELID_CRANE_3) \ - X("doc_crane_cab03", MODELID_CRANE_4) \ - X("boatcranelg0", MODELID_CRANE_5) \ - X("LODnetopa0", MODELID_CRANE_6) \ + X("veg_treenew09", MI_TREE9) \ + X("veg_treenew08", MI_TREE10) \ + X("veg_treenew03", MI_TREE11) \ + X("veg_treenew16", MI_TREE12) \ + X("veg_treenew17", MI_TREE13) \ + X("veg_treenew06", MI_TREE14) \ + X("crusher_crane", MODELID_CRANE_1) \ X("package1", MI_COLLECTABLE1) \ X("Money", MI_MONEY) \ X("barrel1", MI_CARMINE) \ - X("dk_paynspraydoor", MI_GARAGEDOOR2) \ - X("dk_waretankdoor1", MI_GARAGEDOOR3) \ - X("hav_garagedoor1", MI_GARAGEDOOR4) \ - X("hav_garagedoor02", MI_GARAGEDOOR5) \ - X("hav_garagedoor03", MI_GARAGEDOOR6) \ - X("hav_garagedoor04", MI_GARAGEDOOR7) \ - X("lh_showdoor03", MI_GARAGEDOOR9) \ - X("lh_showdoor1", MI_GARAGEDOOR10) \ - X("lhtankdoor", MI_GARAGEDOOR11) \ - X("nbtgardoor", MI_GARAGEDOOR12) \ - X("dk_camjonesdoor", MI_GARAGEDOOR13) \ - X("nbtgardoor02", MI_GARAGEDOOR14) \ - X("dt_savedra", MI_GARAGEDOOR15) \ - X("dt_savedrb", MI_GARAGEDOOR16) \ - X("dk_bombdoor", MI_GARAGEDOOR18) \ - X("haiwshpnsdoor", MI_GARAGEDOOR19) \ - X("wshpnsdoor", MI_GARAGEDOOR20) \ - X("nbecpnsdoor", MI_GARAGEDOOR21) \ - X("nbtgardoor03", MI_GARAGEDOOR22) \ - X("dt_savedrc", MI_GARAGEDOOR23) \ - X("dt_savedrd", MI_GARAGEDOOR24) \ - X("man_frntstepGD", MI_GARAGEDOOR25) \ - X("svegrgedoor", MI_GARAGEDOOR26) \ + X("oddjgaragdoor", MI_GARAGEDOOR1) \ + X("bombdoor", MI_GARAGEDOOR2) \ + X("door_bombshop", MI_GARAGEDOOR3) \ + X("vheistlocdoor", MI_GARAGEDOOR4) \ + X("door2_garage", MI_GARAGEDOOR5) \ + X("ind_slidedoor", MI_GARAGEDOOR6) \ + X("bankjobdoor", MI_GARAGEDOOR7) \ + X("door_jmsgrage", MI_GARAGEDOOR9) \ + X("ind_safeh_gdoor", MI_GARAGEDOOR10) \ + X("door_sfehousegrge", MI_GARAGEDOOR11) \ + X("shedgaragedoor", MI_GARAGEDOOR12) \ + X("door4_garage", MI_GARAGEDOOR13) \ + X("door_col_compnd_01", MI_GARAGEDOOR14) \ + X("door_col_compnd_02", MI_GARAGEDOOR15) \ + X("door_col_compnd_03", MI_GARAGEDOOR16) \ + X("door_col_compnd_04", MI_GARAGEDOOR17) \ + X("door_col_compnd_05", MI_GARAGEDOOR18) \ + X("impex_door", MI_GARAGEDOOR19) \ + X("SalvGarage", MI_GARAGEDOOR20) \ + X("door3_garage", MI_GARAGEDOOR21) \ + X("leveldoor2", MI_GARAGEDOOR22) \ + X("double_garage_dr", MI_GARAGEDOOR23) \ + X("amcogaragedoor", MI_GARAGEDOOR24) \ + X("towergaragedoor1", MI_GARAGEDOOR25) \ + X("towergaragedoor2", MI_GARAGEDOOR26) \ + X("towergaragedoor3", MI_GARAGEDOOR27) \ + X("plysve_gragedoor", MI_GARAGEDOOR28) \ + X("impexpsubgrgdoor", MI_GARAGEDOOR29) \ + X("Sub_sprayshopdoor", MI_GARAGEDOOR30) \ + X("ind_plyrwoor", MI_GARAGEDOOR31) \ + X("8ballsuburbandoor", MI_GARAGEDOOR32) \ + X("door_nthgrage", MI_GARAGEDOOR33) \ + X("hangardoor1", MI_GARAGEDOOR34) \ + X("hangardoor2", MI_GARAGEDOOR35) \ + X("neds_door", MI_GARAGEDOOR36) \ + X("fs_wrhsedoor", MI_GARAGEDOOR37) \ + X("jm_ContraGarage", MI_GARAGEDOOR38) \ + X("jm_imp_SalvGarage", MI_GARAGEDOOR39) \ + X("Testramp1", MI_TESTRAMP1) /* BUG: LCS used MI_TESTRAMP2 here */ \ + X("Testramp2", MI_TESTRAMP2) \ X("barrel2", MI_NAUTICALMINE) \ + X("crushercrush", MI_CRUSHERBODY) \ + X("crushertop", MI_CRUSHERLID) \ + X("donkeymag", MI_DONKEYMAG) \ + X("bullion", MI_BULLION) \ + X("floatpackge1", MI_FLOATPACKAGE1) \ X("briefcase", MI_BRIEFCASE) \ - X("wglasssmash", MI_GLASS1) \ + X("chinabanner1", MI_CHINABANNER1) \ + X("chinabanner2", MI_CHINABANNER2) \ + X("chinabanner3", MI_CHINABANNER3) \ + X("chinabanner4", MI_CHINABANNER4) \ + X("iten_chinatown5", MI_CHINABANNER5) \ + X("iten_chinatown7", MI_CHINABANNER6) \ + X("iten_chinatown3", MI_CHINABANNER7) \ + X("iten_chinatown2", MI_CHINABANNER8) \ + X("iten_chinatown4", MI_CHINABANNER9) \ + X("iten_washline01", MI_CHINABANNER10) \ + X("iten_washline02", MI_CHINABANNER11) \ + X("iten_washline03", MI_CHINABANNER12) \ + X("chinalanterns", MI_CHINALANTERN) \ + X("glassfx1", MI_GLASS1) \ + X("glassfx2", MI_GLASS2) \ + X("glassfx3", MI_GLASS3) \ + X("glassfx4", MI_GLASS4) \ + X("glassfx55", MI_GLASS5) \ + X("glassfxsub1", MI_GLASS6) \ + X("glassfxsub2", MI_GLASS7) \ X("glassfx_composh", MI_GLASS8) \ + X("bridge_liftsec", MI_BRIDGELIFT) \ + X("bridge_liftweight", MI_BRIDGEWEIGHT) \ + X("subbridge_lift", MI_BRIDGEROADSEGMENT) \ + X("flagsitaly", MI_ITALYBANNER1) \ + X("small_helix", MI_SMALL_HELIX) \ X("barrel4", MI_EXPLODINGBARREL) \ + X("Crate_sjl", MI_CRATE_SJL) \ + X("Door1_sjl", MI_DOOR1_SJL) \ + X("Door2_sjl", MI_DOOR2_SJL) \ + X("SJL_PortaCabin", MI_SJL_PORTACABIN) \ + X("SJL_PortaCabinred", MI_SJL_PORTACABINRED) \ + X("megaDamage", MI_MEGADAMAGE) \ + X("regenerator", MI_REGENERATOR) \ + X("invisible", MI_INVISIBLE) \ + X("good_car", MI_GOOD_CAR) \ + X("bad_car", MI_BAD_CAR) \ X("adrenaline", MI_PICKUP_ADRENALINE) \ X("bodyarmour", MI_PICKUP_BODYARMOUR) \ X("info", MI_PICKUP_INFO) \ @@ -82,16 +733,57 @@ X("camerapickup", MI_PICKUP_CAMERA) \ X("bigdollar", MI_PICKUP_REVENUE) \ X("pickupsave", MI_PICKUP_SAVEGAME) \ + X("clothesp", MI_PICKUP_CLOTHES) \ X("property_locked", MI_PICKUP_PROPERTY) \ X("property_fsale", MI_PICKUP_PROPERTY_FORSALE) \ - X("clothesp", MI_PICKUP_CLOTHES) \ X("bollardlight", MI_BOLLARDLIGHT) \ + X("ca_sp1", MI_CA_SP1) \ + X("ca_sp2", MI_CA_SP2) \ + X("ca_sp3", MI_CA_SP3) \ + X("ca_sp4", MI_CA_SP4) \ + X("package1izzy", MI_PACKAGE1IZZY) \ + X("magnet", MI_MAGNET) \ + X("streetlamp1", MI_STREETLAMP1) \ + X("streetlamp2", MI_STREETLAMP2) \ + X("railtrax_lo4b", MI_RAILTRACKS) \ X("bar_barrier10", MI_FENCE) \ X("bar_barrier12", MI_FENCE2) \ X("petrolpump", MI_PETROLPUMP) \ X("washgaspump", MI_PETROLPUMP2) \ + X("bodycast", MI_BODYCAST) \ + X("izzy_confDoor", MI_IZZY_CONFDOOR) \ + X("shipdoor", MI_SHIPDOOR) \ + X("izzy_jdDoor", MI_IZZY_JDDOOR) \ + X("izzy_jdDoor_slider", MI_IZZY_JDDOOR_SLIDER) \ + X("litehouse_gate", MI_LITEHOUSE_GATE) \ + X("coffee", MI_COFFEE) \ X("bouy", MI_BUOY) \ X("parktable1", MI_PARKTABLE) \ + X("sbwy_tunl_start", MI_SUBWAY1) \ + X("sbwy_tunl_bit", MI_SUBWAY2) \ + X("sbwy_tunl_bend", MI_SUBWAY3) \ + X("sbwy_tunl_cstm6", MI_SUBWAY4) \ + X("sbwy_tunl_cstm7", MI_SUBWAY5) \ + X("sbwy_tunl_cstm8", MI_SUBWAY6) \ + X("sbwy_tunl_cstm10", MI_SUBWAY7) \ + X("sbwy_tunl_cstm9", MI_SUBWAY8) \ + X("sbwy_tunl_cstm11", MI_SUBWAY9) \ + X("sbwy_tunl_cstm1", MI_SUBWAY10) \ + X("sbwy_tunl_cstm2", MI_SUBWAY11) \ + X("sbwy_tunl_cstm4", MI_SUBWAY12) \ + X("sbwy_tunl_cstm3", MI_SUBWAY13) \ + X("sbwy_tunl_cstm5", MI_SUBWAY14) \ + X("subplatform_n2", MI_SUBWAY15) \ + X("suby_tunl_start", MI_SUBWAY16) \ + X("sbwy_tunl_start2", MI_SUBWAY17) \ + X("indy_tunl_start", MI_SUBWAY18) \ + X("indsubway03", MI_SUBPLATFORM_IND) \ + X("comerside_subway", MI_SUBPLATFORM_COMS) \ + X("subplatform", MI_SUBPLATFORM_COMS2) \ + X("subplatform_n", MI_SUBPLATFORM_COMN) \ + X("Otherside_subway", MI_SUBPLATFORM_SUB) \ + X("subplatform_sub", MI_SUBPLATFORM_SUB2) \ + X("files", MI_FILES) \ X("lamppost1", MI_LAMPPOST1) \ X("veg_palm04", MI_VEG_PALM01) \ X("veg_palwee02", MI_VEG_PALM02) \ @@ -107,10 +799,12 @@ X("telgrphpole02", MI_TELPOLE02) \ X("trafficlight1", MI_TRAFFICLIGHT01) \ X("parkbench1", MI_PARKBENCH) \ + X("Money", MI_MONEY) \ X("plc_stinger", MI_PLC_STINGER) \ X("od_lightbeam", MI_LIGHTBEAM) \ X("ap_radar1_01", MI_AIRPORTRADAR) \ X("rcbomb", MI_RCBOMB) \ + X("jm_salradio", MI_JM_SALRADIO) \ X("beachball", MI_BEACHBALL) \ X("sandcastle1", MI_SANDCASTLE1) \ X("sandcastle2", MI_SANDCASTLE2) \ @@ -138,11 +832,42 @@ X("blimp_night", MI_BLIMP_NIGHT) \ X("blimp_day", MI_BLIMP_DAY) \ X("yt_main_body", MI_YT_MAIN_BODY) \ - X("yt_main_body2", MI_YT_MAIN_BODY2) + X("pt_barrier", MI_PT_BARRIER) \ + X("subwaygate", MI_SUBWAYGATE) \ + X("in_PMbridramp3", MI_IN_PMBRIDRAMP3) \ + X("in_PMbridg2_upgs", MI_IN_PMBRIDG2_UPGS) \ + X("in_PMbridge2", MI_IN_PMBRIDGE2) \ + X("in_PMbridg1_upgs", MI_IN_PMBRIDG1_UPGS) \ + X("pm_lightrig3", MI_PM_LIGHTRIG3) \ + X("pm_lightrig1", MI_PM_LIGHTRIG1) \ + X("in_pmSCAFF_UPS", MI_IN_PMSCAFF_UPS) \ + X("in_pm_concblok2", MI_IN_PM_CONCBLOK2) \ + X("in_pmSCAFFH_ns", MI_IN_PMSCAFFH_NS) \ + X("in_pm_gravl_jmp", MI_IN_PM_GRAVL_JMP) \ + X("in_pm_scaffcovr", MI_IN_PM_SCAFFCOVR) \ + X("in_pm_girder2", MI_IN_PM_GIRDER2) \ + X("in_pm_scaffH_we", MI_IN_PM_SCAFFH_WE) \ + X("in_pm_sixconc2", MI_IN_PM_SIXCONC2) \ + X("in_BMbridramp3", MI_IN_BMBRIDRAMP3) \ + X("in_BMbridg2_upgs", MI_IN_BMBRIDG2_UPGS) \ + X("in_BMbridge2", MI_IN_BMBRIDGE2) \ + X("in_BMbridg1_upgs", MI_IN_BMBRIDG1_UPGS) \ + X("Bm_lightrig3", MI_BM_LIGHTRIG3) \ + X("bm_lightrig1", MI_BM_LIGHTRIG1) \ + X("in_BmSCAFF_UPS", MI_IN_BMSCAFF_UPS) \ + X("in_Bm_concblok2", MI_IN_BM_CONCBLOK2) \ + X("in_BmSCAFFH_ns", MI_IN_BMSCAFFH_NS) \ + X("in_Bm_gravl_jmp", MI_IN_BM_GRAVL_JMP) \ + X("in_Bm_scaffcovr", MI_IN_BM_SCAFFCOVR) \ + X("in_Bm_girder2", MI_IN_BM_GIRDER2) \ + X("in_Bm_scaffH_we", MI_IN_BM_SCAFFH_WE) \ + X("in_Bm_sixconc2", MI_IN_BM_SIXCONC2) + + /*X("yt_main_body2", MI_YT_MAIN_BODY2) \*/ -#define X(name, var) extern int16 var; - MODELINDICES -#undef X +//#define X(name, var) extern int16 var; +// MODELINDICES +//#undef X // and some hardcoded ones // expand as needed @@ -157,96 +882,87 @@ enum MI_FIREMAN, MI_MALE01, - MI_HFYST = 9, - MI_HFOST, - MI_HMYST, - MI_HMOST, - MI_HFYRI, - MI_HFORI, - MI_HMYRI, - MI_HMORI, - MI_HFYBE, - MI_HFOBE, - MI_HMYBE, - MI_HMOBE, - MI_HFYBU, - MI_HFYMD, - MI_HFYCG, - MI_HFYPR, - MI_HFOTR, - MI_HMOTR, - MI_HMYAP, - MI_HMOCA, - MI_TAXI_D = MI_HMOCA, - MI_BMODK, - MI_BMYKR, - MI_BFYST, - MI_BFOST, - MI_BMYST, - MI_BMOST, - MI_BFYRI, - MI_BFORI, - MI_BMYRI, - MI_BFYBE, - MI_BMYBE, - MI_BFOBE, - MI_BMOBE, - MI_BMYBU, - MI_BFYPR, - MI_BFOTR, - MI_BMOTR, - MI_BMYPI, - MI_BMYBB, - MI_WMYCR, - MI_WFYST, - MI_WFOST, - MI_WMYST, - MI_WMOST, - MI_WFYRI, - MI_WFORI, - MI_WMYRI, - MI_WMORI, - MI_WFYBE, - MI_WMYBE, - MI_WFOBE, - MI_WMOBE, - MI_WMYCW, - MI_WMYGO, - MI_WFOGO, - MI_WMOGO, - MI_WFYLG, - MI_WMYLG, - MI_WFYBU, - MI_WMYBU, - MI_WMOBU, - MI_WFYPR, - MI_WFOTR, - MI_WMOTR, - MI_WMYPI, - MI_WMOCA, - MI_WFYJG, - MI_WMYJG, - MI_WFYSK, - MI_WMYSK, - MI_WFYSH, - MI_WFOSH, - MI_JFOTO, - MI_JMOTO, + MI_TAXI_D = 9, + MI_PIMP, + MI_CRIMINAL01, + MI_CRIMINAL02, + MI_MALE02, + MI_MALE03, + MI_FATMALE01, + MI_FATMALE02, + MI_FEMALE01, + MI_FEMALE02, + MI_FEMALE03, + MI_FATFEMALE01, + MI_FATFEMALE02, + MI_PROSTITUTE, + MI_PROSTITUTE2, + MI_P_MAN1, + MI_P_MAN2, + MI_P_WOM1, + MI_P_WOM2, + MI_CT_MAN1, + MI_CT_MAN2, + MI_CT_WOM1, + MI_CT_WOM2, + MI_LI_MAN1, + MI_LI_MAN2, + MI_LI_WOM1, + MI_LI_WOM2, + MI_DOCKER1, + MI_DOCKER2, + MI_SCUM_MAN, + MI_SCUM_WOM, + MI_WORKER1, + MI_WORKER2, + MI_B_MAN1, + MI_B_MAN2, + MI_B_MAN3, + MI_B_WOM1, + MI_B_WOM2, + MI_B_WOM3, + MI_MOD_MAN, + MI_MOD_WOM, + MI_ST_MAN, + MI_ST_WOM, + MI_FAN_MAN1, + MI_FAN_MAN2, + MI_FAN_WOM, + MI_HOS_MAN, + MI_HOS_WOM, + MI_CONST1, + MI_CONST2, + MI_SHOPPER1, + MI_SHOPPER2, + MI_SHOPPER3, + MI_STUD_MAN, + MI_STUD_WOM, + MI_CAS_MAN, + MI_CAS_WOM, + MI_CAMP_MAN, + MI_CAMP_WOM, + MI_HITMAN, - MI_CBA,// = 83, - MI_CBB, - MI_HNA, - MI_HNB, - MI_SGA, - MI_SGB, - MI_CLA, - MI_CLB, - MI_GDA, - MI_GDB, - MI_BKA, - MI_BKB, - MI_PGA, - MI_PGB, + MI_JFOTO = 77, + MI_JMOTO, + MI_GANG01, + MI_GANG02, + MI_GANG03, + MI_GANG04, + MI_GANG05, + MI_GANG06, + MI_GANG07, + MI_GANG08, + MI_GANG09, + MI_GANG10, + MI_GANG11, + MI_GANG12, + MI_GANG13, + MI_GANG14, + MI_GANG15, + MI_GANG16, + MI_GANG17, + MI_GANG18, MI_VICE1, MI_VICE2, MI_VICE3, @@ -283,19 +999,20 @@ enum MI_LAST_PED = MI_SPECIAL21, MI_FIRST_VEHICLE, - MI_LANDSTAL = MI_FIRST_VEHICLE, + MI_SPIDER = MI_FIRST_VEHICLE, + MI_LANDSTAL, MI_IDAHO, MI_STINGER, MI_LINERUN, MI_PEREN, MI_SENTINEL, - MI_RIO, + MI_PATRIOT, MI_FIRETRUCK, MI_TRASH, MI_STRETCH, MI_MANANA, MI_INFERNUS, - MI_VOODOO, + MI_BLISTA, MI_PONY, MI_MULE, MI_CHEETAH, @@ -304,100 +1021,120 @@ enum MI_MOONBEAM, MI_ESPERANT, MI_TAXI, - MI_WASHING, + MI_KURUMA, MI_BOBCAT, MI_MRWHOOP, MI_BFINJECT, - MI_HUNTER, + MI_HEARSE, MI_POLICE, MI_ENFORCER, MI_SECURICA, MI_BANSHEE, - MI_PREDATOR, MI_BUS, MI_RHINO, MI_BARRACKS, - MI_CUBAN, - MI_CHOPPER, - MI_ANGEL, + MI_DODO, MI_COACH, MI_CABBIE, MI_STALLION, MI_RUMPO, MI_RCBANDIT, - MI_ROMERO, - MI_PACKER, - MI_SENTXS, - MI_ADMIRAL, - MI_SQUALO, - MI_SEASPAR, - MI_PIZZABOY, - MI_GANGBUR, - MI_AIRTRAIN, - MI_DEADDODO, - MI_SPEEDER, - MI_REEFER, - MI_TROPIC, + MI_BELLYUP, + MI_MRWONGS, + MI_MAFIA, + MI_YARDIE, + MI_YAKUZA, + MI_DIABLOS, + MI_COLUMB, + MI_HOODS, + MI_PANLANT, MI_FLATBED, MI_YANKEE, - MI_CADDY, - MI_ZEBRA, - MI_TOPFUN, - MI_SKIMMER, + MI_BORGNINE, + MI_TOYZ, + MI_CAMPVAN, + MI_BALLOT, + MI_SHELBY, + MI_PONTIAC, + MI_ESPRIT, + MI_AMMOTRUK, + MI_HOTROD, + MI_SINDACCO_CAR, + MI_FORELLI_CAR, + MI_FERRY, + MI_GHOST, + MI_SPEEDER, + MI_REEFER, + MI_PREDATOR, + MI_TRAIN, + MI_ESCAPE, + MI_CHOPPER, + MI_AIRTRAIN, + MI_DEADDODO, + MI_ANGEL, + MI_PIZZABOY, + MI_NOODLEBOY, MI_PCJ600, MI_FAGGIO, MI_FREEWAY, - MI_RCBARON, - MI_RCRAIDER, - MI_GLENDALE, - MI_OCEANIC, + MI_ANGEL2, + MI_SANCHEZ2, MI_SANCHEZ, + MI_RCGOBLIN, + MI_RCRAIDER, + MI_HUNTER, + MI_MAVERICK, + MI_POLMAV, + MI_VCNMAV, + + MI_LAST_VEHICLE = MI_VCNMAV, + + // HACK HACK, hopefully temporary + MI_SEASPAR = -1000, MI_SPARROW, - MI_PATRIOT, - MI_LOVEFIST, + MI_RCBARON, + MI_TOPFUN, + MI_CADDY, + MI_BAGGAGE, + MI_FBIRANCH, + MI_VICECHEE, + MI_RIO, + MI_SQUALO, + MI_JETMAX, MI_COASTG, MI_DINGHY, - MI_HERMES, - MI_SABRE, - MI_SABRETUR, + MI_MARQUIS, + MI_SKIMMER, + MI_TROPIC, + MI_SANDKING, + MI_VOODOO, + MI_CUBAN, MI_PHEONIX, - MI_WALTON, - MI_REGINA, MI_COMET, + MI_SABRE, + MI_VIRGO, + MI_RANCHER, + MI_BLISTAC, + MI_WASHING, + MI_ADMIRAL, + MI_SABRETUR, MI_DELUXO, + MI_HOTRING, + MI_REGINA, + MI_SENTXS, + MI_GLENDALE, + MI_OCEANIC, + MI_HERMES, + MI_GREENWOO, + MI_LOVEFIST, + MI_GANGBUR, MI_BURRITO, MI_SPAND, - MI_MARQUIS, - MI_BAGGAGE, - MI_KAUFMAN, - MI_MAVERICK, - MI_VCNMAV, - MI_RANCHER, - MI_FBIRANCH, - MI_VIRGO, - MI_GREENWOO, - MI_JETMAX, - MI_HOTRING, - MI_SANDKING, - MI_BLISTAC, - MI_POLMAV, - MI_BOXVILLE, - MI_BENSON, - MI_MESA, - MI_RCGOBLIN, - MI_HOTRINA, - MI_HOTRINB, - MI_BLOODRA, - MI_BLOODRB, - MI_VICECHEE, - - // HACK - MI_TRAIN = -1, - MI_DODO = -2, - - MI_LAST_VEHICLE = MI_VICECHEE, + MI_PACKER, + MI_WALTON, + MI_ROMERO, - MI_WHEEL_RIM, + MI_WHEEL_RIM = 237, MI_WHEEL_OFFROAD, MI_WHEEL_TRUCK, @@ -458,14 +1195,18 @@ enum MI_FINGERS, MI_MINIGUN2, - MI_CUTOBJ01,// = 295, + MI_CUTOBJ01 = 120, MI_CUTOBJ02, MI_CUTOBJ03, MI_CUTOBJ04, MI_CUTOBJ05, + MI_CUTOBJ06, + MI_CUTOBJ07, + MI_CUTOBJ08, + MI_CUTOBJ09, + MI_CUTOBJ10, - - NUM_DEFAULT_MODELS,// = 300 + NUM_DEFAULT_MODELS = 300 }; enum{ @@ -519,11 +1260,7 @@ IsLightThatNeedsRepositioning(int16 id) return id == MI_SINGLESTREETLIGHTS1 || id == MI_SINGLESTREETLIGHTS2 || id == MI_SINGLESTREETLIGHTS3 || - id == MI_TRAFFICLIGHTS_MIAMI || - id == MI_TRAFFICLIGHTS_TWOVERTICAL || - id == MI_MLAMPPOST || - id == MI_STREETLAMP1 || - id == MI_STREETLAMP2; + id == MI_DOUBLESTREETLIGHTS; } inline bool @@ -535,7 +1272,9 @@ IsLightObject(int16 id) id == MI_SINGLESTREETLIGHTS2 || id == MI_SINGLESTREETLIGHTS3 || id == MI_DOUBLESTREETLIGHTS || - id == MI_TRAFFICLIGHTS_TWOVERTICAL; + id == MI_TRAFFICLIGHTS_TWOVERTICAL || + id == MI_TRAFFICLIGHTS || + id == MI_FENCE; } inline bool @@ -567,24 +1306,26 @@ IsPedModel(int16 id) inline bool IsPalmTreeModel(int16 id) { - return id == MI_VEG_PALM01 || - id == MI_VEG_PALM02 || - id == MI_VEG_PALM03 || - id == MI_VEG_PALM04 || - id == MI_VEG_PALM05 || - id == MI_VEG_PALM06 || - id == MI_VEG_PALM07 || - id == MI_VEG_PALM08; + return false; } inline bool IsTreeModel(int16 id) { - return id == MI_TREE2 || + return id == MI_TREE1 || + id == MI_TREE2 || id == MI_TREE3 || + id == MI_TREE4 || + id == MI_TREE5 || id == MI_TREE6 || + id == MI_TREE7 || id == MI_TREE8 || - IsPalmTreeModel(id); + id == MI_TREE9 || + id == MI_TREE10 || + id == MI_TREE11 || + id == MI_TREE12 || + id == MI_TREE13 || + id == MI_TREE14; } inline bool diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp index 41515e20..47f4e309 100644 --- a/src/modelinfo/ModelInfo.cpp +++ b/src/modelinfo/ModelInfo.cpp @@ -4,6 +4,7 @@ #include "TempColModels.h" #include "ModelIndices.h" #include "ModelInfo.h" +#include "KeyGen.h" CBaseModelInfo *CModelInfo::ms_modelInfoPtrs[MODELINFOSIZE]; @@ -184,10 +185,11 @@ CModelInfo::AddVehicleModel(int id) CBaseModelInfo* CModelInfo::GetModelInfo(const char *name, int *id) { + uint32 hashKey = CKeyGen::GetUppercaseKey(name); CBaseModelInfo *modelinfo; for(int i = 0; i < MODELINFOSIZE; i++){ modelinfo = CModelInfo::ms_modelInfoPtrs[i]; - if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)){ + if(modelinfo && hashKey == modelinfo->GetNameHashKey()){ if(id) *id = i; return modelinfo; @@ -199,13 +201,14 @@ CModelInfo::GetModelInfo(const char *name, int *id) CBaseModelInfo* CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex) { + uint32 hashKey = CKeyGen::GetUppercaseKey(name); if (minIndex > maxIndex) return 0; CBaseModelInfo *modelinfo; for(int i = minIndex; i <= maxIndex; i++){ modelinfo = CModelInfo::ms_modelInfoPtrs[i]; - if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)) + if(modelinfo && hashKey == modelinfo->GetNameHashKey()) return modelinfo; } return nil; diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp index 25b260d3..1d519b10 100644 --- a/src/modelinfo/PedModelInfo.cpp +++ b/src/modelinfo/PedModelInfo.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "RwHelper.h" #include "General.h" #include "Bones.h" @@ -9,12 +10,19 @@ #include "VisibilityPlugins.h" #include "ModelInfo.h" #include "custompipes.h" +#include "Streaming.h" +#include "Leeds.h" +#include "TempColModels.h" + +base::cRelocatableChunkClassInfo CPedModelInfo::msClassInfo("CPedModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); +CPedModelInfo CPedModelInfo::msClassInstance; void CPedModelInfo::DeleteRwObject(void) { + CStreaming::UnregisterPointer(&m_hitColModel, 2); CClumpModelInfo::DeleteRwObject(); - if(m_hitColModel) + if(!gUseChunkFiles && m_hitColModel) delete m_hitColModel; m_hitColModel = nil; } @@ -41,13 +49,15 @@ CPedModelInfo::SetClump(RpClump *clump) #ifdef EXTENDED_PIPELINES CustomPipes::AttachRimPipe(clump); #endif + if(!IsClumpSkinned(clump)) + return; CClumpModelInfo::SetClump(clump); SetFrameIds(m_pPedIds); // not needed in VC actually if(m_hitColModel == nil) CreateHitColModelSkinned(clump); RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPedCB); - if(strcmp(GetModelName(), "player") == 0) - RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB); + //if(strcmp(GetModelName(), "player") == 0) + // RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB); } struct ColNodeInfo @@ -73,46 +83,27 @@ ColNodeInfo m_pColNodeInfos[NUMPEDINFONODES] = { { nil, PED_FOOTR, PEDPIECE_RIGHTLEG, 0.0f, 0.15f, 0.15f }, }; -void +bool CPedModelInfo::CreateHitColModelSkinned(RpClump *clump) { - RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(clump); CColModel *colmodel = new CColModel; CColSphere *spheres = (CColSphere*)RwMalloc(NUMPEDINFONODES*sizeof(CColSphere)); - RwFrame *root = RpClumpGetFrame(m_clump); - RwMatrix *invmat = RwMatrixCreate(); - RwMatrix *mat = RwMatrixCreate(); - RwMatrixInvert(invmat, RwFrameGetMatrix(RpClumpGetFrame(clump))); for(int i = 0; i < NUMPEDINFONODES; i++){ - *mat = *invmat; - - // From LCS. Otherwise gives FPE -#ifdef FIX_BUGS - spheres[i].center = CVector(0.0f, 0.0f, 0.0f); -#else - int id = ConvertPedNode2BoneTag(m_pColNodeInfos[i].pedNode); // this is wrong, wtf R* ??? - int idx = RpHAnimIDGetIndex(hier, id); - - // This doesn't really work as the positions are not initialized yet - RwMatrixTransform(mat, &RpHAnimHierarchyGetMatrixArray(hier)[idx], rwCOMBINEPRECONCAT); - RwV3d pos = { 0.0f, 0.0f, 0.0f }; - RwV3dTransformPoints(&pos, &pos, 1, mat); - - spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z); -#endif + spheres[i].center.x = 0.0f; + spheres[i].center.y = 0.0f; + spheres[i].center.z = 0.0f; spheres[i].radius = m_pColNodeInfos[i].radius; spheres[i].surface = SURFACE_PED; spheres[i].piece = m_pColNodeInfos[i].pieceType; } - RwMatrixDestroy(invmat); - RwMatrixDestroy(mat); colmodel->spheres = spheres; colmodel->numSpheres = NUMPEDINFONODES; colmodel->boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f)); colmodel->boundingBox.Set(CVector(-0.5f, -0.5f, -1.2f), CVector(0.5f, 0.5f, 1.2f)); colmodel->level = LEVEL_GENERIC; m_hitColModel = colmodel; + return true; } CColModel* @@ -120,28 +111,27 @@ CPedModelInfo::AnimatePedColModelSkinned(RpClump *clump) { if(m_hitColModel == nil){ CreateHitColModelSkinned(clump); +#ifndef FIX_BUGS return m_hitColModel; +#endif + // we should really animate this now } - RwMatrix *invmat, *mat; + RwMatrix invmat, mat; CColSphere *spheres = m_hitColModel->spheres; RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(clump); - invmat = RwMatrixCreate(); - mat = RwMatrixCreate(); - RwMatrixInvert(invmat, RwFrameGetMatrix(RpClumpGetFrame(clump))); + RwMatrixInvert(&invmat, RwFrameGetMatrix(RpClumpGetFrame(clump))); for(int i = 0; i < NUMPEDINFONODES; i++){ - *mat = *invmat; + mat = invmat; int id = ConvertPedNode2BoneTag(m_pColNodeInfos[i].pedNode); int idx = RpHAnimIDGetIndex(hier, id); - RwMatrixTransform(mat, &RpHAnimHierarchyGetMatrixArray(hier)[idx], rwCOMBINEPRECONCAT); - RwV3d pos = { 0.0f, 0.0f, 0.0f }; - RwV3dTransformPoints(&pos, &pos, 1, mat); + RwMatrixTransform(&mat, &RpHAnimHierarchyGetMatrixArray(hier)[idx], rwCOMBINEPRECONCAT); + RwV3d pos = { 0.0f, 0.0f, 0.0f }; // actually CVector + RwV3dTransformPoints(&pos, &pos, 1, &mat); spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z); } - RwMatrixDestroy(invmat); - RwMatrixDestroy(mat); return m_hitColModel; } @@ -159,10 +149,71 @@ CPedModelInfo::AnimatePedColModelSkinnedWorld(RpClump *clump) int idx = RpHAnimIDGetIndex(hier, id); mat = &RpHAnimHierarchyGetMatrixArray(hier)[idx]; - RwV3d pos = { 0.0f, 0.0f, 0.0f }; + RwV3d pos = { 0.0f, 0.0f, 0.0f }; // actually CVector RwV3dTransformPoints(&pos, &pos, 1, mat); spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z); } return m_hitColModel; } + + +struct PedChunk +{ + CColModel *colmodel; + RpClump *clump; +}; + +void +CPedModelInfo::LoadModel(void *data, const void *chunk) +{ + PedChunk *chk = (PedChunk*)data; + m_hitColModel = chk->colmodel; + CStreaming::RegisterPointer(&m_hitColModel, 2, true); + CClumpModelInfo::LoadModel(chk->clump, chunk); +} + +void +CPedModelInfo::Write(base::cRelocatableChunkWriter &writer) +{ + SetColModel(&gpTempColModels->ms_colModelPed1); + CClumpModelInfo::Write(writer); + if(m_hitColModel){ + writer.AddPatch(&m_hitColModel); + m_hitColModel->Write(writer, true); + } +} + +void* +CPedModelInfo::WriteModel(base::cRelocatableChunkWriter &writer) +{ + PedChunk *chunk = new PedChunk; // LEAK + chunk->colmodel = nil; + chunk->clump = nil; + writer.AllocateRaw(chunk, sizeof(*chunk), sizeof(void*), false, true); + + chunk->clump = (RpClump*)CClumpModelInfo::WriteModel(writer); + if(chunk->clump) + writer.AddPatch(&chunk->clump); + + chunk->colmodel = m_hitColModel; + if(chunk->colmodel){ + writer.AddPatch(&chunk->colmodel); + chunk->colmodel->Write(writer, true); + } + return nil; +} + +void +CPedModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} + +void +CPedModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/PedModelInfo.h b/src/modelinfo/PedModelInfo.h index 79bd7eaa..7baa2bd8 100644 --- a/src/modelinfo/PedModelInfo.h +++ b/src/modelinfo/PedModelInfo.h @@ -38,6 +38,8 @@ public: CColModel *m_hitColModel; int8 radio1, radio2; + static base::cRelocatableChunkClassInfo msClassInfo; + static CPedModelInfo msClassInstance; static RwObjectNameIdAssocation m_pPedIds[PED_NODE_MAX]; CPedModelInfo(void) : CClumpModelInfo(MITYPE_PED) { m_hitColModel = nil; } @@ -45,7 +47,13 @@ public: void DeleteRwObject(void); void SetClump(RpClump *); - void CreateHitColModelSkinned(RpClump *clump); + virtual void LoadModel(void *model, const void *chunk); + virtual void Write(base::cRelocatableChunkWriter &writer); + virtual void *WriteModel(base::cRelocatableChunkWriter &writer); + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); + + bool CreateHitColModelSkinned(RpClump *clump); CColModel *GetHitColModel(void) { return m_hitColModel; } CColModel *AnimatePedColModelSkinned(RpClump *clump); CColModel *AnimatePedColModelSkinnedWorld(RpClump *clump); diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp index 18eb7e5f..8d0ea677 100644 --- a/src/modelinfo/SimpleModelInfo.cpp +++ b/src/modelinfo/SimpleModelInfo.cpp @@ -1,37 +1,61 @@ #include "common.h" +#include "main.h" #include "General.h" +#include "Renderer.h" #include "Camera.h" #include "Renderer.h" #include "ModelInfo.h" #include "AnimManager.h" #include "custompipes.h" +#include "Streaming.h" +#include "smallHeap.h" +#include "Leeds.h" + +TempIdeData m_sTempIdeData[800]; + +base::cRelocatableChunkClassInfo CSimpleModelInfo::msClassInfo("CSimpleModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); +CSimpleModelInfo CSimpleModelInfo::msClassInstance; void CSimpleModelInfo::DeleteRwObject(void) { int i; RwFrame *f; - for(i = 0; i < m_numAtomics; i++) - if(m_atomics[i]){ - f = RpAtomicGetFrame(m_atomics[i]); - RpAtomicDestroy(m_atomics[i]); - RwFrameDestroy(f); - m_atomics[i] = nil; - RemoveTexDictionaryRef(); - if(GetAnimFileIndex() != -1) - CAnimManager::RemoveAnimBlockRef(GetAnimFileIndex()); - } + if(m_atomics == nil) + return; + if(!gUseChunkFiles){ + for(i = 0; i < m_numAtomics; i++) + if(m_atomics[i]){ + f = RpAtomicGetFrame(m_atomics[i]); + RpAtomicDestroy(m_atomics[i]); + RwFrameDestroy(f); + m_atomics[i] = nil; + RemoveTexDictionaryRef(); + if(GetAnimFileIndex() != -1) + CAnimManager::RemoveAnimBlockRef(GetAnimFileIndex()); + } + }else if(m_chunk){ + CStreaming::UnregisterPointer(&m_atomics, 2); + for(i = 0; i < m_numAtomics; i++) + CStreaming::UnregisterAtomic(m_atomics[i], nil); + DeleteChunk(); + RemoveTexDictionaryRef(); + if(GetAnimFileIndex() != -1) + CAnimManager::RemoveAnimBlockRef(GetAnimFileIndex()); + } + m_atomics = nil; } RwObject* CSimpleModelInfo::CreateInstance(void) { RpAtomic *atomic; - if(m_atomics[0] == nil) + if(m_atomics == nil || m_atomics[0] == nil) return nil; atomic = RpAtomicClone(m_atomics[0]); RpAtomicSetFrame(atomic, RwFrameCreate()); + CStreaming::RegisterInstance(atomic, nil); return (RwObject*)atomic; } @@ -41,21 +65,20 @@ CSimpleModelInfo::CreateInstance(RwMatrix *matrix) RpAtomic *atomic; RwFrame *frame; - if(m_atomics[0] == nil) + if(m_atomics == nil || m_atomics[0] == nil) return nil; atomic = RpAtomicClone(m_atomics[0]); frame = RwFrameCreate(); *RwFrameGetMatrix(frame) = *matrix; RpAtomicSetFrame(atomic, frame); + CStreaming::RegisterInstance(atomic, nil); return (RwObject*)atomic; } void CSimpleModelInfo::Init(void) { - m_atomics[0] = nil; - m_atomics[1] = nil; - m_atomics[2] = nil; + m_atomics = new RpAtomic*[3]; m_numAtomics = 0; m_firstDamaged = 0; m_wetRoadReflection = 0; @@ -71,21 +94,30 @@ CSimpleModelInfo::Init(void) m_ignoreDrawDist = 0; m_isCodeGlass = 0; m_isArtistGlass = 0; + m_relatedModel = nil; } void CSimpleModelInfo::SetAtomic(int n, RpAtomic *atomic) { - AddTexDictionaryRef(); + if(m_atomics == nil){ + m_atomics = new RpAtomic*[3]; + m_atomics[0] = nil; + m_atomics[1] = nil; + m_atomics[2] = nil; + } m_atomics[n] = atomic; + AddTexDictionaryRef(); if(GetAnimFileIndex() != -1) CAnimManager::AddAnimBlockRef(GetAnimFileIndex()); RpGeometry *geo = RpAtomicGetGeometry(atomic); if(m_ignoreLight) RpGeometrySetFlags(geo, RpGeometryGetFlags(geo) & ~rpGEOMETRYLIGHT); +/* if(RpGeometryGetFlags(geo) & rpGEOMETRYNORMALS && RpGeometryGetNumTriangles(geo) > 200) debug("%s has %d polys\n", m_name, RpGeometryGetNumTriangles(geo)); +*/ #ifdef EXTENDED_PIPELINES if(m_wetRoadReflection) @@ -136,10 +168,46 @@ CSimpleModelInfo::GetLargestLodDistance(void) } RpAtomic* +CSimpleModelInfo::GetLodAtomic(int n) +{ + if(m_atomics == nil || n >= m_numAtomics) + return nil; + return m_atomics[n]; +} + +RpAtomic* +CSimpleModelInfo::GetLastAtomic(void) +{ + if(m_atomics == nil) + return nil; + if(m_firstDamaged == 0 || m_isDamaged) + return m_atomics[m_numAtomics-1]; + else + return m_atomics[m_firstDamaged-1]; +} + +RpAtomic* +CSimpleModelInfo::GetLastAtomic(float dist) +{ + int n; + if(m_atomics == nil) + return nil; + if(m_firstDamaged == 0 || m_isDamaged) + n = m_numAtomics-1; + else + n = m_firstDamaged-1; + if(dist < m_lodDistances[n] * TheCamera.LODDistMultiplier) + return m_atomics[n]; + return nil; +} + +RpAtomic* CSimpleModelInfo::GetAtomicFromDistance(float dist) { int i; i = 0; +// HACk until we figure out what's going on +if(m_atomics == nil) return nil; if(m_isDamaged) i = m_firstDamaged; for(; i < m_numAtomics; i++) @@ -151,20 +219,40 @@ CSimpleModelInfo::GetAtomicFromDistance(float dist) RpAtomic* CSimpleModelInfo::GetFirstAtomicFromDistance(float dist) { +// HACk until we figure out what's going on +if(m_atomics == nil) return nil; if(dist < m_lodDistances[0] * TheCamera.LODDistMultiplier) return m_atomics[0]; return nil; } void -CSimpleModelInfo::FindRelatedModel(int32 minID, int32 maxID) +CSimpleModelInfo::FindRelatedModel(void) { - int i; CBaseModelInfo *mi; - for(i = minID; i <= maxID; i++){ - mi = CModelInfo::GetModelInfo(i); + int thisIndex, otherIndex; + + // find our own index in temp data + for(thisIndex = 0; thisIndex < ARRAY_SIZE(m_sTempIdeData); thisIndex++){ + if(m_sTempIdeData[thisIndex].id == -1) + break; + if(this == CModelInfo::GetModelInfo(m_sTempIdeData[thisIndex].id)) + goto found; + } + thisIndex = -1; +found: +#ifdef FIX_BUGS + if(thisIndex == -1) + return; +#endif + + for(otherIndex = 0; otherIndex < ARRAY_SIZE(m_sTempIdeData); otherIndex++){ + if(m_sTempIdeData[otherIndex].id == -1) + break; + + mi = CModelInfo::GetModelInfo(m_sTempIdeData[otherIndex].id); if(mi && mi != this && - !CGeneral::faststrcmp(GetModelName()+3, mi->GetModelName()+3)){ + !CGeneral::faststrcmp(m_sTempIdeData[thisIndex].name+3, m_sTempIdeData[otherIndex].name+3)){ assert(mi->IsSimple()); this->SetRelatedModel((CSimpleModelInfo*)mi); return; @@ -172,15 +260,17 @@ CSimpleModelInfo::FindRelatedModel(int32 minID, int32 maxID) } } -#define NEAR_DRAW_DIST 0.0f // 100.0f in liberty city +#define NEAR_DRAW_DIST 100.0f // 0.0f in vice city void -CSimpleModelInfo::SetupBigBuilding(int32 minID, int32 maxID) +CSimpleModelInfo::SetupBigBuilding(void) { CSimpleModelInfo *related; - if(m_lodDistances[0] > LOD_DISTANCE && GetRelatedModel() == nil){ + if(m_lodDistances[0] < 0.0f) + m_lodDistances[0] = -m_lodDistances[0]; // what? + else if(m_lodDistances[0] > LOD_DISTANCE && GetRelatedModel() == nil){ m_isBigBuilding = 1; - FindRelatedModel(minID, maxID); + FindRelatedModel(); related = GetRelatedModel(); if(related){ m_lodDistances[2] = related->GetLargestLodDistance()/TheCamera.LODDistMultiplier; @@ -192,3 +282,79 @@ CSimpleModelInfo::SetupBigBuilding(int32 minID, int32 maxID) m_lodDistances[2] = NEAR_DRAW_DIST; } } + + +void +CSimpleModelInfo::LoadModel(void *atomics, const void *chunk) +{ + int i; + m_chunk = (void*)chunk; + m_atomics = (RpAtomic**)atomics; + CStreaming::RegisterPointer(m_chunk, 2, true); + CStreaming::RegisterPointer(m_atomics, 2, true); + for(i = 0; i < m_numAtomics; i++){ + LoadResource(m_atomics[i]); + CStreaming::RegisterAtomic(m_atomics[i], nil); + } +} + +void +CSimpleModelInfo::Write(base::cRelocatableChunkWriter &writer) +{ + CBaseModelInfo::Write(writer); + if(WriteModel(writer)) + writer.AddPatch(&m_atomics); + else + m_atomics = nil; + if(m_isBigBuilding) + writer.AddPatch(&m_relatedModel); +} + +void* +CSimpleModelInfo::WriteModel(base::cRelocatableChunkWriter &writer) +{ + int i; + if(m_atomics == nil || m_atomics[0] == nil) + return nil; + + // remove empty atomics + int numAtomics = 0; + for(i = 0; i < m_numAtomics; i++) + if(m_atomics[i]){ + m_atomics[numAtomics] = m_atomics[i]; +#ifdef FIX_BUGS + m_lodDistances[numAtomics] = m_lodDistances[i]; +#endif + numAtomics++; + } + if(m_firstDamaged){ + int firstDam = m_firstDamaged - m_numAtomics + numAtomics; + if(firstDam < numAtomics) + m_firstDamaged = firstDam; + else + m_firstDamaged = 0; + } + m_numAtomics = numAtomics; + + // write the actual models + writer.AllocateRaw(m_atomics, m_numAtomics*sizeof(void*), sizeof(void*), false, true); + for(i = 0; m_numAtomics; i++){ + writer.AddPatch(&m_atomics[i]); + SaveResource(m_atomics[i], writer); + } + return m_atomics; +} + +void +CSimpleModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), 0x10, false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} + +void +CSimpleModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), 0x10, false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/SimpleModelInfo.h b/src/modelinfo/SimpleModelInfo.h index 986cb886..f9191944 100644 --- a/src/modelinfo/SimpleModelInfo.h +++ b/src/modelinfo/SimpleModelInfo.h @@ -2,11 +2,18 @@ #include "BaseModelInfo.h" +// For linking up models by name +struct TempIdeData +{ + char name[24]; + int16 id; +}; +extern TempIdeData m_sTempIdeData[800]; + class CSimpleModelInfo : public CBaseModelInfo { public: - // atomics[2] is often a pointer to the non-LOD modelinfo - RpAtomic *m_atomics[3]; + RpAtomic **m_atomics; // m_lodDistances[2] holds the near distance for LODs float m_lodDistances[3]; uint8 m_numAtomics; @@ -31,15 +38,26 @@ public: uint16 m_isCodeGlass : 1; uint16 m_isArtistGlass : 1; + CSimpleModelInfo *m_relatedModel; + + static base::cRelocatableChunkClassInfo msClassInfo; + static CSimpleModelInfo msClassInstance; + CSimpleModelInfo(void) : CBaseModelInfo(MITYPE_SIMPLE) {} CSimpleModelInfo(ModelInfoType id) : CBaseModelInfo(id) {} ~CSimpleModelInfo() {} void DeleteRwObject(void); RwObject *CreateInstance(void); RwObject *CreateInstance(RwMatrix *); - RwObject *GetRwObject(void) { return (RwObject*)m_atomics[0]; } + RwObject *GetRwObject(void) { return m_atomics ? (RwObject*)m_atomics[0] : nil; } + + virtual void LoadModel(void *atomics, const void *chunk); + virtual void Write(base::cRelocatableChunkWriter &writer); + virtual void *WriteModel(base::cRelocatableChunkWriter &writer); + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); - virtual void SetAtomic(int n, RpAtomic *atomic); + /*virtual*/ void SetAtomic(int n, RpAtomic *atomic); void Init(void); void IncreaseAlpha(void); @@ -47,15 +65,18 @@ public: float GetLodDistance(int i); float GetNearDistance(void); float GetLargestLodDistance(void); + RpAtomic *GetLodAtomic(int n); + RpAtomic *GetLastAtomic(void); + RpAtomic *GetLastAtomic(float dist); RpAtomic *GetAtomicFromDistance(float dist); RpAtomic *GetFirstAtomicFromDistance(float dist); - void FindRelatedModel(int32 minID, int32 maxID); - void SetupBigBuilding(int32 minID, int32 maxID); + void FindRelatedModel(void); + void SetupBigBuilding(void); void SetNumAtomics(int n) { m_numAtomics = n; } CSimpleModelInfo *GetRelatedModel(void){ - return (CSimpleModelInfo*)m_atomics[2]; } + return m_relatedModel; } void SetRelatedModel(CSimpleModelInfo *m){ - m_atomics[2] = (RpAtomic*)m; } + m_relatedModel = m; } }; //static_assert(sizeof(CSimpleModelInfo) == 0x4C, "CSimpleModelInfo: error"); diff --git a/src/modelinfo/TimeModelInfo.cpp b/src/modelinfo/TimeModelInfo.cpp index 0db5fb78..85b59e43 100644 --- a/src/modelinfo/TimeModelInfo.cpp +++ b/src/modelinfo/TimeModelInfo.cpp @@ -3,15 +3,20 @@ #include "Camera.h" #include "ModelInfo.h" #include "General.h" +#include "KeyGen.h" + +base::cRelocatableChunkClassInfo CTimeModelInfo::msClassInfo("CTimeModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); +CTimeModelInfo CTimeModelInfo::msClassInstance; + CTimeModelInfo* -CTimeModelInfo::FindOtherTimeModel(void) +CTimeModelInfo::FindOtherTimeModel(const char *modelname) { char name[40]; char *p; int i; - strcpy(name, GetModelName()); + strcpy(name, modelname); // change _nt to _dy if(p = strstr(name, "_nt")) strncpy(p, "_dy", 4); @@ -21,13 +26,29 @@ CTimeModelInfo::FindOtherTimeModel(void) else return nil; + uint32 nameKey = CKeyGen::GetUppercaseKey(name); + for(i = 0; i < MODELINFOSIZE; i++){ CBaseModelInfo *mi = CModelInfo::GetModelInfo(i); - if (mi && mi->GetModelType() == MITYPE_TIME && - !CGeneral::faststrncmp(name, mi->GetModelName(), MAX_MODEL_NAME)){ + if (mi && mi->GetModelType() == MITYPE_TIME && nameKey == mi->GetNameHashKey()){ m_otherTimeModelID = i; return (CTimeModelInfo*)mi; } } return nil; } + + +void +CTimeModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} + +void +CTimeModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/TimeModelInfo.h b/src/modelinfo/TimeModelInfo.h index 6e3c64fb..67273b21 100644 --- a/src/modelinfo/TimeModelInfo.h +++ b/src/modelinfo/TimeModelInfo.h @@ -7,14 +7,21 @@ class CTimeModelInfo : public CSimpleModelInfo int32 m_timeOn; int32 m_timeOff; int32 m_otherTimeModelID; + + static base::cRelocatableChunkClassInfo msClassInfo; + static CTimeModelInfo msClassInstance; + public: CTimeModelInfo(void) : CSimpleModelInfo(MITYPE_TIME) { m_otherTimeModelID = -1; } + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); + int32 GetTimeOn(void) { return m_timeOn; } int32 GetTimeOff(void) { return m_timeOff; } void SetTimes(int32 on, int32 off) { m_timeOn = on; m_timeOff = off; } int32 GetOtherTimeModel(void) { return m_otherTimeModelID; } void SetOtherTimeModel(int32 other) { m_otherTimeModelID = other; } - CTimeModelInfo *FindOtherTimeModel(void); + CTimeModelInfo *FindOtherTimeModel(const char *name); }; //static_assert(sizeof(CTimeModelInfo) == 0x58, "CTimeModelInfo: error"); diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp index d31962ce..21583709 100644 --- a/src/modelinfo/VehicleModelInfo.cpp +++ b/src/modelinfo/VehicleModelInfo.cpp @@ -1,6 +1,7 @@ #include "common.h" #include <rpmatfx.h> +#include "main.h" #include "RwHelper.h" #include "General.h" #include "NodeName.h" @@ -14,20 +15,28 @@ #include "Automobile.h" #include "Boat.h" #include "Train.h" +#include "Ferry.h" #include "Plane.h" #include "Heli.h" #include "Bike.h" #include "ModelIndices.h" #include "ModelInfo.h" #include "custompipes.h" +#include "Streaming.h" +#include "Leeds.h" -int8 CVehicleModelInfo::ms_compsToUse[2] = { -2, -2 }; -int8 CVehicleModelInfo::ms_compsUsed[2]; -RwRGBA CVehicleModelInfo::ms_vehicleColourTable[256]; -RwTexture *CVehicleModelInfo::ms_colourTextureTable[256]; +base::cRelocatableChunkClassInfo CVehicleModelInfo::msClassInfo("CVehicleModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); +CVehicleModelInfo CVehicleModelInfo::msClassInstance; -RwTexture *gpWhiteTexture; -RwFrame *pMatFxIdentityFrame; +//int8 CVehicleModelInfo::ms_compsToUse[2] = { -2, -2 }; +//int8 CVehicleModelInfo::ms_compsUsed[2]; +//RwRGBA CVehicleModelInfo::ms_vehicleColourTable[256]; +CVehicleModelInfo::Statics *CVehicleModelInfo::mspInfo; + +//RwTexture *CVehicleModelInfo::ms_colourTextureTable[256]; + +//RwTexture *gpWhiteTexture; +//RwFrame *pMatFxIdentityFrame; enum { VEHICLE_FLAG_COLLAPSE = 0x2, @@ -114,6 +123,22 @@ RwObjectNameIdAssocation trainIds[] = { { nil, 0, 0 } }; +RwObjectNameIdAssocation ferryIds[] = { + { "door_front_dummy", FERRY_DOOR_FRONT, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "door_back_dummy", FERRY_DOOR_BACK, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "ramp_front_dummy", FERRY_RAMP_FRONT, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "ramp_back_dummy", FERRY_RAMP_BACK, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "light_front", FERRY_POS_LIGHT_FRONT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "light_rear", FERRY_POS_LIGHT_REAR, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "chim_left", FERRY_POS_CHIM_LEFT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "ped_point", FERRY_POS_PED_POINT, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car1_dummy", FERRY_POS_CAR1, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car2_dummy", FERRY_POS_CAR2, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car3_dummy", FERRY_POS_CAR3, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car4_dummy", FERRY_POS_CAR4, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { nil, 0, 0 } +}; + RwObjectNameIdAssocation heliIds[] = { { "chassis_dummy", HELI_CHASSIS, VEHICLE_FLAG_COLLAPSE }, { "toprotor", HELI_TOPROTOR, 0 }, @@ -162,12 +187,36 @@ RwObjectNameIdAssocation *CVehicleModelInfo::ms_vehicleDescs[] = { trainIds, heliIds, planeIds, - bikeIds + bikeIds, + ferryIds }; bool gbBlackCars; bool gbPinkCars; +void +CVehicleModelInfo::Load(void *inst) +{ + if(inst) + mspInfo = (CVehicleModelInfo::Statics*)inst; + else{ + mspInfo = new CVehicleModelInfo::Statics; + memset(mspInfo, 0, sizeof(*mspInfo)); + mspInfo->ms_compsToUse[0] = -2; + mspInfo->ms_compsToUse[1] = -2; + } +} + +void* +CVehicleModelInfo::WriteStaticInfo(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(mspInfo, sizeof(*mspInfo), sizeof(void*), false, true); + if(mspInfo->unknown) + writer.AddPatch(&mspInfo->unknown); + return mspInfo; + +} + CVehicleModelInfo::CVehicleModelInfo(void) : CClumpModelInfo(MITYPE_VEHICLE) { @@ -178,7 +227,12 @@ CVehicleModelInfo::CVehicleModelInfo(void) m_positions[i].z = 0.0f; } m_numColours = 0; + CClumpModelInfo::m_animFileIndex = -1; + + memset(m_materials1, 0, sizeof(m_materials1)); + memset(m_materials2, 0, sizeof(m_materials2)); m_animFileIndex = -1; + m_normalSplay = 0.3f; } void @@ -187,16 +241,78 @@ CVehicleModelInfo::DeleteRwObject(void) int32 i; RwFrame *f; - for(i = 0; i < m_numComps; i++){ - f = RpAtomicGetFrame(m_comps[i]); - RpAtomicDestroy(m_comps[i]); - RwFrameDestroy(f); + if(!gUseChunkFiles){ + for(i = 0; i < m_numComps; i++){ + f = RpAtomicGetFrame(m_comps[i]); + RpAtomicDestroy(m_comps[i]); + RwFrameDestroy(f); + } +#ifdef FIX_BUGS + delete[] m_comps; + m_comps = nil; +#endif + m_numComps = 0; } - m_numComps = 0; + + RemoveWheels(); + + for(i = 0; i < ARRAY_SIZE(m_materials1); i++) + CStreaming::UnregisterPointer(&m_materials1[i], 2); + for(i = 0; i < ARRAY_SIZE(m_materials2); i++) + CStreaming::UnregisterPointer(&m_materials2[i], 2); + + if(m_numComps > 0){ + CStreaming::UnregisterPointer(&m_comps, 2); + for(i = 0; i < m_numComps; i++) + CStreaming::UnregisterAtomic(m_comps[i], nil); + m_comps = nil; + } + CClumpModelInfo::DeleteRwObject(); } RwObject* +RemoveWheelCB(RwObject *object, void *arg) +{ + RpAtomic *atomic = (RpAtomic*)object; + if(RwObjectGetType(object) == rpATOMIC){ + RpClumpRemoveAtomic((RpClump*)arg, atomic); +#ifdef LIBRW + CStreaming::UnregisterPointer(&atomic->inClump.next, 2); + CStreaming::UnregisterPointer(&atomic->inClump.prev, 2); + CStreaming::UnregisterPointer(&atomic->object.object.parent, 2); + CStreaming::UnregisterPointer(&atomic->object.inFrame.next, 2); + CStreaming::UnregisterPointer(&atomic->object.inFrame.prev, 2); + CStreaming::UnregisterPointer(&atomic->clump, 2); +#endif + RpAtomicDestroy(atomic); + } + return object; +} + +void +CVehicleModelInfo::RemoveWheels(void) +{ +#ifdef FIX_BUGS + if(m_clump == nil) + return; +#endif + RwObjectNameIdAssocation *desc = ms_vehicleDescs[m_vehicleType]; + for(int i = 0; desc[i].name; i++){ + RwObjectIdAssociation assoc; + + if(desc[i].flags & (VEHICLE_FLAG_COMP|VEHICLE_FLAG_POS)) + continue; + assoc.frame = nil; + assoc.id = desc[i].hierId; + RwFrameForAllChildren(RpClumpGetFrame(m_clump), + FindFrameFromIdCB, &assoc); + if(assoc.frame && desc[i].flags & VEHICLE_FLAG_ADD_WHEEL && m_wheelId != -1) + RwFrameForAllObjects(assoc.frame, RemoveWheelCB, m_clump); + } +} + +RwObject* CVehicleModelInfo::CreateInstance(void) { RpClump *clump; @@ -205,7 +321,7 @@ CVehicleModelInfo::CreateInstance(void) int32 comp1, comp2; clump = (RpClump*)CClumpModelInfo::CreateInstance(); - if(m_numComps != 0){ + if(clump && m_numComps != 0 && strcmp(m_gameName, "POLICAR") != 0){ clumpframe = RpClumpGetFrame(clump); comp1 = ChooseComponent(); @@ -219,7 +335,7 @@ CVehicleModelInfo::CreateInstance(void) RpClumpAddAtomic(clump, atomic); RwFrameAddChild(clumpframe, f); } - ms_compsUsed[0] = comp1; + mspInfo->ms_compsUsed[0] = comp1; comp2 = ChooseSecondComponent(); if(comp2 != -1 && m_comps[comp2]){ @@ -232,18 +348,27 @@ CVehicleModelInfo::CreateInstance(void) RpClumpAddAtomic(clump, atomic); RwFrameAddChild(clumpframe, f); } - ms_compsUsed[1] = comp2; + mspInfo->ms_compsUsed[1] = comp2; }else{ - ms_compsUsed[0] = -1; - ms_compsUsed[1] = -1; + mspInfo->ms_compsUsed[0] = -1; + mspInfo->ms_compsUsed[1] = -1; } + CStreaming::RegisterInstance(clump); return (RwObject*)clump; } +RpAtomic* +SplayNormals(RpAtomic *atomic, void *arg) +{ + // PSP only? + return atomic; +} + void CVehicleModelInfo::SetClump(RpClump *clump) { CClumpModelInfo::SetClump(clump); + RpClumpForAllAtomics((RpClump*)GetRwObject(), SplayNormals, this); SetAtomicRenderCallbacks(); SetFrameIds(ms_vehicleDescs[m_vehicleType]); PreprocessHierarchy(); @@ -398,35 +523,76 @@ CVehicleModelInfo::SetAtomicRendererCB_Train(RpAtomic *atomic, void *data) } RpAtomic* -CVehicleModelInfo::SetAtomicRendererCB_Boat(RpAtomic *atomic, void *data) +CVehicleModelInfo::SetAtomicRendererCB_Ferry(RpAtomic *atomic, void *data) { - RpClump *clump; char *name; bool alpha; - clump = (RpClump*)data; name = GetFrameNodeName(RpAtomicGetFrame(atomic)); alpha = false; RpGeometryForAllMaterials(RpAtomicGetGeometry(atomic), HasAlphaMaterialCB, &alpha); - if(strcmp(name, "boat_hi") == 0 || !CGeneral::faststrncmp(name, "extra", 5)) - CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB_Boat); - else if(strstr(name, "_hi")){ + if(strstr(name, "_hi")){ if(alpha) - CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_Boat); + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderTrainHiDetailAlphaCB); else - CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB); + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderTrainHiDetailCB); }else if(strstr(name, "_lo")){ + if(alpha) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleLowDetailAlphaCB_BigVehicle); + else + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleLowDetailCB_BigVehicle); + }else if(strstr(name, "_vlo")) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleReallyLowDetailCB_BigVehicle); + else + CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); + HideDamagedAtomicCB(atomic, nil); + return atomic; +} + +RpAtomic* +CVehicleModelInfo::SetAtomicRendererCB_Boat(RpAtomic *atomic, void *data) +{ + RpClump *clump; + char *name; + + clump = (RpClump*)data; + name = GetFrameNodeName(RpAtomicGetFrame(atomic)); + if(strcmp(name, "boat_hi") == 0 || !CGeneral::faststrncmp(name, "extra", 5)) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB_Boat); + else if(strstr(name, "_hi")) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB); + else if(strstr(name, "_lo")){ RpClumpRemoveAtomic(clump, atomic); RpAtomicDestroy(atomic); return atomic; // BUG: not done by gta }else if(strstr(name, "_vlo")) CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleLoDetailCB_Boat); - else{ - if(alpha) - CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_Boat); - else - CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); - } + else + CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); + HideDamagedAtomicCB(atomic, nil); + return atomic; +} + +RpAtomic* +CVehicleModelInfo::SetAtomicRendererCB_Boat_Far(RpAtomic *atomic, void *data) +{ + RpClump *clump; + char *name; + + clump = (RpClump*)data; + name = GetFrameNodeName(RpAtomicGetFrame(atomic)); + if(strcmp(name, "boat_hi") == 0 || !CGeneral::faststrncmp(name, "extra", 5)) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB_Boat_Far); + else if(strstr(name, "_hi")) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleHiDetailCB); + else if(strstr(name, "_lo")){ + RpClumpRemoveAtomic(clump, atomic); + RpAtomicDestroy(atomic); + return atomic; // BUG: not done by gta + }else if(strstr(name, "_vlo")) + CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleLoDetailCB_Boat_Far); + else + CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); HideDamagedAtomicCB(atomic, nil); return atomic; } @@ -434,6 +600,7 @@ CVehicleModelInfo::SetAtomicRendererCB_Boat(RpAtomic *atomic, void *data) RpAtomic* CVehicleModelInfo::SetAtomicRendererCB_Heli(RpAtomic *atomic, void *data) { +/* // LCS: gone, may be better to keep it though char *name; name = GetFrameNodeName(RpAtomicGetFrame(atomic)); @@ -442,6 +609,7 @@ CVehicleModelInfo::SetAtomicRendererCB_Heli(RpAtomic *atomic, void *data) else if(strncmp(name, "rearrotor", 9) == 0) CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderVehicleTailRotorAlphaCB); else +*/ CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); return atomic; } @@ -486,13 +654,18 @@ CVehicleModelInfo::SetAtomicRenderCallbacks(void) RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Train, nil); else #endif - if(m_vehicleType == VEHICLE_TYPE_HELI) + if(m_vehicleType == VEHICLE_TYPE_FERRY) + RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Ferry, nil); + else if(m_vehicleType == VEHICLE_TYPE_HELI) RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Heli, nil); else if(m_vehicleType == VEHICLE_TYPE_PLANE) RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_BigVehicle, nil); - else if(m_vehicleType == VEHICLE_TYPE_BOAT) - RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Boat, m_clump); - else if(mod_HandlingManager.GetHandlingData((tVehicleType)m_handlingId)->Flags & HANDLING_IS_HELI) + else if(m_vehicleType == VEHICLE_TYPE_BOAT){ + if(strcmp(m_gameName, "REEFER") == 0) + RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Boat_Far, m_clump); + else + RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Boat, m_clump); + }else if(mod_HandlingManager.GetHandlingData((tVehicleType)m_handlingId)->Flags & HANDLING_IS_HELI) RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_RealHeli, m_clump); else RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, m_clump); @@ -540,6 +713,8 @@ CVehicleModelInfo::PreprocessHierarchy(void) m_numDoors = 0; m_numComps = 0; + m_comps = new RpAtomic*[7]; + for(i = 0; desc[i].name; i++){ RwObjectNameAssociation assoc; @@ -597,21 +772,23 @@ CVehicleModelInfo::PreprocessHierarchy(void) SetVehicleComponentFlags(assoc.frame, desc[i].flags); - if(desc[i].flags & VEHICLE_FLAG_ADD_WHEEL){ - if(m_wheelId == -1) - RwFrameDestroy(assoc.frame); - else{ - RwV3d scale; - atomic = (RpAtomic*)CModelInfo::GetModelInfo(m_wheelId)->CreateInstance(); - RwFrameDestroy(RpAtomicGetFrame(atomic)); - RpAtomicSetFrame(atomic, assoc.frame); - RpClumpAddAtomic(m_clump, atomic); - CVisibilityPlugins::SetAtomicRenderCallback(atomic, - CVisibilityPlugins::RenderWheelAtomicCB); - scale.x = m_wheelScale; - scale.y = m_wheelScale; - scale.z = m_wheelScale; - RwFrameScale(assoc.frame, &scale, rwCOMBINEPRECONCAT); + if(!(gMakeResources && gUseResources)){ + if(desc[i].flags & VEHICLE_FLAG_ADD_WHEEL){ + if(m_wheelId == -1) + RwFrameDestroy(assoc.frame); + else{ + RwV3d scale; + atomic = (RpAtomic*)CModelInfo::GetModelInfo(m_wheelId)->CreateInstance(); + RwFrameDestroy(RpAtomicGetFrame(atomic)); + RpAtomicSetFrame(atomic, assoc.frame); + RpClumpAddAtomic(m_clump, atomic); + CVisibilityPlugins::SetAtomicRenderCallback(atomic, + CVisibilityPlugins::RenderWheelAtomicCB); + scale.x = m_wheelScale; + scale.y = m_wheelScale; + scale.z = m_wheelScale; + RwFrameScale(assoc.frame, &scale, rwCOMBINEPRECONCAT); + } } } } @@ -756,7 +933,7 @@ CVehicleModelInfo::ChooseComponent(void) int32 n; comp = -1; - if(ms_compsToUse[0] == -2){ + if(mspInfo->ms_compsToUse[0] == -2){ if(COMPRULE_RULE(m_compRules) && IsValidCompRule(COMPRULE_RULE(m_compRules))) comp = ::ChooseComponent(COMPRULE_RULE(m_compRules), COMPRULE_COMPS(m_compRules)); else if(CGeneral::GetRandomNumberInRange(0, 3) < 2){ @@ -765,8 +942,8 @@ CVehicleModelInfo::ChooseComponent(void) comp = comps[(int)CGeneral::GetRandomNumberInRange(0, n)]; } }else{ - comp = ms_compsToUse[0]; - ms_compsToUse[0] = -2; + comp = mspInfo->ms_compsToUse[0]; + mspInfo->ms_compsToUse[0] = -2; } return comp; } @@ -779,7 +956,7 @@ CVehicleModelInfo::ChooseSecondComponent(void) int32 n; comp = -1; - if(ms_compsToUse[1] == -2){ + if(mspInfo->ms_compsToUse[1] == -2){ if(COMPRULE2_RULE(m_compRules) && IsValidCompRule(COMPRULE2_RULE(m_compRules))) comp = ::ChooseComponent(COMPRULE2_RULE(m_compRules), COMPRULE2_COMPS(m_compRules)); else if(COMPRULE_RULE(m_compRules) && IsValidCompRule(COMPRULE_RULE(m_compRules)) && @@ -790,8 +967,8 @@ CVehicleModelInfo::ChooseSecondComponent(void) comp = comps[(int)CGeneral::GetRandomNumberInRange(0, n)]; } }else{ - comp = ms_compsToUse[1]; - ms_compsToUse[1] = -2; + comp = mspInfo->ms_compsToUse[1]; + mspInfo->ms_compsToUse[1] = -2; } return comp; } @@ -859,7 +1036,7 @@ CVehicleModelInfo::SetVehicleColour(uint8 c1, uint8 c2) RpMaterial **matp; if(c1 != m_currentColour1){ - col = ms_vehicleColourTable[c1]; + col = mspInfo->ms_vehicleColourTable[c1]; for(matp = m_materials1; *matp; matp++){ colp = (RwRGBA*)RpMaterialGetColor(*matp); // get rid of const colp->red = col.red; @@ -870,7 +1047,7 @@ CVehicleModelInfo::SetVehicleColour(uint8 c1, uint8 c2) } if(c2 != m_currentColour2){ - col = ms_vehicleColourTable[c2]; + col = mspInfo->ms_vehicleColourTable[c2]; for(matp = m_materials2; *matp; matp++){ colp = (RwRGBA*)RpMaterialGetColor(*matp); // get rid of const colp->red = col.red; @@ -995,8 +1172,8 @@ CVehicleModelInfo::LoadVehicleColours(void) fd = CFileMgr::OpenFile("CARCOLS.DAT", "r"); CFileMgr::ChangeDir("\\"); - for(i = 0; i < 256; i++) - ms_colourTextureTable[i] = nil; + //for(i = 0; i < 256; i++) + // ms_colourTextureTable[i] = nil; section = 0; numCols = 0; @@ -1028,10 +1205,10 @@ CVehicleModelInfo::LoadVehicleColours(void) }else if(section == COLOURS){ sscanf(&line[start], // BUG: games doesn't add start "%d %d %d", &r, &g, &b); - ms_vehicleColourTable[numCols].red = r; - ms_vehicleColourTable[numCols].green = g; - ms_vehicleColourTable[numCols].blue = b; - ms_vehicleColourTable[numCols].alpha = 0xFF; + mspInfo->ms_vehicleColourTable[numCols].red = r; + mspInfo->ms_vehicleColourTable[numCols].green = g; + mspInfo->ms_vehicleColourTable[numCols].blue = b; + mspInfo->ms_vehicleColourTable[numCols].alpha = 0xFF; numCols++; }else if(section == CARS){ n = sscanf(&line[start], // BUG: games doesn't add start @@ -1061,6 +1238,7 @@ CVehicleModelInfo::LoadVehicleColours(void) void CVehicleModelInfo::DeleteVehicleColourTextures(void) { +/* int i; for(i = 0; i < 256; i++){ @@ -1069,6 +1247,7 @@ CVehicleModelInfo::DeleteVehicleColourTextures(void) ms_colourTextureTable[i] = nil; } } +*/ } RpMaterial* @@ -1080,6 +1259,7 @@ CVehicleModelInfo::GetMatFXEffectMaterialCB(RpMaterial *material, void *data) return nil; } +/* RpMaterial* CVehicleModelInfo::SetDefaultEnvironmentMapCB(RpMaterial *material, void *data) { @@ -1096,7 +1276,9 @@ CVehicleModelInfo::SetDefaultEnvironmentMapCB(RpMaterial *material, void *data) } return material; } +*/ +/* RpAtomic* CVehicleModelInfo::SetEnvironmentMapCB(RpAtomic *atomic, void *data) { @@ -1112,10 +1294,12 @@ CVehicleModelInfo::SetEnvironmentMapCB(RpAtomic *atomic, void *data) } return atomic; } +*/ void CVehicleModelInfo::SetEnvironmentMap(void) { +/* CSimpleModelInfo *wheelmi; int32 i; @@ -1133,6 +1317,7 @@ CVehicleModelInfo::SetEnvironmentMap(void) for(i = 0; i < wheelmi->m_numAtomics; i++) SetEnvironmentMapCB(wheelmi->m_atomics[i], nil); } +*/ #ifdef EXTENDED_PIPELINES CustomPipes::AttachVehiclePipe(m_clump); @@ -1147,21 +1332,23 @@ CVehicleModelInfo::LoadEnvironmentMaps(void) txdslot = CTxdStore::FindTxdSlot("particle"); CTxdStore::PushCurrentTxd(); CTxdStore::SetCurrentTxd(txdslot); - if(gpWhiteTexture == nil){ + /*if(gpWhiteTexture == nil){ gpWhiteTexture = RwTextureRead("white", nil); RwTextureGetName(gpWhiteTexture)[0] = '@'; RwTextureSetFilterMode(gpWhiteTexture, rwFILTERLINEAR); - } + }*/ CTxdStore::PopCurrentTxd(); } void CVehicleModelInfo::ShutdownEnvironmentMaps(void) { +/* RwTextureDestroy(gpWhiteTexture); gpWhiteTexture = nil; RwFrameDestroy(pMatFxIdentityFrame); pMatFxIdentityFrame = nil; +*/ } int @@ -1184,10 +1371,162 @@ CVehicleModelInfo::GetMaximumNumberOfPassengersFromNumberOfDoors(int id) } if(n == 0) - return id == MI_RCBANDIT || id == MI_PIZZABOY || id == MI_BAGGAGE ? 0 : 1; + return id == MI_RCBANDIT /*|| id == MI_PIZZABOY || id == MI_BAGGAGE*/ ? 0 : 1; if(id == MI_COACH) return 8; return n - 1; } + + +struct VehicleChunk +{ + RpClump *clump; + int32 numComps; + RpAtomic **comp; + RpMaterial *materials1[NUM_FIRST_MATERIALS]; + RpMaterial *materials2[NUM_SECOND_MATERIALS]; +}; + +void +CVehicleModelInfo::LoadModel(void *data, const void *chunk) +{ + int i; + VehicleChunk *chk = (VehicleChunk*)data; + CClumpModelInfo::LoadModel(chk->clump, chunk); + + // editable materials + for(i = 0; i < NUM_FIRST_MATERIALS; i++){ + m_materials1[i] = chk->materials1[i]; + if(m_materials1[i]) + CStreaming::RegisterPointer(&m_materials1[i], 2, true); + } + for(i = 0; i < NUM_SECOND_MATERIALS; i++){ + m_materials2[i] = chk->materials2[i]; + if(m_materials2[i]) + CStreaming::RegisterPointer(&m_materials2[i], 2, true); + } + + // extra components + m_numComps = chk->numComps; + if(m_numComps > 0){ + m_comps = chk->comp; + CStreaming::RegisterPointer(&m_comps, 2, true); + for(i = 0; i < m_numComps; i++){ + LoadResource(m_comps[i]); + CStreaming::RegisterAtomic(m_comps[i], nil); + } + }else + m_comps = nil; + + m_currentColour1 = -1; + m_currentColour2 = -1; + + // add wheels + RwObjectNameIdAssocation *desc = ms_vehicleDescs[m_vehicleType]; + for(i = 0; desc[i].name; i++){ + RwObjectIdAssociation assoc; + + if(desc[i].flags & (VEHICLE_FLAG_COMP|VEHICLE_FLAG_POS)) + continue; + assoc.frame = nil; + assoc.id = desc[i].hierId; + RwFrameForAllChildren(RpClumpGetFrame(m_clump), + FindFrameFromIdCB, &assoc); + if(assoc.frame && desc[i].flags & VEHICLE_FLAG_ADD_WHEEL && m_wheelId != -1){ + RwV3d scale; + RpAtomic *atomic = (RpAtomic*)CModelInfo::GetModelInfo(m_wheelId)->CreateInstance(); + RwFrameDestroy(RpAtomicGetFrame(atomic)); + RpAtomicSetFrame(atomic, assoc.frame); + RpClumpAddAtomic(m_clump, atomic); + CVisibilityPlugins::SetAtomicRenderCallback(atomic, + CVisibilityPlugins::RenderWheelAtomicCB); + scale.x = m_wheelScale; + scale.y = m_wheelScale; + scale.z = m_wheelScale; + RwFrameScale(assoc.frame, &scale, rwCOMBINEPRECONCAT); +#ifdef LIBRW + CStreaming::RegisterPointer(&atomic->inClump.next, 2, true); + CStreaming::RegisterPointer(&atomic->inClump.prev, 2, true); + CStreaming::RegisterPointer(&atomic->object.object.parent, 2, true); + CStreaming::RegisterPointer(&atomic->object.inFrame.next, 2, true); + CStreaming::RegisterPointer(&atomic->object.inFrame.prev, 2, true); + CStreaming::RegisterPointer(&atomic->clump, 2, true); +#endif + } + } +} + +void +CVehicleModelInfo::Write(base::cRelocatableChunkWriter &writer) +{ + CClumpModelInfo::Write(writer); +} + +void* +CVehicleModelInfo::WriteModel(base::cRelocatableChunkWriter &writer) +{ + if(GetRwObject() == nil) + return nil; + + int i; + VehicleChunk *chk = new VehicleChunk; + memset(chk, 0, sizeof(*chk)); + writer.AllocateRaw(chk, sizeof(*chk), sizeof(void*), false, true); + + // clump + chk->clump = (RpClump*)CClumpModelInfo::WriteModel(writer); + if(chk->clump) + writer.AddPatch(&chk->clump); + + // materials + for(i = 0; i < NUM_FIRST_MATERIALS; i++){ + if(m_materials1[i] == nil || m_vehicleType == VEHICLE_TYPE_FERRY) + chk->materials1[i] = nil; + else{ + SaveResource(m_materials1[i], writer); + chk->materials1[i] = m_materials1[i]; + writer.AddPatch(&chk->materials1[i]); + } + } + for(i = 0; i < NUM_SECOND_MATERIALS; i++){ + if(m_materials2[i] == nil || m_vehicleType == VEHICLE_TYPE_FERRY) + chk->materials2[i] = nil; + else{ + SaveResource(m_materials2[i], writer); + chk->materials2[i] = m_materials2[i]; + writer.AddPatch(&chk->materials2[i]); + } + } + + // extra components + chk->numComps = m_numComps; + chk->comp = nil; + if(m_numComps > 0){ + chk->comp = m_comps; + writer.AddPatch(&chk->comp); + + writer.AllocateRaw(m_comps, m_numComps*sizeof(void*), sizeof(void*), false, true); + for(i = 0; i < m_numComps; i++) + if(m_comps[i]){ + SaveResource(m_comps[i], writer); + writer.AddPatch(&m_comps[i]); + } + } + return chk; +} + +void +CVehicleModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} + +void +CVehicleModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h index c7a41126..6f2cea3c 100644 --- a/src/modelinfo/VehicleModelInfo.h +++ b/src/modelinfo/VehicleModelInfo.h @@ -3,8 +3,8 @@ #include "ClumpModelInfo.h" enum { - NUM_FIRST_MATERIALS = 24, - NUM_SECOND_MATERIALS = 20, + NUM_FIRST_MATERIALS = 25, + NUM_SECOND_MATERIALS = 25, NUM_VEHICLE_COLOURS = 8, }; @@ -31,6 +31,7 @@ enum eVehicleType { VEHICLE_TYPE_HELI, VEHICLE_TYPE_PLANE, VEHICLE_TYPE_BIKE, + VEHICLE_TYPE_FERRY, NUM_VEHICLE_TYPES }; @@ -48,6 +49,18 @@ enum eBoatPositions BOAT_POS_FRONTSEAT }; +enum eFerryPositions +{ + FERRY_POS_LIGHT_FRONT, + FERRY_POS_LIGHT_REAR, + FERRY_POS_CHIM_LEFT, + FERRY_POS_PED_POINT, + FERRY_POS_CAR1, + FERRY_POS_CAR2, + FERRY_POS_CAR3, + FERRY_POS_CAR4 +}; + enum eTrainPositions { TRAIN_POS_LIGHT_FRONT, @@ -97,19 +110,30 @@ public: uint8 m_lastColorVariation; uint8 m_currentColour1; uint8 m_currentColour2; - RpAtomic *m_comps[6]; + RpAtomic **m_comps; + float m_normalSplay; // This is stupid, CClumpModelInfo already has it! union { int32 m_animFileIndex; char *m_animFileName; }; - static int8 ms_compsToUse[2]; - static int8 ms_compsUsed[2]; - static RwRGBA ms_vehicleColourTable[256]; - static RwTexture *ms_colourTextureTable[256]; + static base::cRelocatableChunkClassInfo msClassInfo; + static CVehicleModelInfo msClassInstance; + + struct Statics { + void *unknown; // unused too it seems + RwRGBA ms_vehicleColourTable[256]; + int8 ms_compsUsed[2]; + int8 ms_compsToUse[2]; + }; + //static RwTexture *ms_colourTextureTable[256]; + static Statics *mspInfo; static RwObjectNameIdAssocation *ms_vehicleDescs[NUM_VEHICLE_TYPES]; + static void Load(void *inst); + static void *WriteStaticInfo(base::cRelocatableChunkWriter &writer); + CVehicleModelInfo(void); void DeleteRwObject(void); RwObject *CreateInstance(void); @@ -118,6 +142,12 @@ public: void ConvertAnimFileIndex(void); int GetAnimFileIndex(void) { return m_animFileIndex; } + virtual void LoadModel(void *model, const void *chunk); + virtual void Write(base::cRelocatableChunkWriter &writer); + virtual void *WriteModel(base::cRelocatableChunkWriter &writer); + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); + static RwFrame *CollapseFramesCB(RwFrame *frame, void *data); static RwObject *MoveObjectsCB(RwObject *object, void *data); static RpAtomic *HideDamagedAtomicCB(RpAtomic *atomic, void *data); @@ -127,13 +157,16 @@ public: static RpAtomic *SetAtomicRendererCB(RpAtomic *atomic, void *data); static RpAtomic *SetAtomicRendererCB_BigVehicle(RpAtomic *atomic, void *data); static RpAtomic *SetAtomicRendererCB_Train(RpAtomic *atomic, void *data); + static RpAtomic *SetAtomicRendererCB_Ferry(RpAtomic *atomic, void *data); static RpAtomic *SetAtomicRendererCB_Boat(RpAtomic *atomic, void *data); + static RpAtomic *SetAtomicRendererCB_Boat_Far(RpAtomic *atomic, void *data); static RpAtomic *SetAtomicRendererCB_Heli(RpAtomic *atomic, void *data); static RpAtomic *SetAtomicRendererCB_RealHeli(RpAtomic *atomic, void *data); void SetAtomicRenderCallbacks(void); static RwObject *SetAtomicFlagCB(RwObject *object, void *data); static RwObject *ClearAtomicFlagCB(RwObject *atomic, void *data); + void RemoveWheels(void); void SetVehicleComponentFlags(RwFrame *frame, uint32 flags); void PreprocessHierarchy(void); void GetWheelPosn(int32 n, CVector &pos); @@ -159,7 +192,7 @@ public: static void ShutdownEnvironmentMaps(void); static int GetMaximumNumberOfPassengersFromNumberOfDoors(int id); - static void SetComponentsToUse(int8 c1, int8 c2) { ms_compsToUse[0] = c1; ms_compsToUse[1] = c2; } + static void SetComponentsToUse(int8 c1, int8 c2) { mspInfo->ms_compsToUse[0] = c1; mspInfo->ms_compsToUse[1] = c2; } }; extern bool gbBlackCars; diff --git a/src/modelinfo/WeaponModelInfo.cpp b/src/modelinfo/WeaponModelInfo.cpp index d9294c3f..1d194ec4 100644 --- a/src/modelinfo/WeaponModelInfo.cpp +++ b/src/modelinfo/WeaponModelInfo.cpp @@ -4,6 +4,9 @@ #include "AnimManager.h" #include "VisibilityPlugins.h" +base::cRelocatableChunkClassInfo CWeaponModelInfo::msClassInfo("CWeaponModelInfo", VTABLE_ADDR(&msClassInstance), sizeof(msClassInstance)); +CWeaponModelInfo CWeaponModelInfo::msClassInstance; + void CWeaponModelInfo::SetAnimFile(const char *file) { @@ -35,19 +38,34 @@ CWeaponModelInfo::Init(void) void CWeaponModelInfo::SetWeaponInfo(int32 weaponId) { - m_atomics[2] = (RpAtomic*)weaponId; + m_relatedModel = (CSimpleModelInfo*)weaponId; } eWeaponType CWeaponModelInfo::GetWeaponInfo(void) { - return (eWeaponType)(uintptr)m_atomics[2]; + return (eWeaponType)(uintptr)m_relatedModel; } +/* void CWeaponModelInfo::SetAtomic(int n, RpAtomic *atomic) { CSimpleModelInfo::SetAtomic(n, atomic); CVisibilityPlugins::SetAtomicRenderCallback(atomic, CVisibilityPlugins::RenderWeaponCB); } +*/ + +void +CWeaponModelInfo::RcWriteThis(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} +void +CWeaponModelInfo::RcWriteEmpty(base::cRelocatableChunkWriter &writer) +{ + writer.AllocateRaw(this, sizeof(*this), sizeof(void*), false, true); + writer.Class(VTABLE_ADDR(this), msClassInfo); +} diff --git a/src/modelinfo/WeaponModelInfo.h b/src/modelinfo/WeaponModelInfo.h index 548bf8a6..8dc9baf1 100644 --- a/src/modelinfo/WeaponModelInfo.h +++ b/src/modelinfo/WeaponModelInfo.h @@ -9,13 +9,21 @@ class CWeaponModelInfo : public CSimpleModelInfo int32 m_animFileIndex; char *m_animFileName; }; + + static base::cRelocatableChunkClassInfo msClassInfo; + static CWeaponModelInfo msClassInstance; + public: CWeaponModelInfo(void) : CSimpleModelInfo(MITYPE_WEAPON) { m_animFileIndex = -1; } virtual void SetAnimFile(const char *file); virtual void ConvertAnimFileIndex(void); virtual int GetAnimFileIndex(void) { return m_animFileIndex; } - virtual void SetAtomic(int n, RpAtomic *atomic); + + virtual void RcWriteThis(base::cRelocatableChunkWriter &writer); + virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer); + + //virtual void SetAtomic(int n, RpAtomic *atomic); void Init(void); void SetWeaponInfo(int32 weaponId); diff --git a/src/objects/CutsceneObject.cpp b/src/objects/CutsceneObject.cpp index 7d9fe640..803fcf0f 100644 --- a/src/objects/CutsceneObject.cpp +++ b/src/objects/CutsceneObject.cpp @@ -53,12 +53,15 @@ CCutsceneObject::SetModelIndex(uint32 id) void CCutsceneObject::CreateShadow(void) { + // empty in LCS + /* if ( IsPedModel(GetModelIndex()) ) { m_pShadow = new CCutsceneShadow(); if (!m_pShadow->IsInitialized()) m_pShadow->Create(m_rwObject, 6, true, 4, true); } + */ } void diff --git a/src/objects/CutsceneObject.h b/src/objects/CutsceneObject.h index af24c0a6..b0659c08 100644 --- a/src/objects/CutsceneObject.h +++ b/src/objects/CutsceneObject.h @@ -14,6 +14,7 @@ public: CCutsceneObject(void); ~CCutsceneObject(void); + bool UpdatesInCutscene(void) { return true; } void SetModelIndex(uint32 id); void CreateShadow(void); void ProcessControl(void); diff --git a/src/objects/Object.h b/src/objects/Object.h index f59379bf..a535732c 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -71,6 +71,7 @@ public: uint8 bIsWeapon : 1; uint8 bIsStreetLight : 1; int8 m_nBonusValue; + int8 m_nLastWeaponToDamage; uint16 m_nCostValue; float m_fCollisionDamageMultiplier; uint8 m_nCollisionDamageEffect; diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp index 28c5240f..c49044a0 100644 --- a/src/objects/ParticleObject.cpp +++ b/src/objects/ParticleObject.cpp @@ -248,6 +248,16 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe break; } + case POBJECT_FIRE_HYDRANT_STEAM: + { + pobj->m_ParticleType = PARTICLE_HYDRANT_STEAM; + pobj->m_nNumEffectCycles = 2; + pobj->m_nSkipFrames = 2; + pobj->m_nCreationChance = 8; + pobj->m_nRemoveTimer = CTimer::GetTimeInMilliseconds() + 5000; + break; + } + case POBJECT_CAR_WATER_SPLASH: case POBJECT_PED_WATER_SPLASH: { @@ -927,6 +937,7 @@ void CParticleObject::UpdateClose(void) CParticle::AddParticle(PARTICLE_CAR_SPLASH, splashpos, splashvel, nil, CGeneral::GetRandomNumberInRange(0.005f, 0.0075f), this->m_Color, 0, 0, 1, 300); } + for ( int32 i = 0; i < this->m_nNumEffectCycles; i++ ) { CParticle::AddParticle(this->m_ParticleType, pos, vel, nil, 0.0f, this->m_Color); diff --git a/src/objects/ParticleObject.h b/src/objects/ParticleObject.h index f199e533..1ac29451 100644 --- a/src/objects/ParticleObject.h +++ b/src/objects/ParticleObject.h @@ -15,6 +15,7 @@ enum eParticleObjectType POBJECT_WALL_STEAM_SLOWMOTION, POBJECT_DARK_SMOKE, POBJECT_FIRE_HYDRANT, + POBJECT_FIRE_HYDRANT_STEAM, POBJECT_CAR_WATER_SPLASH, POBJECT_PED_WATER_SPLASH, POBJECT_SPLASHES_AROUND, @@ -49,7 +50,7 @@ public: CParticleObject *m_pNext; CParticleObject *m_pPrev; CParticle *m_pParticle; - uint32 m_nRemoveTimer; + uint32 m_nRemoveTimer; eParticleObjectType m_Type; tParticleType m_ParticleType; uint8 m_nNumEffectCycles; @@ -109,4 +110,4 @@ public: static void Remove(CParticleObject *particleobject); static CAudioHydrant *Get(int n); // for neo screen droplets -};
\ No newline at end of file +}; diff --git a/src/peds/Gangs.cpp b/src/peds/Gangs.cpp index 240f6b37..5cec5e12 100644 --- a/src/peds/Gangs.cpp +++ b/src/peds/Gangs.cpp @@ -21,23 +21,24 @@ CGangInfo::CGangInfo() : void CGangs::Initialise(void) { - SetGangPedModels(GANG_CUBAN, MI_CBA, MI_CBB); - SetGangPedModels(GANG_HAITIAN, MI_HNA, MI_HNB); - SetGangPedModels(GANG_STREET, MI_SGA, MI_SGB); - SetGangPedModels(GANG_DIAZ, MI_CLA, MI_CLB); - SetGangPedModels(GANG_SECURITY, MI_GDA, MI_GDB); - SetGangPedModels(GANG_BIKER, MI_BKA, MI_BKB); - SetGangPedModels(GANG_PLAYER, MI_PGA, MI_PGB); - SetGangPedModels(GANG_GOLFER, MI_WFOGO, MI_WMOGO); - SetGangVehicleModel(GANG_CUBAN, MI_CUBAN); - SetGangVehicleModel(GANG_HAITIAN, MI_VOODOO); - SetGangVehicleModel(GANG_STREET, MI_GANGBUR); - SetGangVehicleModel(GANG_DIAZ, -1); - SetGangVehicleModel(GANG_SECURITY, -1); - SetGangVehicleModel(GANG_BIKER, MI_ANGEL); - SetGangVehicleModel(GANG_PLAYER, -1); - SetGangVehicleModel(GANG_GOLFER, MI_CADDY); - SetGangWeapons(GANG_GOLFER, WEAPONTYPE_GOLFCLUB, WEAPONTYPE_GOLFCLUB); + SetGangPedModels(GANG_MAFIA, MI_GANG01, MI_GANG02); + SetGangPedModels(GANG_TRIAD, MI_GANG03, MI_GANG04); + SetGangPedModels(GANG_DIABLOS, MI_GANG05, MI_GANG06); + SetGangPedModels(GANG_YAKUZA, MI_GANG07, MI_GANG08); + SetGangPedModels(GANG_YARDIE, MI_GANG09, MI_GANG10); + SetGangPedModels(GANG_COLUMB, MI_GANG11, MI_GANG12); + SetGangPedModels(GANG_HOODS, MI_GANG13, MI_GANG14); + SetGangPedModels(GANG_FORELLI, MI_GANG15, MI_GANG16); + SetGangPedModels(GANG_SINDACCO, MI_GANG17, MI_GANG18); + SetGangVehicleModel(GANG_MAFIA, MI_MAFIA); + SetGangVehicleModel(GANG_TRIAD, MI_BELLYUP); + SetGangVehicleModel(GANG_DIABLOS, MI_DIABLOS); + SetGangVehicleModel(GANG_YAKUZA, MI_YAKUZA); + SetGangVehicleModel(GANG_YARDIE, MI_YARDIE); + SetGangVehicleModel(GANG_COLUMB, MI_COLUMB); + SetGangVehicleModel(GANG_HOODS, MI_HOODS); + SetGangVehicleModel(GANG_FORELLI, MI_FORELLI_CAR); + SetGangVehicleModel(GANG_SINDACCO, MI_SINDACCO_CAR); #ifdef FIX_BUGS for (int i = 0; i < NUM_GANGS; i++) SetGangPedModelOverride(i, -1); diff --git a/src/peds/Gangs.h b/src/peds/Gangs.h index c6381343..acb2fb99 100644 --- a/src/peds/Gangs.h +++ b/src/peds/Gangs.h @@ -17,15 +17,15 @@ struct CGangInfo VALIDATE_SIZE(CGangInfo, 0x10); enum { - GANG_CUBAN = 0, - GANG_HAITIAN, - GANG_STREET, - GANG_DIAZ, - GANG_SECURITY, - GANG_BIKER, - GANG_PLAYER, - GANG_GOLFER, - GANG_9, + GANG_MAFIA = 0, + GANG_TRIAD, + GANG_DIABLOS, + GANG_YAKUZA, + GANG_YARDIE, + GANG_COLUMB, + GANG_HOODS, + GANG_FORELLI, + GANG_SINDACCO, NUM_GANGS }; diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index eadd9d64..e284dad5 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -8141,6 +8141,62 @@ CPed::ClearWaitState(void) if (assoc) assoc->blendDelta = -8.0f; break; + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE: + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP: + case WAITSTATE_CS_MISC_IDLE_NO: + case WAITSTATE_CS_MISC_IDLE_YES: + case WAITSTATE_CS_MISC_IDLE_CHAT2: + case WAITSTATE_CS_MISC_IDLE_COUGH: + case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE: + case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT: + case WAITSTATE_DONH2_CAMERA: + case WAITSTATE_JDT2_ANXIOUS_TALK: + case WAITSTATE_JDT2_SHRUG: + case WAITSTATE_JDT4_DILDO_TALK: + case WAITSTATE_JDT5_CALM_DOWN: + case WAITSTATE_JDT5_POINT: + case WAITSTATE_JDT6_PICKUP: + case WAITSTATE_MAR1_SKIRT: + case WAITSTATE_MAR2_CELL_ANSWER: + case WAITSTATE_MAR2_CELL_END: + case WAITSTATE_MAR2_CELL_TALK: + case WAITSTATE_MAR2_FOOT_TAP: + case WAITSTATE_MAR3_HOOCHY: + case WAITSTATE_MAR3_NOTE_IDLE: + case WAITSTATE_MAR3_NOTE_PICKUP: + case WAITSTATE_SAL1_BIREFCASE_DOWN: + case WAITSTATE_SAL2_IDLE_SEATED: + case WAITSTATE_SAL2_SEAT_TO_STAND: + case WAITSTATE_SAL3_SEATED_TALK: + case WAITSTATE_SAL3_SEATED_IDLE: + case WAITSTATE_SAL4_DUST_DOWN: + case WAITSTATE_SAL4_GIRL_RUN: + case WAITSTATE_SAL6_ANGRY_SEATED: + case WAITSTATE_SAL6_IDLE_SEATED: + case WAITSTATE_SAL7_LOOKOUT: + case WAITSTATE_VIC2_POINT_ANGRY: + case WAITSTATE_VIC3_WAFT: + case WAITSTATE_VIC3_PICKUP_ROLL: + case WAITSTATE_VIC4_CARRY_BOX: + case WAITSTATE_VIC4_CELL_LOOK: + case WAITSTATE_VIC4_CRATE_IDLE: + case WAITSTATE_VIC6_CELL_ANGRY: + case WAITSTATE_TOURIST3: + case WAITSTATE_TOURIST2: + case WAITSTATE_TOURIST1: + case WAITSTATE_MAC2_PLEAD: + case WAITSTATE_JDT6_KNOCK: + case WAITSTATE_SAL3_SIT_DOWN: + case WAITSTATE_VIC7_PROD_WITH_FOOT: + assoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE); + if (assoc) + assoc->Remove(); + break; + case WAITSTATE_DONH3_HAPPY: + assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DONH3_HAPPY); + if (assoc) + assoc->blendDelta = -1.0f; + break; default: break; } @@ -8148,10 +8204,10 @@ CPed::ClearWaitState(void) } void -CPed::SetWaitState(eWaitState state, void *time) +CPed::SetWaitState(eWaitState state, void *time, bool repeat) { AnimationId waitAnim = ANIM_STD_NUM; - CAnimBlendAssociation *animAssoc; + CAnimBlendAssociation *animAssoc = nil; if (!IsPedInControl()) return; @@ -8330,7 +8386,7 @@ CPed::SetWaitState(eWaitState state, void *time) SetFall(-1, ANIM_STD_HIGHIMPACT_FRONT, true); break; case WAITSTATE_BOMBER: - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DETONATE, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DETONATE, 4.0f); m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time; break; case WAITSTATE_GROUND_ATTACK: @@ -8349,7 +8405,7 @@ CPed::SetWaitState(eWaitState state, void *time) break; } case WAITSTATE_LANCESITTING: - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE_IDLE, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE_IDLE, 4.0f); break; case WAITSTATE_PLAYANIM_HANDSUP_SIMPLE: animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP, 4.0f); @@ -8358,12 +8414,193 @@ CPed::SetWaitState(eWaitState state, void *time) animAssoc->SetDeleteCallback(FinishedWaitCB, this); m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time; break; + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE: + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, 1.0f); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP: + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, 1.0f); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_CS_MISC_IDLE_NO: + case WAITSTATE_CS_MISC_IDLE_YES: + case WAITSTATE_CS_MISC_IDLE_CHAT2: + case WAITSTATE_CS_MISC_IDLE_COUGH: + case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE: + case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT: + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_CSMISC, + (AnimationId)(ANIM_CS_MISC_IDLE_LOOK + (int)(state - WAITSTATE_CS_MISC_IDLE_LOOK)), 1.0f); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_DONH2_CAMERA: + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH2, ANIM_DONH2_CAMERA, 1.0f); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_DONH3_HAPPY: + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH3, ANIM_DONH3_HAPPY, 1.0f); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT2_ANXIOUS_TALK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_ANXIOUS_TALK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT2_SHRUG: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_SHRUG); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT4_DILDO_TALK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT4, ANIM_JDT4_DILDO_TALK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT5_CALM_DOWN: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_CALM_DOWN); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT5_POINT: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_POINT); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT6_PICKUP: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_PICKUP); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR1_SKIRT: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR1, ANIM_MAR1_SKIRT); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR2_CELL_ANSWER: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_ANSWER); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR2_CELL_END: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_END); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR2_CELL_TALK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_TALK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR2_FOOT_TAP: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_FOOT_TAP); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR3_HOOCHY: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_HOOCHY); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR3_NOTE_IDLE: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_IDLE); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAR3_NOTE_PICKUP: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_PICKUP); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL1_BIREFCASE_DOWN: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL1, ANIM_SAL1_BIREFCASE_DOWN); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL2_IDLE_SEATED: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_IDLE_SEATED); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL2_SEAT_TO_STAND: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_SEAT_TO_STAND); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL3_SEATED_TALK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_TALK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL3_SEATED_IDLE: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_IDLE); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL4_DUST_DOWN: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_DUST_DOWN); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL4_GIRL_RUN: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_GIRL_RUN); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL6_ANGRY_SEATED: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_ANGRY_SEATED); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL6_IDLE_SEATED: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_IDLE_SEATED); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL7_LOOKOUT: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL7, ANIM_SAL7_LOOKOUT); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC2_POINT_ANGRY: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC2, ANIM_VIC2_POINT_ANGRY); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC3_WAFT: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_WAFT); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC3_PICKUP_ROLL: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_PICKUP_ROLL); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC4_CARRY_BOX: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CARRY_BOX); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC4_CELL_LOOK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CELL_LOOK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC4_CRATE_IDLE: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CRATE_IDLE); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC6_CELL_ANGRY: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC6, ANIM_VIC6_CELL_ANGRY); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_TOURIST3: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST3); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_TOURIST2: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST2); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_TOURIST1: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST1); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_MAC2_PLEAD: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAC2, ANIM_MAC2_PLEAD); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_JDT6_KNOCK: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_KNOCK); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_SAL3_SIT_DOWN: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SIT_DOWN); + animAssoc->speed = 1.0f; + break; + case WAITSTATE_VIC7_PROD_WITH_FOOT: + animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC7, ANIM_VIC7_PROD_WITH_FOOT); + animAssoc->speed = 1.0f; + break; default: ClearWaitState(); RestoreHeadingRate(); return; } + bool rep = animAssoc ? repeat : false; m_nWaitState = state; + if (rep) + animAssoc->flags |= ASSOC_REPEAT; } void @@ -9321,7 +9558,7 @@ CPed::SetRadioStation(void) if (IsPlayer() || !m_pMyVehicle || m_pMyVehicle->pDriver != this) return; - if (GetModelIndex() != MI_PGA && GetModelIndex() != MI_PGB) { + if (GetModelIndex() != MI_GANG13 && GetModelIndex() != MI_GANG14) { if (m_pMyVehicle->m_nRadioStation != modelInfo->radio1 && m_pMyVehicle->m_nRadioStation != modelInfo->radio2) { if (CGeneral::GetRandomTrueFalse()) m_pMyVehicle->m_nRadioStation = modelInfo->radio1; @@ -9334,8 +9571,10 @@ CPed::SetRadioStation(void) } void -CPed::WarpPedIntoCar(CVehicle *car) +CPed::WarpPedIntoCar(CVehicle *car) // LCS TODO: remove passenger logic { + if (GetPedState() == PED_FACE_PHONE) + QuitEnteringCar(); bInVehicle = true; m_pMyVehicle = car; m_pMyVehicle->RegisterReference((CEntity **) &m_pMyVehicle); @@ -9400,6 +9639,77 @@ CPed::WarpPedIntoCar(CVehicle *car) bChangedSeat = true; } +void +CPed::WarpPedIntoCarAsPassenger(CVehicle* pVehicle, int32 position) +{ + if (GetPedState() == PED_FACE_PHONE) + QuitEnteringCar(); + bInVehicle = true; + m_pMyVehicle = pVehicle; + m_pMyVehicle->RegisterReference((CEntity**)&m_pMyVehicle); + m_carInObjective = pVehicle; + m_carInObjective->RegisterReference((CEntity**)&m_carInObjective); + SetPedState(PED_DRIVING); // TODO: this is PED_PASSENGER, but it needs to have some logic applied first + bUsesCollision = false; + bIsInTheAir = false; + bVehExitWillBeInstant = true; + if (pVehicle->IsBike() && !pVehicle->pPassengers[0]) { + pVehicle->pPassengers[0] = this; + pVehicle->pPassengers[0]->RegisterReference((CEntity**)&pVehicle->pPassengers[0]); + } + if (position >= 0) { + if (!pVehicle->pPassengers[position]) { + pVehicle->pPassengers[position] = this; + pVehicle->pPassengers[position]->RegisterReference((CEntity**)&pVehicle->pPassengers[position]); + } + } + else { + for (int i = 0; i < 4; i++) { + if (!pVehicle->pPassengers[i]) { + pVehicle->pPassengers[i] = this; + pVehicle->pPassengers[i]->RegisterReference((CEntity**)&pVehicle->pPassengers[i]); + break; + } + } + } + + if (IsPlayer()) { + pVehicle->SetStatus(STATUS_PLAYER); + AudioManager.PlayerJustGotInCar(); + CCarCtrl::RegisterVehicleOfInterest(pVehicle); + } + else { + pVehicle->SetStatus(STATUS_PHYSICS); + } + + CWorld::Remove(this); + SetPosition(pVehicle->GetPosition()); + CWorld::Add(this); + + if (pVehicle->bIsAmbulanceOnDuty) { + pVehicle->bIsAmbulanceOnDuty = false; + --CCarCtrl::NumAmbulancesOnDuty; + } + if (pVehicle->bIsFireTruckOnDuty) { + pVehicle->bIsFireTruckOnDuty = false; + --CCarCtrl::NumFiretrucksOnDuty; + } + if (!pVehicle->bEngineOn) { + pVehicle->bEngineOn = true; + DMAudio.PlayOneShot(pVehicle->m_audioEntityId, SOUND_CAR_ENGINE_START, 1.0f); + } + + RpAnimBlendClumpSetBlendDeltas(GetClump(), ASSOC_PARTIAL, -1000.0f); + + AddInCarAnims(pVehicle, pVehicle->pDriver == this); + RemoveWeaponWhenEnteringVehicle(); + + if (pVehicle->bIsBus) + bRenderPedInCar = false; + + bChangedSeat = true; +} + bool CPed::HasAttractor(void) { @@ -9586,6 +9896,247 @@ CPed::Say(uint16 audio, int32 time) } } +void +CPed::LoadNonStandardPedAnim(eWaitState waitState) +{ + switch(waitState) { + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE: + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("MPNote"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_CS_MISC_IDLE_LOOK: + case WAITSTATE_CS_MISC_IDLE_NO: + case WAITSTATE_CS_MISC_IDLE_YES: + case WAITSTATE_CS_MISC_IDLE_CHAT2: + case WAITSTATE_CS_MISC_IDLE_COUGH: + case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE: + case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT: + case WAITSTATE_CS_MISC_IDLE_CELL_TALK: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_DONH2_CAMERA: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_DONH3_HAPPY: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_JDT2_ANXIOUS_TALK: + case WAITSTATE_JDT2_SHRUG: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_JDT4_DILDO_TALK: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_JDT5_CALM_DOWN: + case WAITSTATE_JDT5_POINT: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt5"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_JDT6_PICKUP: + case WAITSTATE_JDT6_KNOCK: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_MAR1_SKIRT: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_MAR2_CELL_ANSWER: + case WAITSTATE_MAR2_CELL_END: + case WAITSTATE_MAR2_CELL_TALK: + case WAITSTATE_MAR2_FOOT_TAP: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_MAR3_HOOCHY: + case WAITSTATE_MAR3_NOTE_IDLE: + case WAITSTATE_MAR3_NOTE_PICKUP: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL1_BIREFCASE_DOWN: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL2_IDLE_SEATED: + case WAITSTATE_SAL2_SEAT_TO_STAND: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL3_SEATED_TALK: + case WAITSTATE_SAL3_SEATED_IDLE: + case WAITSTATE_SAL3_SIT_DOWN: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL4_DUST_DOWN: + case WAITSTATE_SAL4_GIRL_RUN: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL6_ANGRY_SEATED: + case WAITSTATE_SAL6_IDLE_SEATED: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_SAL7_LOOKOUT: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_VIC2_POINT_ANGRY: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_VIC3_WAFT: + case WAITSTATE_VIC3_PICKUP_ROLL: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_VIC4_CARRY_BOX: + case WAITSTATE_VIC4_CELL_LOOK: + case WAITSTATE_VIC4_CRATE_IDLE: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_VIC6_CELL_ANGRY: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_TOURIST3: + case WAITSTATE_TOURIST2: + case WAITSTATE_TOURIST1: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("tourist"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_MAC2_PLEAD: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mac2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + case WAITSTATE_VIC7_PROD_WITH_FOOT: + CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + default: + CStreaming::RequestAnim(0, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + break; + } + CStreaming::LoadAllRequestedModels(false); +} + +void +CPed::UnloadNonStandardPedAnim(eWaitState waitState) +{ + switch(waitState) { + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE: + case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP: + if(CAnimManager::GetAnimationBlock("MPNote")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("MPNote")); + break; + case WAITSTATE_CS_MISC_IDLE_LOOK: + case WAITSTATE_CS_MISC_IDLE_NO: + case WAITSTATE_CS_MISC_IDLE_YES: + case WAITSTATE_CS_MISC_IDLE_CHAT2: + case WAITSTATE_CS_MISC_IDLE_COUGH: + case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE: + case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT: + case WAITSTATE_CS_MISC_IDLE_CELL_TALK: + if(CAnimManager::GetAnimationBlock("cs_misc")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc")); + break; + case WAITSTATE_DONH2_CAMERA: + if(CAnimManager::GetAnimationBlock("donh2")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh2")); + break; + case WAITSTATE_DONH3_HAPPY: + if(CAnimManager::GetAnimationBlock("donh3")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh3")); + break; + case WAITSTATE_JDT2_ANXIOUS_TALK: + case WAITSTATE_JDT2_SHRUG: + if(CAnimManager::GetAnimationBlock("cs_misc")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc")); + break; + case WAITSTATE_JDT4_DILDO_TALK: + if(CAnimManager::GetAnimationBlock("jdt4")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt4")); + break; + case WAITSTATE_JDT5_CALM_DOWN: + case WAITSTATE_JDT5_POINT: + if(CAnimManager::GetAnimationBlock("jdt5")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt5")); + break; + case WAITSTATE_JDT6_PICKUP: + case WAITSTATE_JDT6_KNOCK: + if(CAnimManager::GetAnimationBlock("jdt6")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt6")); + break; + case WAITSTATE_MAR1_SKIRT: + if(CAnimManager::GetAnimationBlock("mar1")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar1")); + break; + case WAITSTATE_MAR2_CELL_ANSWER: + case WAITSTATE_MAR2_CELL_END: + case WAITSTATE_MAR2_CELL_TALK: + case WAITSTATE_MAR2_FOOT_TAP: + if(CAnimManager::GetAnimationBlock("mar2")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar2")); + break; + case WAITSTATE_MAR3_HOOCHY: + case WAITSTATE_MAR3_NOTE_IDLE: + case WAITSTATE_MAR3_NOTE_PICKUP: + if(CAnimManager::GetAnimationBlock("mar3")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar3")); + break; + case WAITSTATE_SAL1_BIREFCASE_DOWN: + if(CAnimManager::GetAnimationBlock("sal1")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal1")); + break; + case WAITSTATE_SAL2_IDLE_SEATED: + case WAITSTATE_SAL2_SEAT_TO_STAND: + if(CAnimManager::GetAnimationBlock("sal2")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal2")); + break; + case WAITSTATE_SAL3_SEATED_TALK: + case WAITSTATE_SAL3_SEATED_IDLE: + case WAITSTATE_SAL3_SIT_DOWN: + if(CAnimManager::GetAnimationBlock("sal3")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal3")); + break; + case WAITSTATE_SAL4_DUST_DOWN: + case WAITSTATE_SAL4_GIRL_RUN: + if(CAnimManager::GetAnimationBlock("sal4")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal4")); + break; + case WAITSTATE_SAL6_ANGRY_SEATED: + case WAITSTATE_SAL6_IDLE_SEATED: + if(CAnimManager::GetAnimationBlock("sal6")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal6")); + break; + case WAITSTATE_SAL7_LOOKOUT: + if(CAnimManager::GetAnimationBlock("sal7")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal7")); + break; + case WAITSTATE_VIC2_POINT_ANGRY: + if(CAnimManager::GetAnimationBlock("vic2")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic2")); + break; + case WAITSTATE_VIC3_WAFT: + case WAITSTATE_VIC3_PICKUP_ROLL: + if(CAnimManager::GetAnimationBlock("vic3")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic3")); + break; + case WAITSTATE_VIC4_CARRY_BOX: + case WAITSTATE_VIC4_CELL_LOOK: + case WAITSTATE_VIC4_CRATE_IDLE: + if(CAnimManager::GetAnimationBlock("vic4")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic4")); + break; + case WAITSTATE_VIC6_CELL_ANGRY: + if(CAnimManager::GetAnimationBlock("vic6")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic6")); + break; + case WAITSTATE_TOURIST3: + case WAITSTATE_TOURIST2: + case WAITSTATE_TOURIST1: + if(CAnimManager::GetAnimationBlock("tourist")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("tourist")); + break; + case WAITSTATE_MAC2_PLEAD: + if(CAnimManager::GetAnimationBlock("mac2")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mac2")); + break; + case WAITSTATE_VIC7_PROD_WITH_FOOT: + if(CAnimManager::GetAnimationBlock("vic7")) + CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic7")); + break; + default: + break; + } +} + + #ifdef COMPATIBLE_SAVES #define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data)); #define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data)); diff --git a/src/peds/Ped.h b/src/peds/Ped.h index f5a7d7dc..bed1e2e1 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -100,9 +100,31 @@ enum PedFightMoves { FIGHTMOVE_NULL, // Attacker - FIGHTMOVE_STDPUNCH, +// FIGHTMOVE_STDPUNCH, FIGHTMOVE_IDLE, FIGHTMOVE_SHUFFLE_F, + // Combos + FIGHTMOVE_COMBO_A1, + FIGHTMOVE_COMBO_A2, + FIGHTMOVE_COMBO_A3, + FIGHTMOVE_COMBO_B1, + FIGHTMOVE_COMBO_B2, + FIGHTMOVE_COMBO_B3, + // Melee + FIGHTMOVE_MELEE1, + FIGHTMOVE_MELEE2, + FIGHTMOVE_MELEE3, + // Special + FIGHTMOVE_GROUNDKICK, + // Opponent + FIGHTMOVE_HITFRONT, + FIGHTMOVE_HITBACK, + FIGHTMOVE_HITRIGHT, + FIGHTMOVE_HITLEFT, + FIGHTMOVE_HITONFLOOR, + FIGHTMOVE_HITBEHIND, + FIGHTMOVE_IDLE2NORM, +/* FIGHTMOVE_KNEE, FIGHTMOVE_PUNCHHOOK, FIGHTMOVE_PUNCHJAB, @@ -134,7 +156,16 @@ enum PedFightMoves FIGHTMOVE_MELEE2, FIGHTMOVE_MELEE3, FIGHTMOVE_IDLE2NORM, - NUM_FIGHTMOVES +*/ + + NUM_FIGHTMOVES, + + // LCS replacements for the old names: + // NB: this may be totally bogus, i just need it to compile + FIGHTMOVE_PUNCH = FIGHTMOVE_COMBO_A2, + FIGHTMOVE_FWDRIGHT = FIGHTMOVE_COMBO_B1, + FIGHTMOVE_LONGKICK = FIGHTMOVE_COMBO_B2, + FIGHTMOVE_ROUNDHOUSE = FIGHTMOVE_COMBO_B3, }; enum ePedPieceTypes @@ -185,6 +216,56 @@ enum eWaitState { WAITSTATE_GROUND_ATTACK, WAITSTATE_LANCESITTING, WAITSTATE_PLAYANIM_HANDSUP_SIMPLE, + WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE, + WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, + WAITSTATE_CS_MISC_IDLE_LOOK, + WAITSTATE_CS_MISC_IDLE_NO, + WAITSTATE_CS_MISC_IDLE_YES, + WAITSTATE_CS_MISC_IDLE_CHAT2, + WAITSTATE_CS_MISC_IDLE_COUGH, + WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE, + WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT, + WAITSTATE_CS_MISC_IDLE_CELL_TALK, + WAITSTATE_DONH2_CAMERA, + WAITSTATE_DONH3_HAPPY, + WAITSTATE_JDT2_ANXIOUS_TALK, + WAITSTATE_JDT2_SHRUG, + WAITSTATE_JDT4_DILDO_TALK, + WAITSTATE_JDT5_CALM_DOWN, + WAITSTATE_JDT5_POINT, + WAITSTATE_JDT6_PICKUP, + WAITSTATE_MAR1_SKIRT, + WAITSTATE_MAR2_CELL_ANSWER, + WAITSTATE_MAR2_CELL_END, + WAITSTATE_MAR2_CELL_TALK, + WAITSTATE_MAR2_FOOT_TAP, + WAITSTATE_MAR3_HOOCHY, + WAITSTATE_MAR3_NOTE_IDLE, + WAITSTATE_MAR3_NOTE_PICKUP, + WAITSTATE_SAL1_BIREFCASE_DOWN, + WAITSTATE_SAL2_IDLE_SEATED, + WAITSTATE_SAL2_SEAT_TO_STAND, + WAITSTATE_SAL3_SEATED_TALK, + WAITSTATE_SAL3_SEATED_IDLE, + WAITSTATE_SAL4_DUST_DOWN, + WAITSTATE_SAL4_GIRL_RUN, + WAITSTATE_SAL6_ANGRY_SEATED, + WAITSTATE_SAL6_IDLE_SEATED, + WAITSTATE_SAL7_LOOKOUT, + WAITSTATE_VIC2_POINT_ANGRY, + WAITSTATE_VIC3_WAFT, + WAITSTATE_VIC3_PICKUP_ROLL, + WAITSTATE_VIC4_CARRY_BOX, + WAITSTATE_VIC4_CELL_LOOK, + WAITSTATE_VIC4_CRATE_IDLE, + WAITSTATE_VIC6_CELL_ANGRY, + WAITSTATE_TOURIST3, + WAITSTATE_TOURIST2, + WAITSTATE_TOURIST1, + WAITSTATE_MAC2_PLEAD, + WAITSTATE_JDT6_KNOCK, + WAITSTATE_SAL3_SIT_DOWN, + WAITSTATE_VIC7_PROD_WITH_FOOT }; enum eObjective { @@ -375,7 +456,7 @@ public: float m_fCollisionSpeed; // cf. https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/CPed.h from R* - uint32 bIsStanding : 1; + uint32 bIsStanding : 1; // 0x194 on PS2, 0x1A4 on android uint32 bWasStanding : 1; uint32 bIsAttacking : 1; // doesn't reset after fist fight uint32 bIsPointingGunAt : 1; @@ -468,7 +549,7 @@ public: uint32 bIsDrowning : 1; uint32 bDrownsInWater : 1; uint32 bWaitForLeaderToComeCloser : 1; - uint32 bHeldHostageInCar : 1; + uint32 bHeldHostageInCar : 1; // one flag was added somewhere after this one (TODO: figure out where and which) uint32 bIsPlayerFriend : 1; uint32 bHeadStuckInCollision : 1; uint32 bDeadPedInFrontOfCar : 1; @@ -481,7 +562,7 @@ public: uint32 bMakeFleeScream : 1; uint32 bPushedAlongByCar : 1; uint32 bRemoveMeWhenIGotIntoCar : 1; - uint32 bIgnoreThreatsBehindObjects : 1; + uint32 bIgnoreThreatsBehindObjects : 1; // one flag was added somewhere before this one (TODO: figure out where and which) uint32 bNeverEverTargetThisPed : 1; uint32 bCrouchWhenScared : 1; @@ -490,18 +571,42 @@ public: uint32 bCollectBusFare : 1; uint32 bBoughtIceCream : 1; uint32 bDonePositionOutOfCollision : 1; - uint32 bCanAttackPlayerWithCops : 1; + + uint32 bCanAttackPlayerWithCops : 1; // 1A1_1 on PS2 + uint32 bOnlyAllowedToSitBehind : 1; + uint32 bOnlyAllowedToSitInFront : 1; + uint32 b1A1_8 : 1; + uint32 b1A1_10 : 1; + uint32 bOverrideMoveAnim : 1; #ifdef KANGAROO_CHEAT // our own flags uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle #endif - uint8 m_gangFlags; - uint8 m_unused15D; // these 3 can't be padding but had to actually have been members ... - uint8 m_unused15E; - uint8 m_unused15F; - uint8 CharCreatedBy; + uint16 m_gangFlags; // <- this one is uint16 + + uint8 bDropsWeaponsOnDeath : 1; + uint8 b1A4_2 : 1; + uint8 bAttacksPlayerWithCops : 1; + uint8 b1A4_8 : 1; + uint8 b1A4_10 : 1; + uint8 b1A4_20 : 1; + uint8 b1A4_40 : 1; + uint8 b1A4_80 : 1; + + uint8 bCanBeTargettedByLeader : 1; + uint8 b1A5_2 : 1; + uint8 b1A5_4 : 1; + uint8 b1A5_8 : 1; + uint8 b1A5_10 : 1; + uint8 b1A5_20 : 1; + uint8 b1A5_40 : 1; + uint8 b1A5_80 : 1; + + uint8 unk_1A6; // <- init with 100 in constructor + + uint8 CharCreatedBy; // 1AC eObjective m_objective; eObjective m_prevObjective; CPed *m_pedInObjective; @@ -550,6 +655,8 @@ public: float m_fHealth; float m_fArmour; uint32 m_nExtendedRangeTimer; + uint32 m_nScriptShootTimer; + uint32 m_nScriptAttackTimer; int16 m_routeLastPoint; uint16 m_routeStartPoint; int16 m_routePointsPassed; @@ -649,6 +756,7 @@ public: uint32 m_lastComment; CVector m_vecSpotToGuard; float m_radiusToGuard; + float m_fMaxHealth; static void *operator new(size_t) throw(); static void *operator new(size_t, int) throw(); @@ -718,6 +826,7 @@ public: void SetObjective(eObjective); void SetObjective(eObjective, int16, int16); void SetObjective(eObjective, CVector); + void SetObjective(eObjective, CVector, float); void SetObjective(eObjective, float, const CVector&); void ClearChat(void); void InformMyGangOfAttack(CEntity*); @@ -767,7 +876,7 @@ public: void SetEvasiveDive(CPhysical*, uint8); void SetAttack(CEntity*); void StartFightAttack(uint8); - void SetWaitState(eWaitState, void*); + void SetWaitState(eWaitState, void*, bool repeat = false); bool FightStrike(CVector&, bool); void FightHitPed(CPed*, CVector&, CVector&, int16); int32 ChooseAttackPlayer(uint8, bool); @@ -850,6 +959,7 @@ public: void SetSolicit(uint32 time); void ScanForInterestingStuff(void); void WarpPedIntoCar(CVehicle*); + void WarpPedIntoCarAsPassenger(CVehicle*, int32); void SetCarJack(CVehicle*); bool WarpPedToNearLeaderOffScreen(void); void Solicit(void); @@ -1004,6 +1114,16 @@ public: { return m_pMyVehicle != nil && ((CEntity*)m_pMyVehicle)->GetStatus() != STATUS_WRECKED; } + bool CanStartMission() // used in CAN_PLAYER_START_MISSION and can looks like inlined function + { + if (m_nPedState >= PED_WANDER_RANGE && m_nPedState < PED_STATES_NO_AI && m_nPedState != PED_ANSWER_MOBILE) + return false; + if (m_nPedState >= PED_JUMP && m_nPedState < PED_STATES_NO_ST) + return false; + if (m_nPedState >= PED_ENTER_TRAIN && m_nPedState < PED_DEPLOY_STINGER) + return false; + return !bIsInTheAir && !bIsLanding && m_fHealth > 0.0f; + } // My names. Inlined in VC AnimationId GetFireAnimNotDucking(CWeaponInfo* weapon) { @@ -1022,7 +1142,7 @@ public: static AnimationId GetFireAnimGround(CWeaponInfo* weapon, bool kickFloorIfNone = true) { if (weapon->IsFlagSet(WEAPONFLAG_GROUND_2ND)) - return ANIM_WEAPON_CROUCHFIRE; + return ANIM_ATTACK_2; else if (weapon->IsFlagSet(WEAPONFLAG_GROUND_3RD)) return ANIM_WEAPON_FIRE_3RD; else if (kickFloorIfNone) @@ -1035,26 +1155,26 @@ public: if (weapon->IsFlagSet(WEAPONFLAG_ANIMDETONATE)) return ANIM_STD_DETONATE; else - return ANIM_WEAPON_FIRE; + return ANIM_ATTACK_1; } static AnimationId GetCrouchReloadAnim(CWeaponInfo* weapon) { if (weapon->IsFlagSet(WEAPONFLAG_RELOAD)) - return ANIM_WEAPON_CROUCHRELOAD; + return ANIM_ATTACK_EXTRA2; else return (AnimationId)0; } static AnimationId GetCrouchFireAnim(CWeaponInfo* weapon) { if (weapon->IsFlagSet(WEAPONFLAG_CROUCHFIRE)) - return ANIM_WEAPON_CROUCHFIRE; + return ANIM_ATTACK_2; else return (AnimationId)0; } static AnimationId GetReloadAnim(CWeaponInfo* weapon) { if (weapon->IsFlagSet(WEAPONFLAG_RELOAD)) - return ANIM_WEAPON_RELOAD; + return ANIM_ATTACK_EXTRA1; else return (AnimationId)0; } @@ -1155,6 +1275,9 @@ public: static bool bPedCheat3; static CVector2D ms_vec2DFleePosition; + static void LoadNonStandardPedAnim(eWaitState waitState); + static void UnloadNonStandardPedAnim(eWaitState waitState); + #ifndef MASTER // Mobile things void DebugDrawPedDestination(CPed *, int, int); diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index e204dad9..73522fe3 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -362,6 +362,51 @@ CPed::SetObjective(eObjective newObj, void *entity) } } +void +CPed::SetObjective(eObjective newObj, CVector dest, float safeDist) +{ + if (DyingOrDead()) + return; + + if (m_prevObjective != OBJECTIVE_NONE && m_prevObjective == newObj) + return; + + if (m_objective == newObj) { + if (newObj == OBJECTIVE_GOTO_AREA_ANY_MEANS || newObj == OBJECTIVE_GOTO_AREA_ON_FOOT || newObj == OBJECTIVE_RUN_TO_AREA || newObj == OBJECTIVE_SPRINT_TO_AREA) { + if (m_nextRoutePointPos == dest && m_distanceToCountSeekDone == safeDist) + return; + } + else if (newObj == OBJECTIVE_GUARD_SPOT) { + if (m_vecSpotToGuard == dest && m_radiusToGuard == safeDist) + return; + } + } + + ClearPointGunAt(); + SetObjectiveTimer(0); + bObjectiveCompleted = false; + if (IsTemporaryObjective(m_objective)) { + m_prevObjective = newObj; + } + else { + if (m_objective != newObj) + SetStoredObjective(); + + m_objective = newObj; + } + + if (newObj == OBJECTIVE_GUARD_SPOT) { + m_vecSpotToGuard = dest; + m_radiusToGuard = safeDist; + } + else if (newObj == OBJECTIVE_GOTO_AREA_ANY_MEANS || newObj == OBJECTIVE_GOTO_AREA_ON_FOOT || newObj == OBJECTIVE_RUN_TO_AREA || newObj == OBJECTIVE_SPRINT_TO_AREA) { + m_pNextPathNode = nil; + m_nextRoutePointPos = dest; + m_vecSeekPos = m_nextRoutePointPos; + bUsePedNodeSeek = true; + } +} + // Only used in 01E1: SET_CHAR_OBJ_FOLLOW_ROUTE opcode // IDA fails very badly in here, puts a fake loop and ignores SetFollowRoute call... void @@ -6454,7 +6499,7 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith } } if (m_pedInObjective->IsPlayer() && m_nPedType != PEDTYPE_COP - && CharCreatedBy != MISSION_CHAR && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) { + && CharCreatedBy != MISSION_CHAR && FindPlayerPed()->m_pWanted->m_CurrentCops != 0/* TODO: && !bAttacksPlayerWithCops*/) { SetObjective(OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE); return CANT_ATTACK; diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp index 20df6553..6fd1e949 100644 --- a/src/peds/PedFight.cpp +++ b/src/peds/PedFight.cpp @@ -31,6 +31,7 @@ RpClump* flyingClumpTemp; FightMove tFightMoves[NUM_FIGHTMOVES] = { +/* { ANIM_STD_NUM, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }, { ANIM_STD_PUNCH, 0.2f, 8.f/30.f, 0.0f, 0.3f, 1.0f, HITLEVEL_HIGH, 1, 0 }, { ANIM_STD_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }, @@ -63,6 +64,7 @@ FightMove tFightMoves[NUM_FIGHTMOVES] = { ANIM_ATTACK_2, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 }, { ANIM_ATTACK_3, 4.f / 30.f, 7.f / 30.f, 10.f / 30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 }, { ANIM_STD_FIGHT_2IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 } +*/ }; static PedOnGroundState @@ -182,14 +184,14 @@ CPed::SetPointGunAt(CEntity *to) if (bCrouchWhenShooting && bIsDucking && GetCrouchFireAnim(curWeapon)) { aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(curWeapon)); } else { - aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE); + aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1); } if (!aimAssoc || aimAssoc->blendDelta < 0.0f) { if (bCrouchWhenShooting && bIsDucking && GetCrouchFireAnim(curWeapon)) { aimAssoc = CAnimManager::BlendAnimation(GetClump(), curWeapon->m_AnimToPlay, GetCrouchFireAnim(curWeapon), 4.0f); } else { - aimAssoc = CAnimManager::AddAnimation(GetClump(), curWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE); + aimAssoc = CAnimManager::AddAnimation(GetClump(), curWeapon->m_AnimToPlay, ANIM_ATTACK_1); } aimAssoc->blendAmount = 0.0f; @@ -204,7 +206,7 @@ CPed::PointGunAt(void) { CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType); float animLoopStart = weaponInfo->m_fAnimLoopStart; - CAnimBlendAssociation *weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE); + CAnimBlendAssociation *weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1); if (!weaponAssoc || weaponAssoc->blendDelta < 0.0f) { if (weaponInfo->IsFlagSet(WEAPONFLAG_CROUCHFIRE)) { weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weaponInfo)); @@ -240,7 +242,7 @@ CPed::ClearPointGunAt(void) RestorePreviousState(); } weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType); - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1); if (!animAssoc || animAssoc->blendDelta < 0.0f) { if (weaponInfo->IsFlagSet(WEAPONFLAG_CROUCHFIRE)) { animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weaponInfo)); @@ -1004,7 +1006,7 @@ CPed::Attack(void) weaponAnimAssoc->SetFinishCallback(FinishedAttackCB, this); } else if (GetSecondFireAnim(ourWeapon)) { if (weaponAnimAssoc->animId == GetSecondFireAnim(ourWeapon)) { - weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE, 8.0f); + weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_ATTACK_1, 8.0f); } else { weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, GetSecondFireAnim(ourWeapon), 8.0f); } @@ -1110,10 +1112,7 @@ CPed::StartFightAttack(uint8 buttonPressure) break; } } else { - if (m_curFightMove == FIGHTMOVE_BACKKICK) - animAssoc->speed = 1.15f; - else - animAssoc->speed = 0.8f; + animAssoc->speed = 0.8f; } if (IsPlayer()) animAssoc->SetCurrentTime(0.08f); @@ -1221,12 +1220,14 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) default: if (hitLevel == HITLEVEL_LOW) { hitAnim = ANIM_STD_KO_SHOT_STOMACH; +/* LCS: removed } else if (CGeneral::GetRandomNumber() & 1) { fall = false; hitAnim = ANIM_STD_HIT_WALK; } else if (CGeneral::GetRandomNumber() & 1) { fall = false; hitAnim = ANIM_STD_HIT_HEAD; +*/ } else { hitAnim = ANIM_STD_KO_SHOT_FACE; } @@ -1261,7 +1262,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) Say(SOUND_PED_DEFEND); return; } - m_curFightMove = FIGHTMOVE_HITBODY; + m_curFightMove = FIGHTMOVE_HITFRONT; // LCS break; case HITLEVEL_HIGH: switch (direction) { @@ -1275,10 +1276,12 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) m_curFightMove = FIGHTMOVE_HITRIGHT; break; default: - if (unk <= 5) - m_curFightMove = FIGHTMOVE_HITHEAD; - else - m_curFightMove = FIGHTMOVE_HITBIGSTEP; + // LCS: removed + //if (unk <= 5) + // m_curFightMove = FIGHTMOVE_HITHEAD; + //else + // m_curFightMove = FIGHTMOVE_HITBIGSTEP; + m_curFightMove = FIGHTMOVE_HITFRONT; break; } break; @@ -1294,10 +1297,12 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) m_curFightMove = FIGHTMOVE_HITRIGHT; break; default: - if (unk <= 5) - m_curFightMove = FIGHTMOVE_HITCHEST; - else - m_curFightMove = FIGHTMOVE_HITBIGSTEP; + // LCS: removed + //if (unk <= 5) + // m_curFightMove = FIGHTMOVE_HITCHEST; + //else + // m_curFightMove = FIGHTMOVE_HITBIGSTEP; + m_curFightMove = FIGHTMOVE_HITFRONT; break; } break; @@ -1450,30 +1455,30 @@ CPed::Fight(void) CVector touchingNodePos(0.0f, 0.0f, 0.0f); switch (m_curFightMove) { - case FIGHTMOVE_KNEE: - TransformToNode(touchingNodePos, PED_LOWERLEGR); - break; - case FIGHTMOVE_PUNCHHOOK: - case FIGHTMOVE_PUNCHJAB: - TransformToNode(touchingNodePos, PED_HANDL); - break; + // case FIGHTMOVE_KNEE: + // TransformToNode(touchingNodePos, PED_LOWERLEGR); + // break; + // case FIGHTMOVE_PUNCHHOOK: + // case FIGHTMOVE_PUNCHJAB: + // TransformToNode(touchingNodePos, PED_HANDL); + // break; case FIGHTMOVE_LONGKICK: case FIGHTMOVE_ROUNDHOUSE: - case FIGHTMOVE_FWDLEFT: - case FIGHTMOVE_BACKRIGHT: + // case FIGHTMOVE_FWDLEFT: + // case FIGHTMOVE_BACKRIGHT: case FIGHTMOVE_GROUNDKICK: TransformToNode(touchingNodePos, PED_FOOTR); break; case FIGHTMOVE_FWDRIGHT: TransformToNode(touchingNodePos, PED_HEAD); break; - case FIGHTMOVE_BACKKICK: - case FIGHTMOVE_BACKFLIP: - TransformToNode(touchingNodePos, PED_FOOTL); - break; - case FIGHTMOVE_BACKLEFT: - TransformToNode(touchingNodePos, PED_UPPERARML); - break; + // case FIGHTMOVE_BACKKICK: + // case FIGHTMOVE_BACKFLIP: + // TransformToNode(touchingNodePos, PED_FOOTL); + // break; + // case FIGHTMOVE_BACKLEFT: + // TransformToNode(touchingNodePos, PED_UPPERARML); + // break; default: TransformToNode(touchingNodePos, PED_HANDR); break; @@ -1525,10 +1530,7 @@ CPed::Fight(void) tFightMoves[m_curFightMove].animId, 8.0f); if (weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE || m_curFightMove < FIGHTMOVE_MELEE1) { - if (m_curFightMove == FIGHTMOVE_BACKKICK) - animAssoc->speed = 1.15f; - else - animAssoc->speed = 0.8f; + animAssoc->speed = 0.8f; } else { switch (GetWeapon()->m_eWeaponType) { case WEAPONTYPE_SCREWDRIVER: @@ -1668,8 +1670,9 @@ CPed::ChooseAttackAI(uint8 buttonPressure, bool fightWithWeapon) return FIGHTMOVE_IDLE; } } - if (dist < 0.95f && canKneeHead) - return FIGHTMOVE_KNEE; + // LCS: removed + //if (dist < 0.95f && canKneeHead) + // return FIGHTMOVE_KNEE; if (dist < 1.4f) return FIGHTMOVE_PUNCH; if (dist < 2.f && canKick) { @@ -1787,9 +1790,11 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon) switch (dir) { case 0: // forward if (fightWithWeapon) { - if (distToVictim < 0.95f - 0.2f && m_nPedState == PED_FIGHT) { - choosenMove = FIGHTMOVE_KNEE; - } else { + // LCS: removed + //if (distToVictim < 0.95f - 0.2f && m_nPedState == PED_FIGHT) { + // choosenMove = FIGHTMOVE_KNEE; + //} else + { if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CLEAVER) { if (distToVictim < 0.85f * weaponInfo->m_fRange) choosenMove = FIGHTMOVE_MELEE1; @@ -1812,18 +1817,20 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon) } } } - } else if (distToVictim < 0.95f && m_nPedState == PED_FIGHT) { - choosenMove = FIGHTMOVE_KNEE; + // LCS: removed + //} else if (distToVictim < 0.95f && m_nPedState == PED_FIGHT) { + // choosenMove = FIGHTMOVE_KNEE; } else if (distToVictim < 1.4f) { - if (m_curFightMove == FIGHTMOVE_PUNCHJAB) { + // LCS: removed + /*if (m_curFightMove == FIGHTMOVE_PUNCHJAB) { choosenMove = FIGHTMOVE_PUNCH; - } else if (m_curFightMove != FIGHTMOVE_PUNCH || randVal != 1) { - if (randVal == 2) + } else*/ if (m_curFightMove != FIGHTMOVE_PUNCH || randVal != 1) { + //if (randVal == 2) choosenMove = FIGHTMOVE_PUNCH; - else - choosenMove = FIGHTMOVE_PUNCHJAB; + //else + // choosenMove = FIGHTMOVE_PUNCHJAB; } else { choosenMove = FIGHTMOVE_LONGKICK; } @@ -1831,6 +1838,7 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon) choosenMove = FIGHTMOVE_LONGKICK; } break; +/* LCS: removed case 1: choosenMove = FIGHTMOVE_FWDLEFT; break; @@ -1843,6 +1851,7 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon) case 4: choosenMove = FIGHTMOVE_BACKRIGHT; break; +*/ default: choosenMove = FIGHTMOVE_FWDRIGHT; break; @@ -1908,20 +1917,22 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon) #else switch (CGeneral::GetRandomNumberInRange(0,3)) { #endif - case 0: - choosenMove = FIGHTMOVE_PUNCHJAB; - break; + // LCS: hack hack + // case 0: + // choosenMove = FIGHTMOVE_PUNCHJAB; + // break; + default: case 1: choosenMove = FIGHTMOVE_PUNCH; break; case 2: choosenMove = FIGHTMOVE_LONGKICK; break; - case 3: - choosenMove = FIGHTMOVE_KNEE; - break; - default: - break; + // case 3: + // choosenMove = FIGHTMOVE_KNEE; + // break; + // default: + // break; } } return choosenMove; @@ -1964,6 +1975,7 @@ CPed::EndFight(uint8 endType) void CPed::PlayHitSound(CPed *hitTo) { +#if 0 // LCS: temporarily removed // That was very complicated to reverse for me... // First index is our fight move ID (from 1 to 17, total 17), second is the one of we fight with (from 18 to 27, total 10). enum { @@ -2034,6 +2046,7 @@ CPed::PlayHitSound(CPed *hitTo) if (soundId != NO_SND) DMAudio.PlayOneShot(m_audioEntityId, soundId, (weapon << 8) | ENTITY_TYPE_PED); +#endif } bool @@ -2165,8 +2178,9 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dir, int16 piece) bool brassKnucklePunch = false; if (GetWeapon()->m_eWeaponType == WEAPONTYPE_BRASSKNUCKLE) { - if (m_curFightMove == FIGHTMOVE_PUNCHHOOK || m_curFightMove == FIGHTMOVE_PUNCHJAB || m_curFightMove == FIGHTMOVE_BACKLEFT || - m_curFightMove == FIGHTMOVE_STDPUNCH || m_curFightMove == FIGHTMOVE_PUNCH) { + // LCS: removed + if (/*m_curFightMove == FIGHTMOVE_PUNCHHOOK || m_curFightMove == FIGHTMOVE_PUNCHJAB || m_curFightMove == FIGHTMOVE_BACKLEFT || + m_curFightMove == FIGHTMOVE_STDPUNCH ||*/ m_curFightMove == FIGHTMOVE_PUNCH) { brassKnucklePunch = true; damageMult *= 1.5f; } @@ -4154,7 +4168,7 @@ CPed::RemoveWeaponAnims(int unused, float animDelta) CAnimBlendAssociation *weaponAssoc; //CWeaponInfo::GetWeaponInfo(unused); - weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE); + weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1); if (weaponAssoc) { weaponAssoc->blendDelta = animDelta; weaponAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -4169,7 +4183,7 @@ CPed::RemoveWeaponAnims(int unused, float animDelta) weaponAssoc->blendDelta = animDelta; weaponAssoc->flags |= ASSOC_DELETEFADEDOUT; } - weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_RELOAD); + weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_EXTRA1); if (weaponAssoc) { weaponAssoc->blendDelta = animDelta; weaponAssoc->flags |= ASSOC_DELETEFADEDOUT; diff --git a/src/peds/PedType.h b/src/peds/PedType.h index a4698bbb..776dd14d 100644 --- a/src/peds/PedType.h +++ b/src/peds/PedType.h @@ -95,6 +95,9 @@ VALIDATE_SIZE(CPedType, 0x20); enum ePedStats { + PEDSTAT_COWARD, + PEDSTAT_SHOPPER, + PEDSTAT_OLDSHOPPER, PEDSTAT_PLAYER, PEDSTAT_COP, PEDSTAT_MEDIC, @@ -106,6 +109,8 @@ enum ePedStats PEDSTAT_GANG5, PEDSTAT_GANG6, PEDSTAT_GANG7, + PEDSTAT_GANG8, + PEDSTAT_GANG9, PEDSTAT_STREET_GUY, PEDSTAT_SUIT_GUY, PEDSTAT_SENSIBLE_GUY, @@ -128,13 +133,10 @@ enum ePedStats PEDSTAT_PSYCHO, PEDSTAT_STEWARD, PEDSTAT_SPORTSFAN, - PEDSTAT_SHOPPER, - PEDSTAT_OLDSHOPPER, PEDSTAT_BEACH_GUY, PEDSTAT_BEACH_GIRL, PEDSTAT_SKATER, PEDSTAT_STD_MISSION, - PEDSTAT_COWARD, NUM_PEDSTATS }; diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 1d96ba6d..88c1e6bf 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -1143,7 +1143,8 @@ void CPlayerPed::ProcessAnimGroups(void) { AssocGroupId groupToSet; -#ifdef PC_PLAYER_CONTROLS +//#ifdef PC_PLAYER_CONTROLS +#if 0 // chainsaw anims missing in LCS if ((m_fWalkAngle <= -DEGTORAD(50.0f) || m_fWalkAngle >= DEGTORAD(50.0f)) && TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam() && CanStrafeOrMouseControl()) { diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 384cef99..0f68c679 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -1207,10 +1207,11 @@ CPopulation::IsSkateable(CVector const& pos) return foundCol.surfaceB == SURFACE_TARMAC || foundCol.surfaceB == SURFACE_PAVEMENT; } +//--LCS: done bool CPopulation::CanJeerAtStripper(int32 model) { - return model == MI_WMOBE || model == MI_WMYBE || model == MI_WMOST || model == MI_BMYBB; + return false; } void @@ -1242,46 +1243,38 @@ bool CPopulation::IsMale(int32 model) { switch (model) { - case MI_HMYST: - case MI_HMOST: - case MI_HMYRI: - case MI_HMORI: - case MI_HMYBE: - case MI_HMOBE: - case MI_HMOTR: - case MI_HMYAP: - case MI_HMOCA: - case MI_BMODK: - case MI_BMYKR: - case MI_BMYST: - case MI_BMOST: - case MI_BMYRI: - case MI_BMYBE: - case MI_BMOBE: - case MI_BMYBU: - case MI_BMOTR: - case MI_BMYPI: - case MI_BMYBB: - case MI_WMYCR: - case MI_WMYST: - case MI_WMOST: - case MI_WMYRI: - case MI_WMORI: - case MI_WMYBE: - case MI_WMOBE: - case MI_WMYCW: - case MI_WMYGO: - case MI_WMOGO: - case MI_WMYLG: - case MI_WMYBU: - case MI_WMOBU: - case MI_WMOTR: - case MI_WMYPI: - case MI_WMOCA: - case MI_WMYJG: - case MI_WMYSK: - - // BUG? Why no JMOTO? + // TODO(LCS): do this right + case MI_TAXI_D: + case MI_PIMP: + case MI_CRIMINAL01: + case MI_CRIMINAL02: + case MI_MALE02: + case MI_MALE03: + case MI_P_MAN1: + case MI_P_MAN2: + case MI_CT_MAN1: + case MI_CT_MAN2: + case MI_LI_MAN1: + case MI_LI_MAN2: + case MI_DOCKER1: + case MI_DOCKER2: + case MI_SCUM_MAN: + case MI_WORKER1: + case MI_WORKER2: + case MI_B_MAN1: + case MI_B_MAN2: + case MI_B_MAN3: + case MI_MOD_MAN: + case MI_ST_MAN: + case MI_FAN_MAN1: + case MI_FAN_MAN2: + case MI_HOS_MAN: + case MI_CONST1: + case MI_CONST2: + case MI_STUD_MAN: + case MI_CAS_MAN: + case MI_CAMP_MAN: + case MI_HITMAN: return true; default: return false; @@ -1292,41 +1285,34 @@ bool CPopulation::IsFemale(int32 model) { switch (model) { - case MI_HFYST: - case MI_HFOST: - case MI_HFYRI: - case MI_HFORI: - case MI_HFYBE: - case MI_HFOBE: - case MI_HFYBU: - case MI_HFYMD: - case MI_HFYCG: - case MI_HFYPR: - case MI_HFOTR: - case MI_BFYST: - case MI_BFOST: - case MI_BFYRI: - case MI_BFORI: - case MI_BFYBE: - case MI_BFOBE: - case MI_BFYPR: - case MI_BFOTR: - case MI_WFYST: - case MI_WFOST: - case MI_WFYRI: - case MI_WFORI: - case MI_WFYBE: - case MI_WFOBE: - case MI_WFOGO: - case MI_WFYLG: - case MI_WFYBU: - case MI_WFYPR: - case MI_WFOTR: - case MI_WFYJG: - case MI_WFYSK: - case MI_WFYSH: - case MI_WFOSH: - case MI_JFOTO: + // TODO(LCS): do this right + case MI_FEMALE01: + case MI_FEMALE02: + case MI_FEMALE03: + case MI_FATFEMALE01: + case MI_FATFEMALE02: + case MI_PROSTITUTE: + case MI_PROSTITUTE2: + case MI_P_WOM1: + case MI_P_WOM2: + case MI_CT_WOM1: + case MI_CT_WOM2: + case MI_LI_WOM1: + case MI_LI_WOM2: + case MI_SCUM_WOM: + case MI_B_WOM1: + case MI_B_WOM2: + case MI_B_WOM3: + case MI_MOD_WOM: + case MI_ST_WOM: + case MI_FAN_WOM: + case MI_HOS_WOM: + case MI_SHOPPER1: + case MI_SHOPPER2: + case MI_SHOPPER3: + case MI_STUD_WOM: + case MI_CAS_WOM: + case MI_CAMP_WOM: return true; default: return false; @@ -1336,23 +1322,7 @@ CPopulation::IsFemale(int32 model) bool CPopulation::IsSunbather(int32 model) { - switch (model) { - case MI_HFYBE: - case MI_HFOBE: - case MI_HMYBE: - case MI_HMOBE: - case MI_BFYBE: - case MI_BMYBE: - case MI_BFOBE: - case MI_BMOBE: - case MI_WFYBE: - case MI_WMYBE: - case MI_WFOBE: - case MI_WMOBE: - return true; - default: - return false; - } + return false; } int32 @@ -1364,13 +1334,13 @@ CPopulation::ComputeRandomisedGangSize(void) bool CPopulation::CanSolicitPlayerInCar(int32 model) { - return model == MI_HFYPR || model == MI_BFYPR || model == MI_WFYPR; + return model == MI_PROSTITUTE || model == MI_PROSTITUTE2; } bool CPopulation::CanSolicitPlayerOnFoot(int32 model) { - return model == MI_HFYMD || model == MI_HFYCG || model == MI_BFOTR || model == MI_BMOTR || model == MI_WFOTR || model == MI_WMOTR; + return model == MI_B_WOM3 || model == MI_FEMALE01 || model == MI_FEMALE02 || model == MI_FEMALE03; } bool diff --git a/src/renderer/Coronas.cpp b/src/renderer/Coronas.cpp index d9bf88d1..a00dc165 100644 --- a/src/renderer/Coronas.cpp +++ b/src/renderer/Coronas.cpp @@ -913,9 +913,9 @@ CEntity::ProcessLightsForEntity(void) effect->light.shadowSize, 0.0f, 0.0f, -effect->light.shadowSize, 128, - effect->col.r*CTimeCycle::GetSpriteBrightness()*effect->light.shadowIntensity/255.0f, - effect->col.g*CTimeCycle::GetSpriteBrightness()*effect->light.shadowIntensity/255.0f, - effect->col.b*CTimeCycle::GetSpriteBrightness()*effect->light.shadowIntensity/255.0f, + effect->col.r, + effect->col.g, + effect->col.b, 15.0f, 1.0f, 40.0f, false, 0.0f); }else if(lightFlickering){ CShadows::StoreStaticShadow((uintptr)this + i, SHADOWTYPE_ADDITIVE, diff --git a/src/renderer/Fluff.cpp b/src/renderer/Fluff.cpp index 1e4d289b..404f1a4a 100644 --- a/src/renderer/Fluff.cpp +++ b/src/renderer/Fluff.cpp @@ -424,8 +424,9 @@ void CMovingThings::Init() } } - CEscalators::Init(); - aScrollBars[0].Init(CVector(-1069.209f, 1320.126f, 18.848f), CVector(-1069.209f, 1342.299f, 22.612f), SCROLL_ARENA_STRING, 128, 255, 0, 0.3f); +// LCS: removed +// CEscalators::Init(); +// aScrollBars[0].Init(CVector(-1069.209f, 1320.126f, 18.848f), CVector(-1069.209f, 1342.299f, 22.612f), SCROLL_ARENA_STRING, 128, 255, 0, 0.3f); } void CMovingThings::Shutdown() diff --git a/src/renderer/Font.cpp b/src/renderer/Font.cpp index 9c499248..b38b0efd 100644 --- a/src/renderer/Font.cpp +++ b/src/renderer/Font.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "Sprite2d.h" #include "TxdStore.h" #include "Font.h" @@ -7,6 +8,9 @@ #include "FileMgr.h" #endif #include "Timer.h" +#include "Frontend.h" + +//--LCS: todo scaling (needs CSprite2d reversed), SuspendHandler, ReplaceGermanSZ, volatile mem, other todos void AsciiToUnicode(const char *src, wchar *dst) @@ -49,225 +53,48 @@ UnicodeMakeUpperCase(wchar *dst, const wchar *src) //idk what to do with it, see } CFontDetails CFont::Details; -int16 CFont::NewLine; +bool16 CFont::NewLine; CSprite2d CFont::Sprite[MAX_FONTS]; CFontRenderState CFont::RenderState; -#ifdef MORE_LANGUAGES -uint8 CFont::LanguageSet = FONT_LANGSET_EFIGS; -int32 CFont::Slot = -1; -#define JAP_TERMINATION (0x8000 | '~') - -int16 CFont::Size[LANGSET_MAX][MAX_FONTS][210] = { - { -#else -int16 CFont::Size[MAX_FONTS][210] = { -#endif - { - //FONT2 EFIGS - //SPC,!, $, %, &, ', [, ], +, , -, ., - 12, 9, 22, 17, 19, 19, 25, 4, 33, 33, 25, 35, 11, 10, 6, 33, - //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ??, - 18, 10, 17, 17, 17, 17, 17, 15, 12, 16, 5, 30, 30, 30, 30, 30, - // A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, - 12, 16, 19, 16, 19, 18, 18, 17, 22, 11, 17, 18, 18, 30, 22, 19, - //P, Q, R, S, T, U, V, W, X, Y, Z, ??, ??, ??, ¡, \, - #ifdef FIX_BUGS - 22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 10, 19, - #else - 22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 19, 19, - #endif - //??,a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, - 12, 14, 11, 11, 16, 11, 12, 14, 14, 10, 13, 12, 10, 19, 18, 12, - //p, q, r, s, t, u, v, w, x, y, z, ??, ??, ??, ??, ??, - 16, 13, 13, 11, 12, 15, 12, 15, 13, 12, 12, 37, 33, 37, 35, 37, - //À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó, - 16, 16, 16, 16, 33, 17, 18, 18, 18, 18, 11, 11, 11, 11, 19, 19, - //Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê, - 19, 19, 19, 19, 19, 19, 15, 14, 14, 14, 14, 20, 14, 11, 11, 11, - //ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿, - #ifdef FIX_BUGS - 11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 22, 18, 21, - #else - 11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 24, 18, 21, - #endif - //i,BLANKS - 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - //space, unprop - 19, 16 - }, - { - //FONT1 EFIGS - //Characters with a '2' refer to the Pricedown font. - //Characters that are referred as '*I' are characters that contain icons for PS2/XBOX, but contain regular characters on PC - //in order to display them properly in the Keyboard controls menu. - //!2,!, *I,(R), $, %, &, ', [, ], *I, +, , -, ., *I, - 15, 7, 31, 25, 20, 23, 21, 7, 11, 10, 26, 14, 6, 12, 6, 26, - //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, *I, *I, *I, *I, ?, - 20, 7, 20, 20, 21, 20, 20, 19, 21, 20, 8, 30, 24, 30, 24, 19, - //TM,A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, - 20, 22, 22, 21, 22, 18, 18, 22, 22, 9, 14, 21, 18, 27, 21, 24, - //P, Q, R, S, T, U, V, W, X, Y, Z, *I, \, *I, ¡, °, - #ifdef FIX_BUGS - 22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 7, 19, - #else - 22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 10, 19, - #endif - //(C),a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, - 10, 17, 17, 16, 17, 17, 11, 17, 17, 7, 7, 18, 7, 25, 17, 17, - //p, q, r, s, t, u, v, w, x, y, z, *I, *I, $2, (2, )2, - 17, 17, 11, 17, 11, 17, 18, 25, 19, 18, 17, 28, 26, 20, 15, 15, - //À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó, - 20, 20, 20, 20, 29, 22, 19, 19, 19, 19, 9, 9, 9, 9, 23, 23, - //Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê, - 23, 23, 24, 24, 24, 24, 20, 19, 17, 17, 17, 30, 16, 17, 17, 17, - //ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿, - #ifdef FIX_BUGS - 17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 21, 17, 19, - #else - 17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 19, 20, 20, - #endif - //02,12,22, 32, 42, 52, 62, 72, 82, 92, :2, A2, B2, C2, D2, E2, - 20, 18, 19, 19, 21, 19, 19, 19, 19, 19, 16, 19, 19, 19, 20, 19, - //F2,G2,H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, - 16, 19, 19, 9, 19, 20, 14, 29, 19, 19, 19, 19, 19, 19, 21, 19, - //V2,W2,X2, Y2, Z2, À2, Á2, Â2, Ä2, Æ2, Ç2, È2, É2, Ê2, Ë2, Ì2, - 20, 32, 20, 19, 19, 19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9, - //Í2,Î2,Ï2, Ò2, Ó2, Ô2, Ö2, Ù2, Ú2, Û2, Ü2, ß2, Ñ2, ¿2, '2, .2, - #ifdef FIX_BUGS - 9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 10, 9, - #else - 9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 21, 10, 9, - #endif - //space, unprop - 10, 20 - } - -#ifdef MORE_LANGUAGES - }, - { - { - 5, 9, 9, 0, 17, 17, 23, 3, 21, 18, 0, 8, 3, 8, 3, 0, - 16, 9, 16, 16, 15, 19, 15, 14, 17, 17, 4, 4, 0, 0, 0, 17, - 19, 17, 19, 15, 21, 18, 19, 16, 21, 13, 15, 21, 20, 28, 21, 18, - 22, 17, 21, 20, 18, 18, 20, 26, 22, 18, 18, 0, 8, 0, 9, 8, - 0, 14, 11, 12, 16, 11, 13, 13, 15, 10, 14, 15, 11, 21, 17, 10, - 20, 15, 12, 12, 16, 17, 13, 16, 13, 21, 11, 0, 0, 0, 0, 0, - 20, 19, 19, 22, 27, 15, 18, 18, 20, 26, 21, 23, 17, 22, 21, 17, - 26, 25, 26, 17, 20, 26, 17, 16, 11, 12, 13, 21, 11, 17, 17, 12, - 21, 17, 17, 15, 24, 16, 10, 20, 23, 16, 7, 9, 16, 23, 12, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, - 19, 16 - }, - { - 11, 5, 10, 15, 19, 22, 20, 5, 9, 8, 11, 12, 5, 12, 6, 12, - 19, 5, 18, 19, 20, 18, 19, 18, 20, 19, 5, 6, 26, 12, 30, 19, - 23, 21, 20, 20, 20, 16, 16, 21, 19, 5, 13, 19, 16, 24, 20, 21, - 20, 21, 20, 19, 17, 20, 21, 30, 22, 21, 20, 25, 13, 30, 5, 9, - 10, 15, 15, 14, 15, 16, 10, 15, 15, 5, 5, 15, 5, 23, 15, 16, - 15, 15, 9, 16, 10, 15, 17, 24, 18, 15, 15, 27, 5, 19, 2, 2, - 20, 20, 16, 23, 30, 19, 20, 20, 21, 24, 19, 19, 20, 23, 22, 19, - 27, 29, 25, 20, 20, 28, 24, 16, 16, 14, 19, 25, 16, 16, 16, 17, - 19, 16, 16, 17, 25, 19, 15, 23, 26, 21, 16, 14, 22, 20, 16, 19, - 15, 14, 15, 16, 17, 15, 15, 15, 15, 15, 7, 15, 15, 15, 15, 15, - 13, 15, 15, 7, 15, 16, 13, 23, 15, 15, 15, 15, 15, 15, 17, 15, - 16, 24, 17, 17, 17, 15, 15, 13, 20, 23, 15, 17, 17, 16, 24, 15, - 15, 15, 23, 18, 15, 23, 26, 23, 16, 15, 23, 15, 15, 19, 2, 2, - 10, 20 - }, - }, - { - { - //FONT2 EFIGS - //SPC,!, $, %, &, ', [, ], +, , -, ., - 12, 9, 22, 17, 19, 19, 25, 4, 33, 33, 25, 35, 11, 10, 6, 33, - //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ??, - 18, 10, 17, 17, 17, 17, 17, 15, 12, 16, 5, 30, 30, 30, 30, 30, - // A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, - 12, 16, 19, 16, 19, 18, 18, 17, 22, 11, 17, 18, 18, 30, 22, 19, - //P, Q, R, S, T, U, V, W, X, Y, Z, ??, ??, ??, ¡, \, - 22, 19, 19, 20, 18, 19, 19, 29, 19, 18, 19, 19, 33, 33, 10, 19, - //??,a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, - 12, 14, 11, 11, 16, 11, 12, 14, 14, 10, 13, 12, 10, 19, 18, 12, - //p, q, r, s, t, u, v, w, x, y, z, ??, ??, ??, ??, ??, - 16, 13, 13, 11, 12, 15, 12, 15, 13, 12, 12, 37, 33, 37, 35, 37, - //À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó, - 16, 16, 16, 16, 33, 17, 18, 18, 18, 18, 11, 11, 11, 11, 19, 19, - //Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê, - 19, 19, 19, 19, 19, 19, 15, 14, 14, 14, 14, 20, 14, 11, 11, 11, - //ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿, - 11, 10, 10, 10, 10, 12, 12, 12, 12, 15, 15, 15, 15, 22, 18, 21, - //i,BLANKS - 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - //space, unprop - 19, 16 - }, - { - //FONT1 EFIGS - //Characters with a '2' refer to the Pricedown font. - //Characters that are referred as '*I' are characters that contain icons for PS2/XBOX, but contain regular characters on PC - //in order to display them properly in the Keyboard controls menu. - //!2,!, *I,(R), $, %, &, ', [, ], *I, +, , -, ., *I, - 15, 7, 31, 25, 20, 23, 21, 7, 11, 10, 26, 14, 6, 12, 6, 26, - //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, *I, *I, *I, *I, ?, - 20, 7, 20, 20, 21, 20, 20, 19, 21, 20, 8, 30, 24, 30, 24, 19, - //TM,A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, - 20, 22, 22, 21, 22, 18, 18, 22, 22, 9, 14, 21, 18, 27, 21, 24, - //P, Q, R, S, T, U, V, W, X, Y, Z, *I, \, *I, ¡, °, - 22, 22, 23, 20, 19, 23, 22, 31, 23, 23, 21, 25, 13, 30, 7, 19, - //(C),a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, - 10, 17, 17, 16, 17, 17, 11, 17, 17, 7, 7, 18, 7, 25, 17, 17, - //p, q, r, s, t, u, v, w, x, y, z, *I, *I, $2, (2, )2, - 17, 17, 11, 17, 11, 17, 18, 25, 19, 18, 17, 28, 26, 20, 15, 15, - //À, Á, Â, Ä, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ò, Ó, - 20, 20, 20, 20, 29, 22, 19, 19, 19, 19, 9, 9, 9, 9, 23, 23, - //Ô, Ö, Ù, Ú, Û, Ü, ß, à, á, â, ä, æ, ç, è, é, ê, - 23, 23, 24, 24, 24, 24, 20, 19, 17, 17, 17, 30, 16, 17, 17, 17, - //ë, ì, í, î, ï, ò, ó, ô, ö, ù, ú, û, ü, Ñ, ñ, ¿, - 17, 11, 11, 15, 12, 17, 17, 17, 17, 17, 17, 17, 17, 21, 17, 19, - //02,12,22, 32, 42, 52, 62, 72, 82, 92, :2, A2, B2, C2, D2, E2, - 20, 18, 19, 19, 21, 19, 19, 19, 19, 19, 16, 19, 19, 19, 20, 19, - //F2,G2,H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, - 16, 19, 19, 9, 19, 20, 14, 29, 19, 19, 19, 19, 19, 19, 21, 19, - //V2,W2,X2, Y2, Z2, À2, Á2, Â2, Ä2, Æ2, Ç2, È2, É2, Ê2, Ë2, Ì2, - 20, 32, 20, 19, 19, 19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9, - //Í2,Î2,Ï2, Ò2, Ó2, Ô2, Ö2, Ù2, Ú2, Û2, Ü2, ß2, Ñ2, ¿2, '2, .2, - 9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 10, 9, - //space, unprop - 10, 20 - } - } -#endif +int16 CFont::Size[MAX_FONTS][419] = { + {15, 6, 8, 24, 22, 28, 28, 2, 8, 8, 12, 24, 8, 10, 8, 12, 24, 8, 22, 20, 24, 22, 22, 22, 24, 22, 8, 8, 22, 22, 24, 16, 28, 26, 20, 22, 22, 18, 18, + 24, 22, 4, 16, 20, 18, 26, 20, 24, 20, 24, 22, 24, 20, 20, 26, 32, 26, 26, 20, 10, 12, 8, 22, 18, 6, 26, 20, 22, 22, 18, 18, 24, 22, 4, 16, 20, 18, 26, + 20, 24, 20, 24, 22, 24, 20, 20, 26, 32, 26, 26, 20, 10, 12, 8, 22, 18, 26, 26, 26, 26, 26, 26, 26, 22, 18, 18, 18, 18, 8, 8, 10, 10, 26, 20, 24, 24, 24, + 24, 24, 22, 24, 20, 20, 20, 20, 26, 22, 20, 26, 26, 26, 26, 26, 26, 26, 22, 18, 18, 18, 18, 8, 8, 10, 10, 26, 20, 24, 24, 24, 24, 24, 22, 24, 20, 20, 20, + 20, 26, 22, 24, 24, 8, 16, 10, 8, 28, 8, 8, 18, 16, 10, 28, 8, 28, 24, 6, 16, 22, 18, 24, 4, 14, 10, 26, 14, 16, 26, 12, 2, 16, 16, 32, 19, 19, 19, + 19, 19, 19, 19, 19, 24, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -2, 0, -2, -2, 0, 0, 0, 0, -2, -2, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -2, 0, -2, -2, 0, 0, 0, 0, -2, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28}, + {10, 12, 20, 24, 28, 30, 28, 12, 14, 14, 20, 24, 12, 16, 10, 28, 26, 20, 24, 24, 26, 24, 24, 24, 24, 24, 12, 12, 22, 22, 24, 24, 32, 28, 24, 26, 26, 24, 22, + 28, 26, 10, 22, 26, 22, 30, 28, 28, 26, 30, 26, 26, 28, 26, 26, 32, 26, 26, 26, 14, 18, 14, 22, 22, 14, 22, 22, 22, 22, 22, 18, 22, 22, 10, 12, 20, 10, 28, + 20, 22, 22, 22, 20, 22, 20, 20, 20, 30, 20, 22, 20, 16, 10, 16, 20, 0, 28, 28, 28, 28, 28, 28, 32, 26, 24, 24, 24, 24, 14, 14, 18, 16, 30, 28, 28, 28, 28, + 28, 28, 20, 30, 26, 26, 26, 26, 28, 26, 22, 22, 22, 22, 22, 22, 22, 32, 22, 22, 22, 22, 22, 14, 14, 18, 16, 22, 20, 22, 22, 22, 22, 22, 22, 24, 20, 20, 20, + 20, 22, 22, 22, 26, 12, 18, 18, 12, 32, 12, 12, 18, 18, 18, 32, 12, 32, 28, 10, 22, 28, 24, 28, 10, 26, 16, 30, 16, 20, 30, 18, 14, 18, 24, 32, 30, 30, 30, + 30, 24, 28, 24, 20, 24, 20, 20, 22, 20, 20, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, -2, -2, 0, 0, 2, 0, 0, 0, 0, -2, -2, 0, 0, 0, -2, -2, -2, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, + 0, 0, -2, -2, 0, 0, -2, 0, -2, 1, 0, -2, -1, 0, 0, 0, -2, 0, 0, 0, -2, 0, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, -2, -2, -2, 0, 0, -2, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28}, + {15, 8, 0, 0, 18, 0, 22, 8, 13, 13, 0, 0, 7, 0, 8, 22, 18, 17, 18, 18, 20, 18, 18, 18, 18, 18, 8, 18, 18, 18, 18, 18, 15, 18, 18, 8, 18, 18, 13, + 28, 18, 18, 18, 18, 18, 18, 20, 18, 19, 30, 18, 18, 18, 18, 18, 18, 0, 18, 0, 28, 18, 18, 18, 18, 0, 8, 8, 8, 8, 0, 18, 18, 18, 18, 0, 18, 0, 0, + 18, 18, 18, 18, 0, 0, 20, 30, 18, 8, 9, 9, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22} }; -#ifdef MORE_LANGUAGES -int16 Size_jp[] = { - 15, 14, 16, 20, 19, 26, 22, 11, 18, 18, 27, 26, 13, //; 0 - 19, 20, 27, 19, 15, 19, 19, 21, 19, 20, 18, 19, 15, //; 13 - 13, 28, 15, 32, 15, 35, 15, 19, 19, 19, 19, 17, 16, //; 26 - 19, 20, 15, 19, 20, 14, 17, 19, 19, 19, 19, 19, 19, //; 39 - 19, 19, 20, 25, 20, 19, 19, 33, 31, 39, 37, 39, 37, //; 52 - 21, 21, 21, 19, 17, 15, 23, 21, 15, 19, 20, 16, 19, //; 65 - 19, 19, 20, 20, 17, 22, 19, 22, 22, 19, 22, 22, 23, //; 78 - 35, 35, 35, 35, 37, 19, 19, 19, 19, 29, 19, 19, 19, //; 91 - 19, 19, 9, 9, 9, 9, 19, 19, 19, 19, 19, 19, 19, 19, //; 104 - 19, 19, 19, 19, 19, 30, 19, 19, 19, 19, 19, 10, 10, //; 118 - 10, 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 23, 35, //; 131 - 12, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, //; 144 - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, //; 157 - 19, 19, 19, 11, 19, 19, 19, 19, 19, 19, 19, 19, 19, //; 170 - 19, 19, 19, 19, 19, 19, 19, 19, 19, 21 -}; -#endif + +int FontSizeIncrementers[] = { 4, -2, 2 }; wchar foreign_table[128] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -301,44 +128,26 @@ int CFont::PS2Symbol = BUTTON_NONE; int CFont::ButtonsSlot = -1; #endif // BUTTON_ICONS +//--TODO(LCS): volatile memory void CFont::Initialise(void) { int slot; - slot = CTxdStore::AddTxdSlot("fonts"); -#ifdef MORE_LANGUAGES - Slot = slot; - switch (LanguageSet) + if (gMakeResources) { - case FONT_LANGSET_EFIGS: - default: + slot = CTxdStore::AddTxdSlot("fonts"); CTxdStore::LoadTxd(slot, "MODELS/FONTS.TXD"); - break; - case FONT_LANGSET_POLISH: - CTxdStore::LoadTxd(slot, "MODELS/FONTS_P.TXD"); - break; - case FONT_LANGSET_RUSSIAN: - CTxdStore::LoadTxd(slot, "MODELS/FONTS_R.TXD"); - break; - case FONT_LANGSET_JAPANESE: - CTxdStore::LoadTxd(slot, "MODELS/FONTS_J.TXD"); - break; - } -#else - CTxdStore::LoadTxd(slot, "MODELS/FONTS.TXD"); -#endif - CTxdStore::AddRef(slot); - CTxdStore::PushCurrentTxd(); - CTxdStore::SetCurrentTxd(slot); - Sprite[0].SetTexture("font2", "font2m"); -#ifdef MORE_LANGUAGES - if (IsJapanese()) { - Sprite[1].SetTexture("FONTJAP", "FONTJAP_mask"); - Sprite[3].SetTexture("FONTJAP", "FONTJAP_mask"); + CTxdStore::AddRef(slot); + CTxdStore::PushCurrentTxd(); + CTxdStore::SetCurrentTxd(slot); + Sprite[0].SetTexture("font2", "font2m"); + Sprite[1].SetTexture("font1", "font1m"); + Sprite[2].SetTexture("font3", "font3m"); + CTxdStore::PopCurrentTxd(); } -#endif // MORE_LANGUAGES - Sprite[1].SetTexture("font1", "font1m"); + else + slot = CTxdStore::FindTxdSlot("fonts"); SetScale(1.0f, 1.0f); SetSlantRefPoint(SCREEN_WIDTH, 0.0f); SetSlant(0.0f); @@ -355,7 +164,17 @@ CFont::Initialise(void) SetRightJustifyWrap(0.0f); SetAlphaFade(255.0f); SetDropShadowPosition(0); - CTxdStore::PopCurrentTxd(); + SetOutlineColor(CRGBA(0, 0, 0, 0)); + SetOutlineOn(0); + SetNewLineAdd(0); + SetNewLineAdd(2); + + /* + if (mspCompressedTexList) + { + // TODO (LCS): volatile shit + } + */ #if !defined(GAMEPAD_MENU) && defined(BUTTON_ICONS) // loaded in CMenuManager with GAMEPAD_MENU defined @@ -418,8 +237,9 @@ CFont::ReloadFonts(uint8 set) if (Slot != -1 && LanguageSet != set) { Sprite[0].Delete(); Sprite[1].Delete(); + Sprite[2].Delete(); if (IsJapanese()) - Sprite[2].Delete(); + Sprite[3].Delete(); CTxdStore::PushCurrentTxd(); CTxdStore::RemoveTxd(Slot); switch (set) @@ -441,15 +261,19 @@ CFont::ReloadFonts(uint8 set) CTxdStore::SetCurrentTxd(Slot); Sprite[0].SetTexture("font2", "font2_mask"); if (set == FONT_LANGSET_JAPANESE) { - Sprite[2].SetTexture("FONTJAP", "FONTJAP_mask"); + Sprite[1].SetTexture("FONTJAP", "FONTJAP_mask"); + Sprite[3].SetTexture("FONTJAP", "FONTJAP_mask"); } - Sprite[1].SetTexture("font1", "font1_mask"); + else + Sprite[1].SetTexture("pager", "pager_mask"); + Sprite[2].SetTexture("font1", "font1_mask"); CTxdStore::PopCurrentTxd(); } LanguageSet = set; } #endif +//--TODO(LCS): gpFonts void CFont::Shutdown(void) { @@ -463,6 +287,7 @@ CFont::Shutdown(void) #endif Sprite[0].Delete(); Sprite[1].Delete(); + Sprite[2].Delete(); #ifdef MORE_LANGUAGES if (IsJapanese()) Sprite[3].Delete(); @@ -473,6 +298,7 @@ CFont::Shutdown(void) #endif } +//--LCS: Done void CFont::InitPerFrame(void) { @@ -515,39 +341,39 @@ CFont::DrawButton(float x, float y) } #endif +//--LCS: TODO (mostly done but could use some checking) void CFont::PrintChar(float x, float y, wchar c) { + if (!(c >= 0 && c < 209)) return; + bool bDontPrint = false; if(x <= 0.0f || x > SCREEN_WIDTH || - y <= 0.0f || y > SCREEN_HEIGHT) // BUG: game uses SCREENW again + y <= -12.0f || y > SCREEN_HEIGHT) // BUG: game uses SCREENW again return; bDontPrint = c == '\0'; float w = GetCharacterWidth(c) / 32.0f; + + if ( !RenderState.proportional && RenderState.rightJustify ) + x += (GetCharacterWidth(c) - GetCharacterWidth(c, true)) * RenderState.scaleX; + if (Details.bFontHalfTexture && c == 208) c = '\0'; + + float xoff = c % 16; float yoff = c / 16; -#ifdef MORE_LANGUAGES - if (IsJapaneseFont()) { - w = 21.0f; - xoff = (float)(c % 48); - yoff = c / 48; - } -#endif + + // small float modifiers were left for pc if(RenderState.style == FONT_BANK || RenderState.style == FONT_STANDARD){ if (bDontPrint) return; if (RenderState.slant == 0.0f) { -#ifdef FIX_BUGS if (c < 192) { -#else - if (c < 193) { -#endif CSprite2d::AddToBuffer( CRect(x, y, - x + 32.0f * RenderState.scaleX * 1.0f, + x + 32.0f * RenderState.scaleX * 0.96f, y + 40.0f * RenderState.scaleY * 0.5f), RenderState.color, xoff / 16.0f, yoff / 12.8f + 0.0021f, @@ -555,10 +381,13 @@ CFont::PrintChar(float x, float y, wchar c) xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.0021f, (xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.0021f); } else { + float xScale = 0.54f; + if (FrontEndMenuManager.m_PrefsUseWideScreen) + xScale = 0.486f; CSprite2d::AddToBuffer( - CRect(x, y, - x + 32.0f * RenderState.scaleX * 1.0f, - y + 33.0f * RenderState.scaleY * 0.5f), + CRect(x, y + RenderState.scaleY * 4.0f, + x + 32.0f * RenderState.scaleY * xScale * 0.96f, + y + 4.0f * RenderState.scaleY + 16.0f * RenderState.scaleY), RenderState.color, xoff / 16.0f, yoff / 12.8f + 0.0021f, (xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f, @@ -568,37 +397,13 @@ CFont::PrintChar(float x, float y, wchar c) } else CSprite2d::AddToBuffer( CRect(x, y, - x + 32.0f * RenderState.scaleX * 1.0f, + x + 32.0f * RenderState.scaleX * 0.96f, y + 40.0f * RenderState.scaleY * 0.5f), RenderState.color, xoff / 16.0f, yoff / 12.8f + 0.00055f, (xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f + 0.01f, xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.009f, (xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.0021f + 0.01f); -#ifdef MORE_LANGUAGES - /*}else if (IsJapaneseFont()) { - if (Details.dropShadowPosition != 0) { - CSprite2d::AddSpriteToBank(Details.bank + Details.style, // BUG: game doesn't add bank - CRect(x + SCREEN_SCALE_X(Details.dropShadowPosition), - y + SCREEN_SCALE_Y(Details.dropShadowPosition), - x + SCREEN_SCALE_X(Details.dropShadowPosition) + 32.0f * Details.scaleX * 1.0f, - y + SCREEN_SCALE_Y(Details.dropShadowPosition) + 40.0f * Details.scaleY / 2.75f), - Details.dropColor, - xoff * w / 1024.0f, yoff / 25.6f, - xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, yoff / 25.6f, - xoff * w / 1024.0f, (yoff + 1.0f) / 25.6f, - xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f); - } - CSprite2d::AddSpriteToBank(Details.bank + Details.style, // BUG: game doesn't add bank - CRect(x, y, - x + 32.0f * Details.scaleX * 1.0f, - y + 40.0f * Details.scaleY / 2.75f), - Details.color, - xoff * w / 1024.0f, yoff / 25.6f, - xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, yoff / 25.6f, - xoff * w / 1024.0f, (yoff + 1.0f) / 25.6f - 0.002f, - xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f);*/ -#endif } else { if (bDontPrint) return; CSprite2d::AddToBuffer( @@ -606,10 +411,10 @@ CFont::PrintChar(float x, float y, wchar c) x + 32.0f * RenderState.scaleX * w, y + 32.0f * RenderState.scaleY * 0.5f), RenderState.color, - xoff / 16.0f, yoff / 16.0f, - (xoff + w) / 16.0f, yoff / 16.0f, - xoff / 16.0f, (yoff + 1.0f) / 16.0f, - (xoff + w) / 16.0f - 0.0001f, (yoff + 1.0f) / 16.0f - 0.0001f); + xoff / 16.0f, yoff / 6.4f, + (xoff + w) / 16.0f, yoff / 6.4f, + xoff / 16.0f, (yoff + 1.0f) / 6.4f, + (xoff + w) / 16.0f, (yoff + 1.0f) / 6.4f); } } @@ -635,6 +440,7 @@ bool CFont::IsAnsiCharacter(wchar *s) } #endif +//--LCS: TODO (mostly done but could use some checking) void CFont::RenderFontBuffer() { @@ -647,7 +453,7 @@ CFont::RenderFontBuffer() bool bFlash = false; Sprite[RenderState.style].SetRenderState(); - RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); // TODO: not in lcs RenderState = *(CFontRenderState*)&FontRenderStateBuf[0]; textPosX = RenderState.fTextPosX; textPosY = RenderState.fTextPosY; @@ -689,16 +495,15 @@ CFont::RenderFontBuffer() } Details.color.alpha = Details.bFlashState ? 0 : 255; } - if (!RenderState.bIsShadow) + if (!RenderState.bIsShadow && !RenderState.bOutlineOn) RenderState.color = color; } wchar c = *pRenderStateBufPointer.pStr; c -= ' '; + if (c == 200) c = '^'; + if (c == 201) c = '>'; if (RenderState.bFontHalfTexture) - c = FindNewCharacter(c); - else if (c > 155) - c = '\0'; - + c = FindNewCharacter(c); if (RenderState.slant != 0.0f) textPosY = (RenderState.slantRefX - textPosX) * RenderState.slant + RenderState.slantRefY; PrintChar(textPosX, textPosY, c); @@ -707,11 +512,11 @@ CFont::RenderFontBuffer() PrintChar(textPosX + 2.0f, textPosY, c); textPosX += 2.0f; } -#ifdef FIX_BUGS - // PS2 uses different chars for some symbols - if (!RenderState.bFontHalfTexture && c == 30) c = 61; // wanted star -#endif textPosX += RenderState.scaleX * GetCharacterWidth(c); +//#ifdef FIX_BUGS +// // PS2 uses different chars for some symbols +// if (!RenderState.bFontHalfTexture && c == 30) c = 61; // wanted star +//#endif if (c == '\0') textPosX += RenderState.fExtraSpace; } @@ -719,50 +524,8 @@ CFont::RenderFontBuffer() FontRenderStatePointer.pRenderState = (CFontRenderState*)FontRenderStateBuf; } -#if 0 //def MORE_LANGUAGES -bool -CFont::PrintString(float x, float y, wchar *start, wchar *&end, float spwidth, float japX) -{ - wchar *s, c, unused; - if (IsJapanese()) { - float jx = 0.0f; - for (s = start; s < end; s++) { - if (*s == JAP_TERMINATION || *s == '~') - s = ParseToken(s, &unused, true); - if (NewLine) { - NewLine = false; - break; - } - jx += GetCharacterSize(*s - ' '); - } - s = start; - if (Details.centre) - x = japX - jx / 2.0f; - else if (Details.rightJustify) - x = japX - jx; - } - - for (s = start; s < end; s++) { - if (*s == '~' || (IsJapanese() && *s == JAP_TERMINATION)) - s = ParseToken(s, &unused); - if (NewLine && IsJapanese()) { - NewLine = false; - end = s; - return true; - } - c = *s - ' '; - if (Details.slant != 0.0f && !IsJapanese()) - y = (Details.slantRefX - x) * Details.slant + Details.slantRefY; - - PrintChar(x, y, c); - x += GetCharacterSize(c); - if (c == 0 && (!NewLine || !IsJapanese())) // space - x += spwidth; - } - return false; -} -#else +//--LCS: TODO void CFont::PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth) { @@ -773,26 +536,38 @@ CFont::PrintString(float x, float y, uint32, wchar *start, wchar *end, float spw RenderState.style = Details.style; } - float dropShadowPosition = Details.dropShadowPosition; - if (dropShadowPosition != 0.0f && (Details.style == FONT_BANK || Details.style == FONT_STANDARD)) { + if (Details.outlineColor.a != 0) { CRGBA color = Details.color; - Details.color = Details.dropColor; + Details.color = Details.outlineColor; + Details.bOutlineOn = true; + Details.outlineColor.a = 0; Details.dropShadowPosition = 0; - Details.bIsShadow = true; - if (Details.slant != 0.0f) { - Details.slantRefX += SCREEN_SCALE_X(dropShadowPosition); - Details.slantRefY += SCREEN_SCALE_Y(dropShadowPosition); - PrintString(SCREEN_SCALE_X(dropShadowPosition) + x, SCREEN_SCALE_Y(dropShadowPosition) + y, Details.anonymous_25, start, end, spwidth); - Details.slantRefX -= SCREEN_SCALE_X(dropShadowPosition); - Details.slantRefY -= SCREEN_SCALE_Y(dropShadowPosition); - } else { - PrintString(SCREEN_SCALE_X(dropShadowPosition) + x, SCREEN_SCALE_Y(dropShadowPosition) + y, Details.anonymous_25, start, end, spwidth); - } - Details.color = color; - Details.dropShadowPosition = dropShadowPosition; Details.bIsShadow = false; + PrintString(x, y, Details.anonymous_25, start, end, spwidth); + Details.color = color; + Details.bOutlineOn = false; + } else { + float dropShadowPosition = Details.dropShadowPosition; + if (dropShadowPosition != 0.0f && (Details.style == FONT_BANK || Details.style == FONT_STANDARD)) { + CRGBA color = Details.color; + Details.color = Details.dropColor; + Details.dropShadowPosition = 0; + Details.bIsShadow = true; + if (Details.slant != 0.0f) { + Details.slantRefX += SCREEN_SCALE_X(dropShadowPosition); + Details.slantRefY += SCREEN_SCALE_Y(dropShadowPosition); + PrintString(SCREEN_SCALE_X(dropShadowPosition) + x, SCREEN_SCALE_Y(dropShadowPosition) + y, Details.anonymous_25, start, end, spwidth); + Details.slantRefX -= SCREEN_SCALE_X(dropShadowPosition); + Details.slantRefY -= SCREEN_SCALE_Y(dropShadowPosition); + } else { + PrintString(SCREEN_SCALE_X(dropShadowPosition) + x, SCREEN_SCALE_Y(dropShadowPosition) + y, Details.anonymous_25, start, end, spwidth); + } + Details.color = color; + Details.dropShadowPosition = dropShadowPosition; + Details.bIsShadow = false; + } } - if (FontRenderStatePointer.pStr >= (wchar*)&FontRenderStateBuf[ARRAY_SIZE(FontRenderStateBuf)] - (end - start + 26)) // why 26? + if ((uintptr)FontRenderStatePointer.pStr >= (uintptr)&FontRenderStateBuf[ARRAY_SIZE(FontRenderStateBuf)] - sizeof(wchar) * (end - start + 2) - sizeof(CFontRenderState)) RenderFontBuffer(); CFontRenderState *pRenderState = FontRenderStatePointer.pRenderState; pRenderState->fTextPosX = x; @@ -828,17 +603,18 @@ CFont::PrintString(float x, float y, uint32, wchar *start, wchar *end, float spw *(FontRenderStatePointer.pStr++) = '\0'; FontRenderStatePointer.Align(); } -#endif +// LCS: Done void CFont::PrintStringFromBottom(float x, float y, wchar *str) { - y -= (32.0f * Details.scaleY / 2.0f + 2.0f * Details.scaleY) * GetNumberLines(x, y, str); + y -= (32.0f * Details.scaleY / 2.0f + Details.line * Details.scaleY) * GetNumberLines(x, y, str); if (Details.slant != 0.0f) y -= ((Details.slantRefX - x) * Details.slant + Details.slantRefY); PrintString(x, y, str); } +//--LCS: TODO void CFont::PrintString(float xstart, float ystart, wchar *s) { @@ -849,7 +625,8 @@ CFont::PrintString(float xstart, float ystart, wchar *s) bool first; wchar *start, *t; - Details.bFlash = false; + CRGBA outlineColor = Details.outlineColor; + CFont::SetFlashOff(); if(*s == '*') return; @@ -896,7 +673,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) float xleft = Details.centre ? xstart - x/2 : Details.rightJustify ? xstart - x : xstart; -#if 0//def MORE_LANGUAGES +#ifdef MORE_LANGUAGES PrintString(xleft, y, start, s, spaceWidth, xstart); #else PrintString(xleft, y, Details.anonymous_25, start, s, spaceWidth); @@ -934,7 +711,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) #endif lineLength = x; s = t+1; -#if 0 //def MORE_LANGUAGES +#ifdef MORE_LANGUAGES if (IsJapaneseFont() && !*s) { x += GetStringWidth(s); if (IsAnsiCharacter(s)) @@ -966,7 +743,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) float xleft = Details.centre ? xstart - x/2 : Details.rightJustify ? xstart - x : xstart; -#if 0 //def MORE_LANGUAGES +#ifdef MORE_LANGUAGES if (PrintString(xleft, y, start, s, 0.0f, xstart) && IsJapaneseFont()) { start = s; if (!Details.centre && !Details.rightJustify) @@ -984,6 +761,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) } } +//--LCS: TODO int CFont::GetNumberLines(float xstart, float ystart, wchar *s) { @@ -992,7 +770,7 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s) wchar *t; n = 0; -#if 0//def MORE_LANGUAGES +#ifdef MORE_LANGUAGES bool bSomeJapBool = false; if (IsJapanese()) { @@ -1085,6 +863,7 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s) return n; } +//--LCS: TODO void CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) { @@ -1190,101 +969,65 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) } } -float -CFont::GetCharacterWidth(wchar c) +//--LCS: done +bool IsPunctuation(wchar c) { -#ifdef MORE_LANGUAGES - if (IsJapanese()) { - if (!RenderState.proportional) - return Size[0][Details.style][192]; - if (c <= 94 || Details.style == FONT_HEADING || RenderState.style == FONT_BANK) { - switch (RenderState.style) - { - case FONT_JAPANESE: - return Size_jp[c]; - default: - return Size[0][RenderState.style][c]; - } - } - - switch (RenderState.style) - { - case FONT_JAPANESE: - return 29.4f; - case FONT_BANK: - return 10.0f; - default: - return Size[0][RenderState.style][c]; - } + switch (c) + { + case '!': + case '?': + case '.': + case ',': + case ':': + case ';': + + // these are lucid it seems + //case '$': + //case '/': + //case '\\': + return true; } - - else if (RenderState.proportional) - return Size[LanguageSet][RenderState.style][c]; - else - return Size[LanguageSet][RenderState.style][209]; -#else - - if (RenderState.proportional) - return Size[RenderState.style][c]; - else - return Size[RenderState.style][209]; -#endif // MORE_LANGUAGES + return false; } +//--LCS: done float -CFont::GetCharacterSize(wchar c) +CFont::GetCharacterWidth(wchar c, bool forceProportional) { -#ifdef MORE_LANGUAGES - - if (IsJapanese()) - { - if (!Details.proportional) - return Size[0][Details.style][209] * Details.scaleX; - if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_BANK) { - switch (Details.style) - { - case FONT_JAPANESE: - return Size_jp[c] * Details.scaleX; - default: - return Size[0][Details.style][c] * Details.scaleX; - } - } - - switch (Details.style) - { - case FONT_JAPANESE: - return 29.4f * Details.scaleX; - case FONT_BANK: - return 10.0f * Details.scaleX; - default: - return Size[0][Details.style][c] * Details.scaleX; - } - } - else + if (RenderState.proportional || forceProportional) { - if (!Details.bFontHalfTexture && c == 30) c = 61; // wanted star - if (Details.bFontHalfTexture) - c = FindNewCharacter(c); - if (Details.proportional) - return Size[LanguageSet][Details.style][c] * Details.scaleX; + float inc = c < 192 ? 0.0f : 4.0f; + return Size[RenderState.style][c] + Size[RenderState.style][c + 209] + FontSizeIncrementers[RenderState.style] + inc; + } else { + if (IsPunctuation(c + ' ')) + return Size[RenderState.style][418] / 1.6f + FontSizeIncrementers[RenderState.style]; else - return Size[LanguageSet][Details.style][209] * Details.scaleX; + return Size[RenderState.style][418] + FontSizeIncrementers[RenderState.style]; } -#else +} -#ifdef FIX_BUGS +//--LCS: done +float +CFont::GetCharacterSize(wchar c) +{ +//#ifdef FIX_BUGS // PS2 don't call FindNewCharacter in here at all, and also uses different chars for some symbols - if (!Details.bFontHalfTexture && c == 30) c = 61; // wanted star -#endif +// if (!Details.bFontHalfTexture && c == 30) c = 61; // wanted star +//#endif if (Details.bFontHalfTexture) c = FindNewCharacter(c); - if (Details.proportional) - return Size[Details.style][c] * Details.scaleX; - else - return Size[Details.style][209] * Details.scaleX; -#endif // MORE_LANGUAGES + if (Details.proportional) { + float inc = c < 192 ? 0.0f : 4.0f; + return (Size[Details.style][c] + Size[Details.style][c + 209] + FontSizeIncrementers[Details.style] + inc) * Details.scaleX; + } else { + if (IsPunctuation(c + ' ')) + return (Size[Details.style][418] + FontSizeIncrementers[Details.style]) / 1.6f * Details.scaleX; + else + return Size[Details.style][418] + FontSizeIncrementers[Details.style] * Details.scaleX; + } } +//--LCS: TODO float CFont::GetStringWidth(wchar *s, bool spaces) { @@ -1397,6 +1140,19 @@ CFont::GetStringWidth_Jap(wchar* s) } #endif +//--LCS: done +bool16 +CFont::CheckNewLine(wchar *s) +{ + while (*s == ' ') + s++; + + if (*s == '~') + return s[1] == 'N' || s[1] == 'n'; + return false; +} + +//--LCS: TODO wchar* CFont::GetNextSpace(wchar *s) { @@ -1427,6 +1183,7 @@ CFont::GetNextSpace(wchar *s) return s; } +//--LCS: done wchar* CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) { @@ -1439,28 +1196,36 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) case 'B': bold = !bold; break; + case 'Y': + color.r = 255; + color.g = 227; + color.b = 79; + break; case 'b': - color.r = 27; - color.g = 89; - color.b = 130; + color.r = 77; + color.g = 155; + color.b = 210; break; case 'f': flash = !flash; break; case 'g': - color.r = 255; - color.g = 150; - color.b = 225; + color.r = 75; + color.g = 151; + color.b = 75; + Details.anonymous_23 = true; break; case 'h': - color.r = 225; - color.g = 225; - color.b = 225; + color.r = 255; + color.g = 255; + color.b = 255; + Details.anonymous_23 = true; break; case 'l': color.r = 0; color.g = 0; color.b = 0; + Details.anonymous_23 = true; break; case 'o': color.r = 229; @@ -1468,9 +1233,9 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) color.b = 126; break; case 'p': - color.r = 168; - color.g = 110; - color.b = 252; + color.r = 151; + color.g = 82; + color.b = 197; break; case 'q': color.r = 199; @@ -1478,9 +1243,9 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) color.b = 203; break; case 'r': - color.r = 255; - color.g = 150; - color.b = 225; + color.r = 174; + color.g = 0; + color.b = 0; break; case 't': color.r = 86; @@ -1488,27 +1253,20 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) color.b = 146; break; case 'w': - color.r = 175; - color.g = 175; - color.b = 175; - break; -#ifdef FIX_BUGS - case 'x': - color.r = 0; - color.g = 255; - color.b = 255; + color.r = 225; + color.g = 225; + color.b = 225; + Details.anonymous_23 = true; break; -#else case 'x': color.r = 132; color.g = 146; color.b = 197; break; -#endif case 'y': color.r = 255; - color.g = 227; - color.b = 79; + color.g = 255; + color.b = 0; break; #ifdef BUTTON_ICONS case 'U': PS2Symbol = BUTTON_UP; break; @@ -1536,187 +1294,34 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) } while (*s != '~') ++s; - if (*(++s) == '~') - s = ParseToken(s, color, flash, bold); - return s; -} -#if 0//def MORE_LANGUAGES -wchar* -CFont::ParseToken(wchar *s, bool japShit) -{ + // seem to be gone in lcs + //if (*(++s) == '~') + // s = ParseToken(s, color, flash, bold); + + // wtf? + if (*s == '\0') s++; s++; - if ((Details.color.r || Details.color.g || Details.color.b) && !japShit) { - wchar c = *s; - if (IsJapanese()) - c &= 0x7FFF; - switch (c) { - case 'N': - case 'n': - NewLine = true; - break; - case 'b': SetColor(CRGBA(128, 167, 243, 255)); break; - case 'g': SetColor(CRGBA(95, 160, 106, 255)); break; - case 'h': SetColor(CRGBA(225, 225, 225, 255)); break; - case 'l': SetColor(CRGBA(0, 0, 0, 255)); break; - case 'p': SetColor(CRGBA(168, 110, 252, 255)); break; - case 'r': SetColor(CRGBA(113, 43, 73, 255)); break; - case 'w': SetColor(CRGBA(175, 175, 175, 255)); break; - case 'y': SetColor(CRGBA(210, 196, 106, 255)); break; -#ifdef BUTTON_ICONS - case 'U': PS2Symbol = BUTTON_UP; break; - case 'D': PS2Symbol = BUTTON_DOWN; break; - case '<': PS2Symbol = BUTTON_LEFT; break; - case '>': PS2Symbol = BUTTON_RIGHT; break; - case 'X': PS2Symbol = BUTTON_CROSS; break; - case 'O': PS2Symbol = BUTTON_CIRCLE; break; - case 'Q': PS2Symbol = BUTTON_SQUARE; break; - case 'T': PS2Symbol = BUTTON_TRIANGLE; break; - case 'K': PS2Symbol = BUTTON_L1; break; - case 'M': PS2Symbol = BUTTON_L2; break; - case 'A': PS2Symbol = BUTTON_L3; break; - case 'J': PS2Symbol = BUTTON_R1; break; - case 'V': PS2Symbol = BUTTON_R2; break; - case 'C': PS2Symbol = BUTTON_R3; break; - case 'H': PS2Symbol = BUTTON_RSTICK_UP; break; - case 'L': PS2Symbol = BUTTON_RSTICK_DOWN; break; - case '(': PS2Symbol = BUTTON_RSTICK_LEFT; break; - case ')': PS2Symbol = BUTTON_RSTICK_RIGHT; break; -#endif - } - } else if (IsJapanese()) { - if ((*s & 0x7FFF) == 'N' || (*s & 0x7FFF) == 'n') - NewLine = true; - } - while ((!IsJapanese() || (*s != JAP_TERMINATION)) && *s != '~') s++; - return s + 1; + return s; } -#else + +//--LCS: done wchar* CFont::ParseToken(wchar *s) { - Details.anonymous_23 = false; - s++; - if(Details.color.r || Details.color.g || Details.color.b) - switch(*s){ - case 'B': - Details.bBold = !Details.bBold; - break; - case 'N': - case 'n': - NewLine = true; - break; - case 'b': - Details.color.r = 27; - Details.color.g = 89; - Details.color.b = 130; - Details.anonymous_23 = true; - break; - case 'f': - Details.bFlash = !Details.bFlash; - if (!Details.bFlash) - Details.color.a = 255; - break; - case 'g': - Details.color.r = 255; - Details.color.g = 150; - Details.color.b = 225; - Details.anonymous_23 = true; - break; - case 'h': - Details.color.r = 225; - Details.color.g = 225; - Details.color.b = 225; - Details.anonymous_23 = true; - break; - case 'l': - Details.color.r = 0; - Details.color.g = 0; - Details.color.b = 0; - Details.anonymous_23 = true; - break; - case 'o': - Details.color.r = 229; - Details.color.g = 125; - Details.color.b = 126; - Details.anonymous_23 = true; - break; - case 'p': - Details.color.r = 168; - Details.color.g = 110; - Details.color.b = 252; - Details.anonymous_23 = true; - break; - case 'q': - Details.color.r = 199; - Details.color.g = 144; - Details.color.b = 203; - Details.anonymous_23 = true; - break; - case 'r': - Details.color.r = 255; - Details.color.g = 150; - Details.color.b = 225; - Details.anonymous_23 = true; - break; - case 't': - Details.color.r = 86; - Details.color.g = 212; - Details.color.b = 146; - Details.anonymous_23 = true; - break; - case 'w': - Details.color.r = 175; - Details.color.g = 175; - Details.color.b = 175; - Details.anonymous_23 = true; - break; - case 'x': -#ifdef FIX_BUGS - Details.color.r = 0; - Details.color.g = 255; - Details.color.b = 255; -#else - Details.color.r = 132; - Details.color.g = 146; - Details.color.b = 197; -#endif - Details.anonymous_23 = true; - break; - case 'y': - Details.color.r = 255; - Details.color.g = 227; - Details.color.b = 79; - Details.anonymous_23 = true; - break; -#ifdef BUTTON_ICONS - case 'U': PS2Symbol = BUTTON_UP; break; - case 'D': PS2Symbol = BUTTON_DOWN; break; - case '<': PS2Symbol = BUTTON_LEFT; break; - case '>': PS2Symbol = BUTTON_RIGHT; break; - case 'X': PS2Symbol = BUTTON_CROSS; break; - case 'O': PS2Symbol = BUTTON_CIRCLE; break; - case 'Q': PS2Symbol = BUTTON_SQUARE; break; - case 'T': PS2Symbol = BUTTON_TRIANGLE; break; - case 'K': PS2Symbol = BUTTON_L1; break; - case 'M': PS2Symbol = BUTTON_L2; break; - case 'A': PS2Symbol = BUTTON_L3; break; - case 'J': PS2Symbol = BUTTON_R1; break; - case 'V': PS2Symbol = BUTTON_R2; break; - case 'C': PS2Symbol = BUTTON_R3; break; - case 'H': PS2Symbol = BUTTON_RSTICK_UP; break; - case 'L': PS2Symbol = BUTTON_RSTICK_DOWN; break; - case '(': PS2Symbol = BUTTON_RSTICK_LEFT; break; - case ')': PS2Symbol = BUTTON_RSTICK_RIGHT; break; -#endif - } - while(*s != '~') s++; - if (*(++s) == '~') - s = ParseToken(s); + bool flash = false; + bool bold = false; + CRGBA color = Details.color; + s = ParseToken(s, color, flash, bold); + Details.bFlash = flash; + Details.bBold = bold; + + if (Details.anonymous_23) + Details.color = color; return s; } -#endif +//--LCS: done void CFont::FilterOutTokensFromString(wchar *str) { @@ -1735,25 +1340,22 @@ CFont::FilterOutTokensFromString(wchar *str) str[newIdx] = '\0'; } +//--LCS: done void CFont::DrawFonts(void) { RenderFontBuffer(); } +//--LCS: done void CFont::SetScale(float x, float y) { -#ifdef MORE_LANGUAGES - /*if (IsJapanese()) { - x *= 1.35f; - y *= 1.25f; - }*/ -#endif Details.scaleX = x; Details.scaleY = y; } +//--LCS: done void CFont::SetSlantRefPoint(float x, float y) { @@ -1761,12 +1363,14 @@ CFont::SetSlantRefPoint(float x, float y) Details.slantRefY = y; } +//--LCS: done void CFont::SetSlant(float s) { Details.slant = s; } +//--LCS: done void CFont::SetColor(CRGBA col) { @@ -1775,6 +1379,14 @@ CFont::SetColor(CRGBA col) Details.color.a *= Details.alphaFade / 255.0f; } +//--LCS: done +void +CFont::SetFlashOff() +{ + Details.bFlash = false; +} + +//--LCS: done void CFont::SetJustifyOn(void) { @@ -1783,6 +1395,7 @@ CFont::SetJustifyOn(void) Details.rightJustify = false; } +//--LCS: done void CFont::SetJustifyOff(void) { @@ -1790,6 +1403,7 @@ CFont::SetJustifyOff(void) Details.rightJustify = false; } +//--LCS: done void CFont::SetCentreOn(void) { @@ -1798,54 +1412,65 @@ CFont::SetCentreOn(void) Details.rightJustify = false; } +//--LCS: done void CFont::SetCentreOff(void) { Details.centre = false; } +//--LCS: TODO void CFont::SetWrapx(float x) { + // uncomment when scaling is done + //x = clamp(x, 0.0f, DEFAULT_SCREEN_WIDTH); Details.wrapX = x; } +//--LCS: done void CFont::SetCentreSize(float s) { Details.centreSize = s; } +//--LCS: done void CFont::SetBackgroundOn(void) { Details.background = true; } +//--LCS: done void CFont::SetBackgroundOff(void) { Details.background = false; } +//--LCS: done void CFont::SetBackgroundColor(CRGBA col) { Details.backgroundColor = col; } +//--LCS: done void CFont::SetBackGroundOnlyTextOn(void) { Details.backgroundOnlyText = true; } +//--LCS: done void CFont::SetBackGroundOnlyTextOff(void) { Details.backgroundOnlyText = false; } +//--LCS: done void CFont::SetRightJustifyOn(void) { @@ -1854,6 +1479,7 @@ CFont::SetRightJustifyOn(void) Details.centre = false; } +//--LCS: done void CFont::SetRightJustifyOff(void) { @@ -1862,70 +1488,118 @@ CFont::SetRightJustifyOff(void) Details.centre = false; } +//--LCS: done void CFont::SetPropOff(void) { Details.proportional = false; } +//--LCS: done void CFont::SetPropOn(void) { Details.proportional = true; } +//--LCS: done void CFont::SetFontStyle(int16 style) { if (style == FONT_HEADING) { - Details.style = FONT_STANDARD; + Details.style = FONT_HEADING; Details.bFontHalfTexture = true; - } else { + } + else { Details.style = style; Details.bFontHalfTexture = false; } } +//--LCS: done void CFont::SetRightJustifyWrap(float wrap) { Details.rightJustifyWrap = wrap; } +//--LCS: done void CFont::SetAlphaFade(float fade) { Details.alphaFade = fade; } +//--LCS: done void CFont::SetDropColor(CRGBA col) { Details.dropColor = col; if (Details.alphaFade < 255.0f) - Details.dropColor.a *= Details.alphaFade / 255.0f; + // TODO: was this a copypaste bug in here? + //Details.dropColor.a *= Details.alphaFade / 255.0f; + Details.dropColor.a = Details.color.a * Details.alphaFade / 255.0f; +} + + +//--LCS: done +void +CFont::SetOutlineColor(CRGBA col) +{ + Details.outlineColor = col; + if (Details.alphaFade < 255.0f) + Details.outlineColor.a *= Details.alphaFade / 255.0f; +} + +//--LCS: done +void +CFont::SetOutlineOn(int on) +{ + Details.bOutlineOn = on; } +//--LCS: done +void +CFont::SetNewLineAdd(int line) +{ + Details.line = line; +} + +//--LCS: done void CFont::SetDropShadowPosition(int16 pos) { Details.dropShadowPosition = pos; } -wchar CFont::FindNewCharacter(wchar c) +int16 CFont::FindNewCharacter(int16 c) { - if (c >= 16 && c <= 26) return c + 128; - if (c >= 8 && c <= 9) return c + 86; - if (c == 4) return c + 89; - if (c == 7) return 206; - if (c == 14) return 207; - if (c >= 33 && c <= 58) return c + 122; - if (c >= 65 && c <= 90) return c + 90; - if (c >= 96 && c <= 118) return c + 85; - if (c >= 119 && c <= 140) return c + 62; - if (c >= 141 && c <= 142) return 204; - if (c == 143) return 205; - if (c == 1) return 208; + if (c >= 33 && c <= 33 + 25) + return c - 6; + else if(c >= 65 && c <= 65 + 25) + return c - 38; + else if (c >= 96 && c <= 96 + 31) + return c - 43; + else if (c >= 128 && c <= 128 + 31) + return c - 75; + + switch (c) + { + case 190: + return 90; + case 175: + return 87; + case 184: + return 88; + case 187: + return 89; + case 31: + return 88; + } + if (c >= 27 && c < 31) + return 2; + if (c >= 180 && c < 256) + c = 2; return c; } @@ -1935,4 +1609,4 @@ CFont::character_code(uint8 c) if(c < 128) return c; return foreign_table[c-128]; -}
\ No newline at end of file +} diff --git a/src/renderer/Font.h b/src/renderer/Font.h index 42eb7b4c..fdf5f3f2 100644 --- a/src/renderer/Font.h +++ b/src/renderer/Font.h @@ -39,6 +39,9 @@ struct CFontDetails int nFlashTimer; bool8 anonymous_23; uint32 anonymous_25; + CRGBA outlineColor; + int bOutlineOn; + int line; }; struct CFontRenderState @@ -58,6 +61,9 @@ struct CFontRenderState bool8 proportional; bool8 anonymous_14; int16 style; + int bOutlineOn; + int line; + bool8 rightJustify; }; class CSprite2d; @@ -66,10 +72,7 @@ enum { FONT_BANK, FONT_STANDARD, FONT_HEADING, -#ifdef MORE_LANGUAGES - FONT_JAPANESE, -#endif - MAX_FONTS = FONT_HEADING + MAX_FONTS }; enum { @@ -127,9 +130,9 @@ class CFont static uint8 LanguageSet; static int32 Slot; #else - static int16 Size[MAX_FONTS][210]; + static int16 Size[MAX_FONTS][419]; #endif - static int16 NewLine; + static bool16 NewLine; public: static CSprite2d Sprite[MAX_FONTS]; static CFontDetails Details; @@ -151,7 +154,6 @@ public: static void PrintChar(float x, float y, wchar c); static void PrintString(float x, float y, wchar *s); #ifdef XBOX_SUBTITLES - static void PrintStringFromBottom(float x, float y, wchar *str); static void PrintOutlinedString(float x, float y, wchar *str, float outlineStrength, bool fromBottom, CRGBA outlineColor); #endif static int GetNumberLines(float xstart, float ystart, wchar *s); @@ -162,7 +164,7 @@ public: static void PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth); //#endif static void PrintStringFromBottom(float x, float y, wchar *str); - static float GetCharacterWidth(wchar c); + static float GetCharacterWidth(wchar c, bool forceProportional = false); static float GetCharacterSize(wchar c); static float GetStringWidth(wchar *s, bool spaces = false); #ifdef MORE_LANGUAGES @@ -194,6 +196,7 @@ public: static void SetBackgroundOff(void); static void SetBackGroundOnlyTextOn(void); static void SetBackGroundOnlyTextOff(void); + static void SetFlashOff(void); static void SetPropOn(void); static void SetPropOff(void); static void SetFontStyle(int16 style); @@ -203,8 +206,14 @@ public: static void SetBackgroundColor(CRGBA col); static void SetColor(CRGBA col); static void SetDropColor(CRGBA col); - static wchar FindNewCharacter(wchar c); + + static void SetOutlineColor(CRGBA col); + static void SetOutlineOn(int on); + static void SetNewLineAdd(int line); + + static int16 FindNewCharacter(int16 c); static void FilterOutTokensFromString(wchar*); + static bool16 CheckNewLine(wchar *s); #ifdef MORE_LANGUAGES static void ReloadFonts(uint8 set); diff --git a/src/renderer/Hud.cpp b/src/renderer/Hud.cpp index d7d8050f..5c0db44c 100644 --- a/src/renderer/Hud.cpp +++ b/src/renderer/Hud.cpp @@ -45,14 +45,14 @@ // Game has colors inlined in code. // For easier modification we collect them here: CRGBA MONEY_COLOR(0, 207, 133, 255); -CRGBA AMMO_COLOR(255, 150, 225, 255); +CRGBA AMMO_COLOR(255, 255, 255, 255); CRGBA HEALTH_COLOR(255, 150, 225, 255); CRGBA ARMOUR_COLOR(185, 185, 185, 255); CRGBA NOTWANTED_COLOR(27, 89, 130, 255); CRGBA WANTED_COLOR_FLASH(62, 141, 181, 255); CRGBA WANTED_COLOR(97, 194, 247, 255); -CRGBA ZONE_COLOR(45, 155, 90, 255); -CRGBA VEHICLE_COLOR(97, 194, 247, 255); +CRGBA ZONE_COLOR(255, 255, 255, 255); +CRGBA VEHICLE_COLOR(255, 255, 255, 255); CRGBA CLOCK_COLOR(97, 194, 247, 255); CRGBA TIMER_COLOR(97, 194, 247, 255); CRGBA COUNTER_COLOR(97, 194, 247, 255); @@ -95,7 +95,7 @@ bool CHud::m_HideRadar; int32 CHud::m_ClockState; // These aren't really in CHud -float CHud::BigMessageInUse[6]; +float BigMessageInUse[6]; float CHud::BigMessageAlpha[6]; float CHud::BigMessageX[6]; float CHud::OddJob2OffTimer; @@ -134,6 +134,10 @@ uint32 CHud::m_LastTimeEnergyLost; CSprite2d CHud::Sprites[NUM_HUD_SPRITES]; +wchar* CHud::gLastPrintForeverString; + +uint8 CHud::m_HudAlpha = 209; + struct { const char *name; @@ -190,24 +194,25 @@ struct { "", "" }, { "", "" }, { "radardisc", "radardisc" }, + { "radardiscback", "" }, { "", "" }, { "", "" }, { "", "" }, { "", "" }, { "", "" }, - { "", "" }, - { "", "" }, - { "", "" }, - { "", "" }, - { "", "" }, - { "", "" }, - { "", "" }, + { "bar_inside1dark", "" }, + { "bar_inside2dark", "" }, + { "hudnumbers", "" }, + { "bar_inside1", "" }, + { "bar_inside2", "" }, + { "bar_outline", "" }, { "sitesniper", "sitesniperm" }, { "siteM16", "siteM16m" }, { "sitelaser", "sitelaserm" }, { "laserdot", "laserdotm" }, { "viewfinder_128", "viewfinder_128m" }, - { "bleeder", "" } + { "bleeder", "" }, + { "gren_rem", "noMaskNeeded" } }; RwTexture *gpSniperSightTex; @@ -216,6 +221,7 @@ RwTexture *gpLaserSightTex; RwTexture *gpLaserDotTex; RwTexture *gpViewFinderTex; +// TODO(LCS): some things were reversed from LCS but not all void CHud::Draw() { RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST); @@ -408,6 +414,8 @@ void CHud::Draw() DrawMoneyCounter */ + RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR); // TODO(LCS): temp filtering fix for money counter, remove later + wchar sPrint[16]; wchar sPrintIcon[16]; char sTemp[16]; @@ -420,25 +428,8 @@ void CHud::Draw() m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney; } if (m_DisplayScoreState != FADED_OUT) { - sprintf(sTemp, "$%08d", CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney); - AsciiToUnicode(sTemp, sPrint); - - CFont::SetPropOff(); - CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); - CFont::SetCentreOff(); - CFont::SetRightJustifyOn(); - CFont::SetRightJustifyWrap(0.0f); - CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_HEADING); - CFont::SetPropOff(); - CFont::SetDropShadowPosition(2); - CFont::SetDropColor(CRGBA(0, 0, 0, alpha)); - MONEY_COLOR.a = alpha; - CFont::SetColor(MONEY_COLOR); - if (FrontEndMenuManager.m_PrefsShowHud) { - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(43.0f), sPrint); + DrawCash(); } } @@ -451,46 +442,23 @@ void CHud::Draw() alpha = CHud::DrawFadeState(HUD_WEAPON_FADING, 1); m_LastWeapon = playerPed->GetWeapon()->m_eWeaponType; } + alpha = Min(alpha, m_HudAlpha); if (m_WeaponState != FADED_OUT) { CWeapon *weapon = playerPed->GetWeapon(); - int32 AmmoAmount = CWeaponInfo::GetWeaponInfo((eWeaponType)WeaponType)->m_nAmountofAmmunition; - int32 AmmoInClip = weapon->m_nAmmoInClip; - int32 TotalAmmo = weapon->m_nAmmoTotal; - int32 Ammo, Clip; - - if (AmmoAmount <= 1 || AmmoAmount >= 1000) - sprintf(sTemp, "%d", TotalAmmo); - else { - if (WeaponType == WEAPONTYPE_FLAMETHROWER) { - Clip = AmmoInClip / 10; - - Ammo = Min((TotalAmmo - AmmoInClip) / 10, 9999); - } else { - Clip = AmmoInClip; - - Ammo = Min(TotalAmmo - AmmoInClip, 9999); - } - - sprintf(sTemp, "%d-%d", Ammo, Clip); - } - - AsciiToUnicode(sTemp, sPrint); CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo((eWeaponType)WeaponType); /* DrawWeaponIcon */ if (FrontEndMenuManager.m_PrefsShowHud) { + float right = FrontEndMenuManager.m_PrefsUseWideScreen ? 468.6f : 470.0f; + float left = right - (FrontEndMenuManager.m_PrefsUseWideScreen ? 48.6f : 54.0f); if (weaponInfo->m_nModelId <= 0) { RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR); if (FrontEndMenuManager.m_PrefsShowHud) Sprites[WeaponType].Draw( - CRect(SCREEN_SCALE_FROM_RIGHT(99.0f), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(91.0f)), - CRGBA(255, 255, 255, alpha), - 0.015f, 0.015f, - 1.0f, 0.0f, - 0.015f, 1.0f, - 1.0f, 1.0f); + CRect(PSP_SCREEN_SCALE_X(left), PSP_SCREEN_SCALE_Y(16.0f), PSP_SCREEN_SCALE_X(right), PSP_SCREEN_SCALE_Y(60.0f)), + CRGBA(255, 255, 255, alpha)); } else { CBaseModelInfo *weaponModel = CModelInfo::GetModelInfo(weaponInfo->m_nModelId); RwTexDictionary *weaponTxd = CTxdStore::GetSlot(weaponModel->GetTxdSlot())->texDict; @@ -510,12 +478,8 @@ void CHud::Draw() static CSprite2d sprite; sprite.m_pTexture = weaponIcon; sprite.Draw( - CRect(SCREEN_SCALE_FROM_RIGHT(99.0f), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(91.0f)), - CRGBA(255, 255, 255, alpha), - 0.015f, 0.015f, - 1.0f, 0.0f, - 0.015f, 1.0f, - 1.0f, 1.0f); + CRect(PSP_SCREEN_SCALE_X(left), PSP_SCREEN_SCALE_Y(16.0f), PSP_SCREEN_SCALE_X(right), PSP_SCREEN_SCALE_Y(60.0f)), + CRGBA(255, 255, 255, alpha)); sprite.m_pTexture = nil; #endif } @@ -523,7 +487,7 @@ void CHud::Draw() } CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.8f)); + CFont::SetScale(PSP_SCREEN_SCALE_X(FrontEndMenuManager.m_PrefsUseWideScreen ? 0.18f : 0.2f), PSP_SCREEN_SCALE_Y(0.44f)); CFont::SetJustifyOff(); CFont::SetCentreOn(); CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); @@ -531,13 +495,65 @@ void CHud::Draw() CFont::SetDropShadowPosition(0); CFont::SetFontStyle(FONT_STANDARD); + int32 AmmoAmount = CWeaponInfo::GetWeaponInfo((eWeaponType)WeaponType)->m_nAmountofAmmunition; + int32 AmmoInClip = weapon->m_nAmmoInClip; + int32 TotalAmmo = weapon->m_nAmmoTotal; + int32 Ammo, Clip; + if (Min(9999, TotalAmmo - AmmoInClip) != 9999 && !CDarkel::FrenzyOnGoing() && weaponInfo->m_nWeaponSlot > 1 && weapon->m_eWeaponType != WEAPONTYPE_DETONATOR) { CFont::SetDropShadowPosition(2); CFont::SetDropColor(CRGBA(0, 0, 0, alpha)); AMMO_COLOR.a = alpha; CFont::SetColor(AMMO_COLOR); - if (FrontEndMenuManager.m_PrefsShowHud) - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(66.0f), SCREEN_SCALE_Y(90.0f), sPrint); + if (FrontEndMenuManager.m_PrefsShowHud) { + + + if (AmmoAmount <= 1 || AmmoAmount >= 1000) + { + sprintf(sTemp, "%d", TotalAmmo); + AsciiToUnicode(sTemp, sPrint); + float pos = 435.0f; +#ifdef FIX_BUGS + if (FrontEndMenuManager.m_PrefsUseWideScreen) + pos = 438.0f; +#endif + CFont::PrintString(PSP_SCREEN_SCALE_FROM_RIGHT(PSP_DEFAULT_SCREEN_WIDTH - pos), PSP_SCREEN_SCALE_Y(42.0f), sPrint); + } + else { + + if (WeaponType == WEAPONTYPE_FLAMETHROWER) { + Clip = AmmoInClip / 10; + + Ammo = Min((TotalAmmo - AmmoInClip) / 10, 9999); + } + else { + Clip = AmmoInClip; + + Ammo = Min(TotalAmmo - AmmoInClip, 9999); + } + + char sMinus[10]; + char sAmmo[20]; + char sClip[20]; + + sprintf(sMinus, "-"); + sprintf(sAmmo, "%d", Ammo); + sprintf(sClip, "%d", Clip); + + CFont::SetCentreOff(); + CFont::SetRightJustifyOn(); + AsciiToUnicode(sAmmo, sPrint); + CFont::PrintString(PSP_SCREEN_SCALE_FROM_RIGHT(PSP_DEFAULT_SCREEN_WIDTH - (FrontEndMenuManager.m_PrefsUseWideScreen ? 438.0f : 435.0f)), PSP_SCREEN_SCALE_Y(42.0f), sPrint); + + CFont::SetRightJustifyOff(); + AsciiToUnicode(sMinus, sPrint); + CFont::PrintString(PSP_SCREEN_SCALE_FROM_RIGHT(PSP_DEFAULT_SCREEN_WIDTH - (FrontEndMenuManager.m_PrefsUseWideScreen ? 439.0f : 436.0f)), PSP_SCREEN_SCALE_Y(42.0f), sPrint); + + AsciiToUnicode(sClip, sPrint); + CFont::PrintString(PSP_SCREEN_SCALE_FROM_RIGHT(PSP_DEFAULT_SCREEN_WIDTH - (FrontEndMenuManager.m_PrefsUseWideScreen ? 441.0f : 439.0f)), PSP_SCREEN_SCALE_Y(42.0f), sPrint); + + } + } CFont::SetDropShadowPosition(0); } } @@ -571,23 +587,8 @@ void CHud::Draw() && FRAMECOUNTER & 8) { if (playerPed->m_fHealth >= 10 || playerPed->m_fHealth < 10 && FRAMECOUNTER & 8) { - - AsciiToUnicode("{", sPrintIcon); -#ifdef FIX_BUGS - sprintf(sTemp, "%03d", int32(playerPed->m_fHealth + 0.5f)); -#else - sprintf(sTemp, "%03d", (int32)playerPed->m_fHealth); -#endif - AsciiToUnicode(sTemp, sPrint); - - CFont::SetColor(HEALTH_COLOR); if (FrontEndMenuManager.m_PrefsShowHud) { - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(65.0f), sPrint); - - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || FRAMECOUNTER & 4) { - // CFont::SetColor(HEALTH_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 54.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon); - } + DrawHealthBar(playerPed->m_fHealth); } } } @@ -608,13 +609,7 @@ void CHud::Draw() CFont::SetColor(ARMOUR_COLOR); if (FrontEndMenuManager.m_PrefsShowHud) { - - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f), SCREEN_SCALE_Y(65.0f), sPrint); - - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || FRAMECOUNTER & 4) { - // CFont::SetColor(ARMOUR_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f + 52.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon); - } + DrawArmourBar(playerPed->m_fArmour); } } } @@ -631,36 +626,23 @@ void CHud::Draw() } if (m_WantedState != FADED_OUT) { - CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); - CFont::SetJustifyOff(); - CFont::SetCentreOff(); - CFont::SetRightJustifyOn(); - CFont::SetPropOn(); - CFont::SetFontStyle(FONT_STANDARD); - - AsciiToUnicode(">", sPrintIcon); - + char wantedStar[] = "\x16"; + float starX = 441.0f; for (int i = 0; i < 6; i++) { if (FrontEndMenuManager.m_PrefsShowHud) { if (playerPed->m_pWanted->GetWantedLevel() > i && (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange + 2000 || FRAMECOUNTER & 4)) { - WANTED_COLOR.a = alpha; - CFont::SetColor(WANTED_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + DrawTimeAndCashNumbers(wantedStar, starX, 63.0f, false); } else if (playerPed->m_pWanted->m_nMinWantedLevel > i && FRAMECOUNTER & 4) { - WANTED_COLOR_FLASH.a = alpha; - CFont::SetColor(WANTED_COLOR_FLASH); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); - - } else if (playerPed->m_pWanted->GetWantedLevel() <= i) { - NOTWANTED_COLOR.a = alpha; - CFont::SetColor(NOTWANTED_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + DrawTimeAndCashNumbers(wantedStar, starX, 63.0f, true); } + if (FrontEndMenuManager.m_PrefsUseWideScreen) + starX -= 11.0f; + else + starX -= 13.5f; } } } @@ -788,14 +770,14 @@ void CHud::Draw() CFont::SetPropOn(); CFont::SetBackgroundOff(); - if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH) - CFont::SetScale(SCREEN_SCALE_X(1.7f * 0.8f), SCREEN_SCALE_Y(1.8f)); + if (FrontEndMenuManager.m_PrefsUseWideScreen) + CFont::SetScale(PSP_SCREEN_SCALE_X(0.42768f), PSP_SCREEN_SCALE_Y(0.88f)); else - CFont::SetScale(SCREEN_SCALE_X(1.7f), SCREEN_SCALE_Y(1.8f)); - - CFont::SetSlantRefPoint(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f)); - CFont::SetSlant(0.15f); + CFont::SetScale(PSP_SCREEN_SCALE_X(0.4752f), PSP_SCREEN_SCALE_Y(0.88f)); + //CFont::SetSlantRefPoint(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f)); + //CFont::SetSlant(0.15f); + CFont::SetWrapx(SCREEN_WIDTH); CFont::SetRightJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); @@ -805,9 +787,9 @@ void CHud::Draw() CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha)); if (!CTheScripts::bPlayerIsInTheStatium) - CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint); + CFont::PrintStringFromBottom(PSP_SCREEN_SCALE_FROM_RIGHT(24.0f), PSP_SCREEN_SCALE_FROM_BOTTOM(16.0f), m_ZoneToPrint); - CFont::SetSlant(0.f); + //CFont::SetSlant(0.f); } else { m_ZoneState = 3; } @@ -888,13 +870,14 @@ void CHud::Draw() CFont::SetPropOn(); CFont::SetBackgroundOff(); - if (FrontEndMenuManager.m_PrefsLanguage != CMenuManager::LANGUAGE_ITALIAN && FrontEndMenuManager.m_PrefsLanguage != CMenuManager::LANGUAGE_SPANISH) - CFont::SetScale(SCREEN_SCALE_X(1.7f), SCREEN_SCALE_Y(1.8f)); + if (FrontEndMenuManager.m_PrefsUseWideScreen) + CFont::SetScale(PSP_SCREEN_SCALE_X(0.42768f), PSP_SCREEN_SCALE_Y(0.88f)); else - CFont::SetScale(SCREEN_SCALE_X(1.7f * 0.85f), SCREEN_SCALE_Y(1.8f)); + CFont::SetScale(PSP_SCREEN_SCALE_X(0.4752f), PSP_SCREEN_SCALE_Y(0.88f)); - CFont::SetSlantRefPoint(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f)); - CFont::SetSlant(0.15f); + CFont::SetWrapx(SCREEN_WIDTH); + CFont::SetSlantRefPoint(PSP_SCREEN_SCALE_FROM_RIGHT(24.0f), PSP_SCREEN_SCALE_FROM_BOTTOM(35.6f)); + CFont::SetSlant(0.f); CFont::SetRightJustifyOn(); CFont::SetRightJustifyWrap(0.0f); @@ -904,7 +887,7 @@ void CHud::Draw() CFont::SetColor(CRGBA(VEHICLE_COLOR.r, VEHICLE_COLOR.g, VEHICLE_COLOR.b, fVehicleAlpha)); CFont::SetDropColor(CRGBA(0, 0, 0, fVehicleAlpha)); - CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f), m_pVehicleNameToPrint); + CFont::PrintStringFromBottom(PSP_SCREEN_SCALE_FROM_RIGHT(24.0f), PSP_SCREEN_SCALE_FROM_BOTTOM(35.6f), m_pVehicleNameToPrint); CFont::SetSlant(0.f); } @@ -921,24 +904,8 @@ void CHud::Draw() DrawClock */ if (m_ClockState) { - CFont::SetJustifyOff(); - CFont::SetCentreOff(); - CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); - CFont::SetBackGroundOnlyTextOff(); - CFont::SetPropOff(); - CFont::SetFontStyle(FONT_HEADING); - CFont::SetRightJustifyOn(); - CFont::SetRightJustifyWrap(0.0f); - CFont::SetDropShadowPosition(2); - CFont::SetDropColor(CRGBA(0, 0, 0, 255)); - - sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes()); - AsciiToUnicode(sTemp, sPrint); - - CFont::SetColor(CLOCK_COLOR); if (FrontEndMenuManager.m_PrefsShowHud) - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f), SCREEN_SCALE_Y(22.0f), sPrint); + DrawTime(); } /* @@ -1205,7 +1172,7 @@ void CHud::Draw() onceItWasWidescreen = false; CFont::DrawFonts(); - CFont::SetDropShadowPosition(2); + CFont::SetDropShadowPosition(0); CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.22f)); @@ -1431,6 +1398,221 @@ void CHud::Draw() } } +int HealthFlashTimer = 50; + +void +CHud::DrawHealthBar(int16 value) +{ + if (m_ItemToFlash == ITEM_HEALTH) { + if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_fHealth > 10.0f) { + if (HealthFlashTimer-- == 0) { + m_ItemToFlash = -1; + HealthFlashTimer = 50; + } + } + } + float fHealth = value; + float fMaxHealth = CWorld::Players[CWorld::PlayerInFocus].m_nMaxHealth; + fHealth = Clamp(fHealth, 0.0f, fMaxHealth); + float fWidth = (fHealth / fMaxHealth) * 40.0f + 16.0f + 4.0f; + float u = fWidth / 64.0f; + if (value == 0) { + fWidth = 0.0f; + u = 0.0f; + } else if (value == fMaxHealth) { + fWidth = 64.0f; + u = 1.0f; + } + + if (FrontEndMenuManager.m_PrefsUseWideScreen) + fWidth *= 0.68f; + else + fWidth *= 0.85f; + + float fX1 = FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f; + float fX2 = fWidth + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect1(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(40.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(50.0f)); + CRGBA color1(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_INSIDE2].Draw(rect1, color1, 0.0f, 0.0f, u, 0.0f, 0.0f, 1.0f, u, 1.0f); + + fX1 = fWidth + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + fX2 = (FrontEndMenuManager.m_PrefsUseWideScreen ? 43.52f : 54.4f) + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect2(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(40.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(50.0f)); + CRGBA color2(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_INSIDE2DARK].Draw(rect2, color2, u, 0.0f, 1.0f, 0.0f, u, 1.0f, 1.0f, 1.0f); + + fX1 = FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f; + fX2 = (FrontEndMenuManager.m_PrefsUseWideScreen ? 43.52f : 54.4f) + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect3(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(40.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(50.0f)); + CRGBA color3(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_OUTLINE].Draw(rect3, color3, 0.01f, 0.0f, 1.0f, 0.0f, 0.01f, 1.0f, 1.0f, 1.0f); + + if (fMaxHealth > 100.0f) + { + CFont::SetFontStyle(FONT_STANDARD); + CFont::SetDropShadowPosition(0); + CFont::SetDropColor(CRGBA(0, 0, 0, m_HudAlpha)); + CFont::SetColor(CRGBA(255, 255, 255, m_HudAlpha)); + CFont::SetCentreOn(); + if (fMaxHealth > 125.0f) + CFont::SetScale(FrontEndMenuManager.StretchX(PSP_SCALE_TO_PS2_X(FrontEndMenuManager.m_PrefsUseWideScreen ? 0.3375f : 0.45f)), FrontEndMenuManager.StretchY(PSP_SCALE_TO_PS2_Y(0.75f))); + else + CFont::SetScale(FrontEndMenuManager.StretchX(PSP_SCALE_TO_PS2_X(FrontEndMenuManager.m_PrefsUseWideScreen ? 0.2625f : 0.35f)), FrontEndMenuManager.StretchY(PSP_SCALE_TO_PS2_Y(0.6f))); + + if (FrontEndMenuManager.m_PrefsUseWideScreen) + fX1 = 375.0f + 12.0f; + else + fX1 = 360.0f + 15.0f; + CFont::PrintString(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(36.0f), (wchar*)L"+"); + } + +} + +int ArmourFlashTimer = 50; + +void +CHud::DrawArmourBar(int16 value) +{ + if (m_ItemToFlash == ITEM_ARMOUR) { + if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_fArmour > 10.0f) { + if (ArmourFlashTimer-- == 0) { + m_ItemToFlash = -1; + ArmourFlashTimer = 50; + } + } + } + float fArmour = value; + float fMaxArmour = CWorld::Players[CWorld::PlayerInFocus].m_nMaxArmour; + fArmour = Clamp(fArmour, 0.0f, fMaxArmour); + float fWidth = (fArmour / fMaxArmour) * 40.0f + 16.0f + 4.0f; + float u = fWidth / 64.0f; + if (value == 0) { + fWidth = 0.0f; + u = 0.0f; + } else if (value == fMaxArmour) { + fWidth = 64.0f; + u = 1.0f; + } + + if (FrontEndMenuManager.m_PrefsUseWideScreen) + fWidth *= 0.68f; + else + fWidth *= 0.85f; + + float fX1 = FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f; + float fX2 = fWidth + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect1(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(28.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(38.0f)); + CRGBA color1(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_INSIDE1].Draw(rect1, color1, 0.0f, 0.0f, u, 0.0f, 0.0f, 1.0f, u, 1.0f); + + fX1 = fWidth + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + fX2 = (FrontEndMenuManager.m_PrefsUseWideScreen ? 43.52f : 54.4f) + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect2(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(28.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(38.0f)); + CRGBA color2(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_INSIDE1DARK].Draw(rect2, color2, u, 0.0f, 1.0f, 0.0f, u, 1.0f, 1.0f, 1.0f); + + fX1 = FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f; + fX2 = (FrontEndMenuManager.m_PrefsUseWideScreen ? 43.52f : 54.4f) + (FrontEndMenuManager.m_PrefsUseWideScreen ? 375.0f : 360.0f); + CRect rect3(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(28.0f), PSP_SCREEN_SCALE_X(fX2), PSP_SCREEN_SCALE_Y(38.0f)); + CRGBA color3(255, 255, 255, m_HudAlpha); + Sprites[HUD_BAR_OUTLINE].Draw(rect3, color3, 0.01f, 0.0f, 1.0f, 0.0f, 0.01f, 1.0f, 1.0f, 1.0f); + + if (fMaxArmour > 100.0f) { + CFont::SetFontStyle(FONT_STANDARD); + CFont::SetDropShadowPosition(0); + CFont::SetDropColor(CRGBA(0, 0, 0, m_HudAlpha)); + CFont::SetColor(CRGBA(255, 255, 255, m_HudAlpha)); + CFont::SetCentreOn(); + if (fMaxArmour > 125.0f) + CFont::SetScale(FrontEndMenuManager.StretchX(PSP_SCALE_TO_PS2_X(FrontEndMenuManager.m_PrefsUseWideScreen ? 0.3375f : 0.45f)), FrontEndMenuManager.StretchY(PSP_SCALE_TO_PS2_Y(0.75f))); + else + CFont::SetScale(FrontEndMenuManager.StretchX(PSP_SCALE_TO_PS2_X(FrontEndMenuManager.m_PrefsUseWideScreen ? 0.2625f : 0.35f)), FrontEndMenuManager.StretchY(PSP_SCALE_TO_PS2_Y(0.6f))); + + if (FrontEndMenuManager.m_PrefsUseWideScreen) + fX1 = 375.0f + 12.0f; + else + fX1 = 360.0f + 15.0f; + CFont::PrintString(PSP_SCREEN_SCALE_X(fX1), PSP_SCREEN_SCALE_Y(24.0f), (wchar*)L"+"); + } + +} + +void +CHud::DrawTimeAndCashNumbers(char *str, float x, float y, bool secondSet) +{ + CRGBA color(255, 255, 255, m_HudAlpha); + + float width = 11.0f; + if (FrontEndMenuManager.m_PrefsUseWideScreen) + width = 9.0f; + + float height = 10.0f; + while (*str) { + uint8 c = *str; + if (c >= '0' && c <= ':') + { + if (secondSet) c -= '%'; + else c -= '0'; + } else { + if (c == 22) { + if (secondSet) + color = CRGBA(62, 141, 188, m_HudAlpha); + else + color = CRGBA(192, 155, 54, m_HudAlpha); + } else if (!secondSet) + c = 10; + else + c = 21; + } + + int row = c / 8; + int col = c - row * 8; + float width2 = width; + if (c == 22) + width2 += 3.0f; + CRect rect(PSP_SCREEN_SCALE_X(x), PSP_SCREEN_SCALE_Y(y), PSP_SCREEN_SCALE_X(x+ width2), PSP_SCREEN_SCALE_Y(y) + PSP_SCREEN_SCALE_Y(height)); + + float u = col * 0.125f; + // TODO(LCS): some odd calculation with u going on in here if it's < 0, it might be fabs, but maybe not + + float v = row * 0.265625f; + // TODO(LCS): same odd calculation with v as above + + str++; + Sprites[HUD_HUDNUMBERS].Draw(rect, color, u, v, u + 0.125f, v, u, v + 0.265625f, u + 0.125f, v + 0.265625f); + + x += (width - 2.0f); + if (c == 10) + x -= 4.0f; + +#ifdef GTA_PSP + x = Ceil(PSP_SCREEN_SCALE_X(x)) * ((float)PSP_DEFAULT_SCREEN_WIDTH / (float)SCREEN_WIDTH); +#else + // BUG: actually above wasn't PSP only but on higher resolutions things don't look like they were meant to, so we stick with PS2 version here + x = Ceil(PSP_SCALE_TO_PS2_X(x)) * ((float)PSP_DEFAULT_SCREEN_WIDTH / (float)DEFAULT_SCREEN_WIDTH); +#endif + } +} + +void +CHud::DrawCash() +{ + char str[200]; + sprintf(str, "$%08d", CWorld::Players[CWorld::PlayerInFocus].m_nMoney); + DrawTimeAndCashNumbers(str, FrontEndMenuManager.m_PrefsUseWideScreen ? 386.0f : 373.0f, 53.0f, true); +} + +void +CHud::DrawTime() +{ + // TODO(LCS): a lot more code should be here + + char str[24]; + sprintf(str, "%02d:%02d", CClock::ms_nGameClockHours, CClock::ms_nGameClockMinutes); + DrawTimeAndCashNumbers(str, FrontEndMenuManager.m_PrefsUseWideScreen ? 386.0f : 373.0f, 17.0f, false); +} + + void CHud::DrawAfterFade() { RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST); @@ -2086,4 +2268,4 @@ CHud::ResetWastedText(void) BigMessageInUse[0] = 0.0f; m_BigMessage[2][0] = 0; m_BigMessage[0][0] = 0; -} +}
\ No newline at end of file diff --git a/src/renderer/Hud.h b/src/renderer/Hud.h index a4b9609a..4ae36886 100644 --- a/src/renderer/Hud.h +++ b/src/renderer/Hud.h @@ -38,15 +38,23 @@ enum eSprites HUD_FIST, HUD_SITEROCKET = 41, HUD_RADARDISC = 50, - HUD_SITESNIPER = 63, + HUD_BAR_INSIDE1DARK = 57, + HUD_BAR_INSIDE2DARK, + HUD_HUDNUMBERS, + HUD_BAR_INSIDE1, + HUD_BAR_INSIDE2, + HUD_BAR_OUTLINE, + HUD_SITESNIPER, HUD_SITEM16, HUD_SITELASER, HUD_LASERDOT, HUD_VIEWFINDER, HUD_BLEEDER, - NUM_HUD_SPRITES = 69, + NUM_HUD_SPRITES = 70, }; +extern float BigMessageInUse[6]; + class CHud { public: @@ -82,7 +90,6 @@ public: static int32 m_ClockState; // These aren't really in CHud - static float BigMessageInUse[6]; static float BigMessageAlpha[6]; static float BigMessageX[6]; static float OddJob2OffTimer; @@ -117,6 +124,9 @@ public: static uint32 m_LastWeapon; static uint32 m_LastTimeEnergyLost; + static wchar* gLastPrintForeverString; + static uint8 m_HudAlpha; + public: static void Draw(); static void DrawAfterFade(); @@ -136,4 +146,9 @@ public: static void Shutdown(); static float DrawFadeState(DRAW_FADE_STATE, int); static void ResetWastedText(void); + static void DrawHealthBar(int16 value); + static void DrawArmourBar(int16 value); + static void DrawTimeAndCashNumbers(char *str, float x, float y, bool secondSet); + static void DrawCash(); + static void DrawTime(); }; diff --git a/src/renderer/MBlur.cpp b/src/renderer/MBlur.cpp index cc8270ce..f2c85719 100644 --- a/src/renderer/MBlur.cpp +++ b/src/renderer/MBlur.cpp @@ -593,6 +593,8 @@ CMBlur::AddRenderFx(RwCamera *cam, RwRect *rect, float z, FxType type) void CMBlur::OverlayRenderFx(RwCamera *cam, RwRaster *frontBuf) { + //TODO(LCS) +#if 0 bool drawWaterDrops = false; RwIm2DVertex verts[4]; int red = (0.75f*CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed())*0.55f * 255; @@ -798,4 +800,5 @@ CMBlur::OverlayRenderFx(RwCamera *cam, RwRaster *frontBuf) RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); pBufVertCount = 0; +#endif } diff --git a/src/renderer/Particle.cpp b/src/renderer/Particle.cpp index 461a10a6..18e9e415 100644 --- a/src/renderer/Particle.cpp +++ b/src/renderer/Particle.cpp @@ -13,6 +13,7 @@ #include "Replay.h" #include "Stats.h" #include "Weather.h" +#include "WaterLevel.h" #include "MBlur.h" #include "main.h" #include "AudioScriptObject.h" @@ -213,7 +214,6 @@ RwRaster *gpRainDropRaster; RwTexture *gpSparkTex; RwTexture *gpNewspaperTex; RwTexture *gpGunSmokeTex; -RwTexture *gpDotTex; RwTexture *gpHeatHazeTex; RwTexture *gpBeastieTex; RwTexture *gpRainDripTex[MAX_RAINDRIP_FILES]; @@ -222,34 +222,30 @@ RwTexture *gpRainDripDarkTex[MAX_RAINDRIP_FILES]; RwRaster *gpSparkRaster; RwRaster *gpNewspaperRaster; RwRaster *gpGunSmokeRaster; -RwRaster *gpDotRaster; RwRaster *gpHeatHazeRaster; RwRaster *gpBeastieRaster; RwRaster *gpRainDripRaster[MAX_RAINDRIP_FILES]; RwRaster *gpRainDripDarkRaster[MAX_RAINDRIP_FILES]; +RwTexture *gpFireHoseTex; +RwRaster *gpFireHoseRaster; + +RwTexture *gpMultiPlayerHitTex; +RwRaster *gpMultiPlayerHitRaster; + float CParticle::ms_afRandTable[CParticle::RAND_TABLE_SIZE]; CParticle *CParticle::m_pUnusedListHead; float CParticle::m_SinTable[CParticle::SIN_COS_TABLE_SIZE]; float CParticle::m_CosTable[CParticle::SIN_COS_TABLE_SIZE]; int32 Randomizer; -int32 nParticleCreationInterval = 1; float PARTICLE_WIND_TEST_SCALE = 0.002f; -float fParticleScaleLimit = 0.5f; - -bool clearWaterDrop; -int32 numWaterDropOnScreen; #ifdef DEBUGMENU SETTWEAKPATH("Particle"); -TWEAKINT32(nParticleCreationInterval, 0, 5, 1); -TWEAKFLOAT(fParticleScaleLimit, 0.0f, 1.0f, 0.1f); TWEAKFUNC(CParticle::ReloadConfig); #endif - - void CParticle::ReloadConfig() { debug("Initialising CParticleMgr..."); @@ -287,14 +283,6 @@ void CParticle::ReloadConfig() gParticleArray[i].m_nFadeAlphaTimer = 0; - gParticleArray[i].m_nCurrentZRotation = 0; - - gParticleArray[i].m_nZRotationTimer = 0; - - gParticleArray[i].m_fCurrentZRadius = 0.0f; - - gParticleArray[i].m_nZRadiusTimer = 0; - gParticleArray[i].m_nCurrentFrame = 0; gParticleArray[i].m_nAnimationSpeedTimer = 0; @@ -319,7 +307,7 @@ void CParticle::Initialise() } for ( int32 i = 0; i < SIN_COS_TABLE_SIZE; i++ ) - { + { float angle = DEGTORAD(float(i) * float(360.0f / SIN_COS_TABLE_SIZE)); m_SinTable[i] = ::Sin(angle); @@ -334,83 +322,98 @@ void CParticle::Initialise() for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ ) { gpSmokeTex[i] = RwTextureRead(SmokeFiles[i], nil); + ASSERT(gpSmokeTex[i] != nil); gpSmokeRaster[i] = RwTextureGetRaster(gpSmokeTex[i]); } gpSmoke2Tex = RwTextureRead("smokeII_3", nil); + ASSERT(gpSmoke2Tex != nil); gpSmoke2Raster = RwTextureGetRaster(gpSmoke2Tex); for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ ) { gpRubberTex[i] = RwTextureRead(RubberFiles[i], nil); + ASSERT(gpRubberTex[i] != nil); gpRubberRaster[i] = RwTextureGetRaster(gpRubberTex[i]); } for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ ) { gpRainSplashTex[i] = RwTextureRead(RainSplashFiles[i], nil); + ASSERT(gpRainSplashTex[i] != nil); gpRainSplashRaster[i] = RwTextureGetRaster(gpRainSplashTex[i]); } for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ ) { gpWatersprayTex[i] = RwTextureRead(WatersprayFiles[i], nil); + ASSERT(gpWatersprayTex[i] != nil); gpWatersprayRaster[i] = RwTextureGetRaster(gpWatersprayTex[i]); } for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ ) { gpExplosionMediumTex[i] = RwTextureRead(ExplosionMediumFiles[i], nil); + ASSERT(gpExplosionMediumTex[i] != nil); gpExplosionMediumRaster[i] = RwTextureGetRaster(gpExplosionMediumTex[i]); } for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ ) { gpGunFlashTex[i] = RwTextureRead(GunFlashFiles[i], nil); + ASSERT(gpGunFlashTex[i] != nil); gpGunFlashRaster[i] = RwTextureGetRaster(gpGunFlashTex[i]); } gpRainDropTex = RwTextureRead("raindrop4", nil); + ASSERT(gpRainDropTex != nil); gpRainDropRaster = RwTextureGetRaster(gpRainDropTex); - for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ ) { gpRainSplashupTex[i] = RwTextureRead(RainSplashupFiles[i], nil); + ASSERT(gpRainSplashupTex[i] != nil); gpRainSplashupRaster[i] = RwTextureGetRaster(gpRainSplashupTex[i]); } for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ ) { gpBirdfrontTex[i] = RwTextureRead(BirdfrontFiles[i], nil); + ASSERT(gpBirdfrontTex[i] != nil); gpBirdfrontRaster[i] = RwTextureGetRaster(gpBirdfrontTex[i]); } for ( int32 i = 0; i < MAX_BOAT_FILES; i++ ) { gpBoatTex[i] = RwTextureRead(BoatFiles[i], nil); + ASSERT(gpBoatTex[i] != nil); gpBoatRaster[i] = RwTextureGetRaster(gpBoatTex[i]); } for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ ) { gpCarDebrisTex[i] = RwTextureRead(CardebrisFiles[i], nil); + ASSERT(gpCarDebrisTex[i] != nil); gpCarDebrisRaster[i] = RwTextureGetRaster(gpCarDebrisTex[i]); } for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ ) { gpCarSplashTex[i] = RwTextureRead(CarsplashFiles[i], nil); + ASSERT(gpCarSplashTex[i] != nil); gpCarSplashRaster[i] = RwTextureGetRaster(gpCarSplashTex[i]); } gpBoatWakeTex = RwTextureRead("boatwake2", nil); + ASSERT(gpBoatWakeTex != nil); gpBoatWakeRaster = RwTextureGetRaster(gpBoatWakeTex); gpFlame1Tex = RwTextureRead("flame1", nil); + ASSERT(gpFlame1Tex != nil); gpFlame1Raster = RwTextureGetRaster(gpFlame1Tex); gpFlame5Tex = RwTextureRead("flame5", nil); + ASSERT(gpFlame5Tex != nil); //#ifdef FIX_BUGS #if 0 @@ -421,257 +424,409 @@ void CParticle::Initialise() #endif gpRainDropSmallTex = RwTextureRead("rainsmall", nil); + ASSERT(gpRainDropSmallTex != nil); gpRainDropSmallRaster = RwTextureGetRaster(gpRainDropSmallTex); gpBloodTex = RwTextureRead("blood", nil); + ASSERT(gpBloodTex != nil); gpBloodRaster = RwTextureGetRaster(gpBloodTex); gpLeafTex[0] = RwTextureRead("gameleaf01_64", nil); + ASSERT(gpLeafTex[0] != nil); gpLeafRaster[0] = RwTextureGetRaster(gpLeafTex[0]); gpLeafTex[1] = RwTextureRead("letter", nil); + ASSERT(gpLeafTex[1] != nil); gpLeafRaster[1] = RwTextureGetRaster(gpLeafTex[1]); gpCloudTex1 = RwTextureRead("cloud3", nil); + ASSERT(gpCloudTex1 != nil); gpCloudRaster1 = RwTextureGetRaster(gpCloudTex1); gpCloudTex4 = RwTextureRead("cloudmasked", nil); + ASSERT(gpCloudTex4 != nil); gpCloudRaster4 = RwTextureGetRaster(gpCloudTex4); gpBloodSmallTex = RwTextureRead("bloodsplat2", nil); + ASSERT(gpBloodSmallTex != nil); gpBloodSmallRaster = RwTextureGetRaster(gpBloodSmallTex); gpGungeTex = RwTextureRead("gunge", nil); + ASSERT(gpGungeTex != nil); gpGungeRaster = RwTextureGetRaster(gpGungeTex); gpCollisionSmokeTex = RwTextureRead("collisionsmoke", nil); + ASSERT(gpCollisionSmokeTex != nil); gpCollisionSmokeRaster = RwTextureGetRaster(gpCollisionSmokeTex); gpBulletHitTex = RwTextureRead("bullethitsmoke", nil); + ASSERT(gpBulletHitTex != nil); gpBulletHitRaster = RwTextureGetRaster(gpBulletHitTex); gpGunShellTex = RwTextureRead("gunshell", nil); + ASSERT(gpGunShellTex != nil); gpGunShellRaster = RwTextureGetRaster(gpGunShellTex); - gpPointlightTex = RwTextureRead("pointlight", nil); + gpPointlightTex = RwTextureRead("smoke5", nil); + ASSERT(gpPointlightTex != nil); gpPointlightRaster = RwTextureGetRaster(gpPointlightTex); gpSparkTex = RwTextureRead("spark", nil); + ASSERT(gpSparkTex != nil); gpSparkRaster = RwTextureGetRaster(gpSparkTex); - gpNewspaperTex = RwTextureRead("newspaper02_64", nil); + gpNewspaperTex = RwTextureRead("ballot_paper", nil); + ASSERT(gpNewspaperTex != nil); gpNewspaperRaster = RwTextureGetRaster(gpNewspaperTex); gpGunSmokeTex = RwTextureRead("gunsmoke3", nil); + ASSERT(gpGunSmokeTex != nil); gpGunSmokeRaster = RwTextureGetRaster(gpGunSmokeTex); - gpDotTex = RwTextureRead("dot", nil); - gpDotRaster = RwTextureGetRaster(gpDotTex); - gpHeatHazeTex = RwTextureRead("heathaze", nil); + ASSERT(gpHeatHazeTex != nil); gpHeatHazeRaster = RwTextureGetRaster(gpHeatHazeTex); gpBeastieTex = RwTextureRead("beastie", nil); + ASSERT(gpBeastieTex != nil); gpBeastieRaster = RwTextureGetRaster(gpBeastieTex); gpRainDripTex[0] = RwTextureRead("raindrip64", nil); + ASSERT(gpRainDripTex[0] != nil); gpRainDripRaster[0] = RwTextureGetRaster(gpRainDripTex[0]); gpRainDripTex[1] = RwTextureRead("raindripb64", nil); + ASSERT(gpRainDripTex[1] != nil); gpRainDripRaster[1] = RwTextureGetRaster(gpRainDripTex[1]); gpRainDripDarkTex[0] = RwTextureRead("raindrip64_d", nil); + ASSERT(gpRainDripDarkTex[0] != nil); gpRainDripDarkRaster[0] = RwTextureGetRaster(gpRainDripDarkTex[0]); - gpRainDripDarkTex[1] = RwTextureRead("raindripb64_d", nil); - gpRainDripDarkRaster[1] = RwTextureGetRaster(gpRainDripDarkTex[1]); + gpMultiPlayerHitTex = RwTextureRead("mphit", nil); + ASSERT(gpMultiPlayerHitTex != nil); + gpMultiPlayerHitRaster = RwTextureGetRaster(gpMultiPlayerHitTex); - CTxdStore::PopCurrentTxd(); + gpFireHoseTex = RwTextureRead("firehose", nil); + ASSERT(gpFireHoseTex != nil); + gpFireHoseRaster = RwTextureGetRaster(gpFireHoseTex); - for ( int32 i = 0; i < MAX_PARTICLES; i++ ) + CTxdStore::PopCurrentTxd(); + SetPixelData(); + + debug("CParticle ready"); +} + +void CParticle::SetPixelData() +{ + for (int32 i = 0; i < MAX_PARTICLES; i++) { - tParticleSystemData *entry = &mod_ParticleSystemManager.m_aParticles[i]; - - switch ( i ) + tParticleSystemData* entry = &mod_ParticleSystemManager.m_aParticles[i]; + + switch (i) { - case PARTICLE_SPARK: - case PARTICLE_SPARK_SMALL: - case PARTICLE_RAINDROP_SMALL: - case PARTICLE_HELI_ATTACK: - entry->m_ppRaster = &gpRainDropSmallRaster; - break; - - case PARTICLE_WATER_SPARK: - entry->m_ppRaster = &gpSparkRaster; - break; - - case PARTICLE_WHEEL_DIRT: - case PARTICLE_SAND: - case PARTICLE_STEAM2: - case PARTICLE_STEAM_NY: - case PARTICLE_STEAM_NY_SLOWMOTION: - case PARTICLE_GROUND_STEAM: - case PARTICLE_ENGINE_STEAM: - case PARTICLE_PEDFOOT_DUST: - case PARTICLE_CAR_DUST: - case PARTICLE_EXHAUST_FUMES: - entry->m_ppRaster = &gpSmoke2Raster; - break; - - case PARTICLE_WHEEL_WATER: - case PARTICLE_WATER: - case PARTICLE_SMOKE: - case PARTICLE_SMOKE_SLOWMOTION: - case PARTICLE_DRY_ICE: - case PARTICLE_GARAGEPAINT_SPRAY: - case PARTICLE_STEAM: - case PARTICLE_WATER_CANNON: - case PARTICLE_EXTINGUISH_STEAM: - case PARTICLE_HELI_DUST: - case PARTICLE_PAINT_SMOKE: - case PARTICLE_BULLETHIT_SMOKE: - entry->m_ppRaster = gpSmokeRaster; - break; - - case PARTICLE_BLOOD: - entry->m_ppRaster = &gpBloodRaster; - break; - - case PARTICLE_BLOOD_SMALL: - case PARTICLE_BLOOD_SPURT: - entry->m_ppRaster = &gpBloodSmallRaster; - break; - - case PARTICLE_DEBRIS: - case PARTICLE_TREE_LEAVES: - entry->m_ppRaster = gpLeafRaster; - break; - - case PARTICLE_DEBRIS2: - entry->m_ppRaster = &gpGungeRaster; - break; - - case PARTICLE_FLYERS: - entry->m_ppRaster = &gpNewspaperRaster; - break; - - case PARTICLE_FLAME: - case PARTICLE_CARFLAME: - entry->m_ppRaster = &gpFlame1Raster; - break; - - case PARTICLE_FIREBALL: - entry->m_ppRaster = &gpFlame5Raster; - break; - - case PARTICLE_GUNFLASH: - case PARTICLE_GUNFLASH_NOANIM: - entry->m_ppRaster = gpGunFlashRaster; - break; - - - case PARTICLE_GUNSMOKE: - case PARTICLE_WATERDROP: - case PARTICLE_BLOODDROP: - case PARTICLE_HEATHAZE: - case PARTICLE_HEATHAZE_IN_DIST: - entry->m_ppRaster = nil; - break; - - case PARTICLE_GUNSMOKE2: - case PARTICLE_BOAT_THRUSTJET: - case PARTICLE_RUBBER_SMOKE: - entry->m_ppRaster = gpRubberRaster; - break; - - case PARTICLE_CIGARETTE_SMOKE: - entry->m_ppRaster = &gpGunSmokeRaster; - break; - - case PARTICLE_TEARGAS: - entry->m_ppRaster = &gpHeatHazeRaster; - break; - - case PARTICLE_SHARD: - case PARTICLE_RAINDROP: - case PARTICLE_RAINDROP_2D: - entry->m_ppRaster = &gpRainDropRaster; - break; - - case PARTICLE_SPLASH: - case PARTICLE_PED_SPLASH: - case PARTICLE_CAR_SPLASH: - case PARTICLE_WATER_HYDRANT: - entry->m_ppRaster = gpCarSplashRaster; - break; - - case PARTICLE_RAIN_SPLASH: - case PARTICLE_RAIN_SPLASH_BIGGROW: - entry->m_ppRaster = gpRainSplashRaster; - break; - - case PARTICLE_RAIN_SPLASHUP: - entry->m_ppRaster = gpRainSplashupRaster; - break; - - case PARTICLE_WATERSPRAY: - entry->m_ppRaster = gpWatersprayRaster; - break; - - case PARTICLE_EXPLOSION_MEDIUM: - case PARTICLE_EXPLOSION_LARGE: - case PARTICLE_EXPLOSION_MFAST: - case PARTICLE_EXPLOSION_LFAST: - entry->m_ppRaster = gpExplosionMediumRaster; - break; - - case PARTICLE_BOAT_SPLASH: - entry->m_ppRaster = &gpBoatWakeRaster; - break; - - case PARTICLE_ENGINE_SMOKE: - case PARTICLE_ENGINE_SMOKE2: - case PARTICLE_CARFLAME_SMOKE: - case PARTICLE_FIREBALL_SMOKE: - case PARTICLE_ROCKET_SMOKE: - case PARTICLE_TEST: - entry->m_ppRaster = &gpCloudRaster4; - break; - - case PARTICLE_CARCOLLISION_DUST: - case PARTICLE_BURNINGRUBBER_SMOKE: - entry->m_ppRaster = &gpCollisionSmokeRaster; - break; - - case PARTICLE_CAR_DEBRIS: - case PARTICLE_HELI_DEBRIS: - case PARTICLE_BIRD_DEBRIS: - entry->m_ppRaster = gpCarDebrisRaster; - break; - - case PARTICLE_GUNSHELL_FIRST: - case PARTICLE_GUNSHELL: - case PARTICLE_GUNSHELL_BUMP1: - case PARTICLE_GUNSHELL_BUMP2: - entry->m_ppRaster = &gpGunShellRaster; - break; - - - case PARTICLE_BIRD_FRONT: - entry->m_ppRaster = gpBirdfrontRaster; - break; - - case PARTICLE_SHIP_SIDE: - entry->m_ppRaster = gpBoatRaster; - break; - - case PARTICLE_BEASTIE: - entry->m_ppRaster = &gpBeastieRaster; - break; + case PARTICLE_SPARK: + entry->m_ppRaster = &gpRainDropSmallRaster; + break; + + case PARTICLE_SPARK_SMALL: + entry->m_ppRaster = &gpRainDropSmallRaster; + break; + + case PARTICLE_WATER_SPARK: + entry->m_ppRaster = &gpSparkRaster; + break; + + case PARTICLE_WHEEL_DIRT: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_SAND: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_WHEEL_WATER: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_BLOOD: + entry->m_ppRaster = &gpBloodRaster; + break; + + case PARTICLE_BLOOD_SMALL: + entry->m_ppRaster = &gpBloodSmallRaster; + break; + + case PARTICLE_BLOOD_SPURT: + entry->m_ppRaster = &gpBloodSmallRaster; + break; + + case PARTICLE_DEBRIS: + entry->m_ppRaster = gpLeafRaster; + break; + + case PARTICLE_DEBRIS2: + entry->m_ppRaster = &gpGungeRaster; + break; + + case PARTICLE_FLYERS: + entry->m_ppRaster = &gpNewspaperRaster; + break; + + case PARTICLE_WATER: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_FLAME: + entry->m_ppRaster = &gpFlame1Raster; + break; + + case PARTICLE_FIREBALL: + entry->m_ppRaster = &gpFlame5Raster; + break; + + case PARTICLE_GUNFLASH: + entry->m_ppRaster = gpGunFlashRaster; + break; + + case PARTICLE_GUNFLASH_NOANIM: + entry->m_ppRaster = gpGunFlashRaster; + break; + + case PARTICLE_GUNSMOKE: + entry->m_ppRaster = nil; + break; + + case PARTICLE_GUNSMOKE2: + entry->m_ppRaster = gpRubberRaster; + break; + + case PARTICLE_CIGARETTE_SMOKE: + entry->m_ppRaster = &gpGunSmokeRaster; + break; + + case PARTICLE_TEARGAS: + entry->m_ppRaster = &gpHeatHazeRaster; + break; + + case PARTICLE_SMOKE: + case PARTICLE_SMOKE_SLOWMOTION: + case PARTICLE_DRY_ICE: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_GARAGEPAINT_SPRAY: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_SHARD: + entry->m_ppRaster = &gpRainDropRaster; + break; + + case PARTICLE_SPLASH: + entry->m_ppRaster = gpCarSplashRaster; + break; + + case PARTICLE_CARFLAME: + entry->m_ppRaster = &gpFlame1Raster; + break; + + case PARTICLE_STEAM: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_STEAM2: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_STEAM_NY: + case PARTICLE_STEAM_NY_SLOWMOTION: + case PARTICLE_GROUND_STEAM: + case PARTICLE_HYDRANT_STEAM: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_ENGINE_STEAM: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_RAINDROP: + entry->m_ppRaster = &gpRainDropRaster; + break; + + case PARTICLE_RAINDROP_SMALL: + entry->m_ppRaster = &gpRainDropSmallRaster; + break; + + case PARTICLE_RAIN_SPLASH: + case PARTICLE_RAIN_SPLASH_BIGGROW: + entry->m_ppRaster = gpRainSplashRaster; + break; + + case PARTICLE_RAIN_SPLASHUP: + entry->m_ppRaster = gpRainSplashupRaster; + break; + + case PARTICLE_WATERSPRAY: + entry->m_ppRaster = gpWatersprayRaster; + break; + + case PARTICLE_RAINDROP_2D: + entry->m_ppRaster = &gpRainDropRaster; + break; + + case PARTICLE_EXPLOSION_MEDIUM: + entry->m_ppRaster = gpExplosionMediumRaster; + break; + + case PARTICLE_EXPLOSION_LARGE: + entry->m_ppRaster = gpExplosionMediumRaster; + break; + + case PARTICLE_EXPLOSION_MFAST: + entry->m_ppRaster = gpExplosionMediumRaster; + break; + + case PARTICLE_EXPLOSION_LFAST: + entry->m_ppRaster = gpExplosionMediumRaster; + break; + + case PARTICLE_CAR_SPLASH: + entry->m_ppRaster = gpCarSplashRaster; + break; + + case PARTICLE_BOAT_SPLASH: + entry->m_ppRaster = &gpBoatWakeRaster; + break; + + case PARTICLE_BOAT_THRUSTJET: + entry->m_ppRaster = gpRubberRaster; + break; + + case PARTICLE_WATER_HYDRANT: + entry->m_ppRaster = gpCarSplashRaster; + break; + + case PARTICLE_WATER_CANNON: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_EXTINGUISH_STEAM: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_PED_SPLASH: + entry->m_ppRaster = gpCarSplashRaster; + break; + + case PARTICLE_PEDFOOT_DUST: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_CAR_DUST: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_HELI_DUST: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_HELI_ATTACK: + entry->m_ppRaster = &gpRainDropSmallRaster; + break; + + case PARTICLE_ENGINE_SMOKE: + entry->m_ppRaster = &gpCloudRaster4; + break; + + case PARTICLE_ENGINE_SMOKE2: + case PARTICLE_ROCKET_SMOKE: + entry->m_ppRaster = &gpCloudRaster4; + break; + + case PARTICLE_CARFLAME_SMOKE: + entry->m_ppRaster = &gpCloudRaster4; + break; + + case PARTICLE_FIREBALL_SMOKE: + entry->m_ppRaster = &gpCloudRaster4; + break; + + case PARTICLE_PAINT_SMOKE: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_TREE_LEAVES: + entry->m_ppRaster = gpLeafRaster; + break; + + case PARTICLE_CARCOLLISION_DUST: + entry->m_ppRaster = &gpCollisionSmokeRaster; + break; + + case PARTICLE_CAR_DEBRIS: + case PARTICLE_BIRD_DEBRIS: + case PARTICLE_HELI_DEBRIS: + entry->m_ppRaster = gpCarDebrisRaster; + break; + + case PARTICLE_EXHAUST_FUMES: + entry->m_ppRaster = &gpSmoke2Raster; + break; + + case PARTICLE_RUBBER_SMOKE: + entry->m_ppRaster = gpRubberRaster; + break; + + case PARTICLE_BURNINGRUBBER_SMOKE: + entry->m_ppRaster = &gpCollisionSmokeRaster; + break; + + case PARTICLE_BULLETHIT_SMOKE: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_GUNSHELL_FIRST: + entry->m_ppRaster = &gpGunShellRaster; + break; + + case PARTICLE_GUNSHELL: + entry->m_ppRaster = &gpGunShellRaster; + break; + + case PARTICLE_GUNSHELL_BUMP1: + entry->m_ppRaster = &gpGunShellRaster; + break; + + case PARTICLE_GUNSHELL_BUMP2: + entry->m_ppRaster = &gpGunShellRaster; + break; + + case PARTICLE_TEST: + entry->m_ppRaster = &gpCloudRaster4; + break; + + case PARTICLE_BIRD_FRONT: + entry->m_ppRaster = gpBirdfrontRaster; + break; + + case PARTICLE_SHIP_SIDE: + entry->m_ppRaster = gpBoatRaster; + break; + + case PARTICLE_BEASTIE: + entry->m_ppRaster = &gpBeastieRaster; + break; + + case PARTICLE_FERRY_CHIM_SMOKE: + entry->m_ppRaster = gpSmokeRaster; + break; + + case PARTICLE_MULTIPLAYER_HIT: + entry->m_ppRaster = &gpMultiPlayerHitRaster; + break; } } - - debug("CParticle ready"); } void CParticle::Shutdown() @@ -755,8 +910,13 @@ void CParticle::Shutdown() RwTextureDestroy(gpRainDripTex[i]); gpRainDripTex[i] = nil; - RwTextureDestroy(gpRainDripDarkTex[i]); - gpRainDripDarkTex[i] = nil; +#ifdef FIX_BUGS + if (gpRainDripDarkTex[i]) +#endif + { + RwTextureDestroy(gpRainDripDarkTex[i]); + gpRainDripDarkTex[i] = nil; + } } RwTextureDestroy(gpBoatWakeTex); @@ -812,14 +972,18 @@ void CParticle::Shutdown() RwTextureDestroy(gpGunSmokeTex); gpGunSmokeTex = nil; - - RwTextureDestroy(gpDotTex); - gpDotTex = nil; + RwTextureDestroy(gpHeatHazeTex); gpHeatHazeTex = nil; RwTextureDestroy(gpBeastieTex); gpBeastieTex = nil; + + RwTextureDestroy(gpMultiPlayerHitTex); + gpBeastieTex = nil; + + RwTextureDestroy(gpFireHoseTex); + gpFireHoseTex = nil; int32 slot; @@ -871,24 +1035,12 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, float fSize, RwRGBA const &color, int32 nRotationSpeed, int32 nRotation, int32 nCurFrame, int32 nLifeSpan) { - if ( CTimer::GetIsPaused() ) + if ( CTimer::GetIsPaused() /*TODO: || byte_355C47*/ ) return nil; - - if ( ( type == PARTICLE_ENGINE_SMOKE - || type == PARTICLE_ENGINE_SMOKE2 - || type == PARTICLE_ENGINE_STEAM - || type == PARTICLE_CARFLAME_SMOKE - || type == PARTICLE_RUBBER_SMOKE - || type == PARTICLE_BURNINGRUBBER_SMOKE - || type == PARTICLE_EXHAUST_FUMES - || type == PARTICLE_CARCOLLISION_DUST ) - && nParticleCreationInterval & CTimer::GetFrameCounter() ) - { - return nil; - } - +/* if ( !CReplay::IsPlayingBack() ) CReplay::RecordParticle(type, vecPos, vecDir, fSize, color); +*/ CParticle *pParticle = m_pUnusedListHead; @@ -923,38 +1075,15 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe if ( psystem->m_nFadeAlphaTime ) pParticle->m_nFadeAlphaTimer /= psystem->m_nFadeAlphaTime; - pParticle->m_nCurrentZRotation = psystem->m_nZRotationInitialAngle; - pParticle->m_fCurrentZRadius = psystem->m_fInitialZRadius; - if ( nCurFrame != 0 ) pParticle->m_nCurrentFrame = nCurFrame; else pParticle->m_nCurrentFrame = psystem->m_nStartAnimationFrame; - - pParticle->m_nZRotationTimer = 0; - pParticle->m_nZRadiusTimer = 0; pParticle->m_nAnimationSpeedTimer = 0; pParticle->m_fZGround = 0.0f; - - if ( type != PARTICLE_HEATHAZE ) - pParticle->m_vecPosition = vecPos; - else - { - CVector screen; - float w, h; - - if ( !CSprite::CalcScreenCoors(vecPos, &screen, &w, &h, true) ) - return nil; - - pParticle->m_vecPosition = screen; - psystem->m_vecTextureStretch.x = w; - psystem->m_vecTextureStretch.y = h; - } - + pParticle->m_vecPosition = vecPos; pParticle->m_vecVelocity = vecDir; - - pParticle->m_vecParticleMovementOffset = CVector(0.0f, 0.0f, 0.0f); pParticle->m_nTimeWhenColorWillBeChanged = 0; if ( color.alpha != 0 ) @@ -1091,14 +1220,14 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe break; case PARTICLE_EXPLOSION_MEDIUM: - pParticle->m_nColorIntensity -= 30 * (CGeneral::GetRandomNumber() & 1); // mb "+= -30 * rand" here ? + pParticle->m_nColorIntensity -= 2 * 15 * (CGeneral::GetRandomNumber() & 1); // mb "+= -30 * rand" here ? pParticle->m_nAnimationSpeedTimer = CGeneral::GetRandomNumber() & 7; pParticle->m_fSize = CGeneral::GetRandomNumberInRange(0.3f, 0.8f); pParticle->m_vecPosition.z -= CGeneral::GetRandomNumberInRange(-0.1f, 0.1f); break; case PARTICLE_EXPLOSION_LARGE: - pParticle->m_nColorIntensity -= 30 * (CGeneral::GetRandomNumber() & 1); // mb "+= -30 * rand" here ? + pParticle->m_nColorIntensity -= 2 * 15 * (CGeneral::GetRandomNumber() & 1); // mb "+= -30 * rand" here ? pParticle->m_nAnimationSpeedTimer = CGeneral::GetRandomNumber() & 7; pParticle->m_fSize = CGeneral::GetRandomNumberInRange(0.8f, 1.4f); pParticle->m_vecPosition.z -= CGeneral::GetRandomNumberInRange(-0.3f, 0.3f); @@ -1124,7 +1253,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe void CParticle::Update() { - if ( CTimer::GetIsPaused() ) + if ( CTimer::GetIsPaused() /*TODO: || byte_355C47*/ ) return; CRGBA color(0, 0, 0, 0); @@ -1137,7 +1266,9 @@ void CParticle::Update() float fFricDeccel99 = pow(0.99f, CTimer::GetTimeStep()); CParticleObject::UpdateAll(); - + + // no more erectedcocks +#ifndef FIX_BUGS // ejaculation at 23:00, 23:15, 23:30, 23:45 if ( CClock::ms_nGameClockHours == 23 && ( CClock::ms_nGameClockMinutes == 0 @@ -1156,6 +1287,7 @@ void CParticle::Update() 1, 1000); } +#endif for ( int32 i = 0; i < MAX_PARTICLES; i++ ) { @@ -1175,68 +1307,7 @@ void CParticle::Update() CVector vecMoveStep = particle->m_vecVelocity * CTimer::GetTimeStep(); CVector vecPos = particle->m_vecPosition; - - if ( numWaterDropOnScreen == 0 ) - clearWaterDrop = false; - - if ( psystem->m_Type == PARTICLE_WATERDROP ) - { - if ( CGame::IsInInterior() || clearWaterDrop == true ) - { - bRemoveParticle = true; - continue; - } - - static uint8 nWaterDropCount; - - if ( nWaterDropCount == 5 ) - { - vecMoveStep = CVector(0.0f, 0.0f, 0.0f); - particle->m_nTimeWhenWillBeDestroyed += 1250; - nWaterDropCount = 0; - } - else - { - if ( TheCamera.m_CameraAverageSpeed > 0.35f ) - { - if ( vecMoveStep.Magnitude() > 0.5f ) - { - if ( vecMoveStep.Magnitude() > 0.4f && vecMoveStep.Magnitude() < 0.8f ) - { - vecMoveStep.x += TheCamera.m_CameraAverageSpeed * 1.5f; - vecMoveStep.y += TheCamera.m_CameraAverageSpeed * 1.5f; - } - else if ( vecMoveStep.Magnitude() != 0.0f ) - { - vecMoveStep.x += CGeneral::GetRandomNumberInRange(0.01f, 0.05f); - vecMoveStep.y += CGeneral::GetRandomNumberInRange(0.01f, 0.05f); - } - } - } - - nWaterDropCount++; - } - - if ( vecPos.z <= 1.5f ) - vecMoveStep.z = 0.0f; - } - - if ( psystem->m_Type == PARTICLE_HEATHAZE || psystem->m_Type == PARTICLE_HEATHAZE_IN_DIST ) - { -#ifdef FIX_BUGS - int32 nSinCosIndex = (int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) + SIN_COS_TABLE_SIZE) % SIN_COS_TABLE_SIZE; -#else - int32 nSinCosIndex = int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) % SIN_COS_TABLE_SIZE; -#endif - vecMoveStep.x = Sin(nSinCosIndex); - vecMoveStep.y = Sin(nSinCosIndex); - - if ( psystem->m_Type == PARTICLE_HEATHAZE_IN_DIST ) - particle->m_nRotation = int16((float)particle->m_nRotation + 0.75f); - else - particle->m_nRotation = int16((float)particle->m_nRotation + 1.0f); - } - + if ( psystem->m_Type == PARTICLE_BEASTIE ) { #ifdef FIX_BUGS @@ -1259,28 +1330,7 @@ void CParticle::Update() } vecPos += vecMoveStep; - - if ( psystem->m_Type == PARTICLE_FIREBALL ) - { - AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f), - nil, particle->m_fSize * 5.0f); - } - - if ( psystem->m_Type == PARTICLE_GUNSMOKE2 ) - { - if ( CTimer::GetFrameCounter() & 10 ) - { -#ifdef FIX_BUGS - if ( FindPlayerPed() && FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN ) -#else - if ( FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN ) -#endif - { - AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f)); - } - } - } - + if ( CWeather::Wind > 0.0f ) { if ( vecMoveStep.Magnitude() != 0.0f ) @@ -1300,12 +1350,15 @@ void CParticle::Update() || psystem->m_Type == PARTICLE_BOAT_SPLASH || psystem->m_Type == PARTICLE_RAINDROP_2D ) { - int32 nMaxDrops = int32(6.0f * TheCamera.m_CameraAverageSpeed + 1.0f); + //int32 nMaxDrops = int32(6.0f * TheCamera.m_CameraAverageSpeed + 1.0f); float fDistToCam = 0.0f; if ( psystem->m_Type == PARTICLE_BOAT_SPLASH || psystem->m_Type == PARTICLE_CAR_SPLASH ) { - if ( vecPos.z + particle->m_fSize < 5.0f ) + float fWaterLevel = 0.0f; + CWaterLevel::GetWaterLevelNoWaves(vecPos.x, vecPos.y, vecPos.z, &fWaterLevel); + + if ( vecPos.z + particle->m_fSize < fWaterLevel ) { bRemoveParticle = true; continue; @@ -1316,61 +1369,16 @@ void CParticle::Update() case LOOKING_LEFT: case LOOKING_RIGHT: case LOOKING_FORWARD: - nMaxDrops /= 2; + //nMaxDrops /= 2; break; default: - nMaxDrops = 0; + //nMaxDrops = 0; break; } fDistToCam = (TheCamera.GetPosition() - vecPos).Magnitude(); } - - if ( numWaterDropOnScreen < nMaxDrops && numWaterDropOnScreen < 63 - && fDistToCam < 10.0f - && clearWaterDrop == false - && !CGame::IsInInterior() ) - { - CVector vecWaterdropTarget - ( - CGeneral::GetRandomNumberInRange(-0.25f, 0.25f), - CGeneral::GetRandomNumberInRange(0.1f, 0.75f), - -0.01f - ); - - CVector vecWaterdropPos; - - if ( TheCamera.m_CameraAverageSpeed < 0.35f ) - vecWaterdropPos.x = (float)CGeneral::GetRandomNumberInRange(50, int32(SCREEN_WIDTH) - 50); - else - vecWaterdropPos.x = (float)CGeneral::GetRandomNumberInRange(200, int32(SCREEN_WIDTH) - 200); - - if ( psystem->m_Type == PARTICLE_BOAT_SPLASH || psystem->m_Type == PARTICLE_CAR_SPLASH ) - vecWaterdropPos.y = (float)CGeneral::GetRandomNumberInRange(SCREEN_HEIGHT / 2, SCREEN_HEIGHT); - else - { - if ( TheCamera.m_CameraAverageSpeed < 0.35f ) - vecWaterdropPos.y = (float)CGeneral::GetRandomNumberInRange(0, int32(SCREEN_HEIGHT)); - else - vecWaterdropPos.y = (float)CGeneral::GetRandomNumberInRange(150, int32(SCREEN_HEIGHT) - 200); - } - - vecWaterdropPos.z = 2.0f; - - if ( AddParticle(PARTICLE_WATERDROP, - vecWaterdropPos, - vecWaterdropTarget, - nil, - CGeneral::GetRandomNumberInRange(0.1f, 0.15f), - 0, - 0, - CGeneral::GetRandomNumber() & 1, - 0) != nil ) - { - numWaterDropOnScreen++; - } - } } if ( CTimer::GetTimeInMilliseconds() > particle->m_nTimeWhenWillBeDestroyed || particle->m_nAlpha == 0 ) @@ -1433,10 +1441,7 @@ void CParticle::Update() } else size = particle->m_fSize + particle->m_fExpansionRate; - - if ( psystem->m_Type == PARTICLE_WATERDROP ) - size = (size - Abs(vecMoveStep.x) * 0.000150000007f) + (Abs(vecMoveStep.z) * 0.0500000007f); //TODO: - + if ( size < 0.0f ) { bRemoveParticle = true; @@ -1717,28 +1722,6 @@ void CParticle::Update() continue; } } - - if ( psystem->m_nZRotationAngleChangeAmount != 0 ) - { - if ( particle->m_nZRotationTimer >= psystem->m_nZRotationChangeTime ) - { - particle->m_nZRotationTimer = 0; - particle->m_nCurrentZRotation += psystem->m_nZRotationAngleChangeAmount; - } - else - ++particle->m_nZRotationTimer; - } - - if ( psystem->m_fZRadiusChangeAmount != 0.0f ) - { - if ( particle->m_nZRadiusTimer >= psystem->m_nZRadiusChangeTime ) - { - particle->m_nZRadiusTimer = 0; - particle->m_fCurrentZRadius += psystem->m_fZRadiusChangeAmount; - } - else - ++particle->m_nZRadiusTimer; - } if ( psystem->m_nAnimationSpeed != 0 ) { @@ -1765,21 +1748,6 @@ void CParticle::Update() particle->m_nRotation += particle->m_nRotationStep; #endif - if ( particle->m_fCurrentZRadius != 0.0f ) - { - int32 nSinCosIndex = particle->m_nCurrentZRotation % SIN_COS_TABLE_SIZE; - - float fX = (Cos(nSinCosIndex) - Sin(nSinCosIndex)) * particle->m_fCurrentZRadius; - - float fY = (Sin(nSinCosIndex) + Cos(nSinCosIndex)) * particle->m_fCurrentZRadius; - - vecPos -= particle->m_vecParticleMovementOffset; - - vecPos += CVector(fX, fY, 0.0f); - - particle->m_vecParticleMovementOffset = CVector(fX, fY, 0.0f); - } - particle->m_vecPosition = vecPos; } } @@ -1812,6 +1780,8 @@ void CParticle::Render() RwRaster **frames = psystem->m_ppRaster; tParticleType type = psystem->m_Type; + /* + something on ps2 if ( type == PARTICLE_ENGINE_SMOKE || type == PARTICLE_ENGINE_SMOKE2 || type == PARTICLE_ENGINE_STEAM @@ -1823,7 +1793,7 @@ void CParticle::Render() { particleBanned = true; } - + */ if ( particle ) { if ( (flags & DRAW_OPAQUE) != (psystem->Flags & DRAW_OPAQUE) @@ -1868,6 +1838,8 @@ void CParticle::Render() if ( particle->m_nAlpha == 0 ) canDraw = false; + // TODO: psp vert buffer check + if ( canDraw && psystem->m_nFinalAnimationFrame != 0 && frames != nil ) { RwRaster *curFrame = frames[particle->m_nCurrentFrame]; @@ -1881,20 +1853,7 @@ void CParticle::Render() if ( canDraw && psystem->Flags & DRAWTOP2D ) { - float screenZ; -#ifdef FIX_BUGS - bool zIsZero = true; - if ( particle->m_vecPosition.z != 0.0f ) { -#endif - screenZ = (particle->m_vecPosition.z - CDraw::GetNearClipZ()) - * (CSprite::GetFarScreenZ() - CSprite::GetNearScreenZ()) - * CDraw::GetFarClipZ() - / ( (CDraw::GetFarClipZ() - CDraw::GetNearClipZ()) * particle->m_vecPosition.z ) - + CSprite::GetNearScreenZ(); -#ifdef FIX_BUGS - zIsZero = false; - } -#endif + float screenZ = CalcScreenZ(particle->m_vecPosition.z); float stretchTexW; float stretchTexH; @@ -1909,115 +1868,7 @@ void CParticle::Render() stretchTexW = CGeneral::GetRandomNumberInRange(0.1f, 1.0f) * psystem->m_vecTextureStretch.x + 63.0f; stretchTexH = CGeneral::GetRandomNumberInRange(0.1f, 1.0f) * psystem->m_vecTextureStretch.y + 63.0f; } - -#ifdef FIX_BUGS - if (!zIsZero) { -#endif - - if ( i == PARTICLE_WATERDROP ) - { - int32 timeLeft = (particle->m_nTimeWhenWillBeDestroyed - CTimer::GetTimeInMilliseconds()) / particle->m_nTimeWhenWillBeDestroyed; - - stretchTexH += (1.0f - (float)timeLeft ) * psystem->m_vecTextureStretch.y; - - RwRect rect; - - rect.x = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH)); - rect.w = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH)); - - FxType fxtype; - - if ( particle->m_nCurrentFrame != 0 ) - fxtype = FXTYPE_WATER2; - else - fxtype = FXTYPE_WATER1; - - CMBlur::AddRenderFx(Scene.camera, &rect, screenZ, fxtype); - - canDraw = false; - } - - if ( i == PARTICLE_BLOODDROP ) - { - int32 timeLeft = (particle->m_nTimeWhenWillBeDestroyed - CTimer::GetTimeInMilliseconds()) / particle->m_nTimeWhenWillBeDestroyed; - - stretchTexH += (1.0f + (float)timeLeft) * psystem->m_vecTextureStretch.y; - stretchTexW += (1.0f - (float)timeLeft) * psystem->m_vecTextureStretch.x; - - RwRect rect; - - rect.x = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH)); - rect.w = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH)); - - FxType fxtype; - - if ( particle->m_nCurrentFrame ) - fxtype = FXTYPE_BLOOD2; - else - fxtype = FXTYPE_BLOOD1; - - CMBlur::AddRenderFx(Scene.camera, &rect, screenZ, fxtype); - - canDraw = false; - } - - if ( i == PARTICLE_HEATHAZE_IN_DIST ) - { - RwRect rect; - - rect.x = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH * 0.15f)); - rect.w = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * stretchTexW)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * stretchTexH * 0.15f)); - - CMBlur::AddRenderFx(Scene.camera, &rect, screenZ, FXTYPE_HEATHAZE); - - canDraw = false; - } - if ( i == PARTICLE_HEATHAZE ) - { - RwRect rect; - - switch ( TheCamera.GetLookDirection() ) - { - case LOOKING_LEFT: - rect.x = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x * 2.0f)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - rect.w = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - - break; - - case LOOKING_RIGHT: - rect.x = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - rect.w = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x * 4.0f)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - - break; - - default: - rect.x = int32(particle->m_vecPosition.x - SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x)); - rect.y = int32(particle->m_vecPosition.y - SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - rect.w = int32(particle->m_vecPosition.x + SCREEN_STRETCH_X(particle->m_fSize * psystem->m_vecTextureStretch.x)); - rect.h = int32(particle->m_vecPosition.y + SCREEN_STRETCH_Y(particle->m_fSize * psystem->m_vecTextureStretch.y)); - - break; - } - - CMBlur::AddRenderFx(Scene.camera, &rect, screenZ, FXTYPE_HEATHAZE); - - canDraw = false; - } -#ifdef FIX_BUGS - } - if ( !(zIsZero && (i == PARTICLE_WATERDROP || i == PARTICLE_BLOODDROP || i == PARTICLE_HEATHAZE_IN_DIST || i == PARTICLE_HEATHAZE) ) ) -#endif if ( canDraw ) { if ( particle->m_nRotation != 0 ) @@ -2082,6 +1933,8 @@ void CParticle::Render() } else if ( i == PARTICLE_WATER_HYDRANT ) { + float screenZ = CalcScreenZ(particle->m_vecPosition.z); + int32 timeLeft = (particle->m_nTimeWhenWillBeDestroyed - CTimer::GetTimeInMilliseconds()) / particle->m_nTimeWhenWillBeDestroyed; w += (1.0f - (float)timeLeft) * psystem->m_vecTextureStretch.x; @@ -2101,190 +1954,149 @@ void CParticle::Render() h += CGeneral::GetRandomNumberInRange(0.1f, 1.0f) * psystem->m_vecTextureStretch.y; } - if ( i == PARTICLE_WATER_HYDRANT - || (!particleBanned || SCREEN_WIDTH * fParticleScaleLimit >= w) - && SCREEN_HEIGHT * fParticleScaleLimit >= h ) + if ( particle->m_nRotation != 0 && i != PARTICLE_BEASTIE ) + { + CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, + particle->m_fSize * w, particle->m_fSize * h, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + DEGTORAD((float)particle->m_nRotation), + particle->m_nAlpha); + } + else if ( psystem->Flags & SCREEN_TRAIL ) { - if ( i == PARTICLE_WATER_HYDRANT ) + float fRotation; + float fTrailLength; + + if ( particle->m_fZGround == 0.0f ) { - RwRect rect; - - if ( w > 0.0f ) - { - rect.x = int32(coors.x - SCREEN_STRETCH_X(particle->m_fSize * w)); - rect.w = int32(coors.x + SCREEN_STRETCH_X(particle->m_fSize * w)); - } - else - { - rect.w = int32(coors.x - SCREEN_STRETCH_X(particle->m_fSize * w)); - rect.x = int32(coors.x + SCREEN_STRETCH_X(particle->m_fSize * w)); - } - - if ( h > 0.0f ) - { - rect.y = int32(coors.y - SCREEN_STRETCH_Y(particle->m_fSize * h)); - rect.h = int32(coors.y + SCREEN_STRETCH_Y(particle->m_fSize * h)); - } - else - { - rect.h = int32(coors.y - SCREEN_STRETCH_Y(particle->m_fSize * h)); - rect.y = int32(coors.y + SCREEN_STRETCH_Y(particle->m_fSize * h)); - } - - float screenZ = (coors.z - CDraw::GetNearClipZ()) - * (CSprite::GetFarScreenZ() - CSprite::GetNearScreenZ()) * CDraw::GetFarClipZ() - / ( (CDraw::GetFarClipZ() - CDraw::GetNearClipZ()) * coors.z ) + CSprite::GetNearScreenZ(); - - CMBlur::AddRenderFx(Scene.camera, &rect, screenZ, FXTYPE_SPLASH1); + fTrailLength = 0.0f; + fRotation = 0.0f; } else { - if ( particle->m_nRotation != 0 && i != PARTICLE_BEASTIE ) - { - CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, - particle->m_fSize * w, particle->m_fSize * h, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - DEGTORAD((float)particle->m_nRotation), - particle->m_nAlpha); - } - else if ( psystem->Flags & SCREEN_TRAIL ) - { - float fRotation; - float fTrailLength; - - if ( particle->m_fZGround == 0.0f ) - { - fTrailLength = 0.0f; - fRotation = 0.0f; - } - else - { - CVector2D vecDist - ( - coors.x - particle->m_fZGround, - coors.y - particle->m_fExpansionRate - ); + CVector2D vecDist + ( + coors.x - particle->m_fZGround, + coors.y - particle->m_fExpansionRate + ); - float fDist = vecDist.Magnitude(); + float fDist = vecDist.Magnitude(); - fTrailLength = fDist; - - float fRot = Asin(vecDist.x / fDist); + fTrailLength = fDist; + + float fRot = Asin(vecDist.x / fDist); - fRotation = fRot; + fRotation = fRot; - if ( vecDist.y < 0.0f ) - fRotation = -1.0f * fRot + DEGTORAD(180.0f); - - float fSpeed = particle->m_vecVelocity.Magnitude(); - - float fNewTrailLength = fSpeed * CTimer::GetTimeStep() * w * 2.0f; - - if ( fDist > fNewTrailLength ) - fTrailLength = fNewTrailLength; - } - - CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, - particle->m_fSize * w, - particle->m_fSize * h + fTrailLength * psystem->m_fTrailLengthMultiplier, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - fRotation, - particle->m_nAlpha); + if ( vecDist.y < 0.0f ) + fRotation = -1.0f * fRot + DEGTORAD(180.0f); + + float fSpeed = particle->m_vecVelocity.Magnitude(); + + float fNewTrailLength = fSpeed * CTimer::GetTimeStep() * w * 2.0f; + + if ( fDist > fNewTrailLength ) + fTrailLength = fNewTrailLength; + } + + CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, + particle->m_fSize * w, + particle->m_fSize * h + fTrailLength * psystem->m_fTrailLengthMultiplier, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + fRotation, + particle->m_nAlpha); - particle->m_fZGround = coors.x; // WTF ? - particle->m_fExpansionRate = coors.y; // WTF ? - } - else if ( psystem->Flags & SPEED_TRAIL ) - { - CVector vecPrevPos = particle->m_vecPosition - particle->m_vecVelocity; - float fRotation; - float fTrailLength; - CVector vecScreenPosition; - - if ( CSprite::CalcScreenCoors(vecPrevPos, &vecScreenPosition, &fTrailLength, &fRotation, true) ) - { - CVector2D vecDist - ( - coors.x - vecScreenPosition.x, - coors.y - vecScreenPosition.y - ); - - float fDist = vecDist.Magnitude(); - - fTrailLength = fDist; - - float fRot = Asin(vecDist.x / fDist); - - fRotation = fRot; - - if ( vecDist.y < 0.0f ) - fRotation = -1.0f * fRot + DEGTORAD(180.0f); - } - else - { - fRotation = 0.0f; - fTrailLength = 0.0f; - } - - CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, - particle->m_fSize * w, - particle->m_fSize * h + fTrailLength * psystem->m_fTrailLengthMultiplier, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - fRotation, - particle->m_nAlpha); - } - else if ( psystem->Flags & VERT_TRAIL ) - { - float fTrailLength = fabsf(particle->m_vecVelocity.z * 10.0f); - - CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, - particle->m_fSize * w, - (particle->m_fSize + fTrailLength * psystem->m_fTrailLengthMultiplier) * h, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - particle->m_nAlpha); - } - else if ( i == PARTICLE_RAINDROP_SMALL ) - { - CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, - particle->m_fSize * w * 0.05f, - particle->m_fSize * h, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - particle->m_nAlpha); - } - /*else if ( i == PARTICLE_BOAT_WAKE )*/ - else - { - CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, - particle->m_fSize * w, - particle->m_fSize * h, - particle->m_Color.red, - particle->m_Color.green, - particle->m_Color.blue, - particle->m_nColorIntensity, - 1.0f / coors.z, - particle->m_nAlpha); - } + particle->m_fZGround = coors.x; // WTF ? + particle->m_fExpansionRate = coors.y; // WTF ? + } + else if ( psystem->Flags & SPEED_TRAIL ) + { + CVector vecPrevPos = particle->m_vecPosition - particle->m_vecVelocity; + float fRotation; + float fTrailLength; + CVector vecScreenPosition; + + if ( CSprite::CalcScreenCoors(vecPrevPos, &vecScreenPosition, &fTrailLength, &fRotation, true) ) + { + CVector2D vecDist + ( + coors.x - vecScreenPosition.x, + coors.y - vecScreenPosition.y + ); + + float fDist = vecDist.Magnitude(); + + fTrailLength = fDist; + + float fRot = Asin(vecDist.x / fDist); + + fRotation = fRot; + + if ( vecDist.y < 0.0f ) + fRotation = -1.0f * fRot + DEGTORAD(180.0f); + } + else + { + fRotation = 0.0f; + fTrailLength = 0.0f; } + + CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(coors.x, coors.y, coors.z, + particle->m_fSize * w, + particle->m_fSize * h + fTrailLength * psystem->m_fTrailLengthMultiplier, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + fRotation, + particle->m_nAlpha); + } + else if ( psystem->Flags & VERT_TRAIL ) + { + float fTrailLength = Abs(particle->m_vecVelocity.z * 10.0f); + + CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, + particle->m_fSize * w, + (particle->m_fSize + fTrailLength * psystem->m_fTrailLengthMultiplier) * h, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + particle->m_nAlpha); + } + else if ( i == PARTICLE_RAINDROP_SMALL ) + { + CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, + particle->m_fSize * w * 0.05f, + particle->m_fSize * h, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + particle->m_nAlpha); + } + else + { + CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z, + particle->m_fSize * w, + particle->m_fSize * h, + particle->m_Color.red, + particle->m_Color.green, + particle->m_Color.blue, + particle->m_nColorIntensity, + 1.0f / coors.z, + particle->m_nAlpha); } } } @@ -2315,9 +2127,6 @@ void CParticle::RemovePSystem(tParticleType type) void CParticle::RemoveParticle(CParticle *pParticle, CParticle *pPrevParticle, tParticleSystemData *pPSystemData) { - if ( pPSystemData->m_Type == PARTICLE_WATERDROP ) - --numWaterDropOnScreen; - if ( pPrevParticle ) pPrevParticle->m_pNext = pParticle->m_pNext; else @@ -2417,18 +2226,7 @@ void CParticle::CalWindDir(CVector *vecDirIn, CVector *vecDirOut) void CParticle::HandleShipsAtHorizonStuff() { - tParticleSystemData *psystemdata = &mod_ParticleSystemManager.m_aParticles[PARTICLE_SHIP_SIDE]; - - for ( CParticle *particle = psystemdata->m_pParticles; particle; particle = particle->m_pNext ) - { - if ( CTimer::GetTimeInMilliseconds() > particle->m_nTimeWhenWillBeDestroyed - 32000 - && CTimer::GetTimeInMilliseconds() < particle->m_nTimeWhenWillBeDestroyed - 22000 ) - { - particle->m_nAlpha = Min(particle->m_nAlpha + 1, 96); - } - if ( CTimer::GetTimeInMilliseconds() > particle->m_nTimeWhenWillBeDestroyed - 10000 ) - particle->m_nFadeAlphaTimer = 1; - } + ; } void CParticle::HandleShootableBirdsStuff(CEntity *entity, CVector const&camPos) @@ -2468,7 +2266,7 @@ void CParticle::HandleShootableBirdsStuff(CEntity *entity, CVector const&camPos) bRemoveParticle = true; for ( int32 i = 0; i < 8; i++ ) - { + { CParticle *pBirdDerbis = AddParticle(PARTICLE_BIRD_DEBRIS, particle->m_vecPosition, CVector diff --git a/src/renderer/Particle.h b/src/renderer/Particle.h index 5542dc02..57e36f82 100644 --- a/src/renderer/Particle.h +++ b/src/renderer/Particle.h @@ -18,11 +18,6 @@ public: uint32 m_nTimeWhenWillBeDestroyed; uint32 m_nTimeWhenColorWillBeChanged; float m_fZGround; - CVector m_vecParticleMovementOffset; - int16 m_nCurrentZRotation; - uint16 m_nZRotationTimer; - float m_fCurrentZRadius; - uint16 m_nZRadiusTimer; uint8 m_nColorIntensity; uint8 m_nAlpha; float m_fSize; @@ -35,12 +30,13 @@ public: uint8 m_nCurrentFrame; RwRGBA m_Color; CParticle *m_pNext; - + int32 field_4C; + CParticle() { ; } - + ~CParticle() { ; @@ -95,14 +91,13 @@ public: static void HandleShipsAtHorizonStuff(); static void HandleShootableBirdsStuff(CEntity *entity, CVector const&camPos); + + static void SetPixelData(); }; -extern bool clearWaterDrop; -extern int32 numWaterDropOnScreen; extern RwRaster *gpCarSplashRaster[]; extern RwRaster *gpHeatHazeRaster; -extern RwRaster *gpDotRaster; extern RwRaster *gpRainDripRaster[]; extern RwRaster *gpRainDripDarkRaster[]; -VALIDATE_SIZE(CParticle, 0x58); +VALIDATE_SIZE(CParticle, 0x50); diff --git a/src/renderer/ParticleMgr.cpp b/src/renderer/ParticleMgr.cpp index f6919435..04f42c82 100644 --- a/src/renderer/ParticleMgr.cpp +++ b/src/renderer/ParticleMgr.cpp @@ -4,18 +4,30 @@ #include "FileMgr.h" #include "ParticleMgr.h" +// --LCS: File done + cParticleSystemMgr mod_ParticleSystemManager; const char *ParticleFilename = "PARTICLE.CFG"; cParticleSystemMgr::cParticleSystemMgr() { - memset(this, 0, sizeof(*this)); +#ifdef FIX_BUGS + m_aParticles = nil; +#endif +} + +#ifdef FIX_BUGS +cParticleSystemMgr::~cParticleSystemMgr() +{ + delete [] m_aParticles; } +#endif void cParticleSystemMgr::Initialise() { - LoadParticleData(); + if ( gMakeResources ) + LoadParticleData(); for ( int32 i = 0; i < MAX_PARTICLES; i++ ) m_aParticles[i].m_pParticles = nil; @@ -23,20 +35,30 @@ void cParticleSystemMgr::Initialise() void cParticleSystemMgr::LoadParticleData() { - CFileMgr::SetDir("DATA"); - CFileMgr::LoadFile(ParticleFilename, work_buff, ARRAY_SIZE(work_buff), "r"); +#ifdef FIX_BUGS + delete [] m_aParticles; +#endif + m_aParticles = new tParticleSystemData[MAX_PARTICLES]; + + memset(m_aParticles, 0, sizeof(tParticleSystemData)*MAX_PARTICLES); + + CFileMgr::SetDir("Data"); + ssize_t len = CFileMgr::LoadFile(ParticleFilename, work_buff, ARRAY_SIZE(work_buff), "r"); CFileMgr::SetDir(""); + ASSERT(!(len <= 0)); + tParticleSystemData *entry = nil; int32 type = PARTICLE_FIRST; + char *buffEnd = (char *)&work_buff[len]; char *lineStart = (char *)work_buff; char *lineEnd = lineStart + 1; char line[500]; char delims[4]; - while ( true ) + while ( lineStart < buffEnd ) { ASSERT(lineStart != nil); ASSERT(lineEnd != nil); diff --git a/src/renderer/ParticleMgr.h b/src/renderer/ParticleMgr.h index f4afc018..16da2c5f 100644 --- a/src/renderer/ParticleMgr.h +++ b/src/renderer/ParticleMgr.h @@ -124,15 +124,18 @@ class cParticleSystemMgr }; public: - tParticleSystemData m_aParticles[MAX_PARTICLES]; + tParticleSystemData *m_aParticles;//[MAX_PARTICLES]; cParticleSystemMgr(); +#ifdef FIX_BUGS + ~cParticleSystemMgr(); +#endif void Initialise(); void LoadParticleData(); void RangeCheck(tParticleSystemData *pData) { } }; -VALIDATE_SIZE(cParticleSystemMgr, 0x2FFC); +VALIDATE_SIZE(cParticleSystemMgr, 0x4); extern cParticleSystemMgr mod_ParticleSystemManager; diff --git a/src/renderer/ParticleType.h b/src/renderer/ParticleType.h index 9578083d..cb3d53f0 100644 --- a/src/renderer/ParticleType.h +++ b/src/renderer/ParticleType.h @@ -42,8 +42,6 @@ enum tParticleType PARTICLE_RAIN_SPLASH_BIGGROW, PARTICLE_RAIN_SPLASHUP, PARTICLE_WATERSPRAY, - PARTICLE_WATERDROP, - PARTICLE_BLOODDROP, PARTICLE_EXPLOSION_MEDIUM, PARTICLE_EXPLOSION_LARGE, PARTICLE_EXPLOSION_MFAST, @@ -83,10 +81,11 @@ enum tParticleType PARTICLE_SHIP_SIDE, PARTICLE_BEASTIE, PARTICLE_RAINDROP_2D, - PARTICLE_HEATHAZE, - PARTICLE_HEATHAZE_IN_DIST, + PARTICLE_FERRY_CHIM_SMOKE, + PARTICLE_MULTIPLAYER_HIT, + PARTICLE_HYDRANT_STEAM, MAX_PARTICLES, PARTICLE_FIRST = PARTICLE_SPARK, - PARTICLE_LAST = PARTICLE_HEATHAZE_IN_DIST + PARTICLE_LAST = PARTICLE_HYDRANT_STEAM };
\ No newline at end of file diff --git a/src/renderer/Renderer.cpp b/src/renderer/Renderer.cpp index 6b306b6c..85c52032 100644 --- a/src/renderer/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -2,6 +2,7 @@ #include "common.h" #include "main.h" +#include "General.h" #include "Lights.h" #include "ModelInfo.h" #include "Treadable.h" @@ -20,11 +21,13 @@ #include "ModelIndices.h" #include "Streaming.h" #include "Shadows.h" +#include "Coronas.h" #include "PointLights.h" #include "Occlusion.h" #include "Renderer.h" #include "custompipes.h" #include "Frontend.h" +#include "Ferry.h" bool gbShowPedRoadGroups; bool gbShowCarRoadGroups; @@ -38,6 +41,8 @@ bool gbDontRenderPeds; bool gbDontRenderObjects; bool gbDontRenderVehicles; +bool gbRenderDebugEnvMap; + // unused int16 TestCloseThings; int16 TestBigThings; @@ -542,6 +547,8 @@ CRenderer::RenderVehicles(void) node != &gSortedVehiclesAndPeds.head; node = node->prev) RenderOneNonRoad(node->item.ent); + + CFerry::RenderAllRemaning(); POP_RENDERGROUP(); } @@ -1673,3 +1680,186 @@ CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset) SetAmbientColours(); DeActivateDirectional(); } + + +#include "postfx.h" + +static RwIm2DVertex Screen2EnvQuad[4]; +static RwImVertexIndex EnvQuadIndices[6] = { 0, 1, 2, 0, 2, 3 }; + +static void +SetQuadVertices(RwRaster *env, RwRaster *screen, float z) +{ + uint32 width = RwRasterGetWidth(env); + uint32 height = RwRasterGetHeight(env); + + float zero, xmax, ymax; + + zero = -HALFPX; + xmax = width - HALFPX; + ymax = height - HALFPX; + + float recipz = 1.0f/z; + float umax = (float)SCREEN_WIDTH/RwRasterGetWidth(screen); + float vmax = (float)SCREEN_HEIGHT/RwRasterGetHeight(screen); + + RwIm2DVertexSetScreenX(&Screen2EnvQuad[0], zero); + RwIm2DVertexSetScreenY(&Screen2EnvQuad[0], zero); + RwIm2DVertexSetScreenZ(&Screen2EnvQuad[0], RwIm2DGetNearScreenZ()); + RwIm2DVertexSetCameraZ(&Screen2EnvQuad[0], z); + RwIm2DVertexSetRecipCameraZ(&Screen2EnvQuad[0], recipz); + RwIm2DVertexSetU(&Screen2EnvQuad[0], 0.0f, recipz); + RwIm2DVertexSetV(&Screen2EnvQuad[0], 0.0f, recipz); + RwIm2DVertexSetIntRGBA(&Screen2EnvQuad[0], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&Screen2EnvQuad[1], zero); + RwIm2DVertexSetScreenY(&Screen2EnvQuad[1], ymax); + RwIm2DVertexSetScreenZ(&Screen2EnvQuad[1], RwIm2DGetNearScreenZ()); + RwIm2DVertexSetCameraZ(&Screen2EnvQuad[1], z); + RwIm2DVertexSetRecipCameraZ(&Screen2EnvQuad[1], recipz); + RwIm2DVertexSetU(&Screen2EnvQuad[1], 0.0f, recipz); + RwIm2DVertexSetV(&Screen2EnvQuad[1], vmax, recipz); + RwIm2DVertexSetIntRGBA(&Screen2EnvQuad[1], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&Screen2EnvQuad[2], xmax); + RwIm2DVertexSetScreenY(&Screen2EnvQuad[2], ymax); + RwIm2DVertexSetScreenZ(&Screen2EnvQuad[2], RwIm2DGetNearScreenZ()); + RwIm2DVertexSetCameraZ(&Screen2EnvQuad[2], z); + RwIm2DVertexSetRecipCameraZ(&Screen2EnvQuad[2], recipz); + RwIm2DVertexSetU(&Screen2EnvQuad[2], umax, recipz); + RwIm2DVertexSetV(&Screen2EnvQuad[2], vmax, recipz); + RwIm2DVertexSetIntRGBA(&Screen2EnvQuad[2], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&Screen2EnvQuad[3], xmax); + RwIm2DVertexSetScreenY(&Screen2EnvQuad[3], zero); + RwIm2DVertexSetScreenZ(&Screen2EnvQuad[3], RwIm2DGetNearScreenZ()); + RwIm2DVertexSetCameraZ(&Screen2EnvQuad[3], z); + RwIm2DVertexSetRecipCameraZ(&Screen2EnvQuad[3], recipz); + RwIm2DVertexSetU(&Screen2EnvQuad[3], umax, recipz); + RwIm2DVertexSetV(&Screen2EnvQuad[3], 0.0f, recipz); + RwIm2DVertexSetIntRGBA(&Screen2EnvQuad[3], 255, 255, 255, 255); +} + +static RwIm2DVertex coronaVerts[4*4]; +static RwImVertexIndex coronaIndices[6*4]; +static int numCoronaVerts, numCoronaIndices; + +static void +AddCorona(float x, float y, float sz) +{ + float nearz, recipz; + RwIm2DVertex *v; + nearz = RwIm2DGetNearScreenZ(); + float z = RwCameraGetNearClipPlane(RwCameraGetCurrentCamera()); + recipz = 1.0f/z; + + v = &coronaVerts[numCoronaVerts]; + RwIm2DVertexSetScreenX(&v[0], x); + RwIm2DVertexSetScreenY(&v[0], y); + RwIm2DVertexSetScreenZ(&v[0], z); + RwIm2DVertexSetScreenZ(&v[0], nearz); + RwIm2DVertexSetRecipCameraZ(&v[0], recipz); + RwIm2DVertexSetU(&v[0], 0.0f, recipz); + RwIm2DVertexSetV(&v[0], 0.0f, recipz); + RwIm2DVertexSetIntRGBA(&v[0], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&v[1], x); + RwIm2DVertexSetScreenY(&v[1], y + sz); + RwIm2DVertexSetScreenZ(&v[1], z); + RwIm2DVertexSetScreenZ(&v[1], nearz); + RwIm2DVertexSetRecipCameraZ(&v[1], recipz); + RwIm2DVertexSetU(&v[1], 0.0f, recipz); + RwIm2DVertexSetV(&v[1], 1.0f, recipz); + RwIm2DVertexSetIntRGBA(&v[1], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&v[2], x + sz); + RwIm2DVertexSetScreenY(&v[2], y + sz); + RwIm2DVertexSetScreenZ(&v[2], z); + RwIm2DVertexSetScreenZ(&v[2], nearz); + RwIm2DVertexSetRecipCameraZ(&v[2], recipz); + RwIm2DVertexSetU(&v[2], 1.0f, recipz); + RwIm2DVertexSetV(&v[2], 1.0f, recipz); + RwIm2DVertexSetIntRGBA(&v[2], 255, 255, 255, 255); + + RwIm2DVertexSetScreenX(&v[3], x + sz); + RwIm2DVertexSetScreenY(&v[3], y); + RwIm2DVertexSetScreenZ(&v[3], z); + RwIm2DVertexSetScreenZ(&v[3], nearz); + RwIm2DVertexSetRecipCameraZ(&v[3], recipz); + RwIm2DVertexSetU(&v[3], 1.0f, recipz); + RwIm2DVertexSetV(&v[3], 0.0f, recipz); + RwIm2DVertexSetIntRGBA(&v[3], 255, 255, 255, 255); + + + coronaIndices[numCoronaIndices++] = numCoronaVerts; + coronaIndices[numCoronaIndices++] = numCoronaVerts + 1; + coronaIndices[numCoronaIndices++] = numCoronaVerts + 2; + coronaIndices[numCoronaIndices++] = numCoronaVerts; + coronaIndices[numCoronaIndices++] = numCoronaVerts + 2; + coronaIndices[numCoronaIndices++] = numCoronaVerts + 3; + numCoronaVerts += 4; +} +#include "Debug.h" + +static void +DrawEnvMapCoronas(float heading) +{ + RwRaster *rt = RwTextureGetRaster(CustomPipes::EnvMapTex); + const float BIG = 89.0f * RwRasterGetWidth(rt)/128.0f; + const float SMALL = 38.0f * RwRasterGetHeight(rt)/128.0f; + + float x; + numCoronaVerts = 0; + numCoronaIndices = 0; + x = (heading - PI)/TWOPI;// - 1.0f; + x *= BIG+SMALL; + AddCorona(x, 0.0f, BIG); x += BIG; + AddCorona(x, 12.0f, SMALL); x += SMALL; + AddCorona(x, 0.0f, BIG); x += BIG; + AddCorona(x, 12.0f, SMALL); x += SMALL; + + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpCoronaTexture[CCoronas::TYPE_STAR])); + RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, coronaVerts, numCoronaVerts, coronaIndices, numCoronaIndices); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); +} + +void +CRenderer::GenerateEnvironmentMap(void) +{ + // We'll probably do this differently eventually + // re-using all sorts of stuff here... + + CPostFX::GetBackBuffer(Scene.camera); + + RwCameraBeginUpdate(CustomPipes::EnvMapCam); + + // get current scene + SetQuadVertices(RwTextureGetRaster(CustomPipes::EnvMapTex), CPostFX::pBackBuffer, RwCameraGetNearClipPlane(RwCameraGetCurrentCamera())); + RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, CPostFX::pBackBuffer); + RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); + RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, Screen2EnvQuad, 4, EnvQuadIndices, 6); + RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); + + // Draw coronas + if(CustomPipes::VehiclePipeSwitch != CustomPipes::VEHICLEPIPE_MOBILE) + DrawEnvMapCoronas(TheCamera.GetForward().Heading()); + + RwCameraEndUpdate(CustomPipes::EnvMapCam); + + + RwCameraBeginUpdate(Scene.camera); + + if(gbRenderDebugEnvMap){ + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(CustomPipes::EnvMapTex)); + RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, CustomPipes::EnvScreenQuad, 4, (RwImVertexIndex*)CustomPipes::QuadIndices, 6); + } +} diff --git a/src/renderer/Renderer.h b/src/renderer/Renderer.h index 9b202098..a4b6b0b8 100644 --- a/src/renderer/Renderer.h +++ b/src/renderer/Renderer.h @@ -102,4 +102,6 @@ public: static void RenderTransparentWater(void); // keep-out polys and transparent water #endif static void InsertEntityIntoList(CEntity *ent); + + static void GenerateEnvironmentMap(void); }; diff --git a/src/renderer/Shadows.cpp b/src/renderer/Shadows.cpp index dd87bff6..ae4cf724 100644 --- a/src/renderer/Shadows.cpp +++ b/src/renderer/Shadows.cpp @@ -76,14 +76,14 @@ CShadows::Init(void) gpShadowBikeTex = RwTextureRead("shad_bike", nil); gpShadowBaronTex = RwTextureRead("shad_rcbaron", nil); gpShadowExplosionTex = RwTextureRead("shad_exp", nil); - gpShadowHeadLightsTex = RwTextureRead("headlight", nil); + gpShadowHeadLightsTex = RwTextureRead("headlight_single", nil); gpOutline1Tex = RwTextureRead("outline_64", nil); gpOutline2Tex = RwTextureRead("outline2_64", nil); gpOutline3Tex = RwTextureRead("outline3_64", nil); gpBloodPoolTex = RwTextureRead("bloodpool_64", nil); - gpReflectionTex = RwTextureRead("reflection01", nil); + //gpReflectionTex = RwTextureRead("reflection01", nil); gpWalkDontTex = RwTextureRead("walk_dont", nil); - gpCrackedGlassTex = RwTextureRead("wincrack_32", nil); + //gpCrackedGlassTex = RwTextureRead("wincrack_32", nil); gpPostShadowTex = RwTextureRead("lamp_shad_64", nil); CTxdStore::PopCurrentTxd(); @@ -99,9 +99,9 @@ CShadows::Init(void) ASSERT(gpOutline2Tex != nil); ASSERT(gpOutline3Tex != nil); ASSERT(gpBloodPoolTex != nil); - ASSERT(gpReflectionTex != nil); + //ASSERT(gpReflectionTex != nil); ASSERT(gpWalkDontTex != nil); - ASSERT(gpCrackedGlassTex != nil); + //ASSERT(gpCrackedGlassTex != nil); ASSERT(gpPostShadowTex != nil); @@ -178,9 +178,9 @@ CShadows::Shutdown(void) ASSERT(gpOutline2Tex != nil); ASSERT(gpOutline3Tex != nil); ASSERT(gpBloodPoolTex != nil); - ASSERT(gpReflectionTex != nil); + //ASSERT(gpReflectionTex != nil); ASSERT(gpWalkDontTex != nil); - ASSERT(gpCrackedGlassTex != nil); + //ASSERT(gpCrackedGlassTex != nil); ASSERT(gpPostShadowTex != nil); RwTextureDestroy(gpShadowCarTex); @@ -194,9 +194,9 @@ CShadows::Shutdown(void) RwTextureDestroy(gpOutline2Tex); RwTextureDestroy(gpOutline3Tex); RwTextureDestroy(gpBloodPoolTex); - RwTextureDestroy(gpReflectionTex); + //RwTextureDestroy(gpReflectionTex); RwTextureDestroy(gpWalkDontTex); - RwTextureDestroy(gpCrackedGlassTex); + //RwTextureDestroy(gpCrackedGlassTex); RwTextureDestroy(gpPostShadowTex); } diff --git a/src/renderer/SpecialFX.cpp b/src/renderer/SpecialFX.cpp index 61750f85..4bf94f2b 100644 --- a/src/renderer/SpecialFX.cpp +++ b/src/renderer/SpecialFX.cpp @@ -878,7 +878,7 @@ C3dMarkers::PlaceMarker(uint32 identifier, uint16 type, CVector &pos, float size pMarker->m_Matrix.GetPosition() = pos; if (pMarker->m_bFindZOnNextPlacement) { - if ((playerPos - pos).MagnitudeSqr() < sq(100.f) && CColStore::HasCollisionLoaded(CVector2D(pos))) { + if ((playerPos - pos).MagnitudeSqr() < sq(100.f) && CColStore::HasCollisionLoaded(pos)) { float z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z + 1.0f, nil); if (z != 0.0f) pMarker->m_Matrix.GetPosition().z = z - 0.05f * size; @@ -894,7 +894,7 @@ C3dMarkers::PlaceMarker(uint32 identifier, uint16 type, CVector &pos, float size pMarker->AddMarker(identifier, type, size, r, g, b, a, pulsePeriod, pulseFraction, rotateRate); if (type == MARKERTYPE_CYLINDER || type == MARKERTYPE_0 || type == MARKERTYPE_2) { - if ((playerPos - pos).MagnitudeSqr() < sq(100.f) && CColStore::HasCollisionLoaded(CVector2D(pos))) { + if ((playerPos - pos).MagnitudeSqr() < sq(100.f) && CColStore::HasCollisionLoaded(pos)) { float z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z + 1.0f, nil); if (z != 0.0f) pos.z = z - 0.05f * size; diff --git a/src/renderer/Sprite.cpp b/src/renderer/Sprite.cpp index 58b29ea9..f19ad55e 100644 --- a/src/renderer/Sprite.cpp +++ b/src/renderer/Sprite.cpp @@ -10,6 +10,19 @@ float CSprite::m_f2DFarScreenZ; float CSprite::m_fRecipNearClipPlane; int32 CSprite::m_bFlushSpriteBufferSwitchZTest; +float CalcScreenZ(float z) +{ + // LCS TODO: check + + if ( z == 0.0f ) + return CSprite::GetNearScreenZ(); + + return (z - CDraw::GetNearClipZ()) + * (CSprite::GetFarScreenZ() - CSprite::GetNearScreenZ()) * CDraw::GetFarClipZ() + / ( (CDraw::GetFarClipZ() - CDraw::GetNearClipZ()) * z ) + + CSprite::GetNearScreenZ(); +} + float CSprite::CalcHorizonCoors(void) { diff --git a/src/renderer/Sprite.h b/src/renderer/Sprite.h index fae6684e..952837a0 100644 --- a/src/renderer/Sprite.h +++ b/src/renderer/Sprite.h @@ -29,3 +29,5 @@ public: static void RenderBufferedOneXLUSprite2D_Rotate_Dimension(float x, float y, float w, float h, const RwRGBA &colour, int16 intens, float rotation, uint8 alpha); }; + +extern float CalcScreenZ(float z);
\ No newline at end of file diff --git a/src/renderer/Timecycle.cpp b/src/renderer/Timecycle.cpp index 95d9fe3c..8a3efd85 100644 --- a/src/renderer/Timecycle.cpp +++ b/src/renderer/Timecycle.cpp @@ -134,6 +134,61 @@ float CTimeCycle::m_fShadowSideY[16]; float CTimeCycle::m_fShadowDisplacementX[16]; float CTimeCycle::m_fShadowDisplacementY[16]; + + +static float tmp_nAmbientRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientRed_Obj[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientGreen_Obj[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientBlue_Obj[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientRed_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientGreen_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientBlue_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientRed_Obj_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientGreen_Obj_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nAmbientBlue_Obj_Bl[NUMHOURS][NUMWEATHERS]; +static float tmp_nDirectionalRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nDirectionalGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nDirectionalBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyTopRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyTopGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyTopBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyBottomRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyBottomGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nSkyBottomBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoreRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoreGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoreBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoronaRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoronaGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nSunCoronaBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_fSunSize[NUMHOURS][NUMWEATHERS]; +static float tmp_fSpriteSize[NUMHOURS][NUMWEATHERS]; +static float tmp_fSpriteBrightness[NUMHOURS][NUMWEATHERS]; +static float tmp_nShadowStrength[NUMHOURS][NUMWEATHERS]; +static float tmp_nLightShadowStrength[NUMHOURS][NUMWEATHERS]; +static float tmp_nPoleShadowStrength[NUMHOURS][NUMWEATHERS]; +static float tmp_fFogStart[NUMHOURS][NUMWEATHERS]; +static float tmp_fFarClip[NUMHOURS][NUMWEATHERS]; +static float tmp_fLightsOnGroundBrightness[NUMHOURS][NUMWEATHERS]; +static float tmp_nLowCloudsRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nLowCloudsGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nLowCloudsBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsTopRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsTopGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsTopBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsBottomRed[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsBottomGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_nFluffyCloudsBottomBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_fBlurRed[NUMHOURS][NUMWEATHERS]; +static float tmp_fBlurGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_fBlurBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_fWaterRed[NUMHOURS][NUMWEATHERS]; +static float tmp_fWaterGreen[NUMHOURS][NUMWEATHERS]; +static float tmp_fWaterBlue[NUMHOURS][NUMWEATHERS]; +static float tmp_fWaterAlpha[NUMHOURS][NUMWEATHERS]; + void CTimeCycle::Initialise(void) { @@ -171,7 +226,7 @@ CTimeCycle::Initialise(void) for(h = 0; h < NUMHOURS; h++){ li = 0; while(work_buff[bi] == '/' || work_buff[bi] == '\n' || - work_buff[bi] == '\0' || work_buff[bi] == ' ' || work_buff[bi] == '\r'){ + work_buff[bi] == '\0' || work_buff[bi] == '\r'){ while(work_buff[bi] != '\n' && work_buff[bi] != '\0' && work_buff[bi] != '\r') bi++; bi++; @@ -207,65 +262,180 @@ CTimeCycle::Initialise(void) &blurR, &blurG, &blurB, &waterR, &waterG, &waterB, &waterA); - m_nAmbientRed[h][w] = ambR; - m_nAmbientGreen[h][w] = ambG; - m_nAmbientBlue[h][w] = ambB; - m_nAmbientRed_Obj[h][w] = ambobjR; - m_nAmbientGreen_Obj[h][w] = ambobjG; - m_nAmbientBlue_Obj[h][w] = ambobjB; - m_nAmbientRed_Bl[h][w] = ambblR; - m_nAmbientGreen_Bl[h][w] = ambblG; - m_nAmbientBlue_Bl[h][w] = ambblB; - m_nAmbientRed_Obj_Bl[h][w] = ambobjblR; - m_nAmbientGreen_Obj_Bl[h][w] = ambobjblG; - m_nAmbientBlue_Obj_Bl[h][w] = ambobjblB; - m_nDirectionalRed[h][w] = dirR; - m_nDirectionalGreen[h][w] = dirG; - m_nDirectionalBlue[h][w] = dirB; - m_nSkyTopRed[h][w] = skyTopR; - m_nSkyTopGreen[h][w] = skyTopG; - m_nSkyTopBlue[h][w] = skyTopB; - m_nSkyBottomRed[h][w] = skyBotR; - m_nSkyBottomGreen[h][w] = skyBotG; - m_nSkyBottomBlue[h][w] = skyBotB; - m_nSunCoreRed[h][w] = sunCoreR; - m_nSunCoreGreen[h][w] = sunCoreG; - m_nSunCoreBlue[h][w] = sunCoreB; - m_nSunCoronaRed[h][w] = sunCoronaR; - m_nSunCoronaGreen[h][w] = sunCoronaG; - m_nSunCoronaBlue[h][w] = sunCoronaB; - m_fSunSize[h][w] = sunSz * 10.0f; - m_fSpriteSize[h][w] = sprSz * 10.0f; - m_fSpriteBrightness[h][w] = sprBght * 10.0f; - m_nShadowStrength[h][w] = shad; - m_nLightShadowStrength[h][w] = lightShad; - m_nPoleShadowStrength[h][w] = poleShad; - m_fFarClip[h][w] = farClp; - m_fFogStart[h][w] = fogSt; - m_fLightsOnGroundBrightness[h][w] = lightGnd * 10.0f; - m_nLowCloudsRed[h][w] = cloudR; - m_nLowCloudsGreen[h][w] = cloudG; - m_nLowCloudsBlue[h][w] = cloudB; - m_nFluffyCloudsTopRed[h][w] = fluffyTopR; - m_nFluffyCloudsTopGreen[h][w] = fluffyTopG; - m_nFluffyCloudsTopBlue[h][w] = fluffyTopB; - m_nFluffyCloudsBottomRed[h][w] = fluffyBotR; - m_nFluffyCloudsBottomGreen[h][w] = fluffyBotG; - m_nFluffyCloudsBottomBlue[h][w] = fluffyBotB; - m_fBlurRed[h][w] = blurR; - m_fBlurGreen[h][w] = blurG; - m_fBlurBlue[h][w] = blurB; - m_fWaterRed[h][w] = waterR; - m_fWaterGreen[h][w] = waterG; - m_fWaterBlue[h][w] = waterB; - m_fWaterAlpha[h][w] = waterA; + tmp_nAmbientRed[h][w] = ambR; + tmp_nAmbientGreen[h][w] = ambG; + tmp_nAmbientBlue[h][w] = ambB; + tmp_nAmbientRed_Obj[h][w] = ambobjR; + tmp_nAmbientGreen_Obj[h][w] = ambobjG; + tmp_nAmbientBlue_Obj[h][w] = ambobjB; + tmp_nAmbientRed_Bl[h][w] = ambblR; + tmp_nAmbientGreen_Bl[h][w] = ambblG; + tmp_nAmbientBlue_Bl[h][w] = ambblB; + tmp_nAmbientRed_Obj_Bl[h][w] = ambobjblR; + tmp_nAmbientGreen_Obj_Bl[h][w] = ambobjblG; + tmp_nAmbientBlue_Obj_Bl[h][w] = ambobjblB; + tmp_nDirectionalRed[h][w] = dirR; + tmp_nDirectionalGreen[h][w] = dirG; + tmp_nDirectionalBlue[h][w] = dirB; + tmp_nSkyTopRed[h][w] = skyTopR; + tmp_nSkyTopGreen[h][w] = skyTopG; + tmp_nSkyTopBlue[h][w] = skyTopB; + tmp_nSkyBottomRed[h][w] = skyBotR; + tmp_nSkyBottomGreen[h][w] = skyBotG; + tmp_nSkyBottomBlue[h][w] = skyBotB; + tmp_nSunCoreRed[h][w] = sunCoreR; + tmp_nSunCoreGreen[h][w] = sunCoreG; + tmp_nSunCoreBlue[h][w] = sunCoreB; + tmp_nSunCoronaRed[h][w] = sunCoronaR; + tmp_nSunCoronaGreen[h][w] = sunCoronaG; + tmp_nSunCoronaBlue[h][w] = sunCoronaB; + if(sunSz == -1) + tmp_fSunSize[h][w] = -1; + else + tmp_fSunSize[h][w] = sunSz * 10.0f; + if(sprSz == -1) + tmp_fSpriteSize[h][w] = -1; + else + tmp_fSpriteSize[h][w] = sprSz * 10.0f; + if(sprBght == -1) + tmp_fSpriteBrightness[h][w] = -1; + else + tmp_fSpriteBrightness[h][w] = sprBght * 10.0f; + tmp_nShadowStrength[h][w] = shad; + tmp_nLightShadowStrength[h][w] = lightShad; + tmp_nPoleShadowStrength[h][w] = poleShad; + tmp_fFarClip[h][w] = farClp; + tmp_fFogStart[h][w] = fogSt; + if(lightGnd == -1) + tmp_fLightsOnGroundBrightness[h][w] = -1; + else + tmp_fLightsOnGroundBrightness[h][w] = lightGnd * 10.0f; + tmp_nLowCloudsRed[h][w] = cloudR; + tmp_nLowCloudsGreen[h][w] = cloudG; + tmp_nLowCloudsBlue[h][w] = cloudB; + tmp_nFluffyCloudsTopRed[h][w] = fluffyTopR; + tmp_nFluffyCloudsTopGreen[h][w] = fluffyTopG; + tmp_nFluffyCloudsTopBlue[h][w] = fluffyTopB; + tmp_nFluffyCloudsBottomRed[h][w] = fluffyBotR; + tmp_nFluffyCloudsBottomGreen[h][w] = fluffyBotG; + tmp_nFluffyCloudsBottomBlue[h][w] = fluffyBotB; + tmp_fBlurRed[h][w] = blurR; + tmp_fBlurGreen[h][w] = blurG; + tmp_fBlurBlue[h][w] = blurB; + tmp_fWaterRed[h][w] = waterR; + tmp_fWaterGreen[h][w] = waterG; + tmp_fWaterBlue[h][w] = waterB; + tmp_fWaterAlpha[h][w] = waterA; } + UpdateArrays(); + m_FogReduction = 0; debug("CTimeCycle ready\n"); } +template<typename T> void +FillGaps(T (*out)[NUMWEATHERS], float (*in)[NUMWEATHERS]) +{ + int w; + for(w = 0; w < NUMWEATHERS; w++){ + for(int h = 0; h < NUMHOURS; h++) + out[h][w] = in[h][w]; + +#define NEXT(h) (((h)+1)%NUMHOURS) +#define PREV(h) (((h)+NUMHOURS-1)%NUMHOURS) + int hend, h1, h2; + for(hend = 0; hend < NUMHOURS; hend++) + if(in[hend][w] != -1.0f) + goto foundstart; + return; // this should never happen +foundstart: + // Found the start of a block of filled in entries + for(h1 = NEXT(hend); h1 != hend; h1 = h2){ + // Skip filled in entries + for(; h1 != hend; h1 = NEXT(h1)) + if(in[h1][w] == -1.0f) + goto foundfirst; + break; // all filled in already +foundfirst: + // h1 is now the first -1 after n filled in values + for(h2 = NEXT(h1); ; h2 = NEXT(h2)) + if(in[h2][w] != -1.0f) + goto foundlast; + break; +foundlast: + // h2 is now the first entry after a row of -1s + h1 = PREV(h1); // make h1 the first before a row of -1s + int n = (h2-h1 + NUMHOURS) % NUMHOURS; + if(n == 0) n = NUMHOURS; // can't happen + float step = (in[h2][w] - in[h1][w])/n; + + for(int i = 1; i < n; i++){ + float f = (float)i/n; + out[(h1+i)%NUMHOURS][w] = in[h2][w]*f + in[h1][w]*(1.0f-f); + } + } + } +} + +void +CTimeCycle::UpdateArrays(void) +{ + FillGaps(m_nAmbientRed, tmp_nAmbientRed); + FillGaps(m_nAmbientGreen, tmp_nAmbientGreen); + FillGaps(m_nAmbientBlue, tmp_nAmbientBlue); + FillGaps(m_nAmbientRed_Obj, tmp_nAmbientRed_Obj); + FillGaps(m_nAmbientGreen_Obj, tmp_nAmbientGreen_Obj); + FillGaps(m_nAmbientBlue_Obj, tmp_nAmbientBlue_Obj); + FillGaps(m_nAmbientRed_Bl, tmp_nAmbientRed_Bl); + FillGaps(m_nAmbientGreen_Bl, tmp_nAmbientGreen_Bl); + FillGaps(m_nAmbientBlue_Bl, tmp_nAmbientBlue_Bl); + FillGaps(m_nAmbientRed_Obj_Bl, tmp_nAmbientRed_Obj_Bl); + FillGaps(m_nAmbientGreen_Obj_Bl, tmp_nAmbientGreen_Obj_Bl); + FillGaps(m_nAmbientBlue_Obj_Bl, tmp_nAmbientBlue_Obj_Bl); + FillGaps(m_nDirectionalRed, tmp_nDirectionalRed); + FillGaps(m_nDirectionalGreen, tmp_nDirectionalGreen); + FillGaps(m_nDirectionalBlue, tmp_nDirectionalBlue); + FillGaps(m_nSkyTopRed, tmp_nSkyTopRed); + FillGaps(m_nSkyTopGreen, tmp_nSkyTopGreen); + FillGaps(m_nSkyTopBlue, tmp_nSkyTopBlue); + FillGaps(m_nSkyBottomRed, tmp_nSkyBottomRed); + FillGaps(m_nSkyBottomGreen, tmp_nSkyBottomGreen); + FillGaps(m_nSkyBottomBlue, tmp_nSkyBottomBlue); + FillGaps(m_nSunCoreRed, tmp_nSunCoreRed); + FillGaps(m_nSunCoreGreen, tmp_nSunCoreGreen); + FillGaps(m_nSunCoreBlue, tmp_nSunCoreBlue); + FillGaps(m_nSunCoronaRed, tmp_nSunCoronaRed); + FillGaps(m_nSunCoronaGreen, tmp_nSunCoronaGreen); + FillGaps(m_nSunCoronaBlue, tmp_nSunCoronaBlue); + FillGaps(m_fSunSize, tmp_fSunSize); + FillGaps(m_fSpriteSize, tmp_fSpriteSize); + FillGaps(m_fSpriteBrightness, tmp_fSpriteBrightness); + FillGaps(m_nShadowStrength, tmp_nShadowStrength); + FillGaps(m_nLightShadowStrength, tmp_nLightShadowStrength); + FillGaps(m_nPoleShadowStrength, tmp_nPoleShadowStrength); + FillGaps(m_fFogStart, tmp_fFogStart); + FillGaps(m_fFarClip, tmp_fFarClip); + FillGaps(m_fLightsOnGroundBrightness, tmp_fLightsOnGroundBrightness); + FillGaps(m_nLowCloudsRed, tmp_nLowCloudsRed); + FillGaps(m_nLowCloudsGreen, tmp_nLowCloudsGreen); + FillGaps(m_nLowCloudsBlue, tmp_nLowCloudsBlue); + FillGaps(m_nFluffyCloudsTopRed, tmp_nFluffyCloudsTopRed); + FillGaps(m_nFluffyCloudsTopGreen, tmp_nFluffyCloudsTopGreen); + FillGaps(m_nFluffyCloudsTopBlue, tmp_nFluffyCloudsTopBlue); + FillGaps(m_nFluffyCloudsBottomRed, tmp_nFluffyCloudsBottomRed); + FillGaps(m_nFluffyCloudsBottomGreen, tmp_nFluffyCloudsBottomGreen); + FillGaps(m_nFluffyCloudsBottomBlue, tmp_nFluffyCloudsBottomBlue); + FillGaps(m_fBlurRed, tmp_fBlurRed); + FillGaps(m_fBlurGreen, tmp_fBlurGreen); + FillGaps(m_fBlurBlue, tmp_fBlurBlue); + FillGaps(m_fWaterRed, tmp_fWaterRed); + FillGaps(m_fWaterGreen, tmp_fWaterGreen); + FillGaps(m_fWaterBlue, tmp_fWaterBlue); + FillGaps(m_fWaterAlpha, tmp_fWaterAlpha); +} + static float interp_c0, interp_c1, interp_c2, interp_c3; float CTimeCycle::Interpolate(int8 *a, int8 *b) diff --git a/src/renderer/Timecycle.h b/src/renderer/Timecycle.h index da911b75..d8c333f6 100644 --- a/src/renderer/Timecycle.h +++ b/src/renderer/Timecycle.h @@ -185,6 +185,7 @@ public: static int32 GetWaterAlpha(void) { return m_fCurrentWaterAlpha; } static void Initialise(void); + static void UpdateArrays(void); static void Update(void); static float Interpolate(int8 *a, int8 *b); static float Interpolate(uint8 *a, uint8 *b); diff --git a/src/renderer/WaterCannon.cpp b/src/renderer/WaterCannon.cpp index 4976f8a3..4aaa8d6f 100644 --- a/src/renderer/WaterCannon.cpp +++ b/src/renderer/WaterCannon.cpp @@ -13,6 +13,16 @@ #include "Camera.h" #include "Particle.h" +// --LCS: file done + +#ifdef PSP_WATERCANNON + //PSP: + #define WATER_COLOR 255 +#else + //PS2: + #define WATER_COLOR 127 +#endif + #define WATERCANNONVERTS 4 #define WATERCANNONINDEXES 12 @@ -115,23 +125,33 @@ void CWaterCannon::Update_NewInput(CVector *pos, CVector *dir) m_abUsed[m_nCur] = true; } +static float fWaterCannonU = 0.0f; void CWaterCannon::Render(void) { + extern RwRaster *gpFireHoseRaster; + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void *)TRUE); - RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void *)gpWaterRaster); + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void *)gpFireHoseRaster); - float v = float(CGeneral::GetRandomNumber() & 255) / 256; - - RwIm3DVertexSetV(&WaterCannonVertices[0], v); - RwIm3DVertexSetV(&WaterCannonVertices[1], v); - RwIm3DVertexSetV(&WaterCannonVertices[2], v); - RwIm3DVertexSetV(&WaterCannonVertices[3], v); + fWaterCannonU += CTimer::GetTimeStepInSeconds() * 6.0f; - int16 pointA = m_nCur % NUM_SEGMENTPOINTS; + while ( fWaterCannonU >= 1.0f ) + fWaterCannonU -= 1.0f; + RwIm3DVertexSetU(&WaterCannonVertices[0], -fWaterCannonU); + RwIm3DVertexSetV(&WaterCannonVertices[0], 0.0f); + RwIm3DVertexSetU(&WaterCannonVertices[1], -fWaterCannonU); + RwIm3DVertexSetV(&WaterCannonVertices[1], 1.0f); + RwIm3DVertexSetU(&WaterCannonVertices[2], 1.0f - fWaterCannonU); + RwIm3DVertexSetV(&WaterCannonVertices[2], 0.0f); + RwIm3DVertexSetU(&WaterCannonVertices[3], 1.0f - fWaterCannonU); + RwIm3DVertexSetV(&WaterCannonVertices[3], 1.0f); + + int16 pointA = m_nCur % NUM_SEGMENTPOINTS; int16 pointB = pointA - 1; + int16 pointC = pointA; if ( pointB < 0 ) pointB += NUM_SEGMENTPOINTS; @@ -142,6 +162,10 @@ void CWaterCannon::Render(void) { if ( m_abUsed[pointA] && m_abUsed[pointB] ) { + bool bFirst = false; + if ( i == 0 || m_abUsed[pointA] && !m_abUsed[pointC] ) + bFirst = true; + if ( !bInit ) { CVector cp = CrossProduct(m_avecPos[pointB] - m_avecPos[pointA], TheCamera.GetForward()); @@ -149,26 +173,25 @@ void CWaterCannon::Render(void) bInit = true; } - float dist = float(i*i*i) / 300.0f + 1.0f; float brightness = float(i) / NUM_SEGMENTPOINTS; - int32 color = (int32)((1.0f - brightness*brightness) * 255.0f); - CVector offset = dist * norm; - RwIm3DVertexSetRGBA(&WaterCannonVertices[0], color, color, color, color); + CVector offset = (float(i)+1.0f) * norm; + + RwIm3DVertexSetRGBA(&WaterCannonVertices[0], WATER_COLOR, WATER_COLOR, WATER_COLOR, bFirst ? 0 : color); RwIm3DVertexSetPos (&WaterCannonVertices[0], m_avecPos[pointA].x - offset.x, m_avecPos[pointA].y - offset.y, m_avecPos[pointA].z - offset.z); - RwIm3DVertexSetRGBA(&WaterCannonVertices[1], color, color, color, color); + RwIm3DVertexSetRGBA(&WaterCannonVertices[1], WATER_COLOR, WATER_COLOR, WATER_COLOR, bFirst ? 0 : color); RwIm3DVertexSetPos (&WaterCannonVertices[1], m_avecPos[pointA].x + offset.x, m_avecPos[pointA].y + offset.y, m_avecPos[pointA].z + offset.z); - RwIm3DVertexSetRGBA(&WaterCannonVertices[2], color, color, color, color); + offset = (float(i+1)+1.0f) * norm; + + RwIm3DVertexSetRGBA(&WaterCannonVertices[2], WATER_COLOR, WATER_COLOR, WATER_COLOR, color); RwIm3DVertexSetPos (&WaterCannonVertices[2], m_avecPos[pointB].x - offset.x, m_avecPos[pointB].y - offset.y, m_avecPos[pointB].z - offset.z); - RwIm3DVertexSetRGBA(&WaterCannonVertices[3], color, color, color, color); + RwIm3DVertexSetRGBA(&WaterCannonVertices[3], WATER_COLOR, WATER_COLOR, WATER_COLOR, color); RwIm3DVertexSetPos (&WaterCannonVertices[3], m_avecPos[pointB].x + offset.x, m_avecPos[pointB].y + offset.y, m_avecPos[pointB].z + offset.z); - LittleTest(); - if ( RwIm3DTransform(WaterCannonVertices, WATERCANNONVERTS, NULL, rwIM3D_VERTEXUV) ) { RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, WaterCannonIndexList, WATERCANNONINDEXES); @@ -176,6 +199,7 @@ void CWaterCannon::Render(void) } } + pointC = pointA; pointA = pointB--; if ( pointB < 0 ) pointB += NUM_SEGMENTPOINTS; diff --git a/src/renderer/WaterCannon.h b/src/renderer/WaterCannon.h index a37bdd12..5b60639c 100644 --- a/src/renderer/WaterCannon.h +++ b/src/renderer/WaterCannon.h @@ -14,6 +14,7 @@ public: int32 m_nId; int16 m_nCur; uint32 m_nTimeCreated; + int32 field_C; CVector m_avecPos[NUM_SEGMENTPOINTS]; CVector m_avecVelocity[NUM_SEGMENTPOINTS]; bool m_abUsed[NUM_SEGMENTPOINTS]; @@ -25,7 +26,7 @@ public: void PushPeds(void); }; -VALIDATE_SIZE(CWaterCannon, 412); +VALIDATE_SIZE(CWaterCannon, 0x1A0); class CWaterCannons { diff --git a/src/renderer/WaterCreatures.cpp b/src/renderer/WaterCreatures.cpp index 92fb74ee..4c6c92a6 100644 --- a/src/renderer/WaterCreatures.cpp +++ b/src/renderer/WaterCreatures.cpp @@ -8,6 +8,7 @@ #include "General.h" #include "Object.h" +/* int CWaterCreatures::nNumActiveSeaLifeForms; CWaterCreature CWaterCreatures::aWaterCreatures[NUM_WATER_CREATURES]; @@ -272,4 +273,5 @@ void CWaterCreatures::RemoveAll() { nNumActiveSeaLifeForms--; } } -}
\ No newline at end of file +} +*/
\ No newline at end of file diff --git a/src/renderer/WaterCreatures.h b/src/renderer/WaterCreatures.h index 32754a10..099cc1a4 100644 --- a/src/renderer/WaterCreatures.h +++ b/src/renderer/WaterCreatures.h @@ -2,6 +2,7 @@ class CObject; +/* enum eFishSlotState { WATER_CREATURE_INIT = 0, WATER_CREATURE_ACTIVE, @@ -46,4 +47,4 @@ struct WaterCreatureProperties { float fLevel; float fUnknown; //unused float fWaterDepth; -};
\ No newline at end of file +};*/
\ No newline at end of file diff --git a/src/renderer/WaterLevel.cpp b/src/renderer/WaterLevel.cpp index dee60d66..a241ac9f 100644 --- a/src/renderer/WaterLevel.cpp +++ b/src/renderer/WaterLevel.cpp @@ -1176,13 +1176,13 @@ CWaterLevel::RenderWater() if ( WavesCalculatedThisFrame ) { RenderSeaBirds(); - RenderShipsOnHorizon(); - CParticle::HandleShipsAtHorizonStuff(); - HandleBeachToysStuff(); + //RenderShipsOnHorizon(); + //CParticle::HandleShipsAtHorizonStuff(); + //HandleBeachToysStuff(); } - if ( _bSeaLife ) - HandleSeaLifeForms(); + //if ( _bSeaLife ) + // HandleSeaLifeForms(); DefinedState(); } @@ -3110,6 +3110,7 @@ CWaterLevel::RenderShipsOnHorizon() } } +/* void CWaterLevel::HandleSeaLifeForms() { @@ -3150,7 +3151,7 @@ CWaterLevel::HandleSeaLifeForms() } CWaterCreatures::UpdateAll(); -} +}*/ void CWaterLevel::HandleBeachToysStuff(void) diff --git a/src/renderer/WaterLevel.h b/src/renderer/WaterLevel.h index 6d6614d8..d12fb9f6 100644 --- a/src/renderer/WaterLevel.h +++ b/src/renderer/WaterLevel.h @@ -1,6 +1,6 @@ #pragma once -#define WATER_X_OFFSET (400.0f) +#define WATER_X_OFFSET (0.0f) #define WATER_Z_OFFSET (0.5f) diff --git a/src/renderer/Weather.cpp b/src/renderer/Weather.cpp index 9f925a8c..7358654c 100644 --- a/src/renderer/Weather.cpp +++ b/src/renderer/Weather.cpp @@ -49,6 +49,11 @@ float CWeather::WindClipped; float CWeather::TrafficLightBrightness; 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]; @@ -323,6 +328,7 @@ void CWeather::Update(void) void CWeather::AddHeatHaze() { + /* if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED) return; @@ -334,6 +340,7 @@ void CWeather::AddHeatHaze() pos.y = CGeneral::GetRandomNumberInRange(SCREEN_HEIGHT*0.4f, SCREEN_HEIGHT*0.9f); pos.z = 100.0f; CParticle::AddParticle(PARTICLE_HEATHAZE_IN_DIST, pos, CVector(0.0f, 0.0f, 0.0f)); + */ } void CWeather::AddBeastie() @@ -646,6 +653,26 @@ void CWeather::RenderRainStreaks(void) 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; +} + #ifdef SECUROM void CWeather::ForceHurricaneWeather() { diff --git a/src/renderer/Weather.h b/src/renderer/Weather.h index bda57d55..0e7cf9bd 100644 --- a/src/renderer/Weather.h +++ b/src/renderer/Weather.h @@ -42,6 +42,11 @@ public: static float TrafficLightBrightness; 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 Update(void); @@ -57,6 +62,8 @@ public: static void AddBeastie(); static void ForceHurricaneWeather(); + static void StoreWeatherState(); + static void RestoreWeatherState(); }; enum { diff --git a/src/rw/Lights.cpp b/src/rw/Lights.cpp index 772e1961..5f8ba823 100644 --- a/src/rw/Lights.cpp +++ b/src/rw/Lights.cpp @@ -24,12 +24,7 @@ RwRGBAReal DirectionalLightColourForFrame; RwRGBAReal AmbientLightColour; RwRGBAReal DirectionalLightColour; -#ifdef EXTENDED_COLOURFILTER -#include "postfx.h" -#define USEBLURCOLORS CPostFX::UseBlurColours() -#else -#define USEBLURCOLORS CMBlur::BlurOn -#endif +#define USEBLURCOLORS true // actually CMBlur::BlurOn, but that's always supposed to be on void SetLightsWithTimeOfDayColour(RpWorld *) diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index 69f57933..6021b866 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -18,7 +18,7 @@ bool gPS2alphaTest = true; #else bool gPS2alphaTest = false; #endif -bool gBackfaceCulling = true; +bool gBackfaceCulling = false; // can we ever enable this in LCS even? #if !defined(FINAL) || defined(DEBUGMENU) static bool charsetOpen; diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index 1f96180b..ddb178e2 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -321,11 +321,7 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text) splash->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, 255)); CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), SCREEN_SCALE_FROM_RIGHT(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(64, 64, 64, 255)); -#ifdef FIX_BUGS - CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), (SCREEN_SCALE_FROM_RIGHT(200.0f) - SCREEN_SCALE_X(200.0f)) * ((float)num / (float)count) + SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(255, 150, 225, 255)); -#else - CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), (SCREEN_SCALE_FROM_RIGHT(200.0f) - SCREEN_SCALE_X(200.0f)) * ((float)num / (float)count) + SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(255, 217, 106, 255)); -#endif + CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), (SCREEN_SCALE_FROM_RIGHT(200.0f) - SCREEN_SCALE_X(200.0f)) * ((float)num / (float)count) + SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(97, 194, 247, 255)); CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_HEIGHT - SCREEN_SCALE_Y(220.0f)), CRGBA(50, 50, 50, 210)); CFont::SetBackgroundOff(); @@ -334,11 +330,7 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text) CFont::SetCentreOff(); CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f)); CFont::SetJustifyOff(); -#ifdef FIX_BUGS - CFont::SetColor(CRGBA(255, 150, 225, 255)); -#else - CFont::SetColor(CRGBA(255, 217, 106, 255)); -#endif + CFont::SetColor(CRGBA(115, 173, 216, 255)); CFont::SetBackGroundOnlyTextOff(); CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString(SCREEN_SCALE_X(170.0f), SCREEN_SCALE_Y(160.0f), TheText.Get(text)); diff --git a/src/rw/TxdStore.cpp b/src/rw/TxdStore.cpp index 0bd29718..b7936bcf 100644 --- a/src/rw/TxdStore.cpp +++ b/src/rw/TxdStore.cpp @@ -1,5 +1,7 @@ #include "common.h" +#include "main.h" +#include "smallHeap.h" #include "templates.h" #include "General.h" #include "Streaming.h" @@ -9,13 +11,19 @@ CPool<TxdDef,TxdDef> *CTxdStore::ms_pTxdPool; RwTexDictionary *CTxdStore::ms_pStoredTxd; +// LCS: file done except unused: +// CTexListStore::RemoveTexListChunk(int) +// CTexListStore::validateRefs(void) +// CTexListStore::Write(base::cRelocatableChunkWriter &) + void CTxdStore::Initialise(void) { - if(ms_pTxdPool == nil) + if(gMakeResources && ms_pTxdPool == nil) ms_pTxdPool = new CPool<TxdDef,TxdDef>(TXDSTORESIZE, "TexDictionary"); } +// removed in LCS but we should probably keep it void CTxdStore::Shutdown(void) { @@ -23,6 +31,7 @@ CTxdStore::Shutdown(void) delete ms_pTxdPool; } +// removed in LCS but we should probably keep it void CTxdStore::GameShutdown(void) { @@ -42,6 +51,7 @@ CTxdStore::AddTxdSlot(const char *name) assert(def); def->texDict = nil; def->refCount = 0; + def->refCountGu = 0; strcpy(def->name, name); return ms_pTxdPool->GetJustIndex(def); } @@ -95,7 +105,11 @@ CTxdStore::SetCurrentTxd(int slot) void CTxdStore::Create(int slot) { - GetSlot(slot)->texDict = RwTexDictionaryCreate(); + TxdDef *def = GetSlot(slot); + def->texDict = RwTexDictionaryCreate(); + // LCS: mobile sets the txd name here, but txds don't really have names + def->refCount = 0; + def->refCountGu = 0; } int @@ -111,6 +125,20 @@ CTxdStore::AddRef(int slot) } void +CTxdStore::AddRefEvenIfNotInMemory(int slot) +{ + GetSlot(slot)->refCount++; +} + +void +CTxdStore::AddRefGu(int slot) +{ + TxdDef *def = GetSlot(slot); + def->refCount++; + def->refCountGu++; +} + +void CTxdStore::RemoveRef(int slot) { if(--GetSlot(slot)->refCount <= 0) @@ -118,6 +146,15 @@ CTxdStore::RemoveRef(int slot) } void +CTxdStore::RemoveRefGu(int slot) +{ + TxdDef *def = GetSlot(slot); + def->refCount--; + if(gUseChunkFiles) + def->refCountGu--; +} + +void CTxdStore::RemoveRefWithoutDelete(int slot) { GetSlot(slot)->refCount--; @@ -128,15 +165,32 @@ CTxdStore::LoadTxd(int slot, RwStream *stream) { TxdDef *def = GetSlot(slot); - if(RwStreamFindChunk(stream, rwID_TEXDICTIONARY, nil, nil)){ - def->texDict = RwTexDictionaryGtaStreamRead(stream); - return def->texDict != nil; + if(stream){ + if(RwStreamFindChunk(stream, rwID_TEXDICTIONARY, nil, nil)){ + def->texDict = RwTexDictionaryGtaStreamRead(stream); + return def->texDict != nil; + } + }else{ + // TODO(LCS)? fall back reading from file } printf("Failed to load TXD\n"); return false; } bool +CTxdStore::LoadTxd(int slot, void *data, void *chunk) +{ + TxdDef *def = GetSlot(slot); + def->texDict = (RwTexDictionary*)data; + if(strncasecmp(def->name, "radar", 5) == 0){ + def->refCount = 0; + def->refCountGu = 0; + } + CStreaming::RegisterPointer(&def->texDict, 3, true); + return def->texDict != nil; +} + +bool CTxdStore::LoadTxd(int slot, const char *filename) { RwStream *stream; @@ -152,6 +206,7 @@ CTxdStore::LoadTxd(int slot, const char *filename) return ret; } +// removed in LCS but we should probably keep it bool CTxdStore::StartLoadTxd(int slot, RwStream *stream) { @@ -165,6 +220,7 @@ CTxdStore::StartLoadTxd(int slot, RwStream *stream) } } +// removed in LCS but we should probably keep it bool CTxdStore::FinishLoadTxd(int slot, RwStream *stream) { @@ -174,10 +230,31 @@ CTxdStore::FinishLoadTxd(int slot, RwStream *stream) } void -CTxdStore::RemoveTxd(int slot) +CTxdStore::RemoveTxd(int slot, bool notChunk) { TxdDef *def = GetSlot(slot); - if(def->texDict) - RwTexDictionaryDestroy(def->texDict); + if(def->texDict){ + if(!gUseChunkFiles || notChunk) + RwTexDictionaryDestroy(def->texDict); + else{ + // TODO? Rsl3D specific: RslTextureDestroyDispList for all textures + CStreaming::UnregisterPointer(&def->texDict, 3); + cSmallHeap::msInstance.Free(def->texDict); + } + } def->texDict = nil; + def->refCount = 0; + def->refCountGu = 0; +} + +void +CTxdStore::Load(RwTexDictionary *stored, CPool<TxdDef> *pool) +{ + ms_pTxdPool = pool; + ms_pStoredTxd = stored; + for(int i = 0; i < TXDSTORESIZE; i++){ + TxdDef *def = GetSlot(i); + if(def) + def->refCount = def->texDict != nil; + } } diff --git a/src/rw/TxdStore.h b/src/rw/TxdStore.h index 937fd1b7..31fcf87f 100644 --- a/src/rw/TxdStore.h +++ b/src/rw/TxdStore.h @@ -4,7 +4,8 @@ struct TxdDef { RwTexDictionary *texDict; - int refCount; + int16 refCount; + int16 refCountGu; char name[20]; }; @@ -26,13 +27,19 @@ public: static void Create(int slot); static int GetNumRefs(int slot); static void AddRef(int slot); + static void AddRefEvenIfNotInMemory(int slot); + static void AddRefGu(int slot); static void RemoveRef(int slot); + static void RemoveRefGu(int slot); static void RemoveRefWithoutDelete(int slot); static bool LoadTxd(int slot, RwStream *stream); + static bool LoadTxd(int slot, void *data, void *chunk); static bool LoadTxd(int slot, const char *filename); static bool StartLoadTxd(int slot, RwStream *stream); static bool FinishLoadTxd(int slot, RwStream *stream); - static void RemoveTxd(int slot); + static void RemoveTxd(int slot, bool notChunk = false); + + static void Load(RwTexDictionary *stored, CPool<TxdDef> *pool); static TxdDef *GetSlot(int slot) { assert(slot >= 0); diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 01db546c..ffd7b18a 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -267,6 +267,7 @@ CVisibilityPlugins::RenderWheelAtomicCB(RpAtomic *atomic) mi = GetAtomicModelInfo(atomic); len = Sqrt(DistToCameraSq); + len *= 0.5f; // HACK HACK, LOD wheels look shite lodatm = mi->GetAtomicFromDistance(len * TheCamera.LODDistMultiplier / VEHICLE_LODDIST_MULTIPLIER); if(lodatm){ if(RpAtomicGetGeometry(lodatm) != RpAtomicGetGeometry(atomic)) @@ -466,6 +467,14 @@ CVisibilityPlugins::RenderVehicleHiDetailCB_Boat(RpAtomic *atomic) } RpAtomic* +CVisibilityPlugins::RenderVehicleHiDetailCB_Boat_Far(RpAtomic *atomic) +{ + if(DistToCameraSq < ms_bigVehicleLod1Dist) + RENDERCALLBACK(atomic); + return atomic; +} + +RpAtomic* CVisibilityPlugins::RenderVehicleHiDetailAlphaCB_Boat(RpAtomic *atomic) { if(DistToCameraSq < ms_vehicleLod0Dist){ @@ -496,6 +505,23 @@ CVisibilityPlugins::RenderVehicleLoDetailCB_Boat(RpAtomic *atomic) } RpAtomic* +CVisibilityPlugins::RenderVehicleLoDetailCB_Boat_Far(RpAtomic *atomic) +{ + RpClump *clump; + int32 alpha; + + clump = RpAtomicGetClump(atomic); + if(DistToCameraSq >= ms_bigVehicleLod1Dist){ + alpha = GetClumpAlpha(clump); + if(alpha == 255) + RENDERCALLBACK(atomic); + else + RenderAlphaAtomic(atomic, alpha); + } + return atomic; +} + +RpAtomic* CVisibilityPlugins::RenderVehicleLowDetailCB_BigVehicle(RpAtomic *atomic) { RwFrame *clumpframe; @@ -653,8 +679,9 @@ CVisibilityPlugins::RenderVehicleTailRotorAlphaCB(RpAtomic *atomic) RpAtomic* CVisibilityPlugins::RenderPlayerCB(RpAtomic *atomic) { - if(CWorld::Players[0].m_pSkinTexture) - RpGeometryForAllMaterials(RpAtomicGetGeometry(atomic), SetTextureCB, CWorld::Players[0].m_pSkinTexture); +// LCS: removed +// if(CWorld::Players[0].m_pSkinTexture) +// RpGeometryForAllMaterials(RpAtomicGetGeometry(atomic), SetTextureCB, CWorld::Players[0].m_pSkinTexture); RENDERCALLBACK(atomic); return atomic; } @@ -800,9 +827,9 @@ CVisibilityPlugins::PluginAttach(void) return ms_atomicPluginOffset != -1 && ms_clumpPluginOffset != -1; } -#define ATOMICEXT(o) (RWPLUGINOFFSET(AtomicExt, o, ms_atomicPluginOffset)) -#define FRAMEEXT(o) (RWPLUGINOFFSET(FrameExt, o, ms_framePluginOffset)) -#define CLUMPEXT(o) (RWPLUGINOFFSET(ClumpExt, o, ms_clumpPluginOffset)) +#define ATOMICEXT(o) (RWPLUGINOFFSET(CVisibilityPlugins::AtomicExt, o, CVisibilityPlugins::ms_atomicPluginOffset)) +#define FRAMEEXT(o) (RWPLUGINOFFSET(CVisibilityPlugins::FrameExt, o, CVisibilityPlugins::ms_framePluginOffset)) +#define CLUMPEXT(o) (RWPLUGINOFFSET(CVisibilityPlugins::ClumpExt, o, CVisibilityPlugins::ms_clumpPluginOffset)) // // Atomic @@ -812,6 +839,7 @@ void* CVisibilityPlugins::AtomicConstructor(void *object, int32, int32) { ATOMICEXT(object)->modelInfo = nil; + ATOMICEXT(object)->distanceAlpha = 255; return object; } @@ -964,3 +992,56 @@ CVisibilityPlugins::GetClumpAlpha(RpClump *clump) { return CLUMPEXT(clump)->alpha; } + +// LCS walks the atomic list manually but we want to be compatible with both RW and librw, +// so this code isn't quite original and uses callbacks instead. +static RpAtomic* +SetAtomicDistanceAlphaCB(RpAtomic *atomic, void *data) +{ + ATOMICEXT(atomic)->distanceAlpha = *(int*)data; + return atomic; +} +void +CVisibilityPlugins::SetClumpDistanceAlpha(RpClump *clump, int alpha) +{ + RpClumpForAllAtomics(clump, SetAtomicDistanceAlphaCB, &alpha); +} + +static RpAtomic* +GetAtomicDistanceAlphaCB(RpAtomic *atomic, void *data) +{ + *(int*)data = ATOMICEXT(atomic)->distanceAlpha; + return atomic; +} +int +CVisibilityPlugins::GetClumpDistanceAlpha(RpClump *clump) +{ + int alpha = 255; + RpClumpForAllAtomics(clump, GetAtomicDistanceAlphaCB, &alpha); + return alpha; +} + + + + +void +CVisibilityPlugins::SetObjectDistanceAlpha(RwObject *object, int alpha) +{ + if(object == nil) + return; + if(RwObjectGetType(object) == rpATOMIC) + ATOMICEXT(object)->distanceAlpha = alpha; + else + SetClumpDistanceAlpha((RpClump*)object, alpha); +} + +int +CVisibilityPlugins::GetObjectDistanceAlpha(RwObject *object) +{ + if(object == nil) + return 255; + if(RwObjectGetType(object) == rpATOMIC) + return ATOMICEXT(object)->distanceAlpha; + else + return GetClumpDistanceAlpha((RpClump*)object); +} diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index d375044b..3a3e555b 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -61,7 +61,9 @@ public: static RpAtomic *RenderVehicleHiDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailCB_Boat(RpAtomic *atomic); static RpAtomic *RenderVehicleHiDetailAlphaCB_Boat(RpAtomic *atomic); + static RpAtomic *RenderVehicleHiDetailCB_Boat_Far(RpAtomic *atomic); static RpAtomic *RenderVehicleLoDetailCB_Boat(RpAtomic *atomic); + static RpAtomic *RenderVehicleLoDetailCB_Boat_Far(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleLowDetailAlphaCB_BigVehicle(RpAtomic *atomic); static RpAtomic *RenderVehicleReallyLowDetailCB(RpAtomic *atomic); @@ -95,10 +97,13 @@ public: // RW Plugins // - union AtomicExt + struct AtomicExt { - CSimpleModelInfo *modelInfo; // used by SimpleModelInfo - int flags; // used by ClumpModelInfo + union { + CSimpleModelInfo *modelInfo; // used by SimpleModelInfo + int flags; // used by ClumpModelInfo + }; + int distanceAlpha; // not sure where this is in PS2/PSP LCS }; static void SetAtomicModelInfo(RpAtomic*, CSimpleModelInfo*); static CSimpleModelInfo *GetAtomicModelInfo(RpAtomic *atomic); @@ -135,6 +140,8 @@ public: static void SetClumpModelInfo(RpClump*, CClumpModelInfo*); static void SetClumpAlpha(RpClump*, int); static int GetClumpAlpha(RpClump*); + static void SetClumpDistanceAlpha(RpClump*, int); + static int GetClumpDistanceAlpha(RpClump*); static void *ClumpConstructor(void *object, int32 offset, int32 len); static void *ClumpDestructor(void *object, int32 offset, int32 len); @@ -142,6 +149,9 @@ public: int32 offset, int32 len); static int32 ms_clumpPluginOffset; + static void SetObjectDistanceAlpha(RwObject *object, int alpha); + static int GetObjectDistanceAlpha(RwObject *object); + static bool PluginAttach(void); }; diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index dec84c9e..d2fbb9b0 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -42,7 +42,7 @@ #include "Fluff.h" #define BLOCK_COUNT 22 -#define SIZE_OF_SIMPLEVARS 0xE4 +#define SIZE_OF_SIMPLEVARS 0xE8 const uint32 SIZE_OF_ONE_GAME_IN_BYTES = 201729; @@ -181,7 +181,7 @@ GenericSave(int file) WriteDataToBufferPointer(buf, CClock::ms_nGameClockMinutes); currPad = CPad::GetPad(0); WriteDataToBufferPointer(buf, currPad->Mode); - WriteDataToBufferPointer(buf, CTimer::m_snTimeInMilliseconds); + //WriteDataToBufferPointer(buf, CTimer::m_snTimeInMilliseconds); WriteDataToBufferPointer(buf, CTimer::ms_fTimeScale); WriteDataToBufferPointer(buf, CTimer::ms_fTimeStep); WriteDataToBufferPointer(buf, CTimer::ms_fTimeStepNonClipped); @@ -213,7 +213,7 @@ GenericSave(int file) WriteDataToBufferPointer(buf, CTimeCycle::m_ExtraColourInter); PopulateRadioStationPositionList(); WriteDataToBufferPointer(buf, RadioStationPosition); - assert(buf - work_buff == SIZE_OF_SIMPLEVARS); + //assert(buf - work_buff == SIZE_OF_SIMPLEVARS); // Save scripts, block is nested within the same block as simple vars for some reason presize = buf; @@ -228,28 +228,28 @@ GenericSave(int file) totalSize = buf - work_buff; // Save the rest - WriteSaveDataBlock(CPools::SavePedPool, "PedPoolSize"); + //WriteSaveDataBlock(CPools::SavePedPool, "PedPoolSize"); WriteSaveDataBlock(CGarages::Save, "GaragesSize"); - WriteSaveDataBlock(CGameLogic::Save, "GameLogicSize"); - WriteSaveDataBlock(CPools::SaveVehiclePool, "VehPoolSize"); - WriteSaveDataBlock(CPools::SaveObjectPool, "ObjectPoolSize"); - WriteSaveDataBlock(ThePaths.Save, "ThePathsSize"); - WriteSaveDataBlock(CCranes::Save, "CranesSize"); - WriteSaveDataBlock(CPickups::Save, "PickUpsSize"); - WriteSaveDataBlock(gPhoneInfo.Save, "PhoneInfoSize"); - WriteSaveDataBlock(CRestart::SaveAllRestartPoints, "RestartPointsBufferSize"); - WriteSaveDataBlock(CRadar::SaveAllRadarBlips, "RadarBlipsBufferSize"); - WriteSaveDataBlock(CTheZones::SaveAllZones, "AllZonesBufferSize"); - WriteSaveDataBlock(CGangs::SaveAllGangData, "AllGangDataSize"); - WriteSaveDataBlock(CTheCarGenerators::SaveAllCarGenerators, "AllCarGeneratorsSize"); - WriteSaveDataBlock(CParticleObject::SaveParticle, "ParticlesSize"); - WriteSaveDataBlock(cAudioScriptObject::SaveAllAudioScriptObjects, "AllAudioScriptObjectsSize"); - WriteSaveDataBlock(CScriptPaths::Save, "ScriptPathsSize"); + //WriteSaveDataBlock(CGameLogic::Save, "GameLogicSize"); + //WriteSaveDataBlock(CPools::SaveVehiclePool, "VehPoolSize"); + //WriteSaveDataBlock(CPools::SaveObjectPool, "ObjectPoolSize"); + //WriteSaveDataBlock(ThePaths.Save, "ThePathsSize"); + //WriteSaveDataBlock(CCranes::Save, "CranesSize"); + //WriteSaveDataBlock(CPickups::Save, "PickUpsSize"); + //WriteSaveDataBlock(gPhoneInfo.Save, "PhoneInfoSize"); + //WriteSaveDataBlock(CRestart::SaveAllRestartPoints, "RestartPointsBufferSize"); + //WriteSaveDataBlock(CRadar::SaveAllRadarBlips, "RadarBlipsBufferSize"); + //WriteSaveDataBlock(CTheZones::SaveAllZones, "AllZonesBufferSize"); + //WriteSaveDataBlock(CGangs::SaveAllGangData, "AllGangDataSize"); + //WriteSaveDataBlock(CTheCarGenerators::SaveAllCarGenerators, "AllCarGeneratorsSize"); + //WriteSaveDataBlock(CParticleObject::SaveParticle, "ParticlesSize"); + //WriteSaveDataBlock(cAudioScriptObject::SaveAllAudioScriptObjects, "AllAudioScriptObjectsSize"); + //WriteSaveDataBlock(CScriptPaths::Save, "ScriptPathsSize"); WriteSaveDataBlock(CWorld::Players[CWorld::PlayerInFocus].SavePlayerInfo, "PlayerInfoSize"); WriteSaveDataBlock(CStats::SaveStats, "StatsSize"); - WriteSaveDataBlock(CSetPieces::Save, "SetPiecesSize"); - WriteSaveDataBlock(CStreaming::MemoryCardSave, "StreamingSize"); - WriteSaveDataBlock(CPedType::Save, "PedTypeSize"); + //WriteSaveDataBlock(CSetPieces::Save, "SetPiecesSize"); + //WriteSaveDataBlock(CStreaming::MemoryCardSave, "StreamingSize"); + //WriteSaveDataBlock(CPedType::Save, "PedTypeSize"); // sure just write garbage data repeatedly ... #ifndef THIS_IS_STUPID @@ -318,7 +318,7 @@ GenericLoad() ReadDataFromBufferPointer(buf, CClock::ms_nGameClockMinutes); currPad = CPad::GetPad(0); ReadDataFromBufferPointer(buf, currPad->Mode); - ReadDataFromBufferPointer(buf, CTimer::m_snTimeInMilliseconds); + //ReadDataFromBufferPointer(buf, CTimer::m_snTimeInMilliseconds); ReadDataFromBufferPointer(buf, CTimer::ms_fTimeScale); ReadDataFromBufferPointer(buf, CTimer::ms_fTimeStep); ReadDataFromBufferPointer(buf, CTimer::ms_fTimeStepNonClipped); @@ -359,7 +359,7 @@ GenericLoad() ReadDataFromBufferPointer(buf, CTimeCycle::m_bExtraColourOn); ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColourInter); ReadDataFromBufferPointer(buf, RadioStationPosition); - assert(buf - work_buff == SIZE_OF_SIMPLEVARS); + //assert(buf - work_buff == SIZE_OF_SIMPLEVARS); #ifdef MISSION_REPLAY WaitForSave = 0; if (FrontEndMenuManager.m_nCurrSaveSlot == PAUSE_SAVE_SLOT && qs == 3) @@ -368,54 +368,54 @@ GenericLoad() ReadDataFromBlock("Loading Scripts \n", CTheScripts::LoadAllScripts); // Load the rest - LoadSaveDataBlock(); - ReadDataFromBlock("Loading PedPool \n", CPools::LoadPedPool); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading PedPool \n", CPools::LoadPedPool); LoadSaveDataBlock(); ReadDataFromBlock("Loading Garages \n", CGarages::Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading GameLogic \n", CGameLogic::Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Vehicles \n", CPools::LoadVehiclePool); - LoadSaveDataBlock(); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading GameLogic \n", CGameLogic::Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Vehicles \n", CPools::LoadVehiclePool); + //LoadSaveDataBlock(); CProjectileInfo::RemoveAllProjectiles(); CObject::DeleteAllTempObjects(); - ReadDataFromBlock("Loading Objects \n", CPools::LoadObjectPool); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Paths \n", ThePaths.Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Cranes \n", CCranes::Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Pickups \n", CPickups::Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Phoneinfo \n", gPhoneInfo.Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Restart \n", CRestart::LoadAllRestartPoints); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Radar Blips \n", CRadar::LoadAllRadarBlips); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Zones \n", CTheZones::LoadAllZones); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Gang Data \n", CGangs::LoadAllGangData); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Car Generators \n", CTheCarGenerators::LoadAllCarGenerators); - CParticle::ReloadConfig(); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Particles \n", CParticleObject::LoadParticle); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading AudioScript Objects \n", cAudioScriptObject::LoadAllAudioScriptObjects); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading ScriptPaths \n", CScriptPaths::Load); + //ReadDataFromBlock("Loading Objects \n", CPools::LoadObjectPool); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Paths \n", ThePaths.Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Cranes \n", CCranes::Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Pickups \n", CPickups::Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Phoneinfo \n", gPhoneInfo.Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Restart \n", CRestart::LoadAllRestartPoints); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Radar Blips \n", CRadar::LoadAllRadarBlips); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Zones \n", CTheZones::LoadAllZones); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Gang Data \n", CGangs::LoadAllGangData); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Car Generators \n", CTheCarGenerators::LoadAllCarGenerators); + //CParticle::ReloadConfig(); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Particles \n", CParticleObject::LoadParticle); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading AudioScript Objects \n", cAudioScriptObject::LoadAllAudioScriptObjects); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading ScriptPaths \n", CScriptPaths::Load); LoadSaveDataBlock(); ReadDataFromBlock("Loading Player Info \n", CWorld::Players[CWorld::PlayerInFocus].LoadPlayerInfo); LoadSaveDataBlock(); ReadDataFromBlock("Loading Stats \n", CStats::LoadStats); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Set Pieces \n", CSetPieces::Load); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading Streaming Stuff \n", CStreaming::MemoryCardLoad); - LoadSaveDataBlock(); - ReadDataFromBlock("Loading PedType Stuff \n", CPedType::Load); - + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Set Pieces \n", CSetPieces::Load); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading Streaming Stuff \n", CStreaming::MemoryCardLoad); + //LoadSaveDataBlock(); + //ReadDataFromBlock("Loading PedType Stuff \n", CPedType::Load); + CStreaming::ReInit(); DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume); DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume); if (!CloseFile(file)) { @@ -423,7 +423,7 @@ GenericLoad() return false; } - DoGameSpecificStuffAfterSucessLoad(); + //DoGameSpecificStuffAfterSucessLoad(); debug("Game successfully loaded \n"); return true; } diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 0928229f..8d07fb18 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -2142,8 +2142,8 @@ main(int argc, char *argv[]) printf("Into TheGame!!!\n"); #else - LoadingScreen(nil, nil, "loadsc0"); - // LoadingScreen(nil, nil, "loadsc0"); // duplicate + LoadingScreen(nil, nil, "sceelee"); + // LoadingScreen(nil, nil, "sceelee"); // duplicate #endif if ( !CGame::InitialiseOnceAfterRW() ) RsGlobal.quit = TRUE; @@ -2159,8 +2159,8 @@ main(int argc, char *argv[]) #ifndef PS2_MENU case GS_INIT_FRONTEND: { - LoadingScreen(nil, nil, "loadsc0"); - // LoadingScreen(nil, nil, "loadsc0"); // duplicate + LoadingScreen(nil, nil, "sceelee"); + // LoadingScreen(nil, nil, "sceelee"); // duplicate FrontEndMenuManager.m_bGameNotLoaded = true; @@ -2319,7 +2319,7 @@ main(int argc, char *argv[]) CGame::InitialiseWhenRestarting(); DMAudio.ChangeMusicMode(MUSICMODE_GAME); LoadSplash(GetLevelSplashScreen(CGame::currLevel)); - FrontEndMenuManager.m_bWantToLoad = false; + //FrontEndMenuManager.m_bWantToLoad = false; } else { diff --git a/src/skel/skeleton.cpp b/src/skel/skeleton.cpp index 2bb23460..d5805681 100644 --- a/src/skel/skeleton.cpp +++ b/src/skel/skeleton.cpp @@ -397,7 +397,7 @@ RsInitialize(void) */ RwBool result; - RsGlobal.appName = RWSTRING("GTA: Vice City"); + RsGlobal.appName = RWSTRING("GTA: Liberty City Stories"); RsGlobal.maximumWidth = DEFAULT_SCREEN_WIDTH; RsGlobal.maximumHeight = DEFAULT_SCREEN_HEIGHT; RsGlobal.width = DEFAULT_SCREEN_WIDTH; diff --git a/src/skel/win/gtalcs.ico b/src/skel/win/gtalcs.ico Binary files differnew file mode 100644 index 00000000..c4b53436 --- /dev/null +++ b/src/skel/win/gtalcs.ico diff --git a/src/skel/win/gtavc.ico b/src/skel/win/gtavc.ico Binary files differdeleted file mode 100644 index 7bfcc5a5..00000000 --- a/src/skel/win/gtavc.ico +++ /dev/null diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index f251f58d..a6d8bea8 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -2378,8 +2378,8 @@ WinMain(HINSTANCE instance, printf("Into TheGame!!!\n"); #else - LoadingScreen(nil, nil, "loadsc0"); - // LoadingScreen(nil, nil, "loadsc0"); // duplicate + LoadingScreen(nil, nil, "sceelee"); + // LoadingScreen(nil, nil, "sceelee"); // duplicate #endif if ( !CGame::InitialiseOnceAfterRW() ) RsGlobal.quit = TRUE; @@ -2396,8 +2396,8 @@ WinMain(HINSTANCE instance, #ifndef PS2_MENU case GS_INIT_FRONTEND: { - LoadingScreen(nil, nil, "loadsc0"); - // LoadingScreen(nil, nil, "loadsc0"); // duplicate + LoadingScreen(nil, nil, "sceelee"); + // LoadingScreen(nil, nil, "sceelee"); // duplicate FrontEndMenuManager.m_bGameNotLoaded = true; @@ -2558,7 +2558,7 @@ WinMain(HINSTANCE instance, CGame::InitialiseWhenRestarting(); DMAudio.ChangeMusicMode(MUSICMODE_GAME); LoadSplash(GetLevelSplashScreen(CGame::currLevel)); - FrontEndMenuManager.m_bWantToLoad = false; + //FrontEndMenuManager.m_bWantToLoad = false; } else { diff --git a/src/skel/win/win.rc b/src/skel/win/win.rc index 9b5aa305..702c3de7 100644 --- a/src/skel/win/win.rc +++ b/src/skel/win/win.rc @@ -42,6 +42,6 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_MAIN_ICON ICON DISCARDABLE "gtavc.ico" +IDI_MAIN_ICON ICON DISCARDABLE "gtalcs.ico" /////////////////////////////////////////////////////////////////////////////
\ No newline at end of file diff --git a/src/text/Messages.cpp b/src/text/Messages.cpp index 81339ae0..f55e6bd7 100644 --- a/src/text/Messages.cpp +++ b/src/text/Messages.cpp @@ -11,6 +11,8 @@ #include "Font.h" +#include "Pad.h" + tMessage CMessages::BriefMessages[NUMBRIEFMESSAGES]; tPreviousBrief CMessages::PreviousBriefs[NUMPREVIOUSBRIEFS]; tBigMessage CMessages::BIGMessages[NUMBIGMESSAGES]; @@ -441,6 +443,64 @@ CMessages::InsertStringInString(wchar *str1, wchar *str2) str1[i++] = '\0'; } +int +CMessages::GetTokenPadKeyString(const wchar *in, wchar *out) +{ + wchar str[256]; + memset(str, 0, sizeof(str)); + str[0] = 'C'; + + // TODO: there was a switch here but that's stupid + str[1] = CPad::GetPad(0)->Mode + 48; + + while (*in != '~') in++; + in++; + + int i = 1; + while (*in != '~') + str[1+i++] = *(in++); + + wchar *text = TheText.Get(UnicodeToAscii(str)); + if (!text) return i; + while (text[0] != '\0') + { + if (text[0] == '~') + { + switch (text[1]) + { + case 'L': + *(out++) = 'M'; + break; + case 'N': + *(out++) = 'O'; + break; + case 'O': + *(out++) = 227; + break; + case 'R': + *(out++) = 'S'; + break; + case 'S': + *(out++) = 225; + break; + case 'T': + *(out++) = 224; + break; + case 'X': + *(out++) = 226; + break; + default: + break; + } + text += 3; + } + else { + *(out++) = *(text++); + } + } + return i; +} + void CMessages::InsertPlayerControlKeysInString(wchar *str) { @@ -450,7 +510,7 @@ CMessages::InsertPlayerControlKeysInString(wchar *str) if (!str) return; uint16 strSize = GetWideStringLength(str); - memset(keybuf, 0, 256*sizeof(wchar)); + memset(keybuf, 0, 256*sizeof(wchar)); // not memset? :O wchar *_outstr = outstr; for (i = 0; i < strSize;) { @@ -460,9 +520,16 @@ CMessages::InsertPlayerControlKeysInString(wchar *str) #else if (str[i] == '~' && str[i + 1] == 'k' && str[i + 2] == '~') { #endif + memset(keybuf, 0, 256 * sizeof(wchar)); i += 4; - bool done = false; - for (int32 cont = 0; cont < MAX_CONTROLLERACTIONS && !done; cont++) { + i += GetTokenPadKeyString(&str[i], keybuf) + 1; + uint16 keybuf_size = GetWideStringLength(keybuf); + for (uint16 j = 0; j < keybuf_size; j++) { + *(_outstr++) = keybuf[j]; + keybuf[j] = '\0'; + } + + /*for (int32 cont = 0; cont < MAX_CONTROLLERACTIONS && !done; cont++) { uint16 contSize = GetWideStringLength(ControlsManager.m_aActionNames[cont]); if (contSize != 0) { if (WideStringCompare(&str[i], ControlsManager.m_aActionNames[cont], contSize)) { @@ -476,7 +543,7 @@ CMessages::InsertPlayerControlKeysInString(wchar *str) i += contSize + 1; } } - } + }*/ } else { *(_outstr++) = str[i++]; } @@ -813,3 +880,13 @@ CMessages::ClearAllMessagesDisplayedByGame() CHud::GetRidOfAllHudMessages(); CUserDisplay::Pager.ClearMessages(); } + +void +CMessages::ClearThisBigPrintNow(uint32 id) +{ + if (BIGMessages[id].m_Stack[0].m_pText) + ClearThisBigPrint(BIGMessages[id].m_Stack[0].m_pText); + CHud::m_BigMessage[id][0] = '\0'; + BigMessageInUse[id] = 0.0f; +} + diff --git a/src/text/Messages.h b/src/text/Messages.h index e8ba1bf7..51112908 100644 --- a/src/text/Messages.h +++ b/src/text/Messages.h @@ -61,6 +61,8 @@ public: static void ClearThisPrint(wchar *str); static void ClearThisBigPrint(wchar *str); static void ClearAllMessagesDisplayedByGame(void); + static void ClearThisBigPrintNow(uint32 id); + static int GetTokenPadKeyString(const wchar *in, wchar *out); // unused or cut //static void AddMessageSoonWithString(wchar*, uint32, uint16, wchar*); diff --git a/src/text/Text.cpp b/src/text/Text.cpp index 1369d1db..e387fe01 100644 --- a/src/text/Text.cpp +++ b/src/text/Text.cpp @@ -11,7 +11,7 @@ wchar WideErrorString[25]; -CText TheText; +CText *CText::msInstance = nil; CText::CText(void) { @@ -39,7 +39,7 @@ CText::Load(void) CFileMgr::SetDir("TEXT"); switch(FrontEndMenuManager.m_PrefsLanguage){ case CMenuManager::LANGUAGE_AMERICAN: - sprintf(filename, "AMERICAN.GXT"); + sprintf(filename, "ENGLISH.GXT"); break; case CMenuManager::LANGUAGE_FRENCH: sprintf(filename, "FRENCH.GXT"); @@ -91,11 +91,13 @@ CText::Load(void) keyArray.Update(data.chars); CFileMgr::CloseFile(file); CFileMgr::SetDir(""); + bIsLoaded = true; } void CText::Unload(void) { + bIsLoaded = false; CMessages::ClearAllMessagesDisplayedByGame(); keyArray.Unload(); data.Unload(); @@ -243,7 +245,7 @@ CText::LoadMissionText(char *MissionTableName) CFileMgr::SetDir("TEXT"); switch (FrontEndMenuManager.m_PrefsLanguage) { case CMenuManager::LANGUAGE_AMERICAN: - sprintf(filename, "AMERICAN.GXT"); + sprintf(filename, "ENGLISH.GXT"); break; case CMenuManager::LANGUAGE_FRENCH: sprintf(filename, "FRENCH.GXT"); @@ -305,6 +307,11 @@ CText::LoadMissionText(char *MissionTableName) bIsMissionTextLoaded = true; } +bool +CText::IsLoaded() +{ + return bIsLoaded; +} void CKeyArray::Load(size_t length, int file, size_t* offset) diff --git a/src/text/Text.h b/src/text/Text.h index 1174216c..05387346 100644 --- a/src/text/Text.h +++ b/src/text/Text.h @@ -58,7 +58,7 @@ public: uint32 offset; }; - enum {MAX_MISSION_TEXTS = 90}; // beware that LCS has more + enum {MAX_MISSION_TEXTS = 200}; Entry data[MAX_MISSION_TEXTS]; uint16 size; // You can make this size_t if you want to exceed 32-bit boundaries, everything else should be ready. @@ -84,6 +84,9 @@ class CText bool bIsMissionTextLoaded; char szMissionTableName[8]; CMissionTextOffsets MissionTextOffsets; + bool bIsLoaded; + + static CText *msInstance; public: CText(void); void Load(void); @@ -94,6 +97,15 @@ public: void GetNameOfLoadedMissionText(char *outName); void ReadChunkHeader(ChunkHeader *buf, int32 file, size_t *bytes_read); void LoadMissionText(char *MissionTableName); + bool IsLoaded(); + void GetUTF8(const char*, char*, int); // TODO but unused + + static CText &Instance() + { + if (!msInstance) + msInstance = new CText; + return *msInstance; + } }; -extern CText TheText; +#define TheText CText::Instance() diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 5e2b0c10..2c199030 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -103,6 +103,8 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy) pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId); pFlyingHandling = mod_HandlingManager.GetFlyingPointer((tVehicleType)mi->m_handlingId); + m_fEngineInertiaVar1 = 0.0f; + m_fEngineInertiaVar2 = 0.0f; m_auto_unused1 = 20.0f; m_auto_unused2 = 0; @@ -151,7 +153,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy) m_fMass = pHandling->fMass; m_fTurnMass = pHandling->fTurnMass; m_vecCentreOfMass = pHandling->CentreOfMass; - m_fAirResistance = pHandling->Dimension.x*pHandling->Dimension.z/m_fMass; + m_fAirResistance = pHandling->fDragMult > 0.01f ? pHandling->fDragMult*0.0005f : pHandling->fDragMult; m_fElasticity = 0.05f; m_fBuoyancy = pHandling->fBuoyancy; @@ -192,12 +194,6 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy) m_fTraction = 1.0f; m_fTireTemperature = 1.0f; - CColModel *colModel = mi->GetColModel(); - if(colModel->lines == nil){ - colModel->lines = (CColLine*)RwMalloc(4*sizeof(CColLine)); - colModel->numLines = 4; - } - SetupSuspensionLines(); SetStatus(STATUS_SIMPLE); @@ -257,6 +253,10 @@ CVector vecDAMAGE_ENGINE_POS_BIG(-0.5f, -0.3f, 0.0f); void CAutomobile::ProcessControl(void) { + // TODO(LCS): + // TheCamera can remove service vehicles + // some audio (?) stuff + int i; float wheelRot; CColModel *colModel; @@ -311,7 +311,7 @@ CAutomobile::ProcessControl(void) if(GetStatus() != STATUS_ABANDONED && GetStatus() != STATUS_WRECKED && GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && GetStatus() != STATUS_PLAYER_DISABLED){ switch(GetModelIndex()) - case MI_FBIRANCH: + case MI_FBICAR: case MI_POLICE: case MI_ENFORCER: case MI_SECURICA: @@ -320,16 +320,18 @@ CAutomobile::ProcessControl(void) ScanForCrimes(); } + // TODO(LCS): the fields used by this function are weird + ActivateBombWhenEntered(); + // Process driver - if(pDriver) + if(pDriver){ if(IsUpsideDown() && CanPedEnterCar()){ if(!pDriver->IsPlayer() && !(pDriver->m_leader && pDriver->m_leader->bInVehicle) && pDriver->CharCreatedBy != MISSION_CHAR) pDriver->SetObjective(OBJECTIVE_LEAVE_CAR, this); } - - ActivateBombWhenEntered(); + } // Process passengers if(m_nNumPassengers != 0 && IsUpsideDown() && CanPedEnterCar()){ @@ -352,7 +354,7 @@ CAutomobile::ProcessControl(void) if(strongGrip1 || bCheat3) m_vecCentreOfMass.z = 0.3f*m_aSuspensionSpringLength[0] + -1.0f*m_fHeightAboveRoad; else if(pHandling->Flags & HANDLING_NONPLAYER_STABILISER && GetStatus() == STATUS_PHYSICS) - m_vecCentreOfMass.z = pHandling->CentreOfMass.z - 0.2f*pHandling->Dimension.z; + m_vecCentreOfMass.z = pHandling->CentreOfMass.z + (colModel->boundingBox.min.z - pHandling->CentreOfMass.z)*0.4f; else m_vecCentreOfMass = pHandling->CentreOfMass; @@ -372,11 +374,7 @@ CAutomobile::ProcessControl(void) bool playerRemote = false; switch(GetStatus()){ case STATUS_PLAYER_REMOTE: -#ifdef FIX_BUGS if(CPad::GetPad(0)->CarGunJustDown() && !bDisableRemoteDetonation){ -#else - if(CPad::GetPad(0)->WeaponJustDown() && !bDisableRemoteDetonation){ -#endif BlowUpCar(FindPlayerPed()); CRemote::TakeRemoteControlledCarFromPlayer(); } @@ -395,6 +393,7 @@ CAutomobile::ProcessControl(void) // fall through case STATUS_PLAYER: if(playerRemote || + // TODO(LCS): ped state 64 pDriver && pDriver->GetPedState() != PED_EXIT_CAR && pDriver->GetPedState() != PED_DRAG_FROM_CAR && pDriver->GetPedState() != PED_ARRESTED){ // process control input if controlled by player if(playerRemote || pDriver->m_nPedType == PEDTYPE_PLAYER1) @@ -420,6 +419,8 @@ CAutomobile::ProcessControl(void) }else m_vecCentreOfMass.z = pHandling->CentreOfMass.z; + // TODO(LCS): some in air handling? + if(bHoverCheat) DoHoverSuspensionRatios(); @@ -455,8 +456,6 @@ CAutomobile::ProcessControl(void) m_fBrakePedal = 1.0f; m_fGasPedal = 0.0f; } - if(CPad::GetPad(0)->CarGunJustDown()) - ActivateBomb(); break; case STATUS_SIMPLE: @@ -496,7 +495,7 @@ CAutomobile::ProcessControl(void) m_aSuspensionSpringRatio[1] < 1.0f && CSurfaceTable::GetAdhesionGroup(m_aWheelColPoints[1].surfaceB) == ADHESIVE_SAND || m_aSuspensionSpringRatio[2] < 1.0f && CSurfaceTable::GetAdhesionGroup(m_aWheelColPoints[2].surfaceB) == ADHESIVE_SAND || m_aSuspensionSpringRatio[3] < 1.0f && CSurfaceTable::GetAdhesionGroup(m_aWheelColPoints[3].surfaceB) == ADHESIVE_SAND){ - if(GetModelIndex() != MI_RCBANDIT && GetModelIndex() != MI_SANDKING && GetModelIndex() != MI_BFINJECT){ + if(GetModelIndex() != MI_RCBANDIT /*&& GetModelIndex() != MI_SANDKING*/ && GetModelIndex() != MI_BFINJECT){ bStuckInSand = true; if(CWeather::WetRoads > 0.0f) ApplyMoveForce(m_vecMoveSpeed * -CTimer::GetTimeStep()*SAND_SLOWDOWN*m_fMass * (1.0f-CWeather::WetRoads)); @@ -531,8 +530,10 @@ CAutomobile::ProcessControl(void) m_fSteerAngle = 0.0f; m_fGasPedal = 0.0f; - if(!IsAlarmOn()) - m_nCarHornTimer = 0; + m_nCarHornTimer = 0; + // TODO(LCS): + // CWeapon::::RemovePlayersRemoteDetonatorForThisVehicle + m_pBombRigger = nil; break; case STATUS_PLAYER_DISABLED: @@ -626,14 +627,13 @@ CAutomobile::ProcessControl(void) // special control switch(GetModelIndex()){ - case MI_FIRETRUCK: - FireTruckControl(); - break; + // FireTruckControl in PreRender now case MI_RHINO: TankControl(); BlowUpCarsInPath(); break; - case MI_VOODOO: + // LCS: this is gone but i'm keeping it! + case MI_YARDIE: HydraulicControl(); break; default: @@ -723,7 +723,7 @@ CAutomobile::ProcessControl(void) ApplyTurnSpeed(); } bIsInSafePosition = true; - bIsStuck = false; + bIsStuck = false; } CPhysical::ProcessControl(); @@ -742,6 +742,7 @@ CAutomobile::ProcessControl(void) CVector contactPoints[4]; // relative to model CVector contactSpeeds[4]; // speed at contact points CVector springDirections[4]; // normalized, in world space + float springForces[4]; for(i = 0; i < 4; i++){ // Set spring under certain circumstances @@ -765,10 +766,13 @@ CAutomobile::ProcessControl(void) } // get points and directions if spring is compressed + springDirections[i] = -GetUp(); // springs are always pointing down anyway if(m_aSuspensionSpringRatio[i] < 1.0f){ contactPoints[i] = m_aWheelColPoints[i].point - GetPosition(); - springDirections[i] = Multiply3x3(GetMatrix(), colModel->lines[i].p1 - colModel->lines[i].p0); - springDirections[i].Normalise(); +// springDirections[i] = Multiply3x3(GetMatrix(), colModel->lines[i].p1 - colModel->lines[i].p0); +// springDirections[i].Normalise(); + }else{ + contactPoints[i] = CVector(0.0f, 0.0f, 0.0f); } } @@ -781,7 +785,7 @@ CAutomobile::ProcessControl(void) ApplySpringCollisionAlt(pHandling->fSuspensionForceLevel, springDirections[i], contactPoints[i], - m_aSuspensionSpringRatio[i], bias, m_aWheelColPoints[i].normal); + m_aSuspensionSpringRatio[i], bias, m_aWheelColPoints[i].normal, springForces[i]); m_aWheelSkidmarkUnk[i] = false; if(m_aWheelColPoints[i].surfaceB == SURFACE_GRASS || @@ -793,8 +797,8 @@ CAutomobile::ProcessControl(void) m_aWheelSkidmarkUnk[i] = true; }else m_aWheelSkidmarkType[i] = SKIDMARK_NORMAL; - }else{ - contactPoints[i] = Multiply3x3(GetMatrix(), colModel->lines[i].p1); +// }else{ +// contactPoints[i] = Multiply3x3(GetMatrix(), colModel->lines[i].p1); } } @@ -816,7 +820,7 @@ CAutomobile::ProcessControl(void) // dampen springs for(i = 0; i < 4; i++) if(m_aSuspensionSpringRatio[i] < 0.99999f) - ApplySpringDampening(pHandling->fSuspensionDampingLevel, + ApplySpringDampening(pHandling->fSuspensionDampingLevel, springForces[i], springDirections[i], contactPoints[i], contactSpeeds[i]); // Get speed at contact points again @@ -829,42 +833,6 @@ CAutomobile::ProcessControl(void) } } - bool gripCheat = true; - fwdSpeed = DotProduct(m_vecMoveSpeed, GetForward()); - if(!strongGrip1 && !CVehicle::bCheat3) - gripCheat = false; - float acceleration = pHandling->Transmission.CalculateDriveAcceleration(m_fGasPedal, m_nCurrentGear, m_fChangeGearTime, fwdSpeed, gripCheat); - acceleration /= m_fForceMultiplier; - - if(IsRealHeli() || IsRealPlane()) - acceleration = 0.0f; - - if(bAudioChangingGear && m_fGasPedal > 0.4f && m_fBrakePedal < 0.1f && fwdSpeed > 0.15f && - this == FindPlayerVehicle() && TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_1STPERSON){ - if(GetStatus() == STATUS_PLAYER && !(pHandling->Flags & HANDLING_IS_BUS)){ - if(m_nBusDoorTimerEnd == 0) - m_nBusDoorTimerEnd = 1000; - else { - uint32 timeStepInMs = CTimer::GetTimeStepInMilliseconds(); - if(m_nBusDoorTimerEnd > timeStepInMs) - m_nBusDoorTimerEnd -= timeStepInMs; - else - m_nBusDoorTimerEnd = 0; - } - } - - if((m_aSuspensionSpringRatio[0] < 1.0f || m_aSuspensionSpringRatio[2] < 1.0f) && - (m_aSuspensionSpringRatio[1] < 1.0f || m_aSuspensionSpringRatio[3] < 1.0f)) - ApplyTurnForce(-GRAVITY*Min(m_fTurnMass, 2500.0f)*GetUp(), -1.0f*GetForward()); - } - - brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep(); - bool neutralHandling = GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && (pHandling->Flags & HANDLING_NEUTRALHANDLING); - float brakeBiasFront = neutralHandling ? 1.0f : 2.0f*pHandling->fBrakeBias; - float brakeBiasRear = neutralHandling ? 1.0f : 2.0f-pHandling->fBrakeBias; // looks like a bug, but it was correct in III... - float tractionBiasFront = neutralHandling ? 1.0f : 2.0f*pHandling->fTractionBias; - float tractionBiasRear = neutralHandling ? 1.0f : 2.0f-tractionBiasFront; - // Count how many wheels are touching the ground m_nWheelsOnGround = 0; @@ -895,16 +863,36 @@ CAutomobile::ProcessControl(void) } } + bool gripCheat = true; + fwdSpeed = DotProduct(m_vecMoveSpeed, GetForward()); + if(!strongGrip1 && !CVehicle::bCheat3) + gripCheat = false; + float acceleration = pHandling->Transmission.CalculateDriveAcceleration(m_fGasPedal, m_nCurrentGear, m_fChangeGearTime, fwdSpeed, + &m_fEngineInertiaVar1, &m_fEngineInertiaVar2, m_nDriveWheelsOnGround, gripCheat); + acceleration /= m_fForceMultiplier; + + if(IsRealHeli() || IsRealPlane()) + acceleration = 0.0f; + + if(Abs(acceleration) > 0.0f) + m_fEngineEnergy += Abs(acceleration); + else + m_fEngineEnergy = 0.0f; + float traction; if(GetStatus() == STATUS_PHYSICS) traction = 0.004f * m_fTraction; else traction = 0.004f; - traction *= pHandling->fTractionMultiplier / 4.0f; + traction *= pHandling->GetTractionMultiplier() / 4.0f; traction /= m_fForceMultiplier; if(CVehicle::bCheat3) traction *= 4.0f; + if(FindPlayerVehicle() && FindPlayerVehicle() == this) + if(CPad::GetPad(0)->CarGunJustDown()) + ActivateBomb(); + if(FindPlayerVehicle() != this && (strongGrip1 || CVehicle::bCheat3)){ traction *= 1.2f; acceleration *= 1.4f; @@ -914,448 +902,73 @@ CAutomobile::ProcessControl(void) } } - static float fThrust; - static tWheelState WheelState[4]; - - bool rearWheelsFirst = !!(pHandling->Flags & HANDLING_REARWHEEL_1ST); - - // Process front wheels on ground - first try - - if(!rearWheelsFirst){ - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_FRONT_RIGHT] > 0.0f){ - float s = Sin(m_fSteerAngle); - float c = Cos(m_fSteerAngle); - - CVector wheelFwd, wheelRight, tmp; - - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd = GetForward(); - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal)*m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal); - wheelRight.Normalise(); - tmp = c*wheelFwd - s*wheelRight; - wheelRight = s*wheelFwd + c*wheelRight; - wheelFwd = tmp; - - m_aWheelColPoints[CARWHEEL_FRONT_LEFT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_FRONT_LEFT])*traction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_FRONT_LEFT].surfaceB); - WheelState[CARWHEEL_FRONT_LEFT] = m_aWheelState[CARWHEEL_FRONT_LEFT]; - - if(Damage.GetWheelStatus(CARWHEEL_FRONT_LEFT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_LEFT], contactPoints[CARWHEEL_FRONT_LEFT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront*Damage.m_fWheelDamageEffect, - CARWHEEL_FRONT_LEFT, - &m_aWheelSpeed[CARWHEEL_FRONT_LEFT], - &WheelState[CARWHEEL_FRONT_LEFT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_LEFT], contactPoints[CARWHEEL_FRONT_LEFT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront, - CARWHEEL_FRONT_LEFT, - &m_aWheelSpeed[CARWHEEL_FRONT_LEFT], - &WheelState[CARWHEEL_FRONT_LEFT], - WHEEL_STATUS_OK); - } - - if(m_aWheelTimer[CARWHEEL_FRONT_RIGHT] > 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd = GetForward(); - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal)*m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal); - wheelRight.Normalise(); - tmp = c*wheelFwd - s*wheelRight; - wheelRight = s*wheelFwd + c*wheelRight; - wheelFwd = tmp; - - m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_FRONT_RIGHT])*traction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].surfaceB); - WheelState[CARWHEEL_FRONT_RIGHT] = m_aWheelState[CARWHEEL_FRONT_RIGHT]; - - if(Damage.GetWheelStatus(CARWHEEL_FRONT_RIGHT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_RIGHT], contactPoints[CARWHEEL_FRONT_RIGHT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront*Damage.m_fWheelDamageEffect, - CARWHEEL_FRONT_RIGHT, - &m_aWheelSpeed[CARWHEEL_FRONT_RIGHT], - &WheelState[CARWHEEL_FRONT_RIGHT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_RIGHT], contactPoints[CARWHEEL_FRONT_RIGHT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront, - CARWHEEL_FRONT_RIGHT, - &m_aWheelSpeed[CARWHEEL_FRONT_RIGHT], - &WheelState[CARWHEEL_FRONT_RIGHT], - WHEEL_STATUS_OK); - } - } - - // Process front wheels off ground - - if(!IsRealHeli()){ - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_FRONT_LEFT] < 2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_FRONT_LEFT] > -2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f; - } - m_aWheelRotation[CARWHEEL_FRONT_LEFT] += m_aWheelSpeed[CARWHEEL_FRONT_LEFT]; - } - if(m_aWheelTimer[CARWHEEL_FRONT_RIGHT] <= 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] < 2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] > -2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] *= 0.95f; - } - m_aWheelRotation[CARWHEEL_FRONT_RIGHT] += m_aWheelSpeed[CARWHEEL_FRONT_RIGHT]; - } - } - } - - // Process rear wheels - - if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_REAR_RIGHT] > 0.0f){ - CVector wheelFwd = GetForward(); - CVector wheelRight = GetRight(); // overwritten for resp. wheel - - float rearBrake = brake; - float rearTraction = traction; - if(bIsHandbrakeOn){ -#ifdef FIX_BUGS - // Not sure if this is needed, but brake usually has timestep as a factor - rearBrake = 20000.0f * CTimer::GetTimeStepFix(); -#else - rearBrake = 20000.0f; -#endif - if(fwdSpeed > 0.1f && pHandling->Flags & HANDLING_HANDBRAKE_TYRE){ - m_fTireTemperature += 0.005*CTimer::GetTimeStep(); - if(m_fTireTemperature > 2.0f) - m_fTireTemperature = 2.0f; - } - }else if(m_doingBurnout && mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier)){ - rearBrake = 0.0f; - rearTraction = 0.0f; - // BUG: missing timestep - ApplyTurnForce(contactPoints[CARWHEEL_REAR_LEFT], -0.001f*m_fTurnMass*m_fSteerAngle*GetRight()); - }else if(m_fTireTemperature > 1.0f){ - rearTraction *= m_fTireTemperature; - } - - if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f){ - if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_REAR_LEFT].normal)*m_aWheelColPoints[CARWHEEL_REAR_LEFT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_REAR_LEFT].normal); - wheelRight.Normalise(); - - m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_REAR_LEFT])*rearTraction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceB); - WheelState[CARWHEEL_REAR_LEFT] = m_aWheelState[CARWHEEL_REAR_LEFT]; - - if(Damage.GetWheelStatus(CARWHEEL_REAR_LEFT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_REAR_LEFT], contactPoints[CARWHEEL_REAR_LEFT], - m_nWheelsOnGround, fThrust, - rearBrake*brakeBiasRear, - adhesion*tractionBiasRear*Damage.m_fWheelDamageEffect, - CARWHEEL_REAR_LEFT, - &m_aWheelSpeed[CARWHEEL_REAR_LEFT], - &WheelState[CARWHEEL_REAR_LEFT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_REAR_LEFT], contactPoints[CARWHEEL_REAR_LEFT], - m_nWheelsOnGround, fThrust, - rearBrake*brakeBiasRear, - adhesion*tractionBiasRear, - CARWHEEL_REAR_LEFT, - &m_aWheelSpeed[CARWHEEL_REAR_LEFT], - &WheelState[CARWHEEL_REAR_LEFT], - WHEEL_STATUS_OK); - } - -#ifdef FIX_BUGS - // Shouldn't we reset these after the left wheel? - wheelFwd = GetForward(); - wheelRight = GetRight(); // actually useless -#endif - - if(m_aWheelTimer[CARWHEEL_REAR_RIGHT] > 0.0f){ - if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_REAR_RIGHT].normal)*m_aWheelColPoints[CARWHEEL_REAR_RIGHT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_REAR_RIGHT].normal); - wheelRight.Normalise(); - - m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_REAR_RIGHT])*rearTraction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceB); - WheelState[CARWHEEL_REAR_RIGHT] = m_aWheelState[CARWHEEL_REAR_RIGHT]; - - if(Damage.GetWheelStatus(CARWHEEL_REAR_RIGHT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_REAR_RIGHT], contactPoints[CARWHEEL_REAR_RIGHT], - m_nWheelsOnGround, fThrust, - rearBrake*brakeBiasRear, - adhesion*tractionBiasRear*Damage.m_fWheelDamageEffect, - CARWHEEL_REAR_RIGHT, - &m_aWheelSpeed[CARWHEEL_REAR_RIGHT], - &WheelState[CARWHEEL_REAR_RIGHT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_REAR_RIGHT], contactPoints[CARWHEEL_REAR_RIGHT], - m_nWheelsOnGround, fThrust, - rearBrake*brakeBiasRear, - adhesion*tractionBiasRear, - CARWHEEL_REAR_RIGHT, - &m_aWheelSpeed[CARWHEEL_REAR_RIGHT], - &WheelState[CARWHEEL_REAR_RIGHT], - WHEEL_STATUS_OK); - } - } - - if(m_doingBurnout && mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) && - (m_aWheelState[CARWHEEL_REAR_LEFT] == WHEEL_STATE_SPINNING || m_aWheelState[CARWHEEL_REAR_RIGHT] == WHEEL_STATE_SPINNING)){ - m_fTireTemperature += 0.001f*CTimer::GetTimeStep(); - if(m_fTireTemperature > 3.0f) - m_fTireTemperature = 3.0f; - }else if(m_fTireTemperature > 1.0f){ - m_fTireTemperature = (m_fTireTemperature - 1.0f)*Pow(0.995f, CTimer::GetTimeStep()) + 1.0f; - } - - // Process rear wheels off ground - - if(!IsRealHeli()){ - if(m_aWheelTimer[CARWHEEL_REAR_LEFT] <= 0.0f){ - if(bIsHandbrakeOn) - m_aWheelSpeed[CARWHEEL_REAR_LEFT] = 0.0f; - else if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_REAR_LEFT] < 2.0f) - m_aWheelSpeed[CARWHEEL_REAR_LEFT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_REAR_LEFT] > -2.0f) - m_aWheelSpeed[CARWHEEL_REAR_LEFT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_REAR_LEFT] *= 0.95f; - } - m_aWheelRotation[CARWHEEL_REAR_LEFT] += m_aWheelSpeed[CARWHEEL_REAR_LEFT]; - } - if(m_aWheelTimer[CARWHEEL_REAR_RIGHT] <= 0.0f){ - if(bIsHandbrakeOn) - m_aWheelSpeed[CARWHEEL_REAR_RIGHT] = 0.0f; - else if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_REAR_RIGHT] < 2.0f) - m_aWheelSpeed[CARWHEEL_REAR_RIGHT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_REAR_RIGHT] > -2.0f) - m_aWheelSpeed[CARWHEEL_REAR_RIGHT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_REAR_RIGHT] *= 0.95f; + // TODO(LCS): where did this go? +/* + if(bAudioChangingGear && m_fGasPedal > 0.4f && m_fBrakePedal < 0.1f && fwdSpeed > 0.15f && + this == FindPlayerVehicle() && TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_1STPERSON){ + if(GetStatus() == STATUS_PLAYER && !(pHandling->Flags & HANDLING_IS_BUS)){ + if(m_nBusDoorTimerEnd == 0) + m_nBusDoorTimerEnd = 1000; + else { + uint32 timeStepInMs = CTimer::GetTimeStepInMilliseconds(); + if(m_nBusDoorTimerEnd > timeStepInMs) + m_nBusDoorTimerEnd -= timeStepInMs; + else + m_nBusDoorTimerEnd = 0; } - m_aWheelRotation[CARWHEEL_REAR_RIGHT] += m_aWheelSpeed[CARWHEEL_REAR_RIGHT]; } - } - - // Process front wheels on ground - second try - if(rearWheelsFirst){ - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_FRONT_RIGHT] > 0.0f){ - float s = Sin(m_fSteerAngle); - float c = Cos(m_fSteerAngle); - - CVector wheelFwd, wheelRight, tmp; - - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd = GetForward(); - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal)*m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_LEFT].normal); - wheelRight.Normalise(); - tmp = c*wheelFwd - s*wheelRight; - wheelRight = s*wheelFwd + c*wheelRight; - wheelFwd = tmp; - - m_aWheelColPoints[CARWHEEL_FRONT_LEFT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_FRONT_LEFT])*traction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_FRONT_LEFT].surfaceB); - WheelState[CARWHEEL_FRONT_LEFT] = m_aWheelState[CARWHEEL_FRONT_LEFT]; - - if(Damage.GetWheelStatus(CARWHEEL_FRONT_LEFT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_LEFT], contactPoints[CARWHEEL_FRONT_LEFT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront*Damage.m_fWheelDamageEffect, - CARWHEEL_FRONT_LEFT, - &m_aWheelSpeed[CARWHEEL_FRONT_LEFT], - &WheelState[CARWHEEL_FRONT_LEFT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_LEFT], contactPoints[CARWHEEL_FRONT_LEFT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront, - CARWHEEL_FRONT_LEFT, - &m_aWheelSpeed[CARWHEEL_FRONT_LEFT], - &WheelState[CARWHEEL_FRONT_LEFT], - WHEEL_STATUS_OK); - } - - if(m_aWheelTimer[CARWHEEL_FRONT_RIGHT] > 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier)) - fThrust = acceleration; - else - fThrust = 0.0f; - - wheelFwd = GetForward(); - wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal)*m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal; - wheelFwd.Normalise(); - wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].normal); - wheelRight.Normalise(); - tmp = c*wheelFwd - s*wheelRight; - wheelRight = s*wheelFwd + c*wheelRight; - wheelFwd = tmp; - - m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].surfaceA = SURFACE_WHEELBASE; - float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[CARWHEEL_FRONT_RIGHT])*traction; - if(GetStatus() == STATUS_PLAYER) - adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[CARWHEEL_FRONT_RIGHT].surfaceB); - WheelState[CARWHEEL_FRONT_RIGHT] = m_aWheelState[CARWHEEL_FRONT_RIGHT]; - - if(Damage.GetWheelStatus(CARWHEEL_FRONT_RIGHT) == WHEEL_STATUS_BURST) - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_RIGHT], contactPoints[CARWHEEL_FRONT_RIGHT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront*Damage.m_fWheelDamageEffect, - CARWHEEL_FRONT_RIGHT, - &m_aWheelSpeed[CARWHEEL_FRONT_RIGHT], - &WheelState[CARWHEEL_FRONT_RIGHT], - WHEEL_STATUS_BURST); - else - ProcessWheel(wheelFwd, wheelRight, - contactSpeeds[CARWHEEL_FRONT_RIGHT], contactPoints[CARWHEEL_FRONT_RIGHT], - m_nWheelsOnGround, fThrust, - brake*brakeBiasFront, - adhesion*tractionBiasFront, - CARWHEEL_FRONT_RIGHT, - &m_aWheelSpeed[CARWHEEL_FRONT_RIGHT], - &WheelState[CARWHEEL_FRONT_RIGHT], - WHEEL_STATUS_OK); - } + if((m_aSuspensionSpringRatio[0] < 1.0f || m_aSuspensionSpringRatio[2] < 1.0f) && + (m_aSuspensionSpringRatio[1] < 1.0f || m_aSuspensionSpringRatio[3] < 1.0f)) + ApplyTurnForce(-GRAVITY*Min(m_fTurnMass, 2500.0f)*GetUp(), -1.0f*GetForward()); } +*/ + + float steerRange; + if(fwdSpeed > 0.01f && m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f && m_aWheelTimer[CARWHEEL_FRONT_RIGHT] > 0.0f && GetStatus() == STATUS_PLAYER){ + CColPoint point; + point.surfaceA = SURFACE_WHEELBASE; + point.surfaceB = SURFACE_TARMAC; + float rightSpeed = DotProduct(m_vecMoveSpeed, GetRight()); + float adhesion = CSurfaceTable::GetAdhesiveLimit(point); + // i have no idea what's going on here + float magic = traction * adhesion * 16.0f / SQR(fwdSpeed); + magic = Clamp(magic, -1.0f, 1.0f); + magic = Asin(magic); + if(m_fSteerAngle < 0.0f && rightSpeed > 0.05f || + m_fSteerAngle > 0.0f && rightSpeed < -0.05f || + bIsHandbrakeOn) + steerRange = 1.0f; + else + steerRange = Min(magic/DEGTORAD(pHandling->fSteeringLock), 1.0f); + + }else + steerRange = 1.0f; + m_fSteerAngle *= steerRange; - // Process front wheels off ground + brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep(); - if (!IsRealHeli()) { - if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_FRONT_LEFT] < 2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_FRONT_LEFT] > -2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f; - } - m_aWheelRotation[CARWHEEL_FRONT_LEFT] += m_aWheelSpeed[CARWHEEL_FRONT_LEFT]; - } - if(m_aWheelTimer[CARWHEEL_FRONT_RIGHT] <= 0.0f){ - if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier) && acceleration != 0.0f){ - if(acceleration > 0.0f){ - if(m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] < 2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] -= 0.2f; - }else{ - if(m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] > -2.0f) - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] += 0.1f; - } - }else{ - m_aWheelSpeed[CARWHEEL_FRONT_RIGHT] *= 0.95f; - } - m_aWheelRotation[CARWHEEL_FRONT_RIGHT] += m_aWheelSpeed[CARWHEEL_FRONT_RIGHT]; - } - } + if(pHandling->Flags & HANDLING_REARWHEEL_1ST){ + ProcessCarWheelPair(CARWHEEL_REAR_LEFT, CARWHEEL_REAR_RIGHT, -999.0f, contactSpeeds, contactPoints, + traction, acceleration, brake, false); + ProcessCarWheelPair(CARWHEEL_FRONT_LEFT, CARWHEEL_FRONT_RIGHT, m_fSteerAngle, contactSpeeds, contactPoints, + traction, acceleration, brake, true); + }else{ + ProcessCarWheelPair(CARWHEEL_FRONT_LEFT, CARWHEEL_FRONT_RIGHT, m_fSteerAngle, contactSpeeds, contactPoints, + traction, acceleration, brake, true); + ProcessCarWheelPair(CARWHEEL_REAR_LEFT, CARWHEEL_REAR_RIGHT, -999.0f, contactSpeeds, contactPoints, + traction, acceleration, brake, false); } for(i = 0; i < 4; i++){ float wheelPos = colModel->lines[i].p0.z; if(m_aSuspensionSpringRatio[i] > 0.0f) wheelPos -= m_aSuspensionSpringRatio[i]*m_aSuspensionSpringLength[i]; - if(GetModelIndex() == MI_VOODOO && bUsingSpecialColModel) + if(GetModelIndex() == MI_YARDIE && bUsingSpecialColModel) // not original LCS m_aWheelPosition[i] = wheelPos; else m_aWheelPosition[i] += (wheelPos - m_aWheelPosition[i])*0.75f; } - for(i = 0; i < 4; i++) - m_aWheelState[i] = WheelState[i]; - if(m_fGasPedal < 0.0f){ - if(m_aWheelState[CARWHEEL_REAR_LEFT] == WHEEL_STATE_SPINNING) - m_aWheelState[CARWHEEL_REAR_LEFT] = WHEEL_STATE_NORMAL; - if(m_aWheelState[CARWHEEL_REAR_RIGHT] == WHEEL_STATE_SPINNING) - m_aWheelState[CARWHEEL_REAR_RIGHT] = WHEEL_STATE_NORMAL; - } // Process horn @@ -1650,13 +1263,13 @@ CAutomobile::ProcessControl(void) // TODO: make the numbers defines float heading; - if(GetPosition().x > 1950.0f-400.0f){ + if(GetPosition().x > 1950.0f){ if(m_vecMoveSpeed.x > 0.0f) m_vecMoveSpeed.x *= -1.0f; heading = GetForward().Heading(); if(heading > 0.0f) // going west SetHeading(-heading); - }else if(GetPosition().x < -1950.0f-400.0f){ + }else if(GetPosition().x < -1950.0f){ if(m_vecMoveSpeed.x < 0.0f) m_vecMoveSpeed.x *= -1.0f; heading = GetForward().Heading(); @@ -1719,6 +1332,207 @@ CAutomobile::ProcessControl(void) #pragma optimize("", on) +//--LCS: done +void +CAutomobile::ProcessCarWheelPair(int leftWheel, int rightWheel, float steerAngle, CVector *contactSpeeds, CVector *contactPoints, float traction, float acceleration, float brake, bool bFront) +{ + bool driveWheels; + float suspensionBias; + + if(bFront){ + driveWheels = mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier); + suspensionBias = 2.0f*pHandling->fSuspensionBias; + }else{ + driveWheels = mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier); + suspensionBias = 2.0f*(1.0f-pHandling->fSuspensionBias); + + float fwdSpeed = DotProduct(m_vecMoveSpeed, GetForward()); + if(bIsHandbrakeOn && Abs(fwdSpeed) > 0.01f){ +#ifdef FIX_BUGS + // Not sure if this is needed, but brake usually has timestep as a factor + brake = 20000.0f * CTimer::GetTimeStepFix(); +#else + brake = 20000.0f; +#endif +/* + if(fwdSpeed > 0.1f && pHandling->Flags & HANDLING_HANDBRAKE_TYRE){ + m_fTireTemperature += 0.005*CTimer::GetTimeStep(); + if(m_fTireTemperature > 2.0f) + m_fTireTemperature = 2.0f; + } +*/ + }else if(driveWheels && m_doingBurnout){ + brake = 0.0f; + traction = 0.0f; + // BUG: missing timestep + ApplyTurnForce(contactPoints[leftWheel], -0.003f*m_fTurnMass*Min(3000.0f/m_fTurnMass, 1.0f)*m_fSteerAngle*GetRight()); + }else if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier)){ + traction *= m_fTireTemperature; + } + } + + // Wheels on ground + if(m_aWheelTimer[leftWheel] > 0.0f || m_aWheelTimer[rightWheel] > 0.0f){ + CVector wheelFwd, wheelRight; + float s, c; + bool canSteer = steerAngle > -100.0f; + if(canSteer){ + s = Sin(steerAngle); + c = Cos(steerAngle); + } + + bool neutralHandling = GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && (pHandling->Flags & HANDLING_NEUTRALHANDLING); + float brakeBias, tractionBias; + if(bFront){ + brakeBias = neutralHandling ? 1.0f : 2.0f*pHandling->fBrakeBias; + tractionBias = neutralHandling ? 1.0f : 2.0f*pHandling->fTractionBias; + }else{ + brakeBias = neutralHandling ? 1.0f : 2.0f*(1.0f-pHandling->fBrakeBias); + tractionBias = neutralHandling ? 1.0f : 2.0f*(1.0f-pHandling->fTractionBias); + } + + if(m_aWheelTimer[leftWheel] > 0.0f){ + float fThrust = driveWheels ? acceleration : 0.0f; + + wheelFwd = GetForward(); + wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[leftWheel].normal)*m_aWheelColPoints[leftWheel].normal; + wheelFwd.Normalise(); + wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[leftWheel].normal); + wheelRight.Normalise(); + if(canSteer){ + CVector tmp = c*wheelFwd - s*wheelRight; + wheelRight = s*wheelFwd + c*wheelRight; + wheelFwd = tmp; + } + + m_aWheelColPoints[leftWheel].surfaceA = SURFACE_WHEELBASE; + float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[leftWheel])*traction; + if(GetStatus() == STATUS_PLAYER){ + adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[leftWheel].surfaceB); + adhesion *= Min(suspensionBias*pHandling->fSuspensionForceLevel*4.0f*(1.0f-m_aSuspensionSpringRatio[leftWheel]), 2.0f); + } + tWheelState WheelState = m_aWheelState[leftWheel]; + if(Damage.GetWheelStatus(leftWheel) == WHEEL_STATUS_BURST) + ProcessWheel(wheelFwd, wheelRight, + contactSpeeds[leftWheel], contactPoints[leftWheel], + m_nWheelsOnGround, fThrust, + brake*brakeBias, + adhesion*tractionBias*Damage.m_fWheelDamageEffect, + leftWheel, + &m_aWheelRotation[leftWheel], + &WheelState, + WHEEL_STATUS_BURST); + else + ProcessWheel(wheelFwd, wheelRight, + contactSpeeds[leftWheel], contactPoints[leftWheel], + m_nWheelsOnGround, fThrust, + brake*brakeBias, + adhesion*tractionBias, + leftWheel, + &m_aWheelRotation[leftWheel], + &WheelState, + WHEEL_STATUS_OK); + + if(driveWheels && m_fGasPedal < 0.0f && WheelState == WHEEL_STATE_SPINNING) + m_aWheelState[leftWheel] = WHEEL_STATE_NORMAL; + else + m_aWheelState[leftWheel] = WheelState; + } + + if(m_aWheelTimer[rightWheel] > 0.0f){ + float fThrust = driveWheels ? acceleration : 0.0f; + + wheelFwd = GetForward(); + wheelFwd -= DotProduct(wheelFwd, m_aWheelColPoints[rightWheel].normal)*m_aWheelColPoints[rightWheel].normal; + wheelFwd.Normalise(); + wheelRight = CrossProduct(wheelFwd, m_aWheelColPoints[rightWheel].normal); + wheelRight.Normalise(); + if(canSteer){ + CVector tmp = c*wheelFwd - s*wheelRight; + wheelRight = s*wheelFwd + c*wheelRight; + wheelFwd = tmp; + } + + m_aWheelColPoints[rightWheel].surfaceA = SURFACE_WHEELBASE; + float adhesion = CSurfaceTable::GetAdhesiveLimit(m_aWheelColPoints[rightWheel])*traction; + if(GetStatus() == STATUS_PLAYER){ + adhesion *= CSurfaceTable::GetWetMultiplier(m_aWheelColPoints[rightWheel].surfaceB); + adhesion *= Min(suspensionBias*pHandling->fSuspensionForceLevel*4.0f*(1.0f-m_aSuspensionSpringRatio[rightWheel]), 2.0f); + } + tWheelState WheelState = m_aWheelState[rightWheel]; + if(Damage.GetWheelStatus(rightWheel) == WHEEL_STATUS_BURST) + ProcessWheel(wheelFwd, wheelRight, + contactSpeeds[rightWheel], contactPoints[rightWheel], + m_nWheelsOnGround, fThrust, + brake*brakeBias, + adhesion*tractionBias*Damage.m_fWheelDamageEffect, + rightWheel, + &m_aWheelRotation[rightWheel], + &WheelState, + WHEEL_STATUS_BURST); + else + ProcessWheel(wheelFwd, wheelRight, + contactSpeeds[rightWheel], contactPoints[rightWheel], + m_nWheelsOnGround, fThrust, + brake*brakeBias, + adhesion*tractionBias, + rightWheel, + &m_aWheelRotation[rightWheel], + &WheelState, + WHEEL_STATUS_OK); + + if(driveWheels && m_fGasPedal < 0.0f && WheelState == WHEEL_STATE_SPINNING) + m_aWheelState[rightWheel] = WHEEL_STATE_NORMAL; + else + m_aWheelState[rightWheel] = WheelState; + } + } + + if(!bFront){ + if(m_doingBurnout && driveWheels && + (m_aWheelState[CARWHEEL_REAR_LEFT] == WHEEL_STATE_SPINNING || m_aWheelState[CARWHEEL_REAR_RIGHT] == WHEEL_STATE_SPINNING)){ + m_fTireTemperature += 0.001f*CTimer::GetTimeStep(); + if(m_fTireTemperature > 3.0f) + m_fTireTemperature = 3.0f; + }else if(m_fTireTemperature > 1.0f){ + m_fTireTemperature = (m_fTireTemperature - 1.0f)*Pow(0.995f, CTimer::GetTimeStep()) + 1.0f; + } + } + + // Process wheels off ground + + if(!IsRealHeli()){ + if(m_aWheelTimer[leftWheel] <= 0.0f){ + if(driveWheels && acceleration != 0.0f){ + if(acceleration > 0.0f){ + if(m_aWheelSpeed[leftWheel] < 1.0f) + m_aWheelSpeed[leftWheel] -= 0.1f; + }else{ + if(m_aWheelSpeed[leftWheel] > -1.0f) + m_aWheelSpeed[leftWheel] += 0.05f; + } + }else{ + m_aWheelSpeed[leftWheel] *= 0.95f; + } + m_aWheelRotation[leftWheel] += m_aWheelSpeed[leftWheel]*CTimer::GetTimeStep(); + } + if(m_aWheelTimer[rightWheel] <= 0.0f){ + if(driveWheels && acceleration != 0.0f){ + if(acceleration > 0.0f){ + if(m_aWheelSpeed[rightWheel] < 1.0f) + m_aWheelSpeed[rightWheel] -= 0.1f; + }else{ + if(m_aWheelSpeed[rightWheel] > -1.0f) + m_aWheelSpeed[rightWheel] += 0.05f; + } + }else{ + m_aWheelSpeed[rightWheel] *= 0.95f; + } + m_aWheelRotation[rightWheel] += m_aWheelSpeed[rightWheel]*CTimer::GetTimeStep(); + } + } +} + void CAutomobile::Teleport(CVector pos) { @@ -1740,6 +1554,11 @@ CAutomobile::PreRender(void) int i, j, n; CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); + if(GetModelIndex() == MI_FIRETRUCK) + FireTruckControl(); + + CVehicle::PreRender(); + if(GetModelIndex() == MI_RHINO && m_aCarNodes[CAR_WINDSCREEN]){ // Rotate Rhino turret CMatrix m; @@ -2046,6 +1865,7 @@ CAutomobile::PreRender(void) if(DotProduct(GetForward(), camDist) > 0.0f || TheCamera.GetLookDirection() == LOOKING_LEFT || TheCamera.GetLookDirection() == LOOKING_RIGHT){ + /* CParticle::AddParticle(PARTICLE_HEATHAZE, pos1, CVector(0.0f, 0.0f, 0.0f)); if(pHandling->Flags & HANDLING_DBL_EXHAUST) CParticle::AddParticle(PARTICLE_HEATHAZE, pos2, CVector(0.0f, 0.0f, 0.0f)); @@ -2053,6 +1873,7 @@ CAutomobile::PreRender(void) CParticle::AddParticle(PARTICLE_HEATHAZE, pos1, CVector(0.0f, 0.0f, 0.0f)); if(pHandling->Flags & HANDLING_DBL_EXHAUST) CParticle::AddParticle(PARTICLE_HEATHAZE, pos2, CVector(0.0f, 0.0f, 0.0f)); + */ } } @@ -2202,8 +2023,7 @@ CAutomobile::PreRender(void) case MI_TAXI: case MI_CABBIE: - case MI_ZEBRA: - case MI_KAUFMAN: + case MI_BORGNINE: if(bTaxiLight){ CVector pos = GetPosition() + GetUp()*0.95f; CCoronas::RegisterCorona((uintptr)this + 21, @@ -3019,6 +2839,7 @@ CAutomobile::Render(void) CEntity::Render(); } +//--LCS: done int32 CAutomobile::ProcessEntityCollision(CEntity *ent, CColPoint *colpoints) { @@ -3090,9 +2911,13 @@ static float fMouseCentreRange = 0.35f; static float fMouseSteerSens = -0.0035f; static float fMouseCentreMult = 0.975f; +//--LCS: done except TODO void CAutomobile::ProcessControlInputs(uint8 pad) { + if(this == FindPlayerVehicle() && CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle) + return; + float speed = DotProduct(m_vecMoveSpeed, GetForward()); if(!CPad::GetPad(pad)->GetExitVehicle() || @@ -3103,6 +2928,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) bIsHandbrakeOn = true; // Steer left/right +#if 0 // LCS: removed, need mouse for free cam if(CCamera::m_bUseMouse3rdPerson && !CVehicle::m_bDisableMouseSteering){ if(CPad::GetPad(pad)->GetMouseX() != 0.0f){ m_fSteerInput += fMouseSteerSens*CPad::GetPad(pad)->GetMouseX(); @@ -3115,7 +2941,9 @@ CAutomobile::ProcessControlInputs(uint8 pad) 0.2f*CTimer::GetTimeStep(); nLastControlInput = 0; } - }else{ + }else +#endif + { m_fSteerInput += (-CPad::GetPad(pad)->GetSteeringLeftRight()/128.0f - m_fSteerInput)* 0.2f*CTimer::GetTimeStep(); nLastControlInput = 0; @@ -3208,6 +3036,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) // Brake if player isn't in control // BUG: game always uses pad 0 here + // TODO(LCS): more conditions here #ifdef FIX_BUGS if(CPad::GetPad(pad)->ArePlayerControlsDisabled()){ #else @@ -3930,6 +3759,7 @@ CAutomobile::DoDriveByShootings(void) } } +//--LCS: done void CAutomobile::DoHoverSuspensionRatios(void) { @@ -4345,7 +4175,7 @@ CAutomobile::dmgDrawCarCollidingParticles(const CVector &pos, float amount) CGeneral::GetRandomNumberInRange(0.1f, 0.25f)), nil, CGeneral::GetRandomNumberInRange(0.02f, 0.08f), - CVehicleModelInfo::ms_vehicleColourTable[m_currentColour1], + CVehicleModelInfo::mspInfo->ms_vehicleColourTable[m_currentColour1], CGeneral::GetRandomNumberInRange(-40.0f, 40.0f), 0, CGeneral::GetRandomNumberInRange(0.0f, 4.0f)); @@ -5026,6 +4856,7 @@ CAutomobile::ResetSuspension(void) } } +//--LCS: done void CAutomobile::SetupSuspensionLines(void) { @@ -5034,6 +4865,14 @@ CAutomobile::SetupSuspensionLines(void) CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); CColModel *colModel = mi->GetColModel(); + bool adjustColModel; + if(colModel->lines == nil){ + adjustColModel = true; + colModel->lines = new CColLine[4]; + colModel->numLines = 4; + }else + adjustColModel = false; + // Each suspension line starts at the uppermost wheel position // and extends down to the lowermost point on the tyre for(i = 0; i < 4; i++){ @@ -5073,6 +4912,21 @@ CAutomobile::SetupSuspensionLines(void) for(i = 0; i < colModel->numSpheres; i++) colModel->spheres[i].radius = 0.3f; } + + if(pHandling->Flags & HANDLING_FORCE_GRND_CLR && adjustColModel){ + // 0.25 is the min distance between ground and col spheres, everything above it is safe + float safePos = 0.25f - m_fHeightAboveRoad; + for(i = 0; i < colModel->numSpheres; i++){ + CColSphere *sph = &colModel->spheres[i]; + if(sph->center.z - sph->radius < safePos){ + // sphere extends too far down, so move it up + // or decrease the radius for bigger spheres + if(radius > 0.4f) + sph->radius = Max(sph->center.z - safePos, 0.4f); + sph->center.z = safePos + sph->radius; + } + } + } } // called on police cars diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index 16d86917..4f4ab500 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -26,6 +26,8 @@ public: float m_aSuspensionSpringRatioPrev[4]; float m_aWheelTimer[4]; // set to 4.0 when wheel is touching ground, then decremented float m_auto_unused1; + float m_fEngineInertiaVar1; + float m_fEngineInertiaVar2; eSkidmarkType m_aWheelSkidmarkType[4]; bool m_aWheelSkidmarkBloody[4]; bool m_aWheelSkidmarkUnk[4]; @@ -114,6 +116,7 @@ public: float GetHeightAboveRoad(void); void PlayCarHorn(void); + void ProcessCarWheelPair(int leftWheel, int rightWheel, float steerAngle, CVector *contactSpeeds, CVector *contactPoints, float traction, float acceleration, float brake, bool bFront); void FireTruckControl(void); void TankControl(void); void HydraulicControl(void); diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index a65b64d2..39612a15 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -80,9 +80,10 @@ CBike::CBike(int32 id, uint8 CreatedBy) m_bikeAnimType = ASSOCGRP_BIKE_STANDARD; break; case MI_SANCHEZ: + case MI_SANCHEZ2: m_bikeAnimType = ASSOCGRP_BIKE_DIRT; break; - default: assert(0 && "invalid bike model ID"); + default: m_bikeAnimType = ASSOCGRP_BIKE_STANDARD; //assert(0 && "invalid bike model ID"); // TODO } m_vehType = VEHICLE_TYPE_BIKE; @@ -110,7 +111,7 @@ CBike::CBike(int32 id, uint8 CreatedBy) m_fTurnMass = pHandling->fTurnMass; m_vecCentreOfMass = pHandling->CentreOfMass; m_vecCentreOfMass.z = 0.1f; - m_fAirResistance = pHandling->Dimension.x*pHandling->Dimension.z/m_fMass; + m_fAirResistance = pHandling->fDragMult > 0.01f ? pHandling->fDragMult*0.0005f : pHandling->fDragMult; m_fElasticity = 0.05f; m_fBuoyancy = pHandling->fBuoyancy; @@ -134,6 +135,8 @@ CBike::CBike(int32 id, uint8 CreatedBy) bIsOnFire = false; bWheelieCam = false; + bFixedColour = false; // <- figure out actual place (TODO) + m_fTireTemperature = 1.0f; m_fBrakeDestabilization = 0.0f; m_fVelocityChangeForAudio = 0; @@ -1723,7 +1726,7 @@ CBike::PreRender(void) TheCamera.GetLookDirection() == LOOKING_RIGHT) pos1 -= 0.2f*GetForward(); - CParticle::AddParticle(PARTICLE_HEATHAZE, pos1, CVector(0.0f, 0.0f, 0.0f)); + //CParticle::AddParticle(PARTICLE_HEATHAZE, pos1, CVector(0.0f, 0.0f, 0.0f)); } } } diff --git a/src/vehicles/Bike.h b/src/vehicles/Bike.h index 219d8872..611cd11d 100644 --- a/src/vehicles/Bike.h +++ b/src/vehicles/Bike.h @@ -75,6 +75,7 @@ public: uint8 bExtraSpeed : 1; // leaning forward uint8 bIsOnFire : 1; uint8 bWheelieCam : 1; + uint8 bFixedColour : 1; // <- figure out its actual place (TODO) int16 m_doingBurnout; float m_fTireTemperature; float m_fBrakeDestabilization; diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 73957107..a3aec041 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -72,7 +72,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner) m_fMass = pHandling->fMass; m_fTurnMass = pHandling->fTurnMass / 2.0f; m_vecCentreOfMass = pHandling->CentreOfMass; - m_fAirResistance = pHandling->Dimension.x * pHandling->Dimension.z / m_fMass; + m_fAirResistance = pHandling->fDragMult > 0.01f ? pHandling->fDragMult*0.0005f : pHandling->fDragMult; m_fElasticity = 0.1f; m_fBuoyancy = pHandling->fBuoyancy; m_fSteerAngle = 0.0f; @@ -682,6 +682,7 @@ CBoat::ProcessControl(void) } // Spray waterdrops on screen + /* if(TheCamera.GetLookingForwardFirstPerson() && FindPlayerVehicle() && FindPlayerVehicle()->IsBoat() && m_nDeltaVolumeUnderWater > 0 && numWaterDropOnScreen < 20){ CVector dropPos; @@ -712,7 +713,7 @@ CBoat::ProcessControl(void) if(CParticle::AddParticle(PARTICLE_WATERDROP, dropPos, dropDir, nil, CGeneral::GetRandomNumberInRange(0.1f, 0.15f), dropColor, 0, 0, frm)) numWaterDropOnScreen++; - } + }*/ if(m_fPrevVolumeUnderWater == 0.0f && m_fVolumeUnderWater > 0.0f && GetModelIndex() == MI_SKIMMER){ CVector splashDir(0.0f, 0.0f, 0.25f*speed); diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index 934ccb08..d4b58f05 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -13,7 +13,7 @@ #include "World.h" #include "SaveBuf.h" -#define MAX_DISTANCE_TO_FIND_CRANE (10.0f) +#define MAX_DISTANCE_TO_FIND_CRANE (100.0f) #define CRANE_UPDATE_RADIUS (300.0f) #define CRANE_MOVEMENT_PROCESSING_RADIUS (150.0f) #define CRUSHER_Z (-0.951f) @@ -67,7 +67,8 @@ void CCranes::InitCranes(void) } } } - for (CPtrNode* pNode = CWorld::GetBigBuildingList(LEVEL_MAINLAND).first; pNode; pNode = pNode->next) { + // TODO(LCS) + for (CPtrNode* pNode = CWorld::GetBigBuildingList(LEVEL_INDUSTRIAL).first; pNode; pNode = pNode->next) { CEntity* pEntity = (CEntity*)pNode->item; if (MODELID_CRANE_1 == pEntity->GetModelIndex() || MODELID_CRANE_2 == pEntity->GetModelIndex() || @@ -77,6 +78,7 @@ void CCranes::InitCranes(void) MODELID_CRANE_6 == pEntity->GetModelIndex()) AddThisOneCrane(pEntity); } + } void CCranes::AddThisOneCrane(CEntity* pEntity) @@ -469,7 +471,7 @@ bool CCranes::DoesMilitaryCraneHaveThisOneAlready(uint32 mi) case MI_FIRETRUCK: return (CarsCollectedMilitaryCrane & 1); case MI_AMBULAN: return (CarsCollectedMilitaryCrane & 2); case MI_ENFORCER: return (CarsCollectedMilitaryCrane & 4); - case MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8); + case (uint32)MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8); case MI_RHINO: return (CarsCollectedMilitaryCrane & 0x10); case MI_BARRACKS: return (CarsCollectedMilitaryCrane & 0x20); case MI_POLICE: return (CarsCollectedMilitaryCrane & 0x40); @@ -484,7 +486,7 @@ void CCranes::RegisterCarForMilitaryCrane(uint32 mi) case MI_FIRETRUCK: CarsCollectedMilitaryCrane |= 1; break; case MI_AMBULAN: CarsCollectedMilitaryCrane |= 2; break; case MI_ENFORCER: CarsCollectedMilitaryCrane |= 4; break; - case MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break; + case (uint32)MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break; case MI_RHINO: CarsCollectedMilitaryCrane |= 0x10; break; case MI_BARRACKS: CarsCollectedMilitaryCrane |= 0x20; break; case MI_POLICE: CarsCollectedMilitaryCrane |= 0x40; break; diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp index 8ba235b7..b74e7086 100644 --- a/src/vehicles/DamageManager.cpp +++ b/src/vehicles/DamageManager.cpp @@ -10,7 +10,8 @@ float G_aComponentDamage[] = { 2.5f, 1.25f, 3.2f, 1.4f, 2.5f, 2.8f, 0.5f }; CDamageManager::CDamageManager(void) { ResetDamageStatus(); - m_fWheelDamageEffect = 0.5f; + m_fWheelDamageEffect = 0.65f; + m_bSmashedDoorDoesntClose = false; field_18 = 1; } @@ -136,6 +137,8 @@ void CDamageManager::SetDoorStatus(int32 door, uint32 status) { m_doorStatus[door] = status; + if(m_bSmashedDoorDoesntClose && door != DOOR_BONNET && status == DOOR_STATUS_SMASHED) + m_doorStatus[door] = DOOR_STATUS_SWINGING; } int32 diff --git a/src/vehicles/DamageManager.h b/src/vehicles/DamageManager.h index 312006e3..1f836429 100644 --- a/src/vehicles/DamageManager.h +++ b/src/vehicles/DamageManager.h @@ -81,6 +81,7 @@ class CDamageManager public: float m_fWheelDamageEffect; + bool m_bSmashedDoorDoesntClose; uint8 m_engineStatus; uint8 m_wheelStatus[4]; uint8 m_doorStatus[6]; diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp index 1b3f9e8f..6e35c951 100644 --- a/src/vehicles/Door.cpp +++ b/src/vehicles/Door.cpp @@ -168,3 +168,58 @@ CTrainDoor::IsClosed(void) { return m_fPosn == RetTranslationWhenClosed(); } + +bool +CFerryDoor::IsInUse(void) +{ + float translationDifference = m_fPrevPosn - m_fPosn; + m_fPrevPosn = m_fPosn; + return Abs(translationDifference) > 0.002f; +} + +float +CFerryDoor::RetTranslationWhenClosed(void) +{ + if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn)) + return m_fClosedPosn; + else + return m_fOpenPosn; +} + +bool +CFerryDoor::IsClosed(void) +{ + return m_fPosn == RetTranslationWhenClosed(); +} + +float +CFerryDoor::RetTranslationWhenOpen(void) +{ + if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn)) + return m_fOpenPosn; + else + return m_fClosedPosn; +} + +bool +CFerryDoor::IsFullyOpen(void) +{ + if(Abs(m_fPosn) < Abs(RetTranslationWhenOpen()) - 0.5f) + return false; + return true; +} + +void +CFerryDoor::Open(float ratio) +{ + float open; + + m_fPrevPosn = m_fPosn; + open = RetTranslationWhenOpen(); + if(ratio < 1.0f){ + m_fPosn = open*ratio; + }else{ + m_nDoorState = DOORST_OPEN; + m_fPosn = open; + } +}
\ No newline at end of file diff --git a/src/vehicles/Door.h b/src/vehicles/Door.h index 567d3263..da5a3de0 100644 --- a/src/vehicles/Door.h +++ b/src/vehicles/Door.h @@ -67,3 +67,22 @@ public: float RetTranslationWhenOpen(void); void Open(float ratio); }; + + +class CFerryDoor { +private: + float m_fClosedPosn; + float m_fOpenPosn; + int8 m_nDirn; + int8 m_nAxis; + int8 m_nDoorState; + float m_fPosn; + float m_fPrevPosn; +public: + bool IsInUse(void); + float RetTranslationWhenClosed(void); + float RetTranslationWhenOpen(void); + bool IsClosed(void); + bool IsFullyOpen(void); + void Open(float ratio); +};
\ No newline at end of file diff --git a/src/vehicles/Ferry.cpp b/src/vehicles/Ferry.cpp new file mode 100644 index 00000000..89a0de9f --- /dev/null +++ b/src/vehicles/Ferry.cpp @@ -0,0 +1,832 @@ +#include "common.h" +#include "main.h" +#include "Ferry.h" + +#include "AudioManager.h" +#include "Camera.h" +#include "Coronas.h" +#include "FileMgr.h" +#include "General.h" +#include "Leeds.h" +#include "Particle.h" +#include "PlayerPed.h" +#include "Streaming.h" +#include "TempColModels.h" +#include "WaterLevel.h" +#include "World.h" + +CFerryInst* CFerry::mspInst; + +#define FERRY_SPEED (0.1f) +#define FERRY_SLOWDOWN_DISTANCE (50.0f) +#define FERRY_TIME_STOPPED_AT_STATION (10.0f) + +CFerry::CFerry(int32 id, uint8 owner) : CVehicle(owner) +{ + m_bPlayerArrivedHorn = false; + m_nTimeAlongPath = 0; + m_vehType = VEHICLE_TYPE_FERRY; + CVehicleModelInfo* mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id); + pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId); + SetModelIndex(id); + m_doors[0].Init(DEGTORAD(90.0f), 0.0f, 1, 0); + m_doors[1].Init(DEGTORAD(-95.0f), 0.0f, 1, 0); + m_doors[2].Init(DEGTORAD(-90.0f), 0.0f, 1, 0); + m_doors[3].Init(DEGTORAD(95.0f), 0.0f, 1, 0); + m_fTurnMass = 100000000.0f; + m_fAirResistance = 0.9994f; + m_fElasticity = 0.05f; + m_nNumMaxPassengers = 1; + m_fMass = 100000000.0f; + bInfiniteMass = true; + m_phy_flagA08 = true; + m_bFerryDocked = false; + SetStatus(STATUS_FERRY_MOVING); + bUsesCollision = true; + m_nDoorTimer = CTimer::GetTimeInMilliseconds(); + m_nDoorState = FERRY_DOOR_CLOSED; + m_bApproachingDock = false; + m_nSkipFerryStatus = 0; + m_nCollision = 0; + m_pDefaultColModel = mi->GetColModel(); + m_level = LEVEL_GENERIC; +} + +void CFerry::Init(void* pInstancePtr) +{ + mspInst = (CFerryInst*)pInstancePtr; + if (mspInst) + return; + // the following code should be wrapped in a define + mspInst = new CFerryInst(); + memset(mspInst, 0, sizeof(CFerryInst)); + for (int k = 0; k < NUM_FERRY_PATHS; k++) { + mspInst->pPathData[k] = new CFerryPath(); + mspInst->pPathData[k]->aLineBits = new CFerryInterpolationLine[NUM_FERRY_STATIONS * 4 + 2]; + + const char* filename = "Data\\PATHS\\FERRY1.DAT"; // actually base::cStringT<char> filename; filename += k+1; filename += ".DAT" + + bool readingFile = false; + int bp, lp; + int i, tmp; + CFerryPath* pPath = mspInst->pPathData[k]; + + if (pPath->aTrackNodes == nil) { + readingFile = true; + + CFileMgr::LoadFile(filename, work_buff, sizeof(work_buff), "r"); + *gString = '\0'; + for (bp = 0, lp = 0; work_buff[bp] != '\n'; bp++, lp++) + gString[lp] = work_buff[bp]; + bp++; +#ifdef FIX_BUGS + gString[lp] = '\0'; +#endif + sscanf(gString, "%d", &tmp); + pPath->NumTrackNodes = tmp; + pPath->aTrackNodes = new CFerryNode[tmp]; + + for (i = 0; i < pPath->NumTrackNodes; i++) { + *gString = '\0'; + for (lp = 0; work_buff[bp] != '\n'; bp++, lp++) + gString[lp] = work_buff[bp]; + bp++; +#ifdef FIX_BUGS + gString[lp] = '\0'; +#endif + sscanf(gString, "%f %f %f", &pPath->aTrackNodes[i].x, &pPath->aTrackNodes[i].y, &pPath->aTrackNodes[i].z); + pPath->aTrackNodes[i].z = 0.0f; + } + } + + // Calculate length of segments and track + float t = 0.0f; + for (i = 0; i < pPath->NumTrackNodes; i++) { + pPath->aTrackNodes[i].t = t; + t += Sqrt(SQR(pPath->aTrackNodes[(i + 1) % pPath->NumTrackNodes].x - pPath->aTrackNodes[i].x) + + (SQR(pPath->aTrackNodes[(i + 1) % pPath->NumTrackNodes].y - pPath->aTrackNodes[i].y))); + } + pPath->TotalLengthOfTrack = t; + + // Find correct z values + if (readingFile) { + CColPoint colpoint; + CEntity* entity; + for (i = 0; i < pPath->NumTrackNodes; i++) { + CVector p(pPath->aTrackNodes[i].x, pPath->aTrackNodes[i].y, pPath->aTrackNodes[i].z + 1.0f); + if (CWorld::ProcessVerticalLine(p, p.z - 0.5f, colpoint, entity, true, false, false, false, true, false, nil)) + pPath->aTrackNodes[i].z = colpoint.point.z; + pPath->aTrackNodes[i].z += 0.2f; + } + } + + int nStationIndices[NUM_FERRY_STATIONS]; + for (int i = 0; i < NUM_FERRY_STATIONS; i++) + nStationIndices[i] = 0; + int nCurrentStation = 0; + + for (i = 0; i < pPath->NumTrackNodes; i++) { + CFerryNode* pCurNode = &pPath->aTrackNodes[i]; + CFerryNode* pNextNode = (i + 1 < pPath->NumTrackNodes) ? &pPath->aTrackNodes[i + 1] : &pPath->aTrackNodes[0]; + CFerryNode* pPrevNode = (i - 1 >= 0) ? &pPath->aTrackNodes[i - 1] : &pPath->aTrackNodes[pPath->NumTrackNodes - 1]; + if (pCurNode->x - pNextNode->x > 0.0f && pPrevNode->x - pCurNode->x < 0.0f) + nStationIndices[nCurrentStation++] = i; + if (pCurNode->x - pNextNode->x < 0.0f && pPrevNode->x - pCurNode->x > 0.0f) + nStationIndices[nCurrentStation++] = i; + } + + float stationDists[NUM_FERRY_STATIONS]; + for (i = 0; i < NUM_FERRY_STATIONS; i++) + stationDists[i] = pPath->aTrackNodes[nStationIndices[i]].t; + + // Create animation for stopping at stations + float position = 0.0f; + float time = 0.0f; + int j = 0; + for (i = 0; i < NUM_FERRY_STATIONS; i++) { + // Start at full speed + pPath->aLineBits[j].type = FERRY_CRUISING; + pPath->aLineBits[j].time = time; + pPath->aLineBits[j].position = position; + pPath->aLineBits[j].speed = FERRY_SPEED; + pPath->aLineBits[j].acceleration = 0.0f; + j++; + // distance to next keyframe + float dist = (stationDists[i] - FERRY_SLOWDOWN_DISTANCE) - position; + time += dist / FERRY_SPEED; + position += dist; + + // Now slow down 50 units before stop + pPath->aLineBits[j].type = FERRY_SLOWING; + pPath->aLineBits[j].time = time; + pPath->aLineBits[j].position = position; + pPath->aLineBits[j].speed = FERRY_SPEED; + pPath->aLineBits[j].acceleration = -(FERRY_SPEED * FERRY_SPEED) / (4 * FERRY_SLOWDOWN_DISTANCE); + j++; + time += 2 * FERRY_SLOWDOWN_DISTANCE / FERRY_SPEED; + position += FERRY_SLOWDOWN_DISTANCE; // at station + + // stopping + pPath->aLineBits[j].type = FERRY_STOPPED; + pPath->aLineBits[j].time = time; + pPath->aLineBits[j].position = position; + pPath->aLineBits[j].speed = 0.0f; + pPath->aLineBits[j].acceleration = 0.0f; + j++; + time += FERRY_TIME_STOPPED_AT_STATION; + + // accelerate again + pPath->aLineBits[j].type = FERRY_ACCELERATING; + pPath->aLineBits[j].time = time; + pPath->aLineBits[j].position = position; + pPath->aLineBits[j].speed = 0.0f; + pPath->aLineBits[j].acceleration = (FERRY_SPEED * FERRY_SPEED) / (4 * FERRY_SLOWDOWN_DISTANCE); + j++; + time += 2 * FERRY_SLOWDOWN_DISTANCE / FERRY_SPEED; + position += FERRY_SLOWDOWN_DISTANCE; // after station + } + // last keyframe + pPath->aLineBits[j].type = FERRY_CRUISING; + pPath->aLineBits[j].time = time; + pPath->aLineBits[j].position = position; + pPath->aLineBits[j].speed = FERRY_SPEED; + pPath->aLineBits[j].acceleration = 0.0f; + j++; + pPath->TotalDurationOfTrack = time + (pPath->TotalLengthOfTrack - position) / FERRY_SPEED; + + // end + pPath->aLineBits[j].time = pPath->TotalDurationOfTrack; + } +} + +void CFerry::InitFerrys(void) +{ + printf("init ferrys\n"); +#ifdef GTA_NETWORK + if (gIsMultiplayerGame) + SetupForMultiplayer(); +#endif + if (!mspInst) + Init(nil); + for (int i = 0; i < NUM_FERRIES; i++) + mspInst->m_apFerries[i] = nil; + CStreaming::LoadAllRequestedModels(false); + CStreaming::RequestModel(MI_FERRY, 0); + CStreaming::LoadAllRequestedModels(false); +} + +void CFerry::SwitchFerryCollision(int type) +{ + for (int i = 0; i < NUM_FERRIES; i++) { + CFerry* pFerry = GetFerry(i); + if (pFerry && pFerry->m_nCollision != type) { + pFerry->m_nCollision = type; + CVehicleModelInfo* mi = pFerry->GetModelInfo(); + if (type == 1) + mi->SetColModel(&CTempColModels::ms_colModelFerryDocked); + else + mi->SetColModel(pFerry->m_pDefaultColModel, true); + } + } +} + +void CFerry::UpdateFerrys(void) +{ + int i, j; + float t, deltaT; + if (mspInst->m_bFerriesDisabled) + return; + for (i = 0; i < NUM_FERRIES; i++) { + CFerry* pFerry = GetFerry(i); + if (pFerry) { + pFerry->m_nTimeAlongPath += CTimer::GetTimeStepInMilliseconds(); + t = mspInst->pPathData[i/2]->TotalDurationOfTrack * (float)((pFerry->m_nTimeAlongPath + (i & 1) * 0x20000) & 0x3FFFF) / 0x40000; + // find current frame + for (j = 0; t > mspInst->pPathData[i / 2]->aLineBits[j + 1].time; j++); + + deltaT = t - mspInst->pPathData[i / 2]->aLineBits[j].time; + if (pFerry->m_bFerryDocked) { + if (mspInst->pPathData[i / 2]->aLineBits[j].type == FERRY_SLOWING) { + pFerry->m_nTimeAlongPath += (mspInst->pPathData[i / 2]->aLineBits[j + 1].time - mspInst->pPathData[i / 2]->aLineBits[j].time); + j++; + if (j > NUM_FERRY_STATIONS * 4 + 1) + j = 0; + pFerry->m_bApproachingDock = true; + if ((i & 1) == 0) { + GetFerry(i + 1)->m_bApproachingDock = true; + GetFerry(i + 1)->m_nTimeAlongPath += (mspInst->pPathData[i / 2]->aLineBits[j + 1].time - mspInst->pPathData[i / 2]->aLineBits[j].time); + } + else { + GetFerry(i - 1)->m_bApproachingDock = true; + GetFerry(i - 1)->m_nTimeAlongPath += (mspInst->pPathData[i / 2]->aLineBits[j + 1].time - mspInst->pPathData[i / 2]->aLineBits[j].time); + } + } + } + if (pFerry->m_nSkipFerryStatus == 1) { + float fDelta = 0.0f; + pFerry->m_nSkipFerryStatus = 2; + while (mspInst->pPathData[i / 2]->aLineBits[j].type != FERRY_STOPPED) { + fDelta += (mspInst->pPathData[i / 2]->aLineBits[j + 1].time - mspInst->pPathData[i / 2]->aLineBits[j].time); + j++; + if (j > NUM_FERRY_STATIONS * 4) + j = 0; + } + pFerry->m_nTimeAlongPath += fDelta; + pFerry->m_bApproachingDock = true; + if ((i & 1) == 0) { + GetFerry(i + 1)->m_bApproachingDock = true; + GetFerry(i + 1)->m_nTimeAlongPath += fDelta; + } + else { + GetFerry(i - 1)->m_bApproachingDock = true; + GetFerry(i - 1)->m_nTimeAlongPath += fDelta; + } + } + switch (mspInst->pPathData[i / 2]->aLineBits[j].type) { + case FERRY_STOPPED: + mspInst->m_afPositions[i] = mspInst->pPathData[i / 2]->aLineBits[j].position; + mspInst->m_afSpeeds[i] = 0.0f; + break; + case FERRY_CRUISING: + mspInst->m_afPositions[i] = mspInst->pPathData[i / 2]->aLineBits[j].position + mspInst->pPathData[i / 2]->aLineBits[j].speed * deltaT; + mspInst->m_afSpeeds[i] = (mspInst->pPathData[i / 2]->TotalDurationOfTrack * 1000.0f / 0x40000) * mspInst->pPathData[i / 2]->aLineBits[j].speed; + break; + case FERRY_SLOWING: + case FERRY_ACCELERATING: + pFerry->m_bApproachingDock = (mspInst->pPathData[i / 2]->aLineBits[j].type == FERRY_SLOWING); + mspInst->m_afPositions[i] = mspInst->pPathData[i / 2]->aLineBits[j].position + (mspInst->pPathData[i / 2]->aLineBits[j].speed + mspInst->pPathData[i / 2]->aLineBits[j].acceleration * deltaT) * deltaT; + mspInst->m_afSpeeds[i] = (mspInst->pPathData[i / 2]->TotalDurationOfTrack * 1000.0f / 0x40000) * (mspInst->pPathData[i / 2]->aLineBits[j].speed + 2 * mspInst->pPathData[i / 2]->aLineBits[j].acceleration * deltaT); + break; + } + } + } +} + +void CFerry::SetModelIndex(uint32 mi) +{ + CVehicle::SetModelIndex(mi); + for (int i = 0; i < NUM_FERRY_NODES; i++) + m_aFerryNodes[i] = nil; + CClumpModelInfo::FillFrameArray(GetClump(), m_aFerryNodes); +} + +void CFerry::PreRender(void) +{ + CVehicleModelInfo* mi = GetModelInfo(); + if (CGeneral::GetRandomTrueFalse()) + CParticle::AddParticle(PARTICLE_FERRY_CHIM_SMOKE, GetMatrix() * mi->m_positions[FERRY_POS_CHIM_LEFT], CVector(0.0f, 0.0f, 0.2f)); + CVector vVectorToCamera = GetPosition() - TheCamera.GetPosition(); + CVector vDirectionToCamera; + float fDistanceToCamera = vVectorToCamera.Magnitude(); + if (fDistanceToCamera == 0.0f) + vVectorToCamera = vDirectionToCamera = CVector(1.0f, 0.0f, 0.0f); + else + vDirectionToCamera = vVectorToCamera / fDistanceToCamera; + float dp = DotProduct(GetForward(), vDirectionToCamera); + if (dp < 0.0f) { + CVector vFrontLightPosition = GetMatrix() * mi->m_positions[FERRY_POS_LIGHT_FRONT]; + CVector vFrontLightPosition2 = vFrontLightPosition - 2 * mi->m_positions[FERRY_POS_LIGHT_FRONT].x * GetRight(); + float size = -dp + 1.0f; + float fIntensity = -dp * 0.4f + 0.2f; + if (dp < -0.9f && fDistanceToCamera < 35.0f) { + uint8 intensity = fIntensity * 255.0f; + CCoronas::RegisterCorona((uint32)(uintptr)this + 26, intensity, intensity, intensity, 255, vFrontLightPosition2, size, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_HEADLIGHTS, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); + CCoronas::RegisterCorona((uint32)(uintptr)this + 27, intensity, intensity, intensity, 255, vFrontLightPosition, size, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_HEADLIGHTS, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); + } + else { + uint8 intensity = fIntensity * 255.0f; + CCoronas::RegisterCorona((uint32)(uintptr)this + 26, intensity, intensity, intensity, 255, vFrontLightPosition2, size, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); + CCoronas::RegisterCorona((uint32)(uintptr)this + 27, intensity, intensity, intensity, 255, vFrontLightPosition, size, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); + } + } + CVector vRearLightPosition = GetMatrix() * mi->m_positions[FERRY_POS_LIGHT_REAR]; + CVector vRearLightPosition2 = vRearLightPosition - 2 * mi->m_positions[FERRY_POS_LIGHT_REAR].x * GetRight(); + CCoronas::RegisterCorona((uint32)(uintptr)this + 28, 255, 0, 0, 255, vRearLightPosition2, 1.0f, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); + CCoronas::RegisterCorona((uint32)(uintptr)this + 29, 255, 0, 0, 255, vRearLightPosition, 1.0f, 80.0f, CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); +} + +void CFerry::Render(void) +{ + m_bAlreadyRendered = true; + CEntity::Render(); +} + +void CFerry::RenderAllRemaning(void) +{ +#ifdef GTA_NETWORK + if (gIsMultiplayerGame) + return; +#endif + for (int i = 0; i < NUM_FERRIES; i++) { + CFerry* pFerry = GetFerry(i); + if (pFerry) { + if (!pFerry->m_bAlreadyRendered) + pFerry->Render(); + pFerry->m_bAlreadyRendered = false; + } + } +} + +void CFerry::FerryHitStuff(CPtrList& lst) +{ + for (CPtrNode* pNode = lst.first; pNode != nil; pNode = pNode->next) { + CPhysical* pEntity = (CPhysical*)pNode->item; + if (pEntity != this && Abs(GetPosition().x - pEntity->GetPosition().z) < 1.5f) + pEntity->bHitByTrain = true; + } +} + +void CFerry::ProcessControl(void) +{ + if (gbModelViewer) + return; + PruneWakeTrail(); + if (m_isFarAway && (m_nFerryId + CTimer::GetFrameCounter() & 0xF) != 0) + return; + CFerryPath* pPath = mspInst->pPathData[m_nFerryId / 2]; + float fPosition = mspInst->m_afPositions[m_nFerryId]; + float fSpeed = mspInst->m_afSpeeds[m_nFerryId]; + if (fPosition < 0.0f) + fPosition += pPath->TotalLengthOfTrack; + + CFerryNode* trackNodes = mspInst->pPathData[m_nFerryId / 2]->aTrackNodes; + int16 numTrackNodes = mspInst->pPathData[m_nFerryId / 2]->NumTrackNodes; + float totalLengthOfTrack = mspInst->pPathData[m_nFerryId / 2]->TotalLengthOfTrack; + float trackPosition = mspInst->m_afPositions[m_nFerryId]; + float trackSpeed = mspInst->m_afSpeeds[m_nFerryId]; + + float trackPositionRear = trackPosition; + if (trackPositionRear < 0.0f) + trackPositionRear += totalLengthOfTrack; + + // Advance current node to appropriate position + float pos1, pos2; + int nextTrackNode = m_nCurTrackNode + 1; + pos1 = trackNodes[m_nCurTrackNode].t; + if (nextTrackNode < numTrackNodes) + pos2 = trackNodes[nextTrackNode].t; + else { + nextTrackNode = 0; + pos2 = totalLengthOfTrack; + } + while (trackPositionRear < pos1 || trackPositionRear > pos2) { + m_nCurTrackNode = (m_nCurTrackNode + 1) % numTrackNodes; + nextTrackNode = m_nCurTrackNode + 1; + pos1 = trackNodes[m_nCurTrackNode].t; + if (nextTrackNode < numTrackNodes) + pos2 = trackNodes[nextTrackNode].t; + else { + nextTrackNode = 0; + pos2 = totalLengthOfTrack; + } + } + float dist = trackNodes[nextTrackNode].t - trackNodes[m_nCurTrackNode].t; + if (dist < 0.0f) + dist += totalLengthOfTrack; + float f = (trackPositionRear - trackNodes[m_nCurTrackNode].t) / dist; + CVector posRear = (1.0f - f) * CVector(trackNodes[m_nCurTrackNode].x, trackNodes[m_nCurTrackNode].y, trackNodes[m_nCurTrackNode].z) + + f * CVector(trackNodes[nextTrackNode].x, trackNodes[nextTrackNode].y, trackNodes[nextTrackNode].z); + + // Now same again for the front + float trackPositionFront = trackPositionRear + 20.0f; + if (trackPositionFront > totalLengthOfTrack) + trackPositionFront -= totalLengthOfTrack; + int curTrackNodeFront = m_nCurTrackNode; + int nextTrackNodeFront = curTrackNodeFront + 1; + pos1 = trackNodes[curTrackNodeFront].t; + if (nextTrackNodeFront < numTrackNodes) + pos2 = trackNodes[nextTrackNodeFront].t; + else { + nextTrackNodeFront = 0; + pos2 = totalLengthOfTrack; + } + while (trackPositionFront < pos1 || trackPositionFront > pos2) { + curTrackNodeFront = (curTrackNodeFront + 1) % numTrackNodes; + nextTrackNodeFront = curTrackNodeFront + 1; + pos1 = trackNodes[curTrackNodeFront].t; + if (nextTrackNodeFront < numTrackNodes) + pos2 = trackNodes[nextTrackNodeFront].t; + else { + nextTrackNodeFront = 0; + pos2 = totalLengthOfTrack; + } + } + dist = trackNodes[nextTrackNodeFront].t - trackNodes[curTrackNodeFront].t; + if (dist < 0.0f) + dist += totalLengthOfTrack; + f = (trackPositionFront - trackNodes[curTrackNodeFront].t) / dist; + CVector posFront = (1.0f - f) * CVector(trackNodes[curTrackNodeFront].x, trackNodes[curTrackNodeFront].y, trackNodes[curTrackNodeFront].z) + + f * CVector(trackNodes[nextTrackNodeFront].x, trackNodes[nextTrackNodeFront].y, trackNodes[nextTrackNodeFront].z); + + // Now set matrix + SetPosition((posRear + posFront) / 2.0f); + CVector fwd = posFront - posRear; + m_vecForwardSpeed = fwd; + fwd.Normalise(); + float dp = DotProduct(fwd, GetForward()); + if (Abs(dp) > 1.001f || Abs(dp) < 0.999f) { + CVector df = CrossProduct(fwd, GetForward()); + CMatrix tmp; + float angle; + if (m_nSkipFerryStatus == 2) { + m_nSkipFerryStatus = 0; + angle = (fwd.x < 0.0f && GetForward().x < 0.0f) ? PI - Acos(dp) : Acos(dp); + } + else { + angle = 0.001f; + } + if (dp > 0.0f && df.z < 0.0f || dp <= 0.0f && df.z > 0.0f) + angle = -angle; + tmp.SetRotateZ(angle); + fwd = Multiply3x3(GetForward(), tmp); + } + else + fwd = GetForward(); + CVector right = CrossProduct(fwd, CVector(0.0f, 0.0f, 1.0f)); + right.Normalise(); + CVector up = CrossProduct(right, fwd); + GetRight() = right; + GetUp() = up; + GetForward() = fwd; + + // Set speed + m_vecMoveSpeed = fwd * trackSpeed / 60.0f; + m_fSpeed = trackSpeed / 60.0f; + m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + + if (m_vecMoveSpeed.MagnitudeSqr() > 0.001f || !m_bApproachingDock) { + SetStatus(STATUS_FERRY_MOVING); + m_bFerryDocked = false; + m_bPlayerArrivedHorn = false; + m_nTimeLeftStation = CTimer::GetTimeInMilliseconds(); + } + else { + SetStatus(STATUS_FERRY_NOT_MOVING); + PlayArrivedHorn(); + m_bFerryDocked = true; + } + + m_isFarAway = !((posFront - TheCamera.GetPosition()).Magnitude2D() < sq(1000.0f)); + + switch (m_nDoorState) { + case FERRY_DOOR_CLOSED: + break; + case FERRY_DOOR_OPENING: + if (CTimer::GetTimeInMilliseconds() < m_nDoorTimer) { + OpenFerryDoor(1.0f - (m_nDoorTimer - CTimer::GetTimeInMilliseconds()) / 1000.0f); + } + else { + OpenFerryDoor(1.0f); + m_nDoorState = FERRY_DOOR_OPEN; + } + break; + + case FERRY_DOOR_OPEN: + break; + + case FERRY_DOOR_CLOSING: + if (CTimer::GetTimeInMilliseconds() < m_nDoorTimer) { + OpenFerryDoor((m_nDoorTimer - CTimer::GetTimeInMilliseconds()) / 1000.0f); + } + else { + OpenFerryDoor(0.0f); + m_nDoorState = FERRY_DOOR_CLOSED; + } + break; + } + + CVector wn = CWaterLevel::GetWaterNormal(GetPosition().x, GetPosition().y); + float fRollAngle = wn.x - GetUp().x; + if (fRollAngle < 0.0f) + fRollAngle = Max(-0.05f, fRollAngle); + else + fRollAngle = Min(0.05f, fRollAngle); + + CVector oldPos = GetPosition(); + SetPosition(-GetPosition()); + CMatrix tmp2; + tmp2.SetRotateX(fRollAngle); + tmp2 = tmp2 * GetMatrix(); + tmp2.SetTranslateOnly(oldPos); + GetMatrix() = tmp2; + + GetMatrix().UpdateRW(); + UpdateRwFrame(); + RemoveAndAdd(); + + bIsStuck = false; + bIsInSafePosition = true; + bWasPostponed = false; + + // request/remove model + if (m_isFarAway) { + if (m_rwObject) + DeleteRwObject(); + } + else if (CStreaming::HasModelLoaded(MI_FERRY)) { + if (m_rwObject == nil) { + m_modelIndex = -1; + SetModelIndex(MI_FERRY); + } + } + else { + if (FindPlayerCoors().z * GetPosition().z >= 0.0f) + CStreaming::RequestModel(MI_FERRY, STREAMFLAGS_DEPENDENCY); + } + + // Hit stuff + if (GetStatus() == STATUS_TRAIN_MOVING) { + CVector nfwd = GetForward() * GetColModel()->boundingBox.max.y; + if (m_vecForwardSpeed.x > 0.0f) + nfwd = -nfwd; + if ((m_nFerryId & 1) == 0) + nfwd = -nfwd; + + int x, xmin, xmax; + int y, ymin, ymax; + + CVector front = GetPosition() + nfwd + m_vecMoveSpeed * CTimer::GetTimeStep(); + if (!m_isFarAway && m_vecMoveSpeed.Magnitude2D() > 0.05f) + AddWakePoint(nfwd * 0.85f + GetPosition()); + + xmin = CWorld::GetSectorIndexX(front.x - 3.0f); + if (xmin < 0) xmin = 0; + xmax = CWorld::GetSectorIndexX(front.x + 3.0f); + if (xmax > NUMSECTORS_X - 1) xmax = NUMSECTORS_X - 1; + ymin = CWorld::GetSectorIndexY(front.y - 3.0f); + if (ymin < 0) ymin = 0; + ymax = CWorld::GetSectorIndexY(front.y + 3.0f); + if (ymax > NUMSECTORS_Y - 1) ymax = NUMSECTORS_X - 1; + + CWorld::AdvanceCurrentScanCode(); + + for (y = ymin; y <= ymax; y++) + for (x = xmin; x <= xmax; x++) { + CSector* s = CWorld::GetSector(x, y); + FerryHitStuff(s->m_lists[ENTITYLIST_VEHICLES]); + FerryHitStuff(s->m_lists[ENTITYLIST_VEHICLES_OVERLAP]); + FerryHitStuff(s->m_lists[ENTITYLIST_PEDS]); + FerryHitStuff(s->m_lists[ENTITYLIST_PEDS_OVERLAP]); + } + } +} + +void CFerry::OpenFerryDoor(float ratio) +{ + if (!m_rwObject) + return; + + int door1 = 0; + int door2 = 1; + if (!m_bUseFrontDoor) { + door1 = 2; + door2 = 3; + } + int node1 = m_bUseFrontDoor ? FERRY_DOOR_FRONT : FERRY_DOOR_BACK; + int node2 = m_bUseFrontDoor ? FERRY_RAMP_FRONT : FERRY_RAMP_BACK; + CMatrix doorL(RwFrameGetMatrix(m_aFerryNodes[node1])); + CMatrix doorR(RwFrameGetMatrix(m_aFerryNodes[node2])); + CVector posL = doorL.GetPosition(); + CVector posR = doorR.GetPosition(); + + bool isClosed = m_doors[0].IsClosed(); // useless + + m_doors[door1].Open(ratio); + m_doors[door2].Open(ratio); + + doorL.SetRotateXOnly(m_doors[door1].m_fAngle); + doorR.SetRotateXOnly(m_doors[door2].m_fAngle); + + doorL.UpdateRW(); + doorR.UpdateRW(); +} + +CVector CFerry::GetBoardingSpace(CFerry::eSpaceUse use, CFerry::eSpaceStyle style, uint8 position) +{ + CVehicleModelInfo* pModelInfo = GetModelInfo(); + CVector space; + if (m_nFerryId & 1) { + if (style == FERRY_SPACE_STYLE_0) + style = FERRY_SPACE_STYLE_1; + else + style = FERRY_SPACE_STYLE_0; + } + switch (use) { + case FERRY_SPACE_PED: + space = pModelInfo->m_positions[FERRY_POS_PED_POINT]; + break; + case FERRY_SPACE_CAR: + space = pModelInfo->m_positions[FERRY_POS_CAR1 + position]; + break; + } + switch (style) { + case FERRY_SPACE_STYLE_0: + space = GetMatrix() * space; + break; + case FERRY_SPACE_STYLE_1: + space = GetMatrix() * space - (2 * space.x) * GetRight() - (2 * space.y) * GetForward(); + break; + } + return space; +} + +CFerry* CFerry::GetClosestFerry(float x, float y) +{ + int closest = -1; + float mindist = 9999.9f; + for (int i = 0; i < NUM_FERRIES; i++) { + CFerry* pFerry = GetFerry(i); + if (pFerry) { + float dist = ((CVector2D)pFerry->GetPosition() - CVector2D(x, y)).Magnitude(); + if (dist < 300.0f && dist < mindist) { + mindist = dist; + closest = i; + } + } + } + if (closest == -1) + return nil; + return GetFerry(closest); +} + +bool CFerry::IsDocked(void) +{ + return m_bFerryDocked; +} + +void CFerry::OpenDoor(void) +{ + printf("opening the ferry door\n"); + m_nDoorState = FERRY_DOOR_OPENING; + m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 10000; + CVehicleModelInfo* pModelInfo = GetModelInfo(); + CVector2D vPlayerPos = FindPlayerPed()->GetPosition(); + float fDistToCar4 = (vPlayerPos - GetMatrix() * pModelInfo->m_positions[FERRY_POS_CAR4]).Magnitude(); + float fDistToCar1 = (vPlayerPos - GetMatrix() * pModelInfo->m_positions[FERRY_POS_CAR1]).Magnitude(); + m_bUseFrontDoor = true; + if (fDistToCar4 < fDistToCar1) + m_bUseFrontDoor = false; + // AudioManager.DirectlyEnqueueSample(0xb8,0,0,1,0x5622,0x7f,0x14,0); // TODO +} + +void CFerry::CloseDoor(void) +{ + printf("closing the ferry door\n"); + m_nDoorState = FERRY_DOOR_CLOSING; + m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 10000; + // AudioManager.DirectlyEnqueueSample(0xb8, 0, 0, 1, 0x5622, 0x7f, 0x14, 0); // TODO +} + +bool CFerry::IsDoorOpen(void) +{ + return m_nDoorState == FERRY_DOOR_OPEN; +} + +bool CFerry::IsDoorClosed(void) +{ + return m_nDoorState == FERRY_DOOR_CLOSED; +} + +void CFerry::CompleteDorrMovement(void) +{ + m_nDoorTimer = 0; +} + +void CFerry::DissableFerryPath(int) +{ +} + +void CFerry::EnableFerryPath(int path) +{ + CStreaming::LoadAllRequestedModels(false); + CStreaming::RequestModel(MI_FERRY, 0); + CStreaming::LoadAllRequestedModels(false); + for (int i = path * 2; i < path * 2 + 2; i++) { + CFerry* pFerry = new CFerry(MI_FERRY, PERMANENT_VEHICLE); + bool bDirect = i & 1; + mspInst->m_apFerries[i] = pFerry; + pFerry->SetPosition(0.0f, 0.0f, 0.0f); + pFerry->SetStatus(STATUS_ABANDONED); + pFerry->bIsLocked = true; + pFerry->SetHeading(bDirect ? HALFPI : 3 * HALFPI); + pFerry->m_nFerryId = i; + pFerry->m_nCurTrackNode = 0; + CWorld::Add(pFerry); + } +} + +void CFerry::SkipFerryToNextDock(void) +{ + m_nSkipFerryStatus = 1; +} + +void CFerry::PruneWakeTrail(void) +{ + int16 num_remaining = 0; + for (int i = 0; i < NUM_WAKE_POINTS; i++) { + if (mspInst->m_afWakePointTimer[m_nFerryId][i] <= 0.0f) + break; + if (mspInst->m_afWakePointTimer[m_nFerryId][i] <= CTimer::GetTimeStep()) { + mspInst->m_afWakePointTimer[m_nFerryId][i] = 0.0f; + break; + } + mspInst->m_afWakePointTimer[m_nFerryId][i] -= CTimer::GetTimeStep(); + num_remaining++; + } + mspInst->m_anNumWakePoints[m_nFerryId] = num_remaining; +} + +void CFerry::AddWakePoint(CVector point) +{ + if (mspInst->m_afWakePointTimer[m_nFerryId][0] > 0.0f) { + int nNewWakePoints = Min(NUM_WAKE_POINTS - 1, mspInst->m_anNumWakePoints[m_nFerryId]); + for (int i = 0; i < nNewWakePoints; i++) { + mspInst->m_avWakePoints[m_nFerryId][i + 1] = mspInst->m_avWakePoints[m_nFerryId][i]; + mspInst->m_afWakePointTimer[m_nFerryId][i + 1] = mspInst->m_afWakePointTimer[m_nFerryId][i]; + } + } + mspInst->m_avWakePoints[m_nFerryId][0] = point; + mspInst->m_afWakePointTimer[m_nFerryId][0] = 900.0f; // TODO: define + mspInst->m_anNumWakePoints[m_nFerryId] += 1; +} + +void CFerry::PlayArrivedHorn(void) +{ + if (m_bPlayerArrivedHorn) + return; + m_bPlayerArrivedHorn = true; + float fDistToCamera = (GetPosition() - TheCamera.GetPosition()).Magnitude(); + if (fDistToCamera < 200.0f) { + uint8 volume = (200.0f - fDistToCamera) / 200.0f * 127; + // AudioManager.DirectlyEnqueueSample(0x32, 0, 0, 1, 18000, volume, 0x32, 0); // TODO + } +} + +CVector CFerry::GetNearestDoor(CVector) +{ + return CVector(0.0f, 0.0f, 1.0f); +} + +void CFerry::SetupForMultiplayer(void) +{ + for (int i = 0; i < NUM_FERRIES; i++) + mspInst->m_apFerries[i] = nil; + printf("setting up the ferrys for multiplayer\n"); + CStreaming::SetModelIsDeletable(MI_FERRY); +} + +void CFerry::Write(base::cRelocatableChunkWriter& writer) +{ + writer.AllocateRaw(mspInst, sizeof(*mspInst), 4); + if (!mspInst) + return; + for (int i = 0; i < NUM_FERRY_PATHS; i++) { + writer.AllocateRaw(mspInst->pPathData[i], sizeof(*mspInst->pPathData[i]), 4); + writer.AddPatch(&mspInst->pPathData[i]); + writer.AllocateRaw(mspInst->pPathData[i]->aTrackNodes, mspInst->pPathData[i]->NumTrackNodes * sizeof(CFerryNode), 4); + writer.AddPatch(&mspInst->pPathData[i]->aTrackNodes); + writer.AllocateRaw(mspInst->pPathData[i]->aLineBits, (NUM_FERRY_STATIONS * 4 + 2) * sizeof(CFerryInterpolationLine), 4); + writer.AddPatch(&mspInst->pPathData[i]->aTrackNodes); + } +} + diff --git a/src/vehicles/Ferry.h b/src/vehicles/Ferry.h new file mode 100644 index 00000000..f7936da9 --- /dev/null +++ b/src/vehicles/Ferry.h @@ -0,0 +1,143 @@ +#pragma once + +#include "Vehicle.h" +#include "Door.h" + +enum eFerryNodes +{ + FERRY_DOOR_FRONT = 1, + FERRY_RAMP_FRONT, + FERRY_DOOR_BACK, + FERRY_RAMP_BACK, + NUM_FERRY_NODES +}; + +enum { + NUM_FERRY_STATIONS = 2, + NUM_FERRIES = NUM_FERRY_PATHS * 2, + NUM_WAKE_POINTS = 64 +}; + +enum { + FERRY_STOPPED = 0, + FERRY_CRUISING, + FERRY_SLOWING, + FERRY_ACCELERATING +}; + +enum +{ + FERRY_DOOR_CLOSED = 0, + FERRY_DOOR_OPENING, + FERRY_DOOR_OPEN, + FERRY_DOOR_CLOSING +}; + +struct CFerryNode +{ + float x; + float y; + float z; + float t; +}; + +struct CFerryInterpolationLine +{ + uint8 type; + float time; // when does this keyframe start + // initial values at start of frame + float position; + float speed; + float acceleration; +}; + +struct CFerryPath +{ + float TotalLengthOfTrack; + float TotalDurationOfTrack; + int16 NumTrackNodes; + CFerryNode* aTrackNodes; + CFerryInterpolationLine* aLineBits; +}; + +class CFerry; + +class CFerryInst +{ +public: + CFerryPath* pPathData[NUM_FERRY_PATHS]; + float m_afPositions[NUM_FERRIES]; + float m_afSpeeds[NUM_FERRIES]; + CFerry* m_apFerries[NUM_FERRIES]; + bool m_bFerriesDisabled; + uint16 m_anNumWakePoints[NUM_FERRIES]; + CVector2D m_avWakePoints[NUM_FERRIES][NUM_WAKE_POINTS]; + float m_afWakePointTimer[NUM_FERRIES][NUM_WAKE_POINTS]; +}; + +class CFerry : public CVehicle +{ +public: + int16 m_nFerryId; + uint16 m_isFarAway; + uint16 m_nCurTrackNode; + float m_fSpeed; + bool m_bFerryDocked; + uint32 m_nDoorTimer; + uint32 m_nTimeLeftStation; + int16 m_nDoorState; + bool m_bApproachingDock; + uint8 m_nSkipFerryStatus; + uint32 m_nTimeAlongPath; + bool m_bUseFrontDoor; + CVector m_vecForwardSpeed; + CColModel* m_pDefaultColModel; + uint8 m_nCollision; + CDoor m_doors[4]; + RwFrame* m_aFerryNodes[NUM_FERRY_NODES]; + bool m_bAlreadyRendered; + bool m_bPlayerArrivedHorn; + + static CFerryInst* mspInst; + + enum eSpaceUse { + FERRY_SPACE_PED = 0, + FERRY_SPACE_CAR + }; + enum eSpaceStyle { + FERRY_SPACE_STYLE_0 = 0, + FERRY_SPACE_STYLE_1 + }; + void Render(void); + static void EnableFerryPath(int); + CFerry(int32, uint8); + void SetModelIndex(uint32); + static void InitFerrys(void); + static void Init(void*); + void ProcessControl(void); + void PlayArrivedHorn(void); + void AddWakePoint(CVector); + void PruneWakeTrail(void); + void SkipFerryToNextDock(void); + static void DissableFerryPath(int); + void CompleteDorrMovement(void); + bool IsDoorOpen(void); + void CloseDoor(void); + bool IsDocked(void); + static CFerry* GetClosestFerry(float, float); + CVector GetBoardingSpace(CFerry::eSpaceUse, CFerry::eSpaceStyle, uint8); + CVector GetNearestDoor(CVector); + void OpenFerryDoor(float); + void FerryHitStuff(CPtrList&); + static void RenderAllRemaning(void); + static void UpdateFerrys(void); + static void SwitchFerryCollision(int); + void SetupForMultiplayer(void); + void Write(base::cRelocatableChunkWriter&); + virtual void OpenDoor(void); + void PreRender(void); + virtual bool IsDoorClosed(void); + + static CFerry* GetFerry(int i) { return mspInst ? mspInst->m_apFerries[i] : nil; } + static void SetFerriesDisabled(bool disabled) { mspInst->m_bFerriesDisabled = disabled; } +}; diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp index 8438c5c9..b5dc7658 100644 --- a/src/vehicles/HandlingMgr.cpp +++ b/src/vehicles/HandlingMgr.cpp @@ -42,6 +42,7 @@ const char VehicleNames[NUMHANDLINGS][14] = { "RHINO", "BARRACKS", "TRAIN", + "FERRY", "HELI", "DODO", "COACH", @@ -54,66 +55,40 @@ const char VehicleNames[NUMHANDLINGS][14] = { "DEADDODO", "FLATBED", "YANKEE", - "GOLFCART", - "VOODOO", - "WASHING", - "CUBAN", - "ROMERO", - "PACKER", - "ADMIRAL", - "GANGBUR", - "ZEBRA", - "TOPFUN", - "GLENDALE", - "OCEANIC", - "HERMES", - "SABRE1", - "SABRETUR", - "PHEONIX", - "WALTON", - "REGINA", - "COMET", - "DELUXO", - "BURRITO", - "SPAND", - "BAGGAGE", - "KAUFMAN", - "RANCHER", - "FBIRANCH", - "VIRGO", - "GREENWOO", - "HOTRING", - "SANDKING", - "BLISTAC", - "BOXVILLE", - "BENSON", - "DESPERAD", - "LOVEFIST", - "BLOODRA", - "BLOODRB", + "BLISTA", + "BELLYUP", + "MRWONGS", + "YARDIE", + "YAKUZA", + "DIABLOS", + "COLUMB", + "HOODS", + "PANLANT", + "BORGNINE", + "CAMPVAN", + "BALLOT", + "SPIDER", + "SHELBY", + "PONTIAC", + "ESPRIT", + "MINI", + "HOTROD", + "SINDACCO", + "FORELLI", "BIKE", "MOPED", "DIRTBIKE", "ANGEL", + "DIRTBIK2", + "ANGE2", "FREEWAY", "PREDATOR", "SPEEDER", "REEFER", - "RIO", - "SQUALO", - "TROPIC", - "COASTGRD", - "DINGHY", - "MARQUIS", - "CUPBOAT", - "SEAPLANE", - "SPARROW", - "SEASPAR", "MAVERICK", "COASTMAV", "POLMAV", "HUNTER", - "RCBARON", "RCGOBLIN", "RCCOPTER" }; @@ -138,18 +113,17 @@ void cHandlingDataMgr::LoadHandlingData(void) { char *start, *end; - char line[201]; // weird value + char line[300]; char delim[4]; // not sure char *word; int field, handlingId; - int keepGoing; tHandlingData *handling; tFlyingHandlingData *flyingHandling; tBoatHandlingData *boatHandling; tBikeHandlingData *bikeHandling; CFileMgr::SetDir("DATA"); - CFileMgr::LoadFile(HandlingFilename, work_buff, sizeof(work_buff), "r"); + ssize_t filesz = CFileMgr::LoadFile(HandlingFilename, work_buff, sizeof(work_buff), "r"); CFileMgr::SetDir(""); start = (char*)work_buff; @@ -158,21 +132,18 @@ cHandlingDataMgr::LoadHandlingData(void) flyingHandling = nil; boatHandling = nil; bikeHandling = nil; - keepGoing = 1; - while(keepGoing){ + while(start < (char*)&work_buff[filesz]){ // find end of line while(*end != '\n') end++; // get line strncpy(line, start, end - start); line[end - start] = '\0'; - start = end+1; - end = start+1; // yeah, this is kinda crappy if(strcmp(line, ";the end") == 0) - keepGoing = 0; + break; else if(line[0] != ';'){ if(line[0] == '!'){ // Bike data @@ -286,19 +257,19 @@ cHandlingDataMgr::LoadHandlingData(void) handling->nIdentifier = (tVehicleType)handlingId; break; case 1: handling->fMass = atof(word); break; - case 2: handling->Dimension.x = atof(word); break; - case 3: handling->Dimension.y = atof(word); break; - case 4: handling->Dimension.z = atof(word); break; - case 5: handling->CentreOfMass.x = atof(word); break; - case 6: handling->CentreOfMass.y = atof(word); break; - case 7: handling->CentreOfMass.z = atof(word); break; - case 8: handling->nPercentSubmerged = atoi(word); break; - case 9: handling->fTractionMultiplier = atof(word); break; - case 10: handling->fTractionLoss = atof(word); break; - case 11: handling->fTractionBias = atof(word); break; - case 12: handling->Transmission.nNumberOfGears = atoi(word); break; - case 13: handling->Transmission.fMaxVelocity = atof(word); break; - case 14: handling->Transmission.fEngineAcceleration = atof(word) * 0.4; break; + case 2: handling->fTurnMass = atof(word); break; + case 3: handling->fDragMult = atof(word); break; + case 4: handling->CentreOfMass.x = atof(word); break; + case 5: handling->CentreOfMass.y = atof(word); break; + case 6: handling->CentreOfMass.z = atof(word); break; + case 7: handling->nPercentSubmerged = atoi(word); break; + case 8: handling->fTractionMultiplier = atof(word); break; + case 9: handling->fTractionLoss = atof(word); break; + case 10: handling->fTractionBias = atof(word); break; + case 11: handling->Transmission.nNumberOfGears = atoi(word); break; + case 12: handling->Transmission.fMaxVelocity = atof(word); break; + case 13: handling->Transmission.fEngineAcceleration = atof(word) * 0.4; break; + case 14: handling->Transmission.fEngineInertia = atof(word); break; case 15: handling->Transmission.nDriveType = word[0]; break; case 16: handling->Transmission.nEngineType = word[0]; break; case 17: handling->fBrakeDeceleration = atof(word); break; @@ -307,25 +278,28 @@ cHandlingDataMgr::LoadHandlingData(void) case 20: handling->fSteeringLock = atof(word); break; case 21: handling->fSuspensionForceLevel = atof(word); break; case 22: handling->fSuspensionDampingLevel = atof(word); break; - case 23: handling->fSeatOffsetDistance = atof(word); break; - case 24: handling->fCollisionDamageMultiplier = atof(word); break; - case 25: handling->nMonetaryValue = atoi(word); break; - case 26: handling->fSuspensionUpperLimit = atof(word); break; - case 27: handling->fSuspensionLowerLimit = atof(word); break; - case 28: handling->fSuspensionBias = atof(word); break; - case 29: handling->fSuspensionAntidiveMultiplier = atof(word); break; - case 30: + // case 23: // fSuspensionHighSpdComDamp unused + case 24: handling->fSuspensionUpperLimit = atof(word); break; + case 25: handling->fSuspensionLowerLimit = atof(word); break; + case 26: handling->fSuspensionBias = atof(word); break; + case 27: handling->fSuspensionAntidiveMultiplier = atof(word); break; + case 28: handling->fSeatOffsetDistance = atof(word); break; + case 29: handling->fCollisionDamageMultiplier = atof(word); break; + case 30: handling->nMonetaryValue = atoi(word); break; + case 31: sscanf(word, "%x", &handling->Flags); - handling->Transmission.Flags = handling->Flags; + // handling->Transmission.Flags = handling->Flags; break; - case 31: handling->FrontLights = atoi(word); break; - case 32: handling->RearLights = atoi(word); break; + case 32: handling->FrontLights = atoi(word); break; + case 33: handling->RearLights = atoi(word); break; } field++; } ConvertDataToGameUnits(handling); } } + start = end+1; + end = start+1; } } @@ -353,12 +327,9 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling) handling->Transmission.fEngineAcceleration *= 1.0f/(50.0f*50.0f); handling->Transmission.fMaxVelocity *= 1000.0f/(60.0f*60.0f * 50.0f); handling->fBrakeDeceleration *= 1.0f/(50.0f*50.0f); - handling->fTurnMass = (sq(handling->Dimension.x) + sq(handling->Dimension.y)) * handling->fMass / 12.0f; - if(handling->fTurnMass < 10.0f) - handling->fTurnMass *= 5.0f; - handling->fInvMass = 1.0f/handling->fMass; - handling->fCollisionDamageMultiplier *= 2000.0f/handling->fMass; - handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * GRAVITY*handling->fMass; + handling->fInvMass = 1.0f/handling->GetMass(); + handling->fCollisionDamageMultiplier = handling->GetCollisionDamageMultiplier() * 2000.0f/handling->GetMass(); + handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * GRAVITY*handling->GetMass(); // Don't quite understand this. What seems to be going on is that // we calculate a drag (air resistance) deceleration for a given velocity and @@ -371,10 +342,13 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling) velocity -= 0.01f; // what's the 1/6? a = handling->Transmission.fEngineAcceleration/6.0f; - // no density or drag coefficient here... - float a_drag = 0.5f*SQR(velocity) * handling->Dimension.x*handling->Dimension.z / handling->fMass; - // can't make sense of this... maybe v - v/(drag + 1) ? but that doesn't make so much sense either - b = -velocity * (1.0f/(a_drag + 1.0f) - 1.0f); + // no idea what's happening here + float drag; + if(handling->fDragMult < 0.01f) + drag = 1.0f - 1.0f/(SQR(velocity)*handling->fDragMult + 1.0f); + else + drag = 0.0005f*handling->fDragMult * velocity; + b = velocity * drag; } if(handling->nIdentifier == HANDLING_RCBANDIT){ @@ -420,15 +394,15 @@ cHandlingDataMgr::GetHandlingId(const char *name) tFlyingHandlingData* cHandlingDataMgr::GetFlyingPointer(uint8 id) { - if(id >= HANDLING_SEAPLANE && id <= HANDLING_RCCOPTER) - return &FlyingHandlingData[id-HANDLING_SEAPLANE]; + if(id >= HANDLING_MAVERICK && id <= HANDLING_RCCOPTER) + return &FlyingHandlingData[id-HANDLING_MAVERICK]; return &FlyingHandlingData[0]; } tBoatHandlingData* cHandlingDataMgr::GetBoatPointer(uint8 id) { - if(id >= HANDLING_PREDATOR && id <= HANDLING_SEAPLANE) + if(id >= HANDLING_PREDATOR && id <= HANDLING_MAVERICK) return &BoatHandlingData[id-HANDLING_PREDATOR]; return &BoatHandlingData[0]; } diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h index 8d290f7d..2d49761c 100644 --- a/src/vehicles/HandlingMgr.h +++ b/src/vehicles/HandlingMgr.h @@ -36,6 +36,7 @@ enum tVehicleType HANDLING_RHINO, HANDLING_BARRACKS, HANDLING_TRAIN, + HANDLING_FERRY, HANDLING_HELI, HANDLING_DODO, HANDLING_COACH, @@ -48,76 +49,51 @@ enum tVehicleType HANDLING_DEADDODO, HANDLING_FLATBED, HANDLING_YANKEE, - HANDLING_GOLFCART, - HANDLING_VOODOO, - HANDLING_WASHING, - HANDLING_CUBAN, - HANDLING_ROMERO, - HANDLING_PACKER, - HANDLING_ADMIRAL, - HANDLING_GANGBUR, - HANDLING_ZEBRA, - HANDLING_TOPFUN, - HANDLING_GLENDALE, - HANDLING_OCEANIC, - HANDLING_HERMES, - HANDLING_SABRE1, - HANDLING_SABRETUR, - HANDLING_PHEONIX, - HANDLING_WALTON, - HANDLING_REGINA, - HANDLING_COMET, - HANDLING_DELUXO, - HANDLING_BURRITO, - HANDLING_SPAND, - HANDLING_BAGGAGE, - HANDLING_KAUFMAN, - HANDLING_RANCHER, - HANDLING_FBIRANCH, - HANDLING_VIRGO, - HANDLING_GREENWOO, - HANDLING_HOTRING, - HANDLING_SANDKING, - HANDLING_BLISTAC, - HANDLING_BOXVILLE, - HANDLING_BENSON, - HANDLING_DESPERAD, - HANDLING_LOVEFIST, - HANDLING_BLOODRA, - HANDLING_BLOODRB, + HANDLING_BLISTA, + HANDLING_BELLYUP, + HANDLING_MRWONGS, + HANDLING_YARDIE, + HANDLING_YAKUZA, + HANDLING_DIABLOS, + HANDLING_COLUMB, + HANDLING_HOODS, + HANDLING_PANLANT, + HANDLING_BORGNINE, + HANDLING_CAMPVAN, + HANDLING_BALLOT, + HANDLING_SPIDER, + HANDLING_SHELBY, + HANDLING_PONTIAC, + HANDLING_ESPRIT, + HANDLING_MINI, + HANDLING_HOTROD, + HANDLING_SINDACCO, + HANDLING_FORELLI, HANDLING_BIKE, HANDLING_MOPED, HANDLING_DIRTBIKE, HANDLING_ANGEL, + HANDLING_DIRTBIK2, + HANDLING_ANGE2, HANDLING_FREEWAY, HANDLING_PREDATOR, HANDLING_SPEEDER, HANDLING_REEFER, - HANDLING_RIO, - HANDLING_SQUALO, - HANDLING_TROPIC, - HANDLING_COASTGRD, - HANDLING_DINGHY, - HANDLING_MARQUIS, - HANDLING_CUPBOAT, - HANDLING_SEAPLANE, // both boat and plane! - HANDLING_SPARROW, - HANDLING_SEASPAR, + HANDLING_MAVERICK, HANDLING_COASTMAV, HANDLING_POLMAV, HANDLING_HUNTER, - HANDLING_RCBARON, HANDLING_RCGOBLIN, HANDLING_RCCOPTER, NUMHANDLINGS, NUMBIKEHANDLINGS = HANDLING_FREEWAY+1 - HANDLING_BIKE, - NUMFLYINGHANDLINGS = HANDLING_RCCOPTER+1 - HANDLING_SEAPLANE, - NUMBOATHANDLINGS = HANDLING_SEAPLANE+1 - HANDLING_PREDATOR, + NUMFLYINGHANDLINGS = HANDLING_RCCOPTER+1 - HANDLING_MAVERICK, + NUMBOATHANDLINGS = HANDLING_REEFER+1 - HANDLING_PREDATOR, }; enum tField // most likely a handling field enum, never used so :shrug: @@ -155,19 +131,21 @@ enum HANDLING_NARROW_FRONTW = 0x2000000, HANDLING_GOOD_INSAND = 0x4000000, HANDLING_UNKNOWN = 0x8000000, // something for helis and planes + HANDLING_FORCE_GRND_CLR = 0x10000000 }; struct tHandlingData { - tVehicleType nIdentifier; float fMass; - float fInvMass; float fTurnMass; - CVector Dimension; + float fTractionMultiplier; + float fCollisionDamageMultiplier; + tVehicleType nIdentifier; + float fInvMass; + float fDragMult; CVector CentreOfMass; int8 nPercentSubmerged; float fBuoyancy; - float fTractionMultiplier; cTransmission Transmission; float fBrakeDeceleration; float fBrakeBias; @@ -182,12 +160,17 @@ struct tHandlingData float fSuspensionLowerLimit; float fSuspensionBias; float fSuspensionAntidiveMultiplier; - float fCollisionDamageMultiplier; uint32 Flags; float fSeatOffsetDistance; int32 nMonetaryValue; int8 FrontLights; int8 RearLights; + int unk[4]; + + float GetMass(void) const { return fMass; } + float GetTurnMass(void) const { return fTurnMass; } + float GetTractionMultiplier(void) const { return fTractionMultiplier; } + float GetCollisionDamageMultiplier(void) const { return fCollisionDamageMultiplier; } }; struct tBikeHandlingData diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index f51c8481..a8423855 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -756,7 +756,7 @@ CHeli::InitHelis(void) for(i = 0; i < NUM_HELIS; i++) pHelis[i] = nil; - ((CVehicleModelInfo*)CModelInfo::GetModelInfo(MI_CHOPPER))->SetColModel(&CTempColModels::ms_colModelPed1); + ((CVehicleModelInfo*)CModelInfo::GetModelInfo(MI_CHOPPER))->SetColModel(&gpTempColModels->ms_colModelPed1); } CHeli* diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 5f0cf36a..3c3d45d7 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -15,6 +15,10 @@ #include "Train.h" #include "AudioScriptObject.h" +#define TRAIN_SPEED (15.0f) +#define TRAIN_SLOWDOWN_DISTANCE (40.0f) +#define TRAIN_TIME_STOPPED_AT_STATION (25.0f) + static CTrainNode* pTrackNodes; static int16 NumTrackNodes; static float StationDist[3] = { 873.0f, 1522.0f, 2481.0f }; @@ -459,11 +463,11 @@ CTrain::InitTrains(void) CStreaming::LoadAllRequestedModels(false); // El-Train wagons - float wagonPositions[] = { 0.0f, 20.0f, 40.0f, 0.0f, 20.0f }; - int8 firstWagon[] = { 1, 0, 0, 1, 0 }; - int8 lastWagon[] = { 0, 0, 1, 0, 1 }; - int16 wagonGroup[] = { 0, 0, 0, 1, 1 }; - for(i = 0; i < 5; i++){ + float wagonPositions[] = { 0.0f, 20.0f, 0.0f, 20.0f }; + int8 firstWagon[] = { 1, 0, 1, 0 }; + int8 lastWagon[] = { 0, 1, 0, 1 }; + int16 wagonGroup[] = { 0, 0, 1, 1 }; + for(i = 0; i < 4; i++){ train = new CTrain(MI_TRAIN, PERMANENT_VEHICLE); train->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f); train->SetStatus(STATUS_ABANDONED); @@ -598,23 +602,23 @@ CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int1 interpLines[j].type = 1; interpLines[j].time = time; interpLines[j].position = position; - interpLines[j].speed = 15.0f; + interpLines[j].speed = TRAIN_SPEED; interpLines[j].acceleration = 0.0f; j++; // distance to next keyframe - float dist = (stationDists[i]-40.0f) - position; - time += dist/15.0f; + float dist = (stationDists[i]-TRAIN_SLOWDOWN_DISTANCE) - position; + time += dist/TRAIN_SPEED; position += dist; // Now slow down 40 units before stop interpLines[j].type = 2; interpLines[j].time = time; interpLines[j].position = position; - interpLines[j].speed = 15.0f; - interpLines[j].acceleration = -45.0f/32.0f; + interpLines[j].speed = TRAIN_SPEED; + interpLines[j].acceleration = -(TRAIN_SPEED * TRAIN_SPEED) / (4 * TRAIN_SLOWDOWN_DISTANCE); j++; - time += 80.0f/15.0f; - position += 40.0f; // at station + time += 2*TRAIN_SLOWDOWN_DISTANCE/TRAIN_SPEED; + position += TRAIN_SLOWDOWN_DISTANCE; // at station // stopping interpLines[j].type = 0; @@ -623,26 +627,26 @@ CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int1 interpLines[j].speed = 0.0f; interpLines[j].acceleration = 0.0f; j++; - time += 25.0f; + time += TRAIN_TIME_STOPPED_AT_STATION; // accelerate again interpLines[j].type = 2; interpLines[j].time = time; interpLines[j].position = position; interpLines[j].speed = 0.0f; - interpLines[j].acceleration = 45.0f/32.0f; + interpLines[j].acceleration = (TRAIN_SPEED * TRAIN_SPEED) / (4 * TRAIN_SLOWDOWN_DISTANCE); j++; - time += 80.0f/15.0f; - position += 40.0f; // after station + time += 2*TRAIN_SLOWDOWN_DISTANCE /TRAIN_SPEED; + position += TRAIN_SLOWDOWN_DISTANCE; // after station } // last keyframe interpLines[j].type = 1; interpLines[j].time = time; interpLines[j].position = position; - interpLines[j].speed = 15.0f; + interpLines[j].speed = TRAIN_SPEED; interpLines[j].acceleration = 0.0f; j++; - *totalDuration = time + (*totalLength - position)/15.0f; + *totalDuration = time + (*totalLength - position)/ TRAIN_SPEED; // end interpLines[j].time = *totalDuration; @@ -650,52 +654,6 @@ CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int1 } void -PlayAnnouncement(uint8 sound, uint8 station) -{ - // this was gone in a PC version but inlined on PS2 - cAudioScriptObject *obj = new cAudioScriptObject; - obj->AudioId = sound; - obj->Posn = CTrain::aStationCoors[station]; - obj->AudioEntity = AEHANDLE_NONE; - DMAudio.CreateOneShotScriptObject(obj); -} - -void -ProcessTrainAnnouncements(void) -{ -#ifdef GTA_TRAIN - for (int i = 0; i < ARRAY_SIZE(StationDist); i++) { - for (int j = 0; j < ARRAY_SIZE(EngineTrackPosition); j++) { - if (!bTrainArrivalAnnounced[i]) { - float preDist = StationDist[i] - 100.0f; - if (preDist < 0.0f) - preDist += TotalLengthOfTrack; - if (EngineTrackPosition[j] > preDist && EngineTrackPosition[j] < StationDist[i]) { - bTrainArrivalAnnounced[i] = true; - PlayAnnouncement(SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1, i); - break; - } - } else { - float postDist = StationDist[i] + 10.0f; -#ifdef FIX_BUGS - if (postDist > TotalLengthOfTrack) - postDist -= TotalLengthOfTrack; -#else - if (postDist < 0.0f) // does this even make sense here? - postDist += TotalLengthOfTrack; -#endif - if (EngineTrackPosition[j] > StationDist[i] && EngineTrackPosition[j] < postDist) { - bTrainArrivalAnnounced[i] = false; - PlayAnnouncement(SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2, i); - break; - } - } - } - } -#endif -} - -void CTrain::UpdateTrains(void) { #ifdef GTA_TRAIN @@ -732,8 +690,6 @@ CTrain::UpdateTrains(void) // time offset for each train time += 0x20000/2; } - - ProcessTrainAnnouncements(); } // Update Subway diff --git a/src/vehicles/Transmission.cpp b/src/vehicles/Transmission.cpp index 1aeabfe0..efc32079 100644 --- a/src/vehicles/Transmission.cpp +++ b/src/vehicles/Transmission.cpp @@ -4,6 +4,7 @@ #include "HandlingMgr.h" #include "Transmission.h" +//--LCS: file done void cTransmission::InitGearRatios(void) { @@ -14,11 +15,14 @@ cTransmission::InitGearRatios(void) memset(Gears, 0, sizeof(Gears)); + float baseVelocity = 0.5f*fMaxVelocity / nNumberOfGears; + float step = (fMaxVelocity - baseVelocity) / nNumberOfGears; + for(i = 1; i <= nNumberOfGears; i++){ pGearRatio0 = &Gears[i-1]; pGearRatio1 = &Gears[i]; - pGearRatio1->fMaxVelocity = (float)i / nNumberOfGears * fMaxVelocity; + pGearRatio1->fMaxVelocity = baseVelocity + i*step; velocityDiff = pGearRatio1->fMaxVelocity - pGearRatio0->fMaxVelocity; @@ -45,9 +49,12 @@ cTransmission::CalculateGearForSimpleCar(float speed, uint8 &gear) pGearRatio = &Gears[gear]; fCurVelocity = speed; - if(speed > pGearRatio->fShiftUpVelocity) - gear++; - else if(speed < pGearRatio->fShiftDownVelocity){ + if(speed > pGearRatio->fShiftUpVelocity){ + if(gear + 1 > nNumberOfGears) + gear = nNumberOfGears; + else + gear++; + }else if(speed < pGearRatio->fShiftDownVelocity){ if(gear - 1 < 0) gear = 0; else @@ -55,6 +62,110 @@ cTransmission::CalculateGearForSimpleCar(float speed, uint8 &gear) } } +float TRANSMISSION_NITROS_INERTIA_MULT = 0.5f; +float TRANSMISSION_AI_CHEAT_INERTIA_MULT = 0.75f; +float TRANSMISSION_NITROS_MULT = 2.0f; +float TRANSMISSION_AI_CHEAT_MULT = 1.2f; +float TRANSMISSION_SMOOTHER_FRAC = 0.85f; +float TRANSMISSION_FREE_ACCELERATION = 0.1f; + +//--LCS: done +float +cTransmission::CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, float *inertiaVar1, float *inertiaVar2, uint8 nDriveWheels, uint8 cheat) +{ + static float fAcceleration = 0.0f; + static float fVelocity; + static float fCheat; + static tGear *pGearRatio; + + fVelocity = velocity; + if(fVelocity < fMaxReverseVelocity) + return 0.0f; + if(fVelocity > fMaxVelocity) + return 0.0f; + fCurVelocity = fVelocity; + + assert(gear <= nNumberOfGears); + + pGearRatio = &Gears[gear]; + if(fVelocity > pGearRatio->fShiftUpVelocity){ + if(gear != 0 || gasPedal > 0.0f){ + gear++; + return CalculateDriveAcceleration(gasPedal, gear, time, fVelocity, nil, nil, 0, false); + } + }else if(fVelocity < pGearRatio->fShiftDownVelocity && gear != 0){ + if(gear != 1 || gasPedal < 0.0f){ + gear--; + return CalculateDriveAcceleration(gasPedal, gear, time, fVelocity, nil, nil, 0, false); + } + } + + float accelMul; + + if(nNumberOfGears == 1){ + accelMul = 1.0f; + }else if(gear == 0){ + accelMul = 4.5f; + }else{ + float f = 1.0f - (gear-1.0f)/(nNumberOfGears-1.0f); + if(Flags & HANDLING_1G_BOOST) + accelMul = SQR(f)*5.0f + 1.0f; + else if(Flags & HANDLING_2G_BOOST) + accelMul = SQR(f)*4.0f + 1.0f; + else + accelMul = SQR(f)*3.0f + 1.0f; + } + + fCheat = 1.0f; + float nitroMult = 1.0f; + if(cheat == 1) + fCheat = TRANSMISSION_AI_CHEAT_MULT; + else if(cheat == 2) + nitroMult = TRANSMISSION_NITROS_MULT; + + fAcceleration = fEngineAcceleration*CTimer::GetTimeStep()*0.4f*accelMul*gasPedal*fCheat*nitroMult; + + if(inertiaVar1 != nil && inertiaVar2 != nil){ + if(nDriveWheels == 0){ + float f = TRANSMISSION_FREE_ACCELERATION*CTimer::GetTimeStep()*Abs(gasPedal)/fEngineInertia; + *inertiaVar1 = Min(*inertiaVar1 + f, 1.0f); + *inertiaVar2 = 0.1f; + }else{ + float var1; + // What is being calculated here? + // TODO: find better names for the inertia vars + if(gear == 0){ + var1 = ((fMaxVelocity/nNumberOfGears)*(1.0f-0.6667f) - fVelocity) / + ((fMaxVelocity/nNumberOfGears)*(1.0f-0.6667f) - Gears[gear].fShiftDownVelocity); + }else if(gear == 1){ + var1 = ((fMaxVelocity/nNumberOfGears)*(1.0f-0.6667f) + fVelocity) / + ((fMaxVelocity/nNumberOfGears)*(1.0f-0.6667f) + Gears[gear].fShiftUpVelocity); + }else{ + var1 = (fVelocity - Gears[gear].fShiftDownVelocity) / + (Gears[gear].fShiftUpVelocity - Gears[gear].fShiftDownVelocity); + } + float inertiaMult = var1 - *inertiaVar1; + if(cheat == 1) + inertiaMult *= TRANSMISSION_AI_CHEAT_INERTIA_MULT; + else if(cheat == 2) + inertiaMult *= TRANSMISSION_NITROS_INERTIA_MULT; + float var2target = 1.0f - inertiaMult*fEngineInertia; + var2target = Clamp(var2target, 0.1f, 1.0f); + *inertiaVar2 = (1.0f-TRANSMISSION_SMOOTHER_FRAC)*var2target + TRANSMISSION_SMOOTHER_FRAC*(*inertiaVar2); + *inertiaVar1 = var1; + fAcceleration *= *inertiaVar2; + } + } + + float targetVelocity = Gears[gear].fMaxVelocity*fCheat; + if(Gears[gear].fMaxVelocity < 0.0f && targetVelocity > fVelocity) + fAcceleration *= 1.0f - Min((targetVelocity - fVelocity)/0.05f, 1.0f); + else if(Gears[gear].fMaxVelocity > 0.0f && targetVelocity < fVelocity) + fAcceleration *= 1.0f - Min((fVelocity - targetVelocity)/0.05f, 1.0f); + return fAcceleration; +} + +// TEMP old VC code until we have bikes float cTransmission::CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, bool cheat) { diff --git a/src/vehicles/Transmission.h b/src/vehicles/Transmission.h index a3d15513..8aea7b02 100644 --- a/src/vehicles/Transmission.h +++ b/src/vehicles/Transmission.h @@ -17,6 +17,7 @@ public: int8 nNumberOfGears; uint8 Flags; float fEngineAcceleration; + float fEngineInertia; float fMaxVelocity; float fMaxCruiseVelocity; float fMaxReverseVelocity; @@ -24,5 +25,6 @@ public: void InitGearRatios(void); void CalculateGearForSimpleCar(float speed, uint8 &gear); + float CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, float *inertiaVar1, float *inertiaVar2, uint8 nDriveWheels, uint8 cheat); float CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, bool cheat); }; diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index d7d8cd76..a4c983f7 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -134,6 +134,7 @@ CVehicle::CVehicle(uint8 CreatedBy) bCreatedAsPoliceVehicle = false; bRestingOnPhysical = false; bParking = false; + m_bGarageTurnedLightsOff = false; bCanPark = CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 0.0f; // never true. probably doesn't work very well bIsVan = false; bIsBus = false; @@ -218,8 +219,8 @@ void CVehicle::SetModelIndex(uint32 id) { CEntity::SetModelIndex(id); - m_aExtras[0] = CVehicleModelInfo::ms_compsUsed[0]; - m_aExtras[1] = CVehicleModelInfo::ms_compsUsed[1]; + m_aExtras[0] = CVehicleModelInfo::mspInfo->ms_compsUsed[0]; + m_aExtras[1] = CVehicleModelInfo::mspInfo->ms_compsUsed[1]; m_nNumMaxPassengers = CVehicleModelInfo::GetMaximumNumberOfPassengersFromNumberOfDoors(id); } @@ -772,7 +773,9 @@ CVehicle::BladeColSectorList(CPtrList &list, CColModel &rotorColModel, CMatrix & } -float fBurstSpeedMax = 0.3f; +float WS_ALREADY_SPINNING_LOSS = 0.2f; +float WS_TRAC_FRAC_LIMIT = 0.3f; +float fBurstSpeedMax = 0.2f; float fBurstTyreMod = 0.13f; void @@ -800,13 +803,15 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon float contactSpeedFwd = DotProduct(wheelContactSpeed, wheelFwd); float contactSpeedRight = DotProduct(wheelContactSpeed, wheelRight); - if(*wheelState != WHEEL_STATE_NORMAL) + adhesion *= CTimer::GetTimeStep(); + if(*wheelState != WHEEL_STATE_NORMAL){ bAlreadySkidding = true; + adhesion *= pHandling->fTractionLoss; + if(*wheelState == WHEEL_STATE_SPINNING && (GetStatus() == STATUS_PLAYER || GetStatus() == STATUS_PLAYER_REMOTE)) + adhesion *= 1.0f - Abs(m_fGasPedal) * WS_ALREADY_SPINNING_LOSS; + } *wheelState = WHEEL_STATE_NORMAL; - adhesion *= CTimer::GetTimeStep(); - if(bAlreadySkidding) - adhesion *= pHandling->fTractionLoss; // moving sideways if(contactSpeedRight != 0.0f){ @@ -847,13 +852,15 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon if(!bBraking){ if(m_fGasPedal < 0.01f){ if(IsBike()) - brake = 0.6f * mod_HandlingManager.fWheelFriction / (pHandling->fMass + 200.0f); - else if(pHandling->fMass < 500.0f) - brake = 0.2f * mod_HandlingManager.fWheelFriction / pHandling->fMass; + brake = 0.6f * mod_HandlingManager.fWheelFriction / (pHandling->GetMass() + 200.0f); + else if(IsPlane()) + brake = 0.0f; + else if(pHandling->GetMass() < 500.0f) + brake = 0.1f * mod_HandlingManager.fWheelFriction / pHandling->GetMass(); else if(GetModelIndex() == MI_RCBANDIT) - brake = 0.2f * mod_HandlingManager.fWheelFriction / pHandling->fMass; + brake = 0.2f * mod_HandlingManager.fWheelFriction / pHandling->GetMass(); else - brake = mod_HandlingManager.fWheelFriction / pHandling->fMass; + brake = mod_HandlingManager.fWheelFriction / pHandling->GetMass(); #ifdef FIX_BUGS brake *= CTimer::GetTimeStepFix(); #endif @@ -877,7 +884,10 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon float speedSq = sq(right) + sq(fwd); if(sq(adhesion) < speedSq){ if(*wheelState != WHEEL_STATE_FIXED){ - if(bDriving && contactSpeedFwd < 0.2f) + float tractionLimit = WS_TRAC_FRAC_LIMIT; + if(contactSpeedFwd > 0.15f && (wheelId == CARWHEEL_FRONT_LEFT || wheelId == CARWHEEL_FRONT_RIGHT)) + tractionLimit *= 2.0f; + if(bDriving && tractionLimit*adhesion < Abs(fwd)) *wheelState = WHEEL_STATE_SPINNING; else *wheelState = WHEEL_STATE_SKIDDING; @@ -885,6 +895,8 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon float l = Sqrt(speedSq); float tractionLoss = bAlreadySkidding ? 1.0f : pHandling->fTractionLoss; + if(*wheelState == WHEEL_STATE_SPINNING && (GetStatus() == STATUS_PLAYER || GetStatus() == STATUS_PLAYER_REMOTE)) + tractionLoss *= 1.0f - Abs(m_fGasPedal) * WS_ALREADY_SPINNING_LOSS; right *= adhesion * tractionLoss / l; fwd *= adhesion * tractionLoss / l; } @@ -893,7 +905,7 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon CVector totalSpeed = fwd*wheelFwd + right*wheelRight; CVector turnDirection = totalSpeed; - bool separateTurnForce = false; // BUG: not initialized on PC + bool separateTurnForce = false; if(pHandling->fSuspensionAntidiveMultiplier > 0.0f){ if(bBraking){ separateTurnForce = true; @@ -930,6 +942,7 @@ float fBurstBikeSpeedMax = 0.12f; float fBurstBikeTyreMod = 0.05f; float fTweakBikeWheelTurnForce = 2.0f; +//--LCS: done void CVehicle::ProcessBikeWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint, int32 wheelsOnGround, float thrust, float brake, float adhesion, float destabTraction, int8 wheelId, float *wheelSpeed, tWheelState *wheelState, eBikeWheelSpecial special, uint16 wheelStatus) @@ -1850,8 +1863,7 @@ CVehicle::SetDriver(CPed *driver) case MI_TAXI: case MI_CABBIE: - case MI_ZEBRA: - case MI_KAUFMAN: + case MI_BORGNINE: CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 12; break; diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 31b52138..5458590f 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -240,16 +240,19 @@ public: uint8 bRestingOnPhysical : 1; // Dont go static cause car is sitting on a physical object that might get removed uint8 bParking : 1; uint8 bCanPark : 1; -#if (!defined GTA_PS2 || defined FIX_BUGS) +#if (!defined GTA_PS2 || defined FIX_BUGS) // <- I think this can be moved back to CAutomobile? uint8 m_bombType : 3; #endif uint8 bDriverLastFrame : 1; + uint8 bRewardVehicle : 1; // 25B_40 int8 m_numPedsUseItAsCover; uint8 m_nAmmoInClip; // Used to make the guns on boat do a reload (20 by default) int8 m_nPacManPickupsCarried; uint8 m_nRoadblockType; + bool m_bGarageTurnedLightsOff; float m_fHealth; // 1000.0f = full health. 250.0f = fire. 0 -> explode + float m_fEngineEnergy; // TODO(LCS): better name. it adds up acceleration force, so possibly kinetic energy?? uint8 m_nCurrentGear; float m_fChangeGearTime; #if (!defined GTA_PS2 || defined FIX_BUGS) @@ -288,6 +291,7 @@ public: ~CVehicle(void); // from CEntity void SetModelIndex(uint32 id); + void PreRender(void) {} bool SetupLighting(void); void RemoveLighting(bool); void FlagToDestroyWhenNextProcessed(void) {} @@ -384,8 +388,8 @@ public: bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1 && GetStatus() != STATUS_WRECKED; } CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } - bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_ZEBRA || GetModelIndex() == MI_KAUFMAN; } - bool IsLimo(void) { return GetModelIndex() == MI_STRETCH || GetModelIndex() == MI_LOVEFIST; } + bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; } + bool IsLimo(void) { return GetModelIndex() == MI_STRETCH; } bool IsRealHeli(void) { return !!(pHandling->Flags & HANDLING_IS_HELI); } bool IsRealPlane(void) { return !!(pHandling->Flags & HANDLING_IS_PLANE); } diff --git a/src/weapons/ShotInfo.cpp b/src/weapons/ShotInfo.cpp index 788bcbe1..b98eaf7a 100644 --- a/src/weapons/ShotInfo.cpp +++ b/src/weapons/ShotInfo.cpp @@ -143,7 +143,9 @@ CShotInfo::Update() } } } - if (!((CTimer::GetFrameCounter() + slot) & 3)) - CWorld::SetCarsOnFire(shot.m_startPos.x, shot.m_startPos.y, shot.m_startPos.z, 4.0f, shot.m_sourceEntity); + if (!((CTimer::GetFrameCounter() + slot) & 3)) { + CWorld::SetCarsOnFire(shot.m_startPos.x, shot.m_startPos.y, shot.m_startPos.z, 2.0f, shot.m_sourceEntity); + CWorld::CheckObjectsEffectedByFire(shot.m_startPos.x, shot.m_startPos.y, shot.m_startPos.z, 2.0f, shot.m_sourceEntity); + } } } diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 8328067f..f31e0c60 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -514,7 +514,7 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) if ( SQR(victimPedRadius) > (victimPedPos-fireSource).MagnitudeSqr() ) { CVector collisionDist; - CColModel* victimPedCol = &CTempColModels::ms_colModelPed1; + CColModel* victimPedCol = &gpTempColModels->ms_colModelPed1; bool useLocalPos = false; if (victimPed->m_nPedState == PED_FALL || victimPed->m_nPedState == PED_DIE && victimPed->bIsPedDieAnimPlaying @@ -650,9 +650,9 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) CVector dropDir(CGeneral::GetRandomNumberInRange(-0.15f, 0.15f), CGeneral::GetRandomNumberInRange(0.1f, 0.35f), 0.f); CVector dropPos(CGeneral::GetRandomNumberInRange(SCREEN_STRETCH_X(50.0f), SCREEN_STRETCH_FROM_RIGHT(50.0f)), CGeneral::GetRandomNumberInRange(SCREEN_STRETCH_Y(50.0f), SCREEN_STRETCH_FROM_BOTTOM(50.0f)), 1.f); - CParticle::AddParticle(PARTICLE_BLOODDROP, dropPos, dropDir, nil, CGeneral::GetRandomNumberInRange(0.1f, 0.15f), + /*CParticle::AddParticle(PARTICLE_BLOODDROP, dropPos, dropDir, nil, CGeneral::GetRandomNumberInRange(0.1f, 0.15f), CRGBA(0, 0, 0, 0), 0, 0, CGeneral::GetRandomNumber() & 1, 0); - + */ } if (info->m_AnimToPlay == ASSOCGRP_KNIFE) { @@ -742,7 +742,7 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) { nearCar->VehicleDamage(info->m_nDamage * (0.00075f * nearCar->pHandling->fMass), gaTempSphereColPoints[0].pieceB); - CParticle::AddParticle(PARTICLE_HEATHAZE, gaTempSphereColPoints[0].point, CVector(0.0f, 0.0f, 0.0f), 0, 0.0f, 0, 0, 0, 0); + //CParticle::AddParticle(PARTICLE_HEATHAZE, gaTempSphereColPoints[0].point, CVector(0.0f, 0.0f, 0.0f), 0, 0.0f, 0, 0, 0, 0); } else { @@ -819,7 +819,7 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) CParticle::AddParticle(PARTICLE_SPARK, gaTempSphereColPoints[0].point, 0.1f * gaTempSphereColPoints[0].normal, 0, 0.0f, 0, 0, 0, 0); } - CParticle::AddParticle(PARTICLE_HEATHAZE, gaTempSphereColPoints[0].point, CVector(0.0f, 0.0f, 0.0f), 0, 0.0f, 0, 0, 0, 0); + //CParticle::AddParticle(PARTICLE_HEATHAZE, gaTempSphereColPoints[0].point, CVector(0.0f, 0.0f, 0.0f), 0, 0.0f, 0, 0, 0, 0); if (!damageEntityRegistered) { |