labeling pfsManager functions

This commit is contained in:
Banjo Kazooie
2022-12-08 17:17:59 -06:00
parent 143182f44a
commit bbe9f8d384
30 changed files with 281 additions and 281 deletions

View File

@@ -2,13 +2,12 @@
#include "functions.h"
#include "variables.h"
//BKMeshList_getVtxCount
s32 func_802E9F60(BKMeshList *arg0){
s32 meshList_getVtxCount(BKMeshList *meshList){
s32 i;
s32 v1 = 0;
BKMesh *v0 = (BKMesh *)(arg0 + 1);
BKMesh *v0 = (BKMesh *)(meshList + 1);
for(i = 0; i < arg0->meshCount_0; ++i){
for(i = 0; i < meshList->meshCount_0; ++i){
v1 += v0->vtxCount_2;
v0 = (BKMesh *)&((s16*)(v0 +1))[v0->vtxCount_2];
@@ -16,11 +15,11 @@ s32 func_802E9F60(BKMeshList *arg0){
return v1;
}
BKMesh * func_802E9F9C(BKMeshList *arg0, s32 mesh_id){
BKMesh * meshList_getMesh(BKMeshList *meshList, s32 mesh_id){
s32 i;
BKMesh *v1 = (BKMesh *)(arg0 + 1);
BKMesh *v1 = (BKMesh *)(meshList + 1);
for(i=0; i < arg0->meshCount_0; i++){
for(i=0; i < meshList->meshCount_0; i++){
if(v1->uid_0 == mesh_id){
return v1;
}
@@ -29,9 +28,9 @@ BKMesh * func_802E9F9C(BKMeshList *arg0, s32 mesh_id){
return NULL;
}
bool func_802E9FEC(BKMeshList * arg0, s32 mesh_id, void *vtx_id){
bool meshList_meshContainsVtx(BKMeshList * meshList, s32 mesh_id, void *vtx_id){
s32 i;
BKMesh *v0 = func_802E9F9C(arg0, mesh_id);
BKMesh *v0 = meshList_getMesh(meshList, mesh_id);
if(v0){
for(i = 0; i < v0->vtxCount_2; i++){

View File

@@ -262,7 +262,7 @@ void func_80334B20(enum map_e arg0, s32 arg1, s32 arg2) {
if (func_802E4A08() == 0) {
func_802F5188();
}
if (arg0 != 0x1F) {
if (arg0 != MAP_1F_CS_START_RAREWARE) {
func_8024F150();
}
}

View File

@@ -18,7 +18,7 @@ struct {
ALBank * D_80383604;
/* .code */
void func_80335220(void){
void sfxInstruments_init(void){
ALBank *bnk;
s32 size;
ALInstrument *inst;

View File

@@ -12,23 +12,23 @@ f32 D_803709E0[] = {
1.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f
};
s32 D_80370A10 = 0;
u8 D_80370A14 = 0; //assetCache_size;
u8 D_80370A18 = 0;
s32 assetCacheCurrentSize = 0;
u8 assetCacheLength = 0; //assetCache_size;
u8 assetCacheCurrentIndex = 0;
u8 D_80370A1C = 0;
/* .bss */
s32 D_80383CB0;
u8 pad_80383CB8[0x8];
AssetROMHead *D_80383CC0;
AssetFileMeta *D_80383CC4;
AssetROMHead *assetSectionRomHeader;
AssetFileMeta *assetSectionRomMetaList;
u32 D_80383CC8;
s32 D_80383CCC; //asset_data_rom_offset
void** D_80383CD0; //assetCache_ptrs;
void** assetCachePtrList; //assetCache_ptrs;
BKSpriteDisplayData **D_80383CD4;
u8* assetCache_depCount; //assetCache_dependencies;
s16 *D_80383CDC; //assetCache_indexs
u8* assetCacheDependencyCount; //assetCache_dependencies;
s16 *assetCacheAssetIdList; //assetCache_indexs
vector(struct21s) *D_80383CE0[2];
/* .public */
@@ -225,11 +225,11 @@ void func_8033B268(void){
}
void func_8033B2A4(s32 arg0) {
D_80383CD0[D_80370A14] = malloc(arg0);
D_80383CD4[D_80370A14] = NULL;
assetCache_depCount[D_80370A14] = 1;
D_80383CDC[D_80370A14] = -1;
D_80370A14 += 1;
assetCachePtrList[assetCacheLength] = malloc(arg0);
D_80383CD4[assetCacheLength] = NULL;
assetCacheDependencyCount[assetCacheLength] = 1;
assetCacheAssetIdList[assetCacheLength] = -1;
assetCacheLength += 1;
}
bool func_8033B338(void **sprite_ptr, BKSpriteDisplayData **arg1)
@@ -262,25 +262,25 @@ bool func_8033B388(BKSprite **sprite_ptr, BKSpriteDisplayData **arg1){
s32 assetcache_release(void * arg0){
s32 i;
if(arg0){
for(i = 0; i < D_80370A14 && arg0 != D_80383CD0[i]; i++);
for(i = 0; i < assetCacheLength && arg0 != assetCachePtrList[i]; i++);
if(i == D_80370A14)
if(i == assetCacheLength)
return 2;
D_80370A18 = i;
if(assetCache_depCount[i] == 1){
assetCacheCurrentIndex = i;
if(assetCacheDependencyCount[i] == 1){
if(D_80383CD4[i])
func_803449DC(D_80383CD4[i]);
free(arg0);
D_80370A14--;
assetCache_depCount[i] = assetCache_depCount[D_80370A14];
D_80383CD0[i] = D_80383CD0[D_80370A14];
D_80383CD4[i] = D_80383CD4[D_80370A14];
D_80383CDC[i] = D_80383CDC[D_80370A14];
assetCacheLength--;
assetCacheDependencyCount[i] = assetCacheDependencyCount[assetCacheLength];
assetCachePtrList[i] = assetCachePtrList[assetCacheLength];
D_80383CD4[i] = D_80383CD4[assetCacheLength];
assetCacheAssetIdList[i] = assetCacheAssetIdList[assetCacheLength];
return 0;
}
else{
assetCache_depCount[i]--;
assetCacheDependencyCount[i]--;
return 1;
}
} else{
@@ -294,10 +294,10 @@ void assetcache_update_ptr(void * arg0, void* arg1){
if((arg0 == NULL) || (arg1 == NULL) || (arg0 == arg1))
return;
for(i = 0; i < D_80370A14 && arg0 != D_80383CD0[i]; i++);
for(i = 0; i < assetCacheLength && arg0 != assetCachePtrList[i]; i++);
if(i != D_80370A14 && arg1 != D_80383CD0[i])
D_80383CD0[i] = arg1;
if(i != assetCacheLength && arg1 != assetCachePtrList[i])
assetCachePtrList[i] = arg1;
}
void func_8033B5FC(void){
@@ -311,35 +311,35 @@ void func_8033B61C(void){
}
s32 func_8033B64C(s32 arg0){
return D_80383CC4[arg0].unk6;
return assetSectionRomMetaList[arg0].unk6;
}
s32 func_8033B664(void){//asset get rom count
return D_80383CC0->count-1;
s32 assetSection_getCount(void){
return assetSectionRomHeader->count-1;
}
s32 func_8033B678(void ){//static last asset decompressed size
return D_80370A10;
s32 func_8033B678(void ){
return assetCacheCurrentSize;
}
s32 func_8033B684(s32 arg0){ //asset_size
return D_80383CC4[arg0+1].offset - D_80383CC4[arg0].offset;
s32 asset_getSize(s32 arg0){
return assetSectionRomMetaList[arg0+1].offset - assetSectionRomMetaList[arg0].offset;
}
s32 func_8033B6A4(enum asset_e arg0){ //asset_compressed?
return (D_80383CC4[arg0].compFlag & 1) !=0;
bool asset_isCompressed(enum asset_e arg0){ //asset_compressed?
return (assetSectionRomMetaList[arg0].compFlag & 1) !=0;
}
//returns raw sprite(as saved in ROM) and points arg1 to a parsed sprite(?)
BKSprite *func_8033B6C4(enum asset_e sprite_id, BKSpriteDisplayData **arg1){
BKSprite *s0;
s0 = assetcache_get(sprite_id);
if(D_80383CD4[D_80370A18] == NULL){
if(D_80383CD4[assetCacheCurrentIndex] == NULL){
func_803382E4(-1);
func_80338308(func_802510A0(s0), func_802510A8(s0));
D_80383CD4[D_80370A18] = func_80344A1C(s0);
D_80383CD4[assetCacheCurrentIndex] = func_80344A1C(s0);
}
*arg1 = D_80383CD4[D_80370A18];
*arg1 = D_80383CD4[assetCacheCurrentIndex];
return s0;
}
@@ -347,7 +347,7 @@ void func_8033B788(void ){
D_80370A1C = 1;
}
void *assetcache_get(s32 arg0) {
void *assetcache_get(enum asset_e assetId) {
s32 comp_size;//sp_44
s32 i;
volatile s32 sp3C; //sp3C
@@ -359,24 +359,24 @@ void *assetcache_get(s32 arg0) {
sp28 = (s32 )D_80370A1C;
D_80370A1C = (u8)0U;
for(i = 0; i < D_80370A14 && arg0 != D_80383CDC[i]; i++);
D_80370A18 = i;
for(i = 0; i < assetCacheLength && assetId != assetCacheAssetIdList[i]; i++);
assetCacheCurrentIndex = i;
if(i == 0x96)
return NULL;
if(i < D_80370A14){ //asset exists in array;
assetCache_depCount[i]++;
return D_80383CD0[i];
if(i < assetCacheLength){ //asset exists in array;
assetCacheDependencyCount[i]++;
return assetCachePtrList[i];
}
comp_size = D_80383CC4[arg0+1].offset - D_80383CC4[arg0].offset;
comp_size = assetSectionRomMetaList[assetId+1].offset - assetSectionRomMetaList[assetId].offset;
if(comp_size & 1)
comp_size++;
sp3C = comp_size;
if(D_80383CC4[arg0].compFlag & 0x0001){//compressed
func_8033BAB0(arg0, 0, 0x10, &D_80383CB0);
D_80370A10 = rarezip_get_uncompressed_size(&D_80383CB0);
uncomp_size = D_80370A10;
if(assetSectionRomMetaList[assetId].compFlag & 0x0001){//compressed
func_8033BAB0(assetId, 0, 0x10, &D_80383CB0);
assetCacheCurrentSize = rarezip_get_uncompressed_size(&D_80383CB0);
uncomp_size = assetCacheCurrentSize;
if(uncomp_size & 0xF){
uncomp_size -= uncomp_size & 0xF;
uncomp_size += 0x10;
@@ -398,63 +398,62 @@ void *assetcache_get(s32 arg0) {
uncompressed_file = malloc(comp_size);
compressed_file = uncompressed_file;
}
func_802405F0(compressed_file, D_80383CC4[arg0].offset + D_80383CCC, sp3C);
if(D_80383CC4[arg0].compFlag & 0x0001){//decompress
func_802405F0(compressed_file, assetSectionRomMetaList[assetId].offset + D_80383CCC, sp3C);
if(assetSectionRomMetaList[assetId].compFlag & 0x0001){//decompress
rarezip_inflate(compressed_file, uncompressed_file);
realloc(uncompressed_file, D_80370A10);
osWritebackDCache(uncompressed_file, D_80370A10);
realloc(uncompressed_file, assetCacheCurrentSize);
osWritebackDCache(uncompressed_file, assetCacheCurrentSize);
if (sp33 == 2) {
free(compressed_file);
}
}
D_80370A18 = D_80370A14;
assetCache_depCount[D_80370A14] = 1;
D_80383CD0[D_80370A14] = uncompressed_file;
D_80383CD4[D_80370A14] = 0;
D_80383CDC[D_80370A14] = arg0;
D_80370A14++;
assetCacheCurrentIndex = assetCacheLength;
assetCacheDependencyCount[assetCacheLength] = 1;
assetCachePtrList[assetCacheLength] = uncompressed_file;
D_80383CD4[assetCacheLength] = 0;
assetCacheAssetIdList[assetCacheLength] = assetId;
assetCacheLength++;
return uncompressed_file;
}
void func_8033BAB0(enum asset_e asset_id, s32 offset, s32 size, void *dst_ptr) {
func_802405F0(dst_ptr, D_80383CC4[asset_id].offset + D_80383CCC + offset, size);
func_802405F0(dst_ptr, assetSectionRomMetaList[asset_id].offset + D_80383CCC + offset, size);
}
void func_8033BB00(void *arg0, s32 arg1){
void assetCache_resizeAsset(void *assetPtr, s32 size){
s32 tmp;
s32 i;
for(i = 0; i < D_80370A14 && arg0 != D_80383CD0[i]; i++);
D_80383CD0[i] = realloc(arg0, arg1);
for(i = 0; i < assetCacheLength && assetPtr != assetCachePtrList[i]; i++);
assetCachePtrList[i] = realloc(assetPtr, size);
}
//assetCache_init
void assetCache_init(void){
D_80370A1C = 0;
func_8033B180();
D_80383CD0 = malloc(600);
assetCachePtrList = (void **)malloc(150*sizeof(void*));
D_80383CD4 = malloc(600);
assetCache_depCount = malloc(150);
D_80383CDC = malloc(150*sizeof(s16));
D_80370A14 = 0;
D_80383CC0 = malloc(sizeof(AssetROMHead));
assetCacheDependencyCount = (u8*)malloc(150*sizeof(u8));
assetCacheAssetIdList = (s16 *)malloc(150*sizeof(s16));
assetCacheLength = 0;
assetSectionRomHeader = (AssetROMHead *)malloc(sizeof(AssetROMHead));
D_80383CC8 = (u32) &D_5E90;
func_802405F0(D_80383CC0, D_80383CC8, sizeof(AssetROMHead));
D_80383CC4 = malloc(D_80383CC0->count*sizeof(AssetFileMeta));
func_802405F0(D_80383CC4, D_80383CC8 + sizeof(AssetROMHead),D_80383CC0->count*sizeof(AssetFileMeta));
D_80383CCC = D_80383CC8 + sizeof(AssetROMHead) + D_80383CC0->count*sizeof(AssetFileMeta);
func_802405F0(assetSectionRomHeader, D_80383CC8, sizeof(AssetROMHead));
assetSectionRomMetaList = (AssetFileMeta *)malloc(assetSectionRomHeader->count*sizeof(AssetFileMeta));
func_802405F0(assetSectionRomMetaList, D_80383CC8 + sizeof(AssetROMHead),assetSectionRomHeader->count*sizeof(AssetFileMeta));
D_80383CCC = D_80383CC8 + sizeof(AssetROMHead) + assetSectionRomHeader->count*sizeof(AssetFileMeta);
}
s32 func_8033BC94(s32 arg0){ //asset_compressedSize
return D_80383CC4[arg0+1].offset - D_80383CC4[arg0].offset;
s32 asset_getCompressedSize(enum asset_e arg0){
return assetSectionRomMetaList[arg0+1].offset - assetSectionRomMetaList[arg0].offset;
}
s32 func_8033BCB4(s32 arg0){ //asset_getDependencyCount
s32 assetCache_getDependencyCount(enum asset_e arg0){
s32 i;
for(i = 0; i < D_80370A14 && arg0 != D_80383CDC[i]; i++);
if(i < D_80370A14){
return assetCache_depCount[i];
for(i = 0; i < assetCacheLength && arg0 != assetCacheAssetIdList[i]; i++);
if(i < assetCacheLength){
return assetCacheDependencyCount[i];
}
return 0;
}
@@ -486,23 +485,23 @@ s32 func_8033BDAC(enum asset_e id, void *dst, s32 size) {
s32 sp20;
//find asset in cache
for(phi_v0 = 0; phi_v0 < D_80370A14 && id != D_80383CDC[phi_v0]; phi_v0++);
D_80370A18 = phi_v0;
if (phi_v0 == 0x96) {
for(phi_v0 = 0; phi_v0 < assetCacheLength && id != assetCacheAssetIdList[phi_v0]; phi_v0++);
assetCacheCurrentIndex = phi_v0;
if (phi_v0 == 150) { //asset not in cache
return 0;
}
comp_ptr = D_80383CC4[id + 1].offset - D_80383CC4[id].offset;
comp_ptr = assetSectionRomMetaList[id + 1].offset - assetSectionRomMetaList[id].offset;
if (comp_ptr & 1) {
comp_ptr++;
}
sp34 = comp_ptr;
if (D_80383CC4[id].compFlag & 1) {
if (assetSectionRomMetaList[id].compFlag & 1) {
func_8033BAB0(id, 0, 0x10, &D_80383CB0);
D_80370A10 = rarezip_get_uncompressed_size(&D_80383CB0);
assetCacheCurrentSize = rarezip_get_uncompressed_size(&D_80383CB0);
// get aligned uncompressed size
var_s0 = D_80370A10;
var_s0 = assetCacheCurrentSize;
if (var_s0 & 0xF) {
var_s0 = (var_s0 - (var_s0 & 0xF)) + 0x10;
}
@@ -531,11 +530,11 @@ s32 func_8033BDAC(enum asset_e id, void *dst, s32 size) {
return 0;
}
}
comp_size = D_80383CC4[id].offset + D_80383CCC;
comp_size = assetSectionRomMetaList[id].offset + D_80383CCC;
func_802405F0(comp_ptr, comp_size, sp34);
if (D_80383CC4[id].compFlag & 1) {
if (assetSectionRomMetaList[id].compFlag & 1) {
rarezip_inflate(comp_ptr, dst);
osWritebackDCache(dst, D_80370A10);
osWritebackDCache(dst, assetCacheCurrentSize);
if (sp2B == 2) {
free((void *)comp_ptr);
}

View File

@@ -3,11 +3,11 @@
#include "variables.h"
void func_8033F2B4(BKModel *model, s32 mesh_id, s16 arg2[3], s16 arg3[3]);
void BKModel_getMeshCoordRange(BKModel *model, s32 mesh_id, s16 min[3], s16 max[3]);
s32 func_8033F3E8(BKModel *model, f32 position[3], s32 min_id, s32 max_id);
/* .code */
//performs operation "fn" for every vtx in every mesh of a model
void func_8033F010(BKModel *model, void (*fn)(s32, BKVtxRef *, Vtx *, s32), s32 arg3) {
void BKModel_transformMeshes(BKModel *model, void (*fn)(s32, BKVtxRef *, Vtx *, s32), s32 arg3) {
s32 i;
BKMesh *iMesh;
BKVtxRef *iVtx;
@@ -28,7 +28,7 @@ void func_8033F010(BKModel *model, void (*fn)(s32, BKVtxRef *, Vtx *, s32), s32
}
//performs operation "fn" for every vtx in a model's mesh
void func_8033F120(BKModel *model, s32 mesh_id, void (*fn)(s32, BKVtxRef *, Vtx *, s32), s32 arg3) {
void BKModel_transformMesh(BKModel *model, s32 mesh_id, void (*fn)(s32, BKVtxRef *, Vtx *, s32), s32 arg3) {
s32 i;
BKMesh *iMesh;
BKVtxRef *iVtx;
@@ -52,22 +52,22 @@ void func_8033F120(BKModel *model, s32 mesh_id, void (*fn)(s32, BKVtxRef *, Vtx
}
//BKModel_getAveragePositionOfMesh
void func_8033F220(BKModel *model, s32 mesh_id, s16 arg2[3]) {
void BKModel_getMeshCenter(BKModel *model, s32 mesh_id, s16 arg2[3]) {
s16 min[3];
s16 max[3];
func_8033F2B4(model, mesh_id, min, max);
BKModel_getMeshCoordRange(model, mesh_id, min, max);
arg2[0] = (min[0] + max[0]) / 2;
arg2[1] = (min[1] + max[1]) / 2;
arg2[2] = (min[2] + max[2]) / 2;
}
BKMeshList *func_8033F2AC(BKModel *arg0){
BKMeshList *BKModel_getMeshList(BKModel *arg0){
return arg0->meshList_0;
}
void func_8033F2B4(BKModel *model, s32 mesh_id, s16 arg2[3], s16 arg3[3]) {
void BKModel_getMeshCoordRange(BKModel *model, s32 mesh_id, s16 min[3], s16 max[3]) {
s32 pad2C;
s32 pad28;
BKMesh *mesh;
@@ -78,7 +78,7 @@ void func_8033F2B4(BKModel *model, s32 mesh_id, s16 arg2[3], s16 arg3[3]) {
s16 *phi_t4;
s32 i;
mesh = func_802E9F9C(model->meshList_0, mesh_id);
mesh = meshList_getMesh(model->meshList_0, mesh_id);
vtx_pool = vtxList_getVertices(model->vtxList_4);
if (mesh == NULL) return;
@@ -88,10 +88,10 @@ void func_8033F2B4(BKModel *model, s32 mesh_id, s16 arg2[3], s16 arg3[3]) {
i_vtx = &vtx_pool[*phi_t4];
for(i = 0; i < 3; i++){
if (phi_t4 == (s16*)(mesh + 1)) {
arg2[i] = arg3[i] = i_vtx->v.ob[i];
min[i] = max[i] = i_vtx->v.ob[i];
} else {
arg2[i] = MIN(i_vtx->v.ob[i], arg2[i]);
arg3[i] = MAX(i_vtx->v.ob[i], arg3[i]);
min[i] = MIN(i_vtx->v.ob[i], min[i]);
max[i] = MAX(i_vtx->v.ob[i], max[i]);
}
}
}
@@ -181,7 +181,7 @@ BKModel *func_8033F5F8(BKMeshList *arg0, BKVertexList *arg1) {
s32 phi_s1;
s32 phi_s6;
sp40 = (BKModel *)malloc((func_802E9F60(arg0) * sizeof(BKVtxRef)) + (arg0->meshCount_0 * sizeof(BKMesh)) + sizeof(BKModel));
sp40 = (BKModel *)malloc((meshList_getVtxCount(arg0) * sizeof(BKVtxRef)) + (arg0->meshCount_0 * sizeof(BKMesh)) + sizeof(BKModel));
sp40->meshList_0 = arg0;
sp40->vtxList_4 = arg1;
phi_s3 = (BKMesh *)(arg0 + 1);

View File

@@ -162,7 +162,7 @@ void func_8034B580(s32 arg0) {
if ((D_80386128 >= 2.5) && (sp1C < 2.5) && (D_80371F9C == 0)) {
func_802DC9DC(0, 0);
}
if ((D_80386128 >= 4.0) && (sp1C < 4.0) && (func_8024F12C() == 0)) {
if ((D_80386128 >= 4.0) && (sp1C < 4.0) && !pfsManager_contErr()) {
chOverlayPressStart_spawn(0, 0);
if (D_80371F9C != 0) {
chOverlayPressStart_func_802DCDB0();
@@ -174,7 +174,7 @@ void func_8034B580(s32 arg0) {
if ((D_80386128 >= 2.5) && (sp1C < 2.5)) {
chOverlayCopyright_func_802DCB0C(0, 0);
}
if ((D_80386128 >= 4.0) && (sp1C < 4.0) && (func_8024F12C() == 0)) {
if ((D_80386128 >= 4.0) && (sp1C < 4.0) && !pfsManager_contErr()) {
chOverlayPressStart_spawn(0, 0);
}
break;

View File

@@ -83,7 +83,7 @@ void func_8034BFF8(ActorMarker *marker) {
if (marker->unk48 != NULL) {
marker->unk4C = vector_new(sizeof(Struct6Es), 0);
sp2C = func_8033F2AC(marker->unk48);
sp2C = BKModel_getMeshList(marker->unk48);
phi_s1 = (BKMesh *)(sp2C + 1);
for(phi_s2 = 0; phi_s2 < sp2C->meshCount_0; phi_s2++){
if ((phi_s1->uid_0 >= 0x65) && (phi_s1->uid_0 < 0xC8)) {

View File

@@ -122,7 +122,7 @@ Struct70s *func_8034C630(s32 arg0){
for(iPtr = vector_getBegin(D_80386140.unk4); iPtr < endPtr; iPtr++){
if( (iPtr->unk6 == 3)
&& func_802E9FEC(func_8033F2AC(iPtr->unk0), iPtr->unk4, arg0)
&& meshList_meshContainsVtx(BKModel_getMeshList(iPtr->unk0), iPtr->unk4, arg0)
){
return &iPtr->unk8;
}
@@ -131,7 +131,7 @@ Struct70s *func_8034C630(s32 arg0){
}
void func_8034C6DC(BKModel *arg0){
BKMeshList * sp2C = func_8033F2AC(arg0);
BKMeshList * sp2C = BKModel_getMeshList(arg0);
s32 i;
BKMesh * s1 = (sp2C + 1);
for(i = 0; i < sp2C->meshCount_0; i++){

View File

@@ -26,5 +26,5 @@ void func_8034CB9C(Struct6Fs *arg0, BKModel *model, s32 mesh_id) {
arg0->unk0 = 0.3f;
arg0->unk4 = -arg0->unk4;
}
func_8033F120(model, mesh_id, func_8034CA80, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034CA80, (s32) arg0);
}

View File

@@ -45,5 +45,5 @@ void func_8034CD8C(Struct71s *arg0, BKModel *arg1, s32 arg2) {
if ((arg0->unk0 == 2) && func_8025773C(&arg0->unkC, temp_f14)) {
func_8034CD08(arg0, 1);
}
func_8033F120(arg1, arg2, func_8034CC50, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034CC50, (s32) arg0);
}

View File

@@ -20,7 +20,7 @@ void func_8034CF90(Struct72s *arg0, BKModel *arg1, s32 arg2) {
arg0->unk0 += randf2(-0.04f, 0.04f);
arg0->unk0 = (arg0->unk0 > 1.0f) ? 1.0f : arg0->unk0;
arg0->unk0 = (arg0->unk0 < 0.8) ? 0.8 : arg0->unk0;
func_8033F120(arg1, arg2, func_8034CE90, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034CE90, (s32) arg0);
}
void func_8034D048(Struct72s *arg0, BKModel *arg1, s32 arg2) {
@@ -28,5 +28,5 @@ void func_8034D048(Struct72s *arg0, BKModel *arg1, s32 arg2) {
arg0->unk0 += (osGetCount() & 0x1F) / 387.5;
arg0->unk0 = (arg0->unk0 > 1.0f) ? 1.0f : arg0->unk0;
arg0->unk0 = (arg0->unk0 < 0.8) ? 0.8 : arg0->unk0;
func_8033F120(arg1, arg2, func_8034CE90, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034CE90, (s32) arg0);
}

View File

@@ -28,5 +28,5 @@ void func_8034D194(Struct_core2_C61C0_0 *arg0, BKModel *model, s32 mesh_id) {
arg0->unk0 -= 16384.0f;
}
arg0->unk4 = (s16)arg0->unk0;
func_8033F120(model, mesh_id, func_8034D150, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D150, (s32) arg0);
}

View File

@@ -4,7 +4,7 @@
void func_8034E174(Struct6Ds *arg0);
void func_8033F120(BKModel *, s32, void (*)(s32, BKVtxRef*, Vtx*, s32), s32);
void BKModel_transformMesh(BKModel *, s32, void (*)(s32, BKVtxRef*, Vtx*, s32), s32);
extern f32 D_80379200;
extern f64 D_80379208;
@@ -145,7 +145,7 @@ void func_8034DD74(Struct6Ds *arg0, s32 arg1, BKModel *model, s32 mesh_id) {
arg0->unk98 = 0.0f;
arg0->unk44 = 0.0f;
arg0->unk48 = 0.0f;
func_8033F2B4(model, mesh_id, arg0->unk14, arg0->unk1A);
BKModel_getMeshCoordRange(model, mesh_id, arg0->unk14, arg0->unk1A);
}
void func_8034DDF0(Struct6Ds *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4){
@@ -281,7 +281,7 @@ void func_8034E26C(Struct6Ds *arg0, BKModel *model, s32 mesh_id) {
arg0->unk28 = 2;
}
}
func_8033F120(model, mesh_id, func_8034D240, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D240, (s32) arg0);
if (arg0->unk28 != 0) {
arg0->unk28--;
if (arg0->unk28 == 0) {
@@ -300,9 +300,9 @@ void func_8034E26C(Struct6Ds *arg0, BKModel *model, s32 mesh_id) {
}
if (arg0->unk29 == 5) {
func_8033F120(model, mesh_id, func_8034D9C8, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D9C8, (s32) arg0);
} else {
func_8033F120(model, mesh_id, func_8034D740, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D740, (s32) arg0);
}
if (arg0->unk28 != 0) {
@@ -340,16 +340,16 @@ void func_8034E26C(Struct6Ds *arg0, BKModel *model, s32 mesh_id) {
}
switch (arg0->unk29) {
case 1:
func_8033F120(model, mesh_id, func_8034D554, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D554, (s32) arg0);
break;
case 2:
func_8033F120(model, mesh_id, func_8034D634, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D634, (s32) arg0);
break;
case 3:
func_8033F120(model, mesh_id, func_8034D700, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034D700, (s32) arg0);
break;
case 4:
func_8033F120(model, mesh_id, func_8034DA7C, (s32) arg0);
BKModel_transformMesh(model, mesh_id, func_8034DA7C, (s32) arg0);
break;
}
if (arg0->unk48 <= arg0->unk44) {

View File

@@ -39,7 +39,7 @@ void func_8034E71C(Struct73s *arg0, s32 arg1, f32 arg2) {
if (arg2 == 0.0f) {
arg0->dy = arg1;
sp18 = func_8034C4F0(arg0);
func_8033F120(sp18, func_8034C50C(arg0), func_8034E660, (s32) arg0);
BKModel_transformMesh(sp18, func_8034C50C(arg0), func_8034E660, (s32) arg0);
}
}
@@ -104,5 +104,5 @@ void func_8034E8E4(Struct73s *arg0, BKModel *arg1, s32 arg2) {
sp28 = ((arg0->unk14 < arg0->unk1C) ? arg0->unkC + ((arg0->unk14 / arg0->unk1C) * (arg0->unkE - arg0->unkC)) : arg0->unkE);
sp28 += sp2C;
arg0->dy = (sp28 >= 0.0) ? sp28 + 0.5 : sp28 - 0.5;
func_8033F120(arg1, arg2, func_8034E660, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034E660, (s32) arg0);
}

View File

@@ -28,7 +28,7 @@ void func_8034EE2C(Struct77s *arg0, s32 arg1, BKModel *arg2, s32 arg3) {
s16 sp28[3];
s16 sp20[3];
func_8033F2B4(arg2, arg3, sp28, sp20);
BKModel_getMeshCoordRange(arg2, arg3, sp28, sp20);
arg0->unk0 = 1.0f;
arg0->unk4 = 0.0f;
arg0->unk8 = 0.0f;
@@ -57,5 +57,5 @@ void func_8034EF60(Struct77s *arg0, BKModel *arg1, s32 arg2) {
sp2C[1] = ((50.0f * sinf(arg0->unk2C * 0.5 * BAD_PI)) + (cosf(arg0->unk2C * 0.22 * BAD_PI) * 100.0f)) * 0.8;
arg0->unk28[0] = (sp2C[0] >= 0.0) ? (sp2C[0] + 0.5) : (sp2C[0] - 0.5);
arg0->unk28[1] = (sp2C[1] >= 0.0) ? (sp2C[1] + 0.5) : (sp2C[1] - 0.5);
func_8033F120(arg1, arg2, &func_8034EC50, arg0);
BKModel_transformMesh(arg1, arg2, &func_8034EC50, arg0);
}

View File

@@ -28,5 +28,5 @@ void func_8034F268(Struct75s *arg0, BKModel *arg1, s32 arg2) {
} else {
arg0->unk0 = 0.0f;
}
func_8033F120(arg1, arg2, func_8034F1C0, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034F1C0, (s32) arg0);
}

View File

@@ -32,5 +32,5 @@ void func_8034F398(f32 *arg0, BKModel *arg1, s32 arg2) {
} else {
*arg0 = 0.0f;
}
func_8033F120(arg1, arg2, func_8034F2F0, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034F2F0, (s32) arg0);
}

View File

@@ -67,5 +67,5 @@ void func_8034F5B0(Struct76s *arg0, BKModel *arg1, s32 arg2){
func_8034F434(arg0, 0);
}
}
func_8033F120(arg1, arg2, func_8034F420, (s32) arg0);
BKModel_transformMesh(arg1, arg2, func_8034F420, (s32) arg0);
}