1 // ------------------------------------------------------------------
3 // ------------------------------------------------------------------
4 // This is the intro and exit secuence for the game - everything hardcoded, sorry
5 // ------------------------------------------------------------------
6 // By Kronoman - In loving memory of my father
7 // Copyright (c) 2004, Kronoman
8 // ------------------------------------------------------------------
14 void kball_do_the_intro()
19 textout_centre_ex(screen
, font
, "[ Please wait... loading... ]", SCREEN_W
/ 2, SCREEN_H
/ 2, makecol(255, 255, 255), makecol(0, 0, 64));
21 data
.load_datafile("intro.dat");
23 BITMAP
*logo
= (BITMAP
*)data
.get_resource_dat("LOGO_KRONOMAN_BMP");
25 SAMPLE
*krono_wav
= (SAMPLE
*)data
.get_resource_dat("KRONOMAN_WAV");
29 blit(logo
, screen
,0,0,0,0,logo
->w
,logo
->h
);
33 play_sample(krono_wav
, 255,128,1000,0);
36 while (!keypressed()) rest(100);
42 void kball_do_the_exit()
47 DATAFILE
*datastream
; // data stream for reading about text
48 char *readstream
; // stream for reading about text
49 int xstream
= 0; // where I'm reading the stream?
52 textout_centre_ex(screen
, font
, "[ Please wait... loading... ]", SCREEN_W
/ 2, SCREEN_H
/ 2, makecol(255, 255, 255), makecol(0, 0, 64));
54 data
.load_datafile("intro.dat");
56 datastream
= data
.get_resource("INTRO_TXT"); // get about text
58 readstream
= (char *)datastream
->dat
;
60 usprintf(tmp_str
, "%d_BMP", rand()%5+1);
61 face
= (BITMAP
*)data
.get_resource_dat(tmp_str
);
63 clear_to_color(screen
, makecol(255,255,255));
64 blit(face
, screen
,0,0,(SCREEN_W
- face
->w
) / 2, 5,face
->w
,face
->h
);
68 int c
= makecol(0,0,0);
69 int c2
= makecol(0,0,0);
72 for (xstream
=0; xstream
< datastream
->size
; xstream
++)
74 if (readstream
[xstream
] > '\n')
76 buf
[xbuf
] = readstream
[xstream
];
81 if (readstream
[xstream
] == '\n')
84 //textout_centre_ex(screen, font, buf, x+1,y+1,c2,-1);
85 textout_centre_ex(screen
, font
, buf
, x
,y
,c
,-1);
89 y
+= text_height(font
);
94 textout_centre_ex(screen
, font
, buf
, x
,y
,c
,-1);
97 while (!keypressed()) rest(100);