| 1 | /*************************************************************************** |
| 2 | main.cpp - description |
| 3 | ------------------- |
| 4 | begin : Tue Sep 19 17:16:48 PDT 2000 |
| 5 | copyright : (C) 2000 by Michael Bridak |
| 6 | email : [email protected] |
| 7 | $Id: main.cpp,v 1.28 2003/07/18 03:50:00 mbridak Exp $ |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | /*************************************************************************** |
| 11 | * * |
| 12 | * This program is free software; you can redistribute it and/or modify * |
| 13 | * it under the terms of the GNU General Public License as published by * |
| 14 | * the Free Software Foundation; either version 2 of the License. * |
| 15 | * . * |
| 16 | * * |
| 17 | ***************************************************************************/ |
| 18 | #ifdef HAVE_CONFIG_H |
| 19 | #include <config.h> |
| 20 | #endif |
| 21 | |
| 22 | /*Feeling left out? Get included!*/ |
| 23 | #include <iostream> |
| 24 | #include <list> |
| 25 | #include <string.h> |
| 26 | #include <string> |
| 27 | #include <stdio.h> |
| 28 | #include <stdlib.h> |
| 29 | #include <math.h> |
| 30 | #include <time.h> |
| 31 | #include <unistd.h> |
| 32 | #include <SDL.h> |
| 33 | #include <SDL/SDL.h> |
| 34 | #include <SDL/SDL_image.h> |
| 35 | #include <SDL/SDL_thread.h> |
| 36 | #include "dfont.h"cxx . . $ `<file>/src/dfont.h`/ |
| 37 | #include "draw.h"cxx . . $ `<file>/src/draw.h`/ |
| 38 | #include "gameclock.h"cxx . . $ `<file>/src/gameclock.h`/ |
| 39 | #include "submarine.h"cxx . . $ `<file>/src/submarine.h`/ |
| 40 | #include "towedarray.h"cxx . . $ `<file>/src/towedarray.h`/ |
| 41 | #include "targetmotionanalysis.h"cxx . . $ `<file>/src/targetmotionanalysis.h`/ |
| 42 | #include "menu.h"cxx . . $ `<file>/src/menu.h`/ |
| 43 | #include "message.h"cxx . . $ `<file>/src/message.h`/ |
| 44 | #include "mission.h"cxx . . $ `<file>/src/mission.h`/ |
| 45 | #include "sonar.h"cxx . . $ `<file>/src/sonar.h`/ |
| 46 | #include "radar.h"cxx . . $ `<file>/src/radar.h`/ |
| 47 | #include "files.h"cxx . . $ `<file>/src/files.h`/ |
| 48 | #include "esm.h"cxx . . $ `<file>/src/esm.h`/ |
| 49 | #include "control.h"cxx . . $ `<file>/src/control.h`/ |
| 50 | #include "helicopter.h"cxx . . $ `<file>/src/helicopter.h`/ |
| 51 | #include "main.h"cxx . . $ `<file>/src/main.h`/ |
| 52 | #include "sound.h"cxx . . $ `<file>/src/sound.h`/ |
| 53 | #include "map.h"cxx . . $ `<file>/src/map.h`/ |
| 54 | #include "winfunctions.h"cxx . . $ `<file>/src/winfunctions.h`/ |
| 55 | #include <fstream> |
| 56 | #include <cstdlib> |
| 57 | #include <iomanip> |
| 58 | using namespace std; |
| 59 | |
| 60 | MAPcxx . . $ MAP# *my_mapcxx . . $ my_map. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 61 | |
| 62 | //#######GRAPHIC PRIMITIVES############# |
| 63 | void SetupScreencxx . . $ SetupScreen(b45ddcbc8423892c).(bool full_screen){ |
| 64 | //Initialize the screen and some default colors |
| 65 | |
| 66 | if ( SDL_Init(SDL_INIT_VIDEOcxx . . $ `<external>/2689019671020267068/SDL.h:49:9`!|SDL_INIT_TIMERcxx . . $ `<external>/2689019671020267068/SDL.h:47:9`!|SDL_INIT_AUDIOcxx . . $ `<external>/2689019671020267068/SDL.h:48:9`!) < 0 ) { |
| 67 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Couldn't initialize SDL: " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 68 | exit(1); |
| 69 | } |
| 70 | atexit(SDL_Quit); |
| 71 | SDL_InitSubSystem(SDL_INIT_TIMERcxx . . $ `<external>/2689019671020267068/SDL.h:47:9`!); |
| 72 | if(full_screen){ |
| 73 | //Create main screen surface |
| 74 | screencxx . . $ screen. = SDL_SetVideoMode(1024, 768, 16, SDL_FULLSCREENcxx . . $ `<external>/3508485105195885937/SDL_video.h:237:9`!); |
| 75 | }else{ |
| 76 | screencxx . . $ screen. = SDL_SetVideoMode(1024, 768, 16, SDL_SWSURFACEcxx . . $ `<external>/3508485105195885937/SDL_video.h:229:9`!); |
| 77 | } |
| 78 | |
| 79 | if ( screencxx . . $ screen. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 80 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Couldn't set video mode..." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 81 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "OpenSSN requires 1024x768 @ 16 bpp" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 82 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 83 | exit(1); |
| 84 | } |
| 85 | SDL_WM_SetCaption("OpenSSN http://openssn.sf.net", "OpenSSN"); |
| 86 | |
| 87 | //define some standard colors |
| 88 | textcolorcxx . . $ textcolor. = SDL_MapRGB(screencxx . . $ screen.->format, 192, 255, 6); |
| 89 | blackcxx . . $ black. = SDL_MapRGB(screencxx . . $ screen.->format, 0, 0, 0); |
| 90 | whitecxx . . $ white. = SDL_MapRGB(screencxx . . $ screen.->format, 255, 255, 255); |
| 91 | redcxx . . $ red. = SDL_MapRGB(screencxx . . $ screen.->format, 255, 99, 20); |
| 92 | dark_redcxx . . $ dark_red. = SDL_MapRGB(screencxx . . $ screen.->format, 140, 80, 10); |
| 93 | greencxx . . $ green. = SDL_MapRGB(screencxx . . $ screen.->format, 0, 255, 0); |
| 94 | dark_greencxx . . $ dark_green. = SDL_MapRGB(screencxx . . $ screen.->format, 0, 120, 0); |
| 95 | yellowcxx . . $ yellow. = SDL_MapRGB(screencxx . . $ screen.->format, 216, 255, 0); |
| 96 | browncxx . . $ brown. = SDL_MapRGB(screencxx . . $ screen.->format, 120, 140, 0); |
| 97 | greycxx . . $ grey. = SDL_MapRGB(screencxx . . $ screen.->format, 180, 180, 180); |
| 98 | dark_greycxx . . $ dark_grey. = SDL_MapRGB(screencxx . . $ screen.->format, 100, 100, 100); |
| 99 | // mapcolor = SDL_MapRGB(screen->format, 130, 201, 225); |
| 100 | mapcolorcxx . . $ mapcolor. = SDL_MapRGB(screencxx . . $ screen.->format, 10, 10, 100); |
| 101 | // Init_Audio(); |
| 102 | } |
| 103 | |
| 104 | void MapIconcxx . . $ MapIcon(6fb2c7d311165c4f).(int x, int y, int ShipType, int Friend, Uint32cxx . . $ Uint32# color){ |
| 105 | // Display NTDS symbols according to the following Legend |
| 106 | // Hostile: Submarine = Red Bottom Half Diamond, Surface = Red Full Diamond, |
| 107 | // Aircraft = Red Top Half Diamond |
| 108 | |
| 109 | // Friendly: Submarine = green Bottom SemiCircle, Surface = green Circle, |
| 110 | // Aircraft = green Top SemiCircle |
| 111 | |
| 112 | // Unknown: Submarine = grey Bottom Half Box, Surface = grey Box, |
| 113 | // Aircraft = grey Top Half Box |
| 114 | |
| 115 | // Neutral: Submarine = Yellow Bottom Half box, Surface = Yellow box, |
| 116 | // Aircraft = Yellow Top Half box |
| 117 | |
| 118 | // Is it a submarine? |
| 119 | if(ShipType == TYPE_SUBcxx . . $ `src/submarine.h:35:9`!) { |
| 120 | switch(Friend){ |
| 121 | case 0: //Foe?? |
| 122 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x-2, y+2, 7, 'B', blackcxx . . $ black.); //Bottom Half Diamond |
| 123 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x, y, 7, 'B', color); //Bottom Half Diamond |
| 124 | break; |
| 125 | case 1: //Friend?? |
| 126 | DrawArccxx . . $ DrawArc(ff1e8d23fb3fb7e5).(screencxx . . $ screen., x-2,y+2, 7, 180, 360, blackcxx . . $ black.); //Bottom SemiCircle |
| 127 | DrawArccxx . . $ DrawArc(ff1e8d23fb3fb7e5).(screencxx . . $ screen., x-2, y+3, 7, 180, 360, blackcxx . . $ black.); // thickness |
| 128 | DrawArccxx . . $ DrawArc(ff1e8d23fb3fb7e5).(screencxx . . $ screen., x ,y, 7, 180, 360, color); //Bottom SemiCircle |
| 129 | DrawArccxx . . $ DrawArc(ff1e8d23fb3fb7e5).(screencxx . . $ screen., x, y + 1, 7, 180, 360, color); // thickness |
| 130 | break; |
| 131 | case 2://Unknown?? |
| 132 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x-2 ,y+2, 7, 'B', blackcxx . . $ black.); //Bottom Half Box |
| 133 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'B', color); //Bottom Half Box |
| 134 | break; |
| 135 | default: //Neutral |
| 136 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x-2 ,y+2, 7, 'B', blackcxx . . $ black.); //Bottom Half Box |
| 137 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'B', color); //Bottom Half Box |
| 138 | } |
| 139 | } |
| 140 | // Is it a surface ship? |
| 141 | else if(ShipType == TYPE_SHIPcxx . . $ `src/submarine.h:36:9`!) { |
| 142 | switch(Friend){ |
| 143 | case 0: //Foe?? |
| 144 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x-2 ,y+2, 7, 'F', blackcxx . . $ black.); //Diamond |
| 145 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'F', color); //Diamond |
| 146 | break; |
| 147 | case 1: //Friend?? |
| 148 | DrawCirclecxx . . $ DrawCircle(23d17e51af626352).(screencxx . . $ screen., x-2, y+2, 7, blackcxx . . $ black.); //Circle |
| 149 | DrawCirclecxx . . $ DrawCircle(23d17e51af626352).(screencxx . . $ screen., x, y, 7, color); //Circle |
| 150 | break; |
| 151 | case 2: //Unknown?? |
| 152 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x-2 ,y+2, 7, 'F', blackcxx . . $ black.); //Box |
| 153 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'F', color); //Box |
| 154 | break; |
| 155 | default: //Neutral |
| 156 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x-2 ,y+2, 7, 'F', blackcxx . . $ black.); //Cross |
| 157 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'F', color); //Cross |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | // Is it an airplane or Helo? |
| 162 | else if(ShipType == TYPE_HELICOPTERcxx . . $ `src/submarine.h:40:9`!) { |
| 163 | switch(Friend){ |
| 164 | case 0: //Foe?? |
| 165 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x, y, 7, 'T', color); //Top Half Diamond |
| 166 | break; |
| 167 | case 1: //Friend?? |
| 168 | DrawArccxx . . $ DrawArc(ff1e8d23fb3fb7e5).(screencxx . . $ screen., x ,y, 7, 0, 180, color); //Top SemiCircle |
| 169 | break; |
| 170 | case 2: //Unknown?? |
| 171 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'T', color); //Top Half Box |
| 172 | break; |
| 173 | default: //Neutral |
| 174 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x ,y, 7, 'T', color); //Top Half Cross |
| 175 | } |
| 176 | } |
| 177 | else if (ShipType == TYPE_TORPEDOcxx . . $ `src/submarine.h:38:9`!) |
| 178 | { |
| 179 | DrawDiamondcxx . . $ DrawDiamond(9b0c43a30c43b495).(screencxx . . $ screen., x, y, 7, 'B', color); |
| 180 | DrawLinecxx . . $ DrawLine(1738f3ac1892ed0c).(screencxx . . $ screen., x, y-5, x, y, color); |
| 181 | } |
| 182 | else if (ShipType == TYPE_NOISEMAKERcxx . . $ `src/submarine.h:39:9`!) |
| 183 | { |
| 184 | DrawBoxcxx . . $ DrawBox(9b0c43a30c43b495).(screencxx . . $ screen., x, y, 7, 'B', color); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | |
| 189 | void DirectionalPointercxx . . $ DirectionalPointer(6fb2c7d311165c4f).(int x, int y, int heading, int speed,Uint32cxx . . $ Uint32# color){ |
| 190 | //Draws a directional vane on a ships map icon. |
| 191 | //the length will vary depending on the speed. |
| 192 | |
| 193 | double var1; //just a place to hold a value so we don't have to calc it twice. |
| 194 | double destinationx; //the dest x&y point for |
| 195 | double destinationy; //the drawn line. |
| 196 | |
| 197 | if((speed > 1) || (speed < -1)) speed=speed/2; //allow for 0 speed. |
| 198 | var1 = heading * 0.017453; //convert degrees to radians. |
| 199 | destinationx = (sincxx . . $ sin(fee4f1d22bc8e617).(var1) * speed) + x; |
| 200 | destinationy = (-1) * (coscxx . . $ cos(fee4f1d22bc8e617).(var1) * speed) + y; |
| 201 | DrawLinecxx . . $ DrawLine(1738f3ac1892ed0c).(screencxx . . $ screen., x, y, (int)destinationx, (int)destinationy, color); |
| 202 | } |
| 203 | |
| 204 | void LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(int item){ |
| 205 | //Loads a PN file into an SDL surface then |
| 206 | //blits it to the display surface. |
| 207 | //then deletes the temporary surface. |
| 208 | |
| 209 | |
| 210 | SDL_Surface *IMGFile=NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; // Get our selfs a surface to work with.. |
| 211 | SDL_Rect dest; //A rectangle structure to define a blit area |
| 212 | switch (item) |
| 213 | { |
| 214 | case 0: |
| 215 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/tittle.png"); //fill the surface w/ the bmp |
| 216 | break; |
| 217 | case 1: |
| 218 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/Sonarscreen.png"); //fill the surface w/ the bmp |
| 219 | break; |
| 220 | case 2: |
| 221 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/Mapscreen.png"); //fill the surface w/ the bmp |
| 222 | break; |
| 223 | case 3: |
| 224 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/Mapscreen.png"); //fill the surface w/ the bmp |
| 225 | break; |
| 226 | case 4: |
| 227 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ControlScreen.png"); //fill the surface w/ the bmp |
| 228 | break; |
| 229 | case 5: |
| 230 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/RadarScreen.png"); //fill the surface w/ the bmp |
| 231 | break; |
| 232 | case 6: |
| 233 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ESMScreen.png"); //fill the surface w/ the bmp |
| 234 | break; |
| 235 | case 7: |
| 236 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/sub_surfacing.png"); break; |
| 237 | case 8: |
| 238 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/sub_rising.png"); break; |
| 239 | case 9: |
| 240 | IMGFile = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/sub_menu.png"); break; |
| 241 | default: |
| 242 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Unknown screen item" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 243 | break; |
| 244 | } |
| 245 | if ( IMGFile == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 246 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Function LoadScreen()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 247 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Couldn't load screen item# " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). item <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a).endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 248 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "SDL Error: " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 249 | SDL_Quit(); |
| 250 | exit(0); |
| 251 | return; // Whine Snivel and Bail.. |
| 252 | } |
| 253 | dest.x = 0; // Blit destination x&y to the upper left |
| 254 | dest.y = 0; |
| 255 | dest.w = IMGFile->w; // Height and width equal to the |
| 256 | dest.h = IMGFile->h; // source images.... |
| 257 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(IMGFile, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &dest); // Do the actual Blit |
| 258 | SDL_UpdateRects(screencxx . . $ screen., 1, &dest); //Show the screen... |
| 259 | SDL_FreeSurface(IMGFile); //Free up the surface memory.. |
| 260 | return; |
| 261 | } |
| 262 | |
| 263 | void LoadWidgetscxx . . $ LoadWidgets(49f6e7a06ebc5aa8).(){ |
| 264 | SDL_Surface *temp; |
| 265 | |
| 266 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mapup.png"); |
| 267 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) navbuttonupcxx . . $ navbuttonup. = SDL_DisplayFormat(temp); |
| 268 | if ( navbuttonupcxx . . $ navbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 269 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 270 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 271 | SDL_Quit(); |
| 272 | exit(0); |
| 273 | } |
| 274 | SDL_FreeSurface(temp); |
| 275 | |
| 276 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mapdown.png"); |
| 277 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) navbuttondowncxx . . $ navbuttondown. = SDL_DisplayFormat(temp); |
| 278 | if ( navbuttondowncxx . . $ navbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 279 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 280 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 281 | SDL_Quit(); |
| 282 | exit(0); |
| 283 | } |
| 284 | SDL_FreeSurface(temp); |
| 285 | |
| 286 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/tmaup.png"); |
| 287 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) tmabuttonupcxx . . $ tmabuttonup. = SDL_DisplayFormat(temp); |
| 288 | if ( tmabuttonupcxx . . $ tmabuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 289 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 290 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 291 | SDL_Quit(); |
| 292 | exit(0); |
| 293 | } |
| 294 | SDL_FreeSurface(temp); |
| 295 | |
| 296 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/tmadown.png"); |
| 297 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) tmabuttondowncxx . . $ tmabuttondown. = SDL_DisplayFormat(temp); |
| 298 | if ( tmabuttondowncxx . . $ tmabuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 299 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 300 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 301 | SDL_Quit(); |
| 302 | exit(0); |
| 303 | } |
| 304 | SDL_FreeSurface(temp); |
| 305 | |
| 306 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/shipcontrolup.png"); |
| 307 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) shipcontrolbuttonupcxx . . $ shipcontrolbuttonup. = SDL_DisplayFormat(temp); |
| 308 | if ( shipcontrolbuttonupcxx . . $ shipcontrolbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 309 | |
| 310 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 311 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 312 | SDL_Quit(); |
| 313 | exit(0); |
| 314 | } |
| 315 | SDL_FreeSurface(temp); |
| 316 | |
| 317 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/shipcontroldown.png"); |
| 318 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) shipcontrolbuttondowncxx . . $ shipcontrolbuttondown. = SDL_DisplayFormat(temp); |
| 319 | if ( shipcontrolbuttondowncxx . . $ shipcontrolbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 320 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 321 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 322 | SDL_Quit(); |
| 323 | exit(0); |
| 324 | } |
| 325 | SDL_FreeSurface(temp); |
| 326 | |
| 327 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/esmup.png"); |
| 328 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) esmbuttonupcxx . . $ esmbuttonup. = SDL_DisplayFormat(temp); |
| 329 | if ( esmbuttonupcxx . . $ esmbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 330 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 331 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 332 | SDL_Quit(); |
| 333 | exit(0); |
| 334 | } |
| 335 | SDL_FreeSurface(temp); |
| 336 | |
| 337 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/esmdown.png"); |
| 338 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) esmbuttondowncxx . . $ esmbuttondown. = SDL_DisplayFormat(temp); |
| 339 | if ( esmbuttondowncxx . . $ esmbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 340 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 341 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 342 | SDL_Quit(); |
| 343 | exit(0); |
| 344 | } |
| 345 | SDL_FreeSurface(temp); |
| 346 | |
| 347 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/radarup.png"); |
| 348 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) radarbuttonupcxx . . $ radarbuttonup. = SDL_DisplayFormat(temp); |
| 349 | if ( radarbuttonupcxx . . $ radarbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 350 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 351 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 352 | SDL_Quit(); |
| 353 | exit(0); |
| 354 | } |
| 355 | SDL_FreeSurface(temp); |
| 356 | |
| 357 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/radardown.png"); |
| 358 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) radarbuttondowncxx . . $ radarbuttondown. = SDL_DisplayFormat(temp); |
| 359 | if ( radarbuttondowncxx . . $ radarbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 360 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 361 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 362 | SDL_Quit(); |
| 363 | exit(0); |
| 364 | } |
| 365 | SDL_FreeSurface(temp); |
| 366 | |
| 367 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/quitbuttonup.png"); |
| 368 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) quitbuttonupcxx . . $ quitbuttonup. = SDL_DisplayFormat(temp); |
| 369 | if ( quitbuttonupcxx . . $ quitbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 370 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 371 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 372 | SDL_Quit(); |
| 373 | exit(0); |
| 374 | } |
| 375 | SDL_FreeSurface(temp); |
| 376 | |
| 377 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/quitbuttondown.png"); |
| 378 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) quitbuttondowncxx . . $ quitbuttondown. = SDL_DisplayFormat(temp); |
| 379 | if ( quitbuttondowncxx . . $ quitbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 380 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 381 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 382 | SDL_Quit(); |
| 383 | exit(0); |
| 384 | } |
| 385 | SDL_FreeSurface(temp); |
| 386 | |
| 387 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/plusbuttonup.png"); |
| 388 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) plusbuttonupcxx . . $ plusbuttonup. = SDL_DisplayFormat(temp); |
| 389 | if ( quitbuttonupcxx . . $ quitbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 390 | |
| 391 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 392 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 393 | SDL_Quit(); |
| 394 | exit(0); |
| 395 | } |
| 396 | SDL_FreeSurface(temp); |
| 397 | |
| 398 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/plusbuttondown.png"); |
| 399 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) plusbuttondowncxx . . $ plusbuttondown. = SDL_DisplayFormat(temp); |
| 400 | if ( quitbuttondowncxx . . $ quitbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 401 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 402 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 403 | SDL_Quit(); |
| 404 | exit(0); |
| 405 | } |
| 406 | SDL_FreeSurface(temp); |
| 407 | |
| 408 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/minusbuttonup.png"); |
| 409 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) minusbuttonupcxx . . $ minusbuttonup. = SDL_DisplayFormat(temp); |
| 410 | if ( minusbuttonupcxx . . $ minusbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 411 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 412 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 413 | SDL_Quit(); |
| 414 | exit(0); |
| 415 | } |
| 416 | SDL_FreeSurface(temp); |
| 417 | |
| 418 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/minusbuttondown.png"); |
| 419 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) minusbuttondowncxx . . $ minusbuttondown. = SDL_DisplayFormat(temp); |
| 420 | if ( minusbuttondowncxx . . $ minusbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 421 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 422 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 423 | SDL_Quit(); |
| 424 | exit(0); |
| 425 | } |
| 426 | SDL_FreeSurface(temp); |
| 427 | |
| 428 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/centerbuttondown.png"); |
| 429 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) centerbuttondowncxx . . $ centerbuttondown. = SDL_DisplayFormat(temp); |
| 430 | if ( centerbuttondowncxx . . $ centerbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 431 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 432 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 433 | SDL_Quit(); |
| 434 | exit(0); |
| 435 | } |
| 436 | SDL_FreeSurface(temp); |
| 437 | |
| 438 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/centerbuttonup.png"); |
| 439 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) centerbuttonupcxx . . $ centerbuttonup. = SDL_DisplayFormat(temp); |
| 440 | if ( centerbuttonupcxx . . $ centerbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 441 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 442 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 443 | SDL_Quit(); |
| 444 | exit(0); |
| 445 | } |
| 446 | SDL_FreeSurface(temp); |
| 447 | |
| 448 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/upbuttondown.png"); |
| 449 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) upbuttondowncxx . . $ upbuttondown. = SDL_DisplayFormat(temp); |
| 450 | if ( upbuttondowncxx . . $ upbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 451 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 452 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 453 | SDL_Quit(); |
| 454 | exit(0); |
| 455 | } |
| 456 | SDL_FreeSurface(temp); |
| 457 | |
| 458 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/upbuttonup.png"); |
| 459 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) upbuttonupcxx . . $ upbuttonup. = SDL_DisplayFormat(temp); |
| 460 | if ( upbuttonupcxx . . $ upbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 461 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 462 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 463 | SDL_Quit(); |
| 464 | exit(0); |
| 465 | } |
| 466 | SDL_FreeSurface(temp); |
| 467 | |
| 468 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/downbuttondown.png"); |
| 469 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) downbuttondowncxx . . $ downbuttondown. = SDL_DisplayFormat(temp); |
| 470 | if ( centerbuttondowncxx . . $ centerbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 471 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 472 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 473 | SDL_Quit(); |
| 474 | exit(0); |
| 475 | } |
| 476 | SDL_FreeSurface(temp); |
| 477 | |
| 478 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/downbuttonup.png"); |
| 479 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) downbuttonupcxx . . $ downbuttonup. = SDL_DisplayFormat(temp); |
| 480 | if ( downbuttonupcxx . . $ downbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 481 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 482 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 483 | SDL_Quit(); |
| 484 | exit(0); |
| 485 | } |
| 486 | SDL_FreeSurface(temp); |
| 487 | |
| 488 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/leftbuttondown.png"); |
| 489 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) leftbuttondowncxx . . $ leftbuttondown. = SDL_DisplayFormat(temp); |
| 490 | if ( leftbuttondowncxx . . $ leftbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 491 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 492 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 493 | SDL_Quit(); |
| 494 | exit(0); |
| 495 | } |
| 496 | SDL_FreeSurface(temp); |
| 497 | |
| 498 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/leftbuttonup.png"); |
| 499 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) leftbuttonupcxx . . $ leftbuttonup. = SDL_DisplayFormat(temp); |
| 500 | if ( leftbuttonupcxx . . $ leftbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 501 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 502 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 503 | SDL_Quit(); |
| 504 | exit(0); |
| 505 | } |
| 506 | SDL_FreeSurface(temp); |
| 507 | |
| 508 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/rightbuttondown.png"); |
| 509 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) rightbuttondowncxx . . $ rightbuttondown. = SDL_DisplayFormat(temp); |
| 510 | if ( rightbuttondowncxx . . $ rightbuttondown. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 511 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 512 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 513 | SDL_Quit(); |
| 514 | exit(0); |
| 515 | } |
| 516 | SDL_FreeSurface(temp); |
| 517 | |
| 518 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/rightbuttonup.png"); |
| 519 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) rightbuttonupcxx . . $ rightbuttonup. = SDL_DisplayFormat(temp); |
| 520 | if ( rightbuttonupcxx . . $ rightbuttonup. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { // Are we screwed?? |
| 521 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 522 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 523 | SDL_Quit(); |
| 524 | exit(0); |
| 525 | } |
| 526 | SDL_FreeSurface(temp); |
| 527 | |
| 528 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/noisemaker.png"); |
| 529 | if (temp) |
| 530 | { |
| 531 | noisemaker_imagecxx . . $ noisemaker_image. = SDL_DisplayFormat(temp); |
| 532 | if (! noisemaker_imagecxx . . $ noisemaker_image.) |
| 533 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Error loading noisemaker image." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 534 | SDL_FreeSurface(temp); |
| 535 | } |
| 536 | |
| 537 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/torpedo.png"); |
| 538 | if (temp) |
| 539 | { |
| 540 | torpedo_imagecxx . . $ torpedo_image. = SDL_DisplayFormat(temp); |
| 541 | if (! noisemaker_imagecxx . . $ noisemaker_image.) |
| 542 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Error loading torpedo image." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 543 | SDL_FreeSurface(temp); |
| 544 | } |
| 545 | |
| 546 | } |
| 547 | |
| 548 | |
| 549 | |
| 550 | void UnLoadWidgetscxx . . $ UnLoadWidgets(49f6e7a06ebc5aa8).(){ |
| 551 | |
| 552 | //free the surfaces |
| 553 | |
| 554 | SDL_FreeSurface(sonarbuttonupcxx . . $ sonarbuttonup.); |
| 555 | SDL_FreeSurface(sonarbuttondowncxx . . $ sonarbuttondown.); |
| 556 | SDL_FreeSurface(navbuttonupcxx . . $ navbuttonup.); |
| 557 | SDL_FreeSurface(navbuttondowncxx . . $ navbuttondown.); |
| 558 | SDL_FreeSurface(tmabuttonupcxx . . $ tmabuttonup.); |
| 559 | SDL_FreeSurface(tmabuttondowncxx . . $ tmabuttondown.); |
| 560 | SDL_FreeSurface(quitbuttonupcxx . . $ quitbuttonup.); |
| 561 | SDL_FreeSurface(quitbuttondowncxx . . $ quitbuttondown.); |
| 562 | SDL_FreeSurface(plusbuttonupcxx . . $ plusbuttonup.); |
| 563 | SDL_FreeSurface(plusbuttondowncxx . . $ plusbuttondown.); |
| 564 | SDL_FreeSurface(minusbuttonupcxx . . $ minusbuttonup.); |
| 565 | SDL_FreeSurface(minusbuttondowncxx . . $ minusbuttondown.); |
| 566 | SDL_FreeSurface(torpedo_imagecxx . . $ torpedo_image.); |
| 567 | SDL_FreeSurface(noisemaker_imagecxx . . $ noisemaker_image.); |
| 568 | } |
| 569 | |
| 570 | void DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(){ |
| 571 | if (navwidgetcxx . . $ navwidget.){ // is the nav button down? |
| 572 | destination_rectanglecxx . . $ destination_rectangle..x = 280; //upper left corner to |
| 573 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 574 | destination_rectanglecxx . . $ destination_rectangle..h = navbuttondowncxx . . $ navbuttondown.->h; //height & |
| 575 | destination_rectanglecxx . . $ destination_rectangle..w = navbuttondowncxx . . $ navbuttondown.->w;//width of button. |
| 576 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(navbuttondowncxx . . $ navbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 577 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 578 | if(mapcentercxx . . $ mapcenter.){ |
| 579 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 580 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 581 | destination_rectanglecxx . . $ destination_rectangle..h = centerbuttondowncxx . . $ centerbuttondown.->h; //height & |
| 582 | destination_rectanglecxx . . $ destination_rectangle..w = centerbuttondowncxx . . $ centerbuttondown.->w;//width of button. |
| 583 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(centerbuttondowncxx . . $ centerbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 584 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 585 | }else{ |
| 586 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 587 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 588 | destination_rectanglecxx . . $ destination_rectangle..h = centerbuttonupcxx . . $ centerbuttonup.->h; //height & |
| 589 | destination_rectanglecxx . . $ destination_rectangle..w = centerbuttonupcxx . . $ centerbuttonup.->w;//width of button. |
| 590 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(centerbuttonupcxx . . $ centerbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 591 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 592 | } |
| 593 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 594 | destination_rectanglecxx . . $ destination_rectangle..y = 219; //place the button. |
| 595 | destination_rectanglecxx . . $ destination_rectangle..h = upbuttonupcxx . . $ upbuttonup.->h; //height & |
| 596 | destination_rectanglecxx . . $ destination_rectangle..w = upbuttonupcxx . . $ upbuttonup.->w;//width of button. |
| 597 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(upbuttonupcxx . . $ upbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 598 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 599 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 600 | destination_rectanglecxx . . $ destination_rectangle..y = 319; //place the button. |
| 601 | destination_rectanglecxx . . $ destination_rectangle..h = downbuttonupcxx . . $ downbuttonup.->h; //height & |
| 602 | destination_rectanglecxx . . $ destination_rectangle..w = downbuttonupcxx . . $ downbuttonup.->w;//width of button. |
| 603 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(downbuttonupcxx . . $ downbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit |
| 604 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.. |
| 605 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 606 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 607 | destination_rectanglecxx . . $ destination_rectangle..h = leftbuttonupcxx . . $ leftbuttonup.->h; //height & |
| 608 | destination_rectanglecxx . . $ destination_rectangle..w = leftbuttonupcxx . . $ leftbuttonup.->w;//width of button. |
| 609 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(leftbuttonupcxx . . $ leftbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 610 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 611 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 612 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 613 | destination_rectanglecxx . . $ destination_rectangle..h = rightbuttonupcxx . . $ rightbuttonup.->h; //height & |
| 614 | destination_rectanglecxx . . $ destination_rectangle..w = rightbuttonupcxx . . $ rightbuttonup.->w;//width of button. |
| 615 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(rightbuttonupcxx . . $ rightbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 616 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 617 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 618 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 619 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttonupcxx . . $ plusbuttonup.->h; //height & |
| 620 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttonupcxx . . $ plusbuttonup.->w;//width of button. |
| 621 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttonupcxx . . $ plusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 622 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 623 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 624 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 625 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttonupcxx . . $ minusbuttonup.->h; //height & |
| 626 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttonupcxx . . $ minusbuttonup.->w;//width of button. |
| 627 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttonupcxx . . $ minusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 628 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 629 | }else{ // our button must be up... |
| 630 | destination_rectanglecxx . . $ destination_rectangle..x = 280; //upper left corner to |
| 631 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 632 | destination_rectanglecxx . . $ destination_rectangle..h = navbuttonupcxx . . $ navbuttonup.->h; //height & |
| 633 | destination_rectanglecxx . . $ destination_rectangle..w = navbuttonupcxx . . $ navbuttonup.->w;//width of button. |
| 634 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(navbuttonupcxx . . $ navbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 635 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | void DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(){ |
| 640 | if (tmawidgetcxx . . $ tmawidget.){ // is the TMA button down? |
| 641 | destination_rectanglecxx . . $ destination_rectangle..x = 380; //upper left corner to |
| 642 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 643 | destination_rectanglecxx . . $ destination_rectangle..h = tmabuttondowncxx . . $ tmabuttondown.->h; //height & |
| 644 | destination_rectanglecxx . . $ destination_rectangle..w = tmabuttondowncxx . . $ tmabuttondown.->w;//width of button. |
| 645 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(tmabuttondowncxx . . $ tmabuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 646 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 647 | if(Tmacxx . . $ Tma..centerGeoPlotcxx . . $ TargetMotionAnalysis#centerGeoPlot.){ |
| 648 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 649 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 650 | destination_rectanglecxx . . $ destination_rectangle..h = centerbuttondowncxx . . $ centerbuttondown.->h; //height & |
| 651 | destination_rectanglecxx . . $ destination_rectangle..w = centerbuttondowncxx . . $ centerbuttondown.->w;//width of button. |
| 652 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(centerbuttondowncxx . . $ centerbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 653 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 654 | }else{ |
| 655 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 656 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 657 | destination_rectanglecxx . . $ destination_rectangle..h = centerbuttonupcxx . . $ centerbuttonup.->h; //height & |
| 658 | destination_rectanglecxx . . $ destination_rectangle..w = centerbuttonupcxx . . $ centerbuttonup.->w;//width of button. |
| 659 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(centerbuttonupcxx . . $ centerbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 660 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 661 | } |
| 662 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 663 | destination_rectanglecxx . . $ destination_rectangle..y = 219; //place the button. |
| 664 | destination_rectanglecxx . . $ destination_rectangle..h = upbuttonupcxx . . $ upbuttonup.->h; //height & |
| 665 | destination_rectanglecxx . . $ destination_rectangle..w = upbuttonupcxx . . $ upbuttonup.->w;//width of button. |
| 666 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(upbuttonupcxx . . $ upbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 667 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 668 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 669 | destination_rectanglecxx . . $ destination_rectangle..y = 319; //place the button. |
| 670 | destination_rectanglecxx . . $ destination_rectangle..h = downbuttonupcxx . . $ downbuttonup.->h; //height & |
| 671 | destination_rectanglecxx . . $ destination_rectangle..w = downbuttonupcxx . . $ downbuttonup.->w;//width of button. |
| 672 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(downbuttonupcxx . . $ downbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit |
| 673 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.. |
| 674 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 675 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 676 | destination_rectanglecxx . . $ destination_rectangle..h = leftbuttonupcxx . . $ leftbuttonup.->h; //height & |
| 677 | destination_rectanglecxx . . $ destination_rectangle..w = leftbuttonupcxx . . $ leftbuttonup.->w;//width of button. |
| 678 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(leftbuttonupcxx . . $ leftbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 679 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 680 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 681 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 682 | destination_rectanglecxx . . $ destination_rectangle..h = rightbuttonupcxx . . $ rightbuttonup.->h; //height & |
| 683 | destination_rectanglecxx . . $ destination_rectangle..w = rightbuttonupcxx . . $ rightbuttonup.->w;//width of button. |
| 684 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(rightbuttonupcxx . . $ rightbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 685 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 686 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 687 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 688 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttonupcxx . . $ plusbuttonup.->h; //height & |
| 689 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttonupcxx . . $ plusbuttonup.->w;//width of button. |
| 690 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttonupcxx . . $ plusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 691 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 692 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 693 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 694 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttonupcxx . . $ minusbuttonup.->h; //height & |
| 695 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttonupcxx . . $ minusbuttonup.->w;//width of button. |
| 696 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttonupcxx . . $ minusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 697 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 698 | }else{ // our button must be up... |
| 699 | destination_rectanglecxx . . $ destination_rectangle..x = 380; //upper left corner to |
| 700 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 701 | destination_rectanglecxx . . $ destination_rectangle..h = tmabuttonupcxx . . $ tmabuttonup.->h; //height & |
| 702 | destination_rectanglecxx . . $ destination_rectangle..w = tmabuttonupcxx . . $ tmabuttonup.->w;//width of button. |
| 703 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(tmabuttonupcxx . . $ tmabuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 704 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | void DisplayESMWidgetscxx . . $ DisplayESMWidgets(49f6e7a06ebc5aa8).(){ |
| 709 | destination_rectanglecxx . . $ destination_rectangle..x = 580; //upper left corner to |
| 710 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 711 | |
| 712 | if (esmwidgetcxx . . $ esmwidget.){ // is the nav button down? |
| 713 | destination_rectanglecxx . . $ destination_rectangle..h =esmbuttondowncxx . . $ esmbuttondown.->h; //height & |
| 714 | destination_rectanglecxx . . $ destination_rectangle..w = esmbuttondowncxx . . $ esmbuttondown.->w;//width of button. |
| 715 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(esmbuttondowncxx . . $ esmbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 716 | }else{ // our button must be up... |
| 717 | destination_rectanglecxx . . $ destination_rectangle..h = esmbuttonupcxx . . $ esmbuttonup.->h; //height & |
| 718 | destination_rectanglecxx . . $ destination_rectangle..w = esmbuttonupcxx . . $ esmbuttonup.->w;//width of button. |
| 719 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(esmbuttonupcxx . . $ esmbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 720 | } |
| 721 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 722 | } |
| 723 | |
| 724 | void DisplayRADARWidgetscxx . . $ DisplayRADARWidgets(49f6e7a06ebc5aa8).(){ |
| 725 | destination_rectanglecxx . . $ destination_rectangle..x = 680; //upper left corner to |
| 726 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 727 | |
| 728 | if (radarwidgetcxx . . $ radarwidget.){ // is the nav button down? |
| 729 | destination_rectanglecxx . . $ destination_rectangle..h =radarbuttondowncxx . . $ radarbuttondown.->h; //height & |
| 730 | destination_rectanglecxx . . $ destination_rectangle..w = radarbuttondowncxx . . $ radarbuttondown.->w;//width of button. |
| 731 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(radarbuttondowncxx . . $ radarbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 732 | }else{ // our button must be up... |
| 733 | destination_rectanglecxx . . $ destination_rectangle..h = radarbuttonupcxx . . $ radarbuttonup.->h; //height & |
| 734 | destination_rectanglecxx . . $ destination_rectangle..w = radarbuttonupcxx . . $ radarbuttonup.->w;//width of button. |
| 735 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(radarbuttonupcxx . . $ radarbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 736 | } |
| 737 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 738 | } |
| 739 | |
| 740 | void DisplayShipControlWidgetscxx . . $ DisplayShipControlWidgets(49f6e7a06ebc5aa8).(){ |
| 741 | destination_rectanglecxx . . $ destination_rectangle..x = 480; //upper left corner to |
| 742 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 743 | |
| 744 | if (shipcontrolwidgetcxx . . $ shipcontrolwidget.){ // is the nav button down? |
| 745 | destination_rectanglecxx . . $ destination_rectangle..h = shipcontrolbuttondowncxx . . $ shipcontrolbuttondown.->h; //height & |
| 746 | destination_rectanglecxx . . $ destination_rectangle..w = shipcontrolbuttondowncxx . . $ shipcontrolbuttondown.->w;//width of button. |
| 747 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(shipcontrolbuttondowncxx . . $ shipcontrolbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 748 | }else{ // our button must be up... |
| 749 | destination_rectanglecxx . . $ destination_rectangle..h = shipcontrolbuttonupcxx . . $ shipcontrolbuttonup.->h; //height & |
| 750 | destination_rectanglecxx . . $ destination_rectangle..w = shipcontrolbuttonupcxx . . $ shipcontrolbuttonup.->w;//width of button. |
| 751 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(shipcontrolbuttonupcxx . . $ shipcontrolbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 752 | } |
| 753 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 754 | } |
| 755 | void DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(){ |
| 756 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 757 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 758 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 759 | DisplayShipControlWidgetscxx . . $ DisplayShipControlWidgets(49f6e7a06ebc5aa8).(); |
| 760 | DisplayESMWidgetscxx . . $ DisplayESMWidgets(49f6e7a06ebc5aa8).(); |
| 761 | DisplayRADARWidgetscxx . . $ DisplayRADARWidgets(49f6e7a06ebc5aa8).(); |
| 762 | |
| 763 | destination_rectanglecxx . . $ destination_rectangle..x = 780; //upper left corner to |
| 764 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 765 | if (quitwidgetcxx . . $ quitwidget.){ // is the quit button down? |
| 766 | destination_rectanglecxx . . $ destination_rectangle..h = quitbuttondowncxx . . $ quitbuttondown.->h; //height & |
| 767 | destination_rectanglecxx . . $ destination_rectangle..w = quitbuttondowncxx . . $ quitbuttondown.->w;//width of button. |
| 768 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(quitbuttondowncxx . . $ quitbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 769 | }else{ // our button must be up... |
| 770 | destination_rectanglecxx . . $ destination_rectangle..h = quitbuttonupcxx . . $ quitbuttonup.->h; //height & |
| 771 | destination_rectanglecxx . . $ destination_rectangle..w = quitbuttonupcxx . . $ quitbuttonup.->w;//width of button. |
| 772 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(quitbuttonupcxx . . $ quitbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 773 | } |
| 774 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 775 | |
| 776 | destination_rectanglecxx . . $ destination_rectangle..x = 880; //upper left corner to |
| 777 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 778 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttonupcxx . . $ plusbuttonup.->h; //height & |
| 779 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttonupcxx . . $ plusbuttonup.->w;//width of button. |
| 780 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttonupcxx . . $ plusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 781 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show button on the screen... |
| 782 | destination_rectanglecxx . . $ destination_rectangle..x = 970; //upper left corner to |
| 783 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 784 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttonupcxx . . $ minusbuttonup.->h; //height & |
| 785 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttonupcxx . . $ minusbuttonup.->w;//width of button. |
| 786 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttonupcxx . . $ minusbuttonup., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 787 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show button on the screen... |
| 788 | |
| 789 | } |
| 790 | |
| 791 | |
| 792 | |
| 793 | // This function adds a torpedo to the linked-list of torpedoes |
| 794 | // The returned value is the new linked-list pointer, in case |
| 795 | // the new_torpedo is the first in the list. |
| 796 | Submarinecxx . . $ Submarine# *Add_Shipcxx . . $ Add_Ship(d62bab4205bed956).(Submarinecxx . . $ Submarine# *all_torp, Submarinecxx . . $ Submarine# *new_torp) |
| 797 | { |
| 798 | Submarinecxx . . $ Submarine# *my_torp; |
| 799 | |
| 800 | // we do not have a torpedo to add |
| 801 | if (! new_torp) |
| 802 | return all_torp; |
| 803 | |
| 804 | // empty list |
| 805 | if (! all_torp) |
| 806 | return new_torp; |
| 807 | |
| 808 | // add one to an existing list |
| 809 | my_torp = all_torp; |
| 810 | while (my_torp->nextcxx . . $ Submarine#next.) |
| 811 | my_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 812 | |
| 813 | // add to end of list |
| 814 | my_torp->nextcxx . . $ Submarine#next. = new_torp; |
| 815 | |
| 816 | return all_torp; |
| 817 | } |
| 818 | |
| 819 | |
| 820 | // This function removes a torpedo from the list of all |
| 821 | // torpedoes. It returns the first item in the torpedo linked-list. |
| 822 | Submarinecxx . . $ Submarine# *Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(Submarinecxx . . $ Submarine# *all_torpedoes, Submarinecxx . . $ Submarine# *old_torpedo) |
| 823 | { |
| 824 | Submarinecxx . . $ Submarine# *my_torp, *previous; |
| 825 | |
| 826 | if (! all_torpedoes) |
| 827 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 828 | if (! old_torpedo) |
| 829 | return all_torpedoes; |
| 830 | |
| 831 | my_torp = all_torpedoes; |
| 832 | previous = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 833 | while (my_torp) |
| 834 | { |
| 835 | // found match and it is the first in the list |
| 836 | if ( (my_torp == old_torpedo) && (! previous) ) |
| 837 | { |
| 838 | previous = my_torp->nextcxx . . $ Submarine#next.; |
| 839 | delete my_torp; |
| 840 | return previous; |
| 841 | } |
| 842 | // found a match and it isn't the first in the list |
| 843 | else if (my_torp == old_torpedo) |
| 844 | { |
| 845 | previous->nextcxx . . $ Submarine#next. = my_torp->nextcxx . . $ Submarine#next.; |
| 846 | delete my_torp; |
| 847 | return all_torpedoes; |
| 848 | } |
| 849 | // this one does not match, go to next node |
| 850 | else |
| 851 | { |
| 852 | previous = my_torp; |
| 853 | my_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 854 | } |
| 855 | |
| 856 | } |
| 857 | // item wasn't found, just return the complete list |
| 858 | return all_torpedoes; |
| 859 | } |
| 860 | |
| 861 | |
| 862 | |
| 863 | Helicoptercxx . . $ Helicopter# *Add_Helicoptercxx . . $ Add_Helicopter(db7b114f298089df).(Helicoptercxx . . $ Helicopter# *all_helicopters, Helicoptercxx . . $ Helicopter# *new_helicopter) |
| 864 | { |
| 865 | Helicoptercxx . . $ Helicopter# *current; |
| 866 | |
| 867 | if (! new_helicopter) |
| 868 | return all_helicopters; |
| 869 | if (! all_helicopters) |
| 870 | return new_helicopter; |
| 871 | |
| 872 | current = all_helicopters; |
| 873 | while (current->nextcxx . . $ Helicopter#next.) |
| 874 | current = current->nextcxx . . $ Helicopter#next.; |
| 875 | current->nextcxx . . $ Helicopter#next. = new_helicopter; |
| 876 | |
| 877 | return all_helicopters; |
| 878 | } |
| 879 | |
| 880 | |
| 881 | |
| 882 | Helicoptercxx . . $ Helicopter# *Remove_Helicoptercxx . . $ Remove_Helicopter(db7b114f298089df).(Helicoptercxx . . $ Helicopter# *all_helicopters, Helicoptercxx . . $ Helicopter# *old_helicopter) |
| 883 | { |
| 884 | Helicoptercxx . . $ Helicopter# *current, *previous = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 885 | |
| 886 | if (! all_helicopters) |
| 887 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 888 | if (! old_helicopter) |
| 889 | return all_helicopters; |
| 890 | |
| 891 | current = all_helicopters; |
| 892 | while (current) |
| 893 | { |
| 894 | // first in list |
| 895 | if ( (current == old_helicopter) && (! previous) ) |
| 896 | { |
| 897 | previous = current->nextcxx . . $ Helicopter#next.; |
| 898 | delete current; |
| 899 | return previous; |
| 900 | } |
| 901 | // not first in list |
| 902 | else if (current == old_helicopter) |
| 903 | { |
| 904 | previous->nextcxx . . $ Helicopter#next. = current->nextcxx . . $ Helicopter#next.; |
| 905 | delete current; |
| 906 | return all_helicopters; |
| 907 | } |
| 908 | // this is not our node |
| 909 | else |
| 910 | { |
| 911 | previous = current; |
| 912 | current = current->nextcxx . . $ Helicopter#next.; |
| 913 | } |
| 914 | } |
| 915 | return all_helicopters; |
| 916 | } |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | //###################################### |
| 923 | void ShipHandelingcxx . . $ ShipHandeling(49f6e7a06ebc5aa8).(){ |
| 924 | Submarinecxx . . $ Submarine# *my_torp, *temp_torp; |
| 925 | int status; |
| 926 | Submarinecxx . . $ Submarine# *ship; |
| 927 | Helicoptercxx . . $ Helicopter# *helicopter; |
| 928 | |
| 929 | // see if we can use radar, esm, etc |
| 930 | if (playercxx . . $ player.->Depthcxx . . $ Submarine#Depth. > PERISCOPE_DEPTHcxx . . $ `src/main.h:33:9`!) |
| 931 | { |
| 932 | EsmStationcxx . . $ EsmStation..LowerMastcxx . . $ Esm#LowerMast(49f6e7a06ebc5aa8).(); |
| 933 | RadarStationcxx . . $ RadarStation..LowerMastcxx . . $ Radar#LowerMast(49f6e7a06ebc5aa8).(); |
| 934 | playercxx . . $ player.->using_radarcxx . . $ Submarine#using_radar. = FALSEcxx . . $ `src/map.h:13:9`!; |
| 935 | } |
| 936 | // if array is out, limit speed |
| 937 | if (TB16cxx . . $ TB16..GetLengthcxx . . $ TowedArray#GetLength(b126dc7c1de90089).() > 0) |
| 938 | { |
| 939 | int max_speed = Subscxx . . $ Subs.->MaxSpeedcxx . . $ Submarine#MaxSpeed. / 2; |
| 940 | if (Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed. > max_speed) |
| 941 | Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed. = max_speed; |
| 942 | } |
| 943 | |
| 944 | ship = Subscxx . . $ Subs.; |
| 945 | while (ship) |
| 946 | { |
| 947 | ship->UpdateLatLoncxx . . $ Coord#UpdateLatLon(49f6e7a06ebc5aa8).(); //Move all the ships |
| 948 | // see what the AI wants to do |
| 949 | if (ship != Subscxx . . $ Subs.) |
| 950 | { |
| 951 | /* |
| 952 | if (ship->ShipType == TYPE_SUB) |
| 953 | torpedoes = ship->Sub_AI(Subs, torpedoes); |
| 954 | else if (ship->ShipType == TYPE_SHIP) |
| 955 | torpedoes = ship->Ship_AI(Subs, torpedoes); |
| 956 | */ |
| 957 | torpedoescxx . . $ torpedoes. = ship->Sub_AIcxx . . $ Submarine#Sub_AI(3be2d61bc00ebf6b).(Subscxx . . $ Subs., torpedoescxx . . $ torpedoes., helicopterscxx . . $ helicopters.); |
| 958 | } |
| 959 | ship->Handelingcxx . . $ Submarine#Handeling(49f6e7a06ebc5aa8).(); //Steer, Change Depth etc... |
| 960 | |
| 961 | // we were pinging, but it fades quickly |
| 962 | if (ship->pingingcxx . . $ Submarine#pinging. > 0) |
| 963 | ship->pingingcxx . . $ Submarine#pinging.--; |
| 964 | ship = ship->nextcxx . . $ Submarine#next.; |
| 965 | } |
| 966 | helicopter = helicopterscxx . . $ helicopters.; |
| 967 | while (helicopter) |
| 968 | { |
| 969 | helicopter->UpdateLatLoncxx . . $ Coord#UpdateLatLon(49f6e7a06ebc5aa8).(); |
| 970 | torpedoescxx . . $ torpedoes. = helicopter->Helicopter_AIcxx . . $ Helicopter#Helicopter_AI(d62bab4205bed956).(Subscxx . . $ Subs., torpedoescxx . . $ torpedoes.); |
| 971 | #ifdef DEBUG_HELICOPTER |
| 972 | printf("Course: %d\nSpeed: %d\nHeight: %d\n", |
| 973 | (int) helicopter->Heading, (int) helicopter->Speed, |
| 974 | (int) helicopter->Depth); |
| 975 | printf("DX: %d DY: %d\nX: %d Y: %d\n", |
| 976 | helicopter->destination_x, helicopter->destination_y, |
| 977 | (int) helicopter->Lat_TotalYards, |
| 978 | (int) helicopter->Lon_TotalYards); |
| 979 | #endif |
| 980 | helicopter->Handlecxx . . $ Helicopter#Handle(b126dc7c1de90089).(); |
| 981 | helicopter = helicopter->nextcxx . . $ Helicopter#next.; |
| 982 | } |
| 983 | |
| 984 | for (int x = 0; x < MAX_SUBScxx . . $ `src/main.h:34:9`!; x++){ |
| 985 | Contactscxx . . $ Contacts.[x].UpdateContactcxx . . $ Contact#UpdateContact(49f6e7a06ebc5aa8).(); |
| 986 | } |
| 987 | |
| 988 | // move some torps |
| 989 | my_torp = torpedoescxx . . $ torpedoes.; |
| 990 | while (my_torp) |
| 991 | { |
| 992 | // check to see if this torpedo is chasing the player |
| 993 | if ( (my_torp->targetcxx . . $ Submarine#target. == playercxx . . $ player.) && |
| 994 | (my_torp->fuel_remainingcxx . . $ Submarine#fuel_remaining. == (TORPEDO_FUELcxx . . $ `src/submarine.h:94:9`! - 30)) ) |
| 995 | { |
| 996 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Torpedo coming our way!"); |
| 997 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 998 | } |
| 999 | my_torp->UpdateLatLoncxx . . $ Coord#UpdateLatLon(49f6e7a06ebc5aa8).(); |
| 1000 | my_torp->Torpedo_AIcxx . . $ Submarine#Torpedo_AI(e898ed6f8282e8).(Subscxx . . $ Subs.); // see where we should be going |
| 1001 | my_torp->Handelingcxx . . $ Submarine#Handeling(49f6e7a06ebc5aa8).(); // change heading and depth |
| 1002 | status = my_torp->Check_Statuscxx . . $ Submarine#Check_Status(b126dc7c1de90089).(); // see if we ran into something |
| 1003 | // or we are out of fuel |
| 1004 | if (status == OUT_OF_FUELcxx . . $ `src/submarine.h:97:9`!) |
| 1005 | { |
| 1006 | if (my_torp->ShipTypecxx . . $ Submarine#ShipType. == TYPE_TORPEDOcxx . . $ `src/submarine.h:38:9`!) |
| 1007 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("A torpedo ran out of fuel."); |
| 1008 | else |
| 1009 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Noisemaker stopped running."); |
| 1010 | temp_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 1011 | if (current_targetcxx . . $ current_target. == my_torp) |
| 1012 | current_targetcxx . . $ current_target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1013 | Subscxx . . $ Subs.->Cancel_Targetcxx . . $ Submarine#Cancel_Target(a9ab5cc9dc811b12).(my_torp); |
| 1014 | torpedoescxx . . $ torpedoes. = Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(torpedoescxx . . $ torpedoes., my_torp); |
| 1015 | my_torp = temp_torp; |
| 1016 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 1017 | } |
| 1018 | else if (status == HIT_TARGETcxx . . $ `src/submarine.h:98:9`!) |
| 1019 | { |
| 1020 | int target_status = DAMAGE_OKcxx . . $ `src/submarine.h:101:9`!; |
| 1021 | // damage target |
| 1022 | // we should always have a target, but just in case... |
| 1023 | if (my_torp->targetcxx . . $ Submarine#target.) |
| 1024 | { |
| 1025 | if (my_torp->targetcxx . . $ Submarine#target. == playercxx . . $ player.) |
| 1026 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("We have been hit!"); |
| 1027 | else |
| 1028 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("A torpedo hit its target!"); |
| 1029 | // radio warning to others |
| 1030 | if ( (my_torp->targetcxx . . $ Submarine#target.->ShipTypecxx . . $ Submarine#ShipType. == TYPE_SHIPcxx . . $ `src/submarine.h:36:9`!) && |
| 1031 | (my_torp->targetcxx . . $ Submarine#target.->moodcxx . . $ Submarine#mood. == MOOD_CONVOYcxx . . $ `src/submarine.h:129:9`!) ) |
| 1032 | { |
| 1033 | my_torp->targetcxx . . $ Submarine#target.->Radio_Signalcxx . . $ Submarine#Radio_Signal(8e102eb2bbf433ac).(Subscxx . . $ Subs., RADIO_UNDER_ATTACKcxx . . $ `src/submarine.h:135:9`!); |
| 1034 | } |
| 1035 | target_status = my_torp->targetcxx . . $ Submarine#target.->Take_Damagecxx . . $ Submarine#Take_Damage(b126dc7c1de90089).(); |
| 1036 | if (target_status == DAMAGE_SINKcxx . . $ `src/submarine.h:102:9`!) |
| 1037 | { |
| 1038 | if (my_torp->targetcxx . . $ Submarine#target. == playercxx . . $ player.) |
| 1039 | playercxx . . $ player. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1040 | if (my_torp->targetcxx . . $ Submarine#target.->mission_statuscxx . . $ Submarine#mission_status. == MISSION_ALIVEcxx . . $ `src/submarine.h:111:9`!) |
| 1041 | my_mission_statuscxx . . $ my_mission_status. = MISSION_FAILEDcxx . . $ `src/mission.h:8:9`!; |
| 1042 | Remove_Inactive_Shipcxx . . $ Remove_Inactive_Ship(a9ab5cc9dc811b12).(my_torp->targetcxx . . $ Submarine#target.); |
| 1043 | } |
| 1044 | } |
| 1045 | if (current_targetcxx . . $ current_target. == my_torp) |
| 1046 | current_targetcxx . . $ current_target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1047 | Subscxx . . $ Subs.->Cancel_Targetcxx . . $ Submarine#Cancel_Target(a9ab5cc9dc811b12).(my_torp); |
| 1048 | temp_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 1049 | torpedoescxx . . $ torpedoes. = Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(torpedoescxx . . $ torpedoes., my_torp); |
| 1050 | my_torp = temp_torp; |
| 1051 | // Message.post_message("A torpedo hit its target!"); |
| 1052 | if (target_status == DAMAGE_SINKcxx . . $ `src/submarine.h:102:9`!) |
| 1053 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Target is sinking!"); |
| 1054 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 1055 | } |
| 1056 | else |
| 1057 | my_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 1058 | } // end of all torpedoes |
| 1059 | |
| 1060 | // see if we can still detect the current target |
| 1061 | if (current_targetcxx . . $ current_target.) |
| 1062 | { |
| 1063 | status = playercxx . . $ player.->Can_Detectcxx . . $ Submarine#Can_Detect(e898ed6f8282e8).(current_targetcxx . . $ current_target.); |
| 1064 | if (status < CONTACT_WEAKcxx . . $ `src/submarine.h:48:9`!) |
| 1065 | current_targetcxx . . $ current_target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | // This function may get a little messy, we need to do a few things |
| 1072 | // to remove a ship completely from the scenario. |
| 1073 | // 1. Any torpedoes shooting at this target have to have their |
| 1074 | // target variable set to NULL |
| 1075 | // 2. Any ships/subs who were tracking this ship need to stop |
| 1076 | void Remove_Inactive_Shipcxx . . $ Remove_Inactive_Ship(a9ab5cc9dc811b12).(Submarinecxx . . $ Submarine# *victim) |
| 1077 | { |
| 1078 | Submarinecxx . . $ Submarine# *torpedo; |
| 1079 | Submarinecxx . . $ Submarine# *ship; |
| 1080 | |
| 1081 | if (! victim) // couldn't find victim, this should never happen, quit |
| 1082 | return; |
| 1083 | |
| 1084 | // 1. Cancel torpedoes targetting this ship |
| 1085 | torpedo = torpedoescxx . . $ torpedoes.; |
| 1086 | while (torpedo) |
| 1087 | { |
| 1088 | if (torpedo->targetcxx . . $ Submarine#target. == victim) |
| 1089 | torpedo->targetcxx . . $ Submarine#target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1090 | torpedo = torpedo->nextcxx . . $ Submarine#next.; |
| 1091 | } |
| 1092 | |
| 1093 | // 2. Ships who were tracking this ship need to stop |
| 1094 | ship = Subscxx . . $ Subs.; |
| 1095 | while (ship) |
| 1096 | { |
| 1097 | ship->Cancel_Targetcxx . . $ Submarine#Cancel_Target(a9ab5cc9dc811b12).(victim); |
| 1098 | ship = ship->nextcxx . . $ Submarine#next.; |
| 1099 | } |
| 1100 | |
| 1101 | Subscxx . . $ Subs.->last_targetcxx . . $ Submarine#last_target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1102 | Subscxx . . $ Subs. = Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(Subscxx . . $ Subs., victim); |
| 1103 | if (victim == current_targetcxx . . $ current_target.) |
| 1104 | current_targetcxx . . $ current_target. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1105 | } |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | double RelativeBearingcxx . . $ RelativeBearing(1fc01f0df190a722).(Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target){ |
| 1113 | // Returns the relative bearing of target to observer. This bearing is |
| 1114 | //measured clockwise from on ships heading to target bearing. |
| 1115 | double relative_bearing; |
| 1116 | int observer_heading, bearing_to_target; |
| 1117 | bearing_to_target = (int) observer->BearingToTargetcxx . . $ Submarine#BearingToTarget(2de0d0e522051339).(target ); |
| 1118 | observer_heading = (int)observer->Headingcxx . . $ Coord#Heading.; |
| 1119 | if(observer_heading > bearing_to_target) bearing_to_target += 360; |
| 1120 | relative_bearing = bearing_to_target - observer_heading; |
| 1121 | return relative_bearing; |
| 1122 | } |
| 1123 | |
| 1124 | int ReciprocalBearingcxx . . $ ReciprocalBearing(7864480464b09eea).(int bearing){ |
| 1125 | // returns the 180 degree opposite of the bearing given to it.. |
| 1126 | int recipbearing; |
| 1127 | if (bearing >= 180){ |
| 1128 | recipbearing = bearing - 180; |
| 1129 | }else{ |
| 1130 | recipbearing = bearing + 180; |
| 1131 | } |
| 1132 | return recipbearing; |
| 1133 | } |
| 1134 | |
| 1135 | double AngleOnBowcxx . . $ AngleOnBow(1fc01f0df190a722).(Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target){ |
| 1136 | // Returns the Angle on the Bow (AOB) of target relative to observer. |
| 1137 | // Note: -180 < Angle on Bow < 180 |
| 1138 | // Positive AOB = Port AOB, Negative AOB = Starboard AOB |
| 1139 | // Examples: |
| 1140 | // target AOB port 30 -> +30 |
| 1141 | // target AOB starboard 30 -> -30 |
| 1142 | // target pointing at observer -> 0 |
| 1143 | // target pointing away from observer -> -180 |
| 1144 | double aob=0; |
| 1145 | aob = target->Headingcxx . . $ Coord#Heading. - observer->Headingcxx . . $ Coord#Heading. |
| 1146 | - RelativeBearingcxx . . $ RelativeBearing(1fc01f0df190a722).(observer,target) - 180; |
| 1147 | if (aob > 180) aob = 360 - aob; |
| 1148 | if (aob < -180) aob = 360 + aob; |
| 1149 | return aob; |
| 1150 | } |
| 1151 | |
| 1152 | int minimize360cxx . . $ minimize360(7864480464b09eea). ( int compass_bearing ){ |
| 1153 | // If course is bigger than 360 degrees, then subtract 360 degrees from it |
| 1154 | // and keep doing so until it is less than 360 degrees. |
| 1155 | while ( compass_bearing > 360 ) |
| 1156 | { |
| 1157 | compass_bearing -= 360; |
| 1158 | } |
| 1159 | return compass_bearing; |
| 1160 | } |
| 1161 | |
| 1162 | int maximize360cxx . . $ maximize360(7864480464b09eea). ( int compass_bearing ){ |
| 1163 | // If course is negative then, then add 360 degrees to it |
| 1164 | // and keep doing so until it is positive. |
| 1165 | while ( compass_bearing < 0 ) |
| 1166 | { |
| 1167 | compass_bearing += 360; |
| 1168 | } |
| 1169 | return compass_bearing; |
| 1170 | } |
| 1171 | |
| 1172 | double CalculateRangecxx . . $ CalculateRange(1fc01f0df190a722).(Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target){ |
| 1173 | //Calculates the distance in yards from the observer, to the target. |
| 1174 | |
| 1175 | double latdif = 0, londif = 0; //sqrt needs doubles |
| 1176 | LatLonDifferencecxx . . $ LatLonDifference(c18a688da74552ab).( observer, target, &latdif, &londif ); |
| 1177 | return sqrtcxx . . $ sqrt(fee4f1d22bc8e617).((latdif * latdif) + (londif * londif)); |
| 1178 | } |
| 1179 | |
| 1180 | void LatLonDifferencecxx . . $ LatLonDifference(c18a688da74552ab).(Submarinecxx . . $ Submarine# *x, Submarinecxx . . $ Submarine# *y, double *platdif, double *plondif){ // CHANGE TO REFERENCES |
| 1181 | //Returns in yards the difference between object x and object y |
| 1182 | |
| 1183 | if (x->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. > y->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards.){ |
| 1184 | *platdif = x->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. - y->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards.; |
| 1185 | } |
| 1186 | else{ |
| 1187 | *platdif = y->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. - x->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards.; |
| 1188 | } |
| 1189 | |
| 1190 | if (x->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. > y->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.){ |
| 1191 | *plondif = x->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. - y->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.; |
| 1192 | } |
| 1193 | else{ |
| 1194 | *plondif = y->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. - x->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.; |
| 1195 | } |
| 1196 | } |
| 1197 | |
| 1198 | void CreateShipscxx . . $ CreateShips(409e6fe0be183062).(int mission_number, MAPcxx . . $ MAP# *map) |
| 1199 | { |
| 1200 | char *ship_file, *mission_name; |
| 1201 | char filename[128]; |
| 1202 | char line[256], *status; |
| 1203 | // int i; |
| 1204 | FILEcxx . . $ FILE# *my_file, *mission_file; |
| 1205 | Submarinecxx . . $ Submarine# *new_ship; |
| 1206 | Helicoptercxx . . $ Helicopter# *new_helicopter; |
| 1207 | int ship_type, ship_class; |
| 1208 | |
| 1209 | #ifndef WIN32 |
| 1210 | snprintf(filename, 128, "data/ships%d.dat", mission_number); |
| 1211 | #else |
| 1212 | sprintf(filename, "data/ships%d.dat", mission_number); |
| 1213 | #endif |
| 1214 | |
| 1215 | ship_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 1216 | my_file = fopen(ship_file, "r"); |
| 1217 | if ( (ship_file) && (ship_file != filename) ) |
| 1218 | free(ship_file); |
| 1219 | |
| 1220 | // idiot check |
| 1221 | if(!my_file){ |
| 1222 | printf("Create ships: file missing\n"); |
| 1223 | exit(1); |
| 1224 | } |
| 1225 | |
| 1226 | #ifndef WIN32 |
| 1227 | snprintf(filename, 128, "data/mission%d.dat", mission_number); |
| 1228 | #else |
| 1229 | sprintf(filename, "data/mission%d.dat", mission_number); |
| 1230 | #endif |
| 1231 | mission_name = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 1232 | mission_file = fopen(mission_name, "r"); |
| 1233 | if ( (mission_name) && (mission_name != filename) ) |
| 1234 | free(mission_name); |
| 1235 | |
| 1236 | |
| 1237 | // Read in the data from the ship file |
| 1238 | // Format of ship file: 1 row of data per ship |
| 1239 | // Active flag, Ship Type, Friend flag, Speed, DesiredSpeed, Depth, |
| 1240 | // Desired depth, Heading, Desired |
| 1241 | // Heading, Rudder, Lat_TotalYards, Lon_TotalYards, PSCS |
| 1242 | |
| 1243 | // Notes: Ship Type: Sub=0, Surface=1, Aircraft=2 |
| 1244 | // Friend: Foe=0, Friend=1, Unknown=2, Neutral=3 |
| 1245 | // i = 0; |
| 1246 | status = fgets(line, 256, my_file); |
| 1247 | while (status) |
| 1248 | { |
| 1249 | sscanf(line, "%d %d", &ship_type, &ship_class); |
| 1250 | if (ship_class == CLASS_HELICOPTERcxx . . $ `src/submarine.h:65:9`!) |
| 1251 | { |
| 1252 | #ifdef DEBUG |
| 1253 | printf("Creating new helicopter.\n"); |
| 1254 | #endif |
| 1255 | new_helicopter = new Helicoptercxx . . $ Helicopter#(); |
| 1256 | if (new_helicopter) |
| 1257 | { |
| 1258 | new_helicopter->mapcxx . . $ Helicopter#map. = map; |
| 1259 | sscanf(line, "%d %d %d %d %d %d %f %f %d", |
| 1260 | &(new_helicopter->ShipTypecxx . . $ Helicopter#ShipType.), |
| 1261 | &(new_helicopter->ShipClasscxx . . $ Helicopter#ShipClass.), |
| 1262 | &(new_helicopter->Friendcxx . . $ Helicopter#Friend.), |
| 1263 | &(new_helicopter->DesiredSpeedcxx . . $ Helicopter#DesiredSpeed.), |
| 1264 | &(new_helicopter->DesiredDepthcxx . . $ Helicopter#DesiredDepth.), |
| 1265 | &(new_helicopter->DesiredHeadingcxx . . $ Helicopter#DesiredHeading.), |
| 1266 | &(new_helicopter->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards.), |
| 1267 | &(new_helicopter->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.), |
| 1268 | &(new_helicopter->has_sonarcxx . . $ Helicopter#has_sonar.) ); |
| 1269 | // check mood |
| 1270 | #ifndef WIN32 |
| 1271 | if ( strcasestr(line, "convoy") ) |
| 1272 | new_helicopter->moodcxx . . $ Helicopter#mood. = MOOD_CONVOYcxx . . $ `src/submarine.h:129:9`!; |
| 1273 | else if ( strcasestr(line, "passive") ) |
| 1274 | new_helicopter->moodcxx . . $ Helicopter#mood. = MOOD_PASSIVEcxx . . $ `src/submarine.h:128:9`!; |
| 1275 | else if ( strcasestr(line, "attack") ) |
| 1276 | new_helicopter->moodcxx . . $ Helicopter#mood. = MOOD_ATTACKcxx . . $ `src/submarine.h:127:9`!; |
| 1277 | #else |
| 1278 | if ( my_strcasestr(line, "convoy") ) |
| 1279 | new_helicopter->mood = MOOD_CONVOY; |
| 1280 | else if ( my_strcasestr(line, "passive") ) |
| 1281 | new_helicopter->mood = MOOD_PASSIVE; |
| 1282 | else if ( my_strcasestr(line, "attack") ) |
| 1283 | new_helicopter->mood = MOOD_ATTACK; |
| 1284 | #endif |
| 1285 | new_helicopter->Speedcxx . . $ Coord#Speed. = new_helicopter->DesiredSpeedcxx . . $ Helicopter#DesiredSpeed.; |
| 1286 | new_helicopter->Headingcxx . . $ Coord#Heading. = new_helicopter->DesiredHeadingcxx . . $ Helicopter#DesiredHeading.; |
| 1287 | new_helicopter->Depthcxx . . $ Helicopter#Depth. = new_helicopter->DesiredDepthcxx . . $ Helicopter#DesiredDepth.; |
| 1288 | // load mission |
| 1289 | new_helicopter->Load_Missioncxx . . $ Helicopter#Load_Mission(89bc1efcdac0ca22).(mission_file); |
| 1290 | // load class |
| 1291 | sprintf(filename, "ships/class%d.shp", new_helicopter->ShipClasscxx . . $ Helicopter#ShipClass.); |
| 1292 | ship_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 1293 | new_helicopter->Load_Classcxx . . $ Helicopter#Load_Class(1ef8e6ec083aabb9).(ship_file); |
| 1294 | // add helicopter to list |
| 1295 | helicopterscxx . . $ helicopters. = Add_Helicoptercxx . . $ Add_Helicopter(db7b114f298089df).(helicopterscxx . . $ helicopters., new_helicopter); |
| 1296 | if ( (ship_file) && (ship_file != filename) ) |
| 1297 | free(ship_file); |
| 1298 | } // end of created a helicopter |
| 1299 | |
| 1300 | } // end of helicopter |
| 1301 | |
| 1302 | else // all other classes |
| 1303 | { |
| 1304 | #ifdef DEBUG |
| 1305 | printf("Creating new ship\n"); |
| 1306 | #endif |
| 1307 | new_ship = new Submarinecxx . . $ Submarine#(); |
| 1308 | if (new_ship) |
| 1309 | { |
| 1310 | #ifdef DEBUG |
| 1311 | printf("Added new ship to list of ships.\n"); |
| 1312 | #endif |
| 1313 | new_ship->Initcxx . . $ Submarine#Init(49f6e7a06ebc5aa8).(); |
| 1314 | new_ship->mapcxx . . $ Submarine#map. = map; |
| 1315 | #ifdef DEBUG |
| 1316 | printf("Loaded: %s", line); |
| 1317 | #endif |
| 1318 | sscanf(line, "%d %d %d %d %d %d %f %f", |
| 1319 | &(new_ship->ShipTypecxx . . $ Submarine#ShipType.), |
| 1320 | &(new_ship->ShipClasscxx . . $ Submarine#ShipClass.), &(new_ship->Friendcxx . . $ Submarine#Friend.), |
| 1321 | &(new_ship->DesiredSpeedcxx . . $ Submarine#DesiredSpeed.), &(new_ship->DesiredDepthcxx . . $ Submarine#DesiredDepth.), |
| 1322 | &(new_ship->DesiredHeadingcxx . . $ Submarine#DesiredHeading.), &(new_ship->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards.), |
| 1323 | &(new_ship->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.)); // , &(new_ship->PSCS) ); |
| 1324 | // check mood |
| 1325 | #ifndef WIN32 |
| 1326 | if ( strcasestr(line, "convoy") ) |
| 1327 | new_ship->moodcxx . . $ Submarine#mood. = MOOD_CONVOYcxx . . $ `src/submarine.h:129:9`!; |
| 1328 | else if ( strcasestr(line, "passive") ) |
| 1329 | new_ship->moodcxx . . $ Submarine#mood. = MOOD_PASSIVEcxx . . $ `src/submarine.h:128:9`!; |
| 1330 | else if ( strcasestr(line, "attack") ) |
| 1331 | new_ship->moodcxx . . $ Submarine#mood. = MOOD_ATTACKcxx . . $ `src/submarine.h:127:9`!; |
| 1332 | #else |
| 1333 | if ( my_strcasestr(line, "convoy") ) |
| 1334 | new_ship->mood = MOOD_CONVOY; |
| 1335 | else if ( my_strcasestr(line, "passive") ) |
| 1336 | new_ship->mood = MOOD_PASSIVE; |
| 1337 | else if ( my_strcasestr(line, "attack") ) |
| 1338 | new_ship->mood = MOOD_ATTACK; |
| 1339 | #endif |
| 1340 | |
| 1341 | #ifdef DEBUG |
| 1342 | printf("%d %d %d %d %d %d %f %f %d\n", |
| 1343 | (new_ship->ShipType), |
| 1344 | (new_ship->ShipClass), (new_ship->Friend), |
| 1345 | (new_ship->DesiredSpeed), (new_ship->DesiredDepth), |
| 1346 | (new_ship->DesiredHeading), (new_ship->Lat_TotalYards), |
| 1347 | (new_ship->Lon_TotalYards), new_ship->mood); |
| 1348 | // , (new_ship->PSCS) ); |
| 1349 | |
| 1350 | #endif |
| 1351 | new_ship->Speedcxx . . $ Coord#Speed. = new_ship->DesiredSpeedcxx . . $ Submarine#DesiredSpeed.; |
| 1352 | new_ship->Depthcxx . . $ Submarine#Depth. = new_ship->DesiredDepthcxx . . $ Submarine#DesiredDepth.; |
| 1353 | new_ship->Headingcxx . . $ Coord#Heading. = new_ship->DesiredHeadingcxx . . $ Submarine#DesiredHeading.; |
| 1354 | #ifdef DEBUG |
| 1355 | printf("Set S: %f H: %f D: %f\n", new_ship->Speed, |
| 1356 | new_ship->Heading, new_ship->Depth); |
| 1357 | #endif |
| 1358 | new_ship->Load_Missioncxx . . $ Submarine#Load_Mission(89bc1efcdac0ca22).(mission_file); |
| 1359 | #ifdef DEBUG |
| 1360 | printf("Ship has mission flag: %d\n", new_ship->mission_status); |
| 1361 | #endif |
| 1362 | sprintf(filename, "ships/class%d.shp", new_ship->ShipClasscxx . . $ Submarine#ShipClass.); |
| 1363 | ship_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 1364 | new_ship->Load_Classcxx . . $ Submarine#Load_Class(1ef8e6ec083aabb9).(ship_file); |
| 1365 | Subscxx . . $ Subs. = Add_Shipcxx . . $ Add_Ship(d62bab4205bed956).(Subscxx . . $ Subs., new_ship); |
| 1366 | if ( (ship_file) && (ship_file != filename) ) |
| 1367 | free(ship_file); |
| 1368 | // i+=1; |
| 1369 | } // end of successfully created new ship |
| 1370 | |
| 1371 | } // end of other classes |
| 1372 | |
| 1373 | status = fgets(line, 256, my_file); |
| 1374 | } |
| 1375 | // inClientFile.close(); |
| 1376 | if (my_file) |
| 1377 | fclose(my_file); |
| 1378 | if (mission_file) |
| 1379 | fclose(mission_file); |
| 1380 | |
| 1381 | // ships = i - 1; |
| 1382 | // ships = i; |
| 1383 | // rdm 5/15/01 testing to be sure correct number of ships being read |
| 1384 | // cout << " Number of ships = " << i-1 << endl; |
| 1385 | if (Subscxx . . $ Subs.) |
| 1386 | { |
| 1387 | SonarStationcxx . . $ SonarStation..Subscxx . . $ AnBqq5#Subs. = Subscxx . . $ Subs.; |
| 1388 | RadarStationcxx . . $ RadarStation..Subscxx . . $ Radar#Subs. = Subscxx . . $ Subs.; |
| 1389 | EsmStationcxx . . $ EsmStation..Subscxx . . $ Esm#Subs. = Subscxx . . $ Subs.; |
| 1390 | ControlStationcxx . . $ ControlStation..Subscxx . . $ Control#Subs. = Subscxx . . $ Subs.; |
| 1391 | playercxx . . $ player. = Subscxx . . $ Subs.; |
| 1392 | } |
| 1393 | } |
| 1394 | |
| 1395 | void UpdateSensorscxx . . $ UpdateSensors(49f6e7a06ebc5aa8).(){ |
| 1396 | //Added code to place our boats position into a FIFO so we |
| 1397 | //can calculate where the sonar array is at any time. |
| 1398 | //the cable on the TB16 is 2600ft. wich is 866yds. The FIFO is |
| 1399 | //100 elements holding 2 double precision floats. So 866/100 |
| 1400 | //Is 8.66, Which is the resolution of our placement of the array. |
| 1401 | #ifdef DEBUG |
| 1402 | printf("Updating sensors and stuff\n"); |
| 1403 | #endif |
| 1404 | static float distance_traveled; |
| 1405 | distance_traveled += Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed. * 0.555; |
| 1406 | if(distance_traveled >= 8.66){ //if we've gone 8.66yds record our loc in the FIFO |
| 1407 | TB16cxx . . $ TB16..RecordPoscxx . . $ TowedArray#RecordPos(bc12c9ec15586e6a).(Subscxx . . $ Subs.->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards., Subscxx . . $ Subs.->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.); |
| 1408 | distance_traveled = distance_traveled - 8.66; |
| 1409 | } |
| 1410 | TB16cxx . . $ TB16..OperateWinchcxx . . $ TowedArray#OperateWinch(49f6e7a06ebc5aa8).();//extend/retract the array as needed. |
| 1411 | SoundEnvironmentcxx . . $ SoundEnvironment(49f6e7a06ebc5aa8).(); //lets give a listen... |
| 1412 | SonarStationcxx . . $ SonarStation..Sonarcxx . . $ AnBqq5#Sonar(b45ddcbc8423892c).(SonarStationcxx . . $ SonarStation..GetNorthCenterStatecxx . . $ AnBqq5#GetNorthCenterState(c9857a73d68e59ba).()); |
| 1413 | SonarStationcxx . . $ SonarStation..TowedSonarcxx . . $ AnBqq5#TowedSonar(b45ddcbc8423892c).(SonarStationcxx . . $ SonarStation..GetNorthCenterStatecxx . . $ AnBqq5#GetNorthCenterState(c9857a73d68e59ba).()); |
| 1414 | } |
| 1415 | |
| 1416 | void UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(){ |
| 1417 | if (drawmapcxx . . $ drawmap.){ |
| 1418 | Display_Targetcxx . . $ Display_Target(49f6e7a06ebc5aa8).(); |
| 1419 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); // fix me to do something useful! |
| 1420 | Draw_Depth_Metercxx . . $ Draw_Depth_Meter(8666c28aa5ada263).(playercxx . . $ player., SCREEN_NAVcxx . . $ `src/draw.h:10:9`!); |
| 1421 | } |
| 1422 | if (drawsonarcxx . . $ drawsonar.){ |
| 1423 | SonarStationcxx . . $ SonarStation..UpdateDisplaycxx . . $ AnBqq5#UpdateDisplay(a9ab5cc9dc811b12).(current_targetcxx . . $ current_target.); |
| 1424 | } |
| 1425 | if (drawtmacxx . . $ drawtma.){ |
| 1426 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(); |
| 1427 | } |
| 1428 | if (drawweaponscxx . . $ drawweapons.) |
| 1429 | DisplayWeaponscxx . . $ DisplayWeapons(49f6e7a06ebc5aa8).(); |
| 1430 | if (drawradarcxx . . $ drawradar.){ |
| 1431 | RadarStationcxx . . $ RadarStation..DisplayContactscxx . . $ Radar#DisplayContacts(49f6e7a06ebc5aa8).(); |
| 1432 | } |
| 1433 | if (drawesmcxx . . $ drawesm.){ |
| 1434 | EsmStationcxx . . $ EsmStation..DisplayContactscxx . . $ Esm#DisplayContacts(49f6e7a06ebc5aa8).(); |
| 1435 | } |
| 1436 | if (drawcontrolcxx . . $ drawcontrol.){ |
| 1437 | ControlStationcxx . . $ ControlStation..Displaycxx . . $ Control#Display(49f6e7a06ebc5aa8).(); |
| 1438 | Draw_Depth_Metercxx . . $ Draw_Depth_Meter(8666c28aa5ada263).(playercxx . . $ player., SCREEN_HELMcxx . . $ `src/draw.h:11:9`!); |
| 1439 | } |
| 1440 | |
| 1441 | } |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | // Show information on the currently selected target |
| 1446 | void Display_Targetcxx . . $ Display_Target(49f6e7a06ebc5aa8).() |
| 1447 | { |
| 1448 | char buffer[256]; |
| 1449 | SDL_Rect rectangle; |
| 1450 | DFontcxx . . $ DFont# fntcxx . . $ DFont#DFont(d0489a02ea06dfc6).("images/font.png", "data/font.dat"); |
| 1451 | float range; |
| 1452 | double bearing; |
| 1453 | |
| 1454 | // if (! current_target) |
| 1455 | // return; |
| 1456 | |
| 1457 | // make empty box to the side of the screen |
| 1458 | rectangle.x = 120; |
| 1459 | rectangle.y = 400; |
| 1460 | rectangle.w = 200; |
| 1461 | rectangle.h = 160; |
| 1462 | SDL_FillRect(screencxx . . $ screen., &rectangle, blackcxx . . $ black.); |
| 1463 | |
| 1464 | if (current_targetcxx . . $ current_target.) |
| 1465 | { |
| 1466 | // fill in data |
| 1467 | sprintf(buffer, " Target"); |
| 1468 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 150, 400, buffer); |
| 1469 | sprintf(buffer, "Heading: %d", (int) current_targetcxx . . $ current_target.->Headingcxx . . $ Coord#Heading.); |
| 1470 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 424, buffer); |
| 1471 | |
| 1472 | sprintf(buffer, "Spead: %d knots", (int) current_targetcxx . . $ current_target.->Speedcxx . . $ Coord#Speed.); |
| 1473 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 436, buffer); |
| 1474 | |
| 1475 | range = Subscxx . . $ Subs.->DistanceToTargetcxx . . $ Submarine#DistanceToTarget(2de0d0e522051339).(current_targetcxx . . $ current_target.); |
| 1476 | // range *= 0.000568; |
| 1477 | range *= YARDS_TO_MILEScxx . . $ `src/submarine.h:113:9`!; |
| 1478 | sprintf(buffer, "Range: %2.1f miles", range); |
| 1479 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 448, buffer); |
| 1480 | |
| 1481 | bearing = Subscxx . . $ Subs.->BearingToTargetcxx . . $ Submarine#BearingToTarget(2de0d0e522051339).(current_targetcxx . . $ current_target.); |
| 1482 | sprintf(buffer, "Bearing: %2.0lf", bearing); |
| 1483 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 460, buffer); |
| 1484 | |
| 1485 | sprintf(buffer, "Depth: %d feet", (int) current_targetcxx . . $ current_target.->Depthcxx . . $ Submarine#Depth.); |
| 1486 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 472, buffer); |
| 1487 | |
| 1488 | sprintf(buffer, "Type: %s ", current_targetcxx . . $ current_target.->ClassNamecxx . . $ Submarine#ClassName. ); |
| 1489 | if (current_targetcxx . . $ current_target.->ClassTypecxx . . $ Submarine#ClassType.[0]) |
| 1490 | strcat(buffer, current_targetcxx . . $ current_target.->ClassTypecxx . . $ Submarine#ClassType.); |
| 1491 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 140, 484, buffer); |
| 1492 | } // end of valid target |
| 1493 | SDL_UpdateRects(screencxx . . $ screen., 1, &rectangle); |
| 1494 | } |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | void Draw_Depth_Metercxx . . $ Draw_Depth_Meter(8666c28aa5ada263).(Submarinecxx . . $ Submarine# *my_sub, int screen_number) |
| 1499 | { |
| 1500 | SDL_Rect rectangle; |
| 1501 | int y, index; |
| 1502 | |
| 1503 | if (screen_number == SCREEN_NAVcxx . . $ `src/draw.h:10:9`!) |
| 1504 | { |
| 1505 | rectangle.x = 890; |
| 1506 | rectangle.y = 145; |
| 1507 | rectangle.h = 500; |
| 1508 | } |
| 1509 | else // helm screen |
| 1510 | { |
| 1511 | rectangle.x = 450; |
| 1512 | rectangle.y = 125; |
| 1513 | rectangle.h = 525; |
| 1514 | } |
| 1515 | rectangle.w = 10; |
| 1516 | |
| 1517 | if (! my_sub) |
| 1518 | return; |
| 1519 | SDL_FillRect(screencxx . . $ screen., &rectangle, mapcolorcxx . . $ mapcolor.); |
| 1520 | if (my_sub->mapcxx . . $ Submarine#map.) |
| 1521 | { |
| 1522 | for (index = 0; index < my_sub->mapcxx . . $ Submarine#map.->Thermals_Betweencxx . . $ MAP#Thermals_Between(9b79fb6aee4c0440).(0, MAX_DEPTHcxx . . $ `src/map.h:16:9`!); index++) |
| 1523 | { |
| 1524 | y = my_sub->mapcxx . . $ Submarine#map.->thermalscxx . . $ MAP#thermals.[index]; |
| 1525 | y = rectangle.y + (y / 10); |
| 1526 | FillRectanglecxx . . $ FillRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., rectangle.x, y, rectangle.x + 10, y+1, whitecxx . . $ white.); |
| 1527 | } |
| 1528 | } |
| 1529 | y = (my_sub->Depthcxx . . $ Submarine#Depth. / 10) + rectangle.y; |
| 1530 | FillRectanglecxx . . $ FillRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., rectangle.x, y, rectangle.x + 10, y+1, redcxx . . $ red.); |
| 1531 | SDL_UpdateRects(screencxx . . $ screen., 1, &rectangle); |
| 1532 | } |
| 1533 | |
| 1534 | |
| 1535 | void DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(){ |
| 1536 | //Future home of an actual map display routine, right now just a blank field with dots |
| 1537 | |
| 1538 | SDL_Rect rectangle; |
| 1539 | rectangle.x=374; |
| 1540 | rectangle.y=145; //define a rectangle on the screen and make it blue |
| 1541 | rectangle.h=500; |
| 1542 | rectangle.w=501; |
| 1543 | SDL_FillRect(screencxx . . $ screen., &rectangle, mapcolorcxx . . $ mapcolor.); |
| 1544 | |
| 1545 | for (int x=374; x<874; x+= 10){ //Make meaningless dots grid on "Map" |
| 1546 | for (int y=145; y<637; y+= 10){ |
| 1547 | DrawPixelcxx . . $ DrawPixel(6f3c846de5417090).(screencxx . . $ screen., x+5, y+5, whitecxx . . $ white.); |
| 1548 | } |
| 1549 | } |
| 1550 | #ifdef DEBUG |
| 1551 | printf("About to place ships.\n"); |
| 1552 | #endif |
| 1553 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 0, 0, current_targetcxx . . $ current_target.); |
| 1554 | SDL_UpdateRects(screencxx . . $ screen., 1, &rectangle); |
| 1555 | |
| 1556 | } |
| 1557 | |
| 1558 | void PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(int scale, int change_scrollx, int change_scrolly, Submarinecxx . . $ Submarine# *current_target){ |
| 1559 | //Places all Ships onto the map. Soon to change, so only registered contacts appear. |
| 1560 | //scale is in YDS per pixel |
| 1561 | int fresh; |
| 1562 | int x, y; //where to place the ships |
| 1563 | int xoffset = 374; //offsets to move the ships to |
| 1564 | int yoffset = 145; //the defined place on map screen |
| 1565 | static int scrolloffsetx=0; //offset to center map |
| 1566 | static int scrolloffsety=0; |
| 1567 | Uint32cxx . . $ Uint32# color; |
| 1568 | Submarinecxx . . $ Submarine# *a_torp; |
| 1569 | Submarinecxx . . $ Submarine# *target_ship; |
| 1570 | Helicoptercxx . . $ Helicopter# *a_helicopter; |
| 1571 | int layers; |
| 1572 | |
| 1573 | scale = scale * MAP_FACTORcxx . . $ `src/main.h:30:9`!; |
| 1574 | if(mapcentercxx . . $ mapcenter.){ //center map onto our own ntds symbol |
| 1575 | scrolloffsetx = 250 - ((int)Subscxx . . $ Subs.->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. / scale); |
| 1576 | scrolloffsety = 250 - ((int)Subscxx . . $ Subs.->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. / scale); |
| 1577 | }else{ |
| 1578 | scrolloffsetx += change_scrollx; |
| 1579 | scrolloffsety += change_scrolly; |
| 1580 | } |
| 1581 | target_ship = Subscxx . . $ Subs.; |
| 1582 | #ifdef DEBUG |
| 1583 | printf("About to place ships on map.\n"); |
| 1584 | #endif |
| 1585 | while (target_ship) |
| 1586 | { |
| 1587 | fresh = Subscxx . . $ Subs.->Can_Detectcxx . . $ Submarine#Can_Detect(e898ed6f8282e8).(target_ship); |
| 1588 | #ifdef DEBUG |
| 1589 | printf("Freshness factor %d\n", fresh); |
| 1590 | #endif |
| 1591 | if ( (fresh) || (target_ship == Subscxx . . $ Subs.) ) |
| 1592 | { |
| 1593 | x = 500 - ((int)target_ship->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. / scale); |
| 1594 | x = x - scrolloffsetx; |
| 1595 | y = 500 - ((int)target_ship->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. / scale); |
| 1596 | y = y - scrolloffsety; |
| 1597 | if (x>10 && x<490 && y>10 && y<490){ //are we going to fall off the damn map??? |
| 1598 | x = x + xoffset; |
| 1599 | y = y + yoffset; |
| 1600 | // not only do we need friend/foe, but |
| 1601 | // also fresh/old contact |
| 1602 | // fresh = Subs->Can_Detect(target_ship); |
| 1603 | switch(target_ship->Friendcxx . . $ Submarine#Friend.){ |
| 1604 | case 0: //Foe?? |
| 1605 | if (fresh >= CONTACT_SOLIDcxx . . $ `src/submarine.h:47:9`!) |
| 1606 | color = redcxx . . $ red.; |
| 1607 | else |
| 1608 | color = dark_redcxx . . $ dark_red.; |
| 1609 | break; |
| 1610 | case 1: //Friend?? |
| 1611 | if (fresh >= CONTACT_SOLIDcxx . . $ `src/submarine.h:47:9`!) |
| 1612 | color = greencxx . . $ green.; |
| 1613 | else |
| 1614 | color = dark_greencxx . . $ dark_green.; |
| 1615 | break; |
| 1616 | case 2: // Neither??? |
| 1617 | if (fresh >= CONTACT_SOLIDcxx . . $ `src/submarine.h:47:9`!) |
| 1618 | color = yellowcxx . . $ yellow.; |
| 1619 | else |
| 1620 | color = browncxx . . $ brown.; |
| 1621 | break; |
| 1622 | default: // Unknown |
| 1623 | if (fresh >= CONTACT_SOLIDcxx . . $ `src/submarine.h:47:9`!) |
| 1624 | color = greycxx . . $ grey.; |
| 1625 | else |
| 1626 | color = dark_greycxx . . $ dark_grey.; |
| 1627 | break; |
| 1628 | } |
| 1629 | if (target_ship == Subscxx . . $ Subs.){ // Is it me??? |
| 1630 | color = greencxx . . $ green.; |
| 1631 | } |
| 1632 | #ifdef DEBUG |
| 1633 | printf("Deciding if to draw clearly.\n"); |
| 1634 | #endif |
| 1635 | if ( (fresh >= CONTACT_WEAKcxx . . $ `src/submarine.h:48:9`!) || (Subscxx . . $ Subs. == target_ship) ) |
| 1636 | { |
| 1637 | MapIconcxx . . $ MapIcon(6fb2c7d311165c4f).(x, y, (int)target_ship->ShipTypecxx . . $ Submarine#ShipType., (int)target_ship->Friendcxx . . $ Submarine#Friend., color); //Draw the NTDS symbol. |
| 1638 | // check to see if we should highlight |
| 1639 | if (current_target == target_ship) |
| 1640 | MapIconcxx . . $ MapIcon(6fb2c7d311165c4f).(x, y+1, (int)target_ship->ShipTypecxx . . $ Submarine#ShipType., (int)target_ship->Friendcxx . . $ Submarine#Friend., color); |
| 1641 | DirectionalPointercxx . . $ DirectionalPointer(6fb2c7d311165c4f).(x-2, y+2, (int)target_ship->Headingcxx . . $ Coord#Heading., (int)target_ship->Speedcxx . . $ Coord#Speed., blackcxx . . $ black.); |
| 1642 | DirectionalPointercxx . . $ DirectionalPointer(6fb2c7d311165c4f).(x, y, (int)target_ship->Headingcxx . . $ Coord#Heading., (int)target_ship->Speedcxx . . $ Coord#Speed., color); |
| 1643 | // Add pointer the show heading. |
| 1644 | } // end of we can hear you ok |
| 1645 | } // end of we are on the map |
| 1646 | } // end of able to detect |
| 1647 | target_ship = target_ship->nextcxx . . $ Submarine#next.; |
| 1648 | } |
| 1649 | |
| 1650 | // now place torpedoes |
| 1651 | #ifdef DEBUG |
| 1652 | printf("About to draw torpedoes on map\n"); |
| 1653 | #endif |
| 1654 | a_torp = torpedoescxx . . $ torpedoes.; |
| 1655 | while (a_torp) |
| 1656 | { |
| 1657 | x = 500 - ((int)a_torp->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. / scale); |
| 1658 | x = x - scrolloffsetx; |
| 1659 | y = 500 - ((int)a_torp->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. / scale); |
| 1660 | y = y - scrolloffsety; |
| 1661 | if (x>10 && x<490 && y>10 && y<490) //are we going to fall off map?? |
| 1662 | { |
| 1663 | x = x + xoffset; |
| 1664 | y = y + yoffset; |
| 1665 | switch(a_torp->Friendcxx . . $ Submarine#Friend.){ |
| 1666 | case 0: //Foe?? |
| 1667 | color = redcxx . . $ red.; |
| 1668 | break; |
| 1669 | case 1: //Friend?? |
| 1670 | color = greencxx . . $ green.; |
| 1671 | break; |
| 1672 | case 2: // Neither??? |
| 1673 | color = yellowcxx . . $ yellow.; |
| 1674 | break; |
| 1675 | default: // Unknown |
| 1676 | color = greycxx . . $ grey.; |
| 1677 | break; |
| 1678 | } |
| 1679 | MapIconcxx . . $ MapIcon(6fb2c7d311165c4f).(x, y, (int)a_torp->ShipTypecxx . . $ Submarine#ShipType., (int)a_torp->Friendcxx . . $ Submarine#Friend., color); |
| 1680 | } // within map limits |
| 1681 | |
| 1682 | a_torp = a_torp->nextcxx . . $ Submarine#next.; |
| 1683 | } // end of displaying torpedoes |
| 1684 | |
| 1685 | #ifdef DEBUG |
| 1686 | printf("About to draw helicopters on map.\n"); |
| 1687 | #endif |
| 1688 | // we only draw helicopters if we are near the surface |
| 1689 | // and moving slow. This is crude, but it'll do for now |
| 1690 | layers = my_mapcxx . . $ my_map.->Thermals_Betweencxx . . $ MAP#Thermals_Between(9b79fb6aee4c0440).(0, playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.); |
| 1691 | if ( (layers < 1) && (playercxx . . $ player.->Speedcxx . . $ Coord#Speed. < (playercxx . . $ player.->MaxSpeedcxx . . $ Submarine#MaxSpeed. / 2) ) ) |
| 1692 | { |
| 1693 | a_helicopter = helicopterscxx . . $ helicopters.; |
| 1694 | while (a_helicopter) |
| 1695 | { |
| 1696 | x = 500 - ((int)a_helicopter->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards. / scale); |
| 1697 | x = x - scrolloffsetx; |
| 1698 | y = 500 - ((int)a_helicopter->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards. / scale); |
| 1699 | y = y - scrolloffsety; |
| 1700 | if (x>10 && x<490 && y>10 && y<490) // are we on the map |
| 1701 | { |
| 1702 | x = x + xoffset; |
| 1703 | y = y + yoffset; |
| 1704 | switch (a_helicopter->Friendcxx . . $ Helicopter#Friend.) |
| 1705 | { |
| 1706 | case FOEcxx . . $ `src/submarine.h:43:9`!: color = redcxx . . $ red.; break; |
| 1707 | case FRIENDcxx . . $ `src/submarine.h:42:9`!: color = greencxx . . $ green.; break; |
| 1708 | case NEUTRALcxx . . $ `src/submarine.h:45:9`!: color = greycxx . . $ grey.; break; |
| 1709 | case UNKNOWNcxx . . $ `src/submarine.h:44:9`!: |
| 1710 | default: color = yellowcxx . . $ yellow.; break; |
| 1711 | } // end of friend/foe switch |
| 1712 | MapIconcxx . . $ MapIcon(6fb2c7d311165c4f).(x, y, a_helicopter->ShipTypecxx . . $ Helicopter#ShipType., |
| 1713 | a_helicopter->Friendcxx . . $ Helicopter#Friend., color); |
| 1714 | } // within map limits |
| 1715 | a_helicopter = a_helicopter->nextcxx . . $ Helicopter#next.; |
| 1716 | } // end of drawing helicopters |
| 1717 | } // end of if near surface |
| 1718 | } |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | // calls the other detection functions to see if there is |
| 1723 | // any way we can pick up the target |
| 1724 | float Any_Detectioncxx . . $ Any_Detection(9eeec24301e7a499).(double Range, Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target) |
| 1725 | { |
| 1726 | float status; |
| 1727 | |
| 1728 | #ifdef DEBUG |
| 1729 | printf("Attempting all forms of detection.\n"); |
| 1730 | #endif |
| 1731 | status = Radar_Detectioncxx . . $ Radar_Detection(9eeec24301e7a499).(Range, observer, target); |
| 1732 | if (status) |
| 1733 | { |
| 1734 | // printf("I can see on radar target %d\n", target); |
| 1735 | return 2.0; |
| 1736 | } |
| 1737 | status = Esm_Detectioncxx . . $ Esm_Detection(9eeec24301e7a499).(Range, observer, target); |
| 1738 | if (status) |
| 1739 | { |
| 1740 | // printf("I can pick up on esm target %d\n", target); |
| 1741 | return 1.0; |
| 1742 | } |
| 1743 | // this one takes the most math, so we do it last |
| 1744 | // status = Sonar_Detection(Range, observer, target); |
| 1745 | status = Sonar_Detection_Newcxx . . $ Sonar_Detection_New(9eeec24301e7a499).(Range, observer, target); |
| 1746 | // if (status) |
| 1747 | // printf("I can hear target %d\n", target); |
| 1748 | return status; |
| 1749 | } |
| 1750 | |
| 1751 | |
| 1752 | // Can I see you on radar? |
| 1753 | float Radar_Detectioncxx . . $ Radar_Detection(9eeec24301e7a499).(double Range, Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target) |
| 1754 | { |
| 1755 | int depth, range; |
| 1756 | bool result; |
| 1757 | |
| 1758 | depth = (int) observer->Depthcxx . . $ Submarine#Depth.; |
| 1759 | range = (int) observer->DistanceToTargetcxx . . $ Submarine#DistanceToTarget(2de0d0e522051339).(target); |
| 1760 | result = RadarStationcxx . . $ RadarStation..isTargetVisiblecxx . . $ Radar#isTargetVisible(37f2960dfd9b98b0).(target, range, depth, |
| 1761 | SHIP_HEIGHTcxx . . $ `src/main.h:37:9`!, DEFAULT_SEA_STATEcxx . . $ `src/main.h:36:9`!); |
| 1762 | if (result) |
| 1763 | return 1.0; |
| 1764 | else |
| 1765 | return 0.0; |
| 1766 | } |
| 1767 | |
| 1768 | |
| 1769 | // Can I detect your radar? |
| 1770 | float Esm_Detectioncxx . . $ Esm_Detection(9eeec24301e7a499).(double Range, Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target) |
| 1771 | { |
| 1772 | int depth, range; |
| 1773 | bool result; |
| 1774 | |
| 1775 | depth = (int) observer->Depthcxx . . $ Submarine#Depth.; |
| 1776 | range = (int) observer->DistanceToTargetcxx . . $ Submarine#DistanceToTarget(2de0d0e522051339).(target); |
| 1777 | result = EsmStationcxx . . $ EsmStation..isTargetVisiblecxx . . $ Esm#isTargetVisible(196be57137963973).(target, range, depth, |
| 1778 | SHIP_HEIGHTcxx . . $ `src/main.h:37:9`!, TRUEcxx . . $ `src/map.h:10:9`!, DEFAULT_SEA_STATEcxx . . $ `src/main.h:36:9`!); |
| 1779 | if (result) |
| 1780 | return 1.0; |
| 1781 | else |
| 1782 | return 0.0; |
| 1783 | |
| 1784 | } |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | /// Can the observer hear the target? |
| 1789 | float Sonar_Detection_Newcxx . . $ Sonar_Detection_New(9eeec24301e7a499).(double Range, Submarinecxx . . $ Submarine# *observer, Submarinecxx . . $ Submarine# *target) |
| 1790 | { |
| 1791 | |
| 1792 | float NauticalMiles = (float)Range / 2000.0; |
| 1793 | float HisPassiveSonarCrosssection = target->PSCScxx . . $ Submarine#PSCS.; |
| 1794 | float EffectiveTargetSpeed; |
| 1795 | float AmbientNoise; |
| 1796 | float OwnShipNoise; |
| 1797 | float TotalNoise; |
| 1798 | float TargetNoise; |
| 1799 | float Gb; |
| 1800 | float Lbp; |
| 1801 | float NoiseFromSpeed; |
| 1802 | float BasisNoiseLevel; |
| 1803 | float value; |
| 1804 | float SeaState = 3.0; // Anyone want to model the weather. |
| 1805 | int thermal_layers = 0; |
| 1806 | |
| 1807 | if (target->Speedcxx . . $ Coord#Speed. <= 5.0){ |
| 1808 | EffectiveTargetSpeed = 0.0; |
| 1809 | }else{ |
| 1810 | EffectiveTargetSpeed = target->Speedcxx . . $ Coord#Speed. - 5.0; |
| 1811 | } |
| 1812 | |
| 1813 | if (target->Speedcxx . . $ Coord#Speed. < 20.0){ |
| 1814 | NoiseFromSpeed = 1.30; |
| 1815 | BasisNoiseLevel = 0.0; |
| 1816 | }else{ |
| 1817 | NoiseFromSpeed = 0.65; |
| 1818 | BasisNoiseLevel = 9.75; |
| 1819 | } |
| 1820 | if (my_mapcxx . . $ my_map.) |
| 1821 | thermal_layers = my_mapcxx . . $ my_map.->Thermals_Betweencxx . . $ MAP#Thermals_Between(9b79fb6aee4c0440).(observer->Depthcxx . . $ Submarine#Depth., target->Depthcxx . . $ Submarine#Depth.); |
| 1822 | #ifdef DEBUGMAP |
| 1823 | printf("There are %d thermal layers between us.\n", thermal_layers); |
| 1824 | #endif |
| 1825 | AmbientNoise = 89.0 + (5.0 * SeaState); |
| 1826 | OwnShipNoise = observer->RadiatedNoisecxx . . $ Submarine#RadiatedNoise(9b8c9e39889c762c).(); |
| 1827 | TotalNoise = 10.0 * log10cxx . . $ log10(fee4f1d22bc8e617).(powcxx . . $ pow(b71928d39fde4295).(10.0,OwnShipNoise/10.0) + powcxx . . $ pow(b71928d39fde4295).(10.0,AmbientNoise/10.0)); |
| 1828 | Gb = (TotalNoise - AmbientNoise) / 2.9; |
| 1829 | Lbp = AmbientNoise + Gb; |
| 1830 | TargetNoise = HisPassiveSonarCrosssection + |
| 1831 | ((NoiseFromSpeed * EffectiveTargetSpeed) + BasisNoiseLevel); |
| 1832 | #ifdef DEBUGMAP |
| 1833 | printf("Old target noise: %f\n", TargetNoise); |
| 1834 | #endif |
| 1835 | if (thermal_layers) |
| 1836 | TargetNoise -= TargetNoise * (thermal_layers * THERMAL_FILTERcxx . . $ `src/map.h:20:9`!); |
| 1837 | #ifdef DEBUGMAP |
| 1838 | printf("New target noise: %f\n", TargetNoise); |
| 1839 | #endif |
| 1840 | value = TargetNoise - (20.0 * log10cxx . . $ log10(fbcf3211dfe1bfd1).(NauticalMiles) + 1.1 * NauticalMiles) - Lbp; |
| 1841 | if (!observer) |
| 1842 | SonarStationcxx . . $ SonarStation..flowandambientnoisecxx . . $ AnBqq5#flowandambientnoise. = (Lbp - 34); |
| 1843 | if (value > -45.0){ |
| 1844 | return (value - -45.0) + 1.0; |
| 1845 | }else{ |
| 1846 | return 0.0; |
| 1847 | } |
| 1848 | } |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | void SoundEnvironmentcxx . . $ SoundEnvironment(49f6e7a06ebc5aa8).(){ |
| 1855 | ///******************************************************************** |
| 1856 | //This will gather sound information from all platforms and place |
| 1857 | //messages into each platforms sonar queue. |
| 1858 | //********************************************************************* |
| 1859 | |
| 1860 | int bearing; |
| 1861 | double Range; |
| 1862 | Submarinecxx . . $ Submarine# *target; |
| 1863 | int line = FALSEcxx . . $ `src/map.h:13:9`!; |
| 1864 | |
| 1865 | //loop through each ship and let them listen |
| 1866 | //for the other ships... |
| 1867 | #ifdef DEBUG |
| 1868 | printf("Advancing sonar.\n"); |
| 1869 | #endif |
| 1870 | Subscxx . . $ Subs.->AdvanceSonarHistorycxx . . $ Stack#AdvanceSonarHistory(49f6e7a06ebc5aa8).(); //advance sonar queue by 1/5th of a second |
| 1871 | TB16cxx . . $ TB16..AdvanceSonarHistorycxx . . $ Stack#AdvanceSonarHistory(49f6e7a06ebc5aa8).(); //advance sonar queue by 1/5th of a second |
| 1872 | // for (target=Subs->next; target; target = target->next){ |
| 1873 | target = Subscxx . . $ Subs.->nextcxx . . $ Submarine#next.; |
| 1874 | while (target) |
| 1875 | { |
| 1876 | #ifdef DEBUG |
| 1877 | printf("Checking if we can hear other ships.\n"); |
| 1878 | #endif |
| 1879 | if (! playercxx . . $ player.->InBafflescxx . . $ Submarine#InBaffles(9887e4a8163b3a3f).(target, 1, &TB16cxx . . $ TB16.)){ //I'm not deaf? |
| 1880 | Range = CalculateRangecxx . . $ CalculateRange(1fc01f0df190a722).(target, Subscxx . . $ Subs.); |
| 1881 | float signal; |
| 1882 | signal = Any_Detectioncxx . . $ Any_Detection(9eeec24301e7a499).(Range, Subscxx . . $ Subs., target); |
| 1883 | if (signal){ // Are we audible? |
| 1884 | #ifdef DEBUG |
| 1885 | printf("Heard you, adding to list.\n"); |
| 1886 | #endif |
| 1887 | bearing = (int)Subscxx . . $ Subs.->BearingToTargetcxx . . $ Submarine#BearingToTarget(2de0d0e522051339).(target); //Change me to float for better tma |
| 1888 | // this weird check prevents us from |
| 1889 | // erasing sonar data with radar/esm data |
| 1890 | if ( (signal == 1.0) || (signal == 2.0) ) |
| 1891 | { |
| 1892 | float temp_signal; |
| 1893 | temp_signal = Sonar_Detection_Newcxx . . $ Sonar_Detection_New(9eeec24301e7a499).(Range, Subscxx . . $ Subs., target); |
| 1894 | Subscxx . . $ Subs.->RegisterEventcxx . . $ Stack#RegisterEvent(e6f1e707912c925d).(bearing,temp_signal,target->ShipTypecxx . . $ Submarine#ShipType.); |
| 1895 | } |
| 1896 | else |
| 1897 | Subscxx . . $ Subs.->RegisterEventcxx . . $ Stack#RegisterEvent(e6f1e707912c925d).(bearing, signal, target->ShipTypecxx . . $ Submarine#ShipType.); |
| 1898 | // printf("Adding target %d to list.\n", target); |
| 1899 | Subscxx . . $ Subs.->Add_Targetcxx . . $ Submarine#Add_Target(fc20a4b472e56652).(target, signal); |
| 1900 | } |
| 1901 | else { |
| 1902 | // printf("Lost target %d from list.\n", target); |
| 1903 | Subscxx . . $ Subs.->Remove_Targetcxx . . $ Submarine#Remove_Target(a9ab5cc9dc811b12).(target); |
| 1904 | } |
| 1905 | } |
| 1906 | else if (! playercxx . . $ player.->InBafflescxx . . $ Submarine#InBaffles(9887e4a8163b3a3f).(target, 2, &TB16cxx . . $ TB16.) && TB16cxx . . $ TB16..GetLengthcxx . . $ TowedArray#GetLength(b126dc7c1de90089).() >240){ // do the same for towed array |
| 1907 | Range = TB16cxx . . $ TB16..RangeToTargetcxx . . $ TowedArray#RangeToTarget(d8e7e0733fa41c87).(target->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards., target->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.); |
| 1908 | float signal; |
| 1909 | // signal = Sonar_Detection(Range, 0, target); |
| 1910 | signal = Sonar_Detection_Newcxx . . $ Sonar_Detection_New(9eeec24301e7a499).(Range, Subscxx . . $ Subs., target); |
| 1911 | if (signal){ // Are we audible? |
| 1912 | bearing = (int)TB16cxx . . $ TB16..BearingToTargetcxx . . $ TowedArray#BearingToTarget(b7af2f536204233).(target->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards., target->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards.); //Change me to float for better tma |
| 1913 | TB16cxx . . $ TB16..RegisterEventcxx . . $ Stack#RegisterEvent(e6f1e707912c925d).(bearing,signal, target->ShipTypecxx . . $ Submarine#ShipType.); |
| 1914 | // printf("Adding target %d to list.\n", target); |
| 1915 | Subscxx . . $ Subs.->Add_Targetcxx . . $ Submarine#Add_Target(fc20a4b472e56652).(target, signal); |
| 1916 | } |
| 1917 | else { |
| 1918 | // printf("Lost target %d from list.\n", target); |
| 1919 | Subscxx . . $ Subs.->Remove_Targetcxx . . $ Submarine#Remove_Target(a9ab5cc9dc811b12).(target); |
| 1920 | } |
| 1921 | } |
| 1922 | else // can't hear target with either sonar device |
| 1923 | Subscxx . . $ Subs.->Remove_Targetcxx . . $ Submarine#Remove_Target(a9ab5cc9dc811b12).(target); |
| 1924 | |
| 1925 | target = target->nextcxx . . $ Submarine#next.; |
| 1926 | if ( (!target) && (! line) ) |
| 1927 | { |
| 1928 | target = torpedoescxx . . $ torpedoes.; |
| 1929 | line = TRUEcxx . . $ `src/map.h:10:9`!; |
| 1930 | } |
| 1931 | } |
| 1932 | } |
| 1933 | |
| 1934 | /********************************************* |
| 1935 | This function will return if a target is in |
| 1936 | the observers Baffles and therefore not |
| 1937 | detectable. Values for 'int sensor' are 1 for |
| 1938 | spherical array, 2 for towed array, 3 for port |
| 1939 | hull array and 4 for starboard hull array. |
| 1940 | |
| 1941 | Might want to move the calculations of the |
| 1942 | baffle angles to the Coord class so they don't |
| 1943 | have to be calculated all the time. |
| 1944 | *********************************************/ |
| 1945 | /* |
| 1946 | Moving InBaffles to the Submarine class to keep things cleaner. |
| 1947 | -- Jesse |
| 1948 | |
| 1949 | int InBaffles(Submarine *observer, Submarine *target, int sensor){ |
| 1950 | int array_heading; |
| 1951 | int relative_bearing; |
| 1952 | int sensordeaf=1; |
| 1953 | int bearing_to_target; |
| 1954 | |
| 1955 | switch(sensor){ |
| 1956 | case 1: //Spherical |
| 1957 | sensordeaf = 0; |
| 1958 | array_heading = (int)observer->Heading; |
| 1959 | bearing_to_target = (int)observer->BearingToTarget( target); |
| 1960 | if(array_heading > bearing_to_target) bearing_to_target += 360; |
| 1961 | relative_bearing = bearing_to_target - array_heading; |
| 1962 | if(relative_bearing > 150 && relative_bearing < 210) sensordeaf = 1; |
| 1963 | if(target == observer) sensordeaf = 1; |
| 1964 | break; |
| 1965 | case 2: //Towed |
| 1966 | sensordeaf = 0; |
| 1967 | array_heading = (int)TB16.ReturnHeading(); |
| 1968 | bearing_to_target = (int)TB16.BearingToTarget(target->Lat_TotalYards, target->Lon_TotalYards); |
| 1969 | if(array_heading > bearing_to_target) bearing_to_target += 360; |
| 1970 | relative_bearing = bearing_to_target - array_heading; |
| 1971 | if(relative_bearing < 30 || relative_bearing > 330) sensordeaf = 1; |
| 1972 | break; |
| 1973 | case 3: //port hull |
| 1974 | case 4: //sb hull |
| 1975 | default: |
| 1976 | break; |
| 1977 | } |
| 1978 | return sensordeaf; |
| 1979 | } |
| 1980 | */ |
| 1981 | |
| 1982 | |
| 1983 | void DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(int xoffset,int yoffset){ |
| 1984 | SDL_Rect source, destination; |
| 1985 | source.x = 0; |
| 1986 | source.y = 0; |
| 1987 | source.w = 500; |
| 1988 | source.h = 500; |
| 1989 | destination.x = 374; |
| 1990 | destination.y = 145; |
| 1991 | destination.w = 500; |
| 1992 | destination.h = 500; |
| 1993 | Tmacxx . . $ Tma..Lockcxx . . $ TargetMotionAnalysis#Lock(49f6e7a06ebc5aa8).(); |
| 1994 | Tmacxx . . $ Tma..our_headingcxx . . $ TargetMotionAnalysis#our_heading. = (double)Subscxx . . $ Subs.->Headingcxx . . $ Coord#Heading.; |
| 1995 | Tmacxx . . $ Tma..our_speedcxx . . $ TargetMotionAnalysis#our_speed. = (float)Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed.; |
| 1996 | Tmacxx . . $ Tma..target_headingcxx . . $ TargetMotionAnalysis#target_heading. = (double)Subscxx . . $ Subs.->Headingcxx . . $ Coord#Heading.; |
| 1997 | Tmacxx . . $ Tma..target_speedcxx . . $ TargetMotionAnalysis#target_speed. = (float)Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed.; |
| 1998 | Tmacxx . . $ Tma..DisplayGeoPlotcxx . . $ TargetMotionAnalysis#DisplayGeoPlot(3e454b8ccf442868).(xoffset,yoffset); |
| 1999 | //Tma.DisplayLOS(); |
| 2000 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(Tmacxx . . $ Tma..GeoPlotScreencxx . . $ TargetMotionAnalysis#GeoPlotScreen., &source, screencxx . . $ screen., &destination); |
| 2001 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination); |
| 2002 | Tmacxx . . $ Tma..UnLockcxx . . $ TargetMotionAnalysis#UnLock(49f6e7a06ebc5aa8).(); |
| 2003 | } |
| 2004 | |
| 2005 | void DisplayWeaponscxx . . $ DisplayWeapons(49f6e7a06ebc5aa8).() |
| 2006 | { |
| 2007 | SDL_Rect weapons, tubes; |
| 2008 | DFontcxx . . $ DFont# fntcxx . . $ DFont#DFont(d0489a02ea06dfc6).("images/font.png", "data/font.dat"); |
| 2009 | char text[256]; |
| 2010 | int index, y1, y2; |
| 2011 | |
| 2012 | if (! update_weapons_screencxx . . $ update_weapons_screen.) |
| 2013 | return; |
| 2014 | |
| 2015 | weapons.x = 150; |
| 2016 | weapons.y = 145; |
| 2017 | weapons.w = 200; |
| 2018 | weapons.h = 300; |
| 2019 | tubes.x = 374; |
| 2020 | tubes.y = 145; |
| 2021 | tubes.h = 500; |
| 2022 | tubes.w = 501; |
| 2023 | |
| 2024 | SDL_FillRect(screencxx . . $ screen., &weapons, blackcxx . . $ black.); |
| 2025 | sprintf(text, "WEAPONS"); |
| 2026 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 190, 150, text); |
| 2027 | sprintf(text, " Torpedos: %d", Subscxx . . $ Subs.->TorpedosOnBoardcxx . . $ Submarine#TorpedosOnBoard.); |
| 2028 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 174, text); |
| 2029 | sprintf(text, "Noise Makers: %d", Subscxx . . $ Subs.->NoiseMakerscxx . . $ Submarine#NoiseMakers.); |
| 2030 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 196, text); |
| 2031 | sprintf(text, "'T' to load torpedo"); |
| 2032 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 300, text); |
| 2033 | sprintf(text, "'N' to load noise maker"); |
| 2034 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 312, text); |
| 2035 | sprintf(text, "'U' to unload device"); |
| 2036 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 324, text); |
| 2037 | sprintf(text, "'F' to fire"); |
| 2038 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 160, 336, text); |
| 2039 | SDL_UpdateRects(screencxx . . $ screen., 1, &weapons); |
| 2040 | |
| 2041 | SDL_FillRect(screencxx . . $ screen., &tubes, blackcxx . . $ black.); |
| 2042 | y1 = 150; y2 = 190; |
| 2043 | for (index = 0; index < MAX_TUBEScxx . . $ `src/submarine.h:68:9`!; index++) |
| 2044 | { |
| 2045 | // draw tube |
| 2046 | DrawRectanglecxx . . $ DrawRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., 390, y1, 500, y2, greencxx . . $ green.); |
| 2047 | // draw buttons |
| 2048 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 520, y1 + 5, " Load"); |
| 2049 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 520, y1 + 18, "Torpedo"); |
| 2050 | DrawRectanglecxx . . $ DrawRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., 520, y1, 590, y2, greencxx . . $ green.); |
| 2051 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 600, y1 + 5, " Load"); |
| 2052 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 600, y1 + 18, "Noise Maker"); |
| 2053 | DrawRectanglecxx . . $ DrawRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., 600, y1, 690, y2, greencxx . . $ green.); |
| 2054 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 700, y1 + 10, "Unload"); |
| 2055 | DrawRectanglecxx . . $ DrawRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., 700, y1, 760, y2, greencxx . . $ green.); |
| 2056 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 770, y1 + 10, "Fire!"); |
| 2057 | DrawRectanglecxx . . $ DrawRectangle(1738f3ac1892ed0c).(screencxx . . $ screen., 770, y1, 815, y2, greencxx . . $ green.); |
| 2058 | y1 += 50; y2 += 50; |
| 2059 | } |
| 2060 | SDL_UpdateRects(screencxx . . $ screen., 1, &tubes); |
| 2061 | |
| 2062 | // put stuff in the tubes |
| 2063 | y1 = 151; |
| 2064 | for (index = 0; index < MAX_TUBEScxx . . $ `src/submarine.h:68:9`!; index++) |
| 2065 | { |
| 2066 | tubes.x = 391; |
| 2067 | tubes.y = y1; |
| 2068 | tubes.w = 105; |
| 2069 | tubes.h = 35; |
| 2070 | if (Subscxx . . $ Subs.->torpedo_tubecxx . . $ Submarine#torpedo_tube.[index] == TUBE_TORPEDOcxx . . $ `src/submarine.h:70:9`!) |
| 2071 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(torpedo_imagecxx . . $ torpedo_image., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &tubes); |
| 2072 | else if (Subscxx . . $ Subs.->torpedo_tubecxx . . $ Submarine#torpedo_tube.[index] == TUBE_NOISEMAKERcxx . . $ `src/submarine.h:71:9`!) |
| 2073 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(noisemaker_imagecxx . . $ noisemaker_image., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &tubes); |
| 2074 | else |
| 2075 | { |
| 2076 | SDL_FillRect(screencxx . . $ screen., &tubes, blackcxx . . $ black.); |
| 2077 | sprintf(text, "Tube %d", index + 1); |
| 2078 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 420, y1 + 10, text); |
| 2079 | } |
| 2080 | SDL_UpdateRects(screencxx . . $ screen., 1, &tubes); |
| 2081 | y1 += 50; |
| 2082 | } |
| 2083 | update_weapons_screencxx . . $ update_weapons_screen. = FALSEcxx . . $ `src/map.h:13:9`!; |
| 2084 | } |
| 2085 | |
| 2086 | |
| 2087 | |
| 2088 | inline int RandIntcxx . . $ RandInt(7864480464b09eea).(int TO){ //Returns a random interger...TO is upper limit |
| 2089 | return (rand()%TO); |
| 2090 | } |
| 2091 | |
| 2092 | inline int Clampcxx . . $ Clamp(7864480464b09eea).(int sample){ //holds a value to be between 0 and 255 |
| 2093 | if (sample < 0){ |
| 2094 | sample = 0; |
| 2095 | } |
| 2096 | if (sample > 255){ |
| 2097 | sample = 255; |
| 2098 | } |
| 2099 | return sample; |
| 2100 | } |
| 2101 | |
| 2102 | inline double Clampcxx . . $ Clamp(447c67c6676f75c3).(double sample){ //Overloaded for floats |
| 2103 | if (sample < 0){ |
| 2104 | sample = 0.0; |
| 2105 | } |
| 2106 | if (sample > 255){ |
| 2107 | sample = 255.0; |
| 2108 | } |
| 2109 | return sample; |
| 2110 | } |
| 2111 | |
| 2112 | void ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(){ |
| 2113 | //turns off all the widget redraw flags |
| 2114 | SonarStationcxx . . $ SonarStation..sonarwidgetcxx . . $ AnBqq5#sonarwidget.=false; |
| 2115 | navwidgetcxx . . $ navwidget.=0; |
| 2116 | quitwidgetcxx . . $ quitwidget.=0; |
| 2117 | tmawidgetcxx . . $ tmawidget.=0; |
| 2118 | esmwidgetcxx . . $ esmwidget.=0; |
| 2119 | radarwidgetcxx . . $ radarwidget.=0; |
| 2120 | shipcontrolwidgetcxx . . $ shipcontrolwidget.=0; |
| 2121 | } |
| 2122 | |
| 2123 | void ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(int station){ |
| 2124 | |
| 2125 | // init everything to avoid overlap |
| 2126 | drawmapcxx . . $ drawmap. = drawweaponscxx . . $ drawweapons. = drawsonarcxx . . $ drawsonar. = drawradarcxx . . $ drawradar. = drawesmcxx . . $ drawesm. = drawcontrolcxx . . $ drawcontrol. = 0; |
| 2127 | navwidgetcxx . . $ navwidget. = shipcontrolwidgetcxx . . $ shipcontrolwidget. = radarwidgetcxx . . $ radarwidget. = esmwidgetcxx . . $ esmwidget. = 0; |
| 2128 | switch (station){// which station are we at? |
| 2129 | case 1: //sonar screen |
| 2130 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(1); //load in the screen for the SONAR station |
| 2131 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2132 | SonarStationcxx . . $ SonarStation..sonarwidgetcxx . . $ AnBqq5#sonarwidget. = true; //depress the widget |
| 2133 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2134 | drawsonarcxx . . $ drawsonar. = 1; //tell the sonar it's ok to draw itself |
| 2135 | break; |
| 2136 | case 2: //nav screen |
| 2137 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(2); //load in the screen for the NAV station |
| 2138 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2139 | navwidgetcxx . . $ navwidget. = 1; //depress the widget |
| 2140 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2141 | drawmapcxx . . $ drawmap. = 1; //tell the Map it's ok to draw itself |
| 2142 | break; |
| 2143 | case 3: //tma screen |
| 2144 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(3); //load in the screen for the TMA station |
| 2145 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2146 | // tmawidget = 1; //depress the widget |
| 2147 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2148 | drawweaponscxx . . $ drawweapons. = 1; //Turn on TMA screen updates |
| 2149 | break; |
| 2150 | case 4: //shipcontrol screen |
| 2151 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(4); //load in the screen for the shipcontrol station |
| 2152 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2153 | shipcontrolwidgetcxx . . $ shipcontrolwidget. = 1; //depress the widget |
| 2154 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2155 | drawcontrolcxx . . $ drawcontrol. = 1; |
| 2156 | ControlStationcxx . . $ ControlStation..InitGraphicscxx . . $ Control#InitGraphics(fac4f6e207c3be86).(screencxx . . $ screen., controlscreencxx . . $ controlscreen.); |
| 2157 | break; |
| 2158 | case 5: //RADAR screen |
| 2159 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(5); //load in the screen for the RADAR station |
| 2160 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2161 | radarwidgetcxx . . $ radarwidget. = 1; //depress the widget |
| 2162 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2163 | drawradarcxx . . $ drawradar. = 1; //Turn on Radar screen updates |
| 2164 | RadarStationcxx . . $ RadarStation..InitGraphicscxx . . $ Radar#InitGraphics(fac4f6e207c3be86).(screencxx . . $ screen., radarscreencxx . . $ radarscreen.); |
| 2165 | break; |
| 2166 | case 6: //ESM screen |
| 2167 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(6); //load in the screen for the ESM station |
| 2168 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); //self explanitory |
| 2169 | esmwidgetcxx . . $ esmwidget. = 1; //depress the widget |
| 2170 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); // display the widgets |
| 2171 | drawesmcxx . . $ drawesm. = 1; //Turn on ESM screen updates |
| 2172 | EsmStationcxx . . $ EsmStation..InitGraphicscxx . . $ Esm#InitGraphics(fac4f6e207c3be86).(screencxx . . $ screen., esmscreencxx . . $ esmscreen.); |
| 2173 | break; |
| 2174 | } |
| 2175 | } |
| 2176 | |
| 2177 | |
| 2178 | |
| 2179 | |
| 2180 | |
| 2181 | /************************************************** |
| 2182 | This is our callback function to handle |
| 2183 | time critical Functions |
| 2184 | **************************************************/ |
| 2185 | Uint32cxx . . $ Uint32# timerfunccxx . . $ timerfunc(7f8ca09206cb022b).(Uint32cxx . . $ Uint32# interval, void *param){ |
| 2186 | |
| 2187 | should_update_everythingcxx . . $ should_update_everything. = TRUEcxx . . $ `src/map.h:10:9`!; |
| 2188 | return interval; |
| 2189 | } |
| 2190 | |
| 2191 | int Update_Everythingcxx . . $ Update_Everything(b126dc7c1de90089).() |
| 2192 | { |
| 2193 | // param = NULL; |
| 2194 | #ifdef DEBUG |
| 2195 | printf("In timer function\n"); |
| 2196 | #endif |
| 2197 | Clockcxx . . $ Clock..UpdateTimecxx . . $ GameClock#UpdateTime(49f6e7a06ebc5aa8).(); |
| 2198 | ShipHandelingcxx . . $ ShipHandeling(49f6e7a06ebc5aa8).(); |
| 2199 | if (playercxx . . $ player.) |
| 2200 | { |
| 2201 | UpdateSensorscxx . . $ UpdateSensors(49f6e7a06ebc5aa8).(); |
| 2202 | // see if the mission is over |
| 2203 | Check_Findcxx . . $ Check_Find(e898ed6f8282e8).(Subscxx . . $ Subs.); |
| 2204 | Check_Alivecxx . . $ Check_Alive(e898ed6f8282e8).(Subscxx . . $ Subs.); |
| 2205 | my_mission_statuscxx . . $ my_mission_status. = Mission_Statuscxx . . $ Mission_Status(8e102eb2bbf433ac).(Subscxx . . $ Subs., my_mission_statuscxx . . $ my_mission_status.); |
| 2206 | } // player is dead, we should end the mission |
| 2207 | else |
| 2208 | my_mission_statuscxx . . $ my_mission_status. = MISSION_FAILEDcxx . . $ `src/mission.h:8:9`!; |
| 2209 | return TRUEcxx . . $ `src/map.h:10:9`!; |
| 2210 | } |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | /*************************************************** |
| 2215 | Another callback to handle the 60 second |
| 2216 | resolution TMA stuff. |
| 2217 | ****************************************************/ |
| 2218 | Uint32cxx . . $ Uint32# TmaTimercxx . . $ TmaTimer(7f8ca09206cb022b).(Uint32cxx . . $ Uint32# interval, void *param){ |
| 2219 | static Uint32cxx . . $ Uint32# tick = 0; |
| 2220 | Tmacxx . . $ Tma..Lockcxx . . $ TargetMotionAnalysis#Lock(49f6e7a06ebc5aa8).(); //Lock Tma access mutex |
| 2221 | param = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; //Quites error messages. |
| 2222 | tick ++; //record the time of the tma record. |
| 2223 | Tmacxx . . $ Tma..RecordBoatPositioncxx . . $ TargetMotionAnalysis#RecordBoatPosition(dcadd90aaa0f609).(Subscxx . . $ Subs.->Lat_TotalYardscxx . . $ Coord#Lat_TotalYards., Subscxx . . $ Subs.->Lon_TotalYardscxx . . $ Coord#Lon_TotalYards., Subscxx . . $ Subs.->BearingToTargetcxx . . $ Submarine#BearingToTarget(2de0d0e522051339).(& (Subscxx . . $ Subs.[1])) , tick); |
| 2224 | Tmacxx . . $ Tma..UnLockcxx . . $ TargetMotionAnalysis#UnLock(49f6e7a06ebc5aa8).(); //Unlock mutex |
| 2225 | return interval; |
| 2226 | } |
| 2227 | |
| 2228 | int HandleInputcxx . . $ HandleInput(6680877a3251ac7b).(SDL_Event &event, int &mousex, int &mousey){ |
| 2229 | static stringcxx . . $ std/string# textlinecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 2230 | int y1, y2, x_checks_out; |
| 2231 | int index; |
| 2232 | |
| 2233 | switch (event.type){ |
| 2234 | case SDL_MOUSEBUTTONDOWN: |
| 2235 | mousex = event.button.x; |
| 2236 | mousey = event.button.y; |
| 2237 | if (mousey<740 && mousey>711){ |
| 2238 | if (mousex <212 && mousex>180){ //SONAR widget |
| 2239 | return SONARcxx . . $ `src/main.h:44:10`!; |
| 2240 | break; |
| 2241 | } |
| 2242 | if (mousex <312 && mousex>280){ //Map Widget |
| 2243 | return NAVMAPcxx . . $ `src/main.h:45:10`!; |
| 2244 | break; |
| 2245 | } |
| 2246 | if (mousex <412 && mousex>380){ //TMA Widget |
| 2247 | return WEAPONScxx . . $ `src/main.h:114:10`!; |
| 2248 | break; |
| 2249 | } |
| 2250 | if (mousex <512 && mousex>480){ //Ship Control Widget |
| 2251 | return SHIPCONTROLcxx . . $ `src/main.h:64:10`!; |
| 2252 | break; |
| 2253 | } |
| 2254 | if (mousex <612 && mousex>580){ //ESM Widget |
| 2255 | return ESMcxx . . $ `src/main.h:78:10`!; |
| 2256 | break; |
| 2257 | } |
| 2258 | if (mousex <712 && mousex>680){ //RADAR Widget |
| 2259 | return RADARcxx . . $ `src/main.h:79:10`!; |
| 2260 | break; |
| 2261 | } |
| 2262 | if (mousex <812 && mousex>780){ //Quit Widget |
| 2263 | return QUITcxx . . $ `src/main.h:47:10`!; |
| 2264 | break; |
| 2265 | } |
| 2266 | if (mousex < 908 && mousex > 884){ //Time Compression + |
| 2267 | return COMPRESSTIMEcxx . . $ `src/main.h:48:10`!; |
| 2268 | break; |
| 2269 | } |
| 2270 | |
| 2271 | if (mousex < 1000 && mousex > 972){ //Time Compression - |
| 2272 | return UNCOMPRESSTIMEcxx . . $ `src/main.h:49:10`!; |
| 2273 | break; |
| 2274 | } |
| 2275 | } |
| 2276 | if(drawmapcxx . . $ drawmap. || drawtmacxx . . $ drawtma.){ |
| 2277 | if(mousex > 224 && mousex < 257){ |
| 2278 | if(mousey >270 && mousey < 300){ |
| 2279 | return CENTERDISPLAYcxx . . $ `src/main.h:59:10`!; |
| 2280 | break; |
| 2281 | } |
| 2282 | } |
| 2283 | if(mousex > 224 && mousex < 257){ |
| 2284 | if(mousey >220 && mousey < 245){ |
| 2285 | return SCROLLMAPUPcxx . . $ `src/main.h:65:10`!; |
| 2286 | break; |
| 2287 | } |
| 2288 | } |
| 2289 | if(mousex > 224 && mousex < 257){ |
| 2290 | if(mousey >320 && mousey < 345){ |
| 2291 | return SCROLLMAPDOWNcxx . . $ `src/main.h:66:10`!; |
| 2292 | break; |
| 2293 | } |
| 2294 | } |
| 2295 | if(mousex > 175 && mousex < 210){ |
| 2296 | if(mousey >270 && mousey < 300){ |
| 2297 | return SCROLLMAPLEFTcxx . . $ `src/main.h:67:10`!; |
| 2298 | break; |
| 2299 | } |
| 2300 | } |
| 2301 | if(mousex > 275 && mousex < 310){ |
| 2302 | if(mousey >270 && mousey < 300){ |
| 2303 | return SCROLLMAPRIGHTcxx . . $ `src/main.h:68:10`!; |
| 2304 | break; |
| 2305 | } |
| 2306 | } |
| 2307 | if(mousex >175 && mousex < 210){ |
| 2308 | if(mousey > 360 && mousey < 390){ |
| 2309 | return INCREASEMAPSCALEcxx . . $ `src/main.h:57:10`!; |
| 2310 | break; |
| 2311 | } |
| 2312 | } |
| 2313 | if(mousex >275 && mousex < 310){ |
| 2314 | if(mousey > 360 && mousey < 390){ |
| 2315 | return DECREASEMAPSCALEcxx . . $ `src/main.h:58:10`!; |
| 2316 | break; |
| 2317 | } |
| 2318 | } |
| 2319 | } |
| 2320 | // Radar events |
| 2321 | if(drawradarcxx . . $ drawradar.){ |
| 2322 | if(mousex > 105 && mousex < 512){ |
| 2323 | if(mousey >156 && mousey < 566){ |
| 2324 | RadarStationcxx . . $ RadarStation..ShowDatacxx . . $ Radar#ShowData(7bfbf473ac25ecb8).(screencxx . . $ screen., mousex, mousey); |
| 2325 | break; |
| 2326 | } |
| 2327 | } |
| 2328 | |
| 2329 | if(mousex > 748 && mousex < 795){ |
| 2330 | if(mousey >320 && mousey < 367){ |
| 2331 | return TOGGLER10cxx . . $ `src/main.h:82:10`!; |
| 2332 | break; |
| 2333 | } |
| 2334 | } |
| 2335 | |
| 2336 | if(mousex > 795 && mousex < 842){ |
| 2337 | if(mousey >320 && mousey < 367){ |
| 2338 | return TOGGLER20cxx . . $ `src/main.h:83:10`!; |
| 2339 | break; |
| 2340 | } |
| 2341 | } |
| 2342 | |
| 2343 | if(mousex > 842 && mousex < 889){ |
| 2344 | if(mousey >320 && mousey < 367){ |
| 2345 | return TOGGLER30cxx . . $ `src/main.h:84:10`!; |
| 2346 | break; |
| 2347 | } |
| 2348 | } |
| 2349 | |
| 2350 | if(mousex > 748 && mousex < 795){ |
| 2351 | if(mousey >367 && mousey < 414){ |
| 2352 | return TOGGLER40cxx . . $ `src/main.h:85:10`!; |
| 2353 | break; |
| 2354 | } |
| 2355 | } |
| 2356 | |
| 2357 | if(mousex > 795 && mousex < 842){ |
| 2358 | if(mousey >367 && mousey < 414){ |
| 2359 | return TOGGLER50cxx . . $ `src/main.h:86:10`!; |
| 2360 | break; |
| 2361 | } |
| 2362 | } |
| 2363 | |
| 2364 | if(mousex > 842 && mousex < 889){ |
| 2365 | if(mousey >367 && mousey < 414){ |
| 2366 | return TOGGLER60cxx . . $ `src/main.h:87:10`!; |
| 2367 | break; |
| 2368 | } |
| 2369 | } |
| 2370 | |
| 2371 | if(mousex > 744 && mousex < 791){ |
| 2372 | if(mousey >185 && mousey < 232){ |
| 2373 | return RADARDOWNcxx . . $ `src/main.h:88:10`!; |
| 2374 | break; |
| 2375 | } |
| 2376 | } |
| 2377 | |
| 2378 | if(mousex > 850 && mousex < 897){ |
| 2379 | if(mousey >185 && mousey < 232){ |
| 2380 | return RADARUPcxx . . $ `src/main.h:89:10`!; |
| 2381 | break; |
| 2382 | } |
| 2383 | } |
| 2384 | |
| 2385 | if(mousex > 749 && mousex < 796){ |
| 2386 | if(mousey >501 && mousey < 548){ |
| 2387 | return RING0cxx . . $ `src/main.h:90:10`!; |
| 2388 | break; |
| 2389 | } |
| 2390 | } |
| 2391 | |
| 2392 | if(mousex > 796 && mousex < 843){ |
| 2393 | if(mousey >501 && mousey < 548){ |
| 2394 | return RING5cxx . . $ `src/main.h:91:10`!; |
| 2395 | break; |
| 2396 | } |
| 2397 | } |
| 2398 | |
| 2399 | if(mousex > 843 && mousex < 889){ |
| 2400 | if(mousey >501 && mousey < 548){ |
| 2401 | return RING10cxx . . $ `src/main.h:92:10`!; |
| 2402 | break; |
| 2403 | } |
| 2404 | } |
| 2405 | |
| 2406 | if(mousex > 548 && mousex < 796){ |
| 2407 | if(mousey >548 && mousey < 594){ |
| 2408 | return RING15cxx . . $ `src/main.h:93:10`!; |
| 2409 | break; |
| 2410 | } |
| 2411 | } |
| 2412 | |
| 2413 | if(mousex > 796 && mousex < 843){ |
| 2414 | if(mousey >548 && mousey < 594){ |
| 2415 | return RING20cxx . . $ `src/main.h:94:10`!; |
| 2416 | break; |
| 2417 | } |
| 2418 | } |
| 2419 | |
| 2420 | if(mousex > 843 && mousex < 889){ |
| 2421 | if(mousey >548 && mousey < 594){ |
| 2422 | return RING25cxx . . $ `src/main.h:95:10`!; |
| 2423 | break; |
| 2424 | } |
| 2425 | } |
| 2426 | } |
| 2427 | |
| 2428 | // Weapon console events |
| 2429 | if (drawweaponscxx . . $ drawweapons.) |
| 2430 | { |
| 2431 | x_checks_out = TRUEcxx . . $ `src/map.h:10:9`!; |
| 2432 | y1 = 150; y2 = 190; |
| 2433 | // check all x1-x2 possiblities |
| 2434 | if ( (mousex > 520) && (mousex < 590) ) |
| 2435 | tube_actioncxx . . $ tube_action. = LOAD_TORPEDOcxx . . $ `src/main.h:115:10`!; |
| 2436 | else if ( (mousex > 600) && (mousex < 680) ) |
| 2437 | tube_actioncxx . . $ tube_action. = LOAD_NOISEMAKERcxx . . $ `src/main.h:116:10`!; |
| 2438 | else if ( (mousex > 700) && (mousex < 760) ) |
| 2439 | tube_actioncxx . . $ tube_action. = UNLOAD_TUBEcxx . . $ `src/main.h:117:10`!; |
| 2440 | else if ( (mousex > 770) && (mousex < 815) ) |
| 2441 | tube_actioncxx . . $ tube_action. = FIRE_TUBEcxx . . $ `src/main.h:118:10`!; |
| 2442 | else |
| 2443 | { |
| 2444 | tube_actioncxx . . $ tube_action. = 0; |
| 2445 | x_checks_out = FALSEcxx . . $ `src/map.h:13:9`!; |
| 2446 | } |
| 2447 | // look at all y1-y2 button possibilities |
| 2448 | if (x_checks_out) |
| 2449 | { |
| 2450 | index = 0; |
| 2451 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 2452 | while ( (index < MAX_TUBEScxx . . $ `src/submarine.h:68:9`!) && |
| 2453 | (tube_to_usecxx . . $ tube_to_use. == -1) ) |
| 2454 | { |
| 2455 | if ((mousey > y1) && (mousey < y2) ) |
| 2456 | tube_to_usecxx . . $ tube_to_use. = index; |
| 2457 | else |
| 2458 | { |
| 2459 | index++; |
| 2460 | y1 += 50; y2 += 50; |
| 2461 | } |
| 2462 | } // end of checking buttons vertically |
| 2463 | if (tube_to_usecxx . . $ tube_to_use. == -1) |
| 2464 | tube_actioncxx . . $ tube_action. = 0; |
| 2465 | } |
| 2466 | else |
| 2467 | tube_actioncxx . . $ tube_action. = 0; |
| 2468 | if ( (tube_actioncxx . . $ tube_action.) && (tube_to_usecxx . . $ tube_to_use. > -1) ) |
| 2469 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2470 | |
| 2471 | |
| 2472 | } // end of weapons screen |
| 2473 | // ESM events |
| 2474 | if(drawesmcxx . . $ drawesm.){ |
| 2475 | if(mousex > 744 && mousex < 791){ |
| 2476 | if(mousey >185 && mousey < 232){ |
| 2477 | return ESMDOWNcxx . . $ `src/main.h:98:10`!; |
| 2478 | break; |
| 2479 | } |
| 2480 | } |
| 2481 | |
| 2482 | if(mousex > 850 && mousex < 897){ |
| 2483 | if(mousey >185 && mousey < 232){ |
| 2484 | return ESMUPcxx . . $ `src/main.h:99:10`!; |
| 2485 | break; |
| 2486 | } |
| 2487 | } |
| 2488 | } |
| 2489 | |
| 2490 | // Control events |
| 2491 | if(drawcontrolcxx . . $ drawcontrol.){ |
| 2492 | if(mousex > 158 && mousex < 347){ |
| 2493 | if(mousey >250 && mousey < 430){ |
| 2494 | ControlStationcxx . . $ ControlStation..AdjustHeadingcxx . . $ Control#AdjustHeading(3e454b8ccf442868).(mousex, mousey); |
| 2495 | break; |
| 2496 | } |
| 2497 | } |
| 2498 | if(mousex > 112 && mousex < 126){ |
| 2499 | if(mousey >254 && mousey < 293){ |
| 2500 | ControlStationcxx . . $ ControlStation..AdjustDepthcxx . . $ Control#AdjustDepth(d4f767463ce0a6b3).(mousex); |
| 2501 | break; |
| 2502 | } |
| 2503 | } |
| 2504 | |
| 2505 | if(mousex > 385 && mousex < 401){ |
| 2506 | if(mousey >257 && mousey < 296){ |
| 2507 | ControlStationcxx . . $ ControlStation..AdjustDepthcxx . . $ Control#AdjustDepth(d4f767463ce0a6b3).(mousex); |
| 2508 | break; |
| 2509 | } |
| 2510 | } |
| 2511 | if(mousex > 364 && mousex < 404){ |
| 2512 | if(mousey >403 && mousey < 418){ |
| 2513 | return TURNSTARBOARDcxx . . $ `src/main.h:54:10`!; |
| 2514 | break; |
| 2515 | } |
| 2516 | } |
| 2517 | |
| 2518 | if(mousex > 108 && mousex < 147){ |
| 2519 | if(mousey >405 && mousey < 421){ |
| 2520 | return TURNPORTcxx . . $ `src/main.h:53:10`!; |
| 2521 | break; |
| 2522 | } |
| 2523 | } |
| 2524 | if(mousex > 232 && mousex < 252){ |
| 2525 | if(mousey >581 && mousey < 607){ |
| 2526 | return ASTOPcxx . . $ `src/main.h:102:10`!; |
| 2527 | break; |
| 2528 | } |
| 2529 | } |
| 2530 | if(mousex > 263 && mousex < 287){ |
| 2531 | if(mousey >581 && mousey < 607){ |
| 2532 | return A13cxx . . $ `src/main.h:103:10`!; |
| 2533 | break; |
| 2534 | } |
| 2535 | } |
| 2536 | if(mousex > 296 && mousex < 320){ |
| 2537 | if(mousey >581 && mousey < 607){ |
| 2538 | return A23cxx . . $ `src/main.h:104:10`!; |
| 2539 | break; |
| 2540 | } |
| 2541 | } |
| 2542 | if(mousex > 329 && mousex < 352){ |
| 2543 | if(mousey >581 && mousey < 607){ |
| 2544 | return ASTDcxx . . $ `src/main.h:105:10`!; |
| 2545 | break; |
| 2546 | } |
| 2547 | } |
| 2548 | if(mousex > 364 && mousex < 384){ |
| 2549 | if(mousey >581 && mousey < 607){ |
| 2550 | return AFULLcxx . . $ `src/main.h:106:10`!; |
| 2551 | break; |
| 2552 | } |
| 2553 | } |
| 2554 | if(mousex > 397 && mousex < 416){ |
| 2555 | if(mousey >581 && mousey < 607){ |
| 2556 | return AFLKcxx . . $ `src/main.h:107:10`!; |
| 2557 | break; |
| 2558 | } |
| 2559 | } |
| 2560 | if(mousex > 200 && mousex < 218){ |
| 2561 | if(mousey >581 && mousey < 607){ |
| 2562 | return B13cxx . . $ `src/main.h:108:10`!; |
| 2563 | break; |
| 2564 | } |
| 2565 | } |
| 2566 | if(mousex > 166 && mousex < 185){ |
| 2567 | if(mousey >581 && mousey < 607){ |
| 2568 | return B23cxx . . $ `src/main.h:109:10`!; |
| 2569 | break; |
| 2570 | } |
| 2571 | } |
| 2572 | if(mousex > 134 && mousex < 152){ |
| 2573 | if(mousey >581 && mousey < 607){ |
| 2574 | return BSTDcxx . . $ `src/main.h:110:10`!; |
| 2575 | break; |
| 2576 | } |
| 2577 | } |
| 2578 | if(mousex > 100 && mousex < 118){ |
| 2579 | if(mousey >581 && mousey < 607){ |
| 2580 | return BEMERcxx . . $ `src/main.h:111:10`!; |
| 2581 | break; |
| 2582 | } |
| 2583 | } |
| 2584 | if(mousex > 717 && mousex < 757){ |
| 2585 | if(mousey >585 && mousey < 601){ |
| 2586 | return EXTENDARRAYcxx . . $ `src/main.h:60:10`!; |
| 2587 | break; |
| 2588 | } |
| 2589 | } |
| 2590 | if(mousex > 717 && mousex < 757){ |
| 2591 | if(mousey >612 && mousey < 628){ |
| 2592 | return RETRACTARRAYcxx . . $ `src/main.h:61:10`!; |
| 2593 | break; |
| 2594 | } |
| 2595 | } |
| 2596 | } |
| 2597 | |
| 2598 | if(drawsonarcxx . . $ drawsonar.){ |
| 2599 | if(mousex > 615 && mousex < 657){ |
| 2600 | if(mousey > 162 && mousey < 210){ |
| 2601 | return TOGGLETRUERELATIVEcxx . . $ `src/main.h:70:10`!; |
| 2602 | break; |
| 2603 | } |
| 2604 | } |
| 2605 | if(mousex > 474 && mousex < 519){ |
| 2606 | if(mousey > 358 && mousey < 401){ |
| 2607 | return DESIGNATECONTACTcxx . . $ `src/main.h:112:10`!; |
| 2608 | break; |
| 2609 | } |
| 2610 | } |
| 2611 | if(mousex > 615 && mousex < 657){ |
| 2612 | if(mousey > 215 && mousey < 261){ |
| 2613 | return TOGGLESPHERICALTOWEDcxx . . $ `src/main.h:69:10`!; |
| 2614 | break; |
| 2615 | } |
| 2616 | } |
| 2617 | if(mousex > 663 && mousex < 706){ |
| 2618 | if(mousey > 162 && mousey < 210){ |
| 2619 | return UPPERCRTBUTTONcxx . . $ `src/main.h:71:10`!; |
| 2620 | break; |
| 2621 | } |
| 2622 | } |
| 2623 | if(mousex > 663 && mousex < 706){ |
| 2624 | if(mousey > 215 && mousey < 261){ |
| 2625 | return LOWERCRTBUTTONcxx . . $ `src/main.h:72:10`!; |
| 2626 | break; |
| 2627 | } |
| 2628 | } |
| 2629 | if (mousex > 472 && mousex < 520) |
| 2630 | { |
| 2631 | if (mousey > 590 && mousey < 638) |
| 2632 | return SEND_PINGcxx . . $ `src/main.h:122:17`!; |
| 2633 | } |
| 2634 | if(mousex > 520 && mousex < 567) |
| 2635 | { |
| 2636 | if (mousey > 590 && mousey < 638) |
| 2637 | { |
| 2638 | return CUTARRAYcxx . . $ `src/main.h:121:10`!; |
| 2639 | break; |
| 2640 | } |
| 2641 | } |
| 2642 | if(mousex >569 && mousex < 614){ |
| 2643 | if(mousey > 593 && mousey < 638){ |
| 2644 | return STOPWINCHcxx . . $ `src/main.h:62:10`!; |
| 2645 | break; |
| 2646 | } |
| 2647 | } |
| 2648 | if(mousex > 617 && mousex < 660){ |
| 2649 | if(mousey > 593 && mousey < 638){ |
| 2650 | return EXTENDARRAYcxx . . $ `src/main.h:60:10`!; |
| 2651 | break; |
| 2652 | } |
| 2653 | } |
| 2654 | if(mousex > 663 && mousex < 706){ |
| 2655 | if(mousey > 593 && mousey < 638){ |
| 2656 | return RETRACTARRAYcxx . . $ `src/main.h:61:10`!; |
| 2657 | break; |
| 2658 | } |
| 2659 | } |
| 2660 | if(mousex > 476 && mousex < 517){ |
| 2661 | if(mousey > 406 && mousey < 447){ |
| 2662 | return ASSIGNTRACKERcxx . . $ `src/main.h:73:10`!; |
| 2663 | break; |
| 2664 | } |
| 2665 | } |
| 2666 | if(mousex > 523 && mousex < 564){ |
| 2667 | if(mousey > 406 && mousey < 447){ |
| 2668 | return TRACKER1cxx . . $ `src/main.h:74:10`!; |
| 2669 | break; |
| 2670 | } |
| 2671 | } |
| 2672 | if(mousex > 570 && mousex < 611){ |
| 2673 | if(mousey > 406 && mousey < 447){ |
| 2674 | return TRACKER2cxx . . $ `src/main.h:75:10`!; |
| 2675 | break; |
| 2676 | } |
| 2677 | } |
| 2678 | if(mousex > 617 && mousex < 658){ |
| 2679 | if(mousey > 406 && mousey < 447){ |
| 2680 | return TRACKER3cxx . . $ `src/main.h:76:10`!; |
| 2681 | break; |
| 2682 | } |
| 2683 | } |
| 2684 | if(mousex > 663 && mousex < 706){ |
| 2685 | if(mousey > 406 && mousey < 447){ |
| 2686 | return TRACKER4cxx . . $ `src/main.h:77:10`!; |
| 2687 | break; |
| 2688 | } |
| 2689 | } |
| 2690 | } |
| 2691 | break; |
| 2692 | case SDL_QUIT: |
| 2693 | return QUITcxx . . $ `src/main.h:47:10`!; |
| 2694 | break; |
| 2695 | case SDL_KEYDOWN: //Process key presses |
| 2696 | switch(event.key.keysym.sym){ |
| 2697 | case SDLK_PAGEUPcxx . . $ SDLK_PAGEUP.: // PgUp Make Einstein proud. |
| 2698 | return COMPRESSTIMEcxx . . $ `src/main.h:48:10`!; |
| 2699 | break; |
| 2700 | case SDLK_PAGEDOWNcxx . . $ SDLK_PAGEDOWN.: // PgDown |
| 2701 | return UNCOMPRESSTIMEcxx . . $ `src/main.h:49:10`!; |
| 2702 | break; |
| 2703 | case SDLK_KP_PLUScxx . . $ SDLK_KP_PLUS.: |
| 2704 | case SDLK_PLUScxx . . $ SDLK_PLUS.: // Speed Up |
| 2705 | return INCREASESPEEDcxx . . $ `src/main.h:50:10`!; |
| 2706 | break; |
| 2707 | case SDLK_KP_MINUScxx . . $ SDLK_KP_MINUS.: |
| 2708 | case SDLK_MINUScxx . . $ SDLK_MINUS.: // Slow Down |
| 2709 | return DECREASESPEEDcxx . . $ `src/main.h:51:10`!; |
| 2710 | break; |
| 2711 | // case SDLK_n: // Navigation |
| 2712 | case SDLK_F2cxx . . $ SDLK_F2.: |
| 2713 | return NAVMAPcxx . . $ `src/main.h:45:10`!; |
| 2714 | break; |
| 2715 | // case SDLK_s: // Sonar |
| 2716 | case SDLK_F1cxx . . $ SDLK_F1.: |
| 2717 | return SONARcxx . . $ `src/main.h:44:10`!; |
| 2718 | break; |
| 2719 | // case SDLK_t: // TMA |
| 2720 | case SDLK_F3cxx . . $ SDLK_F3.: |
| 2721 | return WEAPONScxx . . $ `src/main.h:114:10`!; |
| 2722 | break; |
| 2723 | case SDLK_ESCAPEcxx . . $ SDLK_ESCAPE.: // Quit... |
| 2724 | return QUITcxx . . $ `src/main.h:47:10`!; |
| 2725 | break; |
| 2726 | case SDLK_TABcxx . . $ SDLK_TAB.: // switch target |
| 2727 | return SWITCHTARGETcxx . . $ `src/main.h:113:10`!; |
| 2728 | break; |
| 2729 | case SDLK_F10cxx . . $ SDLK_F10.: // Dump the screen |
| 2730 | return DUMPSCREENcxx . . $ `src/main.h:52:10`!; |
| 2731 | break; |
| 2732 | case SDLK_F4cxx . . $ SDLK_F4.: |
| 2733 | return SHIPCONTROLcxx . . $ `src/main.h:64:10`!; |
| 2734 | break; |
| 2735 | case SDLK_F5cxx . . $ SDLK_F5.: |
| 2736 | return ESMcxx . . $ `src/main.h:78:10`!; |
| 2737 | break; |
| 2738 | case SDLK_F6cxx . . $ SDLK_F6.: |
| 2739 | return RADARcxx . . $ `src/main.h:79:10`!; |
| 2740 | break; |
| 2741 | case SDLK_KP4cxx . . $ SDLK_KP4.: // Turn Left |
| 2742 | return TURNPORTcxx . . $ `src/main.h:53:10`!; |
| 2743 | break; |
| 2744 | case SDLK_KP6cxx . . $ SDLK_KP6.: // Turn Right |
| 2745 | return TURNSTARBOARDcxx . . $ `src/main.h:54:10`!; |
| 2746 | break; |
| 2747 | case SDLK_KP2cxx . . $ SDLK_KP2.: // Dive |
| 2748 | return INCREASEDEPTHcxx . . $ `src/main.h:55:10`!; |
| 2749 | break; |
| 2750 | case SDLK_KP8cxx . . $ SDLK_KP8.: //Surface |
| 2751 | return DECREASEDEPTHcxx . . $ `src/main.h:56:10`!; |
| 2752 | break; |
| 2753 | case SDLK_INSERTcxx . . $ SDLK_INSERT.: |
| 2754 | return INCREASEMAPSCALEcxx . . $ `src/main.h:57:10`!; |
| 2755 | break; |
| 2756 | case SDLK_DELETEcxx . . $ SDLK_DELETE.: |
| 2757 | return DECREASEMAPSCALEcxx . . $ `src/main.h:58:10`!; |
| 2758 | break; |
| 2759 | case SDLK_UPcxx . . $ SDLK_UP. : |
| 2760 | return SCROLLMAPUPcxx . . $ `src/main.h:65:10`!; |
| 2761 | break; |
| 2762 | case SDLK_DOWNcxx . . $ SDLK_DOWN.: |
| 2763 | return SCROLLMAPDOWNcxx . . $ `src/main.h:66:10`!; |
| 2764 | break; |
| 2765 | case SDLK_LEFTcxx . . $ SDLK_LEFT.: |
| 2766 | return SCROLLMAPLEFTcxx . . $ `src/main.h:67:10`!; |
| 2767 | break; |
| 2768 | case SDLK_RIGHTcxx . . $ SDLK_RIGHT.: |
| 2769 | return SCROLLMAPRIGHTcxx . . $ `src/main.h:68:10`!; |
| 2770 | break; |
| 2771 | case SDLK_ccxx . . $ SDLK_c.: |
| 2772 | return CENTERDISPLAYcxx . . $ `src/main.h:59:10`!; |
| 2773 | break; |
| 2774 | case SDLK_ecxx . . $ SDLK_e.: |
| 2775 | return EXTENDARRAYcxx . . $ `src/main.h:60:10`!; |
| 2776 | break; |
| 2777 | case SDLK_rcxx . . $ SDLK_r.: |
| 2778 | return RETRACTARRAYcxx . . $ `src/main.h:61:10`!; |
| 2779 | break; |
| 2780 | case SDLK_wcxx . . $ SDLK_w.: |
| 2781 | return STOPWINCHcxx . . $ `src/main.h:62:10`!; |
| 2782 | break; |
| 2783 | // case 19: // Pause The Game |
| 2784 | case SDLK_pcxx . . $ SDLK_p.: // Pause The Game |
| 2785 | return PAUSEGAMEcxx . . $ `src/main.h:63:10`!; |
| 2786 | break; |
| 2787 | case SDLK_tcxx . . $ SDLK_t.: |
| 2788 | tube_actioncxx . . $ tube_action. = LOAD_TORPEDOcxx . . $ `src/main.h:115:10`!; |
| 2789 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 2790 | return WHICHTUBEcxx . . $ `src/main.h:119:10`!; |
| 2791 | case SDLK_ncxx . . $ SDLK_n.: |
| 2792 | tube_actioncxx . . $ tube_action. = LOAD_NOISEMAKERcxx . . $ `src/main.h:116:10`!; |
| 2793 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 2794 | return WHICHTUBEcxx . . $ `src/main.h:119:10`!; |
| 2795 | case SDLK_ucxx . . $ SDLK_u.: |
| 2796 | tube_actioncxx . . $ tube_action. = UNLOAD_TUBEcxx . . $ `src/main.h:117:10`!; |
| 2797 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 2798 | return WHICHTUBEcxx . . $ `src/main.h:119:10`!; |
| 2799 | case SDLK_fcxx . . $ SDLK_f.: |
| 2800 | tube_actioncxx . . $ tube_action. = FIRE_TUBEcxx . . $ `src/main.h:118:10`!; |
| 2801 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 2802 | return WHICHTUBEcxx . . $ `src/main.h:119:10`!; |
| 2803 | case SDLK_1cxx . . $ SDLK_1.: |
| 2804 | tube_to_usecxx . . $ tube_to_use. = 0; |
| 2805 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2806 | case SDLK_2cxx . . $ SDLK_2.: |
| 2807 | tube_to_usecxx . . $ tube_to_use. = 1; |
| 2808 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2809 | case SDLK_3cxx . . $ SDLK_3.: |
| 2810 | tube_to_usecxx . . $ tube_to_use. = 2; |
| 2811 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2812 | case SDLK_4cxx . . $ SDLK_4.: |
| 2813 | tube_to_usecxx . . $ tube_to_use. = 3; |
| 2814 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2815 | case SDLK_5cxx . . $ SDLK_5.: |
| 2816 | tube_to_usecxx . . $ tube_to_use. = 4; |
| 2817 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2818 | case SDLK_6cxx . . $ SDLK_6.: |
| 2819 | tube_to_usecxx . . $ tube_to_use. = 5; |
| 2820 | return USE_TUBEcxx . . $ `src/main.h:120:10`!; |
| 2821 | case SDLK_gcxx . . $ SDLK_g.: |
| 2822 | return SEND_PINGcxx . . $ `src/main.h:122:17`!; |
| 2823 | case SDLK_qcxx . . $ SDLK_q.: |
| 2824 | return UP_THERMALcxx . . $ `src/main.h:123:17`!; |
| 2825 | case SDLK_acxx . . $ SDLK_a.: |
| 2826 | return HOLD_DEPTHcxx . . $ `src/main.h:124:17`!; |
| 2827 | case SDLK_zcxx . . $ SDLK_z.: |
| 2828 | return DOWN_THERMALcxx . . $ `src/main.h:125:17`!; |
| 2829 | case SDLK_scxx . . $ SDLK_s.: |
| 2830 | return GO_SURFACEcxx . . $ `src/main.h:127:10`!; |
| 2831 | case SDLK_xcxx . . $ SDLK_x.: |
| 2832 | return GO_PERISCOPE_DEPTHcxx . . $ `src/main.h:126:10`!; |
| 2833 | default: |
| 2834 | return 0; |
| 2835 | break; |
| 2836 | } |
| 2837 | default: |
| 2838 | return 0; |
| 2839 | break; |
| 2840 | } |
| 2841 | return 0; |
| 2842 | } |
| 2843 | |
| 2844 | int maincxx . . $ main(afcd3168fc1188a4).(int argc, char **argv){ |
| 2845 | static char text[120]; |
| 2846 | int status; |
| 2847 | int hours=0; |
| 2848 | int minutes=0; |
| 2849 | int seconds=0; |
| 2850 | int option_choice;//a place to put command line switches |
| 2851 | int screendumpcount = 0; |
| 2852 | int mousex = 0, mousey = 0; //where is the mouse? |
| 2853 | bool quit = false; //Quit flag Duh! |
| 2854 | int station; //flag to decide which work station to display |
| 2855 | bool full_screen = false; |
| 2856 | char *textline = ""; |
| 2857 | char file1[] = "images/font.png"; |
| 2858 | char file2[] = "data/font.dat"; |
| 2859 | char file3[] = "images/largefont.png"; |
| 2860 | char file4[] = "data/largefont.dat"; |
| 2861 | int mission_number = 0; |
| 2862 | int enable_sound = FALSEcxx . . $ `src/map.h:13:9`!; |
| 2863 | SDL_Event event; //a typedef to hold events |
| 2864 | drawsonarcxx . . $ drawsonar. = 0; // draw the sonar flag |
| 2865 | drawmapcxx . . $ drawmap. = 1; // draw the map flag |
| 2866 | drawradarcxx . . $ drawradar. = 0; |
| 2867 | drawesmcxx . . $ drawesm. = 0; |
| 2868 | drawcontrolcxx . . $ drawcontrol. = 0; |
| 2869 | northcentercxx . . $ northcenter. = true; //make the sonar display N. centered |
| 2870 | Uint32cxx . . $ Uint32# timer1; // timer2; // our event timers.... |
| 2871 | SDL_TimerID timer_id, timer_id2; |
| 2872 | torpedoescxx . . $ torpedoes. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2873 | helicopterscxx . . $ helicopters. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2874 | tmamutexcxx . . $ tmamutex. = SDL_CreateMutex(); |
| 2875 | srand(time(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)); //Seed the random generator |
| 2876 | |
| 2877 | //Process commandline options. |
| 2878 | /* |
| 2879 | sprintf(text,"m:vwfkhs"); |
| 2880 | while ((option_choice = getopt(argc, argv, text)) != -1){ |
| 2881 | */ |
| 2882 | status = 1; |
| 2883 | while (status < argc) |
| 2884 | { |
| 2885 | if (argv[status][0] == '-') |
| 2886 | option_choice = argv[status][1]; |
| 2887 | else |
| 2888 | option_choice = '\0'; |
| 2889 | switch (option_choice) |
| 2890 | { |
| 2891 | case 'm': |
| 2892 | // mission_number = atoi(optarg); |
| 2893 | mission_number = atoi(argv[status + 1]); |
| 2894 | status++; |
| 2895 | break; |
| 2896 | case 'w': //they passed the '-w' flag. |
| 2897 | full_screen = false; |
| 2898 | break; |
| 2899 | case 'f': // full screen |
| 2900 | full_screen = true; |
| 2901 | break; |
| 2902 | /* |
| 2903 | case 'k': //This option is just for me cause when using kdevelop |
| 2904 | //I don't start in the right directory. |
| 2905 | chdir("./subsim"); |
| 2906 | break; |
| 2907 | */ |
| 2908 | case 'v': |
| 2909 | coutcxx . . $ cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "OpenSSN version " <<cxx . . $ std/basic_ostream#`operator<<`(968942d578224538). VERSIONcxx . . $ `<built-in>:486:9`! <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 2910 | return 0; |
| 2911 | case 'h': |
| 2912 | coutcxx . . $ cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Usage:" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2913 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-m <mission> select specific mission." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2914 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-f For full screen mode." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2915 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-s Enable sound effects." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2916 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-w For Windowed Mode." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2917 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-v For version." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2918 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-h For this message." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 2919 | return 0; |
| 2920 | break; |
| 2921 | case 's': |
| 2922 | enable_sound = TRUEcxx . . $ `src/map.h:10:9`!; |
| 2923 | break; |
| 2924 | default: |
| 2925 | coutcxx . . $ cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Unknown command-line argument" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 2926 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Please use -h for a list of commands." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 2927 | return 1; |
| 2928 | } // end of switch |
| 2929 | status++; |
| 2930 | } // end of while |
| 2931 | SetupScreencxx . . $ SetupScreen(b45ddcbc8423892c).(full_screen); |
| 2932 | Init_Audiocxx . . $ Init_Audio(7864480464b09eea).(enable_sound); |
| 2933 | // CreateShips(mission_number); |
| 2934 | Tmacxx . . $ Tma..InitGraphicscxx . . $ TargetMotionAnalysis#InitGraphics(49f6e7a06ebc5aa8).(); |
| 2935 | SonarStationcxx . . $ SonarStation..InitGraphicscxx . . $ AnBqq5#InitGraphics(49f6e7a06ebc5aa8).(); |
| 2936 | // msg Message; |
| 2937 | Messagecxx . . $ Message..InitGraphicscxx . . $ msg#InitGraphics(49f6e7a06ebc5aa8).(); |
| 2938 | Clockcxx . . $ Clock..InitTimecxx . . $ GameClock#InitTime(b1146eedae1e1d0b).(12,15,0); |
| 2939 | SonarStationcxx . . $ SonarStation..LoadWidgetscxx . . $ AnBqq5#LoadWidgets(49f6e7a06ebc5aa8).(); |
| 2940 | SDL_EnableKeyRepeat(150,100); |
| 2941 | LoadWidgetscxx . . $ LoadWidgets(49f6e7a06ebc5aa8).(); |
| 2942 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(0); //Display intro screen |
| 2943 | DFontcxx . . $ DFont# fntcxx . . $ DFont#DFont(d0489a02ea06dfc6).(file1, file2); |
| 2944 | static DFontcxx . . $ DFont# fnt2cxx . . $ DFont#DFont(d0489a02ea06dfc6).(file3,file4); |
| 2945 | my_mapcxx . . $ my_map. = new MAPcxx . . $ MAP#(); |
| 2946 | #ifdef DEBUGMAP |
| 2947 | my_map->Test_Map(); |
| 2948 | #endif |
| 2949 | SDL_UpdateRect(screencxx . . $ screen., 0, 0, 0, 0); |
| 2950 | timer1 = SDL_GetTicks();// initialize the timer |
| 2951 | SDL_Delay(1000); // show splash screen for one second |
| 2952 | quit = false; //reset loop exit flag |
| 2953 | //LoadWidgets(); //load up the buttons |
| 2954 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(9); |
| 2955 | // main menu stuff goes here |
| 2956 | status = Main_Menucxx . . $ Main_Menu(8294d564b9200189).(&mission_number, screencxx . . $ screen.); |
| 2957 | if (status == ACTION_QUITcxx . . $ `src/menu.h:4:9`!) |
| 2958 | quit = true; |
| 2959 | |
| 2960 | CreateShipscxx . . $ CreateShips(409e6fe0be183062).(mission_number, my_mapcxx . . $ my_map.); |
| 2961 | SDL_Rect rectangle; |
| 2962 | rectangle.x = 0; |
| 2963 | rectangle.y = 0; |
| 2964 | rectangle.w = 1024; // This block of code clears the screen |
| 2965 | rectangle.h = 768; |
| 2966 | SDL_FillRect(screencxx . . $ screen., &rectangle, blackcxx . . $ black.); |
| 2967 | timecompressioncxx . . $ timecompression. = 1; |
| 2968 | station = 2; //default station |
| 2969 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(station); |
| 2970 | // textline="OpenSSN VERSION 0.5"; |
| 2971 | sprintf(text, "OpenSSN version %2.1f", VERSIONcxx . . $ `<built-in>:486:9`!); |
| 2972 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).(text); |
| 2973 | textline="http://openssn.sourceforge.net"; |
| 2974 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).(textline); |
| 2975 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 2976 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 2977 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 2978 | my_mission_statuscxx . . $ my_mission_status. = MISSION_STARTEDcxx . . $ `src/mission.h:6:9`!; |
| 2979 | timer_id = SDL_AddTimer(1000, timerfunccxx . . $ timerfunc(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2980 | timer_id2 = SDL_AddTimer(60000, TmaTimercxx . . $ TmaTimer(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2981 | timer1 = SDL_GetTicks(); |
| 2982 | // timer2 = SDL_GetTicks(); |
| 2983 | const int frameperiod = 100; //how fast we want the displays to update (in milliseconds)... this allows for a fixed frame rate |
| 2984 | while (!quit) |
| 2985 | { //This is the main loop..... |
| 2986 | if (timer1 + (frameperiod) < SDL_GetTicks()){ |
| 2987 | timer1 = SDL_GetTicks(); |
| 2988 | RadarStationcxx . . $ RadarStation..Sweepcxx . . $ Radar#Sweep(9364e6e7bff7660).(frameperiod*timecompressioncxx . . $ timecompression.); |
| 2989 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 2990 | |
| 2991 | SDL_Rect rectangle; |
| 2992 | rectangle.x=16; |
| 2993 | rectangle.y=14; //define a rectangle on the screen and make it black |
| 2994 | rectangle.h=72; |
| 2995 | rectangle.w=126; |
| 2996 | SDL_FillRect(screencxx . . $ screen., &rectangle, blackcxx . . $ black.); |
| 2997 | sprintf(text, "Now - Wanted"); |
| 2998 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 30, 20, text); |
| 2999 | sprintf(text, "S: [%3i] - [%3i]", (int)Subscxx . . $ Subs.->Speedcxx . . $ Coord#Speed., Subscxx . . $ Subs.->DesiredSpeedcxx . . $ Submarine#DesiredSpeed.); |
| 3000 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 30, 31, text); |
| 3001 | sprintf(text, "H: [%3i] - [%3i]", (int)Subscxx . . $ Subs.->Headingcxx . . $ Coord#Heading., Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading.); |
| 3002 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 30, 42, text); |
| 3003 | sprintf(text, "D: [%4i] - [%4i]", (int)Subscxx . . $ Subs.->Depthcxx . . $ Submarine#Depth., Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth.); |
| 3004 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 30, 53, text); |
| 3005 | // sprintf(text, "ARRAY [%4i]", TB16.GetLength()); |
| 3006 | // fnt.PutString(screen, 40, 53, text); |
| 3007 | Clockcxx . . $ Clock..GetTimecxx . . $ GameClock#GetTime(c5dbce0a152fbb5f).(hours,minutes,seconds); |
| 3008 | sprintf(text, "%.2i:%.2i:%.2i", hours, minutes, seconds); |
| 3009 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 40, 64, text); |
| 3010 | SDL_UpdateRects(screencxx . . $ screen., 1, &rectangle); |
| 3011 | } |
| 3012 | |
| 3013 | while (SDL_PollEvent(&event)){ |
| 3014 | //If there are events waiting take care of them |
| 3015 | switch (HandleInputcxx . . $ HandleInput(6680877a3251ac7b).(event, mousex, mousey)){ |
| 3016 | case SONARcxx . . $ `src/main.h:44:10`!: |
| 3017 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(1); |
| 3018 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3019 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Sonar station"); |
| 3020 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3021 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3022 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3023 | break; |
| 3024 | case NAVMAPcxx . . $ `src/main.h:45:10`!: |
| 3025 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(2); |
| 3026 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3027 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Naviation display"); |
| 3028 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3029 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3030 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3031 | break; |
| 3032 | case WEAPONScxx . . $ `src/main.h:114:10`!: |
| 3033 | update_weapons_screencxx . . $ update_weapons_screen. = TRUEcxx . . $ `src/map.h:10:9`!; |
| 3034 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(3); |
| 3035 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3036 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Weapons console"); |
| 3037 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3038 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3039 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3040 | break; |
| 3041 | case WHICHTUBEcxx . . $ `src/main.h:119:10`!: |
| 3042 | update_weapons_screencxx . . $ update_weapons_screen. = TRUEcxx . . $ `src/map.h:10:9`!; |
| 3043 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3044 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Which tube (1-6)?"); |
| 3045 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3046 | break; |
| 3047 | case SHIPCONTROLcxx . . $ `src/main.h:64:10`!: |
| 3048 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(4); |
| 3049 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3050 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Helm control"); |
| 3051 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3052 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3053 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3054 | break; |
| 3055 | case ESMcxx . . $ `src/main.h:78:10`!: |
| 3056 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(6); |
| 3057 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3058 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("ESM station"); |
| 3059 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3060 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3061 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3062 | break; |
| 3063 | case RADARcxx . . $ `src/main.h:79:10`!: |
| 3064 | ShowStationcxx . . $ ShowStation(d4f767463ce0a6b3).(5); |
| 3065 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3066 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Radar console"); |
| 3067 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3068 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3069 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3070 | break; |
| 3071 | case SWITCHTARGETcxx . . $ `src/main.h:113:10`!: |
| 3072 | current_targetcxx . . $ current_target. = Subscxx . . $ Subs.->Next_Targetcxx . . $ Submarine#Next_Target(5a8a75acd7038d8b).(); |
| 3073 | if (drawmapcxx . . $ drawmap.) |
| 3074 | { |
| 3075 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3076 | // PlaceShips(mapscale, 0, -10, current_target); |
| 3077 | } |
| 3078 | SDL_Delay(100); |
| 3079 | break; |
| 3080 | case QUITcxx . . $ `src/main.h:47:10`!: |
| 3081 | printf("Got quit signal.\n"); |
| 3082 | ResetWidgetFlagscxx . . $ ResetWidgetFlags(49f6e7a06ebc5aa8).(); |
| 3083 | quitwidgetcxx . . $ quitwidget.=1; |
| 3084 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3085 | SDL_Delay(200); |
| 3086 | quitwidgetcxx . . $ quitwidget.=0; |
| 3087 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3088 | SDL_Delay(500); |
| 3089 | quit = true; |
| 3090 | break; |
| 3091 | case COMPRESSTIMEcxx . . $ `src/main.h:48:10`!: // Make Einstein proud. |
| 3092 | destination_rectanglecxx . . $ destination_rectangle..x = 880; //upper left corner to |
| 3093 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 3094 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttondowncxx . . $ plusbuttondown.->h; //height & |
| 3095 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttondowncxx . . $ plusbuttondown.->w;//width of button. |
| 3096 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttondowncxx . . $ plusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3097 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show button on the screen... |
| 3098 | timecompressioncxx . . $ timecompression.++; |
| 3099 | if(timecompressioncxx . . $ timecompression. > 8){ |
| 3100 | timecompressioncxx . . $ timecompression. = 8; |
| 3101 | }else{ |
| 3102 | if (!pause_gamecxx . . $ pause_game.){ |
| 3103 | SDL_RemoveTimer(timer_id); |
| 3104 | SDL_RemoveTimer(timer_id2); |
| 3105 | timer_id = SDL_AddTimer(1000/timecompressioncxx . . $ timecompression., timerfunccxx . . $ timerfunc(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3106 | timer_id2 = SDL_AddTimer(60000/timecompressioncxx . . $ timecompression., TmaTimercxx . . $ TmaTimer(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3107 | } |
| 3108 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3109 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3110 | } |
| 3111 | SDL_Delay(150); |
| 3112 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3113 | break; |
| 3114 | case UNCOMPRESSTIMEcxx . . $ `src/main.h:49:10`!: // Take A Downer |
| 3115 | destination_rectanglecxx . . $ destination_rectangle..x = 970; //upper left corner to |
| 3116 | destination_rectanglecxx . . $ destination_rectangle..y = 710; //place the button. |
| 3117 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttondowncxx . . $ minusbuttondown.->h; //height & |
| 3118 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttondowncxx . . $ minusbuttondown.->w;//width of button. |
| 3119 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttondowncxx . . $ minusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3120 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show button on the screen... |
| 3121 | timecompressioncxx . . $ timecompression.--; |
| 3122 | if(timecompressioncxx . . $ timecompression. < 1){ |
| 3123 | timecompressioncxx . . $ timecompression. = 1; |
| 3124 | }else{ |
| 3125 | if (!pause_gamecxx . . $ pause_game.){ |
| 3126 | SDL_RemoveTimer(timer_id); |
| 3127 | SDL_RemoveTimer(timer_id2); |
| 3128 | timer_id = SDL_AddTimer(1000/timecompressioncxx . . $ timecompression., timerfunccxx . . $ timerfunc(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3129 | timer_id2 = SDL_AddTimer(60000/timecompressioncxx . . $ timecompression., TmaTimercxx . . $ TmaTimer(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3130 | } |
| 3131 | sprintf(text, "[%i] ", timecompressioncxx . . $ timecompression.); |
| 3132 | fnt.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screencxx . . $ screen., 933, 718, text); |
| 3133 | } |
| 3134 | SDL_Delay(150); |
| 3135 | DisplayWidgetscxx . . $ DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3136 | break; |
| 3137 | case INCREASESPEEDcxx . . $ `src/main.h:50:10`!: |
| 3138 | Subscxx . . $ Subs.->DesiredSpeedcxx . . $ Submarine#DesiredSpeed.++; |
| 3139 | break; |
| 3140 | case DECREASESPEEDcxx . . $ `src/main.h:51:10`!: |
| 3141 | Subscxx . . $ Subs.->DesiredSpeedcxx . . $ Submarine#DesiredSpeed.--; |
| 3142 | break; |
| 3143 | case DUMPSCREENcxx . . $ `src/main.h:52:10`!: |
| 3144 | screendumpcount++; |
| 3145 | sprintf(text, "screendump%i.bmp", screendumpcount ); |
| 3146 | SDL_SaveBMPcxx . . $ `<external>/3508485105195885937/SDL_video.h:265:9`!(screen,text); //screen dumps |
| 3147 | cerrcxx . . $ cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Screen Dump" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 3148 | break; |
| 3149 | case TURNPORTcxx . . $ `src/main.h:53:10`!: |
| 3150 | Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading.--; |
| 3151 | if(Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading. < 0){ |
| 3152 | Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading. += 360; |
| 3153 | } |
| 3154 | break; |
| 3155 | case TURNSTARBOARDcxx . . $ `src/main.h:54:10`!: |
| 3156 | Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading.++; |
| 3157 | if(Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading. > 359){ |
| 3158 | Subscxx . . $ Subs.->DesiredHeadingcxx . . $ Submarine#DesiredHeading. -= 360; |
| 3159 | } |
| 3160 | break; |
| 3161 | case INCREASEDEPTHcxx . . $ `src/main.h:55:10`!: |
| 3162 | Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth.++; |
| 3163 | if (Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth. > Subscxx . . $ Subs.->MaxDepthcxx . . $ Submarine#MaxDepth.) |
| 3164 | Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = Subscxx . . $ Subs.->MaxDepthcxx . . $ Submarine#MaxDepth.; |
| 3165 | break; |
| 3166 | case DECREASEDEPTHcxx . . $ `src/main.h:56:10`!: |
| 3167 | Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth.--; |
| 3168 | if(Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth. < 0){ |
| 3169 | Subscxx . . $ Subs.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = 0; |
| 3170 | } |
| 3171 | break; |
| 3172 | case INCREASEMAPSCALEcxx . . $ `src/main.h:57:10`!: |
| 3173 | if (drawmapcxx . . $ drawmap.){ |
| 3174 | mapscalecxx . . $ mapscale.++; |
| 3175 | if(mapscalecxx . . $ mapscale.>MAX_MAP_SCALEcxx . . $ `src/main.h:31:9`!) mapscalecxx . . $ mapscale.=MAX_MAP_SCALEcxx . . $ `src/main.h:31:9`!; |
| 3176 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 3177 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 3178 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttondowncxx . . $ plusbuttondown.->h; //height & |
| 3179 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttondowncxx . . $ plusbuttondown.->w;//width of button. |
| 3180 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttondowncxx . . $ plusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3181 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 3182 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3183 | //UpdateDisplay(); |
| 3184 | SDL_Delay(100); |
| 3185 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3186 | } |
| 3187 | if(drawtmacxx . . $ drawtma.){ |
| 3188 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 3189 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 3190 | destination_rectanglecxx . . $ destination_rectangle..h = plusbuttondowncxx . . $ plusbuttondown.->h; //height & |
| 3191 | destination_rectanglecxx . . $ destination_rectangle..w = plusbuttondowncxx . . $ plusbuttondown.->w;//width of button. |
| 3192 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(plusbuttondowncxx . . $ plusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3193 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 3194 | Tmacxx . . $ Tma..IncreasePlotScalecxx . . $ TargetMotionAnalysis#IncreasePlotScale(49f6e7a06ebc5aa8).(); |
| 3195 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(); |
| 3196 | SDL_Delay(100); |
| 3197 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3198 | } |
| 3199 | break; |
| 3200 | case DECREASEMAPSCALEcxx . . $ `src/main.h:58:10`!: |
| 3201 | if(drawmapcxx . . $ drawmap.){ |
| 3202 | mapscalecxx . . $ mapscale.--; |
| 3203 | if(mapscalecxx . . $ mapscale.<1) mapscalecxx . . $ mapscale. = 1; |
| 3204 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 3205 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 3206 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttondowncxx . . $ minusbuttondown.->h; //height & |
| 3207 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttondowncxx . . $ minusbuttondown.->w;//width of button. |
| 3208 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttondowncxx . . $ minusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3209 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3210 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3211 | //UpdateDisplay(); |
| 3212 | SDL_Delay(100); |
| 3213 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3214 | } |
| 3215 | if(drawtmacxx . . $ drawtma.){ |
| 3216 | Tmacxx . . $ Tma..DecreasePlotScalecxx . . $ TargetMotionAnalysis#DecreasePlotScale(49f6e7a06ebc5aa8).(); |
| 3217 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 3218 | destination_rectanglecxx . . $ destination_rectangle..y = 359; //place the button. |
| 3219 | destination_rectanglecxx . . $ destination_rectangle..h = minusbuttondowncxx . . $ minusbuttondown.->h; //height & |
| 3220 | destination_rectanglecxx . . $ destination_rectangle..w = minusbuttondowncxx . . $ minusbuttondown.->w;//width of button. |
| 3221 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(minusbuttondowncxx . . $ minusbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3222 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3223 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(); |
| 3224 | SDL_Delay(100); |
| 3225 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3226 | } |
| 3227 | break; |
| 3228 | case SCROLLMAPUPcxx . . $ `src/main.h:65:10`!: |
| 3229 | if(drawmapcxx . . $ drawmap.){ |
| 3230 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 3231 | destination_rectanglecxx . . $ destination_rectangle..y = 219; //place the button. |
| 3232 | destination_rectanglecxx . . $ destination_rectangle..h = upbuttondowncxx . . $ upbuttondown.->h; //height & |
| 3233 | destination_rectanglecxx . . $ destination_rectangle..w = upbuttondowncxx . . $ upbuttondown.->w;//width of button. |
| 3234 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(upbuttondowncxx . . $ upbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3235 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3236 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 0, -10, current_targetcxx . . $ current_target.); |
| 3237 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3238 | SDL_Delay(100); |
| 3239 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3240 | } |
| 3241 | if(drawtmacxx . . $ drawtma.){ |
| 3242 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 3243 | destination_rectanglecxx . . $ destination_rectangle..y = 219; //place the button. |
| 3244 | destination_rectanglecxx . . $ destination_rectangle..h = upbuttondowncxx . . $ upbuttondown.->h; //height & |
| 3245 | destination_rectanglecxx . . $ destination_rectangle..w = upbuttondowncxx . . $ upbuttondown.->w;//width of button. |
| 3246 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(upbuttondowncxx . . $ upbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3247 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3248 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 0, -10, current_targetcxx . . $ current_target.); |
| 3249 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(0,-10); |
| 3250 | SDL_Delay(100); |
| 3251 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3252 | } |
| 3253 | break; |
| 3254 | case SCROLLMAPDOWNcxx . . $ `src/main.h:66:10`!: |
| 3255 | if(drawmapcxx . . $ drawmap.){ |
| 3256 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 3257 | destination_rectanglecxx . . $ destination_rectangle..y = 319; //place the button. |
| 3258 | destination_rectanglecxx . . $ destination_rectangle..h = downbuttondowncxx . . $ downbuttondown.->h; //height & |
| 3259 | destination_rectanglecxx . . $ destination_rectangle..w = downbuttondowncxx . . $ downbuttondown.->w;//width of button. |
| 3260 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(downbuttondowncxx . . $ downbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit |
| 3261 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.. |
| 3262 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 0, 10, current_targetcxx . . $ current_target.); |
| 3263 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3264 | SDL_Delay(100); |
| 3265 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3266 | } |
| 3267 | if(drawtmacxx . . $ drawtma.){ |
| 3268 | destination_rectanglecxx . . $ destination_rectangle..x = 225; //upper left corner to |
| 3269 | destination_rectanglecxx . . $ destination_rectangle..y = 319; //place the button. |
| 3270 | destination_rectanglecxx . . $ destination_rectangle..h = downbuttondowncxx . . $ downbuttondown.->h; //height & |
| 3271 | destination_rectanglecxx . . $ destination_rectangle..w = downbuttondowncxx . . $ downbuttondown.->w;//width of button. |
| 3272 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(downbuttondowncxx . . $ downbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit |
| 3273 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.. |
| 3274 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 0, 10, current_targetcxx . . $ current_target.); |
| 3275 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(0,10); |
| 3276 | SDL_Delay(100); |
| 3277 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3278 | } |
| 3279 | break; |
| 3280 | case SCROLLMAPLEFTcxx . . $ `src/main.h:67:10`!: |
| 3281 | if(drawmapcxx . . $ drawmap.){ |
| 3282 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 3283 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 3284 | destination_rectanglecxx . . $ destination_rectangle..h = leftbuttondowncxx . . $ leftbuttondown.->h; //height & |
| 3285 | destination_rectanglecxx . . $ destination_rectangle..w = leftbuttondowncxx . . $ leftbuttondown.->w;//width of button. |
| 3286 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(leftbuttondowncxx . . $ leftbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3287 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 3288 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., -10, 0, current_targetcxx . . $ current_target.); |
| 3289 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3290 | SDL_Delay(100); |
| 3291 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3292 | } |
| 3293 | if(drawtmacxx . . $ drawtma.){ |
| 3294 | destination_rectanglecxx . . $ destination_rectangle..x = 175; //upper left corner to |
| 3295 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 3296 | destination_rectanglecxx . . $ destination_rectangle..h = leftbuttondowncxx . . $ leftbuttondown.->h; //height & |
| 3297 | destination_rectanglecxx . . $ destination_rectangle..w = leftbuttondowncxx . . $ leftbuttondown.->w;//width of button. |
| 3298 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(leftbuttondowncxx . . $ leftbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3299 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen.... |
| 3300 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., -10, 0, current_targetcxx . . $ current_target.); |
| 3301 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(-10,0); |
| 3302 | SDL_Delay(100); |
| 3303 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3304 | } |
| 3305 | break; |
| 3306 | case SCROLLMAPRIGHTcxx . . $ `src/main.h:68:10`!: |
| 3307 | if(drawmapcxx . . $ drawmap.){ |
| 3308 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 3309 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 3310 | destination_rectanglecxx . . $ destination_rectangle..h = rightbuttondowncxx . . $ rightbuttondown.->h; //height & |
| 3311 | destination_rectanglecxx . . $ destination_rectangle..w = rightbuttondowncxx . . $ rightbuttondown.->w;//width of button. |
| 3312 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(rightbuttondowncxx . . $ rightbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3313 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3314 | PlaceShipscxx . . $ PlaceShips(c0c2e8c812e86a20).(mapscalecxx . . $ mapscale., 10, 0, current_targetcxx . . $ current_target.); |
| 3315 | DrawMapcxx . . $ DrawMap(49f6e7a06ebc5aa8).(); |
| 3316 | SDL_Delay(100); |
| 3317 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3318 | } |
| 3319 | if(drawtmacxx . . $ drawtma.){ |
| 3320 | destination_rectanglecxx . . $ destination_rectangle..x = 275; //upper left corner to |
| 3321 | destination_rectanglecxx . . $ destination_rectangle..y = 269; //place the button. |
| 3322 | destination_rectanglecxx . . $ destination_rectangle..h = rightbuttondowncxx . . $ rightbuttondown.->h; //height & |
| 3323 | destination_rectanglecxx . . $ destination_rectangle..w = rightbuttondowncxx . . $ rightbuttondown.->w;//width of button. |
| 3324 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(rightbuttondowncxx . . $ rightbuttondown., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ screen., &destination_rectanglecxx . . $ destination_rectangle.); // Do the Blit. |
| 3325 | SDL_UpdateRects(screencxx . . $ screen., 1, &destination_rectanglecxx . . $ destination_rectangle.); //Show the screen... |
| 3326 | DisplayTMAcxx . . $ DisplayTMA(3e454b8ccf442868).(10,0); |
| 3327 | SDL_Delay(100); |
| 3328 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3329 | } |
| 3330 | break; |
| 3331 | case UP_THERMALcxx . . $ `src/main.h:123:17`!: |
| 3332 | if ( (playercxx . . $ player.) && (my_mapcxx . . $ my_map.) ) |
| 3333 | { |
| 3334 | status = my_mapcxx . . $ my_map.->Next_Upcxx . . $ MAP#Next_Up(7864480464b09eea).(playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.); |
| 3335 | if (status != playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.) |
| 3336 | { |
| 3337 | playercxx . . $ player.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = status - 25; |
| 3338 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Going up one thermal."); |
| 3339 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3340 | } |
| 3341 | } |
| 3342 | break; |
| 3343 | case DOWN_THERMALcxx . . $ `src/main.h:125:17`!: |
| 3344 | if ( (playercxx . . $ player.) && (my_mapcxx . . $ my_map.) ) |
| 3345 | { |
| 3346 | status = my_mapcxx . . $ my_map.->Next_Downcxx . . $ MAP#Next_Down(7864480464b09eea).(playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.); |
| 3347 | if (status != playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.) |
| 3348 | { |
| 3349 | playercxx . . $ player.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = status + 25; |
| 3350 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Going down one thermal."); |
| 3351 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3352 | } |
| 3353 | } |
| 3354 | break; |
| 3355 | case HOLD_DEPTHcxx . . $ `src/main.h:124:17`!: |
| 3356 | if (playercxx . . $ player.) |
| 3357 | playercxx . . $ player.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = playercxx . . $ player.->Depthcxx . . $ Submarine#Depth.; |
| 3358 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Holding depth, Captain."); |
| 3359 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3360 | break; |
| 3361 | case GO_SURFACEcxx . . $ `src/main.h:127:10`!: |
| 3362 | if (playercxx . . $ player.) |
| 3363 | playercxx . . $ player.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = 0; |
| 3364 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Surfacing, Captain!"); |
| 3365 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3366 | break; |
| 3367 | case GO_PERISCOPE_DEPTHcxx . . $ `src/main.h:126:10`!: |
| 3368 | if (playercxx . . $ player.) |
| 3369 | playercxx . . $ player.->DesiredDepthcxx . . $ Submarine#DesiredDepth. = PERISCOPE_DEPTHcxx . . $ `src/main.h:33:9`!; |
| 3370 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Heading to periscope depth."); |
| 3371 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3372 | break; |
| 3373 | |
| 3374 | case TOGGLESPHERICALTOWEDcxx . . $ `src/main.h:69:10`!: |
| 3375 | SonarStationcxx . . $ SonarStation..ToggleArrayChoicecxx . . $ AnBqq5#ToggleArrayChoice(49f6e7a06ebc5aa8).(); |
| 3376 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3377 | break; |
| 3378 | case TOGGLETRUERELATIVEcxx . . $ `src/main.h:70:10`!: |
| 3379 | SonarStationcxx . . $ SonarStation..ToggleTrueRelcxx . . $ AnBqq5#ToggleTrueRel(49f6e7a06ebc5aa8).(); |
| 3380 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3381 | break; |
| 3382 | case UPPERCRTBUTTONcxx . . $ `src/main.h:71:10`!: |
| 3383 | SonarStationcxx . . $ SonarStation..UpperCRT_Buttoncxx . . $ AnBqq5#UpperCRT_Button(49f6e7a06ebc5aa8).(); |
| 3384 | break; |
| 3385 | case LOWERCRTBUTTONcxx . . $ `src/main.h:72:10`!: |
| 3386 | SonarStationcxx . . $ SonarStation..LowerCRT_Buttoncxx . . $ AnBqq5#LowerCRT_Button(49f6e7a06ebc5aa8).(); |
| 3387 | break; |
| 3388 | case CENTERDISPLAYcxx . . $ `src/main.h:59:10`!: |
| 3389 | if(drawmapcxx . . $ drawmap.){ |
| 3390 | if(mapcentercxx . . $ mapcenter.) { |
| 3391 | mapcentercxx . . $ mapcenter. = 0; |
| 3392 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3393 | }else{ |
| 3394 | mapcentercxx . . $ mapcenter. = 1; |
| 3395 | DisplayNavigationWidgetscxx . . $ DisplayNavigationWidgets(49f6e7a06ebc5aa8).(); |
| 3396 | } |
| 3397 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3398 | } |
| 3399 | if(drawsonarcxx . . $ drawsonar.){ |
| 3400 | SonarStationcxx . . $ SonarStation..ToggleNorthCentercxx . . $ AnBqq5#ToggleNorthCenter(49f6e7a06ebc5aa8).(); |
| 3401 | SonarStationcxx . . $ SonarStation..ClearSonarDatacxx . . $ AnBqq5#ClearSonarData(49f6e7a06ebc5aa8).(); |
| 3402 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3403 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3404 | } |
| 3405 | if(drawtmacxx . . $ drawtma.){ |
| 3406 | Tmacxx . . $ Tma..ToggleGeoPlotCentercxx . . $ TargetMotionAnalysis#ToggleGeoPlotCenter(49f6e7a06ebc5aa8).(); |
| 3407 | DisplayTMAWidgetscxx . . $ DisplayTMAWidgets(49f6e7a06ebc5aa8).(); |
| 3408 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3409 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3410 | } |
| 3411 | break; |
| 3412 | case EXTENDARRAYcxx . . $ `src/main.h:60:10`!: |
| 3413 | status = TB16cxx . . $ TB16..Extendcxx . . $ TowedArray#Extend(b126dc7c1de90089).(); |
| 3414 | if (status) |
| 3415 | { |
| 3416 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3417 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Extending sonar array."); |
| 3418 | } |
| 3419 | else |
| 3420 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Unable to extend array."); |
| 3421 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3422 | break; |
| 3423 | case RETRACTARRAYcxx . . $ `src/main.h:61:10`!: |
| 3424 | status = TB16cxx . . $ TB16..ReelIncxx . . $ TowedArray#ReelIn(b126dc7c1de90089).(); |
| 3425 | if (status) |
| 3426 | { |
| 3427 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3428 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Retrieving sonar array."); |
| 3429 | } |
| 3430 | else |
| 3431 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Unable to retrieve array."); |
| 3432 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3433 | break; |
| 3434 | case CUTARRAYcxx . . $ `src/main.h:121:10`!: |
| 3435 | status = TB16cxx . . $ TB16..CutArraycxx . . $ TowedArray#CutArray(b126dc7c1de90089).(); |
| 3436 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3437 | if (status) |
| 3438 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Cut towed array."); |
| 3439 | else |
| 3440 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Cannot cut array."); |
| 3441 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3442 | break; |
| 3443 | case STOPWINCHcxx . . $ `src/main.h:62:10`!: |
| 3444 | SonarStationcxx . . $ SonarStation..StopWinchcxx . . $ AnBqq5#StopWinch(49f6e7a06ebc5aa8).(); |
| 3445 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Stopping sonar array."); |
| 3446 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3447 | break; |
| 3448 | case ASSIGNTRACKERcxx . . $ `src/main.h:73:10`!: |
| 3449 | SonarStationcxx . . $ SonarStation..ToggleAssignTrackercxx . . $ AnBqq5#ToggleAssignTracker(49f6e7a06ebc5aa8).(); |
| 3450 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3451 | break; |
| 3452 | case TRACKER1cxx . . $ `src/main.h:74:10`!: |
| 3453 | if(SonarStationcxx . . $ SonarStation..assigntrackercxx . . $ AnBqq5#assigntracker.){ |
| 3454 | SonarStationcxx . . $ SonarStation..ToggleAssignTrackercxx . . $ AnBqq5#ToggleAssignTracker(49f6e7a06ebc5aa8).(); |
| 3455 | Tmacxx . . $ Tma..AssignTrackercxx . . $ TargetMotionAnalysis#AssignTracker(3e454b8ccf442868).(0,0); |
| 3456 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3457 | } |
| 3458 | break; |
| 3459 | case TRACKER2cxx . . $ `src/main.h:75:10`!: |
| 3460 | if(SonarStationcxx . . $ SonarStation..assigntrackercxx . . $ AnBqq5#assigntracker.){ |
| 3461 | SonarStationcxx . . $ SonarStation..ToggleAssignTrackercxx . . $ AnBqq5#ToggleAssignTracker(49f6e7a06ebc5aa8).(); |
| 3462 | Tmacxx . . $ Tma..AssignTrackercxx . . $ TargetMotionAnalysis#AssignTracker(3e454b8ccf442868).(1,0); |
| 3463 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3464 | } |
| 3465 | break; |
| 3466 | case TRACKER3cxx . . $ `src/main.h:76:10`!: |
| 3467 | if(SonarStationcxx . . $ SonarStation..assigntrackercxx . . $ AnBqq5#assigntracker.){ |
| 3468 | SonarStationcxx . . $ SonarStation..ToggleAssignTrackercxx . . $ AnBqq5#ToggleAssignTracker(49f6e7a06ebc5aa8).(); |
| 3469 | Tmacxx . . $ Tma..AssignTrackercxx . . $ TargetMotionAnalysis#AssignTracker(3e454b8ccf442868).(2,0); |
| 3470 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3471 | } |
| 3472 | break; |
| 3473 | case TRACKER4cxx . . $ `src/main.h:77:10`!: |
| 3474 | if(SonarStationcxx . . $ SonarStation..assigntrackercxx . . $ AnBqq5#assigntracker.){ |
| 3475 | SonarStationcxx . . $ SonarStation..ToggleAssignTrackercxx . . $ AnBqq5#ToggleAssignTracker(49f6e7a06ebc5aa8).(); |
| 3476 | Tmacxx . . $ Tma..AssignTrackercxx . . $ TargetMotionAnalysis#AssignTracker(3e454b8ccf442868).(3,0); |
| 3477 | SonarStationcxx . . $ SonarStation..DisplaySonarWidgetscxx . . $ AnBqq5#DisplaySonarWidgets(49f6e7a06ebc5aa8).(); |
| 3478 | } |
| 3479 | break; |
| 3480 | case DESIGNATECONTACTcxx . . $ `src/main.h:112:10`!: |
| 3481 | // textline="CON, SONAR, NEW CONTACT BEARING 123. DESIGNATEING CONTACT S1."; |
| 3482 | // Message.post_message(textline); |
| 3483 | break; |
| 3484 | case TOGGLER10cxx . . $ `src/main.h:82:10`!: |
| 3485 | RadarStationcxx . . $ RadarStation..ToggleRangeScale10cxx . . $ Radar#ToggleRangeScale10(49f6e7a06ebc5aa8).(); |
| 3486 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3487 | break; |
| 3488 | case TOGGLER20cxx . . $ `src/main.h:83:10`!: |
| 3489 | RadarStationcxx . . $ RadarStation..ToggleRangeScale20cxx . . $ Radar#ToggleRangeScale20(49f6e7a06ebc5aa8).(); |
| 3490 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3491 | break; |
| 3492 | case TOGGLER30cxx . . $ `src/main.h:84:10`!: |
| 3493 | RadarStationcxx . . $ RadarStation..ToggleRangeScale30cxx . . $ Radar#ToggleRangeScale30(49f6e7a06ebc5aa8).(); |
| 3494 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3495 | break; |
| 3496 | case TOGGLER40cxx . . $ `src/main.h:85:10`!: |
| 3497 | RadarStationcxx . . $ RadarStation..ToggleRangeScale40cxx . . $ Radar#ToggleRangeScale40(49f6e7a06ebc5aa8).(); |
| 3498 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3499 | break; |
| 3500 | case TOGGLER50cxx . . $ `src/main.h:86:10`!: |
| 3501 | RadarStationcxx . . $ RadarStation..ToggleRangeScale50cxx . . $ Radar#ToggleRangeScale50(49f6e7a06ebc5aa8).(); |
| 3502 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3503 | break; |
| 3504 | case TOGGLER60cxx . . $ `src/main.h:87:10`!: |
| 3505 | RadarStationcxx . . $ RadarStation..ToggleRangeScale60cxx . . $ Radar#ToggleRangeScale60(49f6e7a06ebc5aa8).(); |
| 3506 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3507 | break; |
| 3508 | case RING0cxx . . $ `src/main.h:90:10`!: |
| 3509 | RadarStationcxx . . $ RadarStation..ToggleRangeRing0cxx . . $ Radar#ToggleRangeRing0(49f6e7a06ebc5aa8).(); |
| 3510 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3511 | break; |
| 3512 | case RING5cxx . . $ `src/main.h:91:10`!: |
| 3513 | RadarStationcxx . . $ RadarStation..ToggleRangeRing5cxx . . $ Radar#ToggleRangeRing5(49f6e7a06ebc5aa8).(); |
| 3514 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3515 | break; |
| 3516 | case RING10cxx . . $ `src/main.h:92:10`!: |
| 3517 | RadarStationcxx . . $ RadarStation..ToggleRangeRing10cxx . . $ Radar#ToggleRangeRing10(49f6e7a06ebc5aa8).(); |
| 3518 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3519 | break; |
| 3520 | case RING15cxx . . $ `src/main.h:93:10`!: |
| 3521 | RadarStationcxx . . $ RadarStation..ToggleRangeRing15cxx . . $ Radar#ToggleRangeRing15(49f6e7a06ebc5aa8).(); |
| 3522 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3523 | break; |
| 3524 | case RING20cxx . . $ `src/main.h:94:10`!: |
| 3525 | RadarStationcxx . . $ RadarStation..ToggleRangeRing20cxx . . $ Radar#ToggleRangeRing20(49f6e7a06ebc5aa8).(); |
| 3526 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3527 | break; |
| 3528 | case RING25cxx . . $ `src/main.h:95:10`!: |
| 3529 | RadarStationcxx . . $ RadarStation..ToggleRangeRing25cxx . . $ Radar#ToggleRangeRing25(49f6e7a06ebc5aa8).(); |
| 3530 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3531 | break; |
| 3532 | case RADARDOWNcxx . . $ `src/main.h:88:10`!: |
| 3533 | RadarStationcxx . . $ RadarStation..LowerMastcxx . . $ Radar#LowerMast(49f6e7a06ebc5aa8).(); |
| 3534 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3535 | RadarStationcxx . . $ RadarStation..ClearScreencxx . . $ Radar#ClearScreen(49f6e7a06ebc5aa8).(); |
| 3536 | if (playercxx . . $ player.) |
| 3537 | playercxx . . $ player.->using_radarcxx . . $ Submarine#using_radar. = FALSEcxx . . $ `src/map.h:13:9`!; |
| 3538 | break; |
| 3539 | case RADARUPcxx . . $ `src/main.h:89:10`!: |
| 3540 | if (Subscxx . . $ Subs.->Depthcxx . . $ Submarine#Depth. <= PERISCOPE_DEPTHcxx . . $ `src/main.h:33:9`!) |
| 3541 | { |
| 3542 | RadarStationcxx . . $ RadarStation..RaiseMastcxx . . $ Radar#RaiseMast(49f6e7a06ebc5aa8).(); |
| 3543 | RadarStationcxx . . $ RadarStation..DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3544 | if (playercxx . . $ player.) |
| 3545 | playercxx . . $ player.->using_radarcxx . . $ Submarine#using_radar. = TRUEcxx . . $ `src/map.h:10:9`!; |
| 3546 | } |
| 3547 | break; |
| 3548 | case ESMDOWNcxx . . $ `src/main.h:98:10`!: |
| 3549 | EsmStationcxx . . $ EsmStation..LowerMastcxx . . $ Esm#LowerMast(49f6e7a06ebc5aa8).(); |
| 3550 | EsmStationcxx . . $ EsmStation..DisplayWidgetscxx . . $ Esm#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3551 | EsmStationcxx . . $ EsmStation..ClearScreencxx . . $ Esm#ClearScreen(49f6e7a06ebc5aa8).(); |
| 3552 | break; |
| 3553 | case ESMUPcxx . . $ `src/main.h:99:10`!: |
| 3554 | if (Subscxx . . $ Subs.->Depthcxx . . $ Submarine#Depth. <= PERISCOPE_DEPTHcxx . . $ `src/main.h:33:9`!) |
| 3555 | { |
| 3556 | EsmStationcxx . . $ EsmStation..RaiseMastcxx . . $ Esm#RaiseMast(49f6e7a06ebc5aa8).(); |
| 3557 | EsmStationcxx . . $ EsmStation..DisplayWidgetscxx . . $ Esm#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3558 | } |
| 3559 | break; |
| 3560 | case ASTOPcxx . . $ `src/main.h:102:10`!: |
| 3561 | ControlStationcxx . . $ ControlStation..ToggleASTOPcxx . . $ Control#ToggleASTOP(49f6e7a06ebc5aa8).(); |
| 3562 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3563 | break; |
| 3564 | case A13cxx . . $ `src/main.h:103:10`!: |
| 3565 | ControlStationcxx . . $ ControlStation..ToggleA13cxx . . $ Control#ToggleA13(49f6e7a06ebc5aa8).(); |
| 3566 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3567 | break; |
| 3568 | case A23cxx . . $ `src/main.h:104:10`!: |
| 3569 | ControlStationcxx . . $ ControlStation..ToggleA23cxx . . $ Control#ToggleA23(49f6e7a06ebc5aa8).(); |
| 3570 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3571 | break; |
| 3572 | case ASTDcxx . . $ `src/main.h:105:10`!: |
| 3573 | ControlStationcxx . . $ ControlStation..ToggleASTDcxx . . $ Control#ToggleASTD(49f6e7a06ebc5aa8).(); |
| 3574 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3575 | break; |
| 3576 | case AFULLcxx . . $ `src/main.h:106:10`!: |
| 3577 | ControlStationcxx . . $ ControlStation..ToggleAFULLcxx . . $ Control#ToggleAFULL(49f6e7a06ebc5aa8).(); |
| 3578 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3579 | break; |
| 3580 | case AFLKcxx . . $ `src/main.h:107:10`!: |
| 3581 | ControlStationcxx . . $ ControlStation..ToggleAFLKcxx . . $ Control#ToggleAFLK(49f6e7a06ebc5aa8).(); |
| 3582 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3583 | break; |
| 3584 | case B13cxx . . $ `src/main.h:108:10`!: |
| 3585 | ControlStationcxx . . $ ControlStation..ToggleB13cxx . . $ Control#ToggleB13(49f6e7a06ebc5aa8).(); |
| 3586 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3587 | break; |
| 3588 | case B23cxx . . $ `src/main.h:109:10`!: |
| 3589 | ControlStationcxx . . $ ControlStation..ToggleB23cxx . . $ Control#ToggleB23(49f6e7a06ebc5aa8).(); |
| 3590 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3591 | break; |
| 3592 | case BSTDcxx . . $ `src/main.h:110:10`!: |
| 3593 | ControlStationcxx . . $ ControlStation..ToggleBSTDcxx . . $ Control#ToggleBSTD(49f6e7a06ebc5aa8).(); |
| 3594 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3595 | break; |
| 3596 | case BEMERcxx . . $ `src/main.h:111:10`!: |
| 3597 | ControlStationcxx . . $ ControlStation..ToggleBEMERcxx . . $ Control#ToggleBEMER(49f6e7a06ebc5aa8).(); |
| 3598 | ControlStationcxx . . $ ControlStation..DisplayWidgetscxx . . $ Control#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 3599 | break; |
| 3600 | case SEND_PINGcxx . . $ `src/main.h:122:17`!: |
| 3601 | playercxx . . $ player.->Send_Pingcxx . . $ Submarine#Send_Ping(e898ed6f8282e8).(Subscxx . . $ Subs.); |
| 3602 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Sending active ping, sir."); |
| 3603 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3604 | break; |
| 3605 | case USE_TUBEcxx . . $ `src/main.h:120:10`!: |
| 3606 | // check to see if we already have too |
| 3607 | // many items out there |
| 3608 | status = playercxx . . $ player.->Count_Torpedoescxx . . $ Submarine#Count_Torpedoes(e898ed6f8282e8).(torpedoescxx . . $ torpedoes.); |
| 3609 | status += playercxx . . $ player.->Count_Noisemakerscxx . . $ Submarine#Count_Noisemakers(e898ed6f8282e8).(torpedoescxx . . $ torpedoes.); |
| 3610 | if (status >= MAX_PLAYER_WEAPONScxx . . $ `src/submarine.h:119:9`!) |
| 3611 | { |
| 3612 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Tracking computer full, Captain."); |
| 3613 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3614 | break; |
| 3615 | } |
| 3616 | // load, fire or unload a tube |
| 3617 | status = Subscxx . . $ Subs.->Use_Tubecxx . . $ Submarine#Use_Tube(9b79fb6aee4c0440).(tube_actioncxx . . $ tube_action., tube_to_usecxx . . $ tube_to_use.); |
| 3618 | if (status == TUBE_ERROR_FIRE_NOISEMAKERcxx . . $ `src/submarine.h:92:9`!) |
| 3619 | { |
| 3620 | Submarinecxx . . $ Submarine# *new_torpedo, *my_torp; |
| 3621 | char *ship_file, filename[] = "ships/class6.shp"; |
| 3622 | ship_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 3623 | new_torpedo = Subscxx . . $ Subs.->Fire_Tubecxx . . $ Submarine#Fire_Tube(7e9c5f383c561fca).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, ship_file); |
| 3624 | if ( (ship_file) && (ship_file != filename) ) |
| 3625 | free(ship_file); |
| 3626 | if (new_torpedo) |
| 3627 | { |
| 3628 | new_torpedo->Friendcxx . . $ Submarine#Friend. = playercxx . . $ player.->Friendcxx . . $ Submarine#Friend.; |
| 3629 | new_torpedo->ownercxx . . $ Submarine#owner. = playercxx . . $ player.; |
| 3630 | torpedoescxx . . $ torpedoes. = Add_Shipcxx . . $ Add_Ship(d62bab4205bed956).(torpedoescxx . . $ torpedoes., new_torpedo); |
| 3631 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Noise maker launched!"); |
| 3632 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3633 | my_torp = torpedoescxx . . $ torpedoes.; |
| 3634 | while (my_torp) |
| 3635 | { |
| 3636 | if (my_torp->targetcxx . . $ Submarine#target. == playercxx . . $ player.) |
| 3637 | my_torp->Is_Distracted_By_Noisemakercxx . . $ Submarine#Is_Distracted_By_Noisemaker(e898ed6f8282e8).(new_torpedo); |
| 3638 | my_torp = my_torp->nextcxx . . $ Submarine#next.; |
| 3639 | } |
| 3640 | } |
| 3641 | } |
| 3642 | else if ( (status == TUBE_ERROR_FIRE_SUCCESScxx . . $ `src/submarine.h:91:9`!) && (current_targetcxx . . $ current_target.) ) |
| 3643 | { |
| 3644 | char *ship_file, filename[] = "ships/class5.shp"; |
| 3645 | ship_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(filename); |
| 3646 | if (current_targetcxx . . $ current_target.) |
| 3647 | { |
| 3648 | Submarinecxx . . $ Submarine# *new_torpedo; |
| 3649 | new_torpedo = Subscxx . . $ Subs.->Fire_Tubecxx . . $ Submarine#Fire_Tube(7e9c5f383c561fca).(current_targetcxx . . $ current_target., ship_file ); |
| 3650 | if ( (ship_file) && (ship_file != filename) ) |
| 3651 | free(ship_file); |
| 3652 | if (new_torpedo) |
| 3653 | { |
| 3654 | char *sound_file, *file_name = "sounds/torpedo-launch.ogg"; |
| 3655 | sound_file = Find_Data_Filecxx . . $ Find_Data_File(7a9722d75b371431).(file_name); |
| 3656 | Play_Soundcxx . . $ Play_Sound(1ef8e6ec083aabb9).(sound_file); |
| 3657 | if ( (sound_file) && (sound_file != file_name) ) |
| 3658 | free(sound_file); |
| 3659 | new_torpedo->Friendcxx . . $ Submarine#Friend. = FRIENDcxx . . $ `src/submarine.h:42:9`!; |
| 3660 | new_torpedo->ownercxx . . $ Submarine#owner. = Subscxx . . $ Subs.; |
| 3661 | torpedoescxx . . $ torpedoes. = Add_Shipcxx . . $ Add_Ship(d62bab4205bed956).(torpedoescxx . . $ torpedoes., new_torpedo); |
| 3662 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Torpedo launched!"); |
| 3663 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3664 | } |
| 3665 | } |
| 3666 | } |
| 3667 | else if (status == TUBE_ERROR_FIRE_SUCCESScxx . . $ `src/submarine.h:91:9`!) |
| 3668 | { |
| 3669 | Messagecxx . . $ Message..post_messagecxx . . $ msg#post_message(fda57c8427c60377).("Torpedo has no target."); |
| 3670 | Messagecxx . . $ Message..display_messagecxx . . $ msg#display_message(49f6e7a06ebc5aa8).(); |
| 3671 | Subscxx . . $ Subs.->TorpedosOnBoardcxx . . $ Submarine#TorpedosOnBoard.++; |
| 3672 | } |
| 3673 | |
| 3674 | |
| 3675 | tube_actioncxx . . $ tube_action. = 0; |
| 3676 | tube_to_usecxx . . $ tube_to_use. = -1; |
| 3677 | update_weapons_screencxx . . $ update_weapons_screen. = TRUEcxx . . $ `src/map.h:10:9`!; |
| 3678 | UpdateDisplaycxx . . $ UpdateDisplay(49f6e7a06ebc5aa8).(); |
| 3679 | break; |
| 3680 | case PAUSEGAMEcxx . . $ `src/main.h:63:10`!: |
| 3681 | if (pause_gamecxx . . $ pause_game.){ //UnPause |
| 3682 | pause_gamecxx . . $ pause_game. = !pause_gamecxx . . $ pause_game.; |
| 3683 | timer_id = SDL_AddTimer(1000/timecompressioncxx . . $ timecompression., timerfunccxx . . $ timerfunc(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3684 | timer_id2 = SDL_AddTimer(60000/timecompressioncxx . . $ timecompression., TmaTimercxx . . $ TmaTimer(7f8ca09206cb022b)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3685 | }else{ //Pause |
| 3686 | pause_gamecxx . . $ pause_game. = !pause_gamecxx . . $ pause_game.; |
| 3687 | SDL_RemoveTimer(timer_id); |
| 3688 | SDL_RemoveTimer(timer_id2); |
| 3689 | } |
| 3690 | break; |
| 3691 | default: |
| 3692 | break; |
| 3693 | } |
| 3694 | } |
| 3695 | /* |
| 3696 | if (timer2 < (SDL_GetTicks() - (1000/timecompression) ) ) |
| 3697 | { |
| 3698 | #ifdef DEBUG |
| 3699 | printf("Launching timer function.\n"); |
| 3700 | #endif |
| 3701 | // timerfunc(0, NULL); |
| 3702 | timer2 = SDL_GetTicks(); |
| 3703 | } |
| 3704 | */ |
| 3705 | if (should_update_everythingcxx . . $ should_update_everything.) |
| 3706 | { |
| 3707 | should_update_everythingcxx . . $ should_update_everything. = FALSEcxx . . $ `src/map.h:13:9`!; |
| 3708 | Update_Everythingcxx . . $ Update_Everything(b126dc7c1de90089).(); |
| 3709 | } |
| 3710 | if (my_mission_statuscxx . . $ my_mission_status. == MISSION_SUCCESScxx . . $ `src/mission.h:7:9`!) |
| 3711 | { |
| 3712 | printf("Mission completed successfully!\n"); |
| 3713 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(7); |
| 3714 | SDL_Delay(5000); |
| 3715 | quit = true; |
| 3716 | } |
| 3717 | else if (my_mission_statuscxx . . $ my_mission_status. == MISSION_FAILEDcxx . . $ `src/mission.h:8:9`!) |
| 3718 | { |
| 3719 | printf("Mission failed.\n"); |
| 3720 | LoadScreencxx . . $ LoadScreen(d4f767463ce0a6b3).(8); |
| 3721 | SDL_Delay(5000); |
| 3722 | quit = true; |
| 3723 | } |
| 3724 | |
| 3725 | SDL_Delay(GAME_DELAYcxx . . $ `src/main.h:29:9`!); |
| 3726 | } // end of main loop |
| 3727 | #ifdef DEBUG |
| 3728 | printf("Unloading widgets.\n"); |
| 3729 | #endif |
| 3730 | UnLoadWidgetscxx . . $ UnLoadWidgets(49f6e7a06ebc5aa8).(); |
| 3731 | // get rid of torpedoes |
| 3732 | #ifdef DEBUG |
| 3733 | printf("Destroying torpedoes\n"); |
| 3734 | #endif |
| 3735 | while (torpedoescxx . . $ torpedoes.) |
| 3736 | torpedoescxx . . $ torpedoes. = Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(torpedoescxx . . $ torpedoes., torpedoescxx . . $ torpedoes.); |
| 3737 | #ifdef DEBUG |
| 3738 | printf("Destroying subs\n"); |
| 3739 | #endif |
| 3740 | while (Subscxx . . $ Subs.) |
| 3741 | Subscxx . . $ Subs. = Remove_Shipcxx . . $ Remove_Ship(d62bab4205bed956).(Subscxx . . $ Subs., Subscxx . . $ Subs.); |
| 3742 | #ifdef DEBUG |
| 3743 | printf("Removing helicopters.\n"); |
| 3744 | #endif |
| 3745 | while (helicopterscxx . . $ helicopters.) |
| 3746 | helicopterscxx . . $ helicopters. = Remove_Helicoptercxx . . $ Remove_Helicopter(db7b114f298089df).(helicopterscxx . . $ helicopters., helicopterscxx . . $ helicopters.); |
| 3747 | #ifdef DEBUG |
| 3748 | printf("Killing SDL\n"); |
| 3749 | #endif |
| 3750 | Clean_Up_Audiocxx . . $ Clean_Up_Audio(49f6e7a06ebc5aa8).(); |
| 3751 | if (my_mapcxx . . $ my_map.) |
| 3752 | delete my_mapcxx . . $ my_map.; |
| 3753 | SDL_Quit(); |
| 3754 | return 0; // just to make the compiler happy |
| 3755 | } |
| 3756 |