Permalink
Browse files

Add the Zukan state machine (and some util functions it uses)

  • Loading branch information...
kmeisthax committed Feb 18, 2018
1 parent d15de2a commit 2b549beedadba078704805b65999c4bff26aa23e
Showing with 511 additions and 0 deletions.
  1. +2 −0 Makefile
  2. +51 −0 components/pausemenu/screen_resources.asm
  3. +444 −0 components/zukan/state_machine.asm
  4. +13 −0 components/zukan/state_machine.inc
  5. +1 −0 telefang.inc
@@ -38,6 +38,7 @@ OBJS := components/compression/malias.o \
components/pausemenu/sms_utils.o components/pausemenu/inventory_statemachine.o \
components/pausemenu/inventory_utils.o components/pausemenu/indicators.o \
components/pausemenu/save/statemachine.o components/pausemenu/save/input.o \
components/pausemenu/screen_resources.o \
components/melodyedit/memory.o components/melodyedit/indicators.o \
components/melodyedit/ringtone_menu.o \
components/titlemenu/state_machine.o components/titlemenu/name_input.o \
@@ -97,6 +98,7 @@ OBJS := components/compression/malias.o \
components/linktrade/loss_statemachine.o \
components/zukan/completion_certificate_tmap.o \
components/zukan/completion_flags.o components/zukan/draw_utils.o \
components/zukan/state_machine.o \
gfx/denjuu_stages.o gfx/phones/keypad_gfx.o gfx/samples.o gfx/items.o \
gfx/statusbar.o \
script/mainscript.o script/stringtable.o
@@ -0,0 +1,51 @@
INCLUDE "telefang.inc"

SECTION "Pause Menu Screen Resource Utils", ROMX[$7E27], BANK[$4]
PauseMenu_LoadPhoneHalves::
ld bc, 0
ld e, $10
call PauseMenu_LoadMap0
ld bc, 0
ld e, $11
call PauseMenu_LoadMap1
PauseMenu_LoadPhoneControlHint::
ld e, $12
call PauseMenu_LoadMenuMap0
ld bc, $30F
ld e, $20
call PauseMenu_LoadMap0
ld bc, $310
ld e, $21
jp PauseMenu_LoadMap0
SECTION "Pause Menu Screen Resource Utils 2", ROMX[$7E58], BANK[$4]
PauseMenu_ConfigureScreen::
ld a, $E3
ld [W_ShadowREG_LCDC], a
ld a, $58
ld [W_ShadowREG_WX], a
xor a
ld [W_ShadowREG_WY], a
xor a
ld [W_ShadowREG_SCX], a
ld [W_ShadowREG_SCY], a
ret
SECTION "Pause Menu Screen Resource Utils 3", ROMX[$7A0B], BANK[$4]
PauseMenu_LoadMenuResources::
call PauseMenu_LoadMainGraphics
ld bc, $11
call Banked_LoadMaliasGraphics
xor a
ld [W_PauseMenu_NextPhoneIME], a
call PauseMenu_LoadPhoneGraphics
jp PauseMenu_LoadPhoneIMEGraphics
Oops, something went wrong.

0 comments on commit 2b549be

Please sign in to comment.