diff --git a/src/main.c b/src/main.c index 72d5951..4338210 100644 --- a/src/main.c +++ b/src/main.c @@ -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; diff --git a/src/moteur.c b/src/moteur.c index 7cd8161..d9c613a 100644 --- a/src/moteur.c +++ b/src/moteur.c @@ -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); }