mirror of
https://git.planet-casio.com/Fcalva/Copy3DEngine.git
synced 2025-06-06 15:35: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
25
src/main.c
25
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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue