mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 20:00:01 +00:00
Merge branch 'miami' into lcs
* miami: Use original names
This commit is contained in:
commit
af09cb06f5
|
@ -117,8 +117,8 @@ GetModelFromName(const char *name)
|
||||||
char playername[32];
|
char playername[32];
|
||||||
|
|
||||||
if(strncasecmp(name, "CSplay", 6) == 0 &&
|
if(strncasecmp(name, "CSplay", 6) == 0 &&
|
||||||
strncasecmp(CModelInfo::GetModelInfo(MI_PLAYER)->GetName(), "ig", 2) == 0){
|
strncasecmp(CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName(), "ig", 2) == 0){
|
||||||
strcpy(playername, CModelInfo::GetModelInfo(MI_PLAYER)->GetName());
|
strcpy(playername, CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName());
|
||||||
playername[0] = 'C';
|
playername[0] = 'C';
|
||||||
playername[1] = 'S';
|
playername[1] = 'S';
|
||||||
name = playername;
|
name = playername;
|
||||||
|
@ -127,7 +127,7 @@ GetModelFromName(const char *name)
|
||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
||||||
strcmpIgnoringDigits(mi->GetName(), name))
|
strcmpIgnoringDigits(mi->GetModelName(), name))
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
@ -149,7 +149,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
||||||
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
||||||
CBaseModelInfo *model = GetModelFromName(anim->name);
|
CBaseModelInfo *model = GetModelFromName(anim->name);
|
||||||
if(model){
|
if(model){
|
||||||
debug("Associated anim %s with model %s\n", anim->name, model->GetName());
|
debug("Associated anim %s with model %s\n", anim->name, model->GetModelName());
|
||||||
RpClump *clump = (RpClump*)model->CreateInstance();
|
RpClump *clump = (RpClump*)model->CreateInstance();
|
||||||
RpAnimBlendClumpInit(clump);
|
RpAnimBlendClumpInit(clump);
|
||||||
assocList[i].Init(clump, anim);
|
assocList[i].Init(clump, anim);
|
||||||
|
|
|
@ -383,7 +383,7 @@ CCutsceneMgr::CreateCutsceneObject(int modelId)
|
||||||
CCutsceneObject *pCutsceneObject;
|
CCutsceneObject *pCutsceneObject;
|
||||||
|
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
CStreaming::ImGonnaUseStreamingMemory();
|
||||||
debug("Created cutscene object %s\n", CModelInfo::GetModelInfo(modelId)->GetName());
|
debug("Created cutscene object %s\n", CModelInfo::GetModelInfo(modelId)->GetModelName());
|
||||||
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
||||||
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
||||||
pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
||||||
|
@ -569,7 +569,7 @@ CCutsceneMgr::AttachObjectToParent(CObject *pObject, CEntity *pAttachTo)
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = RpClumpGetFrame(pAttachTo->GetClump());
|
((CCutsceneObject*)pObject)->m_pAttachTo = RpClumpGetFrame(pAttachTo->GetClump());
|
||||||
|
|
||||||
debug("Attach %s to %s\n", CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetName(), CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetName());
|
debug("Attach %s to %s\n", CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -578,9 +578,9 @@ CCutsceneMgr::AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const ch
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = RpAnimBlendClumpFindFrame(pAttachTo->GetClump(), frame)->frame;
|
((CCutsceneObject*)pObject)->m_pAttachTo = RpAnimBlendClumpFindFrame(pAttachTo->GetClump(), frame)->frame;
|
||||||
debug("Attach %s to component %s of %s\n",
|
debug("Attach %s to component %s of %s\n",
|
||||||
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetName(),
|
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(),
|
||||||
frame,
|
frame,
|
||||||
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetName());
|
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
||||||
if (RwObjectGetType(pObject->m_rwObject) == rpCLUMP) {
|
if (RwObjectGetType(pObject->m_rwObject) == rpCLUMP) {
|
||||||
RpClump *clump = (RpClump*)pObject->m_rwObject;
|
RpClump *clump = (RpClump*)pObject->m_rwObject;
|
||||||
if (IsClumpSkinned(clump))
|
if (IsClumpSkinned(clump))
|
||||||
|
@ -597,8 +597,8 @@ CCutsceneMgr::AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int bone)
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = pAttachTo;
|
((CCutsceneObject*)pObject)->m_pAttachmentObject = pAttachTo;
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = &matrixArray[id];
|
((CCutsceneObject*)pObject)->m_pAttachTo = &matrixArray[id];
|
||||||
debug("Attach %s to %s\n",
|
debug("Attach %s to %s\n",
|
||||||
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetName(),
|
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(),
|
||||||
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetName());
|
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -2759,7 +2759,7 @@ void CTheScripts::UpdateObjectIndices()
|
||||||
CBaseModelInfo* pModel = CModelInfo::GetModelInfo(j);
|
CBaseModelInfo* pModel = CModelInfo::GetModelInfo(j);
|
||||||
if (!pModel)
|
if (!pModel)
|
||||||
continue;
|
continue;
|
||||||
strcpy(name, pModel->GetName());
|
strcpy(name, pModel->GetModelName());
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++)
|
for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -625,7 +625,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
||||||
key[i] = tolower(key[i]);
|
key[i] = tolower(key[i]);
|
||||||
CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
|
CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
|
||||||
script_assert(pPed);
|
script_assert(pPed);
|
||||||
UpdateCompareFlag(strcmp(key, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetName()) == 0);
|
UpdateCompareFlag(strcmp(key, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetModelName()) == 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case COMMAND_SET_PLAYER_CAN_DO_DRIVE_BY:
|
case COMMAND_SET_PLAYER_CAN_DO_DRIVE_BY:
|
||||||
|
|
|
@ -492,7 +492,7 @@ bool
|
||||||
CFileLoader::StartLoadClumpFile(RwStream *stream, uint32 id)
|
CFileLoader::StartLoadClumpFile(RwStream *stream, uint32 id)
|
||||||
{
|
{
|
||||||
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil)){
|
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil)){
|
||||||
printf("Start loading %s\n", CModelInfo::GetModelInfo(id)->GetName());
|
printf("Start loading %s\n", CModelInfo::GetModelInfo(id)->GetModelName());
|
||||||
return RpClumpGtaStreamRead1(stream);
|
return RpClumpGtaStreamRead1(stream);
|
||||||
}else{
|
}else{
|
||||||
printf("FAILED\n");
|
printf("FAILED\n");
|
||||||
|
@ -506,7 +506,7 @@ CFileLoader::FinishLoadClumpFile(RwStream *stream, uint32 id)
|
||||||
RpClump *clump;
|
RpClump *clump;
|
||||||
CClumpModelInfo *mi;
|
CClumpModelInfo *mi;
|
||||||
|
|
||||||
printf("Finish loading %s\n", CModelInfo::GetModelInfo(id)->GetName());
|
printf("Finish loading %s\n", CModelInfo::GetModelInfo(id)->GetModelName());
|
||||||
clump = RpClumpGtaStreamRead2(stream);
|
clump = RpClumpGtaStreamRead2(stream);
|
||||||
|
|
||||||
if(clump){
|
if(clump){
|
||||||
|
@ -739,7 +739,7 @@ CFileLoader::LoadObject(const char *line)
|
||||||
}
|
}
|
||||||
|
|
||||||
mi = CModelInfo::AddSimpleModel(id);
|
mi = CModelInfo::AddSimpleModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetNumAtomics(numObjs);
|
mi->SetNumAtomics(numObjs);
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
|
@ -787,7 +787,7 @@ CFileLoader::LoadTimeObject(const char *line)
|
||||||
}
|
}
|
||||||
|
|
||||||
mi = CModelInfo::AddTimeModel(id);
|
mi = CModelInfo::AddTimeModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetNumAtomics(numObjs);
|
mi->SetNumAtomics(numObjs);
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
|
@ -813,7 +813,7 @@ CFileLoader::LoadWeaponObject(const char *line)
|
||||||
sscanf(line, "%d %s %s %s %d %f", &id, model, txd, animFile, &numObjs, &dist);
|
sscanf(line, "%d %s %s %s %d %f", &id, model, txd, animFile, &numObjs, &dist);
|
||||||
|
|
||||||
mi = CModelInfo::AddWeaponModel(id);
|
mi = CModelInfo::AddWeaponModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetNumAtomics(1);
|
mi->SetNumAtomics(1);
|
||||||
mi->m_lodDistances[0] = dist;
|
mi->m_lodDistances[0] = dist;
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
|
@ -832,7 +832,7 @@ CFileLoader::LoadClumpObject(const char *line)
|
||||||
|
|
||||||
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
||||||
mi = CModelInfo::AddClumpModel(id);
|
mi = CModelInfo::AddClumpModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
mi->SetColModel(&CTempColModels::ms_colModelBBox);
|
mi->SetColModel(&CTempColModels::ms_colModelBBox);
|
||||||
}
|
}
|
||||||
|
@ -857,7 +857,7 @@ CFileLoader::LoadVehicleObject(const char *line)
|
||||||
&normalSplay);
|
&normalSplay);
|
||||||
|
|
||||||
mi = CModelInfo::AddVehicleModel(id);
|
mi = CModelInfo::AddVehicleModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
mi->SetAnimFile(animFile);
|
mi->SetAnimFile(animFile);
|
||||||
for(p = gamename; *p; p++)
|
for(p = gamename; *p; p++)
|
||||||
|
@ -938,7 +938,7 @@ CFileLoader::LoadPedObject(const char *line)
|
||||||
animFile, &radio1, &radio2);
|
animFile, &radio1, &radio2);
|
||||||
|
|
||||||
mi = CModelInfo::AddPedModel(id);
|
mi = CModelInfo::AddPedModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
mi->SetAnimFile(animFile);
|
mi->SetAnimFile(animFile);
|
||||||
mi->SetColModel(&CTempColModels::ms_colModelPed1);
|
mi->SetColModel(&CTempColModels::ms_colModelPed1);
|
||||||
|
@ -1208,7 +1208,7 @@ CFileLoader::LoadObjectInstance(const char *line)
|
||||||
assert(mi->IsSimple());
|
assert(mi->IsSimple());
|
||||||
|
|
||||||
if(!CStreaming::IsObjectInCdImage(id))
|
if(!CStreaming::IsObjectInCdImage(id))
|
||||||
debug("Not in cdimage %s\n", mi->GetName());
|
debug("Not in cdimage %s\n", mi->GetModelName());
|
||||||
|
|
||||||
angle = -RADTODEG(2.0f * acosf(angle));
|
angle = -RADTODEG(2.0f * acosf(angle));
|
||||||
xform = RwMatrixCreate();
|
xform = RwMatrixCreate();
|
||||||
|
@ -1441,7 +1441,7 @@ CFileLoader::ReloadObject(const char *line)
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
mi &&
|
mi &&
|
||||||
#endif
|
#endif
|
||||||
mi->GetModelType() == MITYPE_SIMPLE && !strcmp(mi->GetName(), model) && mi->m_numAtomics == numObjs) {
|
mi->GetModelType() == MITYPE_SIMPLE && !strcmp(mi->GetModelName(), model) && mi->m_numAtomics == numObjs) {
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -536,7 +536,7 @@ INITSAVEBUF
|
||||||
#endif
|
#endif
|
||||||
CopyToBuf(buf, CWanted::MaximumWantedLevel);
|
CopyToBuf(buf, CWanted::MaximumWantedLevel);
|
||||||
CopyToBuf(buf, CWanted::nMaximumWantedLevel);
|
CopyToBuf(buf, CWanted::nMaximumWantedLevel);
|
||||||
memcpy(buf, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetName(), MAX_MODEL_NAME);
|
memcpy(buf, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetModelName(), MAX_MODEL_NAME);
|
||||||
SkipSaveBuf(buf, MAX_MODEL_NAME);
|
SkipSaveBuf(buf, MAX_MODEL_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -497,7 +497,7 @@ GetObjectName(int streamId)
|
||||||
{
|
{
|
||||||
static char objname[32];
|
static char objname[32];
|
||||||
if(streamId < STREAM_OFFSET_TXD)
|
if(streamId < STREAM_OFFSET_TXD)
|
||||||
sprintf(objname, "%s.dff", CModelInfo::GetModelInfo(streamId)->GetName());
|
sprintf(objname, "%s.dff", CModelInfo::GetModelInfo(streamId)->GetModelName());
|
||||||
else if(streamId >= STREAM_OFFSET_TXD && streamId < STREAM_OFFSET_COL)
|
else if(streamId >= STREAM_OFFSET_TXD && streamId < STREAM_OFFSET_COL)
|
||||||
sprintf(objname, "%s.txd", CTxdStore::GetTxdName(streamId-STREAM_OFFSET_TXD));
|
sprintf(objname, "%s.txd", CTxdStore::GetTxdName(streamId-STREAM_OFFSET_TXD));
|
||||||
else if(streamId >= STREAM_OFFSET_COL && streamId < STREAM_OFFSET_ANIM)
|
else if(streamId >= STREAM_OFFSET_COL && streamId < STREAM_OFFSET_ANIM)
|
||||||
|
@ -592,7 +592,7 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!success){
|
if(!success){
|
||||||
debug("Failed to load %s\n", CModelInfo::GetModelInfo(streamId)->GetName());
|
debug("Failed to load %s\n", CModelInfo::GetModelInfo(streamId)->GetModelName());
|
||||||
RemoveModel(streamId);
|
RemoveModel(streamId);
|
||||||
ReRequestModel(streamId);
|
ReRequestModel(streamId);
|
||||||
RwStreamClose(stream, &mem);
|
RwStreamClose(stream, &mem);
|
||||||
|
@ -1009,7 +1009,7 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag
|
||||||
|
|
||||||
mi = CModelInfo::GetModelInfo(modelId);
|
mi = CModelInfo::GetModelInfo(modelId);
|
||||||
if(strncasecmp("CSPlay", modelName, 6) == 0){
|
if(strncasecmp("CSPlay", modelName, 6) == 0){
|
||||||
char *curname = CModelInfo::GetModelInfo(MI_PLAYER)->GetName();
|
char *curname = CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName();
|
||||||
for(int i = 0; CSnames[i][0]; i++){
|
for(int i = 0; CSnames[i][0]; i++){
|
||||||
if(strcasecmp(curname, IGnames[i]) == 0){
|
if(strcasecmp(curname, IGnames[i]) == 0){
|
||||||
modelName = CSnames[i];
|
modelName = CSnames[i];
|
||||||
|
@ -1017,7 +1017,7 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!CGeneral::faststrcmp(mi->GetName(), modelName)){
|
if(!CGeneral::faststrcmp(mi->GetModelName(), modelName)){
|
||||||
// Already have the correct name, just request it
|
// Already have the correct name, just request it
|
||||||
RequestModel(modelId, flags);
|
RequestModel(modelId, flags);
|
||||||
return;
|
return;
|
||||||
|
@ -1042,8 +1042,8 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(oldName, mi->GetName());
|
strcpy(oldName, mi->GetModelName());
|
||||||
mi->SetName(modelName);
|
mi->SetModelName(modelName);
|
||||||
|
|
||||||
// What exactly is going on here?
|
// What exactly is going on here?
|
||||||
if(CModelInfo::GetModelInfo(oldName, nil)){
|
if(CModelInfo::GetModelInfo(oldName, nil)){
|
||||||
|
@ -1842,11 +1842,11 @@ CStreaming::StreamZoneModels(const CVector &pos)
|
||||||
int newMI = CPopulation::ms_pPedGroups[ms_currentPedGrp].models[j];
|
int newMI = CPopulation::ms_pPedGroups[ms_currentPedGrp].models[j];
|
||||||
if(newMI != oldMI){
|
if(newMI != oldMI){
|
||||||
RequestModel(newMI, STREAMFLAGS_DEPENDENCY);
|
RequestModel(newMI, STREAMFLAGS_DEPENDENCY);
|
||||||
debug("Request Ped %s\n", CModelInfo::GetModelInfo(newMI)->GetName());
|
debug("Request Ped %s\n", CModelInfo::GetModelInfo(newMI)->GetModelName());
|
||||||
if(ms_numPedsLoaded == MAXZONEPEDSLOADED){
|
if(ms_numPedsLoaded == MAXZONEPEDSLOADED){
|
||||||
SetModelIsDeletable(oldMI);
|
SetModelIsDeletable(oldMI);
|
||||||
SetModelTxdIsDeletable(oldMI);
|
SetModelTxdIsDeletable(oldMI);
|
||||||
debug("Remove Ped %s\n", CModelInfo::GetModelInfo(oldMI)->GetName());
|
debug("Remove Ped %s\n", CModelInfo::GetModelInfo(oldMI)->GetModelName());
|
||||||
}else
|
}else
|
||||||
ms_numPedsLoaded++;
|
ms_numPedsLoaded++;
|
||||||
timeBeforeNextLoad = 300;
|
timeBeforeNextLoad = 300;
|
||||||
|
@ -3242,7 +3242,7 @@ CStreaming::PrintStreamingBufferState()
|
||||||
sprintf(str, "txd %s, refs %d, size %dK, flags 0x%x", CTxdStore::GetTxdName(modelIndex - STREAM_OFFSET_TXD),
|
sprintf(str, "txd %s, refs %d, size %dK, flags 0x%x", CTxdStore::GetTxdName(modelIndex - STREAM_OFFSET_TXD),
|
||||||
CTxdStore::GetNumRefs(modelIndex - STREAM_OFFSET_TXD), 2 * size, streamingInfo->m_flags);
|
CTxdStore::GetNumRefs(modelIndex - STREAM_OFFSET_TXD), 2 * size, streamingInfo->m_flags);
|
||||||
else
|
else
|
||||||
sprintf(str, "model %d,%s, refs%d, size%dK, flags%x", modelIndex, modelInfo->GetName(), modelInfo->GetNumRefs(), 2 * size,
|
sprintf(str, "model %d,%s, refs%d, size%dK, flags%x", modelIndex, modelInfo->GetModelName(), modelInfo->GetNumRefs(), 2 * size,
|
||||||
streamingInfo->m_flags);
|
streamingInfo->m_flags);
|
||||||
AsciiToUnicode(str, wstr);
|
AsciiToUnicode(str, wstr);
|
||||||
CFont::PrintString(24.0f, y, wstr);
|
CFont::PrintString(24.0f, y, wstr);
|
||||||
|
|
|
@ -626,7 +626,7 @@ CEntity::SetupBigBuilding(void)
|
||||||
if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist)
|
if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist)
|
||||||
m_level = LEVEL_GENERIC;
|
m_level = LEVEL_GENERIC;
|
||||||
else if(m_level == LEVEL_GENERIC)
|
else if(m_level == LEVEL_GENERIC)
|
||||||
printf("%s isn't in a level\n", mi->GetName());
|
printf("%s isn't in a level\n", mi->GetModelName());
|
||||||
}
|
}
|
||||||
|
|
||||||
float WindTabel[] = {
|
float WindTabel[] = {
|
||||||
|
|
|
@ -50,8 +50,8 @@ public:
|
||||||
bool IsBuilding(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME; }
|
bool IsBuilding(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME; }
|
||||||
bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME || m_type == MITYPE_WEAPON; }
|
bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME || m_type == MITYPE_WEAPON; }
|
||||||
bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE; }
|
bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE; }
|
||||||
char *GetName(void) { return m_name; }
|
char *GetModelName(void) { return m_name; }
|
||||||
void SetName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
|
void SetModelName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
|
||||||
void SetColModel(CColModel *col, bool owns = false){
|
void SetColModel(CColModel *col, bool owns = false){
|
||||||
m_colModel = col; m_bOwnsColModel = owns; }
|
m_colModel = col; m_bOwnsColModel = owns; }
|
||||||
CColModel *GetColModel(void) { return m_colModel; }
|
CColModel *GetColModel(void) { return m_colModel; }
|
||||||
|
|
|
@ -189,7 +189,7 @@ CModelInfo::GetModelInfo(const char *name, int *id)
|
||||||
CBaseModelInfo *modelinfo;
|
CBaseModelInfo *modelinfo;
|
||||||
for(int i = 0; i < MODELINFOSIZE; i++){
|
for(int i = 0; i < MODELINFOSIZE; i++){
|
||||||
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
||||||
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name)){
|
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)){
|
||||||
if(id)
|
if(id)
|
||||||
*id = i;
|
*id = i;
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -207,7 +207,7 @@ CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex)
|
||||||
CBaseModelInfo *modelinfo;
|
CBaseModelInfo *modelinfo;
|
||||||
for(int i = minIndex; i <= maxIndex; i++){
|
for(int i = minIndex; i <= maxIndex; i++){
|
||||||
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
||||||
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name))
|
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name))
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
|
|
@ -48,7 +48,7 @@ CPedModelInfo::SetClump(RpClump *clump)
|
||||||
if(m_hitColModel == nil)
|
if(m_hitColModel == nil)
|
||||||
CreateHitColModelSkinned(clump);
|
CreateHitColModelSkinned(clump);
|
||||||
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPedCB);
|
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPedCB);
|
||||||
if(strcmp(GetName(), "player") == 0)
|
if(strcmp(GetModelName(), "player") == 0)
|
||||||
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ CSimpleModelInfo::FindRelatedModel(int32 minID, int32 maxID)
|
||||||
for(i = minID; i <= maxID; i++){
|
for(i = minID; i <= maxID; i++){
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
if(mi && mi != this &&
|
if(mi && mi != this &&
|
||||||
!CGeneral::faststrcmp(GetName()+3, mi->GetName()+3)){
|
!CGeneral::faststrcmp(GetModelName()+3, mi->GetModelName()+3)){
|
||||||
assert(mi->IsSimple());
|
assert(mi->IsSimple());
|
||||||
this->SetRelatedModel((CSimpleModelInfo*)mi);
|
this->SetRelatedModel((CSimpleModelInfo*)mi);
|
||||||
return;
|
return;
|
||||||
|
@ -189,7 +189,7 @@ CSimpleModelInfo::SetupBigBuilding(int32 minID, int32 maxID)
|
||||||
m_lodDistances[2] = related->GetLargestLodDistance()/TheCamera.LODDistMultiplier;
|
m_lodDistances[2] = related->GetLargestLodDistance()/TheCamera.LODDistMultiplier;
|
||||||
if(m_drawLast){
|
if(m_drawLast){
|
||||||
m_drawLast = false;
|
m_drawLast = false;
|
||||||
debug("%s was draw last\n", GetName());
|
debug("%s was draw last\n", GetModelName());
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
m_lodDistances[2] = NEAR_DRAW_DIST;
|
m_lodDistances[2] = NEAR_DRAW_DIST;
|
||||||
|
|
|
@ -11,7 +11,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
|
||||||
char *p;
|
char *p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
strcpy(name, GetName());
|
strcpy(name, GetModelName());
|
||||||
// change _nt to _dy
|
// change _nt to _dy
|
||||||
if(p = strstr(name, "_nt"))
|
if(p = strstr(name, "_nt"))
|
||||||
strncpy(p, "_dy", 4);
|
strncpy(p, "_dy", 4);
|
||||||
|
@ -24,7 +24,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
|
||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
CBaseModelInfo *mi = CModelInfo::GetModelInfo(i);
|
CBaseModelInfo *mi = CModelInfo::GetModelInfo(i);
|
||||||
if (mi && mi->GetModelType() == MITYPE_TIME &&
|
if (mi && mi->GetModelType() == MITYPE_TIME &&
|
||||||
!CGeneral::faststrncmp(name, mi->GetName(), MAX_MODEL_NAME)){
|
!CGeneral::faststrncmp(name, mi->GetModelName(), MAX_MODEL_NAME)){
|
||||||
m_otherTimeModelID = i;
|
m_otherTimeModelID = i;
|
||||||
return (CTimeModelInfo*)mi;
|
return (CTimeModelInfo*)mi;
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,7 +481,7 @@ void CHud::Draw()
|
||||||
CBaseModelInfo *weaponModel = CModelInfo::GetModelInfo(weaponInfo->m_nModelId);
|
CBaseModelInfo *weaponModel = CModelInfo::GetModelInfo(weaponInfo->m_nModelId);
|
||||||
RwTexDictionary *weaponTxd = CTxdStore::GetSlot(weaponModel->GetTxdSlot())->texDict;
|
RwTexDictionary *weaponTxd = CTxdStore::GetSlot(weaponModel->GetTxdSlot())->texDict;
|
||||||
if (weaponTxd) {
|
if (weaponTxd) {
|
||||||
RwTexture *weaponIcon = RwTexDictionaryFindNamedTexture(weaponTxd, weaponModel->GetName());
|
RwTexture *weaponIcon = RwTexDictionaryFindNamedTexture(weaponTxd, weaponModel->GetModelName());
|
||||||
if (weaponIcon) {
|
if (weaponIcon) {
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
||||||
#ifndef FIX_BUGS
|
#ifndef FIX_BUGS
|
||||||
|
|
|
@ -5615,7 +5615,7 @@ CAutomobile::SetBumperDamage(int32 component, ePanels panel, bool noFlyingCompon
|
||||||
int status = Damage.GetPanelStatus(panel);
|
int status = Damage.GetPanelStatus(panel);
|
||||||
if(m_aCarNodes[component] == nil){
|
if(m_aCarNodes[component] == nil){
|
||||||
printf("Trying to damage component %d of %s\n",
|
printf("Trying to damage component %d of %s\n",
|
||||||
component, CModelInfo::GetModelInfo(GetModelIndex())->GetName());
|
component, CModelInfo::GetModelInfo(GetModelIndex())->GetModelName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(status == PANEL_STATUS_SMASHED1){
|
if(status == PANEL_STATUS_SMASHED1){
|
||||||
|
@ -5635,7 +5635,7 @@ CAutomobile::SetDoorDamage(int32 component, eDoors door, bool noFlyingComponents
|
||||||
int status = Damage.GetDoorStatus(door);
|
int status = Damage.GetDoorStatus(door);
|
||||||
if(m_aCarNodes[component] == nil){
|
if(m_aCarNodes[component] == nil){
|
||||||
printf("Trying to damage component %d of %s\n",
|
printf("Trying to damage component %d of %s\n",
|
||||||
component, CModelInfo::GetModelInfo(GetModelIndex())->GetName());
|
component, CModelInfo::GetModelInfo(GetModelIndex())->GetModelName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue