From b3a4777d4c9eea59edb19878095d5a3677956bc5 Mon Sep 17 00:00:00 2001 From: izydorst Date: Mon, 23 Dec 2002 14:54:28 +0000 Subject: [PATCH] more funstuff in tgidemo git-svn-id: svn://svn.cc65.org/cc65/trunk@1832 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/tgidemo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/samples/tgidemo.c b/samples/tgidemo.c index 818d35d25..d6b1586ae 100644 --- a/samples/tgidemo.c +++ b/samples/tgidemo.c @@ -159,6 +159,24 @@ static void DoDiagram (void) } +static void DoLines (void) +{ + static const unsigned char Palette[2] = { COLOR_WHITE, COLOR_BLACK }; + unsigned X; + + tgi_setpalette (Palette); + tgi_setcolor (1); + + for (X = 0; X < 200; X+=10) { + tgi_line(0, 0, 200, X); + tgi_line(0, 0, X, 200); + tgi_line(200, 200, 0, 200-X); + tgi_line(200, 200, 200-X, 0); + } + + cgetc (); + tgi_clear (); +} int main (void) { @@ -184,6 +202,7 @@ int main (void) DoCircles (); DoCheckerboard (); DoDiagram (); + DoLines (); /* Unload the driver */ tgi_unload (); -- 2.39.5