View Single Post
Old 04 November 2019, 15:15   #2
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,643
So basically what you want to do is to have a screen buffer that's bigger than actual view, to hide objects blitted at the edges ?

Setting a modulo alone will not help, you really have to have a surface that's bigger than the screen.
However it is not the "proper" way to do that.

The best way to do what you want to do is to do real clipping.
You can do this by moving the starting point and changing the size.
For example, for bottom, if you have 320x256 screen and want to display 16x16 bob located at y=244, reduce the bob height to (256-244) = 12 lines.
For top, reduce the height accordingly, but also move the starting line, to show only part of the graphic.
meynaf is offline  
 
Page generated in 0.04410 seconds with 11 queries