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(); prof_init();
if(dgray(DGRAY_ON)) dtext(0,0,C_BLACK,"Activer le mode de gris ?");
goto c3d_abort; dtext(0,10,C_BLACK,"Enable grayscale ?");
dupdate(); dtext(0,20,C_BLACK,"F1 : Oui/Yes");
dtext(0,30,C_BLACK,"F2 : Non/No");
dimage(0,0,&briques0);
dimage(63,0,&buisson0);
dupdate(); 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 #if debug
EngineTimers timers; 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); dgray_getvram(&light,&dark);
struct rbox pxbox = { struct rbox pxbox = {
.x = x-texX, .x = (texX&31)-(x&31),
.visual_x = x, .visual_x = x,
.width = 1, .width = 1,
.left = texX, .left = texX,
@ -195,7 +195,7 @@ inline void __attribute__((always_inline)) draw_stripe(bopti_image_t *tex, int t
if(screenPos >= fix(viewport_h)) if(screenPos >= fix(viewport_h))
return; return;
pxbox.y = ffloor(oldPos); pxbox.y = ffloor(oldPos);
bopti_render(tex,&pxbox,light,dark); bopti_render_scsp(tex,&pxbox,light,dark);
oldPos += 0xFFFF; oldPos += 0xFFFF;
} while(oldPos < screenPos+texSize); } while(oldPos < screenPos+texSize);
} }