mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
code_7345A0 OK
This commit is contained in:
parent
f0423ab358
commit
f670e0e7fa
@ -1,6 +1,14 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_1060_len_310", func_80025C60);
|
||||
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
|
||||
|
||||
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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -2285,7 +2285,7 @@ segments:
|
||||
overlay: True
|
||||
files:
|
||||
- [0x7345A0, c]
|
||||
- [0x734640, bin]
|
||||
- [0x734650, bin]
|
||||
- type: code
|
||||
start: 0x737890
|
||||
vram: 0x802A1000
|
||||
|
Loading…
Reference in New Issue
Block a user