• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex] [Red] DrawPlayerCharacter

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
     
    OK, I think I got it. I gotta put "predef LoadSAV" in the PlayShootingStar function as seen here:

    PlayShootingStar:
    predef LoadSAV
    ld b, SET_PAL_GAME_FREAK_INTRO
    call RunPaletteCommand
    callba LoadCopyrightAndTextBoxTiles

    That, or some other point before the title screen in the code. Problem is, if I don't have a save file, it softlocks at the point where the predef is called, for some reason. What am I doing wrong here?
     
    Back
    Top