KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CulturalFeatureAppearance.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: CulturalFeatureAppearance
32  created: 08/08/2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a cultural feature.
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 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_Unused1 : 3; // 0-2
58  KUINT32 m_Damage : 2; // 3-4
59  KUINT32 m_Smoke : 2; // 5-6
60  KUINT32 m_Unused2 : 8; // 7-14
61  KUINT32 m_FlamingEffectField : 1; // 15
62  KUINT32 m_Unused3 : 5; // 16-20
63  KUINT32 m_FrozenStatus : 1; // 21
64  KUINT32 m_InternalHeatStatus : 1; // 22
65  KUINT32 m_State : 1; // 23
66  KUINT32 m_Unused4 : 4; // 24-27
67  KUINT32 m_ExteriorLights : 1; // 28
68  KUINT32 m_InteriorLights : 1; // 29
69  KUINT32 m_Unused5 : 1; // 30
70  KUINT32 m_MaskedCloaked : 1; // 31
71 
72 public:
73 
74  //************************************
75  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityDamage
76  // KDIS::DATA_TYPE::CulturalFeatureAppearance::GetEntityDamage
77  //!Description: Entity Damage State
78  // Parameter: EntityDamage ED
79  //************************************
80  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
81  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
82 
83  //************************************
84  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntitySmoke,
85  // KDIS::DATA_TYPE::CulturalFeatureAppearance::GetEntitySmoke
86  //!Description: Entity Smoke State
87  // Parameter: EntitySmoke ES
88  //************************************
89  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
90  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityFlamingEffect
94  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityFlaming
95  //!Description: Are flames rising from the entity?
96  // Parameter: KBOOL EFE
97  //************************************
98  void SetEntityFlamingEffect( KBOOL EFE );
99  KBOOL IsEntityFlaming() const;
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityFrozenStatus
103  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityFrozen
104  //!Description: Is the entity frozen?
105  //! Note: Frozen entities should not be dead-reckoned, they should remain
106  //! frozen in place. You would likely freeze entites when your application is
107  //! in a paused state.
108  // Parameter: KBOOL EFS
109  //************************************
110  void SetEntityFrozenStatus( KBOOL EFS );
111  KBOOL IsEntityFrozen() const;
112 
113  //************************************
114  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetInternalHeatStatusOn
115  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsInternalHeatOn
116  //!Description: Is the feature emitting internal heat?
117  // Parameter: KBOOL IHS
118  //************************************
119  void SetInternalHeatStatusOn( KBOOL IHS );
120  KBOOL IsInternalHeatOn() const;
121 
122  //************************************
123  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityStateActive
124  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityStateActive
125  //!Description: True = Active, False = Deactivated.
126  // Parameter: KBOOL ES
127  //************************************
128  void SetEntityStateActive( KBOOL ES );
129  KBOOL IsEntityStateActive() const;
130 
131  //************************************
132  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityExteriorLights
133  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityExteriorLightsOn
134  //!Description: Are the exterior lights turned on? True = On, False = Off.
135  // Parameter: KBOOL EL
136  //************************************
137  void SetEntityExteriorLights( KBOOL EL );
138  KBOOL IsEntityExteriorLightsOn() const;
139 
140  //************************************
141  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntityInteriorLights
142  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityInteriorLightsOn
143  //!Description: Are the vehicles interior lights turned on? True = On, False = Off.
144  // Parameter: KBOOL IL
145  //************************************
146  void SetEntityInteriorLights( KBOOL IL );
147  KBOOL IsEntityInteriorLightsOn() const;
148 
149  //************************************
150  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::SetEntitySurrdenderState
151  // KDIS::DATA_TYPE::CulturalFeatureAppearance::IsEntityMaskedCloaked
152  //!Description: Is the entity masked/cloaked or not.
153  //! True = Masked/Cloaked, False = Not Masked/Cloaked.
154  // Parameter: KBOOL MC
155  //************************************
156  void SetEntityMaskedCloaked( KBOOL MC );
157  KBOOL IsEntityMaskedCloaked() const;
158 
159  //************************************
160  // FullName: KDIS::DATA_TYPE::CulturalFeatureAppearance::GetAsString
161  //!Description: Returns a string representation
162  //************************************
163  KString GetAsString() const;
164 
165  KBOOL operator == ( const CulturalFeatureAppearance & Value ) const;
166  KBOOL operator != ( const CulturalFeatureAppearance & Value ) const;
167 };
168 
169 } // END namespace DATA_TYPES
170 } // END namespace KDIS
171 
unsigned int KUINT32
Definition: KDefines.h:103
Definition: CulturalFeatureAppearance.h:53
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82