diff --git a/lib/shell.c b/lib/shell.c index 1644346..68513f8 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -442,7 +442,8 @@ int test2d() else color=random(0,16); trianglefilled(&a, &b, &c, color); - triangle(&a, &b, &c, color); + waitascii(); + triangle(&a, &b, &c, egatorgb(4)); } return 0; } diff --git a/lib/video.c b/lib/video.c index c1bbff0..f0f2b60 100755 --- a/lib/video.c +++ b/lib/video.c @@ -1138,9 +1138,9 @@ void hline(u16 x1, u16 x2, u16 y, u32 color) if (vinfo->isgraphic) { if (x2 > x1) - mem_to_video(color,x1+vinfo->currentpitch*y,x2-x1,false); + mem_to_video(color,(vinfo->currentdepth>>3)*x1+vinfo->currentpitch*y,x2-x1,false); else - mem_to_video(color,x2+vinfo->currentpitch*y,x1-x2,false); + mem_to_video(color,(vinfo->currentdepth>>3)*x2+vinfo->currentpitch*y,x1-x2,false); } }