Debian Codegraph @

src/esm.h

raw symbols SCIP
1 /***************************************************************************
2 esm.h - description
3 -------------------
4 begin : Sat Mar 16 2002
5 copyright : (C) 2002 by Michael Bridak
6 email : [email protected]
7 $Id: esm.h,v 1.5 2003/04/14 05:51:03 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
19 #ifndef ESM_H
20 #define ESM_H
21
22
23 /**
24 *@author Michael Bridak
25 */
26
27 class Esm {
28 public:
29
30 Submarine *Subs;
31 SDL_Rect src, dest;
32
33 SDL_Surface *esmscreen;
34 SDL_Surface *tempscreen;
35 SDL_Surface *blip;
36 SDL_Surface *sweep1;
37 SDL_Surface *ClearEsm;
38 SDL_Surface *ClearEsm2;
39
40 Esm(Submarine *temp);
41 ~Esm();
42
43 void RaiseMast(); // Raise esm mast
44 void LowerMast(); // Lower esm mast
45 void ToggleMast(); //Toggle Mast Status
46
47 // Set functions
48 void setRangeScale(int); // How far do we want to look!
49 void setRangeRing(int); // Used on the display panel
50
51
52 // Get functions
53 bool getMastStatus() const; // Get the current mast position
54 int getAntennaHeight(int, int) const; // Get current mast height
55 int getBearing(int, int, int, int); // Get the Esm bearing
56 int getSignalStrength(Submarine *, int, int, int, bool, int); // Get the Esm signal strength
57 int getEsmHorizon(int, int, int); // Get the Esm Horizon
58
59 bool isTargetVisible(Submarine *, int TargetRange, int ObserverDepth,
60 int TargetHeight, bool TargetRadar, int SeaState);
61
62 void ClearScreen();
63
64 void LoadWidgets();
65
66 void DisplayWidgets();
67
68 void DisplayContacts();
69 void InitGraphics(SDL_Surface *temp, SDL_Surface *tempradarscreen);
70 void DLine(SDL_Surface *screen, int X1, int Y1, int X2, int Y2, Uint32 Color);
71 void DPixel(SDL_Surface *screen, int x, int y, Uint32 color);
72
73
74 private:
75 SDL_Rect destination_rectangle;
76 SDL_Rect source_rectangle;
77 SDL_Surface *screen;
78
79 SDL_Surface *mastdownoff;
80 SDL_Surface *mastdownon;
81
82 SDL_Surface *mastupoff;
83 SDL_Surface *mastupon;
84
85 SDL_Surface *styllus;
86
87
88 bool Mast;
89 int MastHeight;
90 int CurrentAntennaHeight;
91 int EsmHorizon;
92 int bearing;
93 int SignalStrength;
94 int DetectProb;
95 int x;
96 int y;
97 Uint32 orange, black;
98
99 static char text[120];
100 DFont largeFont(const char*, const char *);
101 DFont fnt(const char*, const char *);
102 DFont fnt2(const char*, const char *);
103 };
104
105 #endif