fx : Utilisation de scsp + choix 1b/2b

This commit is contained in:
attilavs2 2024-09-07 12:31:40 +02:00
parent 1429fb29bd
commit 428be25c0e
2 changed files with 20 additions and 9 deletions

View file

@ -118,15 +118,26 @@ int main(){
prof_init();
if(dgray(DGRAY_ON))
goto c3d_abort;
dupdate();
dimage(0,0,&briques0);
dimage(63,0,&buisson0);
dtext(0,0,C_BLACK,"Activer le mode de gris ?");
dtext(0,10,C_BLACK,"Enable grayscale ?");
dtext(0,20,C_BLACK,"F1 : Oui/Yes");
dtext(0,30,C_BLACK,"F2 : Non/No");
dupdate();
getkey();
key_event_t keyev = getkey();
if(keyev.key == KEY_F1){
if(dgray(DGRAY_ON))
goto c3d_abort;
dupdate();
dimage(0,0,tex_index[0]);
dimage(32,0,tex_index[1]);
dimage(64,0,tex_index[2]);
dimage(96,0,tex_index[3]);
dupdate();
getkey();
}
#if debug
EngineTimers timers;

View file

@ -178,7 +178,7 @@ inline void __attribute__((always_inline)) draw_stripe(bopti_image_t *tex, int t
dgray_getvram(&light,&dark);
struct rbox pxbox = {
.x = x-texX,
.x = (texX&31)-(x&31),
.visual_x = x,
.width = 1,
.left = texX,
@ -195,7 +195,7 @@ inline void __attribute__((always_inline)) draw_stripe(bopti_image_t *tex, int t
if(screenPos >= fix(viewport_h))
return;
pxbox.y = ffloor(oldPos);
bopti_render(tex,&pxbox,light,dark);
bopti_render_scsp(tex,&pxbox,light,dark);
oldPos += 0xFFFF;
} while(oldPos < screenPos+texSize);
}