Player management [Commit 1] (#38)

This commit is contained in:
xCrystal
2024-03-08 18:56:26 +01:00
parent bb0240e279
commit dbb340515f
18 changed files with 120 additions and 200 deletions

View File

@@ -504,13 +504,8 @@ GetPlayerOrMonPalettePointer:
and a
jp nz, GetMonNormalOrShinyPalettePointer
ld a, [wPlayerGender]
and a
jr z, .male
ld hl, KrisPalette
ret
.male
ld hl, PlayerPalette
ld e, PLAYERDATA_PIC_PAL
call GetPlayerField
ret
GetFrontpicPalettePointer:

View File

@@ -288,25 +288,6 @@ EXPORT PICS_FIX
db BANK("Pics 23") ; BANK("Pics 1") + 22
db BANK("Pics 24") ; BANK("Pics 1") + 23
GSIntro_GetMonFrontpic: ; unreferenced
ld a, c
push de
ld hl, PokemonPicPointers
dec a
ld bc, 6
call AddNTimes
ld a, BANK(PokemonPicPointers)
call GetFarByte
call FixPicBank
push af
inc hl
ld a, BANK(PokemonPicPointers)
call GetFarWord
pop af
pop de
call FarDecompress
ret
GetTrainerPic:
ld a, [wTrainerClass]
and a

View File

@@ -58,7 +58,7 @@ ShowPlayerNamingChoices:
call CloseWindow
ret
INCLUDE "data/player_names.asm"
INCLUDE "data/players/names.asm"
GetPlayerIcon:
ld de, ChrisSpriteGFX
@@ -100,16 +100,11 @@ INCBIN "gfx/trainer_card/trainer_card.2bpp"
GetPlayerBackpic:
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, GetChrisBackpic
call GetKrisBackpic
ret
GetChrisBackpic:
ld hl, ChrisBackpic
ld b, BANK(ChrisBackpic)
ld e, PLAYERDATA_BACKPIC
call GetPlayerField
ld de, vTiles2 tile $31
ld c, 7 * 7
ld b, BANK(ChrisBackpic)
predef DecompressGet2bpp
ret
@@ -177,20 +172,3 @@ DrawIntroPlayerPic:
lb bc, 7, 7
predef PlaceGraphic
ret
ChrisPic:
INCBIN "gfx/player/chris.2bpp"
KrisPic:
INCBIN "gfx/player/kris.2bpp"
GetKrisBackpic:
; Kris's backpic is uncompressed.
ld de, KrisBackpic
ld hl, vTiles2 tile $31
lb bc, BANK(KrisBackpic), 7 * 7 ; dimensions
call Get2bpp
ret
KrisBackpic:
INCBIN "gfx/player/kris_back.2bpp"