KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SurfacePlatformAppearance.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: SurfacePlatformAppearance
32  created: 22/09/2008 - Updated March 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a surface platform.
36  Implemented as struct so as to prevent the size from
37  changing due to RTTI etc. This struct will be part of a
38  union with all specific appearance values so it is implemented
39  slightly different.
40  No constructors to prevent C2620 error caused by union of
41  classes/structs.
42  size: 32 Bits / 4 Octet
43 *********************************************************************/
44 
45 #pragma once
46 
47 #include "./../KDefines.h"
48 #include "./Enums/KDISEnums.h"
49 
50 namespace KDIS {
51 namespace DATA_TYPE {
52 
54 {
55 protected:
56  // Bits
57  KUINT32 m_PaintScheme : 1; // 0
58  KUINT32 m_MobilityKill : 1; // 1
59  KUINT32 m_Unused1 : 1; // 2
60  KUINT32 m_Damage : 2; // 3-4
61  KUINT32 m_Smoke : 2; // 5-6
62  KUINT32 m_TrailingEffect : 2; // 7-8
63  KUINT32 m_Unused2 : 3; // 9-11
64  KUINT32 m_RunningLights : 1; // 12
65  KUINT32 m_Unused3 : 2; // 13-14
66  KUINT32 m_FlamingEffectField : 1; // 15
67  KUINT32 m_Unused4 : 5; // 16-20
68  KUINT32 m_FrozenStatus : 1; // 21
69  KUINT32 m_PowerPlantStatus : 1; // 22
70  KUINT32 m_State : 1; // 23
71  KUINT32 m_Unused5 : 4; // 24-27
72  KUINT32 m_SpotLights : 1; // 28
73  KUINT32 m_InteriorLights : 1; // 29
74  KUINT32 m_Unused6 : 2; // 30 - 31
75 
76 public:
77 
78  //************************************
79  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityPaintScheme
80  // KDIS::DATA_TYPE::SurfacePlatformAppearance::GetEntityPaintScheme
81  //!Description: Describes the paint scheme of an entity.
82  // Parameter: EntityPaintScheme EPS
83  //************************************
84  void SetEntityPaintScheme( KDIS::DATA_TYPE::ENUMS::EntityPaintScheme EPS );
85  KDIS::DATA_TYPE::ENUMS::EntityPaintScheme GetEntityPaintScheme() const;
86 
87  //************************************
88  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityMobilityKill
89  // KDIS::DATA_TYPE::SurfacePlatformAppearance::DoesEntityMobilityKill
90  //!Description: Mobility/Propulsion Kill True/False?
91  // Parameter: KBOOL MK
92  //************************************
93  void SetEntityMobilityKill( KBOOL MK );
94  KBOOL DoesEntityMobilityKill() const;
95 
96  //************************************
97  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityDamage
98  // KDIS::DATA_TYPE::SurfacePlatformAppearance::GetEntityDamage
99  //!Description: Entity Damage State
100  // Parameter: EntityDamage ED
101  //************************************
102  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
103  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
104 
105  //************************************
106  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntitySmoke,
107  // KDIS::DATA_TYPE::SurfacePlatformAppearance::GetEntitySmoke
108  //!Description: Entity Smoke State
109  // Parameter: EntitySmoke ES
110  //************************************
111  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
112  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
113 
114  //************************************
115  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityTrailingEffect
116  // KDIS::DATA_TYPE::SurfacePlatformAppearance::GetEntityTrailingEffect
117  //!Description: Describes the size of the dust cloud/trailing effect.
118  // Parameter: EntityTrailingEffect ETE
119  //************************************
120  void SetEntityTrailingEffect( KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect ETE );
121  KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect GetEntityTrailingEffect() const;
122 
123  //************************************
124  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityRunningLights
125  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityRunningLightsOn
126  //!Description: Are the vehicles running lights turned on? True = On, False = Off.
127  // Parameter: KBOOL RL
128  //************************************
129  void SetEntityRunningLights( KBOOL RL );
130  KBOOL IsEntityRunningLightsOn() const;
131 
132  //************************************
133  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityFlamingEffect
134  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityFlaming
135  //!Description: Are flames rising from the entity?
136  // Parameter: KBOOL EFE
137  //************************************
138  void SetEntityFlamingEffect( KBOOL EFE );
139  KBOOL IsEntityFlaming() const;
140 
141  //************************************
142  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityFrozenStatus
143  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityFrozen
144  //!Description: Is the entity frozen?
145  //! Note: Frozen entities should not be dead-reckoned, they should remain
146  //! frozen in place. You would likely freeze entites when your application is
147  //! in a paused state.
148  // Parameter: KBOOL EFS
149  //************************************
150  void SetEntityFrozenStatus( KBOOL EFS );
151  KBOOL IsEntityFrozen() const;
152 
153  //************************************
154  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityPowerPlantOn
155  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityPowerPlantOn
156  //!Description: Power Plant On/Off. True = On, False = Off.
157  // Parameter: KBOOL EPPS
158  //************************************
159  void SetEntityPowerPlantOn( KBOOL EPPS );
160  KBOOL IsEntityPowerPlantOn() const;
161 
162  //************************************
163  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityStateActive
164  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityStateActive
165  //!Description: True = Active, False = Deactivated.
166  // Parameter: KBOOL ES
167  //************************************
168  void SetEntityStateActive( KBOOL ES );
169  KBOOL IsEntityStateActive() const;
170 
171  //************************************
172  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityBlackoutBrakeLights
173  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityBlackoutBrakeLightsOn
174  //!Description: Are the vehicles spot lights turned on? True = On, False = Off.
175  // Parameter: KBOOL SL
176  //************************************
177  void SetEntitySpotLights( KBOOL SL );
178  KBOOL IsEntitySpotLightsOn() const;
179 
180  //************************************
181  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::SetEntityInteriorLights
182  // KDIS::DATA_TYPE::SurfacePlatformAppearance::IsEntityInteriorLightsOn
183  //!Description: Are the vehicles interior lights turned on? True = On, False = Off.
184  // Parameter: KBOOL IL
185  //************************************
186  void SetEntityInteriorLights( KBOOL IL );
187  KBOOL IsEntityInteriorLightsOn() const;
188 
189  //************************************
190  // FullName: KDIS::DATA_TYPE::SurfacePlatformAppearance::GetAsString
191  //!Description: Returns a string representation.
192  //************************************
193  KString GetAsString() const;
194 
195  KBOOL operator == ( const SurfacePlatformAppearance & Value ) const;
196  KBOOL operator != ( const SurfacePlatformAppearance & Value ) const;
197 };
198 
199 } // END namespace DATA_TYPES
200 } // END namespace KDIS
201 
unsigned int KUINT32
Definition: KDefines.h:103
EntityTrailingEffect
Definition: EnumEntityInfoInteraction.h:667
EntityPaintScheme
Definition: EnumEntityInfoInteraction.h:630
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
Definition: EnumEmitter.h:949
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
Definition: SurfacePlatformAppearance.h:53
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82