1 // ------------------------------------------------------------------
3 // ------------------------------------------------------------------
4 // This are some miscellaneous helper functions, mainly used by the kernel UI interface
5 // ------------------------------------------------------------------
6 // Developed By Kronoman - Copyright (c) 2004
7 // In loving memory of my father
8 // ------------------------------------------------------------------
12 // ------------------------------------------------------------------
13 // does a cheap interlaced darkening of bmp
14 // ------------------------------------------------------------------
15 void ui_misc_dark_bmp(BITMAP
*bmp
)
17 for (int yi
= 0; yi
< SCREEN_H
; yi
+=2)
18 hline(bmp
,0,yi
,SCREEN_W
,makecol(0,0,0));
21 // ------------------------------------------------------------------
22 // text in color of ct with shadow in color of cs
23 // ------------------------------------------------------------------
24 void ui_misc_text_out_shadow(BITMAP
*bmp
, FONT
*f
, const char *s
, int x
, int y
, int cs
, int ct
)
26 textout_centre_ex(bmp
,f
,s
,x
+3,y
+3,cs
,-1);
27 textout_centre_ex(bmp
,f
,s
,x
,y
,ct
,-1);
31 // ------------------------------------------------------------------
32 // waits for input from user, like key/mouse/joystick
33 // this DON'T PUT the message, just waits!
34 // ------------------------------------------------------------------
35 void ui_misc_wait_for_input()
41 while ((!keypressed()) && (!mouse_b
) && (!joy
[0].button
[0].b
))
44 if (keyboard_needs_poll()) poll_keyboard();
45 if (mouse_needs_poll()) poll_mouse();