diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index ecaf87d0..6fbf70bd 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -133,8 +133,11 @@ BOOL IsleApp::SetupLegoOmni() GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath)); #ifdef COMPAT_MODE - MxOmniCreateParam param(mediaPath, (struct HWND__*) m_windowHandle, m_videoParam, MxOmniCreateFlags()); - BOOL failure = Lego()->Create(param) == FAILURE; + BOOL failure; + { + MxOmniCreateParam param(mediaPath, (struct HWND__ *) m_windowHandle, m_videoParam, MxOmniCreateFlags()); + failure = Lego()->Create(param) == FAILURE; + } #else BOOL failure = Lego()->Create(MxOmniCreateParam(mediaPath, (struct HWND__*) m_windowHandle, m_videoParam, MxOmniCreateFlags()) diff --git a/LEGO1/mxatomid.cpp b/LEGO1/mxatomid.cpp index 75d85b36..ae57c820 100644 --- a/LEGO1/mxatomid.cpp +++ b/LEGO1/mxatomid.cpp @@ -35,8 +35,11 @@ void MxAtomId::Destroy() return; #ifdef COMPAT_MODE - MxAtomIdCounter id_counter(m_internal); - MxAtomIdCounterSet::iterator it = AtomIdCounterSet()->find(&id_counter); + MxAtomIdCounterSet::iterator it; + { + MxAtomIdCounter id_counter(m_internal); + it = AtomIdCounterSet()->find(&id_counter); + } #else MxAtomIdCounterSet::iterator it = AtomIdCounterSet()->find(&MxAtomIdCounter(m_internal)); #endif diff --git a/LEGO1/mxcompositepresenter.cpp b/LEGO1/mxcompositepresenter.cpp index e4add9bc..d22c979d 100644 --- a/LEGO1/mxcompositepresenter.cpp +++ b/LEGO1/mxcompositepresenter.cpp @@ -98,8 +98,10 @@ void MxCompositePresenter::EndAction() if (action && action->GetOrigin()) { #ifdef COMPAT_MODE - MxEndActionNotificationParam param(c_notificationEndAction, this, action, FALSE); - NotificationManager()->Send(action->GetOrigin(), ¶m); + { + MxEndActionNotificationParam param(c_notificationEndAction, this, action, FALSE); + NotificationManager()->Send(action->GetOrigin(), ¶m); + } #else NotificationManager()->Send( action->GetOrigin(), diff --git a/LEGO1/mxdiskstreamcontroller.cpp b/LEGO1/mxdiskstreamcontroller.cpp index ee27557f..c0708acc 100644 --- a/LEGO1/mxdiskstreamcontroller.cpp +++ b/LEGO1/mxdiskstreamcontroller.cpp @@ -25,8 +25,10 @@ MxDiskStreamController::~MxDiskStreamController() if (m_provider) { #ifdef COMPAT_MODE - MxDSAction action; - m_provider->VTable0x20(&action); + { + MxDSAction action; + m_provider->VTable0x20(&action); + } #else m_provider->VTable0x20(&MxDSAction()); #endif @@ -306,8 +308,10 @@ MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action) if (m_unk0x54.Find(p_action, FALSE) == NULL) { if (VTable0x30(p_action) == SUCCESS) { #ifdef COMPAT_MODE - MxEndActionNotificationParam param(c_notificationEndAction, NULL, p_action, TRUE); - MxOmni::GetInstance()->NotifyCurrentEntity(¶m); + { + MxEndActionNotificationParam param(c_notificationEndAction, NULL, p_action, TRUE); + MxOmni::GetInstance()->NotifyCurrentEntity(¶m); + } #else MxOmni::GetInstance()->NotifyCurrentEntity( &MxEndActionNotificationParam(c_notificationEndAction, NULL, p_action, TRUE) diff --git a/LEGO1/mxmediapresenter.cpp b/LEGO1/mxmediapresenter.cpp index 1798bb60..eb05a9d4 100644 --- a/LEGO1/mxmediapresenter.cpp +++ b/LEGO1/mxmediapresenter.cpp @@ -161,8 +161,10 @@ void MxMediaPresenter::EndAction() if (action && action->GetOrigin()) { #ifdef COMPAT_MODE - MxEndActionNotificationParam param(c_notificationEndAction, this, action, FALSE); - NotificationManager()->Send(action->GetOrigin(), ¶m); + { + MxEndActionNotificationParam param(c_notificationEndAction, this, action, FALSE); + NotificationManager()->Send(action->GetOrigin(), ¶m); + } #else NotificationManager()->Send( action->GetOrigin(), diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 8e3b1f3f..377ba481 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -346,8 +346,10 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p if (object->StartAction(p_controller, &p_action) == SUCCESS) { if (sender) { #ifdef COMPAT_MODE - MxType4NotificationParam param(this, &p_action, object); - NotificationManager()->Send(sender, ¶m); + { + MxType4NotificationParam param(this, &p_action, object); + NotificationManager()->Send(sender, ¶m); + } #else NotificationManager()->Send(sender, &MxType4NotificationParam(this, &p_action, object)); #endif @@ -355,8 +357,10 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p if (p_action.GetUnknown84()) { #ifdef COMPAT_MODE - MxStartActionNotificationParam param(c_notificationStartAction, object, &p_action, FALSE); - NotificationManager()->Send(p_action.GetUnknown84(), ¶m); + { + MxStartActionNotificationParam param(c_notificationStartAction, object, &p_action, FALSE); + NotificationManager()->Send(p_action.GetUnknown84(), ¶m); + } #else NotificationManager()->Send( p_action.GetUnknown84(), diff --git a/LEGO1/mxpresenter.cpp b/LEGO1/mxpresenter.cpp index c69d978c..0640d550 100644 --- a/LEGO1/mxpresenter.cpp +++ b/LEGO1/mxpresenter.cpp @@ -148,8 +148,10 @@ void MxPresenter::EndAction() if (!this->m_compositePresenter) { #ifdef COMPAT_MODE - MxEndActionNotificationParam param(c_notificationEndAction, NULL, this->m_action, TRUE); - MxOmni::GetInstance()->NotifyCurrentEntity(¶m); + { + MxEndActionNotificationParam param(c_notificationEndAction, NULL, this->m_action, TRUE); + MxOmni::GetInstance()->NotifyCurrentEntity(¶m); + } #else MxOmni::GetInstance()->NotifyCurrentEntity( &MxEndActionNotificationParam(c_notificationEndAction, NULL, this->m_action, TRUE) @@ -201,8 +203,10 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni) MxAutoLocker lock(&m_criticalSection); #ifdef COMPAT_MODE - MxNotificationParam param(MXPRESENTER_NOTIFICATION, this); - NotificationManager()->Send(m_compositePresenter, ¶m); + { + MxNotificationParam param(MXPRESENTER_NOTIFICATION, this); + NotificationManager()->Send(m_compositePresenter, ¶m); + } #else NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this)); #endif diff --git a/LEGO1/mxstreamcontroller.cpp b/LEGO1/mxstreamcontroller.cpp index c7e5556b..4e054b98 100644 --- a/LEGO1/mxstreamcontroller.cpp +++ b/LEGO1/mxstreamcontroller.cpp @@ -56,8 +56,10 @@ MxStreamController::~MxStreamController() MxStreamProvider* provider = m_provider; m_provider = NULL; #ifdef COMPAT_MODE - MxDSAction action; - provider->VTable0x20(&action); + { + MxDSAction action; + provider->VTable0x20(&action); + } #else provider->VTable0x20(&MxDSAction()); #endif diff --git a/LEGO1/mxstreamer.cpp b/LEGO1/mxstreamer.cpp index cf9fe46b..49fb31c3 100644 --- a/LEGO1/mxstreamer.cpp +++ b/LEGO1/mxstreamer.cpp @@ -83,8 +83,10 @@ MxLong MxStreamer::Close(const char* p_name) delete c; else { #ifdef COMPAT_MODE - MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); - NotificationManager()->Send(this, ¬ification); + { + MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); + NotificationManager()->Send(this, ¬ification); + } #else NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c)); #endif @@ -193,8 +195,10 @@ MxLong MxStreamer::Notify(MxParam& p_param) delete c; else { #ifdef COMPAT_MODE - MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); - NotificationManager()->Send(this, ¬ification); + { + MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); + NotificationManager()->Send(this, ¬ification); + } #else NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c)); #endif diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index 787c4866..565908a0 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -141,8 +141,10 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld) if (world) { #ifdef COMPAT_MODE - MxNotificationParam param(MXTRANSITIONMANAGER_TRANSITIONENDED, this); - world->Notify(param); + { + MxNotificationParam param(MXTRANSITIONMANAGER_TRANSITIONENDED, this); + world->Notify(param); + } #else world->Notify(MxNotificationParam(MXTRANSITIONMANAGER_TRANSITIONENDED, this)); #endif