2018-01-02 12:24:05 +00:00
|
|
|
Unreferenced_Function88248: ; 88248
|
2017-12-16 01:10:54 +00:00
|
|
|
ld c, CAL
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .okay
|
|
|
|
ld c, KAREN
|
|
|
|
|
|
|
|
.okay
|
|
|
|
ld a, c
|
|
|
|
ld [TrainerClass], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
MovePlayerPicRight: ; 88258
|
|
|
|
hlcoord 6, 4
|
|
|
|
ld de, 1
|
|
|
|
jr MovePlayerPic
|
|
|
|
|
|
|
|
MovePlayerPicLeft: ; 88260
|
|
|
|
hlcoord 13, 4
|
|
|
|
ld de, -1
|
|
|
|
; fallthrough
|
|
|
|
|
|
|
|
MovePlayerPic: ; 88266
|
|
|
|
; Move player pic at hl by de * 7 tiles.
|
|
|
|
ld c, $8
|
|
|
|
.loop
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
lb bc, 7, 7
|
|
|
|
predef PlaceGraphic
|
|
|
|
xor a
|
|
|
|
ld [hBGMapThird], a
|
|
|
|
call WaitBGMap
|
|
|
|
call DelayFrame
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
add hl, de
|
|
|
|
pop bc
|
|
|
|
dec c
|
|
|
|
ret z
|
|
|
|
push hl
|
|
|
|
push bc
|
|
|
|
ld a, l
|
|
|
|
sub e
|
|
|
|
ld l, a
|
|
|
|
ld a, h
|
|
|
|
sbc d
|
|
|
|
ld h, a
|
|
|
|
lb bc, 7, 7
|
|
|
|
call ClearBox
|
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
ShowPlayerNamingChoices: ; 88297
|
|
|
|
ld hl, ChrisNameMenuHeader
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotGender
|
|
|
|
ld hl, KrisNameMenuHeader
|
|
|
|
.GotGender:
|
|
|
|
call LoadMenuDataHeader
|
|
|
|
call VerticalMenu
|
|
|
|
ld a, [wMenuCursorY]
|
|
|
|
dec a
|
|
|
|
call CopyNameFromMenu
|
|
|
|
call CloseWindow
|
|
|
|
ret
|
|
|
|
|
2017-12-27 02:55:57 +00:00
|
|
|
INCLUDE "data/default_names.asm"
|
2017-12-16 01:10:54 +00:00
|
|
|
|
|
|
|
GetPlayerNameArray: ; 88318 This Function is never called
|
|
|
|
ld hl, PlayerName
|
|
|
|
ld de, MalePlayerNameArray
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .done
|
|
|
|
ld de, FemalePlayerNameArray
|
|
|
|
|
|
|
|
.done
|
|
|
|
call InitName
|
|
|
|
ret
|
|
|
|
|
|
|
|
GetPlayerIcon: ; 8832c
|
|
|
|
; Get the player icon corresponding to gender
|
|
|
|
|
|
|
|
; Male
|
|
|
|
ld de, ChrisSpriteGFX
|
|
|
|
ld b, BANK(ChrisSpriteGFX)
|
|
|
|
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .done
|
|
|
|
|
|
|
|
; Female
|
|
|
|
ld de, KrisSpriteGFX
|
|
|
|
ld b, BANK(KrisSpriteGFX)
|
|
|
|
|
|
|
|
.done
|
|
|
|
ret
|
|
|
|
|
|
|
|
GetCardPic: ; 8833e
|
|
|
|
ld hl, ChrisCardPic
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotClass
|
|
|
|
ld hl, KrisCardPic
|
|
|
|
.GotClass:
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2017-12-16 01:10:54 +00:00
|
|
|
ld bc, $23 tiles
|
|
|
|
ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic)
|
|
|
|
call FarCopyBytes
|
|
|
|
ld hl, CardGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $23
|
2017-12-16 01:10:54 +00:00
|
|
|
ld bc, 6 tiles
|
|
|
|
ld a, BANK(CardGFX)
|
|
|
|
call FarCopyBytes
|
|
|
|
ret
|
|
|
|
|
|
|
|
ChrisCardPic: ; 88365
|
|
|
|
INCBIN "gfx/trainer_card/chris_card.2bpp"
|
|
|
|
|
|
|
|
KrisCardPic: ; 88595
|
|
|
|
INCBIN "gfx/trainer_card/kris_card.2bpp"
|
|
|
|
|
|
|
|
CardGFX: ; 887c5
|
|
|
|
INCBIN "gfx/trainer_card/trainer_card.2bpp"
|
|
|
|
|
|
|
|
GetPlayerBackpic: ; 88825
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, GetChrisBackpic
|
|
|
|
call GetKrisBackpic
|
|
|
|
ret
|
|
|
|
|
|
|
|
GetChrisBackpic: ; 88830
|
|
|
|
ld hl, ChrisBackpic
|
|
|
|
ld b, BANK(ChrisBackpic)
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $31
|
2017-12-16 01:10:54 +00:00
|
|
|
ld c, 7 * 7
|
|
|
|
predef DecompressPredef
|
|
|
|
ret
|
|
|
|
|
|
|
|
HOF_LoadTrainerFrontpic: ; 88840
|
|
|
|
call WaitBGMap
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
ld e, 0
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotClass
|
|
|
|
ld e, 1
|
|
|
|
|
|
|
|
.GotClass:
|
|
|
|
ld a, e
|
|
|
|
ld [TrainerClass], a
|
|
|
|
ld de, ChrisPic
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotPic
|
|
|
|
ld de, KrisPic
|
|
|
|
|
|
|
|
.GotPic:
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2
|
2017-12-16 01:10:54 +00:00
|
|
|
ld b, BANK(ChrisPic) ; BANK(KrisPic)
|
|
|
|
ld c, 7 * 7
|
|
|
|
call Get2bpp
|
|
|
|
call WaitBGMap
|
|
|
|
ld a, $1
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
DrawIntroPlayerPic: ; 88874
|
|
|
|
; Draw the player pic at (6,4).
|
|
|
|
|
|
|
|
; Get class
|
|
|
|
ld e, CHRIS
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotClass
|
|
|
|
ld e, KRIS
|
|
|
|
.GotClass:
|
|
|
|
ld a, e
|
|
|
|
ld [TrainerClass], a
|
|
|
|
|
|
|
|
; Load pic
|
|
|
|
ld de, ChrisPic
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2017-12-16 01:10:54 +00:00
|
|
|
bit 0, a
|
|
|
|
jr z, .GotPic
|
|
|
|
ld de, KrisPic
|
|
|
|
.GotPic:
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2
|
2017-12-16 01:10:54 +00:00
|
|
|
ld b, BANK(ChrisPic) ; BANK(KrisPic)
|
|
|
|
ld c, 7 * 7 ; dimensions
|
|
|
|
call Get2bpp
|
|
|
|
|
|
|
|
; Draw
|
|
|
|
xor a
|
|
|
|
ld [hGraphicStartTile], a
|
|
|
|
hlcoord 6, 4
|
|
|
|
lb bc, 7, 7
|
|
|
|
predef PlaceGraphic
|
|
|
|
ret
|
|
|
|
|
|
|
|
ChrisPic: ; 888a9
|
|
|
|
INCBIN "gfx/player/chris.2bpp"
|
|
|
|
|
|
|
|
KrisPic: ; 88bb9
|
|
|
|
INCBIN "gfx/player/kris.2bpp"
|
|
|
|
|
|
|
|
GetKrisBackpic: ; 88ec9
|
|
|
|
; Kris's backpic is uncompressed.
|
|
|
|
ld de, KrisBackpic
|
2017-12-28 12:32:33 +00:00
|
|
|
ld hl, vTiles2 tile $31
|
2017-12-16 01:10:54 +00:00
|
|
|
lb bc, BANK(KrisBackpic), 7 * 7 ; dimensions
|
|
|
|
call Get2bpp
|
|
|
|
ret
|
|
|
|
|
|
|
|
KrisBackpic: ; 88ed6
|
|
|
|
INCBIN "gfx/player/kris_back.2bpp"
|