Serious-Engine/Sources/EntitiesMP/WorldSettingsController.cpp

284 lines
12 KiB
C++
Raw Normal View History

2016-03-11 14:57:17 +01:00
/*
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
*/
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
#include "StdH.h"
#include <EntitiesMP/WorldSettingsController.h>
#include <EntitiesMP/WorldSettingsController_tables.h>
void CWorldSettingsController::SetDefaultProperties(void) {
m_tmStormStart = -1.0f;
m_strName = "World settings controller";
m_tmLightningStart = -1.0f;
m_fLightningPower = 1.0f;
m_tmStormEnd = -1.0f;
m_tmPyramidPlatesStart = 1e6;
m_tmActivatedPlate1 = 1e6;
m_tmDeactivatedPlate1 = 1e6;
m_tmActivatedPlate2 = 1e6;
m_tmDeactivatedPlate2 = 1e6;
m_tmActivatedPlate3 = 1e6;
m_tmDeactivatedPlate3 = 1e6;
m_tmActivatedPlate4 = 1e6;
m_tmDeactivatedPlate4 = 1e6;
m_tmPyramidMorphRoomActivated = 1e6;
m_tmShakeStarted = -1.0f;
m_vShakePos = FLOAT3D(0 , 0 , 0);
m_fShakeFalloff = 100.0f;
m_fShakeFade = 1.0f;
m_fShakeIntensityY = 1.0f;
m_tmShakeFrequencyY = 1.0f;
m_fShakeIntensityB = 1.0f;
m_tmShakeFrequencyB = 1.0f;
m_fShakeIntensityZ = 1.0f;
m_tmShakeFrequencyZ = 1.0f;
m_bShakeFadeIn = FALSE ;
m_penEnvPartHolder = NULL;
m_bNoSaveGame = FALSE ;
m_tmGlaringStarted = -1.0f;
m_tmGlaringEnded = -1.0f;
m_fGlaringFadeInRatio = 0.1f;
m_fGlaringFadeOutRatio = 0.1f;
m_colGlade = COLOR(C_WHITE | CT_TRANSPARENT );
m_colBlendStart = COLOR(C_WHITE | CT_TRANSPARENT );
m_colBlendStop = COLOR(C_WHITE | CT_OPAQUE );
m_colShadeStart = COLOR(C_WHITE | CT_OPAQUE );
m_colShadeStop = COLOR(C_GRAY | CT_OPAQUE );
m_bApplyShadingToModels = FALSE ;
m_tmStormAppearTime = 10.0f;
m_tmStormDisappearTime = 10.0f;
m_penScrollHolder = NULL;
m_penTextFXHolder = NULL;
m_penCreditsHolder = NULL;
m_penHudPicFXHolder = NULL;
CEntity::SetDefaultProperties();
}
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
BOOL CWorldSettingsController::IsTargetValid(SLONG slPropertyOffset,CEntity * penTarget)
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(slPropertyOffset == offsetof (CWorldSettingsController , m_penEnvPartHolder ))
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(IsOfClass (penTarget , "EnvironmentParticlesHolder")){return TRUE ;}
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else {return FALSE ;}
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return CEntity :: IsTargetValid (slPropertyOffset , penTarget );
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
FLOAT CWorldSettingsController::GetStormFactor(void)
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
FLOAT fStormFactor = 0.0f;
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
TIME tmNow = _pTimer -> GetLerpedCurrentTick ();
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(tmNow > m_tmStormStart && tmNow < m_tmStormEnd + m_tmStormDisappearTime )
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(tmNow > m_tmStormStart + m_tmStormAppearTime && tmNow < m_tmStormEnd )
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
fStormFactor = 1.0f;
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else if(tmNow > m_tmStormEnd )
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
fStormFactor = 1.0f - (tmNow - m_tmStormEnd ) / m_tmStormDisappearTime ;
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
fStormFactor = (tmNow - m_tmStormStart ) / m_tmStormAppearTime ;
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return fStormFactor ;
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
BOOL CWorldSettingsController::HandleEvent(const CEntityEvent & ee)
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ee . ee_slEvent == EVENTCODE_EScroll )
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
EScroll escr = ((EScroll &) ee );
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(escr . bStart )
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penScrollHolder = escr . penSender ;
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(m_penScrollHolder == escr . penSender )
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penScrollHolder = NULL ;
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return TRUE ;
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ee . ee_slEvent == EVENTCODE_ETextFX )
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
ETextFX etfx = ((ETextFX &) ee );
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(etfx . bStart )
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penTextFXHolder = etfx . penSender ;
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(m_penTextFXHolder == etfx . penSender )
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penTextFXHolder = NULL ;
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return TRUE ;
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ee . ee_slEvent == EVENTCODE_EHudPicFX )
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
EHudPicFX ehpfx = ((EHudPicFX &) ee );
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ehpfx . bStart )
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penHudPicFXHolder = ehpfx . penSender ;
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(m_penHudPicFXHolder == ehpfx . penSender )
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penHudPicFXHolder = NULL ;
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return TRUE ;
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ee . ee_slEvent == EVENTCODE_ECredits )
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
ECredits ecr = ((ECredits &) ee );
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(ecr . bStart )
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penCreditsHolder = ecr . penSender ;
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
else
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
if(m_penCreditsHolder == ecr . penSender )
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
{
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penCreditsHolder = NULL ;
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return TRUE ;
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return FALSE ;
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
}
BOOL CWorldSettingsController::
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
Main(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CWorldSettingsController_Main
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CWorldSettingsController::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penScrollHolder = NULL ;
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_penTextFXHolder = NULL ;
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
InitAsEditorModel ();
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
SetCollisionFlags (ECF_IMMATERIAL );
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
SetModel (MODEL_WORLD_SETTINGS_CONTROLLER );
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
SetModelMainTexture (TEXTURE_WORLD_SETTINGS_CONTROLLER );
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_tmStormStart = 1e5 - 1.0f;
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
m_tmStormEnd = 1e5;
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
Return(STATE_CURRENT,EVoid());
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/WorldSettingsController.es"
return TRUE; ASSERT(FALSE); return TRUE;};