KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SpacePlatformAppearance.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: SpacePlatformAppearance
32  created: 22/09/2008 - Updated April 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a space 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 
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_Unused2 : 8; // 7-14
63  KUINT32 m_FlamingEffectField : 1; // 15
64  KUINT32 m_Unused3 : 5; // 16-20
65  KUINT32 m_FrozenStatus : 1; // 21
66  KUINT32 m_PowerPlantStatus : 1; // 22
67  KUINT32 m_State : 1; // 23
68  KUINT32 m_Unused4 : 8; // 24-31
69 
70 public:
71 
72 
73  //************************************
74  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityPaintScheme
75  // KDIS::DATA_TYPE::SpacePlatformAppearance::GetEntityPaintScheme
76  //!Description: Describes the paint scheme of an entity.
77  // Parameter: EntityPaintScheme EPS
78  //************************************
79  void SetEntityPaintScheme( KDIS::DATA_TYPE::ENUMS::EntityPaintScheme EPS );
80  KDIS::DATA_TYPE::ENUMS::EntityPaintScheme GetEntityPaintScheme() const;
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityMobilityKill
84  // KDIS::DATA_TYPE::SpacePlatformAppearance::DoesEntityMobilityKill
85  //!Description: Mobility/Propulsion Kill True/False?
86  // Parameter: KBOOL MK
87  //************************************
88  void SetEntityMobilityKill( KBOOL MK );
89  KBOOL DoesEntityMobilityKill() const;
90 
91  //************************************
92  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityDamage
93  // KDIS::DATA_TYPE::SpacePlatformAppearance::GetEntityDamage
94  //!Description: Entity Damage State
95  // Parameter: EntityDamage ED
96  //************************************
97  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
98  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
99 
100  //************************************
101  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntitySmoke,
102  // KDIS::DATA_TYPE::SpacePlatformAppearance::GetEntitySmoke
103  //!Description: Entity Smoke State. Space platforms can only be NotSmoking(0) or SmokePlume(1).
104  // Parameter: EntitySmoke ES
105  //************************************
106  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
107  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
108 
109  //************************************
110  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityFlamingEffect
111  // KDIS::DATA_TYPE::SpacePlatformAppearance::IsEntityFlaming
112  //!Description: Are flames rising from the entity?
113  // Parameter: KBOOL EFE
114  //************************************
115  void SetEntityFlamingEffect( KBOOL EFE );
116  KBOOL IsEntityFlaming() const;
117 
118  //************************************
119  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityFrozenStatus
120  // KDIS::DATA_TYPE::SpacePlatformAppearance::IsEntityFrozen
121  //!Description: Is the entity frozen?
122  //! Note: Frozen entities should not be dead-reckoned, they should remain
123  //! frozen in place. You would likely freeze entites when your application is
124  //! in a paused state.
125  // Parameter: KBOOL EFS
126  //************************************
127  void SetEntityFrozenStatus( KBOOL EFS );
128  KBOOL IsEntityFrozen() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityPowerPlantOn
132  // KDIS::DATA_TYPE::SpacePlatformAppearance::IsEntityPowerPlantOn
133  //!Description: Power Plant On/Off. True = On, False = Off.
134  // Parameter: KBOOL EPPS
135  //************************************
136  void SetEntityPowerPlantOn( KBOOL EPPS );
137  KBOOL IsEntityPowerPlantOn() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::SetEntityStateActive
141  // KDIS::DATA_TYPE::SpacePlatformAppearance::IsEntityStateActive
142  //!Description: True = Active, False = Deactivated.
143  // Parameter: KBOOL ES
144  //************************************
145  void SetEntityStateActive( KBOOL ES );
146  KBOOL IsEntityStateActive() const;
147 
148  //************************************
149  // FullName: KDIS::DATA_TYPE::SpacePlatformAppearance::GetAsString
150  //!Description: Returns a string representation
151  //************************************
152  KString GetAsString() const;
153 
154  KBOOL operator == ( const SpacePlatformAppearance & Value ) const;
155  KBOOL operator != ( const SpacePlatformAppearance & Value ) const;
156 };
157 
158 } // END namespace DATA_TYPES
159 } // END namespace KDIS
160 
unsigned int KUINT32
Definition: KDefines.h:103
EntityPaintScheme
Definition: EnumEntityInfoInteraction.h:630
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
bool KBOOL
Definition: KDefines.h:119
Definition: SpacePlatformAppearance.h:53
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82