Player management [Commit 2] (#38)

This commit is contained in:
xCrystal
2024-03-09 16:40:21 +01:00
parent dbb340515f
commit ff35ce6d6b
29 changed files with 138 additions and 275 deletions

View File

@@ -13,7 +13,7 @@ InitGender:
call CloseWindow
ld a, [wMenuCursorY]
dec a
ld [wPlayerGender], a
ld [wPlayerCharacter], a
ld c, 10
call DelayFrames
ret

View File

@@ -527,7 +527,7 @@ NamePlayer:
ld hl, wPlayerName
ld de, .Chris
ld a, [wPlayerGender]
ld a, [wPlayerCharacter]
bit PLAYERGENDER_FEMALE_F, a
jr z, .Male
ld de, .Kris
@@ -682,13 +682,15 @@ Intro_PlacePlayerSprite:
inc de
ld [hli], a ; tile id
ld b, PAL_OW_RED
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .male
ld b, PAL_OW_BLUE
.male
ld a, b
ld a, [wPlayerCharacter]
ld e, PLAYERDATA_OW_PAL
push hl
push de
push bc
call GetPlayerField
pop bc
pop de
pop hl
ld [hli], a ; attributes
dec c