mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sprite rendering improvements for masking and limit edge cases
This commit is contained in:
parent
7aab476859
commit
5f0d224e18
5 changed files with 117 additions and 65 deletions
|
@ -420,12 +420,13 @@ static void DrawAllSpritesFull(int prio, int maxwidth)
|
|||
int i,u,link=0;
|
||||
unsigned int *sprites[80]; // Sprites
|
||||
int y_min=START_ROW*8, y_max=END_ROW*8; // for a simple sprite masking
|
||||
int max_sprites = Pico.video.reg[12]&1 ? 80 : 64;
|
||||
|
||||
table=pvid->reg[5]&0x7f;
|
||||
if (pvid->reg[12]&1) table&=0x7e; // Lowest bit 0 in 40-cell mode
|
||||
table<<=8; // Get sprite table address/2
|
||||
|
||||
for (i=u=0; u < 80; u++)
|
||||
for (i = u = 0; u < max_sprites && link < max_sprites; u++)
|
||||
{
|
||||
unsigned int *sprite=NULL;
|
||||
int code, code2, sx, sy, height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue