Debian Codegraph @

src/nortvars.c

raw symbols SCIP
1 /*
2 * OpenTyrian: A modern cross-platform port of Tyrian
3 * Copyright (C) 2007-2009 The OpenTyrian Development Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 #include "nortvars.h"cxx . . $ `<file>/src/nortvars.h`/
20
21 #include "file.h"cxx . . $ `<file>/src/file.h`/
22 #include "joystick.h"cxx . . $ `<file>/src/joystick.h`/
23 #include "keyboard.h"cxx . . $ `<file>/src/keyboard.h`/
24 #include "opentyr.h"cxx . . $ `<file>/src/opentyr.h`/
25 #include "vga256d.h"cxx . . $ `<file>/src/vga256d.h`/
26 #include "video.h"cxx . . $ `<file>/src/video.h`/
27
28 #include <assert.h>
29 #include <ctype.h>
30
31 JE_booleancxx . . $ JE_boolean# inputDetectedcxx . . $ inputDetected.;
32
33 JE_booleancxx . . $ JE_boolean# JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).(void)
34 {
35 poll_joystickscxx . . $ poll_joysticks(49f6e7a06ebc5aa8).();
36 service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!);
37 return newkeycxx . . $ newkey. || mousedowncxx . . $ mousedown. || joydowncxx . . $ joydown.;
38 }
39
40 void JE_dBar3cxx . . $ JE_dBar3(6011c4bc33073089).(SDL_Surfacecxx . . $ SDL_Surface# *surface, JE_integercxx . . $ JE_integer# x, JE_integercxx . . $ JE_integer# y, JE_integercxx . . $ JE_integer# num, JE_integercxx . . $ JE_integer# col)
41 {
42 JE_bytecxx . . $ JE_byte# z;
43 JE_bytecxx . . $ JE_byte# zWait = 2;
44
45 col += 2;
46
47 for (z = 0; z <= num; z++)
48 {
49 JE_rectanglecxx . . $ JE_rectangle(fa5faf37b232239e).(surface, x, y - 1, x + 8, y, col); /* <MXD> SEGa000 */
50 if (zWait > 0)
51 {
52 zWait--;
53 }
54 else
55 {
56 col++;
57 zWait = 1;
58 }
59 y -= 2;
60 }
61 }
62
63 void JE_barDrawShadowcxx . . $ JE_barDrawShadow(2b5d735fb21d70c8).(SDL_Surfacecxx . . $ SDL_Surface# *surface, JE_wordcxx . . $ JE_word# x, JE_wordcxx . . $ JE_word# y, JE_wordcxx . . $ JE_word# res, JE_wordcxx . . $ JE_word# col, JE_wordcxx . . $ JE_word# amt, JE_wordcxx . . $ JE_word# xsize, JE_wordcxx . . $ JE_word# ysize)
64 {
65 xsize--;
66 ysize--;
67
68 for (int z = 1; z <= amt / res; z++)
69 {
70 JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(surface, x+2, y+2, x+xsize+2, y+ysize+2);
71 fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(surface, x, y, x+xsize, y+ysize, col+12);
72 fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(surface, x, y, x+xsize, y, col+13);
73 JE_pixcxx . . $ JE_pix(a8f544383a9967e9).(surface, x, y, col+15);
74 fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(surface, x, y+ysize, x+xsize, y+ysize, col+11);
75 x += xsize + 2;
76 }
77
78 amt %= res;
79 if (amt > 0)
80 {
81 JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(surface, x+2, y+2, x+xsize+2, y+ysize+2);
82 fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(surface, x,y, x+xsize, y+ysize, col+(12 / res * amt));
83 }
84 }
85
86 void JE_wipeKeycxx . . $ JE_wipeKey(49f6e7a06ebc5aa8).(void)
87 {
88 // /!\ Doesn't seems to affect anything.
89 }