mirror of
https://github.com/halpz/re3.git
synced 2025-07-13 23:38:12 +00:00
More more more audio
This commit is contained in:
@ -129,7 +129,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
||||
|
||||
// Create associations from hierarchies for a given clump
|
||||
void
|
||||
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, char **animNames, int numAssocs)
|
||||
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
|
||||
{
|
||||
int i;
|
||||
CAnimBlock *animBlock;
|
||||
@ -157,5 +157,5 @@ STARTPATCHES
|
||||
InjectHook(0x401420, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(uint32))&CAnimBlendAssocGroup::CopyAnimation, PATCH_JUMP);
|
||||
InjectHook(0x4013E0, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(const char*))&CAnimBlendAssocGroup::CopyAnimation, PATCH_JUMP);
|
||||
InjectHook(0x401130, (void (CAnimBlendAssocGroup::*)(const char*))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
|
||||
InjectHook(0x401220, (void (CAnimBlendAssocGroup::*)(const char*, RpClump*, char**, int))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
|
||||
InjectHook(0x401220, (void (CAnimBlendAssocGroup::*)(const char*, RpClump*, const char**, int))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
|
@ -16,5 +16,5 @@ public:
|
||||
CAnimBlendAssociation *CopyAnimation(uint32 id);
|
||||
CAnimBlendAssociation *CopyAnimation(const char *name);
|
||||
void CreateAssociations(const char *name);
|
||||
void CreateAssociations(const char *blockName, RpClump *clump, char **animNames, int numAssocs);
|
||||
void CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs);
|
||||
};
|
||||
|
@ -185,7 +185,7 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
|
||||
if(blendAmount <= 0.0f && blendDelta < 0.0f){
|
||||
// We're faded out and are not fading in
|
||||
blendAmount = 0.0f;
|
||||
blendDelta = max(0.0, blendDelta);
|
||||
blendDelta = Max(0.0f, blendDelta);
|
||||
if(flags & ASSOC_DELETEFADEDOUT){
|
||||
if(callbackType == CB_FINISH || callbackType == CB_DELETE)
|
||||
callback(this, callbackArg);
|
||||
@ -197,7 +197,7 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
|
||||
if(blendAmount > 1.0f){
|
||||
// Maximally faded in, clamp values
|
||||
blendAmount = 1.0f;
|
||||
blendDelta = min(0.0, blendDelta);
|
||||
blendDelta = Min(0.0f, blendDelta);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -36,7 +36,7 @@ CAnimBlendHierarchy::CalcTotalTime(void)
|
||||
float seqTime = 0.0f;
|
||||
for(j = 0; j < sequences[i].numFrames; j++)
|
||||
seqTime += sequences[i].GetKeyFrame(j)->deltaTime;
|
||||
totalTime = max(totalTime, seqTime);
|
||||
totalTime = Max(totalTime, seqTime);
|
||||
}
|
||||
totalLength = totalTime;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ AnimAssocDesc aStdAnimDescsSide[] = {
|
||||
{ ANIM_IDLE_STANCE, ASSOC_REPEAT },
|
||||
{ ANIM_WALK_START, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION },
|
||||
};
|
||||
char *aStdAnimations[] = {
|
||||
char const *aStdAnimations[] = {
|
||||
"walk_civi",
|
||||
"run_civi",
|
||||
"sprint_panic",
|
||||
@ -373,162 +373,162 @@ char *aStdAnimations[] = {
|
||||
"PHONE_out",
|
||||
"PHONE_talk",
|
||||
};
|
||||
char *aPlayerAnimations[] = {
|
||||
char const *aPlayerAnimations[] = {
|
||||
"walk_player",
|
||||
"run_player",
|
||||
"SPRINT_civi",
|
||||
"IDLE_STANCE",
|
||||
"walk_start",
|
||||
};
|
||||
char *aPlayerWithRocketAnimations[] = {
|
||||
char const *aPlayerWithRocketAnimations[] = {
|
||||
"walk_rocket",
|
||||
"run_rocket",
|
||||
"run_rocket",
|
||||
"idle_rocket",
|
||||
"walk_start_rocket",
|
||||
};
|
||||
char *aPlayer1ArmedAnimations[] = {
|
||||
char const *aPlayer1ArmedAnimations[] = {
|
||||
"walk_player",
|
||||
"run_1armed",
|
||||
"SPRINT_civi",
|
||||
"IDLE_STANCE",
|
||||
"walk_start",
|
||||
};
|
||||
char *aPlayer2ArmedAnimations[] = {
|
||||
char const *aPlayer2ArmedAnimations[] = {
|
||||
"walk_player",
|
||||
"run_armed",
|
||||
"run_armed",
|
||||
"idle_stance",
|
||||
"walk_start",
|
||||
};
|
||||
char *aPlayerBBBatAnimations[] = {
|
||||
char const *aPlayerBBBatAnimations[] = {
|
||||
"walk_player",
|
||||
"run_player",
|
||||
"run_player",
|
||||
"IDLE_STANCE",
|
||||
"walk_start",
|
||||
};
|
||||
char *aShuffleAnimations[] = {
|
||||
char const *aShuffleAnimations[] = {
|
||||
"WALK_shuffle",
|
||||
"RUN_civi",
|
||||
"SPRINT_civi",
|
||||
"IDLE_STANCE",
|
||||
};
|
||||
char *aOldAnimations[] = {
|
||||
char const *aOldAnimations[] = {
|
||||
"walk_old",
|
||||
"run_civi",
|
||||
"sprint_civi",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aGang1Animations[] = {
|
||||
char const *aGang1Animations[] = {
|
||||
"walk_gang1",
|
||||
"run_gang1",
|
||||
"sprint_civi",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aGang2Animations[] = {
|
||||
char const *aGang2Animations[] = {
|
||||
"walk_gang2",
|
||||
"run_gang1",
|
||||
"sprint_civi",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aFatAnimations[] = {
|
||||
char const *aFatAnimations[] = {
|
||||
"walk_fat",
|
||||
"run_civi",
|
||||
"woman_runpanic",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aOldFatAnimations[] = {
|
||||
char const *aOldFatAnimations[] = {
|
||||
"walk_fatold",
|
||||
"run_fatold",
|
||||
"woman_runpanic",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aStdWomanAnimations[] = {
|
||||
char const *aStdWomanAnimations[] = {
|
||||
"woman_walknorm",
|
||||
"woman_run",
|
||||
"woman_runpanic",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aWomanShopAnimations[] = {
|
||||
char const *aWomanShopAnimations[] = {
|
||||
"woman_walkshop",
|
||||
"woman_run",
|
||||
"woman_run",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aBusyWomanAnimations[] = {
|
||||
char const *aBusyWomanAnimations[] = {
|
||||
"woman_walkbusy",
|
||||
"woman_run",
|
||||
"woman_runpanic",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aSexyWomanAnimations[] = {
|
||||
char const *aSexyWomanAnimations[] = {
|
||||
"woman_walksexy",
|
||||
"woman_run",
|
||||
"woman_runpanic",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aOldWomanAnimations[] = {
|
||||
char const *aOldWomanAnimations[] = {
|
||||
"woman_walkold",
|
||||
"woman_run",
|
||||
"woman_runpanic",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aFatWomanAnimations[] = {
|
||||
char const *aFatWomanAnimations[] = {
|
||||
"walk_fat",
|
||||
"woman_run",
|
||||
"woman_runpanic",
|
||||
"woman_idlestance",
|
||||
};
|
||||
char *aPanicChunkyAnimations[] = {
|
||||
char const *aPanicChunkyAnimations[] = {
|
||||
"run_fatold",
|
||||
"woman_runpanic",
|
||||
"woman_runpanic",
|
||||
"idle_stance",
|
||||
};
|
||||
char *aPlayerStrafeBackAnimations[] = {
|
||||
char const *aPlayerStrafeBackAnimations[] = {
|
||||
"walk_player_back",
|
||||
"run_player_back",
|
||||
"run_player_back",
|
||||
"IDLE_STANCE",
|
||||
"walk_start_back",
|
||||
};
|
||||
char *aPlayerStrafeLeftAnimations[] = {
|
||||
char const *aPlayerStrafeLeftAnimations[] = {
|
||||
"walk_player_left",
|
||||
"run_left",
|
||||
"run_left",
|
||||
"IDLE_STANCE",
|
||||
"walk_start_left",
|
||||
};
|
||||
char *aPlayerStrafeRightAnimations[] = {
|
||||
char const *aPlayerStrafeRightAnimations[] = {
|
||||
"walk_player_right",
|
||||
"run_right",
|
||||
"run_right",
|
||||
"IDLE_STANCE",
|
||||
"walk_start_right",
|
||||
};
|
||||
char *aRocketStrafeBackAnimations[] = {
|
||||
char const *aRocketStrafeBackAnimations[] = {
|
||||
"walk_rocket_back",
|
||||
"run_rocket_back",
|
||||
"run_rocket_back",
|
||||
"idle_rocket",
|
||||
"walkst_rocket_back",
|
||||
};
|
||||
char *aRocketStrafeLeftAnimations[] = {
|
||||
char const *aRocketStrafeLeftAnimations[] = {
|
||||
"walk_rocket_left",
|
||||
"run_rocket_left",
|
||||
"run_rocket_left",
|
||||
"idle_rocket",
|
||||
"walkst_rocket_left",
|
||||
};
|
||||
char *aRocketStrafeRightAnimations[] = {
|
||||
char const *aRocketStrafeRightAnimations[] = {
|
||||
"walk_rocket_right",
|
||||
"run_rocket_right",
|
||||
"run_rocket_right",
|
||||
"idle_rocket",
|
||||
"walkst_rocket_right",
|
||||
};
|
||||
AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS] = {
|
||||
const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS] = {
|
||||
{ "man", "ped", MI_COP, 173, aStdAnimations, aStdAnimDescs },
|
||||
{ "player", "ped", MI_COP, 5, aPlayerAnimations, aStdAnimDescs },
|
||||
{ "playerrocket", "ped", MI_COP, 5, aPlayerWithRocketAnimations, aStdAnimDescs },
|
||||
@ -749,7 +749,7 @@ CAnimManager::LoadAnimFiles(void)
|
||||
RpClump *clump = (RpClump*)mi->CreateInstance();
|
||||
RpAnimBlendClumpInit(clump);
|
||||
CAnimBlendAssocGroup *group = &CAnimManager::ms_aAnimAssocGroups[i];
|
||||
AnimAssocDefinition *def = &CAnimManager::ms_aAnimAssocDefinitions[i];
|
||||
const AnimAssocDefinition *def = &CAnimManager::ms_aAnimAssocDefinitions[i];
|
||||
group->CreateAssociations(def->blockName, clump, def->animNames, def->numAnims);
|
||||
for(j = 0; j < group->numAssociations; j++)
|
||||
group->GetAnimation(j)->flags |= def->animDescs[j].flags;
|
||||
|
@ -231,17 +231,17 @@ struct AnimAssocDesc
|
||||
|
||||
struct AnimAssocDefinition
|
||||
{
|
||||
char *name;
|
||||
char *blockName;
|
||||
char const *name;
|
||||
char const *blockName;
|
||||
int32 modelIndex;
|
||||
int32 numAnims;
|
||||
char **animNames;
|
||||
char const **animNames;
|
||||
AnimAssocDesc *animDescs;
|
||||
};
|
||||
|
||||
class CAnimManager
|
||||
{
|
||||
static AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS];
|
||||
static const AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS];
|
||||
static CAnimBlock *ms_aAnimBlocks; //[2]
|
||||
static CAnimBlendHierarchy *ms_aAnimations; //[250]
|
||||
static int32 &ms_numAnimBlocks;
|
||||
|
Reference in New Issue
Block a user