| 1 | /*************************************************************************** |
| 2 | radar.cpp - description |
| 3 | ------------------- |
| 4 | begin : Fri August 2 2001 |
| 5 | copyright : (C) 2001 by Rick McDaniel |
| 6 | email : [email protected] |
| 7 | $Id: radar.cpp,v 1.16 2003/05/17 22:25:34 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 | #include <string> |
| 19 | #include "math.h" |
| 20 | #include "SDL/SDL.h" |
| 21 | #include "SDL/SDL_image.h" |
| 22 | #include "SDL/SDL_thread.h" |
| 23 | #include "dfont.h"cxx . . $ `<file>/src/dfont.h`/ |
| 24 | #include "files.h"cxx . . $ `<file>/src/files.h`/ |
| 25 | #include "submarine.h"cxx . . $ `<file>/src/submarine.h`/ |
| 26 | |
| 27 | //VENZON: need rotozoom now |
| 28 | #include "SDL_rotozoom.h" |
| 29 | |
| 30 | // rdm windows |
| 31 | #include <iostream> |
| 32 | using namespace std; |
| 33 | |
| 34 | #include "radar.h"cxx . . $ `<file>/src/radar.h`/ |
| 35 | |
| 36 | //VENZON: I've replaced all occurrances of 10*tick with tick, since I upped |
| 37 | //the resolution by a factor of 10 |
| 38 | |
| 39 | Radarcxx . . $ Radar#::Radarcxx . . $ Radar#Radar(a9ab5cc9dc811b12).(Submarinecxx . . $ Submarine# *temp): Subscxx . . $ Radar#Subs.(temp) |
| 40 | { |
| 41 | // Default values: Mast down, RangeRing off, RangeScale = 10 |
| 42 | |
| 43 | MastHeightcxx . . $ Radar#MastHeight. = 59; // Max height of radar mast |
| 44 | Mastcxx . . $ Radar#Mast. = false; |
| 45 | RangeRingcxx . . $ Radar#RangeRing. = 0; |
| 46 | RangeScalecxx . . $ Radar#RangeScale. = 10; |
| 47 | rangescale10cxx . . $ Radar#rangescale10. = true; |
| 48 | rangescale20cxx . . $ Radar#rangescale20. = false; |
| 49 | rangescale30cxx . . $ Radar#rangescale30. = false; |
| 50 | rangescale40cxx . . $ Radar#rangescale40. = false; |
| 51 | rangescale50cxx . . $ Radar#rangescale50. = false; |
| 52 | rangescale60cxx . . $ Radar#rangescale60. = false; |
| 53 | |
| 54 | rangering0cxx . . $ Radar#rangering0. = true; |
| 55 | rangering10cxx . . $ Radar#rangering10. = false; |
| 56 | rangering15cxx . . $ Radar#rangering15. = false; |
| 57 | rangering20cxx . . $ Radar#rangering20. = false; |
| 58 | rangering25cxx . . $ Radar#rangering25. = false; |
| 59 | |
| 60 | // radar sweep counter |
| 61 | tickcxx . . $ Radar#tick. = 0; |
| 62 | ALPHAcxx . . $ Radar#ALPHA. = 255; |
| 63 | |
| 64 | } |
| 65 | Radarcxx . . $ Radar#::~cxx . . $ Radar#`~Radar`(ced63f7c635d850d).Radarcxx . . $ Radar#(){ |
| 66 | SDL_FreeSurface(blipcxx . . $ Radar#blip.); |
| 67 | |
| 68 | //gotta free it, or we get a segfault |
| 69 | SDL_FreeSurface(sweepcxx . . $ Radar#sweep.[0]); |
| 70 | } |
| 71 | |
| 72 | void Radarcxx . . $ Radar#::InitGraphicscxx . . $ Radar#InitGraphics(fac4f6e207c3be86).(SDL_Surface *temp, SDL_Surface *tempradarscreen) |
| 73 | { |
| 74 | screencxx . . $ Radar#screen.=temp; |
| 75 | radarscreencxx . . $ Radar#radarscreen.=tempradarscreen; |
| 76 | |
| 77 | temp = SDL_CreateRGBSurface(SDL_SWSURFACEcxx . . $ `<external>/3508485105195885937/SDL_video.h:229:9`!, 420, 490, 16, |
| 78 | screencxx . . $ Radar#screen.->format->Rmask, |
| 79 | screencxx . . $ Radar#screen.->format->Gmask, |
| 80 | screencxx . . $ Radar#screen.->format->Bmask, |
| 81 | screencxx . . $ Radar#screen.->format->Amask); |
| 82 | tempscreencxx . . $ Radar#tempscreen.=SDL_DisplayFormat(temp); |
| 83 | SDL_FreeSurface(temp); |
| 84 | |
| 85 | LoadWidgetscxx . . $ Radar#LoadWidgets(49f6e7a06ebc5aa8).(); |
| 86 | DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 87 | |
| 88 | orangecxx . . $ Radar#orange. = SDL_MapRGB(screencxx . . $ Radar#screen.->format, 238, 118, 0); |
| 89 | |
| 90 | //load the picture of a blip (blip.png) |
| 91 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/blip.png"); |
| 92 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 93 | blipcxx . . $ Radar#blip. = SDL_DisplayFormat(temp); |
| 94 | SDL_SetAlpha(blipcxx . . $ Radar#blip., SDL_SRCALPHAcxx . . $ `<external>/3508485105195885937/SDL_video.h:247:9`!, 128); |
| 95 | } |
| 96 | if ( blipcxx . . $ Radar#blip. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 97 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 98 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 99 | SDL_Quit(); |
| 100 | exit(0); |
| 101 | } |
| 102 | SDL_FreeSurface(temp); |
| 103 | } |
| 104 | |
| 105 | void Radarcxx . . $ Radar#::LoadWidgetscxx . . $ Radar#LoadWidgets(49f6e7a06ebc5aa8).(){ |
| 106 | |
| 107 | SDL_Surface *temp; |
| 108 | |
| 109 | // Load Range Scale Widgets |
| 110 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range10off.png"); |
| 111 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range10offcxx . . $ Radar#range10off. = SDL_DisplayFormat(temp); |
| 112 | if ( range10offcxx . . $ Radar#range10off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 113 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 114 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 115 | SDL_Quit(); |
| 116 | exit(0); |
| 117 | } |
| 118 | SDL_FreeSurface(temp); |
| 119 | |
| 120 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range10on.png"); |
| 121 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range10oncxx . . $ Radar#range10on. = SDL_DisplayFormat(temp); |
| 122 | if ( range10oncxx . . $ Radar#range10on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 123 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 124 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 125 | SDL_Quit(); |
| 126 | exit(0); |
| 127 | } |
| 128 | SDL_FreeSurface(temp); |
| 129 | |
| 130 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range20off.png"); |
| 131 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range20offcxx . . $ Radar#range20off. = SDL_DisplayFormat(temp); |
| 132 | if ( range20offcxx . . $ Radar#range20off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 133 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 134 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 135 | SDL_Quit(); |
| 136 | exit(0); |
| 137 | } |
| 138 | SDL_FreeSurface(temp); |
| 139 | |
| 140 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range20on.png"); |
| 141 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range20oncxx . . $ Radar#range20on. = SDL_DisplayFormat(temp); |
| 142 | if ( range20oncxx . . $ Radar#range20on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 143 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 144 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 145 | SDL_Quit(); |
| 146 | exit(0); |
| 147 | } |
| 148 | SDL_FreeSurface(temp); |
| 149 | |
| 150 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range30off.png"); |
| 151 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range30offcxx . . $ Radar#range30off. = SDL_DisplayFormat(temp); |
| 152 | if ( range30offcxx . . $ Radar#range30off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 153 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 154 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 155 | SDL_Quit(); |
| 156 | exit(0); |
| 157 | } |
| 158 | SDL_FreeSurface(temp); |
| 159 | |
| 160 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range30on.png"); |
| 161 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range30oncxx . . $ Radar#range30on. = SDL_DisplayFormat(temp); |
| 162 | if ( range30oncxx . . $ Radar#range30on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 163 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 164 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 165 | SDL_Quit(); |
| 166 | exit(0); |
| 167 | } |
| 168 | SDL_FreeSurface(temp); |
| 169 | |
| 170 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range40off.png"); |
| 171 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range40offcxx . . $ Radar#range40off. = SDL_DisplayFormat(temp); |
| 172 | if ( range40offcxx . . $ Radar#range40off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 173 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 174 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 175 | SDL_Quit(); |
| 176 | exit(0); |
| 177 | } |
| 178 | SDL_FreeSurface(temp); |
| 179 | |
| 180 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range40on.png"); |
| 181 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range40oncxx . . $ Radar#range40on. = SDL_DisplayFormat(temp); |
| 182 | if ( range40oncxx . . $ Radar#range40on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 183 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 184 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 185 | SDL_Quit(); |
| 186 | exit(0); |
| 187 | } |
| 188 | SDL_FreeSurface(temp); |
| 189 | |
| 190 | |
| 191 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range50off.png"); |
| 192 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range50offcxx . . $ Radar#range50off. = SDL_DisplayFormat(temp); |
| 193 | if ( range50offcxx . . $ Radar#range50off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 194 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 195 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 196 | SDL_Quit(); |
| 197 | exit(0); |
| 198 | } |
| 199 | SDL_FreeSurface(temp); |
| 200 | |
| 201 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range50on.png"); |
| 202 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range50oncxx . . $ Radar#range50on. = SDL_DisplayFormat(temp); |
| 203 | if ( range50oncxx . . $ Radar#range50on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 204 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 205 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 206 | SDL_Quit(); |
| 207 | exit(0); |
| 208 | } |
| 209 | SDL_FreeSurface(temp); |
| 210 | |
| 211 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range60off.png"); |
| 212 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range60offcxx . . $ Radar#range60off. = SDL_DisplayFormat(temp); |
| 213 | if ( range60offcxx . . $ Radar#range60off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 214 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 215 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 216 | SDL_Quit(); |
| 217 | exit(0); |
| 218 | } |
| 219 | SDL_FreeSurface(temp); |
| 220 | |
| 221 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/range60on.png"); |
| 222 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) range60oncxx . . $ Radar#range60on. = SDL_DisplayFormat(temp); |
| 223 | if ( range60oncxx . . $ Radar#range60on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 224 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 225 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 226 | SDL_Quit(); |
| 227 | exit(0); |
| 228 | } |
| 229 | SDL_FreeSurface(temp); |
| 230 | |
| 231 | // Load Range Ring Widgets |
| 232 | |
| 233 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring0off.png"); |
| 234 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring0offcxx . . $ Radar#ring0off. = SDL_DisplayFormat(temp); |
| 235 | if ( ring0offcxx . . $ Radar#ring0off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 236 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 237 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 238 | SDL_Quit(); |
| 239 | exit(0); |
| 240 | } |
| 241 | SDL_FreeSurface(temp); |
| 242 | |
| 243 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring0on.png"); |
| 244 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring0oncxx . . $ Radar#ring0on. = SDL_DisplayFormat(temp); |
| 245 | if ( ring0oncxx . . $ Radar#ring0on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 246 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 247 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 248 | SDL_Quit(); |
| 249 | exit(0); |
| 250 | } |
| 251 | SDL_FreeSurface(temp); |
| 252 | |
| 253 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring5off.png"); |
| 254 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring5offcxx . . $ Radar#ring5off. = SDL_DisplayFormat(temp); |
| 255 | if ( ring5offcxx . . $ Radar#ring5off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 256 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 257 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 258 | SDL_Quit(); |
| 259 | exit(0); |
| 260 | } |
| 261 | SDL_FreeSurface(temp); |
| 262 | |
| 263 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring5on.png"); |
| 264 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring5oncxx . . $ Radar#ring5on. = SDL_DisplayFormat(temp); |
| 265 | if ( ring5oncxx . . $ Radar#ring5on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 266 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 267 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 268 | SDL_Quit(); |
| 269 | exit(0); |
| 270 | } |
| 271 | |
| 272 | SDL_FreeSurface(temp); |
| 273 | |
| 274 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring10off.png"); |
| 275 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring10offcxx . . $ Radar#ring10off. = SDL_DisplayFormat(temp); |
| 276 | if ( ring10offcxx . . $ Radar#ring10off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 277 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 278 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 279 | SDL_Quit(); |
| 280 | exit(0); |
| 281 | } |
| 282 | SDL_FreeSurface(temp); |
| 283 | |
| 284 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring10on.png"); |
| 285 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring10oncxx . . $ Radar#ring10on. = SDL_DisplayFormat(temp); |
| 286 | if ( ring10oncxx . . $ Radar#ring10on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 287 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 288 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 289 | SDL_Quit(); |
| 290 | exit(0); |
| 291 | } |
| 292 | SDL_FreeSurface(temp); |
| 293 | |
| 294 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring15off.png"); |
| 295 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring15offcxx . . $ Radar#ring15off. = SDL_DisplayFormat(temp); |
| 296 | if ( ring15offcxx . . $ Radar#ring15off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 297 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 298 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 299 | SDL_Quit(); |
| 300 | exit(0); |
| 301 | } |
| 302 | SDL_FreeSurface(temp); |
| 303 | |
| 304 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring15on.png"); |
| 305 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring15oncxx . . $ Radar#ring15on. = SDL_DisplayFormat(temp); |
| 306 | if ( ring15oncxx . . $ Radar#ring15on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 307 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 308 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 309 | SDL_Quit(); |
| 310 | exit(0); |
| 311 | } |
| 312 | SDL_FreeSurface(temp); |
| 313 | |
| 314 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring20off.png"); |
| 315 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring20offcxx . . $ Radar#ring20off. = SDL_DisplayFormat(temp); |
| 316 | if ( ring20offcxx . . $ Radar#ring20off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 317 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 318 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 319 | SDL_Quit(); |
| 320 | exit(0); |
| 321 | } |
| 322 | SDL_FreeSurface(temp); |
| 323 | |
| 324 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring20on.png"); |
| 325 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring20oncxx . . $ Radar#ring20on. = SDL_DisplayFormat(temp); |
| 326 | if ( ring20oncxx . . $ Radar#ring20on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 327 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 328 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 329 | SDL_Quit(); |
| 330 | exit(0); |
| 331 | } |
| 332 | SDL_FreeSurface(temp); |
| 333 | |
| 334 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring25off.png"); |
| 335 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring25offcxx . . $ Radar#ring25off. = SDL_DisplayFormat(temp); |
| 336 | if ( ring25offcxx . . $ Radar#ring25off. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 337 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 338 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 339 | SDL_Quit(); |
| 340 | exit(0); |
| 341 | } |
| 342 | SDL_FreeSurface(temp); |
| 343 | |
| 344 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ring25on.png"); |
| 345 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ring25oncxx . . $ Radar#ring25on. = SDL_DisplayFormat(temp); |
| 346 | if ( ring25oncxx . . $ Radar#ring25on. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 347 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 348 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 349 | SDL_Quit(); |
| 350 | exit(0); |
| 351 | } |
| 352 | SDL_FreeSurface(temp); |
| 353 | |
| 354 | // Load Mast Widgets |
| 355 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mastdownoff.png"); |
| 356 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) mastdownoffcxx . . $ Radar#mastdownoff. = SDL_DisplayFormat(temp); |
| 357 | if ( mastdownoffcxx . . $ Radar#mastdownoff. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 358 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 359 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 360 | SDL_Quit(); |
| 361 | exit(0); |
| 362 | } |
| 363 | SDL_FreeSurface(temp); |
| 364 | |
| 365 | |
| 366 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mastdownon.png"); |
| 367 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) mastdownoncxx . . $ Radar#mastdownon. = SDL_DisplayFormat(temp); |
| 368 | if ( mastdownoncxx . . $ Radar#mastdownon. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 369 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 370 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 371 | SDL_Quit(); |
| 372 | exit(0); |
| 373 | } |
| 374 | SDL_FreeSurface(temp); |
| 375 | |
| 376 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mastupoff.png"); |
| 377 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) mastupoffcxx . . $ Radar#mastupoff. = SDL_DisplayFormat(temp); |
| 378 | if ( mastupoffcxx . . $ Radar#mastupoff.== NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 379 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 380 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 381 | SDL_Quit(); |
| 382 | exit(0); |
| 383 | } |
| 384 | SDL_FreeSurface(temp); |
| 385 | |
| 386 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/mastupon.png"); |
| 387 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) mastuponcxx . . $ Radar#mastupon. = SDL_DisplayFormat(temp); |
| 388 | if ( mastuponcxx . . $ Radar#mastupon. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 389 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 390 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 391 | SDL_Quit(); |
| 392 | exit(0); |
| 393 | } |
| 394 | SDL_FreeSurface(temp); |
| 395 | |
| 396 | // VENZON: only need 1 sweep image now |
| 397 | sweepcxx . . $ Radar#sweep.[0] = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/sweep0.png"); |
| 398 | |
| 399 | } |
| 400 | |
| 401 | void Radarcxx . . $ Radar#::DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(){ |
| 402 | // Range Scale Widgets |
| 403 | if(rangescale10cxx . . $ Radar#rangescale10.) |
| 404 | { |
| 405 | destcxx . . $ Radar#dest..x = 748; |
| 406 | destcxx . . $ Radar#dest..y = 320; |
| 407 | destcxx . . $ Radar#dest..h = range10oncxx . . $ Radar#range10on.->h; |
| 408 | destcxx . . $ Radar#dest..w = range10oncxx . . $ Radar#range10on.->w; |
| 409 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range10oncxx . . $ Radar#range10on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 410 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 411 | } |
| 412 | else |
| 413 | { |
| 414 | destcxx . . $ Radar#dest..x = 748; |
| 415 | destcxx . . $ Radar#dest..y = 320; |
| 416 | destcxx . . $ Radar#dest..h = range10offcxx . . $ Radar#range10off.->h; |
| 417 | destcxx . . $ Radar#dest..w = range10offcxx . . $ Radar#range10off.->w; |
| 418 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range10offcxx . . $ Radar#range10off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 419 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 420 | } |
| 421 | |
| 422 | if(rangescale20cxx . . $ Radar#rangescale20.) |
| 423 | { |
| 424 | destcxx . . $ Radar#dest..x = 795; |
| 425 | destcxx . . $ Radar#dest..y = 320; |
| 426 | destcxx . . $ Radar#dest..h = range20oncxx . . $ Radar#range20on.->h; |
| 427 | destcxx . . $ Radar#dest..w = range20oncxx . . $ Radar#range20on.->w; |
| 428 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range20oncxx . . $ Radar#range20on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 429 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 430 | } |
| 431 | else |
| 432 | { |
| 433 | destcxx . . $ Radar#dest..x = 795; |
| 434 | destcxx . . $ Radar#dest..y = 320; |
| 435 | destcxx . . $ Radar#dest..h = range20offcxx . . $ Radar#range20off.->h; |
| 436 | destcxx . . $ Radar#dest..w = range20offcxx . . $ Radar#range20off.->w; |
| 437 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range20offcxx . . $ Radar#range20off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 438 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 439 | } |
| 440 | |
| 441 | if(rangescale30cxx . . $ Radar#rangescale30.) |
| 442 | { |
| 443 | destcxx . . $ Radar#dest..x = 842; |
| 444 | destcxx . . $ Radar#dest..y = 320; |
| 445 | destcxx . . $ Radar#dest..h = range30oncxx . . $ Radar#range30on.->h; |
| 446 | destcxx . . $ Radar#dest..w = range30oncxx . . $ Radar#range30on.->w; |
| 447 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range30oncxx . . $ Radar#range30on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 448 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 449 | } |
| 450 | else |
| 451 | { |
| 452 | destcxx . . $ Radar#dest..x = 842; |
| 453 | destcxx . . $ Radar#dest..y = 320; |
| 454 | destcxx . . $ Radar#dest..h = range30offcxx . . $ Radar#range30off.->h; |
| 455 | destcxx . . $ Radar#dest..w = range30offcxx . . $ Radar#range30off.->w; |
| 456 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range30offcxx . . $ Radar#range30off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 457 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 458 | } |
| 459 | |
| 460 | if(rangescale40cxx . . $ Radar#rangescale40.) |
| 461 | { |
| 462 | destcxx . . $ Radar#dest..x = 748; |
| 463 | destcxx . . $ Radar#dest..y = 367; |
| 464 | destcxx . . $ Radar#dest..h = range40oncxx . . $ Radar#range40on.->h; |
| 465 | destcxx . . $ Radar#dest..w = range40oncxx . . $ Radar#range40on.->w; |
| 466 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range40oncxx . . $ Radar#range40on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 467 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 468 | } |
| 469 | else |
| 470 | { |
| 471 | destcxx . . $ Radar#dest..x = 748; |
| 472 | destcxx . . $ Radar#dest..y = 367; |
| 473 | destcxx . . $ Radar#dest..h = range40offcxx . . $ Radar#range40off.->h; |
| 474 | destcxx . . $ Radar#dest..w = range40offcxx . . $ Radar#range40off.->w; |
| 475 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range40offcxx . . $ Radar#range40off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 476 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 477 | } |
| 478 | |
| 479 | if(rangescale50cxx . . $ Radar#rangescale50.) |
| 480 | { |
| 481 | destcxx . . $ Radar#dest..x = 795; |
| 482 | destcxx . . $ Radar#dest..y = 367; |
| 483 | destcxx . . $ Radar#dest..h = range50oncxx . . $ Radar#range50on.->h; |
| 484 | destcxx . . $ Radar#dest..w = range50oncxx . . $ Radar#range50on.->w; |
| 485 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range50oncxx . . $ Radar#range50on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 486 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 487 | } |
| 488 | else |
| 489 | { |
| 490 | destcxx . . $ Radar#dest..x = 795; |
| 491 | destcxx . . $ Radar#dest..y = 367; |
| 492 | destcxx . . $ Radar#dest..h = range50offcxx . . $ Radar#range50off.->h; |
| 493 | destcxx . . $ Radar#dest..w = range50offcxx . . $ Radar#range50off.->w; |
| 494 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range50offcxx . . $ Radar#range50off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 495 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 496 | } |
| 497 | |
| 498 | if(rangescale60cxx . . $ Radar#rangescale60.) |
| 499 | { |
| 500 | destcxx . . $ Radar#dest..x = 842; |
| 501 | destcxx . . $ Radar#dest..y = 367; |
| 502 | |
| 503 | destcxx . . $ Radar#dest..h = range60oncxx . . $ Radar#range60on.->h; |
| 504 | destcxx . . $ Radar#dest..w = range60oncxx . . $ Radar#range60on.->w; |
| 505 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range60oncxx . . $ Radar#range60on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 506 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 507 | } |
| 508 | else |
| 509 | { |
| 510 | destcxx . . $ Radar#dest..x = 842; |
| 511 | destcxx . . $ Radar#dest..y = 367; |
| 512 | destcxx . . $ Radar#dest..h = range60offcxx . . $ Radar#range60off.->h; |
| 513 | destcxx . . $ Radar#dest..w = range60offcxx . . $ Radar#range60off.->w; |
| 514 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(range60offcxx . . $ Radar#range60off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 515 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 516 | } |
| 517 | |
| 518 | // Mast Widgets |
| 519 | if(Mastcxx . . $ Radar#Mast.) |
| 520 | { |
| 521 | destcxx . . $ Radar#dest..x = 850; |
| 522 | destcxx . . $ Radar#dest..y = 185; |
| 523 | destcxx . . $ Radar#dest..h = mastuponcxx . . $ Radar#mastupon.->h; |
| 524 | destcxx . . $ Radar#dest..w = mastuponcxx . . $ Radar#mastupon.->w; |
| 525 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(mastuponcxx . . $ Radar#mastupon., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 526 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 527 | |
| 528 | destcxx . . $ Radar#dest..x = 744; |
| 529 | destcxx . . $ Radar#dest..y = 185; |
| 530 | destcxx . . $ Radar#dest..h = mastdownoffcxx . . $ Radar#mastdownoff.->h; |
| 531 | destcxx . . $ Radar#dest..w = mastdownoffcxx . . $ Radar#mastdownoff.->w; |
| 532 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(mastdownoffcxx . . $ Radar#mastdownoff., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 533 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 534 | } |
| 535 | else |
| 536 | { |
| 537 | destcxx . . $ Radar#dest..x = 850; |
| 538 | destcxx . . $ Radar#dest..y = 185; |
| 539 | destcxx . . $ Radar#dest..h = mastupoffcxx . . $ Radar#mastupoff.->h; |
| 540 | destcxx . . $ Radar#dest..w = mastupoffcxx . . $ Radar#mastupoff.->w; |
| 541 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(mastupoffcxx . . $ Radar#mastupoff., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 542 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 543 | |
| 544 | destcxx . . $ Radar#dest..x = 744; |
| 545 | destcxx . . $ Radar#dest..y = 185; |
| 546 | destcxx . . $ Radar#dest..h = mastdownoncxx . . $ Radar#mastdownon.->h; |
| 547 | destcxx . . $ Radar#dest..w = mastdownoncxx . . $ Radar#mastdownon.->w; |
| 548 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(mastdownoncxx . . $ Radar#mastdownon., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 549 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 550 | } |
| 551 | |
| 552 | // Range Ring Widgets |
| 553 | if(rangering0cxx . . $ Radar#rangering0.) |
| 554 | { |
| 555 | destcxx . . $ Radar#dest..x = 749; |
| 556 | destcxx . . $ Radar#dest..y = 501; |
| 557 | destcxx . . $ Radar#dest..h = ring0oncxx . . $ Radar#ring0on.->h; |
| 558 | destcxx . . $ Radar#dest..w = ring0oncxx . . $ Radar#ring0on.->w; |
| 559 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring0oncxx . . $ Radar#ring0on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 560 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 561 | } |
| 562 | else |
| 563 | { |
| 564 | destcxx . . $ Radar#dest..x = 749; |
| 565 | destcxx . . $ Radar#dest..y = 501; |
| 566 | destcxx . . $ Radar#dest..h = ring0offcxx . . $ Radar#ring0off.->h; |
| 567 | destcxx . . $ Radar#dest..w = ring0offcxx . . $ Radar#ring0off.->w; |
| 568 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring0offcxx . . $ Radar#ring0off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 569 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 570 | } |
| 571 | |
| 572 | if(rangering5cxx . . $ Radar#rangering5.) |
| 573 | { |
| 574 | destcxx . . $ Radar#dest..x = 796; |
| 575 | destcxx . . $ Radar#dest..y = 501; |
| 576 | destcxx . . $ Radar#dest..h = ring5oncxx . . $ Radar#ring5on.->h; |
| 577 | destcxx . . $ Radar#dest..w = ring5oncxx . . $ Radar#ring5on.->w; |
| 578 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring5oncxx . . $ Radar#ring5on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 579 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 580 | } |
| 581 | else |
| 582 | { |
| 583 | destcxx . . $ Radar#dest..x = 796; |
| 584 | destcxx . . $ Radar#dest..y = 501; |
| 585 | destcxx . . $ Radar#dest..h = ring5offcxx . . $ Radar#ring5off.->h; |
| 586 | destcxx . . $ Radar#dest..w = ring5offcxx . . $ Radar#ring5off.->w; |
| 587 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring5offcxx . . $ Radar#ring5off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 588 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 589 | } |
| 590 | |
| 591 | if(rangering10cxx . . $ Radar#rangering10.) |
| 592 | { |
| 593 | destcxx . . $ Radar#dest..x = 843; |
| 594 | destcxx . . $ Radar#dest..y = 501; |
| 595 | destcxx . . $ Radar#dest..h = ring10oncxx . . $ Radar#ring10on.->h; |
| 596 | destcxx . . $ Radar#dest..w = ring10oncxx . . $ Radar#ring10on.->w; |
| 597 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring10oncxx . . $ Radar#ring10on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 598 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 599 | } |
| 600 | else |
| 601 | { |
| 602 | destcxx . . $ Radar#dest..x = 843; |
| 603 | destcxx . . $ Radar#dest..y = 501; |
| 604 | destcxx . . $ Radar#dest..h = ring10offcxx . . $ Radar#ring10off.->h; |
| 605 | destcxx . . $ Radar#dest..w = ring10offcxx . . $ Radar#ring10off.->w; |
| 606 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring10offcxx . . $ Radar#ring10off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 607 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 608 | } |
| 609 | |
| 610 | if(rangering15cxx . . $ Radar#rangering15.) |
| 611 | { |
| 612 | destcxx . . $ Radar#dest..x = 749; |
| 613 | destcxx . . $ Radar#dest..y = 548; |
| 614 | destcxx . . $ Radar#dest..h = ring15oncxx . . $ Radar#ring15on.->h; |
| 615 | destcxx . . $ Radar#dest..w = ring15oncxx . . $ Radar#ring15on.->w; |
| 616 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring15oncxx . . $ Radar#ring15on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 617 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 618 | } |
| 619 | else |
| 620 | { |
| 621 | destcxx . . $ Radar#dest..x = 749; |
| 622 | destcxx . . $ Radar#dest..y = 548; |
| 623 | destcxx . . $ Radar#dest..h = ring15offcxx . . $ Radar#ring15off.->h; |
| 624 | destcxx . . $ Radar#dest..w = ring15offcxx . . $ Radar#ring15off.->w; |
| 625 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring15offcxx . . $ Radar#ring15off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 626 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 627 | } |
| 628 | |
| 629 | if(rangering20cxx . . $ Radar#rangering20.) |
| 630 | { |
| 631 | destcxx . . $ Radar#dest..x = 796; |
| 632 | destcxx . . $ Radar#dest..y = 548; |
| 633 | destcxx . . $ Radar#dest..h = ring20oncxx . . $ Radar#ring20on.->h; |
| 634 | destcxx . . $ Radar#dest..w = ring20oncxx . . $ Radar#ring20on.->w; |
| 635 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring20oncxx . . $ Radar#ring20on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 636 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 637 | } |
| 638 | else |
| 639 | { |
| 640 | destcxx . . $ Radar#dest..x = 796; |
| 641 | destcxx . . $ Radar#dest..y = 548; |
| 642 | destcxx . . $ Radar#dest..h = ring20offcxx . . $ Radar#ring20off.->h; |
| 643 | destcxx . . $ Radar#dest..w = ring20offcxx . . $ Radar#ring20off.->w; |
| 644 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring20offcxx . . $ Radar#ring20off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 645 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 646 | } |
| 647 | |
| 648 | if(rangering25cxx . . $ Radar#rangering25.) |
| 649 | { |
| 650 | destcxx . . $ Radar#dest..x = 843; |
| 651 | destcxx . . $ Radar#dest..y = 548; |
| 652 | destcxx . . $ Radar#dest..h = ring25oncxx . . $ Radar#ring25on.->h; |
| 653 | destcxx . . $ Radar#dest..w = ring25oncxx . . $ Radar#ring25on.->w; |
| 654 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring25oncxx . . $ Radar#ring25on., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 655 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 656 | } |
| 657 | else |
| 658 | { |
| 659 | destcxx . . $ Radar#dest..x = 843; |
| 660 | destcxx . . $ Radar#dest..y = 548; |
| 661 | destcxx . . $ Radar#dest..h = ring25offcxx . . $ Radar#ring25off.->h; |
| 662 | destcxx . . $ Radar#dest..w = ring25offcxx . . $ Radar#ring25off.->w; |
| 663 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ring25offcxx . . $ Radar#ring25off., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); |
| 664 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); |
| 665 | } |
| 666 | |
| 667 | |
| 668 | // Need this for the time compression?? |
| 669 | SDL_UpdateRect(screencxx . . $ Radar#screen.,0, 0, 0, 0); |
| 670 | |
| 671 | } |
| 672 | |
| 673 | void Radarcxx . . $ Radar#::ClearScreencxx . . $ Radar#ClearScreen(49f6e7a06ebc5aa8).(){ |
| 674 | // Clear the screen |
| 675 | SDL_Surface *temp; |
| 676 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ClearRadar.png"); |
| 677 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ClearRadarcxx . . $ Radar#ClearRadar. = SDL_DisplayFormat(temp); |
| 678 | if ( ClearRadarcxx . . $ Radar#ClearRadar. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 679 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 680 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 681 | SDL_Quit(); |
| 682 | exit(0); |
| 683 | } |
| 684 | |
| 685 | srccxx . . $ Radar#src..x = 0; |
| 686 | srccxx . . $ Radar#src..y = 0; |
| 687 | srccxx . . $ Radar#src..w = ClearRadarcxx . . $ Radar#ClearRadar.->w; |
| 688 | srccxx . . $ Radar#src..h = ClearRadarcxx . . $ Radar#ClearRadar.->h; |
| 689 | |
| 690 | destcxx . . $ Radar#dest..x = 98; // Blit destination x&y to the upper left |
| 691 | destcxx . . $ Radar#dest..y = 154; |
| 692 | destcxx . . $ Radar#dest..w = ClearRadarcxx . . $ Radar#ClearRadar.->w; // Height and width equal to the |
| 693 | destcxx . . $ Radar#dest..h = ClearRadarcxx . . $ Radar#ClearRadar.->h; // source images.... |
| 694 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ClearRadarcxx . . $ Radar#ClearRadar., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); // Do the actual Blit |
| 695 | |
| 696 | SDL_FreeSurface(temp); |
| 697 | |
| 698 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); //Show the screen. |
| 699 | SDL_FreeSurface(ClearRadarcxx . . $ Radar#ClearRadar.); //Free up the surface memory. |
| 700 | DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 701 | |
| 702 | } |
| 703 | |
| 704 | void Radarcxx . . $ Radar#::ClearTextBoxcxx . . $ Radar#ClearTextBox(49f6e7a06ebc5aa8).(){ |
| 705 | // Clear the screen |
| 706 | SDL_Surface *temp; |
| 707 | temp = Load_Imagecxx . . $ Load_Image(ad2755de9658a3fe).("images/ClearRadar2.png"); |
| 708 | if(temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) ClearRadarcxx . . $ Radar#ClearRadar. = SDL_DisplayFormat(temp); |
| 709 | if ( ClearRadarcxx . . $ Radar#ClearRadar. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 710 | cerrcxx . . $ cerr.<<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7)."Function LoadWidgets()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 711 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). SDL_GetError() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 712 | SDL_Quit(); |
| 713 | exit(0); |
| 714 | } |
| 715 | |
| 716 | srccxx . . $ Radar#src..x = 0; |
| 717 | srccxx . . $ Radar#src..y = 0; |
| 718 | srccxx . . $ Radar#src..w = ClearRadarcxx . . $ Radar#ClearRadar.->w; |
| 719 | srccxx . . $ Radar#src..h = ClearRadarcxx . . $ Radar#ClearRadar.->h; |
| 720 | |
| 721 | destcxx . . $ Radar#dest..x = 139; // Blit destination x&y to the upper left |
| 722 | destcxx . . $ Radar#dest..y = 572; |
| 723 | destcxx . . $ Radar#dest..w = ClearRadarcxx . . $ Radar#ClearRadar.->w; // Height and width equal to the |
| 724 | destcxx . . $ Radar#dest..h = ClearRadarcxx . . $ Radar#ClearRadar.->h; // source images.... |
| 725 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(ClearRadarcxx . . $ Radar#ClearRadar., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); // Do the actual Blit |
| 726 | |
| 727 | SDL_FreeSurface(temp); |
| 728 | |
| 729 | SDL_UpdateRects(screencxx . . $ Radar#screen., 1, &destcxx . . $ Radar#dest.); //Show the screen. |
| 730 | SDL_FreeSurface(ClearRadarcxx . . $ Radar#ClearRadar.); //Free up the surface memory. |
| 731 | DisplayWidgetscxx . . $ Radar#DisplayWidgets(49f6e7a06ebc5aa8).(); |
| 732 | |
| 733 | } |
| 734 | |
| 735 | void Radarcxx . . $ Radar#::Sweepcxx . . $ Radar#Sweep(9364e6e7bff7660).(float gametime) |
| 736 | { |
| 737 | if(getMastStatuscxx . . $ Radar#getMastStatus(50ce9a9e25b4a850).()) // If the mast is up start sweep |
| 738 | { |
| 739 | tickcxx . . $ Radar#tick.+=gametime/25.0f; |
| 740 | |
| 741 | if(tickcxx . . $ Radar#tick. > 360) tickcxx . . $ Radar#tick. -= 360; |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | void Radarcxx . . $ Radar#::DisplaySweepcxx . . $ Radar#DisplaySweep(49f6e7a06ebc5aa8).() |
| 746 | { |
| 747 | if(getMastStatuscxx . . $ Radar#getMastStatus(50ce9a9e25b4a850).()) // If the mast is up start sweep |
| 748 | { |
| 749 | |
| 750 | srccxx . . $ Radar#src..x = 0; |
| 751 | srccxx . . $ Radar#src..y = 0; |
| 752 | srccxx . . $ Radar#src..w = sweepcxx . . $ Radar#sweep.[0]->w; |
| 753 | srccxx . . $ Radar#src..h = sweepcxx . . $ Radar#sweep.[0]->h; |
| 754 | |
| 755 | destcxx . . $ Radar#dest..x = 193; |
| 756 | destcxx . . $ Radar#dest..y = 245; |
| 757 | destcxx . . $ Radar#dest..w = sweepcxx . . $ Radar#sweep.[0]->w; |
| 758 | destcxx . . $ Radar#dest..h = sweepcxx . . $ Radar#sweep.[0]->h; |
| 759 | |
| 760 | //VENZON: some rotozooming! |
| 761 | SDL_SetAlpha(sweepcxx . . $ Radar#sweep.[0], SDL_SRCALPHAcxx . . $ `<external>/3508485105195885937/SDL_video.h:247:9`!, 128); |
| 762 | SDL_FillRect(screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest., blackcxx . . $ Radar#black.); |
| 763 | SDL_Surface *sweeprot; |
| 764 | |
| 765 | //set the last argument of this function to 0 for a bit faster |
| 766 | //(but much crappier looking) rotozooming |
| 767 | sweeprot = rotozoomSurface(sweepcxx . . $ Radar#sweep.[0], -tickcxx . . $ Radar#tick., 1.0, 1); |
| 768 | |
| 769 | //the rotozoomer seems to create a surface with whatever width and |
| 770 | //height necessary, so we have to recompute the destination coords |
| 771 | srccxx . . $ Radar#src..w = sweeprot->w; |
| 772 | srccxx . . $ Radar#src..h = sweeprot->h; |
| 773 | destcxx . . $ Radar#dest..x = sweepcxx . . $ Radar#sweep.[0]->w/2 + destcxx . . $ Radar#dest..x - sweeprot->w/2; |
| 774 | destcxx . . $ Radar#dest..y = sweepcxx . . $ Radar#sweep.[0]->h/2 + destcxx . . $ Radar#dest..y - sweeprot->h/2; |
| 775 | destcxx . . $ Radar#dest..w = srccxx . . $ Radar#src..w; |
| 776 | destcxx . . $ Radar#dest..h = srccxx . . $ Radar#src..h; |
| 777 | |
| 778 | //I'm not sure what this alpha stuff is for, but hopefully |
| 779 | //the rotozoomer won't mess it up |
| 780 | SDL_SetAlpha(sweeprot, SDL_SRCALPHAcxx . . $ `<external>/3508485105195885937/SDL_video.h:247:9`!, 128); |
| 781 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(sweeprot, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); // Do the actual Blit |
| 782 | SDL_FreeSurface(sweeprot); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | void Radarcxx . . $ Radar#::DisplayRingscxx . . $ Radar#DisplayRings(49f6e7a06ebc5aa8).() |
| 787 | { |
| 788 | int number; |
| 789 | |
| 790 | if (RangeRingcxx . . $ Radar#RangeRing. == 0) |
| 791 | { |
| 792 | number = 0; |
| 793 | } |
| 794 | else |
| 795 | { |
| 796 | number = int(float(RangeScalecxx . . $ Radar#RangeScale.)/float(RangeRingcxx . . $ Radar#RangeRing.)); |
| 797 | } |
| 798 | |
| 799 | for(int i = 0; i < number; i++) |
| 800 | { |
| 801 | DrawCirclecxx . . $ Radar#DrawCircle(23d17e51af626352).(screencxx . . $ Radar#screen., 320, 371, int((144.0/getRangeScalecxx . . $ Radar#getRangeScale(455f465bc33b4cdf).())*RangeRingcxx . . $ Radar#RangeRing.*(i+1)), orangecxx . . $ Radar#orange.); |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | void Radarcxx . . $ Radar#::DisplayContactscxx . . $ Radar#DisplayContacts(49f6e7a06ebc5aa8).() |
| 806 | { |
| 807 | float radians; |
| 808 | int bearing, range, depth; |
| 809 | Submarinecxx . . $ Submarine# *target; |
| 810 | |
| 811 | DisplaySweepcxx . . $ Radar#DisplaySweep(49f6e7a06ebc5aa8).(); // Start the radar sweep |
| 812 | |
| 813 | DisplayRingscxx . . $ Radar#DisplayRings(49f6e7a06ebc5aa8).(); // Draw Range Rings |
| 814 | |
| 815 | // Note: Center of radar screen @ (x,y) = (316,374) |
| 816 | // set dx = 144 dy = 144 |
| 817 | |
| 818 | target = Subscxx . . $ Radar#Subs.->nextcxx . . $ Submarine#next.; |
| 819 | while (target) |
| 820 | { |
| 821 | bearing = (int)Subscxx . . $ Radar#Subs.->BearingToTargetcxx . . $ Submarine#BearingToTarget(2de0d0e522051339).(target); |
| 822 | range = (int)Subscxx . . $ Radar#Subs.->DistanceToTargetcxx . . $ Submarine#DistanceToTarget(2de0d0e522051339).(target); |
| 823 | depth = (int)Subscxx . . $ Radar#Subs.->Depthcxx . . $ Submarine#Depth.; |
| 824 | |
| 825 | radians = float(bearing) *(3.14/180.0); // degrees to radians |
| 826 | |
| 827 | if(isTargetVisiblecxx . . $ Radar#isTargetVisible(37f2960dfd9b98b0).(target, range, depth, 100, 3)) |
| 828 | { |
| 829 | // Find where we plot the dot |
| 830 | xcxx . . $ Radar#x. = 316 + int((460-316)*(range/float(1000*RangeScalecxx . . $ Radar#RangeScale.))*coscxx . . $ cos(fee4f1d22bc8e617).(1.57-radians)); |
| 831 | ycxx . . $ Radar#y. = 374 - int((374-230)* (range/float(1000*RangeScalecxx . . $ Radar#RangeScale.))*sincxx . . $ sin(fee4f1d22bc8e617).(1.57-radians)); |
| 832 | |
| 833 | srccxx . . $ Radar#src..x = 0; |
| 834 | srccxx . . $ Radar#src..y = 0; |
| 835 | srccxx . . $ Radar#src..w = blipcxx . . $ Radar#blip.->w; |
| 836 | srccxx . . $ Radar#src..h = blipcxx . . $ Radar#blip.->h; |
| 837 | |
| 838 | destcxx . . $ Radar#dest..x = xcxx . . $ Radar#x.; |
| 839 | destcxx . . $ Radar#dest..y = ycxx . . $ Radar#y.; |
| 840 | destcxx . . $ Radar#dest..w = blipcxx . . $ Radar#blip.->w; |
| 841 | destcxx . . $ Radar#dest..h = blipcxx . . $ Radar#blip.->h; |
| 842 | |
| 843 | // Here's where we set the alpha level |
| 844 | |
| 845 | if(bearing <= 180) |
| 846 | { |
| 847 | if(tickcxx . . $ Radar#tick. >= bearing && tickcxx . . $ Radar#tick. <= ReciprocalBearingcxx . . $ Radar#ReciprocalBearing(7864480464b09eea).(bearing)) |
| 848 | { |
| 849 | ALPHAcxx . . $ Radar#ALPHA. = int(-(255.0/180.0)* float(DeltaBearingcxx . . $ Radar#DeltaBearing(9b79fb6aee4c0440).((int) tickcxx . . $ Radar#tick., bearing))+255.0); |
| 850 | } |
| 851 | else |
| 852 | { |
| 853 | |
| 854 | ALPHAcxx . . $ Radar#ALPHA. = 0; |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | if(bearing >= 180) |
| 859 | { |
| 860 | if(tickcxx . . $ Radar#tick. <= bearing && tickcxx . . $ Radar#tick. >= ReciprocalBearingcxx . . $ Radar#ReciprocalBearing(7864480464b09eea).(bearing)) |
| 861 | { |
| 862 | ALPHAcxx . . $ Radar#ALPHA. = 0; |
| 863 | } |
| 864 | else |
| 865 | { |
| 866 | |
| 867 | ALPHAcxx . . $ Radar#ALPHA. = int(-(255.0/180.0)* float(DeltaBearingcxx . . $ Radar#DeltaBearing(9b79fb6aee4c0440).((int) tickcxx . . $ Radar#tick., bearing))+255.0); |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | SDL_SetAlpha(blipcxx . . $ Radar#blip., SDL_SRCALPHAcxx . . $ `<external>/3508485105195885937/SDL_video.h:247:9`!, ALPHAcxx . . $ Radar#ALPHA.); |
| 872 | SDL_FillRect(screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest., blackcxx . . $ Radar#black.); |
| 873 | |
| 874 | SDL_BlitSurfacecxx . . $ `<external>/3508485105195885937/SDL_video.h:262:9`!(blipcxx . . $ Radar#blip., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, screencxx . . $ Radar#screen., &destcxx . . $ Radar#dest.); // Do the actual Blit |
| 875 | |
| 876 | } // if visible |
| 877 | target = target->nextcxx . . $ Submarine#next.; |
| 878 | } // end of while |
| 879 | SDL_UpdateRect(screencxx . . $ Radar#screen.,0, 0, 0, 0); |
| 880 | } |
| 881 | |
| 882 | void Radarcxx . . $ Radar#::ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).() |
| 883 | { |
| 884 | rangescale10cxx . . $ Radar#rangescale10. = false; |
| 885 | rangescale20cxx . . $ Radar#rangescale20. = false; |
| 886 | rangescale30cxx . . $ Radar#rangescale30. = false; |
| 887 | rangescale40cxx . . $ Radar#rangescale40. = false; |
| 888 | rangescale50cxx . . $ Radar#rangescale50. = false; |
| 889 | rangescale60cxx . . $ Radar#rangescale60. = false; |
| 890 | ClearScreencxx . . $ Radar#ClearScreen(49f6e7a06ebc5aa8).(); |
| 891 | } |
| 892 | |
| 893 | void Radarcxx . . $ Radar#::ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).() |
| 894 | { |
| 895 | rangering0cxx . . $ Radar#rangering0. = false; |
| 896 | rangering5cxx . . $ Radar#rangering5. = false; |
| 897 | rangering10cxx . . $ Radar#rangering10. = false; |
| 898 | rangering15cxx . . $ Radar#rangering15. = false; |
| 899 | rangering20cxx . . $ Radar#rangering20. = false; |
| 900 | rangering25cxx . . $ Radar#rangering25. = false; |
| 901 | ClearScreencxx . . $ Radar#ClearScreen(49f6e7a06ebc5aa8).(); |
| 902 | } |
| 903 | |
| 904 | // Toggle Range Scale |
| 905 | void Radarcxx . . $ Radar#::ToggleRangeScale10cxx . . $ Radar#ToggleRangeScale10(49f6e7a06ebc5aa8).(){ |
| 906 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 907 | rangescale10cxx . . $ Radar#rangescale10. = !rangescale10cxx . . $ Radar#rangescale10.; |
| 908 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(10); |
| 909 | } |
| 910 | void Radarcxx . . $ Radar#::ToggleRangeScale20cxx . . $ Radar#ToggleRangeScale20(49f6e7a06ebc5aa8).(){ |
| 911 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 912 | rangescale20cxx . . $ Radar#rangescale20. = !rangescale20cxx . . $ Radar#rangescale20.; |
| 913 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(20); |
| 914 | } |
| 915 | void Radarcxx . . $ Radar#::ToggleRangeScale30cxx . . $ Radar#ToggleRangeScale30(49f6e7a06ebc5aa8).(){ |
| 916 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 917 | rangescale30cxx . . $ Radar#rangescale30. = !rangescale30cxx . . $ Radar#rangescale30.; |
| 918 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(30); |
| 919 | } |
| 920 | void Radarcxx . . $ Radar#::ToggleRangeScale40cxx . . $ Radar#ToggleRangeScale40(49f6e7a06ebc5aa8).(){ |
| 921 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 922 | rangescale40cxx . . $ Radar#rangescale40. = !rangescale40cxx . . $ Radar#rangescale40.; |
| 923 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(40); |
| 924 | } |
| 925 | void Radarcxx . . $ Radar#::ToggleRangeScale50cxx . . $ Radar#ToggleRangeScale50(49f6e7a06ebc5aa8).(){ |
| 926 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 927 | rangescale50cxx . . $ Radar#rangescale50. = !rangescale50cxx . . $ Radar#rangescale50.; |
| 928 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(50); |
| 929 | } |
| 930 | void Radarcxx . . $ Radar#::ToggleRangeScale60cxx . . $ Radar#ToggleRangeScale60(49f6e7a06ebc5aa8).(){ |
| 931 | ClearRangeScalecxx . . $ Radar#ClearRangeScale(49f6e7a06ebc5aa8).(); |
| 932 | rangescale60cxx . . $ Radar#rangescale60. = !rangescale60cxx . . $ Radar#rangescale60.; |
| 933 | setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(60); |
| 934 | } |
| 935 | |
| 936 | // Toggle Range Rings |
| 937 | void Radarcxx . . $ Radar#::ToggleRangeRing0cxx . . $ Radar#ToggleRangeRing0(49f6e7a06ebc5aa8).(){ |
| 938 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 939 | rangering0cxx . . $ Radar#rangering0. = !rangering0cxx . . $ Radar#rangering0.; |
| 940 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(0); |
| 941 | } |
| 942 | |
| 943 | void Radarcxx . . $ Radar#::ToggleRangeRing5cxx . . $ Radar#ToggleRangeRing5(49f6e7a06ebc5aa8).(){ |
| 944 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 945 | rangering5cxx . . $ Radar#rangering5. = !rangering5cxx . . $ Radar#rangering5.; |
| 946 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(5); |
| 947 | } |
| 948 | |
| 949 | void Radarcxx . . $ Radar#::ToggleRangeRing10cxx . . $ Radar#ToggleRangeRing10(49f6e7a06ebc5aa8).(){ |
| 950 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 951 | rangering10cxx . . $ Radar#rangering10. = !rangering10cxx . . $ Radar#rangering10.; |
| 952 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(10); |
| 953 | } |
| 954 | |
| 955 | void Radarcxx . . $ Radar#::ToggleRangeRing15cxx . . $ Radar#ToggleRangeRing15(49f6e7a06ebc5aa8).(){ |
| 956 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 957 | rangering15cxx . . $ Radar#rangering15. = !rangering15cxx . . $ Radar#rangering15.; |
| 958 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(15); |
| 959 | } |
| 960 | |
| 961 | void Radarcxx . . $ Radar#::ToggleRangeRing20cxx . . $ Radar#ToggleRangeRing20(49f6e7a06ebc5aa8).(){ |
| 962 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 963 | rangering20cxx . . $ Radar#rangering20. = !rangering20cxx . . $ Radar#rangering20.; |
| 964 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(20); |
| 965 | } |
| 966 | |
| 967 | void Radarcxx . . $ Radar#::ToggleRangeRing25cxx . . $ Radar#ToggleRangeRing25(49f6e7a06ebc5aa8).(){ |
| 968 | ClearRangeRingcxx . . $ Radar#ClearRangeRing(49f6e7a06ebc5aa8).(); |
| 969 | rangering25cxx . . $ Radar#rangering25. = !rangering25cxx . . $ Radar#rangering25.; |
| 970 | setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(25); |
| 971 | } |
| 972 | |
| 973 | void Radarcxx . . $ Radar#::RaiseMastcxx . . $ Radar#RaiseMast(49f6e7a06ebc5aa8).() |
| 974 | { |
| 975 | Mastcxx . . $ Radar#Mast. = true; |
| 976 | } |
| 977 | |
| 978 | void Radarcxx . . $ Radar#::LowerMastcxx . . $ Radar#LowerMast(49f6e7a06ebc5aa8).() |
| 979 | { |
| 980 | Mastcxx . . $ Radar#Mast. = false; |
| 981 | } |
| 982 | |
| 983 | |
| 984 | void Radarcxx . . $ Radar#::ToggleMastcxx . . $ Radar#ToggleMast(49f6e7a06ebc5aa8).() |
| 985 | { |
| 986 | // ClearScreen(); |
| 987 | Mastcxx . . $ Radar#Mast. = !Mastcxx . . $ Radar#Mast.; |
| 988 | } |
| 989 | void Radarcxx . . $ Radar#::setRangeScalecxx . . $ Radar#setRangeScale(d4f767463ce0a6b3).(int RS) |
| 990 | { |
| 991 | // Set Radar RangeScale |
| 992 | RangeScalecxx . . $ Radar#RangeScale. = (RS == 10 || RS == 20 || RS == 30 || |
| 993 | RS == 40 || RS == 50 || RS == 60) ? RS : 10; |
| 994 | } |
| 995 | void Radarcxx . . $ Radar#::setRangeRingcxx . . $ Radar#setRangeRing(d4f767463ce0a6b3).(int RR) |
| 996 | { |
| 997 | // Set Radar RangeRing |
| 998 | RangeRingcxx . . $ Radar#RangeRing. = (RR == 0 || RR == 5 || RR == 10 || |
| 999 | RR == 15 || RR == 20 || RR == 25) ? RR : 0; |
| 1000 | } |
| 1001 | int Radarcxx . . $ Radar#::getRangeScalecxx . . $ Radar#getRangeScale(455f465bc33b4cdf).() const |
| 1002 | { |
| 1003 | return RangeScalecxx . . $ Radar#RangeScale.; |
| 1004 | } |
| 1005 | int Radarcxx . . $ Radar#::getRangeRingcxx . . $ Radar#getRangeRing(455f465bc33b4cdf).() const |
| 1006 | { |
| 1007 | return RangeRingcxx . . $ Radar#RangeRing.; |
| 1008 | } |
| 1009 | bool Radarcxx . . $ Radar#::getMastStatuscxx . . $ Radar#getMastStatus(50ce9a9e25b4a850).()const |
| 1010 | { |
| 1011 | return Mastcxx . . $ Radar#Mast.; |
| 1012 | } |
| 1013 | int Radarcxx . . $ Radar#::getAntennaHeightcxx . . $ Radar#getAntennaHeight(adc74905ab378dc7).(int Depth,int SeaState) const |
| 1014 | { |
| 1015 | // Effective Height of radar mast above water. |
| 1016 | // Note at SeaState > 5, must be on the surface to use radar |
| 1017 | // Also at SeaState > 5, effective length on mast = 1 ft. |
| 1018 | switch (SeaState) |
| 1019 | { |
| 1020 | case 0: |
| 1021 | case 1: return(MastHeightcxx . . $ Radar#MastHeight. - Depth); |
| 1022 | case 2: return(MastHeightcxx . . $ Radar#MastHeight. - Depth - 1); |
| 1023 | case 3: return(MastHeightcxx . . $ Radar#MastHeight. - Depth - 3); |
| 1024 | case 4: return(MastHeightcxx . . $ Radar#MastHeight. - Depth - 5); |
| 1025 | case 5: return(MastHeightcxx . . $ Radar#MastHeight. - Depth - 8); |
| 1026 | default: return(MastHeightcxx . . $ Radar#MastHeight. - Depth - 58); |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | bool Radarcxx . . $ Radar#::isTargetVisiblecxx . . $ Radar#isTargetVisible(37f2960dfd9b98b0).(Submarinecxx . . $ Submarine# *target, int TargetRange, |
| 1031 | int ObserverDepth, |
| 1032 | int TargetHeight, int SeaState) |
| 1033 | { |
| 1034 | // Determines if observer's radar can detect target. |
| 1035 | // Returns a 1 if true or a 0 if false. |
| 1036 | |
| 1037 | // TargetRange is the true range to the target. |
| 1038 | |
| 1039 | // TargetHeight is the height of the tallest mast on a surface ship |
| 1040 | // (usually 50 ft - 175 ft), height of conning tower for a submarine |
| 1041 | // (usually 40-50 ft), or altitude for airplane. |
| 1042 | |
| 1043 | /* To see Target, Mast must be up, Range < RadarHorizon, Range < RangeScale. |
| 1044 | |
| 1045 | Radar horizon is the earliest posssible target detection due to |
| 1046 | the Earth-Curvature. Radar horizon = 2400(sqrt(ha)+ sqrt(ht)) |
| 1047 | ha = antenna height(ft), ht = target height(ft), RadarHorizon(yds) |
| 1048 | |
| 1049 | When sea state (SS) <= 1, Depth should be < 58 ft or mast will be below |
| 1050 | water. At SS = 2, depth <= 57 ft. At SS = 3, depth <= 55 ft. |
| 1051 | At SS = 4, depth <= 53 ft. At SS = 5, depth <= 50 ft. |
| 1052 | */ |
| 1053 | |
| 1054 | bool boolean = false; |
| 1055 | |
| 1056 | // if target is under water we cannot see them |
| 1057 | if (target->Depthcxx . . $ Submarine#Depth. > 0.0) |
| 1058 | return false; |
| 1059 | |
| 1060 | CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight. = getAntennaHeightcxx . . $ Radar#getAntennaHeight(adc74905ab378dc7).(ObserverDepth,SeaState); |
| 1061 | if(CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight. <= 0) return boolean; // Mast is below water! |
| 1062 | |
| 1063 | RadarHorizoncxx . . $ Radar#RadarHorizon. = 2400*(int)(sqrtcxx . . $ sqrt(fbcf3211dfe1bfd1).(float(CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight.)) + sqrtcxx . . $ sqrt(fbcf3211dfe1bfd1).(float(TargetHeight))); |
| 1064 | |
| 1065 | if(target->Depthcxx . . $ Submarine#Depth. <= 0 && int(TargetRange) <= 1000*getRangeScalecxx . . $ Radar#getRangeScale(455f465bc33b4cdf).() && getMastStatuscxx . . $ Radar#getMastStatus(50ce9a9e25b4a850).() == 1 && |
| 1066 | TargetRange <= RadarHorizoncxx . . $ Radar#RadarHorizon.) boolean = true; |
| 1067 | return boolean; |
| 1068 | |
| 1069 | } |
| 1070 | |
| 1071 | float Radarcxx . . $ Radar#::getRadarHorizoncxx . . $ Radar#getRadarHorizon(c5bdf455470c621b).(int ObserverDepth, int TargetHeight, int SeaState) |
| 1072 | { |
| 1073 | /* Radar horizon is the earliest posssible target detection due to |
| 1074 | the Earth-Curvature. Radar horizon = 2400(sqrt(ha)+ sqrt(ht)) |
| 1075 | ha = antenna height(ft), ht = target height(ft), RadarHorizon(yds) |
| 1076 | |
| 1077 | When sea state (SS) <= 1, Depth should be < 58 ft or mast will be below |
| 1078 | water. At SS = 2, depth <= 57 ft. At SS = 3, depth <= 55 ft. |
| 1079 | At SS = 4, depth <= 53 ft. At SS = 5, depth <= 50 ft. |
| 1080 | */ |
| 1081 | |
| 1082 | CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight. = getAntennaHeightcxx . . $ Radar#getAntennaHeight(adc74905ab378dc7).(ObserverDepth,SeaState); |
| 1083 | if(CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight. <= 0) return 0; // Mast is below water! |
| 1084 | |
| 1085 | return(2400.0*(sqrtcxx . . $ sqrt(fbcf3211dfe1bfd1).(float(CurrentAntennaHeightcxx . . $ Radar#CurrentAntennaHeight.)) + sqrtcxx . . $ sqrt(fbcf3211dfe1bfd1).(float(TargetHeight)))); |
| 1086 | |
| 1087 | } |
| 1088 | |
| 1089 | int Radarcxx . . $ Radar#::getBearingcxx . . $ Radar#getBearing(7864480464b09eea).(int TargetBearing) |
| 1090 | { |
| 1091 | // Returns the bearing to the target. |
| 1092 | bearingcxx . . $ Radar#bearing. = TargetBearing; |
| 1093 | return bearingcxx . . $ Radar#bearing.; |
| 1094 | } |
| 1095 | |
| 1096 | int Radarcxx . . $ Radar#::getRangecxx . . $ Radar#getRange(7864480464b09eea).(int TargetRange) |
| 1097 | { |
| 1098 | // Returns the range to the target. |
| 1099 | rangecxx . . $ Radar#range. = TargetRange; |
| 1100 | return rangecxx . . $ Radar#range.; |
| 1101 | } |
| 1102 | |
| 1103 | void Radarcxx . . $ Radar#::ShowDatacxx . . $ Radar#ShowData(7bfbf473ac25ecb8).(SDL_Surface *screen, int x, int y){ |
| 1104 | static char text[120]; |
| 1105 | // string file1 = "font.png"; |
| 1106 | //string file2 = "font.dat"; |
| 1107 | char filename[] = "images/largefont.png"; |
| 1108 | char filename2[] = "data/largefont.dat"; |
| 1109 | static DFontcxx . . $ DFont# largeFontcxx . . $ DFont#DFont(d0489a02ea06dfc6).(filename, filename2); |
| 1110 | |
| 1111 | double c1, c2, c3, c4, c5, c6; |
| 1112 | int bearing; |
| 1113 | int range; |
| 1114 | |
| 1115 | c1 = double(316); |
| 1116 | c2 = double((460 - 316))/double(RangeScalecxx . . $ Radar#RangeScale.); |
| 1117 | c3 = double(374); |
| 1118 | c4 = double((374 - 230))/double(RangeScalecxx . . $ Radar#RangeScale.); |
| 1119 | |
| 1120 | c5 = c2*(double(y)-c3); |
| 1121 | c6 = c4*(double(x)-c1); |
| 1122 | |
| 1123 | ClearTextBoxcxx . . $ Radar#ClearTextBox(49f6e7a06ebc5aa8).(); |
| 1124 | |
| 1125 | |
| 1126 | if(x >= 316) |
| 1127 | { |
| 1128 | bearing = int(90.0 + (180/3.14)*atancxx . . $ atan(fee4f1d22bc8e617).(c5/c6)); |
| 1129 | } |
| 1130 | else |
| 1131 | { |
| 1132 | bearing = int(270.0 + (180/3.14)*atancxx . . $ atan(fee4f1d22bc8e617).(c5/c6)); |
| 1133 | } |
| 1134 | |
| 1135 | range = int(1000.0*sqrtcxx . . $ sqrt(fee4f1d22bc8e617).(powcxx . . $ pow(9454dda30a4b8335).(((double(x)-c1)/c2),2)+powcxx . . $ pow(9454dda30a4b8335).(((double(y)-c3)/c4),2))); |
| 1136 | |
| 1137 | |
| 1138 | srccxx . . $ Radar#src..x=166; |
| 1139 | srccxx . . $ Radar#src..y=608; //define a rectangle on the screen and make it black |
| 1140 | srccxx . . $ Radar#src..h=30; |
| 1141 | srccxx . . $ Radar#src..w=90; |
| 1142 | |
| 1143 | sprintf(text, " %i ", bearing); |
| 1144 | largeFont.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screen, 170, 615, text); |
| 1145 | |
| 1146 | srccxx . . $ Radar#src..x=383; |
| 1147 | srccxx . . $ Radar#src..y=608; //define a rectangle on the screen and make it black |
| 1148 | srccxx . . $ Radar#src..h=30; |
| 1149 | srccxx . . $ Radar#src..w=90; |
| 1150 | |
| 1151 | sprintf(text, " %i ", range); |
| 1152 | largeFont.PutStringcxx . . $ DFont#PutString(dae77c54ebf0dad5).(screen, 370, 615, text); |
| 1153 | |
| 1154 | return; |
| 1155 | |
| 1156 | } |
| 1157 | |
| 1158 | int Radarcxx . . $ Radar#::DeltaBearingcxx . . $ Radar#DeltaBearing(9b79fb6aee4c0440).(int bearing1, int bearing2) |
| 1159 | { |
| 1160 | // Difference between two bearings |
| 1161 | int deltabearing; |
| 1162 | // for POSIX systems |
| 1163 | #ifndef WIN32 |
| 1164 | if (fabscxx . . $ fabs(7759b11ec49fe502).(bearing1 - bearing2) < 180){ |
| 1165 | deltabearing = (int) fabscxx . . $ fabs(7759b11ec49fe502).(bearing1 - bearing2); |
| 1166 | }else{ |
| 1167 | deltabearing = (int) (360 - fabscxx . . $ fabs(7759b11ec49fe502).(bearing1 - bearing2)); |
| 1168 | } |
| 1169 | // WIN32 prefers abs when dealignwith int |
| 1170 | #else |
| 1171 | if (abs(bearing1 - bearing2) < 180){ |
| 1172 | deltabearing = (int) abs(bearing1 - bearing2); |
| 1173 | }else{ |
| 1174 | deltabearing = (int) (360 - abs(bearing1 - bearing2)); |
| 1175 | } |
| 1176 | #endif |
| 1177 | return deltabearing; |
| 1178 | } |
| 1179 | |
| 1180 | int Radarcxx . . $ Radar#::ReciprocalBearingcxx . . $ Radar#ReciprocalBearing(7864480464b09eea).(int bearing) |
| 1181 | { |
| 1182 | // returns the 180 degree opposite of the bearing given to it.. |
| 1183 | int recipbearing; |
| 1184 | if (bearing >= 180){ |
| 1185 | recipbearing = bearing - 180; |
| 1186 | }else{ |
| 1187 | recipbearing = bearing + 180; |
| 1188 | } |
| 1189 | return recipbearing; |
| 1190 | } |
| 1191 | |
| 1192 | void Radarcxx . . $ Radar#::DrawPixelcxx . . $ Radar#DrawPixel(6f3c846de5417090).(SDL_Surface *screen, int x, int y, Uint32cxx . . $ Uint32# color) |
| 1193 | { |
| 1194 | //this only works for 16bpp screens |
| 1195 | //are we outside the screen????? |
| 1196 | //If we are bail out now before it's too late! |
| 1197 | |
| 1198 | if (x > 1023 || x < 0 || y > 759 || y < 0) { |
| 1199 | return; |
| 1200 | } |
| 1201 | |
| 1202 | //place the pixel on the screen |
| 1203 | Uint16cxx . . $ Uint16# *pixel_location; |
| 1204 | pixel_location = (Uint16cxx . . $ Uint16# *)screen->pixels + y*screen->pitch/2 + x; |
| 1205 | *pixel_location = color; |
| 1206 | } |
| 1207 | |
| 1208 | void Radarcxx . . $ Radar#::DrawArccxx . . $ Radar#DrawArc(ff1e8d23fb3fb7e5).(SDL_Surface *screen, int X1, int Y1, int Radius, int Theta1, int Theta2, Uint32cxx . . $ Uint32# Color) |
| 1209 | { |
| 1210 | |
| 1211 | //Draw an arc at (X1,Y1) of a given radius from theta1 to theta2 using specified Color. |
| 1212 | int x, y, xc, yc, radius; |
| 1213 | int theta, theta1, theta2; |
| 1214 | xc = X1; |
| 1215 | yc = Y1; |
| 1216 | radius = Radius; |
| 1217 | theta1 = Theta1; |
| 1218 | theta2 = Theta2; |
| 1219 | |
| 1220 | for(theta=theta1;theta<=theta2;theta+=5) { |
| 1221 | x = xc + int(radius*coscxx . . $ cos(fee4f1d22bc8e617).(theta*3.14/180.0)); |
| 1222 | y = yc - int(radius*sincxx . . $ sin(fee4f1d22bc8e617).(theta*3.14/180.0)); |
| 1223 | DrawPixelcxx . . $ Radar#DrawPixel(6f3c846de5417090).(screen, x, y, Color); |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | void Radarcxx . . $ Radar#::DrawCirclecxx . . $ Radar#DrawCircle(23d17e51af626352).(SDL_Surface *screen, int X1, int Y1, int Radius, Uint32cxx . . $ Uint32# Color) |
| 1228 | { |
| 1229 | |
| 1230 | //Draw a circle at (X1,Y1) of a given radius using specified Color. |
| 1231 | int xc, yc, radius; |
| 1232 | xc = X1; |
| 1233 | yc = Y1; |
| 1234 | radius = Radius; |
| 1235 | DrawArccxx . . $ Radar#DrawArc(ff1e8d23fb3fb7e5).(screen, xc, yc, radius, 0, 360, Color); |
| 1236 | } |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 |