mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
230 lines
12 KiB
C++
230 lines
12 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
|
|
#include "StdH.h"
|
|
#include "ModelsMP/CutSequences/Book/Book.h"
|
|
#include "ModelsMP/CutSequences/Book/CoverPages.h"
|
|
|
|
#include <EntitiesMP/PhotoAlbum.h>
|
|
#include <EntitiesMP/PhotoAlbum_tables.h>
|
|
void CPhotoAlbum::SetDefaultProperties(void) {
|
|
m_fStretch = 1.0f;
|
|
m_strName = "Photo album";
|
|
m_iCurrentPage = -1;
|
|
m_tmPageWait = 0.5f;
|
|
m_soPage.SetOwner(this);
|
|
m_soPage.Stop_internal();
|
|
CMovableModelEntity::SetDefaultProperties();
|
|
}
|
|
|
|
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
void CPhotoAlbum::Precache(void) {
|
|
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE01 );
|
|
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE02 );
|
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE03 );
|
|
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE04 );
|
|
#line 47 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE_JOKE );
|
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE05 );
|
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE06 );
|
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_PAGE07 );
|
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheTexture (TEXTURE_BLANK_PAGE );
|
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PrecacheSound (SOUND_PAGE );
|
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}
|
|
BOOL CPhotoAlbum::
|
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
OpenBook(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CPhotoAlbum_OpenBook
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPhotoAlbum::OpenBook expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
GetModelObject () -> PlayAnim (BOOK_ANIM_OPENING , 0);
|
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject & mo1 = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE01 ) -> amo_moModelObject ;
|
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
mo1 . PlayAnim (COVERPAGES_ANIM_OPENING , 0);
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject & mo2 = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE02 ) -> amo_moModelObject ;
|
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
mo2 . PlayAnim (COVERPAGES_ANIM_RIGHTOPENING , 0);
|
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
m_soPage . Set3DParameters (1000.0f , 500.0f , 2.0f , 1.0f);
|
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PlaySound (m_soPage , SOUND_PAGE , SOF_3D );
|
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAfter(GetModelObject () -> GetAnimLength (BOOK_ANIM_OPENING ));
|
|
Jump(STATE_CURRENT, 0x02660001, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x02660001_OpenBook_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660001
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02660002, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPhotoAlbum::H0x02660002_OpenBook_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660002
|
|
;
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x02660003, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x02660003_OpenBook_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660003
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02660004, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPhotoAlbum::H0x02660004_OpenBook_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660004
|
|
;
|
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
m_iCurrentPage = TEXTURE_PAGE01 ;
|
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
Jump(STATE_CURRENT,0x0266000b, FALSE, EInternal());return TRUE;}BOOL CPhotoAlbum::H0x0266000b_OpenBook_11(const CEntityEvent &__eeInput)
|
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
{
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0266000b
|
|
if(!(m_iCurrentPage < TEXTURE_PAGE07 )){ Jump(STATE_CURRENT,0x0266000c, FALSE, EInternal());return TRUE;}
|
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAfter(m_tmPageWait );
|
|
Jump(STATE_CURRENT, 0x02660005, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x02660005_OpenBook_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660005
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02660006, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPhotoAlbum::H0x02660006_OpenBook_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660006
|
|
;
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
AddAttachment (BOOK_ATTACHMENT_PAGE03 , MODEL_PAGE , m_iCurrentPage );
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject & mo3 = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE03 ) -> amo_moModelObject ;
|
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
mo3 . PlayAnim (COVERPAGES_ANIM_OPENING , 0);
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
PlaySound (m_soPage , SOUND_PAGE , SOF_3D );
|
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject & mo2 = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE02 ) -> amo_moModelObject ;
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
mo2 . SetTextureData (GetTextureDataForComponent (m_iCurrentPage + 1));
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAfter(1.0f);
|
|
Jump(STATE_CURRENT, 0x02660007, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x02660007_OpenBook_07(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660007
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02660008, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPhotoAlbum::H0x02660008_OpenBook_08(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660008
|
|
;
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject & mo3 = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE03 ) -> amo_moModelObject ;
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
mo3 . SetTextureData (GetTextureDataForComponent (TEXTURE_BLANK_PAGE ));
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAfter(mo3 . GetAnimLength (COVERPAGES_ANIM_OPENING ) - 1.0f);
|
|
Jump(STATE_CURRENT, 0x02660009, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x02660009_OpenBook_09(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x02660009
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0266000a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPhotoAlbum::H0x0266000a_OpenBook_10(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0266000a
|
|
;
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
RemoveAttachment (BOOK_ATTACHMENT_PAGE03 );
|
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
m_iCurrentPage += 1;Jump(STATE_CURRENT,0x0266000b, FALSE, EInternal());return TRUE;
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}BOOL CPhotoAlbum::H0x0266000c_OpenBook_12(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0266000c
|
|
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPhotoAlbum::
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CPhotoAlbum_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPhotoAlbum::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
InitAsModel ();
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetModel (MODEL_ALBUM );
|
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetModelMainTexture (TEXTURE_ALBUM );
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
GetModelObject () -> StartAnim (BOOK_ANIM_CLOSED );
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
AddAttachment (BOOK_ATTACHMENT_PAGE01 , MODEL_PAGE , TEXTURE_BLANK_PAGE );
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
AddAttachment (BOOK_ATTACHMENT_PAGE02 , MODEL_PAGE , TEXTURE_PAGE01 );
|
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CAttachmentModelObject * pamo ;
|
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pamo = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE01 );
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
CModelObject * pmo ;
|
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pmo = & pamo -> amo_moModelObject ;
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pmo -> PlayAnim (COVERPAGES_ANIM_LEFTCLOSED , 0);
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pamo = GetModelObject () -> GetAttachmentModel (BOOK_ATTACHMENT_PAGE02 );
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pmo = & pamo -> amo_moModelObject ;
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
pmo -> PlayAnim (COVERPAGES_ANIM_RIGHTCLOSED , 0);
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
ModelChangeNotify ();
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x0266000d, FALSE, EBegin());return TRUE;}BOOL CPhotoAlbum::H0x0266000d_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0266000d
|
|
switch(__eeInput.ee_slEvent)
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
return TRUE;
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&e= (EStart&)__eeInput;
|
|
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
Call(STATE_CURRENT, STATE_CPhotoAlbum_OpenBook, TRUE, EVoid());return TRUE;
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
return TRUE;
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EReturn):{const EReturn&e= (EReturn&)__eeInput;
|
|
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
return TRUE;
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/PhotoAlbum.es"
|
|
}return TRUE;}BOOL CPhotoAlbum::H0x0266000e_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0266000e
|
|
; ASSERT(FALSE); return TRUE;}; |