mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Rename inline getters. malloc/free -> new/delete
This commit is contained in:
parent
2c04af3c77
commit
41828183ed
@ -70,8 +70,8 @@ class MxPresenter : public MxCore
|
||||
|
||||
inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; }
|
||||
inline MxPoint32 GetLocation() const { return this->m_location; }
|
||||
inline MxS32 GetDisplayX() const { return this->m_location.m_x; }
|
||||
inline MxS32 GetDisplayY() const { return this->m_location.m_y; }
|
||||
inline MxS32 GetLocationX() const { return this->m_location.m_x; }
|
||||
inline MxS32 GetLocationY() const { return this->m_location.m_y; }
|
||||
inline MxS32 GetDisplayZ() const { return this->m_displayZ; }
|
||||
inline MxDSAction *GetAction() const { return this->m_action; }
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ MxTransitionManager::MxTransitionManager()
|
||||
// OFFSET: LEGO1 0x1004ba00
|
||||
MxTransitionManager::~MxTransitionManager()
|
||||
{
|
||||
free(m_copyBuffer);
|
||||
delete[] m_copyBuffer;
|
||||
|
||||
if (m_waitIndicator != NULL) {
|
||||
delete m_waitIndicator->GetAction();
|
||||
@ -337,7 +337,7 @@ void MxTransitionManager::SubmitCopyRect(LPDDSURFACEDESC ddsc)
|
||||
}
|
||||
|
||||
// Free the copy buffer
|
||||
free(m_copyBuffer);
|
||||
delete[] m_copyBuffer;
|
||||
m_copyBuffer = NULL;
|
||||
}
|
||||
|
||||
@ -358,8 +358,8 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc)
|
||||
DWORD copyPitch = (ddsc->ddpfPixelFormat.dwRGBBitCount / 8) * (m_copyRect.right - m_copyRect.left + 1); // This uses m_copyRect, seemingly erroneously
|
||||
DWORD bytesPerPixel = ddsc->ddpfPixelFormat.dwRGBBitCount / 8;
|
||||
|
||||
m_copyRect.left = m_waitIndicator->GetDisplayX();
|
||||
m_copyRect.top = m_waitIndicator->GetDisplayY();
|
||||
m_copyRect.left = m_waitIndicator->GetLocationX();
|
||||
m_copyRect.top = m_waitIndicator->GetLocationY();
|
||||
|
||||
MxS32 height = m_waitIndicator->GetHeight();
|
||||
MxS32 width = m_waitIndicator->GetWidth();
|
||||
@ -370,7 +370,7 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc)
|
||||
// Allocate the copy buffer
|
||||
const char *src = (const char*)ddsc->lpSurface + m_copyRect.top * ddsc->lPitch + bytesPerPixel * m_copyRect.left;
|
||||
|
||||
m_copyBuffer = malloc(bytesPerPixel * width * height);
|
||||
m_copyBuffer = new char[bytesPerPixel * width * height];
|
||||
if (!m_copyBuffer)
|
||||
return;
|
||||
|
||||
@ -390,11 +390,11 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc)
|
||||
{
|
||||
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
||||
MxBool unkbool = FALSE;
|
||||
displaySurface->vtable2c(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetDisplayX(), m_waitIndicator->GetDisplayY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight(), unkbool);
|
||||
displaySurface->vtable2c(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetLocationX(), m_waitIndicator->GetLocationY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight(), unkbool);
|
||||
}
|
||||
else
|
||||
{
|
||||
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
||||
displaySurface->vtable24(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetDisplayX(), m_waitIndicator->GetDisplayY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight());
|
||||
displaySurface->vtable24(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetLocationX(), m_waitIndicator->GetLocationY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user