X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=samples%2Ftgidemo.c;h=de743314e6ac86b12abf7d6f8e8ff287b749ec74;hb=HEAD;hp=a7e3b10f677943d1809a89f6d2812e7e56b7bdf2;hpb=85885001b133e2dc320b6f6459259afa69784ca8;p=cc65 diff --git a/samples/tgidemo.c b/samples/tgidemo.c index a7e3b10f6..de743314e 100644 --- a/samples/tgidemo.c +++ b/samples/tgidemo.c @@ -5,7 +5,6 @@ #include #include #include -#include @@ -41,14 +40,18 @@ static void CheckError (const char* S) unsigned char Error = tgi_geterror (); if (Error != TGI_ERR_OK) { printf ("%s: %d\n", S, Error); + if (doesclrscrafterexit ()) { + cgetc (); + } exit (EXIT_FAILURE); } } +#if DYN_DRV static void DoWarning (void) -/* Warn the user that the TGI driver is needed for this program */ +/* Warn the user that the dynamic TGI driver is needed for this program */ { printf ("Warning: This program needs the TGI\n" "driver on disk! Press 'y' if you have\n" @@ -56,8 +59,9 @@ static void DoWarning (void) if (tolower (cgetc ()) != 'y') { exit (EXIT_SUCCESS); } - printf ("Ok. Please wait patiently...\n"); + printf ("OK. Please wait patiently...\n"); } +#endif @@ -147,7 +151,7 @@ static void DoDiagram (void) /* Calculate the next points */ X = (int) (((long) (MaxX - 19) * I) / 360); - Y = (int) (((long) Amp * -cc65_sin (I)) / 256); + Y = (int) (((long) Amp * -_sin (I)) / 256); /* Draw the line */ tgi_lineto (XOrigin + X, YOrigin + Y);