Browse Source

Correct UiProgressDialog signature

pull/25/head
Anders Jenbo 7 years ago
parent
commit
28be6f5c33
  1. 2
      DiabloUI/diabloui.h
  2. 8
      DiabloUI/progress.cpp

2
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();

8
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);

Loading…
Cancel
Save