From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- .../html/_combat_assignment_8cpp_source.html | 185 +++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 Doc/doxygen/html/_combat_assignment_8cpp_source.html (limited to 'Doc/doxygen/html/_combat_assignment_8cpp_source.html') diff --git a/Doc/doxygen/html/_combat_assignment_8cpp_source.html b/Doc/doxygen/html/_combat_assignment_8cpp_source.html new file mode 100644 index 0000000..92c682e --- /dev/null +++ b/Doc/doxygen/html/_combat_assignment_8cpp_source.html @@ -0,0 +1,185 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/Stars45/CombatAssignment.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
CombatAssignment.cpp
+
+
+Go to the documentation of this file.
1 /* Project Starshatter 4.5
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: Stars.exe
+
6  FILE: CombatAssignment.cpp
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  High level assignment of one group to damage another
+
13 */
+
14 
+
15 #include "MemDebug.h"
+
16 #include "CombatAssignment.h"
+
17 #include "CombatGroup.h"
+
18 #include "Mission.h"
+
19 
+
20 // +--------------------------------------------------------------------+
+
21 
+ +
23 : type(t), objective(obj), resource(rsc)
+
24 {
+
25 }
+
26 
+
27 // +--------------------------------------------------------------------+
+
28 
+ +
30 {
+
31 }
+
32 
+
33 // +--------------------------------------------------------------------+
+
34 // This is used to sort assignments into a priority list.
+
35 // Higher priorities should come first in the list, so the
+
36 // sense of the operator is "backwards" from the usual.
+
37 
+
38 int
+ +
40 {
+
41  if (!objective)
+
42  return 0;
+
43 
+
44  if (!a.objective)
+
45  return 1;
+
46 
+
47  return objective->GetPlanValue() > a.objective->GetPlanValue();
+
48 }
+
49 
+
50 // +--------------------------------------------------------------------+
+
51 
+
52 const char*
+ +
54 {
+
55  static char desc[256];
+
56 
+
57  if (!resource)
+
58  sprintf_s(desc, "%s %s",
+
59  (const char*) Mission::RoleName(type),
+
60  (const char*) objective->Name());
+
61  else
+
62  sprintf_s(desc, "%s %s %s",
+
63  (const char*) resource->Name(),
+
64  (const char*) Mission::RoleName(type),
+
65  (const char*) objective->Name());
+
66 
+
67  return desc;
+
68 }
+
+
+ + + + -- cgit v1.1