From 0b6390b8f2949b6d4245fea42f71ecfd637b35b5 Mon Sep 17 00:00:00 2001 From: gamemasterplc Date: Tue, 5 Dec 2023 07:37:57 -0600 Subject: [PATCH] Add hsfload.h header --- include/game/hsfload.h | 12 ++++++++++++ src/game/hsfload.c | 14 +++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 include/game/hsfload.h diff --git a/include/game/hsfload.h b/include/game/hsfload.h new file mode 100644 index 00000000..b390f179 --- /dev/null +++ b/include/game/hsfload.h @@ -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 \ No newline at end of file diff --git a/src/game/hsfload.c b/src/game/hsfload.c index 65b23684..932a4503 100644 --- a/src/game/hsfload.c +++ b/src/game/hsfload.c @@ -1,4 +1,4 @@ -#include "game/hsfformat.h" +#include "game/hsfload.h" #include "string.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; s32 i; - if(!model) { + if(!src_model) { return; } - if(model->clusterCnt == 0) { + if(src_model->clusterCnt == 0) { return; } - cluster = model->cluster; + cluster = src_model->cluster; if(cluster->adjusted) { return; } cluster->adjusted = 1; - for(i=0; iclusterCnt; i++, cluster++) { + for(i=0; iclusterCnt; i++, cluster++) { char *name = cluster->targetName; - cluster->target = SearchObjectSetName(src_model, name); + cluster->target = SearchObjectSetName(model, name); } }