]> git.sur5r.net Git - cc65/blob - samples/geos/hello2.c
Added SegDef struct and a few functions to the segdefs module
[cc65] / samples / geos / hello2.c
1
2 /*
3
4     GEOSLib example
5     
6     Hello, world example - using graphic functions
7     
8     Maciej 'YTM/Alliance' Witkowiak
9     <ytm@friko.onet.pl>
10     
11     26.12.1999
12 */
13
14 #include <geos.h>
15
16 /* Let's define the window we're operating */
17 struct window wholeScreen = {0, 199, 0, 319};
18
19
20 void main (void)
21 {
22
23 /* Let's show what we've got... */
24
25 /* Let's clear the screen - with different pattern, because apps have cleared screen upon
26    start */
27    
28     SetPattern(0);
29     InitDrawWindow(&wholeScreen);
30     Rectangle();
31    
32 /* Now some texts               */
33
34     PutString(COUTLINEON "This is compiled using cc65!" CPLAINTEXT, 20, 10);
35     PutString(CBOLDON "This is bold", 30, 10);
36     PutString(CULINEON "and this is bold and underline!", 40, 10);
37     PutString(CPLAINTEXT "This is plain text", 50, 10);
38     
39 /* Wait for 5 secs...           */
40 /* Note that this is multitasking sleep, and if there are any icons/menus onscreen,
41    they would be usable, in this case you have only pointer usable      */
42
43     Sleep(5*50);
44              
45 /* Normal apps exit from main into system's mainloop, and app finish
46    when user selects it from icons or menu, but here we want to exit
47    immediately.
48 */
49     EnterDeskTop();
50 }