Add hsfload.h header
This commit is contained in:
parent
5754048056
commit
0b6390b8f2
2 changed files with 19 additions and 7 deletions
12
include/game/hsfload.h
Normal file
12
include/game/hsfload.h
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef _HSFLOAD_H
|
||||||
|
#define _HSFLOAD_H
|
||||||
|
|
||||||
|
#include "game/hsfformat.h"
|
||||||
|
|
||||||
|
HsfData *LoadHSF(void *data);
|
||||||
|
void ClusterAdjustObject(HsfData *model, HsfData *src_model);
|
||||||
|
char *SetName(u32 *str_ofs);
|
||||||
|
char *MakeObjectName(char *name);
|
||||||
|
int CmpObjectName(char *name1, char *name2);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "game/hsfformat.h"
|
#include "game/hsfload.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "ctype.h"
|
#include "ctype.h"
|
||||||
|
|
||||||
|
|
@ -89,24 +89,24 @@ HsfData *LoadHSF(void *data)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClusterAdjustObject(HsfData *src_model, HsfData *model)
|
void ClusterAdjustObject(HsfData *model, HsfData *src_model)
|
||||||
{
|
{
|
||||||
HsfCluster *cluster;
|
HsfCluster *cluster;
|
||||||
s32 i;
|
s32 i;
|
||||||
if(!model) {
|
if(!src_model) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(model->clusterCnt == 0) {
|
if(src_model->clusterCnt == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cluster = model->cluster;
|
cluster = src_model->cluster;
|
||||||
if(cluster->adjusted) {
|
if(cluster->adjusted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cluster->adjusted = 1;
|
cluster->adjusted = 1;
|
||||||
for(i=0; i<model->clusterCnt; i++, cluster++) {
|
for(i=0; i<src_model->clusterCnt; i++, cluster++) {
|
||||||
char *name = cluster->targetName;
|
char *name = cluster->targetName;
|
||||||
cluster->target = SearchObjectSetName(src_model, name);
|
cluster->target = SearchObjectSetName(model, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue