Merge branch 'match-decodess2' of https://github.com/jonschz/isle into match-decodess2

This commit is contained in:
jonschz 2025-05-25 07:52:48 +02:00
commit 248a64133e
31 changed files with 175 additions and 91 deletions

View File

@ -236,7 +236,7 @@ BOOL CConfigApp::ReadRegisterSettings()
if (tmp != 0) { if (tmp != 0) {
is_modified = TRUE; is_modified = TRUE;
m_device_enumerator->FUN_1009d210(); m_device_enumerator->FUN_1009d210();
tmp = m_device_enumerator->FUN_1009d0d0(); tmp = m_device_enumerator->GetBestDevice();
m_device_enumerator->GetDevice(tmp, m_driver, m_device); m_device_enumerator->GetDevice(tmp, m_driver, m_device);
} }
if (!ReadRegInt("Display Bit Depth", &m_display_bit_depth)) { if (!ReadRegInt("Display Bit Depth", &m_display_bit_depth)) {
@ -349,17 +349,17 @@ DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const
if (GetHardwareDeviceColorModel()) { if (GetHardwareDeviceColorModel()) {
return 0; return 0;
} }
return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x800; return m_device->m_HELDesc.dwDeviceRenderBitDepth & DDBD_8;
} }
// FUNCTION: CONFIG 0x004037e0 // FUNCTION: CONFIG 0x004037e0
DWORD CConfigApp::GetDeviceRenderBitStatus() const DWORD CConfigApp::GetDeviceRenderBitStatus() const
{ {
if (GetHardwareDeviceColorModel()) { if (GetHardwareDeviceColorModel()) {
return m_device->m_HWDesc.dwDeviceRenderBitDepth & 0x400; return m_device->m_HWDesc.dwDeviceRenderBitDepth & DDBD_16;
} }
else { else {
return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x400; return m_device->m_HELDesc.dwDeviceRenderBitDepth & DDBD_16;
} }
} }

View File

@ -113,8 +113,8 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
memset(&surface_desc, 0, sizeof(surface_desc)); memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS; surface_desc.dwFlags = DDSD_CAPS;
surface_desc.ddsCaps.dwCaps = DDCAPS2_NONLOCALVIDMEM; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
if (FAILED(ddraw2->SetCooperativeLevel(NULL, DISCL_BACKGROUND))) { if (FAILED(ddraw2->SetCooperativeLevel(NULL, DDSCL_NORMAL))) {
ddraw2->Release(); ddraw2->Release();
FreeLibrary(ddraw_module); FreeLibrary(ddraw_module);
*p_version = 0; *p_version = 0;

View File

@ -218,7 +218,7 @@ void IsleApp::SetupVideoFlags(
m_videoParam.Flags().SetFullScreen(fullScreen); m_videoParam.Flags().SetFullScreen(fullScreen);
m_videoParam.Flags().SetFlipSurfaces(flipSurfaces); m_videoParam.Flags().SetFlipSurfaces(flipSurfaces);
m_videoParam.Flags().SetBackBuffers(!backBuffers); m_videoParam.Flags().SetBackBuffers(!backBuffers);
m_videoParam.Flags().SetF2bit0(!param_6); m_videoParam.Flags().SetLacksLightSupport(!param_6);
m_videoParam.Flags().SetF1bit7(param_7); m_videoParam.Flags().SetF1bit7(param_7);
m_videoParam.Flags().SetWideViewAngle(wideViewAngle); m_videoParam.Flags().SetWideViewAngle(wideViewAngle);
m_videoParam.Flags().SetF2bit1(1); m_videoParam.Flags().SetF2bit1(1);

View File

@ -261,7 +261,7 @@ MxResult MxBackgroundAudioManager::PlayMusic(
m_action2.SetAtomId(p_action.GetAtomId()); m_action2.SetAtomId(p_action.GetAtomId());
m_action2.SetObjectId(p_action.GetObjectId()); m_action2.SetObjectId(p_action.GetObjectId());
m_action2.SetUnknown84(this); m_action2.SetNotificationObject(this);
m_action2.SetOrigin(this); m_action2.SetOrigin(this);
MxResult result = Start(&m_action2); MxResult result = Start(&m_action2);

View File

@ -44,7 +44,7 @@ LegoAnimMMPresenter::~LegoAnimMMPresenter()
VideoManager()->UnregisterPresenter(*this); VideoManager()->UnregisterPresenter(*this);
} }
delete m_unk0x68; delete[] m_unk0x68;
NotificationManager()->Unregister(this); NotificationManager()->Unregister(this);
} }

View File

@ -1303,7 +1303,7 @@ void LegoBackgroundColor::ToggleSkyColor()
// FUNCTION: BETA10 0x10086984 // FUNCTION: BETA10 0x10086984
void LegoBackgroundColor::SetLightColor(float p_r, float p_g, float p_b) void LegoBackgroundColor::SetLightColor(float p_r, float p_g, float p_b)
{ {
if (!VideoManager()->GetVideoParam().Flags().GetF2bit0()) { if (!VideoManager()->GetVideoParam().Flags().GetLacksLightSupport()) {
// TODO: Computed constants based on what? // TODO: Computed constants based on what?
p_r *= 1. / 0.23; p_r *= 1. / 0.23;
p_g *= 1. / 0.63; p_g *= 1. / 0.63;

View File

@ -65,7 +65,7 @@ LegoTextureInfo* LegoTextureInfo::Create(const char* p_name, LegoTexture* p_text
desc.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; desc.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
desc.dwWidth = image->GetWidth(); desc.dwWidth = image->GetWidth();
desc.dwHeight = image->GetHeight(); desc.dwHeight = image->GetHeight();
desc.ddsCaps.dwCaps = DDCAPS_OVERLAYCANTCLIP | DDCAPS_OVERLAY; desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;
desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
desc.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8; desc.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8;
desc.ddpfPixelFormat.dwRGBBitCount = 8; desc.ddpfPixelFormat.dwRGBBitCount = 8;
@ -112,7 +112,7 @@ LegoTextureInfo* LegoTextureInfo::Create(const char* p_name, LegoTexture* p_text
entries[i].peBlue = image->GetPaletteEntry(i).GetBlue(); entries[i].peBlue = image->GetPaletteEntry(i).GetBlue();
} }
else { else {
entries[i].peFlags = 0x80; entries[i].peFlags = D3DPAL_RESERVED;
} }
} }
@ -193,7 +193,7 @@ LegoResult LegoTextureInfo::FUN_10066010(const LegoU8* p_bits)
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc); desc.dwSize = sizeof(desc);
if (m_surface->Lock(NULL, &desc, 0, NULL) == DD_OK) { if (m_surface->Lock(NULL, &desc, DDLOCK_SURFACEMEMORYPTR, NULL) == DD_OK) {
MxU8* surface = (MxU8*) desc.lpSurface; MxU8* surface = (MxU8*) desc.lpSurface;
const LegoU8* bits = p_bits; const LegoU8* bits = p_bits;

View File

@ -28,7 +28,7 @@ MxControlPresenter::MxControlPresenter()
MxControlPresenter::~MxControlPresenter() MxControlPresenter::~MxControlPresenter()
{ {
if (m_states) { if (m_states) {
delete m_states; delete[] m_states;
} }
} }

View File

@ -291,10 +291,10 @@ void MxTransitionManager::MosaicTransition()
memset(&ddsd, 0, sizeof(ddsd)); memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd); ddsd.dwSize = sizeof(ddsd);
HRESULT res = m_ddSurface->Lock(NULL, &ddsd, 1, NULL); HRESULT res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL);
if (res == DDERR_SURFACELOST) { if (res == DDERR_SURFACELOST) {
m_ddSurface->Restore(); m_ddSurface->Restore();
res = m_ddSurface->Lock(NULL, &ddsd, 1, NULL); res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL);
} }
if (res == DD_OK) { if (res == DD_OK) {

View File

@ -119,20 +119,20 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM
if (deviceNum < 0) { if (deviceNum < 0) {
deviceEnumerate.FUN_1009d210(); deviceEnumerate.FUN_1009d210();
deviceNum = deviceEnumerate.FUN_1009d0d0(); deviceNum = deviceEnumerate.GetBestDevice();
deviceNum = deviceEnumerate.GetDevice(deviceNum, driver, device); deviceNum = deviceEnumerate.GetDevice(deviceNum, driver, device);
} }
m_direct3d->SetDevice(deviceEnumerate, driver, device); m_direct3d->SetDevice(deviceEnumerate, driver, device);
if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) { if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) {
p_videoParam.Flags().SetF2bit0(TRUE); p_videoParam.Flags().SetLacksLightSupport(TRUE);
} }
else { else {
p_videoParam.Flags().SetF2bit0(FALSE); p_videoParam.Flags().SetLacksLightSupport(FALSE);
} }
ViewROI::SetUnk101013d8(p_videoParam.Flags().GetF2bit0() == FALSE); ViewROI::SetUnk101013d8(p_videoParam.Flags().GetLacksLightSupport() == FALSE);
if (!m_direct3d->Create( if (!m_direct3d->Create(
hwnd, hwnd,
@ -639,7 +639,7 @@ void LegoVideoManager::SetSkyColor(float p_red, float p_green, float p_blue)
colorStrucure.peRed = (p_red * 255.0f); colorStrucure.peRed = (p_red * 255.0f);
colorStrucure.peGreen = (p_green * 255.0f); colorStrucure.peGreen = (p_green * 255.0f);
colorStrucure.peBlue = (p_blue * 255.0f); colorStrucure.peBlue = (p_blue * 255.0f);
colorStrucure.peFlags = -124; colorStrucure.peFlags = D3DPAL_RESERVED | PC_NOCOLLAPSE;
m_videoParam.GetPalette()->SetSkyColor(&colorStrucure); m_videoParam.GetPalette()->SetSkyColor(&colorStrucure);
m_videoParam.GetPalette()->SetOverrideSkyColor(TRUE); m_videoParam.GetPalette()->SetOverrideSkyColor(TRUE);
m_3dManager->GetLego3DView()->GetView()->SetBackgroundColor(p_red, p_green, p_blue); m_3dManager->GetLego3DView()->GetView()->SetBackgroundColor(p_red, p_green, p_blue);

View File

@ -146,7 +146,7 @@ void Score::ReadyWorld()
MxDSAction action; MxDSAction action;
action.SetObjectId(InfoscorScript::c_nin001pr_RunAnim); action.SetObjectId(InfoscorScript::c_nin001pr_RunAnim);
action.SetAtomId(m_atomId); action.SetAtomId(m_atomId);
action.SetUnknown84(this); action.SetNotificationObject(this);
Start(&action); Start(&action);
if (m_state->GetTutorialFlag()) { if (m_state->GetTutorialFlag()) {

View File

@ -35,7 +35,7 @@ LegoWEGEdge::~LegoWEGEdge()
delete[] m_edgeNormals; delete[] m_edgeNormals;
} }
if (m_pathTrigger) { if (m_pathTrigger) {
delete m_pathTrigger; delete[] m_pathTrigger;
} }
if (m_unk0x50) { if (m_unk0x50) {
delete m_unk0x50; delete m_unk0x50;

View File

@ -63,7 +63,7 @@ LegoTextureInfo* LegoTextureContainer::GetCached(LegoTextureInfo* p_textureInfo)
newDesc.dwHeight = desc.dwHeight; newDesc.dwHeight = desc.dwHeight;
newDesc.dwSize = sizeof(newDesc); newDesc.dwSize = sizeof(newDesc);
newDesc.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; newDesc.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
newDesc.ddsCaps.dwCaps = DDCAPS_OVERLAYCANTCLIP | DDCAPS_OVERLAY; newDesc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;
newDesc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); newDesc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
newDesc.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8; newDesc.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8;
newDesc.ddpfPixelFormat.dwRGBBitCount = 8; newDesc.ddpfPixelFormat.dwRGBBitCount = 8;

View File

@ -35,7 +35,10 @@
// __NLG_Notify // __NLG_Notify
// LIBRARY: LEGO1 0x1008b340 // LIBRARY: LEGO1 0x1008b340
// __FPinit // __fpmath
// LIBRARY: LEGO1 0x1008b370
// __cfltcvt_init
// LIBRARY: LEGO1 0x1008b3dc // LIBRARY: LEGO1 0x1008b3dc
// __CIacos // __CIacos
@ -188,6 +191,39 @@
// LIBRARY: LEGO1 0x1008d660 // LIBRARY: LEGO1 0x1008d660
// __freeptd // __freeptd
// LIBRARY: LEGO1 0x1008d710
// __setdefaultprecision
// LIBRARY: LEGO1 0x1008d730
// __ms_p5_test_fdiv
// LIBRARY: LEGO1 0x1008d780
// __ms_p5_mp_test_fdiv
// LIBRARY: LEGO1 0x1008d7b0
// __forcdecpt
// LIBRARY: LEGO1 0x1008d820
// __cropzeros
// LIBRARY: LEGO1 0x1008d880
// __positive
// LIBRARY: LEGO1 0x1008d8a0
// __fassign
// LIBRARY: LEGO1 0x1008d8f0
// __cftoe
// LIBRARY: LEGO1 0x1008da60
// __cftof
// LIBRARY: LEGO1 0x1008db90
// __cftog
// LIBRARY: LEGO1 0x1008dc40
// __cfltcvt
// LIBRARY: LEGO1 0x1008dd90 // LIBRARY: LEGO1 0x1008dd90
// __cintrindisp2 // __cintrindisp2
@ -293,6 +329,9 @@
// LIBRARY: LEGO1 0x10090080 // LIBRARY: LEGO1 0x10090080
// __getstream // __getstream
// LIBRARY: LEGO1 0x10090180
// _tolower
// LIBRARY: LEGO1 0x100901f0 // LIBRARY: LEGO1 0x100901f0
// __tolower_lk // __tolower_lk
@ -344,8 +383,23 @@
// LIBRARY: LEGO1 0x10092130 // LIBRARY: LEGO1 0x10092130
// _raise // _raise
// LIBRARY: LEGO1 0x10092310 // ~LIBRARY: LEGO1 0x10092310
// _siglookup // _siglookup
// Not public
// LIBRARY: LEGO1 0x10092720
// __control87
// LIBRARY: LEGO1 0x10092760
// __controlfp
// ~LIBRARY: LEGO1 0x10092780
// __abstract_cw
// Not public
// ~LIBRARY: LEGO1 0x10092830
// __hw_cw
// Not public
// LIBRARY: LEGO1 0x100928c0 // LIBRARY: LEGO1 0x100928c0
// __fptrap // __fptrap
@ -377,6 +431,24 @@
// LIBRARY: LEGO1 0x10092d30 // LIBRARY: LEGO1 0x10092d30
// __ld12tod // __ld12tod
// LIBRARY: LEGO1 0x10092d50
// __ld12tof
// LIBRARY: LEGO1 0x10092d70
// __atodbl
// LIBRARY: LEGO1 0x10092db0
// __atoflt
// LIBRARY: LEGO1 0x10092df0
// __fptostr
// LIBRARY: LEGO1 0x10092e80
// __fltout2
// LIBRARY: LEGO1 0x10092f10
// ___dtold
// LIBRARY: LEGO1 0x10093037 // LIBRARY: LEGO1 0x10093037
// __trandisp2 // __trandisp2
@ -458,6 +530,9 @@
// LIBRARY: LEGO1 0x100965b0 // LIBRARY: LEGO1 0x100965b0
// ___mtold12 // ___mtold12
// LIBRARY: LEGO1 0x100966a0
// _$I10_OUTPUT
// LIBRARY: LEGO1 0x10097190 // LIBRARY: LEGO1 0x10097190
// ___ld12mul // ___ld12mul
@ -516,6 +591,12 @@
// GLOBAL: LEGO1 0x100fc8bc // GLOBAL: LEGO1 0x100fc8bc
// __NLG_Destination // __NLG_Destination
// GLOBAL: LEGO1 0x100fc8d8
// __adjust_fdiv
// GLOBAL: LEGO1 0x100fc8dc
// __FPinit
// GLOBAL: LEGO1 0x100fc8f0 // GLOBAL: LEGO1 0x100fc8f0
// __iob // __iob
@ -564,6 +645,9 @@
// GLOBAL: LEGO1 0x100fcf20 // GLOBAL: LEGO1 0x100fcf20
// ___tlsindex // ___tlsindex
// GLOBAL: LEGO1 0x100fcf28
// __cfltcvt_tab
// GLOBAL: LEGO1 0x100fcf60 // GLOBAL: LEGO1 0x100fcf60
// __OP_ACOSjmptab // __OP_ACOSjmptab

View File

@ -158,7 +158,7 @@ int LegoDeviceEnumerate::BETA_1011cc65(int p_idx, char* p_buffer)
// FUNCTION: CONFIG 0x00402860 // FUNCTION: CONFIG 0x00402860
// FUNCTION: LEGO1 0x1009d0d0 // FUNCTION: LEGO1 0x1009d0d0
// FUNCTION: BETA10 0x1011cdb4 // FUNCTION: BETA10 0x1011cdb4
int LegoDeviceEnumerate::FUN_1009d0d0() int LegoDeviceEnumerate::GetBestDevice()
{ {
if (!IsInitialized()) { if (!IsInitialized()) {
return -1; return -1;

View File

@ -14,7 +14,7 @@ class LegoDeviceEnumerate : public MxDeviceEnumerate {
int GetDevice(int p_deviceNum, MxDriver*& p_driver, Direct3DDeviceInfo*& p_device); int GetDevice(int p_deviceNum, MxDriver*& p_driver, Direct3DDeviceInfo*& p_device);
int FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo) const; int FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo) const;
int BETA_1011cc65(int p_idx, char* p_buffer); int BETA_1011cc65(int p_idx, char* p_buffer);
int FUN_1009d0d0(); int GetBestDevice();
static int SupportsMMX(); static int SupportsMMX();
static int SupportsCPUID(); static int SupportsCPUID();
int FUN_1009d210(); int FUN_1009d210();

View File

@ -164,19 +164,19 @@ BOOL MxDirectDraw::SetPaletteEntries(const PALETTEENTRY* pPaletteEntries, int pa
} }
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
m_paletteEntries[i].peFlags = 0x80; m_paletteEntries[i].peFlags = D3DPAL_RESERVED;
} }
for (; i < 142; i++) { for (; i < 142; i++) {
m_paletteEntries[i].peFlags = 0x44; m_paletteEntries[i].peFlags = D3DPAL_READONLY | PC_NOCOLLAPSE;
} }
for (; i < 246; i++) { for (; i < 246; i++) {
m_paletteEntries[i].peFlags = 0x84; m_paletteEntries[i].peFlags = D3DPAL_RESERVED | PC_NOCOLLAPSE;
} }
for (; i < 256; i++) { for (; i < 256; i++) {
m_paletteEntries[i].peFlags = 0x80; m_paletteEntries[i].peFlags = D3DPAL_RESERVED;
} }
if (paletteEntryCount != 0) { if (paletteEntryCount != 0) {
@ -399,7 +399,7 @@ BOOL MxDirectDraw::DDSetMode(int width, int height, int bpp)
DDSURFACEDESC ddsd; DDSURFACEDESC ddsd;
FUN_1009e020(); ClearBackBuffers();
if (!GetDDSurfaceDesc(&ddsd, m_pBackBuffer)) { if (!GetDDSurfaceDesc(&ddsd, m_pBackBuffer)) {
return FALSE; return FALSE;
@ -549,7 +549,7 @@ BOOL MxDirectDraw::DDCreateSurfaces()
// FUNCTION: LEGO1 0x1009e020 // FUNCTION: LEGO1 0x1009e020
// FUNCTION: BETA10 0x10121700 // FUNCTION: BETA10 0x10121700
void MxDirectDraw::FUN_1009e020() void MxDirectDraw::ClearBackBuffers()
{ {
HRESULT result; HRESULT result;
byte* line; byte* line;
@ -561,10 +561,10 @@ void MxDirectDraw::FUN_1009e020()
memset(&ddsd, 0, sizeof(ddsd)); memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd); ddsd.dwSize = sizeof(ddsd);
result = m_pBackBuffer->Lock(NULL, &ddsd, 1, NULL); result = m_pBackBuffer->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL);
if (result == DDERR_SURFACELOST) { if (result == DDERR_SURFACELOST) {
m_pBackBuffer->Restore(); m_pBackBuffer->Restore();
result = m_pBackBuffer->Lock(NULL, &ddsd, 1, NULL); result = m_pBackBuffer->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL);
} }
if (result != DD_OK) { if (result != DD_OK) {

View File

@ -79,7 +79,7 @@ class MxDirectDraw {
void Error(const char* p_message, int p_error); void Error(const char* p_message, int p_error);
BOOL RecreateDirectDraw(GUID** a2); BOOL RecreateDirectDraw(GUID** a2);
void FUN_1009e020(); void ClearBackBuffers();
void FUN_1009d920(); void FUN_1009d920();
// SYNTHETIC: LEGO1 0x1009d510 // SYNTHETIC: LEGO1 0x1009d510

View File

@ -41,7 +41,7 @@ MxDriver::MxDriver(LPGUID p_guid)
// FUNCTION: CONFIG 0x00401180 // FUNCTION: CONFIG 0x00401180
// FUNCTION: LEGO1 0x1009ba80 // FUNCTION: LEGO1 0x1009ba80
// FUNCTION: BETA10 0x1011d8b6 // FUNCTION: BETA10 0x1011d8b6
MxDriver::MxDriver(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName) MxDriver::MxDriver(LPGUID p_guid, LPCSTR p_driverDesc, LPCSTR p_driverName)
{ {
m_guid = NULL; m_guid = NULL;
m_driverDesc = NULL; m_driverDesc = NULL;
@ -70,7 +70,7 @@ MxDriver::~MxDriver()
// FUNCTION: CONFIG 0x00401330 // FUNCTION: CONFIG 0x00401330
// FUNCTION: LEGO1 0x1009bc30 // FUNCTION: LEGO1 0x1009bc30
// FUNCTION: BETA10 0x1011da89 // FUNCTION: BETA10 0x1011da89
void MxDriver::Init(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName) void MxDriver::Init(LPGUID p_guid, LPCSTR p_driverDesc, LPCSTR p_driverName)
{ {
if (m_driverDesc) { if (m_driverDesc) {
delete[] m_driverDesc; delete[] m_driverDesc;
@ -103,8 +103,8 @@ void MxDriver::Init(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName)
// FUNCTION: BETA10 0x1011dbd0 // FUNCTION: BETA10 0x1011dbd0
Direct3DDeviceInfo::Direct3DDeviceInfo( Direct3DDeviceInfo::Direct3DDeviceInfo(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
) )
@ -135,8 +135,8 @@ Direct3DDeviceInfo::~Direct3DDeviceInfo()
// FUNCTION: BETA10 0x1011dca6 // FUNCTION: BETA10 0x1011dca6
void Direct3DDeviceInfo::Initialize( void Direct3DDeviceInfo::Initialize(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
) )
@ -320,8 +320,8 @@ HRESULT MxDeviceEnumerate::EnumDisplayModesCallback(LPDDSURFACEDESC p_ddsd)
// FUNCTION: BETA10 0x1011e32f // FUNCTION: BETA10 0x1011e32f
HRESULT MxDeviceEnumerate::EnumDevicesCallback( HRESULT MxDeviceEnumerate::EnumDevicesCallback(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
) )

View File

@ -67,16 +67,16 @@ struct Direct3DDeviceInfo {
~Direct3DDeviceInfo(); ~Direct3DDeviceInfo();
Direct3DDeviceInfo( Direct3DDeviceInfo(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
); );
void Initialize( void Initialize(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
); );
@ -115,9 +115,9 @@ struct MxDriver {
MxDriver() {} MxDriver() {}
~MxDriver(); ~MxDriver();
MxDriver(LPGUID p_guid); MxDriver(LPGUID p_guid);
MxDriver(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName); MxDriver(LPGUID p_guid, LPCSTR p_driverDesc, LPCSTR p_driverName);
void Init(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName); void Init(LPGUID p_guid, LPCSTR p_driverDesc, LPCSTR p_driverName);
LPGUID m_guid; // 0x00 LPGUID m_guid; // 0x00
char* m_driverDesc; // 0x04 char* m_driverDesc; // 0x04
@ -198,8 +198,8 @@ class MxDeviceEnumerate {
HRESULT EnumDisplayModesCallback(LPDDSURFACEDESC p_ddsd); HRESULT EnumDisplayModesCallback(LPDDSURFACEDESC p_ddsd);
HRESULT EnumDevicesCallback( HRESULT EnumDevicesCallback(
LPGUID p_guid, LPGUID p_guid,
LPSTR p_deviceDesc, LPCSTR p_deviceDesc,
LPSTR p_deviceName, LPCSTR p_deviceName,
LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HWDesc,
LPD3DDEVICEDESC p_HELDesc LPD3DDEVICEDESC p_HELDesc
); );

View File

@ -104,8 +104,8 @@ class MxDSAction : public MxDSObject {
// FUNCTION: BETA10 0x10015430 // FUNCTION: BETA10 0x10015430
void SetUp(const Vector3& p_up) { m_up = p_up; } void SetUp(const Vector3& p_up) { m_up = p_up; }
MxCore* GetUnknown84() { return m_unk0x84; } MxCore* GetNotificationObject() { return m_notificationObject; }
void SetUnknown84(MxCore* p_unk0x84) { m_unk0x84 = p_unk0x84; } void SetNotificationObject(MxCore* p_notificationObject) { m_notificationObject = p_notificationObject; }
MxCore* GetOrigin() { return m_origin; } MxCore* GetOrigin() { return m_origin; }
void SetOrigin(MxCore* p_origin) { m_origin = p_origin; } void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
@ -117,20 +117,20 @@ class MxDSAction : public MxDSObject {
// MxDSAction::`scalar deleting destructor' // MxDSAction::`scalar deleting destructor'
protected: protected:
MxU32 m_sizeOnDisk; // 0x2c MxU32 m_sizeOnDisk; // 0x2c
MxU32 m_flags; // 0x30 MxU32 m_flags; // 0x30
MxLong m_startTime; // 0x34 MxLong m_startTime; // 0x34
MxLong m_duration; // 0x38 MxLong m_duration; // 0x38
MxS32 m_loopCount; // 0x3c MxS32 m_loopCount; // 0x3c
Mx3DPointFloat m_location; // 0x40 Mx3DPointFloat m_location; // 0x40
Mx3DPointFloat m_direction; // 0x54 Mx3DPointFloat m_direction; // 0x54
Mx3DPointFloat m_up; // 0x68 Mx3DPointFloat m_up; // 0x68
char* m_extraData; // 0x7c char* m_extraData; // 0x7c
MxU16 m_extraLength; // 0x80 MxU16 m_extraLength; // 0x80
MxCore* m_unk0x84; // 0x84 MxCore* m_notificationObject; // 0x84
undefined4 m_unk0x88; // 0x88 undefined4 m_unk0x88; // 0x88
MxCore* m_origin; // 0x8c MxCore* m_origin; // 0x8c
MxLong m_unk0x90; // 0x90 MxLong m_unk0x90; // 0x90
}; };
#endif // MXDSACTION_H #endif // MXDSACTION_H

View File

@ -31,7 +31,7 @@ class MxVideoParamFlags {
void SetF1bit7(MxBool p_e) { m_flags1.m_bit7 = p_e; } void SetF1bit7(MxBool p_e) { m_flags1.m_bit7 = p_e; }
// FUNCTION: BETA10 0x100d81b0 // FUNCTION: BETA10 0x100d81b0
void SetF2bit0(MxBool p_e) { m_flags2.m_bit0 = p_e; } void SetLacksLightSupport(MxBool p_e) { m_flags2.m_bit0 = p_e; }
// inlined in ISLE // inlined in ISLE
void SetF2bit1(MxBool p_e) { m_flags2.m_bit1 = p_e; } void SetF2bit1(MxBool p_e) { m_flags2.m_bit1 = p_e; }
@ -55,7 +55,7 @@ class MxVideoParamFlags {
MxBool GetWideViewAngle() { return m_flags1.m_bit6; } MxBool GetWideViewAngle() { return m_flags1.m_bit6; }
// FUNCTION: BETA10 0x100886b0 // FUNCTION: BETA10 0x100886b0
MxBool GetF2bit0() { return m_flags2.m_bit0; } MxBool GetLacksLightSupport() { return m_flags2.m_bit0; }
// FUNCTION: BETA10 0x10142050 // FUNCTION: BETA10 0x10142050
MxBool GetF2bit1() { return m_flags2.m_bit1; } MxBool GetF2bit1() { return m_flags2.m_bit1; }

View File

@ -28,7 +28,7 @@ MxDSAction::MxDSAction()
m_location.Fill(FLT_MAX); m_location.Fill(FLT_MAX);
m_direction.Fill(FLT_MAX); m_direction.Fill(FLT_MAX);
m_up.Fill(FLT_MAX); m_up.Fill(FLT_MAX);
m_unk0x84 = NULL; m_notificationObject = NULL;
m_unk0x88 = 0; m_unk0x88 = 0;
m_origin = NULL; m_origin = NULL;
m_unk0x90 = INT_MIN; m_unk0x90 = INT_MIN;
@ -89,7 +89,7 @@ void MxDSAction::CopyFrom(MxDSAction& p_dsAction)
m_direction = p_dsAction.m_direction; m_direction = p_dsAction.m_direction;
m_up = p_dsAction.m_up; m_up = p_dsAction.m_up;
AppendExtra(p_dsAction.m_extraLength, p_dsAction.m_extraData); AppendExtra(p_dsAction.m_extraLength, p_dsAction.m_extraData);
m_unk0x84 = p_dsAction.m_unk0x84; m_notificationObject = p_dsAction.m_notificationObject;
m_unk0x88 = p_dsAction.m_unk0x88; m_unk0x88 = p_dsAction.m_unk0x88;
m_origin = p_dsAction.m_origin; m_origin = p_dsAction.m_origin;
m_unk0x90 = p_dsAction.m_unk0x90; m_unk0x90 = p_dsAction.m_unk0x90;

View File

@ -271,9 +271,9 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p
NotificationManager()->Send(sender, MxType4NotificationParam(this, &p_action, object)); NotificationManager()->Send(sender, MxType4NotificationParam(this, &p_action, object));
} }
if (p_action.GetUnknown84()) { if (p_action.GetNotificationObject()) {
NotificationManager()->Send( NotificationManager()->Send(
p_action.GetUnknown84(), p_action.GetNotificationObject(),
MxStartActionNotificationParam(c_notificationStartAction, object, &p_action, FALSE) MxStartActionNotificationParam(c_notificationStartAction, object, &p_action, FALSE)
); );
} }

View File

@ -316,7 +316,7 @@ MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action)
if (entry) { if (entry) {
MxDSStreamingAction* action = new MxDSStreamingAction(*p_action, 0); MxDSStreamingAction* action = new MxDSStreamingAction(*p_action, 0);
action->SetUnknown28(entry->GetUnknown28()); action->SetUnknown28(entry->GetUnknown28());
action->SetUnknown84(entry->GetUnknown84()); action->SetNotificationObject(entry->GetNotificationObject());
action->SetOrigin(entry->GetOrigin()); action->SetOrigin(entry->GetOrigin());
action->SetUnknowna0(entry->GetUnknowna4()); action->SetUnknowna0(entry->GetUnknowna4());

View File

@ -207,7 +207,7 @@ MxResult MxDSBuffer::StartPresenterFromAction(
if (!m_unk0x30->GetInternalAction()) { if (!m_unk0x30->GetInternalAction()) {
p_objectheader->SetAtomId(p_action1->GetAtomId()); p_objectheader->SetAtomId(p_action1->GetAtomId());
p_objectheader->SetUnknown28(p_action1->GetUnknown28()); p_objectheader->SetUnknown28(p_action1->GetUnknown28());
p_objectheader->SetUnknown84(p_action1->GetUnknown84()); p_objectheader->SetNotificationObject(p_action1->GetNotificationObject());
p_objectheader->SetOrigin(p_action1->GetOrigin()); p_objectheader->SetOrigin(p_action1->GetOrigin());
p_objectheader->SetUnknown90(p_action1->GetUnknown90()); p_objectheader->SetUnknown90(p_action1->GetUnknown90());
p_objectheader->MergeFrom(*p_action1); p_objectheader->MergeFrom(*p_action1);

View File

@ -28,10 +28,10 @@ MxBitmap::MxBitmap()
MxBitmap::~MxBitmap() MxBitmap::~MxBitmap()
{ {
if (m_info) { if (m_info) {
delete m_info; delete[] ((MxU8*) m_info);
} }
if (m_data) { if (m_data) {
delete m_data; delete[] m_data;
} }
if (m_palette) { if (m_palette) {
delete m_palette; delete m_palette;
@ -80,7 +80,7 @@ MxResult MxBitmap::SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette,
done: done:
if (ret) { if (ret) {
if (m_info) { if (m_info) {
delete[] m_info; delete[] ((MxU8*) m_info);
m_info = NULL; m_info = NULL;
} }
@ -118,7 +118,7 @@ MxResult MxBitmap::ImportBitmapInfo(MxBITMAPINFO* p_info)
done: done:
if (result != SUCCESS) { if (result != SUCCESS) {
if (m_info) { if (m_info) {
delete[] m_info; delete[] ((MxU8*) m_info);
m_info = NULL; m_info = NULL;
} }
@ -157,7 +157,7 @@ MxResult MxBitmap::ImportBitmap(MxBitmap* p_bitmap)
done: done:
if (result != SUCCESS) { if (result != SUCCESS) {
if (m_info) { if (m_info) {
delete[] m_info; delete[] ((MxU8*) m_info);
m_info = NULL; m_info = NULL;
} }
@ -249,7 +249,7 @@ MxResult MxBitmap::LoadFile(HANDLE p_handle)
done: done:
if (result != SUCCESS) { if (result != SUCCESS) {
if (m_info) { if (m_info) {
delete[] m_info; delete[] ((MxU8*) m_info);
m_info = NULL; m_info = NULL;
} }

View File

@ -196,7 +196,7 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam)
ddsd.dwSize = sizeof(ddsd); ddsd.dwSize = sizeof(ddsd);
ddsd.dwBackBufferCount = m_videoParam.GetBackBuffers(); ddsd.dwBackBufferCount = m_videoParam.GetBackBuffers();
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddsd.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_3DDEVICE | DDSCAPS_COMPLEX;
if (lpDirectDraw->CreateSurface(&ddsd, &m_ddSurface1, NULL)) { if (lpDirectDraw->CreateSurface(&ddsd, &m_ddSurface1, NULL)) {
goto done; goto done;
@ -1050,7 +1050,7 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CopySurface(LPDIRECTDRAWSURFACE p_src)
RECT rect = {0, 0, (LONG) ddsd.dwWidth, (LONG) ddsd.dwHeight}; RECT rect = {0, 0, (LONG) ddsd.dwWidth, (LONG) ddsd.dwHeight};
if (newSurface->BltFast(0, 0, p_src, &rect, 16) != DD_OK) { if (newSurface->BltFast(0, 0, p_src, &rect, DDBLTFAST_WAIT) != DD_OK) {
newSurface->Release(); newSurface->Release();
return NULL; return NULL;
} }

View File

@ -21,7 +21,7 @@ MxFlcPresenter::MxFlcPresenter()
MxFlcPresenter::~MxFlcPresenter() MxFlcPresenter::~MxFlcPresenter()
{ {
if (this->m_flcHeader) { if (this->m_flcHeader) {
delete this->m_flcHeader; delete[] ((MxU8*) this->m_flcHeader);
} }
} }

View File

@ -20,7 +20,7 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor)
m_criticalSection.Enter(); m_criticalSection.Enter();
if (m_bitmapInfo) { if (m_bitmapInfo) {
delete m_bitmapInfo; delete[] ((MxU8*) m_bitmapInfo);
} }
m_bitmapInfo = NULL; m_bitmapInfo = NULL;
@ -35,7 +35,7 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor)
void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk) void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk)
{ {
if (m_bitmapInfo) { if (m_bitmapInfo) {
delete m_bitmapInfo; delete[] ((MxU8*) m_bitmapInfo);
} }
MxU8* data = new MxU8[p_chunk->GetLength()]; MxU8* data = new MxU8[p_chunk->GetLength()];
@ -53,7 +53,7 @@ void MxStillPresenter::CreateBitmap()
m_frameBitmap = new MxBitmap; m_frameBitmap = new MxBitmap;
m_frameBitmap->ImportBitmapInfo(m_bitmapInfo); m_frameBitmap->ImportBitmapInfo(m_bitmapInfo);
delete m_bitmapInfo; delete[] ((MxU8*) m_bitmapInfo);
m_bitmapInfo = NULL; m_bitmapInfo = NULL;
} }

View File

@ -443,9 +443,9 @@ inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2
pViewportAppData->m_backgroundColorGreen, pViewportAppData->m_backgroundColorGreen,
pViewportAppData->m_backgroundColorBlue pViewportAppData->m_backgroundColorBlue
); );
}
assert(Succeeded(result)); assert(Succeeded(result));
}
result = ResultVal(pViewport->Render(const_cast<IDirect3DRMFrame2*>(pGroup))); result = ResultVal(pViewport->Render(const_cast<IDirect3DRMFrame2*>(pGroup)));
assert(Succeeded(result)); assert(Succeeded(result));