mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
518 lines
22 KiB
C++
518 lines
22 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
|
|
#include "StdH.h"
|
|
#include "EntitiesMP/EnemyBase.h"
|
|
#include "EntitiesMP/EnemySpawner.h"
|
|
#include "EntitiesMP/Trigger.h"
|
|
#include "EntitiesMP/Woman.h"
|
|
|
|
#include <EntitiesMP/MusicHolder.h>
|
|
#include <EntitiesMP/MusicHolder_tables.h>
|
|
CEntityEvent *EChangeMusic::MakeCopy(void) { CEntityEvent *peeCopy = new EChangeMusic(*this); return peeCopy;}
|
|
EChangeMusic::EChangeMusic() : CEntityEvent(EVENTCODE_EChangeMusic) {;
|
|
ClearToDefault(mtType);
|
|
ClearToDefault(fnMusic);
|
|
ClearToDefault(fVolume);
|
|
ClearToDefault(bForceStart);
|
|
};
|
|
#line 28 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
|
|
#define MUSIC_VOLUMEMIN 0.02f // minimum volume (considered off)
|
|
#define MUSIC_VOLUMEMAX 0.98f // maximum volume (considered full)
|
|
|
|
float FadeInFactor(TIME fFadeTime)
|
|
{
|
|
return (float) pow(MUSIC_VOLUMEMAX/MUSIC_VOLUMEMIN, 1/(fFadeTime/_pTimer->TickQuantum));
|
|
}
|
|
float FadeOutFactor(TIME fFadeTime)
|
|
{
|
|
return (float) pow(MUSIC_VOLUMEMIN/MUSIC_VOLUMEMAX, 1/(fFadeTime/_pTimer->TickQuantum));
|
|
}
|
|
|
|
void CMusicHolder::SetDefaultProperties(void) {
|
|
m_strName = "MusicHolder";
|
|
m_fScoreMedium = 100.0f;
|
|
m_fScoreHeavy = 1000.0f;
|
|
m_fnMusic0 = CTFILENAME("");
|
|
m_fnMusic1 = CTFILENAME("");
|
|
m_fnMusic2 = CTFILENAME("");
|
|
m_fnMusic3 = CTFILENAME("");
|
|
m_fnMusic4 = CTFILENAME("");
|
|
m_fVolume0 = 1.0f;
|
|
m_fVolume1 = 1.0f;
|
|
m_fVolume2 = 1.0f;
|
|
m_fVolume3 = 1.0f;
|
|
m_fVolume4 = 1.0f;
|
|
m_penBoss = NULL;
|
|
m_penCounter = NULL;
|
|
m_ctEnemiesInWorld = 0;
|
|
m_penRespawnMarker = NULL;
|
|
m_ctSecretsInWorld = 0;
|
|
m_tmFade = 1.0f;
|
|
m_mtCurrentMusic = MT_LIGHT ;
|
|
m_fCurrentVolume0a = 1.0f;
|
|
m_fCurrentVolume0b = 1.0f;
|
|
m_fCurrentVolume1a = 1.0f;
|
|
m_fCurrentVolume1b = 1.0f;
|
|
m_fCurrentVolume2a = 1.0f;
|
|
m_fCurrentVolume2b = 1.0f;
|
|
m_fCurrentVolume3a = 1.0f;
|
|
m_fCurrentVolume3b = 1.0f;
|
|
m_fCurrentVolume4a = 1.0f;
|
|
m_fCurrentVolume4b = 1.0f;
|
|
m_soMusic0a.SetOwner(this);
|
|
m_soMusic0a.Stop_internal();
|
|
m_soMusic0b.SetOwner(this);
|
|
m_soMusic0b.Stop_internal();
|
|
m_soMusic1a.SetOwner(this);
|
|
m_soMusic1a.Stop_internal();
|
|
m_soMusic1b.SetOwner(this);
|
|
m_soMusic1b.Stop_internal();
|
|
m_soMusic2a.SetOwner(this);
|
|
m_soMusic2a.Stop_internal();
|
|
m_soMusic2b.SetOwner(this);
|
|
m_soMusic2b.Stop_internal();
|
|
m_soMusic3a.SetOwner(this);
|
|
m_soMusic3a.Stop_internal();
|
|
m_soMusic3b.SetOwner(this);
|
|
m_soMusic3b.Stop_internal();
|
|
m_soMusic4a.SetOwner(this);
|
|
m_soMusic4a.Stop_internal();
|
|
m_soMusic4b.SetOwner(this);
|
|
m_soMusic4b.Stop_internal();
|
|
m_iSubChannel0 = 1;
|
|
m_iSubChannel1 = 1;
|
|
m_iSubChannel2 = 1;
|
|
m_iSubChannel3 = 1;
|
|
m_iSubChannel4 = 1;
|
|
CRationalEntity::SetDefaultProperties();
|
|
}
|
|
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::CountEnemies(void)
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_ctEnemiesInWorld = 0;
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_ctSecretsInWorld = 0;
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{FOREACHINDYNAMICCONTAINER (GetWorld () -> wo_cenEntities , CEntity , iten ){
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEntity * pen = iten ;
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(IsDerivedFromClass (pen , "Enemy Base")){
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEnemyBase * penEnemy = (CEnemyBase *) pen ;
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(! penEnemy -> m_bTemplate ){
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_ctEnemiesInWorld ++;
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(IsOfClass (pen , "Woman")){
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(((CWoman *) & * pen ) -> m_bKamikazeCarrier ){m_ctEnemiesInWorld ++;}
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(IsDerivedFromClass (pen , "Enemy Spawner")){
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEnemySpawner * penSpawner = (CEnemySpawner *) pen ;
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(penSpawner -> m_estType != EST_TELEPORTER ){
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_ctEnemiesInWorld += penSpawner -> m_ctTotal ;
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(penSpawner -> m_penTarget ){
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(IsOfClass (penSpawner -> m_penTarget , "Woman")){
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(((CWoman *) & * penSpawner -> m_penTarget ) -> m_bKamikazeCarrier ){m_ctEnemiesInWorld += penSpawner -> m_ctTotal ;}
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(IsDerivedFromClass (pen , "Trigger")){
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CTrigger * penTrigger = (CTrigger *) pen ;
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(penTrigger -> m_fScore > 0){
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_ctSecretsInWorld ++;
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}}
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::CheckOldFussMakers(void)
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
TIME tmNow = _pTimer -> CurrentTick ();
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
TIME tmTooOld = tmNow - 10.0f;
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CDynamicContainer < CEntity > cenOldFussMakers ;
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{FOREACHINDYNAMICCONTAINER (m_cenFussMakers , CEntity , itenFussMaker ){
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEnemyBase & enFussMaker = (CEnemyBase &) * itenFussMaker ;
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(enFussMaker . m_tmLastFussTime < tmTooOld ){
|
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
cenOldFussMakers . Add (& enFussMaker );
|
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}}
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{FOREACHINDYNAMICCONTAINER (cenOldFussMakers , CEntity , itenOldFussMaker ){
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEnemyBase & enOldFussMaker = (CEnemyBase &) * itenOldFussMaker ;
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
enOldFussMaker . RemoveFromFuss ();
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}}
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
INDEX CMusicHolder::GetFussMakersScore(void) {
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
INDEX iScore = 0;
|
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{FOREACHINDYNAMICCONTAINER (m_cenFussMakers , CEntity , itenFussMaker ){
|
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CEnemyBase & enFussMaker = (CEnemyBase &) * itenFussMaker ;
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
iScore += enFussMaker . m_iScore ;
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}}
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
return iScore ;
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::ChangeMusicChannel(enum MusicType mtType,const CTFileName & fnNewMusic,FLOAT fNewVolume)
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
INDEX & iSubChannel = (& m_iSubChannel0 ) [ mtType ];
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fnNewMusic != ""){
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
iSubChannel = (iSubChannel + 1) % 2;
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fVolume = (& m_fVolume0 ) [ mtType ];
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CSoundObject & soMusic = (& m_soMusic0a ) [ mtType * 2 + iSubChannel ];
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fCurrentVolume = (& m_fCurrentVolume0a ) [ mtType * 2 + iSubChannel ];
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ULONG ulFlags ;
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(mtType == MT_EVENT ){
|
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ulFlags = SOF_MUSIC ;
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else {
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ulFlags = SOF_MUSIC | SOF_LOOP | SOF_NONGAME ;
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
fVolume = fNewVolume ;
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fnNewMusic != ""){
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
PlaySound (soMusic , fnNewMusic , ulFlags );
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
fCurrentVolume = MUSIC_VOLUMEMIN ;
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . Pause ();
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . SetVolume (fCurrentVolume , fCurrentVolume );
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::FadeOutChannel(INDEX iChannel,INDEX iSubChannel)
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fVolume = (& m_fVolume0 ) [ iChannel ];
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CSoundObject & soMusic = (& m_soMusic0a ) [ iChannel * 2 + iSubChannel ];
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fCurrentVolume = (& m_fCurrentVolume0a ) [ iChannel * 2 + iSubChannel ];
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(! soMusic . IsPlaying ()){return ;}
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(soMusic . IsPaused ()){return ;}
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fCurrentVolume < MUSIC_VOLUMEMIN ){
|
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . Pause ();
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else {
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
fCurrentVolume *= FadeOutFactor (m_tmFade );
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . SetVolume (fCurrentVolume * fVolume , fCurrentVolume * fVolume );
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::FadeInChannel(INDEX iChannel,INDEX iSubChannel)
|
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fVolume = (& m_fVolume0 ) [ iChannel ];
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CSoundObject & soMusic = (& m_soMusic0a ) [ iChannel * 2 + iSubChannel ];
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT & fCurrentVolume = (& m_fCurrentVolume0a ) [ iChannel * 2 + iSubChannel ];
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(! soMusic . IsPlaying ()){return ;}
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(soMusic . IsPaused ()){
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . Resume ();
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fCurrentVolume < MUSIC_VOLUMEMAX ){
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
fCurrentVolume *= FadeInFactor (m_tmFade );
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
fCurrentVolume = ClampUp (fCurrentVolume , 1.0f);
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
soMusic . SetVolume (fCurrentVolume * fVolume , fCurrentVolume * fVolume );
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
void CMusicHolder::CrossFadeOneChannel(enum MusicType mtType)
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
{
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
INDEX iSubChannelActive = (& m_iSubChannel0 ) [ mtType ];
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
INDEX iSubChannelInactive = (iSubChannelActive + 1) % 2;
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(mtType == m_mtCurrentMusic ){
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FadeInChannel (mtType , iSubChannelActive );
|
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FadeOutChannel (mtType , iSubChannelInactive );
|
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else {
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FadeOutChannel (mtType , 0);
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FadeOutChannel (mtType , 1);
|
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
BOOL CMusicHolder::
|
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMusicHolder_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMusicHolder::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
InitAsEditorModel ();
|
|
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetModel (MODEL_MARKER );
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetModelMainTexture (TEXTURE_MARKER );
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetTimerAfter(_pTimer -> TickQuantum );
|
|
Jump(STATE_CURRENT, 0x00de0001, FALSE, EBegin());return TRUE;}BOOL CMusicHolder::H0x00de0001_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0001
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00de0002, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CMusicHolder::H0x00de0002_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0002
|
|
;
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (MT_LIGHT , m_fnMusic0 , m_fVolume0 );
|
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (MT_MEDIUM , m_fnMusic1 , m_fVolume1 );
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (MT_HEAVY , m_fnMusic2 , m_fVolume2 );
|
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (MT_EVENT , m_fnMusic3 , m_fVolume3 );
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (MT_CONTINUOUS , m_fnMusic4 , m_fVolume4 );
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_LIGHT ;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_fCurrentVolume0a = MUSIC_VOLUMEMAX * 0.98f;
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_tmFade = 0.01f;
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_LIGHT );
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetTimerAfter(_pTimer -> TickQuantum );
|
|
Jump(STATE_CURRENT, 0x00de0003, FALSE, EBegin());return TRUE;}BOOL CMusicHolder::H0x00de0003_Main_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0003
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00de0004, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CMusicHolder::H0x00de0004_Main_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0004
|
|
;
|
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CountEnemies ();
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
Jump(STATE_CURRENT,0x00de0007, FALSE, EInternal());return TRUE;}BOOL CMusicHolder::H0x00de0007_Main_07(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0007
|
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x00de0008, FALSE, EInternal());return TRUE;}
|
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x00de0005, FALSE, EBegin());return TRUE;}BOOL CMusicHolder::H0x00de0005_Main_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0005
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
|
|
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
UnsetTimer();Jump(STATE_CURRENT,0x00de0006, FALSE, EInternal());return TRUE;
|
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EChangeMusic):{const EChangeMusic&ecm= (EChangeMusic&)__eeInput;
|
|
|
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
ChangeMusicChannel (ecm . mtType , ecm . fnMusic , ecm . fVolume );
|
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(ecm . bForceStart ){
|
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = ecm . mtType ;
|
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
UnsetTimer();Jump(STATE_CURRENT,0x00de0006, FALSE, EInternal());return TRUE;
|
|
#line 349 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 350 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}return TRUE;}BOOL CMusicHolder::H0x00de0006_Main_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0006
|
|
|
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CheckOldFussMakers ();
|
|
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
FLOAT fFussScore = GetFussMakersScore ();
|
|
#line 356 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(m_mtCurrentMusic == MT_EVENT ){
|
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(! m_soMusic3a . IsPlaying () && ! m_soMusic3b . IsPlaying ()){
|
|
#line 360 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_LIGHT ;
|
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(m_mtCurrentMusic == MT_HEAVY ){
|
|
#line 366 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fFussScore <= 0.0f){
|
|
#line 368 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_LIGHT ;
|
|
#line 369 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 371 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(m_mtCurrentMusic == MT_MEDIUM ){
|
|
#line 373 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fFussScore <= 0.0f){
|
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_LIGHT ;
|
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(fFussScore >= m_fScoreHeavy ){
|
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_HEAVY ;
|
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(m_mtCurrentMusic == MT_LIGHT ){
|
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(fFussScore >= m_fScoreHeavy ){
|
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_HEAVY ;
|
|
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(fFussScore >= m_fScoreMedium ){
|
|
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_mtCurrentMusic = MT_MEDIUM ;
|
|
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
if(m_mtCurrentMusic == MT_LIGHT ){
|
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_tmFade = 2.0f;
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(m_mtCurrentMusic == MT_MEDIUM ){
|
|
#line 398 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_tmFade = 1.0f;
|
|
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(m_mtCurrentMusic == MT_HEAVY ){
|
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_tmFade = 1.0f;
|
|
#line 401 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}else if(m_mtCurrentMusic == MT_EVENT || m_mtCurrentMusic == MT_CONTINUOUS ){
|
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
m_tmFade = 0.5f;
|
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}
|
|
#line 406 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_LIGHT );
|
|
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_MEDIUM );
|
|
#line 408 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_HEAVY );
|
|
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_EVENT );
|
|
#line 410 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
CrossFadeOneChannel (MT_CONTINUOUS );Jump(STATE_CURRENT,0x00de0007, FALSE, EInternal());return TRUE;
|
|
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
}BOOL CMusicHolder::H0x00de0008_Main_08(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00de0008
|
|
|
|
#line 412 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 412 "D:/SE1_GPL/Sources/EntitiesMP/MusicHolder.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;}; |