1
0
mirror of https://github.com/td512/re3.git synced 2026-03-04 06:04:33 +00:00

CutsceneMgr done + use original VB audio + make interiors visible + use hashed model info names a bit

This commit is contained in:
Sergeanur
2021-01-11 19:53:15 +02:00
parent cf11b32849
commit a223157000
32 changed files with 1588 additions and 3128 deletions

View File

@@ -4,6 +4,7 @@
#include "TempColModels.h"
#include "ModelIndices.h"
#include "ModelInfo.h"
#include "KeyGen.h"
// --MIAMI: file done
@@ -186,10 +187,11 @@ CModelInfo::AddVehicleModel(int id)
CBaseModelInfo*
CModelInfo::GetModelInfo(const char *name, int *id)
{
uint32 hashKey = CKeyGen::GetUppercaseKey(name);
CBaseModelInfo *modelinfo;
for(int i = 0; i < MODELINFOSIZE; i++){
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)){
if(modelinfo && hashKey == modelinfo->GetNameHashKey()){
if(id)
*id = i;
return modelinfo;
@@ -201,13 +203,14 @@ CModelInfo::GetModelInfo(const char *name, int *id)
CBaseModelInfo*
CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex)
{
uint32 hashKey = CKeyGen::GetUppercaseKey(name);
if (minIndex > maxIndex)
return 0;
CBaseModelInfo *modelinfo;
for(int i = minIndex; i <= maxIndex; i++){
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name))
if(modelinfo && hashKey == modelinfo->GetNameHashKey())
return modelinfo;
}
return nil;