mirror of https://github.com/pmret/papermario.git
hey rain
This commit is contained in:
parent
1040a9124c
commit
369cb32bbc
|
|
@ -1,11 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel enemy_create_target_list
|
||||
/* 191928 80263048 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19192C 8026304C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 191930 80263050 0C098890 */ jal create_target_list
|
||||
/* 191934 80263054 24050001 */ addiu $a1, $zero, 1
|
||||
/* 191938 80263058 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19193C 8026305C 03E00008 */ jr $ra
|
||||
/* 191940 80263060 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel player_create_target_list
|
||||
/* 19190C 8026302C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 191910 80263030 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 191914 80263034 0C098890 */ jal create_target_list
|
||||
/* 191918 80263038 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 19191C 8026303C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 191920 80263040 03E00008 */ jr $ra
|
||||
/* 191924 80263044 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel remove_part_decoration
|
||||
/* 195AF8 80267218 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 195AFC 8026721C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 195B00 80267220 0C09740F */ jal _remove_part_decoration
|
||||
/* 195B04 80267224 00000000 */ nop
|
||||
/* 195B08 80267228 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 195B0C 8026722C 03E00008 */ jr $ra
|
||||
/* 195B10 80267230 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel remove_part_shadow
|
||||
/* 195C80 802673A0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 195C84 802673A4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 195C88 802673A8 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 195C8C 802673AC 0C09A75B */ jal get_actor
|
||||
/* 195C90 802673B0 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 195C94 802673B4 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 195C98 802673B8 0C099117 */ jal get_actor_part
|
||||
/* 195C9C 802673BC 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 195CA0 802673C0 8C430000 */ lw $v1, ($v0)
|
||||
/* 195CA4 802673C4 8C44009C */ lw $a0, 0x9c($v0)
|
||||
/* 195CA8 802673C8 34630004 */ ori $v1, $v1, 4
|
||||
/* 195CAC 802673CC 0C0448CA */ jal func_80112328
|
||||
/* 195CB0 802673D0 AC430000 */ sw $v1, ($v0)
|
||||
/* 195CB4 802673D4 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 195CB8 802673D8 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 195CBC 802673DC 03E00008 */ jr $ra
|
||||
/* 195CC0 802673E0 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel set_actor_yaw
|
||||
/* 192848 80263F68 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19284C 80263F6C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 192850 80263F70 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 192854 80263F74 0C09A75B */ jal get_actor
|
||||
/* 192858 80263F78 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 19285C 80263F7C 44900000 */ mtc1 $s0, $f0
|
||||
/* 192860 80263F80 00000000 */ nop
|
||||
/* 192864 80263F84 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 192868 80263F88 E440018C */ swc1 $f0, 0x18c($v0)
|
||||
/* 19286C 80263F8C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 192870 80263F90 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 192874 80263F94 03E00008 */ jr $ra
|
||||
/* 192878 80263F98 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel set_part_yaw
|
||||
/* 19287C 80263F9C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 192880 80263FA0 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 192884 80263FA4 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 192888 80263FA8 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19288C 80263FAC AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 192890 80263FB0 0C09A75B */ jal get_actor
|
||||
/* 192894 80263FB4 00C0882D */ daddu $s1, $a2, $zero
|
||||
/* 192898 80263FB8 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19289C 80263FBC 0C099117 */ jal get_actor_part
|
||||
/* 1928A0 80263FC0 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 1928A4 80263FC4 44910000 */ mtc1 $s1, $f0
|
||||
/* 1928A8 80263FC8 00000000 */ nop
|
||||
/* 1928AC 80263FCC 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 1928B0 80263FD0 E4400064 */ swc1 $f0, 0x64($v0)
|
||||
/* 1928B4 80263FD4 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 1928B8 80263FD8 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 1928BC 80263FDC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 1928C0 80263FE0 03E00008 */ jr $ra
|
||||
/* 1928C4 80263FE4 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel LoadMoveScript
|
||||
/* 196A10 80268130 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 196A14 80268134 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 196A18 80268138 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 196A1C 8026813C AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 196A20 80268140 3C11800E */ lui $s1, %hi(gBattleStatus)
|
||||
/* 196A24 80268144 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
|
||||
/* 196A28 80268148 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 196A2C 8026814C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 196A30 80268150 8630017C */ lh $s0, 0x17c($s1)
|
||||
/* 196A34 80268154 3C028029 */ lui $v0, 0x8029
|
||||
/* 196A38 80268158 24423E80 */ addiu $v0, $v0, 0x3e80
|
||||
/* 196A3C 8026815C 00108100 */ sll $s0, $s0, 4
|
||||
/* 196A40 80268160 02028021 */ addu $s0, $s0, $v0
|
||||
/* 196A44 80268164 8E040000 */ lw $a0, ($s0)
|
||||
/* 196A48 80268168 8E050004 */ lw $a1, 4($s0)
|
||||
/* 196A4C 8026816C 0C00A5CF */ jal dma_copy
|
||||
/* 196A50 80268170 8E060008 */ lw $a2, 8($s0)
|
||||
/* 196A54 80268174 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 196A58 80268178 0C098EF2 */ jal deduct_current_move_fp
|
||||
/* 196A5C 8026817C AE420084 */ sw $v0, 0x84($s2)
|
||||
/* 196A60 80268180 8E220004 */ lw $v0, 4($s1)
|
||||
/* 196A64 80268184 3C030800 */ lui $v1, 0x800
|
||||
/* 196A68 80268188 00431024 */ and $v0, $v0, $v1
|
||||
/* 196A6C 8026818C 10400003 */ beqz $v0, .L8026819C
|
||||
/* 196A70 80268190 00000000 */ nop
|
||||
/* 196A74 80268194 0C0951B5 */ jal enable_player_blur
|
||||
/* 196A78 80268198 00000000 */ nop
|
||||
.L8026819C:
|
||||
/* 196A7C 8026819C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 196A80 802681A0 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 196A84 802681A4 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 196A88 802681A8 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 196A8C 802681AC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 196A90 802681B0 03E00008 */ jr $ra
|
||||
/* 196A94 802681B4 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 196A98 802681B8 00000000 */ nop
|
||||
/* 196A9C 802681BC 00000000 */ nop
|
||||
|
|
@ -34,6 +34,8 @@ extern s32 gScriptListCount;
|
|||
extern s32 gScriptIdList[MAX_SCRIPTS];
|
||||
extern s32 gScriptIndexList[MAX_SCRIPTS];
|
||||
|
||||
extern s32 gMoveScriptTable[10][4]; // not 10 - how many?
|
||||
|
||||
extern Model* gWorldModelList[256];
|
||||
extern Model* gBattleModelList[256];
|
||||
extern Model** gCurrentModelListPtr[256];
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
#include "common.h"
|
||||
|
||||
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", create_target_list);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", player_create_target_list);
|
||||
void player_create_target_list(Actor* actor) {
|
||||
create_target_list(actor, 0);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", enemy_create_target_list);
|
||||
void enemy_create_target_list(Actor* actor) {
|
||||
create_target_list(actor, 1);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", func_80263064);
|
||||
|
||||
|
|
@ -42,9 +48,13 @@ INCLUDE_ASM(s32, "code_190B20", func_80263E08);
|
|||
|
||||
INCLUDE_ASM(s32, "code_190B20", set_animation_rate);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", set_actor_yaw);
|
||||
void set_actor_yaw(s32 actorId, s32 yaw) {
|
||||
get_actor(actorId)->yaw = yaw;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", set_part_yaw);
|
||||
void set_part_yaw(s32 actorID, s32 partIndex, s32 value) {
|
||||
get_actor_part(get_actor(actorID), partIndex)->yaw = value;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", func_80263FE8);
|
||||
|
||||
|
|
@ -58,7 +68,7 @@ INCLUDE_ASM(s32, "code_190B20", add_xz_vec3f_copy2);
|
|||
|
||||
INCLUDE_ASM(s32, "code_190B20", play_movement_dust_effects);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", get_actor_part);
|
||||
INCLUDE_ASM(ActorPart*, "code_190B20", get_actor_part, Actor* actor, s32 partIndex);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", load_player_actor);
|
||||
|
||||
|
|
@ -134,7 +144,9 @@ INCLUDE_ASM(s32, "code_190B20", add_part_decoration);
|
|||
|
||||
INCLUDE_ASM(s32, "code_190B20", add_actor_decoration);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", remove_part_decoration);
|
||||
void remove_part_decoration(ActorPart* part, s32 decorationIndex) {
|
||||
_remove_part_decoration(part, decorationIndex);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", remove_actor_decoration);
|
||||
|
||||
|
|
@ -142,7 +154,12 @@ INCLUDE_ASM(s32, "code_190B20", heroes_is_ability_active);
|
|||
|
||||
INCLUDE_ASM(s32, "code_190B20", create_part_shadow);
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", remove_part_shadow);
|
||||
void remove_part_shadow(s32 actorId, s32 partIndex) {
|
||||
ActorPart* part = get_actor_part(get_actor(actorId), partIndex);
|
||||
|
||||
part->flags |= 4;
|
||||
func_80112328(part->shadow);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_190B20", func_802673E4);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,18 @@ INCLUDE_ASM(s32, "code_1967B0", LoadItemScript);
|
|||
|
||||
INCLUDE_ASM(s32, "code_1967B0", LoadFreeItemScript);
|
||||
|
||||
INCLUDE_ASM(s32, "code_1967B0", LoadMoveScript);
|
||||
ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32* moveScript = gMoveScriptTable[battleStatus->selectedMoveID];
|
||||
|
||||
dma_copy(moveScript[0], moveScript[1], moveScript[2]);
|
||||
script->varTable[0] = moveScript[3];
|
||||
|
||||
deduct_current_move_fp();
|
||||
|
||||
if (gBattleStatus.flags2 & 0x8000000) {
|
||||
enable_player_blur();
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1878,3 +1878,4 @@ SetTattleString;0x80045A58
|
|||
!handle_CPU;0x8006B038
|
||||
gPauseMenuStrings;0x8026F778
|
||||
gEffectTable;0x8007F214
|
||||
gMoveScriptTable;0x80293E80
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ gWorldNpcList = 0x800A0990;
|
|||
gBattleNpcList = 0x800A0A90;
|
||||
gCurrentNpcListPtr = 0x800A0B90;
|
||||
|
||||
gMoveScriptTable = 0x80293E80;
|
||||
|
||||
gMainGameState = 0x80151700;
|
||||
gCurrentUpdateFunction = 0x8015170C;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue