mirror of
https://github.com/pret/pokeruby.git
synced 2026-10-04 16:27:35 -04:00
Split battle_anim_81258BC.s and decompile unused
This commit is contained in:
@@ -41,7 +41,7 @@ VERSIONS := ruby sapphire ruby_rev1 sapphire_rev1 ruby_rev2 sapphire_rev2 ruby_d
|
||||
$(VERSIONS) $(VERSIONS:%=compare_%)
|
||||
|
||||
|
||||
$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle{,/anim},/field,/debug,/scene,/pokemon,/engine,/libs}}))
|
||||
$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle{,/anim},/field,/debug,/scene,/pokemon,/engine,/libs,/unused}}))
|
||||
|
||||
C_SRCS := $(shell find src -iname "*.c")
|
||||
ASM_SRCS := $(wildcard asm/*.s)
|
||||
|
||||
@@ -4,61 +4,6 @@
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start unref_sub_812AECC
|
||||
unref_sub_812AECC: @ 812AECC
|
||||
push {lr}
|
||||
bl RunMysteryEventScript
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r0, 0
|
||||
cmp r0, 0x1
|
||||
beq _0812AEEA
|
||||
cmp r0, 0x1
|
||||
ble _0812AF08
|
||||
cmp r1, 0x2
|
||||
beq _0812AEF4
|
||||
cmp r1, 0x3
|
||||
beq _0812AEFA
|
||||
b _0812AF08
|
||||
_0812AEEA:
|
||||
movs r0, 0x16
|
||||
bl PlaySE
|
||||
movs r0, 0x1
|
||||
b _0812AF0A
|
||||
_0812AEF4:
|
||||
bl sub_812AF10
|
||||
b _0812AF08
|
||||
_0812AEFA:
|
||||
movs r0, 0x16
|
||||
bl PlaySE
|
||||
bl sub_812AF10
|
||||
movs r0, 0x1
|
||||
b _0812AF0A
|
||||
_0812AF08:
|
||||
movs r0, 0
|
||||
_0812AF0A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end unref_sub_812AECC
|
||||
|
||||
thumb_func_start sub_812AF10
|
||||
sub_812AF10: @ 812AF10
|
||||
push {lr}
|
||||
movs r0, 0x2
|
||||
movs r1, 0xE
|
||||
movs r2, 0x1B
|
||||
movs r3, 0x13
|
||||
bl MenuDrawTextWindow
|
||||
ldr r0, _0812AF2C @ =gStringVar4
|
||||
movs r1, 0x3
|
||||
movs r2, 0xF
|
||||
bl MenuPrint
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0812AF2C: .4byte gStringVar4
|
||||
thumb_func_end sub_812AF10
|
||||
|
||||
thumb_func_start sub_812AF30
|
||||
sub_812AF30: @ 812AF30
|
||||
+4
-2
@@ -350,12 +350,14 @@ SECTIONS {
|
||||
src/scene/cable_car.o(.text);
|
||||
asm/roulette_util.o(.text);
|
||||
src/engine/cable_car_util.o(.text);
|
||||
src/unused_8124F94.o(.text);
|
||||
src/unused/unused_8124F94.o(.text);
|
||||
src/engine/save.o(.text);
|
||||
src/engine/mystery_event_script.o(.text);
|
||||
src/field/field_effect_helpers.o(.text);
|
||||
asm/contest_ai.o(.text);
|
||||
asm/battle_anim_81258BC.o(.text);
|
||||
src/unused/unused_81258BC.o(.text);
|
||||
src/battle/anim/sfx.o(.text);
|
||||
asm/battle_anim_sfx.o(.text);
|
||||
src/battle/battle_controller_safari.o(.text);
|
||||
src/field/fldeff_sweetscent.o(.text);
|
||||
asm/battle_anim_812C144.o(.text);
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#include "global.h"
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#include "constants/songs.h"
|
||||
#include "global.h"
|
||||
#include "menu.h"
|
||||
#include "mystery_event_script.h"
|
||||
#include "sound.h"
|
||||
#include "text.h"
|
||||
|
||||
void sub_812AF10(void);
|
||||
|
||||
bool8 unref_sub_812AECC(u8 *script)
|
||||
{
|
||||
u8 result = RunMysteryEventScript(script);
|
||||
switch (result)
|
||||
{
|
||||
case 0:
|
||||
return FALSE;
|
||||
case 1:
|
||||
PlaySE(SE_BOO);
|
||||
return TRUE;
|
||||
case 2:
|
||||
sub_812AF10();
|
||||
return FALSE;
|
||||
case 3:
|
||||
PlaySE(SE_BOO);
|
||||
sub_812AF10();
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_812AF10(void)
|
||||
{
|
||||
MenuDrawTextWindow(2, 14, 27, 19);
|
||||
MenuPrint(gStringVar4, 3, 15);
|
||||
}
|
||||
Reference in New Issue
Block a user