|
|
|
|
|
by nitrogen
4086 days ago
|
|
What's harder is clipping against the sides of the screen. With no branching, there's no way to prevent the sprite from writing past the end of a line/screen (wrapping/mem-stomping). So, there does need to be a test per sprite to detect that case and fall back on a more complicated blitter. In fullscreen modes, you could also just make your screen buffer bigger than the actual screen by the width and height of your largest sprite. |
|
This only cost one extra AND instruction and allowed the sprites to be clipped to any size rectangular playfield while still maintaining almost all of the speed benefits.