Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ephiney

Why the heck

This topic is 6339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is my code to copy iso tiles to the screen and one sprite. My problem is I cant see my sprite 99% of the time. This started to happen when I blt to the entire screen. Before I only blt to about half the screen, with the rest of the screen flicking with a bright blue and my sprite also flickering. My tiles come in perfect. Anybody have any idea why this is happening? GridX := (WorldPositionX shr 6) - 2; GridY := (WorldPositionY shr 5) - 2; offsetX := (WorldPositionX and 63) + 64; offsetY := (WorldPositionY and 31) + 32; for indexY := 0 to 41 do for indexX := 0 to 16 do begin bltX := (indexX shl 6) + ((indexY and 1) shl 5) - offsetX; bltY := (indexY shl 4) - offsetY; case map[indexX + GridX, indexY + gridY] of 0: bltRect := TileRect; 1: begin bltRect := BlockRect; dec(bltY, 23) end; end; if ((bltX < -63) or (bltX > 799) or (bltY < -31) or (bltY > 599)) then continue; if bltX < 0 then begin inc(bltrect.Left, -bltX); bltX := 0 end; if bltX > 735 then dec(bltrect.right, (bltX - 737)); if bltY < 0 then begin inc(bltrect.top, -bltY); bltY := 0 end; if bltY > 567 then dec(bltRect.bottom, (bltY - 570)); DXCheck(FPrimary.BltFast(bltX,bltY,FBackGround,bltRect,DDBLTFAST_SRCCOLORKEY or DDBLTFAST_WAIT)); end; SrcRect := rect(0,0,19,34); DXCheck(FPrimary.BltFast(50,50,FBitmap,SrcRect,DDBLTFAST_WAIT or DDBLTFAST_SRCCOLORKEY)); // FlipSurfaces;

Share this post


Link to post
Share on other sites
Advertisement
Im a dork, I was blitting to the primary surface and not the backbuffer. It works just fine now, sorry about the post

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!