2000-07-15 09:12:11 +00:00
|
|
|
/*
|
|
|
|
GEOSLib example
|
|
|
|
|
|
|
|
Hello, world example - using graphic functions
|
|
|
|
|
|
|
|
Maciej 'YTM/Alliance' Witkowiak
|
|
|
|
<ytm@friko.onet.pl>
|
|
|
|
|
|
|
|
26.12.1999
|
|
|
|
*/
|
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
|
2000-07-15 09:12:11 +00:00
|
|
|
#include <geos.h>
|
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
// Let's define the window we're operating
|
2000-07-15 09:12:11 +00:00
|
|
|
struct window wholeScreen = {0, 199, 0, 319};
|
|
|
|
|
|
|
|
|
|
|
|
void main (void)
|
|
|
|
{
|
2012-02-09 12:32:53 +00:00
|
|
|
// Let's show what we've got...
|
2000-07-15 09:12:11 +00:00
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
// Let's clear the screen - with different pattern, because apps have cleared screen upon
|
|
|
|
// start
|
2000-07-15 09:12:11 +00:00
|
|
|
SetPattern(0);
|
|
|
|
InitDrawWindow(&wholeScreen);
|
|
|
|
Rectangle();
|
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
// Now some texts
|
2000-07-15 09:12:11 +00:00
|
|
|
PutString(COUTLINEON "This is compiled using cc65!" CPLAINTEXT, 20, 10);
|
|
|
|
PutString(CBOLDON "This is bold", 30, 10);
|
|
|
|
PutString(CULINEON "and this is bold and underline!", 40, 10);
|
|
|
|
PutString(CPLAINTEXT "This is plain text", 50, 10);
|
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
// Wait for 5 secs...
|
|
|
|
// Note that this is multitasking sleep, and if there are any icons/menus onscreen,
|
|
|
|
// they would be usable, in this case you have only pointer usable
|
2000-07-15 09:12:11 +00:00
|
|
|
Sleep(5*50);
|
|
|
|
|
2012-02-09 12:32:53 +00:00
|
|
|
// Normal apps exit from main into system's mainloop, and app finish
|
|
|
|
// when user selects it from icons or menu, but here we want to exit
|
|
|
|
// immediately.
|
|
|
|
// So instead:
|
|
|
|
// MainLoop();
|
|
|
|
// we can do:
|
|
|
|
// (nothing as this is the end of main function)
|
|
|
|
// exit(0);
|
|
|
|
// return;
|
|
|
|
|
2003-01-10 21:09:13 +00:00
|
|
|
return;
|
2000-07-15 09:12:11 +00:00
|
|
|
}
|