mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 20:42:41 +01:00
IsGameStatusUnkAA_1
This commit is contained in:
parent
3d9b3ea261
commit
dfbf5a79fc
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802185E0_6DE3A0
|
||||
/* 6DE3A0 802185E0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
||||
/* 6DE3A4 802185E4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
||||
/* 6DE3A8 802185E8 AC800084 */ sw $zero, 0x84($a0)
|
||||
/* 6DE3AC 802185EC 904200AA */ lbu $v0, 0xaa($v0)
|
||||
/* 6DE3B0 802185F0 30420001 */ andi $v0, $v0, 1
|
||||
/* 6DE3B4 802185F4 10400002 */ beqz $v0, .L80218600
|
||||
/* 6DE3B8 802185F8 24020001 */ addiu $v0, $zero, 1
|
||||
/* 6DE3BC 802185FC AC820084 */ sw $v0, 0x84($a0)
|
||||
.L80218600:
|
||||
/* 6DE3C0 80218600 03E00008 */ jr $ra
|
||||
/* 6DE3C4 80218604 24020002 */ addiu $v0, $zero, 2
|
@ -1,14 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80218608_6DE3C8
|
||||
/* 6DE3C8 80218608 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 6DE3CC 8021860C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 6DE3D0 80218610 0C03A830 */ jal add_coins
|
||||
/* 6DE3D4 80218614 24040001 */ addiu $a0, $zero, 1
|
||||
/* 6DE3D8 80218618 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 6DE3DC 8021861C 24020002 */ addiu $v0, $zero, 2
|
||||
/* 6DE3E0 80218620 03E00008 */ jr $ra
|
||||
/* 6DE3E4 80218624 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 6DE3E8 80218628 00000000 */ nop
|
||||
/* 6DE3EC 8021862C 00000000 */ nop
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802191C0_513790
|
||||
/* 513790 802191C0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
||||
/* 513794 802191C4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
||||
/* 513798 802191C8 AC800084 */ sw $zero, 0x84($a0)
|
||||
/* 51379C 802191CC 904200AA */ lbu $v0, 0xaa($v0)
|
||||
/* 5137A0 802191D0 30420001 */ andi $v0, $v0, 1
|
||||
/* 5137A4 802191D4 10400002 */ beqz $v0, .L802191E0
|
||||
/* 5137A8 802191D8 24020001 */ addiu $v0, $zero, 1
|
||||
/* 5137AC 802191DC AC820084 */ sw $v0, 0x84($a0)
|
||||
.L802191E0:
|
||||
/* 5137B0 802191E0 03E00008 */ jr $ra
|
||||
/* 5137B4 802191E4 24020002 */ addiu $v0, $zero, 2
|
@ -1,14 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802191E8_5137B8
|
||||
/* 5137B8 802191E8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 5137BC 802191EC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 5137C0 802191F0 0C03A830 */ jal add_coins
|
||||
/* 5137C4 802191F4 24040001 */ addiu $a0, $zero, 1
|
||||
/* 5137C8 802191F8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 5137CC 802191FC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 5137D0 80219200 03E00008 */ jr $ra
|
||||
/* 5137D4 80219204 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 5137D8 80219208 00000000 */ nop
|
||||
/* 5137DC 8021920C 00000000 */ nop
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802186A0_557A80
|
||||
/* 557A80 802186A0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
||||
/* 557A84 802186A4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
||||
/* 557A88 802186A8 AC800084 */ sw $zero, 0x84($a0)
|
||||
/* 557A8C 802186AC 904200AA */ lbu $v0, 0xaa($v0)
|
||||
/* 557A90 802186B0 30420001 */ andi $v0, $v0, 1
|
||||
/* 557A94 802186B4 10400002 */ beqz $v0, .L802186C0
|
||||
/* 557A98 802186B8 24020001 */ addiu $v0, $zero, 1
|
||||
/* 557A9C 802186BC AC820084 */ sw $v0, 0x84($a0)
|
||||
.L802186C0:
|
||||
/* 557AA0 802186C0 03E00008 */ jr $ra
|
||||
/* 557AA4 802186C4 24020002 */ addiu $v0, $zero, 2
|
@ -1,14 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802186C8_557AA8
|
||||
/* 557AA8 802186C8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 557AAC 802186CC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 557AB0 802186D0 0C03A830 */ jal add_coins
|
||||
/* 557AB4 802186D4 24040001 */ addiu $a0, $zero, 1
|
||||
/* 557AB8 802186D8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 557ABC 802186DC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 557AC0 802186E0 03E00008 */ jr $ra
|
||||
/* 557AC4 802186E4 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 557AC8 802186E8 00000000 */ nop
|
||||
/* 557ACC 802186EC 00000000 */ nop
|
@ -2,6 +2,4 @@
|
||||
|
||||
#define NAMESPACE b_area_dig
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_dig/6DE3A0", func_802185E0_6DE3A0);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_dig/6DE3A0", func_80218608_6DE3C8);
|
||||
#include "common/IsGameStatusUnkAA_1.inc.c"
|
||||
|
@ -2,6 +2,4 @@
|
||||
|
||||
#define NAMESPACE b_area_omo
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_omo/513790", func_802191C0_513790);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_omo/513790", func_802191E8_5137B8);
|
||||
#include "common/IsGameStatusUnkAA_1.inc.c"
|
||||
|
@ -2,6 +2,4 @@
|
||||
|
||||
#define NAMESPACE b_area_omo3
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_omo3/557A80", func_802186A0_557A80);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_omo3/557A80", func_802186C8_557AA8);
|
||||
#include "common/IsGameStatusUnkAA_1.inc.c"
|
||||
|
18
src/common/IsGameStatusUnkAA_1.inc.c
Normal file
18
src/common/IsGameStatusUnkAA_1.inc.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include "common.h"
|
||||
#include "map.h"
|
||||
|
||||
ApiStatus N(IsGameStatusUnkAA_1)(ScriptInstance* script, s32 isInitialCall) {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
script->varTable[0] = 0;
|
||||
if (gameStatus->unk_AA & 1) {
|
||||
script->varTable[0] = 1;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(Add1Coin)(ScriptInstance* script, s32 isInitialCall) {
|
||||
add_coins(1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
Loading…
Reference in New Issue
Block a user