Merge pull request #519 from Bl00D4NGEL/match/func_800BA4B8

match: func_800BA4B8
This commit is contained in:
Dominik Peters
2025-04-19 02:26:33 +02:00
committed by GitHub
2 changed files with 44 additions and 10 deletions
+7 -7
View File
@@ -5,9 +5,9 @@ This repo contains a work-in-progress decompilation of Diddy Kong Racing for the
All versions are supported, and the US 1.0 version (SHA1 = 0cb115d8716dbbc2922fda38e533b9fe63bb9670) of the game is the default if not specified.
<!-- README_SCORE_SUMMARY_BEGIN -->
As of April 16, 2025, this is our current score:
As of April 18, 2025, this is our current score:
&emsp;&emsp;&emsp;&emsp;Decomp progress: 79.61%
&emsp;&emsp;&emsp;&emsp;Decomp progress: 79.73%
&emsp;&emsp;&emsp;&emsp;Documentation progress: 50.27%
<!-- README_SCORE_SUMMARY_END -->
@@ -117,20 +117,20 @@ s32 is_drumstick_unlocked(void) {
```
<!-- README_SCORE_BEGIN -->
As of April 16, 2025, this is our current score:
As of April 18, 2025, this is our current score:
```
===================================================================
ADVENTURE ONE (ASM -> C Decompilation)
-------------- 79.61% Complete (82.18% NON_MATCHING) --------------
# Decompiled functions: 1854
# GLOBAL_ASM remaining: 96
-------------- 79.73% Complete (82.30% NON_MATCHING) --------------
# Decompiled functions: 1855
# GLOBAL_ASM remaining: 95
# NON_MATCHING functions: 12
# NON_EQUIVALENT WIP functions: 28
--------------------------- Game Status ---------------------------
Balloons: 38/47, Keys: 4/4, Trophies: 3/5
T.T. Amulets: 4/4, Wizpig Amulets: 3/4
-------------------------------------------------------------------
We are collecting silver coins in Haunted Woods. (4/8 silver coins)
We are collecting silver coins in Haunted Woods. (5/8 silver coins)
===================================================================
ADVENTURE TWO (Cleanup & Documentation)
------------------------- 50.27% Complete -------------------------
+37 -3
View File
@@ -65,7 +65,7 @@ const char D_800E9260[] = "\nError :: can not add another wave swell, reached li
/************ .bss ************/
s32 D_80129FC0;
Gfx *D_80129FC0;
s32 D_80129FC4;
unk80129FC8 D_80129FC8;
s32 D_8012A018;
@@ -918,8 +918,42 @@ void func_800BA288(s32 arg0, s32 arg1) {
}
}
// https://decomp.me/scratch/h4uac
#pragma GLOBAL_ASM("asm/nonmatchings/waves/func_800BA4B8.s")
void func_800BA4B8(TextureHeader *tex, s32 arg1) {
s32 sp5C;
s32 var_a2;
u32 texWidth;
texWidth = tex->width;
var_a2 = 0;
if (texWidth == 16) {
if (arg1 != 0) {
var_a2 = 384; // 0x180
}
sp5C = 4;
} else if (texWidth == 32) {
sp5C = 5;
if (arg1 != 0) {
var_a2 = 256; // 0x100
}
} else {
texWidth = 3;
if (arg1 != 0) {
var_a2 = 384; // 0x180
}
}
// difference is G_IM_SIZ_32b vs G_IM_SIZ_16b
if ((tex->format & 0xF) == TEX_FORMAT_RGBA32) {
gDPLoadMultiBlock(D_80129FC0++, OS_PHYSICAL_TO_K0(tex + 1), var_a2, arg1, G_IM_FMT_RGBA, G_IM_SIZ_32b, texWidth,
texWidth, 0, 0, 0, sp5C, sp5C, 0, 0);
return;
}
gDPLoadMultiBlock(D_80129FC0++, OS_PHYSICAL_TO_K0(tex + 1), var_a2, arg1, G_IM_FMT_RGBA, G_IM_SIZ_16b, texWidth,
texWidth, 0, 0, 0, sp5C, sp5C, 0, 0);
}
#pragma GLOBAL_ASM("asm/nonmatchings/waves/func_800BA8E4.s")
f32 func_800BB2F4(s32 arg0, f32 arg1, f32 arg2, Vec3f *arg3) {