Improve MotionLoad
This commit is contained in:
parent
d372b1c596
commit
239df728da
1 changed files with 12 additions and 6 deletions
|
|
@ -1004,6 +1004,12 @@ static inline char *MotionGetName(HsfTrack *track)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline BOOL CompareName(char *name1, char *name2)
|
||||||
|
{
|
||||||
|
int unk = 0;
|
||||||
|
return !strcmp(name1, name2);
|
||||||
|
}
|
||||||
|
|
||||||
static inline s32 FindObjectName(char *name)
|
static inline s32 FindObjectName(char *name)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
@ -1011,9 +1017,7 @@ static inline s32 FindObjectName(char *name)
|
||||||
|
|
||||||
object = objtop;
|
object = objtop;
|
||||||
for(i=0; i<head.object.count; i++, object++) {
|
for(i=0; i<head.object.count; i++, object++) {
|
||||||
char *other_name = object->name;
|
if(CompareName(object->name, name)) {
|
||||||
int unk = 0;
|
|
||||||
if(!strcmp(other_name, name)) {
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1328,9 +1332,13 @@ static void MotionLoad(void)
|
||||||
case HSF_TRACK_ATTRIBUTE:
|
case HSF_TRACK_ATTRIBUTE:
|
||||||
MotionLoadAttribute(&track_base[i], track_data);
|
MotionLoadAttribute(&track_base[i], track_data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MatrixLoad(void)
|
static void MatrixLoad(void)
|
||||||
|
|
@ -1370,9 +1378,7 @@ static s32 SearchObjectSetName(HsfData *data, char *name)
|
||||||
HsfObject *object = data->object;
|
HsfObject *object = data->object;
|
||||||
s32 i;
|
s32 i;
|
||||||
for(i=0; i<data->objectCnt; i++, object++) {
|
for(i=0; i<data->objectCnt; i++, object++) {
|
||||||
char *other_name = object->name;
|
if(CompareName(object->name, name)) {
|
||||||
int unk8 = 0;
|
|
||||||
if(!strcmp(other_name, name)) {
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue