-
Notifications
You must be signed in to change notification settings - Fork 0
/
C3DMapPane.h
executable file
·82 lines (58 loc) · 1.7 KB
/
C3DMapPane.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
C3DMapPane.h
Author: Tom Naughton
Description: <describe the C3DMapPane class here>
*/
#ifndef C3DMapPane_H
#define C3DMapPane_H
#include "C3DPane.h"
#include "C3DModel.h"
#include "DragAndDrop.h"
#include "CBsp.h"
class CBsp;
class C3DMapPane:
public C3DPane
{
public:
enum { class_ID = 'MpGL' };
C3DMapPane();
C3DMapPane(const SPaneInfo& inPaneInfo, LStr255& desc);
C3DMapPane(LStream* inStream);
virtual ~C3DMapPane();
// LListener methods
void ListenToMessage(MessageT inMessage, void* ioParam);
// LPeriodical methods
void SpendTime(const EventRecord &inMacEvent);
// LCommander methods
virtual Boolean ObeyCommand(
CommandT inCommand,
void* ioParam = nil);
virtual Boolean HandleKeyPress(
const EventRecord& inKeyEvent);
virtual void FindCommandStatus(
CommandT inCommand,
Boolean& outEnabled,
Boolean& outUsesMark,
UInt16& outMark,
Str255 outName);
virtual void ReshapeGL(int,int); // change size
void SetMap(CBsp *bsp);
void SetLevelShot(CGLImage *shot);
protected:
virtual void PickModel(int x, int y);
virtual void MouseDown(const SMouseDownEvent& inMouseDown, const Point&);// Mouse down event
virtual void MouseDrag(const SMouseDownEvent& inMouseDown, const Point&);// mouse is being dragged
virtual void SetupRendering();
virtual void resetRendering();
virtual void DrawGL(); // GL Rendering
virtual void DrawHUD();
//keep track of mouse movements
int _m_x, _m_y;
CBsp *_map;
CGLImage *_levelShot;
float _strafeVelocity;
float _moveVelocity;
float _lastTime;
float _dragTime;
};
#endif // C3DMapPane_H