-
Notifications
You must be signed in to change notification settings - Fork 9
Progress in battle, ending, field, main, menu, and world #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,9 @@ const s32 D_800A0108 = 21; | |||||||||||||||||||||||||||
| const s32 D_800A010C[] = {2, 22, 3, 23, 4}; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // entrypoint | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| s32 func_800AD8DC(s32); // extern | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A1158); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A1798); | ||||||||||||||||||||||||||||
|
|
@@ -357,6 +360,9 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A5250); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A555C); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| extern s32 D_800F3A40; | ||||||||||||||||||||||||||||
| extern s32 D_800F3A42; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A55BC); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A55F4); | ||||||||||||||||||||||||||||
|
|
@@ -444,25 +450,51 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A68FC); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A6A3C(s32 arg0, s32 arg1) { D_800F5BB8[arg0].unkE |= arg1; } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6A70); | ||||||||||||||||||||||||||||
| void func_800A555C(); // extern | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A6A70(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_v1; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| func_800A555C(); | ||||||||||||||||||||||||||||
| temp_v1 = arg0 * 0x44; | ||||||||||||||||||||||||||||
| *(&D_800F5BB8->unkE + temp_v1) = *(&D_800F5BB8->unkE + temp_v1) | 9; | ||||||||||||||||||||||||||||
|
Comment on lines
+459
to
+460
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I believe this array access could be simplified, and |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6AC4); | ||||||||||||||||||||||||||||
| void func_800A6AC4(void) { | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DC4 &= 0xFC0F; | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DCA = D_800F5F44.D_800F7DCA & 0xFC0F; | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DAC = D_800F5F44.D_800F7DAC & 0xFC0F; | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DC2 = D_800F5F44.D_800F7DC2 & 0xFC0F; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6B1C); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6B88); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A6BFC(void) {} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6C04); | ||||||||||||||||||||||||||||
| void func_800A6C04(s32 arg0) { | ||||||||||||||||||||||||||||
| s16 sp10; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| sp10 = (s16)D_801636B8[arg0].D_801636B8; | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DBE = func_800A5EB0(func_800151F4(0x26), &sp10) + 0x100; | ||||||||||||||||||||||||||||
| D_800F5F44.D_800F7DC0 = 0xF; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6C5C); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6CC0); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A6D10(s32 arg0) { func_800A3E98(arg0, 3, 2, 54, 0); } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6D3C); | ||||||||||||||||||||||||||||
| void func_800A6D3C(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_v1; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| temp_v1 = D_800F83E0[arg0].unk0; | ||||||||||||||||||||||||||||
| if (temp_v1 & 0x2000) { | ||||||||||||||||||||||||||||
| D_800F83E0[arg0].unk0 = (temp_v1 & ~0x2000) | 0x4000; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6D88); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -485,7 +517,12 @@ void func_800A7034(s32 arg0, s16 arg1) { | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A7060(s32 arg0, s32 arg1) { func_800A7254(0, arg0, 12, arg1); } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A7090); | ||||||||||||||||||||||||||||
| void func_800A7090(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_v1; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| temp_v1 = arg0 * 0x44; | ||||||||||||||||||||||||||||
| *(&D_800F5BB8->unk29 + temp_v1) = *(&D_800F5BB8->unk29 + temp_v1) | 0x40; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+520
to
+525
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This should match. Most of the decompilation stuff is not only about getting a 1:1 match, but also trying to understand the original dev intention and how they could've written the code. |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A70C4); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -571,9 +608,17 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A866C); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A8A6C); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A8C94); | ||||||||||||||||||||||||||||
| void func_800A8C94(void) { | ||||||||||||||||||||||||||||
| D_80063014->unk8C = 0xFF; | ||||||||||||||||||||||||||||
| D_80063014->unk40 = 0xB0; | ||||||||||||||||||||||||||||
| D_80063014->unk80 |= 1; | ||||||||||||||||||||||||||||
| D_80063014->unk3C = (s32)D_80063014->unk3C >> 1; | ||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Suggested change
the expression could even be further simplified |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A8CC8); | ||||||||||||||||||||||||||||
| void func_800A8CC8(void) { | ||||||||||||||||||||||||||||
| D_80063014->unk6C &= ~0x2000; | ||||||||||||||||||||||||||||
| D_80063014->unk3C /= 3; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800A8D04(void) { D_80063014->unk48 = 2; } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -804,7 +849,15 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD73C); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD804); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD890); | ||||||||||||||||||||||||||||
| s32 func_800AD890(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 var_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| var_a0 = arg0; | ||||||||||||||||||||||||||||
| if (D_80063014->unk228 & 0x10) { | ||||||||||||||||||||||||||||
| var_a0 -= (var_a0 * 3) / 10; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return var_a0; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD8DC); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -823,7 +876,15 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800ADDE8); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800ADE5C(void) { D_80063014->unk214 = D_80063014->unk48 * 20; } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800ADE84); | ||||||||||||||||||||||||||||
| void func_800ADE84(void) { | ||||||||||||||||||||||||||||
| s32 var_v1; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| var_v1 = D_80063014->unk48 * (0x200 - D_80063014->unk210); | ||||||||||||||||||||||||||||
| if (var_v1 < 0) { | ||||||||||||||||||||||||||||
| var_v1 += 0x1F; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| D_80063014->unk214 = func_800AD8DC(var_v1 >> 5); | ||||||||||||||||||||||||||||
|
Comment on lines
+879
to
+886
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
When you see expressions such as this, it usually suggests it's a compiler optimization for signed division. I am not sure if you even need |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800ADED8(void) { | ||||||||||||||||||||||||||||
| if (D_80063014->unk230 & 0x40) { | ||||||||||||||||||||||||||||
|
|
@@ -977,9 +1038,30 @@ void func_800B0DF8(void) { | |||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B0E5C); | ||||||||||||||||||||||||||||
| s32 func_800B0E5C(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 var_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| var_a0 = arg0; | ||||||||||||||||||||||||||||
| if ((var_a0 < 0xFF) && (D_80063014->unkC8 & 0x20)) { | ||||||||||||||||||||||||||||
| var_a0 -= (var_a0 * 3) / 10; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return var_a0; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| s32 func_800B0EB4(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_v1; | ||||||||||||||||||||||||||||
| s32 var_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B0EB4); | ||||||||||||||||||||||||||||
| temp_v1 = D_800F83E0[arg0].unk0; | ||||||||||||||||||||||||||||
| var_a0 = arg0 < 4; | ||||||||||||||||||||||||||||
| if (temp_v1 & 0x40) { | ||||||||||||||||||||||||||||
| var_a0 += 1; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| if (temp_v1 & 0x400000) { | ||||||||||||||||||||||||||||
| var_a0 += 1; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return var_a0 & 1; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B0F04); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -1074,7 +1156,9 @@ u8 func_800B2F30(void) { return func_80014B70(); } | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| u16 func_800B2F50(void) { return func_80014BE4(); } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B2F70); | ||||||||||||||||||||||||||||
| s32 func_800B2F70(void) { | ||||||||||||||||||||||||||||
| return (((func_800B2F50() & 0xFFFF) * 0x63) / 65535) + 1; | ||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
should be a little nicer.
Suggested change
there might even be the possibility you don't need the |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| static s32 func_800B2FC4(s32 arg0) { | ||||||||||||||||||||||||||||
| return (arg0 * (func_800B2F30() + 0xF01)) >> 12; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,6 +18,19 @@ static void func_800BB864(void); | |||||||||||||||||||||||||||
| static void func_800C4D10(void); | ||||||||||||||||||||||||||||
| DR_MODE* func_800C4DC8(s16 x, s16 y, s16 w, s16 h, s32*); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| extern s8 D_800F8374; | ||||||||||||||||||||||||||||
| extern s8 D_800F837C; | ||||||||||||||||||||||||||||
| extern s8 D_800F8380; | ||||||||||||||||||||||||||||
| extern s32 D_800F9F30; | ||||||||||||||||||||||||||||
| extern s8 D_801031E0; | ||||||||||||||||||||||||||||
| extern s8 D_801517C4; | ||||||||||||||||||||||||||||
| extern s8 D_801620A0; | ||||||||||||||||||||||||||||
| extern s8 D_801620A4; | ||||||||||||||||||||||||||||
| extern s8 D_80162974; | ||||||||||||||||||||||||||||
| extern s8 D_80163B38; | ||||||||||||||||||||||||||||
|
Comment on lines
+21
to
+30
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please have these moved in |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| s16 SquareRoot0(s32, s16); // extern | ||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
For all of these, have the |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800B30E4(void) { | ||||||||||||||||||||||||||||
| s32 i; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -162,6 +175,9 @@ static void func_800B3DBC(void) { | |||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| void func_800BC1E0(u8); // extern | ||||||||||||||||||||||||||||
| void func_800C5BEC(); // extern | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800B3E2C); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800B3FAC); | ||||||||||||||||||||||||||||
|
|
@@ -590,13 +606,34 @@ static void func_800BB944(void) { | |||||||||||||||||||||||||||
| func_8002DA7C(); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800BB978); | ||||||||||||||||||||||||||||
| void func_800BB978(void) { | ||||||||||||||||||||||||||||
| *D_8009A000 = 0xC1; | ||||||||||||||||||||||||||||
| *D_8009A004 = 0x12C; | ||||||||||||||||||||||||||||
| *D_8009A008 = 0; | ||||||||||||||||||||||||||||
| func_8002DA7C(); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800BB9B8); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800BB9FC); | ||||||||||||||||||||||||||||
| void func_800BB9FC(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| *D_8009A000 = 0x2B; | ||||||||||||||||||||||||||||
| temp_a0 = arg0 & 0xFFFF; | ||||||||||||||||||||||||||||
| *D_8009A004 = 0x40; | ||||||||||||||||||||||||||||
| *D_8009A008 = temp_a0; | ||||||||||||||||||||||||||||
| func_8002DA7C(temp_a0); | ||||||||||||||||||||||||||||
|
Comment on lines
+618
to
+625
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I also inlined |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800BBA40); | ||||||||||||||||||||||||||||
| void func_800BBA40(s32 arg0) { | ||||||||||||||||||||||||||||
| s32 temp_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| *D_8009A000 = 0x20; | ||||||||||||||||||||||||||||
| temp_a0 = arg0 & 0xFFFF; | ||||||||||||||||||||||||||||
| *D_8009A004 = 0x40; | ||||||||||||||||||||||||||||
| *D_8009A008 = temp_a0; | ||||||||||||||||||||||||||||
| func_8002DA7C(temp_a0); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+628
to
+636
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as the comment I left for |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800BBA84); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -686,7 +723,12 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C0254); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C0314); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C03B8); | ||||||||||||||||||||||||||||
| s16 func_800C03B8(s16 arg0, s16 arg1) { | ||||||||||||||||||||||||||||
| s32 temp_a0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| temp_a0 = arg0 - arg1; | ||||||||||||||||||||||||||||
| return SquareRoot0(temp_a0 * temp_a0, arg1); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| s32 func_800C03FC(s32 arg0, s32 arg1) { return arg0 < 0 ? -arg1 : arg1; } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -998,6 +1040,8 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C59B8); | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C5ADC); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| extern s32 D_800F9DA8; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C5BEC); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800C5C18); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,6 +39,16 @@ void func_801B0040(s16, u8); | |||||||||||||||||
| void func_801B0054(s16, u8); | ||||||||||||||||||
| void func_801B0084(s16, u8); | ||||||||||||||||||
|
|
||||||||||||||||||
| extern u8 D_800F10EC[]; | ||||||||||||||||||
| extern u8 D_800F11E8[]; | ||||||||||||||||||
| extern u8 D_800F1304[]; | ||||||||||||||||||
| extern s32 D_800F14D4; | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D6F78(); // extern | ||||||||||||||||||
| void func_800D70C0(); // extern | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D57C0(); // extern | ||||||||||||||||||
|
|
||||||||||||||||||
| static s32 func_800C7B60(s16 arg0, s16 nItems, u8* arg2) { | ||||||||||||||||||
| BattleModelSub* var_a0; | ||||||||||||||||||
| s32 var_a1; | ||||||||||||||||||
|
|
@@ -1127,7 +1137,15 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D5774); | |||||||||||||||||
|
|
||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D57C0); | ||||||||||||||||||
|
|
||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D58D0); | ||||||||||||||||||
| void func_800D58D0(s16 arg0, s16 arg1, s16 arg2) { | ||||||||||||||||||
| Unk80162978* temp_v0; | ||||||||||||||||||
|
|
||||||||||||||||||
| temp_v0 = &D_80162978[func_800BBEAC(func_800D57C0)]; | ||||||||||||||||||
| temp_v0->D_80162978 = 0; | ||||||||||||||||||
| temp_v0->D_80162980 = arg0; | ||||||||||||||||||
| temp_v0->D_8016297E = arg2; | ||||||||||||||||||
| temp_v0->D_8016297C = arg1; | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D5938(); | ||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D5938); | ||||||||||||||||||
|
|
@@ -1141,7 +1159,11 @@ static void func_800D5A68(s16 arg0, s16 arg1) { | |||||||||||||||||
| temp_v0->D_8016297C = arg0; | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D5AC0); | ||||||||||||||||||
| s32 func_800D5AC0(s32 arg0, s32 arg1) { | ||||||||||||||||||
| return (((s32)(arg0 & 0xFF0000) / arg1) & 0xFF0000) | | ||||||||||||||||||
| (((s32)(arg0 & 0xFF00) / arg1) & 0xFF00) | | ||||||||||||||||||
| (((s32)(arg0 & 0xFF) / arg1) & 0xFF); | ||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+1163
to
+1166
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
can remove |
||||||||||||||||||
|
|
||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D5B6C); | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
@@ -1155,14 +1177,10 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D6394); | |||||||||||||||||
|
|
||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D650C); | ||||||||||||||||||
|
|
||||||||||||||||||
| extern u8 D_800F10EC[]; | ||||||||||||||||||
| extern u8 D_800F11E8[]; | ||||||||||||||||||
| extern u8 D_800F1304[]; | ||||||||||||||||||
| u8* const D_800A0DC8[] = {D_800F10EC, D_800F11E8, D_800F1304}; | ||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D6734); | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D6734(s32, s32); | ||||||||||||||||||
| extern s32 D_800F14D4; | ||||||||||||||||||
|
|
||||||||||||||||||
| static void func_800D67BC(s32 arg0) { | ||||||||||||||||||
| D_800F14D4 = 0x88; | ||||||||||||||||||
|
|
@@ -1196,7 +1214,22 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D70C0); | |||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D7178); | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D72B4(); | ||||||||||||||||||
| INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D72B4); | ||||||||||||||||||
|
|
||||||||||||||||||
| void func_800D72B4(void) { | ||||||||||||||||||
| Unk801621F0* temp_s0; | ||||||||||||||||||
|
|
||||||||||||||||||
| temp_s0 = &D_801621F0[D_801590D4]; | ||||||||||||||||||
| if (D_80062D98 == 0) { | ||||||||||||||||||
| if (temp_s0->D_801621F2 == 0) { | ||||||||||||||||||
| func_800D5138(1); | ||||||||||||||||||
| } | ||||||||||||||||||
| if (temp_s0->D_801621F2 == 2) { | ||||||||||||||||||
| func_800D51D4(1); | ||||||||||||||||||
| temp_s0->D_801621F0 = -1; | ||||||||||||||||||
| } | ||||||||||||||||||
| temp_s0->D_801621F2 = (u16)temp_s0->D_801621F2 + 1; | ||||||||||||||||||
| } | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| static void func_800D7340(void) { func_800BBEAC(func_800D72B4); } | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have these moved in
battle_private.h