From 28be6f5c33c7103cc76ec6222fb2a3621469be60 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 2 Feb 2019 05:12:03 +0100 Subject: [PATCH] Correct UiProgressDialog signature --- DiabloUI/diabloui.h | 2 +- DiabloUI/progress.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DiabloUI/diabloui.h b/DiabloUI/diabloui.h index 98e5875be..e8cc8910e 100644 --- a/DiabloUI/diabloui.h +++ b/DiabloUI/diabloui.h @@ -35,7 +35,7 @@ BOOL __stdcall UiSelHeroMultDialog(BOOL(__stdcall *fninfo)(BOOL(__stdcall *fninf BOOL __stdcall UiSelHeroSingDialog(BOOL(__stdcall *fninfo)(BOOL(__stdcall *fninfofunc)(_uiheroinfo *)), BOOL(__stdcall *fncreate)(_uiheroinfo *), BOOL(__stdcall *fnremove)(_uiheroinfo *), BOOL(__stdcall *fnstats)(unsigned int, _uidefaultstats *), int *dlgresult, char *name, int *difficulty); BOOL __stdcall UiCreditsDialog(int a1); BOOL __stdcall UiMainMenuDialog(char *name, int *pdwResult, void(__stdcall *fnSound)(char *file), int a4); -int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5); +int __stdcall UiProgressDialog(HWND window, char *msg, int enable, int(__cdecl *fnfunc)(), int rate); int __cdecl UiProfileGetString(); void __cdecl UiProfileCallback(); void __cdecl UiProfileDraw(); diff --git a/DiabloUI/progress.cpp b/DiabloUI/progress.cpp index 7edaeb52f..17cf93e77 100644 --- a/DiabloUI/progress.cpp +++ b/DiabloUI/progress.cpp @@ -10,7 +10,7 @@ signed int Progress_10009480() { return 0; } // 1002A2EC: using guessed type int dword_1002A2EC; // ref: 0x1000948B -int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5) { return 0; } +int __stdcall UiProgressDialog(HWND window, char *msg, int enable, int(__cdecl *fnfunc)(), int rate) { return 0; } /* { HWND v5; // eax BOOL result; // eax @@ -18,8 +18,8 @@ int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int dword_1002A2E8 = -1; dword_1002A2F8 = 0; dword_1002A2F4 = a4; - bEnable = a3; - dword_1002A2F0 = a5; + bEnable = enable; + dword_1002A2F0 = rate; v5 = (HWND)SDlgCreateDialogParam(hInstance, "PROGRESS_DIALOG", a1, Progress_100094F4, a2); result = 0; if ( v5 ) @@ -148,7 +148,7 @@ BOOL __fastcall Progress_10009675(HWND hWnd, const CHAR *a2) { return 0; } v10 = 2; v11 = 0; if ( dword_1002A2F0 ) - SDlgSetTimer(hWnd, 1, 0x3E8u / dword_1002A2F0, 0); + SDlgSetTimer(hWnd, 1, 1000 / dword_1002A2F0, 0); else SDlgSetTimer(hWnd, 1, 50, 0); local_10007944((int)v2, 0, &byte_10029448, -1, 1, (int)"ui_art\\spopup.pcx", &dword_1002A318, 0, 0);