Merge branch 'master' into gfx

This commit is contained in:
Ethan Roseman 2021-01-16 11:18:21 +09:00
commit e9f9c737c0
6 changed files with 33 additions and 82 deletions

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80025C60
/* 1060 80025C60 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1064 80025C64 3C05B3FF */ lui $a1, 0xb3ff
/* 1068 80025C68 34A50014 */ ori $a1, $a1, 0x14
/* 106C 80025C6C AFB00010 */ sw $s0, 0x10($sp)
/* 1070 80025C70 3C10800A */ lui $s0, %hi(carthandle)
/* 1074 80025C74 2610A638 */ addiu $s0, $s0, %lo(carthandle)
/* 1078 80025C78 AFBF0014 */ sw $ra, 0x14($sp)
/* 107C 80025C7C 8E040000 */ lw $a0, ($s0)
/* 1080 80025C80 0C018358 */ jal osEPiWriteIo
/* 1084 80025C84 0000302D */ daddu $a2, $zero, $zero
/* 1088 80025C88 3C05B3FF */ lui $a1, 0xb3ff
/* 108C 80025C8C 34A50004 */ ori $a1, $a1, 4
/* 1090 80025C90 8E040000 */ lw $a0, ($s0)
/* 1094 80025C94 0C018358 */ jal osEPiWriteIo
/* 1098 80025C98 0000302D */ daddu $a2, $zero, $zero
/* 109C 80025C9C 3C05B3FF */ lui $a1, 0xb3ff
/* 10A0 80025CA0 3C064953 */ lui $a2, 0x4953
/* 10A4 80025CA4 8E040000 */ lw $a0, ($s0)
/* 10A8 80025CA8 0C018358 */ jal osEPiWriteIo
/* 10AC 80025CAC 34C63634 */ ori $a2, $a2, 0x3634
/* 10B0 80025CB0 8FBF0014 */ lw $ra, 0x14($sp)
/* 10B4 80025CB4 8FB00010 */ lw $s0, 0x10($sp)
/* 10B8 80025CB8 03E00008 */ jr $ra
/* 10BC 80025CBC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,25 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802A1000_7345A0
/* 7345A0 802A1000 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 7345A4 802A1004 AFB00010 */ sw $s0, 0x10($sp)
/* 7345A8 802A1008 0080802D */ daddu $s0, $a0, $zero
/* 7345AC 802A100C 2402000F */ addiu $v0, $zero, 0xf
/* 7345B0 802A1010 3C03800E */ lui $v1, %hi(gBattleStatus+0x83)
/* 7345B4 802A1014 8063C0F3 */ lb $v1, %lo(gBattleStatus+0x83)($v1)
/* 7345B8 802A1018 24040015 */ addiu $a0, $zero, 0x15
/* 7345BC 802A101C AFBF0014 */ sw $ra, 0x14($sp)
/* 7345C0 802A1020 AE020088 */ sw $v0, 0x88($s0)
/* 7345C4 802A1024 0C03A752 */ jal is_ability_active
/* 7345C8 802A1028 AE030084 */ sw $v1, 0x84($s0)
/* 7345CC 802A102C 10400003 */ beqz $v0, .L802A103C
/* 7345D0 802A1030 24020028 */ addiu $v0, $zero, 0x28
/* 7345D4 802A1034 AE000084 */ sw $zero, 0x84($s0)
/* 7345D8 802A1038 AE020088 */ sw $v0, 0x88($s0)
.L802A103C:
/* 7345DC 802A103C 8FBF0014 */ lw $ra, 0x14($sp)
/* 7345E0 802A1040 8FB00010 */ lw $s0, 0x10($sp)
/* 7345E4 802A1044 24020002 */ addiu $v0, $zero, 2
/* 7345E8 802A1048 03E00008 */ jr $ra
/* 7345EC 802A104C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,26 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802A1050_7345F0
/* 7345F0 802A1050 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 7345F4 802A1054 AFB00010 */ sw $s0, 0x10($sp)
/* 7345F8 802A1058 0080802D */ daddu $s0, $a0, $zero
/* 7345FC 802A105C 24040016 */ addiu $a0, $zero, 0x16
/* 734600 802A1060 AFBF0014 */ sw $ra, 0x14($sp)
/* 734604 802A1064 0C03A752 */ jal is_ability_active
/* 734608 802A1068 AE000084 */ sw $zero, 0x84($s0)
/* 73460C 802A106C 10400002 */ beqz $v0, .L802A1078
/* 734610 802A1070 24020001 */ addiu $v0, $zero, 1
/* 734614 802A1074 AE020084 */ sw $v0, 0x84($s0)
.L802A1078:
/* 734618 802A1078 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 73461C 802A107C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 734620 802A1080 30421000 */ andi $v0, $v0, 0x1000
/* 734624 802A1084 10400002 */ beqz $v0, .L802A1090
/* 734628 802A1088 24020001 */ addiu $v0, $zero, 1
/* 73462C 802A108C AE020084 */ sw $v0, 0x84($s0)
.L802A1090:
/* 734630 802A1090 8FBF0014 */ lw $ra, 0x14($sp)
/* 734634 802A1094 8FB00010 */ lw $s0, 0x10($sp)
/* 734638 802A1098 24020002 */ addiu $v0, $zero, 2
/* 73463C 802A109C 03E00008 */ jr $ra

View File

@ -77,4 +77,6 @@
#define _NS(x, y) x ## _ ## y
#define NS(x, y) _NS(x, y)
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
#endif

View File

@ -1,6 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "code_1060_len_310", func_80025C60);
void func_80025C60(void) {
OSPiHandle** handle = &carthandle;
osEPiWriteIo(*handle, 0xB3FF0014, 0);
osEPiWriteIo(*handle, 0xB3FF0004, 0);
osEPiWriteIo(*handle, 0xB3FF0000, ASCII_TO_U32('I', 'S', '6', '4'));
}
INCLUDE_ASM(s32, "code_1060_len_310", func_80025CC0);

View File

@ -1,5 +1,27 @@
#include "common.h"
INCLUDE_ASM(s32, "code_7345A0", func_802A1000_7345A0);
ApiStatus func_802A1000_7345A0(ScriptInstance* script, s32 isInitialCall) {
script->varTable[0] = BATTLE_STATUS->unk_83;
script->varTable[1] = 15;
INCLUDE_ASM(s32, "code_7345A0", func_802A1050_7345F0);
if (is_ability_active(Ability_BERSERKER)) {
script->varTable[0] = 0;
script->varTable[1] = 40;
}
return ApiStatus_DONE2;
}
ApiStatus func_802A1050_7345F0(ScriptInstance* script, s32 isInitialCall) {
script->varTable[0] = 0;
if (is_ability_active(Ability_RIGHT_ON)) {
script->varTable[0] = 1;
}
if (gBattleStatus.flags1 & 0x1000) {
script->varTable[0] = 1;
}
return ApiStatus_DONE2;
}