Browse Source

Merge pull request #304 from galaxyhaxz/nightly

Implement "hero list" in DiabloUI
pull/4/head
galaxyhaxz 8 years ago committed by GitHub
parent
commit
e5c1e000d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      3rdParty/Storm/Source/storm.cpp
  2. 2
      3rdParty/Storm/Source/storm.def
  3. 1
      3rdParty/Storm/Source/storm.h
  4. 3
      3rdParty/Storm/Source/storm_gcc.def
  5. 19
      DiabloUI/_temp_data.cpp
  6. 59
      DiabloUI/_temp_funcs.h
  7. 299
      DiabloUI/sbar.cpp
  8. 4
      DiabloUI/selhero.cpp
  9. 819
      DiabloUI/sellist.cpp
  10. 12
      DiabloUI/selregn.cpp

1
3rdParty/Storm/Source/storm.cpp vendored

@ -93,6 +93,7 @@ BOOL STORMAPI SFileLoadFileEx(void *hArchive, char *filename, int a3, int a4, in
BOOL STORMAPI SBltROP3(void *lpDstBuffer, void *lpSrcBuffer, int width, int height, int a5, int a6, int a7, DWORD rop) rBool;
BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop) rBool;
BOOL STORMAPI SBltROP3Tiled(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop) rBool;
BOOL STORMAPI SBmpDecodeImage(DWORD dwImgType, void *pSrcBuffer, DWORD dwSrcBuffersize, PALETTEENTRY *pPalette, void *pDstBuffer, DWORD dwDstBuffersize, DWORD *pdwWidth, DWORD *pdwHeight, DWORD *pdwBpp) rBool;

2
3rdParty/Storm/Source/storm.def vendored

@ -134,7 +134,7 @@ EXPORTS
;SBltGetSCode @312 NONAME
SBltROP3 @313 NONAME
SBltROP3Clipped @314 NONAME
;SBltROP3Tiled @315 NONAME
SBltROP3Tiled @315 NONAME
SBmpDecodeImage @321 NONAME

1
3rdParty/Storm/Source/storm.h vendored

@ -538,6 +538,7 @@ BOOL STORMAPI SFileLoadFileEx(void *hArchive, char *filename, int a3, int a4, in
BOOL STORMAPI SBltROP3(void *lpDstBuffer, void *lpSrcBuffer, int srcDrawWidth, int srcDrawHeight, int dstWidth, int srcWidth, int a7, DWORD rop);
BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop);
BOOL STORMAPI SBltROP3Tiled(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop);
#define SBMP_DEFAULT 0
#define SBMP_BMP 1

3
3rdParty/Storm/Source/storm_gcc.def vendored

@ -177,7 +177,8 @@ EXPORTS
;SBltGetSCode @312 NONAME
SBltROP3 @313 NONAME
SBltROP3Clipped @314 NONAME
;SBltROP3Tiled @315 NONAME
SBltROP3Tiled @315 NONAME
SBltROP3Tiled@40 @315 NONAME
SBmpDecodeImage @321 NONAME

19
DiabloUI/_temp_data.cpp

@ -16,7 +16,10 @@ int fade_cpp_float_value = 2139095040; // weak
int focus_cpp_float_value = 2139095040; // weak
int local_cpp_float_value = 2139095040; // weak
int mainmenu_cpp_float_value = 2139095040; // weak
int Sbar_cpp_float_value = 2139095040; // weak
int Sbar_cpp_float_value2 = 2139095040; // weak
int SelHero_cpp_float_value = 2139095040; // weak
int SelList_cpp_float_value = 2139095040; // weak
int SelYesNo_cpp_float_value = 2139095040; // weak
int Title_cpp_float_value = 2139095040; // weak
int titlesnd_cpp_float_value = 2139095040; // weak
@ -75,10 +78,10 @@ int dword_100230FC[2] = { 1097, 0 };
int dword_10023104[2] = { 1098, 0 };
int dword_1002310C[3] = { 1056, 1054, 0 };
int dword_10023118[7] = { 1088, 1089, 1090, 1091, 1092, 1093, 0 };
int dword_10023174[2] = { 1038, 0 };
int dword_1002317C[3] = { 1056, 1054, 0 };
int dword_10023188[2] = { 1006, 0 };
int dword_10023190[7] = { 1047, 1048, 1049, 1050, 1051, 1052, 0 };
int sellist_msgtbl1[2] = { 1038, 0 };
int sellist_msgtbl2[3] = { 1056, 1054, 0 };
int sellist_msgtbl3[2] = { 1006, 0 };
int sellist_msgtbl4[7] = { 1047, 1048, 1049, 1050, 1051, 1052, 0 };
int dword_100231AC[2] = { 1038, 0 };
int dword_100231B4[3] = { 1056, 1054, 0 };
int dword_100231C0[3] = { 1106, 1107, 0 };
@ -279,8 +282,8 @@ BYTE *dword_1002A31C; // idb
BYTE *dword_1002A320; // idb
BYTE *dword_1002A324; // idb
void *dword_1002A328; // idb
int dword_1002A338; // weak
int dword_1002A344; // weak
int Sbar_cpp_float; // weak
int Sbar_cpp_float2; // weak
int dword_1002A348; // weak
int dword_1002A34C; // idb
int dword_1002A350; // weak
@ -329,8 +332,8 @@ int dword_1002A4B0; // weak
int dword_1002A4B4; // weak
int dword_1002A4B8; // idb
int dword_1002A4BC; // weak
int dword_1002A4C0; // weak
int dword_1002A4C4; // weak
int SelList_cpp_float; // weak
_uiheroinfo *sellist_pheroinfo;
int dword_1002A4C8; // weak
int dword_1002A4CC; // weak
int dword_1002A4D0; // weak

59
DiabloUI/_temp_funcs.h

@ -358,13 +358,15 @@ void UNKCALL Progress_100098C5(HWND hWnd);
BOOL UNKCALL Progress_1000991C(HWND hWnd);
signed int Sbar_100099B5();
int UNKCALL Sbar_100099C0(HWND hWnd); // idb
int __fastcall Sbar_100099DC(HWND hWnd, LONG a2, int a3);
HWND __fastcall Sbar_10009A99(HWND hDlg, int nIDDlgItem, int a3, int a4);
HWND __fastcall Sbar_10009BF1(HWND hDlg, int nIDDlgItem);
signed int Sbar_10009CC7();
HWND __fastcall Sbar_10009CD2(HWND hDlg, int nIDDlgItem);
void __cdecl j_Sbar_cpp_init();
void __cdecl Sbar_cpp_init();
BOOL __fastcall Sbar_CheckIfNextHero(HWND hWnd);
int __fastcall Sbar_NumScrollLines(HWND hWnd, int width, int height);
void __fastcall Sbar_DrawScrollBar(HWND hWnd, int nIDDlgItem, int width, int height);
void __fastcall Sbar_LoadScrBarGFX(HWND hWnd, int nIDDlgItem);
void __cdecl j_Sbar_cpp_init2();
void __cdecl Sbar_cpp_init2();
void __fastcall Sbar_FreeScrollBar(HWND hWnd, int nIDDlgItem);
LRESULT __stdcall SelClass_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb
@ -503,26 +505,27 @@ int __fastcall SelIPX_1000D5B0(int a1, int a2);
HWND __fastcall SelIPX_1000D696(HWND hDlg, int a2, int height);
signed int SelList_1000D769();
LRESULT __stdcall SelList_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb
HWND UNKCALL SelList_1000D916(HWND hDlg);
HWND __fastcall SelList_1000D964(HWND hDlg, int nIDDlgItem);
HWND UNKCALL SelList_1000D9CF(HWND hDlg);
int UNKCALL SelList_1000D9F4(HWND hWnd); // idb
int UNKCALL SelList_1000DA2D(void *arg);
int UNKCALL SelList_1000DA48(void *arg);
int UNKCALL SelList_1000DA55(HWND hWnd); // idb
int __fastcall SelList_1000DB2C(HWND a1, const char *a2);
void UNKCALL SelList_1000DBAC(HWND hDlg);
LRESULT __stdcall SelList_1000DBFE(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
HWND UNKCALL SelList_1000DD36(HWND hWnd);
HWND UNKCALL SelList_1000DDA7(HWND hWnd);
HWND UNKCALL SelList_1000DE18(HWND hWnd);
_DWORD *UNKCALL SelList_1000DEDD(char *arg);
HWND UNKCALL SelList_1000DEF4(HWND hWnd);
HWND UNKCALL SelList_1000DFAB(HWND hWnd);
HWND UNKCALL SelList_1000E043(HWND hWnd);
int __fastcall SelList_1000E0CA(HWND hWnd, int, int); // idb
void __cdecl j_SelList_cpp_init();
void __cdecl SelList_cpp_init();
LRESULT __stdcall SelList_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void __fastcall SelList_DeleteFreeProcs(HWND hWnd);
void __fastcall SelList_GetHeroStats(HWND hWnd, int nIDDlgItem);
void __fastcall SelList_CountHeroList(HWND hWnd);
int __fastcall SelList_GetNextHeroLong(HWND hWnd);
void __fastcall SelList_LoadFocus16(HWND hWnd);
void __fastcall SelList_KillFocus16(HWND hWnd);
void __fastcall SelList_ShowListWindow(HWND hWnd);
void __fastcall SelList_SetHeroDlgLong(HWND hWnd, _uiheroinfo *pInfo);
void __fastcall SelList_DoListOldProc(HWND hWnd);
LRESULT __stdcall SelList_OldListWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void __fastcall SelList_ShiftHeroDlgItems(HWND hWnd);
void __fastcall SelList_ShiftHeroDlgItm2(HWND hWnd);
void __fastcall SelList_HeroesWithBigDialogs(HWND hWnd);
_uiheroinfo *__fastcall SelList_GetHeroFromNum(int heronum);
void __fastcall SelList_HeroesWithHugeDlg(HWND hWnd);
void __fastcall SelList_HeroDlgWithSound(HWND hWnd);
void __fastcall SelList_HeroDlgWithSnd2(HWND hWnd);
void __fastcall SelList_ChooseDlgFromSize(HWND hWnd, int width, int height);
LRESULT __stdcall SelLoad_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb
@ -563,7 +566,7 @@ HWND __fastcall SelModem_1000EE78(HWND hWnd, int a2, int height);
void *SelRegn_1000EF42();
_DWORD *__fastcall SelRegn_1000EF56(int a1, _DWORD *a2);
_uiheroinfo *__fastcall SelRegn_SetNextHero(_uiheroinfo *pNext, _uiheroinfo *pCurrent);
signed int SelRegn_1000EF60();
int __stdcall SelRegn_1000EF6B(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb
HWND __fastcall SelRegn_1000F0D7(HWND hDlg, int nIDDlgItem);

299
DiabloUI/sbar.cpp

@ -1,49 +1,42 @@
// ref: 0x100099B5
signed int Sbar_100099B5() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_1002A338 = 2139095040;
return result;
} */
// 1002A338: using guessed type int dword_1002A338;
void __cdecl Sbar_cpp_init()
{
Sbar_cpp_float = Sbar_cpp_float_value;
}
// 1001F448: using guessed type int Sbar_cpp_float_value;
// 1002A338: using guessed type int Sbar_cpp_float;
// ref: 0x100099C0
int UNKCALL Sbar_100099C0(HWND hWnd) { return 0; }
/* {
_DWORD *v1; // eax
BOOL __fastcall Sbar_CheckIfNextHero(HWND hWnd)
{
_uiheroinfo *v1; // eax
v1 = (_DWORD *)GetWindowLongA(hWnd, -21);
if ( !v1 || !*v1 )
v1 = (_uiheroinfo *)GetWindowLongA(hWnd, -21);
if ( !v1 || !v1->next )
return 0;
*v1 = 0;
v1->next = 0;
return 1;
} */
}
// ref: 0x100099DC
int __fastcall Sbar_100099DC(HWND hWnd, LONG a2, int a3) { return 0; }
/* {
HWND v3; // esi
int __fastcall Sbar_NumScrollLines(HWND hWnd, int width, int height)
{
_DWORD *v4; // eax
_DWORD *v5; // esi
int result; // eax
signed int v7; // ecx
LONG v8; // ebx
LONG v9; // edi
signed int v10; // [esp-4h] [ebp-1Ch]
int v10; // [esp-4h] [ebp-1Ch]
struct tagPOINT Point; // [esp+Ch] [ebp-Ch]
HWND hWnda; // [esp+14h] [ebp-4h]
v3 = hWnd;
hWnda = hWnd;
Point.x = a2;
Point.y = a3;
Point.x = width;
Point.y = height;
if ( !hWnd )
return 0;
if ( !IsWindowVisible(hWnd) )
return 0;
v4 = (_DWORD *)GetWindowLongA(v3, -21);
v4 = (_DWORD *)GetWindowLongA(hWnd, -21);
v5 = v4;
if ( !v4 )
return 0;
@ -53,7 +46,7 @@ int __fastcall Sbar_100099DC(HWND hWnd, LONG a2, int a3) { return 0; }
else
v8 = v4[14] * (v4[3] - v4[9] - 44) / (v7 - 1) + 22;
v9 = v8 + v4[9];
ScreenToClient(hWnda, &Point);
ScreenToClient(hWnd, &Point);
if ( Point.y >= 22 )
{
if ( Point.y >= v8 )
@ -90,187 +83,163 @@ int __fastcall Sbar_100099DC(HWND hWnd, LONG a2, int a3) { return 0; }
*v5 = 1;
}
return result;
} */
}
// ref: 0x10009A99
HWND __fastcall Sbar_10009A99(HWND hDlg, int nIDDlgItem, int a3, int a4) { return 0; }
/* {
HWND result; // eax
HWND v5; // esi
bool v6; // zf
int v7; // eax
int v8; // [esp+Ch] [ebp-24h]
int v9; // [esp+10h] [ebp-20h]
int v10; // [esp+14h] [ebp-1Ch]
int v11; // [esp+18h] [ebp-18h]
int v12; // [esp+1Ch] [ebp-14h]
int v13; // [esp+20h] [ebp-10h]
int v14; // [esp+24h] [ebp-Ch]
int v15; // [esp+28h] [ebp-8h]
HWND hWnd; // [esp+2Ch] [ebp-4h]
void __fastcall Sbar_DrawScrollBar(HWND hWnd, int nIDDlgItem, int width, int height)
{
HWND v4; // eax
LONG v5; // eax MAPDST
bool v7; // zf
int v8; // eax
tagRECT DstRect; // [esp+Ch] [ebp-24h]
tagRECT SrcBuffer; // [esp+1Ch] [ebp-14h]
HWND hWnda; // [esp+2Ch] [ebp-4h]
result = GetDlgItem(hDlg, nIDDlgItem);
hWnd = result;
if ( result )
v4 = GetDlgItem(hWnd, nIDDlgItem);
hWnda = v4;
if ( v4 )
{
result = (HWND)GetWindowLongA(result, -21);
v5 = result;
if ( result )
v5 = GetWindowLongA(v4, -21);
if ( v5 )
{
if ( *((_DWORD *)result + 1) )
if ( *(_DWORD *)(v5 + 4) )
{
v6 = *((_DWORD *)result + 4) == 0;
*((_DWORD *)result + 13) = a3;
result = (HWND)a4;
*((_DWORD *)v5 + 14) = a4;
if ( !v6 )
v7 = *(_DWORD *)(v5 + 16) == 0;
*(_DWORD *)(v5 + 52) = width;
*(_DWORD *)(v5 + 56) = height;
if ( !v7 )
{
v12 = 0;
v8 = 0;
v13 = 0;
v9 = 0;
v10 = *((_DWORD *)v5 + 2) - 1;
v11 = *((_DWORD *)v5 + 3) - 1;
v14 = *((_DWORD *)v5 + 2) - 1;
v15 = *((_DWORD *)v5 + 6) - 1;
result = (HWND)SBltROP3Tiled(
*((_DWORD *)v5 + 1),
&v8,
*((_DWORD *)v5 + 2),
*((_DWORD *)v5 + 4),
&v12,
*((_DWORD *)v5 + 5),
0,
0,
0,
13369376);
if ( *((_DWORD *)v5 + 7) )
SrcBuffer.left = 0;
DstRect.left = 0;
SrcBuffer.top = 0;
DstRect.top = 0;
DstRect.right = *(_DWORD *)(v5 + 8) - 1;
DstRect.bottom = *(_DWORD *)(v5 + 12) - 1;
SrcBuffer.right = *(_DWORD *)(v5 + 8) - 1;
SrcBuffer.bottom = *(_DWORD *)(v5 + 24) - 1;
SBltROP3Tiled(
*(void **)(v5 + 4),
&DstRect,
*(POINT **)(v5 + 8),
*(_DWORD *)(v5 + 16),
&SrcBuffer,
*(RECT **)(v5 + 20),
0,
0,
0,
0xCC0020u);
if ( *(_DWORD *)(v5 + 28) )
{
if ( a3 <= 1 )
v7 = 22;
if ( width <= 1 )
v8 = 22;
else
v7 = a4 * (*((_DWORD *)v5 + 3) - *((_DWORD *)v5 + 9) - 44) / (a3 - 1) + 22;
v8 = height * (*(_DWORD *)(v5 + 12) - *(_DWORD *)(v5 + 36) - 44) / (width - 1) + 22;
SBltROP3(
v7 * *((_DWORD *)v5 + 2) + *((_DWORD *)v5 + 1) + 3,
*((_DWORD *)v5 + 7),
(void *)(v8 * *(_DWORD *)(v5 + 8) + *(_DWORD *)(v5 + 4) + 3),
*(void **)(v5 + 28),
18,
*((_DWORD *)v5 + 9),
*((_DWORD *)v5 + 2),
*((_DWORD *)v5 + 8),
*(_DWORD *)(v5 + 36),
*(_DWORD *)(v5 + 8),
*(_DWORD *)(v5 + 32),
0,
13369376);
0xCC0020u);
SBltROP3(
*((_DWORD *)v5 + 1),
*((_DWORD *)v5 + 10) + 22 * (~*(_BYTE *)v5 & 1) * *((_DWORD *)v5 + 11),
*((_DWORD *)v5 + 2),
*(void **)(v5 + 4),
(void *)(*(_DWORD *)(v5 + 40) + 22 * (~*(_BYTE *)v5 & 1) * *(_DWORD *)(v5 + 44)),
*(_DWORD *)(v5 + 8),
22,
*((_DWORD *)v5 + 2),
*((_DWORD *)v5 + 11),
*(_DWORD *)(v5 + 8),
*(_DWORD *)(v5 + 44),
0,
13369376);
0xCC0020u);
SBltROP3(
*((_DWORD *)v5 + 1) + *((_DWORD *)v5 + 2) * (*((_DWORD *)v5 + 3) - 22),
*((_DWORD *)v5 + 10) + 22 * ((~*(_BYTE *)v5 & 4 | 8u) >> 2) * *((_DWORD *)v5 + 11),
*((_DWORD *)v5 + 2),
(void *)(*(_DWORD *)(v5 + 4) + *(_DWORD *)(v5 + 8) * (*(_DWORD *)(v5 + 12) - 22)),
(void *)(*(_DWORD *)(v5 + 40) + 22 * ((~*(_BYTE *)v5 & 4 | 8u) >> 2) * *(_DWORD *)(v5 + 44)),
*(_DWORD *)(v5 + 8),
22,
*((_DWORD *)v5 + 2),
*((_DWORD *)v5 + 11),
*(_DWORD *)(v5 + 8),
*(_DWORD *)(v5 + 44),
0,
13369376);
result = (HWND)InvalidateRect(hWnd, 0, 0);
0xCC0020u);
InvalidateRect(hWnda, 0, 0);
}
}
}
}
}
return result;
} */
// 100103F4: using guessed type int __stdcall SBltROP3(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 1001046C: using guessed type int __stdcall SBltROP3Tiled(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
}
// ref: 0x10009BF1
HWND __fastcall Sbar_10009BF1(HWND hDlg, int nIDDlgItem) { return 0; }
/* {
HWND result; // eax
HWND v3; // esi
void __fastcall Sbar_LoadScrBarGFX(HWND hWnd, int nIDDlgItem)
{
DWORD *v2; // eax MAPDST
void *v4; // eax
struct tagRECT Rect; // [esp+Ch] [ebp-14h]
HWND hWnd; // [esp+1Ch] [ebp-4h]
HWND hWnda; // [esp+1Ch] [ebp-4h]
result = GetDlgItem(hDlg, nIDDlgItem);
hWnd = result;
if ( result )
hWnda = GetDlgItem(hWnd, nIDDlgItem);
if ( hWnda )
{
result = (HWND)SMemAlloc(60, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 221, 0);
v3 = result;
if ( result )
v2 = (DWORD *)SMemAlloc(0x3Cu, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 221, 0);
if ( v2 )
{
SetWindowLongA(hWnd, -21, (LONG)result);
*(_DWORD *)v3 = 0;
GetClientRect(hWnd, &Rect);
*(_DWORD *)(v3 + 2) = Rect.right;
*(_DWORD *)(v3 + 3) = Rect.bottom;
result = (HWND)SMemAlloc(Rect.right * Rect.bottom, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 230, 0);
*((_DWORD *)v3 + 1) = result;
if ( result )
SetWindowLongA(hWnda, -21, (LONG)v2);
*v2 = 0;
GetClientRect(hWnda, &Rect);
v2[2] = Rect.right;
v2[3] = Rect.bottom;
v4 = SMemAlloc(Rect.right * Rect.bottom, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 230, 0);
v2[1] = (DWORD)v4;
if ( v4 )
{
SDlgSetBitmapI(hWnd, 0, &byte_10029448, -1, 1, result, 0, *((_DWORD *)v3 + 2), *((_DWORD *)v3 + 3), -1);
local_100078BE((int)"ui_art\\sb_bg.pcx", (int *)v3 + 4, (_DWORD *)v3 + 5);
local_100078BE((int)"ui_art\\sb_thumb.pcx", (int *)v3 + 7, (_DWORD *)v3 + 8);
result = (HWND)local_100078BE((int)"ui_art\\sb_arrow.pcx", (int *)v3 + 10, (_DWORD *)v3 + 11);
SDlgSetBitmapI(hWnda, 0, &nullcharacter, -1, 1, v4, 0, v2[2], v2[3], -1);
local_LoadArtImage("ui_art\\sb_bg.pcx", (BYTE **)v2 + 4, v2 + 5);
local_LoadArtImage("ui_art\\sb_thumb.pcx", (BYTE **)v2 + 7, v2 + 8);
local_LoadArtImage("ui_art\\sb_arrow.pcx", (BYTE **)v2 + 10, v2 + 11);
}
}
}
return result;
} */
// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD);
// 10010400: using guessed type int __stdcall SDlgSetBitmapI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
}
// ref: 0x10009CC7
signed int Sbar_10009CC7() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_1002A344 = 2139095040;
return result;
} */
// 1002A344: using guessed type int dword_1002A344;
void __cdecl Sbar_cpp_init2()
{
Sbar_cpp_float2 = Sbar_cpp_float_value2;
}
// 1001F44C: using guessed type int Sbar_cpp_float_value2;
// 1002A344: using guessed type int Sbar_cpp_float2;
// ref: 0x10009CD2
HWND __fastcall Sbar_10009CD2(HWND hDlg, int nIDDlgItem) { return 0; }
/* {
HWND result; // eax
HWND v3; // ebp
HWND v4; // esi
int v5; // eax
int v6; // eax
int v7; // eax
int v8; // eax
void __fastcall Sbar_FreeScrollBar(HWND hWnd, int nIDDlgItem)
{
HWND v2; // eax MAPDST
_DWORD *v4; // eax MAPDST
void *v6; // eax
void *v7; // eax
void *v8; // eax
void *v9; // eax
result = GetDlgItem(hDlg, nIDDlgItem);
v3 = result;
if ( result )
v2 = GetDlgItem(hWnd, nIDDlgItem);
if ( v2 )
{
result = (HWND)GetWindowLongA(result, -21);
v4 = result;
if ( result )
v4 = (_DWORD *)GetWindowLongA(v2, -21);
if ( v4 )
{
v5 = *((_DWORD *)result + 1);
if ( v5 )
SMemFree(v5, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 267, 0);
v6 = *((_DWORD *)v4 + 4);
v6 = (void *)v4[1];
if ( v6 )
SMemFree(v6, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 269, 0);
v7 = *((_DWORD *)v4 + 7);
SMemFree(v6, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 267, 0);
v7 = (void *)v4[4];
if ( v7 )
SMemFree(v7, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 271, 0);
v8 = *((_DWORD *)v4 + 10);
SMemFree(v7, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 269, 0);
v8 = (void *)v4[7];
if ( v8 )
SMemFree(v8, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 273, 0);
SMemFree(v8, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 271, 0);
v9 = (void *)v4[10];
if ( v9 )
SMemFree(v9, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 273, 0);
SMemFree(v4, "C:\\Src\\Diablo\\DiabloUI\\Sbar.cpp", 275, 0);
result = (HWND)SetWindowLongA(v3, -21, 0);
SetWindowLongA(v2, -21, 0);
}
}
return result;
} */
// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD);
}

4
DiabloUI/selhero.cpp

@ -729,7 +729,7 @@ void __fastcall SelHero_SelectHeroRegion(HWND hWnd)
v2->next = 0;
LoadStringA(ghUiInst, 0x1Eu, v2->name, 15);
v2->level = 0;
sgpHeroInfo = (_uiheroinfo *)SelRegn_1000EF56((int)sgpHeroInfo, (unsigned int *)v2);
sgpHeroInfo = SelRegn_SetNextHero(sgpHeroInfo, v2);
v3 = sgpHeroInfo;
selhero_numheroesleft = 1;
if ( !selhero_fninfo(SelHero_GetHeroInfo) )
@ -753,7 +753,7 @@ BOOL __stdcall SelHero_GetHeroInfo(_uiheroinfo *pInfo)
v1 = SelHero_AllocHeroInfo();
memcpy(v1, pInfo, 0x2Cu);
v1->next = 0;
v2 = (_uiheroinfo *)SelRegn_1000EF56((int)sgpHeroInfo, (unsigned int *)v1);
v2 = SelRegn_SetNextHero(sgpHeroInfo, v1);
++selhero_numheroesleft;
sgpHeroInfo = v2;
return 1;

819
DiabloUI/sellist.cpp

File diff suppressed because it is too large Load Diff

12
DiabloUI/selregn.cpp

@ -6,14 +6,14 @@ void *SelRegn_1000EF42() { return 0; }
// 10010364: using guessed type int __stdcall SMemAlloc(_DWORD, _DWORD, _DWORD, _DWORD);
// ref: 0x1000EF56
_DWORD *__fastcall SelRegn_1000EF56(int a1, _DWORD *a2) { return 0; }
/* {
_DWORD *result; // eax
_uiheroinfo *__fastcall SelRegn_SetNextHero(_uiheroinfo *pNext, _uiheroinfo *pCurrent)
{
_uiheroinfo *result; // eax
result = a2;
*a2 = a1;
result = pCurrent;
pCurrent->next = pNext;
return result;
} */
}
// ref: 0x1000EF60
signed int SelRegn_1000EF60() { return 0; }

Loading…
Cancel
Save