diff options
Diffstat (limited to '')
-rw-r--r-- | src/animation/AnimBlendAssocGroup.cpp | 74 | ||||
-rw-r--r-- | src/animation/AnimBlendAssocGroup.h | 1 | ||||
-rw-r--r-- | src/animation/AnimManager.cpp | 942 | ||||
-rw-r--r-- | src/animation/AnimManager.h | 30 | ||||
-rw-r--r-- | src/animation/AnimationId.h | 103 | ||||
-rw-r--r-- | src/animation/CutsceneMgr.cpp | 674 | ||||
-rw-r--r-- | src/animation/CutsceneMgr.h | 128 | ||||
-rw-r--r-- | src/animation/CutsceneMgr_overlay.cpp | 1030 |
8 files changed, 2002 insertions, 980 deletions
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/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 |