mirror of
https://gitlab.com/dk64_decomp/dk64.git
synced 2025-02-17 06:19:24 +00:00
22.9097%
This commit is contained in:
parent
82f16f4587
commit
311c3c44ea
@ -95,7 +95,7 @@ int gameIsInMainMenuMode(void);
|
||||
int gameIsInAdventureMode(void);
|
||||
int gameIsInDKTheatreMode(void);
|
||||
int gameIsInQuitGameMode(void);
|
||||
s32 func_80714CC0(void*, f32, f32, f32, f32);
|
||||
void *func_80714CC0(void*, f32, f32, f32, f32);
|
||||
|
||||
// countSetFlags(startIndex, length, flagType);
|
||||
s32 func_80731AA8(s32 startIndex, s32 length, u8 flagType);
|
||||
@ -318,8 +318,8 @@ void func_80714A28(u16 arg0);
|
||||
void func_80714A38(u8 arg0);
|
||||
void func_80714A58(u16 arg0);
|
||||
void func_80714A68(s16 arg0, s16 arg1, s16 arg2, s16 arg3);
|
||||
void func_80714B84(void *arg0, f32 arg1, s32 arg2, s32 arg3, u8 arg4);
|
||||
s32 func_80714C08(void *arg0, f32 arg1, Actor *arg2, s32 arg3, u8 arg4);
|
||||
void *func_80714B84(void *arg0, f32 arg1, s32 arg2, s32 arg3, u8 arg4);
|
||||
void *func_80714C08(void *arg0, f32 arg1, Actor *arg2, s32 arg3, u8 arg4);
|
||||
void func_80715E38(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
|
||||
void func_807180F4(s32 arg0, s32 arg1);
|
||||
void func_80718124(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
|
||||
|
@ -41,37 +41,6 @@ typedef struct {
|
||||
u8 unk1;
|
||||
} Struct80027840;
|
||||
|
||||
typedef struct enemy_info {
|
||||
u8 enemy_type; // at 0x00
|
||||
u8 unk1;
|
||||
u16 y_rotation; // at 0x02
|
||||
s16 x_position; // at 0x04
|
||||
s16 y_position; // at 0x06
|
||||
s16 z_position; // at 0x08
|
||||
u8 cutscene_model_index; // at 0x0A
|
||||
u8 unkB;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
Struct80027840 *unk20;
|
||||
u16 unk24;
|
||||
u16 unk26;
|
||||
u16 unk28; // Used
|
||||
s16 unk2A; // Used
|
||||
u32 unk2C;
|
||||
f32 unk30; // Used
|
||||
f32 unk34; // Used
|
||||
f32 unk38; // Used
|
||||
f32 unk3C; // at 0x3C
|
||||
s16 unk40; // Used
|
||||
s16 unk42;
|
||||
u8 unk44; // Used
|
||||
u8 unk45;
|
||||
u16 unk46; // Used
|
||||
} EnemyInfo;
|
||||
|
||||
typedef struct ledge_info_8c LedgeInfo8C;
|
||||
|
||||
struct ledge_info_8c {
|
||||
@ -397,6 +366,14 @@ typedef struct {
|
||||
s8 unk13;
|
||||
} Actor114;
|
||||
|
||||
typedef struct {
|
||||
s32 unk0; // TODO: Proper members
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
s16 unk10;
|
||||
} Actor118;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
@ -1196,7 +1173,7 @@ struct actor {
|
||||
u8 unk112;
|
||||
u8 unk113;
|
||||
Actor114 *unk114;
|
||||
u32 unk118;
|
||||
Actor118 *unk118;
|
||||
Actor *unk11C;
|
||||
f32 unk120;
|
||||
Actor124 *unk124;
|
||||
@ -1268,6 +1245,37 @@ struct actor {
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct enemy_info {
|
||||
u8 enemy_type; // at 0x00
|
||||
u8 unk1;
|
||||
u16 y_rotation; // at 0x02
|
||||
s16 x_position; // at 0x04
|
||||
s16 y_position; // at 0x06
|
||||
s16 z_position; // at 0x08
|
||||
u8 cutscene_model_index; // at 0x0A
|
||||
u8 unkB;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
Actor *unk18; // TODO: Is this accurate?
|
||||
u32 unk1C;
|
||||
Struct80027840 *unk20;
|
||||
u16 unk24;
|
||||
u16 unk26;
|
||||
u16 unk28; // Used
|
||||
s16 unk2A; // Used
|
||||
u32 unk2C;
|
||||
f32 unk30; // Used
|
||||
f32 unk34; // Used
|
||||
f32 unk38; // Used
|
||||
f32 unk3C; // at 0x3C
|
||||
s16 unk40; // Used
|
||||
s16 unk42;
|
||||
u8 unk44; // Used
|
||||
u8 unk45;
|
||||
u16 unk46; // Used
|
||||
} EnemyInfo;
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
|
@ -480,7 +480,7 @@ us,.code,func_80689EA4,64,yes
|
||||
us,.code,func_80676B38,56,yes
|
||||
us,.code,func_806E04E0,372,yes
|
||||
us,.code,func_80707980,2524,no
|
||||
us,.code,func_806858E8,156,no
|
||||
us,.code,func_806858E8,156,yes
|
||||
us,.code,func_806B11C0,208,yes
|
||||
us,.code,func_8072ECFC,148,no
|
||||
us,.code,func_8068EF54,2008,no
|
||||
@ -1341,7 +1341,7 @@ us,.code,func_807327F4,160,yes
|
||||
us,.code,func_8070A934,832,no
|
||||
us,.code,func_8073B08C,324,no
|
||||
us,.code,func_806C8D2C,180,yes
|
||||
us,.code,func_80728004,196,no
|
||||
us,.code,func_80728004,196,yes
|
||||
us,.code,func_8062CA0C,100,yes
|
||||
us,.code,func_8065D254,1808,no
|
||||
us,.code,func_80714060,632,no
|
||||
@ -1363,7 +1363,7 @@ us,.code,func_80658CCC,224,yes
|
||||
us,.code,func_806F2FC0,464,yes
|
||||
us,.code,func_806D25CC,160,yes
|
||||
us,.code,func_8065CDB0,156,no
|
||||
us,.code,func_8072752C,332,no
|
||||
us,.code,func_8072752C,332,yes
|
||||
us,.code,func_806B50F4,72,yes
|
||||
us,.code,func_80722E48,420,no
|
||||
us,.code,func_806C90C4,512,yes
|
||||
@ -1424,7 +1424,7 @@ us,.code,func_806F4DC0,180,no
|
||||
us,.code,func_80738170,104,yes
|
||||
us,.code,func_80678DD8,60,yes
|
||||
us,.code,func_806D1110,236,yes
|
||||
us,.code,func_8068780C,1084,no
|
||||
us,.code,func_8068780C,1084,yes
|
||||
us,.code,func_806A57C0,168,yes
|
||||
us,.code,func_806F01D8,96,yes
|
||||
us,.code,func_806C9E10,48,yes
|
||||
@ -2072,7 +2072,7 @@ us,.code,func_80630DCC,2144,no
|
||||
us,.code,func_8073B830,208,no
|
||||
us,.code,func_8064ED68,160,yes
|
||||
us,.code,func_8073D160,144,no
|
||||
us,.code,func_80727F20,228,no
|
||||
us,.code,func_80727F20,228,yes
|
||||
us,.code,func_806118FC,152,yes
|
||||
us,.code,func_80601120,76,yes
|
||||
us,.code,func_806E7338,332,yes
|
||||
@ -3007,7 +3007,7 @@ us,.code,func_806FF358,720,no
|
||||
us,.code,func_806F6554,240,yes
|
||||
us,.code,func_806E1728,204,yes
|
||||
us,.code,func_80689E98,12,yes
|
||||
us,.code,func_8072CFE8,164,no
|
||||
us,.code,func_8072CFE8,164,yes
|
||||
us,.code,func_80671D10,84,yes
|
||||
us,.code,func_806822FC,1976,no
|
||||
us,.code,func_80655258,440,no
|
||||
@ -3142,7 +3142,7 @@ us,.code,func_806B2D5C,8,yes
|
||||
us,.code,func_806F95C8,64,yes
|
||||
us,.code,func_8067E6C4,32,yes
|
||||
us,.code,func_80670F04,160,yes
|
||||
us,.code,func_80685984,448,no
|
||||
us,.code,func_80685984,448,yes
|
||||
us,.code,func_806E330C,272,yes
|
||||
us,.code,func_806B7C74,556,no
|
||||
us,.code,func_806EE924,112,yes
|
||||
|
|
@ -480,7 +480,7 @@ us,.code,func_80689EA4,64,yes
|
||||
us,.code,func_80676B38,56,yes
|
||||
us,.code,func_806E04E0,372,yes
|
||||
us,.code,func_80707980,2524,no
|
||||
us,.code,func_806858E8,156,no
|
||||
us,.code,func_806858E8,156,yes
|
||||
us,.code,func_806B11C0,208,yes
|
||||
us,.code,func_8072ECFC,148,no
|
||||
us,.code,func_8068EF54,2008,no
|
||||
@ -1341,7 +1341,7 @@ us,.code,func_807327F4,160,yes
|
||||
us,.code,func_8070A934,832,no
|
||||
us,.code,func_8073B08C,324,no
|
||||
us,.code,func_806C8D2C,180,yes
|
||||
us,.code,func_80728004,196,no
|
||||
us,.code,func_80728004,196,yes
|
||||
us,.code,func_8062CA0C,100,yes
|
||||
us,.code,func_8065D254,1808,no
|
||||
us,.code,func_80714060,632,no
|
||||
@ -1363,7 +1363,7 @@ us,.code,func_80658CCC,224,yes
|
||||
us,.code,func_806F2FC0,464,yes
|
||||
us,.code,func_806D25CC,160,yes
|
||||
us,.code,func_8065CDB0,156,no
|
||||
us,.code,func_8072752C,332,no
|
||||
us,.code,func_8072752C,332,yes
|
||||
us,.code,func_806B50F4,72,yes
|
||||
us,.code,func_80722E48,420,no
|
||||
us,.code,func_806C90C4,512,yes
|
||||
@ -1424,7 +1424,7 @@ us,.code,func_806F4DC0,180,no
|
||||
us,.code,func_80738170,104,yes
|
||||
us,.code,func_80678DD8,60,yes
|
||||
us,.code,func_806D1110,236,yes
|
||||
us,.code,func_8068780C,1084,no
|
||||
us,.code,func_8068780C,1084,yes
|
||||
us,.code,func_806A57C0,168,yes
|
||||
us,.code,func_806F01D8,96,yes
|
||||
us,.code,func_806C9E10,48,yes
|
||||
@ -2072,7 +2072,7 @@ us,.code,func_80630DCC,2144,no
|
||||
us,.code,func_8073B830,208,no
|
||||
us,.code,func_8064ED68,160,yes
|
||||
us,.code,func_8073D160,144,no
|
||||
us,.code,func_80727F20,228,no
|
||||
us,.code,func_80727F20,228,yes
|
||||
us,.code,func_806118FC,152,yes
|
||||
us,.code,func_80601120,76,yes
|
||||
us,.code,func_806E7338,332,yes
|
||||
@ -3007,7 +3007,7 @@ us,.code,func_806FF358,720,no
|
||||
us,.code,func_806F6554,240,yes
|
||||
us,.code,func_806E1728,204,yes
|
||||
us,.code,func_80689E98,12,yes
|
||||
us,.code,func_8072CFE8,164,no
|
||||
us,.code,func_8072CFE8,164,yes
|
||||
us,.code,func_80671D10,84,yes
|
||||
us,.code,func_806822FC,1976,no
|
||||
us,.code,func_80655258,440,no
|
||||
@ -3142,7 +3142,7 @@ us,.code,func_806B2D5C,8,yes
|
||||
us,.code,func_806F95C8,64,yes
|
||||
us,.code,func_8067E6C4,32,yes
|
||||
us,.code,func_80670F04,160,yes
|
||||
us,.code,func_80685984,448,no
|
||||
us,.code,func_80685984,448,yes
|
||||
us,.code,func_806E330C,272,yes
|
||||
us,.code,func_806B7C74,556,no
|
||||
us,.code,func_806EE924,112,yes
|
||||
|
|
@ -9,7 +9,7 @@
|
||||
</mask>
|
||||
<g mask="url(#anybadge_1)">
|
||||
<path fill="#555" d="M0 0h77v20H0z"/>
|
||||
<path fill="#c05900" d="M77 0h67v20H77z"/>
|
||||
<path fill="#c05a00" d="M77 0h67v20H77z"/>
|
||||
<path fill="url(#b)" d="M0 0h144v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
@ -17,7 +17,7 @@
|
||||
<text x="38.5" y="14">global_asm</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">23.2814%</text>
|
||||
<text x="110.5" y="14">23.2814%</text>
|
||||
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">23.4932%</text>
|
||||
<text x="110.5" y="14">23.4932%</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -9,7 +9,7 @@
|
||||
</mask>
|
||||
<g mask="url(#anybadge_1)">
|
||||
<path fill="#555" d="M0 0h132v20H0z"/>
|
||||
<path fill="#c05700" d="M132 0h67v20H132z"/>
|
||||
<path fill="#c05800" d="M132 0h67v20H132z"/>
|
||||
<path fill="url(#b)" d="M0 0h199v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
@ -17,7 +17,7 @@
|
||||
<text x="66.0" y="14">Donkey Kong 64 (US)</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">22.7514%</text>
|
||||
<text x="165.5" y="14">22.7514%</text>
|
||||
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">22.9097%</text>
|
||||
<text x="165.5" y="14">22.9097%</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -172,18 +172,18 @@ void func_80714A9C(void) {
|
||||
D_807FDB3A = 0x258;
|
||||
}
|
||||
|
||||
s32 func_80714D08(void*, f32, f32, f32, f32, s32, s32, s32, s32);
|
||||
void *func_80714D08(void*, f32, f32, f32, f32, s32, s32, s32, s32);
|
||||
|
||||
void func_80714B84(void *arg0, f32 arg1, s32 arg2, s32 arg3, u8 arg4) {
|
||||
void *func_80714B84(void *arg0, f32 arg1, s32 arg2, s32 arg3, u8 arg4) {
|
||||
f32 sp3C;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
|
||||
func_806335B0(arg2, 1, arg3, &sp3C, &sp38, &sp34);
|
||||
func_80714D08(arg0, arg1, sp3C, sp38, sp34, 0, arg2, arg3, arg4);
|
||||
return func_80714D08(arg0, arg1, sp3C, sp38, sp34, 0, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
s32 func_80714C08(void *arg0, f32 arg1, Actor *arg2, s32 arg3, u8 arg4) {
|
||||
void *func_80714C08(void *arg0, f32 arg1, Actor *arg2, s32 arg3, u8 arg4) {
|
||||
f32 sp3C;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
@ -195,7 +195,7 @@ s32 func_80714C08(void *arg0, f32 arg1, Actor *arg2, s32 arg3, u8 arg4) {
|
||||
return func_80714D08(arg0, arg1, sp3C, sp38, sp34, arg2, 0, arg3, arg4);
|
||||
}
|
||||
|
||||
s32 func_80714CC0(void* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
void *func_80714CC0(void* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
return func_80714D08(arg0, arg1, arg2, arg3, arg4, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -253,26 +253,18 @@ void func_807273A8(s16 arg0, u8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_8072752C.s")
|
||||
|
||||
/*
|
||||
// TODO: Everything matches apart from stack offset
|
||||
void func_8072752C(s16 arg0, s16 x1, s16 y1, s16 z1, s16 x2, s16 y2, s16 z2, s16 arg7, s16 arg8) {
|
||||
s16 sp46;
|
||||
f32 sp40;
|
||||
s32 dx, dy, dz;
|
||||
s32 pad[2];
|
||||
|
||||
dx = (x2 - x1) * (x2 - x1);
|
||||
dy = (y2 - y1) * (y2 - y1);
|
||||
dz = (z2 - z1) * (z2 - z1);
|
||||
sp46 = func_80665DE0(x2, z2, x1, z1);
|
||||
sp40 = sqrtf(dx + dy + dz);
|
||||
if (func_807271F4(arg0, x1, y1, z1, sp46, sqrtf(dx + dz) / (sp40 / arg7), arg8)) {
|
||||
sp40 = sqrtf(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)) + ((z2 - z1) * (z2 - z1)));
|
||||
if (func_807271F4(arg0, x1, y1, z1, sp46, sqrtf(((x2 - x1) * (x2 - x1)) + ((z2 - z1) * (z2 - z1))) / (sp40 / arg7), arg8)) {
|
||||
D_807FBB44->control_state = 0x17;
|
||||
D_807FBB44->control_state_progress = 0;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_80727678.s")
|
||||
|
||||
@ -281,29 +273,25 @@ void func_8072752C(s16 arg0, s16 x1, s16 y1, s16 z1, s16 x2, s16 y2, s16 z2, s16
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_80727958.s")
|
||||
|
||||
// TODO: Regalloc v1 a3
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_80727F20.s")
|
||||
|
||||
extern u8 D_80755698[];
|
||||
|
||||
u8 func_80652F24(s16, s16);
|
||||
|
||||
/*
|
||||
// TODO: Regalloc v1 a3
|
||||
u8 func_80727F20(EnemyInfo *arg0, s32 arg1) {
|
||||
f32 dz, dy, dx;
|
||||
|
||||
dz = character_change_array[0].look_at_eye_z - arg0->z_position;
|
||||
dx = character_change_array[0].look_at_eye_x - arg0->x_position;
|
||||
dy = character_change_array[0].look_at_eye_y - arg0->y_position;
|
||||
|
||||
return ((dz * dz) + ((dx * dx) + (dy * dy)) < arg1)
|
||||
return (((character_change_array[0].look_at_eye_x - arg0->x_position) * (character_change_array[0].look_at_eye_x - arg0->x_position))
|
||||
+ ((character_change_array[0].look_at_eye_y - arg0->y_position) * (character_change_array[0].look_at_eye_y - arg0->y_position))
|
||||
+ ((character_change_array[0].look_at_eye_z - arg0->z_position) * (character_change_array[0].look_at_eye_z - arg0->z_position)) < arg1)
|
||||
&& ((D_80755698[arg0->unk44] == 6) || (arg0->unk46 & 0x20) || func_80652F24(0, arg0->unk40));
|
||||
}
|
||||
*/
|
||||
|
||||
// Very doable, dx,dy,dz and a large conditional check at the end that will need to be simplified
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_80728004.s")
|
||||
u8 func_80728004(EnemyInfo *arg0, s32 arg1) {
|
||||
return (arg1 > (((character_change_array[0].look_at_eye_x - arg0->unk18->x_position) * (character_change_array[0].look_at_eye_x - arg0->unk18->x_position))
|
||||
+ ((character_change_array[0].look_at_eye_y - arg0->unk18->y_position) * (character_change_array[0].look_at_eye_y - arg0->unk18->y_position))
|
||||
+ ((character_change_array[0].look_at_eye_z - arg0->unk18->z_position) * (character_change_array[0].look_at_eye_z - arg0->unk18->z_position))))
|
||||
&& ((arg0->unk18->interactable & 0x40)
|
||||
|| (arg0->unk46 & 0x20)
|
||||
|| func_80652F24(0, arg0->unk40));
|
||||
}
|
||||
|
||||
// Very doable, dx,dy,dz and a large conditional check at the end that will need to be simplified
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_807280C8.s")
|
||||
|
@ -571,28 +571,14 @@ void func_8072C870(u8 arg0, u8 arg1, s32 arg2) {
|
||||
// Jumptable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_12E800/func_8072C918.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_12E800/func_8072CFE8.s")
|
||||
|
||||
/*
|
||||
void func_8072CFE8(s16 *arg0, s16 *arg1, s16 *arg2) {
|
||||
s32 temp_v1;
|
||||
u8 temp_v1_2;
|
||||
s32 temp_1;
|
||||
|
||||
temp_v1 = D_807FDC90->unk25;
|
||||
temp_v1 &= 0x7F;
|
||||
temp_v1 += 1;
|
||||
if (temp_v1 < D_807FDC9C->unk11) {
|
||||
temp_v1 = (u8)temp_v1;
|
||||
} else {
|
||||
temp_v1 = (u8)0;
|
||||
}
|
||||
temp_v1_2 = D_807FDC98->unk20[temp_v1].unk0;
|
||||
*arg0 = D_807FDCA0->unk14[temp_v1_2].unk0;
|
||||
*arg1 = D_807FDCA0->unk14[temp_v1_2].unk2;
|
||||
*arg2 = D_807FDCA0->unk14[temp_v1_2].unk4;
|
||||
u8 temp_v1;
|
||||
u8 temp = D_807FDC90->unk25 & 0x7F;
|
||||
temp_v1 = D_807FDC98->unk20[((temp) + 1) < D_807FDC9C->unk11 ? (u8)((temp) + 1) : 0].unk0;
|
||||
*arg0 = D_807FDCA0->unk14[temp_v1].unk0;
|
||||
*arg1 = D_807FDCA0->unk14[temp_v1].unk2;
|
||||
*arg2 = D_807FDCA0->unk14[temp_v1].unk4;
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_12E800/func_8072D08C.s")
|
||||
|
||||
|
@ -121,5 +121,5 @@ void func_806595B0(void) {
|
||||
while (var_v0 != NULL) {
|
||||
var_v0 = var_v0->unk8;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -1369,105 +1369,37 @@ s16 func_8067AF74(Actor *arg0) {
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_8067B01C.s")
|
||||
|
||||
/*
|
||||
// TODO: WIP, seems to be removing gaps in the actor list?
|
||||
// Original output is below this implementation
|
||||
// TODO: Close
|
||||
void func_8067B01C(void) {
|
||||
Actor *temp_a1;
|
||||
s32 temp_a0_2;
|
||||
s32 temp_a3;
|
||||
s32 phi_v1;
|
||||
u32 phi_t0;
|
||||
s32 phi_a3;
|
||||
s32 phi_a3_2;
|
||||
s16 i;
|
||||
s16 newSlot;
|
||||
Actor *phi_a3_2;
|
||||
s32 phi_v0;
|
||||
|
||||
// TODO: Problem is somewhere in this loop (probably the inner loop)
|
||||
phi_v0 = FALSE;
|
||||
phi_v1 = 1;
|
||||
|
||||
if (actor_count >= 2) {
|
||||
do {
|
||||
temp_a1 = actor_list[phi_v1];
|
||||
phi_a3 = phi_v1;
|
||||
if ((s32)actor_list[phi_v1] < (s32)actor_list[phi_v1 - 1]) {
|
||||
phi_t0 = actor_list[phi_v1 - 1];
|
||||
do {
|
||||
phi_t0 = actor_list[phi_a3 - 1];
|
||||
phi_a3--;
|
||||
} while ((s32)actor_list[phi_a3] < (s32)actor_list[phi_a3 - 1]);
|
||||
}
|
||||
actor_list[phi_a3] = actor_list[phi_v1];
|
||||
phi_v1++;
|
||||
} while (phi_v1 < actor_count);
|
||||
for (i = 1; i < actor_count; i++) {
|
||||
temp_a1 = actor_list[i];
|
||||
newSlot = i;
|
||||
phi_a3_2 = actor_list[newSlot - 1];
|
||||
while (actor_list[newSlot] < phi_a3_2) {
|
||||
phi_a3_2 = actor_list[newSlot - 1];
|
||||
newSlot--;
|
||||
}
|
||||
actor_list[newSlot] = temp_a1;
|
||||
}
|
||||
|
||||
// This part looks fine :)
|
||||
actor_count = 0;
|
||||
do {
|
||||
while (!phi_v0) {
|
||||
if ((s32)actor_list[actor_count] == -1) {
|
||||
phi_v0 = TRUE;
|
||||
} else {
|
||||
actor_count++;
|
||||
}
|
||||
} while (!phi_v0);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void func_8067B01C(void) {
|
||||
Actor **temp_a2;
|
||||
Actor **temp_a2_2;
|
||||
Actor **temp_a2_3;
|
||||
Actor *temp_a1;
|
||||
s16 temp_a0;
|
||||
s16 temp_a0_2;
|
||||
s16 temp_a3;
|
||||
s16 temp_v1;
|
||||
u32 temp_t0;
|
||||
s16 phi_v1;
|
||||
u32 phi_t0;
|
||||
Actor **phi_a2;
|
||||
s16 phi_a3;
|
||||
s16 phi_a3_2;
|
||||
s32 phi_v0;
|
||||
|
||||
temp_a0 = actor_count;
|
||||
phi_v1 = 1;
|
||||
phi_v0 = 0;
|
||||
if (temp_a0 >= 2) {
|
||||
do {
|
||||
temp_a2 = &actor_list[phi_v1];
|
||||
temp_a1 = temp_a2->unk0;
|
||||
phi_a3 = phi_v1;
|
||||
phi_a3_2 = phi_v1;
|
||||
if (temp_a1 < temp_a2->unk-4) {
|
||||
temp_a2_2 = &actor_list[phi_v1];
|
||||
phi_t0 = temp_a2_2->unk-4;
|
||||
phi_a2 = temp_a2_2;
|
||||
do {
|
||||
temp_a3 = phi_a3 - 1;
|
||||
*phi_a2 = phi_t0;
|
||||
temp_a2_3 = &actor_list[temp_a3];
|
||||
temp_t0 = temp_a2_3->unk-4;
|
||||
phi_t0 = temp_t0;
|
||||
phi_a2 = temp_a2_3;
|
||||
phi_a3 = temp_a3;
|
||||
phi_a3_2 = temp_a3;
|
||||
} while (temp_a1 < temp_t0);
|
||||
}
|
||||
temp_v1 = phi_v1 + 1;
|
||||
actor_list[phi_a3_2] = temp_a1;
|
||||
phi_v1 = temp_v1;
|
||||
} while (temp_v1 < temp_a0);
|
||||
}
|
||||
actor_count = 0;
|
||||
do {
|
||||
temp_a0_2 = actor_count;
|
||||
if (actor_list[temp_a0_2] == -1) {
|
||||
phi_v0 = 1;
|
||||
} else {
|
||||
actor_count = temp_a0_2 + 1;
|
||||
}
|
||||
} while (phi_v0 == 0);
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -383,15 +383,43 @@ void func_8068588C(Actor *arg0, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5
|
||||
func_806858E8(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
}
|
||||
|
||||
// Returns struct from function call in a weird way... Doable once we figure out which struct is returned.
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_806858E8.s")
|
||||
extern s32 D_80718080; // TODO: Datatype
|
||||
|
||||
// Surprisingly doable, just a huge function call that will be interesting to decipher
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_80685984.s")
|
||||
typedef struct {
|
||||
u8 unk0[0x338 - 0x0];
|
||||
Actor *unk338;
|
||||
} Struct806858E8;
|
||||
|
||||
void func_806858E8(Actor *arg0, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, s32 arg6) {
|
||||
if (arg0 != NULL) {
|
||||
if (arg1 != 0) {
|
||||
func_80671C0C(arg0, arg1, &arg3, &arg4, &arg5);
|
||||
}
|
||||
}
|
||||
func_8071498C(&D_80718080);
|
||||
func_80714950(arg6);
|
||||
((Struct806858E8*)func_80714CC0(&D_8071FFA0, arg2, arg3, arg4 + 5.0f, arg5))->unk338 = arg0;
|
||||
}
|
||||
|
||||
extern s32 D_80719EF4; // TODO: Datatype
|
||||
extern s32 D_8071FFA0; // TODO: Datatype
|
||||
|
||||
void func_80685984(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||
s32 pad;
|
||||
|
||||
if (((rand() >> 0xF) % 100) >= 0x33) {
|
||||
func_80714998(2);
|
||||
func_80714950((rand() >> 0xF) % 360);
|
||||
func_807149B8(1);
|
||||
func_807149C8(0x9B, 0x9B, 0x9B, 0xC8);
|
||||
func_8071498C(&D_80719EF4);
|
||||
func_80714CC0(&D_8071FFA0, arg0, (((rand() >> 0xF) % 100000) % 10) + (arg1 - 5.0f), arg2, (((rand() >> 0xF) % 100000) % 10) + (arg3 - 5.0f));
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_80685B44.s")
|
||||
|
||||
extern s32 D_807180F4; // TODO: Datatype, just for pointer
|
||||
extern s32 D_807180F4; // TODO: Datatype
|
||||
|
||||
/*
|
||||
// TODO: Pretty close
|
||||
@ -437,62 +465,39 @@ void func_80685D84(Actor *arg0) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_80685F60.s")
|
||||
|
||||
/*
|
||||
extern f32 D_80753A08[];
|
||||
extern f32 D_80753A18[];
|
||||
extern s16 D_80753A08[];
|
||||
extern s16 D_80753A18[];
|
||||
|
||||
// TODO: Doable, just need to figure out what actor118 points to
|
||||
void func_80685E78(Actor*);
|
||||
|
||||
/*
|
||||
// TODO: Close, something up with phi_v1
|
||||
void func_80685F60(Actor *actor) {
|
||||
u8 sp1B;
|
||||
Actor *temp_a1;
|
||||
f32 temp_f0;
|
||||
u32 temp_a0;
|
||||
u32 temp_v0;
|
||||
u8 temp_t9;
|
||||
f32 phi_f0;
|
||||
u8 phi_v1;
|
||||
u8 phi_v1_2;
|
||||
Actor *phi_a1;
|
||||
u8 phi_v1_3;
|
||||
|
||||
temp_a1 = actor;
|
||||
phi_v1 = 0;
|
||||
phi_a1 = temp_a1;
|
||||
phi_v1_3 = 0;
|
||||
if ((actor->unk0 != 0) && (actor->animation_state != 0)) {
|
||||
if ((actor->unk0 != NULL) && (actor->animation_state != NULL)) {
|
||||
if (actor->interactable == 1) {
|
||||
if (character_change_array[cc_player_index].unk2C0 == 1) { // TODO: This is marked f32 in the struct, which is correct?
|
||||
phi_f0 = D_80753A08[actor->unk58 * 2];
|
||||
if (character_change_array[cc_player_index].unk2C0 == 1) {
|
||||
phi_f0 = D_80753A08[actor->unk58];
|
||||
} else {
|
||||
phi_f0 = D_80753A18[actor->unk58 * 2];
|
||||
phi_f0 = D_80753A18[actor->unk58];
|
||||
}
|
||||
} else {
|
||||
phi_f0 = temp_a1->unk15E;
|
||||
phi_f0 = actor->unk15E;
|
||||
}
|
||||
if ((temp_a1->unkAC - phi_f0) <= temp_a1->y_position) {
|
||||
temp_a0 = object_timer;
|
||||
if ((actor->unkAC - phi_f0) <= actor->y_position) {
|
||||
if ((object_timer & 3) == 0) {
|
||||
if (temp_a1->unkB8 != 0.0) {
|
||||
phi_v1_3 = 1;
|
||||
}
|
||||
temp_v0 = temp_a1->unk118;
|
||||
phi_v1 = phi_v1_3 & 0xFF;
|
||||
if ((temp_v0) && (temp_v0->unk10 != 0)) {
|
||||
phi_v1 = 1;
|
||||
}
|
||||
phi_v1 = (actor->unkB8 != 0.0) || ((actor->unk118) && (actor->unk118->unk10 != 0)) ? 1 : 0;
|
||||
}
|
||||
phi_v1_2 = phi_v1;
|
||||
if (phi_v1 != 0) {
|
||||
sp1B = phi_v1;
|
||||
actor = temp_a1;
|
||||
func_80714950(1, temp_a1);
|
||||
phi_v1_2 = phi_v1;
|
||||
phi_a1 = actor;
|
||||
} else if ((temp_a1->unkB8 == 0.0) && (((object_timer % 24) == 0) || (temp_a1->unkBC != 0.0))) {
|
||||
phi_v1_2 = 1;
|
||||
if (phi_v1) {
|
||||
func_80714950(1);
|
||||
} else {
|
||||
phi_v1 = (actor->unkB8 == 0.0) && (((object_timer % 24U) == 0) || (actor->unkBC != 0.0)) ? 1 : 0;
|
||||
}
|
||||
if (phi_v1_2 != 0) {
|
||||
func_80685E78(phi_a1, phi_a1);
|
||||
if (phi_v1) {
|
||||
func_80685E78(actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -660,8 +665,6 @@ void func_806877C8(u8 arg0) {
|
||||
func_80714C08(&D_8072006C, 1.0f, current_actor_pointer, arg0, 0);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_8068780C.s")
|
||||
|
||||
void func_80626F8C(f32, f32, f32, f32 *, f32 *, s32, f32, s32);
|
||||
void func_8065A708(f32, f32, f32, f32, f32, f32, f32, s32, s32, s32, s32);
|
||||
|
||||
@ -671,11 +674,7 @@ extern s32 D_80720B24;
|
||||
extern f64 D_80759BA0;
|
||||
extern f32 D_80759BA8;
|
||||
|
||||
/*
|
||||
// TODO: Very close, our stack is too big
|
||||
void func_8068780C(u8 arg0, u8 arg1, u8 arg2, u8 arg3) {
|
||||
f32 dx;
|
||||
f32 dz;
|
||||
f32 sp74;
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
@ -702,9 +701,7 @@ void func_8068780C(u8 arg0, u8 arg1, u8 arg2, u8 arg3) {
|
||||
if (sp5C < 270.0f) {
|
||||
sp5C += 180.0f;
|
||||
}
|
||||
dx = sp58 - sp50;
|
||||
dz = sp54 - sp4C;
|
||||
sp48 = sqrtf((dx * dx) + (dz * dz));
|
||||
sp48 = sqrtf(((sp58 - sp50) * (sp58 - sp50)) + ((sp54 - sp4C) * (sp54 - sp4C)));
|
||||
func_807149B8(1);
|
||||
func_807149FC(1);
|
||||
func_80714950(sp5C);
|
||||
@ -715,11 +712,12 @@ void func_8068780C(u8 arg0, u8 arg1, u8 arg2, u8 arg3) {
|
||||
func_8065A708(current_actor_pointer->x_position, current_actor_pointer->y_position, current_actor_pointer->z_position, 0.0f, 0.0f, 0.0f, 150.0f, 0, 0x96, 0x64, 0xFF);
|
||||
}
|
||||
if ((current_actor_pointer->unk58 == ACTOR_BOSS_ARMY_DILLO) && (((rand() >> 0xF) % 1000) >= 0x385)) {
|
||||
s16 temp;
|
||||
func_806877C8(((((rand() >> 0xF) % 32767) % 10) + 0xD));
|
||||
func_806086CC(current_actor_pointer->x_position, current_actor_pointer->y_position, current_actor_pointer->z_position, ((rand() >> 0xF) % 1000) >= 0x1F5 ? 0x8A : 0xA1, 0xFF, 0x7F, 0x28, 0, D_80759BA8, 0);
|
||||
temp = ((rand() >> 0xF) % 1000) >= 0x1F5 ? 0x8A : 0xA1;
|
||||
func_806086CC(current_actor_pointer->x_position, current_actor_pointer->y_position, current_actor_pointer->z_position, temp, 0xFF, 0x7F, 0x28, 0, D_80759BA8, 0);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void func_80687C48(void) {
|
||||
playSound(0xF2, 0x7FFF, 63.0f, 1.0f, 0, 0);
|
||||
|
@ -71,8 +71,6 @@ void func_80029450(void) {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_4FC0/func_800294EC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_4FC0/func_80029640.s")
|
||||
|
Loading…
x
Reference in New Issue
Block a user