2018-06-24 14:09:41 +00:00
|
|
|
InitCrystalData:
|
2015-12-15 01:06:41 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [wd474], a
|
|
|
|
xor a
|
|
|
|
ld [wd473], a
|
2017-12-28 12:15:46 +00:00
|
|
|
ld [wPlayerGender], a
|
2015-12-15 01:06:41 +00:00
|
|
|
ld [wd475], a
|
|
|
|
ld [wd476], a
|
|
|
|
ld [wd477], a
|
|
|
|
ld [wd478], a
|
|
|
|
ld [wd002], a
|
|
|
|
ld [wd003], a
|
|
|
|
; could have done "ld a, [wd479] \ and %11111100", saved four operations
|
|
|
|
ld a, [wd479]
|
|
|
|
res 0, a
|
|
|
|
ld [wd479], a
|
|
|
|
ld a, [wd479]
|
|
|
|
res 1, a
|
|
|
|
ld [wd479], a
|
|
|
|
ret
|
|
|
|
|
2017-12-15 17:53:33 +00:00
|
|
|
INCLUDE "mobile/mobile_12.asm"
|
2015-12-15 01:06:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
InitGender:
|
2015-12-15 01:06:41 +00:00
|
|
|
call InitGenderScreen
|
|
|
|
call LoadGenderScreenPal
|
|
|
|
call LoadGenderScreenLightBlueTile
|
|
|
|
call WaitBGMap2
|
|
|
|
call SetPalettes
|
|
|
|
ld hl, TextJump_AreYouABoyOrAreYouAGirl
|
|
|
|
call PrintText
|
2018-01-23 21:08:43 +00:00
|
|
|
ld hl, .MenuHeader
|
|
|
|
call LoadMenuHeader
|
2015-12-15 01:06:41 +00:00
|
|
|
call WaitBGMap2
|
2015-12-15 23:59:49 +00:00
|
|
|
call VerticalMenu
|
2015-12-25 03:58:42 +00:00
|
|
|
call CloseWindow
|
2015-12-15 23:59:49 +00:00
|
|
|
ld a, [wMenuCursorY]
|
2015-12-15 01:06:41 +00:00
|
|
|
dec a
|
2017-12-28 12:15:46 +00:00
|
|
|
ld [wPlayerGender], a
|
2015-12-15 01:06:41 +00:00
|
|
|
ld c, 10
|
|
|
|
call DelayFrames
|
|
|
|
ret
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
.MenuHeader:
|
2018-01-14 10:59:56 +00:00
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
menu_coords 6, 4, 12, 9
|
2018-01-23 21:08:43 +00:00
|
|
|
dw .MenuData
|
2015-12-15 01:06:41 +00:00
|
|
|
db 1 ; default option
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
.MenuData:
|
2018-01-14 10:59:56 +00:00
|
|
|
db STATICMENU_CURSOR | STATICMENU_WRAP | STATICMENU_DISABLE_B ; flags
|
2015-12-15 01:06:41 +00:00
|
|
|
db 2 ; items
|
|
|
|
db "Boy@"
|
|
|
|
db "Girl@"
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
TextJump_AreYouABoyOrAreYouAGirl:
|
2015-12-15 01:06:41 +00:00
|
|
|
; Are you a boy? Or are you a girl?
|
|
|
|
text_jump Text_AreYouABoyOrAreYouAGirl
|
|
|
|
db "@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
InitGenderScreen:
|
2015-12-15 01:06:41 +00:00
|
|
|
ld a, $10
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMusicFade], a
|
2016-03-02 03:31:21 +00:00
|
|
|
ld a, MUSIC_NONE
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMusicFadeID], a
|
2015-12-15 01:06:41 +00:00
|
|
|
ld a, $0
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wMusicFadeID + 1], a
|
2015-12-15 01:06:41 +00:00
|
|
|
ld c, 8
|
|
|
|
call DelayFrames
|
|
|
|
call ClearBGPalettes
|
|
|
|
call InitCrystalData
|
|
|
|
call LoadFontsExtra
|
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
|
|
|
ld a, $0
|
|
|
|
call ByteFill
|
2018-01-23 22:39:09 +00:00
|
|
|
hlcoord 0, 0, wAttrMap
|
2015-12-15 01:06:41 +00:00
|
|
|
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
|
|
|
xor a
|
|
|
|
call ByteFill
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadGenderScreenPal:
|
2015-12-15 01:06:41 +00:00
|
|
|
ld hl, .Palette
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2015-12-15 01:06:41 +00:00
|
|
|
ld bc, 1 palettes
|
2018-01-04 19:53:50 +00:00
|
|
|
ld a, BANK(wBGPals1)
|
2015-12-15 01:06:41 +00:00
|
|
|
call FarCopyWRAM
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ApplyPals
|
2015-12-15 01:06:41 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Palette:
|
2018-01-21 18:58:16 +00:00
|
|
|
INCLUDE "gfx/new_game/gender_screen.pal"
|
2015-12-15 01:06:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadGenderScreenLightBlueTile:
|
2015-12-15 01:06:41 +00:00
|
|
|
ld de, .LightBlueTile
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $00
|
2015-12-15 01:06:41 +00:00
|
|
|
lb bc, BANK(.LightBlueTile), 1
|
|
|
|
call Get2bpp
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.LightBlueTile:
|
2018-01-21 18:58:16 +00:00
|
|
|
INCBIN "gfx/new_game/gender_screen.2bpp"
|