Fotomac
Genwunner and proud of it
- 905
- Posts
- 9
- Years
- Seen Jan 9, 2023
Now, basing the title screen's player character on which version of the game is easy enough. It's setting DrawPlayerCharacter to activate based on the gender of the player character on the extant save file that's proving problematic, as in Blue Version I'm seeing the male player character even when my save file has me playing as a girl!
Here's the current version of the code for reference:
DrawPlayerCharacter:
IF DEF(_GREEN)
ld a, [wSaveFileStatus]
cp 1
jr nz, .girl
ld a, [wPlayerGender] ; New gender check
and a ; New gender check
jr nz, .girl
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
ld a, BANK(PlayerCharacterTitleGraphics)
jr .next2
.girl
ld hl, FemaleCharacterTitleGraphics
ld de, vSprites
ld bc, FemaleCharacterTitleGraphicsEnd - FemaleCharacterTitleGraphics
ld a, BANK(FemaleCharacterTitleGraphics)
ELSE
ld a, [wSaveFileStatus]
cp 1
jr nz, .NotLeaf
ld a, [wPlayerGender] ; New gender check
and a ; New gender check
jr z, .NotLeaf
ld hl, FemaleCharacterTitleGraphics
ld de, vSprites
ld bc, FemaleCharacterTitleGraphicsEnd - FemaleCharacterTitleGraphics
ld a, BANK(FemaleCharacterTitleGraphics)
jr .next2
.NotLeaf
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
ld a, BANK(PlayerCharacterTitleGraphics)
ENDC
Here's the current version of the code for reference:
DrawPlayerCharacter:
IF DEF(_GREEN)
ld a, [wSaveFileStatus]
cp 1
jr nz, .girl
ld a, [wPlayerGender] ; New gender check
and a ; New gender check
jr nz, .girl
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
ld a, BANK(PlayerCharacterTitleGraphics)
jr .next2
.girl
ld hl, FemaleCharacterTitleGraphics
ld de, vSprites
ld bc, FemaleCharacterTitleGraphicsEnd - FemaleCharacterTitleGraphics
ld a, BANK(FemaleCharacterTitleGraphics)
ELSE
ld a, [wSaveFileStatus]
cp 1
jr nz, .NotLeaf
ld a, [wPlayerGender] ; New gender check
and a ; New gender check
jr z, .NotLeaf
ld hl, FemaleCharacterTitleGraphics
ld de, vSprites
ld bc, FemaleCharacterTitleGraphicsEnd - FemaleCharacterTitleGraphics
ld a, BANK(FemaleCharacterTitleGraphics)
jr .next2
.NotLeaf
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
ld a, BANK(PlayerCharacterTitleGraphics)
ENDC