Added CUTSCENEDIRSIZE to Config enum and CUTSCENENAMESIZE macro

This commit is contained in:
Sergeanur 2019-09-28 18:16:52 +03:00
parent ef65ad81ce
commit b13c4de6a4
3 changed files with 7 additions and 4 deletions

View File

@ -123,7 +123,7 @@ int32 &CCutsceneMgr::ms_numCutsceneObjs = *(int32*)0x942FA4;
bool &CCutsceneMgr::ms_loaded = *(bool*)0x95CD95; bool &CCutsceneMgr::ms_loaded = *(bool*)0x95CD95;
bool &CCutsceneMgr::ms_animLoaded = *(bool*)0x95CDA0; bool &CCutsceneMgr::ms_animLoaded = *(bool*)0x95CDA0;
bool &CCutsceneMgr::ms_useLodMultiplier = *(bool*)0x95CD74; bool &CCutsceneMgr::ms_useLodMultiplier = *(bool*)0x95CD74;
char(&CCutsceneMgr::ms_cutsceneName)[8] = *(char(*)[8]) *(uintptr*)0x70D9D0; char(&CCutsceneMgr::ms_cutsceneName)[CUTSCENENAMESIZE] = *(char(*)[CUTSCENENAMESIZE]) *(uintptr*)0x70D9D0;
CAnimBlendAssocGroup &CCutsceneMgr::ms_cutsceneAssociations = *(CAnimBlendAssocGroup*)0x709C58; CAnimBlendAssocGroup &CCutsceneMgr::ms_cutsceneAssociations = *(CAnimBlendAssocGroup*)0x709C58;
CVector &CCutsceneMgr::ms_cutsceneOffset = *(CVector*)0x8F2C0C; CVector &CCutsceneMgr::ms_cutsceneOffset = *(CVector*)0x8F2C0C;
float &CCutsceneMgr::ms_cutsceneTimer = *(float*)0x941548; float &CCutsceneMgr::ms_cutsceneTimer = *(float*)0x941548;
@ -141,7 +141,7 @@ CCutsceneMgr::Initialise(void)
ms_cutsceneProcessing = false; ms_cutsceneProcessing = false;
ms_useLodMultiplier = false; ms_useLodMultiplier = false;
ms_pCutsceneDir = new CDirectory(512); ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE);
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR"); ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
} }
@ -224,7 +224,7 @@ void
CCutsceneMgr::SetHeadAnim(const char *animName, CObject *pObject) CCutsceneMgr::SetHeadAnim(const char *animName, CObject *pObject)
{ {
CCutsceneHead *pCutsceneHead = (CCutsceneHead*)pObject; CCutsceneHead *pCutsceneHead = (CCutsceneHead*)pObject;
char szAnim[16]; char szAnim[CUTSCENENAMESIZE * 2];
sprintf(szAnim, "%s_%s", ms_cutsceneName, animName); sprintf(szAnim, "%s_%s", ms_cutsceneName, animName);
pCutsceneHead->PlayAnimation(szAnim); pCutsceneHead->PlayAnimation(szAnim);

View File

@ -1,6 +1,8 @@
#pragma once #pragma once
#include "CutsceneObject.h" #include "CutsceneObject.h"
#define CUTSCENENAMESIZE 8
class CDirectory; class CDirectory;
class CAnimBlendAssocGroup; class CAnimBlendAssocGroup;
class CCutsceneHead; class CCutsceneHead;
@ -16,7 +18,7 @@ class CCutsceneMgr
static bool &ms_animLoaded; static bool &ms_animLoaded;
static bool &ms_useLodMultiplier; static bool &ms_useLodMultiplier;
static char(&ms_cutsceneName)[8]; static char(&ms_cutsceneName)[CUTSCENENAMESIZE];
static CAnimBlendAssocGroup &ms_cutsceneAssociations; static CAnimBlendAssocGroup &ms_cutsceneAssociations;
static CVector &ms_cutsceneOffset; static CVector &ms_cutsceneOffset;
static float &ms_cutsceneTimer; static float &ms_cutsceneTimer;

View File

@ -8,6 +8,7 @@ enum Config {
MODELINFOSIZE = 5500, MODELINFOSIZE = 5500,
TXDSTORESIZE = 850, TXDSTORESIZE = 850,
EXTRADIRSIZE = 128, EXTRADIRSIZE = 128,
CUTSCENEDIRSIZE = 512,
SIMPLEMODELSIZE = 5000, SIMPLEMODELSIZE = 5000,
TIMEMODELSIZE = 30, TIMEMODELSIZE = 30,