tobiasvl / LADX-Disassembly

My hacks of Legend of Zelda: Links Awakening DX
0 stars 0 forks source link

Make sprites appear under the text box/HUD #10

Open tobiasvl opened 1 year ago

tobiasvl commented 1 year ago

sprites oppå tekstboks/vindu: https://gbdev.io/pandocs/LCDC.html#lcdc1--obj-enable det virker som sprites settes til å være utenfor skjermen om de er innenfor tekstboksen???? hvorfor ikke bare skru dem av?

tobiasvl commented 1 year ago

FFFF - enable STAT interrupt (bit 1)

FF41 - STAT

FF44 - STAT source (LY=LYC already enabled)

FF45 - LYC (set to $80 for HUD)

FF80 - FF8F er ledig FF80 - skal vi kjøre egen STAT/LY=LYC-kode? FF81 - skal vi skru av eller på OAM? FF82 - gammel LYC

in LoadRoom/init: enable STAT interrupt, but set some flag saying OG code shouldn't run

in STAT interrupt handler: decide what code is executed based on whether OG DX has enabled STAT or not. if enabled: run OG code

else: check if FF41 bit 2 is set, that means LY=LYC.

if displaying dialog box: if LYC=start of dialog box: disable OAM, set LYC to end of dialog box if LYC=end of dialog box: enable OAM, set LYC to wWindowY

wDialogState - top bit says if we're on bottom, $x0 means there's no dialog Do we have room to respect DIALOG_OPENING_X and DIALOG_CLOSING_X????

if LYC=wWindowY: disable sprites by resetting FF40 (LCDC) bit 1

in VBLANK interrupt handler: if not running in OG mode: enable sprites by setting FF40 (LCDC) bit 1

tobiasvl commented 1 year ago

top of dialog $08 8 bottom of dialog $30 48

             $60  96
             $88 136

høyde på dialogboks $28 40