mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
⭐
This commit is contained in:
parent
fa589f28f1
commit
37856b1b54
@ -1,6 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80246B2C_16C8E0
|
||||
/* 17540C 80246B2C 03E00008 */ jr $ra
|
||||
/* 175410 80246B30 00000000 */ nop
|
@ -1,6 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel pause_cleanup_16C8E0
|
||||
/* 172FE8 80244708 03E00008 */ jr $ra
|
||||
/* 172FEC 8024470C 00000000 */ nop
|
@ -1,8 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD100_325070
|
||||
/* 325070 802BD100 24020014 */ addiu $v0, $zero, 0x14
|
||||
/* 325074 802BD104 A48200A8 */ sh $v0, 0xa8($a0)
|
||||
/* 325078 802BD108 03E00008 */ jr $ra
|
||||
/* 32507C 802BD10C A48200A6 */ sh $v0, 0xa6($a0)
|
@ -1,19 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD110
|
||||
/* 325080 802BD110 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 325084 802BD114 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 325088 802BD118 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 32508C 802BD11C 10A00003 */ beqz $a1, .L802BD12C
|
||||
/* 325090 802BD120 8C90014C */ lw $s0, 0x14c($a0)
|
||||
/* 325094 802BD124 0C03BB31 */ jal func_800EECC4
|
||||
/* 325098 802BD128 0200202D */ daddu $a0, $s0, $zero
|
||||
.L802BD12C:
|
||||
/* 32509C 802BD12C 0C03BB3A */ jal func_800EECE8
|
||||
/* 3250A0 802BD130 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 3250A4 802BD134 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 3250A8 802BD138 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 3250AC 802BD13C 0002102B */ sltu $v0, $zero, $v0
|
||||
/* 3250B0 802BD140 03E00008 */ jr $ra
|
||||
/* 3250B4 802BD144 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,29 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD148_325070
|
||||
/* 3250B8 802BD148 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 3250BC 802BD14C AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 3250C0 802BD150 3C118011 */ lui $s1, %hi(gPlayerData)
|
||||
/* 3250C4 802BD154 2631F290 */ addiu $s1, $s1, %lo(gPlayerData)
|
||||
/* 3250C8 802BD158 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 3250CC 802BD15C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 3250D0 802BD160 8C90014C */ lw $s0, 0x14c($a0)
|
||||
/* 3250D4 802BD164 10A00003 */ beqz $a1, .L802BD174
|
||||
/* 3250D8 802BD168 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 3250DC 802BD16C 0C03B4C4 */ jal enable_partner_flying
|
||||
/* 3250E0 802BD170 24050001 */ addiu $a1, $zero, 1
|
||||
.L802BD174:
|
||||
/* 3250E4 802BD174 0C03B52E */ jal update_player_move_history
|
||||
/* 3250E8 802BD178 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 3250EC 802BD17C 0C03B574 */ jal func_800ED5D0
|
||||
/* 3250F0 802BD180 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 3250F4 802BD184 8E220320 */ lw $v0, 0x320($s1)
|
||||
/* 3250F8 802BD188 24420001 */ addiu $v0, $v0, 1
|
||||
/* 3250FC 802BD18C AE220320 */ sw $v0, 0x320($s1)
|
||||
/* 325100 802BD190 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 325104 802BD194 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 325108 802BD198 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 32510C 802BD19C 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 325110 802BD1A0 03E00008 */ jr $ra
|
||||
/* 325114 802BD1A4 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,6 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD1A8
|
||||
/* 325118 802BD1A8 03E00008 */ jr $ra
|
||||
/* 32511C 802BD1AC 24020002 */ addiu $v0, $zero, 2
|
@ -1,21 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD1B0
|
||||
/* 325120 802BD1B0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 325124 802BD1B4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 325128 802BD1B8 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 32512C 802BD1BC 10A00003 */ beqz $a1, .L802BD1CC
|
||||
/* 325130 802BD1C0 8C90014C */ lw $s0, 0x14c($a0)
|
||||
/* 325134 802BD1C4 0C03BA65 */ jal func_800EE994
|
||||
/* 325138 802BD1C8 0200202D */ daddu $a0, $s0, $zero
|
||||
.L802BD1CC:
|
||||
/* 32513C 802BD1CC 0C03BA6E */ jal func_800EE9B8
|
||||
/* 325140 802BD1D0 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 325144 802BD1D4 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 325148 802BD1D8 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 32514C 802BD1DC 0002102B */ sltu $v0, $zero, $v0
|
||||
/* 325150 802BD1E0 03E00008 */ jr $ra
|
||||
/* 325154 802BD1E4 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 325158 802BD1E8 00000000 */ nop
|
||||
/* 32515C 802BD1EC 00000000 */ nop
|
@ -1,25 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802B7000_E21870
|
||||
/* E21870 802B7000 3C048011 */ lui $a0, %hi(D_8010EBB0)
|
||||
/* E21874 802B7004 2484EBB0 */ addiu $a0, $a0, %lo(D_8010EBB0)
|
||||
/* E21878 802B7008 3C038011 */ lui $v1, %hi(gPlayerActionState)
|
||||
/* E2187C 802B700C 8063F07C */ lb $v1, %lo(gPlayerActionState)($v1)
|
||||
/* E21880 802B7010 2402001F */ addiu $v0, $zero, 0x1f
|
||||
/* E21884 802B7014 1062000B */ beq $v1, $v0, .L802B7044
|
||||
/* E21888 802B7018 24020001 */ addiu $v0, $zero, 1
|
||||
/* E2188C 802B701C 80830000 */ lb $v1, ($a0)
|
||||
/* E21890 802B7020 14620006 */ bne $v1, $v0, .L802B703C
|
||||
/* E21894 802B7024 24020009 */ addiu $v0, $zero, 9
|
||||
/* E21898 802B7028 80830003 */ lb $v1, 3($a0)
|
||||
/* E2189C 802B702C 10620005 */ beq $v1, $v0, .L802B7044
|
||||
/* E218A0 802B7030 24020004 */ addiu $v0, $zero, 4
|
||||
/* E218A4 802B7034 10620003 */ beq $v1, $v0, .L802B7044
|
||||
/* E218A8 802B7038 00000000 */ nop
|
||||
.L802B703C:
|
||||
/* E218AC 802B703C 03E00008 */ jr $ra
|
||||
/* E218B0 802B7040 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802B7044:
|
||||
/* E218B4 802B7044 03E00008 */ jr $ra
|
||||
/* E218B8 802B7048 24020001 */ addiu $v0, $zero, 1
|
@ -61,6 +61,11 @@ s32 func_800554E8(s32, s32);
|
||||
s32 func_800555E4(s32);
|
||||
s32 osGetId();
|
||||
|
||||
// Partner
|
||||
void enable_partner_flying(Npc* partner, s32 isFlying);
|
||||
void update_player_move_history(Npc* partner);
|
||||
void func_800ED5D0(Npc* partner);
|
||||
|
||||
s32 func_800EF394(f32);
|
||||
s32 does_script_exist(s32 id);
|
||||
ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState);
|
||||
|
@ -1,11 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_325070", func_802BD100_325070);
|
||||
|
||||
INCLUDE_ASM(s32, "code_325070", func_802BD110);
|
||||
|
||||
INCLUDE_ASM(s32, "code_325070", func_802BD148_325070);
|
||||
|
||||
INCLUDE_ASM(s32, "code_325070", func_802BD1A8);
|
||||
|
||||
INCLUDE_ASM(s32, "code_325070", func_802BD1B0);
|
@ -65,11 +65,11 @@ INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EBB40);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EBC74);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", enable_partner_flying);
|
||||
INCLUDE_ASM(void, "code_838b0_len_5900", enable_partner_flying, Npc* partner, s32 isFlying);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", update_player_move_history);
|
||||
INCLUDE_ASM(void, "code_838b0_len_5900", update_player_move_history, Npc* partner);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", func_800ED5D0);
|
||||
INCLUDE_ASM(void, "code_838b0_len_5900", func_800ED5D0, Npc* partner);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", func_800ED9F8);
|
||||
|
||||
|
44
src/world_twink.c
Normal file
44
src/world_twink.c
Normal file
@ -0,0 +1,44 @@
|
||||
#include "common.h"
|
||||
|
||||
// Init
|
||||
void func_802BD100_325070(Npc* npc) {
|
||||
npc->collisionHeight = 20;
|
||||
npc->collisionRadius = 20;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD110(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32 ownerID = script->ownerID;
|
||||
|
||||
if (isInitialCall) {
|
||||
func_800EECC4(ownerID);
|
||||
}
|
||||
return func_800EECE8(ownerID) != 0;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD148_325070(ScriptInstance* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 ownerID = script->ownerID;
|
||||
|
||||
if (isInitialCall) {
|
||||
enable_partner_flying(ownerID, TRUE);
|
||||
}
|
||||
|
||||
update_player_move_history(ownerID);
|
||||
func_800ED5D0(ownerID);
|
||||
playerData->unk_2F4[11]++;
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD1A8(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD1B0(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32 ownerID = script->ownerID;
|
||||
|
||||
if (isInitialCall) {
|
||||
func_800EE994(ownerID);
|
||||
}
|
||||
return func_800EE9B8(ownerID) != 0;
|
||||
}
|
@ -414,7 +414,7 @@ segments:
|
||||
start: 0x325070
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x325070, "c"]
|
||||
- [0x325070, "c", "world_twink"]
|
||||
- [0x325160, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
|
Loading…
Reference in New Issue
Block a user