This commit is contained in:
Ethan Roseman 2020-10-16 14:49:18 -04:00
parent 369cb32bbc
commit 9e9ce5bb29
7 changed files with 16 additions and 29 deletions

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetBattleInputMask
/* 19C930 8026E050 8C82000C */ lw $v0, 0xc($a0)
/* 19C934 8026E054 8C420000 */ lw $v0, ($v0)
/* 19C938 8026E058 3C01800E */ lui $at, 0x800e
/* 19C93C 8026E05C AC22C294 */ sw $v0, -0x3d6c($at)
/* 19C940 8026E060 03E00008 */ jr $ra
/* 19C944 8026E064 24020002 */ addiu $v0, $zero, 2

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8026E038
/* 19C918 8026E038 8C82000C */ lw $v0, 0xc($a0)
/* 19C91C 8026E03C 8C420000 */ lw $v0, ($v0)
/* 19C920 8026E040 3C01800E */ lui $at, 0x800e
/* 19C924 8026E044 AC22C0E4 */ sw $v0, -0x3f1c($at)
/* 19C928 8026E048 03E00008 */ jr $ra
/* 19C92C 8026E04C 24020002 */ addiu $v0, $zero, 2

View File

@ -531,7 +531,8 @@ typedef struct BattleStatus {
/* 0x048 */ u8 currentSubmenu;
/* 0x049 */ char unk_49[10];
/* 0x053 */ u8 stratsLastCursorPos;
/* 0x054 */ char unk_54[36];
/* 0x054 */ char unk_54[32];
/* 0x074 */ s32 unk_74;
/* 0x078 */ u8 totalStarPoints;
/* 0x079 */ u8 pendingStarPoints; /* how many to add */
/* 0x07A */ u8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */

View File

@ -17,10 +17,10 @@ ApiStatus func_80260DB8(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_80260DD8(ScriptInstance* script, s32 isInitialCall) {
Actor* player = gBattleStatus.playerActor;
if (!gPlayerData.hasActionCommands) {
s32 var = player->varTable[0];
if (var >= rand_int(100)) {
script->varTable[0] = 1;
} else {
@ -57,7 +57,7 @@ INCLUDE_ASM(s32, "code_18F340", func_8026127C);
ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) {
s32 partnerActorExists = gBattleStatus.partnerActor != NULL;
script->varTable[0] = FALSE;
if (partnerActorExists) {
script->varTable[0] = TRUE;

View File

@ -10,7 +10,7 @@ ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall) {
dma_copy(moveScript[0], moveScript[1], moveScript[2]);
script->varTable[0] = moveScript[3];
deduct_current_move_fp();
if (gBattleStatus.flags2 & 0x8000000) {

View File

@ -225,9 +225,15 @@ INCLUDE_ASM(s32, "code_197F40", func_8026DF88);
INCLUDE_ASM(s32, "code_197F40", func_8026E020);
INCLUDE_ASM(s32, "code_197F40", func_8026E038);
ApiStatus func_8026E038(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.unk_74 = *script->ptrReadPos;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetBattleInputMask);
ApiStatus SetBattleInputMask(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.inputBitmask = *script->ptrReadPos;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetBattleInputButtons);

View File

@ -43,5 +43,5 @@ for root, dirs, files in os.walk(asm_dir):
if "/os" not in root:
do_dir(root, asm_dir)
for thing in sorted(sizes.keys(), key=lambda x: sizes[x][3]):
print(thing.ljust(25) + str(sizes[thing][3]))
for thing in sorted(sizes.keys(), key=lambda x: sizes[x][2]):
print(thing.ljust(25) + str(sizes[thing][2]))