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);
41 void kball_do_the_exit()
46 DATAFILE
*datastream
; // data stream for reading about text
47 char *readstream
; // stream for reading about text
48 int xstream
= 0; // where I'm reading the stream?
51 textout_centre_ex(screen
, font
, "[ Please wait... loading... ]", SCREEN_W
/ 2, SCREEN_H
/ 2, makecol(255, 255, 255), makecol(0, 0, 64));
53 data
.load_datafile("intro.dat");
55 datastream
= data
.get_resource("INTRO_TXT"); // get about text
57 readstream
= (char *)datastream
->dat
;
59 usprintf(tmp_str
, "%d_BMP", rand()%5+1);
60 face
= (BITMAP
*)data
.get_resource_dat(tmp_str
);
62 clear_to_color(screen
, makecol(255,255,255));
63 blit(face
, screen
,0,0,(SCREEN_W
- face
->w
) / 2, 5,face
->w
,face
->h
);
67 int c
= makecol(0,0,0);
68 int c2
= makecol(0,0,0);
71 for (xstream
=0; xstream
< datastream
->size
; xstream
++)
73 if (readstream
[xstream
] > '\n')
75 buf
[xbuf
] = readstream
[xstream
];
80 if (readstream
[xstream
] == '\n')
83 //textout_centre_ex(screen, font, buf, x+1,y+1,c2,-1);
84 textout_centre_ex(screen
, font
, buf
, x
,y
,c
,-1);
88 y
+= text_height(font
);
93 textout_centre_ex(screen
, font
, buf
, x
,y
,c
,-1);