pokecrystal-board/engine/init_gender.asm
Rangi 32ed487a47 Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
#	audio/engine.asm
#	constants/gfx_constants.asm
#	constants/map_data_constants.asm
#	constants/pokemon_data_constants.asm
#	constants/sprite_constants.asm
#	constants/wram_constants.asm
#	data/maps/data.asm
#	engine/battle/ai/scoring.asm
#	engine/battle/core.asm
#	engine/battle/effect_commands.asm
#	engine/battle/misc.asm
#	engine/battle_anims/getpokeballwobble.asm
#	engine/breeding.asm
#	engine/buy_sell_toss.asm
#	engine/decorations.asm
#	engine/events/battle_tower/battle_tower.asm
#	engine/events/battle_tower/rules.asm
#	engine/events/buena.asm
#	engine/events/bug_contest/contest_2.asm
#	engine/events/daycare.asm
#	engine/events/dratini.asm
#	engine/events/halloffame.asm
#	engine/events/happiness_egg.asm
#	engine/events/kurt.asm
#	engine/events/lucky_number.asm
#	engine/events/magnet_train.asm
#	engine/events/overworld.asm
#	engine/events/pokerus/pokerus.asm
#	engine/events/print_unown.asm
#	engine/events/print_unown_2.asm
#	engine/events/unown_walls.asm
#	engine/item_effects.asm
#	engine/link.asm
#	engine/mon_menu.asm
#	engine/player_object.asm
#	engine/routines/playslowcry.asm
#	engine/scripting.asm
#	engine/search.asm
#	engine/search2.asm
#	engine/specials.asm
#	engine/start_menu.asm
#	engine/timeset.asm
#	home/battle_vars.asm
#	home/map.asm
#	maps/GoldenrodUndergroundSwitchRoomEntrances.asm
#	maps/IlexForest.asm
#	maps/KrissHouse2F.asm
#	maps/Route39Barn.asm
#	mobile/mobile_12_2.asm
#	mobile/mobile_40.asm
#	mobile/mobile_5f.asm
#	wram.asm
2018-02-03 19:42:56 -05:00

112 lines
2.0 KiB
NASM
Executable File

InitCrystalData: ; 48000
ld a, $1
ld [wd474], a
xor a
ld [wd473], a
ld [wPlayerGender], a
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
; 4802f
INCLUDE "mobile/mobile_12.asm"
InitGender: ; 48dcb (12:4dcb)
call InitGenderScreen
call LoadGenderScreenPal
call LoadGenderScreenLightBlueTile
call WaitBGMap2
call SetPalettes
ld hl, TextJump_AreYouABoyOrAreYouAGirl
call PrintText
ld hl, .MenuHeader
call LoadMenuHeader
call WaitBGMap2
call VerticalMenu
call CloseWindow
ld a, [wMenuCursorY]
dec a
ld [wPlayerGender], a
ld c, 10
call DelayFrames
ret
; 48dfc (12:4dfc)
.MenuHeader: ; 0x48dfc
db MENU_BACKUP_TILES ; flags
menu_coords 6, 4, 12, 9
dw .MenuData
db 1 ; default option
; 0x48e04
.MenuData: ; 0x48e04
db STATICMENU_CURSOR | STATICMENU_WRAP | STATICMENU_DISABLE_B ; flags
db 2 ; items
db "Boy@"
db "Girl@"
; 0x48e0f
TextJump_AreYouABoyOrAreYouAGirl: ; 0x48e0f
; Are you a boy? Or are you a girl?
text_jump Text_AreYouABoyOrAreYouAGirl
db "@"
; 0x48e14
InitGenderScreen: ; 48e14 (12:4e14)
ld a, $10
ld [wMusicFade], a
ld a, MUSIC_NONE
ld [wMusicFadeID], a
ld a, $0
ld [wMusicFadeID + 1], a
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
hlcoord 0, 0, wAttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
xor a
call ByteFill
ret
LoadGenderScreenPal: ; 48e47 (12:4e47)
ld hl, .Palette
ld de, wBGPals1
ld bc, 1 palettes
ld a, BANK(wBGPals1)
call FarCopyWRAM
farcall ApplyPals
ret
; 48e5c (12:4e5c)
.Palette: ; 48e5c
INCLUDE "gfx/new_game/gender_screen.pal"
; 48e64
LoadGenderScreenLightBlueTile: ; 48e64 (12:4e64)
ld de, .LightBlueTile
ld hl, vTiles2 tile $00
lb bc, BANK(.LightBlueTile), 1
call Get2bpp
ret
; 48e71 (12:4e71)
.LightBlueTile: ; 48e71
INCBIN "gfx/new_game/gender_screen.2bpp"