diff options
-rw-r--r-- | asm/cable_car.s | 24 | ||||
-rw-r--r-- | ld_script.txt | 1 | ||||
-rw-r--r-- | src/scene/cable_car.c | 27 |
3 files changed, 28 insertions, 24 deletions
diff --git a/asm/cable_car.s b/asm/cable_car.s index 385cd404d..71bc85ccb 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -6,30 +6,6 @@ .text - thumb_func_start sub_81231EC -sub_81231EC: @ 81231EC - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08123210 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0812320A - ldr r0, _08123214 @ =sub_8123244 - bl SetMainCallback2 - adds r0, r4, 0 - bl DestroyTask -_0812320A: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08123210: .4byte gPaletteFade -_08123214: .4byte sub_8123244 - thumb_func_end sub_81231EC - thumb_func_start sub_8123218 sub_8123218: @ 8123218 push {lr} diff --git a/ld_script.txt b/ld_script.txt index 7b53e8b35..4b103324e 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -216,6 +216,7 @@ SECTIONS { src/battle/battle_controller_linkpartner.o(.text); src/battle/battle_message.o(.text); src/field/choose_party.o(.text); + src/scene/cable_car.o(.text); asm/cable_car.o(.text); asm/roulette_util.o(.text); asm/cable_car_util.o(.text); diff --git a/src/scene/cable_car.c b/src/scene/cable_car.c new file mode 100644 index 000000000..1b5d22221 --- /dev/null +++ b/src/scene/cable_car.c @@ -0,0 +1,27 @@ + +// Includes +#include "global.h" +#include "palette.h" +#include "main.h" +#include "task.h" + +// Static type declarations + +// Static RAM declarations + +// Static ROM declarations + +void sub_8123244(void); + +// .rodata + +// .text + +void sub_81231EC(u8 taskId) +{ + if (!gPaletteFade.active) + { + SetMainCallback2(sub_8123244); + DestroyTask(taskId); + } +} |