From 69209c38968c6f4066a772e0a51a2928749217de Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 19:00:23 +0000 Subject: Re-indenting the code to use standard tabs. Yes, I know this is pretty pointless, but who cares? --- Stars45/RadioMessage.cpp | 242 +++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 121 deletions(-) (limited to 'Stars45/RadioMessage.cpp') diff --git a/Stars45/RadioMessage.cpp b/Stars45/RadioMessage.cpp index 4072897..98f5f15 100644 --- a/Stars45/RadioMessage.cpp +++ b/Stars45/RadioMessage.cpp @@ -1,15 +1,15 @@ /* Project Starshatter 4.5 - Destroyer Studios LLC - Copyright © 1997-2004. All Rights Reserved. + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. - SUBSYSTEM: Stars.exe - FILE: RadioMessage.cpp - AUTHOR: John DiCamillo + SUBSYSTEM: Stars.exe + FILE: RadioMessage.cpp + AUTHOR: John DiCamillo - OVERVIEW - ======== - Radio communication message class implementation + OVERVIEW + ======== + Radio communication message class implementation */ #include "MemDebug.h" @@ -20,30 +20,30 @@ // +----------------------------------------------------------------------+ RadioMessage::RadioMessage(Ship* dst, const Ship* s, int a) - : dst_ship(dst), dst_elem(0), sender(s), action(a), channel(0) +: dst_ship(dst), dst_elem(0), sender(s), action(a), channel(0) { - if (s) - channel = s->GetIFF(); + if (s) + channel = s->GetIFF(); } RadioMessage::RadioMessage(Element* dst, const Ship* s, int a) - : dst_ship(0), dst_elem(dst), sender(s), action(a), channel(0) +: dst_ship(0), dst_elem(dst), sender(s), action(a), channel(0) { - if (s) - channel = s->GetIFF(); + if (s) + channel = s->GetIFF(); } RadioMessage::RadioMessage(const RadioMessage& rm) - : dst_ship(rm.dst_ship), dst_elem(rm.dst_elem), - sender(rm.sender), action(rm.action), channel(rm.channel), - info(rm.info), location(rm.location) +: dst_ship(rm.dst_ship), dst_elem(rm.dst_elem), +sender(rm.sender), action(rm.action), channel(rm.channel), +info(rm.info), location(rm.location) { - if (rm.target_list.size() > 0) { - for (int i = 0; i < rm.target_list.size(); i++) { - SimObject* obj = rm.target_list.at(i); - target_list.append(obj); - } - } + if (rm.target_list.size() > 0) { + for (int i = 0; i < rm.target_list.size(); i++) { + SimObject* obj = rm.target_list.at(i); + target_list.append(obj); + } + } } RadioMessage::~RadioMessage() @@ -54,101 +54,101 @@ RadioMessage::~RadioMessage() const char* RadioMessage::ActionName(int a) { - if (a == ACK) { - int coin = rand(); - if (coin < 10000) return "Acknowledged"; - if (coin < 17000) return "Roger that"; - if (coin < 20000) return "Understood"; - if (coin < 22000) return "Copy that"; - return "Affirmative"; - } - - if (a == DISTRESS) { - int coin = rand(); - if (coin < 15000) return "Mayday! Mayday!"; - if (coin < 18000) return "She's breaking up!"; - if (coin < 21000) return "Checking out!"; - return "We're going down!"; - } - - if (a == WARN_ACCIDENT) { - int coin = rand(); - if (coin < 15000) return "Check your fire!"; - if (coin < 18000) return "Watch it!"; - if (coin < 21000) return "Hey! We're on your side!"; - return "Confirm your targets!"; - } - - if (a == WARN_TARGETED) { - int coin = rand(); - if (coin < 15000) return "Break off immediately!"; - if (coin < 20000) return "Buddy spike!"; - return "Abort! Abort!"; - } - - switch (a) { - case NONE: return ""; - - case NACK: return "Negative, Unable"; - - case ATTACK: return "Engage"; - case ESCORT: return "Escort"; - case BRACKET: return "Bracket"; - case IDENTIFY: return "Identify"; - - case COVER_ME: return "Cover Me"; - case MOVE_PATROL: return "Vector"; - case SKIP_NAVPOINT: return "Skip Navpoint"; - case RESUME_MISSION: return "Resume Mission"; - case RTB: return "Return to Base"; - case DOCK_WITH: return "Dock With"; - case QUANTUM_TO: return "Jump to"; - case FARCAST_TO: return "Farcast to"; - - case GO_DIAMOND: return "Goto Diamond Formation"; - case GO_SPREAD: return "Goto Spread Formation"; - case GO_BOX: return "Goto Box Formation"; - case GO_TRAIL: return "Goto Trail Formation"; - - case WEP_FREE: return "Break and Attack"; - case WEP_HOLD: return "Hold All Weapons"; - case FORM_UP: return "Return to Formation"; - case SAY_POSITION: return "Say Your Position"; - - case LAUNCH_PROBE: return "Launch Probe"; - case GO_EMCON1: return "Goto EMCON 1"; - case GO_EMCON2: return "Goto EMCON 2"; - case GO_EMCON3: return "Goto EMCON 3"; - - case REQUEST_PICTURE: return "Request Picture"; - case REQUEST_SUPPORT: return "Request Support"; - case PICTURE: return "Picture is clear"; - - case CALL_INBOUND: return "Calling Inbound"; - case CALL_APPROACH: return "Roger your approach"; - case CALL_CLEARANCE: return "You have clearance"; - case CALL_FINALS: return "On final approach"; - case CALL_WAVE_OFF: return "Wave off - Runway is closed"; - - case DECLARE_ROGUE: return "Prepare to be destroyed!"; - - case CALL_ENGAGING: return "Engaging"; - case FOX_1: return "Fox One!"; - case FOX_2: return "Fox Two!"; - case FOX_3: return "Fox Three!"; - case SPLASH_1: return "Splash One!"; - case SPLASH_2: return "Splash Two!"; - case SPLASH_3: return "Splash Three!"; - case SPLASH_4: return "Splash Four!"; - case SPLASH_5: return "Target Destroyed!"; - case SPLASH_6: return "Enemy Destroyed!"; - case SPLASH_7: return "Confirmed Kill!"; - case BREAK_ORBIT: return "Breaking Orbit"; - case MAKE_ORBIT: return "Heading for Orbit"; - case QUANTUM_JUMP: return "Going Quantum"; - - default: return "Unknown"; - } + if (a == ACK) { + int coin = rand(); + if (coin < 10000) return "Acknowledged"; + if (coin < 17000) return "Roger that"; + if (coin < 20000) return "Understood"; + if (coin < 22000) return "Copy that"; + return "Affirmative"; + } + + if (a == DISTRESS) { + int coin = rand(); + if (coin < 15000) return "Mayday! Mayday!"; + if (coin < 18000) return "She's breaking up!"; + if (coin < 21000) return "Checking out!"; + return "We're going down!"; + } + + if (a == WARN_ACCIDENT) { + int coin = rand(); + if (coin < 15000) return "Check your fire!"; + if (coin < 18000) return "Watch it!"; + if (coin < 21000) return "Hey! We're on your side!"; + return "Confirm your targets!"; + } + + if (a == WARN_TARGETED) { + int coin = rand(); + if (coin < 15000) return "Break off immediately!"; + if (coin < 20000) return "Buddy spike!"; + return "Abort! Abort!"; + } + + switch (a) { + case NONE: return ""; + + case NACK: return "Negative, Unable"; + + case ATTACK: return "Engage"; + case ESCORT: return "Escort"; + case BRACKET: return "Bracket"; + case IDENTIFY: return "Identify"; + + case COVER_ME: return "Cover Me"; + case MOVE_PATROL: return "Vector"; + case SKIP_NAVPOINT: return "Skip Navpoint"; + case RESUME_MISSION: return "Resume Mission"; + case RTB: return "Return to Base"; + case DOCK_WITH: return "Dock With"; + case QUANTUM_TO: return "Jump to"; + case FARCAST_TO: return "Farcast to"; + + case GO_DIAMOND: return "Goto Diamond Formation"; + case GO_SPREAD: return "Goto Spread Formation"; + case GO_BOX: return "Goto Box Formation"; + case GO_TRAIL: return "Goto Trail Formation"; + + case WEP_FREE: return "Break and Attack"; + case WEP_HOLD: return "Hold All Weapons"; + case FORM_UP: return "Return to Formation"; + case SAY_POSITION: return "Say Your Position"; + + case LAUNCH_PROBE: return "Launch Probe"; + case GO_EMCON1: return "Goto EMCON 1"; + case GO_EMCON2: return "Goto EMCON 2"; + case GO_EMCON3: return "Goto EMCON 3"; + + case REQUEST_PICTURE: return "Request Picture"; + case REQUEST_SUPPORT: return "Request Support"; + case PICTURE: return "Picture is clear"; + + case CALL_INBOUND: return "Calling Inbound"; + case CALL_APPROACH: return "Roger your approach"; + case CALL_CLEARANCE: return "You have clearance"; + case CALL_FINALS: return "On final approach"; + case CALL_WAVE_OFF: return "Wave off - Runway is closed"; + + case DECLARE_ROGUE: return "Prepare to be destroyed!"; + + case CALL_ENGAGING: return "Engaging"; + case FOX_1: return "Fox One!"; + case FOX_2: return "Fox Two!"; + case FOX_3: return "Fox Three!"; + case SPLASH_1: return "Splash One!"; + case SPLASH_2: return "Splash Two!"; + case SPLASH_3: return "Splash Three!"; + case SPLASH_4: return "Splash Four!"; + case SPLASH_5: return "Target Destroyed!"; + case SPLASH_6: return "Enemy Destroyed!"; + case SPLASH_7: return "Confirmed Kill!"; + case BREAK_ORBIT: return "Breaking Orbit"; + case MAKE_ORBIT: return "Heading for Orbit"; + case QUANTUM_JUMP: return "Going Quantum"; + + default: return "Unknown"; + } } // +----------------------------------------------------------------------+ @@ -156,9 +156,9 @@ RadioMessage::ActionName(int a) void RadioMessage::AddTarget(SimObject* obj) { - if (obj && !target_list.contains(obj)) { - target_list.append(obj); - } + if (obj && !target_list.contains(obj)) { + target_list.append(obj); + } } -- cgit v1.1