summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-10-30 00:12:58 +0100
committerSergeanur <s.anureev@yandex.ua>2019-10-30 00:35:31 +0100
commitc202fc3b550b8fc569f510e2002241eec399c18d (patch)
treee3d267990b344709533c925a4169cd71dfaa8394 /src/modelinfo
parentCRadar::Initialise() + fixes (diff)
downloadre3-c202fc3b550b8fc569f510e2002241eec399c18d.tar
re3-c202fc3b550b8fc569f510e2002241eec399c18d.tar.gz
re3-c202fc3b550b8fc569f510e2002241eec399c18d.tar.bz2
re3-c202fc3b550b8fc569f510e2002241eec399c18d.tar.lz
re3-c202fc3b550b8fc569f510e2002241eec399c18d.tar.xz
re3-c202fc3b550b8fc569f510e2002241eec399c18d.tar.zst
re3-c202fc3b550b8fc569f510e2002241eec399c18d.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/ClumpModelInfo.cpp5
-rw-r--r--src/modelinfo/ModelIndices.cpp3
-rw-r--r--src/modelinfo/ModelInfo.cpp3
-rw-r--r--src/modelinfo/PedModelInfo.cpp3
-rw-r--r--src/modelinfo/SimpleModelInfo.cpp3
5 files changed, 11 insertions, 6 deletions
diff --git a/src/modelinfo/ClumpModelInfo.cpp b/src/modelinfo/ClumpModelInfo.cpp
index d666313b..c6a6d5d0 100644
--- a/src/modelinfo/ClumpModelInfo.cpp
+++ b/src/modelinfo/ClumpModelInfo.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "NodeName.h"
#include "VisibilityPlugins.h"
#include "ModelInfo.h"
@@ -86,7 +87,7 @@ CClumpModelInfo::FindFrameFromNameCB(RwFrame *frame, void *data)
{
RwObjectNameAssociation *assoc = (RwObjectNameAssociation*)data;
- if(_strcmpi(GetFrameNodeName(frame), assoc->name) != 0){
+ if(CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){
RwFrameForAllChildren(frame, FindFrameFromNameCB, assoc);
return assoc->frame ? nil : frame;
}else{
@@ -101,7 +102,7 @@ CClumpModelInfo::FindFrameFromNameWithoutIdCB(RwFrame *frame, void *data)
RwObjectNameAssociation *assoc = (RwObjectNameAssociation*)data;
if(CVisibilityPlugins::GetFrameHierarchyId(frame) ||
- _strcmpi(GetFrameNodeName(frame), assoc->name) != 0){
+ CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){
RwFrameForAllChildren(frame, FindFrameFromNameWithoutIdCB, assoc);
return assoc->frame ? nil : frame;
}else{
diff --git a/src/modelinfo/ModelIndices.cpp b/src/modelinfo/ModelIndices.cpp
index bf6b3905..ec039a0b 100644
--- a/src/modelinfo/ModelIndices.cpp
+++ b/src/modelinfo/ModelIndices.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "ModelIndices.h"
#define X(name, var, addr) int16 &var = *(int16*)addr;
@@ -18,7 +19,7 @@ void
MatchModelString(const char *modelname, int16 id)
{
#define X(name, var, addr) \
- if(strcmp(name, modelname) == 0){ \
+ if(!CGeneral::faststrcmp(name, modelname)){ \
var = id; \
return; \
}
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index 0c3ec76a..c7e18e5f 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "TempColModels.h"
#include "ModelIndices.h"
#include "ModelInfo.h"
@@ -159,7 +160,7 @@ CModelInfo::GetModelInfo(const char *name, int *id)
CBaseModelInfo *modelinfo;
for(int i = 0; i < MODELINFOSIZE; i++){
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
- if(modelinfo && _strcmpi(modelinfo->GetName(), name) == 0){
+ if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name)){
if(id)
*id = i;
return modelinfo;
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index afe177c2..7b087fbd 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "Ped.h"
#include "NodeName.h"
#include "VisibilityPlugins.h"
@@ -60,7 +61,7 @@ FindPedFrameFromNameCB(RwFrame *frame, void *data)
{
RwObjectNameAssociation *assoc = (RwObjectNameAssociation*)data;
- if(_strcmpi(GetFrameNodeName(frame)+1, assoc->name+1) != 0){
+ if(CGeneral::faststricmp(GetFrameNodeName(frame)+1, assoc->name+1)){
RwFrameForAllChildren(frame, FindPedFrameFromNameCB, assoc);
return assoc->frame ? nil : frame;
}else{
diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp
index dd5010fa..f8742f1e 100644
--- a/src/modelinfo/SimpleModelInfo.cpp
+++ b/src/modelinfo/SimpleModelInfo.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "Camera.h"
#include "ModelInfo.h"
@@ -131,7 +132,7 @@ CSimpleModelInfo::FindRelatedModel(void)
for(i = 0; i < MODELINFOSIZE; i++){
mi = CModelInfo::GetModelInfo(i);
if(mi && mi != this &&
- strcmp(GetName()+3, mi->GetName()+3) == 0){
+ !CGeneral::faststrcmp(GetName()+3, mi->GetName()+3)){
assert(mi->IsSimple());
this->SetRelatedModel((CSimpleModelInfo*)mi);
return;