Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.75k stars 187 forks source link

VDP_setTileMapEx WINDOW not functional #274

Closed greatAznur closed 2 years ago

greatAznur commented 2 years ago

hi i test .. the sgdk and in doc of function VDP_setTileMapEx the plane can be window but i try with "BG_A" of "BG_B" the tilmap as displayed but with "WINDOW" plane nothing

VDP_setTileMapEx(BG_B, ctmap, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, idx2), 0, 0, 0, 0, 20, 28, CPU); functional

VDP_setTileMapEx(WINDOW, ctmap, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, idx2), 0, 0, 0, 0, 20, 28, CPU); not diplayed

i change just the first argument ? i forgot something ?

Stephane-D commented 2 years ago

You need to enable the window first using the VDP_setWindowHPos() and VDP_setWindowVPos() method :)

greatAznur commented 2 years ago

oh i have thinks that use VDP_setWindowHPos() but ... after not before

Stephane-D commented 2 years ago

Actually order isn't important you definitely need it otherwise it won't display anything.

greatAznur commented 2 years ago

ok it' normal my BG_A disapear? when i have window functional ?

VDP_setTileMapEx(BG_A, atmap, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, idx1), 20, 0, 0, 0, 20, 28, CPU); VDP_setTileMapEx(BG_B, btmap, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, idx2), 0, 0, 0, 0, 20, 28, CPU);

VDP_setTileMapEx(WINDOW, ctmap, TILE_ATTR_FULL(PAL2, FALSE, FALSE, FALSE, idx3), 0, 0, 0, 0, 40, 28, CPU); VDP_setWindowHPos(TRUE,0); VDP_setWindowVPos(TRUE,0);

Stephane-D commented 2 years ago

Yeah it's normal, BG_A and window are shared visually, they can't display on same area.

greatAznur commented 2 years ago

ok thank for precisions