jojobear13 / shinpokered

Mostly-vanilla hack of Pokémon Red/Blue focused on bugfixes and trainer ai
209 stars 42 forks source link

Bug: Dex diploma missing player art #272

Closed Mord5 closed 12 months ago

Mord5 commented 1 year ago

What emulator and/or hardware are you are using? bgb 1.5.9.w64

What version of this project are you using? built from source master_dev commit https://github.com/jojobear13/shinpokered/commit/368d0baff2e13b1db27b69bd477e5b069c3c3a55

What is the problem you encountered? The dex diploma does not draw the player sprite in the lower-right corner.

jojobear13 commented 1 year ago

Good catch. Fixed in commit 43b63b6f.

Looks like this bug was inadvertently caused by the commit that fixes overworld sprite wobble. PrepareOAMData is now run in DelayFrame. This means that if wUpdateSpritesEnabled = 0, all sprites will get hidden during the next call to DelayFrame and then sprite updating will be disabled. DisplayDiploma makes wUpdateSpritesEnabled = 0, so the next time DelayFrame is entered is during LoadTrainerInfoTextBoxTiles. But this is AFTER the player sprites are drawn on the diploma, so they get hidden. A delay needs to happen before the player is drawn in order to clear the overworld NPC sprites.