Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Intel.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: Intel.cpp
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  An element in the dynamic campaign
13 */
14 
15 #include "MemDebug.h"
16 #include "Intel.h"
17 
18 #include "Game.h"
19 #include "DataLoader.h"
20 
21 // +--------------------------------------------------------------------+
22 
23 static const char* intel_name[] = {
24  "",
25  "Reserve",
26  "Secret",
27  "Known",
28  "Located",
29  "Tracked",
30 };
31 
32 const char*
34 {
35  return intel_name[intel];
36 }
37 
38 int
39 Intel::IntelFromName(const char* type_name)
40 {
41  for (int i = RESERVE; i <= TRACKED; i++)
42  if (!_stricmp(type_name, intel_name[i]))
43  return i;
44 
45  return 0;
46 }