mirror of
https://gitlab.com/dk64_decomp/dk64.git
synced 2024-11-23 07:01:58 +00:00
29.5108%
This commit is contained in:
parent
d8a40c918a
commit
51a04cff45
@ -85,6 +85,9 @@ standardSearchColumns = {
|
||||
"D_807FBB70": [
|
||||
"D_807FBB70",
|
||||
],
|
||||
"D_807F5FD4": [
|
||||
"D_807F5FD4",
|
||||
],
|
||||
"pointerTable": [
|
||||
"getPointerTableFile",
|
||||
],
|
||||
|
@ -17,9 +17,15 @@ void setFlag(s16 flagIndex, u8 newValue, u8 flagType);
|
||||
u8 isFlagSet(s16 flagIndex, u8 flagType);
|
||||
ExitData *getExitData(s32 exitIndex);
|
||||
|
||||
u64 func_80005818(u64, u64);
|
||||
u64 func_80005918(u64, u64);
|
||||
u64 func_80007688(f32);
|
||||
f32 func_8000773C(s64);
|
||||
|
||||
f32 func_80611BB4(f32, f32);
|
||||
|
||||
void func_806DF5A0(s16 *arg0, s16 arg1, s16 arg2, s16 arg3);
|
||||
|
||||
Actor *func_807270C0(s16 spawn_trigger, u16 arg1);
|
||||
Actor *func_807271F4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5, s16 arg6);
|
||||
|
||||
|
@ -713,7 +713,7 @@ typedef struct player_additional_actor_data {
|
||||
};
|
||||
s16 unk16;
|
||||
};
|
||||
u16 unk18; // Used
|
||||
s16 unk18; // Used
|
||||
u16 unk1A;
|
||||
f32 unk1C; // Used
|
||||
f32 unk20; // Used
|
||||
@ -1711,7 +1711,10 @@ typedef struct object_model2 {
|
||||
s32 unk60;
|
||||
s32 unk64;
|
||||
s32 unk68;
|
||||
s32 unk6C;
|
||||
u8 unk6C;
|
||||
u8 unk6D[1]; // TODO: How many?
|
||||
u8 unk6E;
|
||||
u8 unk6F;
|
||||
GlobalASMStruct83 *unk70;
|
||||
OM2_unk74 *unk74;
|
||||
OM2_unk78 *unk78; // used in func_80650AD8, weird format
|
||||
|
@ -125,14 +125,14 @@ us,.code,func_8073E8A0,28,yes
|
||||
us,.code,func_806A61D0,96,yes
|
||||
us,.code,func_80600950,12,yes
|
||||
us,.code,func_80711410,1344,no
|
||||
us,.code,func_806D1568,1088,no
|
||||
us,.code,func_806D1568,1088,yes
|
||||
us,.code,func_806E9ACC,112,yes
|
||||
us,.code,func_806ACFFC,612,no
|
||||
us,.code,func_8060CBBC,1260,no
|
||||
us,.code,func_805FF158,16,yes
|
||||
us,.code,func_8067AE90,108,yes
|
||||
us,.code,func_8065FB04,96,yes
|
||||
us,.code,func_8063393C,224,no
|
||||
us,.code,func_8063393C,224,yes
|
||||
us,.code,func_80674E14,876,no
|
||||
us,.code,func_806F14BC,428,no
|
||||
us,.code,func_806C71D0,8,yes
|
||||
@ -2834,7 +2834,7 @@ us,.code,func_8072DE44,100,yes
|
||||
us,.code,func_806C8D20,12,yes
|
||||
us,.code,func_806E84A4,28,yes
|
||||
us,.code,func_80662838,636,no
|
||||
us,.code,func_806DF5A0,208,no
|
||||
us,.code,func_806DF5A0,208,yes
|
||||
us,.code,func_806EB400,180,no
|
||||
us,.code,func_80712628,12,yes
|
||||
us,.code,alEvtqPostEvent,384,yes
|
||||
@ -3112,7 +3112,7 @@ us,.code,func_80653EA8,192,no
|
||||
us,.code,func_806EBAF4,80,yes
|
||||
us,.code,func_8066E72C,296,yes
|
||||
us,.code,func_806785D4,504,yes
|
||||
us,.code,func_8062F328,96,no
|
||||
us,.code,func_8062F328,96,yes
|
||||
us,.code,func_8067FB6C,3080,no
|
||||
us,.code,func_80645B9C,104,yes
|
||||
us,.code,func_80602314,284,no
|
||||
|
|
@ -125,14 +125,14 @@ us,.code,func_8073E8A0,28,yes
|
||||
us,.code,func_806A61D0,96,yes
|
||||
us,.code,func_80600950,12,yes
|
||||
us,.code,func_80711410,1344,no
|
||||
us,.code,func_806D1568,1088,no
|
||||
us,.code,func_806D1568,1088,yes
|
||||
us,.code,func_806E9ACC,112,yes
|
||||
us,.code,func_806ACFFC,612,no
|
||||
us,.code,func_8060CBBC,1260,no
|
||||
us,.code,func_805FF158,16,yes
|
||||
us,.code,func_8067AE90,108,yes
|
||||
us,.code,func_8065FB04,96,yes
|
||||
us,.code,func_8063393C,224,no
|
||||
us,.code,func_8063393C,224,yes
|
||||
us,.code,func_80674E14,876,no
|
||||
us,.code,func_806F14BC,428,no
|
||||
us,.code,func_806C71D0,8,yes
|
||||
@ -2834,7 +2834,7 @@ us,.code,func_8072DE44,100,yes
|
||||
us,.code,func_806C8D20,12,yes
|
||||
us,.code,func_806E84A4,28,yes
|
||||
us,.code,func_80662838,636,no
|
||||
us,.code,func_806DF5A0,208,no
|
||||
us,.code,func_806DF5A0,208,yes
|
||||
us,.code,func_806EB400,180,no
|
||||
us,.code,func_80712628,12,yes
|
||||
us,.code,alEvtqPostEvent,384,yes
|
||||
@ -3112,7 +3112,7 @@ us,.code,func_80653EA8,192,no
|
||||
us,.code,func_806EBAF4,80,yes
|
||||
us,.code,func_8066E72C,296,yes
|
||||
us,.code,func_806785D4,504,yes
|
||||
us,.code,func_8062F328,96,no
|
||||
us,.code,func_8062F328,96,yes
|
||||
us,.code,func_8067FB6C,3080,no
|
||||
us,.code,func_80645B9C,104,yes
|
||||
us,.code,func_80602314,284,no
|
||||
|
|
@ -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">29.5687%</text>
|
||||
<text x="110.5" y="14">29.5687%</text>
|
||||
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">29.6999%</text>
|
||||
<text x="110.5" y="14">29.6999%</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -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">29.4127%</text>
|
||||
<text x="165.5" y="14">29.4127%</text>
|
||||
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">29.5108%</text>
|
||||
<text x="165.5" y="14">29.5108%</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -45,9 +45,6 @@ void func_8060B7F0(void) {
|
||||
}
|
||||
}
|
||||
|
||||
u64 func_80005818(u64, u64);
|
||||
u64 func_80005918(u64, u64);
|
||||
u64 func_80007688(f32);
|
||||
extern s8 D_80746834;
|
||||
extern OSMesgQueue D_807EE0D0;
|
||||
|
||||
|
@ -505,26 +505,23 @@ void func_8072827C(Struct80755690_unk4 *arg0) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_80728300.s")
|
||||
|
||||
// close
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1295B0/func_8072881C.s")
|
||||
|
||||
//s32 func_80688540(Actor*, u8);
|
||||
|
||||
/*
|
||||
// TODO: Pretty close, might be missing a temp variable?
|
||||
// Datatypes could also differ for the & 0x7F function calls
|
||||
u8 func_8072881C(s32 arg0, u32 *arg1) {
|
||||
u8 func_8072881C(u8 arg0, u32 *arg1) {
|
||||
u8 phi_v1 = FALSE;
|
||||
if ((arg0 & 0x80)
|
||||
|| (*arg1 + 50 < object_timer
|
||||
&& (((rand() >> 0xF) % 1000) < 0x3C1) == 0
|
||||
&& !(((rand() >> 0xF) % 1000) < 0x3C1)
|
||||
&& !func_80688540(current_actor_pointer, arg0))) {
|
||||
func_80688370(current_actor_pointer, arg0 & 0x7F, 1.0f);
|
||||
func_806883C8(current_actor_pointer, arg0 & 0x7F, 1);
|
||||
func_8068839C(current_actor_pointer, arg0 & 0x7F, 0);
|
||||
func_806884B8(current_actor_pointer, arg0 & 0x7F, 3);
|
||||
func_80688514(current_actor_pointer, arg0 & 0x7F);
|
||||
func_806883F4(current_actor_pointer, arg0 & 0x7F, 0, 0);
|
||||
func_8068842C(current_actor_pointer, arg0 & 0x7F, 2);
|
||||
func_80688370(current_actor_pointer, arg0, 1.0f);
|
||||
func_806883C8(current_actor_pointer, arg0, 1);
|
||||
func_8068839C(current_actor_pointer, arg0, 0);
|
||||
func_806884B8(current_actor_pointer, arg0, 3);
|
||||
func_80688514(current_actor_pointer, arg0);
|
||||
func_806883F4(current_actor_pointer, arg0, 0, 0);
|
||||
func_8068842C(current_actor_pointer, arg0, 2);
|
||||
*arg1 = object_timer;
|
||||
phi_v1 = TRUE;
|
||||
}
|
||||
|
@ -1196,7 +1196,7 @@ extern void *D_807F5DEC;
|
||||
extern s32 D_807F5FC8;
|
||||
extern void *D_807F5FCC;
|
||||
extern s32 D_807F5FD0;
|
||||
extern void *D_807F5FD4;
|
||||
extern s32 *D_807F5FD4; // TODO: Which struct?
|
||||
extern f32 D_807F5FDC;
|
||||
extern s16 D_807F5FE4;
|
||||
extern s16 D_807F5FE6;
|
||||
@ -1293,24 +1293,17 @@ void func_8062F318(void) {
|
||||
D_807F5FED = 1;
|
||||
}
|
||||
|
||||
// regalloc
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_2F550/func_8062F328.s")
|
||||
|
||||
// extern s32 D_807F5FD0;
|
||||
// extern s32 *D_807F5FD4;
|
||||
|
||||
/*
|
||||
void func_8062F328(s32 arg0) {
|
||||
s32 temp_a1;
|
||||
s32 i;
|
||||
s32 temp;
|
||||
|
||||
if (D_807F5FD0 != 0) {
|
||||
for (i = 0; i <= D_807F5FD0; i++) {
|
||||
D_807F5FD4[i] += arg0;
|
||||
temp = D_807F5FD4[i];
|
||||
D_807F5FD4[i] = temp + arg0;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
s32 func_8062F388(s32 *arg0) {
|
||||
*arg0 = D_807F5FCC;
|
||||
|
@ -421,8 +421,36 @@ void func_806338F4(s32 arg0) {
|
||||
temp_v0->unk24 = 0;
|
||||
}
|
||||
|
||||
// Doable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_36880/func_8063393C.s")
|
||||
void func_8063393C(s32 arg0, u8 arg1, u8 arg2, u8 arg3) {
|
||||
s32 i;
|
||||
u8 var_t0;
|
||||
u8 var_a1;
|
||||
u8 *temp_a2;
|
||||
|
||||
i = 0;
|
||||
var_t0 = FALSE;
|
||||
if (arg1 == 1) {
|
||||
arg0 = func_80659470(arg0);
|
||||
}
|
||||
temp_a2 = &D_807F6000[arg0].unk6D[i];
|
||||
if (arg3) {
|
||||
var_a1 = arg2;
|
||||
} else {
|
||||
var_a1 = 0xFF;
|
||||
}
|
||||
while (i < 2 && !var_t0) {
|
||||
if (var_a1 == temp_a2[i]) {
|
||||
var_t0 = TRUE;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (arg3) {
|
||||
temp_a2[i] = 0xFF;
|
||||
} else {
|
||||
temp_a2[i] = arg2;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_36880/func_80633A1C.s")
|
||||
|
||||
|
@ -1164,6 +1164,7 @@ void func_80644E2C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
|
||||
func_80714CC0(D_8074E880[((rand() >> 0xF) % 1000) % 3], 0.5f, D_807F621C, D_807F6220, D_807F6224);
|
||||
}
|
||||
|
||||
// close, needs shape for D_807F5FD4
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_80644EC8.s")
|
||||
|
||||
int func_8071E3EC(); // TODO: Signature
|
||||
@ -1175,7 +1176,6 @@ typedef struct {
|
||||
} Struct80645700_sp20;
|
||||
|
||||
/*
|
||||
// TODO: Close
|
||||
void func_80644EC8(s32 arg0, s32 arg1, s16 arg2, s16 arg3) {
|
||||
u32 sp2C;
|
||||
|
||||
@ -1198,8 +1198,50 @@ void func_80644EC8(s32 arg0, s32 arg1, s16 arg2, s16 arg3) {
|
||||
}
|
||||
*/
|
||||
|
||||
// needs shape for D_807F5FD4
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_806450C0.s")
|
||||
|
||||
/*
|
||||
u32 func_806119A0();
|
||||
extern ? D_80718188;
|
||||
extern f32 D_807480E8;
|
||||
extern u8 D_807480EF;
|
||||
extern s32 D_807F5FD4;
|
||||
|
||||
// TODO: Needs shape for D_807F5FD4
|
||||
void func_806450C0(s32 arg0, ? arg1, s16 arg2, s16 arg3) {
|
||||
u32 sp34;
|
||||
f32 sp30;
|
||||
s32 sp2C;
|
||||
s32 *temp_a0;
|
||||
s32 temp_a1;
|
||||
s32 temp_t1;
|
||||
u32 temp_hi;
|
||||
void *temp_a3;
|
||||
void *temp_v0;
|
||||
|
||||
if (((func_806119A0() / 10000) % 10) == 0) {
|
||||
temp_hi = (func_806119A0() / 10000) % arg3;
|
||||
temp_t1 = arg2 * 4;
|
||||
sp34 = temp_hi;
|
||||
temp_a0 = D_807F5FD4 + temp_t1;
|
||||
temp_a1 = temp_hi * 0xC;
|
||||
sp30 = (*temp_a0 + temp_a1)->unk4;
|
||||
temp_a3 = *temp_a0 + temp_a1;
|
||||
sp2C = temp_t1;
|
||||
if (func_80667110(temp_a3->unk0, temp_a3->unk8, &sp30) != 0) {
|
||||
func_80714950(sp30 + 2.0);
|
||||
func_8071498C(&func_80718188);
|
||||
func_807149FC(-1);
|
||||
func_807149B8(1);
|
||||
func_807149C8(0xFF, 0xFF, 0xFF, D_807480EF);
|
||||
temp_v0 = *(D_807F5FD4 + sp2C) + (sp34 * 0xC);
|
||||
func_80714CC0(&D_80720CD8, D_807480E8, temp_v0->unk0, temp_v0->unk4, temp_v0->unk8);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_80645238.s")
|
||||
|
||||
void func_80645614(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
@ -1216,6 +1258,7 @@ void func_80645614(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
}
|
||||
}
|
||||
|
||||
// needs shape for D_807F5FD4
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_80645700.s")
|
||||
|
||||
/*
|
||||
|
@ -1264,7 +1264,7 @@ void func_806CF878(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// Doable
|
||||
// rodata
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806CF918.s")
|
||||
|
||||
extern f32 D_8075CC68;
|
||||
@ -1272,15 +1272,14 @@ void func_807195D4(void);
|
||||
extern s32 D_8071FF40;
|
||||
|
||||
/*
|
||||
// TODO: Very close now, it's just setting at, s1, s2, s3 in the wrong order
|
||||
void func_806CF918(void) {
|
||||
s32 i;
|
||||
f32 uvar = D_8075CC68;
|
||||
|
||||
for (i = 0; i < 0xC8; i += 0x28) {
|
||||
for (i = 0; i < 5; i++) {
|
||||
func_8071498C(&func_807195D4);
|
||||
func_807149B8(1);
|
||||
func_80714950(i);
|
||||
func_80714950(i * 0x28);
|
||||
func_807149FC(0x45);
|
||||
func_80714C08(&D_8071FF40, uvar, current_actor_pointer, 6, 2);
|
||||
}
|
||||
@ -1949,26 +1948,21 @@ void func_806D1420(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// regalloc
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806D1568.s")
|
||||
|
||||
void func_806CC638(f32 arg0);
|
||||
extern s16 D_80753A78[];
|
||||
|
||||
/*
|
||||
void func_806D1568(void) {
|
||||
f64 temp_f0;
|
||||
f64 temp_f2;
|
||||
f64 temp;
|
||||
f32 temp;
|
||||
|
||||
extra_player_info_pointer->unk24++;
|
||||
extra_player_info_pointer->unk2C = D_80753AFC[D_807FD584];
|
||||
switch (current_actor_pointer->control_state_progress) {
|
||||
case 0:
|
||||
func_806DF6D4(0x4C);
|
||||
// TODO: Float regalloc here
|
||||
temp = -current_actor_pointer->y_velocity;
|
||||
current_actor_pointer->y_velocity = func_806CD898(current_actor_pointer->y_velocity, 0.0f, temp * 0.125f);
|
||||
temp = (f64)-current_actor_pointer->y_velocity * 0.125f;
|
||||
current_actor_pointer->y_velocity = func_806CD898(current_actor_pointer->y_velocity, 0.0f, temp);
|
||||
if (extra_player_info_pointer->unk24 >= 6) {
|
||||
if ((current_actor_pointer->unkB8 != 0.0f) || (extra_player_info_pointer->unk10 != 0)) {
|
||||
current_actor_pointer->control_state_progress = 3;
|
||||
@ -2035,7 +2029,6 @@ void func_806D1568(void) {
|
||||
}
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
*/
|
||||
|
||||
void func_806D19A8(void) {
|
||||
current_actor_pointer->y_velocity = func_806CD898(current_actor_pointer->y_velocity, 50.0f, 4.0f);
|
||||
@ -2178,21 +2171,23 @@ void func_806D1F28(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// doable, stack
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806D205C.s")
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
u8 unk4;
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
} Struct80750FB0;
|
||||
|
||||
extern Struct80750FB0 D_80750FB0;
|
||||
|
||||
s32 func_80688D20(s16, s16, s32, s32);
|
||||
void func_80688D20(s16, s16, s16, f32);
|
||||
|
||||
/*
|
||||
// TODO: Very close
|
||||
void func_806D205C(void) {
|
||||
s32 sp2C;
|
||||
s16 unk2E;
|
||||
Struct80750FB0 sp2C;
|
||||
Struct80750FB0 sp1C;
|
||||
|
||||
sp1C = D_80750FB0;
|
||||
@ -2209,15 +2204,9 @@ void func_806D205C(void) {
|
||||
current_actor_pointer->y_velocity = current_actor_pointer->y_velocity * 0.25;
|
||||
func_806CC8F0();
|
||||
}
|
||||
if (func_80629148() == 0) {
|
||||
extra_player_info_pointer->unk23C -= 1;
|
||||
if (extra_player_info_pointer->unk23C == 0) {
|
||||
goto block_7;
|
||||
}
|
||||
} else {
|
||||
block_7:
|
||||
if (func_80629148() || --extra_player_info_pointer->unk23C == 0) {
|
||||
if (gameIsInSnidesBonusGameMode() == FALSE) {
|
||||
func_80688D20(sp2C, func_80600340(&sp1C, 3, &sp2C), 7, 0x40000000);
|
||||
func_80688D20(unk2E, func_80600340(&sp1C, 3, &sp2C.unk4), 7, 2.0f);
|
||||
}
|
||||
func_805FF898();
|
||||
current_actor_pointer->control_state_progress += 1;
|
||||
@ -2559,6 +2548,7 @@ void func_806D2DC4(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// doable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806D2E9C.s")
|
||||
|
||||
extern f32 D_8075CCF0;
|
||||
@ -2570,7 +2560,6 @@ extern f64 D_8075CD00;
|
||||
f32 func_806F46B0(s16 arg0);
|
||||
|
||||
/*
|
||||
// TODO: Doable, close, top matches all good
|
||||
void func_806D2E9C(void) {
|
||||
f32 temp_f12;
|
||||
f32 temp_f12_2;
|
||||
@ -4280,6 +4269,7 @@ void func_806D91A4(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// Jumptable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806D9320.s")
|
||||
|
||||
void func_806D97A4(void) {
|
||||
@ -4371,6 +4361,7 @@ void func_806D9940(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// close, doable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806D9AD4.s")
|
||||
|
||||
extern s32 D_8071FC8C;
|
||||
@ -4378,7 +4369,6 @@ extern s32 D_80717100;
|
||||
extern f64 D_8075CE78;
|
||||
|
||||
/*
|
||||
// TODO: Close, doable
|
||||
void func_806D9AD4(void) {
|
||||
f32 sp28;
|
||||
|
||||
@ -4493,7 +4483,7 @@ void func_806DA320(void) {
|
||||
func_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
// regalloc
|
||||
// regalloc, rodata
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806DA3E4.s")
|
||||
|
||||
extern f64 D_8075CEB8;
|
||||
@ -5352,31 +5342,24 @@ void func_806DF44C(Actor* arg0, PlayerAdditionalActorData *arg1, u8 arg2) {
|
||||
func_806DF3D0(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
// Close, regalloc
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806DF494.s")
|
||||
|
||||
/*
|
||||
// TODO: Fiddly but doable
|
||||
void func_806DF494(s16 *arg0, s16 arg1, s16 arg2) {
|
||||
s16 temp_v0;
|
||||
s32 temp2;
|
||||
s32 phi_t0;
|
||||
s16 phi_v0;
|
||||
s16 temp2;
|
||||
|
||||
arg1 &= 0xFFF;
|
||||
temp_v0 = (arg1 - *arg0);
|
||||
if (temp_v0) {
|
||||
arg2 = ABS(temp_v0);
|
||||
phi_v0 = temp_v0 / arg2;
|
||||
phi_v0 = (arg1 - *arg0);
|
||||
if (phi_v0) {
|
||||
arg2 = ABS(phi_v0);
|
||||
phi_v0 /= arg2;
|
||||
if (arg2 >= 0x801) {
|
||||
arg2 = 0x1000 - arg2;
|
||||
phi_v0 *= -1;
|
||||
}
|
||||
if (arg2 > 0) {
|
||||
phi_t0 = arg2;
|
||||
} else {
|
||||
phi_t0 = -arg2;
|
||||
}
|
||||
if (arg2 < phi_t0) {
|
||||
if (arg2 < (ABS(arg2))) {
|
||||
*arg0 = arg1;
|
||||
} else {
|
||||
*arg0 += (phi_v0 * arg2);
|
||||
@ -5386,8 +5369,28 @@ void func_806DF494(s16 *arg0, s16 arg1, s16 arg2) {
|
||||
}
|
||||
*/
|
||||
|
||||
// Similar to above
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_806DF5A0.s")
|
||||
void func_806DF5A0(s16 *arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
s16 var_v0;
|
||||
s16 var_a2;
|
||||
|
||||
arg1 &= 0xFFF;
|
||||
var_v0 = (arg1 - *arg0);
|
||||
if (var_v0) {
|
||||
var_a2 = ABS(var_v0);
|
||||
var_v0 &= 0xFFF;
|
||||
if (var_a2 >= 0x801) {
|
||||
var_a2 = 0x1000 - var_a2;
|
||||
}
|
||||
if (arg2 >= var_a2) {
|
||||
*arg0 = arg1;
|
||||
} else if (arg3 < var_v0) {
|
||||
*arg0 = *arg0 - arg2;
|
||||
} else {
|
||||
*arg0 = *arg0 + arg2;
|
||||
}
|
||||
*arg0 &= 0xFFF;
|
||||
}
|
||||
}
|
||||
|
||||
void func_806DF670(s16 *arg0, s16 arg1, s16 arg2) {
|
||||
s16 temp_v0 = arg1 - *arg0;
|
||||
|
@ -1094,9 +1094,26 @@ s32 func_800317E8(Struct800317E8 *arg0, f32 arg1, f32 arg2, f32 *arg3, f32 *arg4
|
||||
}
|
||||
*/
|
||||
|
||||
// Float maths, looks doable, not sure which struct is passed in arg0 though
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_80031980.s")
|
||||
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
} Struct80031980;
|
||||
|
||||
/*
|
||||
f32 func_80031980(Struct80031980 *arg0, f32 arg1, f32 *arg2) {
|
||||
f32 temp = ( (2.0f * arg0->unk0) + (-2.0f * arg0->unk4) + arg0->unk8) + arg0->unkC;
|
||||
f32 temp2 = ((-3.0f * arg0->unk0) + (3.0f * arg0->unk4) + (-2.0f * arg0->unk8)) - arg0->unkC;
|
||||
if (arg2 != NULL) {
|
||||
*arg2 = arg0->unk8 + (3.0f * temp * arg1) + (2.0f * temp2 * arg1);
|
||||
}
|
||||
return arg0->unk0 + arg0->unk8 + ( temp * arg1) + ( temp2 * arg1);
|
||||
}
|
||||
*/
|
||||
|
||||
// Jumptable, 172 bytes of code
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_80031A5C.s")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user