Serious-Engine/Sources/EntitiesMP/MusicChanger.cpp
2016-03-11 15:57:17 +02:00

99 lines
4.2 KiB
C++

/*
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
*/
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
#include "StdH.h"
#include <EntitiesMP/MusicChanger.h>
#include <EntitiesMP/MusicChanger_tables.h>
#line 10 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
void CMusicChanger::SetDefaultProperties(void) {
m_strName = "";
m_strDescription = "";
m_fnMusic = CTFILENAME("");
m_fVolume = 1.0f;
m_mtType = MT_EVENT ;
m_bForceStart = TRUE ;
CRationalEntity::SetDefaultProperties();
}
BOOL CMusicChanger::
#line 33 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
Main(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CMusicChanger_Main
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMusicChanger::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
InitAsEditorModel ();
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
#line 38 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetCollisionFlags (ECF_IMMATERIAL );
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetModel (MODEL_MARKER );
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetModelMainTexture (TEXTURE_MARKER );
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
m_strDescription . PrintF ("%s: %s (%g)" ,
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
MusicType_enum . NameForValue ((INDEX) m_mtType ) ,
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
(CTString &) m_fnMusic . FileName () ,
#line 47 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
m_fVolume );
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetTimerAfter(0.1f);
Jump(STATE_CURRENT, 0x00e10000, FALSE, EBegin());return TRUE;}BOOL CMusicChanger::H0x00e10000_Main_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x00e10000
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00e10001, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CMusicChanger::H0x00e10001_Main_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x00e10001
;
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
SetTimerAt(THINKTIME_NEVER);
Jump(STATE_CURRENT, 0x00e10002, FALSE, EBegin());return TRUE;}BOOL CMusicChanger::H0x00e10002_Main_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x00e10002
switch(__eeInput.ee_slEvent){case(EVENTCODE_ETrigger):{const ETrigger&e= (ETrigger&)__eeInput;
#line 57 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
CEntity * penMusicHolder = _pNetwork -> GetEntityWithName ("MusicHolder" , 0);
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
if(penMusicHolder == NULL ){
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
CPrintF ("No MusicHolder on this level, cannot change music!\n");
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
}else {
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
EChangeMusic ecm ;
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
ecm . fnMusic = m_fnMusic ;
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
ecm . fVolume = m_fVolume ;
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
ecm . mtType = m_mtType ;
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
ecm . bForceStart = m_bForceStart ;
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
penMusicHolder -> SendEvent (ecm );
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
}
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
return TRUE;
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
}ASSERT(FALSE);break;default: return FALSE; break;
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
}return TRUE;}BOOL CMusicChanger::H0x00e10003_Main_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x00e10003
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
Return(STATE_CURRENT,EVoid());
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/MusicChanger.es"
return TRUE; ASSERT(FALSE); return TRUE;};