| 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 "mainint.h"cxx . . $ `<file>/src/mainint.h`/ |
| 20 | |
| 21 | #include "backgrnd.h"cxx . . $ `<file>/src/backgrnd.h`/ |
| 22 | #include "config.h"cxx . . $ `<file>/src/config.h`/ |
| 23 | #include "editship.h"cxx . . $ `<file>/src/editship.h`/ |
| 24 | #include "episodes.h"cxx . . $ `<file>/src/episodes.h`/ |
| 25 | #include "file.h"cxx . . $ `<file>/src/file.h`/ |
| 26 | #include "font.h"cxx . . $ `<file>/src/font.h`/ |
| 27 | #include "fonthand.h"cxx . . $ `<file>/src/fonthand.h`/ |
| 28 | #include "helptext.h"cxx . . $ `<file>/src/helptext.h`/ |
| 29 | #include "helptext.h"cxx . . $ `<file>/src/helptext.h`/ |
| 30 | #include "joystick.h"cxx . . $ `<file>/src/joystick.h`/ |
| 31 | #include "keyboard.h"cxx . . $ `<file>/src/keyboard.h`/ |
| 32 | #include "lds_play.h"cxx . . $ `<file>/src/lds_play.h`/ |
| 33 | #include "loudness.h"cxx . . $ `<file>/src/loudness.h`/ |
| 34 | #include "menus.h"cxx . . $ `<file>/src/menus.h`/ |
| 35 | #include "mouse.h"cxx . . $ `<file>/src/mouse.h`/ |
| 36 | #include "mtrand.h"cxx . . $ `<file>/src/mtrand.h`/ |
| 37 | #include "network.h"cxx . . $ `<file>/src/network.h`/ |
| 38 | #include "nortsong.h"cxx . . $ `<file>/src/nortsong.h`/ |
| 39 | #include "nortvars.h"cxx . . $ `<file>/src/nortvars.h`/ |
| 40 | #include "opentyr.h"cxx . . $ `<file>/src/opentyr.h`/ |
| 41 | #include "palette.h"cxx . . $ `<file>/src/palette.h`/ |
| 42 | #include "params.h"cxx . . $ `<file>/src/params.h`/ |
| 43 | #include "pcxmast.h"cxx . . $ `<file>/src/pcxmast.h`/ |
| 44 | #include "picload.h"cxx . . $ `<file>/src/picload.h`/ |
| 45 | #include "player.h"cxx . . $ `<file>/src/player.h`/ |
| 46 | #include "shots.h"cxx . . $ `<file>/src/shots.h`/ |
| 47 | #include "sndmast.h"cxx . . $ `<file>/src/sndmast.h`/ |
| 48 | #include "sprite.h"cxx . . $ `<file>/src/sprite.h`/ |
| 49 | #include "varz.h"cxx . . $ `<file>/src/varz.h`/ |
| 50 | #include "vga256d.h"cxx . . $ `<file>/src/vga256d.h`/ |
| 51 | #include "video.h"cxx . . $ `<file>/src/video.h`/ |
| 52 | |
| 53 | #include <assert.h> |
| 54 | #include <ctype.h> |
| 55 | #include <string.h> |
| 56 | |
| 57 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! buttoncxx . . $ button.[4]; |
| 58 | |
| 59 | #define MAX_PAGEcxx . . $ `src/mainint.c:59:9`! 8 |
| 60 | #define TOPICScxx . . $ `src/mainint.c:60:9`! 6 |
| 61 | const JE_bytecxx . . $ JE_byte# topicStartcxx . . $ topicStart.[TOPICScxx . . $ `src/mainint.c:60:9`!] = { 0, 1, 2, 3, 7, 255 }; |
| 62 | |
| 63 | JE_shortintcxx . . $ JE_shortint# constantLastXcxx . . $ constantLastX.; |
| 64 | JE_wordcxx . . $ JE_word# textErasecxx . . $ textErase.; |
| 65 | JE_wordcxx . . $ JE_word# upgradeCostcxx . . $ upgradeCost.; |
| 66 | JE_wordcxx . . $ JE_word# downgradeCostcxx . . $ downgradeCost.; |
| 67 | JE_booleancxx . . $ JE_boolean# performSavecxx . . $ performSave.; |
| 68 | JE_booleancxx . . $ JE_boolean# jumpSectioncxx . . $ jumpSection.; |
| 69 | JE_booleancxx . . $ JE_boolean# useLastBankcxx . . $ useLastBank.; /* See if I want to use the last 16 colors for DisplayText */ |
| 70 | |
| 71 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! pause_pressedcxx . . $ pause_pressed. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, ingamemenu_pressedcxx . . $ ingamemenu_pressed. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 72 | |
| 73 | /* Draws a message at the bottom text window on the playing screen */ |
| 74 | void JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(const char *text) |
| 75 | { |
| 76 | if (textErasecxx . . $ textErase. > 0) // erase current text |
| 77 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 16, 189, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 36); // in-game text area |
| 78 | |
| 79 | textErasecxx . . $ textErase. = 100; |
| 80 | JE_outTextcxx . . $ JE_outText(894c69c4be246b6e).(VGAScreenSegcxx . . $ VGAScreenSeg., 20, 190, text, 0, 4); |
| 81 | } |
| 82 | |
| 83 | void JE_outCharGlowcxx . . $ JE_outCharGlow(f5af8a166947a547).(JE_wordcxx . . $ JE_word# x, JE_wordcxx . . $ JE_word# y, const char *s) |
| 84 | { |
| 85 | JE_integercxx . . $ JE_integer# maxloc, loc, z; |
| 86 | JE_shortintcxx . . $ JE_shortint# glowcol[60]; /* [1..60] */ |
| 87 | JE_shortintcxx . . $ JE_shortint# glowcolc[60]; /* [1..60] */ |
| 88 | JE_wordcxx . . $ JE_word# textloc[60]; /* [1..60] */ |
| 89 | JE_bytecxx . . $ JE_byte# bank; |
| 90 | |
| 91 | setDelay2cxx . . $ setDelay2(d4f767463ce0a6b3).(1); |
| 92 | |
| 93 | bank = (warningRedcxx . . $ warningRed.) ? 7 : ((useLastBankcxx . . $ useLastBank.) ? 15 : 14); |
| 94 | |
| 95 | if (s[0] == '\0') |
| 96 | return; |
| 97 | |
| 98 | if (frameCountMaxcxx . . $ frameCountMax. == 0) |
| 99 | { |
| 100 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., x, y, s, bank, 0, PART_SHADEcxx . . $ `src/fonthand.h:26:9`!); |
| 101 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 102 | } |
| 103 | else |
| 104 | { |
| 105 | maxloc = strlencxx . . $ strlen(751346f8406fd082).(s); |
| 106 | for (z = 0; z < 60; z++) |
| 107 | { |
| 108 | glowcol[z] = -8; |
| 109 | glowcolc[z] = 1; |
| 110 | } |
| 111 | |
| 112 | loc = x; |
| 113 | for (z = 0; z < maxloc; z++) |
| 114 | { |
| 115 | textloc[z] = loc; |
| 116 | |
| 117 | int sprite_id = font_asciicxx . . $ font_ascii.[(unsigned char)s[z]]; |
| 118 | |
| 119 | if (s[z] == ' ') |
| 120 | loc += 6; |
| 121 | else if (sprite_id != -1) |
| 122 | loc += spritecxx . . $ sprite(d067a90ab23634af).(TINY_FONTcxx . . $ `src/sprite.h:31:9`!, sprite_id)->widthcxx . . $ $anonymous_type_297934740aeafb7d_0#width. + 1; |
| 123 | } |
| 124 | |
| 125 | for (loc = 0; (unsigned)loc < strlencxx . . $ strlen(751346f8406fd082).(s) + 28; loc++) |
| 126 | { |
| 127 | if (!ESCPressedcxx . . $ ESCPressed.) |
| 128 | { |
| 129 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(frameCountMaxcxx . . $ frameCountMax.); |
| 130 | |
| 131 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 132 | |
| 133 | int sprite_id = -1; |
| 134 | |
| 135 | for (z = loc - 28; z <= loc; z++) |
| 136 | { |
| 137 | if (z >= 0 && z < maxloc) |
| 138 | { |
| 139 | sprite_id = font_asciicxx . . $ font_ascii.[(unsigned char)s[z]]; |
| 140 | |
| 141 | if (sprite_id != -1) |
| 142 | { |
| 143 | blit_sprite_hvcxx . . $ blit_sprite_hv(62f96868ab2f1929).(VGAScreencxx . . $ VGAScreen., textloc[z], y, TINY_FONTcxx . . $ `src/sprite.h:31:9`!, sprite_id, bank, glowcol[z]); |
| 144 | |
| 145 | glowcol[z] += glowcolc[z]; |
| 146 | if (glowcol[z] > 9) |
| 147 | glowcolc[z] = -1; |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | if (sprite_id != -1 && --z < maxloc) |
| 152 | blit_sprite_darkcxx . . $ blit_sprite_dark(34bc9a7b28a4eeec).(VGAScreencxx . . $ VGAScreen., textloc[z] + 1, y + 1, TINY_FONTcxx . . $ `src/sprite.h:31:9`!, sprite_id, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 153 | |
| 154 | if (JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).()) |
| 155 | frameCountMaxcxx . . $ frameCountMax. = 0; |
| 156 | |
| 157 | do |
| 158 | { |
| 159 | if (levelWarningDisplaycxx . . $ levelWarningDisplay.) |
| 160 | JE_updateWarningcxx . . $ JE_updateWarning(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 161 | |
| 162 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 163 | } while (!(getDelayTickscxx . . $ getDelayTicks(db52760e79bf9054).() == 0 || ESCPressedcxx . . $ ESCPressed.)); |
| 164 | |
| 165 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | void JE_drawPortConfigButtonscxx . . $ JE_drawPortConfigButtons(49f6e7a06ebc5aa8).(void) // rear weapon pattern indicator |
| 172 | { |
| 173 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 174 | return; |
| 175 | |
| 176 | if (playercxx . . $ player.[0].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. == 1) |
| 177 | { |
| 178 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 285, 44, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 18); // lit |
| 179 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 302, 44, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 19); // unlit |
| 180 | } |
| 181 | else // == 2 |
| 182 | { |
| 183 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 285, 44, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 19); // unlit |
| 184 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 302, 44, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 18); // lit |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! helpSystemPagecxx . . $ helpSystemPage(748f54c33c04143a).(Uint8cxx . . $ Uint8# *topic, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! *restart); |
| 189 | |
| 190 | void JE_helpSystemcxx . . $ JE_helpSystem(ac50b47256ae7414).(JE_bytecxx . . $ JE_byte# startTopic) |
| 191 | { |
| 192 | if (shopSpriteSheetcxx . . $ shopSpriteSheet..datacxx . . $ $anonymous_type_297934740aeafb7d_2#data. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 193 | JE_loadCompShapescxx . . $ JE_loadCompShapes(676db0deaa5c5c40).(&shopSpriteSheetcxx . . $ shopSpriteSheet., '1'); // need mouse pointer sprites |
| 194 | |
| 195 | Uint8cxx . . $ Uint8# topic = startTopic; |
| 196 | |
| 197 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! restart = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 198 | |
| 199 | const size_t menuItemsCount = COUNTOFcxx . . $ `src/opentyr.h:27:9`!(topicName) - 1; |
| 200 | size_t selectedIndex = 0; |
| 201 | |
| 202 | const int xCenter = 320 / 2; |
| 203 | const int yMenuHeader = 30; |
| 204 | const int yMenuItems = 60; |
| 205 | const int dyMenuItems = 20; |
| 206 | const int hMenuItem = 13; |
| 207 | int wMenuItem[COUNTOFcxx . . $ `src/opentyr.h:27:9`!(topicName) - 1] = { 0 }; |
| 208 | |
| 209 | for (; ; ) |
| 210 | { |
| 211 | if (restart) |
| 212 | { |
| 213 | play_songcxx . . $ play_song(cb2f890c2fdad230).(SONG_MAPVIEWcxx . . $ `src/musmast.h:27:9`!); |
| 214 | |
| 215 | JE_loadPiccxx . . $ JE_loadPic(4846ed2ea5b0a844).(VGAScreen2cxx . . $ VGAScreen2., 2, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 216 | } |
| 217 | |
| 218 | if (topic > 1) |
| 219 | { |
| 220 | if (!helpSystemPagecxx . . $ helpSystemPage(748f54c33c04143a).(&topic, &restart)) |
| 221 | return; |
| 222 | |
| 223 | selectedIndex = (size_t)topic - 1; |
| 224 | topic = 1; |
| 225 | continue; |
| 226 | } |
| 227 | |
| 228 | // Restore background. |
| 229 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., (size_t)VGAScreencxx . . $ VGAScreen.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreencxx . . $ VGAScreen.->hcxx . . $ SDL_Surface#h.); |
| 230 | |
| 231 | // Draw header. |
| 232 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, yMenuHeader, topicNamecxx . . $ topicName.[0], large_fontcxx . . $ large_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 233 | |
| 234 | // Draw menu items. |
| 235 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 236 | { |
| 237 | const char *const text = topicNamecxx . . $ topicName.[i + 1]; |
| 238 | |
| 239 | wMenuItem[i] = JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(text, normal_fontcxx . . $ normal_font.); |
| 240 | const int y = yMenuItems + dyMenuItems * i; |
| 241 | |
| 242 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! selected = i == selectedIndex; |
| 243 | |
| 244 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, y, text, normal_fontcxx . . $ normal_font., centeredcxx . . $ centered., 15, -3 + (selected ? 2 : 0), falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 245 | } |
| 246 | |
| 247 | mouseCursorcxx . . $ mouseCursor. = MOUSE_POINTER_NORMALcxx . . $ MOUSE_POINTER_NORMAL.; |
| 248 | |
| 249 | if (restart) |
| 250 | { |
| 251 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 10, 0, 255); |
| 252 | |
| 253 | restart = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 254 | } |
| 255 | |
| 256 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 257 | |
| 258 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 259 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 260 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 261 | |
| 262 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mouseMoved = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 263 | do |
| 264 | { |
| 265 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 266 | |
| 267 | Uint16cxx . . $ Uint16# oldMouseX = mouse_xcxx . . $ mouse_x.; |
| 268 | Uint16cxx . . $ Uint16# oldMouseY = mouse_ycxx . . $ mouse_y.; |
| 269 | |
| 270 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 271 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 272 | |
| 273 | mouseMoved = mouse_xcxx . . $ mouse_x. != oldMouseX || mouse_ycxx . . $ mouse_y. != oldMouseY; |
| 274 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse. || mouseMoved)); |
| 275 | |
| 276 | // Handle interaction. |
| 277 | |
| 278 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! action = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 279 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 280 | |
| 281 | if (mouseMoved || newmousecxx . . $ newmouse.) |
| 282 | { |
| 283 | // Find menu item that was hovered or clicked. |
| 284 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 285 | { |
| 286 | const int xMenuItem = xCenter - wMenuItem[i] / 2; |
| 287 | if (mouse_xcxx . . $ mouse_x. >= xMenuItem && mouse_xcxx . . $ mouse_x. < xMenuItem + wMenuItem[i]) |
| 288 | { |
| 289 | const int yMenuItem = yMenuItems + dyMenuItems * i; |
| 290 | if (mouse_ycxx . . $ mouse_y. >= yMenuItem && mouse_ycxx . . $ mouse_y. < yMenuItem + hMenuItem) |
| 291 | { |
| 292 | if (selectedIndex != i) |
| 293 | { |
| 294 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 295 | |
| 296 | selectedIndex = i; |
| 297 | } |
| 298 | |
| 299 | if (newmousecxx . . $ newmouse. && lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`! && |
| 300 | lastmouse_xcxx . . $ lastmouse_x. >= xMenuItem && lastmouse_xcxx . . $ lastmouse_x. < xMenuItem + wMenuItem[i] && |
| 301 | lastmouse_ycxx . . $ lastmouse_y. >= yMenuItem && lastmouse_ycxx . . $ lastmouse_y. < yMenuItem + hMenuItem) |
| 302 | { |
| 303 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 304 | } |
| 305 | |
| 306 | break; |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | if (newmousecxx . . $ newmouse.) |
| 313 | { |
| 314 | if (lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!) |
| 315 | { |
| 316 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 317 | |
| 318 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 319 | } |
| 320 | } |
| 321 | else if (newkeycxx . . $ newkey.) |
| 322 | { |
| 323 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 324 | { |
| 325 | case SDL_SCANCODE_UPcxx . . $ SDL_SCANCODE_UP.: |
| 326 | { |
| 327 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 328 | |
| 329 | selectedIndex = selectedIndex == 0 |
| 330 | ? menuItemsCount - 1 |
| 331 | : selectedIndex - 1; |
| 332 | break; |
| 333 | } |
| 334 | case SDL_SCANCODE_DOWNcxx . . $ SDL_SCANCODE_DOWN.: |
| 335 | { |
| 336 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 337 | |
| 338 | selectedIndex = selectedIndex == menuItemsCount - 1 |
| 339 | ? 0 |
| 340 | : selectedIndex + 1; |
| 341 | break; |
| 342 | } |
| 343 | case SDL_SCANCODE_SPACEcxx . . $ SDL_SCANCODE_SPACE.: |
| 344 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 345 | { |
| 346 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 347 | break; |
| 348 | } |
| 349 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 350 | { |
| 351 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 352 | |
| 353 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 354 | break; |
| 355 | } |
| 356 | default: |
| 357 | break; |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | if (action) |
| 362 | { |
| 363 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 364 | |
| 365 | topic = selectedIndex + 2; |
| 366 | |
| 367 | if (selectedIndex == menuItemsCount - 1) |
| 368 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 369 | } |
| 370 | |
| 371 | if (done) |
| 372 | { |
| 373 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 374 | |
| 375 | return; |
| 376 | } |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! helpSystemPagecxx . . $ helpSystemPage(748f54c33c04143a).(Uint8cxx . . $ Uint8# *topic, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! *restart) |
| 381 | { |
| 382 | Uint8cxx . . $ Uint8# page = topicStartcxx . . $ topicStart.[*topic - 1]; |
| 383 | |
| 384 | const int xCenter = 320 / 2; |
| 385 | |
| 386 | for (; ; ) |
| 387 | { |
| 388 | if (page == 0) |
| 389 | { |
| 390 | *topic = 1; |
| 391 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 392 | } |
| 393 | else if (page > MAX_PAGEcxx . . $ `src/mainint.c:59:9`!) |
| 394 | { |
| 395 | *topic = COUNTOFcxx . . $ `src/opentyr.h:27:9`!(topicName) - 1; |
| 396 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 397 | } |
| 398 | |
| 399 | for (Uint8cxx . . $ Uint8# temp = 0; temp < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(topicName); ++temp) |
| 400 | { |
| 401 | if (topicStartcxx . . $ topicStart.[temp] <= page) |
| 402 | *topic = temp + 1; |
| 403 | else |
| 404 | break; |
| 405 | } |
| 406 | |
| 407 | // Restore background. |
| 408 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., (size_t)VGAScreencxx . . $ VGAScreen.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreencxx . . $ VGAScreen.->hcxx . . $ SDL_Surface#h.); |
| 409 | |
| 410 | fill_rectangle_whcxx . . $ fill_rectangle_wh(2ff783435439505a).(VGAScreencxx . . $ VGAScreen., 0, 192, 320, 8, 0); |
| 411 | |
| 412 | const char *const text = topicNamecxx . . $ topicName.[*topic - 1]; |
| 413 | |
| 414 | // Draw header. |
| 415 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, 1, text, normal_fontcxx . . $ normal_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 416 | |
| 417 | // Draw footer. |
| 418 | JE_charcxx . . $ JE_char# buffer[128]; |
| 419 | |
| 420 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "%s %d", miscTextcxx . . $ miscText.[24], page - topicStartcxx . . $ topicStart.[*topic - 1] + 1); |
| 421 | draw_font_hvcxx . . $ draw_font_hv(3eb897592553ef61).(VGAScreencxx . . $ VGAScreen., 10, 192, buffer, small_fontcxx . . $ small_font., left_alignedcxx . . $ left_aligned., 13, 5); |
| 422 | |
| 423 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "%s %d of %d", miscTextcxx . . $ miscText.[25], page, MAX_PAGEcxx . . $ `src/mainint.c:59:9`!); |
| 424 | draw_font_hvcxx . . $ draw_font_hv(3eb897592553ef61).(VGAScreencxx . . $ VGAScreen., 320 - 10, 192, buffer, small_fontcxx . . $ small_font., right_alignedcxx . . $ right_aligned., 13, 5); |
| 425 | |
| 426 | // Draw text. |
| 427 | |
| 428 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 429 | verticalHeightcxx . . $ verticalHeight. = 8; |
| 430 | |
| 431 | switch (page) |
| 432 | { |
| 433 | case 1: /* One-Player Menu */ |
| 434 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 2, 60); |
| 435 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 50, 5, 60); |
| 436 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 80, 21, 60); |
| 437 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 110, 1, 60); |
| 438 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 140, 28, 60); |
| 439 | break; |
| 440 | case 2: /* Two-Player Menu */ |
| 441 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 1, 60); |
| 442 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 60, 2, 60); |
| 443 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 100, 21, 60); |
| 444 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 140, 28, 60); |
| 445 | break; |
| 446 | case 3: /* Upgrade Ship */ |
| 447 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 5, 60); |
| 448 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 70, 6, 60); |
| 449 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 110, 7, 60); |
| 450 | break; |
| 451 | case 4: |
| 452 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 8, 60); |
| 453 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 55, 9, 60); |
| 454 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 87, 10, 60); |
| 455 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 120, 11, 60); |
| 456 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 170, 13, 60); |
| 457 | break; |
| 458 | case 5: |
| 459 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 14, 60); |
| 460 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 80, 15, 60); |
| 461 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 120, 16, 60); |
| 462 | break; |
| 463 | case 6: |
| 464 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 17, 60); |
| 465 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 40, 18, 60); |
| 466 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 130, 20, 60); |
| 467 | break; |
| 468 | case 7: /* Options */ |
| 469 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 21, 60); |
| 470 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 70, 22, 60); |
| 471 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 110, 23, 60); |
| 472 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 140, 24, 60); |
| 473 | break; |
| 474 | case 8: |
| 475 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 20, 25, 60); |
| 476 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 60, 26, 60); |
| 477 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 100, 27, 60); |
| 478 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 140, 28, 60); |
| 479 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 10, 170, 29, 60); |
| 480 | break; |
| 481 | } |
| 482 | |
| 483 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 1; |
| 484 | verticalHeightcxx . . $ verticalHeight. = 7; |
| 485 | |
| 486 | if (*restart) |
| 487 | { |
| 488 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 10, 0, 255); |
| 489 | |
| 490 | *restart = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 491 | } |
| 492 | |
| 493 | do |
| 494 | { |
| 495 | mouseCursorcxx . . $ mouseCursor. = mouse_xcxx . . $ mouse_x. < xCenter ? MOUSE_POINTER_LEFTcxx . . $ MOUSE_POINTER_LEFT. : MOUSE_POINTER_RIGHTcxx . . $ MOUSE_POINTER_RIGHT.; |
| 496 | |
| 497 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 498 | |
| 499 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 500 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 501 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 502 | |
| 503 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 504 | |
| 505 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 506 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 507 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse.)); |
| 508 | |
| 509 | // Handle interaction. |
| 510 | |
| 511 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 512 | |
| 513 | if (newmousecxx . . $ newmouse.) |
| 514 | { |
| 515 | switch (lastmouse_butcxx . . $ lastmouse_but.) |
| 516 | { |
| 517 | case SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!: |
| 518 | { |
| 519 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 520 | |
| 521 | if (mouse_xcxx . . $ mouse_x. < xCenter) |
| 522 | page -= 1; |
| 523 | else |
| 524 | page += 1; |
| 525 | break; |
| 526 | } |
| 527 | case SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!: |
| 528 | { |
| 529 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 530 | |
| 531 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 532 | break; |
| 533 | } |
| 534 | default: |
| 535 | break; |
| 536 | } |
| 537 | } |
| 538 | else if (newkeycxx . . $ newkey.) |
| 539 | { |
| 540 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 541 | { |
| 542 | case SDL_SCANCODE_LEFTcxx . . $ SDL_SCANCODE_LEFT.: |
| 543 | { |
| 544 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 545 | |
| 546 | page -= 1; |
| 547 | break; |
| 548 | } |
| 549 | case SDL_SCANCODE_RIGHTcxx . . $ SDL_SCANCODE_RIGHT.: |
| 550 | case SDL_SCANCODE_SPACEcxx . . $ SDL_SCANCODE_SPACE.: |
| 551 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 552 | { |
| 553 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 554 | |
| 555 | page += 1; |
| 556 | break; |
| 557 | } |
| 558 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 559 | { |
| 560 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 561 | |
| 562 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 563 | break; |
| 564 | } |
| 565 | default: |
| 566 | break; |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | if (done) |
| 571 | { |
| 572 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 573 | |
| 574 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | // cost to upgrade a weapon power from power-1 (where power == 0 indicates an unupgraded weapon) |
| 580 | long weapon_upgrade_costcxx . . $ weapon_upgrade_cost(5e06c073c9468c32).(long base_cost, unsigned int power) |
| 581 | { |
| 582 | assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(power <= 11); |
| 583 | |
| 584 | unsigned int temp = 0; |
| 585 | |
| 586 | // 0 1 3 6 10 15 21 29 ... |
| 587 | for (; power > 0; power--) |
| 588 | temp += power; |
| 589 | |
| 590 | return base_cost * temp; |
| 591 | } |
| 592 | |
| 593 | ulongcxx . . $ ulong# JE_getCostcxx . . $ JE_getCost(787d21ae4415b813).(JE_bytecxx . . $ JE_byte# itemType, JE_wordcxx . . $ JE_word# itemNum) |
| 594 | { |
| 595 | long cost = 0; |
| 596 | |
| 597 | switch (itemType) |
| 598 | { |
| 599 | case 2: |
| 600 | cost = (itemNum > 90) ? 100 : shipscxx . . $ ships.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_6#cost.; |
| 601 | break; |
| 602 | case 3: |
| 603 | case 4: |
| 604 | cost = weaponPortcxx . . $ weaponPort.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_1#cost.; |
| 605 | |
| 606 | const uintcxx . . $ uint# port = itemType - 3, |
| 607 | item_power = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[port].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. - 1; |
| 608 | |
| 609 | downgradeCostcxx . . $ downgradeCost. = weapon_upgrade_costcxx . . $ weapon_upgrade_cost(5e06c073c9468c32).(cost, item_power); |
| 610 | upgradeCostcxx . . $ upgradeCost. = weapon_upgrade_costcxx . . $ weapon_upgrade_cost(5e06c073c9468c32).(cost, item_power + 1); |
| 611 | break; |
| 612 | case 5: |
| 613 | cost = shieldscxx . . $ shields.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_5#cost.; |
| 614 | break; |
| 615 | case 6: |
| 616 | cost = powerSyscxx . . $ powerSys.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_2#cost.; |
| 617 | break; |
| 618 | case 7: |
| 619 | case 8: |
| 620 | cost = optionscxx . . $ options.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_4#cost.; |
| 621 | break; |
| 622 | } |
| 623 | |
| 624 | return cost; |
| 625 | } |
| 626 | |
| 627 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! JE_loadScreencxx . . $ JE_loadScreen(c9857a73d68e59ba).(void) |
| 628 | { |
| 629 | if (shopSpriteSheetcxx . . $ shopSpriteSheet..datacxx . . $ $anonymous_type_297934740aeafb7d_2#data. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 630 | JE_loadCompShapescxx . . $ JE_loadCompShapes(676db0deaa5c5c40).(&shopSpriteSheetcxx . . $ shopSpriteSheet., '1'); // need mouse pointer and arrow sprites |
| 631 | |
| 632 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! restart = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 633 | |
| 634 | size_t playersIndex = 0; |
| 635 | const size_t menuItemsCount = 12; |
| 636 | size_t selectedIndex = 0; |
| 637 | |
| 638 | const int xCenter = 320 / 2; |
| 639 | const int yMenuHeader = 5; |
| 640 | const int xMenuItem = 10; |
| 641 | const int xMenuItemName = xMenuItem; |
| 642 | const int xMenuItemLastLevel = 120; |
| 643 | const int xMenuItemEpisode = 250; |
| 644 | const int wMenuItem = 300; |
| 645 | const int yMenuItems = 30; |
| 646 | const int dyMenuItems = 13; |
| 647 | const int hMenuItem = 8; |
| 648 | const int xLeftControl = 83; |
| 649 | const int xRightControl = 213; |
| 650 | const int wControl = 24; |
| 651 | const int yControls = 179; |
| 652 | |
| 653 | for (; ; ) |
| 654 | { |
| 655 | if (restart) |
| 656 | { |
| 657 | JE_loadPiccxx . . $ JE_loadPic(4846ed2ea5b0a844).(VGAScreen2cxx . . $ VGAScreen2., 2, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 658 | fill_rectangle_whcxx . . $ fill_rectangle_wh(2ff783435439505a).(VGAScreen2cxx . . $ VGAScreen2., 0, 192, 320, 8, 0); |
| 659 | } |
| 660 | |
| 661 | // Restore background. |
| 662 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., (size_t)VGAScreencxx . . $ VGAScreen.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreencxx . . $ VGAScreen.->hcxx . . $ SDL_Surface#h.); |
| 663 | |
| 664 | // Draw header. |
| 665 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, yMenuHeader, miscTextcxx . . $ miscText.[38 + playersIndex], large_fontcxx . . $ large_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 666 | |
| 667 | // Draw menu items. |
| 668 | |
| 669 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 670 | { |
| 671 | const int y = yMenuItems + dyMenuItems * i; |
| 672 | |
| 673 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! selected = i == selectedIndex; |
| 674 | |
| 675 | if (i == menuItemsCount - 1) |
| 676 | { |
| 677 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemName, y, miscTextcxx . . $ miscText.[33], 13, selected ? 6 : 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 678 | continue; |
| 679 | } |
| 680 | |
| 681 | const JE_SaveFileTypecxx . . $ JE_SaveFileType# *const saveFile = &saveFilescxx . . $ saveFiles.[playersIndex * 11 + i]; |
| 682 | |
| 683 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! disabled = saveFile->levelcxx . . $ $anonymous_type_5227559294d527ce_2#level. == 0; |
| 684 | |
| 685 | char buffer[22]; |
| 686 | |
| 687 | if (disabled) |
| 688 | { |
| 689 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemName, y, miscTextcxx . . $ miscText.[2], 13, selected ? 6 : 0, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 690 | |
| 691 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "%s -----", miscTextBcxx . . $ miscTextB.[2]); |
| 692 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemLastLevel, y, buffer, 5, selected ? 6 : 0, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 693 | } |
| 694 | else |
| 695 | { |
| 696 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemName, y, saveFile->namecxx . . $ $anonymous_type_5227559294d527ce_2#name., 13, selected ? 6 : 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 697 | |
| 698 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "%s %s", miscTextBcxx . . $ miscTextB.[2], saveFile->levelNamecxx . . $ $anonymous_type_5227559294d527ce_2#levelName.); |
| 699 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemLastLevel, y, buffer, 5, selected ? 6 : 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 700 | |
| 701 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "%s %u", miscTextBcxx . . $ miscTextB.[1], saveFile->episodecxx . . $ $anonymous_type_5227559294d527ce_2#episode.); |
| 702 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., xMenuItemEpisode, y, buffer, 5, selected ? 6 : 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | // Draw paging controls. |
| 707 | |
| 708 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! leftControlVisible = playersIndex > 0; |
| 709 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rightControlVisible = playersIndex < 1; |
| 710 | |
| 711 | if (leftControlVisible) |
| 712 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., xLeftControl, yControls, shopSpriteSheetcxx . . $ shopSpriteSheet., 279); |
| 713 | |
| 714 | if (rightControlVisible) |
| 715 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., xRightControl, yControls, shopSpriteSheetcxx . . $ shopSpriteSheet., 281); |
| 716 | |
| 717 | helpBoxColorcxx . . $ helpBoxColor. = 15; |
| 718 | JE_helpBoxcxx . . $ JE_helpBox(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., 103, 182, miscTextcxx . . $ miscText.[55], 25); |
| 719 | |
| 720 | if (restart) |
| 721 | { |
| 722 | mouseCursorcxx . . $ mouseCursor. = MOUSE_POINTER_NORMALcxx . . $ MOUSE_POINTER_NORMAL.; |
| 723 | |
| 724 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 10, 0, 255); |
| 725 | |
| 726 | restart = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 727 | } |
| 728 | |
| 729 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 730 | |
| 731 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 732 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 733 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 734 | |
| 735 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mouseMoved = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 736 | do |
| 737 | { |
| 738 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 739 | |
| 740 | Uint16cxx . . $ Uint16# oldMouseX = mouse_xcxx . . $ mouse_x.; |
| 741 | Uint16cxx . . $ Uint16# oldMouseY = mouse_ycxx . . $ mouse_y.; |
| 742 | |
| 743 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 744 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 745 | |
| 746 | mouseMoved = mouse_xcxx . . $ mouse_x. != oldMouseX || mouse_ycxx . . $ mouse_y. != oldMouseY; |
| 747 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse. || mouseMoved)); |
| 748 | |
| 749 | // Handle interaction. |
| 750 | |
| 751 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! leftAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 752 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rightAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 753 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! action = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 754 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 755 | |
| 756 | if (mouseMoved || newmousecxx . . $ newmouse.) |
| 757 | { |
| 758 | if (leftControlVisible && |
| 759 | mouse_ycxx . . $ mouse_y. >= yControls && |
| 760 | mouse_xcxx . . $ mouse_x. >= xLeftControl && |
| 761 | mouse_xcxx . . $ mouse_x. < xLeftControl + wControl) |
| 762 | { |
| 763 | if (newmousecxx . . $ newmouse. && lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!) |
| 764 | { |
| 765 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 766 | |
| 767 | leftAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 768 | } |
| 769 | } |
| 770 | else if (rightControlVisible && |
| 771 | mouse_ycxx . . $ mouse_y. >= yControls && |
| 772 | mouse_xcxx . . $ mouse_x. >= xRightControl && |
| 773 | mouse_xcxx . . $ mouse_x. < xRightControl + wControl) |
| 774 | { |
| 775 | if (newmousecxx . . $ newmouse. && lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!) |
| 776 | { |
| 777 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 778 | |
| 779 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 780 | } |
| 781 | } |
| 782 | else |
| 783 | { |
| 784 | // Find menu item that was hovered or clicked. |
| 785 | if (mouse_xcxx . . $ mouse_x. >= xMenuItem && mouse_xcxx . . $ mouse_x. < xMenuItem + wMenuItem) |
| 786 | { |
| 787 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 788 | { |
| 789 | const int yMenuItem = yMenuItems + dyMenuItems * i; |
| 790 | if (mouse_ycxx . . $ mouse_y. >= yMenuItem && mouse_ycxx . . $ mouse_y. < yMenuItem + hMenuItem) |
| 791 | { |
| 792 | if (selectedIndex != i) |
| 793 | { |
| 794 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 795 | |
| 796 | selectedIndex = i; |
| 797 | } |
| 798 | |
| 799 | if (newmousecxx . . $ newmouse. && lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`! && |
| 800 | lastmouse_xcxx . . $ lastmouse_x. >= xMenuItem && lastmouse_xcxx . . $ lastmouse_x. < xMenuItem + wMenuItem && |
| 801 | lastmouse_ycxx . . $ lastmouse_y. >= yMenuItem && lastmouse_ycxx . . $ lastmouse_y. < yMenuItem + hMenuItem) |
| 802 | { |
| 803 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 804 | } |
| 805 | |
| 806 | break; |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | if (newmousecxx . . $ newmouse.) |
| 814 | { |
| 815 | if (lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!) |
| 816 | { |
| 817 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 818 | |
| 819 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 820 | } |
| 821 | } |
| 822 | else if (newkeycxx . . $ newkey.) |
| 823 | { |
| 824 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 825 | { |
| 826 | case SDL_SCANCODE_LEFTcxx . . $ SDL_SCANCODE_LEFT.: |
| 827 | { |
| 828 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 829 | |
| 830 | leftAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 831 | break; |
| 832 | } |
| 833 | case SDL_SCANCODE_RIGHTcxx . . $ SDL_SCANCODE_RIGHT.: |
| 834 | { |
| 835 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 836 | |
| 837 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 838 | break; |
| 839 | } |
| 840 | case SDL_SCANCODE_UPcxx . . $ SDL_SCANCODE_UP.: |
| 841 | { |
| 842 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 843 | |
| 844 | selectedIndex = selectedIndex == 0 |
| 845 | ? menuItemsCount - 1 |
| 846 | : selectedIndex - 1; |
| 847 | break; |
| 848 | } |
| 849 | case SDL_SCANCODE_DOWNcxx . . $ SDL_SCANCODE_DOWN.: |
| 850 | { |
| 851 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 852 | |
| 853 | selectedIndex = selectedIndex == menuItemsCount - 1 |
| 854 | ? 0 |
| 855 | : selectedIndex + 1; |
| 856 | break; |
| 857 | } |
| 858 | case SDL_SCANCODE_SPACEcxx . . $ SDL_SCANCODE_SPACE.: |
| 859 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 860 | { |
| 861 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 862 | break; |
| 863 | } |
| 864 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 865 | { |
| 866 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 867 | |
| 868 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 869 | break; |
| 870 | } |
| 871 | default: |
| 872 | break; |
| 873 | } |
| 874 | } |
| 875 | |
| 876 | if (leftAction) |
| 877 | { |
| 878 | playersIndex = playersIndex == 0 ? 1 : 0; |
| 879 | } |
| 880 | else if (rightAction) |
| 881 | { |
| 882 | playersIndex = playersIndex == 1 ? 0 : 1; |
| 883 | } |
| 884 | else if (action) |
| 885 | { |
| 886 | if (selectedIndex == menuItemsCount - 1) // "Exit to Main Menu" |
| 887 | { |
| 888 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 889 | |
| 890 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 891 | } |
| 892 | else |
| 893 | { |
| 894 | const size_t saveFileIndex = playersIndex * 11 + selectedIndex; |
| 895 | |
| 896 | if (saveFilescxx . . $ saveFiles.[saveFileIndex].levelcxx . . $ $anonymous_type_5227559294d527ce_2#level. == 0) // "EMPTY SLOT" |
| 897 | { |
| 898 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CLINKcxx . . $ S_CLINK.); |
| 899 | } |
| 900 | else |
| 901 | { |
| 902 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 903 | |
| 904 | performSavecxx . . $ performSave. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 905 | JE_operationcxx . . $ JE_operation(ac50b47256ae7414).(saveFileIndex + 1); |
| 906 | |
| 907 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 908 | |
| 909 | return gameLoadedcxx . . $ gameLoaded.; |
| 910 | } |
| 911 | } |
| 912 | } |
| 913 | |
| 914 | if (done) |
| 915 | { |
| 916 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 917 | |
| 918 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 919 | } |
| 920 | } |
| 921 | } |
| 922 | |
| 923 | ulongcxx . . $ ulong# JE_totalScorecxx . . $ JE_totalScore(6645df09e8416cb5).(const Playercxx . . $ Player# *this_player) |
| 924 | { |
| 925 | ulongcxx . . $ ulong# temp = this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.; |
| 926 | |
| 927 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(2, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship.); |
| 928 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(3, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.); |
| 929 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(4, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.); |
| 930 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(5, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shieldcxx . . $ $anonymous_type_55bed0e189d5bed_2#shield.); |
| 931 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(6, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..generatorcxx . . $ $anonymous_type_55bed0e189d5bed_2#generator.); |
| 932 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(7, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.]); |
| 933 | temp += JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(8, this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.]); |
| 934 | |
| 935 | return temp; |
| 936 | } |
| 937 | |
| 938 | JE_longintcxx . . $ JE_longint# JE_getValuecxx . . $ JE_getValue(c02332ba15b14eb8).(JE_bytecxx . . $ JE_byte# itemType, JE_wordcxx . . $ JE_word# itemNum) |
| 939 | { |
| 940 | long value = 0; |
| 941 | |
| 942 | switch (itemType) |
| 943 | { |
| 944 | case 2: |
| 945 | value = shipscxx . . $ ships.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_6#cost.; |
| 946 | break; |
| 947 | case 3: |
| 948 | case 4:; |
| 949 | const long base_value = weaponPortcxx . . $ weaponPort.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_1#cost.; |
| 950 | |
| 951 | // if two-player, use first player's front and second player's rear weapon |
| 952 | const uintcxx . . $ uint# port = itemType - 3; |
| 953 | const uintcxx . . $ uint# item_power = playercxx . . $ player.[twoPlayerModecxx . . $ twoPlayerMode. ? port : 0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[port].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. - 1; |
| 954 | |
| 955 | value = base_value; |
| 956 | for (unsigned int i = 1; i <= item_power; ++i) |
| 957 | value += weapon_upgrade_costcxx . . $ weapon_upgrade_cost(5e06c073c9468c32).(base_value, i); |
| 958 | break; |
| 959 | case 5: |
| 960 | value = shieldscxx . . $ shields.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_5#cost.; |
| 961 | break; |
| 962 | case 6: |
| 963 | value = powerSyscxx . . $ powerSys.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_2#cost.; |
| 964 | break; |
| 965 | case 7: |
| 966 | case 8: |
| 967 | value = optionscxx . . $ options.[itemNum].costcxx . . $ $anonymous_type_66fcae0887b82ce8_4#cost.; |
| 968 | break; |
| 969 | } |
| 970 | |
| 971 | return value; |
| 972 | } |
| 973 | |
| 974 | void JE_nextEpisodecxx . . $ JE_nextEpisode(49f6e7a06ebc5aa8).(void) |
| 975 | { |
| 976 | strcpycxx . . $ strcpy(b7b3a83273496486).(lastLevelNamecxx . . $ lastLevelName., "Completed"); |
| 977 | |
| 978 | if (episodeNumcxx . . $ episodeNum. == initial_episode_numcxx . . $ initial_episode_num. && !gameHasRepeatedcxx . . $ gameHasRepeated. && episodeNumcxx . . $ episodeNum. != EPISODE_AVAILABLEcxx . . $ `src/episodes.h:30:9`! && |
| 979 | !isNetworkGamecxx . . $ isNetworkGame. && !constantPlaycxx . . $ constantPlay.) |
| 980 | { |
| 981 | JE_highScoreCheckcxx . . $ JE_highScoreCheck(49f6e7a06ebc5aa8).(); |
| 982 | } |
| 983 | |
| 984 | unsigned int newEpisode = JE_findNextEpisodecxx . . $ JE_findNextEpisode(db52760e79bf9054).(); |
| 985 | |
| 986 | if (jumpBackToEpisode1cxx . . $ jumpBackToEpisode1.) |
| 987 | { |
| 988 | if (episodeNumcxx . . $ episodeNum. > 2 && |
| 989 | !constantPlaycxx . . $ constantPlay.) |
| 990 | { |
| 991 | JE_playCreditscxx . . $ JE_playCredits(49f6e7a06ebc5aa8).(); |
| 992 | } |
| 993 | |
| 994 | // randomly give player the SuperCarrot |
| 995 | if ((mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 6) == 0) |
| 996 | { |
| 997 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship. = 2; // SuperCarrot |
| 998 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 23; // Banana Blast |
| 999 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 24; // Banana Blast Rear |
| 1000 | |
| 1001 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[0].items.weapon); ++i) |
| 1002 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[i].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. = 1; |
| 1003 | |
| 1004 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 24; // Banana Blast Rear |
| 1005 | |
| 1006 | playercxx . . $ player.[0].last_itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#last_items. = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items.; |
| 1007 | } |
| 1008 | } |
| 1009 | |
| 1010 | if (newEpisode != episodeNumcxx . . $ episodeNum.) |
| 1011 | JE_initEpisodecxx . . $ JE_initEpisode(ac50b47256ae7414).(newEpisode); |
| 1012 | |
| 1013 | gameLoadedcxx . . $ gameLoaded. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1014 | mainLevelcxx . . $ mainLevel. = FIRST_LEVELcxx . . $ `src/episodes.h:28:9`!; |
| 1015 | saveLevelcxx . . $ saveLevel. = FIRST_LEVELcxx . . $ `src/episodes.h:28:9`!; |
| 1016 | |
| 1017 | play_songcxx . . $ play_song(cb2f890c2fdad230).(26); |
| 1018 | |
| 1019 | JE_clr256cxx . . $ JE_clr256(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 1020 | memcpycxx . . $ memcpy(cc817cb175f282d).(colorscxx . . $ colors., palettescxx . . $ palettes.[6-1], sizeof(colorscxx . . $ colors.)); |
| 1021 | |
| 1022 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(episode_namecxx . . $ episode_name.[episodeNumcxx . . $ episodeNum.], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!), 130, episode_namecxx . . $ episode_name.[episodeNumcxx . . $ episodeNum.], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); |
| 1023 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(miscTextcxx . . $ miscText.[5-1], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!), 185, miscTextcxx . . $ miscText.[5-1], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); |
| 1024 | |
| 1025 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1026 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 15, 0, 255); |
| 1027 | |
| 1028 | JE_wipeKeycxx . . $ JE_wipeKey(49f6e7a06ebc5aa8).(); |
| 1029 | if (!constantPlaycxx . . $ constantPlay.) |
| 1030 | { |
| 1031 | do |
| 1032 | { |
| 1033 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 1034 | |
| 1035 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1036 | } while (!JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).()); |
| 1037 | } |
| 1038 | |
| 1039 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 1040 | } |
| 1041 | |
| 1042 | void JE_initPlayerDatacxx . . $ JE_initPlayerData(49f6e7a06ebc5aa8).(void) |
| 1043 | { |
| 1044 | /* JE: New Game Items/Data */ |
| 1045 | |
| 1046 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship. = 1; // USP Talon |
| 1047 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 1; // Pulse Cannon |
| 1048 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 0; // None |
| 1049 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shieldcxx . . $ $anonymous_type_55bed0e189d5bed_2#shield. = 4; // Gencore High Energy Shield |
| 1050 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..generatorcxx . . $ $anonymous_type_55bed0e189d5bed_2#generator. = 2; // Advanced MR-12 |
| 1051 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[0].items.sidekick); ++i) |
| 1052 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i] = 0; // None |
| 1053 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = 0; // None |
| 1054 | |
| 1055 | playercxx . . $ player.[0].last_itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#last_items. = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items.; |
| 1056 | |
| 1057 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items. = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items.; |
| 1058 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 15; // Vulcan Cannon |
| 1059 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level. = 101; // 101, 102, 103 |
| 1060 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_seriescxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_series. = 0; // None |
| 1061 | |
| 1062 | gameHasRepeatedcxx . . $ gameHasRepeated. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1063 | onePlayerActioncxx . . $ onePlayerAction. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1064 | superArcadeModecxx . . $ superArcadeMode. = SA_NONEcxx . . $ SA_NONE.; |
| 1065 | superTyriancxx . . $ superTyrian. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1066 | twoPlayerModecxx . . $ twoPlayerMode. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1067 | |
| 1068 | secretHintcxx . . $ secretHint. = (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 3) + 1; |
| 1069 | |
| 1070 | for (uintcxx . . $ uint# p = 0; p < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++p) |
| 1071 | { |
| 1072 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->items.weapon); ++i) |
| 1073 | { |
| 1074 | playercxx . . $ player.[p].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[i].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. = 1; |
| 1075 | } |
| 1076 | |
| 1077 | playercxx . . $ player.[p].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 1078 | playercxx . . $ player.[p].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = shipscxx . . $ ships.[playercxx . . $ player.[p].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship.].dmgcxx . . $ $anonymous_type_66fcae0887b82ce8_6#dmg.; |
| 1079 | |
| 1080 | playercxx . . $ player.[p].is_dragonwingcxx . . $ $anonymous_type_55bed0e189d5bed_4#is_dragonwing. = (p == 1); |
| 1081 | playercxx . . $ player.[p].livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives. = &playercxx . . $ player.[p].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[p].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power.; |
| 1082 | |
| 1083 | } |
| 1084 | |
| 1085 | mainLevelcxx . . $ mainLevel. = FIRST_LEVELcxx . . $ `src/episodes.h:28:9`!; |
| 1086 | saveLevelcxx . . $ saveLevel. = FIRST_LEVELcxx . . $ `src/episodes.h:28:9`!; |
| 1087 | |
| 1088 | strcpycxx . . $ strcpy(b7b3a83273496486).(lastLevelNamecxx . . $ lastLevelName., miscTextcxx . . $ miscText.[19]); |
| 1089 | } |
| 1090 | |
| 1091 | void JE_sortHighScorescxx . . $ JE_sortHighScores(49f6e7a06ebc5aa8).(void) |
| 1092 | { |
| 1093 | JE_bytecxx . . $ JE_byte# x; |
| 1094 | |
| 1095 | tempcxx . . $ temp. = 0; |
| 1096 | for (x = 0; x < 6; x++) |
| 1097 | { |
| 1098 | JE_sortcxx . . $ JE_sort(49f6e7a06ebc5aa8).(); |
| 1099 | tempcxx . . $ temp. += 3; |
| 1100 | } |
| 1101 | } |
| 1102 | |
| 1103 | void JE_highScoreScreencxx . . $ JE_highScoreScreen(49f6e7a06ebc5aa8).(void) |
| 1104 | { |
| 1105 | if (shopSpriteSheetcxx . . $ shopSpriteSheet..datacxx . . $ $anonymous_type_297934740aeafb7d_2#data. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1106 | JE_loadCompShapescxx . . $ JE_loadCompShapes(676db0deaa5c5c40).(&shopSpriteSheetcxx . . $ shopSpriteSheet., '1'); // need mouse pointer and arrow sprites |
| 1107 | |
| 1108 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! restart = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1109 | |
| 1110 | size_t episodeIndex = 0; |
| 1111 | // Save file only has space for scores for 3 episodes. |
| 1112 | const size_t episodeCount = 3; |
| 1113 | |
| 1114 | const int xCenter = 320 / 2; |
| 1115 | const int yMenuHeader = 3; |
| 1116 | const int yEpisodeHeader = 30; |
| 1117 | const int xLeftControl = 83; |
| 1118 | const int xRightControl = 213; |
| 1119 | const int wControl = 24; |
| 1120 | const int yControls = 179; |
| 1121 | |
| 1122 | for (; ; ) |
| 1123 | { |
| 1124 | if (restart) |
| 1125 | { |
| 1126 | JE_loadPiccxx . . $ JE_loadPic(4846ed2ea5b0a844).(VGAScreen2cxx . . $ VGAScreen2., 2, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1127 | fill_rectangle_whcxx . . $ fill_rectangle_wh(2ff783435439505a).(VGAScreen2cxx . . $ VGAScreen2., 0, 192, 320, 8, 0); |
| 1128 | |
| 1129 | // Draw header. |
| 1130 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreen2cxx . . $ VGAScreen2., xCenter, yMenuHeader, miscTextcxx . . $ miscText.[50], large_fontcxx . . $ large_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1131 | } |
| 1132 | |
| 1133 | // Restore background and header. |
| 1134 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., (size_t)VGAScreencxx . . $ VGAScreen.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreencxx . . $ VGAScreen.->hcxx . . $ SDL_Surface#h.); |
| 1135 | |
| 1136 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! disabled = !episodeAvailcxx . . $ episodeAvail.[episodeIndex]; |
| 1137 | |
| 1138 | // Draw episode header. |
| 1139 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, yEpisodeHeader, episode_namecxx . . $ episode_name.[episodeIndex + 1], normal_fontcxx . . $ normal_font., centeredcxx . . $ centered., 15, -3 + (disabled ? -4 : 0), falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1140 | |
| 1141 | char buffer[29]; |
| 1142 | |
| 1143 | // Draw 1-player scores. |
| 1144 | |
| 1145 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, 55, miscTextcxx . . $ miscText.[46], normal_fontcxx . . $ normal_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1146 | |
| 1147 | for (Uint8cxx . . $ Uint8# i = 0; i < 3; ++i) |
| 1148 | { |
| 1149 | const int y = 75 + 10 * i; |
| 1150 | |
| 1151 | const JE_SaveFileTypecxx . . $ JE_SaveFileType# *const saveFile = &saveFilescxx . . $ saveFiles.[episodeIndex * 6 + i]; |
| 1152 | const int rank = MINcxx . . $ `src/opentyr.h:28:9`!(saveFile->highScoreDiff, COUNTOFcxx . . $ `src/opentyr.h:27:9`!(difficultyNameB) - 1); |
| 1153 | |
| 1154 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "~#%d:~ %d", i + 1, saveFile->highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.); |
| 1155 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 20, y, buffer, 15, 0, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1156 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 110, y, saveFile->highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., 15, 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1157 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 250, y, difficultyNameBcxx . . $ difficultyNameB.[rank], 15, rank + (rank == 0 ? 0 : -1), FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1158 | } |
| 1159 | |
| 1160 | // Draw 2-player scores. |
| 1161 | |
| 1162 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xCenter, 120, miscTextcxx . . $ miscText.[47], normal_fontcxx . . $ normal_font., centeredcxx . . $ centered., 15, -3, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1163 | |
| 1164 | for (Uint8cxx . . $ Uint8# i = 0; i < 3; ++i) |
| 1165 | { |
| 1166 | const int y = 135 + 10 * i; |
| 1167 | |
| 1168 | const JE_SaveFileTypecxx . . $ JE_SaveFileType# *const saveFile = &saveFilescxx . . $ saveFiles.[episodeIndex * 6 + 3 + i]; |
| 1169 | const int rank = MINcxx . . $ `src/opentyr.h:28:9`!(saveFile->highScoreDiff, COUNTOFcxx . . $ `src/opentyr.h:27:9`!(difficultyNameB) - 1); |
| 1170 | |
| 1171 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(buffer, sizeof buffer, "~#%d:~ %d", i + 1, saveFile->highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.); |
| 1172 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 20, y, buffer, 15, 0, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1173 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 110, y, saveFile->highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., 15, 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1174 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 250, y, difficultyNameBcxx . . $ difficultyNameB.[rank], 15, rank + (rank == 0 ? 0 : -1), FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 1175 | } |
| 1176 | |
| 1177 | // Draw paging controls. |
| 1178 | |
| 1179 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! leftControlVisible = episodeIndex > 0; |
| 1180 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rightControlVisible = episodeIndex < episodeCount - 1; |
| 1181 | |
| 1182 | if (leftControlVisible) |
| 1183 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., xLeftControl, yControls, shopSpriteSheetcxx . . $ shopSpriteSheet., 279); |
| 1184 | |
| 1185 | if (rightControlVisible) |
| 1186 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., xRightControl, yControls, shopSpriteSheetcxx . . $ shopSpriteSheet., 281); |
| 1187 | |
| 1188 | helpBoxColorcxx . . $ helpBoxColor. = 15; |
| 1189 | JE_helpBoxcxx . . $ JE_helpBox(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., 103, 182, miscTextcxx . . $ miscText.[56], 25); |
| 1190 | |
| 1191 | if (restart) |
| 1192 | { |
| 1193 | mouseCursorcxx . . $ mouseCursor. = MOUSE_POINTER_NORMALcxx . . $ MOUSE_POINTER_NORMAL.; |
| 1194 | |
| 1195 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 10, 0, 255); |
| 1196 | |
| 1197 | restart = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1198 | } |
| 1199 | |
| 1200 | do |
| 1201 | { |
| 1202 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1203 | |
| 1204 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 1205 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1206 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 1207 | |
| 1208 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1209 | |
| 1210 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 1211 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1212 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse.)); |
| 1213 | |
| 1214 | // Handle interaction. |
| 1215 | |
| 1216 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! leftAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1217 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rightAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1218 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1219 | |
| 1220 | if (newmousecxx . . $ newmouse.) |
| 1221 | { |
| 1222 | switch (lastmouse_butcxx . . $ lastmouse_but.) |
| 1223 | { |
| 1224 | case SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!: |
| 1225 | { |
| 1226 | if (leftControlVisible && |
| 1227 | mouse_ycxx . . $ mouse_y. >= yControls && |
| 1228 | mouse_xcxx . . $ mouse_x. >= xLeftControl && |
| 1229 | mouse_xcxx . . $ mouse_x. < xLeftControl + wControl) |
| 1230 | { |
| 1231 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1232 | |
| 1233 | leftAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1234 | } |
| 1235 | else if (rightControlVisible && |
| 1236 | mouse_ycxx . . $ mouse_y. >= yControls && |
| 1237 | mouse_xcxx . . $ mouse_x. >= xRightControl && |
| 1238 | mouse_xcxx . . $ mouse_x. < xRightControl + wControl) |
| 1239 | { |
| 1240 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1241 | |
| 1242 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1243 | } |
| 1244 | break; |
| 1245 | } |
| 1246 | case SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!: |
| 1247 | { |
| 1248 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 1249 | |
| 1250 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1251 | break; |
| 1252 | } |
| 1253 | default: |
| 1254 | break; |
| 1255 | } |
| 1256 | } |
| 1257 | else if (newkeycxx . . $ newkey.) |
| 1258 | { |
| 1259 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 1260 | { |
| 1261 | case SDL_SCANCODE_LEFTcxx . . $ SDL_SCANCODE_LEFT.: |
| 1262 | { |
| 1263 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1264 | |
| 1265 | leftAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1266 | break; |
| 1267 | } |
| 1268 | case SDL_SCANCODE_RIGHTcxx . . $ SDL_SCANCODE_RIGHT.: |
| 1269 | { |
| 1270 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1271 | |
| 1272 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1273 | break; |
| 1274 | } |
| 1275 | case SDL_SCANCODE_SPACEcxx . . $ SDL_SCANCODE_SPACE.: |
| 1276 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 1277 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 1278 | { |
| 1279 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 1280 | |
| 1281 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1282 | break; |
| 1283 | } |
| 1284 | default: |
| 1285 | break; |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | if (leftAction) |
| 1290 | { |
| 1291 | episodeIndex = episodeIndex == 0 |
| 1292 | ? episodeCount - 1 |
| 1293 | : episodeIndex - 1; |
| 1294 | } |
| 1295 | else if (rightAction) |
| 1296 | { |
| 1297 | episodeIndex = episodeIndex == episodeCount - 1 |
| 1298 | ? 0 |
| 1299 | : episodeIndex + 1; |
| 1300 | } |
| 1301 | |
| 1302 | if (done) |
| 1303 | { |
| 1304 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 1305 | |
| 1306 | return; |
| 1307 | } |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | void JE_gammaCorrect_funccxx . . $ JE_gammaCorrect_func(3f159377639ea2df).(JE_bytecxx . . $ JE_byte# *col, JE_realcxx . . $ JE_real# r) |
| 1312 | { |
| 1313 | int temp = roundf(*col * r); |
| 1314 | if (temp > 255) |
| 1315 | { |
| 1316 | temp = 255; |
| 1317 | } |
| 1318 | *col = temp; |
| 1319 | } |
| 1320 | |
| 1321 | void JE_gammaCorrectcxx . . $ JE_gammaCorrect(e7bd69bdef5b2a38).(Palettecxx . . $ Palette# *colorBuffer, JE_bytecxx . . $ JE_byte# gamma) |
| 1322 | { |
| 1323 | int x; |
| 1324 | JE_realcxx . . $ JE_real# r = 1 + (JE_realcxx . . $ JE_real#)gamma / 10; |
| 1325 | |
| 1326 | for (x = 0; x < 256; x++) |
| 1327 | { |
| 1328 | JE_gammaCorrect_funccxx . . $ JE_gammaCorrect_func(3f159377639ea2df).(&(*colorBuffer)[x].rcxx . . $ SDL_Color#r., r); |
| 1329 | JE_gammaCorrect_funccxx . . $ JE_gammaCorrect_func(3f159377639ea2df).(&(*colorBuffer)[x].gcxx . . $ SDL_Color#g., r); |
| 1330 | JE_gammaCorrect_funccxx . . $ JE_gammaCorrect_func(3f159377639ea2df).(&(*colorBuffer)[x].bcxx . . $ SDL_Color#b., r); |
| 1331 | } |
| 1332 | } |
| 1333 | |
| 1334 | JE_booleancxx . . $ JE_boolean# JE_gammaCheckcxx . . $ JE_gammaCheck(c9857a73d68e59ba).(void) |
| 1335 | { |
| 1336 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! temp = keysactivecxx . . $ keysactive.[SDL_SCANCODE_F11cxx . . $ SDL_SCANCODE_F11.] != 0; |
| 1337 | if (temp) |
| 1338 | { |
| 1339 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_F11cxx . . $ SDL_SCANCODE_F11.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1340 | newkeycxx . . $ newkey. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1341 | gammaCorrectioncxx . . $ gammaCorrection. = (gammaCorrectioncxx . . $ gammaCorrection. + 1) % 4; |
| 1342 | memcpycxx . . $ memcpy(cc817cb175f282d).(colorscxx . . $ colors., palettescxx . . $ palettes.[pcxpalcxx . . $ pcxpal.[3-1]], sizeof(colorscxx . . $ colors.)); |
| 1343 | JE_gammaCorrectcxx . . $ JE_gammaCorrect(e7bd69bdef5b2a38).(&colorscxx . . $ colors., gammaCorrectioncxx . . $ gammaCorrection.); |
| 1344 | set_palettecxx . . $ set_palette(e7c4d2139a064c7f).(colorscxx . . $ colors., 0, 255); |
| 1345 | } |
| 1346 | return temp; |
| 1347 | } |
| 1348 | |
| 1349 | void JE_doInGameSetupcxx . . $ JE_doInGameSetup(49f6e7a06ebc5aa8).(void) |
| 1350 | { |
| 1351 | mouseSetRelativecxx . . $ mouseSetRelative(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1352 | |
| 1353 | haltGamecxx . . $ haltGame. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1354 | |
| 1355 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 1356 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 1357 | { |
| 1358 | network_preparecxx . . $ network_prepare(ed53e3bbd3fa2f69).(PACKET_GAME_MENUcxx . . $ `src/network.h:41:9`!); |
| 1359 | network_sendcxx . . $ network_send(83c267b20bac841a).(4); // PACKET_GAME_MENU |
| 1360 | |
| 1361 | while (truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) |
| 1362 | { |
| 1363 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1364 | |
| 1365 | if (packet_incxx . . $ packet_in.[0] && SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_in[0]->data[0]) == PACKET_GAME_MENUcxx . . $ `src/network.h:41:9`!) |
| 1366 | { |
| 1367 | network_updatecxx . . $ network_update(c9857a73d68e59ba).(); |
| 1368 | break; |
| 1369 | } |
| 1370 | |
| 1371 | network_updatecxx . . $ network_update(c9857a73d68e59ba).(); |
| 1372 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 1373 | |
| 1374 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1375 | } |
| 1376 | } |
| 1377 | #endif |
| 1378 | |
| 1379 | if (yourInGameMenuRequestcxx . . $ yourInGameMenuRequest.) |
| 1380 | { |
| 1381 | if (JE_inGameSetupcxx . . $ JE_inGameSetup(c9857a73d68e59ba).()) |
| 1382 | { |
| 1383 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1384 | playerEndLevelcxx . . $ playerEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1385 | } |
| 1386 | quitRequestedcxx . . $ quitRequested. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1387 | |
| 1388 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1389 | |
| 1390 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 1391 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 1392 | { |
| 1393 | if (!playerEndLevelcxx . . $ playerEndLevel.) |
| 1394 | { |
| 1395 | network_preparecxx . . $ network_prepare(ed53e3bbd3fa2f69).(PACKET_WAITINGcxx . . $ `src/network.h:36:9`!); |
| 1396 | network_sendcxx . . $ network_send(83c267b20bac841a).(4); // PACKET_WAITING |
| 1397 | } |
| 1398 | else |
| 1399 | { |
| 1400 | network_preparecxx . . $ network_prepare(ed53e3bbd3fa2f69).(PACKET_GAME_QUITcxx . . $ `src/network.h:39:9`!); |
| 1401 | network_sendcxx . . $ network_send(83c267b20bac841a).(4); // PACKET_GAMEQUIT |
| 1402 | } |
| 1403 | } |
| 1404 | #endif |
| 1405 | } |
| 1406 | |
| 1407 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 1408 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 1409 | { |
| 1410 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 1411 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 1412 | |
| 1413 | if (!yourInGameMenuRequestcxx . . $ yourInGameMenuRequest.) |
| 1414 | { |
| 1415 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 3, 60, 257, 80); /*Help Box*/ |
| 1416 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 5, 62, 255, 78); |
| 1417 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., 10, 65, "Other player in options menu.", SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); |
| 1418 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1419 | |
| 1420 | while (truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) |
| 1421 | { |
| 1422 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1423 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1424 | |
| 1425 | if (packet_incxx . . $ packet_in.[0]) |
| 1426 | { |
| 1427 | if (SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_in[0]->data[0]) == PACKET_WAITINGcxx . . $ `src/network.h:36:9`!) |
| 1428 | { |
| 1429 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 1430 | break; |
| 1431 | } |
| 1432 | else if (SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_in[0]->data[0]) == PACKET_GAME_QUITcxx . . $ `src/network.h:39:9`!) |
| 1433 | { |
| 1434 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1435 | playerEndLevelcxx . . $ playerEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1436 | |
| 1437 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 1438 | break; |
| 1439 | } |
| 1440 | } |
| 1441 | |
| 1442 | network_updatecxx . . $ network_update(c9857a73d68e59ba).(); |
| 1443 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 1444 | |
| 1445 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1446 | } |
| 1447 | } |
| 1448 | else |
| 1449 | { |
| 1450 | /* |
| 1451 | JE_barShade(3, 160, 257, 180); /-*Help Box*-/ |
| 1452 | JE_barShade(5, 162, 255, 178); |
| 1453 | tempScreenSeg = VGAScreen; |
| 1454 | JE_dString(VGAScreen, 10, 165, "Waiting for other player.", SMALL_FONT_SHAPES); |
| 1455 | JE_showVGA(); |
| 1456 | */ |
| 1457 | } |
| 1458 | |
| 1459 | while (!network_is_synccxx . . $ network_is_sync(c9857a73d68e59ba).()) |
| 1460 | { |
| 1461 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1462 | |
| 1463 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 1464 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1465 | } |
| 1466 | |
| 1467 | VGAScreencxx . . $ VGAScreen. = temp_surface; /* side-effect of game_screen */ |
| 1468 | } |
| 1469 | #endif |
| 1470 | |
| 1471 | yourInGameMenuRequestcxx . . $ yourInGameMenuRequest. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1472 | |
| 1473 | //skipStarShowVGA = true; |
| 1474 | |
| 1475 | mouseSetRelativecxx . . $ mouseSetRelative(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1476 | } |
| 1477 | |
| 1478 | JE_booleancxx . . $ JE_boolean# JE_inGameSetupcxx . . $ JE_inGameSetup(c9857a73d68e59ba).(void) |
| 1479 | { |
| 1480 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! result = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1481 | |
| 1482 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 1483 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 1484 | |
| 1485 | enum MenuItemIndexcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MenuItemIndex# |
| 1486 | { |
| 1487 | MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME. = 0, |
| 1488 | MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME., |
| 1489 | MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL., |
| 1490 | MENU_ITEM_GAME_SPEEDcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_GAME_SPEED., |
| 1491 | MENU_ITEM_RETURN_TO_GAMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_RETURN_TO_GAME., |
| 1492 | MENU_ITEM_QUITcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_QUIT., |
| 1493 | }; |
| 1494 | |
| 1495 | const size_t helpIndexes[] = { 14, 14, 27, 28, 25, 26 }; |
| 1496 | |
| 1497 | if (shopSpriteSheetcxx . . $ shopSpriteSheet..datacxx . . $ $anonymous_type_297934740aeafb7d_2#data. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1498 | JE_loadCompShapescxx . . $ JE_loadCompShapes(676db0deaa5c5c40).(&shopSpriteSheetcxx . . $ shopSpriteSheet., '1'); // need mouse pointer sprites |
| 1499 | |
| 1500 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! restart = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1501 | |
| 1502 | const size_t menuItemsCount = COUNTOFcxx . . $ `src/opentyr.h:27:9`!(inGameText); |
| 1503 | size_t selectedIndex = MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.; |
| 1504 | |
| 1505 | const int yMenuItems = 20; |
| 1506 | const int dyMenuItems = 20; |
| 1507 | const int xMenuItem = 10; |
| 1508 | const int xMenuItemName = xMenuItem; |
| 1509 | const int wMenuItemName = 110; |
| 1510 | const int xMenuItemValue = xMenuItemName + wMenuItemName; |
| 1511 | const int wMenuItemValue = 90; |
| 1512 | const int wMenuItem = wMenuItemName + wMenuItemValue; |
| 1513 | const int hMenuItem = 13; |
| 1514 | |
| 1515 | for (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; !done; ) |
| 1516 | { |
| 1517 | if (restart) |
| 1518 | { |
| 1519 | // Main box |
| 1520 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 3, 13, 217, 137); |
| 1521 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 5, 15, 215, 135); |
| 1522 | |
| 1523 | // Help box |
| 1524 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 3, 143, 257, 157); |
| 1525 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 5, 145, 255, 155); |
| 1526 | |
| 1527 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreen2cxx . . $ VGAScreen2.->hcxx . . $ SDL_Surface#h.); |
| 1528 | |
| 1529 | mouseCursorcxx . . $ mouseCursor. = MOUSE_POINTER_NORMALcxx . . $ MOUSE_POINTER_NORMAL.; |
| 1530 | |
| 1531 | restart = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1532 | } |
| 1533 | |
| 1534 | // Restore background. |
| 1535 | memcpycxx . . $ memcpy(cc817cb175f282d).(VGAScreencxx . . $ VGAScreen.->pixelscxx . . $ SDL_Surface#pixels., VGAScreen2cxx . . $ VGAScreen2.->pixelscxx . . $ SDL_Surface#pixels., (size_t)VGAScreencxx . . $ VGAScreen.->pitchcxx . . $ SDL_Surface#pitch. * VGAScreencxx . . $ VGAScreen.->hcxx . . $ SDL_Surface#h.); |
| 1536 | |
| 1537 | // Draw menu items. |
| 1538 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 1539 | { |
| 1540 | const int y = yMenuItems + dyMenuItems * i; |
| 1541 | |
| 1542 | const char *const name = inGameTextcxx . . $ inGameText.[i]; |
| 1543 | |
| 1544 | const boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! selected = i == selectedIndex; |
| 1545 | |
| 1546 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xMenuItemName, y, name, normal_fontcxx . . $ normal_font., left_alignedcxx . . $ left_aligned., 15, -4 + (selected ? 2 : 0), falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1547 | |
| 1548 | switch (i) |
| 1549 | { |
| 1550 | case MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.: |
| 1551 | { |
| 1552 | JE_barDrawShadowcxx . . $ JE_barDrawShadow(2b5d735fb21d70c8).(VGAScreencxx . . $ VGAScreen., xMenuItemValue, y, 1, music_disabledcxx . . $ music_disabled. ? 12 : 16, (tyrMusicVolumecxx . . $ tyrMusicVolume. + 6) / 12, 3, 13); |
| 1553 | break; |
| 1554 | } |
| 1555 | case MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME.: |
| 1556 | { |
| 1557 | JE_barDrawShadowcxx . . $ JE_barDrawShadow(2b5d735fb21d70c8).(VGAScreencxx . . $ VGAScreen., xMenuItemValue, y, 1, samples_disabledcxx . . $ samples_disabled. ? 12 : 16, (fxVolumecxx . . $ fxVolume. + 6) / 12, 3, 13); |
| 1558 | break; |
| 1559 | } |
| 1560 | case MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL.: |
| 1561 | { |
| 1562 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xMenuItemValue, y, detailLevelcxx . . $ detailLevel.[processorTypecxx . . $ processorType.-1], normal_fontcxx . . $ normal_font., left_alignedcxx . . $ left_aligned., 15, -4 + (selected ? 2 : 0), falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1563 | break; |
| 1564 | } |
| 1565 | case MENU_ITEM_GAME_SPEEDcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_GAME_SPEED.: |
| 1566 | { |
| 1567 | draw_font_hv_shadowcxx . . $ draw_font_hv_shadow(198b4ac5940c9e46).(VGAScreencxx . . $ VGAScreen., xMenuItemValue, y, gameSpeedTextcxx . . $ gameSpeedText.[gameSpeedcxx . . $ gameSpeed.-1], normal_fontcxx . . $ normal_font., left_alignedcxx . . $ left_aligned., 15, -4 + (selected ? 2 : 0), falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 2); |
| 1568 | break; |
| 1569 | } |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | // Draw help text. |
| 1574 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., 10, 147, mainMenuHelpcxx . . $ mainMenuHelp.[helpIndexes[selectedIndex]], 14, 6, TINY_FONTcxx . . $ `src/sprite.h:31:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1575 | |
| 1576 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1577 | |
| 1578 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 1579 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1580 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 1581 | |
| 1582 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mouseMoved = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1583 | do |
| 1584 | { |
| 1585 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1586 | |
| 1587 | Uint16cxx . . $ Uint16# oldMouseX = mouse_xcxx . . $ mouse_x.; |
| 1588 | Uint16cxx . . $ Uint16# oldMouseY = mouse_ycxx . . $ mouse_y.; |
| 1589 | |
| 1590 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 1591 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1592 | |
| 1593 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 1594 | |
| 1595 | mouseMoved = mouse_xcxx . . $ mouse_x. != oldMouseX || mouse_ycxx . . $ mouse_y. != oldMouseY; |
| 1596 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse. || mouseMoved)); |
| 1597 | |
| 1598 | // Handle interaction. |
| 1599 | |
| 1600 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! action = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1601 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! leftAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1602 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rightAction = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1603 | |
| 1604 | if (mouseMoved || newmousecxx . . $ newmouse.) |
| 1605 | { |
| 1606 | // Find menu item that was hovered or clicked. |
| 1607 | if (mouse_xcxx . . $ mouse_x. >= xMenuItem && mouse_xcxx . . $ mouse_x. < xMenuItem + wMenuItem) |
| 1608 | { |
| 1609 | for (size_t i = 0; i < menuItemsCount; ++i) |
| 1610 | { |
| 1611 | const int yMenuItem = yMenuItems + dyMenuItems * i; |
| 1612 | if (mouse_ycxx . . $ mouse_y. >= yMenuItem && mouse_ycxx . . $ mouse_y. < yMenuItem + hMenuItem) |
| 1613 | { |
| 1614 | if (selectedIndex != i) |
| 1615 | { |
| 1616 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1617 | |
| 1618 | selectedIndex = i; |
| 1619 | } |
| 1620 | |
| 1621 | if (newmousecxx . . $ newmouse. && lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`! && |
| 1622 | lastmouse_xcxx . . $ lastmouse_x. >= xMenuItem && lastmouse_xcxx . . $ lastmouse_x. < xMenuItem + wMenuItem && |
| 1623 | lastmouse_ycxx . . $ lastmouse_y. >= yMenuItem && lastmouse_ycxx . . $ lastmouse_y. < yMenuItem + hMenuItem) |
| 1624 | { |
| 1625 | // Act on menu item via name. |
| 1626 | if (lastmouse_xcxx . . $ lastmouse_x. >= xMenuItemName && lastmouse_xcxx . . $ lastmouse_x. < xMenuItemName + wMenuItemName) |
| 1627 | { |
| 1628 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1629 | } |
| 1630 | |
| 1631 | // Act on menu item via value. |
| 1632 | else if (lastmouse_xcxx . . $ lastmouse_x. >= xMenuItemValue && lastmouse_xcxx . . $ lastmouse_x. < xMenuItemValue + wMenuItemValue) |
| 1633 | { |
| 1634 | switch (i) |
| 1635 | { |
| 1636 | case MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.: |
| 1637 | { |
| 1638 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1639 | |
| 1640 | const int w = ((255 + 6) / 12) * (3 + 1) - 1; |
| 1641 | |
| 1642 | int value = (lastmouse_xcxx . . $ lastmouse_x. - xMenuItemValue) * 255 / (w - 1); |
| 1643 | tyrMusicVolumecxx . . $ tyrMusicVolume. = MINcxx . . $ `src/opentyr.h:28:9`!(MAXcxx . . $ `src/opentyr.h:29:9`!(0, value), 255); |
| 1644 | |
| 1645 | set_volumecxx . . $ set_volume(8fbe6856f5410d23).(tyrMusicVolumecxx . . $ tyrMusicVolume., fxVolumecxx . . $ fxVolume.); |
| 1646 | break; |
| 1647 | } |
| 1648 | case MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME.: |
| 1649 | { |
| 1650 | const int w = ((255 + 6) / 12) * (3 + 1) - 1; |
| 1651 | |
| 1652 | int value = (lastmouse_xcxx . . $ lastmouse_x. - xMenuItemValue) * 255 / (w - 1); |
| 1653 | fxVolumecxx . . $ fxVolume. = MINcxx . . $ `src/opentyr.h:28:9`!(MAXcxx . . $ `src/opentyr.h:29:9`!(0, value), 255); |
| 1654 | |
| 1655 | set_volumecxx . . $ set_volume(8fbe6856f5410d23).(tyrMusicVolumecxx . . $ tyrMusicVolume., fxVolumecxx . . $ fxVolume.); |
| 1656 | |
| 1657 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1658 | break; |
| 1659 | } |
| 1660 | case MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL.: |
| 1661 | case MENU_ITEM_GAME_SPEEDcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_GAME_SPEED.: |
| 1662 | { |
| 1663 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1664 | break; |
| 1665 | } |
| 1666 | default: |
| 1667 | break; |
| 1668 | } |
| 1669 | } |
| 1670 | } |
| 1671 | |
| 1672 | break; |
| 1673 | } |
| 1674 | } |
| 1675 | } |
| 1676 | } |
| 1677 | |
| 1678 | if (newmousecxx . . $ newmouse.) |
| 1679 | { |
| 1680 | if (lastmouse_butcxx . . $ lastmouse_but. == SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!) |
| 1681 | { |
| 1682 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 1683 | |
| 1684 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1685 | } |
| 1686 | } |
| 1687 | else if (newkeycxx . . $ newkey.) |
| 1688 | { |
| 1689 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 1690 | { |
| 1691 | case SDL_SCANCODE_UPcxx . . $ SDL_SCANCODE_UP.: |
| 1692 | { |
| 1693 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1694 | |
| 1695 | selectedIndex = selectedIndex == 0 |
| 1696 | ? menuItemsCount - 1 |
| 1697 | : selectedIndex - 1; |
| 1698 | break; |
| 1699 | } |
| 1700 | case SDL_SCANCODE_DOWNcxx . . $ SDL_SCANCODE_DOWN.: |
| 1701 | { |
| 1702 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1703 | |
| 1704 | selectedIndex = selectedIndex == menuItemsCount - 1 |
| 1705 | ? 0 |
| 1706 | : selectedIndex + 1; |
| 1707 | break; |
| 1708 | } |
| 1709 | case SDL_SCANCODE_LEFTcxx . . $ SDL_SCANCODE_LEFT.: |
| 1710 | { |
| 1711 | leftAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1712 | break; |
| 1713 | } |
| 1714 | case SDL_SCANCODE_RIGHTcxx . . $ SDL_SCANCODE_RIGHT.: |
| 1715 | { |
| 1716 | rightAction = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1717 | break; |
| 1718 | } |
| 1719 | case SDL_SCANCODE_SPACEcxx . . $ SDL_SCANCODE_SPACE.: |
| 1720 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 1721 | { |
| 1722 | action = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1723 | break; |
| 1724 | } |
| 1725 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 1726 | { |
| 1727 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 1728 | |
| 1729 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1730 | break; |
| 1731 | } |
| 1732 | case SDL_SCANCODE_Wcxx . . $ SDL_SCANCODE_W.: |
| 1733 | { |
| 1734 | if (selectedIndex == MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL.) |
| 1735 | { |
| 1736 | processorTypecxx . . $ processorType. = 6; |
| 1737 | JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(); |
| 1738 | } |
| 1739 | break; |
| 1740 | } |
| 1741 | default: |
| 1742 | break; |
| 1743 | } |
| 1744 | } |
| 1745 | |
| 1746 | if (action) |
| 1747 | { |
| 1748 | switch (selectedIndex) |
| 1749 | { |
| 1750 | case MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.: |
| 1751 | { |
| 1752 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 1753 | |
| 1754 | music_disabledcxx . . $ music_disabled. = !music_disabledcxx . . $ music_disabled.; |
| 1755 | break; |
| 1756 | } |
| 1757 | case MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME.: |
| 1758 | { |
| 1759 | samples_disabledcxx . . $ samples_disabled. = !samples_disabledcxx . . $ samples_disabled.; |
| 1760 | |
| 1761 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 1762 | break; |
| 1763 | } |
| 1764 | case MENU_ITEM_RETURN_TO_GAMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_RETURN_TO_GAME.: |
| 1765 | { |
| 1766 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 1767 | |
| 1768 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1769 | break; |
| 1770 | } |
| 1771 | case MENU_ITEM_QUITcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_QUIT.: |
| 1772 | { |
| 1773 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 1774 | |
| 1775 | if (constantPlaycxx . . $ constantPlay.) |
| 1776 | JE_tyrianHaltcxx . . $ JE_tyrianHalt(ac50b47256ae7414).(0); |
| 1777 | |
| 1778 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 1779 | { |
| 1780 | /*Tell other computer to exit*/ |
| 1781 | haltGamecxx . . $ haltGame. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1782 | playerEndLevelcxx . . $ playerEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1783 | } |
| 1784 | |
| 1785 | result = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1786 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1787 | break; |
| 1788 | } |
| 1789 | default: |
| 1790 | break; |
| 1791 | } |
| 1792 | } |
| 1793 | else if (leftAction) |
| 1794 | { |
| 1795 | switch (selectedIndex) |
| 1796 | { |
| 1797 | case MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.: |
| 1798 | { |
| 1799 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1800 | |
| 1801 | JE_changeVolumecxx . . $ JE_changeVolume(b690d98fa3ee2e89).(&tyrMusicVolumecxx . . $ tyrMusicVolume., -12, &fxVolumecxx . . $ fxVolume., 0); |
| 1802 | break; |
| 1803 | } |
| 1804 | case MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME.: |
| 1805 | { |
| 1806 | JE_changeVolumecxx . . $ JE_changeVolume(b690d98fa3ee2e89).(&tyrMusicVolumecxx . . $ tyrMusicVolume., 0, &fxVolumecxx . . $ fxVolume., -12); |
| 1807 | |
| 1808 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1809 | break; |
| 1810 | } |
| 1811 | case MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL.: |
| 1812 | { |
| 1813 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1814 | |
| 1815 | processorTypecxx . . $ processorType. = processorTypecxx . . $ processorType. > 1 ? processorTypecxx . . $ processorType. - 1 : 4; |
| 1816 | JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(); |
| 1817 | JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(); |
| 1818 | break; |
| 1819 | } |
| 1820 | case MENU_ITEM_GAME_SPEEDcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_GAME_SPEED.: |
| 1821 | { |
| 1822 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1823 | |
| 1824 | gameSpeedcxx . . $ gameSpeed. = gameSpeedcxx . . $ gameSpeed. > 1 ? gameSpeedcxx . . $ gameSpeed. - 1 : 5; |
| 1825 | JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(); |
| 1826 | JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(); |
| 1827 | break; |
| 1828 | } |
| 1829 | default: |
| 1830 | break; |
| 1831 | } |
| 1832 | } |
| 1833 | else if (rightAction) |
| 1834 | { |
| 1835 | switch (selectedIndex) |
| 1836 | { |
| 1837 | case MENU_ITEM_MUSIC_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_MUSIC_VOLUME.: |
| 1838 | { |
| 1839 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1840 | |
| 1841 | JE_changeVolumecxx . . $ JE_changeVolume(b690d98fa3ee2e89).(&tyrMusicVolumecxx . . $ tyrMusicVolume., 12, &fxVolumecxx . . $ fxVolume., 0); |
| 1842 | break; |
| 1843 | } |
| 1844 | case MENU_ITEM_EFFECTS_VOLUMEcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_EFFECTS_VOLUME.: |
| 1845 | { |
| 1846 | JE_changeVolumecxx . . $ JE_changeVolume(b690d98fa3ee2e89).(&tyrMusicVolumecxx . . $ tyrMusicVolume., 0, &fxVolumecxx . . $ fxVolume., 12); |
| 1847 | |
| 1848 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1849 | break; |
| 1850 | } |
| 1851 | case MENU_ITEM_DETAIL_LEVELcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_DETAIL_LEVEL.: |
| 1852 | { |
| 1853 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1854 | |
| 1855 | processorTypecxx . . $ processorType. = processorTypecxx . . $ processorType. < 4 ? processorTypecxx . . $ processorType. + 1 : 1; |
| 1856 | JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(); |
| 1857 | JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(); |
| 1858 | break; |
| 1859 | } |
| 1860 | case MENU_ITEM_GAME_SPEEDcxx . . $ JE_inGameSetup(c9857a73d68e59ba).MENU_ITEM_GAME_SPEED.: |
| 1861 | { |
| 1862 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 1863 | |
| 1864 | gameSpeedcxx . . $ gameSpeed. = gameSpeedcxx . . $ gameSpeed. < 5 ? gameSpeedcxx . . $ gameSpeed. + 1 : 1; |
| 1865 | JE_initProcessorTypecxx . . $ JE_initProcessorType(49f6e7a06ebc5aa8).(); |
| 1866 | JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(); |
| 1867 | break; |
| 1868 | } |
| 1869 | default: |
| 1870 | break; |
| 1871 | } |
| 1872 | } |
| 1873 | } |
| 1874 | |
| 1875 | VGAScreencxx . . $ VGAScreen. = temp_surface; /* side-effect of game_screen */ |
| 1876 | |
| 1877 | return result; |
| 1878 | } |
| 1879 | |
| 1880 | void JE_inGameHelpcxx . . $ JE_inGameHelp(49f6e7a06ebc5aa8).(void) |
| 1881 | { |
| 1882 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 1883 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 1884 | |
| 1885 | //tempScreenSeg = VGAScreenSeg; |
| 1886 | |
| 1887 | JE_clearKeyboardcxx . . $ JE_clearKeyboard(49f6e7a06ebc5aa8).(); |
| 1888 | JE_wipeKeycxx . . $ JE_wipeKey(49f6e7a06ebc5aa8).(); |
| 1889 | |
| 1890 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 1, 1, 262, 182); /*Main Box*/ |
| 1891 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 3, 3, 260, 180); |
| 1892 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 5, 5, 258, 178); |
| 1893 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 7, 7, 256, 176); |
| 1894 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreencxx . . $ VGAScreen., 9, 9, 254, 174, 0); |
| 1895 | |
| 1896 | if (twoPlayerModecxx . . $ twoPlayerMode.) // Two-Player Help |
| 1897 | { |
| 1898 | helpBoxColorcxx . . $ helpBoxColor. = 3; |
| 1899 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1900 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 20, 4, 36, 50); |
| 1901 | |
| 1902 | // weapon help |
| 1903 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 2, 21, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 43); |
| 1904 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1905 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1906 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 55, 20, 37, 40); |
| 1907 | |
| 1908 | // sidekick help |
| 1909 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 5, 36, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 41); |
| 1910 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1911 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1912 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 40, 43, 34, 44); |
| 1913 | |
| 1914 | // shield/armor help |
| 1915 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 2, 79, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 42); |
| 1916 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1917 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1918 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 54, 84, 35, 40); |
| 1919 | |
| 1920 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1921 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1922 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 5, 126, 38, 55); |
| 1923 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1924 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1925 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 5, 160, 39, 55); |
| 1926 | } |
| 1927 | else |
| 1928 | { |
| 1929 | // power bar help |
| 1930 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 15, 5, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 40); |
| 1931 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1932 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1933 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 40, 10, 31, 45); |
| 1934 | |
| 1935 | // weapon help |
| 1936 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 5, 37, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 39); |
| 1937 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1938 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1939 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 40, 40, 32, 44); |
| 1940 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1941 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1942 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 40, 60, 33, 44); |
| 1943 | |
| 1944 | // sidekick help |
| 1945 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 5, 98, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 41); |
| 1946 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1947 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1948 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 40, 103, 34, 44); |
| 1949 | |
| 1950 | // shield/armor help |
| 1951 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 2, 138, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 42); |
| 1952 | helpBoxColorcxx . . $ helpBoxColor. = 5; |
| 1953 | helpBoxBrightnesscxx . . $ helpBoxBrightness. = 3; |
| 1954 | JE_HBoxcxx . . $ JE_HBox(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 54, 143, 35, 40); |
| 1955 | } |
| 1956 | |
| 1957 | // "press a key" |
| 1958 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 16, 189, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 36); // in-game text area |
| 1959 | JE_outTextcxx . . $ JE_outText(894c69c4be246b6e).(VGAScreenSegcxx . . $ VGAScreenSeg., 120 - JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(miscTextcxx . . $ miscText.[5-1], TINY_FONTcxx . . $ `src/sprite.h:31:9`!) / 2 + 20, 190, miscTextcxx . . $ miscText.[5-1], 0, 4); |
| 1960 | |
| 1961 | do |
| 1962 | { |
| 1963 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1964 | |
| 1965 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 1966 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 1967 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 1968 | |
| 1969 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 1970 | |
| 1971 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 1972 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1973 | |
| 1974 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 1975 | } while (!(newkeycxx . . $ newkey. || newmousecxx . . $ newmouse.)); |
| 1976 | |
| 1977 | textErasecxx . . $ textErase. = 1; |
| 1978 | |
| 1979 | VGAScreencxx . . $ VGAScreen. = temp_surface; |
| 1980 | } |
| 1981 | |
| 1982 | void JE_highScoreCheckcxx . . $ JE_highScoreCheck(49f6e7a06ebc5aa8).(void) |
| 1983 | { |
| 1984 | if (shopSpriteSheetcxx . . $ shopSpriteSheet..datacxx . . $ $anonymous_type_297934740aeafb7d_2#data. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1985 | JE_loadCompShapescxx . . $ JE_loadCompShapes(676db0deaa5c5c40).(&shopSpriteSheetcxx . . $ shopSpriteSheet., '1'); // need mouse pointer sprite |
| 1986 | |
| 1987 | Sint32cxx . . $ Sint32# temp_score; |
| 1988 | |
| 1989 | for (int temp_p = 0; temp_p < (twoPlayerModecxx . . $ twoPlayerMode. ? 2 : 1); ++temp_p) |
| 1990 | { |
| 1991 | JE_sortHighScorescxx . . $ JE_sortHighScores(49f6e7a06ebc5aa8).(); |
| 1992 | |
| 1993 | int p = temp_p; |
| 1994 | |
| 1995 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 1996 | { |
| 1997 | // ask for the highest scorer first |
| 1998 | if (playercxx . . $ player.[0].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. < playercxx . . $ player.[1].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.) |
| 1999 | p = (temp_p == 0) ? 1 : 0; |
| 2000 | |
| 2001 | temp_score = (p == 0) ? playercxx . . $ player.[0].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. : playercxx . . $ player.[1].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.; |
| 2002 | } |
| 2003 | else |
| 2004 | { |
| 2005 | // single player highscore includes cost of upgrades |
| 2006 | temp_score = JE_totalScorecxx . . $ JE_totalScore(6645df09e8416cb5).(&playercxx . . $ player.[0]); |
| 2007 | } |
| 2008 | |
| 2009 | int slot; |
| 2010 | const int first_slot = (initial_episode_numcxx . . $ initial_episode_num. - 1) * 6 + (twoPlayerModecxx . . $ twoPlayerMode. ? 3 : 0), |
| 2011 | slot_limit = first_slot + 3; |
| 2012 | |
| 2013 | for (slot = first_slot; slot < slot_limit; ++slot) |
| 2014 | { |
| 2015 | if (temp_score > saveFilescxx . . $ saveFiles.[slot].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.) |
| 2016 | break; |
| 2017 | } |
| 2018 | |
| 2019 | // did you get a high score? |
| 2020 | if (slot < slot_limit) |
| 2021 | { |
| 2022 | // shift down old scores |
| 2023 | for (int i = slot_limit - 1; i > slot; --i) |
| 2024 | { |
| 2025 | saveFilescxx . . $ saveFiles.[i].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1. = saveFilescxx . . $ saveFiles.[i - 1].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.; |
| 2026 | strcpycxx . . $ strcpy(b7b3a83273496486).(saveFilescxx . . $ saveFiles.[i].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., saveFilescxx . . $ saveFiles.[i - 1].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName.); |
| 2027 | } |
| 2028 | |
| 2029 | wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2030 | |
| 2031 | JE_clr256cxx . . $ JE_clr256(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 2032 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2033 | memcpycxx . . $ memcpy(cc817cb175f282d).(colorscxx . . $ colors., palettescxx . . $ palettes.[0], sizeof(colorscxx . . $ colors.)); |
| 2034 | |
| 2035 | play_songcxx . . $ play_song(cb2f890c2fdad230).(33); |
| 2036 | |
| 2037 | { |
| 2038 | /* Enter Thy name */ |
| 2039 | |
| 2040 | JE_bytecxx . . $ JE_byte# flash = 8 * 16 + 10; |
| 2041 | JE_booleancxx . . $ JE_boolean# fadein = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2042 | JE_booleancxx . . $ JE_boolean# quit = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, cancel = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2043 | char stemp[30], tempstr[30]; |
| 2044 | char buffer[256]; |
| 2045 | |
| 2046 | strcpycxx . . $ strcpy(b7b3a83273496486).(stemp, " "); |
| 2047 | tempcxx . . $ temp. = 0; |
| 2048 | |
| 2049 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 65, 55, 255, 155); |
| 2050 | |
| 2051 | do |
| 2052 | { |
| 2053 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 2054 | |
| 2055 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(miscTextcxx . . $ miscText.[51], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!), 3, miscTextcxx . . $ miscText.[51], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!); |
| 2056 | |
| 2057 | temp3cxx . . $ temp3. = twoPlayerModecxx . . $ twoPlayerMode. ? 58 + p : 53; |
| 2058 | |
| 2059 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(miscTextcxx . . $ miscText.[temp3cxx . . $ temp3.-1], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!), 30, miscTextcxx . . $ miscText.[temp3cxx . . $ temp3.-1], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); |
| 2060 | |
| 2061 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreenSegcxx . . $ VGAScreenSeg., 50, 50, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 35); // message box |
| 2062 | |
| 2063 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 2064 | { |
| 2065 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(buffer, "%s %s", miscTextcxx . . $ miscText.[48 + p], miscTextcxx . . $ miscText.[53]); |
| 2066 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 60, 55, buffer, 11, 4, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 2067 | } |
| 2068 | else |
| 2069 | { |
| 2070 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 60, 55, miscTextcxx . . $ miscText.[53], 11, 4, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 2071 | } |
| 2072 | |
| 2073 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(buffer, "%s %d", miscTextcxx . . $ miscText.[37], temp_score); |
| 2074 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 70, 70, buffer, 11, 4, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 2075 | |
| 2076 | do |
| 2077 | { |
| 2078 | flash = (flash == 8 * 16 + 10) ? 8 * 16 + 2 : 8 * 16 + 10; |
| 2079 | temp3cxx . . $ temp3. = (temp3cxx . . $ temp3. == 6) ? 2 : 6; |
| 2080 | |
| 2081 | strncpycxx . . $ strncpy(255158a415b673b0).(tempstr, stemp, tempcxx . . $ temp.); |
| 2082 | tempstr[tempcxx . . $ temp.] = '\0'; |
| 2083 | JE_outTextcxx . . $ JE_outText(894c69c4be246b6e).(VGAScreencxx . . $ VGAScreen., 65, 89, tempstr, 8, 3); |
| 2084 | tempWcxx . . $ tempW. = 65 + JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(tempstr, TINY_FONTcxx . . $ `src/sprite.h:31:9`!); |
| 2085 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW. + 2, 90, tempWcxx . . $ tempW. + 6, 95); |
| 2086 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW. + 1, 89, tempWcxx . . $ tempW. + 5, 94, flash); |
| 2087 | |
| 2088 | for (int i = 0; i < 14; i++) |
| 2089 | { |
| 2090 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(1); |
| 2091 | |
| 2092 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 2093 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2094 | if (fadein) |
| 2095 | { |
| 2096 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 15, 0, 255); |
| 2097 | fadein = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2098 | } |
| 2099 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 2100 | |
| 2101 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 2102 | service_wait_delaycxx . . $ service_wait_delay(49f6e7a06ebc5aa8).(); |
| 2103 | |
| 2104 | if (newkeycxx . . $ newkey. || newmousecxx . . $ newmouse.) |
| 2105 | break; |
| 2106 | } |
| 2107 | |
| 2108 | } while (!newkeycxx . . $ newkey. && !newmousecxx . . $ newmouse. && !new_textcxx . . $ new_text.); |
| 2109 | |
| 2110 | if (!playingcxx . . $ playing.) |
| 2111 | play_songcxx . . $ play_song(cb2f890c2fdad230).(31); |
| 2112 | |
| 2113 | if (mouseButtoncxx . . $ mouseButton. > 0) |
| 2114 | { |
| 2115 | if (mouseXcxx . . $ mouseX. > 56 && mouseXcxx . . $ mouseX. < 142 && mouseYcxx . . $ mouseY. > 123 && mouseYcxx . . $ mouseY. < 149) |
| 2116 | { |
| 2117 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2118 | } |
| 2119 | else if (mouseXcxx . . $ mouseX. > 151 && mouseXcxx . . $ mouseX. < 237 && mouseYcxx . . $ mouseY. > 123 && mouseYcxx . . $ mouseY. < 149) |
| 2120 | { |
| 2121 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2122 | cancel = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2123 | } |
| 2124 | } |
| 2125 | else if (new_textcxx . . $ new_text.) |
| 2126 | { |
| 2127 | for (size_t ti = 0U; last_textcxx . . $ last_text.[ti] != '\0'; ++ti) |
| 2128 | { |
| 2129 | const char c = (unsigned char)last_textcxx . . $ last_text.[ti] <= 127U ? touppercxx . . $ `<external>/17904084882347303253/ctype.h:221:11`!(last_text[ti]) : 0; |
| 2130 | if ((c == ' ' || font_asciicxx . . $ font_ascii.[(unsigned char)c] != -1) && |
| 2131 | tempcxx . . $ temp. < 28) |
| 2132 | { |
| 2133 | stemp[tempcxx . . $ temp.] = c; |
| 2134 | tempcxx . . $ temp. += 1; |
| 2135 | } |
| 2136 | } |
| 2137 | } |
| 2138 | else if (newkeycxx . . $ newkey.) |
| 2139 | { |
| 2140 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 2141 | { |
| 2142 | case SDL_SCANCODE_BACKSPACEcxx . . $ SDL_SCANCODE_BACKSPACE.: |
| 2143 | case SDL_SCANCODE_DELETEcxx . . $ SDL_SCANCODE_DELETE.: |
| 2144 | if (tempcxx . . $ temp.) |
| 2145 | { |
| 2146 | tempcxx . . $ temp.--; |
| 2147 | stemp[tempcxx . . $ temp.] = ' '; |
| 2148 | } |
| 2149 | break; |
| 2150 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 2151 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2152 | cancel = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2153 | break; |
| 2154 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 2155 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2156 | break; |
| 2157 | default: |
| 2158 | break; |
| 2159 | } |
| 2160 | } |
| 2161 | } while (!quit); |
| 2162 | |
| 2163 | if (!cancel) |
| 2164 | { |
| 2165 | saveFilescxx . . $ saveFiles.[slot].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1. = temp_score; |
| 2166 | strcpycxx . . $ strcpy(b7b3a83273496486).(saveFilescxx . . $ saveFiles.[slot].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., stemp); |
| 2167 | saveFilescxx . . $ saveFiles.[slot].highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff. = difficultyLevelcxx . . $ difficultyLevel.; |
| 2168 | } |
| 2169 | |
| 2170 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 2171 | JE_loadPiccxx . . $ JE_loadPic(4846ed2ea5b0a844).(VGAScreencxx . . $ VGAScreen., 2, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2172 | |
| 2173 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(miscTextcxx . . $ miscText.[50], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!), 10, miscTextcxx . . $ miscText.[50], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!); |
| 2174 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(episode_namecxx . . $ episode_name.[episodeNumcxx . . $ episodeNum.], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!), 35, episode_namecxx . . $ episode_name.[episodeNumcxx . . $ episodeNum.], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); |
| 2175 | |
| 2176 | for (int i = first_slot; i < slot_limit; ++i) |
| 2177 | { |
| 2178 | if (i != slot) |
| 2179 | { |
| 2180 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(buffer, "~#%d:~ %d", (i - first_slot + 1), saveFilescxx . . $ saveFiles.[i].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.); |
| 2181 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 20, ((i - first_slot + 1) * 12) + 65, buffer, 15, 0, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 2182 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 150, ((i - first_slot + 1) * 12) + 65, saveFilescxx . . $ saveFiles.[i].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., 15, 2, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 2183 | } |
| 2184 | } |
| 2185 | |
| 2186 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2187 | |
| 2188 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 15, 0, 255); |
| 2189 | |
| 2190 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(buffer, "~#%d:~ %d", (slot - first_slot + 1), saveFilescxx . . $ saveFiles.[slot].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.); |
| 2191 | |
| 2192 | frameCountMaxcxx . . $ frameCountMax. = 6; |
| 2193 | textGlowFontcxx . . $ textGlowFont. = TINY_FONTcxx . . $ `src/sprite.h:31:9`!; |
| 2194 | |
| 2195 | textGlowBrightnesscxx . . $ textGlowBrightness. = 10; |
| 2196 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 20, (slot - first_slot + 1) * 12 + 65, buffer); |
| 2197 | textGlowBrightnesscxx . . $ textGlowBrightness. = 10; |
| 2198 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 150, (slot - first_slot + 1) * 12 + 65, saveFilescxx . . $ saveFiles.[slot].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName.); |
| 2199 | textGlowBrightnesscxx . . $ textGlowBrightness. = 10; |
| 2200 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., JE_fontCentercxx . . $ JE_fontCenter(1df18506ef0a631b).(miscTextcxx . . $ miscText.[4], TINY_FONTcxx . . $ `src/sprite.h:31:9`!), 180, miscTextcxx . . $ miscText.[4]); |
| 2201 | |
| 2202 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2203 | |
| 2204 | if (frameCountMaxcxx . . $ frameCountMax. != 0) |
| 2205 | wait_inputcxx . . $ wait_input(9e113dd3a0d25c95).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 2206 | |
| 2207 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 2208 | } |
| 2209 | |
| 2210 | } |
| 2211 | } |
| 2212 | } |
| 2213 | |
| 2214 | // increases game difficulty based on player's total score / total of players' scores |
| 2215 | void adjust_difficultycxx . . $ adjust_difficulty(49f6e7a06ebc5aa8).(void) |
| 2216 | { |
| 2217 | const float score_multiplier[10] = |
| 2218 | { |
| 2219 | 0, // Wimp (doesn't exist) |
| 2220 | 0.4f, // Easy |
| 2221 | 0.8f, // Normal |
| 2222 | 1.3f, // Hard |
| 2223 | 1.6f, // Impossible |
| 2224 | 2, // Insanity |
| 2225 | 2, // Suicide |
| 2226 | 3, // Maniacal |
| 2227 | 3, // Zinglon |
| 2228 | 3, // Nortaneous |
| 2229 | }; |
| 2230 | |
| 2231 | assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(initialDifficulty > 0 && initialDifficulty < 10); |
| 2232 | |
| 2233 | const ulongcxx . . $ ulong# score = twoPlayerModecxx . . $ twoPlayerMode. ? (playercxx . . $ player.[0].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. + playercxx . . $ player.[1].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.) : JE_totalScorecxx . . $ JE_totalScore(6645df09e8416cb5).(&playercxx . . $ player.[0]), |
| 2234 | adjusted_score = roundf(score * score_multiplier[initialDifficultycxx . . $ initialDifficulty.]); |
| 2235 | |
| 2236 | uintcxx . . $ uint# new_difficulty = 0; |
| 2237 | |
| 2238 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 2239 | { |
| 2240 | if (adjusted_score < 10000) |
| 2241 | new_difficulty = DIFFICULTY_EASYcxx . . $ DIFFICULTY_EASY.; |
| 2242 | else if (adjusted_score < 20000) |
| 2243 | new_difficulty = DIFFICULTY_NORMALcxx . . $ DIFFICULTY_NORMAL.; |
| 2244 | else if (adjusted_score < 50000) |
| 2245 | new_difficulty = DIFFICULTY_HARDcxx . . $ DIFFICULTY_HARD.; |
| 2246 | else if (adjusted_score < 80000) |
| 2247 | new_difficulty = DIFFICULTY_IMPOSSIBLEcxx . . $ DIFFICULTY_IMPOSSIBLE.; |
| 2248 | else if (adjusted_score < 125000) |
| 2249 | new_difficulty = DIFFICULTY_INSANITYcxx . . $ DIFFICULTY_INSANITY.; |
| 2250 | else if (adjusted_score < 200000) |
| 2251 | new_difficulty = DIFFICULTY_SUICIDEcxx . . $ DIFFICULTY_SUICIDE.; |
| 2252 | else if (adjusted_score < 400000) |
| 2253 | new_difficulty = DIFFICULTY_MANIACALcxx . . $ DIFFICULTY_MANIACAL.; |
| 2254 | else if (adjusted_score < 600000) |
| 2255 | new_difficulty = DIFFICULTY_ZINGLONcxx . . $ DIFFICULTY_ZINGLON.; |
| 2256 | else |
| 2257 | new_difficulty = DIFFICULTY_NORTANEOUScxx . . $ DIFFICULTY_NORTANEOUS.; |
| 2258 | } |
| 2259 | else |
| 2260 | { |
| 2261 | if (adjusted_score < 40000) |
| 2262 | new_difficulty = DIFFICULTY_EASYcxx . . $ DIFFICULTY_EASY.; |
| 2263 | else if (adjusted_score < 70000) |
| 2264 | new_difficulty = DIFFICULTY_NORMALcxx . . $ DIFFICULTY_NORMAL.; |
| 2265 | else if (adjusted_score < 150000) |
| 2266 | new_difficulty = DIFFICULTY_HARDcxx . . $ DIFFICULTY_HARD.; |
| 2267 | else if (adjusted_score < 300000) |
| 2268 | new_difficulty = DIFFICULTY_IMPOSSIBLEcxx . . $ DIFFICULTY_IMPOSSIBLE.; |
| 2269 | else if (adjusted_score < 600000) |
| 2270 | new_difficulty = DIFFICULTY_INSANITYcxx . . $ DIFFICULTY_INSANITY.; |
| 2271 | else if (adjusted_score < 1000000) |
| 2272 | new_difficulty = DIFFICULTY_SUICIDEcxx . . $ DIFFICULTY_SUICIDE.; |
| 2273 | else if (adjusted_score < 2000000) |
| 2274 | new_difficulty = DIFFICULTY_MANIACALcxx . . $ DIFFICULTY_MANIACAL.; |
| 2275 | else if (adjusted_score < 3000000) |
| 2276 | new_difficulty = DIFFICULTY_ZINGLONcxx . . $ DIFFICULTY_ZINGLON.; |
| 2277 | else |
| 2278 | new_difficulty = DIFFICULTY_NORTANEOUScxx . . $ DIFFICULTY_NORTANEOUS.; |
| 2279 | } |
| 2280 | |
| 2281 | difficultyLevelcxx . . $ difficultyLevel. = MAXcxx . . $ `src/opentyr.h:29:9`!((unsigned)difficultyLevel, new_difficulty); |
| 2282 | } |
| 2283 | |
| 2284 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! load_next_democxx . . $ load_next_demo(c9857a73d68e59ba).(void) |
| 2285 | { |
| 2286 | if (++demo_numcxx . . $ demo_num. > 5) |
| 2287 | demo_numcxx . . $ demo_num. = 1; |
| 2288 | |
| 2289 | char demo_filename[9]; |
| 2290 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(demo_filename, sizeof(demo_filename), "demo.%d", demo_numcxx . . $ demo_num.); |
| 2291 | demo_filecxx . . $ demo_file. = dir_fopen_diecxx . . $ dir_fopen_die(2493aa730c89ee72).(data_dircxx . . $ data_dir(33a1f659e94feb42).(), demo_filename, "rb"); // TODO: only play demos from existing file (instead of dying) |
| 2292 | |
| 2293 | difficultyLevelcxx . . $ difficultyLevel. = DIFFICULTY_NORMALcxx . . $ DIFFICULTY_NORMAL.; |
| 2294 | bonusLevelCurrentcxx . . $ bonusLevelCurrent. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2295 | |
| 2296 | Uint8cxx . . $ Uint8# temp; |
| 2297 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&temp, 1, demo_filecxx . . $ demo_file.); |
| 2298 | JE_initEpisodecxx . . $ JE_initEpisode(ac50b47256ae7414).(temp); |
| 2299 | |
| 2300 | fread_diecxx . . $ fread_die(82d71c9ec5b61e0f).(levelNamecxx . . $ levelName., 1, 10, demo_filecxx . . $ demo_file.); |
| 2301 | levelNamecxx . . $ levelName.[10] = '\0'; |
| 2302 | |
| 2303 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&lvlFileNumcxx . . $ lvlFileNum., 1, demo_filecxx . . $ demo_file.); |
| 2304 | |
| 2305 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id., 1, demo_filecxx . . $ demo_file.); |
| 2306 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id., 1, demo_filecxx . . $ demo_file.); |
| 2307 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..super_arcade_modecxx . . $ $anonymous_type_55bed0e189d5bed_2#super_arcade_mode., 1, demo_filecxx . . $ demo_file.); |
| 2308 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.], 1, demo_filecxx . . $ demo_file.); |
| 2309 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.], 1, demo_filecxx . . $ demo_file.); |
| 2310 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..generatorcxx . . $ $anonymous_type_55bed0e189d5bed_2#generator., 1, demo_filecxx . . $ demo_file.); |
| 2311 | |
| 2312 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level., 1, demo_filecxx . . $ demo_file.); // could probably ignore |
| 2313 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_seriescxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_series., 1, demo_filecxx . . $ demo_file.); // could probably ignore |
| 2314 | |
| 2315 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&initial_episode_numcxx . . $ initial_episode_num., 1, demo_filecxx . . $ demo_file.); // could probably ignore |
| 2316 | |
| 2317 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shieldcxx . . $ $anonymous_type_55bed0e189d5bed_2#shield., 1, demo_filecxx . . $ demo_file.); |
| 2318 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special., 1, demo_filecxx . . $ demo_file.); |
| 2319 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship., 1, demo_filecxx . . $ demo_file.); |
| 2320 | |
| 2321 | for (uintcxx . . $ uint# i = 0; i < 2; ++i) |
| 2322 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[i].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power., 1, demo_filecxx . . $ demo_file.); |
| 2323 | |
| 2324 | Uint8cxx . . $ Uint8# unused[3]; |
| 2325 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(unused, 3, demo_filecxx . . $ demo_file.); |
| 2326 | |
| 2327 | fread_u8_diecxx . . $ fread_u8_die(77ebc59a7bf9f340).(&levelSongcxx . . $ levelSong., 1, demo_filecxx . . $ demo_file.); |
| 2328 | |
| 2329 | demo_keyscxx . . $ demo_keys. = 0; |
| 2330 | |
| 2331 | Uint8cxx . . $ Uint8# temp2[2] = { 0, 0 }; |
| 2332 | fread_u8cxx . . $ fread_u8(e379f1355fd4067).(temp2, 2, demo_filecxx . . $ demo_file.); |
| 2333 | demo_keys_waitcxx . . $ demo_keys_wait. = (temp2[0] << 8) | temp2[1]; |
| 2334 | |
| 2335 | printfcxx . . $ printf(581fddd72a8db8fc).("loaded demo '%s'\n", demo_filename); |
| 2336 | |
| 2337 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2338 | } |
| 2339 | |
| 2340 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! replay_demo_keyscxx . . $ replay_demo_keys(c9857a73d68e59ba).(void) |
| 2341 | { |
| 2342 | while (demo_keys_waitcxx . . $ demo_keys_wait. == 0) |
| 2343 | { |
| 2344 | demo_keyscxx . . $ demo_keys. = 0; |
| 2345 | fread_u8cxx . . $ fread_u8(e379f1355fd4067).(&demo_keyscxx . . $ demo_keys., 1, demo_filecxx . . $ demo_file.); |
| 2346 | |
| 2347 | Uint8cxx . . $ Uint8# temp2[2] = { 0, 0 }; |
| 2348 | fread_u8cxx . . $ fread_u8(e379f1355fd4067).(temp2, 2, demo_filecxx . . $ demo_file.); |
| 2349 | demo_keys_waitcxx . . $ demo_keys_wait. = (temp2[0] << 8) | temp2[1]; |
| 2350 | |
| 2351 | if (feofcxx . . $ feof(89bc1efcdac0ca22).(demo_filecxx . . $ demo_file.)) |
| 2352 | { |
| 2353 | // no more keys |
| 2354 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2355 | } |
| 2356 | } |
| 2357 | |
| 2358 | demo_keys_waitcxx . . $ demo_keys_wait.--; |
| 2359 | |
| 2360 | if (demo_keyscxx . . $ demo_keys. & (1 << 0)) |
| 2361 | playercxx . . $ player.[0].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. -= CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 2362 | if (demo_keyscxx . . $ demo_keys. & (1 << 1)) |
| 2363 | playercxx . . $ player.[0].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 2364 | |
| 2365 | if (demo_keyscxx . . $ demo_keys. & (1 << 2)) |
| 2366 | playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. -= CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 2367 | if (demo_keyscxx . . $ demo_keys. & (1 << 3)) |
| 2368 | playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 2369 | |
| 2370 | buttoncxx . . $ button.[0] = (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!)(demo_keyscxx . . $ demo_keys. & (1 << 4)); |
| 2371 | buttoncxx . . $ button.[3] = (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!)(demo_keyscxx . . $ demo_keys. & (1 << 5)); |
| 2372 | buttoncxx . . $ button.[1] = (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!)(demo_keyscxx . . $ demo_keys. & (1 << 6)); |
| 2373 | buttoncxx . . $ button.[2] = (boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!)(demo_keyscxx . . $ demo_keys. & (1 << 7)); |
| 2374 | |
| 2375 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2376 | } |
| 2377 | |
| 2378 | /*Street Fighter codes*/ |
| 2379 | void JE_SFCodescxx . . $ JE_SFCodes(d4f5c5fa9024050c).(JE_bytecxx . . $ JE_byte# playerNum_, JE_integercxx . . $ JE_integer# PX_, JE_integercxx . . $ JE_integer# PY_, JE_integercxx . . $ JE_integer# mouseX_, JE_integercxx . . $ JE_integer# mouseY_) |
| 2380 | { |
| 2381 | JE_bytecxx . . $ JE_byte# temp, temp2, temp3, temp4, temp5; |
| 2382 | |
| 2383 | uintcxx . . $ uint# ship = playercxx . . $ player.[playerNum_-1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship.; |
| 2384 | |
| 2385 | /*Get direction*/ |
| 2386 | if (playerNum_ == 2 && ship < 15) |
| 2387 | { |
| 2388 | ship = 0; |
| 2389 | } |
| 2390 | |
| 2391 | if (ship < 15) |
| 2392 | { |
| 2393 | |
| 2394 | temp2 = (mouseY_ > PY_) + /*UP*/ |
| 2395 | (mouseY_ < PY_) + /*DOWN*/ |
| 2396 | (PX_ < mouseX_) + /*LEFT*/ |
| 2397 | (PX_ > mouseX_); /*RIGHT*/ |
| 2398 | temp = (mouseY_ > PY_) * 1 + /*UP*/ |
| 2399 | (mouseY_ < PY_) * 2 + /*DOWN*/ |
| 2400 | (PX_ < mouseX_) * 3 + /*LEFT*/ |
| 2401 | (PX_ > mouseX_) * 4; /*RIGHT*/ |
| 2402 | |
| 2403 | if (temp == 0) // no direction being pressed |
| 2404 | { |
| 2405 | if (!buttoncxx . . $ button.[0]) // if fire button is released |
| 2406 | { |
| 2407 | temp = 9; |
| 2408 | temp2 = 1; |
| 2409 | } |
| 2410 | else |
| 2411 | { |
| 2412 | temp2 = 0; |
| 2413 | temp = 99; |
| 2414 | } |
| 2415 | } |
| 2416 | |
| 2417 | if (temp2 == 1) // if exactly one direction pressed or fire button is released |
| 2418 | { |
| 2419 | temp += buttoncxx . . $ button.[0] * 4; |
| 2420 | |
| 2421 | temp3 = superTyriancxx . . $ superTyrian. ? 21 : 3; |
| 2422 | for (temp2 = 0; temp2 < temp3; temp2++) |
| 2423 | { |
| 2424 | |
| 2425 | /*Use SuperTyrian ShipCombos or not?*/ |
| 2426 | temp5 = superTyriancxx . . $ superTyrian. ? shipCombosBcxx . . $ shipCombosB.[temp2] : shipComboscxx . . $ shipCombos.[ship][temp2]; |
| 2427 | |
| 2428 | // temp5 == selected combo in ship |
| 2429 | if (temp5 == 0) /* combo doesn't exists */ |
| 2430 | { |
| 2431 | // mark twiddles as cancelled/finished |
| 2432 | SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2] = 0; |
| 2433 | } |
| 2434 | else |
| 2435 | { |
| 2436 | // get next combo key |
| 2437 | temp4 = keyboardComboscxx . . $ keyboardCombos.[temp5-1][SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2]]; |
| 2438 | |
| 2439 | // correct key |
| 2440 | if (temp4 == temp) |
| 2441 | { |
| 2442 | SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2]++; |
| 2443 | |
| 2444 | temp4 = keyboardComboscxx . . $ keyboardCombos.[temp5-1][SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2]]; |
| 2445 | if (temp4 > 100 && temp4 <= 100 + SPECIAL_NUMcxx . . $ `src/lvlmast.h:34:9`!) |
| 2446 | { |
| 2447 | SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2] = 0; |
| 2448 | SFExecutedcxx . . $ SFExecuted.[playerNum_-1] = temp4 - 100; |
| 2449 | } |
| 2450 | } |
| 2451 | else |
| 2452 | { |
| 2453 | if ((temp != 9) && |
| 2454 | (temp4 - 1) % 4 != (temp - 1) % 4 && |
| 2455 | (SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2] == 0 || |
| 2456 | keyboardComboscxx . . $ keyboardCombos.[temp5-1][SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2]-1] != temp)) |
| 2457 | { |
| 2458 | SFCurrentCodecxx . . $ SFCurrentCode.[playerNum_-1][temp2] = 0; |
| 2459 | } |
| 2460 | } |
| 2461 | } |
| 2462 | } |
| 2463 | } |
| 2464 | |
| 2465 | } |
| 2466 | } |
| 2467 | |
| 2468 | void JE_sortcxx . . $ JE_sort(49f6e7a06ebc5aa8).(void) |
| 2469 | { |
| 2470 | JE_bytecxx . . $ JE_byte# a, b; |
| 2471 | |
| 2472 | for (a = 0; a < 2; a++) |
| 2473 | { |
| 2474 | for (b = a + 1; b < 3; b++) |
| 2475 | { |
| 2476 | if (saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1. < saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.) |
| 2477 | { |
| 2478 | JE_longintcxx . . $ JE_longint# tempLI; |
| 2479 | char tempStr[30]; |
| 2480 | JE_bytecxx . . $ JE_byte# tempByte; |
| 2481 | |
| 2482 | tempLI = saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.; |
| 2483 | saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1. = saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1.; |
| 2484 | saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScore1cxx . . $ $anonymous_type_5227559294d527ce_2#highScore1. = tempLI; |
| 2485 | |
| 2486 | strcpycxx . . $ strcpy(b7b3a83273496486).(tempStr, saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName.); |
| 2487 | strcpycxx . . $ strcpy(b7b3a83273496486).(saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName.); |
| 2488 | strcpycxx . . $ strcpy(b7b3a83273496486).(saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScoreNamecxx . . $ $anonymous_type_5227559294d527ce_2#highScoreName., tempStr); |
| 2489 | |
| 2490 | tempByte = saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff.; |
| 2491 | saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + a].highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff. = saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff.; |
| 2492 | saveFilescxx . . $ saveFiles.[tempcxx . . $ temp. + b].highScoreDiffcxx . . $ $anonymous_type_5227559294d527ce_2#highScoreDiff. = tempByte; |
| 2493 | } |
| 2494 | } |
| 2495 | } |
| 2496 | } |
| 2497 | |
| 2498 | void JE_playCreditscxx . . $ JE_playCredits(49f6e7a06ebc5aa8).(void) |
| 2499 | { |
| 2500 | enumcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).$anonymous_type_0# { lines_maxcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).lines_max. = 131 }; |
| 2501 | enumcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).$anonymous_type_1# { line_max_lengthcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).line_max_length. = 65 }; |
| 2502 | |
| 2503 | char credstr[lines_maxcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).lines_max.][line_max_lengthcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).line_max_length. + 1]; |
| 2504 | |
| 2505 | int lines = 0; |
| 2506 | |
| 2507 | JE_bytecxx . . $ JE_byte# currentpic = 0, fade = 0; |
| 2508 | JE_shortintcxx . . $ JE_shortint# fadechg = 1; |
| 2509 | JE_bytecxx . . $ JE_byte# currentship = 0; |
| 2510 | JE_integercxx . . $ JE_integer# shipx = 0, shipxwait = 0; |
| 2511 | JE_shortintcxx . . $ JE_shortint# shipxc = 0, shipxca = 0; |
| 2512 | |
| 2513 | load_sprites_filecxx . . $ load_sprites_file(d7adf5cfafc0e15a).(EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!, "estsc.shp"); |
| 2514 | |
| 2515 | setDelay2cxx . . $ setDelay2(d4f767463ce0a6b3).(1000); |
| 2516 | |
| 2517 | play_songcxx . . $ play_song(cb2f890c2fdad230).(8); |
| 2518 | |
| 2519 | // load credits text |
| 2520 | FILEcxx . . $ FILE# *f = dir_fopen_diecxx . . $ dir_fopen_die(2493aa730c89ee72).(data_dircxx . . $ data_dir(33a1f659e94feb42).(), "tyrian.cdt", "rb"); |
| 2521 | for (lines = 0; lines < lines_maxcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).lines_max.; ++lines) |
| 2522 | { |
| 2523 | read_encrypted_pascal_stringcxx . . $ read_encrypted_pascal_string(5eeaf57e1be5eb1d).(credstr[lines], sizeof(credstr[lines]), f); |
| 2524 | } |
| 2525 | fclosecxx . . $ fclose(89bc1efcdac0ca22).(f); |
| 2526 | |
| 2527 | memcpycxx . . $ memcpy(cc817cb175f282d).(colorscxx . . $ colors., palettescxx . . $ palettes.[6-1], sizeof(colorscxx . . $ colors.)); |
| 2528 | JE_clr256cxx . . $ JE_clr256(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 2529 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2530 | fade_palettecxx . . $ fade_palette(59ab901998e00635).(colorscxx . . $ colors., 2, 0, 255); |
| 2531 | |
| 2532 | //tempScreenSeg = VGAScreenSeg; |
| 2533 | |
| 2534 | const int ticks_max = lines * 20 * 3; |
| 2535 | for (int ticks = 0; ticks < ticks_max; ++ticks) |
| 2536 | { |
| 2537 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(1); |
| 2538 | JE_clr256cxx . . $ JE_clr256(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 2539 | |
| 2540 | blit_sprite_hvcxx . . $ blit_sprite_hv(62f96868ab2f1929).(VGAScreenSegcxx . . $ VGAScreenSeg., 319 - spritecxx . . $ sprite(d067a90ab23634af).(EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!, currentpic)->widthcxx . . $ $anonymous_type_297934740aeafb7d_0#width., 100 - (spritecxx . . $ sprite(d067a90ab23634af).(EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!, currentpic)->heightcxx . . $ $anonymous_type_297934740aeafb7d_0#height. / 2), EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!, currentpic, 0x0, fade - 15); |
| 2541 | |
| 2542 | fade += fadechg; |
| 2543 | if (fade == 0 && fadechg == -1) |
| 2544 | { |
| 2545 | fadechg = 1; |
| 2546 | ++currentpic; |
| 2547 | if (currentpic >= sprite_tablecxx . . $ sprite_table.[EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!].countcxx . . $ $anonymous_type_297934740aeafb7d_1#count.) |
| 2548 | currentpic = 0; |
| 2549 | } |
| 2550 | if (fade == 15) |
| 2551 | fadechg = 0; |
| 2552 | |
| 2553 | if (getDelayTicks2cxx . . $ getDelayTicks2(db52760e79bf9054).() == 0) |
| 2554 | { |
| 2555 | fadechg = -1; |
| 2556 | setDelay2cxx . . $ setDelay2(d4f767463ce0a6b3).(900); |
| 2557 | } |
| 2558 | |
| 2559 | if (ticks % 200 == 0) |
| 2560 | { |
| 2561 | currentship = (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 11) + 1; |
| 2562 | shipxwait = (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 80) + 10; |
| 2563 | if ((mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 2) == 1) |
| 2564 | { |
| 2565 | shipx = 1; |
| 2566 | shipxc = 0; |
| 2567 | shipxca = 1; |
| 2568 | } |
| 2569 | else |
| 2570 | { |
| 2571 | shipx = 900; |
| 2572 | shipxc = 0; |
| 2573 | shipxca = -1; |
| 2574 | } |
| 2575 | } |
| 2576 | |
| 2577 | shipxwait--; |
| 2578 | if (shipxwait == 0) |
| 2579 | { |
| 2580 | if (shipx == 1 || shipx == 900) |
| 2581 | shipxc = 0; |
| 2582 | shipxca = -shipxca; |
| 2583 | shipxwait = (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 40) + 15; |
| 2584 | } |
| 2585 | shipxc += shipxca; |
| 2586 | shipx += shipxc; |
| 2587 | if (shipx < 1) |
| 2588 | { |
| 2589 | shipx = 1; |
| 2590 | shipxwait = 1; |
| 2591 | } |
| 2592 | if (shipx > 900) |
| 2593 | { |
| 2594 | shipx = 900; |
| 2595 | shipxwait = 1; |
| 2596 | } |
| 2597 | int tmp_unknown = shipxc * shipxc; |
| 2598 | if (450 + tmp_unknown < 0 || 450 + tmp_unknown > 900) |
| 2599 | { |
| 2600 | if (shipxca < 0 && shipxc < 0) |
| 2601 | shipxwait = 1; |
| 2602 | if (shipxca > 0 && shipxc > 0) |
| 2603 | shipxwait = 1; |
| 2604 | } |
| 2605 | |
| 2606 | uintcxx . . $ uint# ship_sprite = shipscxx . . $ ships.[currentship].shipgraphiccxx . . $ $anonymous_type_66fcae0887b82ce8_6#shipgraphic.; |
| 2607 | if (shipxc < -10) |
| 2608 | ship_sprite -= (shipxc < -20) ? 4 : 2; |
| 2609 | else if (shipxc > 10) |
| 2610 | ship_sprite += (shipxc > 20) ? 4 : 2; |
| 2611 | |
| 2612 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., shipx / 40, 184 - (ticks % 200), spriteSheet9cxx . . $ spriteSheet9., ship_sprite); |
| 2613 | |
| 2614 | const int bottom_line = (ticks / 3) / 20; |
| 2615 | int y = 20 - ((ticks / 3) % 20); |
| 2616 | |
| 2617 | for (int line = bottom_line - 10; line < bottom_line; ++line) |
| 2618 | { |
| 2619 | if (line >= 0 && line < lines_maxcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).lines_max.) |
| 2620 | { |
| 2621 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(&credstr[line][0], ".") != 0 && strlencxx . . $ strlen(751346f8406fd082).(credstr[line])) |
| 2622 | { |
| 2623 | const Uint8cxx . . $ Uint8# color = credstr[line][0] - 65; |
| 2624 | const char *text = &credstr[line][1]; |
| 2625 | |
| 2626 | const int x = 110 - JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(text, SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!) / 2; |
| 2627 | |
| 2628 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., x + abscxx . . $ abs(7864480464b09eea).((y / 18) % 4 - 2) - 1, y - 1, text, color, -8, SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2629 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., x, y, text, color, -2, SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2630 | } |
| 2631 | } |
| 2632 | |
| 2633 | y += 20; |
| 2634 | } |
| 2635 | |
| 2636 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreencxx . . $ VGAScreen., 0, 0, 319, 10, 0); |
| 2637 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreencxx . . $ VGAScreen., 0, 190, 319, 199, 0); |
| 2638 | |
| 2639 | if (currentpic == sprite_tablecxx . . $ sprite_table.[EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!].countcxx . . $ $anonymous_type_297934740aeafb7d_1#count. - 1) |
| 2640 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., 5, 180, miscTextcxx . . $ miscText.[54], 2, -2, SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); // levels-in-episode |
| 2641 | |
| 2642 | if (bottom_line == lines_maxcxx . . $ JE_playCredits(49f6e7a06ebc5aa8).lines_max. - 8) |
| 2643 | fade_songcxx . . $ fade_song(49f6e7a06ebc5aa8).(); |
| 2644 | |
| 2645 | if (ticks == ticks_max - 1) |
| 2646 | { |
| 2647 | --ticks; |
| 2648 | play_songcxx . . $ play_song(cb2f890c2fdad230).(9); |
| 2649 | } |
| 2650 | |
| 2651 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 2652 | |
| 2653 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2654 | |
| 2655 | wait_delaycxx . . $ wait_delay(49f6e7a06ebc5aa8).(); |
| 2656 | |
| 2657 | if (JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).()) |
| 2658 | break; |
| 2659 | } |
| 2660 | |
| 2661 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(10); |
| 2662 | |
| 2663 | free_spritescxx . . $ free_sprites(cb2f890c2fdad230).(EXTRA_SHAPEScxx . . $ `src/sprite.h:36:9`!); |
| 2664 | } |
| 2665 | |
| 2666 | void JE_endLevelAnicxx . . $ JE_endLevelAni(49f6e7a06ebc5aa8).(void) |
| 2667 | { |
| 2668 | JE_wordcxx . . $ JE_word# x, y; |
| 2669 | JE_bytecxx . . $ JE_byte# temp; |
| 2670 | char tempStr[256]; |
| 2671 | |
| 2672 | Sint8cxx . . $ Sint8# i; |
| 2673 | |
| 2674 | if (!constantPlaycxx . . $ constantPlay.) |
| 2675 | { |
| 2676 | // grant shipedit privileges |
| 2677 | |
| 2678 | // special |
| 2679 | if (playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. < 21) |
| 2680 | saveTempcxx . . $ saveTemp.[SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! + 81 + playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special.] = 1; |
| 2681 | |
| 2682 | for (uintcxx . . $ uint# p = 0; p < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++p) |
| 2683 | { |
| 2684 | // front, rear |
| 2685 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[p].items.weapon); ++i) |
| 2686 | saveTempcxx . . $ saveTemp.[SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! + playercxx . . $ player.[p].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[i].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.] = 1; |
| 2687 | |
| 2688 | // options |
| 2689 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[p].items.sidekick); ++i) |
| 2690 | saveTempcxx . . $ saveTemp.[SAVE_FILES_SIZEcxx . . $ `src/config.h:33:9`! + 51 + playercxx . . $ player.[p].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i]] = 1; |
| 2691 | } |
| 2692 | } |
| 2693 | |
| 2694 | adjust_difficultycxx . . $ adjust_difficulty(49f6e7a06ebc5aa8).(); |
| 2695 | |
| 2696 | playercxx . . $ player.[0].last_itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#last_items. = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items.; |
| 2697 | strcpycxx . . $ strcpy(b7b3a83273496486).(lastLevelNamecxx . . $ lastLevelName., levelNamecxx . . $ levelName.); |
| 2698 | |
| 2699 | JE_wipeKeycxx . . $ JE_wipeKey(49f6e7a06ebc5aa8).(); |
| 2700 | frameCountMaxcxx . . $ frameCountMax. = 4; |
| 2701 | textGlowFontcxx . . $ textGlowFont. = SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!; |
| 2702 | |
| 2703 | SDL_Colorcxx . . $ SDL_Color# white = { 255, 255, 255 }; |
| 2704 | set_colorscxx . . $ set_colors(1ccd9883187beb24).(white, 254, 254); |
| 2705 | |
| 2706 | if (!levelTimercxx . . $ levelTimer. || levelTimerCountdowncxx . . $ levelTimerCountdown. > 0 || !(episodeNumcxx . . $ episodeNum. == 4)) |
| 2707 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(V_LEVEL_ENDcxx . . $ V_LEVEL_END.); |
| 2708 | else |
| 2709 | play_songcxx . . $ play_song(cb2f890c2fdad230).(21); |
| 2710 | |
| 2711 | if (bonusLevelcxx . . $ bonusLevel.) |
| 2712 | { |
| 2713 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 20, 20, miscTextcxx . . $ miscText.[17-1]); |
| 2714 | } |
| 2715 | else if (all_players_alivecxx . . $ all_players_alive(c9857a73d68e59ba).()) |
| 2716 | { |
| 2717 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[27-1], levelNamecxx . . $ levelName.); // "Completed" |
| 2718 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 20, 20, tempStr); |
| 2719 | } |
| 2720 | else |
| 2721 | { |
| 2722 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[62-1], levelNamecxx . . $ levelName.); // "Exiting" |
| 2723 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 20, 20, tempStr); |
| 2724 | } |
| 2725 | |
| 2726 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 2727 | { |
| 2728 | for (uintcxx . . $ uint# i = 0; i < 2; ++i) |
| 2729 | { |
| 2730 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(tempStr, sizeof(tempStr), "%s %lu", miscTextcxx . . $ miscText.[40 + i], playercxx . . $ player.[i].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.); |
| 2731 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 30, 50 + 20 * i, tempStr); |
| 2732 | } |
| 2733 | } |
| 2734 | else |
| 2735 | { |
| 2736 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %lu", miscTextcxx . . $ miscText.[28-1], playercxx . . $ player.[0].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.); |
| 2737 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 30, 50, tempStr); |
| 2738 | } |
| 2739 | |
| 2740 | temp = (totalEnemycxx . . $ totalEnemy. == 0) ? 0 : roundf(enemyKilledcxx . . $ enemyKilled. * 100 / totalEnemycxx . . $ totalEnemy.); |
| 2741 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %d%%", miscTextcxx . . $ miscText.[63-1], temp); |
| 2742 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 40, 90, tempStr); |
| 2743 | |
| 2744 | if (!constantPlaycxx . . $ constantPlay.) |
| 2745 | editorLevelcxx . . $ editorLevel. += temp / 5; |
| 2746 | |
| 2747 | if (!onePlayerActioncxx . . $ onePlayerAction. && !twoPlayerModecxx . . $ twoPlayerMode.) |
| 2748 | { |
| 2749 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 30, 120, miscTextcxx . . $ miscText.[4-1]); /*Cubes*/ |
| 2750 | |
| 2751 | if (cubeMaxcxx . . $ cubeMax. > 0) |
| 2752 | { |
| 2753 | if (cubeMaxcxx . . $ cubeMax. > 4) |
| 2754 | cubeMaxcxx . . $ cubeMax. = 4; |
| 2755 | |
| 2756 | if (frameCountMaxcxx . . $ frameCountMax. != 0) |
| 2757 | frameCountMaxcxx . . $ frameCountMax. = 1; |
| 2758 | |
| 2759 | for (temp = 1; temp <= cubeMaxcxx . . $ cubeMax.; temp++) |
| 2760 | { |
| 2761 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 2762 | |
| 2763 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_ITEMcxx . . $ S_ITEM.); |
| 2764 | x = 20 + 30 * temp; |
| 2765 | y = 135; |
| 2766 | JE_drawCubecxx . . $ JE_drawCube(bea9694d51014729).(VGAScreenSegcxx . . $ VGAScreenSeg., x, y, 9, 0); |
| 2767 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2768 | |
| 2769 | for (i = -15; i <= 10; i++) |
| 2770 | { |
| 2771 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(frameCountMaxcxx . . $ frameCountMax.); |
| 2772 | |
| 2773 | blit_sprite_hvcxx . . $ blit_sprite_hv(62f96868ab2f1929).(VGAScreenSegcxx . . $ VGAScreenSeg., x, y, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 25, 0x9, i); |
| 2774 | |
| 2775 | if (JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).()) |
| 2776 | frameCountMaxcxx . . $ frameCountMax. = 0; |
| 2777 | |
| 2778 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2779 | |
| 2780 | wait_delaycxx . . $ wait_delay(49f6e7a06ebc5aa8).(); |
| 2781 | } |
| 2782 | for (i = 10; i >= 0; i--) |
| 2783 | { |
| 2784 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(frameCountMaxcxx . . $ frameCountMax.); |
| 2785 | |
| 2786 | blit_sprite_hvcxx . . $ blit_sprite_hv(62f96868ab2f1929).(VGAScreenSegcxx . . $ VGAScreenSeg., x, y, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 25, 0x9, i); |
| 2787 | |
| 2788 | if (JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).()) |
| 2789 | frameCountMaxcxx . . $ frameCountMax. = 0; |
| 2790 | |
| 2791 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2792 | |
| 2793 | wait_delaycxx . . $ wait_delay(49f6e7a06ebc5aa8).(); |
| 2794 | } |
| 2795 | } |
| 2796 | } |
| 2797 | else |
| 2798 | { |
| 2799 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 50, 135, miscTextcxx . . $ miscText.[15-1]); |
| 2800 | } |
| 2801 | |
| 2802 | } |
| 2803 | |
| 2804 | if (frameCountMaxcxx . . $ frameCountMax. != 0) |
| 2805 | { |
| 2806 | frameCountMaxcxx . . $ frameCountMax. = 6; |
| 2807 | temp = 1; |
| 2808 | } |
| 2809 | else |
| 2810 | { |
| 2811 | temp = 0; |
| 2812 | } |
| 2813 | temp2cxx . . $ temp2. = twoPlayerModecxx . . $ twoPlayerMode. ? 150 : 160; |
| 2814 | JE_outTextGlowcxx . . $ JE_outTextGlow(472f2eee5aa9d4c0).(VGAScreenSegcxx . . $ VGAScreenSeg., 90, temp2cxx . . $ temp2., miscTextcxx . . $ miscText.[5-1]); |
| 2815 | |
| 2816 | if (!constantPlaycxx . . $ constantPlay.) |
| 2817 | { |
| 2818 | do |
| 2819 | { |
| 2820 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(1); |
| 2821 | |
| 2822 | NETWORK_KEEP_ALIVEcxx . . $ `src/network.h:88:9`!(); |
| 2823 | |
| 2824 | wait_delaycxx . . $ wait_delay(49f6e7a06ebc5aa8).(); |
| 2825 | } while (!(JE_anyButtoncxx . . $ JE_anyButton(c9857a73d68e59ba).() || (frameCountMaxcxx . . $ frameCountMax. == 0 && temp == 1))); |
| 2826 | } |
| 2827 | |
| 2828 | wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); // TODO: should up the joystick repeat temporarily instead |
| 2829 | |
| 2830 | fade_blackcxx . . $ fade_black(d4f767463ce0a6b3).(15); |
| 2831 | JE_clr256cxx . . $ JE_clr256(60a0b30a00b4fc6d).(VGAScreencxx . . $ VGAScreen.); |
| 2832 | } |
| 2833 | |
| 2834 | void JE_drawCubecxx . . $ JE_drawCube(bea9694d51014729).(SDL_Surfacecxx . . $ SDL_Surface# * screen, JE_wordcxx . . $ JE_word# x, JE_wordcxx . . $ JE_word# y, JE_bytecxx . . $ JE_byte# filter, JE_bytecxx . . $ JE_byte# brightness) |
| 2835 | { |
| 2836 | blit_sprite_darkcxx . . $ blit_sprite_dark(34bc9a7b28a4eeec).(screen, x + 4, y + 4, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 25, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2837 | blit_sprite_darkcxx . . $ blit_sprite_dark(34bc9a7b28a4eeec).(screen, x + 3, y + 3, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 25, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2838 | blit_sprite_hvcxx . . $ blit_sprite_hv(62f96868ab2f1929).(screen, x, y, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 25, filter, brightness); |
| 2839 | } |
| 2840 | |
| 2841 | void JE_handleChatcxx . . $ JE_handleChat(49f6e7a06ebc5aa8).(void) |
| 2842 | { |
| 2843 | // STUB(); Annoying piece of crap =P |
| 2844 | } |
| 2845 | |
| 2846 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! str_pop_intcxx . . $ str_pop_int(9114e84560875b2b).(char *str, int *val) |
| 2847 | { |
| 2848 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! success = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2849 | |
| 2850 | char buf[256]; |
| 2851 | assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(strlen(str) < sizeof(buf)); |
| 2852 | |
| 2853 | // grab the value from str |
| 2854 | char *end; |
| 2855 | *val = strtolcxx . . $ strtol(44bbb87609b212fc).(str, &end, 10); |
| 2856 | |
| 2857 | if (end != str) |
| 2858 | { |
| 2859 | success = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2860 | |
| 2861 | // shift the rest to the beginning |
| 2862 | strcpycxx . . $ strcpy(b7b3a83273496486).(buf, end); |
| 2863 | strcpycxx . . $ strcpy(b7b3a83273496486).(str, buf); |
| 2864 | } |
| 2865 | |
| 2866 | return success; |
| 2867 | } |
| 2868 | |
| 2869 | void JE_operationcxx . . $ JE_operation(ac50b47256ae7414).(JE_bytecxx . . $ JE_byte# slot) |
| 2870 | { |
| 2871 | JE_bytecxx . . $ JE_byte# flash; |
| 2872 | char stemp[21]; |
| 2873 | char tempStr[51]; |
| 2874 | |
| 2875 | if (!performSavecxx . . $ performSave.) |
| 2876 | { |
| 2877 | if (saveFilescxx . . $ saveFiles.[slot-1].levelcxx . . $ $anonymous_type_5227559294d527ce_2#level. > 0) |
| 2878 | { |
| 2879 | gameJustLoadedcxx . . $ gameJustLoaded. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2880 | JE_loadGamecxx . . $ JE_loadGame(ac50b47256ae7414).(slot); |
| 2881 | gameLoadedcxx . . $ gameLoaded. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2882 | } |
| 2883 | } |
| 2884 | else if (slot % 11 != 0) |
| 2885 | { |
| 2886 | strcpycxx . . $ strcpy(b7b3a83273496486).(stemp, " "); |
| 2887 | memcpycxx . . $ memcpy(cc817cb175f282d).(stemp, saveFilescxx . . $ saveFiles.[slot-1].namecxx . . $ $anonymous_type_5227559294d527ce_2#name., strlencxx . . $ strlen(751346f8406fd082).(saveFilescxx . . $ saveFiles.[slot-1].namecxx . . $ $anonymous_type_5227559294d527ce_2#name.)); |
| 2888 | tempcxx . . $ temp. = strlencxx . . $ strlen(751346f8406fd082).(stemp); |
| 2889 | while (stemp[tempcxx . . $ temp.-1] == ' ' && --tempcxx . . $ temp.); |
| 2890 | |
| 2891 | flash = 8 * 16 + 10; |
| 2892 | |
| 2893 | wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2894 | |
| 2895 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., 65, 55, 255, 155); |
| 2896 | |
| 2897 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! quit = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2898 | while (!quit) |
| 2899 | { |
| 2900 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 2901 | |
| 2902 | blit_spritecxx . . $ blit_sprite(ee201c8e1efc2766).(VGAScreencxx . . $ VGAScreen., 50, 50, OPTION_SHAPEScxx . . $ `src/sprite.h:34:9`!, 35); // message box |
| 2903 | |
| 2904 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 60, 55, miscTextcxx . . $ miscText.[1-1], 11, 4, DARKENcxx . . $ `src/fonthand.h:28:9`!); |
| 2905 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 70, 70, levelNamecxx . . $ levelName., 11, 4, DARKENcxx . . $ `src/fonthand.h:28:9`!); |
| 2906 | |
| 2907 | do |
| 2908 | { |
| 2909 | flash = (flash == 8 * 16 + 10) ? 8 * 16 + 2 : 8 * 16 + 10; |
| 2910 | temp3cxx . . $ temp3. = (temp3cxx . . $ temp3. == 6) ? 2 : 6; |
| 2911 | |
| 2912 | strcpycxx . . $ strcpy(b7b3a83273496486).(tempStr, miscTextcxx . . $ miscText.[2-1]); |
| 2913 | strncatcxx . . $ strncat(255158a415b673b0).(tempStr, stemp, tempcxx . . $ temp.); |
| 2914 | JE_outTextcxx . . $ JE_outText(894c69c4be246b6e).(VGAScreencxx . . $ VGAScreen., 65, 89, tempStr, 8, 3); |
| 2915 | tempWcxx . . $ tempW. = 65 + JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(tempStr, TINY_FONTcxx . . $ `src/sprite.h:31:9`!); |
| 2916 | JE_barShadecxx . . $ JE_barShade(ad548318d53dbf5e).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW. + 2, 90, tempWcxx . . $ tempW. + 6, 95); |
| 2917 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW. + 1, 89, tempWcxx . . $ tempW. + 5, 94, flash); |
| 2918 | |
| 2919 | int text_x = 54 + 45 - (JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(miscTextcxx . . $ miscText.[9], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!) / 2); |
| 2920 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., text_x, 128, miscTextcxx . . $ miscText.[9], 15, -5, FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 2921 | |
| 2922 | text_x = 149 + 45 - (JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(miscTextcxx . . $ miscText.[10], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!) / 2); |
| 2923 | JE_outTextAdjustcxx . . $ JE_outTextAdjust(f31fd28f47a6d6f4).(VGAScreencxx . . $ VGAScreen., text_x, 128, miscTextcxx . . $ miscText.[10], 15, -5, FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 2924 | |
| 2925 | for (int i = 0; i < 14; i++) |
| 2926 | { |
| 2927 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(1); |
| 2928 | |
| 2929 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 2930 | service_wait_delaycxx . . $ service_wait_delay(49f6e7a06ebc5aa8).(); |
| 2931 | |
| 2932 | JE_mouseStartcxx . . $ JE_mouseStart(49f6e7a06ebc5aa8).(); |
| 2933 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 2934 | JE_mouseReplacecxx . . $ JE_mouseReplace(49f6e7a06ebc5aa8).(); |
| 2935 | |
| 2936 | if (newkeycxx . . $ newkey. || newmousecxx . . $ newmouse. || new_textcxx . . $ new_text.) |
| 2937 | break; |
| 2938 | } |
| 2939 | } while (!newkeycxx . . $ newkey. && !newmousecxx . . $ newmouse. && !new_textcxx . . $ new_text.); |
| 2940 | |
| 2941 | if (mouseButtoncxx . . $ mouseButton. > 0) |
| 2942 | { |
| 2943 | if (lastmouse_xcxx . . $ lastmouse_x. > 56 && lastmouse_xcxx . . $ lastmouse_x. < 142 && lastmouse_ycxx . . $ lastmouse_y. > 123 && lastmouse_ycxx . . $ lastmouse_y. < 149) |
| 2944 | { |
| 2945 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2946 | JE_saveGamecxx . . $ JE_saveGame(9d0d6db36a0a8a6f).(slot, stemp); |
| 2947 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 2948 | } |
| 2949 | else if (lastmouse_xcxx . . $ lastmouse_x. > 151 && lastmouse_xcxx . . $ lastmouse_x. < 237 && lastmouse_ycxx . . $ lastmouse_y. > 123 && lastmouse_ycxx . . $ lastmouse_y. < 149) |
| 2950 | { |
| 2951 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2952 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 2953 | } |
| 2954 | } |
| 2955 | else if (new_textcxx . . $ new_text.) |
| 2956 | { |
| 2957 | for (size_t ti = 0U; last_textcxx . . $ last_text.[ti] != '\0'; ++ti) |
| 2958 | { |
| 2959 | const char c = (unsigned char)last_textcxx . . $ last_text.[ti] <= 127U ? touppercxx . . $ `<external>/17904084882347303253/ctype.h:221:11`!(last_text[ti]) : 0; |
| 2960 | if ((c == ' ' || font_asciicxx . . $ font_ascii.[(unsigned char)c] != -1) && |
| 2961 | tempcxx . . $ temp. < 14) |
| 2962 | { |
| 2963 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CURSORcxx . . $ S_CURSOR.); |
| 2964 | stemp[tempcxx . . $ temp.] = c; |
| 2965 | tempcxx . . $ temp. += 1; |
| 2966 | } |
| 2967 | } |
| 2968 | } |
| 2969 | else if (newkeycxx . . $ newkey.) |
| 2970 | { |
| 2971 | switch (lastkey_scancxx . . $ lastkey_scan.) |
| 2972 | { |
| 2973 | case SDL_SCANCODE_BACKSPACEcxx . . $ SDL_SCANCODE_BACKSPACE.: |
| 2974 | case SDL_SCANCODE_DELETEcxx . . $ SDL_SCANCODE_DELETE.: |
| 2975 | if (tempcxx . . $ temp.) |
| 2976 | { |
| 2977 | tempcxx . . $ temp.--; |
| 2978 | stemp[tempcxx . . $ temp.] = ' '; |
| 2979 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_CLICKcxx . . $ S_CLICK.); |
| 2980 | } |
| 2981 | break; |
| 2982 | case SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.: |
| 2983 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2984 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SPRINGcxx . . $ S_SPRING.); |
| 2985 | break; |
| 2986 | case SDL_SCANCODE_RETURNcxx . . $ SDL_SCANCODE_RETURN.: |
| 2987 | quit = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2988 | JE_saveGamecxx . . $ JE_saveGame(9d0d6db36a0a8a6f).(slot, stemp); |
| 2989 | JE_playSampleNumcxx . . $ JE_playSampleNum(ac50b47256ae7414).(S_SELECTcxx . . $ S_SELECT.); |
| 2990 | break; |
| 2991 | default: |
| 2992 | break; |
| 2993 | } |
| 2994 | } |
| 2995 | } |
| 2996 | } |
| 2997 | |
| 2998 | wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 2999 | } |
| 3000 | |
| 3001 | void JE_inGameDisplayscxx . . $ JE_inGameDisplays(49f6e7a06ebc5aa8).(void) |
| 3002 | { |
| 3003 | char stemp[21]; |
| 3004 | char tempstr[256]; |
| 3005 | |
| 3006 | for (uintcxx . . $ uint# i = 0; i < ((twoPlayerModecxx . . $ twoPlayerMode. && !galagaModecxx . . $ galagaMode.) ? 2 : 1); ++i) |
| 3007 | { |
| 3008 | snprintfcxx . . $ snprintf(ea502d73e74c754c).(tempstr, sizeof(tempstr), "%lu", playercxx . . $ player.[i].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash.); |
| 3009 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., 30 + 200 * i, 175, tempstr, 2, 4, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 3010 | } |
| 3011 | |
| 3012 | /*Special Weapon?*/ |
| 3013 | if (playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. > 0) |
| 3014 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., 25, 1, spriteSheet10cxx . . $ spriteSheet10., specialcxx . . $ special.[playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special.].itemgraphiccxx . . $ $anonymous_type_66fcae0887b82ce8_3#itemgraphic.); |
| 3015 | |
| 3016 | /*Lives Left*/ |
| 3017 | if (onePlayerActioncxx . . $ onePlayerAction. || twoPlayerModecxx . . $ twoPlayerMode.) |
| 3018 | { |
| 3019 | for (int temp = 0; temp < (onePlayerActioncxx . . $ onePlayerAction. ? 1 : 2); temp++) |
| 3020 | { |
| 3021 | const uintcxx . . $ uint# extra_lives = *playercxx . . $ player.[temp].livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives. - 1; |
| 3022 | |
| 3023 | int y = (temp == 0 && playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. > 0) ? 35 : 15; |
| 3024 | tempWcxx . . $ tempW. = (temp == 0) ? 30: 270; |
| 3025 | |
| 3026 | if (extra_lives >= 5) |
| 3027 | { |
| 3028 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW., y, spriteSheet9cxx . . $ spriteSheet9., 285); |
| 3029 | tempWcxx . . $ tempW. = (temp == 0) ? 45 : 250; |
| 3030 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempstr, "%d", extra_lives); |
| 3031 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW., y + 3, tempstr, 15, 1, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 3032 | } |
| 3033 | else if (extra_lives >= 1) |
| 3034 | { |
| 3035 | for (uintcxx . . $ uint# i = 0; i < extra_lives; ++i) |
| 3036 | { |
| 3037 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW., y, spriteSheet9cxx . . $ spriteSheet9., 285); |
| 3038 | |
| 3039 | tempWcxx . . $ tempW. += (temp == 0) ? 12 : -12; |
| 3040 | } |
| 3041 | } |
| 3042 | |
| 3043 | strcpycxx . . $ strcpy(b7b3a83273496486).(stemp, (temp == 0) ? miscTextcxx . . $ miscText.[49-1] : miscTextcxx . . $ miscText.[50-1]); |
| 3044 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3045 | { |
| 3046 | strcpycxx . . $ strcpy(b7b3a83273496486).(stemp, JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(temp+1)); |
| 3047 | } |
| 3048 | |
| 3049 | tempWcxx . . $ tempW. = (temp == 0) ? 28 : (285 - JE_textWidthcxx . . $ JE_textWidth(1df18506ef0a631b).(stemp, TINY_FONTcxx . . $ `src/sprite.h:31:9`!)); |
| 3050 | JE_textShadecxx . . $ JE_textShade(bb6cf87f29d3df77).(VGAScreencxx . . $ VGAScreen., tempWcxx . . $ tempW., y - 7, stemp, 2, 6, FULL_SHADEcxx . . $ `src/fonthand.h:27:9`!); |
| 3051 | } |
| 3052 | } |
| 3053 | |
| 3054 | /*Super Bombs!!*/ |
| 3055 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++i) |
| 3056 | { |
| 3057 | int x = (i == 0) ? 30 : 270; |
| 3058 | |
| 3059 | for (uintcxx . . $ uint# j = playercxx . . $ player.[i].superbombscxx . . $ $anonymous_type_55bed0e189d5bed_4#superbombs.; j > 0; --j) |
| 3060 | { |
| 3061 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., x, 160, spriteSheet9cxx . . $ spriteSheet9., 304); |
| 3062 | x += (i == 0) ? 12 : -12; |
| 3063 | } |
| 3064 | } |
| 3065 | |
| 3066 | if (youAreCheatingcxx . . $ youAreCheating.) |
| 3067 | { |
| 3068 | JE_outTextcxx . . $ JE_outText(894c69c4be246b6e).(VGAScreencxx . . $ VGAScreen., 90, 170, "Cheaters always prosper.", 3, 4); |
| 3069 | } |
| 3070 | } |
| 3071 | |
| 3072 | void JE_mainKeyboardInputcxx . . $ JE_mainKeyboardInput(49f6e7a06ebc5aa8).(void) |
| 3073 | { |
| 3074 | JE_gammaCheckcxx . . $ JE_gammaCheck(c9857a73d68e59ba).(); |
| 3075 | |
| 3076 | /* { Network Request Commands } */ |
| 3077 | |
| 3078 | if (!isNetworkGamecxx . . $ isNetworkGame.) |
| 3079 | { |
| 3080 | /* { Edited Ships } for Player 1 */ |
| 3081 | if (extraAvailcxx . . $ extraAvail. && keysactivecxx . . $ keysactive.[SDL_SCANCODE_TABcxx . . $ SDL_SCANCODE_TAB.] && !isNetworkGamecxx . . $ isNetworkGame. && !superTyriancxx . . $ superTyrian.) |
| 3082 | { |
| 3083 | for (xcxx . . $ x. = SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1.; xcxx . . $ x. <= SDL_SCANCODE_0cxx . . $ SDL_SCANCODE_0.; xcxx . . $ x.++) |
| 3084 | { |
| 3085 | if (keysactivecxx . . $ keysactive.[xcxx . . $ x.]) |
| 3086 | { |
| 3087 | int z = xcxx . . $ x. - SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1. + 1; |
| 3088 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship. = 90 + z; /*Ships*/ |
| 3089 | z = (z - 1) * 15; |
| 3090 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = extraShipscxx . . $ extraShips.[z + 1]; |
| 3091 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = extraShipscxx . . $ extraShips.[z + 2]; |
| 3092 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = extraShipscxx . . $ extraShips.[z + 3]; |
| 3093 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.] = extraShipscxx . . $ extraShips.[z + 4]; |
| 3094 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.] = extraShipscxx . . $ extraShips.[z + 5]; |
| 3095 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..generatorcxx . . $ $anonymous_type_55bed0e189d5bed_2#generator. = extraShipscxx . . $ extraShips.[z + 6]; |
| 3096 | /*Armor*/ |
| 3097 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shieldcxx . . $ $anonymous_type_55bed0e189d5bed_2#shield. = extraShipscxx . . $ extraShips.[z + 8]; |
| 3098 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(shotMultiPoscxx . . $ shotMultiPos., 0, sizeof(shotMultiPoscxx . . $ shotMultiPos.)); |
| 3099 | |
| 3100 | if (playercxx . . $ player.[0].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. > JE_portConfigscxx . . $ JE_portConfigs(32a7769d58713265).()) |
| 3101 | playercxx . . $ player.[0].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 3102 | |
| 3103 | tempWcxx . . $ tempW. = playercxx . . $ player.[0].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor.; |
| 3104 | JE_getShipInfocxx . . $ JE_getShipInfo(49f6e7a06ebc5aa8).(); |
| 3105 | if (playercxx . . $ player.[0].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. > tempWcxx . . $ tempW. && editShip1cxx . . $ editShip1.) |
| 3106 | playercxx . . $ player.[0].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = tempWcxx . . $ tempW.; |
| 3107 | else |
| 3108 | editShip1cxx . . $ editShip1. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3109 | |
| 3110 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 3111 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; |
| 3112 | JE_wipeShieldArmorBarscxx . . $ JE_wipeShieldArmorBars(49f6e7a06ebc5aa8).(); |
| 3113 | JE_drawArmorcxx . . $ JE_drawArmor(49f6e7a06ebc5aa8).(); |
| 3114 | JE_drawShieldcxx . . $ JE_drawShield(49f6e7a06ebc5aa8).(); |
| 3115 | VGAScreencxx . . $ VGAScreen. = temp_surface; |
| 3116 | JE_drawOptionscxx . . $ JE_drawOptions(49f6e7a06ebc5aa8).(); |
| 3117 | |
| 3118 | keysactivecxx . . $ keysactive.[xcxx . . $ x.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3119 | } |
| 3120 | } |
| 3121 | } |
| 3122 | |
| 3123 | /* for Player 2 */ |
| 3124 | if (extraAvailcxx . . $ extraAvail. && keysactivecxx . . $ keysactive.[SDL_SCANCODE_CAPSLOCKcxx . . $ SDL_SCANCODE_CAPSLOCK.] && !isNetworkGamecxx . . $ isNetworkGame. && !superTyriancxx . . $ superTyrian.) |
| 3125 | { |
| 3126 | for (xcxx . . $ x. = SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1.; xcxx . . $ x. <= SDL_SCANCODE_0cxx . . $ SDL_SCANCODE_0.; xcxx . . $ x.++) |
| 3127 | { |
| 3128 | if (keysactivecxx . . $ keysactive.[xcxx . . $ x.]) |
| 3129 | { |
| 3130 | int z = xcxx . . $ x. - SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1. + 1; |
| 3131 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship. = 90 + z; |
| 3132 | z = (z - 1) * 15; |
| 3133 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = extraShipscxx . . $ extraShips.[z + 1]; |
| 3134 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = extraShipscxx . . $ extraShips.[z + 2]; |
| 3135 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = extraShipscxx . . $ extraShips.[z + 3]; |
| 3136 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.] = extraShipscxx . . $ extraShips.[z + 4]; |
| 3137 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.] = extraShipscxx . . $ extraShips.[z + 5]; |
| 3138 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..generatorcxx . . $ $anonymous_type_55bed0e189d5bed_2#generator. = extraShipscxx . . $ extraShips.[z + 6]; |
| 3139 | /*Armor*/ |
| 3140 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shieldcxx . . $ $anonymous_type_55bed0e189d5bed_2#shield. = extraShipscxx . . $ extraShips.[z + 8]; |
| 3141 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(shotMultiPoscxx . . $ shotMultiPos., 0, sizeof(shotMultiPoscxx . . $ shotMultiPos.)); |
| 3142 | |
| 3143 | if (playercxx . . $ player.[1].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. > JE_portConfigscxx . . $ JE_portConfigs(32a7769d58713265).()) |
| 3144 | playercxx . . $ player.[1].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 3145 | |
| 3146 | tempWcxx . . $ tempW. = playercxx . . $ player.[1].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor.; |
| 3147 | JE_getShipInfocxx . . $ JE_getShipInfo(49f6e7a06ebc5aa8).(); |
| 3148 | if (playercxx . . $ player.[1].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. > tempWcxx . . $ tempW. && editShip2cxx . . $ editShip2.) |
| 3149 | playercxx . . $ player.[1].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = tempWcxx . . $ tempW.; |
| 3150 | else |
| 3151 | editShip2cxx . . $ editShip2. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3152 | |
| 3153 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 3154 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; |
| 3155 | JE_wipeShieldArmorBarscxx . . $ JE_wipeShieldArmorBars(49f6e7a06ebc5aa8).(); |
| 3156 | JE_drawArmorcxx . . $ JE_drawArmor(49f6e7a06ebc5aa8).(); |
| 3157 | JE_drawShieldcxx . . $ JE_drawShield(49f6e7a06ebc5aa8).(); |
| 3158 | VGAScreencxx . . $ VGAScreen. = temp_surface; |
| 3159 | JE_drawOptionscxx . . $ JE_drawOptions(49f6e7a06ebc5aa8).(); |
| 3160 | |
| 3161 | keysactivecxx . . $ keysactive.[xcxx . . $ x.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3162 | } |
| 3163 | } |
| 3164 | } |
| 3165 | } |
| 3166 | |
| 3167 | /* { In-Game Help } */ |
| 3168 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F1cxx . . $ SDL_SCANCODE_F1.]) |
| 3169 | { |
| 3170 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3171 | { |
| 3172 | helpRequestcxx . . $ helpRequest. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3173 | } |
| 3174 | else |
| 3175 | { |
| 3176 | JE_inGameHelpcxx . . $ JE_inGameHelp(49f6e7a06ebc5aa8).(); |
| 3177 | skipStarShowVGAcxx . . $ skipStarShowVGA. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3178 | } |
| 3179 | } |
| 3180 | |
| 3181 | /* {!Activate Nort Ship!} */ |
| 3182 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F2cxx . . $ SDL_SCANCODE_F2.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F4cxx . . $ SDL_SCANCODE_F4.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F6cxx . . $ SDL_SCANCODE_F6.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F7cxx . . $ SDL_SCANCODE_F7.] && |
| 3183 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_F9cxx . . $ SDL_SCANCODE_F9.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_BACKSLASHcxx . . $ SDL_SCANCODE_BACKSLASH.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_SLASHcxx . . $ SDL_SCANCODE_SLASH.]) |
| 3184 | { |
| 3185 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3186 | { |
| 3187 | nortShipRequestcxx . . $ nortShipRequest. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3188 | } |
| 3189 | else |
| 3190 | { |
| 3191 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..shipcxx . . $ $anonymous_type_55bed0e189d5bed_2#ship. = 12; // Nort Ship |
| 3192 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = 13; // Astral Zone |
| 3193 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 36; // NortShip Super Pulse |
| 3194 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 37; // NortShip Spreader |
| 3195 | shipGrcxx . . $ shipGr. = 1; |
| 3196 | } |
| 3197 | } |
| 3198 | |
| 3199 | /* {Cheating} */ |
| 3200 | if (!isNetworkGamecxx . . $ isNetworkGame. && !twoPlayerModecxx . . $ twoPlayerMode. && !superTyriancxx . . $ superTyrian. && superArcadeModecxx . . $ superArcadeMode. == SA_NONEcxx . . $ SA_NONE.) |
| 3201 | { |
| 3202 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F2cxx . . $ SDL_SCANCODE_F2.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F3cxx . . $ SDL_SCANCODE_F3.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F6cxx . . $ SDL_SCANCODE_F6.]) |
| 3203 | { |
| 3204 | youAreCheatingcxx . . $ youAreCheating. = !youAreCheatingcxx . . $ youAreCheating.; |
| 3205 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_F2cxx . . $ SDL_SCANCODE_F2.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3206 | } |
| 3207 | |
| 3208 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F2cxx . . $ SDL_SCANCODE_F2.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F3cxx . . $ SDL_SCANCODE_F3.] && (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F4cxx . . $ SDL_SCANCODE_F4.] || keysactivecxx . . $ keysactive.[SDL_SCANCODE_F5cxx . . $ SDL_SCANCODE_F5.])) |
| 3209 | { |
| 3210 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++i) |
| 3211 | playercxx . . $ player.[i].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = 0; |
| 3212 | |
| 3213 | youAreCheatingcxx . . $ youAreCheating. = !youAreCheatingcxx . . $ youAreCheating.; |
| 3214 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(miscTextcxx . . $ miscText.[63-1]); |
| 3215 | } |
| 3216 | |
| 3217 | if (constantPlaycxx . . $ constantPlay. && keysactivecxx . . $ keysactive.[SDL_SCANCODE_Ccxx . . $ SDL_SCANCODE_C.]) |
| 3218 | { |
| 3219 | youAreCheatingcxx . . $ youAreCheating. = !youAreCheatingcxx . . $ youAreCheating.; |
| 3220 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_Ccxx . . $ SDL_SCANCODE_C.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3221 | } |
| 3222 | } |
| 3223 | |
| 3224 | if (superTyriancxx . . $ superTyrian.) |
| 3225 | { |
| 3226 | youAreCheatingcxx . . $ youAreCheating. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3227 | } |
| 3228 | |
| 3229 | /* {Personal Commands} */ |
| 3230 | |
| 3231 | /* {DEBUG} */ |
| 3232 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F10cxx . . $ SDL_SCANCODE_F10.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_BACKSPACEcxx . . $ SDL_SCANCODE_BACKSPACE.]) |
| 3233 | { |
| 3234 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_F10cxx . . $ SDL_SCANCODE_F10.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3235 | debugcxx . . $ debug. = !debugcxx . . $ debug.; |
| 3236 | |
| 3237 | debugHistcxx . . $ debugHist. = 1; |
| 3238 | debugHistCountcxx . . $ debugHistCount. = 1; |
| 3239 | |
| 3240 | /* YKS: clock ticks since midnight replaced by SDL_GetTicks */ |
| 3241 | lastDebugTimecxx . . $ lastDebugTime. = SDL_GetTickscxx . . $ SDL_GetTicks(db52760e79bf9054).(); |
| 3242 | } |
| 3243 | |
| 3244 | /* {CHEAT-SKIP LEVEL} */ |
| 3245 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F2cxx . . $ SDL_SCANCODE_F2.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_F6cxx . . $ SDL_SCANCODE_F6.] && (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F7cxx . . $ SDL_SCANCODE_F7.] || keysactivecxx . . $ keysactive.[SDL_SCANCODE_F8cxx . . $ SDL_SCANCODE_F8.]) && !keysactivecxx . . $ keysactive.[SDL_SCANCODE_F9cxx . . $ SDL_SCANCODE_F9.] && |
| 3246 | !superTyriancxx . . $ superTyrian. && superArcadeModecxx . . $ superArcadeMode. == SA_NONEcxx . . $ SA_NONE.) |
| 3247 | { |
| 3248 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3249 | { |
| 3250 | skipLevelRequestcxx . . $ skipLevelRequest. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3251 | } |
| 3252 | else |
| 3253 | { |
| 3254 | levelTimercxx . . $ levelTimer. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3255 | levelTimerCountdowncxx . . $ levelTimerCountdown. = 0; |
| 3256 | endLevelcxx . . $ endLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3257 | levelEndcxx . . $ levelEnd. = 40; |
| 3258 | } |
| 3259 | } |
| 3260 | |
| 3261 | /* pause game */ |
| 3262 | pause_pressedcxx . . $ pause_pressed. = pause_pressedcxx . . $ pause_pressed. || keysactivecxx . . $ keysactive.[SDL_SCANCODE_Pcxx . . $ SDL_SCANCODE_P.]; |
| 3263 | |
| 3264 | /* in-game setup */ |
| 3265 | ingamemenu_pressedcxx . . $ ingamemenu_pressed. = ingamemenu_pressedcxx . . $ ingamemenu_pressed. || keysactivecxx . . $ keysactive.[SDL_SCANCODE_ESCAPEcxx . . $ SDL_SCANCODE_ESCAPE.]; |
| 3266 | |
| 3267 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_BACKSPACEcxx . . $ SDL_SCANCODE_BACKSPACE.]) |
| 3268 | { |
| 3269 | /* toggle screenshot pause */ |
| 3270 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_NUMLOCKCLEARcxx . . $ SDL_SCANCODE_NUMLOCKCLEAR.]) |
| 3271 | superPausecxx . . $ superPause. = !superPausecxx . . $ superPause.; |
| 3272 | |
| 3273 | /* {SMOOTHIES} */ |
| 3274 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_F12cxx . . $ SDL_SCANCODE_F12.] && keysactivecxx . . $ keysactive.[SDL_SCANCODE_SCROLLLOCKcxx . . $ SDL_SCANCODE_SCROLLLOCK.]) |
| 3275 | { |
| 3276 | for (tempcxx . . $ temp. = SDL_SCANCODE_2cxx . . $ SDL_SCANCODE_2.; tempcxx . . $ temp. <= SDL_SCANCODE_9cxx . . $ SDL_SCANCODE_9.; tempcxx . . $ temp.++) |
| 3277 | if (keysactivecxx . . $ keysactive.[tempcxx . . $ temp.]) |
| 3278 | smoothiescxx . . $ smoothies.[tempcxx . . $ temp.-SDL_SCANCODE_2cxx . . $ SDL_SCANCODE_2.] = !smoothiescxx . . $ smoothies.[tempcxx . . $ temp.-SDL_SCANCODE_2cxx . . $ SDL_SCANCODE_2.]; |
| 3279 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_0cxx . . $ SDL_SCANCODE_0.]) |
| 3280 | smoothiescxx . . $ smoothies.[8] = !smoothiescxx . . $ smoothies.[8]; |
| 3281 | } |
| 3282 | else |
| 3283 | |
| 3284 | /* {CYCLE THROUGH FILTER COLORS} */ |
| 3285 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_MINUScxx . . $ SDL_SCANCODE_MINUS.]) |
| 3286 | { |
| 3287 | if (levelFiltercxx . . $ levelFilter. == -99) |
| 3288 | { |
| 3289 | levelFiltercxx . . $ levelFilter. = 0; |
| 3290 | } |
| 3291 | else |
| 3292 | { |
| 3293 | levelFiltercxx . . $ levelFilter.++; |
| 3294 | if (levelFiltercxx . . $ levelFilter. == 16) |
| 3295 | levelFiltercxx . . $ levelFilter. = -99; |
| 3296 | } |
| 3297 | } |
| 3298 | else |
| 3299 | |
| 3300 | /* {HYPER-SPEED} */ |
| 3301 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1.]) |
| 3302 | { |
| 3303 | fastPlaycxx . . $ fastPlay.++; |
| 3304 | if (fastPlaycxx . . $ fastPlay. > 2) |
| 3305 | fastPlaycxx . . $ fastPlay. = 0; |
| 3306 | keysactivecxx . . $ keysactive.[SDL_SCANCODE_1cxx . . $ SDL_SCANCODE_1.] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3307 | JE_setNewGameSpeedcxx . . $ JE_setNewGameSpeed(49f6e7a06ebc5aa8).(); |
| 3308 | } |
| 3309 | |
| 3310 | /* {IN-GAME RANDOM MUSIC SELECTION} */ |
| 3311 | if (keysactivecxx . . $ keysactive.[SDL_SCANCODE_SCROLLLOCKcxx . . $ SDL_SCANCODE_SCROLLLOCK.]) |
| 3312 | play_songcxx . . $ play_song(cb2f890c2fdad230).(mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % MUSIC_NUMcxx . . $ `src/musmast.h:32:9`!); |
| 3313 | } |
| 3314 | } |
| 3315 | |
| 3316 | void JE_pauseGamecxx . . $ JE_pauseGame(49f6e7a06ebc5aa8).(void) |
| 3317 | { |
| 3318 | mouseSetRelativecxx . . $ mouseSetRelative(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 3319 | |
| 3320 | JE_booleancxx . . $ JE_boolean# done = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3321 | JE_wordcxx . . $ JE_word# mouseX, mouseY; |
| 3322 | |
| 3323 | SDL_Surfacecxx . . $ SDL_Surface# *temp_surface = VGAScreencxx . . $ VGAScreen.; |
| 3324 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 3325 | |
| 3326 | //tempScreenSeg = VGAScreenSeg; // sega000 |
| 3327 | if (!superPausecxx . . $ superPause.) |
| 3328 | { |
| 3329 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreenSegcxx . . $ VGAScreenSeg., 120, 90, miscTextcxx . . $ miscText.[22], FONT_SHAPEScxx . . $ `src/sprite.h:29:9`!); |
| 3330 | |
| 3331 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; |
| 3332 | JE_showVGAcxx . . $ JE_showVGA(49f6e7a06ebc5aa8).(); |
| 3333 | } |
| 3334 | |
| 3335 | set_volumecxx . . $ set_volume(8fbe6856f5410d23).(tyrMusicVolumecxx . . $ tyrMusicVolume. / 2, fxVolumecxx . . $ fxVolume.); |
| 3336 | |
| 3337 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3338 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3339 | { |
| 3340 | network_preparecxx . . $ network_prepare(ed53e3bbd3fa2f69).(PACKET_GAME_PAUSEcxx . . $ `src/network.h:40:9`!); |
| 3341 | network_sendcxx . . $ network_send(83c267b20bac841a).(4); // PACKET_GAME_PAUSE |
| 3342 | |
| 3343 | while (truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) |
| 3344 | { |
| 3345 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 3346 | |
| 3347 | if (packet_incxx . . $ packet_in.[0] && SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_in[0]->data[0]) == PACKET_GAME_PAUSEcxx . . $ `src/network.h:40:9`!) |
| 3348 | { |
| 3349 | network_updatecxx . . $ network_update(c9857a73d68e59ba).(); |
| 3350 | break; |
| 3351 | } |
| 3352 | |
| 3353 | network_updatecxx . . $ network_update(c9857a73d68e59ba).(); |
| 3354 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 3355 | |
| 3356 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 3357 | } |
| 3358 | } |
| 3359 | #endif |
| 3360 | |
| 3361 | wait_noinputcxx . . $ wait_noinput(9e113dd3a0d25c95).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); // TODO: should up the joystick repeat temporarily instead |
| 3362 | |
| 3363 | do |
| 3364 | { |
| 3365 | setDelaycxx . . $ setDelay(d4f767463ce0a6b3).(2); |
| 3366 | |
| 3367 | push_joysticks_as_keyboardcxx . . $ push_joysticks_as_keyboard(49f6e7a06ebc5aa8).(); |
| 3368 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 3369 | |
| 3370 | if ((newkeycxx . . $ newkey. && lastkey_scancxx . . $ lastkey_scan. != SDL_SCANCODE_LCTRLcxx . . $ SDL_SCANCODE_LCTRL. && lastkey_scancxx . . $ lastkey_scan. != SDL_SCANCODE_RCTRLcxx . . $ SDL_SCANCODE_RCTRL. && lastkey_scancxx . . $ lastkey_scan. != SDL_SCANCODE_LALTcxx . . $ SDL_SCANCODE_LALT. && lastkey_scancxx . . $ lastkey_scan. != SDL_SCANCODE_RALTcxx . . $ SDL_SCANCODE_RALT.) || |
| 3371 | JE_mousePositioncxx . . $ JE_mousePosition(2aa6fbd8d75b91c).(&mouseX, &mouseY) > 0) |
| 3372 | { |
| 3373 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3374 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3375 | { |
| 3376 | network_preparecxx . . $ network_prepare(ed53e3bbd3fa2f69).(PACKET_WAITINGcxx . . $ `src/network.h:36:9`!); |
| 3377 | network_sendcxx . . $ network_send(83c267b20bac841a).(4); // PACKET_WAITING |
| 3378 | } |
| 3379 | #endif |
| 3380 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3381 | } |
| 3382 | |
| 3383 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3384 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3385 | { |
| 3386 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 3387 | |
| 3388 | if (packet_incxx . . $ packet_in.[0] && SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_in[0]->data[0]) == PACKET_WAITINGcxx . . $ `src/network.h:36:9`!) |
| 3389 | { |
| 3390 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 3391 | |
| 3392 | done = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3393 | } |
| 3394 | } |
| 3395 | #endif |
| 3396 | |
| 3397 | wait_delaycxx . . $ wait_delay(49f6e7a06ebc5aa8).(); |
| 3398 | } while (!done); |
| 3399 | |
| 3400 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3401 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3402 | { |
| 3403 | while (!network_is_synccxx . . $ network_is_sync(c9857a73d68e59ba).()) |
| 3404 | { |
| 3405 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 3406 | |
| 3407 | network_checkcxx . . $ network_check(b126dc7c1de90089).(); |
| 3408 | SDL_Delaycxx . . $ SDL_Delay(cb2f890c2fdad230).(16); |
| 3409 | } |
| 3410 | } |
| 3411 | #endif |
| 3412 | |
| 3413 | set_volumecxx . . $ set_volume(8fbe6856f5410d23).(tyrMusicVolumecxx . . $ tyrMusicVolume., fxVolumecxx . . $ fxVolume.); |
| 3414 | |
| 3415 | //skipStarShowVGA = true; |
| 3416 | |
| 3417 | VGAScreencxx . . $ VGAScreen. = temp_surface; /* side-effect of game_screen */ |
| 3418 | |
| 3419 | mouseSetRelativecxx . . $ mouseSetRelative(b45ddcbc8423892c).(truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 3420 | } |
| 3421 | |
| 3422 | void JE_playerMovementcxx . . $ JE_playerMovement(6c3bf3e0110e8e02).(Playercxx . . $ Player# *this_player, |
| 3423 | JE_bytecxx . . $ JE_byte# inputDevice, |
| 3424 | JE_bytecxx . . $ JE_byte# playerNum_, |
| 3425 | JE_wordcxx . . $ JE_word# shipGr_, |
| 3426 | Sprite2_arraycxx . . $ Sprite2_array# *shipGrPtr_, |
| 3427 | JE_wordcxx . . $ JE_word# *mouseX_, JE_wordcxx . . $ JE_word# *mouseY_) |
| 3428 | { |
| 3429 | JE_integercxx . . $ JE_integer# mouseXC, mouseYC; |
| 3430 | JE_integercxx . . $ JE_integer# accelXC, accelYC; |
| 3431 | |
| 3432 | if (playerNum_ == 2 || !twoPlayerModecxx . . $ twoPlayerMode.) |
| 3433 | { |
| 3434 | tempWcxx . . $ tempW. = weaponPortcxx . . $ weaponPort.[this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.].opnumcxx . . $ $anonymous_type_66fcae0887b82ce8_1#opnum.; |
| 3435 | |
| 3436 | if (this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. > tempWcxx . . $ tempW.) |
| 3437 | this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 3438 | } |
| 3439 | |
| 3440 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3441 | if (isNetworkGamecxx . . $ isNetworkGame. && thisPlayerNumcxx . . $ thisPlayerNum. == playerNum_) |
| 3442 | { |
| 3443 | network_state_preparecxx . . $ network_state_prepare(49f6e7a06ebc5aa8).(); |
| 3444 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&packet_state_outcxx . . $ packet_state_out.[0]->datacxx . . $ $anonymous_type_a4798dfb0a5ccc04_1#data.[4], 0, 10); |
| 3445 | } |
| 3446 | #endif |
| 3447 | |
| 3448 | redo: |
| 3449 | |
| 3450 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 3451 | { |
| 3452 | inputDevice = 0; |
| 3453 | } |
| 3454 | |
| 3455 | mouseXC = 0; |
| 3456 | mouseYC = 0; |
| 3457 | accelXC = 0; |
| 3458 | accelYC = 0; |
| 3459 | |
| 3460 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! link_gun_analog = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3461 | float link_gun_angle = 0; |
| 3462 | |
| 3463 | /* Draw Player */ |
| 3464 | if (!this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive.) |
| 3465 | { |
| 3466 | if (this_player->exploding_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#exploding_ticks. > 0) |
| 3467 | { |
| 3468 | --this_player->exploding_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#exploding_ticks.; |
| 3469 | |
| 3470 | if (levelEndFxWaitcxx . . $ levelEndFxWait. > 0) |
| 3471 | { |
| 3472 | levelEndFxWaitcxx . . $ levelEndFxWait.--; |
| 3473 | } |
| 3474 | else |
| 3475 | { |
| 3476 | levelEndFxWaitcxx . . $ levelEndFxWait. = (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 6) + 3; |
| 3477 | if ((mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 3) == 1) |
| 3478 | soundQueuecxx . . $ soundQueue.[6] = S_EXPLOSION_9cxx . . $ S_EXPLOSION_9.; |
| 3479 | else |
| 3480 | soundQueuecxx . . $ soundQueue.[5] = S_EXPLOSION_11cxx . . $ S_EXPLOSION_11.; |
| 3481 | } |
| 3482 | |
| 3483 | int explosion_x = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 32) - 16; |
| 3484 | int explosion_y = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 32) - 16; |
| 3485 | JE_setupExplosionLargecxx . . $ JE_setupExplosionLarge(c08e0f34ac44585d).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 0, explosion_x, explosion_y + 7); |
| 3486 | JE_setupExplosionLargecxx . . $ JE_setupExplosionLarge(c08e0f34ac44585d).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, 0, this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 7); |
| 3487 | |
| 3488 | if (levelEndcxx . . $ levelEnd. > 0) |
| 3489 | levelEndcxx . . $ levelEnd.--; |
| 3490 | } |
| 3491 | else |
| 3492 | { |
| 3493 | if (twoPlayerModecxx . . $ twoPlayerMode. || onePlayerActioncxx . . $ onePlayerAction.) // if arcade mode |
| 3494 | { |
| 3495 | if (*this_player->livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives. > 1) // respawn if any extra lives |
| 3496 | { |
| 3497 | --(*this_player->livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives.); |
| 3498 | |
| 3499 | reallyEndLevelcxx . . $ reallyEndLevel. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3500 | shotMultiPoscxx . . $ shotMultiPos.[playerNum_-1] = 0; |
| 3501 | calc_purple_balls_neededcxx . . $ calc_purple_balls_needed(cda9d737d2f74dfa).(this_player); |
| 3502 | twoPlayerLinkedcxx . . $ twoPlayerLinked. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3503 | if (galagaModecxx . . $ galagaMode.) |
| 3504 | twoPlayerModecxx . . $ twoPlayerMode. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3505 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = 160; |
| 3506 | this_player->invulnerable_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#invulnerable_ticks. = 100; |
| 3507 | this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3508 | endLevelcxx . . $ endLevel. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3509 | |
| 3510 | if (galagaModecxx . . $ galagaMode. || episodeNumcxx . . $ episodeNum. == 4) |
| 3511 | this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = this_player->initial_armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#initial_armor.; |
| 3512 | else |
| 3513 | this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = this_player->initial_armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#initial_armor. / 2; |
| 3514 | |
| 3515 | if (galagaModecxx . . $ galagaMode.) |
| 3516 | this_player->shieldcxx . . $ $anonymous_type_55bed0e189d5bed_4#shield. = 0; |
| 3517 | else |
| 3518 | this_player->shieldcxx . . $ $anonymous_type_55bed0e189d5bed_4#shield. = this_player->shield_maxcxx . . $ $anonymous_type_55bed0e189d5bed_4#shield_max. / 2; |
| 3519 | |
| 3520 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 3521 | JE_drawArmorcxx . . $ JE_drawArmor(49f6e7a06ebc5aa8).(); |
| 3522 | JE_drawShieldcxx . . $ JE_drawShield(49f6e7a06ebc5aa8).(); |
| 3523 | VGAScreencxx . . $ VGAScreen. = game_screencxx . . $ game_screen.; /* side-effect of game_screen */ |
| 3524 | goto redo; |
| 3525 | } |
| 3526 | else |
| 3527 | { |
| 3528 | if (galagaModecxx . . $ galagaMode.) |
| 3529 | twoPlayerModecxx . . $ twoPlayerMode. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3530 | if (allPlayersGonecxx . . $ allPlayersGone. && isNetworkGamecxx . . $ isNetworkGame.) |
| 3531 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3532 | } |
| 3533 | |
| 3534 | } |
| 3535 | } |
| 3536 | } |
| 3537 | else if (constantDiecxx . . $ constantDie.) |
| 3538 | { |
| 3539 | // finished exploding? start dying again |
| 3540 | if (this_player->exploding_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#exploding_ticks. == 0) |
| 3541 | { |
| 3542 | this_player->shieldcxx . . $ $anonymous_type_55bed0e189d5bed_4#shield. = 0; |
| 3543 | |
| 3544 | if (this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. > 0) |
| 3545 | { |
| 3546 | --this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor.; |
| 3547 | } |
| 3548 | else |
| 3549 | { |
| 3550 | this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3551 | this_player->exploding_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#exploding_ticks. = 60; |
| 3552 | levelEndcxx . . $ levelEnd. = 40; |
| 3553 | } |
| 3554 | |
| 3555 | JE_wipeShieldArmorBarscxx . . $ JE_wipeShieldArmorBars(49f6e7a06ebc5aa8).(); |
| 3556 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 3557 | JE_drawArmorcxx . . $ JE_drawArmor(49f6e7a06ebc5aa8).(); |
| 3558 | VGAScreencxx . . $ VGAScreen. = game_screencxx . . $ game_screen.; /* side-effect of game_screen */ |
| 3559 | |
| 3560 | // as if instant death weren't enough, player also gets infinite lives in order to enjoy an infinite number of deaths -_- |
| 3561 | if (*playercxx . . $ player.[0].livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives. < 11) |
| 3562 | ++(*playercxx . . $ player.[0].livescxx . . $ $anonymous_type_55bed0e189d5bed_4#lives.); |
| 3563 | } |
| 3564 | } |
| 3565 | |
| 3566 | if (!this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive.) |
| 3567 | { |
| 3568 | explosionFollowAmountXcxx . . $ explosionFollowAmountX. = explosionFollowAmountYcxx . . $ explosionFollowAmountY. = 0; |
| 3569 | return; |
| 3570 | } |
| 3571 | |
| 3572 | if (!endLevelcxx . . $ endLevel.) |
| 3573 | { |
| 3574 | *mouseX_ = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 3575 | *mouseY_ = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 3576 | buttoncxx . . $ button.[1-1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3577 | buttoncxx . . $ button.[2-1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3578 | buttoncxx . . $ button.[3-1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3579 | buttoncxx . . $ button.[4-1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3580 | |
| 3581 | /* --- Movement Routine Beginning --- */ |
| 3582 | |
| 3583 | if (!isNetworkGamecxx . . $ isNetworkGame. || playerNum_ == thisPlayerNumcxx . . $ thisPlayerNum.) |
| 3584 | { |
| 3585 | if (endLevelcxx . . $ endLevel.) |
| 3586 | { |
| 3587 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. -= 2; |
| 3588 | } |
| 3589 | else |
| 3590 | { |
| 3591 | if (record_democxx . . $ record_demo. || play_democxx . . $ play_demo.) |
| 3592 | inputDevice = 1; // keyboard is required device for demo recording |
| 3593 | |
| 3594 | // demo playback input |
| 3595 | if (play_democxx . . $ play_demo.) |
| 3596 | { |
| 3597 | if (!replay_demo_keyscxx . . $ replay_demo_keys(c9857a73d68e59ba).()) |
| 3598 | { |
| 3599 | endLevelcxx . . $ endLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3600 | levelEndcxx . . $ levelEnd. = 40; |
| 3601 | } |
| 3602 | } |
| 3603 | |
| 3604 | /* joystick input */ |
| 3605 | if ((inputDevice == 0 || inputDevice >= 3) && joystickscxx . . $ joysticks. > 0) |
| 3606 | { |
| 3607 | int j = inputDevice == 0 ? 0 : inputDevice - 3; |
| 3608 | int j_max = inputDevice == 0 ? joystickscxx . . $ joysticks. : inputDevice - 3 + 1; |
| 3609 | for (; j < j_max; j++) |
| 3610 | { |
| 3611 | poll_joystickcxx . . $ poll_joystick(d4f767463ce0a6b3).(j); |
| 3612 | |
| 3613 | if (joystickcxx . . $ joystick.[j].analogcxx . . $ $anonymous_type_abd17893024d7112_2#analog.) |
| 3614 | { |
| 3615 | mouseXC += joystick_axis_reducecxx . . $ joystick_axis_reduce(9b79fb6aee4c0440).(j, joystickcxx . . $ joystick.[j].xcxx . . $ $anonymous_type_abd17893024d7112_2#x.); |
| 3616 | mouseYC += joystick_axis_reducecxx . . $ joystick_axis_reduce(9b79fb6aee4c0440).(j, joystickcxx . . $ joystick.[j].ycxx . . $ $anonymous_type_abd17893024d7112_2#y.); |
| 3617 | |
| 3618 | link_gun_analog = joystick_analog_anglecxx . . $ joystick_analog_angle(e7043f53b8864a02).(j, &link_gun_angle); |
| 3619 | } |
| 3620 | else |
| 3621 | { |
| 3622 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += (joystickcxx . . $ joystick.[j].directioncxx . . $ $anonymous_type_abd17893024d7112_2#direction.[3] ? -CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`! : 0) + (joystickcxx . . $ joystick.[j].directioncxx . . $ $anonymous_type_abd17893024d7112_2#direction.[1] ? CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`! : 0); |
| 3623 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += (joystickcxx . . $ joystick.[j].directioncxx . . $ $anonymous_type_abd17893024d7112_2#direction.[0] ? -CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`! : 0) + (joystickcxx . . $ joystick.[j].directioncxx . . $ $anonymous_type_abd17893024d7112_2#direction.[2] ? CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`! : 0); |
| 3624 | } |
| 3625 | |
| 3626 | buttoncxx . . $ button.[0] |= joystickcxx . . $ joystick.[j].actioncxx . . $ $anonymous_type_abd17893024d7112_2#action.[0]; |
| 3627 | buttoncxx . . $ button.[1] |= joystickcxx . . $ joystick.[j].actioncxx . . $ $anonymous_type_abd17893024d7112_2#action.[2]; |
| 3628 | buttoncxx . . $ button.[2] |= joystickcxx . . $ joystick.[j].actioncxx . . $ $anonymous_type_abd17893024d7112_2#action.[3]; |
| 3629 | buttoncxx . . $ button.[3] |= joystickcxx . . $ joystick.[j].action_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#action_pressed.[1]; |
| 3630 | |
| 3631 | ingamemenu_pressedcxx . . $ ingamemenu_pressed. |= joystickcxx . . $ joystick.[j].action_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#action_pressed.[4]; |
| 3632 | pause_pressedcxx . . $ pause_pressed. |= joystickcxx . . $ joystick.[j].action_pressedcxx . . $ $anonymous_type_abd17893024d7112_2#action_pressed.[5]; |
| 3633 | } |
| 3634 | } |
| 3635 | |
| 3636 | service_SDL_eventscxx . . $ service_SDL_events(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 3637 | |
| 3638 | /* mouse input */ |
| 3639 | if ((inputDevice == 0 || inputDevice == 2) && has_mousecxx . . $ has_mouse.) |
| 3640 | { |
| 3641 | buttoncxx . . $ button.[0] |= mouse_pressedcxx . . $ mouse_pressed.[0]; |
| 3642 | buttoncxx . . $ button.[1] |= mouse_pressedcxx . . $ mouse_pressed.[1]; |
| 3643 | buttoncxx . . $ button.[2] |= mouse_has_three_buttonscxx . . $ mouse_has_three_buttons. ? mouse_pressedcxx . . $ mouse_pressed.[2] : mouse_pressedcxx . . $ mouse_pressed.[1]; |
| 3644 | |
| 3645 | Sint32cxx . . $ Sint32# mouseXR; |
| 3646 | Sint32cxx . . $ Sint32# mouseYR; |
| 3647 | mouseGetRelativePositioncxx . . $ mouseGetRelativePosition(ce8f7825f8908cfa).(&mouseXR, &mouseYR); |
| 3648 | mouseXC += mouseXR; |
| 3649 | mouseYC += mouseYR; |
| 3650 | } |
| 3651 | |
| 3652 | /* keyboard input */ |
| 3653 | if ((inputDevice == 0 || inputDevice == 1) && !play_democxx . . $ play_demo.) |
| 3654 | { |
| 3655 | if (keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_UPcxx . . $ KEY_SETTING_UP.]]) |
| 3656 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. -= CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 3657 | if (keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_DOWNcxx . . $ KEY_SETTING_DOWN.]]) |
| 3658 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 3659 | |
| 3660 | if (keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_LEFTcxx . . $ KEY_SETTING_LEFT.]]) |
| 3661 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. -= CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 3662 | if (keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_RIGHTcxx . . $ KEY_SETTING_RIGHT.]]) |
| 3663 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += CURRENT_KEY_SPEEDcxx . . $ `src/varz.h:47:9`!; |
| 3664 | |
| 3665 | buttoncxx . . $ button.[0] = buttoncxx . . $ button.[0] || keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_FIREcxx . . $ KEY_SETTING_FIRE.]]; |
| 3666 | buttoncxx . . $ button.[3] = buttoncxx . . $ button.[3] || keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_CHANGE_FIREcxx . . $ KEY_SETTING_CHANGE_FIRE.]]; |
| 3667 | buttoncxx . . $ button.[1] = buttoncxx . . $ button.[1] || keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_LEFT_SIDEKICKcxx . . $ KEY_SETTING_LEFT_SIDEKICK.]]; |
| 3668 | buttoncxx . . $ button.[2] = buttoncxx . . $ button.[2] || keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[KEY_SETTING_RIGHT_SIDEKICKcxx . . $ KEY_SETTING_RIGHT_SIDEKICK.]]; |
| 3669 | |
| 3670 | if (constantPlaycxx . . $ constantPlay.) |
| 3671 | { |
| 3672 | for (unsigned int i = 0; i < 4; i++) |
| 3673 | buttoncxx . . $ button.[i] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3674 | |
| 3675 | ++this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 3676 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += constantLastXcxx . . $ constantLastX.; |
| 3677 | } |
| 3678 | |
| 3679 | // TODO: check if demo recording still works |
| 3680 | if (record_democxx . . $ record_demo.) |
| 3681 | { |
| 3682 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! new_input = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3683 | |
| 3684 | for (unsigned int i = 0; i < 8; i++) |
| 3685 | { |
| 3686 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! temp = demo_keyscxx . . $ demo_keys. & (1 << i); |
| 3687 | if (temp != keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[i]]) |
| 3688 | new_input = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3689 | } |
| 3690 | |
| 3691 | demo_keys_waitcxx . . $ demo_keys_wait.++; |
| 3692 | |
| 3693 | if (new_input) |
| 3694 | { |
| 3695 | Uint8cxx . . $ Uint8# temp2[2] = { demo_keys_waitcxx . . $ demo_keys_wait. >> 8, demo_keys_waitcxx . . $ demo_keys_wait. }; |
| 3696 | fwrite_u8cxx . . $ fwrite_u8(a2b46a5ad1e95f29).(temp2, 2, demo_filecxx . . $ demo_file.); |
| 3697 | |
| 3698 | demo_keyscxx . . $ demo_keys. = 0; |
| 3699 | for (unsigned int i = 0; i < 8; i++) |
| 3700 | demo_keyscxx . . $ demo_keys. |= keysactivecxx . . $ keysactive.[keySettingscxx . . $ keySettings.[i]] ? (1 << i) : 0; |
| 3701 | |
| 3702 | fwrite_u8cxx . . $ fwrite_u8(a2b46a5ad1e95f29).(&demo_keyscxx . . $ demo_keys., 1, demo_filecxx . . $ demo_file.); |
| 3703 | |
| 3704 | demo_keys_waitcxx . . $ demo_keys_wait. = 0; |
| 3705 | } |
| 3706 | } |
| 3707 | } |
| 3708 | |
| 3709 | if (smoothiescxx . . $ smoothies.[9-1]) |
| 3710 | { |
| 3711 | *mouseY_ = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - (*mouseY_ - this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.); |
| 3712 | mouseYC = -mouseYC; |
| 3713 | } |
| 3714 | |
| 3715 | accelXC += this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - *mouseX_; |
| 3716 | accelYC += this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - *mouseY_; |
| 3717 | |
| 3718 | if (mouseXC > 30) |
| 3719 | mouseXC = 30; |
| 3720 | else if (mouseXC < -30) |
| 3721 | mouseXC = -30; |
| 3722 | if (mouseYC > 30) |
| 3723 | mouseYC = 30; |
| 3724 | else if (mouseYC < -30) |
| 3725 | mouseYC = -30; |
| 3726 | |
| 3727 | if (mouseXC > 0) |
| 3728 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += (mouseXC + 3) / 4; |
| 3729 | else if (mouseXC < 0) |
| 3730 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += (mouseXC - 3) / 4; |
| 3731 | if (mouseYC > 0) |
| 3732 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += (mouseYC + 3) / 4; |
| 3733 | else if (mouseYC < 0) |
| 3734 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += (mouseYC - 3) / 4; |
| 3735 | |
| 3736 | if (mouseXC > 3) |
| 3737 | accelXC++; |
| 3738 | else if (mouseXC < -2) |
| 3739 | accelXC--; |
| 3740 | if (mouseYC > 2) |
| 3741 | accelYC++; |
| 3742 | else if (mouseYC < -2) |
| 3743 | accelYC--; |
| 3744 | |
| 3745 | } /*endLevel*/ |
| 3746 | |
| 3747 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3748 | if (isNetworkGamecxx . . $ isNetworkGame. && playerNum_ == thisPlayerNumcxx . . $ thisPlayerNum.) |
| 3749 | { |
| 3750 | Uint16cxx . . $ Uint16# buttons = 0; |
| 3751 | for (int i = 4 - 1; i >= 0; i--) |
| 3752 | { |
| 3753 | buttons <<= 1; |
| 3754 | buttons |= buttoncxx . . $ button.[i]; |
| 3755 | } |
| 3756 | |
| 3757 | SDLNet_Write16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1015:9`!(this_player->x - *mouseX_, &packet_state_out[0]->data[4]); |
| 3758 | SDLNet_Write16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1015:9`!(this_player->y - *mouseY_, &packet_state_out[0]->data[6]); |
| 3759 | SDLNet_Write16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1015:9`!(accelXC, &packet_state_out[0]->data[8]); |
| 3760 | SDLNet_Write16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1015:9`!(accelYC, &packet_state_out[0]->data[10]); |
| 3761 | SDLNet_Write16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1015:9`!(buttons, &packet_state_out[0]->data[12]); |
| 3762 | |
| 3763 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. = *mouseX_; |
| 3764 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = *mouseY_; |
| 3765 | |
| 3766 | buttoncxx . . $ button.[0] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3767 | buttoncxx . . $ button.[1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3768 | buttoncxx . . $ button.[2] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3769 | buttoncxx . . $ button.[3] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3770 | |
| 3771 | accelXC = 0; |
| 3772 | accelYC = 0; |
| 3773 | } |
| 3774 | #endif |
| 3775 | } /*isNetworkGame*/ |
| 3776 | |
| 3777 | /* --- Movement Routine Ending --- */ |
| 3778 | |
| 3779 | moveOkcxx . . $ moveOk. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3780 | |
| 3781 | #ifdef WITH_NETWORKcxx . . $ `<built-in>:413:9`! |
| 3782 | if (isNetworkGamecxx . . $ isNetworkGame. && !network_state_is_resetcxx . . $ network_state_is_reset(c9857a73d68e59ba).()) |
| 3783 | { |
| 3784 | if (playerNum_ != thisPlayerNumcxx . . $ thisPlayerNum.) |
| 3785 | { |
| 3786 | if (thisPlayerNumcxx . . $ thisPlayerNum. == 2) |
| 3787 | difficultyLevelcxx . . $ difficultyLevel. = SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[16]); |
| 3788 | |
| 3789 | Uint16cxx . . $ Uint16# buttons = SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[12]); |
| 3790 | for (int i = 0; i < 4; i++) |
| 3791 | { |
| 3792 | buttoncxx . . $ button.[i] = buttons & 1; |
| 3793 | buttons >>= 1; |
| 3794 | } |
| 3795 | |
| 3796 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[4]); |
| 3797 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[6]); |
| 3798 | accelXC = (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[8]); |
| 3799 | accelYC = (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_in[0]->data[10]); |
| 3800 | } |
| 3801 | else |
| 3802 | { |
| 3803 | Uint16cxx . . $ Uint16# buttons = SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_out[network_delay]->data[12]); |
| 3804 | for (int i = 0; i < 4; i++) |
| 3805 | { |
| 3806 | buttoncxx . . $ button.[i] = buttons & 1; |
| 3807 | buttons >>= 1; |
| 3808 | } |
| 3809 | |
| 3810 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_out[network_delay]->data[4]); |
| 3811 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_out[network_delay]->data[6]); |
| 3812 | accelXC = (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_out[network_delay]->data[8]); |
| 3813 | accelYC = (Sint16cxx . . $ Sint16#)SDLNet_Read16cxx . . $ `<external>/5426831044093305371/SDL_net.h:1019:9`!(&packet_state_out[network_delay]->data[10]); |
| 3814 | } |
| 3815 | } |
| 3816 | #endif |
| 3817 | |
| 3818 | /*Street-Fighter codes*/ |
| 3819 | JE_SFCodescxx . . $ JE_SFCodes(d4f5c5fa9024050c).(playerNum_, this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y., *mouseX_, *mouseY_); |
| 3820 | |
| 3821 | if (moveOkcxx . . $ moveOk.) |
| 3822 | { |
| 3823 | /* END OF MOVEMENT ROUTINES */ |
| 3824 | |
| 3825 | /*Linking Routines*/ |
| 3826 | |
| 3827 | if (twoPlayerModecxx . . $ twoPlayerMode. && !twoPlayerLinkedcxx . . $ twoPlayerLinked. && this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. == *mouseX_ && this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. == *mouseY_ && |
| 3828 | abscxx . . $ abs(7864480464b09eea).(playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - playercxx . . $ player.[1].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) < 8 && abscxx . . $ abs(7864480464b09eea).(playercxx . . $ player.[0].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - playercxx . . $ player.[1].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.) < 8 && |
| 3829 | playercxx . . $ player.[0].is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. && playercxx . . $ player.[1].is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. && !galagaModecxx . . $ galagaMode.) |
| 3830 | { |
| 3831 | twoPlayerLinkedcxx . . $ twoPlayerLinked. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3832 | } |
| 3833 | |
| 3834 | if (playerNum_ == 1 && (buttoncxx . . $ button.[3-1] || buttoncxx . . $ button.[2-1]) && !galagaModecxx . . $ galagaMode.) |
| 3835 | twoPlayerLinkedcxx . . $ twoPlayerLinked. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3836 | |
| 3837 | if (twoPlayerModecxx . . $ twoPlayerMode. && twoPlayerLinkedcxx . . $ twoPlayerLinked. && playerNum_ == 2 && |
| 3838 | (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. != *mouseX_ || this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. != *mouseY_)) |
| 3839 | { |
| 3840 | if (buttoncxx . . $ button.[0]) |
| 3841 | { |
| 3842 | if (link_gun_analog) |
| 3843 | { |
| 3844 | linkGunDireccxx . . $ linkGunDirec. = link_gun_angle; |
| 3845 | } |
| 3846 | else |
| 3847 | { |
| 3848 | JE_realcxx . . $ JE_real# tempR; |
| 3849 | |
| 3850 | if (abscxx . . $ abs(7864480464b09eea).(this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - *mouseX_) > abscxx . . $ abs(7864480464b09eea).(this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - *mouseY_)) |
| 3851 | tempR = (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - *mouseX_ > 0) ? M_PI_2cxx . . $ `<external>/11263917310783833665/math.h:1122:10`! : (M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! + M_PI_2cxx . . $ `<external>/11263917310783833665/math.h:1122:10`!); |
| 3852 | else |
| 3853 | tempR = (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - *mouseY_ > 0) ? 0 : M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!; |
| 3854 | |
| 3855 | if (fabsf(linkGunDireccxx . . $ linkGunDirec. - tempR) < 0.3f) |
| 3856 | linkGunDireccxx . . $ linkGunDirec. = tempR; |
| 3857 | else if (linkGunDireccxx . . $ linkGunDirec. < tempR && linkGunDireccxx . . $ linkGunDirec. - tempR > -3.24f) |
| 3858 | linkGunDireccxx . . $ linkGunDirec. += 0.2f; |
| 3859 | else if (linkGunDireccxx . . $ linkGunDirec. - tempR < M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!) |
| 3860 | linkGunDireccxx . . $ linkGunDirec. -= 0.2f; |
| 3861 | else |
| 3862 | linkGunDireccxx . . $ linkGunDirec. += 0.2f; |
| 3863 | } |
| 3864 | |
| 3865 | if (linkGunDireccxx . . $ linkGunDirec. >= (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!)) |
| 3866 | linkGunDireccxx . . $ linkGunDirec. -= (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!); |
| 3867 | else if (linkGunDireccxx . . $ linkGunDirec. < 0) |
| 3868 | linkGunDireccxx . . $ linkGunDirec. += (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!); |
| 3869 | } |
| 3870 | else if (!galagaModecxx . . $ galagaMode.) |
| 3871 | { |
| 3872 | twoPlayerLinkedcxx . . $ twoPlayerLinked. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3873 | } |
| 3874 | } |
| 3875 | } |
| 3876 | } |
| 3877 | |
| 3878 | if (levelEndcxx . . $ levelEnd. > 0 && all_players_deadcxx . . $ all_players_dead(c9857a73d68e59ba).()) |
| 3879 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3880 | |
| 3881 | /* End Level Fade-Out */ |
| 3882 | if (this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. && endLevelcxx . . $ endLevel.) |
| 3883 | { |
| 3884 | if (levelEndcxx . . $ levelEnd. == 0) |
| 3885 | { |
| 3886 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3887 | } |
| 3888 | else |
| 3889 | { |
| 3890 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. -= levelEndWarpcxx . . $ levelEndWarp.; |
| 3891 | if (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. < -200) |
| 3892 | reallyEndLevelcxx . . $ reallyEndLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3893 | |
| 3894 | int trail_spacing = 1; |
| 3895 | int trail_y = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 3896 | int num_trails = abscxx . . $ abs(7864480464b09eea).(41 - levelEndcxx . . $ levelEnd.); |
| 3897 | if (num_trails > 20) |
| 3898 | num_trails = 20; |
| 3899 | |
| 3900 | for (int i = 0; i < num_trails; i++) |
| 3901 | { |
| 3902 | trail_y += trail_spacing; |
| 3903 | trail_spacing++; |
| 3904 | } |
| 3905 | |
| 3906 | for (int i = 1; i < num_trails; i++) |
| 3907 | { |
| 3908 | trail_y -= trail_spacing; |
| 3909 | trail_spacing--; |
| 3910 | |
| 3911 | if (trail_y > 0 && trail_y < 170) |
| 3912 | { |
| 3913 | if (shipGr_ == 0) |
| 3914 | { |
| 3915 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, trail_y - 7, *shipGrPtr_, 13); |
| 3916 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 , trail_y - 7, *shipGrPtr_, 51); |
| 3917 | } |
| 3918 | else if (shipGr_ == 1) |
| 3919 | { |
| 3920 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, trail_y - 7, *shipGrPtr_, 220); |
| 3921 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 , trail_y - 7, *shipGrPtr_, 222); |
| 3922 | } |
| 3923 | else |
| 3924 | { |
| 3925 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 5, trail_y - 7, *shipGrPtr_, shipGr_); |
| 3926 | } |
| 3927 | } |
| 3928 | } |
| 3929 | } |
| 3930 | } |
| 3931 | |
| 3932 | if (play_democxx . . $ play_demo.) |
| 3933 | JE_dStringcxx . . $ JE_dString(19e4cd32eb7ad4fc).(VGAScreencxx . . $ VGAScreen., 115, 10, miscTextcxx . . $ miscText.[7], SMALL_FONT_SHAPEScxx . . $ `src/sprite.h:30:9`!); // insert coin |
| 3934 | |
| 3935 | if (this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. && !endLevelcxx . . $ endLevel.) |
| 3936 | { |
| 3937 | if (!twoPlayerLinkedcxx . . $ twoPlayerLinked. || playerNum_ < 2) |
| 3938 | { |
| 3939 | if (!twoPlayerModecxx . . $ twoPlayerMode. || shipGr2cxx . . $ shipGr2. != 0) // if not dragonwing |
| 3940 | { |
| 3941 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 0) |
| 3942 | { |
| 3943 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = *mouseX_ - 14; |
| 3944 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = *mouseY_; |
| 3945 | } |
| 3946 | |
| 3947 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 0) |
| 3948 | { |
| 3949 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = *mouseX_ + 16; |
| 3950 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = *mouseY_; |
| 3951 | } |
| 3952 | } |
| 3953 | |
| 3954 | if (this_player->x_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#x_friction_ticks. > 0) |
| 3955 | { |
| 3956 | --this_player->x_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#x_friction_ticks.; |
| 3957 | } |
| 3958 | else |
| 3959 | { |
| 3960 | this_player->x_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#x_friction_ticks. = 1; |
| 3961 | |
| 3962 | if (this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. < 0) |
| 3963 | ++this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity.; |
| 3964 | else if (this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. > 0) |
| 3965 | --this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity.; |
| 3966 | } |
| 3967 | |
| 3968 | if (this_player->y_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#y_friction_ticks. > 0) |
| 3969 | { |
| 3970 | --this_player->y_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#y_friction_ticks.; |
| 3971 | } |
| 3972 | else |
| 3973 | { |
| 3974 | this_player->y_friction_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#y_friction_ticks. = 2; |
| 3975 | |
| 3976 | if (this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. < 0) |
| 3977 | ++this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity.; |
| 3978 | else if (this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. > 0) |
| 3979 | --this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity.; |
| 3980 | } |
| 3981 | |
| 3982 | this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. += accelXC; |
| 3983 | this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. += accelYC; |
| 3984 | |
| 3985 | this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. = MINcxx . . $ `src/opentyr.h:28:9`!(MAXcxx . . $ `src/opentyr.h:29:9`!(-4, this_player->x_velocity), 4); |
| 3986 | this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. = MINcxx . . $ `src/opentyr.h:28:9`!(MAXcxx . . $ `src/opentyr.h:29:9`!(-4, this_player->y_velocity), 4); |
| 3987 | |
| 3988 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. += this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity.; |
| 3989 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. += this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity.; |
| 3990 | |
| 3991 | // if player moved, add new ship x, y history entry |
| 3992 | if (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - *mouseX_ != 0 || this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - *mouseY_ != 0) |
| 3993 | { |
| 3994 | for (uintcxx . . $ uint# i = 1; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->old_x); ++i) |
| 3995 | { |
| 3996 | this_player->old_xcxx . . $ $anonymous_type_55bed0e189d5bed_4#old_x.[i - 1] = this_player->old_xcxx . . $ $anonymous_type_55bed0e189d5bed_4#old_x.[i]; |
| 3997 | this_player->old_ycxx . . $ $anonymous_type_55bed0e189d5bed_4#old_y.[i - 1] = this_player->old_ycxx . . $ $anonymous_type_55bed0e189d5bed_4#old_y.[i]; |
| 3998 | } |
| 3999 | this_player->old_xcxx . . $ $anonymous_type_55bed0e189d5bed_4#old_x.[COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->old_x) - 1] = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4000 | this_player->old_ycxx . . $ $anonymous_type_55bed0e189d5bed_4#old_y.[COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->old_x) - 1] = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 4001 | } |
| 4002 | } |
| 4003 | else /*twoPlayerLinked*/ |
| 4004 | { |
| 4005 | if (shipGr_ == 0) |
| 4006 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. = playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 1; |
| 4007 | else |
| 4008 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. = playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4009 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = playercxx . . $ player.[0].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 8; |
| 4010 | |
| 4011 | this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. = playercxx . . $ player.[0].x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity.; |
| 4012 | this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. = 4; |
| 4013 | |
| 4014 | // turret direction marker/shield |
| 4015 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_MISCcxx . . $ SHOT_MISC.] = 0; |
| 4016 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_MISCcxx . . $ SHOT_MISC., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 1 + roundf(sinf(linkGunDireccxx . . $ linkGunDirec. + 0.2f) * 26), this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + roundf(cosf(linkGunDireccxx . . $ linkGunDirec. + 0.2f) * 26), *mouseX_, *mouseY_, 148, playerNum_); |
| 4017 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_MISCcxx . . $ SHOT_MISC.] = 0; |
| 4018 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_MISCcxx . . $ SHOT_MISC., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 1 + roundf(sinf(linkGunDireccxx . . $ linkGunDirec. - 0.2f) * 26), this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + roundf(cosf(linkGunDireccxx . . $ linkGunDirec. - 0.2f) * 26), *mouseX_, *mouseY_, 148, playerNum_); |
| 4019 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_MISCcxx . . $ SHOT_MISC.] = 0; |
| 4020 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_MISCcxx . . $ SHOT_MISC., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 1 + roundf(sinf(linkGunDireccxx . . $ linkGunDirec.) * 26), this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + roundf(cosf(linkGunDireccxx . . $ linkGunDirec.) * 26), *mouseX_, *mouseY_, 147, playerNum_); |
| 4021 | |
| 4022 | if (shotRepeatcxx . . $ shotRepeat.[SHOT_REARcxx . . $ SHOT_REAR.] > 0) |
| 4023 | { |
| 4024 | --shotRepeatcxx . . $ shotRepeat.[SHOT_REARcxx . . $ SHOT_REAR.]; |
| 4025 | } |
| 4026 | else if (buttoncxx . . $ button.[1-1]) |
| 4027 | { |
| 4028 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_REARcxx . . $ SHOT_REAR.] = 0; |
| 4029 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_REARcxx . . $ SHOT_REAR., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 1 + roundf(sinf(linkGunDireccxx . . $ linkGunDirec.) * 20), this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + roundf(cosf(linkGunDireccxx . . $ linkGunDirec.) * 20), *mouseX_, *mouseY_, linkGunWeaponscxx . . $ linkGunWeapons.[this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.-1], playerNum_); |
| 4030 | player_shot_set_directioncxx . . $ player_shot_set_direction(29fe2bd0c19b8f3e).(bcxx . . $ b., this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id., linkGunDireccxx . . $ linkGunDirec.); |
| 4031 | } |
| 4032 | } |
| 4033 | } |
| 4034 | |
| 4035 | if (!endLevelcxx . . $ endLevel.) |
| 4036 | { |
| 4037 | if (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. > 256) |
| 4038 | { |
| 4039 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. = 256; |
| 4040 | constantLastXcxx . . $ constantLastX. = -constantLastXcxx . . $ constantLastX.; |
| 4041 | } |
| 4042 | if (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. < 40) |
| 4043 | { |
| 4044 | this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. = 40; |
| 4045 | constantLastXcxx . . $ constantLastX. = -constantLastXcxx . . $ constantLastX.; |
| 4046 | } |
| 4047 | |
| 4048 | if (isNetworkGamecxx . . $ isNetworkGame. && playerNum_ == 1) |
| 4049 | { |
| 4050 | if (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. > 154) |
| 4051 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = 154; |
| 4052 | } |
| 4053 | else |
| 4054 | { |
| 4055 | if (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. > 160) |
| 4056 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = 160; |
| 4057 | } |
| 4058 | |
| 4059 | if (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. < 10) |
| 4060 | this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. = 10; |
| 4061 | |
| 4062 | // Determines the ship banking sprite to display, depending on horizontal velocity and acceleration |
| 4063 | int ship_banking = this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. / 2 + (this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - *mouseX_) / 6; |
| 4064 | ship_banking = MAXcxx . . $ `src/opentyr.h:29:9`!(-2, MINcxx . . $ `src/opentyr.h:28:9`!(ship_banking, 2)); |
| 4065 | |
| 4066 | int ship_sprite = ship_banking * 2 + shipGr_; |
| 4067 | |
| 4068 | explosionFollowAmountXcxx . . $ explosionFollowAmountX. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - this_player->last_x_explosion_followcxx . . $ $anonymous_type_55bed0e189d5bed_4#last_x_explosion_follow.; |
| 4069 | explosionFollowAmountYcxx . . $ explosionFollowAmountY. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - this_player->last_y_explosion_followcxx . . $ $anonymous_type_55bed0e189d5bed_4#last_y_explosion_follow.; |
| 4070 | |
| 4071 | if (explosionFollowAmountYcxx . . $ explosionFollowAmountY. < 0) |
| 4072 | explosionFollowAmountYcxx . . $ explosionFollowAmountY. = 0; |
| 4073 | |
| 4074 | this_player->last_x_explosion_followcxx . . $ $anonymous_type_55bed0e189d5bed_4#last_x_explosion_follow. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4075 | this_player->last_y_explosion_followcxx . . $ $anonymous_type_55bed0e189d5bed_4#last_y_explosion_follow. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 4076 | |
| 4077 | if (shipGr_ == 0) |
| 4078 | { |
| 4079 | if (background2cxx . . $ background2.) |
| 4080 | { |
| 4081 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite + 13); |
| 4082 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite + 51); |
| 4083 | if (superWildcxx . . $ superWild.) |
| 4084 | { |
| 4085 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 16 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite + 13); |
| 4086 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 6 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite + 51); |
| 4087 | } |
| 4088 | } |
| 4089 | } |
| 4090 | else if (shipGr_ == 1) |
| 4091 | { |
| 4092 | if (background2cxx . . $ background2.) |
| 4093 | { |
| 4094 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, 220); |
| 4095 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, 222); |
| 4096 | } |
| 4097 | } |
| 4098 | else |
| 4099 | { |
| 4100 | if (background2cxx . . $ background2.) |
| 4101 | { |
| 4102 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 5 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite); |
| 4103 | if (superWildcxx . . $ superWild.) |
| 4104 | { |
| 4105 | blit_sprite2x2_darkencxx . . $ blit_sprite2x2_darken(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 4 - mapX2Ofscxx . . $ mapX2Ofs. + 30, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7 + shadowYDistcxx . . $ shadowYDist., *shipGrPtr_, ship_sprite); |
| 4106 | } |
| 4107 | } |
| 4108 | } |
| 4109 | |
| 4110 | if (this_player->invulnerable_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#invulnerable_ticks. > 0) |
| 4111 | { |
| 4112 | --this_player->invulnerable_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#invulnerable_ticks.; |
| 4113 | |
| 4114 | if (shipGr_ == 0) |
| 4115 | { |
| 4116 | blit_sprite2x2_blendcxx . . $ blit_sprite2x2_blend(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite + 13); |
| 4117 | blit_sprite2x2_blendcxx . . $ blit_sprite2x2_blend(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 , this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite + 51); |
| 4118 | } |
| 4119 | else if (shipGr_ == 1) |
| 4120 | { |
| 4121 | blit_sprite2x2_blendcxx . . $ blit_sprite2x2_blend(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, 220); |
| 4122 | blit_sprite2x2_blendcxx . . $ blit_sprite2x2_blend(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7 , this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, 222); |
| 4123 | } |
| 4124 | else |
| 4125 | blit_sprite2x2_blendcxx . . $ blit_sprite2x2_blend(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 5, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite); |
| 4126 | } |
| 4127 | else |
| 4128 | { |
| 4129 | if (shipGr_ == 0) |
| 4130 | { |
| 4131 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite + 13); |
| 4132 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite + 51); |
| 4133 | } |
| 4134 | else if (shipGr_ == 1) |
| 4135 | { |
| 4136 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, 220); |
| 4137 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 7, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, 222); |
| 4138 | |
| 4139 | int ship_banking = 0; |
| 4140 | switch (ship_sprite) |
| 4141 | { |
| 4142 | case 5: |
| 4143 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 7, *shipGrPtr_, 40); |
| 4144 | tempWcxx . . $ tempW. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 7; |
| 4145 | ship_banking = -2; |
| 4146 | break; |
| 4147 | case 3: |
| 4148 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 17, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 7, *shipGrPtr_, 39); |
| 4149 | tempWcxx . . $ tempW. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 7; |
| 4150 | ship_banking = -1; |
| 4151 | break; |
| 4152 | case 1: |
| 4153 | ship_banking = 0; |
| 4154 | break; |
| 4155 | case -1: |
| 4156 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 19, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 7, *shipGrPtr_, 58); |
| 4157 | tempWcxx . . $ tempW. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 9; |
| 4158 | ship_banking = 1; |
| 4159 | break; |
| 4160 | case -3: |
| 4161 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 19, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + 7, *shipGrPtr_, 59); |
| 4162 | tempWcxx . . $ tempW. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 9; |
| 4163 | ship_banking = 2; |
| 4164 | break; |
| 4165 | } |
| 4166 | if (ship_banking != 0) // NortSparks |
| 4167 | { |
| 4168 | if (shotRepeatcxx . . $ shotRepeat.[SHOT_NORTSPARKScxx . . $ SHOT_NORTSPARKS.] > 0) |
| 4169 | { |
| 4170 | --shotRepeatcxx . . $ shotRepeat.[SHOT_NORTSPARKScxx . . $ SHOT_NORTSPARKS.]; |
| 4171 | } |
| 4172 | else |
| 4173 | { |
| 4174 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_NORTSPARKScxx . . $ SHOT_NORTSPARKS., tempWcxx . . $ tempW. + (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 8) - 4, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + (mt_randcxx . . $ mt_rand(f708dce9a8856c70).() % 8) - 4, *mouseX_, *mouseY_, 671, 1); |
| 4175 | shotRepeatcxx . . $ shotRepeat.[SHOT_NORTSPARKScxx . . $ SHOT_NORTSPARKS.] = abscxx . . $ abs(7864480464b09eea).(ship_banking) - 1; |
| 4176 | } |
| 4177 | } |
| 4178 | } |
| 4179 | else |
| 4180 | { |
| 4181 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 5, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 7, *shipGrPtr_, ship_sprite); |
| 4182 | } |
| 4183 | } |
| 4184 | |
| 4185 | /*Options Location*/ |
| 4186 | if (playerNum_ == 2 && shipGr_ == 0) // if dragonwing |
| 4187 | { |
| 4188 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 0) |
| 4189 | { |
| 4190 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - 14 + ship_banking * 2; |
| 4191 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 4192 | } |
| 4193 | |
| 4194 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 0) |
| 4195 | { |
| 4196 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + 17 + ship_banking * 2; |
| 4197 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y.; |
| 4198 | } |
| 4199 | } |
| 4200 | } // !endLevel |
| 4201 | |
| 4202 | if (moveOkcxx . . $ moveOk.) |
| 4203 | { |
| 4204 | if (this_player->is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive.) |
| 4205 | { |
| 4206 | if (!endLevelcxx . . $ endLevel.) |
| 4207 | { |
| 4208 | this_player->delta_x_shot_movecxx . . $ $anonymous_type_55bed0e189d5bed_4#delta_x_shot_move. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - this_player->last_x_shot_movecxx . . $ $anonymous_type_55bed0e189d5bed_4#last_x_shot_move.; |
| 4209 | this_player->delta_y_shot_movecxx . . $ $anonymous_type_55bed0e189d5bed_4#delta_y_shot_move. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - this_player->last_y_shot_movecxx . . $ $anonymous_type_55bed0e189d5bed_4#last_y_shot_move.; |
| 4210 | |
| 4211 | /* PLAYER SHOT Change */ |
| 4212 | if (buttoncxx . . $ button.[4-1]) |
| 4213 | { |
| 4214 | portConfigChangecxx . . $ portConfigChange. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4215 | if (portConfigDonecxx . . $ portConfigDone.) |
| 4216 | { |
| 4217 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_REARcxx . . $ SHOT_REAR.] = 0; |
| 4218 | |
| 4219 | if (superArcadeModecxx . . $ superArcadeMode. != SA_NONEcxx . . $ SA_NONE. && superArcadeModecxx . . $ superArcadeMode. <= SA_NORTSHIPZcxx . . $ SA_NORTSHIPZ.) |
| 4220 | { |
| 4221 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIALcxx . . $ SHOT_SPECIAL.] = 0; |
| 4222 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2.] = 0; |
| 4223 | if (playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. == SASpecialWeaponcxx . . $ SASpecialWeapon.[superArcadeModecxx . . $ superArcadeMode.-1]) |
| 4224 | { |
| 4225 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = SASpecialWeaponBcxx . . $ SASpecialWeaponB.[superArcadeModecxx . . $ superArcadeMode.-1]; |
| 4226 | this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 2; |
| 4227 | } |
| 4228 | else |
| 4229 | { |
| 4230 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = SASpecialWeaponcxx . . $ SASpecialWeapon.[superArcadeModecxx . . $ superArcadeMode.-1]; |
| 4231 | this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 4232 | } |
| 4233 | } |
| 4234 | else if (++this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. > JE_portConfigscxx . . $ JE_portConfigs(32a7769d58713265).()) |
| 4235 | this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 4236 | |
| 4237 | JE_drawPortConfigButtonscxx . . $ JE_drawPortConfigButtons(49f6e7a06ebc5aa8).(); |
| 4238 | portConfigDonecxx . . $ portConfigDone. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 4239 | } |
| 4240 | } |
| 4241 | |
| 4242 | /* PLAYER SHOT Creation */ |
| 4243 | |
| 4244 | /*SpecialShot*/ |
| 4245 | if (!galagaModecxx . . $ galagaMode.) |
| 4246 | JE_doSpecialShotcxx . . $ JE_doSpecialShot(69ec12f035786005).(playerNum_, &this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor., &this_player->shieldcxx . . $ $anonymous_type_55bed0e189d5bed_4#shield.); |
| 4247 | |
| 4248 | /*Normal Main Weapons*/ |
| 4249 | if (!(twoPlayerLinkedcxx . . $ twoPlayerLinked. && playerNum_ == 2)) |
| 4250 | { |
| 4251 | int min, max; |
| 4252 | |
| 4253 | if (!twoPlayerModecxx . . $ twoPlayerMode.) |
| 4254 | min = 1, max = 2; |
| 4255 | else |
| 4256 | min = max = playerNum_; |
| 4257 | |
| 4258 | for (tempcxx . . $ temp. = min - 1; tempcxx . . $ temp. < max; tempcxx . . $ temp.++) |
| 4259 | { |
| 4260 | const uintcxx . . $ uint# item = this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[tempcxx . . $ temp.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.; |
| 4261 | |
| 4262 | if (item > 0) |
| 4263 | { |
| 4264 | if (shotRepeatcxx . . $ shotRepeat.[tempcxx . . $ temp.] > 0) |
| 4265 | { |
| 4266 | --shotRepeatcxx . . $ shotRepeat.[tempcxx . . $ temp.]; |
| 4267 | } |
| 4268 | else if (buttoncxx . . $ button.[1-1]) |
| 4269 | { |
| 4270 | const uintcxx . . $ uint# item_power = galagaModecxx . . $ galagaMode. ? 0 : this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[tempcxx . . $ temp.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. - 1, |
| 4271 | item_mode = (tempcxx . . $ temp. == REAR_WEAPONcxx . . $ REAR_WEAPON.) ? this_player->weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. - 1 : 0; |
| 4272 | |
| 4273 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(item, tempcxx . . $ temp., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y., *mouseX_, *mouseY_, weaponPortcxx . . $ weaponPort.[item].opcxx . . $ $anonymous_type_66fcae0887b82ce8_1#op.[item_mode][item_power], playerNum_); |
| 4274 | } |
| 4275 | } |
| 4276 | } |
| 4277 | } |
| 4278 | |
| 4279 | /*Super Charge Weapons*/ |
| 4280 | if (playerNum_ == 2) |
| 4281 | { |
| 4282 | |
| 4283 | if (!twoPlayerLinkedcxx . . $ twoPlayerLinked.) |
| 4284 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + (shipGr_ == 0) + 1, this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 13, spriteSheet10cxx . . $ spriteSheet10., 77 + chargeLevelcxx . . $ chargeLevel. + chargeGrcxx . . $ chargeGr. * 19); |
| 4285 | |
| 4286 | if (chargeGrWaitcxx . . $ chargeGrWait. > 0) |
| 4287 | { |
| 4288 | chargeGrWaitcxx . . $ chargeGrWait.--; |
| 4289 | } |
| 4290 | else |
| 4291 | { |
| 4292 | chargeGrcxx . . $ chargeGr.++; |
| 4293 | if (chargeGrcxx . . $ chargeGr. == 4) |
| 4294 | chargeGrcxx . . $ chargeGr. = 0; |
| 4295 | chargeGrWaitcxx . . $ chargeGrWait. = 3; |
| 4296 | } |
| 4297 | |
| 4298 | if (chargeLevelcxx . . $ chargeLevel. > 0) |
| 4299 | { |
| 4300 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreenSegcxx . . $ VGAScreenSeg., 269, 107 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 275, 108 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 193); |
| 4301 | } |
| 4302 | |
| 4303 | if (chargeWaitcxx . . $ chargeWait. > 0) |
| 4304 | { |
| 4305 | chargeWaitcxx . . $ chargeWait.--; |
| 4306 | } |
| 4307 | else |
| 4308 | { |
| 4309 | if (chargeLevelcxx . . $ chargeLevel. < chargeMaxcxx . . $ chargeMax.) |
| 4310 | chargeLevelcxx . . $ chargeLevel.++; |
| 4311 | |
| 4312 | chargeWaitcxx . . $ chargeWait. = 28 - this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. * 2; |
| 4313 | if (difficultyLevelcxx . . $ difficultyLevel. > DIFFICULTY_HARDcxx . . $ DIFFICULTY_HARD.) |
| 4314 | chargeWaitcxx . . $ chargeWait. -= 5; |
| 4315 | } |
| 4316 | |
| 4317 | if (chargeLevelcxx . . $ chargeLevel. > 0) |
| 4318 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreenSegcxx . . $ VGAScreenSeg., 269, 107 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 275, 108 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 204); |
| 4319 | |
| 4320 | if (shotRepeatcxx . . $ shotRepeat.[SHOT_P2_CHARGEcxx . . $ SHOT_P2_CHARGE.] > 0) |
| 4321 | { |
| 4322 | --shotRepeatcxx . . $ shotRepeat.[SHOT_P2_CHARGEcxx . . $ SHOT_P2_CHARGE.]; |
| 4323 | } |
| 4324 | else if (buttoncxx . . $ button.[1-1] && (!twoPlayerLinkedcxx . . $ twoPlayerLinked. || chargeLevelcxx . . $ chargeLevel. > 0)) |
| 4325 | { |
| 4326 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_P2_CHARGEcxx . . $ SHOT_P2_CHARGE.] = 0; |
| 4327 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(16, SHOT_P2_CHARGEcxx . . $ SHOT_P2_CHARGE., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y., *mouseX_, *mouseY_, chargeGunWeaponscxx . . $ chargeGunWeapons.[playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.-1] + chargeLevelcxx . . $ chargeLevel., playerNum_); |
| 4328 | |
| 4329 | if (chargeLevelcxx . . $ chargeLevel. > 0) |
| 4330 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreenSegcxx . . $ VGAScreenSeg., 269, 107 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 275, 108 + (chargeLevelcxx . . $ chargeLevel. - 1) * 3, 193); |
| 4331 | |
| 4332 | chargeLevelcxx . . $ chargeLevel. = 0; |
| 4333 | chargeWaitcxx . . $ chargeWait. = 30 - this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. * 2; |
| 4334 | } |
| 4335 | } |
| 4336 | |
| 4337 | /*SUPER BOMB*/ |
| 4338 | tempcxx . . $ temp. = playerNum_; |
| 4339 | if (tempcxx . . $ temp. == 0) |
| 4340 | tempcxx . . $ temp. = 1; /*Get whether player 1 or 2*/ |
| 4341 | |
| 4342 | if (playercxx . . $ player.[tempcxx . . $ temp.-1].superbombscxx . . $ $anonymous_type_55bed0e189d5bed_4#superbombs. > 0) |
| 4343 | { |
| 4344 | if (shotRepeatcxx . . $ shotRepeat.[SHOT_P1_SUPERBOMBcxx . . $ SHOT_P1_SUPERBOMB. + tempcxx . . $ temp.-1] > 0) |
| 4345 | { |
| 4346 | --shotRepeatcxx . . $ shotRepeat.[SHOT_P1_SUPERBOMBcxx . . $ SHOT_P1_SUPERBOMB. + tempcxx . . $ temp.-1]; |
| 4347 | } |
| 4348 | else if (buttoncxx . . $ button.[3-1] || buttoncxx . . $ button.[2-1]) |
| 4349 | { |
| 4350 | --playercxx . . $ player.[tempcxx . . $ temp.-1].superbombscxx . . $ $anonymous_type_55bed0e189d5bed_4#superbombs.; |
| 4351 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_P1_SUPERBOMBcxx . . $ SHOT_P1_SUPERBOMB. + tempcxx . . $ temp.-1] = 0; |
| 4352 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(16, SHOT_P1_SUPERBOMBcxx . . $ SHOT_P1_SUPERBOMB. + tempcxx . . $ temp.-1, this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y., *mouseX_, *mouseY_, 535, playerNum_); |
| 4353 | } |
| 4354 | } |
| 4355 | |
| 4356 | // sidekicks |
| 4357 | |
| 4358 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 4 && this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 4) |
| 4359 | optionSatelliteRotatecxx . . $ optionSatelliteRotate. += 0.2f; |
| 4360 | else if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 4 || this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 4) |
| 4361 | optionSatelliteRotatecxx . . $ optionSatelliteRotate. += 0.15f; |
| 4362 | |
| 4363 | switch (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style.) |
| 4364 | { |
| 4365 | case 1: // trailing |
| 4366 | case 3: |
| 4367 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->old_xcxx . . $ $anonymous_type_55bed0e189d5bed_4#old_x.[COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->old_x) / 2 - 1]; |
| 4368 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->old_ycxx . . $ $anonymous_type_55bed0e189d5bed_4#old_y.[COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->old_x) / 2 - 1]; |
| 4369 | break; |
| 4370 | case 2: // front-mounted |
| 4371 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4372 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = MAXcxx . . $ `src/opentyr.h:29:9`!(10, this_player->y - 20); |
| 4373 | break; |
| 4374 | case 4: // orbiting |
| 4375 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + roundf(sinf(optionSatelliteRotatecxx . . $ optionSatelliteRotate.) * 20); |
| 4376 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[LEFT_SIDEKICKcxx . . $ LEFT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. + roundf(cosf(optionSatelliteRotatecxx . . $ optionSatelliteRotate.) * 20); |
| 4377 | break; |
| 4378 | } |
| 4379 | |
| 4380 | switch (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style.) |
| 4381 | { |
| 4382 | case 4: // orbiting |
| 4383 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - roundf(sinf(optionSatelliteRotatecxx . . $ optionSatelliteRotate.) * 20); |
| 4384 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - roundf(cosf(optionSatelliteRotatecxx . . $ optionSatelliteRotate.) * 20); |
| 4385 | break; |
| 4386 | case 1: // trailing |
| 4387 | case 3: |
| 4388 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->old_xcxx . . $ $anonymous_type_55bed0e189d5bed_4#old_x.[0]; |
| 4389 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->old_ycxx . . $ $anonymous_type_55bed0e189d5bed_4#old_y.[0]; |
| 4390 | break; |
| 4391 | case 2: // front-mounted |
| 4392 | if (!optionAttachmentLinkedcxx . . $ optionAttachmentLinked.) |
| 4393 | { |
| 4394 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. += optionAttachmentMovecxx . . $ optionAttachmentMove. / 2; |
| 4395 | if (optionAttachmentMovecxx . . $ optionAttachmentMove. >= -2) |
| 4396 | { |
| 4397 | if (optionAttachmentReturncxx . . $ optionAttachmentReturn.) |
| 4398 | tempcxx . . $ temp. = 2; |
| 4399 | else |
| 4400 | tempcxx . . $ temp. = 0; |
| 4401 | |
| 4402 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. > (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 20) + 5) |
| 4403 | { |
| 4404 | tempcxx . . $ temp. = 2; |
| 4405 | optionAttachmentMovecxx . . $ optionAttachmentMove. -= 1 + optionAttachmentReturncxx . . $ optionAttachmentReturn.; |
| 4406 | } |
| 4407 | else if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. > (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 20) - 0) |
| 4408 | { |
| 4409 | tempcxx . . $ temp. = 3; |
| 4410 | if (optionAttachmentMovecxx . . $ optionAttachmentMove. > 0) |
| 4411 | optionAttachmentMovecxx . . $ optionAttachmentMove.--; |
| 4412 | else |
| 4413 | optionAttachmentMovecxx . . $ optionAttachmentMove.++; |
| 4414 | } |
| 4415 | else if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. > (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 20) - 5) |
| 4416 | { |
| 4417 | tempcxx . . $ temp. = 2; |
| 4418 | optionAttachmentMovecxx . . $ optionAttachmentMove.++; |
| 4419 | } |
| 4420 | else if (optionAttachmentMovecxx . . $ optionAttachmentMove. < 2 + optionAttachmentReturncxx . . $ optionAttachmentReturn. * 4) |
| 4421 | { |
| 4422 | optionAttachmentMovecxx . . $ optionAttachmentMove. += 1 + optionAttachmentReturncxx . . $ optionAttachmentReturn.; |
| 4423 | } |
| 4424 | |
| 4425 | if (optionAttachmentReturncxx . . $ optionAttachmentReturn.) |
| 4426 | tempcxx . . $ temp. = tempcxx . . $ temp. * 2; |
| 4427 | if (abscxx . . $ abs(7864480464b09eea).(this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. - this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) < tempcxx . . $ temp.) |
| 4428 | tempcxx . . $ temp. = 1; |
| 4429 | |
| 4430 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. > this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) |
| 4431 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. -= tempcxx . . $ temp.; |
| 4432 | else if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. < this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) |
| 4433 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. += tempcxx . . $ temp.; |
| 4434 | |
| 4435 | if (abscxx . . $ abs(7864480464b09eea).(this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. - (this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 20)) + abscxx . . $ abs(7864480464b09eea).(this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. - this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) < 8) |
| 4436 | { |
| 4437 | optionAttachmentLinkedcxx . . $ optionAttachmentLinked. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4438 | soundQueuecxx . . $ soundQueue.[2] = S_CLINKcxx . . $ S_CLINK.; |
| 4439 | } |
| 4440 | |
| 4441 | if (buttoncxx . . $ button.[3-1]) |
| 4442 | optionAttachmentReturncxx . . $ optionAttachmentReturn. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4443 | } |
| 4444 | else // sidekick needs to catch up to player |
| 4445 | { |
| 4446 | optionAttachmentMovecxx . . $ optionAttachmentMove. += 1 + optionAttachmentReturncxx . . $ optionAttachmentReturn.; |
| 4447 | JE_setupExplosioncxx . . $ JE_setupExplosion(9c65cb39d99632c2).(this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. + 1, this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. + 10, 0, 0, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 4448 | } |
| 4449 | } |
| 4450 | else |
| 4451 | { |
| 4452 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x. = this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4453 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - 20; |
| 4454 | if (buttoncxx . . $ button.[3-1]) |
| 4455 | { |
| 4456 | optionAttachmentLinkedcxx . . $ optionAttachmentLinked. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 4457 | optionAttachmentReturncxx . . $ optionAttachmentReturn. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 4458 | optionAttachmentMovecxx . . $ optionAttachmentMove. = -20; |
| 4459 | soundQueuecxx . . $ soundQueue.[3] = S_WEAPON_26cxx . . $ S_WEAPON_26.; |
| 4460 | } |
| 4461 | } |
| 4462 | |
| 4463 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. < 10) |
| 4464 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[RIGHT_SIDEKICKcxx . . $ RIGHT_SIDEKICK.].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y. = 10; |
| 4465 | break; |
| 4466 | } |
| 4467 | |
| 4468 | if (playerNum_ == 2 || !twoPlayerModecxx . . $ twoPlayerMode.) // if player has sidekicks |
| 4469 | { |
| 4470 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player->items.sidekick); ++i) |
| 4471 | { |
| 4472 | uintcxx . . $ uint# shot_i = (i == 0) ? SHOT_LEFT_SIDEKICKcxx . . $ SHOT_LEFT_SIDEKICK. : SHOT_RIGHT_SIDEKICKcxx . . $ SHOT_RIGHT_SIDEKICK.; |
| 4473 | |
| 4474 | JE_OptionTypecxx . . $ JE_OptionType# *this_option = &optionscxx . . $ options.[this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i]]; |
| 4475 | |
| 4476 | // fire/refill sidekick |
| 4477 | if (this_option->wportcxx . . $ $anonymous_type_66fcae0887b82ce8_4#wport. > 0) |
| 4478 | { |
| 4479 | if (shotRepeatcxx . . $ shotRepeat.[shot_i] > 0) |
| 4480 | { |
| 4481 | --shotRepeatcxx . . $ shotRepeat.[shot_i]; |
| 4482 | } |
| 4483 | else |
| 4484 | { |
| 4485 | const int ammo_max = this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammo_maxcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo_max.; |
| 4486 | |
| 4487 | if (ammo_max > 0) // sidekick has limited ammo |
| 4488 | { |
| 4489 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammo_refill_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo_refill_ticks. > 0) |
| 4490 | { |
| 4491 | --this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammo_refill_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo_refill_ticks.; |
| 4492 | } |
| 4493 | else // refill one ammo |
| 4494 | { |
| 4495 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammo_refill_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo_refill_ticks. = this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammo_refill_ticks_maxcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo_refill_ticks_max.; |
| 4496 | |
| 4497 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo. < ammo_max) |
| 4498 | ++this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo.; |
| 4499 | |
| 4500 | // draw sidekick refill ammo gauge |
| 4501 | const int y = hud_sidekick_ycxx . . $ hud_sidekick_y.[twoPlayerModecxx . . $ twoPlayerMode. ? 1 : 0][i] + 13; |
| 4502 | draw_segmented_gaugecxx . . $ draw_segmented_gauge(915c4eaa04ad7c00).(VGAScreenSegcxx . . $ VGAScreenSeg., 284, y, 112, 2, 2, MAXcxx . . $ `src/opentyr.h:29:9`!(1, ammo_max / 10), this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo.); |
| 4503 | } |
| 4504 | |
| 4505 | if (buttoncxx . . $ button.[1 + i] && this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo. > 0) |
| 4506 | { |
| 4507 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(this_option->wportcxx . . $ $anonymous_type_66fcae0887b82ce8_4#wport., shot_i, this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x., this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y., *mouseX_, *mouseY_, this_option->wpnumcxx . . $ $anonymous_type_66fcae0887b82ce8_4#wpnum. + this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge., playerNum_); |
| 4508 | |
| 4509 | --this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo.; |
| 4510 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge. > 0) |
| 4511 | { |
| 4512 | shotMultiPoscxx . . $ shotMultiPos.[shot_i] = 0; |
| 4513 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge. = 0; |
| 4514 | } |
| 4515 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].charge_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge_ticks. = 20; |
| 4516 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_enabledcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_enabled. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4517 | |
| 4518 | // draw sidekick discharge ammo gauge |
| 4519 | const int y = hud_sidekick_ycxx . . $ hud_sidekick_y.[twoPlayerModecxx . . $ twoPlayerMode. ? 1 : 0][i] + 13; |
| 4520 | fill_rectangle_xycxx . . $ fill_rectangle_xy(da1d960d0d6e485d).(VGAScreenSegcxx . . $ VGAScreenSeg., 284, y, 312, y + 2, 0); |
| 4521 | draw_segmented_gaugecxx . . $ draw_segmented_gauge(915c4eaa04ad7c00).(VGAScreenSegcxx . . $ VGAScreenSeg., 284, y, 112, 2, 2, MAXcxx . . $ `src/opentyr.h:29:9`!(1, ammo_max / 10), this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ammocxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#ammo.); |
| 4522 | } |
| 4523 | } |
| 4524 | else // has infinite ammo |
| 4525 | { |
| 4526 | if (buttoncxx . . $ button.[0] || buttoncxx . . $ button.[1 + i]) |
| 4527 | { |
| 4528 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(this_option->wportcxx . . $ $anonymous_type_66fcae0887b82ce8_4#wport., shot_i, this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x., this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y., *mouseX_, *mouseY_, this_option->wpnumcxx . . $ $anonymous_type_66fcae0887b82ce8_4#wpnum. + this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge., playerNum_); |
| 4529 | |
| 4530 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge. > 0) |
| 4531 | { |
| 4532 | shotMultiPoscxx . . $ shotMultiPos.[shot_i] = 0; |
| 4533 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge. = 0; |
| 4534 | } |
| 4535 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].charge_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge_ticks. = 20; |
| 4536 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_enabledcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_enabled. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4537 | } |
| 4538 | } |
| 4539 | } |
| 4540 | } |
| 4541 | } |
| 4542 | } // end of if player has sidekicks |
| 4543 | } // !endLevel |
| 4544 | } // this_player->is_alive |
| 4545 | } // moveOK |
| 4546 | |
| 4547 | // draw sidekicks |
| 4548 | if ((playerNum_ == 2 || !twoPlayerModecxx . . $ twoPlayerMode.) && !endLevelcxx . . $ endLevel.) |
| 4549 | { |
| 4550 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(this_player->sidekick); ++i) |
| 4551 | { |
| 4552 | JE_OptionTypecxx . . $ JE_OptionType# *this_option = &optionscxx . . $ options.[this_player->itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i]]; |
| 4553 | |
| 4554 | if (this_option->optioncxx . . $ $anonymous_type_66fcae0887b82ce8_4#option. > 0) |
| 4555 | { |
| 4556 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_enabledcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_enabled.) |
| 4557 | { |
| 4558 | if (++this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_framecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_frame. >= this_option->anicxx . . $ $anonymous_type_66fcae0887b82ce8_4#ani.) |
| 4559 | { |
| 4560 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_framecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_frame. = 0; |
| 4561 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_enabledcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_enabled. = (this_option->optioncxx . . $ $anonymous_type_66fcae0887b82ce8_4#option. == 1); |
| 4562 | } |
| 4563 | } |
| 4564 | |
| 4565 | const int x = this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#x., |
| 4566 | y = this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].ycxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#y.; |
| 4567 | const uintcxx . . $ uint# sprite = this_option->grcxx . . $ $anonymous_type_66fcae0887b82ce8_4#gr.[this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].animation_framecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#animation_frame.] + this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge.; |
| 4568 | |
| 4569 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 1 || this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].stylecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#style. == 2) |
| 4570 | blit_sprite2x2cxx . . $ blit_sprite2x2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., x - 6, y, spriteSheet10cxx . . $ spriteSheet10., sprite); |
| 4571 | else |
| 4572 | blit_sprite2cxx . . $ blit_sprite2(b5d0f2be3b000a5b).(VGAScreencxx . . $ VGAScreen., x, y, spriteSheet9cxx . . $ spriteSheet9., sprite); |
| 4573 | } |
| 4574 | |
| 4575 | if (--this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].charge_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge_ticks. == 0) |
| 4576 | { |
| 4577 | if (this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge. < this_option->pwrcxx . . $ $anonymous_type_66fcae0887b82ce8_4#pwr.) |
| 4578 | ++this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].chargecxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge.; |
| 4579 | this_player->sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_4#sidekick.[i].charge_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#$anonymous_type_5#charge_ticks. = 20; |
| 4580 | } |
| 4581 | } |
| 4582 | } |
| 4583 | } |
| 4584 | |
| 4585 | void JE_mainGamePlayerFunctionscxx . . $ JE_mainGamePlayerFunctions(49f6e7a06ebc5aa8).(void) |
| 4586 | { |
| 4587 | /*PLAYER MOVEMENT/MOUSE ROUTINES*/ |
| 4588 | |
| 4589 | if (endLevelcxx . . $ endLevel. && levelEndcxx . . $ levelEnd. > 0) |
| 4590 | { |
| 4591 | levelEndcxx . . $ levelEnd.--; |
| 4592 | levelEndWarpcxx . . $ levelEndWarp.++; |
| 4593 | } |
| 4594 | |
| 4595 | /*Reset Street-Fighter commands*/ |
| 4596 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(SFExecutedcxx . . $ SFExecuted., 0, sizeof(SFExecutedcxx . . $ SFExecuted.)); |
| 4597 | |
| 4598 | portConfigChangecxx . . $ portConfigChange. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 4599 | |
| 4600 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4601 | { |
| 4602 | JE_playerMovementcxx . . $ JE_playerMovement(6c3bf3e0110e8e02).(&playercxx . . $ player.[0], |
| 4603 | !galagaModecxx . . $ galagaMode. ? inputDevicecxx . . $ inputDevice.[0] : 0, 1, shipGrcxx . . $ shipGr., shipGrPtrcxx . . $ shipGrPtr., |
| 4604 | &mouseXcxx . . $ mouseX., &mouseYcxx . . $ mouseY.); |
| 4605 | JE_playerMovementcxx . . $ JE_playerMovement(6c3bf3e0110e8e02).(&playercxx . . $ player.[1], |
| 4606 | !galagaModecxx . . $ galagaMode. ? inputDevicecxx . . $ inputDevice.[1] : 0, 2, shipGr2cxx . . $ shipGr2., shipGr2ptrcxx . . $ shipGr2ptr., |
| 4607 | &mouseXBcxx . . $ mouseXB., &mouseYBcxx . . $ mouseYB.); |
| 4608 | } |
| 4609 | else |
| 4610 | { |
| 4611 | JE_playerMovementcxx . . $ JE_playerMovement(6c3bf3e0110e8e02).(&playercxx . . $ player.[0], |
| 4612 | 0, 1, shipGrcxx . . $ shipGr., shipGrPtrcxx . . $ shipGrPtr., |
| 4613 | &mouseXcxx . . $ mouseX., &mouseYcxx . . $ mouseY.); |
| 4614 | } |
| 4615 | |
| 4616 | /* == Parallax Map Scrolling == */ |
| 4617 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4618 | tempXcxx . . $ tempX. = (playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. + playercxx . . $ player.[1].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.) / 2; |
| 4619 | else |
| 4620 | tempXcxx . . $ tempX. = playercxx . . $ player.[0].xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x.; |
| 4621 | |
| 4622 | tempWcxx . . $ tempW. = floorf((260.0f - (tempXcxx . . $ tempX. - 36.0f)) / (260.0f - 36.0f) * (24.0f * 3.0f) - 1.0f); |
| 4623 | mapX3Ofscxx . . $ mapX3Ofs. = tempWcxx . . $ tempW.; |
| 4624 | mapX3Poscxx . . $ mapX3Pos. = mapX3Ofscxx . . $ mapX3Ofs. % 24; |
| 4625 | mapX3bpPoscxx . . $ mapX3bpPos. = 1 - (mapX3Ofscxx . . $ mapX3Ofs. / 24); |
| 4626 | |
| 4627 | mapX2Ofscxx . . $ mapX2Ofs. = (tempWcxx . . $ tempW. * 2) / 3; |
| 4628 | mapX2Poscxx . . $ mapX2Pos. = mapX2Ofscxx . . $ mapX2Ofs. % 24; |
| 4629 | mapX2bpPoscxx . . $ mapX2bpPos. = 1 - (mapX2Ofscxx . . $ mapX2Ofs. / 24); |
| 4630 | |
| 4631 | oldMapXOfscxx . . $ oldMapXOfs. = mapXOfscxx . . $ mapXOfs.; |
| 4632 | mapXOfscxx . . $ mapXOfs. = mapX2Ofscxx . . $ mapX2Ofs. / 2; |
| 4633 | mapXPoscxx . . $ mapXPos. = mapXOfscxx . . $ mapXOfs. % 24; |
| 4634 | mapXbpPoscxx . . $ mapXbpPos. = 1 - (mapXOfscxx . . $ mapXOfs. / 24); |
| 4635 | |
| 4636 | if (background3x1cxx . . $ background3x1.) |
| 4637 | { |
| 4638 | mapX3Ofscxx . . $ mapX3Ofs. = mapXOfscxx . . $ mapXOfs.; |
| 4639 | mapX3Poscxx . . $ mapX3Pos. = mapXPoscxx . . $ mapXPos.; |
| 4640 | mapX3bpPoscxx . . $ mapX3bpPos. = mapXbpPoscxx . . $ mapXbpPos. - 1; |
| 4641 | } |
| 4642 | } |
| 4643 | |
| 4644 | const char *JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(JE_bytecxx . . $ JE_byte# pnum) |
| 4645 | { |
| 4646 | if (pnum == thisPlayerNumcxx . . $ thisPlayerNum. && network_player_namecxx . . $ network_player_name.[0] != '\0') |
| 4647 | return network_player_namecxx . . $ network_player_name.; |
| 4648 | else if (network_opponent_namecxx . . $ network_opponent_name.[0] != '\0') |
| 4649 | return network_opponent_namecxx . . $ network_opponent_name.; |
| 4650 | |
| 4651 | return miscTextcxx . . $ miscText.[47 + pnum]; |
| 4652 | } |
| 4653 | |
| 4654 | void JE_playerCollidecxx . . $ JE_playerCollide(d2d571a75710b8ad).(Playercxx . . $ Player# *this_player, JE_bytecxx . . $ JE_byte# playerNum_) |
| 4655 | { |
| 4656 | char tempStr[256]; |
| 4657 | |
| 4658 | for (int z = 0; z < 100; z++) |
| 4659 | { |
| 4660 | if (enemyAvailcxx . . $ enemyAvail.[z] != 1) |
| 4661 | { |
| 4662 | int enemy_screen_x = enemycxx . . $ enemy.[z].excxx . . $ JE_SingleEnemyType#ex. + enemycxx . . $ enemy.[z].mapoffsetcxx . . $ JE_SingleEnemyType#mapoffset.; |
| 4663 | |
| 4664 | if (abscxx . . $ abs(7864480464b09eea).(this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x. - enemy_screen_x) < 12 && abscxx . . $ abs(7864480464b09eea).(this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y. - enemycxx . . $ enemy.[z].eycxx . . $ JE_SingleEnemyType#ey.) < 14) |
| 4665 | { /*Collide*/ |
| 4666 | int evalue = enemycxx . . $ enemy.[z].evaluecxx . . $ JE_SingleEnemyType#evalue.; |
| 4667 | if (evalue > 29999) |
| 4668 | { |
| 4669 | if (evalue == 30000) // spawn dragonwing in galaga mode, otherwise just a purple ball |
| 4670 | { |
| 4671 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 100; |
| 4672 | |
| 4673 | if (!galagaModecxx . . $ galagaMode.) |
| 4674 | { |
| 4675 | handle_got_purple_ballcxx . . $ handle_got_purple_ball(cda9d737d2f74dfa).(this_player); |
| 4676 | } |
| 4677 | else |
| 4678 | { |
| 4679 | // spawn the dragonwing? |
| 4680 | if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4681 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 2400; |
| 4682 | twoPlayerModecxx . . $ twoPlayerMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4683 | twoPlayerLinkedcxx . . $ twoPlayerLinked. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4684 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. = 1; |
| 4685 | playercxx . . $ player.[1].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = 10; |
| 4686 | playercxx . . $ player.[1].is_alivecxx . . $ $anonymous_type_55bed0e189d5bed_4#is_alive. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4687 | } |
| 4688 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4689 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4690 | } |
| 4691 | else if (superArcadeModecxx . . $ superArcadeMode. != SA_NONEcxx . . $ SA_NONE. && evalue > 30000) |
| 4692 | { |
| 4693 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_FRONTcxx . . $ SHOT_FRONT.] = 0; |
| 4694 | shotRepeatcxx . . $ shotRepeat.[SHOT_FRONTcxx . . $ SHOT_FRONT.] = 10; |
| 4695 | |
| 4696 | tempWcxx . . $ tempW. = SAWeaponcxx . . $ SAWeapon.[superArcadeModecxx . . $ superArcadeMode.-1][evalue - 30000-1]; |
| 4697 | |
| 4698 | // if picked up already-owned weapon, power weapon up |
| 4699 | if (tempWcxx . . $ tempW. == playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id.) |
| 4700 | { |
| 4701 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 1000; |
| 4702 | power_up_weaponcxx . . $ power_up_weapon(be6e6169371b08a7).(this_player, FRONT_WEAPONcxx . . $ FRONT_WEAPON.); |
| 4703 | } |
| 4704 | // else weapon also gives purple ball |
| 4705 | else |
| 4706 | { |
| 4707 | handle_got_purple_ballcxx . . $ handle_got_purple_ball(cda9d737d2f74dfa).(this_player); |
| 4708 | } |
| 4709 | |
| 4710 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = tempWcxx . . $ tempW.; |
| 4711 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 200; |
| 4712 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4713 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4714 | } |
| 4715 | else if (evalue > 32100) |
| 4716 | { |
| 4717 | if (playerNum_ == 1) |
| 4718 | { |
| 4719 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 250; |
| 4720 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = evalue - 32100; |
| 4721 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIALcxx . . $ SHOT_SPECIAL.] = 0; |
| 4722 | shotRepeatcxx . . $ shotRepeat.[SHOT_SPECIALcxx . . $ SHOT_SPECIAL.] = 10; |
| 4723 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2.] = 0; |
| 4724 | shotRepeatcxx . . $ shotRepeat.[SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2.] = 0; |
| 4725 | |
| 4726 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4727 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(1), miscTextBcxx . . $ miscTextB.[4-1], specialcxx . . $ special.[evalue - 32100].namecxx . . $ $anonymous_type_66fcae0887b82ce8_3#name.); |
| 4728 | else if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4729 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[43-1], specialcxx . . $ special.[evalue - 32100].namecxx . . $ $anonymous_type_66fcae0887b82ce8_3#name.); |
| 4730 | else |
| 4731 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[64-1], specialcxx . . $ special.[evalue - 32100].namecxx . . $ $anonymous_type_66fcae0887b82ce8_3#name.); |
| 4732 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4733 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4734 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4735 | } |
| 4736 | } |
| 4737 | else if (evalue > 32000) |
| 4738 | { |
| 4739 | if (playerNum_ == 2) |
| 4740 | { |
| 4741 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4742 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4743 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(2), miscTextBcxx . . $ miscTextB.[4-1], optionscxx . . $ options.[evalue - 32000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_4#name.); |
| 4744 | else |
| 4745 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[44-1], optionscxx . . $ options.[evalue - 32000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_4#name.); |
| 4746 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4747 | |
| 4748 | // if picked up a different sidekick than player already has, then reset sidekicks to least powerful, else power them up |
| 4749 | if (evalue - 32000u != playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_seriescxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_series.) |
| 4750 | { |
| 4751 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_seriescxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_series. = evalue - 32000; |
| 4752 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level. = 101; |
| 4753 | } |
| 4754 | else if (playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level. < 103) |
| 4755 | { |
| 4756 | ++playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level.; |
| 4757 | } |
| 4758 | |
| 4759 | uintcxx . . $ uint# temp = playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_levelcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_level. - 100 - 1; |
| 4760 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[1].items.sidekick); ++i) |
| 4761 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i] = optionSelectcxx . . $ optionSelect.[playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekick_seriescxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick_series.][temp][i]; |
| 4762 | |
| 4763 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_LEFT_SIDEKICKcxx . . $ SHOT_LEFT_SIDEKICK.] = 0; |
| 4764 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_RIGHT_SIDEKICKcxx . . $ SHOT_RIGHT_SIDEKICK.] = 0; |
| 4765 | JE_drawOptionscxx . . $ JE_drawOptions(49f6e7a06ebc5aa8).(); |
| 4766 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4767 | } |
| 4768 | else if (onePlayerActioncxx . . $ onePlayerAction.) |
| 4769 | { |
| 4770 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4771 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[64-1], optionscxx . . $ options.[evalue - 32000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_4#name.); |
| 4772 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4773 | |
| 4774 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player[0].items.sidekick); ++i) |
| 4775 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..sidekickcxx . . $ $anonymous_type_55bed0e189d5bed_2#sidekick.[i] = evalue - 32000; |
| 4776 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_LEFT_SIDEKICKcxx . . $ SHOT_LEFT_SIDEKICK.] = 0; |
| 4777 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_RIGHT_SIDEKICKcxx . . $ SHOT_RIGHT_SIDEKICK.] = 0; |
| 4778 | |
| 4779 | JE_drawOptionscxx . . $ JE_drawOptions(49f6e7a06ebc5aa8).(); |
| 4780 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4781 | } |
| 4782 | if (enemyAvailcxx . . $ enemyAvail.[z] == 1) |
| 4783 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 250; |
| 4784 | } |
| 4785 | else if (evalue > 31000) |
| 4786 | { |
| 4787 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 250; |
| 4788 | if (playerNum_ == 2) |
| 4789 | { |
| 4790 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4791 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(2), miscTextBcxx . . $ miscTextB.[4-1], weaponPortcxx . . $ weaponPort.[evalue - 31000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4792 | else |
| 4793 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[44-1], weaponPortcxx . . $ weaponPort.[evalue - 31000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4794 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4795 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = evalue - 31000; |
| 4796 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_REARcxx . . $ SHOT_REAR.] = 0; |
| 4797 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4798 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4799 | } |
| 4800 | else if (onePlayerActioncxx . . $ onePlayerAction.) |
| 4801 | { |
| 4802 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[64-1], weaponPortcxx . . $ weaponPort.[evalue - 31000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4803 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4804 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = evalue - 31000; |
| 4805 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_REARcxx . . $ SHOT_REAR.] = 0; |
| 4806 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4807 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4808 | |
| 4809 | if (playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. == 0) // does this ever happen? |
| 4810 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].powercxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#power. = 1; |
| 4811 | } |
| 4812 | } |
| 4813 | else if (evalue > 30000) |
| 4814 | { |
| 4815 | if (playerNum_ == 1 && twoPlayerModecxx . . $ twoPlayerMode.) |
| 4816 | { |
| 4817 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4818 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(1), miscTextBcxx . . $ miscTextB.[4-1], weaponPortcxx . . $ weaponPort.[evalue - 30000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4819 | else |
| 4820 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[43-1], weaponPortcxx . . $ weaponPort.[evalue - 30000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4821 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4822 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = evalue - 30000; |
| 4823 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_FRONTcxx . . $ SHOT_FRONT.] = 0; |
| 4824 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4825 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4826 | } |
| 4827 | else if (onePlayerActioncxx . . $ onePlayerAction.) |
| 4828 | { |
| 4829 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[64-1], weaponPortcxx . . $ weaponPort.[evalue - 30000].namecxx . . $ $anonymous_type_66fcae0887b82ce8_1#name.); |
| 4830 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4831 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = evalue - 30000; |
| 4832 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_FRONTcxx . . $ SHOT_FRONT.] = 0; |
| 4833 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4834 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4835 | } |
| 4836 | |
| 4837 | if (enemyAvailcxx . . $ enemyAvail.[z] == 1) |
| 4838 | { |
| 4839 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. = specialArcadeWeaponcxx . . $ specialArcadeWeapon.[evalue - 30000-1]; |
| 4840 | if (playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..specialcxx . . $ $anonymous_type_55bed0e189d5bed_2#special. > 0) |
| 4841 | { |
| 4842 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIALcxx . . $ SHOT_SPECIAL.] = 0; |
| 4843 | shotRepeatcxx . . $ shotRepeat.[SHOT_SPECIALcxx . . $ SHOT_SPECIAL.] = 0; |
| 4844 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2.] = 0; |
| 4845 | shotRepeatcxx . . $ shotRepeat.[SHOT_SPECIAL2cxx . . $ SHOT_SPECIAL2.] = 0; |
| 4846 | } |
| 4847 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += 250; |
| 4848 | } |
| 4849 | |
| 4850 | } |
| 4851 | } |
| 4852 | else if (evalue > 20000) |
| 4853 | { |
| 4854 | if (twoPlayerLinkedcxx . . $ twoPlayerLinked.) |
| 4855 | { |
| 4856 | // share the armor evenly between linked players |
| 4857 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++i) |
| 4858 | { |
| 4859 | playercxx . . $ player.[i].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. += (evalue - 20000) / COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); |
| 4860 | if (playercxx . . $ player.[i].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. > 28) |
| 4861 | playercxx . . $ player.[i].armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = 28; |
| 4862 | } |
| 4863 | } |
| 4864 | else |
| 4865 | { |
| 4866 | this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. += evalue - 20000; |
| 4867 | if (this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. > 28) |
| 4868 | this_player->armorcxx . . $ $anonymous_type_55bed0e189d5bed_4#armor. = 28; |
| 4869 | } |
| 4870 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4871 | VGAScreencxx . . $ VGAScreen. = VGAScreenSegcxx . . $ VGAScreenSeg.; /* side-effect of game_screen */ |
| 4872 | JE_drawArmorcxx . . $ JE_drawArmor(49f6e7a06ebc5aa8).(); |
| 4873 | VGAScreencxx . . $ VGAScreen. = game_screencxx . . $ game_screen.; /* side-effect of game_screen */ |
| 4874 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4875 | } |
| 4876 | else if (evalue > 10000 && enemyAvailcxx . . $ enemyAvail.[z] == 2) |
| 4877 | { |
| 4878 | if (!bonusLevelcxx . . $ bonusLevel.) |
| 4879 | { |
| 4880 | play_songcxx . . $ play_song(cb2f890c2fdad230).(30); /*Zanac*/ |
| 4881 | bonusLevelcxx . . $ bonusLevel. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 4882 | nextLevelcxx . . $ nextLevel. = evalue - 10000; |
| 4883 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4884 | displayTimecxx . . $ displayTime. = 150; |
| 4885 | } |
| 4886 | } |
| 4887 | else if (enemycxx . . $ enemy.[z].scoreitemcxx . . $ JE_SingleEnemyType#scoreitem.) |
| 4888 | { |
| 4889 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 4890 | soundQueuecxx . . $ soundQueue.[7] = S_ITEMcxx . . $ S_ITEM.; |
| 4891 | if (evalue == 1) |
| 4892 | { |
| 4893 | cubeMaxcxx . . $ cubeMax.++; |
| 4894 | soundQueuecxx . . $ soundQueue.[3] = V_DATA_CUBEcxx . . $ V_DATA_CUBE.; |
| 4895 | } |
| 4896 | else if (evalue == -1) // got front weapon powerup |
| 4897 | { |
| 4898 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4899 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(1), miscTextBcxx . . $ miscTextB.[4-1], miscTextcxx . . $ miscText.[45-1]); |
| 4900 | else if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4901 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[43-1], miscTextcxx . . $ miscText.[45-1]); |
| 4902 | else |
| 4903 | strcpycxx . . $ strcpy(b7b3a83273496486).(tempStr, miscTextcxx . . $ miscText.[45-1]); |
| 4904 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4905 | |
| 4906 | power_up_weaponcxx . . $ power_up_weapon(be6e6169371b08a7).(&playercxx . . $ player.[0], FRONT_WEAPONcxx . . $ FRONT_WEAPON.); |
| 4907 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4908 | } |
| 4909 | else if (evalue == -2) // got rear weapon powerup |
| 4910 | { |
| 4911 | if (isNetworkGamecxx . . $ isNetworkGame.) |
| 4912 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s %s", JE_getNamecxx . . $ JE_getName(42624c5f3be67010).(2), miscTextBcxx . . $ miscTextB.[4-1], miscTextcxx . . $ miscText.[46-1]); |
| 4913 | else if (twoPlayerModecxx . . $ twoPlayerMode.) |
| 4914 | sprintfcxx . . $ sprintf(26c8642d26409d6d).(tempStr, "%s %s", miscTextcxx . . $ miscText.[44-1], miscTextcxx . . $ miscText.[46-1]); |
| 4915 | else |
| 4916 | strcpycxx . . $ strcpy(b7b3a83273496486).(tempStr, miscTextcxx . . $ miscText.[46-1]); |
| 4917 | JE_drawTextWindowcxx . . $ JE_drawTextWindow(85c52e162fed56f9).(tempStr); |
| 4918 | |
| 4919 | power_up_weaponcxx . . $ power_up_weapon(be6e6169371b08a7).(twoPlayerModecxx . . $ twoPlayerMode. ? &playercxx . . $ player.[1] : &playercxx . . $ player.[0], REAR_WEAPONcxx . . $ REAR_WEAPON.); |
| 4920 | soundQueuecxx . . $ soundQueue.[7] = S_POWERUPcxx . . $ S_POWERUP.; |
| 4921 | } |
| 4922 | else if (evalue == -3) |
| 4923 | { |
| 4924 | // picked up orbiting asteroid killer |
| 4925 | shotMultiPoscxx . . $ shotMultiPos.[SHOT_MISCcxx . . $ SHOT_MISC.] = 0; |
| 4926 | bcxx . . $ b. = player_shot_createcxx . . $ player_shot_create(47a6dcf6307ecf82).(0, SHOT_MISCcxx . . $ SHOT_MISC., this_player->xcxx . . $ $anonymous_type_55bed0e189d5bed_4#x., this_player->ycxx . . $ $anonymous_type_55bed0e189d5bed_4#y., mouseXcxx . . $ mouseX., mouseYcxx . . $ mouseY., 104, playerNum_); |
| 4927 | shotAvailcxx . . $ shotAvail.[z] = 0; |
| 4928 | } |
| 4929 | else if (evalue == -4) |
| 4930 | { |
| 4931 | if (playercxx . . $ player.[playerNum_-1].superbombscxx . . $ $anonymous_type_55bed0e189d5bed_4#superbombs. < 10) |
| 4932 | ++playercxx . . $ player.[playerNum_-1].superbombscxx . . $ $anonymous_type_55bed0e189d5bed_4#superbombs.; |
| 4933 | } |
| 4934 | else if (evalue == -5) |
| 4935 | { |
| 4936 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[FRONT_WEAPONcxx . . $ FRONT_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 25; // HOT DOG! |
| 4937 | playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 26; |
| 4938 | playercxx . . $ player.[1].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items..weaponcxx . . $ $anonymous_type_55bed0e189d5bed_2#weapon.[REAR_WEAPONcxx . . $ REAR_WEAPON.].idcxx . . $ $anonymous_type_55bed0e189d5bed_2#$anonymous_type_3#id. = 26; |
| 4939 | |
| 4940 | playercxx . . $ player.[0].last_itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#last_items. = playercxx . . $ player.[0].itemscxx . . $ $anonymous_type_55bed0e189d5bed_4#items.; |
| 4941 | |
| 4942 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++i) |
| 4943 | playercxx . . $ player.[i].weapon_modecxx . . $ $anonymous_type_55bed0e189d5bed_4#weapon_mode. = 1; |
| 4944 | |
| 4945 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(shotMultiPoscxx . . $ shotMultiPos., 0, sizeof(shotMultiPoscxx . . $ shotMultiPos.)); |
| 4946 | } |
| 4947 | else if (twoPlayerLinkedcxx . . $ twoPlayerLinked.) |
| 4948 | { |
| 4949 | // players get equal share of pick-up cash when linked |
| 4950 | for (uintcxx . . $ uint# i = 0; i < COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); ++i) |
| 4951 | playercxx . . $ player.[i].cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += evalue / COUNTOFcxx . . $ `src/opentyr.h:27:9`!(player); |
| 4952 | } |
| 4953 | else |
| 4954 | { |
| 4955 | this_player->cashcxx . . $ $anonymous_type_55bed0e189d5bed_4#cash. += evalue; |
| 4956 | } |
| 4957 | JE_setupExplosioncxx . . $ JE_setupExplosion(9c65cb39d99632c2).(enemy_screen_x, enemycxx . . $ enemy.[z].eycxx . . $ JE_SingleEnemyType#ey., 0, enemyDatcxx . . $ enemyDat.[enemycxx . . $ enemy.[z].enemytypecxx . . $ JE_SingleEnemyType#enemytype.].explosiontypecxx . . $ $anonymous_type_66fcae0887b82ce8_7#explosiontype., truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 4958 | } |
| 4959 | else if (this_player->invulnerable_tickscxx . . $ $anonymous_type_55bed0e189d5bed_4#invulnerable_ticks. == 0 && enemyAvailcxx . . $ enemyAvail.[z] == 0 && |
| 4960 | (enemyDatcxx . . $ enemyDat.[enemycxx . . $ enemy.[z].enemytypecxx . . $ JE_SingleEnemyType#enemytype.].explosiontypecxx . . $ $anonymous_type_66fcae0887b82ce8_7#explosiontype. & 1) == 0) // explosiontype & 1 == 0: not ground enemy |
| 4961 | { |
| 4962 | int armorleft = enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft.; |
| 4963 | if (armorleft > damageRatecxx . . $ damageRate.) |
| 4964 | armorleft = damageRatecxx . . $ damageRate.; |
| 4965 | |
| 4966 | JE_playerDamagecxx . . $ JE_playerDamage(9c37ec4f31b8640b).(armorleft, this_player); |
| 4967 | |
| 4968 | // player ship gets push-back from collision |
| 4969 | if (enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft. > 0) |
| 4970 | { |
| 4971 | this_player->x_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#x_velocity. += (enemycxx . . $ enemy.[z].exccxx . . $ JE_SingleEnemyType#exc. * enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft.) / 2; |
| 4972 | this_player->y_velocitycxx . . $ $anonymous_type_55bed0e189d5bed_4#y_velocity. += (enemycxx . . $ enemy.[z].eyccxx . . $ JE_SingleEnemyType#eyc. * enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft.) / 2; |
| 4973 | } |
| 4974 | |
| 4975 | int armorleft2 = enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft.; |
| 4976 | if (armorleft2 == 255) |
| 4977 | armorleft2 = 30000; |
| 4978 | |
| 4979 | tempcxx . . $ temp. = enemycxx . . $ enemy.[z].linknumcxx . . $ JE_SingleEnemyType#linknum.; |
| 4980 | if (tempcxx . . $ temp. == 0) |
| 4981 | tempcxx . . $ temp. = 255; |
| 4982 | |
| 4983 | bcxx . . $ b. = z; |
| 4984 | |
| 4985 | if (armorleft2 > armorleft) |
| 4986 | { |
| 4987 | // damage enemy |
| 4988 | if (enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft. != 255) |
| 4989 | enemycxx . . $ enemy.[z].armorleftcxx . . $ JE_SingleEnemyType#armorleft. -= armorleft; |
| 4990 | soundQueuecxx . . $ soundQueue.[5] = S_ENEMY_HITcxx . . $ S_ENEMY_HIT.; |
| 4991 | } |
| 4992 | else |
| 4993 | { |
| 4994 | // kill enemy |
| 4995 | for (temp2cxx . . $ temp2. = 0; temp2cxx . . $ temp2. < 100; temp2cxx . . $ temp2.++) |
| 4996 | { |
| 4997 | if (enemyAvailcxx . . $ enemyAvail.[temp2cxx . . $ temp2.] != 1) |
| 4998 | { |
| 4999 | temp3cxx . . $ temp3. = enemycxx . . $ enemy.[temp2cxx . . $ temp2.].linknumcxx . . $ JE_SingleEnemyType#linknum.; |
| 5000 | if (temp2cxx . . $ temp2. == bcxx . . $ b. || |
| 5001 | (tempcxx . . $ temp. != 255 && |
| 5002 | (tempcxx . . $ temp. == temp3cxx . . $ temp3. || tempcxx . . $ temp. - 100 == temp3cxx . . $ temp3. || |
| 5003 | (temp3cxx . . $ temp3. > 40 && temp3cxx . . $ temp3. / 20 == tempcxx . . $ temp. / 20 && temp3cxx . . $ temp3. <= tempcxx . . $ temp.)))) |
| 5004 | { |
| 5005 | int enemy_screen_x = enemycxx . . $ enemy.[temp2cxx . . $ temp2.].excxx . . $ JE_SingleEnemyType#ex. + enemycxx . . $ enemy.[temp2cxx . . $ temp2.].mapoffsetcxx . . $ JE_SingleEnemyType#mapoffset.; |
| 5006 | |
| 5007 | enemycxx . . $ enemy.[temp2cxx . . $ temp2.].linknumcxx . . $ JE_SingleEnemyType#linknum. = 0; |
| 5008 | |
| 5009 | enemyAvailcxx . . $ enemyAvail.[temp2cxx . . $ temp2.] = 1; |
| 5010 | |
| 5011 | if (enemyDatcxx . . $ enemyDat.[enemycxx . . $ enemy.[temp2cxx . . $ temp2.].enemytypecxx . . $ JE_SingleEnemyType#enemytype.].esizecxx . . $ $anonymous_type_66fcae0887b82ce8_7#esize. == 1) |
| 5012 | { |
| 5013 | JE_setupExplosionLargecxx . . $ JE_setupExplosionLarge(c08e0f34ac44585d).(enemycxx . . $ enemy.[temp2cxx . . $ temp2.].enemygroundcxx . . $ JE_SingleEnemyType#enemyground., enemycxx . . $ enemy.[temp2cxx . . $ temp2.].explonumcxx . . $ JE_SingleEnemyType#explonum., enemy_screen_x, enemycxx . . $ enemy.[temp2cxx . . $ temp2.].eycxx . . $ JE_SingleEnemyType#ey.); |
| 5014 | soundQueuecxx . . $ soundQueue.[6] = S_EXPLOSION_9cxx . . $ S_EXPLOSION_9.; |
| 5015 | } |
| 5016 | else |
| 5017 | { |
| 5018 | JE_setupExplosioncxx . . $ JE_setupExplosion(9c65cb39d99632c2).(enemy_screen_x, enemycxx . . $ enemy.[temp2cxx . . $ temp2.].eycxx . . $ JE_SingleEnemyType#ey., 0, 1, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 5019 | soundQueuecxx . . $ soundQueue.[5] = S_EXPLOSION_4cxx . . $ S_EXPLOSION_4.; |
| 5020 | } |
| 5021 | } |
| 5022 | } |
| 5023 | } |
| 5024 | enemyAvailcxx . . $ enemyAvail.[z] = 1; |
| 5025 | } |
| 5026 | } |
| 5027 | } |
| 5028 | |
| 5029 | } |
| 5030 | } |
| 5031 | } |