• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
909
Posts
8
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
     

    Fotomac

    Genwunner and proud of it
    909
    Posts
    8
    Years
    • Seen Jan 9, 2023
    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