Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
WepView.h
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: WepView.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
View class for Tactical HUD Overlay
13
*/
14
15
#ifndef WepView_h
16
#define WepView_h
17
18
#include "
Types.h
"
19
#include "
View.h
"
20
#include "
Projector.h
"
21
#include "
Bitmap.h
"
22
#include "
Font.h
"
23
#include "
System.h
"
24
#include "
SimObject.h
"
25
26
// +--------------------------------------------------------------------+
27
28
class
Graphic
;
29
class
Sprite
;
30
class
Ship
;
31
class
Contact
;
32
class
HUDView
;
33
34
// +--------------------------------------------------------------------+
35
36
class
WepView
:
public
View
,
37
public
SimObserver
38
{
39
public
:
40
WepView
(
Window
* c);
41
virtual
~WepView
();
42
43
// Operations:
44
virtual
void
Refresh
();
45
virtual
void
OnWindowMove
();
46
virtual
void
ExecFrame
();
47
virtual
void
SetOverlayMode
(
int
mode
);
48
virtual
int
GetOverlayMode
()
const
{
return
mode
; }
49
virtual
void
CycleOverlayMode
();
50
51
virtual
void
RestoreOverlay
();
52
53
virtual
bool
Update
(
SimObject
* obj);
54
virtual
const
char
*
GetObserverName
()
const
;
55
56
static
WepView
*
GetInstance
() {
return
wep_view
; }
57
static
void
SetColor
(
Color
c);
58
59
static
bool
IsMouseLatched
();
60
61
protected
:
62
void
DrawOverlay
();
63
64
void
DoMouseFrame
();
65
bool
CheckButton
(
int
index,
int
x,
int
y);
66
void
CycleSubTarget
(
int
direction);
67
68
int
mode
;
69
int
transition
;
70
int
mouse_down
;
71
int
width
,
height
,
aw
,
ah
;
72
double
xcenter
,
ycenter
;
73
74
Sim
*
sim
;
75
Ship
*
ship
;
76
SimObject
*
target
;
77
HUDView
*
hud
;
78
79
enum
{
MAX_WEP
= 4,
MAX_BTN
= 16 };
80
Rect
btn_rect
[
MAX_BTN
];
81
82
SimRegion
*
active_region
;
83
84
static
WepView
*
wep_view
;
85
};
86
87
#endif WepView_h
88
Stars45
WepView.h
Generated on Tue Jun 5 2012 20:47:17 for Starshatter_Open by
1.8.1