diff --git a/CONFIG/ConfigCommandLineInfo.cpp b/CONFIG/ConfigCommandLineInfo.cpp index 0e376e6d..cf3180c4 100644 --- a/CONFIG/ConfigCommandLineInfo.cpp +++ b/CONFIG/ConfigCommandLineInfo.cpp @@ -15,7 +15,7 @@ CConfigCommandLineInfo::CConfigCommandLineInfo() void CConfigCommandLineInfo::ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast) { if (bFlag) { - if (lstrcmpiA(pszParam, "config") == 0) { + if (lstrcmpi(pszParam, "config") == 0) { currentConfigApp->m_run_config_dialog = TRUE; } } diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp index 7ae5393e..c9fad610 100644 --- a/CONFIG/MainDlg.cpp +++ b/CONFIG/MainDlg.cpp @@ -13,7 +13,7 @@ DECOMP_SIZE_ASSERT(CMainDialog, 0x70) CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent) { afxCurrentWinApp; - m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG)); + m_icon = LoadIcon(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG)); } // FUNCTION: CONFIG 0x00403e50 @@ -52,8 +52,8 @@ BOOL CMainDialog::OnInitDialog() CString about_text; about_text.LoadString(IDS_ABOUT); if (system_menu) { - AppendMenuA(system_menu->m_hMenu, MF_SEPARATOR, 0, NULL); - AppendMenuA(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text); + AppendMenu(system_menu->m_hMenu, MF_SEPARATOR, 0, NULL); + AppendMenu(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text); } SendMessage(WM_SETICON, ICON_BIG, (LPARAM) m_icon); SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) m_icon); diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp index d4457b55..8d0fbdc4 100644 --- a/CONFIG/config.cpp +++ b/CONFIG/config.cpp @@ -106,7 +106,7 @@ BOOL CConfigApp::InitInstance() // FUNCTION: CONFIG 0x00403100 BOOL CConfigApp::IsLegoNotRunning() { - HWND hWnd = FindWindowA("Lego Island MainNoM App", "LEGO\xae"); + HWND hWnd = FindWindow("Lego Island MainNoM App", "LEGO\xae"); if (_stricmp(afxCurrentAppName, "config") == 0 || !hWnd) { return TRUE; } @@ -122,7 +122,7 @@ BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const HKEY hKey; DWORD pos; - if (RegCreateKeyExA( + if (RegCreateKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, @@ -133,7 +133,7 @@ BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const &hKey, &pos ) == ERROR_SUCCESS) { - if (RegSetValueExA(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value)) == ERROR_SUCCESS) { + if (RegSetValueEx(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value)) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) { return TRUE; } @@ -153,8 +153,8 @@ BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const BOOL out = FALSE; DWORD size = p_size; - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - if (RegQueryValueExA(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) { + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { + if (RegQueryValueEx(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) { out = TRUE; } diff --git a/CONFIG/detectdx5.cpp b/CONFIG/detectdx5.cpp index 546f0dbd..a4284796 100644 --- a/CONFIG/detectdx5.cpp +++ b/CONFIG/detectdx5.cpp @@ -22,7 +22,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) OSVERSIONINFOA os_version; os_version.dwOSVersionInfoSize = sizeof(os_version); - if (!GetVersionExA(&os_version)) { + if (!GetVersionEx(&os_version)) { *p_version = 0; *p_found = 0; return; @@ -38,16 +38,16 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) return; } *p_version = 0x200; - HMODULE dinput_module = LoadLibraryA("DINPUT.DLL"); + HMODULE dinput_module = LoadLibrary("DINPUT.DLL"); if (!dinput_module) { - OutputDebugStringA("Couldn't LoadLibrary DInput\r\n"); + OutputDebugString("Couldn't LoadLibrary DInput\r\n"); return; } DirectInputCreateA_fn* func_DirectInputCreateA = (DirectInputCreateA_fn*) GetProcAddress(dinput_module, "DirectInputCreateA"); FreeLibrary(dinput_module); if (!func_DirectInputCreateA) { - OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n"); + OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n"); return; } *p_version = 0x300; @@ -58,7 +58,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) *p_version = 0x501; return; } - HMODULE ddraw_module = LoadLibraryA("DDRAW.DLL"); + HMODULE ddraw_module = LoadLibrary("DDRAW.DLL"); if (!ddraw_module) { *p_version = 0; *p_found = 0; @@ -71,7 +71,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) *p_version = 0; *p_found = 0; FreeLibrary(ddraw_module); - OutputDebugStringA("Couldn't LoadLibrary DDraw\r\n"); + OutputDebugString("Couldn't LoadLibrary DDraw\r\n"); return; } LPDIRECTDRAW ddraw; @@ -79,7 +79,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) *p_version = 0; *p_found = 0; FreeLibrary(ddraw_module); - OutputDebugStringA("Couldn't create DDraw\r\n"); + OutputDebugString("Couldn't create DDraw\r\n"); return; } *p_version = 0x100; @@ -87,14 +87,14 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) if (FAILED(ddraw->QueryInterface(IID_IDirectDraw2, (LPVOID*) &ddraw2))) { ddraw->Release(); FreeLibrary(ddraw_module); - OutputDebugStringA("Couldn't QI DDraw2\r\n"); + OutputDebugString("Couldn't QI DDraw2\r\n"); return; } ddraw->Release(); *p_version = 0x200; - HMODULE dinput_module = LoadLibraryA("DINPUT.DLL"); + HMODULE dinput_module = LoadLibrary("DINPUT.DLL"); if (!dinput_module) { - OutputDebugStringA("Couldn't LoadLibrary DInput\r\n"); + OutputDebugString("Couldn't LoadLibrary DInput\r\n"); ddraw2->Release(); FreeLibrary(ddraw_module); return; @@ -105,7 +105,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) if (!func_DirectInputCreateA) { FreeLibrary(ddraw_module); ddraw2->Release(); - OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n"); + OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n"); return; } *p_version = 0x300; @@ -118,7 +118,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) ddraw2->Release(); FreeLibrary(ddraw_module); *p_version = 0; - OutputDebugStringA("Couldn't Set coop level\r\n"); + OutputDebugString("Couldn't Set coop level\r\n"); return; } LPDIRECTDRAWSURFACE surface; @@ -126,7 +126,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) ddraw2->Release(); FreeLibrary(ddraw_module); *p_version = 0; - OutputDebugStringA("Couldn't CreateSurface\r\n"); + OutputDebugString("Couldn't CreateSurface\r\n"); return; } LPDIRECTDRAWSURFACE3 surface3; diff --git a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp index d89f5cd4..e79f2a1b 100644 --- a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp @@ -261,7 +261,7 @@ MxResult MxBackgroundAudioManager::PlayMusic( m_action2.SetAtomId(p_action.GetAtomId()); m_action2.SetObjectId(p_action.GetObjectId()); - m_action2.SetUnknown84(this); + m_action2.SetNotificationObject(this); m_action2.SetOrigin(this); MxResult result = Start(&m_action2); diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index 94d20dbd..cc96ed5e 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -418,7 +418,7 @@ void LegoVideoManager::DrawFPS() char zeros[8] = "0000.00"; if (m_unk0x528 == NULL) { - m_arialFont = CreateFontA( + m_arialFont = CreateFont( 12, 0, 0, @@ -437,7 +437,7 @@ void LegoVideoManager::DrawFPS() HDC dc = GetDC(NULL); SelectObject(dc, m_arialFont); - GetTextExtentPointA(dc, zeros, strlen(zeros), &m_fpsSize); + GetTextExtentPoint(dc, zeros, strlen(zeros), &m_fpsSize); ReleaseDC(NULL, dc); m_unk0x528 = m_displaySurface->FUN_100bc8b0(m_fpsSize.cx, m_fpsSize.cy); @@ -513,11 +513,11 @@ void LegoVideoManager::DrawFPS() SetTextColor(dc, RGB(255, 255, 0)); SetBkColor(dc, RGB(0, 0, 0)); SetBkMode(dc, OPAQUE); - GetTextExtentPoint32A(dc, buffer, nb, &m_fpsSize); + GetTextExtentPoint32(dc, buffer, nb, &m_fpsSize); RECT rect; SetRect(&rect, 0, 0, m_fpsSize.cx, m_fpsSize.cy); - ExtTextOutA(dc, 0, 0, ETO_OPAQUE, &rect, buffer, nb, NULL); + ExtTextOut(dc, 0, 0, ETO_OPAQUE, &rect, buffer, nb, NULL); m_unk0x528->ReleaseDC(dc); m_unk0x550 = 1.f; } diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 3f7590e7..ebeca836 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -146,7 +146,7 @@ void Score::ReadyWorld() MxDSAction action; action.SetObjectId(InfoscorScript::c_nin001pr_RunAnim); action.SetAtomId(m_atomId); - action.SetUnknown84(this); + action.SetNotificationObject(this); Start(&action); if (m_state->GetTutorialFlag()) { diff --git a/LEGO1/omni/include/mxdisplaysurface.h b/LEGO1/omni/include/mxdisplaysurface.h index eb5d9ea3..290950f2 100644 --- a/LEGO1/omni/include/mxdisplaysurface.h +++ b/LEGO1/omni/include/mxdisplaysurface.h @@ -109,7 +109,7 @@ class MxDisplaySurface : public MxCore { MxU8 p_bpp ); - LPDIRECTDRAWSURFACE FUN_100bc8b0(MxS32 width, MxS32 height); + LPDIRECTDRAWSURFACE FUN_100bc8b0(MxS32 p_width, MxS32 p_height); private: MxU8 CountTotalBitsSetTo1(MxU32 p_param); diff --git a/LEGO1/omni/include/mxdsaction.h b/LEGO1/omni/include/mxdsaction.h index 3a654258..f82c2237 100644 --- a/LEGO1/omni/include/mxdsaction.h +++ b/LEGO1/omni/include/mxdsaction.h @@ -105,8 +105,8 @@ class MxDSAction : public MxDSObject { // FUNCTION: BETA10 0x10015430 void SetUp(const Vector3& p_up) { m_up = p_up; } - MxCore* GetUnknown84() { return m_unk0x84; } - void SetUnknown84(MxCore* p_unk0x84) { m_unk0x84 = p_unk0x84; } + MxCore* GetNotificationObject() { return m_notificationObject; } + void SetNotificationObject(MxCore* p_notificationObject) { m_notificationObject = p_notificationObject; } MxCore* GetOrigin() { return m_origin; } void SetOrigin(MxCore* p_origin) { m_origin = p_origin; } @@ -118,20 +118,20 @@ class MxDSAction : public MxDSObject { // MxDSAction::`scalar deleting destructor' protected: - MxU32 m_sizeOnDisk; // 0x2c - MxU32 m_flags; // 0x30 - MxLong m_startTime; // 0x34 - MxLong m_duration; // 0x38 - MxS32 m_loopCount; // 0x3c - Mx3DPointFloat m_location; // 0x40 - Mx3DPointFloat m_direction; // 0x54 - Mx3DPointFloat m_up; // 0x68 - char* m_extraData; // 0x7c - MxU16 m_extraLength; // 0x80 - MxCore* m_unk0x84; // 0x84 - undefined4 m_unk0x88; // 0x88 - MxCore* m_origin; // 0x8c - MxLong m_unk0x90; // 0x90 + MxU32 m_sizeOnDisk; // 0x2c + MxU32 m_flags; // 0x30 + MxLong m_startTime; // 0x34 + MxLong m_duration; // 0x38 + MxS32 m_loopCount; // 0x3c + Mx3DPointFloat m_location; // 0x40 + Mx3DPointFloat m_direction; // 0x54 + Mx3DPointFloat m_up; // 0x68 + char* m_extraData; // 0x7c + MxU16 m_extraLength; // 0x80 + MxCore* m_notificationObject; // 0x84 + undefined4 m_unk0x88; // 0x88 + MxCore* m_origin; // 0x8c + MxLong m_unk0x90; // 0x90 }; #endif // MXDSACTION_H diff --git a/LEGO1/omni/src/action/mxdsaction.cpp b/LEGO1/omni/src/action/mxdsaction.cpp index eeb3dc68..caab7f99 100644 --- a/LEGO1/omni/src/action/mxdsaction.cpp +++ b/LEGO1/omni/src/action/mxdsaction.cpp @@ -28,7 +28,7 @@ MxDSAction::MxDSAction() m_location.Fill(FLT_MAX); m_direction.Fill(FLT_MAX); m_up.Fill(FLT_MAX); - m_unk0x84 = NULL; + m_notificationObject = NULL; m_unk0x88 = 0; m_origin = NULL; m_unk0x90 = INT_MIN; @@ -89,7 +89,7 @@ void MxDSAction::CopyFrom(MxDSAction& p_dsAction) m_direction = p_dsAction.m_direction; m_up = p_dsAction.m_up; 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_origin = p_dsAction.m_origin; m_unk0x90 = p_dsAction.m_unk0x90; diff --git a/LEGO1/omni/src/main/mxomni.cpp b/LEGO1/omni/src/main/mxomni.cpp index 0e295709..bb0baee1 100644 --- a/LEGO1/omni/src/main/mxomni.cpp +++ b/LEGO1/omni/src/main/mxomni.cpp @@ -259,9 +259,9 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p NotificationManager()->Send(sender, MxType4NotificationParam(this, &p_action, object)); } - if (p_action.GetUnknown84()) { + if (p_action.GetNotificationObject()) { NotificationManager()->Send( - p_action.GetUnknown84(), + p_action.GetNotificationObject(), MxStartActionNotificationParam(c_notificationStartAction, object, &p_action, FALSE) ); } diff --git a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp index 40ae8ae9..0e34ed5a 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp @@ -316,7 +316,7 @@ MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action) if (entry) { MxDSStreamingAction* action = new MxDSStreamingAction(*p_action, 0); action->SetUnknown28(entry->GetUnknown28()); - action->SetUnknown84(entry->GetUnknown84()); + action->SetNotificationObject(entry->GetNotificationObject()); action->SetOrigin(entry->GetOrigin()); action->SetUnknowna0(entry->GetUnknowna4()); diff --git a/LEGO1/omni/src/stream/mxdsbuffer.cpp b/LEGO1/omni/src/stream/mxdsbuffer.cpp index 8d627b5e..d76055fe 100644 --- a/LEGO1/omni/src/stream/mxdsbuffer.cpp +++ b/LEGO1/omni/src/stream/mxdsbuffer.cpp @@ -207,7 +207,7 @@ MxResult MxDSBuffer::StartPresenterFromAction( if (!m_unk0x30->GetInternalAction()) { p_objectheader->SetAtomId(p_action1->GetAtomId()); 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->SetUnknown90(p_action1->GetUnknown90()); p_objectheader->MergeFrom(*p_action1); diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index 358ada70..0ef13b6c 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -1397,7 +1397,7 @@ void MxDisplaySurface::VTable0x2c( } // FUNCTION: LEGO1 0x100bc8b0 -LPDIRECTDRAWSURFACE MxDisplaySurface::FUN_100bc8b0(MxS32 width, MxS32 height) +LPDIRECTDRAWSURFACE MxDisplaySurface::FUN_100bc8b0(MxS32 p_width, MxS32 p_height) { LPDIRECTDRAWSURFACE surface = NULL; @@ -1416,8 +1416,8 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::FUN_100bc8b0(MxS32 width, MxS32 height) return NULL; } - surfaceDesc.dwWidth = width; - surfaceDesc.dwHeight = height; + surfaceDesc.dwWidth = p_width; + surfaceDesc.dwHeight = p_height; surfaceDesc.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; surfaceDesc.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_OFFSCREENPLAIN;