Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
NetPacket.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: NetPacket.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Wrapper for low-level datagram class
13
*/
14
15
#ifndef NetPacket_h
16
#define NetPacket_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
NetData.h
"
21
22
// +--------------------------------------------------------------------+
23
24
class
NetLink
;
25
class
NetMsg
;
26
27
// +--------------------------------------------------------------------+
28
29
class
NetPacket
30
{
31
public
:
32
static
const
char
*
TYPENAME
() {
return
"NetPacket"
; }
33
34
NetPacket
(
NetMsg
* g);
35
NetPacket
(DWORD netid, BYTE type);
36
~NetPacket
();
37
38
bool
Send
(
NetLink
& link);
39
40
// various accessors:
41
DWORD
NetID
()
const
;
42
BYTE
Type
()
const
;
43
44
DWORD
GetPingSequence
();
45
void
SetPingSequence
(DWORD seq);
46
DWORD
GetNetID
();
47
void
SetNetID
(DWORD
id
);
48
Point
GetShipLocation
();
49
void
SetShipLocation
(
const
Point
& loc);
50
Point
GetShipVelocity
();
51
void
SetShipVelocity
(
const
Point
& vel);
52
Point
GetShipOrientation
();
53
void
SetShipOrientation
(
const
Point
& rpy);
54
double
GetThrottle
();
55
void
SetThrottle
(
double
t);
56
const
char
*
GetName
();
57
void
SetName
(
const
char
* name);
58
const
char
*
GetDesign
();
59
void
SetDesign
(
const
char
* design);
60
const
char
*
GetRegion
();
61
void
SetRegion
(
const
char
* rgn_name);
62
bool
GetTrigger
(
int
i);
63
void
SetTrigger
(
int
i,
bool
trigger);
64
65
66
protected
:
67
NetMsg
*
msg
;
68
};
69
70
71
// +--------------------------------------------------------------------+
72
73
#endif NetPacket_h
74
Stars45
NetPacket.h
Generated on Tue Jun 5 2012 20:47:05 for Starshatter_Open by
1.8.1