summaryrefslogtreecommitdiff
path: root/apps/plugins/xrick/scr_xrick.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/xrick/scr_xrick.c')
-rw-r--r--apps/plugins/xrick/scr_xrick.c101
1 files changed, 101 insertions, 0 deletions
diff --git a/apps/plugins/xrick/scr_xrick.c b/apps/plugins/xrick/scr_xrick.c
new file mode 100644
index 0000000000..00798ec123
--- /dev/null
+++ b/apps/plugins/xrick/scr_xrick.c
@@ -0,0 +1,101 @@
1/*
2 * xrick/scr_xrick.c
3 *
4 * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net).
5 * Copyright (C) 2008-2014 Pierluigi Vicinanza.
6 * All rights reserved.
7 *
8 * The use and distribution terms for this software are contained in the file
9 * named README, which can be found in the root of this distribution. By
10 * using this software in any fashion, you are agreeing to be bound by the
11 * terms of this license.
12 *
13 * You must not remove this notice, or any other, from this software.
14 */
15
16#include "xrick/screens.h"
17
18#include "xrick/game.h"
19#include "xrick/draw.h"
20#include "xrick/control.h"
21#include "xrick/data/img.h"
22#include "xrick/system/system.h"
23
24/*
25 * global vars
26 */
27size_t screen_nbr_imapsl = 0;
28U8 *screen_imapsl = NULL;
29
30size_t screen_nbr_imapstesps = 0;
31screen_imapsteps_t *screen_imapsteps = NULL;
32
33size_t screen_nbr_imapsofs = 0;
34U8 *screen_imapsofs = NULL;
35
36size_t screen_nbr_imaptext = 0;
37U8 **screen_imaptext = NULL;
38
39size_t screen_nbr_hiscores = 0;
40hiscore_t *screen_highScores = NULL;
41
42#ifdef GFXPC
43U8 *screen_imainhoft = NULL;
44U8 *screen_imainrdt = NULL;
45U8 *screen_imaincdc = NULL;
46U8 *screen_congrats = NULL;
47#endif
48U8 *screen_gameovertxt = NULL;
49U8 *screen_pausedtxt = NULL;
50
51
52/*
53 * Display XRICK splash screen
54 *
55 * return: SCREEN_RUNNING, SCREEN_DONE, SCREEN_EXIT
56 */
57U8
58screen_xrick(void)
59{
60 static U8 seq = 0;
61 static U8 wait = 0;
62
63 if (seq == 0) {
64 sysvid_clear();
65 draw_img(img_splash);
66 game_rects = &draw_SCREENRECT;
67 seq = 1;
68 }
69
70 switch (seq) {
71 case 1: /* wait */
72 if (wait++ > 0x2) {
73#ifdef ENABLE_SOUND
74 game_setmusic(soundBullet, 1);
75#endif
76 seq = 2;
77 wait = 0;
78 }
79 break;
80
81 case 2: /* wait */
82 if (wait++ > 0x20) {
83 seq = 99;
84 wait = 0;
85 }
86 }
87
88 if (control_test(Control_EXIT)) /* check for exit request */
89 return SCREEN_EXIT;
90
91 if (seq == 99) { /* we're done */
92 sysvid_clear();
93 sysvid_setGamePalette();
94 seq = 0;
95 return SCREEN_DONE;
96 }
97
98 return SCREEN_RUNNING;
99}
100
101/* eof */