mirror of
https://git.planet-casio.com/Fcalva/Copy3DEngine.git
synced 2024-12-28 20:43:44 +01:00
draw_stripe : Domptage du gremelin
This commit is contained in:
parent
f4cec3a625
commit
1f32c30da6
2 changed files with 4 additions and 1 deletions
|
@ -180,6 +180,7 @@ inline void __attribute__((always_inline)) draw_stripe(image_t *tex, int texSamp
|
||||||
: "=r" (oneConst)
|
: "=r" (oneConst)
|
||||||
: "r" (oneConst)
|
: "r" (oneConst)
|
||||||
);
|
);
|
||||||
|
register int maxConst asm("r13") = viewport_w*viewport_h;
|
||||||
for(int texPos = texSampleY; texPos < 64; ++texPos){
|
for(int texPos = texSampleY; texPos < 64; ++texPos){
|
||||||
if(screenPos >= -texSize){
|
if(screenPos >= -texSize){
|
||||||
int vrampos = ffloor(screenPos)*vramSize+x;
|
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;
|
gint_vram[vrampos] = pix;
|
||||||
vrampos += vramSize;
|
vrampos += vramSize;
|
||||||
oldPos += oneConst;
|
oldPos += oneConst;
|
||||||
|
if(vrampos >= maxConst)
|
||||||
|
return;
|
||||||
}while(oldPos < screenPos+texSize);
|
}while(oldPos < screenPos+texSize);
|
||||||
}
|
}
|
||||||
screenPos += texSize;
|
screenPos += texSize;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define screen_w 396
|
#define screen_w 396
|
||||||
#define screen_h 224
|
#define screen_h 224
|
||||||
#define viewport_w 396
|
#define viewport_w 396
|
||||||
#define viewport_h 224
|
#define viewport_h 200
|
||||||
#define max_dist fix(32) //en tuiles << 16, actuellement 32
|
#define max_dist fix(32) //en tuiles << 16, actuellement 32
|
||||||
|
|
||||||
#define TINDEX_S 256
|
#define TINDEX_S 256
|
||||||
|
|
Loading…
Reference in a new issue