draw_stripe : Domptage du gremelin

This commit is contained in:
attilavs2 2024-09-01 17:31:46 +02:00
parent f4cec3a625
commit 1f32c30da6
2 changed files with 4 additions and 1 deletions

View file

@ -180,6 +180,7 @@ inline void __attribute__((always_inline)) draw_stripe(image_t *tex, int texSamp
: "=r" (oneConst)
: "r" (oneConst)
);
register int maxConst asm("r13") = viewport_w*viewport_h;
for(int texPos = texSampleY; texPos < 64; ++texPos){
if(screenPos >= -texSize){
int vrampos = ffloor(screenPos)*vramSize+x;
@ -189,6 +190,8 @@ inline void __attribute__((always_inline)) draw_stripe(image_t *tex, int texSamp
gint_vram[vrampos] = pix;
vrampos += vramSize;
oldPos += oneConst;
if(vrampos >= maxConst)
return;
}while(oldPos < screenPos+texSize);
}
screenPos += texSize;

View file

@ -10,7 +10,7 @@
#define screen_w 396
#define screen_h 224
#define viewport_w 396
#define viewport_h 224
#define viewport_h 200
#define max_dist fix(32) //en tuiles << 16, actuellement 32
#define TINDEX_S 256