X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=samples%2Ftgidemo.c;h=1d76fee2e3974d6815e6f2fb60542127d6e7bef2;hb=60e40c854cc6d7d8d181a66714b8f7b8bfb58e0e;hp=a08020640956ace65f5a0dced794620278e03411;hpb=ec417c0dc5f920807f3483e4309d755734ae0e69;p=cc65 diff --git a/samples/tgidemo.c b/samples/tgidemo.c index a08020640..1d76fee2e 100644 --- a/samples/tgidemo.c +++ b/samples/tgidemo.c @@ -40,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" @@ -55,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 @@ -146,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);