diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 4ecdf1c3b..e61341f8f 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -495,25 +495,21 @@ LRESULT CALLBACK DisableInputWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM case WM_LBUTTONDOWN: if (sgbMouseDown == 0) { sgbMouseDown = 1; - SetCapture(hWnd); } return 0; case WM_LBUTTONUP: if (sgbMouseDown == 1) { sgbMouseDown = 0; - ReleaseCapture(); } return 0; case WM_RBUTTONDOWN: if (sgbMouseDown == 0) { sgbMouseDown = 2; - SetCapture(hWnd); } return 0; case WM_RBUTTONUP: if (sgbMouseDown == 2) { sgbMouseDown = 0; - ReleaseCapture(); } return 0; case WM_CAPTURECHANGED: @@ -558,7 +554,6 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) MouseY = HIWORD(lParam); if (sgbMouseDown == 0) { sgbMouseDown = 1; - SetCapture(hWnd); track_repeat_walk(LeftMouseDown(wParam)); } return 0; @@ -569,7 +564,6 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) sgbMouseDown = 0; LeftMouseUp(); track_repeat_walk(FALSE); - ReleaseCapture(); } return 0; case WM_RBUTTONDOWN: @@ -577,7 +571,6 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) MouseY = HIWORD(lParam); if (sgbMouseDown == 0) { sgbMouseDown = 2; - SetCapture(hWnd); RightMouseDown(); } return 0; @@ -586,7 +579,6 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) MouseY = HIWORD(lParam); if (sgbMouseDown == 2) { sgbMouseDown = 0; - ReleaseCapture(); } return 0; case WM_CAPTURECHANGED: @@ -611,7 +603,6 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) music_stop(); track_repeat_walk(FALSE); sgbMouseDown = 0; - ReleaseCapture(); ShowProgress(uMsg); drawpanflag = 255; DrawAndBlit(); diff --git a/Source/multi.cpp b/Source/multi.cpp index 5b83de77c..5690b7e47 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -702,7 +702,6 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram) plrdata.size = sizeof(plrdata); memset(&UiData, 0, sizeof(UiData)); UiData.size = sizeof(UiData); - UiData.parentwindow = SDrawGetFrameWindow(NULL); UiData.artcallback = (void (*)())UiArtCallback; UiData.createcallback = (void (*)())UiCreateGameCallback; UiData.drawdesccallback = (void (*)())UiDrawDescCallback; diff --git a/Source/objects.cpp b/Source/objects.cpp index 2a84f0c9b..b16044dfa 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -1534,7 +1534,6 @@ void Obj_Circle(int i) AddMissile(plr[myplr].WorldX, plr[myplr].WorldY, 35, 46, plr[myplr]._pdir, MIS_RNDTELEPORT, 0, myplr, 0, 0); track_repeat_walk(0); sgbMouseDown = 0; - ReleaseCapture(); ClrPlrPath(myplr); StartStand(myplr, 0); } diff --git a/Source/palette.cpp b/Source/palette.cpp index 59b91be81..66eca3fa2 100644 --- a/Source/palette.cpp +++ b/Source/palette.cpp @@ -24,7 +24,6 @@ void palette_init() { LoadGamma(); memcpy(system_palette, orig_palette, sizeof(orig_palette)); - LoadSysPal(); CreatePalette(); } @@ -48,29 +47,6 @@ void LoadGamma() color_cycling_enabled = value; } -void LoadSysPal() -{ - HDC hDC; - int i, iStartIndex; - - for (i = 0; i < 256; i++) - system_palette[i].peFlags = PC_NOCOLLAPSE | PC_RESERVED; - - if (!fullscreen) { - gdwPalEntries = GetDeviceCaps(hDC, NUMRESERVED) / 2; - GetSystemPaletteEntries(hDC, 0, gdwPalEntries, system_palette); - for (i = 0; i < gdwPalEntries; i++) - system_palette[i].peFlags = 0; - - iStartIndex = 256 - gdwPalEntries; - GetSystemPaletteEntries(hDC, iStartIndex, gdwPalEntries, &system_palette[iStartIndex]); - if (iStartIndex < 256) { - for (i = iStartIndex; i < 256; i++) - system_palette[i].peFlags = 0; - } - } -} - void LoadPalette(char *pszFileName) { int i; diff --git a/SourceS/miniwin/com_macro.h b/SourceS/miniwin/com_macro.h index 3707a23c4..df358d4dd 100644 --- a/SourceS/miniwin/com_macro.h +++ b/SourceS/miniwin/com_macro.h @@ -8,8 +8,5 @@ #define DDBLTFAST_WAIT 0x00000010 -#define PC_RESERVED 0x01 -#define PC_NOCOLLAPSE 0x04 - #define ERROR_SUCCESS DVL_ERROR_SUCCESS #define DS_OK DVL_DS_OK diff --git a/SourceS/miniwin/misc.h b/SourceS/miniwin/misc.h index 0d9289e91..90bb22d9c 100644 --- a/SourceS/miniwin/misc.h +++ b/SourceS/miniwin/misc.h @@ -191,8 +191,6 @@ BOOL WINAPI ResetEvent(HANDLE hEvent); int WINAPI WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds); WINBOOL WINAPI SetCursorPos(int X, int Y); -HWND WINAPI SetCapture(HWND hWnd); -WINBOOL WINAPI ReleaseCapture(); SHORT WINAPI GetAsyncKeyState(int vKey); @@ -216,9 +214,6 @@ void WINAPI Sleep(DWORD dwMilliseconds); WINBOOL WINAPI TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c); -int WINAPI GetDeviceCaps(HDC hdc, int index); -UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries); - int WINAPIV wsprintfA(LPSTR, LPCSTR, ...); int WINAPIV wvsprintfA(LPSTR dest, LPCSTR format, va_list arglist); int __cdecl _strcmpi(const char *_Str1, const char *_Str2); diff --git a/SourceX/DiabloUI/diabloui.cpp b/SourceX/DiabloUI/diabloui.cpp index 31c57ddcb..9a8532df2 100644 --- a/SourceX/DiabloUI/diabloui.cpp +++ b/SourceX/DiabloUI/diabloui.cpp @@ -54,7 +54,6 @@ struct { void UiDestroy() { - DUMMY(); ArtHero.Unload(); UnloadTtfFont(); } @@ -369,7 +368,6 @@ char connect_plrinfostr[128]; char connect_categorystr[128]; void UiSetupPlayerInfo(char *infostr, _uiheroinfo *pInfo, DWORD type) { - DUMMY(); SStrCopy(connect_plrinfostr, infostr, 128); char format[32] = ""; strncpy(format, (char *)&type, 4); diff --git a/SourceX/miniwin/misc.cpp b/SourceX/miniwin/misc.cpp index 36471cf42..95541eae0 100644 --- a/SourceX/miniwin/misc.cpp +++ b/SourceX/miniwin/misc.cpp @@ -129,18 +129,6 @@ WINBOOL DeleteFileA(LPCSTR lpFileName) return true; } -HWND SetCapture(HWND hWnd) -{ - DUMMY_ONCE(); - return hWnd; -} - -WINBOOL ReleaseCapture() -{ - DUMMY_ONCE(); - return true; -} - void FakeWMDestroy() { init_cleanup(); @@ -224,24 +212,6 @@ bool SpawnWindow(LPCSTR lpWindowName, int nWidth, int nHeight) return window != NULL; } -int GetDeviceCaps(HDC hdc, int index) -{ - SDL_DisplayMode current; - - if (SDL_GetCurrentDisplayMode(0, ¤t) <= -1) { - SDL_Log(SDL_GetError()); - return 0; - } - - return 0; -} - -UINT GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries) -{ - DUMMY(); - return 0; -} - BOOL GetVersionExA(LPOSVERSIONINFOA lpVersionInformation) { lpVersionInformation->dwMajorVersion = 5; diff --git a/SourceX/storm/storm.cpp b/SourceX/storm/storm.cpp index 981674a79..51ae016e2 100644 --- a/SourceX/storm/storm.cpp +++ b/SourceX/storm/storm.cpp @@ -300,12 +300,6 @@ BOOL SBmpLoadImage(const char *pszFileName, PALETTEENTRY *pPalette, BYTE *pBuffe return true; } -HWND SDrawGetFrameWindow(HWND *sdraw_framewindow) -{ - DUMMY(); - return NULL; -} - void *SMemAlloc(unsigned int amount, char *logfilename, int logline, int defaultValue) { // fprintf(stderr, "%s: %d (%s:%d)\n", __FUNCTION__, amount, logfilename, logline);