summaryrefslogtreecommitdiffstats
path: root/src/animation
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation')
-rw-r--r--src/animation/AnimBlendAssocGroup.cpp15
-rw-r--r--src/animation/AnimBlendAssociation.h2
-rw-r--r--src/animation/AnimManager.cpp5
-rw-r--r--src/animation/RpAnimBlend.cpp3
4 files changed, 14 insertions, 11 deletions
diff --git a/src/animation/AnimBlendAssocGroup.cpp b/src/animation/AnimBlendAssocGroup.cpp
index 72c90233..ecdebd29 100644
--- a/src/animation/AnimBlendAssocGroup.cpp
+++ b/src/animation/AnimBlendAssocGroup.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "ModelInfo.h"
#include "AnimManager.h"
#include "RpAnimBlend.h"
@@ -38,7 +39,7 @@ CAnimBlendAssocGroup::GetAnimation(const char *name)
{
int i;
for(i = 0; i < numAssociations; i++)
- if(strcmpi(assocList[i].hierarchy->name, name) == 0)
+ if(!CGeneral::faststricmp(assocList[i].hierarchy->name, name))
return &assocList[i];
return nil;
}
@@ -64,7 +65,7 @@ CAnimBlendAssocGroup::CopyAnimation(const char *name)
return new CAnimBlendAssociation(*anim);
}
-int
+bool
strcmpIgnoringDigits(const char *s1, const char *s2)
{
char c1, c2;
@@ -75,13 +76,13 @@ strcmpIgnoringDigits(const char *s1, const char *s2)
if(c1) s1++;
if(c2) s2++;
if(c1 == '\0' && c2 == '\0')
- return 1;
- if(islower(c1)) c1 = toupper(c1);
- if(islower(c2)) c2 = toupper(c2);
- if(isdigit(c1) && isdigit(c2))
+ return true;
+ if(__ascii_iswdigit(c1) && __ascii_iswdigit(c2))
continue;
+ c1 = __ascii_toupper(c1);
+ c2 = __ascii_toupper(c2);
if(c1 != c2)
- return 0;
+ return false;
}
}
diff --git a/src/animation/AnimBlendAssociation.h b/src/animation/AnimBlendAssociation.h
index 01d862cc..aec28f56 100644
--- a/src/animation/AnimBlendAssociation.h
+++ b/src/animation/AnimBlendAssociation.h
@@ -16,7 +16,7 @@ enum {
ASSOC_FLAG80 = 0x80, // used for footstep sound calculation
ASSOC_FLAG100 = 0x100,
ASSOC_FLAG200 = 0x200,
- ASSOC_FLAG400 = 0x400, // not seen yet
+ ASSOC_FLAG400 = 0x400, // unused, blending it with move anims makes them stop. 0x800 in VC
ASSOC_FLAG800 = 0x800, // anims that we fall to front. 0x1000 in VC
ASSOC_HAS_X_TRANSLATION = 0x1000,
// 0x2000 is vehicle anims in VC
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp
index 444ae93d..e5721bdf 100644
--- a/src/animation/AnimManager.cpp
+++ b/src/animation/AnimManager.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "ModelInfo.h"
#include "ModelIndices.h"
#include "FileMgr.h"
@@ -605,7 +606,7 @@ CAnimManager::GetAnimationBlock(const char *name)
int i;
for(i = 0; i < ms_numAnimBlocks; i++)
- if(strcmpi(ms_aAnimBlocks[i].name, name) == 0)
+ if(strcasecmp(ms_aAnimBlocks[i].name, name) == 0)
return &ms_aAnimBlocks[i];
return nil;
}
@@ -617,7 +618,7 @@ CAnimManager::GetAnimation(const char *name, CAnimBlock *animBlock)
CAnimBlendHierarchy *hier = &ms_aAnimations[animBlock->firstIndex];
for(i = 0; i < animBlock->numAnims; i++){
- if(strcmpi(hier->name, name) == 0)
+ if(!CGeneral::faststricmp(hier->name, name))
return hier;
hier++;
}
diff --git a/src/animation/RpAnimBlend.cpp b/src/animation/RpAnimBlend.cpp
index 17394743..8108619e 100644
--- a/src/animation/RpAnimBlend.cpp
+++ b/src/animation/RpAnimBlend.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "NodeName.h"
#include "VisibilityPlugins.h"
#include "AnimBlendClumpData.h"
@@ -320,7 +321,7 @@ void
FrameFindCallBack(AnimBlendFrameData *frame, void *arg)
{
char *nodename = GetFrameNodeName(frame->frame);
- if(strcmpi(nodename, (char*)arg) == 0)
+ if(!CGeneral::faststricmp(nodename, (char*)arg))
pFrameDataFound = frame;
}