mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Update other enums
This commit is contained in:
parent
fb803394ac
commit
a6716535cf
@ -792,11 +792,11 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||
LegoOmni::GetInstance()->CreateBackgroundAudio();
|
||||
BackgroundAudioManager()->Enable(this->m_useMusic);
|
||||
|
||||
MxStreamController* stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", MxStreamer::e_DiskStream);
|
||||
MxStreamController* stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", MxStreamer::e_diskStream);
|
||||
MxDSAction ds;
|
||||
|
||||
if (!stream) {
|
||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_DiskStream);
|
||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_diskStream);
|
||||
if (!stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
class LegoEntity : public MxEntity {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01
|
||||
c_bit1 = 0x01
|
||||
};
|
||||
|
||||
// Inlined at 0x100853f7
|
||||
|
||||
@ -52,7 +52,7 @@ void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetE
|
||||
switch (p_actionId) {
|
||||
case Extra::ActionType::e_opendisk:
|
||||
if (!CheckIfEntityExists(TRUE, p_pAtom.GetInternal(), p_targetEntityId)) {
|
||||
Streamer()->Open(p_pAtom.GetInternal(), MxStreamer::e_DiskStream);
|
||||
Streamer()->Open(p_pAtom.GetInternal(), MxStreamer::e_diskStream);
|
||||
Start(&action);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -115,9 +115,9 @@ void MxCompositeMediaPresenter::StartingTickle()
|
||||
else {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if (!(*it)->GetAction()->GetStartTime() && ((MxMediaPresenter*) *it)->CurrentChunk() &&
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::Flag_Bit9)) {
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::c_bit9)) {
|
||||
(*it)->Tickle();
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::Flag_Bit9);
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::c_bit9);
|
||||
m_unk0x4c--;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
||||
{
|
||||
MxResult result = MxCompositePresenter::StartAction(p_controller, p_action);
|
||||
|
||||
FUN_100b7220(m_action, MxDSAction::Flag_World | MxDSAction::Flag_Looping, TRUE);
|
||||
FUN_100b7220(m_action, MxDSAction::c_world | MxDSAction::c_looping, TRUE);
|
||||
ParseExtra();
|
||||
|
||||
MxS16 i = 0;
|
||||
@ -64,7 +64,7 @@ MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
||||
|
||||
if (m_unk0x4c == 3) {
|
||||
MxDSAction* action = (*m_list.begin())->GetAction();
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::Flag_Bit11);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::c_bit11);
|
||||
}
|
||||
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
|
||||
@ -50,7 +50,7 @@ MxResult LegoEntity::Create(MxDSAction& p_dsAction)
|
||||
void LegoEntity::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (m_roi) {
|
||||
if (m_flags & Flag_Bit1) {
|
||||
if (m_flags & c_bit1) {
|
||||
if (m_roi->GetUnknown0x104() == this)
|
||||
m_roi->SetUnknown0x104(NULL);
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
|
||||
if (!VTable0x54())
|
||||
return FAILURE;
|
||||
|
||||
if (p_dsAction.GetFlags() & MxDSAction::Flag_Enabled) {
|
||||
if (p_dsAction.GetFlags() & MxDSAction::c_enabled) {
|
||||
if (GetCurrentWorld()) {
|
||||
GetCurrentWorld()->VTable0x68(0);
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
|
||||
MxCompositePresenter::VTable0x60(p_presenter);
|
||||
MxDSAction* action = p_presenter->GetAction();
|
||||
|
||||
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::Flag_Looping) == 0) {
|
||||
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::c_looping) == 0) {
|
||||
if (!action->IsA("MxDSMediaAction")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ void LegoPathPresenter::StreamingTickle()
|
||||
MxStreamChunk* chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (chunk) {
|
||||
if (chunk->GetFlags() & MxStreamChunk::Flag_End) {
|
||||
if (chunk->GetFlags() & MxStreamChunk::c_end) {
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ LegoMeterPresenter::LegoMeterPresenter()
|
||||
m_unk0x6c = 0;
|
||||
m_unk0x84 = 0;
|
||||
m_type = 1;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~c_bit2;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10043780
|
||||
|
||||
@ -462,7 +462,7 @@ MxResult LegoVideoManager::ConfigureD3DRM()
|
||||
|
||||
MxAssignedDevice* assignedDevice = m_direct3d->GetAssignedDevice();
|
||||
|
||||
if (assignedDevice && assignedDevice->GetFlags() & MxAssignedDevice::Flag_HardwareMode) {
|
||||
if (assignedDevice && assignedDevice->GetFlags() & MxAssignedDevice::c_hardwareMode) {
|
||||
if (assignedDevice->GetDesc().dpcTriCaps.dwTextureFilterCaps & D3DPTFILTERCAPS_LINEAR)
|
||||
d3drm->SetTextureQuality(D3DRMTEXTURE_LINEAR);
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ MxResult MxTransitionManager::StartTransition(
|
||||
|
||||
MxDSAction* action = m_waitIndicator->GetAction();
|
||||
action->SetLoopCount(10000);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::Flag_Bit10);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::c_bit10);
|
||||
}
|
||||
|
||||
MxU32 time = timeGetTime();
|
||||
@ -475,7 +475,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator)
|
||||
{
|
||||
// End current wait indicator
|
||||
if (m_waitIndicator != NULL) {
|
||||
m_waitIndicator->GetAction()->SetFlags(m_waitIndicator->GetAction()->GetFlags() & ~MxDSAction::Flag_World);
|
||||
m_waitIndicator->GetAction()->SetFlags(m_waitIndicator->GetAction()->GetFlags() & ~MxDSAction::c_world);
|
||||
m_waitIndicator->EndAction();
|
||||
m_waitIndicator = NULL;
|
||||
}
|
||||
@ -576,7 +576,7 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc)
|
||||
}
|
||||
|
||||
// Setup display surface
|
||||
if ((m_waitIndicator->GetAction()->GetFlags() & MxDSAction::Flag_Bit5) != 0) {
|
||||
if ((m_waitIndicator->GetAction()->GetFlags() & MxDSAction::c_bit5) != 0) {
|
||||
MxDisplaySurface* displaySurface = VideoManager()->GetDisplaySurface();
|
||||
MxBool und = FALSE;
|
||||
displaySurface->VTable0x2c(
|
||||
|
||||
@ -113,7 +113,7 @@ BOOL MxDirect3D::CreateIDirect3D()
|
||||
// FUNCTION: LEGO1 0x1009b310
|
||||
BOOL MxDirect3D::D3DSetMode()
|
||||
{
|
||||
if (m_assignedDevice->m_flags & MxAssignedDevice::Flag_HardwareMode) {
|
||||
if (m_assignedDevice->m_flags & MxAssignedDevice::c_hardwareMode) {
|
||||
if (m_bOnlySoftRender) {
|
||||
Error("Failed to place vital surfaces in video memory for hardware driver", DDERR_GENERIC);
|
||||
return FALSE;
|
||||
@ -265,7 +265,7 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri
|
||||
);
|
||||
|
||||
if (i == 0)
|
||||
assignedDevice->m_flags |= MxAssignedDevice::Flag_PrimaryDevice;
|
||||
assignedDevice->m_flags |= MxAssignedDevice::c_primaryDevice;
|
||||
|
||||
for (list<MxDevice>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
|
||||
MxDevice& device = *it2;
|
||||
@ -276,7 +276,7 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri
|
||||
|
||||
D3DDEVICEDESC* desc;
|
||||
if (device.m_HWDesc.dcmColorModel) {
|
||||
assignedDevice->m_flags |= MxAssignedDevice::Flag_HardwareMode;
|
||||
assignedDevice->m_flags |= MxAssignedDevice::c_hardwareMode;
|
||||
desc = &device.m_HWDesc;
|
||||
}
|
||||
else
|
||||
|
||||
@ -13,8 +13,8 @@ class MxDirect3D;
|
||||
class MxAssignedDevice {
|
||||
public:
|
||||
enum {
|
||||
Flag_HardwareMode = 0x01,
|
||||
Flag_PrimaryDevice = 0x02
|
||||
c_hardwareMode = 0x01,
|
||||
c_primaryDevice = 0x02
|
||||
};
|
||||
|
||||
MxAssignedDevice();
|
||||
|
||||
@ -12,16 +12,16 @@ class MxOmni;
|
||||
class MxDSAction : public MxDSObject {
|
||||
public:
|
||||
enum {
|
||||
Flag_Looping = 0x01,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
Flag_Enabled = 0x20,
|
||||
Flag_Bit7 = 0x40,
|
||||
Flag_World = 0x80,
|
||||
Flag_Bit9 = 0x100,
|
||||
Flag_Bit10 = 0x200,
|
||||
Flag_Bit11 = 0x400,
|
||||
c_looping = 0x01,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
c_enabled = 0x20,
|
||||
c_bit7 = 0x40,
|
||||
c_world = 0x80,
|
||||
c_bit9 = 0x100,
|
||||
c_bit10 = 0x200,
|
||||
c_bit11 = 0x400,
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxDSAction();
|
||||
@ -72,15 +72,15 @@ class MxDSAction : public MxDSObject {
|
||||
inline MxCore* GetOrigin() { return m_origin; }
|
||||
inline void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
|
||||
|
||||
inline MxBool IsLooping() const { return m_flags & Flag_Looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & Flag_Bit3; }
|
||||
inline MxBool IsLooping() const { return m_flags & c_looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & c_bit3; }
|
||||
|
||||
inline void CopyFlags(MxU32 p_flags)
|
||||
{
|
||||
if (p_flags & MxDSAction::Flag_Looping)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Looping);
|
||||
else if (p_flags & MxDSAction::Flag_Bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Bit3);
|
||||
if (p_flags & MxDSAction::c_looping)
|
||||
SetFlags(GetFlags() | MxDSAction::c_looping);
|
||||
else if (p_flags & MxDSAction::c_bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::c_bit3);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@ -10,11 +10,11 @@
|
||||
class MxDSChunk : public MxCore {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_End = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Split = 0x10,
|
||||
Flag_Bit16 = 0x8000
|
||||
c_bit1 = 0x01,
|
||||
c_end = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_split = 0x10,
|
||||
c_bit16 = 0x8000
|
||||
};
|
||||
|
||||
MxDSChunk();
|
||||
|
||||
@ -71,7 +71,7 @@ class MxStreamerNotification : public MxNotificationParam {
|
||||
class MxStreamer : public MxCore {
|
||||
public:
|
||||
enum OpenMode {
|
||||
e_DiskStream,
|
||||
e_diskStream = 0,
|
||||
e_RAMStream
|
||||
};
|
||||
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
class MxVideoPresenter : public MxMediaPresenter {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_Bit2 = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
};
|
||||
|
||||
MxVideoPresenter() { Init(); }
|
||||
|
||||
@ -15,7 +15,7 @@ MxU16 g_sep = TWOCC(',', ' ');
|
||||
// FUNCTION: LEGO1 0x100ad810
|
||||
MxDSAction::MxDSAction()
|
||||
{
|
||||
this->m_flags = MxDSAction::Flag_Enabled;
|
||||
this->m_flags = MxDSAction::c_enabled;
|
||||
this->m_startTime = INT_MIN;
|
||||
this->m_extraData = NULL;
|
||||
this->m_extraLength = 0;
|
||||
|
||||
@ -86,7 +86,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
||||
}
|
||||
|
||||
if (dwStatus != DSBSTATUS_BUFFERLOST) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_writtenChunks++;
|
||||
m_lockSize = p_length;
|
||||
}
|
||||
@ -99,7 +99,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
||||
DS_OK) {
|
||||
memcpy(pvAudioPtr1, p_audioPtr, p_length);
|
||||
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
memset((MxU8*) pvAudioPtr1 + p_length, m_silenceData, m_lockSize - p_length);
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ void MxWavePresenter::StartingTickle()
|
||||
else
|
||||
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping)
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping)
|
||||
desc.dwBufferBytes = m_waveFormat->m_waveFormatEx.nAvgBytesPerSec *
|
||||
(m_action->GetDuration() / m_action->GetLoopCount()) / 1000;
|
||||
else
|
||||
@ -178,11 +178,11 @@ void MxWavePresenter::StartingTickle()
|
||||
void MxWavePresenter::StreamingTickle()
|
||||
{
|
||||
if (!m_currentChunk) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_End && !(chunk->GetFlags() & MxDSChunk::Flag_Bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::Flag_Bit16);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_end && !(chunk->GetFlags() & MxDSChunk::c_bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::c_bit16);
|
||||
|
||||
m_currentChunk = new MxStreamChunk;
|
||||
MxU8* data = new MxU8[m_chunkLength];
|
||||
@ -192,7 +192,7 @@ void MxWavePresenter::StreamingTickle()
|
||||
m_currentChunk->SetLength(m_chunkLength);
|
||||
m_currentChunk->SetData(data);
|
||||
m_currentChunk->SetTime(chunk->GetTime() + 1000);
|
||||
m_currentChunk->SetFlags(MxDSChunk::Flag_Bit1);
|
||||
m_currentChunk->SetFlags(MxDSChunk::c_bit1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ void MxWavePresenter::DoneTickle()
|
||||
m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor);
|
||||
|
||||
MxS8 playedChunks = dwCurrentPlayCursor / m_chunkLength;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit7 || m_action->GetFlags() & MxDSAction::Flag_Looping ||
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit7 || m_action->GetFlags() & MxDSAction::c_looping ||
|
||||
m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor)
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
||||
if (m_subscriber) {
|
||||
chunk = m_subscriber->CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
@ -80,8 +80,8 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
|
||||
if (m_subscriber) {
|
||||
chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
ProgressTickleState(e_done);
|
||||
@ -98,7 +98,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (MxPresenter::StartAction(p_controller, p_action) == SUCCESS) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_loopingChunks = new MxStreamChunkList;
|
||||
m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks);
|
||||
|
||||
@ -131,8 +131,7 @@ void MxMediaPresenter::EndAction()
|
||||
|
||||
m_currentChunk = NULL;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_World &&
|
||||
(!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_world && (!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
MxPresenter::Enable(FALSE);
|
||||
SetTickleState(e_idle);
|
||||
}
|
||||
@ -178,12 +177,12 @@ void MxMediaPresenter::StreamingTickle()
|
||||
m_currentChunk = NextChunk();
|
||||
|
||||
if (m_currentChunk) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
else if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
LoopChunk(m_currentChunk);
|
||||
|
||||
if (!IsEnabled()) {
|
||||
|
||||
@ -96,7 +96,7 @@ void MxPresenter::ParseExtra()
|
||||
MxS32 val = token ? atoi(token) : 0;
|
||||
MxEntity* result = MxOmni::GetInstance()->FindWorld(buf, val, this);
|
||||
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_World);
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_world);
|
||||
|
||||
if (result)
|
||||
SendToCompositePresenter(MxOmni::GetInstance());
|
||||
@ -171,9 +171,9 @@ void MxPresenter::Enable(MxBool p_enable)
|
||||
MxU32 flags = this->m_action->GetFlags();
|
||||
|
||||
if (p_enable)
|
||||
this->m_action->SetFlags(flags | MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags | MxDSAction::c_enabled);
|
||||
else
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::c_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,5 +252,5 @@ MxEntity* MxPresenter::CreateEntity(const char* p_name)
|
||||
// FUNCTION: LEGO1 0x100b54c0
|
||||
MxBool MxPresenter::IsEnabled()
|
||||
{
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::Flag_Enabled;
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::c_enabled;
|
||||
}
|
||||
|
||||
@ -291,14 +291,14 @@ MxResult MxDSBuffer::ParseChunk(
|
||||
{
|
||||
MxResult result = SUCCESS;
|
||||
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
delete p_header;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
p_header->SetTime(p_header->GetTime() + m_unk0x30->GetUnknowna8());
|
||||
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_Split) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_split) {
|
||||
MxU32 length = p_header->GetLength() + MxDSChunk::GetHeaderSize() + 8;
|
||||
MxDSBuffer* buffer = new MxDSBuffer();
|
||||
|
||||
@ -308,7 +308,7 @@ MxResult MxDSBuffer::ParseChunk(
|
||||
|
||||
if (*p_streamingAction) {
|
||||
MxU16* flags = MxStreamChunk::IntoFlags(buffer->GetBuffer());
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::Flag_Split;
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::c_split;
|
||||
|
||||
delete p_header;
|
||||
(*p_streamingAction)->SetUnknowna0(buffer);
|
||||
@ -323,9 +323,9 @@ MxResult MxDSBuffer::ParseChunk(
|
||||
return FAILURE;
|
||||
}
|
||||
else {
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_end) {
|
||||
if (m_unk0x30->HasId(p_header->GetObjectId())) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 &&
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 &&
|
||||
(m_unk0x30->GetLoopCount() > 1 || m_unk0x30->GetDuration() == -1)) {
|
||||
|
||||
if (p_action->GetObjectId() == p_header->GetObjectId()) {
|
||||
|
||||
@ -15,7 +15,7 @@ MxDSChunk::MxDSChunk()
|
||||
// FUNCTION: LEGO1 0x100be170
|
||||
MxDSChunk::~MxDSChunk()
|
||||
{
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
delete[] m_data;
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk)
|
||||
if (p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::Flag_Bit1 && p_chunk)
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::c_bit1 && p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,22 +124,22 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
||||
data += MxDSChunk::Size(*psize);
|
||||
|
||||
if ((*MxDSChunk::IntoType(data2) == FOURCC('M', 'x', 'C', 'h')) &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_Split)) {
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_split)) {
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == *MxStreamChunk::IntoObjectId(data3) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::Flag_Split) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::c_split) &&
|
||||
*MxStreamChunk::IntoTime(data2) == *MxStreamChunk::IntoTime(data3)) {
|
||||
MxDSBuffer::Append(data2, data3);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
}
|
||||
|
||||
data2 += MxDSChunk::Size(*MxDSChunk::IntoLength(data2));
|
||||
memcpy(data2, data3, MxDSChunk::Size(*psize));
|
||||
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == id &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_End))
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_end))
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -151,6 +151,6 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
||||
} while (data < end);
|
||||
}
|
||||
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
return MxDSChunk::End(data2) - p_buffer;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ MxResult MxStreamChunk::SendChunk(MxStreamListMxDSSubscriber& p_subscriberList,
|
||||
{
|
||||
for (MxStreamListMxDSSubscriber::iterator it = p_subscriberList.begin(); it != p_subscriberList.end(); it++) {
|
||||
if ((*it)->GetObjectId() == m_objectId && (*it)->GetUnknown48() == p_obj24val) {
|
||||
if (m_flags & MxDSChunk::Flag_End && m_buffer) {
|
||||
if (m_flags & MxDSChunk::c_end && m_buffer) {
|
||||
m_buffer->ReleaseRef(this);
|
||||
m_buffer = NULL;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action)
|
||||
if (!chunk)
|
||||
return FAILURE;
|
||||
|
||||
chunk->SetFlags(MxDSChunk::Flag_Bit3);
|
||||
chunk->SetFlags(MxDSChunk::c_bit3);
|
||||
chunk->SetObjectId(objectId);
|
||||
|
||||
if (chunk->SendChunk(m_subscriberList, FALSE, p_action->GetUnknown24()) != SUCCESS)
|
||||
|
||||
@ -50,7 +50,7 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType)
|
||||
|
||||
if (!GetOpenStream(p_name)) {
|
||||
switch (p_lookupType) {
|
||||
case e_DiskStream:
|
||||
case e_diskStream:
|
||||
stream = new MxDiskStreamController();
|
||||
break;
|
||||
case e_RAMStream:
|
||||
|
||||
@ -12,8 +12,8 @@ DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68);
|
||||
MxFlcPresenter::MxFlcPresenter()
|
||||
{
|
||||
this->m_flicHeader = NULL;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3420
|
||||
|
||||
@ -20,8 +20,8 @@ MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
|
||||
void MxLoopingFlcPresenter::Init()
|
||||
{
|
||||
this->m_unk0x68 = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4430
|
||||
@ -40,7 +40,7 @@ void MxLoopingFlcPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
|
||||
@ -21,8 +21,8 @@ MxLoopingSmkPresenter::~MxLoopingSmkPresenter()
|
||||
void MxLoopingSmkPresenter::Init()
|
||||
{
|
||||
this->m_elapsedDuration = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b49d0
|
||||
@ -51,7 +51,7 @@ void MxLoopingSmkPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
|
||||
@ -23,8 +23,8 @@ void MxSmkPresenter::Init()
|
||||
{
|
||||
m_currentFrame = 0;
|
||||
memset(&m_mxSmack, 0, sizeof(m_mxSmack));
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3900
|
||||
|
||||
@ -74,13 +74,13 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
MxRect32 rect(x, y, width + x, height + y);
|
||||
MVideoManager()->InvalidateRect(rect);
|
||||
|
||||
if (m_flags & Flag_Bit2) {
|
||||
if (m_flags & c_bit2) {
|
||||
undefined4 und = 0;
|
||||
m_unk0x58 = MxOmni::GetInstance()->GetVideoManager()->GetDisplaySurface()->VTable0x44(
|
||||
m_bitmap,
|
||||
&und,
|
||||
(m_flags & Flag_Bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::Flag_Bit4
|
||||
(m_flags & c_bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::c_bit4
|
||||
);
|
||||
|
||||
delete m_alpha;
|
||||
@ -90,9 +90,9 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
m_bitmap = NULL;
|
||||
|
||||
if (m_unk0x58 && und)
|
||||
m_flags |= Flag_Bit3;
|
||||
m_flags |= c_bit3;
|
||||
else
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,8 +184,8 @@ void MxStillPresenter::ParseExtra()
|
||||
{
|
||||
MxPresenter::ParseExtra();
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5)
|
||||
m_flags |= Flag_Bit4;
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5)
|
||||
m_flags |= c_bit4;
|
||||
|
||||
MxU32 len = m_action->GetExtraLength();
|
||||
|
||||
@ -206,9 +206,9 @@ void MxStillPresenter::ParseExtra()
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(output, g_strBmpIsmap, buf)) {
|
||||
m_flags |= Flag_Bit5;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit5;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -117,16 +117,16 @@ void MxVideoPresenter::Init()
|
||||
m_unk0x5c = 1;
|
||||
m_unk0x58 = NULL;
|
||||
m_unk0x60 = -1;
|
||||
m_flags &= ~Flag_Bit1;
|
||||
m_flags &= ~c_bit1;
|
||||
|
||||
if (MVideoManager() != NULL) {
|
||||
MVideoManager();
|
||||
m_flags |= Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
m_flags &= ~Flag_Bit4;
|
||||
m_flags &= ~Flag_Bit5;
|
||||
m_flags &= ~c_bit4;
|
||||
m_flags &= ~c_bit5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b27b0
|
||||
@ -138,8 +138,8 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor)
|
||||
if (m_unk0x58) {
|
||||
m_unk0x58->Release();
|
||||
m_unk0x58 = NULL;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
if (MVideoManager() && (m_alpha || m_bitmap)) {
|
||||
@ -168,7 +168,7 @@ void MxVideoPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
@ -182,7 +182,7 @@ void MxVideoPresenter::NextFrame()
|
||||
MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
MxDSAction* action = GetAction();
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::Flag_Bit11) == 0) && !IsEnabled()) ||
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::c_bit11) == 0) && !IsEnabled()) ||
|
||||
(!m_bitmap && !m_alpha))
|
||||
return FALSE;
|
||||
|
||||
@ -234,7 +234,7 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
if (m_flags & 0x10)
|
||||
return (MxBool) *pixel;
|
||||
|
||||
if ((GetAction()->GetFlags() & MxDSAction::Flag_Bit4) && *pixel == 0)
|
||||
if ((GetAction()->GetFlags() & MxDSAction::c_bit4) && *pixel == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -284,7 +284,7 @@ void MxVideoPresenter::PutFrame()
|
||||
LPDIRECTDRAWSURFACE ddSurface = displaySurface->GetDirectDrawSurface2();
|
||||
|
||||
MxRect32 rectSrc, rectDest;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5) {
|
||||
if (m_unk0x58) {
|
||||
// TODO: Match
|
||||
rectSrc.SetPoint(MxPoint32(0, 0));
|
||||
@ -340,7 +340,7 @@ void MxVideoPresenter::PutFrame()
|
||||
rectDest.SetBottom(rectDest.GetTop() + regionRect->GetHeight());
|
||||
}
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit4) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit4) {
|
||||
if (m_unk0x58) {
|
||||
if (PrepareRects(rectDest, rectSrc) >= 0)
|
||||
ddSurface->Blt((LPRECT) &rectDest, m_unk0x58, (LPRECT) &rectSrc, DDBLT_KEYSRC, NULL);
|
||||
@ -405,7 +405,7 @@ void MxVideoPresenter::StartingTickle()
|
||||
// FUNCTION: LEGO1 0x100b2fe0
|
||||
void MxVideoPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::StreamingTickle();
|
||||
|
||||
@ -429,13 +429,13 @@ void MxVideoPresenter::StreamingTickle()
|
||||
LoadFrame(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != e_streaming)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
@ -444,7 +444,7 @@ void MxVideoPresenter::StreamingTickle()
|
||||
void MxVideoPresenter::RepeatingTickle()
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::RepeatingTickle();
|
||||
|
||||
@ -467,13 +467,13 @@ void MxVideoPresenter::RepeatingTickle()
|
||||
|
||||
LoadFrame(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ OrientableROI::OrientableROI()
|
||||
IDENTMAT4(m_local2world);
|
||||
|
||||
m_unk0xd4 = 0;
|
||||
m_unk0xd8 |= Flag_Bit1 | Flag_Bit2;
|
||||
m_unk0xd8 |= c_bit1 | c_bit2;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5910
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
class OrientableROI : public ROI {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_Bit2 = 0x02
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02
|
||||
};
|
||||
|
||||
OrientableROI();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user