mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Fix battle/partner/lakilester split (#317)
* near-match func_800279B4 * fix lakilester split * match func_8023A1B0_70DEC0
This commit is contained in:
parent
3d2798422a
commit
8dc3d81a84
@ -1,5 +1,7 @@
|
||||
#include "common.h"
|
||||
|
||||
extern s32 D_8023D334;
|
||||
|
||||
INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238000_70BD10);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023803C_70BD4C);
|
||||
@ -24,4 +26,7 @@ INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239F84_70DC94);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023A19C_70DEAC);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023A1B0_70DEC0);
|
||||
ApiStatus func_8023A1B0_70DEC0(ScriptInstance* script, s32 isInitialCall) {
|
||||
script->varTable[0] = D_8023D334;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -350,7 +350,9 @@ void gfx_init_state(void) {
|
||||
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210));
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "main_loop", func_800271FC);
|
||||
void func_800271FC(s16*, u32*, s32, s32, void*);
|
||||
|
||||
INCLUDE_ASM(void, "main_loop", func_800271FC, s16*, u32*, s32, s32, void*);
|
||||
|
||||
INCLUDE_ASM(s32, "main_loop", func_8002725C);
|
||||
|
||||
@ -358,7 +360,44 @@ INCLUDE_ASM(s32, "main_loop", func_80027600);
|
||||
|
||||
INCLUDE_ASM(s32, "main_loop", func_80027774);
|
||||
|
||||
// alex: mystery t0=0x140 temp and a few missing loads, but mostly there
|
||||
#ifdef NON_MATCHING
|
||||
// arg0 and arg1 probably framebuffer voidptrs
|
||||
void func_800279B4(u16* arg0, u16* arg1, u16* arg2) {
|
||||
s32 temp_s4;
|
||||
s32 j;
|
||||
s32 i;
|
||||
s32 subroutine_argE;
|
||||
s32 subroutine_arg7;
|
||||
s32 subroutine_arg8;
|
||||
s32 subroutine_arg9;
|
||||
s32 subroutine_argA;
|
||||
s32 subroutine_argB;
|
||||
s32 subroutine_argC;
|
||||
s32 subroutine_argF;
|
||||
|
||||
for (i = 1; i < 0xEF; i++) {
|
||||
for (j = 2; j < 0x13E; j++) {
|
||||
temp_s4 = (subroutine_argF + j) * 2;
|
||||
// Wii U VC changes this condition to FALSE to fix pause menu lag
|
||||
if (((*(temp_s4 + arg1) >> 2) & 0xF) < 8) {
|
||||
func_800271FC(arg0, arg1, i - 1, j - 1, &subroutine_argE);
|
||||
func_800271FC(arg0, arg1, i - 1, j + 1, &subroutine_arg7);
|
||||
func_800271FC(arg0, arg1, i, j - 2, &subroutine_arg8);
|
||||
func_800271FC(arg0, arg1, i, j + 2, &subroutine_arg9);
|
||||
func_800271FC(arg0, arg1, i + 1, j - 1, &subroutine_argA);
|
||||
func_800271FC(arg0, arg1, i + 1, j + 1, &subroutine_argB);
|
||||
func_800271FC(arg0, arg1, i, j, &subroutine_argC);
|
||||
func_8002725C(&subroutine_argE, (subroutine_argC << 24) | (subroutine_argC << 16) | (subroutine_argC << 8) | subroutine_argC, arg2 + temp_s4);
|
||||
} else {
|
||||
*(temp_s4 + arg2) = *(temp_s4 + arg0) | 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "main_loop", func_800279B4);
|
||||
#endif
|
||||
|
||||
void func_80027BAC(s32 arg0, s32 arg1) {
|
||||
s32 i;
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
.section .data
|
||||
|
||||
glabel D_8023A1C0_70DED0
|
||||
.word 0x24020002, 0x00000000, 0x00000000, 0x00000000
|
||||
|
||||
glabel D_8023A1D0_70DEE0
|
||||
.word 0x00000001, 0x00100002, 0x0000000D, 0x00100008, 0x00000012, 0x00100000, 0x00000000
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_8023A1B0_70DEC0
|
||||
/* 70DEC0 8023A1B0 3C028024 */ lui $v0, %hi(D_8023D334)
|
||||
/* 70DEC4 8023A1B4 8C42D334 */ lw $v0, %lo(D_8023D334)($v0)
|
||||
/* 70DEC8 8023A1B8 AC820084 */ sw $v0, 0x84($a0)
|
||||
/* 70DECC 8023A1BC 03E00008 */ jr $ra
|
@ -3468,7 +3468,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x70BD10, c, lakilester]
|
||||
- [0x70DED0, data]
|
||||
- [0x70DEE0, data, 70DED0]
|
||||
- name: battle_partner_bow
|
||||
dir: battle/partner
|
||||
type: code
|
||||
|
Loading…
Reference in New Issue
Block a user