summaryrefslogtreecommitdiff
path: root/asm/hof_pc.s
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2018-01-18 12:53:31 -0500
committerscnorton <scnorton@biociphers.org>2018-01-18 12:53:31 -0500
commitc6ff1a6ce39cb67c6de21f2e4938ea62c97ee7e5 (patch)
tree47e2f5eaa84c3cc97b96bdf06170136abe446d81 /asm/hof_pc.s
parent3c2b1731eeb7037a1b681444b1c126fc239a904e (diff)
parent24e0edee9f428a68715c47051ebba3cda5a3e5a7 (diff)
Merge branch 'master' into link
Diffstat (limited to 'asm/hof_pc.s')
-rw-r--r--asm/hof_pc.s73
1 files changed, 73 insertions, 0 deletions
diff --git a/asm/hof_pc.s b/asm/hof_pc.s
new file mode 100644
index 000000000..29ca9204f
--- /dev/null
+++ b/asm/hof_pc.s
@@ -0,0 +1,73 @@
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
+
+ .syntax unified
+
+ .text
+
+ thumb_func_start AccessHallOfFamePC
+AccessHallOfFamePC: @ 8137C28
+ push {lr}
+ ldr r0, =CB2_DoHallOfFamePC
+ bl SetMainCallback2
+ bl ScriptContext2_Enable
+ pop {r0}
+ bx r0
+ .pool
+ thumb_func_end AccessHallOfFamePC
+
+ thumb_func_start ReturnFromHallOfFamePC
+ReturnFromHallOfFamePC: @ 8137C3C
+ push {lr}
+ ldr r0, =c2_exit_to_overworld_2_switch
+ bl SetMainCallback2
+ ldr r1, =gFieldCallback
+ ldr r0, =ReshowPCMenuAfterHallOfFamePC
+ str r0, [r1]
+ pop {r0}
+ bx r0
+ .pool
+ thumb_func_end ReturnFromHallOfFamePC
+
+ thumb_func_start ReshowPCMenuAfterHallOfFamePC
+ReshowPCMenuAfterHallOfFamePC: @ 8137C5C
+ push {lr}
+ sub sp, 0x4
+ bl ScriptContext2_Enable
+ bl Overworld_PlaySpecialMapMusic
+ bl sp109_CreatePCMenu
+ bl sub_80E2514
+ movs r0, 0x1
+ negs r0, r0
+ movs r1, 0
+ str r1, [sp]
+ movs r2, 0x10
+ movs r3, 0
+ bl BeginNormalPaletteFade
+ ldr r0, =Task_WaitForPaletteFade
+ movs r1, 0xA
+ bl CreateTask
+ add sp, 0x4
+ pop {r0}
+ bx r0
+ .pool
+ thumb_func_end ReshowPCMenuAfterHallOfFamePC
+
+ thumb_func_start Task_WaitForPaletteFade
+Task_WaitForPaletteFade: @ 8137C94
+ push {lr}
+ lsls r0, 24
+ lsrs r2, r0, 24
+ ldr r0, =gPaletteFade
+ ldrb r1, [r0, 0x7]
+ movs r0, 0x80
+ ands r0, r1
+ cmp r0, 0
+ bne _08137CAC
+ adds r0, r2, 0
+ bl DestroyTask
+_08137CAC:
+ pop {r0}
+ bx r0
+ .pool
+ thumb_func_end Task_WaitForPaletteFade