mirror of
https://git.planet-casio.com/Fcalva/Copy3DEngine.git
synced 2025-06-07 07:55:03 +02:00
fx : Utilisation de scsp + choix 1b/2b
This commit is contained in:
parent
1429fb29bd
commit
428be25c0e
2 changed files with 20 additions and 9 deletions
15
src/main.c
15
src/main.c
|
@ -118,15 +118,26 @@ int main(){
|
||||||
|
|
||||||
prof_init();
|
prof_init();
|
||||||
|
|
||||||
|
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();
|
||||||
|
key_event_t keyev = getkey();
|
||||||
|
if(keyev.key == KEY_F1){
|
||||||
if(dgray(DGRAY_ON))
|
if(dgray(DGRAY_ON))
|
||||||
goto c3d_abort;
|
goto c3d_abort;
|
||||||
dupdate();
|
dupdate();
|
||||||
|
|
||||||
dimage(0,0,&briques0);
|
dimage(0,0,tex_index[0]);
|
||||||
dimage(63,0,&buisson0);
|
dimage(32,0,tex_index[1]);
|
||||||
|
dimage(64,0,tex_index[2]);
|
||||||
|
dimage(96,0,tex_index[3]);
|
||||||
|
|
||||||
dupdate();
|
dupdate();
|
||||||
getkey();
|
getkey();
|
||||||
|
}
|
||||||
|
|
||||||
#if debug
|
#if debug
|
||||||
EngineTimers timers;
|
EngineTimers timers;
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue