mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Some of 317020
This commit is contained in:
parent
8271cb5636
commit
3df62667fb
@ -1,37 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BD100
|
||||
/* 317020 802BD100 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 317024 802BD104 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 317028 802BD108 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 31702C 802BD10C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 317030 802BD110 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 317034 802BD114 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
.L802BD118:
|
||||
/* 317038 802BD118 0C051734 */ jal get_trigger_by_id
|
||||
/* 31703C 802BD11C 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 317040 802BD120 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 317044 802BD124 1060000B */ beqz $v1, .L802BD154
|
||||
/* 317048 802BD128 26100001 */ addiu $s0, $s0, 1
|
||||
/* 31704C 802BD12C 8C620000 */ lw $v0, ($v1)
|
||||
/* 317050 802BD130 30420100 */ andi $v0, $v0, 0x100
|
||||
/* 317054 802BD134 10400007 */ beqz $v0, .L802BD154
|
||||
/* 317058 802BD138 00000000 */ nop
|
||||
/* 31705C 802BD13C 8C620008 */ lw $v0, 8($v1)
|
||||
/* 317060 802BD140 14510005 */ bne $v0, $s1, .L802BD158
|
||||
/* 317064 802BD144 2A020040 */ slti $v0, $s0, 0x40
|
||||
/* 317068 802BD148 8C62002C */ lw $v0, 0x2c($v1)
|
||||
/* 31706C 802BD14C 080AF458 */ j .L802BD160
|
||||
/* 317070 802BD150 00000000 */ nop
|
||||
.L802BD154:
|
||||
/* 317074 802BD154 2A020040 */ slti $v0, $s0, 0x40
|
||||
.L802BD158:
|
||||
/* 317078 802BD158 1440FFEF */ bnez $v0, .L802BD118
|
||||
/* 31707C 802BD15C 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802BD160:
|
||||
/* 317080 802BD160 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 317084 802BD164 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 317088 802BD168 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 31708C 802BD16C 03E00008 */ jr $ra
|
||||
/* 317090 802BD170 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,19 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802BDB84
|
||||
/* 317AA4 802BDB84 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 317AA8 802BDB88 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 317AAC 802BDB8C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 317AB0 802BDB90 10A00003 */ beqz $a1, .L802BDBA0
|
||||
/* 317AB4 802BDB94 8C90014C */ lw $s0, 0x14c($a0)
|
||||
/* 317AB8 802BDB98 0C03BA65 */ jal func_800EE994
|
||||
/* 317ABC 802BDB9C 0200202D */ daddu $a0, $s0, $zero
|
||||
.L802BDBA0:
|
||||
/* 317AC0 802BDBA0 0C03BA6E */ jal func_800EE9B8
|
||||
/* 317AC4 802BDBA4 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 317AC8 802BDBA8 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 317ACC 802BDBAC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 317AD0 802BDBB0 0002102B */ sltu $v0, $zero, $v0
|
||||
/* 317AD4 802BDBB4 03E00008 */ jr $ra
|
||||
/* 317AD8 802BDBB8 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -202,7 +202,8 @@ typedef struct Trigger {
|
||||
/* 0x14 */ struct ScriptInstance* runningScript;
|
||||
/* 0x18 */ s32 priority;
|
||||
/* 0x1C */ s32 scriptVars[3];
|
||||
/* 0x28 */ char unk_28[8];
|
||||
/* 0x28 */ char unk_28[4];
|
||||
/* 0x2C */ s32 unk_2C;
|
||||
/* 0x30 */ u8 unk_30;
|
||||
/* 0x31 */ char unk_31[3];
|
||||
/* 0x34 */ ScriptID runningScriptID;
|
||||
|
@ -46,6 +46,7 @@ void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
|
||||
s32 is_trigger_bound(Trigger*, Bytecode* script);
|
||||
Trigger* create_trigger(TriggerDefinition* def);
|
||||
s32 _bound_script_trigger_handler(Trigger* trigger);
|
||||
Trigger* get_trigger_by_id(s32 triggerID);
|
||||
|
||||
Actor* get_actor(s32 actorID);
|
||||
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
|
||||
@ -96,6 +97,7 @@ void enable_partner_flying(Npc* partner, s32 val);
|
||||
void update_player_move_history(Npc* partner);
|
||||
s32 is_current_partner_flying(void);
|
||||
void func_800ED5D0(Npc* partner);
|
||||
void clear_partner_move_history(Npc* partner);
|
||||
|
||||
s32 func_800EF394(f32);
|
||||
s32 does_script_exist(s32 id);
|
||||
@ -130,6 +132,7 @@ Npc* get_npc_unsafe(NpcId npcId);
|
||||
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr);
|
||||
void set_npc_yaw(Npc* npcPtr, f32 angle);
|
||||
void npc_move_heading(Npc* npc, f32 speed, f32 yaw);
|
||||
void disable_npc_blur(Npc* npc);
|
||||
|
||||
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
||||
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
||||
|
@ -1,6 +1,17 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_317020", func_802BD100);
|
||||
s32 func_802BD100(s32 arg0) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
Trigger* trigger = get_trigger_by_id(i);
|
||||
|
||||
if (trigger != NULL && trigger->flags.flags & 0x100 && trigger->params2 == arg0) {
|
||||
return trigger->unk_2C;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_802BD174(Npc* npc) {
|
||||
npc->collisionHeight = 24;
|
||||
@ -19,6 +30,30 @@ INCLUDE_ASM(s32, "code_317020", func_802BD5D8);
|
||||
|
||||
INCLUDE_ASM(s32, "code_317020", func_802BDB30);
|
||||
|
||||
INCLUDE_ASM(s32, "code_317020", func_802BDB84);
|
||||
ApiStatus func_802BDB84(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32 unk = script->owner2.npc; // todo what is this?
|
||||
|
||||
if (isInitialCall) {
|
||||
func_800EE994(unk);
|
||||
}
|
||||
|
||||
return func_800EE9B8(unk) != 0;
|
||||
}
|
||||
|
||||
// Something is up with D_8010EBB0 I think. It might be a struct or something
|
||||
#ifdef NON_MATCHING
|
||||
void func_802BDBBC(s32 arg0) {
|
||||
if (D_8010EBB0[0] != 0) {
|
||||
func_80027088(0);
|
||||
enable_player_input();
|
||||
CancelMessageAndBlock();
|
||||
clear_partner_move_history(arg0);
|
||||
D_8010EBB0[0] = 0;
|
||||
D_8010EBB0[3] = 0;
|
||||
disable_npc_blur(arg0);
|
||||
}
|
||||
D_8010EBB0[3] = 1;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "code_317020", func_802BDBBC);
|
||||
#endif
|
||||
|
@ -101,7 +101,7 @@ INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EF414);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EF43C);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", clear_partner_move_history);
|
||||
INCLUDE_ASM(void, "code_838b0_len_5900", clear_partner_move_history, Npc* partner);
|
||||
|
||||
INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EF4E0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user