ref: 0b8fe4bac31c83a8164567da6d7889a18ab3eb4b
parent: 042fc4bfe5f55df87712d33b6f832a591b136f1a
author: PikalaxALT <[email protected]>
date: Mon Nov 16 17:29:54 EST 2015
More specials; bank 12 mobile
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -8924,7 +8924,7 @@
; 3f836
-Function3f836: ; 3f836
+DisplayLinkRecord: ; 3f836
ld a, BANK(sLinkBattleStats)
call GetSRAMBank
--- a/engine/diploma.asm
+++ b/engine/diploma.asm
@@ -1,5 +1,5 @@
-Function1dd702: ; 1dd702
+_Diploma: ; 1dd702
call Function1dd709
call WaitPressAorB_BlinkCursor
ret
--- /dev/null
+++ b/engine/main_menu.asm
@@ -1,0 +1,1242 @@
+GFX_49c0c: ; 49c0c
+INCBIN "gfx/unknown/049c0c.2bpp"
+; 49cdc
+
+MainMenu: ; 49cdc
+ xor a
+ ld [wc2d7], a
+ call Function49ed0
+ ld b, SCGB_08
+ call GetSGBLayout
+ call SetPalettes
+ ld hl, GameTimerPause
+ res 0, [hl]
+ call Function49da4
+ ld [wcf76], a
+ call Function49e09
+ ld hl, MenuDataHeader_0x49d14
+ call LoadMenuDataHeader
+ call Function49de4
+ call WriteBackup
+ jr c, .quit
+ call ClearTileMap
+ ld a, [MenuSelection]
+ ld hl, Jumptable_49d60
+ rst JumpTable
+ jr MainMenu
+
+.quit
+ ret
+; 49d14
+
+MenuDataHeader_0x49d14: ; 49d14
+ db $40 ; flags
+ db 00, 00 ; start coords
+ db 07, 16 ; end coords
+ dw MenuData2_0x49d1c
+ db 1 ; default option
+; 49d1c
+
+MenuData2_0x49d1c: ; 49d1c
+ db $80 ; flags
+ db 0 ; items
+ dw MainMenuItems
+ dw Function1f79
+ dw MainMenuText
+; 49d20
+
+MainMenuText: ; 49d24
+ db "CONTINUE@"
+ db "NEW GAME@"
+ db "OPTION@"
+ db "MYSTERY GIFT@"
+ db "MOBILE@"
+ db "MOBILE STUDIUM@"
+
+Jumptable_49d60: ; 0x49d60
+ dw MainMenu_Continue
+ dw MainMenu_NewGame
+ dw MainMenu_Options
+ dw MainMenu_MysteryGift
+ dw MainMenu_Mobile
+ dw MainMenu_MobileStudium
+; 0x49d6c
+
+CONTINUE EQU 0
+NEW_GAME EQU 1
+OPTION EQU 2
+MYSTERY_GIFT EQU 3
+MOBILE EQU 4
+MOBILE_STUDIUM EQU 5
+
+MainMenuItems:
+
+NewGameMenu: ; 0x49d6c
+ db 2
+ db NEW_GAME
+ db OPTION
+ db $ff
+
+ContinueMenu: ; 0x49d70
+ db 3
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db $ff
+
+MobileMysteryMenu: ; 0x49d75
+ db 5
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MYSTERY_GIFT
+ db MOBILE
+ db $ff
+
+MobileMenu: ; 0x49d7c
+ db 4
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MOBILE
+ db $ff
+
+MobileStudiumMenu: ; 0x49d82
+ db 5
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MOBILE
+ db MOBILE_STUDIUM
+ db $ff
+
+MysteryMobileStudiumMenu: ; 0x49d89
+ db 6
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MYSTERY_GIFT
+ db MOBILE
+ db MOBILE_STUDIUM
+ db $ff
+
+MysteryMenu: ; 0x49d91
+ db 4
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MYSTERY_GIFT
+ db $ff
+
+MysteryStudiumMenu: ; 0x49d97
+ db 5
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MYSTERY_GIFT
+ db MOBILE_STUDIUM
+ db $ff
+
+StudiumMenu: ; 0x49d9e
+ db 4
+ db CONTINUE
+ db NEW_GAME
+ db OPTION
+ db MOBILE_STUDIUM
+ db $ff
+
+
+Function49da4: ; 49da4
+ nop
+ nop
+ nop
+ ld a, [wcfcd]
+ and a
+ jr nz, .next
+ ld a, $0
+ ret
+
+.next
+ ld a, [hCGB]
+ cp $1
+ ld a, $1
+ ret nz
+ ld a, BANK(s0_abe5)
+ call GetSRAMBank
+ ld a, [s0_abe5]
+ cp $ff
+ call CloseSRAM
+ jr nz, .done
+ ld a, [StatusFlags]
+ bit 7, a
+ ld a, $1
+ jr z, .ok
+ jr .ok
+
+.ok
+ jr .ok2
+
+.ok2
+ ld a, $1
+ ret
+
+.done
+ ld a, [StatusFlags]
+ bit 7, a
+ jr z, .ok3
+ jr .ok3
+
+.ok3
+ jr .ok4
+
+.ok4
+ ld a, $6
+ ret
+; 49de4
+
+Function49de4: ; 49de4
+ call SetUpMenu
+.asm_49de7
+ call Function49e09
+ ld a, [wcfa5]
+ set 5, a
+ ld [wcfa5], a
+ call Function1f1a
+ ld a, [wcf73]
+ cp $2
+ jr z, .asm_49e07
+ cp $1
+ jr z, .asm_49e02
+ jr .asm_49de7
+
+.asm_49e02
+ call PlayClickSFX
+ and a
+ ret
+
+.asm_49e07
+ scf
+ ret
+; 49e09
+
+Function49e09: ; 49e09
+ ld a, [wcfcd]
+ and a
+ ret z
+ xor a
+ ld [hBGMapMode], a
+ call Function49e27
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set 4, [hl]
+ call Function49e3d
+ pop af
+ ld [Options], a
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+; 49e27
+
+
+Function49e27: ; 49e27
+ call Function6e3
+ and $80
+ jr nz, .asm_49e39
+ hlcoord 0, 14
+ ld b, $2
+ ld c, $12
+ call TextBox
+ ret
+
+.asm_49e39
+ call SpeechTextBox
+ ret
+; 49e3d
+
+
+Function49e3d: ; 49e3d
+ ld a, [wcfcd]
+ and a
+ ret z
+ call Function6e3
+ and $80
+ jp nz, Function49e75
+ call UpdateTime
+ call GetWeekday
+ ld b, a
+ decoord 1, 15
+ call Function49e91
+ decoord 4, 16
+ ld a, [hHours]
+ ld c, a
+ callba PrintHour
+ ld [hl], ":"
+ inc hl
+ ld de, hMinutes
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ ret
+; 49e70
+
+; 49e70
+ db "min.@"
+; 49e75
+
+Function49e75: ; 49e75
+ hlcoord 1, 14
+ ld de, .TimeNotSet
+ call PlaceString
+ ret
+; 49e7f
+
+.TimeNotSet ; 49e7f
+ db "TIME NOT SET@"
+; 49e8c
+
+UnknownText_0x49e8c: ; 49e8c
+ text_jump UnknownText_0x1c5182
+ db "@"
+; 49e91
+
+Function49e91: ; 49e91
+ push de
+ ld hl, .Days
+ ld a, b
+ call GetNthString
+ ld d, h
+ ld e, l
+ pop hl
+ call PlaceString
+ ld h, b
+ ld l, c
+ ld de, .Day
+ call PlaceString
+ ret
+; 49ea8
+
+.Days
+ db "SUN@"
+ db "MON@"
+ db "TUES@"
+ db "WEDNES@"
+ db "THURS@"
+ db "FRI@"
+ db "SATUR@"
+.Day
+ db "DAY@"
+; 49ed0
+
+Function49ed0: ; 49ed0
+ xor a
+ ld [hMapAnims], a
+ call ClearTileMap
+ call LoadFontsExtra
+ call LoadStandardFont
+ call ResetTextRelatedRAM
+ ret
+; 49ee0
+
+
+MainMenu_NewGame: ; 49ee0
+ callba NewGame
+ ret
+; 49ee7
+
+MainMenu_Options: ; 49ee7
+ callba OptionsMenu
+ ret
+; 49eee
+
+MainMenu_Continue: ; 49eee
+ callba Continue
+ ret
+; 49ef5
+
+MainMenu_MysteryGift: ; 49ef5
+ callba MysteryGift
+ ret
+; 49efc
+
+MainMenu_Mobile: ; 49efc
+ call ClearBGPalettes
+ ld a, MUSIC_MOBILE_ADAPTER_MENU
+ ld [wMapMusic], a
+ ld de, MUSIC_MOBILE_ADAPTER_MENU
+ call Function4a6c5
+Function49f0a: ; 49f0a
+ call ClearBGPalettes
+ call Function4a3a7
+ call Function4a492
+ call ClearBGPalettes
+Function49f16: ; 49f16
+ call Function4a071
+ ld c, 12
+ call DelayFrames
+ hlcoord 4, 0
+ ld b, $a
+ ld c, $a
+ call Function48cdc
+ hlcoord 6, 2
+ ld de, MobileString1
+ call PlaceString
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ xor a
+ ld de, String_0x49fe9
+ hlcoord 1, 14
+ call PlaceString
+ call Function3200
+ call SetPalettes
+ call Function1bc9
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+ jr .asm_49f5d
+
+.asm_49f55
+ call Function1bd3
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+
+.asm_49f5d
+ bit 0, a
+ jr nz, .asm_49f67
+ bit 1, a
+ jr nz, .asm_49f84
+ jr .asm_49f97
+
+.asm_49f67
+ ld hl, MenuSelection2
+ ld a, [hl]
+ cp $1
+ jp z, Function4a098
+ cp $2
+ jp z, Function4a0b9
+ cp $3
+ jp z, Function4a0c2
+ cp $4
+ jp z, Function4a100
+ ld a, $1
+ call Function1ff8
+
+.asm_49f84
+ pop bc
+ call ClearBGPalettes
+ call ClearTileMap
+ ld a, MUSIC_MAIN_MENU
+ ld [wMapMusic], a
+ ld de, MUSIC_MAIN_MENU
+ call Function4a6c5
+ ret
+
+.asm_49f97
+ ld hl, MenuSelection2
+ ld a, [hl]
+ dec a
+ ld hl, MobileStrings2
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ jp .asm_49fb7
+
+.asm_49fb7
+ call Function4a071
+ pop bc
+ ld hl, MenuSelection2
+ ld [hl], b
+ ld b, $a
+ ld c, $1
+ hlcoord 5, 1
+ call ClearBox
+ jp .asm_49f55
+; 49fcc
+
+
+MobileString1: ; 49fcc
+ db "めいしフ,ルダー"
+ next "あいさつ"
+ next "プロフィール"
+ next "せ", $1e, "い"
+ next "もどる"
+ db "@"
+; 49fe9
+
+
+MobileStrings2:
+
+String_0x49fe9: ; 49fe9
+ db "めいし¯つくったり"
+ next "ほぞんしておける フ,ルダーです@"
+; 4a004
+
+String_0x4a004: ; 4a004
+ db "モバイルたいせんや じぶんのめいしで"
+ next "つかう あいさつ¯つくります@"
+; 4a026
+
+String_0x4a026: ; 4a026
+ db "あなた%じゅうしょや ねんれいの"
+ next "せ", $1e, "い¯かえられます@"
+; 4a042
+
+String_0x4a042: ; 4a042
+ db "モバイルセンター", $1d, "せつぞくするとき"
+ next "ひつような こと¯きめます@"
+; 4a062
+
+String_0x4a062: ; 4a062
+ db "まえ%がめん ", $1d, "もどります"
+ next "@"
+; 4a071
+
+Function4a071: ; 4a071 (12:6071)
+ ld hl, wcfa1
+ ld a, $2
+ ld [hli], a
+ ld a, $5
+ ld [hli], a
+ ld a, $5
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ add $2
+ ld [hli], a
+ ld a, $1
+rept 2
+ ld [hli], a
+endr
+ ret
+
+Function4a098: ; 4a098 (12:6098)
+ ld a, $2
+ call Function1ff8
+ call Function1bee
+ call WaitBGMap
+ call LoadStandardMenuDataHeader
+ callba Function89de0
+ call Call_ExitMenu
+ call Function49351
+ call Function4a485
+ pop bc
+ jp Function49f16
+
+Function4a0b9: ; 4a0b9 (12:60b9)
+ ld a, $2
+ call Function1ff8
+ pop bc
+ jp Function4a4c4
+
+Function4a0c2: ; 4a0c2 (12:60c2)
+ ld a, $2
+ call Function1ff8
+ ld a, BANK(sPlayerData)
+ call GetSRAMBank
+ ld hl, sPlayerData + PlayerName - wPlayerData
+ ld de, PlayerName
+ ld bc, $6
+ call CopyBytes
+ call CloseSRAM
+ callba Function150b9
+ ld c, 2
+ call DelayFrames
+ ld c, $1
+ call Function4802f
+ push af
+ call ClearBGPalettes
+ pop af
+ and a
+ jr nz, .asm_4a0f9
+ callba Function1509a
+.asm_4a0f9
+ ld c, 5
+ call DelayFrames
+ jr asm_4a111
+
+Function4a100: ; 4a100 (12:6100)
+ ld a, $2
+ call Function1ff8
+ call ClearBGPalettes
+ call Function4a13b
+ call ClearBGPalettes
+ call ClearTileMap
+
+asm_4a111: ; 4a111 (12:6111)
+ pop bc
+ call LoadFontsExtra
+ jp Function49f0a
+
+Function4a118: ; 4a118 (12:6118)
+ ld hl, wcfa1
+ ld a, $1
+ ld [hli], a
+ ld a, $d
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $2
+ ld [hli], a
+ ld a, $1
+rept 2
+ ld [hli], a
+endr
+ ret
+
+Function4a13b: ; 4a13b (12:613b)
+ call Function4a3a7
+ call Function4a492
+ call Function4a373
+ ld c, 10
+ call DelayFrames
+
+Function4a149: ; 4a149 (12:6149)
+ hlcoord 1, 2
+ ld b, $6
+ ld c, $10
+ call Function48cdc
+ hlcoord 3, 4
+ ld de, String_4a1ef
+ call PlaceString
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ ld a, [MenuSelection2]
+ dec a
+ ld hl, Strings_4a23d
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ callba Function104148
+ call SetPalettes
+ call Function1bc9
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+ jr asm_4a19d
+
+Function4a195: ; 4a195 (12:6195)
+ call Function1bd3
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+
+asm_4a19d: ; 4a19d (12:619d)
+ bit 0, a
+ jr nz, .asm_4a1a7
+ bit 1, a
+ jr nz, .asm_4a1ba
+ jr .asm_4a1bc
+.asm_4a1a7
+ ld hl, MenuSelection2
+ ld a, [hl]
+ cp $1
+ jp z, Function4a20e
+ cp $2
+ jp z, Function4a221
+ ld a, $1
+ call Function1ff8
+.asm_4a1ba
+ pop bc
+ ret
+.asm_4a1bc
+ ld hl, MenuSelection2
+ ld a, [hl]
+ dec a
+ ld hl, Strings_4a23d
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ jr .asm_4a1db
+.asm_4a1db
+ call Function4a373
+ pop bc
+ ld hl, MenuSelection2
+ ld [hl], b
+ lb bc, 6, 1
+ hlcoord 2, 3
+ call ClearBox
+ jp Function4a195
+; 4a1ef (12:61ef)
+
+String_4a1ef: ; 4a1ef
+ db "モバイルセンター¯えらぶ"
+ next "ログインパスワード¯いれる"
+ next "もどる@"
+; 4a20e
+
+Function4a20e: ; 4a20e (12:620e)
+ ld a, $1
+ call Function1ff8
+ callba Function1719c8
+ call ClearBGPalettes
+ call DelayFrame
+ jr Function4a239
+
+Function4a221: ; 4a221 (12:6221)
+ ld a, $1
+ call Function1ff8
+ call Function4a28a
+ jr c, Function4a239
+ call Function4a373
+ ld a, $2
+ ld [MenuSelection2], a
+ jr .asm_4a235
+.asm_4a235
+ pop bc
+ jp Function4a149
+
+Function4a239: ; 4a239 (12:6239)
+ pop bc
+ jp Function4a13b
+; 4a23d (12:623d)
+
+Strings_4a23d: ; 4a23d
+ db "いつも せつぞく¯する"
+ next "モバイルセンター¯えらびます@"
+
+ db "モバイルセンター", $1d, "せつぞくするとき"
+ next "つかうパスワード¯ほぞんできます@"
+
+ db "まえ%がめん ", $1d, "もどります@"
+
+ db "@"
+; 4a28a
+
+Function4a28a: ; 4a28a (12:628a)
+ hlcoord 2, 3
+ lb bc, 6, 1
+ ld a, " "
+ call Function4a6d8
+ call Function1bee
+ call WaitBGMap
+ call LoadStandardMenuDataHeader
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa4b]
+ call CloseSRAM
+ and a
+ jr z, .asm_4a2df
+ hlcoord 12, 0
+ ld b, $5
+ ld c, $6
+ call Function48cdc
+ hlcoord 14, 1
+ ld de, String_4a34b
+ call PlaceString
+ callba Function104148
+ call Function4a118
+ call Function1bd3
+ push af
+ call PlayClickSFX
+ pop af
+ bit 1, a
+ jr nz, .asm_4a33b
+ ld a, [MenuSelection2]
+ cp $2
+ jr z, .asm_4a2f0
+ cp $3
+ jr z, .asm_4a33b
+.asm_4a2df
+ callba Function11765d
+ call ClearBGPalettes
+ call Call_ExitMenu
+ call LoadFontsExtra
+ scf
+ ret
+.asm_4a2f0
+ call Function1bee
+ ld hl, UnknownText_0x4a358
+ call PrintText
+ hlcoord 14, 7
+ ld b, $3
+ ld c, $4
+ call TextBox
+ callba Function104148
+ ld hl, MenuDataHeader_0x4a362
+ call LoadMenuDataHeader
+ call InterpretMenu2
+ bit 1, a
+ jr nz, .asm_4a338
+ ld a, [MenuSelection2]
+ cp $2
+ jr z, .asm_4a338
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $aa4b
+ xor a
+ ld bc, $11
+ call ByteFill
+ call CloseSRAM
+ ld hl, UnknownText_0x4a35d
+ call PrintText
+ call JoyWaitAorB
+.asm_4a338
+ call ExitMenu
+.asm_4a33b
+ call Call_ExitMenu
+ callba Function104148
+ xor a
+ ret
+; 4a346 (12:6346)
+
+MenuDataHeader_0x4a346: ; 0x4a346
+ db $40 ; flags
+ db 00, 12 ; start coords
+ db 06, 19 ; end coords
+
+String_4a34b: ; 4a34b
+ db "いれなおす"
+ next "けす"
+ next "もどる@"
+; 4a358
+
+UnknownText_0x4a358: ; 0x4a358
+ ; Delete the saved LOG-IN PASSWORD?
+ text_jump UnknownText_0x1c5196
+ db "@"
+; 0x4a35d
+
+UnknownText_0x4a35d: ; 0x4a35d
+ ; Deleted the LOG-IN PASSWORD.
+ text_jump UnknownText_0x1c51b9
+ db "@"
+; 0x4a362
+
+MenuDataHeader_0x4a362: ; 0x4a362
+ db $40 ; flags
+ db 07, 14 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x4a36a
+ db 2 ; default option
+; 0x4a36a
+
+MenuData2_0x4a36a: ; 0x4a36a
+ db $e0 ; flags
+ db 2 ; items
+ db "はい@"
+ db "いいえ@"
+; 0x4a373
+
+Function4a373: ; 4a373 (12:6373)
+ ld hl, wcfa1
+ ld a, $4
+ ld [hli], a
+ ld a, $2
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ add $2
+ ld [hli], a
+ ld a, $1
+rept 2
+ ld [hli], a
+endr
+ ret
+; 4a39a (12:639a)
+
+Function4a39a: ; 4a39a
+ call Function4a485
+ call Function4a492
+ call Function4a3aa
+ call SetPalettes
+ ret
+; 4a3a7
+
+Function4a3a7: ; 4a3a7 (12:63a7)
+ call Function4a485
+Function4a3aa: ; 4a3aa
+ hlcoord 0, 0
+ lb bc, 3, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 4, 1
+ ld a, $2
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $3
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, " "
+ call Function4a6d8
+ hlcoord 1, 0
+ ld a, $1
+ lb bc, 3, 18
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $0
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $2
+ call Function4a6d8
+ lb bc, 11, 18
+ ld a, " "
+ call Function4a6d8
+ hlcoord 19, 0
+ lb bc, 3, 1
+ ld a, $0
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 4, 1
+ ld a, $2
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $3
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, " "
+ call Function4a6d8
+ ret
+; 4a449 (12:6449)
+
+Function4a449: ; 4a449
+ ld bc, 3 * SCREEN_WIDTH
+ ld a, $0
+ hlcoord 0, 0
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $1
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $0
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $1
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, $2
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, $3
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ ret
+; 4a485
+
+Function4a485: ; 4a485 (12:6485)
+ ld de, GFX_49c0c
+ ld hl, VTiles2 tile $00
+ lb bc, BANK(GFX_49c0c), $d
+ call Get2bpp
+ ret
+
+Function4a492: ; 4a492 (12:6492)
+ call Function4936e
+ ret
+
+
+MainMenu_MobileStudium: ; 4a496
+ ld a, [StartDay]
+ ld b, a
+ ld a, [StartHour]
+ ld c, a
+ ld a, [StartMinute]
+ ld d, a
+ ld a, [StartSecond]
+ ld e, a
+ push bc
+ push de
+ callba MobileStudium
+ call ClearBGPalettes
+ pop de
+ pop bc
+ ld a, b
+ ld [StartDay], a
+ ld a, c
+ ld [StartHour], a
+ ld a, d
+ ld [StartMinute], a
+ ld a, e
+ ld [StartSecond], a
+ ret
+; 4a4c4
+
+
+Function4a4c4: ; 4a4c4 (12:64c4)
+ call ClearBGPalettes
+ call Function4a3a7
+ call Function4a492
+ call Function4a680
+ call ClearBGPalettes
+ ld c, 20
+ call DelayFrames
+ hlcoord 2, 0
+ ld b, $a
+ ld c, $e
+ call Function48cdc
+ hlcoord 4, 2
+ ld de, String_4a5c5
+ call PlaceString
+ hlcoord 4, 4
+ ld de, String_4a5cd
+ call PlaceString
+ hlcoord 4, 6
+ ld de, String_4a5da
+ call PlaceString
+ hlcoord 4, 8
+ ld de, String_4a5e6
+ call PlaceString
+ hlcoord 4, 10
+ ld de, String_4a5f2
+ call PlaceString
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ xor a
+ ld hl, Strings_4a5f6
+ ld d, h
+ ld e, l
+ hlcoord 1, 14
+ call PlaceString
+ ld a, $1
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 16
+ call PlaceString
+ call Function3200
+ call SetPalettes
+ call Function1bc9
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+ jr asm_4a54d
+
+Function4a545: ; 4a545 (12:6545)
+ call Function1bd3
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+
+asm_4a54d: ; 4a54d (12:654d)
+ bit 0, a
+ jr nz, .asm_4a557
+ bit 1, a
+ jr nz, .asm_4a574
+ jr .asm_4a57e
+.asm_4a557
+ ld hl, MenuSelection2
+ ld a, [hl]
+ cp $1
+ jp z, Function4a6ab
+ cp $2
+ jp z, Function4a6ab
+ cp $3
+ jp z, Function4a6ab
+ cp $4
+ jp z, Function4a6ab
+ ld a, $1
+ call Function1ff8
+.asm_4a574
+ pop bc
+ call ClearBGPalettes
+ call ClearTileMap
+ jp Function49f0a
+.asm_4a57e
+ ld hl, MenuSelection2
+ ld a, [hl]
+ dec a
+ add a
+ push af
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ pop af
+ inc a
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 16
+ call PlaceString
+ jp Function4a5b0
+
+Function4a5b0: ; 4a5b0 (12:65b0)
+ call Function4a680
+ pop bc
+ ld hl, MenuSelection2
+ ld [hl], b
+ ld b, $a
+ ld c, $1
+ hlcoord 3, 1
+ call ClearBox
+ jp Function4a545
+; 4a5c5 (12:65c5)
+
+String_4a5c5: ; 4a5c5
+ db "じこしょうかい@"
+String_4a5cd: ; 4a5cd
+ db "たいせん ", $4a, "はじまるとき@"
+String_4a5da: ; 4a5da
+ db "たいせん ", $1d, "かったとき@"
+String_4a5e6: ; 4a5e6
+ db "たいせん ", $1d, "まけたとき@"
+String_4a5f2: ; 4a5f2
+ db "もどる@"
+; 4a5f6
+
+Strings_4a5f6: ; 4a5f6
+ db "めいし や ニュース ", $1d, "のせる@"
+ db "あなた%あいさつです@"
+ db "モバイル たいせん", $4a, "はじまるとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "モバイル たいせんで かったとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "モバイル たいせんで まけたとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "まえ%がめん ", $1d, "もどります@"
+ db "@"
+; 4a680
+
+Function4a680: ; 4a680 (12:6680)
+ ld hl, wcfa1
+ ld a, $2
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $5
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ add $2
+ ld [hli], a
+ ld a, $1
+rept 2
+ ld [hli], a
+endr
+ xor a
+rept 3
+ ld [hli], a
+endr
+ ret
+
+Function4a6ab: ; 4a6ab (12:66ab)
+ ld a, $2
+ call Function1ff8
+ call ClearBGPalettes
+ ld b, SCGB_08
+ call GetSGBLayout
+ callba Function11c1ab
+ pop bc
+ call LoadFontsExtra
+ jp Function4a4c4
+
+Function4a6c5: ; 4a6c5 (12:66c5)
+ ld a, $5
+ ld [MusicFade], a
+ ld a, e
+ ld [MusicFadeIDLo], a
+ ld a, d
+ ld [MusicFadeIDHi], a
+ ld c, 22
+ call DelayFrames
+ ret
+
+Function4a6d8: ; 4a6d8 (12:66d8)
+ push bc
+ push hl
+.asm_4a6da
+ ld [hli], a
+ dec c
+ jr nz, .asm_4a6da
+ pop hl
+ ld bc, $14
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, Function4a6d8
+ ret
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -470,7 +470,7 @@
BuyMenuLoop: ; 15cef
- callba Function24ae8
+ callba PlaceMoneyTopRightOW
call UpdateSprites
ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader
@@ -875,7 +875,7 @@
.okay_to_sell
ld hl, Text_Mart_SellHowMany
call PrintText
- callba Function24af8
+ callba PlaceMoneyTopRightMenu
callba Function24fe1
call ExitMenu
jr c, .declined
@@ -899,7 +899,7 @@
ld hl, Text_Mart_SoldForAmount
call PrintTextBoxText
call PlayTransactionSound
- callba Function24af0
+ callba PlaceMoneyBottomLeftOW
call JoyWaitAorB
.declined
--- a/engine/pokecenter_pc.asm
+++ b/engine/pokecenter_pc.asm
@@ -179,7 +179,7 @@
ret
; 156d9
-Function156d9: ; 156d9
+_KrissHousePC: ; 156d9
call PC_PlayBootSound
ld hl, UnknownText_0x156ff
call PC_DisplayText
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -101,7 +101,7 @@
add_special SpecialCheckPokerus
add_special Special_DisplayCoinCaseBalance
add_special Special_DisplayMoneyAndCoinBalance
- add_special Function24ae8
+ add_special PlaceMoneyTopRightOW
add_special Special_CheckForLuckyNumberWinners
add_special Special_CheckLuckyNumberShowFlag
add_special Special_ResetLuckyNumberShowFlag
@@ -108,7 +108,7 @@
add_special Special_PrintTodaysLuckyNumber
add_special Special_SelectApricornForKurt
add_special SpecialNameRater
- add_special Functionc2da
+ add_special Special_DisplayLinkRecord
add_special GetFirstPokemonHappiness
add_special CheckFirstMonIsEgg
add_special RandomPhoneRareWildMon
@@ -120,15 +120,17 @@
add_special Special_YoungerHaircutBrother
add_special Special_OlderHaircutBrother
add_special Special_DaisyMassage
- add_special Functionc472
+ add_special PlayCurMonCry
add_special ProfOaksPCBoot
add_special SpecialGameboyCheck
add_special SpecialTrainerHouse
add_special PhotoStudio
add_special InitRoamMons
- add_special Functionc48f
- add_special Functionc49f
- add_special Functionc4ac
+ add_special Special_FadeOutMusic
+ add_special Diploma
+ add_special PrintDiploma
+
+ ; Crystal
add_special Function11ac3e
add_special Function11b444
add_special Function11b5e8
@@ -151,7 +153,7 @@
add_special Function101220
add_special Function101225
add_special Function101231
- add_special Function4925b
+ add_special Special_MoveTutor
add_special SpecialOmanyteChamber
add_special Function11c1ab
add_special BattleTowerAction
@@ -292,14 +294,14 @@
Special_UnownPrinter: ; c2cd
call FadeToMenu
- callba Function16be4
+ callba UnownPrinter
call Function2b4d
ret
; c2da
-Functionc2da: ; c2da
+Special_DisplayLinkRecord: ; c2da
call FadeToMenu
- callba Function3f836
+ callba DisplayLinkRecord
call Function2b4d
ret
; c2e7
@@ -307,7 +309,7 @@
Special_KrissHousePC: ; c2e7
xor a
ld [ScriptVar], a
- callba Function156d9
+ callba _KrissHousePC
ld a, c
ld [ScriptVar], a
ret
@@ -586,7 +588,7 @@
db $ff
-Functionc472: ; c472
+PlayCurMonCry: ; c472
ld a, [CurPartySpecies]
jp PlayCry
; c478
@@ -614,7 +616,7 @@
ret
-Functionc48f: ; c48f
+Special_FadeOutMusic: ; c48f
ld a, MUSIC_NONE % $100
ld [MusicFadeIDLo], a
ld a, MUSIC_NONE / $100
@@ -624,16 +626,16 @@
ret
; c49f
-Functionc49f: ; c49f
+Diploma: ; c49f
call FadeToMenu
- callba Function1dd702
+ callba _Diploma
call Function2b4d
ret
; c4ac
-Functionc4ac: ; c4ac
+PrintDiploma: ; c4ac
call FadeToMenu
- callba Function84688
+ callba _PrintDiploma
call Function2b4d
ret
; c4b9
--- /dev/null
+++ b/event/celebi.asm
@@ -1,0 +1,354 @@
+Special_CelebiShrineEvent: ; 4989a
+ call DelayFrame
+ ld a, [VramState]
+ push af
+ xor a
+ ld [VramState], a
+ call LoadCelebiGFX
+ lb de, $07, $50
+ ld a, SPRITE_ANIM_INDEX_2C
+ call _InitSpriteAnimStruct
+ ld hl, $3
+ add hl, bc
+ ld [hl], $84
+ ld hl, $2
+ add hl, bc
+ ld [hl], $1f
+ ld hl, $f
+ add hl, bc
+ ld a, $80
+ ld [hl], a
+ ld a, $a0
+ ld [wcf64], a
+ ld d, $0
+.loop
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .done
+ push bc
+ call Function49bae
+ inc d
+ push de
+ ld a, $90
+ ld [wc3b5], a
+ callba Function8cf7a
+ call Function49935
+ ld c, 2
+ call DelayFrames
+ pop de
+ pop bc
+ jr .loop
+
+.done
+ pop af
+ ld [VramState], a
+ call Function498f9
+ call Function49bf3
+ ret
+; 498f9
+
+Function498f9: ; 498f9
+ ld hl, Sprites + 2
+ xor a
+ ld c, $4
+.loop
+ ld [hli], a
+rept 3
+ inc hl
+endr
+ inc a
+ dec c
+ jr nz, .loop
+ ld hl, Sprites + $10
+ ld bc, $90
+ xor a
+ call ByteFill
+ ret
+; 49912
+
+LoadCelebiGFX: ; 49912
+ callba Function8cf53
+ ld de, SpecialCelebiLeafGFX
+ ld hl, VTiles1
+ lb bc, BANK(SpecialCelebiLeafGFX), 4
+ call Request2bpp
+ ld de, SpecialCelebiGFX
+ ld hl, VTiles1 tile $04
+ lb bc, BANK(SpecialCelebiGFX), $10
+ call Request2bpp
+ xor a
+ ld [wJumptableIndex], a
+ ret
+; 49935
+
+Function49935: ; 49935
+ ld hl, wcf64
+ ld a, [hl]
+ and a
+ jr z, .asm_4993e
+ dec [hl]
+ ret
+
+.asm_4993e
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+; 49944
+
+Function49944: ; 49944
+ ld hl, wcf65
+ ld a, [hl]
+ inc [hl]
+ and $7
+ ret nz
+ ld a, [hl]
+ and $18
+ sla a
+ add $40
+ ld d, a
+ ld e, $0
+ ld a, SPRITE_ANIM_INDEX_18 ; fly land
+ call _InitSpriteAnimStruct
+ ld hl, $3
+ add hl, bc
+ ld [hl], $80
+ ret
+; 49962
+
+SpecialCelebiLeafGFX: ; 49962
+INCBIN "gfx/special/celebi/leaf.2bpp"
+SpecialCelebiGFX: ; 499a2
+INCBIN "gfx/special/celebi/1.2bpp"
+INCBIN "gfx/special/celebi/2.2bpp"
+INCBIN "gfx/special/celebi/3.2bpp"
+INCBIN "gfx/special/celebi/4.2bpp"
+
+
+Function49aa2: ; 49aa2 (12:5aa2)
+ ld hl, $6
+ add hl, bc
+ ld a, [hl]
+ push af
+ ld hl, $5
+ add hl, bc
+ ld a, [hl]
+ cp $52
+ jp nc, Function49b30
+ ld hl, $5
+ add hl, bc
+ inc [hl]
+ ld hl, $f
+ add hl, bc
+ ld a, [hl]
+ ld d, a
+ cp $3a
+ jr c, .asm_49ac6
+ jr z, .asm_49ac6
+ sub $3
+ ld [hl], a
+.asm_49ac6
+ ld hl, $e
+ add hl, bc
+ ld a, [hl]
+ inc [hl]
+ call Function49b3b
+ ld hl, $6
+ add hl, bc
+ ld [hl], a
+ ld d, a
+ ld hl, $4
+ add hl, bc
+ add [hl]
+ cp $5c
+ jr nc, .asm_49ae2
+ cp $44
+ jr nc, .asm_49b0d
+.asm_49ae2
+ pop af
+ push af
+ cp d
+ jr nc, .asm_49af2
+ ld hl, $4
+ add hl, bc
+ add [hl]
+ cp $50
+ jr c, .asm_49b05
+ jr .asm_49afb
+.asm_49af2
+ ld hl, $4
+ add hl, bc
+ add [hl]
+ cp $50
+ jr nc, .asm_49b05
+.asm_49afb
+ ld hl, $5
+ add hl, bc
+ ld a, [hl]
+ sub $2
+ ld [hl], a
+ jr .asm_49b0d
+.asm_49b05
+ ld hl, $5
+ add hl, bc
+ ld a, [hl]
+ add $1
+ ld [hl], a
+.asm_49b0d
+ pop af
+ ld hl, $4
+ add hl, bc
+ add [hl]
+ cp $50
+ jr c, .asm_49b26
+ cp $e6
+ jr nc, .asm_49b26
+ ld hl, $1
+ add hl, bc
+ ld a, $41
+ call Function3b3c
+ jr .asm_49b2f
+.asm_49b26
+ ld hl, $1
+ add hl, bc
+ ld a, $40
+ call Function3b3c
+.asm_49b2f
+ ret
+
+Function49b30: ; 49b30 (12:5b30)
+ pop af
+ ld hl, $1
+ add hl, bc
+ ld a, $40
+ call Function3b3c
+ ret
+
+Function49b3b: ; 49b3b (12:5b3b)
+ add $10
+ and $3f
+ cp $20
+ jr nc, .asm_49b48
+ call Function49b52
+ ld a, h
+ ret
+.asm_49b48
+ and $1f
+ call Function49b52
+ ld a, h
+ xor $ff
+ inc a
+ ret
+
+Function49b52: ; 49b52 (12:5b52)
+ ld e, a
+ ld a, d
+ ld d, $0
+ ld hl, Unknown_49b6e
+rept 2
+ add hl, de
+endr
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, 0
+.asm_49b61
+ srl a
+ jr nc, .asm_49b66
+ add hl, de
+.asm_49b66
+ sla e
+ rl d
+ and a
+ jr nz, .asm_49b61
+ ret
+; 49b6e (12:5b6e)
+
+Unknown_49b6e: ; 49b6e
+ sine_wave $100
+; 49bae
+
+Function49bae: ; 49bae
+ push hl
+ push bc
+ push de
+ ld a, d
+ ld d, $3
+ ld e, d
+ cp $0
+ jr z, .asm_49bd0
+ cp d
+ jr z, .asm_49bd4
+ call Function49bed
+ cp d
+ jr z, .asm_49bd8
+ call Function49bed
+ cp d
+ jr z, .asm_49bdc
+ call Function49bed
+ cp d
+ jr c, .asm_49be9
+ jr .asm_49be5
+
+.asm_49bd0
+ ld a, $84
+ jr .asm_49bde
+
+.asm_49bd4
+ ld a, $88
+ jr .asm_49bde
+
+.asm_49bd8
+ ld a, $8c
+ jr .asm_49bde
+
+.asm_49bdc
+ ld a, $90
+
+.asm_49bde
+ ld hl, $3
+ add hl, bc
+ ld [hl], a
+ jr .asm_49be9
+
+.asm_49be5
+ pop de
+ ld d, $ff
+ push de
+
+.asm_49be9
+ pop de
+ pop bc
+ pop hl
+ ret
+; 49bed
+
+Function49bed: ; 49bed
+ push af
+ ld a, d
+ add e
+ ld d, a
+ pop af
+ ret
+; 49bf3
+
+Function49bf3: ; 49bf3
+ ld a, BATTLETYPE_CELEBI
+ ld [BattleType], a
+ ret
+; 49bf9
+
+Function49bf9: ; 49bf9
+ ld a, [wBattleResult]
+ bit 6, a
+ jr z, .asm_49c07
+ ld a, $1
+ ld [ScriptVar], a
+ jr .asm_49c0b
+
+.asm_49c07
+ xor a
+ ld [ScriptVar], a
+
+.asm_49c0b
+ ret
+; 49c0c
--- /dev/null
+++ b/event/photo.asm
@@ -1,0 +1,299 @@
+UnownPrinter: ; 16be4
+ ld a, [UnownDex]
+ and a
+ ret z
+
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ ld a, [Options]
+ push af
+ set NO_TEXT_SCROLL, a
+ ld [Options], a
+ call ClearBGPalettes
+ call ClearTileMap
+
+ ld de, UnownDexATile
+ ld hl, VTiles1 tile $6f
+ lb bc, BANK(UnownDexBTile), 1
+ call Request1bpp
+
+ ld de, UnownDexBTile
+ ld hl, VTiles1 tile $75
+ lb bc, BANK(UnownDexBTile), 1
+ call Request1bpp
+
+ hlcoord 0, 0
+ lb bc, 3, 18
+ call TextBox
+
+ hlcoord 0, 5
+ lb bc, 7, 7
+ call TextBox
+
+ hlcoord 0, 14
+ lb bc, 2, 18
+ call TextBox
+
+ hlcoord 1, 2
+ ld de, AlphRuinsStampString
+ call PlaceString
+
+ hlcoord 1, 16
+ ld de, UnownDexDoWhatString
+ call PlaceString
+
+ hlcoord 10, 6
+ ld de, UnownDexMenuString
+ call PlaceString
+
+ xor a
+ ld [wJumptableIndex], a
+ call Function16cc8
+ call WaitBGMap
+
+ ld a, UNOWN
+ ld [CurPartySpecies], a
+ xor a
+ ld [TempMonDVs], a
+ ld [TempMonDVs + 1], a
+
+ ld b, SCGB_1C
+ call GetSGBLayout
+ call SetPalettes
+
+.joy_loop
+ call JoyTextDelay
+
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jr nz, .pressed_b
+
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jr nz, .pressed_a
+
+ call Function16ca0
+ call DelayFrame
+ jr .joy_loop
+
+.pressed_a
+ ld a, [wJumptableIndex]
+ push af
+ callba Function84560
+ call RestartMapMusic
+ pop af
+ ld [wJumptableIndex], a
+ jr .joy_loop
+
+.pressed_b
+ pop af
+ ld [Options], a
+ pop af
+ ld [hInMenu], a
+ call ReturnToMapFromSubmenu
+ ret
+; 16ca0
+
+Function16ca0: ; 16ca0
+ ld a, [hJoyLast]
+ and D_RIGHT
+ jr nz, .press_right
+ ld a, [hJoyLast]
+ and D_LEFT
+ jr nz, .press_left
+ ret
+
+.press_left
+ ld hl, wJumptableIndex
+ ld a, [hl]
+ and a
+ jr nz, .wrap_around_left
+ ld [hl], $1b
+
+.wrap_around_left
+ dec [hl]
+ jr .return
+
+.press_right
+ ld hl, wJumptableIndex
+ ld a, [hl]
+ cp $1a
+ jr c, .wrap_around_right
+ ld [hl], $ff
+
+.wrap_around_right
+ inc [hl]
+
+.return
+ call Function16cc8
+ ret
+; 16cc8
+
+Function16cc8: ; 16cc8
+ ld a, [wJumptableIndex]
+ cp 26
+ jr z, Function16d20
+ inc a
+ ld [UnownLetter], a
+ ld a, UNOWN
+ ld [CurPartySpecies], a
+ xor a
+ ld [wc2c6], a
+ ld de, VTiles2
+ predef GetFrontpic
+ call Function16cff
+ hlcoord 1, 6
+ xor a
+ ld [hFillBox], a
+ lb bc, 7, 7
+ predef FillBox
+ ld de, VTiles2 tile $31
+ callba Functione0000
+ ret
+; 16cff
+
+Function16cff: ; 16cff
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+
+ ld a, BANK(sScratch)
+ call GetSRAMBank
+ ld de, w6_d000
+ ld hl, sScratch
+ ld a, [hROMBank]
+ ld b, a
+ ld c, $31
+ call Get2bpp
+ call CloseSRAM
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 16d20
+
+Function16d20: ; 16d20
+ hlcoord 1, 6
+ lb bc, 7, 7
+ call ClearBox
+ hlcoord 1, 9
+ ld de, UnownDexVacantString
+ call PlaceString
+ xor a
+ call GetSRAMBank
+ ld hl, sScratch
+ ld bc, $31 tiles
+ xor a
+ call ByteFill
+ ld hl, VTiles2 tile $31
+ ld de, sScratch
+ ld c, $31
+ ld a, [hROMBank]
+ ld b, a
+ call Get2bpp
+ call CloseSRAM
+ ld c, 20
+ call DelayFrames
+ ret
+; 16d57
+
+AlphRuinsStampString:
+ db " ALPH RUINS STAMP@"
+
+UnownDexDoWhatString:
+ db "Do what?@"
+
+UnownDexMenuString:
+ db "♂ PRINT"
+ next "♀ CANCEL"
+ next "← PREVIOUS"
+ next "→ NEXT"
+ db "@"
+
+UnownDexVacantString:
+ db "VACANT@"
+; 16d9c
+
+UnownDexATile: ; 16d9c
+INCBIN "gfx/unknown/016d9c.1bpp"
+UnownDexBTile: ; 16da4
+INCBIN "gfx/unknown/016da4.1bpp"
+; 16dac
+
+Function16dac: ; 16dac
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, " "
+ call ByteFill
+ hlcoord 7, 11
+ ld a, $31
+ ld [hFillBox], a
+ lb bc, 7, 7
+ predef FillBox
+ ret
+; 16dc7
+
+PhotoStudio: ; 16dc7
+ ld hl, .Text_AskWhichMon
+ call PrintText
+ callba SelectMonFromParty
+ jr c, .cancel
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+
+ ld hl, .Text_HoldStill
+ call PrintText
+ call DisableSpriteUpdates
+ callba Function8461a
+ call Function2b74
+ ld a, [$ffac]
+ and a
+ jr nz, .cancel
+ ld hl, .Text_Presto
+ jr .print_text
+
+.cancel
+ ld hl, .Text_NoPicture
+ jr .print_text
+
+.egg
+ ld hl, .Text_Egg
+
+.print_text
+ call PrintText
+ ret
+; 16e04
+
+.Text_AskWhichMon: ; 0x16e04
+ ; Which #MON should I photo- graph?
+ text_jump UnknownText_0x1be024
+ db "@"
+; 0x16e09
+
+.Text_HoldStill: ; 0x16e09
+ ; All righty. Hold still for a bit.
+ text_jump UnknownText_0x1be047
+ db "@"
+; 0x16e0e
+
+.Text_Presto: ; 0x16e0e
+ ; Presto! All done. Come again, OK?
+ text_jump UnknownText_0x1be06a
+ db "@"
+; 0x16e13
+
+.Text_NoPicture: ; 0x16e13
+ ; Oh, no picture? Come again, OK?
+ text_jump UnknownText_0x1c0000
+ db "@"
+; 0x16e18
+
+.Text_Egg: ; 0x16e18
+ ; An EGG? My talent is worth more…
+ text_jump UnknownText_0x1c0021
+ db "@"
+; 0x16e1d
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -312,7 +312,7 @@
ret
; 3ca8
-FadeOutMusic:: ; 3ca8
+Unused_FadeOutMusic:: ; 3ca8
ld a, 4
ld [MusicFade], a
ret
--- a/main.asm
+++ b/main.asm
@@ -11491,306 +11491,8 @@
INCLUDE "event/daycare.asm"
-Function16be4: ; 16be4
- ld a, [UnownDex]
- and a
- ret z
+INCLUDE "event/photo.asm"
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- ld a, [Options]
- push af
- set NO_TEXT_SCROLL, a
- ld [Options], a
- call ClearBGPalettes
- call ClearTileMap
-
- ld de, UnownDexATile
- ld hl, VTiles1 tile $6f
- lb bc, BANK(UnownDexBTile), 1
- call Request1bpp
-
- ld de, UnownDexBTile
- ld hl, VTiles1 tile $75
- lb bc, BANK(UnownDexBTile), 1
- call Request1bpp
-
- hlcoord 0, 0
- lb bc, 3, 18
- call TextBox
-
- hlcoord 0, 5
- lb bc, 7, 7
- call TextBox
-
- hlcoord 0, 14
- lb bc, 2, 18
- call TextBox
-
- hlcoord 1, 2
- ld de, AlphRuinsStampString
- call PlaceString
-
- hlcoord 1, 16
- ld de, UnownDexDoWhatString
- call PlaceString
-
- hlcoord 10, 6
- ld de, UnownDexMenuString
- call PlaceString
-
- xor a
- ld [wJumptableIndex], a
- call Function16cc8
- call WaitBGMap
-
- ld a, UNOWN
- ld [CurPartySpecies], a
- xor a
- ld [TempMonDVs], a
- ld [TempMonDVs + 1], a
-
- ld b, SCGB_1C
- call GetSGBLayout
- call SetPalettes
-
-.joy_loop
- call JoyTextDelay
-
- ld a, [hJoyPressed]
- and B_BUTTON
- jr nz, .pressed_b
-
- ld a, [hJoyPressed]
- and A_BUTTON
- jr nz, .pressed_a
-
- call Function16ca0
- call DelayFrame
- jr .joy_loop
-
-.pressed_a
- ld a, [wJumptableIndex]
- push af
- callba Function84560
- call RestartMapMusic
- pop af
- ld [wJumptableIndex], a
- jr .joy_loop
-
-.pressed_b
- pop af
- ld [Options], a
- pop af
- ld [hInMenu], a
- call ReturnToMapFromSubmenu
- ret
-; 16ca0
-
-Function16ca0: ; 16ca0
- ld a, [hJoyLast]
- and D_RIGHT
- jr nz, .press_right
- ld a, [hJoyLast]
- and D_LEFT
- jr nz, .press_left
- ret
-
-.press_left
- ld hl, wJumptableIndex
- ld a, [hl]
- and a
- jr nz, .wrap_around_left
- ld [hl], $1b
-
-.wrap_around_left
- dec [hl]
- jr .return
-
-.press_right
- ld hl, wJumptableIndex
- ld a, [hl]
- cp $1a
- jr c, .wrap_around_right
- ld [hl], $ff
-
-.wrap_around_right
- inc [hl]
-
-.return
- call Function16cc8
- ret
-; 16cc8
-
-Function16cc8: ; 16cc8
- ld a, [wJumptableIndex]
- cp 26
- jr z, Function16d20
- inc a
- ld [UnownLetter], a
- ld a, UNOWN
- ld [CurPartySpecies], a
- xor a
- ld [wc2c6], a
- ld de, VTiles2
- predef GetFrontpic
- call Function16cff
- hlcoord 1, 6
- xor a
- ld [hFillBox], a
- lb bc, 7, 7
- predef FillBox
- ld de, VTiles2 tile $31
- callba Functione0000
- ret
-; 16cff
-
-Function16cff: ; 16cff
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
-
- ld a, BANK(sScratch)
- call GetSRAMBank
- ld de, w6_d000
- ld hl, sScratch
- ld a, [hROMBank]
- ld b, a
- ld c, $31
- call Get2bpp
- call CloseSRAM
-
- pop af
- ld [rSVBK], a
- ret
-; 16d20
-
-Function16d20: ; 16d20
- hlcoord 1, 6
- lb bc, 7, 7
- call ClearBox
- hlcoord 1, 9
- ld de, UnownDexVacantString
- call PlaceString
- xor a
- call GetSRAMBank
- ld hl, sScratch
- ld bc, $31 tiles
- xor a
- call ByteFill
- ld hl, VTiles2 tile $31
- ld de, sScratch
- ld c, $31
- ld a, [hROMBank]
- ld b, a
- call Get2bpp
- call CloseSRAM
- ld c, 20
- call DelayFrames
- ret
-; 16d57
-
-AlphRuinsStampString:
- db " ALPH RUINS STAMP@"
-
-UnownDexDoWhatString:
- db "Do what?@"
-
-UnownDexMenuString:
- db "♂ PRINT"
- next "♀ CANCEL"
- next "← PREVIOUS"
- next "→ NEXT"
- db "@"
-
-UnownDexVacantString:
- db "VACANT@"
-; 16d9c
-
-UnownDexATile: ; 16d9c
-INCBIN "gfx/unknown/016d9c.1bpp"
-UnownDexBTile: ; 16da4
-INCBIN "gfx/unknown/016da4.1bpp"
-; 16dac
-
-Function16dac: ; 16dac
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, " "
- call ByteFill
- hlcoord 7, 11
- ld a, $31
- ld [hFillBox], a
- lb bc, 7, 7
- predef FillBox
- ret
-; 16dc7
-
-PhotoStudio: ; 16dc7
- ld hl, .Text_AskWhichMon
- call PrintText
- callba SelectMonFromParty
- jr c, .cancel
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
-
- ld hl, .Text_HoldStill
- call PrintText
- call DisableSpriteUpdates
- callba Function8461a
- call Function2b74
- ld a, [$ffac]
- and a
- jr nz, .cancel
- ld hl, .Text_Presto
- jr .print_text
-
-.cancel
- ld hl, .Text_NoPicture
- jr .print_text
-
-.egg
- ld hl, .Text_Egg
-
-.print_text
- call PrintText
- ret
-; 16e04
-
-.Text_AskWhichMon: ; 0x16e04
- ; Which #MON should I photo- graph?
- text_jump UnknownText_0x1be024
- db "@"
-; 0x16e09
-
-.Text_HoldStill: ; 0x16e09
- ; All righty. Hold still for a bit.
- text_jump UnknownText_0x1be047
- db "@"
-; 0x16e0e
-
-.Text_Presto: ; 0x16e0e
- ; Presto! All done. Come again, OK?
- text_jump UnknownText_0x1be06a
- db "@"
-; 0x16e13
-
-.Text_NoPicture: ; 0x16e13
- ; Oh, no picture? Come again, OK?
- text_jump UnknownText_0x1c0000
- db "@"
-; 0x16e18
-
-.Text_Egg: ; 0x16e18
- ; An EGG? My talent is worth more…
- text_jump UnknownText_0x1c0021
- db "@"
-; 0x16e1d
-
INCLUDE "engine/breeding/egg.asm"
SECTION "Tileset Data 1", ROMX, BANK[TILESETS_1]
@@ -13076,17 +12778,17 @@
ret
; 0x24ae8
-Function24ae8: ; 24ae8
+PlaceMoneyTopRightOW: ; 24ae8
ld hl, MenuDataHeader_0x24b15
call CopyMenuDataHeader
jr Function24b01
-Function24af0: ; 24af0
+PlaceMoneyBottomLeftOW: ; 24af0
ld hl, MenuDataHeader_0x24b1d
call CopyMenuDataHeader
jr Function24b01
-Function24af8: ; 24af8
+PlaceMoneyTopRightMenu: ; 24af8
ld hl, MenuDataHeader_0x24b15
ld de, $b
call Function1e2e
@@ -20847,7 +20549,7 @@
ld [wd478], a
ld [wd002], a
ld [wd003], a
- ; could have done "ld a, [wd479] \ and -4", saved four operations
+ ; could have done "ld a, [wd479] \ and %11111100", saved four operations
ld a, [wd479]
res 0, a
ld [wd479], a
@@ -20857,1837 +20559,8 @@
ret
; 4802f
+INCLUDE "misc/mobile_12.asm"
-Function4802f: ; 4802f (12:402f)
- xor a
- set 6, a
- ld [wd002], a
- ld hl, wd003
- set 0, [hl]
- ld a, c
- and a
- call z, Function48000
- call ClearBGPalettes
- call Function48d3d
- ld a, [wd479]
- bit 1, a
- jr z, .asm_4805a
- ld a, [wd003]
- set 0, a
- set 1, a
- set 2, a
- set 3, a
- ld [wd003], a
-.asm_4805a
- call Function486bf
- call LoadFontsExtra
- ld de, GFX_488c3
- ld hl, VTiles2 tile $10
- lb bc, BANK(GFX_488c3), 1
- call Request1bpp
- ld de, GFX_488cb
- ld hl, VTiles2 tile $11
- lb bc, BANK(GFX_488cb), 1
- call Request1bpp
- call Function4a3a7
- call ClearBGPalettes
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4808a
- call Function48689
- jr .asm_480d7
-.asm_4808a
- ld a, $5
- ld [MusicFade], a
- ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
- ld [MusicFadeIDLo], a
- ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
- ld [MusicFadeIDHi], a
- ld c, 20
- call DelayFrames
- ld b, $1
- call Function4930f
- call ClearBGPalettes
- hlcoord 0, 0
- ld b, $2
- ld c, $14
- call ClearBox
- hlcoord 0, 1
- ld a, $c
- ld [hl], a
- ld bc, $13
- add hl, bc
- ld [hl], a
- ld de, MobileProfileString
- hlcoord 1, 1
- call PlaceString
- hlcoord 0, 2
- ld b, $a
- ld c, $12
- call Function48cdc
- hlcoord 2, 4
- ld de, String_48482
- call PlaceString
-.asm_480d7
- hlcoord 2, 6
- ld de, String_48489
- call PlaceString
- hlcoord 2, 8
- ld de, String_4848d
- call PlaceString
- hlcoord 2, 10
- ld de, String_48495
- call PlaceString
- hlcoord 2, 12
- ld de, String_4849e
- call PlaceString
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_48113
- ld a, [PlayerGender]
- ld hl, Strings_484fb
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 11, 4
- call PlaceString
-.asm_48113
- hlcoord 11, 6
- call Function487ec
- ld a, [wd474]
- dec a
- ld hl, Prefectures
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 11, 8
- call PlaceString
- hlcoord 11, 10
- call Function489ea
- hlcoord 0, 14
- ld b, $2
- ld c, $12
- call TextBox
- hlcoord 1, 16
- ld de, String_48275
- call PlaceString
- call Function48187
- call Function3200
- call SetPalettes
- call Function1bc9
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
- jr asm_4815f
-
-Function48157: ; 48157 (12:4157)
- call Function1bd3
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
-
-asm_4815f: ; 4815f (12:415f)
- bit 0, a
- jp nz, Function4820d
- ld b, a
- ld a, [wd002]
- bit 6, a
- jr z, .asm_48177
- ld hl, wd479
- bit 1, [hl]
- jr z, .asm_48177
- bit 1, b
- jr nz, .asm_4817a
-.asm_48177
- jp Function48272
-.asm_4817a
- call ClearBGPalettes
- call Function48d30
- pop bc
- call ClearTileMap
- ld a, $ff
- ret
-
-Function48187: ; 48187 (12:4187)
- ld a, [wd479]
- bit 1, a
- jr nz, .asm_481f1
- ld a, [wd003]
- ld d, a
- call Function48725
- jr c, .asm_481a2
- lb bc, 1, 4
- hlcoord 2, 12
- call ClearBox
- jr .asm_481ad
-.asm_481a2
- push de
- hlcoord 2, 12
- ld de, String_4849e
- call PlaceString
- pop de
-.asm_481ad
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_481c1
- bit 0, d
- jr nz, .asm_481c1
- lb bc, 1, 8
- hlcoord 11, 4
- call ClearBox
-.asm_481c1
- bit 1, d
- jr nz, .asm_481ce
- lb bc, 1, 8
- hlcoord 11, 6
- call ClearBox
-.asm_481ce
- bit 2, d
- jr nz, .asm_481db
- lb bc, 2, 8
- hlcoord 11, 7
- call ClearBox
-.asm_481db
- bit 3, d
- jr nz, .asm_481f1
- ld a, [wd479]
- bit 0, a
- jr nz, .asm_481f8
- lb bc, 1, 8
- hlcoord 11, 10
- call ClearBox
- jr .asm_48201
-.asm_481f1
- ld a, [wd479]
- bit 0, a
- jr nz, .asm_48201
-.asm_481f8
- hlcoord 11, 10
- ld de, String_48202
- call PlaceString
-.asm_48201
- ret
-; 48202 (12:4202)
-
-String_48202: ; 48202
- db "Tell Later@"
-; 4820d
-
-Function4820d: ; 4820d (12:420d)
- call Function1bee
- ld hl, MenuSelection2
- ld a, [hl]
- push af
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4821f
- pop af
- inc a
- push af
-.asm_4821f
- pop af
- cp $1
- jr z, asm_4828d
- cp $2
- jp z, Function4876f
- cp $3
- jp z, Function48304
- cp $4
- jp z, Function488d3
- ld a, $2
- call Function1ff8
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4825c
- jr .asm_4825c
-; 48241 (12:4241)
-
- hlcoord 1, 15
- ld b, $2
- ld c, $12
- call ClearBox
- ld de, String_484a1
- hlcoord 1, 16
- call PlaceString
- call WaitBGMap
- ld c, 48
- call DelayFrames
-
-.asm_4825c
- call ClearBGPalettes
- call Function48d30
- pop bc
- call ClearTileMap
- ld b, SCGB_08
- call GetSGBLayout
- ld hl, wd479
- set 1, [hl]
- xor a
- ret
-
-Function48272: ; 48272 (12:4272)
- jp Function4840c
-; 48275 (12:4275)
-
-String_48275: ; 48275
- db "Personal Info@"
-; 48283
-
-Function48283: ; 48283 (12:4283)
- lb bc, 2, 18
- hlcoord 1, 15
- call ClearBox
- ret
-
-asm_4828d: ; 4828d (12:428d)
- call Function48283
- hlcoord 1, 16
- ld de, String_484b1
- call PlaceString
- ld hl, MenuDataHeader_0x484f1
- call LoadMenuDataHeader
- call Function4873c
- hlcoord 11, 2
- ld b, $4
- ld c, $7
- call Function48cdc
- hlcoord 13, 4
- ld de, String_484fb
- call PlaceString
- hlcoord 13, 6
- ld de, String_484ff
- call PlaceString
- call WaitBGMap
- ld a, [PlayerGender]
- inc a
- ld [wMenuCursorBuffer], a
- call Function1bc9
- call PlayClickSFX
- call ExitMenu
- bit 0, a
- jp z, Function4840c
- ld hl, MenuSelection2
- ld a, [hl]
- ld hl, Strings_484fb
- cp $1
- jr z, .asm_482ed
-.asm_482e1
- ld a, [hli]
- cp $50
- jr nz, .asm_482e1
- ld a, $1
- ld [PlayerGender], a
- jr .asm_482f1
-.asm_482ed
- xor a
- ld [PlayerGender], a
-.asm_482f1
- ld d, h
- ld e, l
- hlcoord 11, 4
- call PlaceString
- ld a, [wd003]
- set 0, a
- ld [wd003], a
- jp Function4840c
-
-Function48304: ; 48304 (12:4304)
- call Function48283
- hlcoord 1, 16
- ld de, String_484cf
- call PlaceString
- ld hl, MenuDataHeader_0x48504
- call LoadMenuDataHeader
- ld hl, MenuDataHeader_0x48513
- call LoadMenuDataHeader
- hlcoord 10, 0
- ld b, $c
- ld c, $8
- call Function48cdc
- ld a, [wMenuCursorBuffer]
- ld b, a
- ld a, [wd0e4]
- ld c, a
- push bc
- ld a, [wd474]
- dec a
- cp $29
- jr c, .asm_4833f
- sub $29
- inc a
- ld [wMenuCursorBuffer], a
- ld a, $29
-.asm_4833f
- ld [wd0e4], a
- callba Function104148
-.asm_48348
- call HandleScrollingMenu
- ld de, $629
- call Function48383
- jr c, .asm_48348
- ld d, a
- pop bc
- ld a, b
- ld [wMenuCursorBuffer], a
- ld a, c
- ld [wd0e4], a
- ld a, d
- push af
- call ExitMenu
- call ExitMenu
- pop af
- ld a, [hJoyPressed]
- bit 0, a
- jr z, .asm_48377
- call Function483bb
- ld a, [wd003]
- set 2, a
- ld [wd003], a
-.asm_48377
- call Function48187
- callba Function104148
- jp Function4840c
-
-Function48383: ; 48383 (12:4383)
- push bc
- push af
- bit 5, a
- jr nz, .asm_48390
- bit 4, a
- jr nz, .asm_4839f
- and a
- jr .asm_483b7
-.asm_48390
- ld a, [wd0e4]
- sub d
- ld [wd0e4], a
- jr nc, .asm_483af
- xor a
- ld [wd0e4], a
- jr .asm_483af
-.asm_4839f
- ld a, [wd0e4]
- add d
- ld [wd0e4], a
- cp e
- jr c, .asm_483af
- ld a, e
- ld [wd0e4], a
- jr .asm_483af
-.asm_483af
- ld hl, MenuSelection2
- ld a, [hl]
- ld [wMenuCursorBuffer], a
- scf
-.asm_483b7
- pop bc
- ld a, b
- pop bc
- ret
-
-Function483bb: ; 483bb (12:43bb)
- ld hl, wcf77
- ld a, [hl]
- inc a
- ld [wd474], a
- dec a
- ld b, a
- ld hl, Prefectures
-.asm_483c8
- and a
- jr z, .asm_483d5
-.asm_483cb
- ld a, [hli]
- cp "@"
- jr nz, .asm_483cb
- ld a, b
- dec a
- ld b, a
- jr .asm_483c8
-.asm_483d5
- ld d, h
- ld e, l
- ld b, $2
- ld c, $8
- hlcoord 11, 7
- call ClearBox
- hlcoord 11, 8
- call PlaceString
- ret
-; 483e8 (12:43e8)
-
-Function483e8: ; 483e8
- push de
- ld hl, Prefectures
- ld a, [MenuSelection]
- cp $ff
- jr nz, .asm_483f8
- ld hl, Wakayama ; last string
- jr .asm_48405
-
-.asm_483f8
- ld d, a
- and a
- jr z, .asm_48405
-.asm_483fc
- ld a, [hli]
- cp "@"
- jr nz, .asm_483fc
- ld a, d
- dec a
- jr .asm_483f8
-
-.asm_48405
- ld d, h
- ld e, l
- pop hl
- call PlaceString
- ret
-; 4840c
-
-Function4840c: ; 4840c (12:440c)
- call Function48187
- call Function48283
- hlcoord 1, 16
- ld de, String_48275
- call PlaceString
- call Function486bf
- pop bc
- ld hl, MenuSelection2
- ld [hl], b
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_48437
- ld b, $9
- ld c, $1
- hlcoord 1, 4
- call ClearBox
- jp Function48157
-.asm_48437
- ld b, $7
- ld c, $1
- hlcoord 1, 6
- call ClearBox
- jp Function48157
-
-Function48444: ; 48444 (12:4444)
- push bc
- push af
- push de
- push hl
- ld hl, Unknown_4845d
-.asm_4844b
- and a
- jr z, .asm_48453
-rept 2
- inc hl
-endr
- dec a
- jr .asm_4844b
-.asm_48453
- ld d, h
- ld e, l
- pop hl
- call PlaceString
- pop de
- pop af
- pop bc
- ret
-; 4845d (12:445d)
-
-Unknown_4845d: ; 4845d
-; 4845d
- db "0@"
- db "1@"
- db "2@"
- db "3@"
- db "4@"
- db "5@"
- db "6@"
- db "7@"
- db "8@"
- db "9@"
-; 48471
-
-MobileProfileString: db " Mobile Profile@"
-String_48482: db "Gender@"
-String_48489: db "Age@"
-String_4848d: db "Address@"
-String_48495: db "Zip Code@"
-String_4849e: db "OK@"
-String_484a1: db "Profile Changed@"
-String_484b1: db "Boy or girl?@"
-String_484be: db "How old are you?@"
-String_484cf: db "Where do you live?@"
-String_484e2: db "Your zip code?@"
-; 484f1
-
-MenuDataHeader_0x484f1: ; 0x484f1
- db $40 ; flags
- db 02, 11 ; start coords
- db 07, 19 ; end coords
- dw MenuData2_0x484f9
- db 1 ; default option
-; 0x484f9
-
-MenuData2_0x484f9: ; 0x484f9
- db $a0 ; flags
- db 2 ; items
-Strings_484fb:
-String_484fb: db "Boy@"
-String_484ff: db "Girl@"
-; 0x48504
-
-MenuDataHeader_0x48504: ; 0x48504
- db $40 ; flags
- db 00, 10 ; start coords
- db 17, 19 ; end coords
-
-MenuDataHeader_0x48509: ; 0x48509
- db $40 ; flags
- db 05, 10 ; start coords
- db 07, 19 ; end coords
-
-MenuDataHeader_0x4850e: ; 0x4850e
- db $40 ; flags
- db 09, 10 ; start coords
- db 11, 19 ; end coords
-
-MenuDataHeader_0x48513: ; 0x48513
- db $40 ; flags
- db 01, 11 ; start coords
- db 12, 18 ; end coords
- dw MenuData2_0x4851b
- db 1 ; default option
-; 0x4851b
-
-MenuData2_0x4851b: ; 0x4851b
- db $1d ; flags
- db 6 ; items
-
-Unknown_4851d: ; 4851d
- db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04
- db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f, $10, $11, $12, $13, $14, $15, $16, $17, $18
- db $19, $1a, $1b, $1c, $1d, $1e, $1f, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c
- db $2d, $ff
-
-Prefectures:
-Aichi: db "あいちけん@" ; Aichi
-Aomori: db "あおもりけん@" ; Aomori
-Akita: db "あきたけん@" ; Akita
-Ishikawa: db "いしかわけん@" ; Ishikawa
-Ibaraki: db "いばらきけん@" ; Ibaraki
-Iwate: db "いわてけん@" ; Iwate
-Ehime: db "えひめけん@" ; Ehime
-Oita: db "おおいたけん@" ; Oita
-Osakafu: db "おおさかふ@" ; Osakafu
-Okayama: db "おかやまけん@" ; Okayama
-Okinawa: db "おきなわけん@" ; Okinawa
-Kagawa: db "かがわけん@" ; Kagawa
-Kagoshima: db "かごしまけん@" ; Kagoshima
-Kanagawa: db "かながわけん@" ; Kanagawa
-Gifu: db "ぎふけん@" ; Gifu
-Kyotofu: db "きょうとふ@" ; Kyotofu
-Kumamoto: db "くまもとけん@" ; Kumamoto
-Gunma: db "ぐんまけん@" ; Gunma
-Kochi: db "こうちけん@" ; Kochi
-Saitama: db "さいたまけん@" ; Saitama
-Saga: db "さがけん@" ; Saga
-Shiga: db "しがけん@" ; Shiga
-Shizuoka: db "しずおかけん@" ; Shizuoka
-Shimane: db "しまねけん@" ; Shimane
-Chiba: db "ちばけん@" ; Chiba
-Tokyo: db "とうきょうと@" ; Tokyo
-Tokushima: db "とくしまけん@" ; Tokushima
-Tochigi: db "とちぎけん@" ; Tochigi
-Tottori: db "とっとりけん@" ; Tottori
-Toyama: db "とやまけん@" ; Toyama
-Nagasaki: db "ながさきけん@" ; Nagasaki
-Nagano: db "ながのけん@" ; Nagano
-Naraken: db "ならけん@" ; Naraken
-Niigata: db "にいがたけん@" ; Niigata
-Hyogo: db "ひょうごけん@" ; Hyogo
-Hiroshima: db "ひろしまけん@" ; Hiroshima
-Fukui: db "ふくいけん@" ; Fukui
-Fukuoka: db "ふくおかけん@" ; Fukuoka
-Fukushima: db "ふくしまけん@" ; Fukushima
-Hokkaido: db "ほっかいどう@" ; Hokkaido
-Mie: db "みえけん@" ; Mie
-Miyagi: db "みやぎけん@" ; Miyagi
-Miyazaki: db "みやざきけん@" ; Miyazaki
-Yamagata: db "やまがたけん@" ; Yamagata
-Yamaguchi: db "やまぐちけん@" ; Yamaguchi
-Yamanashi: db "やまなしけん@" ; Yamanashi
-Wakayama: db "わかやまけん@" ; Wakayama
-; 48689
-
-Function48689: ; 48689 (12:4689)
- ld c, 7
- call DelayFrames
- ld b, $1
- call Function4930f
- call ClearBGPalettes
- hlcoord 0, 0
- ld b, $4
- ld c, $14
- call ClearBox
- hlcoord 0, 2
- ld a, $c
- ld [hl], a
- ld bc, $13
- add hl, bc
- ld [hl], a
- ld de, MobileProfileString
- hlcoord 1, 2
- call PlaceString
- hlcoord 0, 4
- ld b, $8
- ld c, $12
- call Function48cdc
- ret
-
-Function486bf: ; 486bf (12:46bf)
- ld hl, wcfa1
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_486ce
- ld a, $4
- ld [hli], a
- jr .asm_486d1
-.asm_486ce
- ld a, $6
- ld [hli], a
-.asm_486d1
- ld a, $1
- ld [hli], a
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_486e7
- call Function48725
- ld a, $4
- jr nc, .asm_486e4
- ld a, $5
-.asm_486e4
- ld [hli], a
- jr .asm_486fb
-.asm_486e7
- ld a, [wd479]
- bit 1, a
- jr nz, .asm_486f8
- call Function48725
- jr c, .asm_486f8
- ld a, $3
- ld [hli], a
- jr .asm_486fb
-.asm_486f8
- ld a, $4
- ld [hli], a
-.asm_486fb
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- push af
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4871a
- pop af
- add $2
- push af
-.asm_4871a
- pop af
- ld [hli], a
- ld a, $1
-rept 2
- ld [hli], a
-endr
- xor a
-rept 3
- ld [hli], a
-endr
- ret
-
-Function48725: ; 48725 (12:4725)
- ld a, [wd003]
- bit 0, a
- jr z, .asm_4873a
- bit 1, a
- jr z, .asm_4873a
- bit 2, a
- jr z, .asm_4873a
- bit 3, a
- jr z, .asm_4873a
- scf
- ret
-.asm_4873a
- and a
- ret
-
-Function4873c: ; 4873c (12:473c)
- ld hl, wcfa1
- ld a, $4
- ld [hli], a
- ld a, $c
- ld [hli], a
- ld a, $2
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $2
- ld [hli], a
- ld a, [PlayerGender]
- and a
- jr z, .asm_48764
- ld a, $2
- jr .asm_48766
-.asm_48764
- ld a, $1
-.asm_48766
- ld [hli], a
- ld a, $1
- ld [hli], a
- xor a
-rept 3
- ld [hli], a
-endr
- ret
-
-Function4876f: ; 4876f (12:476f)
- call Function48283
- hlcoord 1, 16
- ld de, String_484be
- call PlaceString
- ld hl, MenuDataHeader_0x48509
- call LoadMenuDataHeader
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- call WaitBGMap
- ld a, [wd473]
- and a
- jr z, .asm_487ab
- cp $64
- jr z, .asm_487b2
- hlcoord 12, 5
- ld [hl], $10
- hlcoord 12, 7
- ld [hl], $11
- jr .asm_487b7
-.asm_487ab
- hlcoord 12, 5
- ld [hl], $10
- jr .asm_487b7
-.asm_487b2
- hlcoord 12, 7
- ld [hl], $11
-.asm_487b7
- hlcoord 11, 6
- call Function487ec
- ld c, 10
- call DelayFrames
- ld a, [wd473]
- push af
-.asm_487c6
- call JoyTextDelay
- call Function4880e
- jr nc, .asm_487c6
- ld a, $1
- call Function1ff8
- pop bc
- jr nz, .asm_487da
- ld a, b
- ld [wd473], a
-.asm_487da
- ld a, [wd473]
- call ExitMenu
- hlcoord 11, 6
- call Function487ec
- pop af
- ld [hInMenu], a
- jp Function4840c
-
-Function487ec: ; 487ec (12:47ec)
- push hl
- ld de, wd473
- call Function487ff
- pop hl
-rept 4
- inc hl
-endr
- ld de, String_4880d
- call PlaceString
- ret
-
-Function487ff: ; 487ff (12:47ff)
- push hl
- ld a, " "
- ld [hli], a
- ld [hl], a
- pop hl
- ld b, PRINTNUM_LEADINGZEROS | 1
- ld c, 3
- call PrintNum
- ret
-; 4880d (12:480d)
-
-String_4880d: ; 4880d
- db "@"
-; 4880e
-
-Function4880e: ; 4880e (12:480e)
- ld a, [hJoyPressed]
- and A_BUTTON
- jp nz, Function488b9
- ld a, [hJoyPressed]
- and B_BUTTON
- jp nz, Function488b4
- ld hl, hJoyLast
- ld a, [hl]
- and D_UP
- jr nz, .asm_48843
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_48838
- ld a, [hl]
- and D_LEFT
- jr nz, .asm_4884f
- ld a, [hl]
- and D_RIGHT
- jr nz, .asm_4885f
- call DelayFrame
- and a
- ret
-.asm_48838
- ld hl, wd473
- ld a, [hl]
- and a
- jr z, .asm_48840
- dec a
-.asm_48840
- ld [hl], a
- jr .asm_4886f
-.asm_48843
- ld hl, wd473
- ld a, [hl]
- cp $64
- jr nc, .asm_4884c
- inc a
-.asm_4884c
- ld [hl], a
- jr .asm_4886f
-.asm_4884f
- ld a, [wd473]
- cp $5b
- jr c, .asm_48858
- ld a, $5a
-.asm_48858
- add $a
- ld [wd473], a
- jr .asm_4886f
-.asm_4885f
- ld a, [wd473]
- cp $a
- jr nc, .asm_48868
- ld a, $a
-.asm_48868
- sub $a
- ld [wd473], a
- jr .asm_4886f
-.asm_4886f
- ld a, [wd473]
- and a
- jr z, .asm_48887
- cp $64
- jr z, .asm_48898
- jr z, .asm_488a7
- hlcoord 12, 5
- ld [hl], $10
- hlcoord 12, 7
- ld [hl], $11
- jr .asm_488a7
-.asm_48887
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- hlcoord 12, 5
- ld [hl], $10
- jr .asm_488a7
-.asm_48898
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- hlcoord 12, 7
- ld [hl], $11
-.asm_488a7
- hlcoord 11, 6
- call Function487ec
- call WaitBGMap
- ld a, $1
- and a
- ret
-
-Function488b4: ; 488b4 (12:48b4)
- ld a, $0
- and a
- scf
- ret
-
-Function488b9: ; 488b9 (12:48b9)
- ld a, [wd003]
- set 1, a
- ld [wd003], a
- scf
- ret
-; 488c3 (12:48c3)
-
-GFX_488c3: ; 488c3
-INCBIN "gfx/unknown/0488c3.2bpp"
-
-GFX_488cb: ; 488cb
-INCBIN "gfx/unknown/0488cb.2bpp"
-
-Function488d3: ; 488d3 (12:48d3)
- call Function48283
- hlcoord 1, 16
- ld de, String_484e2
- call PlaceString
- call Function48a3a
- jp c, Function4840c
- ld hl, MenuDataHeader_0x4850e
- call LoadMenuDataHeader
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- ld a, [wd475]
- and $f
- ld d, $0
- hlcoord 11, 10
- call Function489ea
- call WaitBGMap
- ld a, [wd475]
- ld b, a
- ld a, [wd476]
- ld c, a
- ld a, [wd477]
- ld d, a
- ld a, [wd478]
- ld e, a
- push de
- push bc
- ld d, $0
- ld b, $0
-
-asm_48922: ; 48922 (12:4922)
- push bc
- call JoyTextDelay
- ld a, [hJoyDown]
- and a
- jp z, Function4896e
- bit 0, a
- jp nz, Function4896e
- bit 1, a
- jp nz, Function4896e
- ld a, [wd002]
- and %11001111
- res 7, a
- ld [wd002], a
- pop bc
- inc b
- ld a, b
- cp $5
- push bc
- jr c, .asm_4894c
- pop bc
- ld b, $4
- push bc
-.asm_4894c
- pop bc
- push bc
- ld a, b
- cp $4
- jr nz, asm_48972
- ld c, 10
- call DelayFrames
- jr asm_48972
-; 4895a (12:495a)
-
-Function4895a: ; 4895a
- ld a, [hJoyPressed]
- and a
- jr z, .asm_48965
- pop bc
- ld b, $1
- push bc
- jr asm_48972
-
-.asm_48965
- ld a, [hJoyLast]
- and a
- jr z, asm_48972
-
- pop bc
- ld b, $1
- push bc
-
-Function4896e: ; 4896e (12:496e)
- pop bc
- ld b, $0
- push bc
-
-asm_48972: ; 48972 (12:4972)
- call Function48ab5
- push af
- cp $f0
- jr z, .asm_48994
- cp $f
- jr nz, .asm_48988
- ld a, [wd002]
- set 7, a
- and $cf
- ld [wd002], a
-.asm_48988
- hlcoord 11, 10
- ld b, $0
- ld c, d
- add hl, bc
- ld b, $3
- call Function48c11
-.asm_48994
- call WaitBGMap
- pop af
- pop bc
- jr nc, asm_48922
- jr nz, .asm_489b1
- pop bc
- ld a, b
- ld [wd475], a
- ld a, c
- ld [wd476], a
- pop bc
- ld a, b
- ld [wd477], a
- ld a, c
- ld [wd478], a
- jr .asm_489c5
-.asm_489b1
- push af
- ld a, [wd479]
- set 0, a
- ld [wd479], a
- ld a, [wd003]
- set 3, a
- ld [wd003], a
- pop af
- pop bc
- pop bc
-.asm_489c5
- push af
- push bc
- push de
- push hl
- ld a, $1
- call Function1ff8
- pop hl
- pop de
- pop bc
- pop af
- call ExitMenu
- hlcoord 11, 10
- call Function489ea
- hlcoord 11, 9
- lb bc, 1, 8
- call ClearBox
- pop af
- ld [hInMenu], a
- jp Function4840c
-
-Function489ea: ; 489ea (12:49ea)
- push de
- ld a, [wd475]
- and $f
- call Function48444
- ld a, [wd476]
- and $f0
- swap a
- inc hl
- call Function48444
- ld a, [wd476]
- and $f
- inc hl
- call Function48444
- inc hl
- ld de, String_48a38
- call PlaceString
- ld a, [wd477]
- and $f0
- swap a
- inc hl
- call Function48444
- ld a, [wd477]
- and $f
- inc hl
- call Function48444
- ld a, [wd478]
- and $f0
- swap a
- inc hl
- call Function48444
- ld a, [wd478]
- and $f
- inc hl
- call Function48444
- pop de
- ret
-; 48a38 (12:4a38)
-
-String_48a38: ; 48a38
- db "-@"
-; 48a3a
-
-Function48a3a: ; 48a3a (12:4a3a)
- ld hl, MenuDataHeader_0x48a9c
- call LoadMenuDataHeader
- call Function4873c
- ld a, $a
- ld [wcfa1], a
- ld a, $b
- ld [wcfa2], a
- ld a, $1
- ld [MenuSelection2], a
- hlcoord 10, 8
- ld b, $4
- ld c, $8
- call Function48cdc
- hlcoord 12, 10
- ld de, String_48aa1
- call PlaceString
- call Function1bc9
- push af
- call PlayClickSFX
- call ExitMenu
- pop af
- bit 1, a
- jp nz, Function48a9a
- ld a, [MenuSelection2]
- cp $1
- jr z, .asm_48a98
- ld a, [wd003]
- set 3, a
- ld [wd003], a
- ld a, [wd479]
- res 0, a
- ld [wd479], a
- xor a
- ld bc, $4
- ld hl, wd475
- call ByteFill
- jr Function48a9a
-.asm_48a98
- and a
- ret
-
-Function48a9a: ; 48a9a (12:4a9a)
- scf
- ret
-; 48a9c (12:4a9c)
-
-MenuDataHeader_0x48a9c: ; 0x48a9c
- db $40 ; flags
- db 08, 10 ; start coords
- db 13, 19 ; end coord
-
-String_48aa1: ; 48aa1
- db "Tell Now"
- next "Tell Later@"
-; 48ab5
-
-
-Function48ab5: ; 48ab5 (12:4ab5)
- ld a, [hJoyPressed]
- and A_BUTTON
- jp nz, Function48c0f
- ld a, [hJoyPressed]
- and B_BUTTON
- jp nz, Function48c0d
- ld a, d
- and a
- jr z, .asm_48adf
- cp $1
- jr z, .asm_48ae7
- cp $2
- jr z, .asm_48af1
- cp $3
- jr z, .asm_48af9
- cp $4
- jr z, .asm_48b03
- cp $5
- jr z, .asm_48b0b
- cp $6
- jr .asm_48b15
-.asm_48adf
- ld hl, wd475
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48ae7
- ld hl, wd476
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48af1
- ld hl, wd476
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48af9
- ld hl, wd477
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48b03
- ld hl, wd477
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48b0b
- ld hl, wd478
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48b15
- ld hl, wd478
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48b1d
- push hl
- push af
- ld e, $0
- hlcoord 11, 10
- ld a, d
-.asm_48b25
- and a
- jr z, .asm_48b2c
- inc e
- dec a
- jr .asm_48b25
-.asm_48b2c
- ld hl, hJoyLast
- ld a, [hl]
- and D_UP
- jr nz, .asm_48b8d
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_48b55
- ld a, [hl]
- and D_LEFT
- jp nz, Function48bd7
- ld a, [hl]
- and D_RIGHT
- jr nz, .asm_48b9d
- hlcoord 11, 10
- call Function489ea
- ld a, [wd002]
- bit 7, a
- jr nz, .asm_48b51
-.asm_48b51
- pop bc
- pop bc
- and a
- ret
-.asm_48b55
- pop af
- ld b, a
- and $f
- and a
- ld a, b
- jr nz, .asm_48b61
- and $f0
- add $a
-.asm_48b61
- dec a
-.asm_48b62
- push de
- push af
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop af
- pop de
- hlcoord 11, 10
- ld b, a
- ld a, d
- cp $3
- jr c, .asm_48b7a
- inc hl
-.asm_48b7a
- ld a, b
- pop hl
- bit 7, a
- jr z, .asm_48b85
- call Function48c4d
- jr .asm_48b88
-.asm_48b85
- call Function48c5a
-.asm_48b88
- ld a, $f0
- jp Function48c00
-.asm_48b8d
- pop af
- ld b, a
- and $f
- cp $9
- ld a, b
- jr c, .asm_48b9a
- and $f0
- add $ff
-.asm_48b9a
- inc a
- jr .asm_48b62
-.asm_48b9d
- push de
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop de
- ld a, d
- cp $6
- jr nc, .asm_48baf
- inc d
-.asm_48baf
- pop af
- pop hl
- ld b, a
- ld a, d
- cp $6
- ld a, b
- jr z, .asm_48bc4
- bit 7, a
- jr nz, .asm_48bc4
- inc hl
- ld a, [hl]
- swap a
- and $f
- jr asm_48bc7
-.asm_48bc4
- ld a, [hl]
- and $f
-
-asm_48bc7: ; 48bc7 (12:4bc7)
- hlcoord 11, 10
- push af
- ld a, d
- cp $3
- pop bc
- ld a, b
- jr c, .asm_48bd3
- inc hl
-.asm_48bd3
- ld a, $f
- jr Function48c00
-
-Function48bd7: ; 48bd7 (12:4bd7)
- push de
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop de
- ld a, d
- and a
- pop af
- pop hl
- ld b, a
- ld a, d
- and a
- ld a, b
- jr z, .asm_48bf3
- bit 7, a
- jr z, .asm_48bf8
- dec d
- dec hl
-.asm_48bf3
- ld a, [hl]
- and $f
- jr asm_48bc7
-.asm_48bf8
- dec d
- ld a, [hl]
- swap a
- and $f
- jr asm_48bc7
-
-Function48c00: ; 48c00 (12:4c00)
- push af
- hlcoord 11, 10
- call Function489ea
- ld a, $1
- and a
- pop bc
- ld a, b
- ret
-
-Function48c0d: ; 48c0d (12:4c0d)
- xor a
- and a
-
-Function48c0f: ; 48c0f (12:4c0f)
- scf
- ret
-
-Function48c11: ; 48c11 (12:4c11)
- ld a, [wd002]
- bit 7, a
- jr z, .asm_48c20
- ld a, d
- cp $3
- jr c, .asm_48c1e
- inc hl
-.asm_48c1e
- ld [hl], $7f
-.asm_48c20
- ld a, [wd002]
- swap a
- and $3
- inc a
- cp b
- jr nz, .asm_48c40
- ld a, [wd002]
- bit 7, a
- jr z, .asm_48c3a
- res 7, a
- ld [wd002], a
- xor a
- jr .asm_48c40
-.asm_48c3a
- set 7, a
- ld [wd002], a
- xor a
-.asm_48c40
- swap a
- ld b, a
- ld a, [wd002]
- and $cf
- or b
- ld [wd002], a
- ret
-
-Function48c4d: ; 48c4d (12:4c4d)
- swap a
- and $f0
- push af
- ld a, [hl]
- and $f
- ld [hl], a
- pop af
- or [hl]
- ld [hl], a
- ret
-
-Function48c5a: ; 48c5a (12:4c5a)
- push af
- ld a, [hl]
- and $f0
- ld [hl], a
- pop af
- or [hl]
- ld [hl], a
- ret
-
-Function48c63: ; 48c63
- ld a, "@"
- ld [de], a
- ld a, c
- cp $30
- jr nc, .asm_48c8c
- and a
- jr z, .asm_48c8c
- dec c
- push de
- ld h, d
- ld l, e
- ld a, "@"
- ld b, 7
-.asm_48c76
- ld [hli], a
- dec b
- jr nz, .asm_48c76
- ld hl, Prefectures
- ld a, c
- call GetNthString
-.asm_48c81
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- cp "@"
- jr nz, .asm_48c81
- and a
- pop de
- ret
-
-.asm_48c8c
- scf
- ret
-; 48c8e
-
-Function48c8e: ; 48c8e
- ld hl, wd02a
- ld d, h
- ld e, l
- callba Function48c63
- hlcoord 10, 7
- call PlaceString
- call WaitBGMap
- ret
-; 48ca3
-
-Function48ca3: ; 48ca3
- push af
- push bc
- push de
- push hl
- ld b, 0
- ld c, 0
- ld d, 0
-.asm_48cad
- cp 100
- jr c, .asm_48cb6
- sub 100
- inc b
- jr .asm_48cad
-
-.asm_48cb6
- cp 10
- jr c, .asm_48cbf
- sub 10
- inc c
- jr .asm_48cb6
-
-.asm_48cbf
- cp 1
- jr c, .asm_48cc7
- dec a
- inc d
- jr .asm_48cbf
-
-.asm_48cc7
- ld a, b
- call Function48444
- inc hl
- ld a, c
- call Function48444
- inc hl
- ld a, d
- call Function48444
- pop hl
- pop de
- pop bc
- pop af
- ret
-; 48cda
-
-Function48cda: ; 48cda (12:4cda)
- ld h, d
- ld l, e
-
-Function48cdc: ; 48cdc (12:4cdc)
- push bc
- push hl
- call Function48cfd
- pop hl
- pop bc
- ld de, AttrMap - TileMap
- add hl, de
-rept 2
- inc b
-endr
-rept 2
- inc c
-endr
- ld a, $0
-.asm_48ced
- push bc
- push hl
-.asm_48cef
- ld [hli], a
- dec c
- jr nz, .asm_48cef
- pop hl
- ld de, $14
- add hl, de
- pop bc
- dec b
- jr nz, .asm_48ced
- ret
-
-Function48cfd: ; 48cfd (12:4cfd)
- push hl
- ld a, $4
- ld [hli], a
- inc a
- call Function48d2a
- inc a
- ld [hl], a
- pop hl
- ld de, $14
- add hl, de
-.asm_48d0c
- push hl
- ld a, $7
- ld [hli], a
- ld a, $7f
- call Function48d2a
- ld [hl], $8
- pop hl
- ld de, $14
- add hl, de
- dec b
- jr nz, .asm_48d0c
- ld a, $9
- ld [hli], a
- ld a, $a
- call Function48d2a
- ld [hl], $b
- ret
-
-Function48d2a: ; 48d2a (12:4d2a)
- ld d, c
-.asm_48d2b
- ld [hli], a
- dec d
- jr nz, .asm_48d2b
- ret
-
-Function48d30: ; 48d30 (12:4d30)
- ld hl, wd475
- call Function48d4a
- ld hl, wd477
- call Function48d4a
- ret
-
-Function48d3d: ; 48d3d (12:4d3d)
- ld hl, wd475
- call Function48d94
- ld hl, wd477
- call Function48d94
- ret
-
-Function48d4a: ; 48d4a (12:4d4a)
- inc hl
- ld a, [hl]
- ld b, a
- and $f
- ld c, a
- srl b
- srl b
- srl b
- srl b
- push bc
- ld c, 10
- ld a, b
- call SimpleMultiply
- pop bc
- add c
- ld [hld], a
- xor a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- ld a, [hl]
- srl a
- srl a
- srl a
- srl a
- ld c, 10
- call SimpleMultiply
- ld b, a
- ld a, [hli]
- and $f
- add b
- ld [hMultiplicand + 2], a
- ld a, 100
- ld [hMultiplier], a
- call Multiply
- ld a, [hProduct + 2]
- ld b, a
- ld a, [hProduct + 3]
- ld c, a
- ld e, [hl]
- add e
- ld c, a
- ld a, b
- adc $0
- ld b, a
- ld a, c
- ld [hld], a
- ld [hl], b
- ret
-
-Function48d94: ; 48d94 (12:4d94)
- xor a
- ld [hDividend + 0], a
- ld [hDividend + 1], a
- ld a, [hli]
- ld [hDividend + 0], a
- ld a, [hl]
- ld [hDividend + 1], a
- ld a, 100
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, [hDivisor]
- ld c, $a
- call SimpleDivide
- sla b
- sla b
- sla b
- sla b
- or b
- ld [hld], a
- ld a, [hQuotient + 2]
- ld c, 10
- call SimpleDivide
- sla b
- sla b
- sla b
- sla b
- or b
- ld [hl], a
- ret
-
InitGender: ; 48dcb (12:4dcb)
call Function48e14
call Function48e47
@@ -22806,7 +20679,7 @@
INCBIN "gfx/misc/pack_f.2bpp"
; 4925b
-Function4925b: ; 4925b
+Special_MoveTutor: ; 4925b
call FadeToMenu
call ClearBGPalettes
call ClearScreen
@@ -23542,1607 +21415,9 @@
db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c
db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd
-Special_CelebiShrineEvent: ; 4989a
- call DelayFrame
- ld a, [VramState]
- push af
- xor a
- ld [VramState], a
- call LoadCelebiGFX
- lb de, $07, $50
- ld a, SPRITE_ANIM_INDEX_2C
- call _InitSpriteAnimStruct
- ld hl, $3
- add hl, bc
- ld [hl], $84
- ld hl, $2
- add hl, bc
- ld [hl], $1f
- ld hl, $f
- add hl, bc
- ld a, $80
- ld [hl], a
- ld a, $a0
- ld [wcf64], a
- ld d, $0
-.loop
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .done
- push bc
- call Function49bae
- inc d
- push de
- ld a, $90
- ld [wc3b5], a
- callba Function8cf7a
- call Function49935
- ld c, 2
- call DelayFrames
- pop de
- pop bc
- jr .loop
+INCLUDE "event/celebi.asm"
+INCLUDE "engine/main_menu.asm"
-.done
- pop af
- ld [VramState], a
- call Function498f9
- call Function49bf3
- ret
-; 498f9
-
-Function498f9: ; 498f9
- ld hl, Sprites + 2
- xor a
- ld c, $4
-.loop
- ld [hli], a
-rept 3
- inc hl
-endr
- inc a
- dec c
- jr nz, .loop
- ld hl, Sprites + $10
- ld bc, $90
- xor a
- call ByteFill
- ret
-; 49912
-
-LoadCelebiGFX: ; 49912
- callba Function8cf53
- ld de, SpecialCelebiLeafGFX
- ld hl, VTiles1
- lb bc, BANK(SpecialCelebiLeafGFX), 4
- call Request2bpp
- ld de, SpecialCelebiGFX
- ld hl, VTiles1 tile $04
- lb bc, BANK(SpecialCelebiGFX), $10
- call Request2bpp
- xor a
- ld [wJumptableIndex], a
- ret
-; 49935
-
-Function49935: ; 49935
- ld hl, wcf64
- ld a, [hl]
- and a
- jr z, .asm_4993e
- dec [hl]
- ret
-
-.asm_4993e
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-; 49944
-
-Function49944: ; 49944
- ld hl, wcf65
- ld a, [hl]
- inc [hl]
- and $7
- ret nz
- ld a, [hl]
- and $18
- sla a
- add $40
- ld d, a
- ld e, $0
- ld a, SPRITE_ANIM_INDEX_18 ; fly land
- call _InitSpriteAnimStruct
- ld hl, $3
- add hl, bc
- ld [hl], $80
- ret
-; 49962
-
-SpecialCelebiLeafGFX: ; 49962
-INCBIN "gfx/special/celebi/leaf.2bpp"
-SpecialCelebiGFX: ; 499a2
-INCBIN "gfx/special/celebi/1.2bpp"
-INCBIN "gfx/special/celebi/2.2bpp"
-INCBIN "gfx/special/celebi/3.2bpp"
-INCBIN "gfx/special/celebi/4.2bpp"
-
-
-Function49aa2: ; 49aa2 (12:5aa2)
- ld hl, $6
- add hl, bc
- ld a, [hl]
- push af
- ld hl, $5
- add hl, bc
- ld a, [hl]
- cp $52
- jp nc, Function49b30
- ld hl, $5
- add hl, bc
- inc [hl]
- ld hl, $f
- add hl, bc
- ld a, [hl]
- ld d, a
- cp $3a
- jr c, .asm_49ac6
- jr z, .asm_49ac6
- sub $3
- ld [hl], a
-.asm_49ac6
- ld hl, $e
- add hl, bc
- ld a, [hl]
- inc [hl]
- call Function49b3b
- ld hl, $6
- add hl, bc
- ld [hl], a
- ld d, a
- ld hl, $4
- add hl, bc
- add [hl]
- cp $5c
- jr nc, .asm_49ae2
- cp $44
- jr nc, .asm_49b0d
-.asm_49ae2
- pop af
- push af
- cp d
- jr nc, .asm_49af2
- ld hl, $4
- add hl, bc
- add [hl]
- cp $50
- jr c, .asm_49b05
- jr .asm_49afb
-.asm_49af2
- ld hl, $4
- add hl, bc
- add [hl]
- cp $50
- jr nc, .asm_49b05
-.asm_49afb
- ld hl, $5
- add hl, bc
- ld a, [hl]
- sub $2
- ld [hl], a
- jr .asm_49b0d
-.asm_49b05
- ld hl, $5
- add hl, bc
- ld a, [hl]
- add $1
- ld [hl], a
-.asm_49b0d
- pop af
- ld hl, $4
- add hl, bc
- add [hl]
- cp $50
- jr c, .asm_49b26
- cp $e6
- jr nc, .asm_49b26
- ld hl, $1
- add hl, bc
- ld a, $41
- call Function3b3c
- jr .asm_49b2f
-.asm_49b26
- ld hl, $1
- add hl, bc
- ld a, $40
- call Function3b3c
-.asm_49b2f
- ret
-
-Function49b30: ; 49b30 (12:5b30)
- pop af
- ld hl, $1
- add hl, bc
- ld a, $40
- call Function3b3c
- ret
-
-Function49b3b: ; 49b3b (12:5b3b)
- add $10
- and $3f
- cp $20
- jr nc, .asm_49b48
- call Function49b52
- ld a, h
- ret
-.asm_49b48
- and $1f
- call Function49b52
- ld a, h
- xor $ff
- inc a
- ret
-
-Function49b52: ; 49b52 (12:5b52)
- ld e, a
- ld a, d
- ld d, $0
- ld hl, Unknown_49b6e
-rept 2
- add hl, de
-endr
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, 0
-.asm_49b61
- srl a
- jr nc, .asm_49b66
- add hl, de
-.asm_49b66
- sla e
- rl d
- and a
- jr nz, .asm_49b61
- ret
-; 49b6e (12:5b6e)
-
-Unknown_49b6e: ; 49b6e
- sine_wave $100
-; 49bae
-
-Function49bae: ; 49bae
- push hl
- push bc
- push de
- ld a, d
- ld d, $3
- ld e, d
- cp $0
- jr z, .asm_49bd0
- cp d
- jr z, .asm_49bd4
- call Function49bed
- cp d
- jr z, .asm_49bd8
- call Function49bed
- cp d
- jr z, .asm_49bdc
- call Function49bed
- cp d
- jr c, .asm_49be9
- jr .asm_49be5
-
-.asm_49bd0
- ld a, $84
- jr .asm_49bde
-
-.asm_49bd4
- ld a, $88
- jr .asm_49bde
-
-.asm_49bd8
- ld a, $8c
- jr .asm_49bde
-
-.asm_49bdc
- ld a, $90
-
-.asm_49bde
- ld hl, $3
- add hl, bc
- ld [hl], a
- jr .asm_49be9
-
-.asm_49be5
- pop de
- ld d, $ff
- push de
-
-.asm_49be9
- pop de
- pop bc
- pop hl
- ret
-; 49bed
-
-Function49bed: ; 49bed
- push af
- ld a, d
- add e
- ld d, a
- pop af
- ret
-; 49bf3
-
-Function49bf3: ; 49bf3
- ld a, BATTLETYPE_CELEBI
- ld [BattleType], a
- ret
-; 49bf9
-
-Function49bf9: ; 49bf9
- ld a, [wBattleResult]
- bit 6, a
- jr z, .asm_49c07
- ld a, $1
- ld [ScriptVar], a
- jr .asm_49c0b
-
-.asm_49c07
- xor a
- ld [ScriptVar], a
-
-.asm_49c0b
- ret
-; 49c0c
-
-GFX_49c0c: ; 49c0c
-INCBIN "gfx/unknown/049c0c.2bpp"
-; 49cdc
-
-MainMenu: ; 49cdc
- xor a
- ld [wc2d7], a
- call Function49ed0
- ld b, SCGB_08
- call GetSGBLayout
- call SetPalettes
- ld hl, GameTimerPause
- res 0, [hl]
- call Function49da4
- ld [wcf76], a
- call Function49e09
- ld hl, MenuDataHeader_0x49d14
- call LoadMenuDataHeader
- call Function49de4
- call WriteBackup
- jr c, .quit
- call ClearTileMap
- ld a, [MenuSelection]
- ld hl, Jumptable_49d60
- rst JumpTable
- jr MainMenu
-
-.quit
- ret
-; 49d14
-
-MenuDataHeader_0x49d14: ; 49d14
- db $40 ; flags
- db 00, 00 ; start coords
- db 07, 16 ; end coords
- dw MenuData2_0x49d1c
- db 1 ; default option
-; 49d1c
-
-MenuData2_0x49d1c: ; 49d1c
- db $80 ; flags
- db 0 ; items
- dw MainMenuItems
- dw Function1f79
- dw MainMenuText
-; 49d20
-
-MainMenuText: ; 49d24
- db "CONTINUE@"
- db "NEW GAME@"
- db "OPTION@"
- db "MYSTERY GIFT@"
- db "MOBILE@"
- db "MOBILE STUDIUM@"
-
-Jumptable_49d60: ; 0x49d60
- dw MainMenu_Continue
- dw MainMenu_NewGame
- dw MainMenu_Options
- dw MainMenu_MysteryGift
- dw MainMenu_Mobile
- dw MainMenu_MobileStudium
-; 0x49d6c
-
-CONTINUE EQU 0
-NEW_GAME EQU 1
-OPTION EQU 2
-MYSTERY_GIFT EQU 3
-MOBILE EQU 4
-MOBILE_STUDIUM EQU 5
-
-MainMenuItems:
-
-NewGameMenu: ; 0x49d6c
- db 2
- db NEW_GAME
- db OPTION
- db $ff
-
-ContinueMenu: ; 0x49d70
- db 3
- db CONTINUE
- db NEW_GAME
- db OPTION
- db $ff
-
-MobileMysteryMenu: ; 0x49d75
- db 5
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MYSTERY_GIFT
- db MOBILE
- db $ff
-
-MobileMenu: ; 0x49d7c
- db 4
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MOBILE
- db $ff
-
-MobileStudiumMenu: ; 0x49d82
- db 5
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MOBILE
- db MOBILE_STUDIUM
- db $ff
-
-MysteryMobileStudiumMenu: ; 0x49d89
- db 6
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MYSTERY_GIFT
- db MOBILE
- db MOBILE_STUDIUM
- db $ff
-
-MysteryMenu: ; 0x49d91
- db 4
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MYSTERY_GIFT
- db $ff
-
-MysteryStudiumMenu: ; 0x49d97
- db 5
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MYSTERY_GIFT
- db MOBILE_STUDIUM
- db $ff
-
-StudiumMenu: ; 0x49d9e
- db 4
- db CONTINUE
- db NEW_GAME
- db OPTION
- db MOBILE_STUDIUM
- db $ff
-
-
-Function49da4: ; 49da4
- nop
- nop
- nop
- ld a, [wcfcd]
- and a
- jr nz, .next
- ld a, $0
- ret
-
-.next
- ld a, [hCGB]
- cp $1
- ld a, $1
- ret nz
- ld a, BANK(s0_abe5)
- call GetSRAMBank
- ld a, [s0_abe5]
- cp $ff
- call CloseSRAM
- jr nz, .done
- ld a, [StatusFlags]
- bit 7, a
- ld a, $1
- jr z, .ok
- jr .ok
-
-.ok
- jr .ok2
-
-.ok2
- ld a, $1
- ret
-
-.done
- ld a, [StatusFlags]
- bit 7, a
- jr z, .ok3
- jr .ok3
-
-.ok3
- jr .ok4
-
-.ok4
- ld a, $6
- ret
-; 49de4
-
-Function49de4: ; 49de4
- call SetUpMenu
-.asm_49de7
- call Function49e09
- ld a, [wcfa5]
- set 5, a
- ld [wcfa5], a
- call Function1f1a
- ld a, [wcf73]
- cp $2
- jr z, .asm_49e07
- cp $1
- jr z, .asm_49e02
- jr .asm_49de7
-
-.asm_49e02
- call PlayClickSFX
- and a
- ret
-
-.asm_49e07
- scf
- ret
-; 49e09
-
-Function49e09: ; 49e09
- ld a, [wcfcd]
- and a
- ret z
- xor a
- ld [hBGMapMode], a
- call Function49e27
- ld hl, Options
- ld a, [hl]
- push af
- set 4, [hl]
- call Function49e3d
- pop af
- ld [Options], a
- ld a, $1
- ld [hBGMapMode], a
- ret
-; 49e27
-
-
-Function49e27: ; 49e27
- call Function6e3
- and $80
- jr nz, .asm_49e39
- hlcoord 0, 14
- ld b, $2
- ld c, $12
- call TextBox
- ret
-
-.asm_49e39
- call SpeechTextBox
- ret
-; 49e3d
-
-
-Function49e3d: ; 49e3d
- ld a, [wcfcd]
- and a
- ret z
- call Function6e3
- and $80
- jp nz, Function49e75
- call UpdateTime
- call GetWeekday
- ld b, a
- decoord 1, 15
- call Function49e91
- decoord 4, 16
- ld a, [hHours]
- ld c, a
- callba PrintHour
- ld [hl], ":"
- inc hl
- ld de, hMinutes
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- ret
-; 49e70
-
-; 49e70
- db "min.@"
-; 49e75
-
-Function49e75: ; 49e75
- hlcoord 1, 14
- ld de, .TimeNotSet
- call PlaceString
- ret
-; 49e7f
-
-.TimeNotSet ; 49e7f
- db "TIME NOT SET@"
-; 49e8c
-
-UnknownText_0x49e8c: ; 49e8c
- text_jump UnknownText_0x1c5182
- db "@"
-; 49e91
-
-Function49e91: ; 49e91
- push de
- ld hl, .Days
- ld a, b
- call GetNthString
- ld d, h
- ld e, l
- pop hl
- call PlaceString
- ld h, b
- ld l, c
- ld de, .Day
- call PlaceString
- ret
-; 49ea8
-
-.Days
- db "SUN@"
- db "MON@"
- db "TUES@"
- db "WEDNES@"
- db "THURS@"
- db "FRI@"
- db "SATUR@"
-.Day
- db "DAY@"
-; 49ed0
-
-Function49ed0: ; 49ed0
- xor a
- ld [hMapAnims], a
- call ClearTileMap
- call LoadFontsExtra
- call LoadStandardFont
- call ResetTextRelatedRAM
- ret
-; 49ee0
-
-
-MainMenu_NewGame: ; 49ee0
- callba NewGame
- ret
-; 49ee7
-
-MainMenu_Options: ; 49ee7
- callba OptionsMenu
- ret
-; 49eee
-
-MainMenu_Continue: ; 49eee
- callba Continue
- ret
-; 49ef5
-
-MainMenu_MysteryGift: ; 49ef5
- callba MysteryGift
- ret
-; 49efc
-
-MainMenu_Mobile: ; 49efc
- call ClearBGPalettes
- ld a, MUSIC_MOBILE_ADAPTER_MENU
- ld [wMapMusic], a
- ld de, MUSIC_MOBILE_ADAPTER_MENU
- call Function4a6c5
-Function49f0a: ; 49f0a
- call ClearBGPalettes
- call Function4a3a7
- call Function4a492
- call ClearBGPalettes
-Function49f16: ; 49f16
- call Function4a071
- ld c, 12
- call DelayFrames
- hlcoord 4, 0
- ld b, $a
- ld c, $a
- call Function48cdc
- hlcoord 6, 2
- ld de, MobileString1
- call PlaceString
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- xor a
- ld de, String_0x49fe9
- hlcoord 1, 14
- call PlaceString
- call Function3200
- call SetPalettes
- call Function1bc9
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
- jr .asm_49f5d
-
-.asm_49f55
- call Function1bd3
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
-
-.asm_49f5d
- bit 0, a
- jr nz, .asm_49f67
- bit 1, a
- jr nz, .asm_49f84
- jr .asm_49f97
-
-.asm_49f67
- ld hl, MenuSelection2
- ld a, [hl]
- cp $1
- jp z, Function4a098
- cp $2
- jp z, Function4a0b9
- cp $3
- jp z, Function4a0c2
- cp $4
- jp z, Function4a100
- ld a, $1
- call Function1ff8
-
-.asm_49f84
- pop bc
- call ClearBGPalettes
- call ClearTileMap
- ld a, MUSIC_MAIN_MENU
- ld [wMapMusic], a
- ld de, MUSIC_MAIN_MENU
- call Function4a6c5
- ret
-
-.asm_49f97
- ld hl, MenuSelection2
- ld a, [hl]
- dec a
- ld hl, MobileStrings2
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- jp .asm_49fb7
-
-.asm_49fb7
- call Function4a071
- pop bc
- ld hl, MenuSelection2
- ld [hl], b
- ld b, $a
- ld c, $1
- hlcoord 5, 1
- call ClearBox
- jp .asm_49f55
-; 49fcc
-
-
-MobileString1: ; 49fcc
- db "めいしフ,ルダー"
- next "あいさつ"
- next "プロフィール"
- next "せ", $1e, "い"
- next "もどる"
- db "@"
-; 49fe9
-
-
-MobileStrings2:
-
-String_0x49fe9: ; 49fe9
- db "めいし¯つくったり"
- next "ほぞんしておける フ,ルダーです@"
-; 4a004
-
-String_0x4a004: ; 4a004
- db "モバイルたいせんや じぶんのめいしで"
- next "つかう あいさつ¯つくります@"
-; 4a026
-
-String_0x4a026: ; 4a026
- db "あなた%じゅうしょや ねんれいの"
- next "せ", $1e, "い¯かえられます@"
-; 4a042
-
-String_0x4a042: ; 4a042
- db "モバイルセンター", $1d, "せつぞくするとき"
- next "ひつような こと¯きめます@"
-; 4a062
-
-String_0x4a062: ; 4a062
- db "まえ%がめん ", $1d, "もどります"
- next "@"
-; 4a071
-
-
-
-Function4a071: ; 4a071 (12:6071)
- ld hl, wcfa1
- ld a, $2
- ld [hli], a
- ld a, $5
- ld [hli], a
- ld a, $5
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- add $2
- ld [hli], a
- ld a, $1
-rept 2
- ld [hli], a
-endr
- ret
-
-Function4a098: ; 4a098 (12:6098)
- ld a, $2
- call Function1ff8
- call Function1bee
- call WaitBGMap
- call LoadStandardMenuDataHeader
- callba Function89de0
- call Call_ExitMenu
- call Function49351
- call Function4a485
- pop bc
- jp Function49f16
-
-Function4a0b9: ; 4a0b9 (12:60b9)
- ld a, $2
- call Function1ff8
- pop bc
- jp Function4a4c4
-
-Function4a0c2: ; 4a0c2 (12:60c2)
- ld a, $2
- call Function1ff8
- ld a, BANK(sPlayerData)
- call GetSRAMBank
- ld hl, sPlayerData + PlayerName - wPlayerData
- ld de, PlayerName
- ld bc, $6
- call CopyBytes
- call CloseSRAM
- callba Function150b9
- ld c, 2
- call DelayFrames
- ld c, $1
- call Function4802f
- push af
- call ClearBGPalettes
- pop af
- and a
- jr nz, .asm_4a0f9
- callba Function1509a
-.asm_4a0f9
- ld c, 5
- call DelayFrames
- jr asm_4a111
-
-Function4a100: ; 4a100 (12:6100)
- ld a, $2
- call Function1ff8
- call ClearBGPalettes
- call Function4a13b
- call ClearBGPalettes
- call ClearTileMap
-
-asm_4a111: ; 4a111 (12:6111)
- pop bc
- call LoadFontsExtra
- jp Function49f0a
-
-Function4a118: ; 4a118 (12:6118)
- ld hl, wcfa1
- ld a, $1
- ld [hli], a
- ld a, $d
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $2
- ld [hli], a
- ld a, $1
-rept 2
- ld [hli], a
-endr
- ret
-
-Function4a13b: ; 4a13b (12:613b)
- call Function4a3a7
- call Function4a492
- call Function4a373
- ld c, 10
- call DelayFrames
-
-Function4a149: ; 4a149 (12:6149)
- hlcoord 1, 2
- ld b, $6
- ld c, $10
- call Function48cdc
- hlcoord 3, 4
- ld de, String_4a1ef
- call PlaceString
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- ld a, [MenuSelection2]
- dec a
- ld hl, Strings_4a23d
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- callba Function104148
- call SetPalettes
- call Function1bc9
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
- jr asm_4a19d
-
-Function4a195: ; 4a195 (12:6195)
- call Function1bd3
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
-
-asm_4a19d: ; 4a19d (12:619d)
- bit 0, a
- jr nz, .asm_4a1a7
- bit 1, a
- jr nz, .asm_4a1ba
- jr .asm_4a1bc
-.asm_4a1a7
- ld hl, MenuSelection2
- ld a, [hl]
- cp $1
- jp z, Function4a20e
- cp $2
- jp z, Function4a221
- ld a, $1
- call Function1ff8
-.asm_4a1ba
- pop bc
- ret
-.asm_4a1bc
- ld hl, MenuSelection2
- ld a, [hl]
- dec a
- ld hl, Strings_4a23d
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- jr .asm_4a1db
-.asm_4a1db
- call Function4a373
- pop bc
- ld hl, MenuSelection2
- ld [hl], b
- lb bc, 6, 1
- hlcoord 2, 3
- call ClearBox
- jp Function4a195
-; 4a1ef (12:61ef)
-
-String_4a1ef: ; 4a1ef
- db "モバイルセンター¯えらぶ"
- next "ログインパスワード¯いれる"
- next "もどる@"
-; 4a20e
-
-Function4a20e: ; 4a20e (12:620e)
- ld a, $1
- call Function1ff8
- callba Function1719c8
- call ClearBGPalettes
- call DelayFrame
- jr Function4a239
-
-Function4a221: ; 4a221 (12:6221)
- ld a, $1
- call Function1ff8
- call Function4a28a
- jr c, Function4a239
- call Function4a373
- ld a, $2
- ld [MenuSelection2], a
- jr .asm_4a235
-.asm_4a235
- pop bc
- jp Function4a149
-
-Function4a239: ; 4a239 (12:6239)
- pop bc
- jp Function4a13b
-; 4a23d (12:623d)
-
-Strings_4a23d: ; 4a23d
- db "いつも せつぞく¯する"
- next "モバイルセンター¯えらびます@"
-
- db "モバイルセンター", $1d, "せつぞくするとき"
- next "つかうパスワード¯ほぞんできます@"
-
- db "まえ%がめん ", $1d, "もどります@"
-
- db "@"
-; 4a28a
-
-Function4a28a: ; 4a28a (12:628a)
- hlcoord 2, 3
- lb bc, 6, 1
- ld a, " "
- call Function4a6d8
- call Function1bee
- call WaitBGMap
- call LoadStandardMenuDataHeader
- ld a, $5
- call GetSRAMBank
- ld a, [$aa4b]
- call CloseSRAM
- and a
- jr z, .asm_4a2df
- hlcoord 12, 0
- ld b, $5
- ld c, $6
- call Function48cdc
- hlcoord 14, 1
- ld de, String_4a34b
- call PlaceString
- callba Function104148
- call Function4a118
- call Function1bd3
- push af
- call PlayClickSFX
- pop af
- bit 1, a
- jr nz, .asm_4a33b
- ld a, [MenuSelection2]
- cp $2
- jr z, .asm_4a2f0
- cp $3
- jr z, .asm_4a33b
-.asm_4a2df
- callba Function11765d
- call ClearBGPalettes
- call Call_ExitMenu
- call LoadFontsExtra
- scf
- ret
-.asm_4a2f0
- call Function1bee
- ld hl, UnknownText_0x4a358
- call PrintText
- hlcoord 14, 7
- ld b, $3
- ld c, $4
- call TextBox
- callba Function104148
- ld hl, MenuDataHeader_0x4a362
- call LoadMenuDataHeader
- call InterpretMenu2
- bit 1, a
- jr nz, .asm_4a338
- ld a, [MenuSelection2]
- cp $2
- jr z, .asm_4a338
- ld a, $5
- call GetSRAMBank
- ld hl, $aa4b
- xor a
- ld bc, $11
- call ByteFill
- call CloseSRAM
- ld hl, UnknownText_0x4a35d
- call PrintText
- call JoyWaitAorB
-.asm_4a338
- call ExitMenu
-.asm_4a33b
- call Call_ExitMenu
- callba Function104148
- xor a
- ret
-; 4a346 (12:6346)
-
-MenuDataHeader_0x4a346: ; 0x4a346
- db $40 ; flags
- db 00, 12 ; start coords
- db 06, 19 ; end coords
-
-String_4a34b: ; 4a34b
- db "いれなおす"
- next "けす"
- next "もどる@"
-; 4a358
-
-UnknownText_0x4a358: ; 0x4a358
- ; Delete the saved LOG-IN PASSWORD?
- text_jump UnknownText_0x1c5196
- db "@"
-; 0x4a35d
-
-UnknownText_0x4a35d: ; 0x4a35d
- ; Deleted the LOG-IN PASSWORD.
- text_jump UnknownText_0x1c51b9
- db "@"
-; 0x4a362
-
-MenuDataHeader_0x4a362: ; 0x4a362
- db $40 ; flags
- db 07, 14 ; start coords
- db 11, 19 ; end coords
- dw MenuData2_0x4a36a
- db 2 ; default option
-; 0x4a36a
-
-MenuData2_0x4a36a: ; 0x4a36a
- db $e0 ; flags
- db 2 ; items
- db "はい@"
- db "いいえ@"
-; 0x4a373
-
-Function4a373: ; 4a373 (12:6373)
- ld hl, wcfa1
- ld a, $4
- ld [hli], a
- ld a, $2
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- add $2
- ld [hli], a
- ld a, $1
-rept 2
- ld [hli], a
-endr
- ret
-; 4a39a (12:639a)
-
-Function4a39a: ; 4a39a
- call Function4a485
- call Function4a492
- call Function4a3aa
- call SetPalettes
- ret
-; 4a3a7
-
-Function4a3a7: ; 4a3a7 (12:63a7)
- call Function4a485
-Function4a3aa: ; 4a3aa
- hlcoord 0, 0
- lb bc, 3, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 1, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 4, 1
- ld a, $2
- call Function4a6d8
- lb bc, 1, 1
- ld a, $3
- call Function4a6d8
- lb bc, 1, 1
- ld a, " "
- call Function4a6d8
- hlcoord 1, 0
- ld a, $1
- lb bc, 3, 18
- call Function4a6d8
- lb bc, 1, 18
- ld a, $0
- call Function4a6d8
- lb bc, 1, 18
- ld a, $1
- call Function4a6d8
- lb bc, 1, 18
- ld a, $2
- call Function4a6d8
- lb bc, 11, 18
- ld a, " "
- call Function4a6d8
- hlcoord 19, 0
- lb bc, 3, 1
- ld a, $0
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 1, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 4, 1
- ld a, $2
- call Function4a6d8
- lb bc, 1, 1
- ld a, $3
- call Function4a6d8
- lb bc, 1, 1
- ld a, " "
- call Function4a6d8
- ret
-; 4a449 (12:6449)
-
-Function4a449: ; 4a449
- ld bc, 3 * SCREEN_WIDTH
- ld a, $0
- hlcoord 0, 0
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $1
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $0
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $1
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, $2
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, $3
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, " "
- call ByteFill
- ret
-; 4a485
-
-Function4a485: ; 4a485 (12:6485)
- ld de, GFX_49c0c
- ld hl, VTiles2 tile $00
- lb bc, BANK(GFX_49c0c), $d
- call Get2bpp
- ret
-
-Function4a492: ; 4a492 (12:6492)
- call Function4936e
- ret
-
-
-MainMenu_MobileStudium: ; 4a496
- ld a, [StartDay]
- ld b, a
- ld a, [StartHour]
- ld c, a
- ld a, [StartMinute]
- ld d, a
- ld a, [StartSecond]
- ld e, a
- push bc
- push de
- callba MobileStudium
- call ClearBGPalettes
- pop de
- pop bc
- ld a, b
- ld [StartDay], a
- ld a, c
- ld [StartHour], a
- ld a, d
- ld [StartMinute], a
- ld a, e
- ld [StartSecond], a
- ret
-; 4a4c4
-
-
-Function4a4c4: ; 4a4c4 (12:64c4)
- call ClearBGPalettes
- call Function4a3a7
- call Function4a492
- call Function4a680
- call ClearBGPalettes
- ld c, 20
- call DelayFrames
- hlcoord 2, 0
- ld b, $a
- ld c, $e
- call Function48cdc
- hlcoord 4, 2
- ld de, String_4a5c5
- call PlaceString
- hlcoord 4, 4
- ld de, String_4a5cd
- call PlaceString
- hlcoord 4, 6
- ld de, String_4a5da
- call PlaceString
- hlcoord 4, 8
- ld de, String_4a5e6
- call PlaceString
- hlcoord 4, 10
- ld de, String_4a5f2
- call PlaceString
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- xor a
- ld hl, Strings_4a5f6
- ld d, h
- ld e, l
- hlcoord 1, 14
- call PlaceString
- ld a, $1
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 16
- call PlaceString
- call Function3200
- call SetPalettes
- call Function1bc9
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
- jr asm_4a54d
-
-Function4a545: ; 4a545 (12:6545)
- call Function1bd3
- ld hl, MenuSelection2
- ld b, [hl]
- push bc
-
-asm_4a54d: ; 4a54d (12:654d)
- bit 0, a
- jr nz, .asm_4a557
- bit 1, a
- jr nz, .asm_4a574
- jr .asm_4a57e
-.asm_4a557
- ld hl, MenuSelection2
- ld a, [hl]
- cp $1
- jp z, Function4a6ab
- cp $2
- jp z, Function4a6ab
- cp $3
- jp z, Function4a6ab
- cp $4
- jp z, Function4a6ab
- ld a, $1
- call Function1ff8
-.asm_4a574
- pop bc
- call ClearBGPalettes
- call ClearTileMap
- jp Function49f0a
-.asm_4a57e
- ld hl, MenuSelection2
- ld a, [hl]
- dec a
- add a
- push af
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- pop af
- inc a
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 16
- call PlaceString
- jp Function4a5b0
-
-Function4a5b0: ; 4a5b0 (12:65b0)
- call Function4a680
- pop bc
- ld hl, MenuSelection2
- ld [hl], b
- ld b, $a
- ld c, $1
- hlcoord 3, 1
- call ClearBox
- jp Function4a545
-; 4a5c5 (12:65c5)
-
-String_4a5c5: ; 4a5c5
- db "じこしょうかい@"
-String_4a5cd: ; 4a5cd
- db "たいせん ", $4a, "はじまるとき@"
-String_4a5da: ; 4a5da
- db "たいせん ", $1d, "かったとき@"
-String_4a5e6: ; 4a5e6
- db "たいせん ", $1d, "まけたとき@"
-String_4a5f2: ; 4a5f2
- db "もどる@"
-; 4a5f6
-
-Strings_4a5f6: ; 4a5f6
- db "めいし や ニュース ", $1d, "のせる@"
- db "あなた%あいさつです@"
- db "モバイル たいせん", $4a, "はじまるとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "モバイル たいせんで かったとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "モバイル たいせんで まけたとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "まえ%がめん ", $1d, "もどります@"
- db "@"
-; 4a680
-
-Function4a680: ; 4a680 (12:6680)
- ld hl, wcfa1
- ld a, $2
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $5
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- add $2
- ld [hli], a
- ld a, $1
-rept 2
- ld [hli], a
-endr
- xor a
-rept 3
- ld [hli], a
-endr
- ret
-
-Function4a6ab: ; 4a6ab (12:66ab)
- ld a, $2
- call Function1ff8
- call ClearBGPalettes
- ld b, SCGB_08
- call GetSGBLayout
- callba Function11c1ab
- pop bc
- call LoadFontsExtra
- jp Function4a4c4
-
-Function4a6c5: ; 4a6c5 (12:66c5)
- ld a, $5
- ld [MusicFade], a
- ld a, e
- ld [MusicFadeIDLo], a
- ld a, d
- ld [MusicFadeIDHi], a
- ld c, 22
- call DelayFrames
- ret
-
-Function4a6d8: ; 4a6d8 (12:66d8)
- push bc
- push hl
-.asm_4a6da
- ld [hli], a
- dec c
- jr nz, .asm_4a6da
- pop hl
- ld bc, $14
- add hl, bc
- pop bc
- dec b
- jr nz, Function4a6d8
- ret
-
-
SpecialBeastsCheck: ; 0x4a6e8
; Check if the player owns all three legendary beasts.
; They must exist in either party or PC, and have the player's OT and ID.
@@ -34882,7 +31157,7 @@
ret
; 84688
-Function84688: ; 84688
+_PrintDiploma: ; 84688
ld a, [wcf65]
push af
callba Function1dd709
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -30,7 +30,7 @@
moveperson $b, $b, $b
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
appear $b
applymovement $b, MovementData_0x198134
@@ -40,7 +40,7 @@
UnknownScript_0x198034:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
appear $b
applymovement $b, MovementData_0x19813c
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -37,7 +37,7 @@
special RestartMapMusic
loadfont
writetext UnknownText_0x19b296
- special Functionc472
+ special PlayCurMonCry
keeptextopen
writetext UnknownText_0x19b2aa
closetext
--- a/maps/BurnedTower1F.asm
+++ b/maps/BurnedTower1F.asm
@@ -49,7 +49,7 @@
UnknownScript_0x185c25:
showemote EMOTE_SHOCK, $4, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
spriteface $4, RIGHT
pause 15
@@ -98,7 +98,7 @@
loadmovesprites
dotrigger $2
setevent EVENT_RIVAL_BURNED_TOWER
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
earthquake 50
showemote EMOTE_SHOCK, PLAYER, 15
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -23,7 +23,7 @@
loadfont
writetext CeladonVendingText
.Start
- special Function24ae8
+ special PlaceMoneyTopRightOW
loadmenudata .MenuData
interpretmenu2
writebackup
--- a/maps/CeladonMansion3F.asm
+++ b/maps/CeladonMansion3F.asm
@@ -22,7 +22,7 @@
waitbutton
writetext UnknownText_0x71760
keeptextopen
- special Functionc49f
+ special Diploma
writetext UnknownText_0x71763
closetext
loadmovesprites
@@ -43,7 +43,7 @@
writetext UnknownText_0x717d8
yesorno
iffalse UnknownScript_0x716b0
- special Functionc4ac
+ special PrintDiploma
loadmovesprites
end
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -103,7 +103,7 @@
UnknownScript_0x19c0ae:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
appear $3
applymovement $3, MovementData_0x19c1ce
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -66,7 +66,7 @@
applymovement $c, MovementData_0x1a00ec
disappear $c
pause 20
- special Functionc48f
+ special Special_FadeOutMusic
playmapmusic
pause 10
.Done
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -130,7 +130,7 @@
writetext UnknownText_0x18d916
closetext
loadmovesprites
- special Functionc48f
+ special Special_FadeOutMusic
applymovement $5, MovementData_0x18d2da
loadfont
writetext UnknownText_0x18d974
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -70,7 +70,7 @@
loadmovesprites
UnknownScript_0x18c8f9:
applymovement $3, MovementData_0x18c9b3
- special Functionc48f
+ special Special_FadeOutMusic
pause 30
special RestartMapMusic
disappear $3
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -61,7 +61,7 @@
.Flamethrower:
writebyte $1
writetext UnknownText_0x1991cf
- special Function4925b
+ special Special_MoveTutor
if_equal $0, .TeachMove
jump .Incompatible
@@ -68,7 +68,7 @@
.Thunderbolt:
writebyte $2
writetext UnknownText_0x1991cf
- special Function4925b
+ special Special_MoveTutor
if_equal $0, .TeachMove
jump .Incompatible
@@ -75,7 +75,7 @@
.IceBeam:
writebyte $3
writetext UnknownText_0x1991cf
- special Function4925b
+ special Special_MoveTutor
if_equal $0, .TeachMove
jump .Incompatible
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -9,7 +9,7 @@
loadfont
writetext GoldenrodVendingText
.Start
- special Function24ae8
+ special PlaceMoneyTopRightOW
loadmenudata .MenuData
interpretmenu2
writebackup
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -449,7 +449,7 @@
loadmovesprites
pause 20
showemote EMOTE_SHOCK, PLAYER, 20
- special Functionc48f
+ special Special_FadeOutMusic
applymovement PLAYER, MovementData_0x6ef58
pause 30
spriteface PLAYER, DOWN
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ b/maps/IndigoPlateauPokeCenter1F.asm
@@ -55,7 +55,7 @@
appear $5
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
applymovement $5, MovementData_0x180164
playmusic MUSIC_RIVAL_ENCOUNTER
@@ -76,7 +76,7 @@
appear $5
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
applymovement $5, MovementData_0x18016b
playmusic MUSIC_RIVAL_ENCOUNTER
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -40,7 +40,7 @@
writetext UnknownText_0x18e473
closetext
loadmovesprites
- special Functionc48f
+ special Special_FadeOutMusic
setevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
checkcode VAR_FACING
if_equal UP, .RunAround
@@ -287,7 +287,7 @@
setevent EVENT_FOREST_IS_RESTLESS
clearevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
clearevent EVENT_GAVE_GS_BALL_TO_KURT
- special Functionc48f
+ special Special_FadeOutMusic
pause 20
showemote EMOTE_SHOCK, $2, 30
checkcode VAR_FACING
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -44,12 +44,12 @@
end
UnknownScript_0x180e6a:
- special Functionc48f
+ special Special_FadeOutMusic
applymovement PLAYER, MovementData_0x180f38
jump LanceScript_0x180e7b
UnknownScript_0x180e74:
- special Functionc48f
+ special Special_FadeOutMusic
applymovement PLAYER, MovementData_0x180f3c
LanceScript_0x180e7b:
spriteface $2, LEFT
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -51,7 +51,7 @@
UnknownScript_0x190040:
loadfont
writetext UnknownText_0x1900b0
- special Function24ae8
+ special PlaceMoneyTopRightOW
yesorno
iffalse UnknownScript_0x190072
checkmoney $0, 300
@@ -61,7 +61,7 @@
waitbutton
playsound SFX_TRANSACTION
takemoney $0, 300
- special Function24ae8
+ special PlaceMoneyTopRightOW
writetext UnknownText_0x19014a
closetext
loadmovesprites
--- a/maps/MountMoon.asm
+++ b/maps/MountMoon.asm
@@ -19,7 +19,7 @@
UnknownScript_0x7408e:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
applymovement $2, MovementData_0x740f9
playmusic MUSIC_RIVAL_ENCOUNTER
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -25,7 +25,7 @@
UnknownScript_0x1a8833:
spriteface PLAYER, LEFT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
playsound SFX_ENTER_DOOR
appear $5
@@ -49,7 +49,7 @@
UnknownScript_0x1a886b:
spriteface PLAYER, LEFT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
playsound SFX_ENTER_DOOR
appear $5
--- a/maps/PokeCenter2F.asm
+++ b/maps/PokeCenter2F.asm
@@ -581,7 +581,7 @@
MapPokeCenter2FSignpost0Script:
refreshscreen $0
- special Functionc2da
+ special Special_DisplayLinkRecord
loadmovesprites
end
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -140,7 +140,7 @@
writetext UnknownText_0x5e054
closetext
loadmovesprites
- special Functionc48f
+ special Special_FadeOutMusic
pause 20
special RestartMapMusic
checkcode VAR_BLUECARDBALANCE
@@ -169,7 +169,7 @@
closetext
loadmovesprites
spriteface $b, RIGHT
- special Functionc48f
+ special Special_FadeOutMusic
pause 20
special RestartMapMusic
end
@@ -200,7 +200,7 @@
closetext
loadmovesprites
spriteface $b, RIGHT
- special Functionc48f
+ special Special_FadeOutMusic
pause 20
special RestartMapMusic
end
--- a/maps/Route24.asm
+++ b/maps/Route24.asm
@@ -21,7 +21,7 @@
loadfont
writetext UnknownText_0x1addc0
keeptextopen
- special Functionc48f
+ special Special_FadeOutMusic
writetext UnknownText_0x1adee1
closetext
loadmovesprites
--- a/maps/Route39Farmhouse.asm
+++ b/maps/Route39Farmhouse.asm
@@ -20,7 +20,7 @@
checkitem MOOMOO_MILK
iftrue UnknownScript_0x9cf08
writetext UnknownText_0x9cfe1
- special Function24ae8
+ special PlaceMoneyTopRightOW
yesorno
iffalse UnknownScript_0x9cf02
checkmoney $0, 500
@@ -28,7 +28,7 @@
giveitem MOOMOO_MILK
iffalse UnknownScript_0x9cefc
takemoney $0, 500
- special Function24ae8
+ special PlaceMoneyTopRightOW
waitbutton
playsound SFX_TRANSACTION
writetext UnknownText_0x9d05d
--- a/maps/SilverCaveRoom3.asm
+++ b/maps/SilverCaveRoom3.asm
@@ -6,7 +6,7 @@
db 0
RedScript_0x18c603:
- special Functionc48f
+ special Special_FadeOutMusic
faceplayer
loadfont
writetext UnknownText_0x18c637
@@ -17,7 +17,7 @@
startbattle
reloadmapmusic
returnafterbattle
- special Functionc48f
+ special Special_FadeOutMusic
loadfont
writetext UnknownText_0x18c63f
closetext
--- a/maps/SproutTower3F.asm
+++ b/maps/SproutTower3F.asm
@@ -18,7 +18,7 @@
UnknownScript_0x184947:
spriteface PLAYER, UP
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
playsound SFX_TACKLE
playsound SFX_ELEVATOR
earthquake 79
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -55,7 +55,7 @@
UnknownScript_0x6e019:
spriteface PLAYER, LEFT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
appear $a
applymovement $a, MovementData_0x6e164
spriteface PLAYER, LEFT
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -158,7 +158,7 @@
playsound SFX_EXIT_BUILDING
disappear $5
waitbutton
- special Functionc48f
+ special Special_FadeOutMusic
pause 20
playmapmusic
end
--- a/maps/UndergroundPathSwitchRoomEntrances.asm
+++ b/maps/UndergroundPathSwitchRoomEntrances.asm
@@ -80,7 +80,7 @@
UnknownScript_0x7ca80:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
playsound SFX_EXIT_BUILDING
appear $c
@@ -99,7 +99,7 @@
UnknownScript_0x7caaa:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
playsound SFX_EXIT_BUILDING
appear $c
--- a/maps/VictoryRoad.asm
+++ b/maps/VictoryRoad.asm
@@ -19,7 +19,7 @@
moveperson $2, $12, $b
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
appear $2
applymovement $2, MovementData_0x74539
@@ -33,7 +33,7 @@
UnknownScript_0x744b5:
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
- special Functionc48f
+ special Special_FadeOutMusic
pause 15
appear $2
applymovement $2, MovementData_0x74542
--- a/maps/WarehouseEntrance.asm
+++ b/maps/WarehouseEntrance.asm
@@ -186,7 +186,7 @@
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
iftrue .AlreadyGotHaircut
- special Function24ae8
+ special PlaceMoneyTopRightOW
writetext UnknownText_0x7c5f9
yesorno
iffalse .Refused
@@ -222,7 +222,7 @@
.then:
takemoney $0, 500
- special Function24ae8
+ special PlaceMoneyTopRightOW
writetext UnknownText_0x7c6b8
closetext
loadmovesprites
@@ -269,7 +269,7 @@
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
iftrue .AlreadyGotHaircut
- special Function24ae8
+ special PlaceMoneyTopRightOW
writetext UnknownText_0x7c75c
yesorno
iffalse .Refused
@@ -305,7 +305,7 @@
.then:
takemoney $0, 300
- special Function24ae8
+ special PlaceMoneyTopRightOW
writetext UnknownText_0x7c80e
closetext
loadmovesprites
@@ -343,7 +343,7 @@
UnknownScript_0x7c2bb:
writetext HaircutBrosText_SlightlyHappier
- special Functionc472
+ special PlayCurMonCry
closetext
loadmovesprites
end
@@ -350,7 +350,7 @@
UnknownScript_0x7c2c4:
writetext HaircutBrosText_Happier
- special Functionc472
+ special PlayCurMonCry
closetext
loadmovesprites
end
@@ -357,7 +357,7 @@
UnknownScript_0x7c2cd:
writetext HaircutBrosText_MuchHappier
- special Functionc472
+ special PlayCurMonCry
closetext
loadmovesprites
end
--- /dev/null
+++ b/misc/mobile_12.asm
@@ -1,0 +1,1829 @@
+Function4802f: ; 4802f (12:402f)
+ xor a
+ set 6, a
+ ld [wd002], a
+ ld hl, wd003
+ set 0, [hl]
+ ld a, c
+ and a
+ call z, Function48000
+ call ClearBGPalettes
+ call Function48d3d
+ ld a, [wd479]
+ bit 1, a
+ jr z, .asm_4805a
+ ld a, [wd003]
+ set 0, a
+ set 1, a
+ set 2, a
+ set 3, a
+ ld [wd003], a
+.asm_4805a
+ call Function486bf
+ call LoadFontsExtra
+ ld de, GFX_488c3
+ ld hl, VTiles2 tile $10
+ lb bc, BANK(GFX_488c3), 1
+ call Request1bpp
+ ld de, GFX_488cb
+ ld hl, VTiles2 tile $11
+ lb bc, BANK(GFX_488cb), 1
+ call Request1bpp
+ call Function4a3a7
+ call ClearBGPalettes
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4808a
+ call Function48689
+ jr .asm_480d7
+.asm_4808a
+ ld a, $5
+ ld [MusicFade], a
+ ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
+ ld [MusicFadeIDLo], a
+ ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
+ ld [MusicFadeIDHi], a
+ ld c, 20
+ call DelayFrames
+ ld b, $1
+ call Function4930f
+ call ClearBGPalettes
+ hlcoord 0, 0
+ ld b, $2
+ ld c, $14
+ call ClearBox
+ hlcoord 0, 1
+ ld a, $c
+ ld [hl], a
+ ld bc, $13
+ add hl, bc
+ ld [hl], a
+ ld de, MobileProfileString
+ hlcoord 1, 1
+ call PlaceString
+ hlcoord 0, 2
+ ld b, $a
+ ld c, $12
+ call Function48cdc
+ hlcoord 2, 4
+ ld de, String_48482
+ call PlaceString
+.asm_480d7
+ hlcoord 2, 6
+ ld de, String_48489
+ call PlaceString
+ hlcoord 2, 8
+ ld de, String_4848d
+ call PlaceString
+ hlcoord 2, 10
+ ld de, String_48495
+ call PlaceString
+ hlcoord 2, 12
+ ld de, String_4849e
+ call PlaceString
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_48113
+ ld a, [PlayerGender]
+ ld hl, Strings_484fb
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 11, 4
+ call PlaceString
+.asm_48113
+ hlcoord 11, 6
+ call Function487ec
+ ld a, [wd474]
+ dec a
+ ld hl, Prefectures
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 11, 8
+ call PlaceString
+ hlcoord 11, 10
+ call Function489ea
+ hlcoord 0, 14
+ ld b, $2
+ ld c, $12
+ call TextBox
+ hlcoord 1, 16
+ ld de, String_48275
+ call PlaceString
+ call Function48187
+ call Function3200
+ call SetPalettes
+ call Function1bc9
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+ jr asm_4815f
+
+Function48157: ; 48157 (12:4157)
+ call Function1bd3
+ ld hl, MenuSelection2
+ ld b, [hl]
+ push bc
+
+asm_4815f: ; 4815f (12:415f)
+ bit 0, a
+ jp nz, Function4820d
+ ld b, a
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_48177
+ ld hl, wd479
+ bit 1, [hl]
+ jr z, .asm_48177
+ bit 1, b
+ jr nz, .asm_4817a
+.asm_48177
+ jp Function48272
+.asm_4817a
+ call ClearBGPalettes
+ call Function48d30
+ pop bc
+ call ClearTileMap
+ ld a, $ff
+ ret
+
+Function48187: ; 48187 (12:4187)
+ ld a, [wd479]
+ bit 1, a
+ jr nz, .asm_481f1
+ ld a, [wd003]
+ ld d, a
+ call Function48725
+ jr c, .asm_481a2
+ lb bc, 1, 4
+ hlcoord 2, 12
+ call ClearBox
+ jr .asm_481ad
+.asm_481a2
+ push de
+ hlcoord 2, 12
+ ld de, String_4849e
+ call PlaceString
+ pop de
+.asm_481ad
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_481c1
+ bit 0, d
+ jr nz, .asm_481c1
+ lb bc, 1, 8
+ hlcoord 11, 4
+ call ClearBox
+.asm_481c1
+ bit 1, d
+ jr nz, .asm_481ce
+ lb bc, 1, 8
+ hlcoord 11, 6
+ call ClearBox
+.asm_481ce
+ bit 2, d
+ jr nz, .asm_481db
+ lb bc, 2, 8
+ hlcoord 11, 7
+ call ClearBox
+.asm_481db
+ bit 3, d
+ jr nz, .asm_481f1
+ ld a, [wd479]
+ bit 0, a
+ jr nz, .asm_481f8
+ lb bc, 1, 8
+ hlcoord 11, 10
+ call ClearBox
+ jr .asm_48201
+.asm_481f1
+ ld a, [wd479]
+ bit 0, a
+ jr nz, .asm_48201
+.asm_481f8
+ hlcoord 11, 10
+ ld de, String_48202
+ call PlaceString
+.asm_48201
+ ret
+; 48202 (12:4202)
+
+String_48202: ; 48202
+ db "Tell Later@"
+; 4820d
+
+Function4820d: ; 4820d (12:420d)
+ call Function1bee
+ ld hl, MenuSelection2
+ ld a, [hl]
+ push af
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4821f
+ pop af
+ inc a
+ push af
+.asm_4821f
+ pop af
+ cp $1
+ jr z, asm_4828d
+ cp $2
+ jp z, Function4876f
+ cp $3
+ jp z, Function48304
+ cp $4
+ jp z, Function488d3
+ ld a, $2
+ call Function1ff8
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4825c
+ jr .asm_4825c
+; 48241 (12:4241)
+
+ hlcoord 1, 15
+ ld b, $2
+ ld c, $12
+ call ClearBox
+ ld de, String_484a1
+ hlcoord 1, 16
+ call PlaceString
+ call WaitBGMap
+ ld c, 48
+ call DelayFrames
+
+.asm_4825c
+ call ClearBGPalettes
+ call Function48d30
+ pop bc
+ call ClearTileMap
+ ld b, SCGB_08
+ call GetSGBLayout
+ ld hl, wd479
+ set 1, [hl]
+ xor a
+ ret
+
+Function48272: ; 48272 (12:4272)
+ jp Function4840c
+; 48275 (12:4275)
+
+String_48275: ; 48275
+ db "Personal Info@"
+; 48283
+
+Function48283: ; 48283 (12:4283)
+ lb bc, 2, 18
+ hlcoord 1, 15
+ call ClearBox
+ ret
+
+asm_4828d: ; 4828d (12:428d)
+ call Function48283
+ hlcoord 1, 16
+ ld de, String_484b1
+ call PlaceString
+ ld hl, MenuDataHeader_0x484f1
+ call LoadMenuDataHeader
+ call Function4873c
+ hlcoord 11, 2
+ ld b, $4
+ ld c, $7
+ call Function48cdc
+ hlcoord 13, 4
+ ld de, String_484fb
+ call PlaceString
+ hlcoord 13, 6
+ ld de, String_484ff
+ call PlaceString
+ call WaitBGMap
+ ld a, [PlayerGender]
+ inc a
+ ld [wMenuCursorBuffer], a
+ call Function1bc9
+ call PlayClickSFX
+ call ExitMenu
+ bit 0, a
+ jp z, Function4840c
+ ld hl, MenuSelection2
+ ld a, [hl]
+ ld hl, Strings_484fb
+ cp $1
+ jr z, .asm_482ed
+.asm_482e1
+ ld a, [hli]
+ cp $50
+ jr nz, .asm_482e1
+ ld a, $1
+ ld [PlayerGender], a
+ jr .asm_482f1
+.asm_482ed
+ xor a
+ ld [PlayerGender], a
+.asm_482f1
+ ld d, h
+ ld e, l
+ hlcoord 11, 4
+ call PlaceString
+ ld a, [wd003]
+ set 0, a
+ ld [wd003], a
+ jp Function4840c
+
+Function48304: ; 48304 (12:4304)
+ call Function48283
+ hlcoord 1, 16
+ ld de, String_484cf
+ call PlaceString
+ ld hl, MenuDataHeader_0x48504
+ call LoadMenuDataHeader
+ ld hl, MenuDataHeader_0x48513
+ call LoadMenuDataHeader
+ hlcoord 10, 0
+ ld b, $c
+ ld c, $8
+ call Function48cdc
+ ld a, [wMenuCursorBuffer]
+ ld b, a
+ ld a, [wd0e4]
+ ld c, a
+ push bc
+ ld a, [wd474]
+ dec a
+ cp $29
+ jr c, .asm_4833f
+ sub $29
+ inc a
+ ld [wMenuCursorBuffer], a
+ ld a, $29
+.asm_4833f
+ ld [wd0e4], a
+ callba Function104148
+.asm_48348
+ call HandleScrollingMenu
+ ld de, $629
+ call Function48383
+ jr c, .asm_48348
+ ld d, a
+ pop bc
+ ld a, b
+ ld [wMenuCursorBuffer], a
+ ld a, c
+ ld [wd0e4], a
+ ld a, d
+ push af
+ call ExitMenu
+ call ExitMenu
+ pop af
+ ld a, [hJoyPressed]
+ bit 0, a
+ jr z, .asm_48377
+ call Function483bb
+ ld a, [wd003]
+ set 2, a
+ ld [wd003], a
+.asm_48377
+ call Function48187
+ callba Function104148
+ jp Function4840c
+
+Function48383: ; 48383 (12:4383)
+ push bc
+ push af
+ bit 5, a
+ jr nz, .asm_48390
+ bit 4, a
+ jr nz, .asm_4839f
+ and a
+ jr .asm_483b7
+.asm_48390
+ ld a, [wd0e4]
+ sub d
+ ld [wd0e4], a
+ jr nc, .asm_483af
+ xor a
+ ld [wd0e4], a
+ jr .asm_483af
+.asm_4839f
+ ld a, [wd0e4]
+ add d
+ ld [wd0e4], a
+ cp e
+ jr c, .asm_483af
+ ld a, e
+ ld [wd0e4], a
+ jr .asm_483af
+.asm_483af
+ ld hl, MenuSelection2
+ ld a, [hl]
+ ld [wMenuCursorBuffer], a
+ scf
+.asm_483b7
+ pop bc
+ ld a, b
+ pop bc
+ ret
+
+Function483bb: ; 483bb (12:43bb)
+ ld hl, wcf77
+ ld a, [hl]
+ inc a
+ ld [wd474], a
+ dec a
+ ld b, a
+ ld hl, Prefectures
+.asm_483c8
+ and a
+ jr z, .asm_483d5
+.asm_483cb
+ ld a, [hli]
+ cp "@"
+ jr nz, .asm_483cb
+ ld a, b
+ dec a
+ ld b, a
+ jr .asm_483c8
+.asm_483d5
+ ld d, h
+ ld e, l
+ ld b, $2
+ ld c, $8
+ hlcoord 11, 7
+ call ClearBox
+ hlcoord 11, 8
+ call PlaceString
+ ret
+; 483e8 (12:43e8)
+
+Function483e8: ; 483e8
+ push de
+ ld hl, Prefectures
+ ld a, [MenuSelection]
+ cp $ff
+ jr nz, .asm_483f8
+ ld hl, Wakayama ; last string
+ jr .asm_48405
+
+.asm_483f8
+ ld d, a
+ and a
+ jr z, .asm_48405
+.asm_483fc
+ ld a, [hli]
+ cp "@"
+ jr nz, .asm_483fc
+ ld a, d
+ dec a
+ jr .asm_483f8
+
+.asm_48405
+ ld d, h
+ ld e, l
+ pop hl
+ call PlaceString
+ ret
+; 4840c
+
+Function4840c: ; 4840c (12:440c)
+ call Function48187
+ call Function48283
+ hlcoord 1, 16
+ ld de, String_48275
+ call PlaceString
+ call Function486bf
+ pop bc
+ ld hl, MenuSelection2
+ ld [hl], b
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_48437
+ ld b, $9
+ ld c, $1
+ hlcoord 1, 4
+ call ClearBox
+ jp Function48157
+.asm_48437
+ ld b, $7
+ ld c, $1
+ hlcoord 1, 6
+ call ClearBox
+ jp Function48157
+
+Function48444: ; 48444 (12:4444)
+ push bc
+ push af
+ push de
+ push hl
+ ld hl, Unknown_4845d
+.asm_4844b
+ and a
+ jr z, .asm_48453
+rept 2
+ inc hl
+endr
+ dec a
+ jr .asm_4844b
+.asm_48453
+ ld d, h
+ ld e, l
+ pop hl
+ call PlaceString
+ pop de
+ pop af
+ pop bc
+ ret
+; 4845d (12:445d)
+
+Unknown_4845d: ; 4845d
+; 4845d
+ db "0@"
+ db "1@"
+ db "2@"
+ db "3@"
+ db "4@"
+ db "5@"
+ db "6@"
+ db "7@"
+ db "8@"
+ db "9@"
+; 48471
+
+MobileProfileString: db " Mobile Profile@"
+String_48482: db "Gender@"
+String_48489: db "Age@"
+String_4848d: db "Address@"
+String_48495: db "Zip Code@"
+String_4849e: db "OK@"
+String_484a1: db "Profile Changed@"
+String_484b1: db "Boy or girl?@"
+String_484be: db "How old are you?@"
+String_484cf: db "Where do you live?@"
+String_484e2: db "Your zip code?@"
+; 484f1
+
+MenuDataHeader_0x484f1: ; 0x484f1
+ db $40 ; flags
+ db 02, 11 ; start coords
+ db 07, 19 ; end coords
+ dw MenuData2_0x484f9
+ db 1 ; default option
+; 0x484f9
+
+MenuData2_0x484f9: ; 0x484f9
+ db $a0 ; flags
+ db 2 ; items
+Strings_484fb:
+String_484fb: db "Boy@"
+String_484ff: db "Girl@"
+; 0x48504
+
+MenuDataHeader_0x48504: ; 0x48504
+ db $40 ; flags
+ db 00, 10 ; start coords
+ db 17, 19 ; end coords
+
+MenuDataHeader_0x48509: ; 0x48509
+ db $40 ; flags
+ db 05, 10 ; start coords
+ db 07, 19 ; end coords
+
+MenuDataHeader_0x4850e: ; 0x4850e
+ db $40 ; flags
+ db 09, 10 ; start coords
+ db 11, 19 ; end coords
+
+MenuDataHeader_0x48513: ; 0x48513
+ db $40 ; flags
+ db 01, 11 ; start coords
+ db 12, 18 ; end coords
+ dw MenuData2_0x4851b
+ db 1 ; default option
+; 0x4851b
+
+MenuData2_0x4851b: ; 0x4851b
+ db $1d ; flags
+ db 6 ; items
+
+Unknown_4851d: ; 4851d
+ db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04
+ db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f, $10, $11, $12, $13, $14, $15, $16, $17, $18
+ db $19, $1a, $1b, $1c, $1d, $1e, $1f, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c
+ db $2d, $ff
+
+Prefectures:
+Aichi: db "あいちけん@" ; Aichi
+Aomori: db "あおもりけん@" ; Aomori
+Akita: db "あきたけん@" ; Akita
+Ishikawa: db "いしかわけん@" ; Ishikawa
+Ibaraki: db "いばらきけん@" ; Ibaraki
+Iwate: db "いわてけん@" ; Iwate
+Ehime: db "えひめけん@" ; Ehime
+Oita: db "おおいたけん@" ; Oita
+Osakafu: db "おおさかふ@" ; Osakafu
+Okayama: db "おかやまけん@" ; Okayama
+Okinawa: db "おきなわけん@" ; Okinawa
+Kagawa: db "かがわけん@" ; Kagawa
+Kagoshima: db "かごしまけん@" ; Kagoshima
+Kanagawa: db "かながわけん@" ; Kanagawa
+Gifu: db "ぎふけん@" ; Gifu
+Kyotofu: db "きょうとふ@" ; Kyotofu
+Kumamoto: db "くまもとけん@" ; Kumamoto
+Gunma: db "ぐんまけん@" ; Gunma
+Kochi: db "こうちけん@" ; Kochi
+Saitama: db "さいたまけん@" ; Saitama
+Saga: db "さがけん@" ; Saga
+Shiga: db "しがけん@" ; Shiga
+Shizuoka: db "しずおかけん@" ; Shizuoka
+Shimane: db "しまねけん@" ; Shimane
+Chiba: db "ちばけん@" ; Chiba
+Tokyo: db "とうきょうと@" ; Tokyo
+Tokushima: db "とくしまけん@" ; Tokushima
+Tochigi: db "とちぎけん@" ; Tochigi
+Tottori: db "とっとりけん@" ; Tottori
+Toyama: db "とやまけん@" ; Toyama
+Nagasaki: db "ながさきけん@" ; Nagasaki
+Nagano: db "ながのけん@" ; Nagano
+Naraken: db "ならけん@" ; Naraken
+Niigata: db "にいがたけん@" ; Niigata
+Hyogo: db "ひょうごけん@" ; Hyogo
+Hiroshima: db "ひろしまけん@" ; Hiroshima
+Fukui: db "ふくいけん@" ; Fukui
+Fukuoka: db "ふくおかけん@" ; Fukuoka
+Fukushima: db "ふくしまけん@" ; Fukushima
+Hokkaido: db "ほっかいどう@" ; Hokkaido
+Mie: db "みえけん@" ; Mie
+Miyagi: db "みやぎけん@" ; Miyagi
+Miyazaki: db "みやざきけん@" ; Miyazaki
+Yamagata: db "やまがたけん@" ; Yamagata
+Yamaguchi: db "やまぐちけん@" ; Yamaguchi
+Yamanashi: db "やまなしけん@" ; Yamanashi
+Wakayama: db "わかやまけん@" ; Wakayama
+; 48689
+
+Function48689: ; 48689 (12:4689)
+ ld c, 7
+ call DelayFrames
+ ld b, $1
+ call Function4930f
+ call ClearBGPalettes
+ hlcoord 0, 0
+ ld b, $4
+ ld c, $14
+ call ClearBox
+ hlcoord 0, 2
+ ld a, $c
+ ld [hl], a
+ ld bc, $13
+ add hl, bc
+ ld [hl], a
+ ld de, MobileProfileString
+ hlcoord 1, 2
+ call PlaceString
+ hlcoord 0, 4
+ ld b, $8
+ ld c, $12
+ call Function48cdc
+ ret
+
+Function486bf: ; 486bf (12:46bf)
+ ld hl, wcfa1
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_486ce
+ ld a, $4
+ ld [hli], a
+ jr .asm_486d1
+.asm_486ce
+ ld a, $6
+ ld [hli], a
+.asm_486d1
+ ld a, $1
+ ld [hli], a
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_486e7
+ call Function48725
+ ld a, $4
+ jr nc, .asm_486e4
+ ld a, $5
+.asm_486e4
+ ld [hli], a
+ jr .asm_486fb
+.asm_486e7
+ ld a, [wd479]
+ bit 1, a
+ jr nz, .asm_486f8
+ call Function48725
+ jr c, .asm_486f8
+ ld a, $3
+ ld [hli], a
+ jr .asm_486fb
+.asm_486f8
+ ld a, $4
+ ld [hli], a
+.asm_486fb
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ push af
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4871a
+ pop af
+ add $2
+ push af
+.asm_4871a
+ pop af
+ ld [hli], a
+ ld a, $1
+rept 2
+ ld [hli], a
+endr
+ xor a
+rept 3
+ ld [hli], a
+endr
+ ret
+
+Function48725: ; 48725 (12:4725)
+ ld a, [wd003]
+ bit 0, a
+ jr z, .asm_4873a
+ bit 1, a
+ jr z, .asm_4873a
+ bit 2, a
+ jr z, .asm_4873a
+ bit 3, a
+ jr z, .asm_4873a
+ scf
+ ret
+.asm_4873a
+ and a
+ ret
+
+Function4873c: ; 4873c (12:473c)
+ ld hl, wcfa1
+ ld a, $4
+ ld [hli], a
+ ld a, $c
+ ld [hli], a
+ ld a, $2
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $2
+ ld [hli], a
+ ld a, [PlayerGender]
+ and a
+ jr z, .asm_48764
+ ld a, $2
+ jr .asm_48766
+.asm_48764
+ ld a, $1
+.asm_48766
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ xor a
+rept 3
+ ld [hli], a
+endr
+ ret
+
+Function4876f: ; 4876f (12:476f)
+ call Function48283
+ hlcoord 1, 16
+ ld de, String_484be
+ call PlaceString
+ ld hl, MenuDataHeader_0x48509
+ call LoadMenuDataHeader
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ call WaitBGMap
+ ld a, [wd473]
+ and a
+ jr z, .asm_487ab
+ cp $64
+ jr z, .asm_487b2
+ hlcoord 12, 5
+ ld [hl], $10
+ hlcoord 12, 7
+ ld [hl], $11
+ jr .asm_487b7
+.asm_487ab
+ hlcoord 12, 5
+ ld [hl], $10
+ jr .asm_487b7
+.asm_487b2
+ hlcoord 12, 7
+ ld [hl], $11
+.asm_487b7
+ hlcoord 11, 6
+ call Function487ec
+ ld c, 10
+ call DelayFrames
+ ld a, [wd473]
+ push af
+.asm_487c6
+ call JoyTextDelay
+ call Function4880e
+ jr nc, .asm_487c6
+ ld a, $1
+ call Function1ff8
+ pop bc
+ jr nz, .asm_487da
+ ld a, b
+ ld [wd473], a
+.asm_487da
+ ld a, [wd473]
+ call ExitMenu
+ hlcoord 11, 6
+ call Function487ec
+ pop af
+ ld [hInMenu], a
+ jp Function4840c
+
+Function487ec: ; 487ec (12:47ec)
+ push hl
+ ld de, wd473
+ call Function487ff
+ pop hl
+rept 4
+ inc hl
+endr
+ ld de, String_4880d
+ call PlaceString
+ ret
+
+Function487ff: ; 487ff (12:47ff)
+ push hl
+ ld a, " "
+ ld [hli], a
+ ld [hl], a
+ pop hl
+ ld b, PRINTNUM_LEADINGZEROS | 1
+ ld c, 3
+ call PrintNum
+ ret
+; 4880d (12:480d)
+
+String_4880d: ; 4880d
+ db "@"
+; 4880e
+
+Function4880e: ; 4880e (12:480e)
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jp nz, Function488b9
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jp nz, Function488b4
+ ld hl, hJoyLast
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_48843
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_48838
+ ld a, [hl]
+ and D_LEFT
+ jr nz, .asm_4884f
+ ld a, [hl]
+ and D_RIGHT
+ jr nz, .asm_4885f
+ call DelayFrame
+ and a
+ ret
+.asm_48838
+ ld hl, wd473
+ ld a, [hl]
+ and a
+ jr z, .asm_48840
+ dec a
+.asm_48840
+ ld [hl], a
+ jr .asm_4886f
+.asm_48843
+ ld hl, wd473
+ ld a, [hl]
+ cp $64
+ jr nc, .asm_4884c
+ inc a
+.asm_4884c
+ ld [hl], a
+ jr .asm_4886f
+.asm_4884f
+ ld a, [wd473]
+ cp $5b
+ jr c, .asm_48858
+ ld a, $5a
+.asm_48858
+ add $a
+ ld [wd473], a
+ jr .asm_4886f
+.asm_4885f
+ ld a, [wd473]
+ cp $a
+ jr nc, .asm_48868
+ ld a, $a
+.asm_48868
+ sub $a
+ ld [wd473], a
+ jr .asm_4886f
+.asm_4886f
+ ld a, [wd473]
+ and a
+ jr z, .asm_48887
+ cp $64
+ jr z, .asm_48898
+ jr z, .asm_488a7
+ hlcoord 12, 5
+ ld [hl], $10
+ hlcoord 12, 7
+ ld [hl], $11
+ jr .asm_488a7
+.asm_48887
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 5
+ ld [hl], $10
+ jr .asm_488a7
+.asm_48898
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 7
+ ld [hl], $11
+.asm_488a7
+ hlcoord 11, 6
+ call Function487ec
+ call WaitBGMap
+ ld a, $1
+ and a
+ ret
+
+Function488b4: ; 488b4 (12:48b4)
+ ld a, $0
+ and a
+ scf
+ ret
+
+Function488b9: ; 488b9 (12:48b9)
+ ld a, [wd003]
+ set 1, a
+ ld [wd003], a
+ scf
+ ret
+; 488c3 (12:48c3)
+
+GFX_488c3: ; 488c3
+INCBIN "gfx/unknown/0488c3.2bpp"
+
+GFX_488cb: ; 488cb
+INCBIN "gfx/unknown/0488cb.2bpp"
+
+Function488d3: ; 488d3 (12:48d3)
+ call Function48283
+ hlcoord 1, 16
+ ld de, String_484e2
+ call PlaceString
+ call Function48a3a
+ jp c, Function4840c
+ ld hl, MenuDataHeader_0x4850e
+ call LoadMenuDataHeader
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ ld a, [wd475]
+ and $f
+ ld d, $0
+ hlcoord 11, 10
+ call Function489ea
+ call WaitBGMap
+ ld a, [wd475]
+ ld b, a
+ ld a, [wd476]
+ ld c, a
+ ld a, [wd477]
+ ld d, a
+ ld a, [wd478]
+ ld e, a
+ push de
+ push bc
+ ld d, $0
+ ld b, $0
+
+asm_48922: ; 48922 (12:4922)
+ push bc
+ call JoyTextDelay
+ ld a, [hJoyDown]
+ and a
+ jp z, Function4896e
+ bit 0, a
+ jp nz, Function4896e
+ bit 1, a
+ jp nz, Function4896e
+ ld a, [wd002]
+ and %11001111
+ res 7, a
+ ld [wd002], a
+ pop bc
+ inc b
+ ld a, b
+ cp $5
+ push bc
+ jr c, .asm_4894c
+ pop bc
+ ld b, $4
+ push bc
+.asm_4894c
+ pop bc
+ push bc
+ ld a, b
+ cp $4
+ jr nz, asm_48972
+ ld c, 10
+ call DelayFrames
+ jr asm_48972
+; 4895a (12:495a)
+
+Function4895a: ; 4895a
+ ld a, [hJoyPressed]
+ and a
+ jr z, .asm_48965
+ pop bc
+ ld b, $1
+ push bc
+ jr asm_48972
+
+.asm_48965
+ ld a, [hJoyLast]
+ and a
+ jr z, asm_48972
+
+ pop bc
+ ld b, $1
+ push bc
+
+Function4896e: ; 4896e (12:496e)
+ pop bc
+ ld b, $0
+ push bc
+
+asm_48972: ; 48972 (12:4972)
+ call Function48ab5
+ push af
+ cp $f0
+ jr z, .asm_48994
+ cp $f
+ jr nz, .asm_48988
+ ld a, [wd002]
+ set 7, a
+ and $cf
+ ld [wd002], a
+.asm_48988
+ hlcoord 11, 10
+ ld b, $0
+ ld c, d
+ add hl, bc
+ ld b, $3
+ call Function48c11
+.asm_48994
+ call WaitBGMap
+ pop af
+ pop bc
+ jr nc, asm_48922
+ jr nz, .asm_489b1
+ pop bc
+ ld a, b
+ ld [wd475], a
+ ld a, c
+ ld [wd476], a
+ pop bc
+ ld a, b
+ ld [wd477], a
+ ld a, c
+ ld [wd478], a
+ jr .asm_489c5
+.asm_489b1
+ push af
+ ld a, [wd479]
+ set 0, a
+ ld [wd479], a
+ ld a, [wd003]
+ set 3, a
+ ld [wd003], a
+ pop af
+ pop bc
+ pop bc
+.asm_489c5
+ push af
+ push bc
+ push de
+ push hl
+ ld a, $1
+ call Function1ff8
+ pop hl
+ pop de
+ pop bc
+ pop af
+ call ExitMenu
+ hlcoord 11, 10
+ call Function489ea
+ hlcoord 11, 9
+ lb bc, 1, 8
+ call ClearBox
+ pop af
+ ld [hInMenu], a
+ jp Function4840c
+
+Function489ea: ; 489ea (12:49ea)
+ push de
+ ld a, [wd475]
+ and $f
+ call Function48444
+ ld a, [wd476]
+ and $f0
+ swap a
+ inc hl
+ call Function48444
+ ld a, [wd476]
+ and $f
+ inc hl
+ call Function48444
+ inc hl
+ ld de, String_48a38
+ call PlaceString
+ ld a, [wd477]
+ and $f0
+ swap a
+ inc hl
+ call Function48444
+ ld a, [wd477]
+ and $f
+ inc hl
+ call Function48444
+ ld a, [wd478]
+ and $f0
+ swap a
+ inc hl
+ call Function48444
+ ld a, [wd478]
+ and $f
+ inc hl
+ call Function48444
+ pop de
+ ret
+; 48a38 (12:4a38)
+
+String_48a38: ; 48a38
+ db "-@"
+; 48a3a
+
+Function48a3a: ; 48a3a (12:4a3a)
+ ld hl, MenuDataHeader_0x48a9c
+ call LoadMenuDataHeader
+ call Function4873c
+ ld a, $a
+ ld [wcfa1], a
+ ld a, $b
+ ld [wcfa2], a
+ ld a, $1
+ ld [MenuSelection2], a
+ hlcoord 10, 8
+ ld b, $4
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 10
+ ld de, String_48aa1
+ call PlaceString
+ call Function1bc9
+ push af
+ call PlayClickSFX
+ call ExitMenu
+ pop af
+ bit 1, a
+ jp nz, Function48a9a
+ ld a, [MenuSelection2]
+ cp $1
+ jr z, .asm_48a98
+ ld a, [wd003]
+ set 3, a
+ ld [wd003], a
+ ld a, [wd479]
+ res 0, a
+ ld [wd479], a
+ xor a
+ ld bc, $4
+ ld hl, wd475
+ call ByteFill
+ jr Function48a9a
+.asm_48a98
+ and a
+ ret
+
+Function48a9a: ; 48a9a (12:4a9a)
+ scf
+ ret
+; 48a9c (12:4a9c)
+
+MenuDataHeader_0x48a9c: ; 0x48a9c
+ db $40 ; flags
+ db 08, 10 ; start coords
+ db 13, 19 ; end coord
+
+String_48aa1: ; 48aa1
+ db "Tell Now"
+ next "Tell Later@"
+; 48ab5
+
+
+Function48ab5: ; 48ab5 (12:4ab5)
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jp nz, Function48c0f
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jp nz, Function48c0d
+ ld a, d
+ and a
+ jr z, .asm_48adf
+ cp $1
+ jr z, .asm_48ae7
+ cp $2
+ jr z, .asm_48af1
+ cp $3
+ jr z, .asm_48af9
+ cp $4
+ jr z, .asm_48b03
+ cp $5
+ jr z, .asm_48b0b
+ cp $6
+ jr .asm_48b15
+.asm_48adf
+ ld hl, wd475
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48ae7
+ ld hl, wd476
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48af1
+ ld hl, wd476
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48af9
+ ld hl, wd477
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48b03
+ ld hl, wd477
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48b0b
+ ld hl, wd478
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48b15
+ ld hl, wd478
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48b1d
+ push hl
+ push af
+ ld e, $0
+ hlcoord 11, 10
+ ld a, d
+.asm_48b25
+ and a
+ jr z, .asm_48b2c
+ inc e
+ dec a
+ jr .asm_48b25
+.asm_48b2c
+ ld hl, hJoyLast
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_48b8d
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_48b55
+ ld a, [hl]
+ and D_LEFT
+ jp nz, Function48bd7
+ ld a, [hl]
+ and D_RIGHT
+ jr nz, .asm_48b9d
+ hlcoord 11, 10
+ call Function489ea
+ ld a, [wd002]
+ bit 7, a
+ jr nz, .asm_48b51
+.asm_48b51
+ pop bc
+ pop bc
+ and a
+ ret
+.asm_48b55
+ pop af
+ ld b, a
+ and $f
+ and a
+ ld a, b
+ jr nz, .asm_48b61
+ and $f0
+ add $a
+.asm_48b61
+ dec a
+.asm_48b62
+ push de
+ push af
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop af
+ pop de
+ hlcoord 11, 10
+ ld b, a
+ ld a, d
+ cp $3
+ jr c, .asm_48b7a
+ inc hl
+.asm_48b7a
+ ld a, b
+ pop hl
+ bit 7, a
+ jr z, .asm_48b85
+ call Function48c4d
+ jr .asm_48b88
+.asm_48b85
+ call Function48c5a
+.asm_48b88
+ ld a, $f0
+ jp Function48c00
+.asm_48b8d
+ pop af
+ ld b, a
+ and $f
+ cp $9
+ ld a, b
+ jr c, .asm_48b9a
+ and $f0
+ add $ff
+.asm_48b9a
+ inc a
+ jr .asm_48b62
+.asm_48b9d
+ push de
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop de
+ ld a, d
+ cp $6
+ jr nc, .asm_48baf
+ inc d
+.asm_48baf
+ pop af
+ pop hl
+ ld b, a
+ ld a, d
+ cp $6
+ ld a, b
+ jr z, .asm_48bc4
+ bit 7, a
+ jr nz, .asm_48bc4
+ inc hl
+ ld a, [hl]
+ swap a
+ and $f
+ jr asm_48bc7
+.asm_48bc4
+ ld a, [hl]
+ and $f
+
+asm_48bc7: ; 48bc7 (12:4bc7)
+ hlcoord 11, 10
+ push af
+ ld a, d
+ cp $3
+ pop bc
+ ld a, b
+ jr c, .asm_48bd3
+ inc hl
+.asm_48bd3
+ ld a, $f
+ jr Function48c00
+
+Function48bd7: ; 48bd7 (12:4bd7)
+ push de
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop de
+ ld a, d
+ and a
+ pop af
+ pop hl
+ ld b, a
+ ld a, d
+ and a
+ ld a, b
+ jr z, .asm_48bf3
+ bit 7, a
+ jr z, .asm_48bf8
+ dec d
+ dec hl
+.asm_48bf3
+ ld a, [hl]
+ and $f
+ jr asm_48bc7
+.asm_48bf8
+ dec d
+ ld a, [hl]
+ swap a
+ and $f
+ jr asm_48bc7
+
+Function48c00: ; 48c00 (12:4c00)
+ push af
+ hlcoord 11, 10
+ call Function489ea
+ ld a, $1
+ and a
+ pop bc
+ ld a, b
+ ret
+
+Function48c0d: ; 48c0d (12:4c0d)
+ xor a
+ and a
+
+Function48c0f: ; 48c0f (12:4c0f)
+ scf
+ ret
+
+Function48c11: ; 48c11 (12:4c11)
+ ld a, [wd002]
+ bit 7, a
+ jr z, .asm_48c20
+ ld a, d
+ cp $3
+ jr c, .asm_48c1e
+ inc hl
+.asm_48c1e
+ ld [hl], $7f
+.asm_48c20
+ ld a, [wd002]
+ swap a
+ and $3
+ inc a
+ cp b
+ jr nz, .asm_48c40
+ ld a, [wd002]
+ bit 7, a
+ jr z, .asm_48c3a
+ res 7, a
+ ld [wd002], a
+ xor a
+ jr .asm_48c40
+.asm_48c3a
+ set 7, a
+ ld [wd002], a
+ xor a
+.asm_48c40
+ swap a
+ ld b, a
+ ld a, [wd002]
+ and $cf
+ or b
+ ld [wd002], a
+ ret
+
+Function48c4d: ; 48c4d (12:4c4d)
+ swap a
+ and $f0
+ push af
+ ld a, [hl]
+ and $f
+ ld [hl], a
+ pop af
+ or [hl]
+ ld [hl], a
+ ret
+
+Function48c5a: ; 48c5a (12:4c5a)
+ push af
+ ld a, [hl]
+ and $f0
+ ld [hl], a
+ pop af
+ or [hl]
+ ld [hl], a
+ ret
+
+Function48c63: ; 48c63
+ ld a, "@"
+ ld [de], a
+ ld a, c
+ cp $30
+ jr nc, .asm_48c8c
+ and a
+ jr z, .asm_48c8c
+ dec c
+ push de
+ ld h, d
+ ld l, e
+ ld a, "@"
+ ld b, 7
+.asm_48c76
+ ld [hli], a
+ dec b
+ jr nz, .asm_48c76
+ ld hl, Prefectures
+ ld a, c
+ call GetNthString
+.asm_48c81
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ cp "@"
+ jr nz, .asm_48c81
+ and a
+ pop de
+ ret
+
+.asm_48c8c
+ scf
+ ret
+; 48c8e
+
+Function48c8e: ; 48c8e
+ ld hl, wd02a
+ ld d, h
+ ld e, l
+ callba Function48c63
+ hlcoord 10, 7
+ call PlaceString
+ call WaitBGMap
+ ret
+; 48ca3
+
+Function48ca3: ; 48ca3
+ push af
+ push bc
+ push de
+ push hl
+ ld b, 0
+ ld c, 0
+ ld d, 0
+.asm_48cad
+ cp 100
+ jr c, .asm_48cb6
+ sub 100
+ inc b
+ jr .asm_48cad
+
+.asm_48cb6
+ cp 10
+ jr c, .asm_48cbf
+ sub 10
+ inc c
+ jr .asm_48cb6
+
+.asm_48cbf
+ cp 1
+ jr c, .asm_48cc7
+ dec a
+ inc d
+ jr .asm_48cbf
+
+.asm_48cc7
+ ld a, b
+ call Function48444
+ inc hl
+ ld a, c
+ call Function48444
+ inc hl
+ ld a, d
+ call Function48444
+ pop hl
+ pop de
+ pop bc
+ pop af
+ ret
+; 48cda
+
+Function48cda: ; 48cda (12:4cda)
+ ld h, d
+ ld l, e
+
+Function48cdc: ; 48cdc (12:4cdc)
+ push bc
+ push hl
+ call Function48cfd
+ pop hl
+ pop bc
+ ld de, AttrMap - TileMap
+ add hl, de
+rept 2
+ inc b
+endr
+rept 2
+ inc c
+endr
+ ld a, $0
+.asm_48ced
+ push bc
+ push hl
+.asm_48cef
+ ld [hli], a
+ dec c
+ jr nz, .asm_48cef
+ pop hl
+ ld de, $14
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_48ced
+ ret
+
+Function48cfd: ; 48cfd (12:4cfd)
+ push hl
+ ld a, $4
+ ld [hli], a
+ inc a
+ call Function48d2a
+ inc a
+ ld [hl], a
+ pop hl
+ ld de, $14
+ add hl, de
+.asm_48d0c
+ push hl
+ ld a, $7
+ ld [hli], a
+ ld a, $7f
+ call Function48d2a
+ ld [hl], $8
+ pop hl
+ ld de, $14
+ add hl, de
+ dec b
+ jr nz, .asm_48d0c
+ ld a, $9
+ ld [hli], a
+ ld a, $a
+ call Function48d2a
+ ld [hl], $b
+ ret
+
+Function48d2a: ; 48d2a (12:4d2a)
+ ld d, c
+.asm_48d2b
+ ld [hli], a
+ dec d
+ jr nz, .asm_48d2b
+ ret
+
+Function48d30: ; 48d30 (12:4d30)
+ ld hl, wd475
+ call Function48d4a
+ ld hl, wd477
+ call Function48d4a
+ ret
+
+Function48d3d: ; 48d3d (12:4d3d)
+ ld hl, wd475
+ call Function48d94
+ ld hl, wd477
+ call Function48d94
+ ret
+
+Function48d4a: ; 48d4a (12:4d4a)
+ inc hl
+ ld a, [hl]
+ ld b, a
+ and $f
+ ld c, a
+ srl b
+ srl b
+ srl b
+ srl b
+ push bc
+ ld c, 10
+ ld a, b
+ call SimpleMultiply
+ pop bc
+ add c
+ ld [hld], a
+ xor a
+ ld [hMultiplicand + 0], a
+ ld [hMultiplicand + 1], a
+ ld a, [hl]
+ srl a
+ srl a
+ srl a
+ srl a
+ ld c, 10
+ call SimpleMultiply
+ ld b, a
+ ld a, [hli]
+ and $f
+ add b
+ ld [hMultiplicand + 2], a
+ ld a, 100
+ ld [hMultiplier], a
+ call Multiply
+ ld a, [hProduct + 2]
+ ld b, a
+ ld a, [hProduct + 3]
+ ld c, a
+ ld e, [hl]
+ add e
+ ld c, a
+ ld a, b
+ adc $0
+ ld b, a
+ ld a, c
+ ld [hld], a
+ ld [hl], b
+ ret
+
+Function48d94: ; 48d94 (12:4d94)
+ xor a
+ ld [hDividend + 0], a
+ ld [hDividend + 1], a
+ ld a, [hli]
+ ld [hDividend + 0], a
+ ld a, [hl]
+ ld [hDividend + 1], a
+ ld a, 100
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+ ld a, [hDivisor]
+ ld c, $a
+ call SimpleDivide
+ sla b
+ sla b
+ sla b
+ sla b
+ or b
+ ld [hld], a
+ ld a, [hQuotient + 2]
+ ld c, 10
+ call SimpleDivide
+ sla b
+ sla b
+ sla b
+ sla b
+ or b
+ ld [hl], a
+ ret