Browse Source

Implement doom/focus/titlesnd.cpp (#220)

pull/4/head
galaxyhaxz 8 years ago committed by Anders Jenbo
parent
commit
508ed542e4
  1. 23
      DiabloUI/_temp_data.cpp
  2. 77
      DiabloUI/_temp_funcs.h
  3. 560
      DiabloUI/doom.cpp
  4. 334
      DiabloUI/focus.cpp
  5. 64
      DiabloUI/titlesnd.cpp

23
DiabloUI/_temp_data.cpp

@ -8,8 +8,11 @@ ProfileStruct bnprofiles[4] =
};
int profilemsg1[6] = { 1125, 1127, 1129, 1131, 1133, 0 };
int profilemsg2[6] = { 1126, 1128, 1130, 1132, 1134, 0 };
int doom_cpp_float_value = 2139095040; // weak
int fade_cpp_float_value = 2139095040; // weak
int focus_cpp_float_value = 2139095040; // weak
int local_cpp_float_value = 2139095040; // weak
int titlesnd_cpp_float_value = 2139095040; // weak
int dword_10022258 = 4; // weak
ProfFntStruct proffnts[4] =
{
@ -112,7 +115,7 @@ void *dword_1002942C; // idb
int (__stdcall *dword_10029430)(_DWORD, _DWORD, _DWORD, _DWORD); // weak
void *dword_10029434; // idb
int dword_10029438[4]; // weak
char byte_10029448; // idb
char *wndtext_pointer; /* check */
HGDIOBJ dword_10029450; // idb
int dword_10029454; // weak
int dword_10029458; // weak
@ -206,7 +209,7 @@ int dword_10029844; // weak
void *dword_10029848; // idb
int dword_1002984C; // weak
int dword_10029850; // weak
int dword_10029854; // weak
int doom_cpp_float; // weak
LPSTR dword_10029858; // idb
int dword_1002985C; // weak
int dword_10029860; // weak
@ -215,14 +218,14 @@ int fade_cpp_float; // weak
int sgbFadeRange; // idb
tagPALETTEENTRY fadepal[256];
int sgbIsFading; // weak
HANDLE dword_10029C78; // idb
int dword_10029C98; // weak
int dword_10029C9C; // weak
int dword_10029CA0; // weak
int dword_10029CA4; // weak
HANDLE SpinnerTransOut[8];
int focus_spin_width; // idb
int focus_spin_height; // weak
int focus_cpp_float; // weak
int sgbSpinnersLoaded; // weak
int dword_10029CA8; // weak
int dword_10029CAC; // weak
int dword_10029CB0; // weak
int sgnSpinnerFrame; // weak
int local_cpp_float; // weak
int gdwCursWidth; // weak
int gdwCursHeight; // weak
@ -345,5 +348,5 @@ int dword_1002A50C; // weak
HANDLE dword_1002A510; // idb
int dword_1002A588; // weak
int dword_1002A58C; // weak
int dword_1002A590; // weak
int (__stdcall *dword_1002A594)(_DWORD); // weak
int titlesnd_cpp_float; // weak
void (__stdcall *gfnSoundFunction)(char *file);

77
DiabloUI/_temp_funcs.h

@ -190,25 +190,26 @@ int UNKCALL disclaim_10006552(void *arg);
signed int disclaim_10006571();
signed int Doom_10006581();
int __fastcall Doom_1000658C(HWND hWnd, int *a2, int a3, int a4);
void __fastcall Doom_100065BB(HWND hWnd, HWND a2, int a3, int a4);
_DWORD *__fastcall Doom_1000663F(HWND hWnd, int a2);
BOOL __fastcall Doom_10006719(int a1, HWND a2, int flags);
_DWORD *__fastcall Doom_1000678A(HWND hWnd, HWND a2);
int __fastcall Doom_1000680A(HWND hDlg, int *a2, int a3, int a4);
void __fastcall Doom_10006839(HWND a1, HWND a2, char *a3, int a4);
int __fastcall Doom_100068AB(HWND hWnd, int *a2, int a3);
void __fastcall Doom_100068D6(HWND hWnd, HWND a2, int a3);
_DWORD *__fastcall Doom_1000695D(HWND hWnd, int a2);
int __fastcall Doom_10006A13(HWND hDlg, int *a2, int a3);
void __fastcall Doom_10006A3E(HWND a1, HWND a2, char *a3);
int __fastcall Doom_10006AB8(HWND hWnd, int *a2, int a3);
void __fastcall Doom_10006AE3(HWND hWnd, HWND a2, int a3);
void UNKCALL Doom_10006B12(HWND hWnd);
int __fastcall Doom_10006C08(HWND hDlg, int *a2, int a3);
void __fastcall Doom_10006C33(HWND a1, HWND a2, char *a3);
int __fastcall Doom_10006C53(HWND hDlg, int *a2);
void __cdecl j_Doom_cpp_init();
void __cdecl Doom_cpp_init();
void __fastcall Doom_ParseWndProcs(HWND hWnd, int *msgtbl, int a3, int a4);
void __fastcall Doom_GetSetWndText(HWND hWnd, int msg, int nFont, int a4);
void __fastcall Doom_PrintStrWithSpin(HWND hWnd, BOOL a2);
void __fastcall Doom_AllocAndSetBMP(HWND hWnd, int bmp_flags);
void __fastcall Doom_GetWindowROP3(HWND hWnd1, HWND hWnd2);
void __fastcall Doom_ParseWndProc2(HWND hWnd, int *msgtbl, int a3, int a4);
void __fastcall Doom_GetSetWndTxt2(HWND hWnd, int msg, int nFont, int a4);
void __fastcall Doom_ParseWndProc3(HWND hWnd, int *msgtbl, int a3);
void __fastcall Doom_GetSetWndTxt3(HWND hWnd, int msg, int nFont);
void __fastcall Doom_PrintStrWithSpn2(HWND hWnd, int justify_type);
void __fastcall Doom_ParseWndProc4(HWND hWnd, int *msgtbl, int a3);
void __fastcall Doom_GetSetWndTxt4(HWND hWnd, int msg, int nFont);
void __fastcall Doom_ParseWndProc5(HWND hWnd, int *msgtbl, int a3);
void __fastcall Doom_GetSetWndTxt5(HWND hWnd, int msg, int nFont);
void __fastcall Doom_PrintTextMsg403(HWND hWnd);
void __fastcall Doom_ParseWndProc6(HWND hWnd, int *msgtbl, int a3);
void __fastcall Doom_GetSetWndTxt6(HWND hWnd, int msg, int nFont);
void __fastcall Doom_DeleteFreeProcs(HWND hWnd, int *msgtbl);
int __stdcall EntDial_10006C96(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); // idb
@ -240,19 +241,20 @@ void __cdecl j_Fade_cpp_init();
void __cdecl Fade_cpp_init();
int (__stdcall *UNKCALL Focus_10007458(void *arg))(_DWORD);
int Focus_10007482();
_DWORD *__fastcall Focus_10007492(HWND hWnd, HWND a2);
BOOL UNKCALL Focus_10007566(HWND hWnd);
_DWORD *__fastcall Focus_100075B7(HWND hWnd, HWND a2);
int __fastcall Focus_100075DC(HWND hWnd, HWND a2); // idb
int Focus_100076C3();
void Focus_100076FA();
signed int Focus_1000770E();
void UNKCALL Focus_10007719(const char *arg);
int __fastcall Focus_100077E9(int a1, const char *a2, HWND hWnd);
int __stdcall Focus_10007804(HWND hWnd, int a2, int a3, int a4);
int UNKCALL Focus_10007818(void *arg);
void __fastcall Focus_CheckPlayMove(LPARAM lParam);
int __cdecl Focus_GetSpinWidthOrZero();
void __fastcall Focus_BlitSpinner(HWND hWnd1, HWND hWnd2);
void __fastcall Focus_CenterSpinFromSide(HWND hWnd);
void __fastcall Focus_GetAndBlitSpin(HWND hWnd, LPARAM lParam);
BOOL __fastcall Focus_DoBlitSpinIncFrame(HWND hWnd1, HWND hWnd2);
void __cdecl Focus_DeleteSpinners();
void __cdecl Focus_ResetSpinToZero();
void __cdecl j_Focus_cpp_init();
void __cdecl Focus_cpp_init();
void __fastcall Focus_LoadSpinner(const char *pszFileName);
void __fastcall Focus_SetFocusTimer(HWND hWnd, const char *pszFileName);
void __stdcall Focus_SetFocusAndBlit(int hWnd);
void __fastcall Focus_KillFocusTimer(HWND hWnd);
void __cdecl local_InitUiPalette();
@ -609,8 +611,9 @@ int __fastcall Title_1001025A(HWND hWnd, int a2);
int UNKCALL Title_100102D7(void *arg);
void UNKCALL TitleSnd_10010306(void *arg);
void TitleSnd_1001030D();
int (__stdcall *TitleSnd_10010315())(_DWORD);
int (__stdcall *TitleSnd_1001031F())(_DWORD);
signed int TitleSnd_1001032E();
void __fastcall TitleSnd_SetSoundFunction(void (__stdcall *func)(char *file));
void __cdecl TitleSnd_InitSoundFunc();
void __cdecl TitleSnd_PlayMoveSound();
void __cdecl TitleSnd_PlaySelectSound();
void __cdecl j_TitleSnd_cpp_init();
void __cdecl TitleSnd_cpp_init();

560
DiabloUI/doom.cpp

@ -1,502 +1,404 @@
// ref: 0x10006581
signed int Doom_10006581() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_10029854 = 2139095040;
return result;
} */
// 10029854: using guessed type int dword_10029854;
void __cdecl Doom_cpp_init()
{
doom_cpp_float = doom_cpp_float_value;
}
// 1001F41C: using guessed type int doom_cpp_float_value;
// 10029854: using guessed type int doom_cpp_float;
// ref: 0x1000658C
int __fastcall Doom_1000658C(HWND hWnd, int *a2, int a3, int a4) { return 0; }
/* {
int *v4; // esi
HWND v5; // edi
void __fastcall Doom_ParseWndProcs(HWND hWnd, int *msgtbl, int a3, int a4)
{
HWND v6; // eax
int result; // eax
v4 = a2;
v5 = hWnd;
while ( 1 )
while ( *msgtbl )
{
result = *v4;
if ( !*v4 )
break;
v6 = GetDlgItem(v5, result);
Doom_100065BB(v5, v6, a3, a4);
++v4;
v6 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndText(hWnd, (int)v6, a3, a4);
++msgtbl;
}
return result;
} */
}
// ref: 0x100065BB
void __fastcall Doom_100065BB(HWND hWnd, HWND a2, int a3, int a4) { return; }
/* {
void __fastcall Doom_GetSetWndText(HWND hWnd, int msg, int nFont, int a4)
{
HWND v4; // esi
HWND v5; // edi
int v6; // eax
CHAR String; // [esp+8h] [ebp-100h]
char String[256]; // [esp+8h] [ebp-100h]
v4 = a2;
v4 = (HWND)msg;
v5 = hWnd;
if ( a2 )
if ( msg )
{
Doom_10006719((int)hWnd, a2, 1521);
Doom_1000678A(v5, v4);
artfont_10001058((char *)a3);
Doom_1000663F(v4, a4);
GetWindowTextA(v4, &String, 255);
if ( strlen(&String) )
Doom_AllocAndSetBMP(hWnd, 1521);
Doom_GetWindowROP3(v5, v4);
artfont_SetArtFont(nFont);
Doom_PrintStrWithSpin(v4, a4);
GetWindowTextA(v4, String, 255);
if ( strlen(String) )
{
v6 = GetWindowLongA(v4, -21);
local_10007FA4(v6, &String);
SetWindowTextA(v4, &byte_10029448);
local_SetWndLongStr(v6, String);
SetWindowTextA(v4, (LPCSTR)&wndtext_pointer);
}
}
} */
}
// ref: 0x1000663F
_DWORD *__fastcall Doom_1000663F(HWND hWnd, int a2) { return 0; }
/* {
int v2; // edi
_DWORD *result; // eax
void __fastcall Doom_PrintStrWithSpin(HWND hWnd, BOOL a2)
{
_DWORD *v3; // eax
_DWORD *v4; // esi
unsigned char *v5; // ebx
char *v5; // ebx
int v6; // edi
size_t v7; // eax
unsigned char *i; // eax
char *i; // eax
int v9; // kr04_4
int v10; // eax
CHAR String; // [esp+8h] [ebp-10Ch]
unsigned char *v12; // [esp+108h] [ebp-Ch]
HWND hWnda; // [esp+10Ch] [ebp-8h]
char String[256]; // [esp+8h] [ebp-10Ch]
char *v12; // [esp+108h] [ebp-Ch]
int v14; // [esp+110h] [ebp-4h]
v2 = a2;
hWnda = hWnd;
result = (_DWORD *)GetWindowLongA(hWnd, -21);
v4 = result;
if ( result && *result )
v3 = (_DWORD *)GetWindowLongA(hWnd, -21);
v4 = v3;
if ( v3 && *v3 )
{
GetWindowTextA(hWnda, &String, 255);
v5 = (unsigned char *)&String;
if ( !strlen(&String) )
v5 = (unsigned char *)(v4 + 4);
v14 = artfont_10001329(v5);
if ( v2 )
GetWindowTextA(hWnd, String, 255);
v5 = String;
if ( !strlen(String) )
v5 = (char *)(v4 + 4);
v14 = artfont_GetFontWidth(v5);
if ( a2 )
{
v6 = v4[1] - 2 * Focus_10007482();
v7 = strlen((const char *)v5);
v6 = v4[1] - 2 * Focus_GetSpinWidthOrZero();
v7 = strlen(v5);
if ( v14 > v6 )
{
for ( i = &v5[v7]; ; i = v12 )
{
v12 = i - 1;
*v12 = 0;
v14 = artfont_10001329(v5);
v14 = artfont_GetFontWidth(v5);
if ( v14 <= v6 )
break;
}
}
}
v9 = v4[1] - v14 - 1;
v10 = artfont_100012F6();
artfont_100013CD(v5, v4, v9 / 2, (v4[2] - v10) / 2);
result = (_DWORD *)InvalidateRect(hWnda, 0, 0);
v10 = artfont_GetFontMaxHeight();
artfont_PrintFontStr(v5, (DWORD **)v4, v9 / 2, (v4[2] - v10) / 2);
InvalidateRect(hWnd, 0, 0);
}
return result;
} */
}
// ref: 0x10006719
int __fastcall Doom_10006719(int a1, HWND a2, int a3) { return 0; }
/* {
HWND v3; // edi
_DWORD *v4; // eax
_DWORD *v5; // esi
void __fastcall Doom_AllocAndSetBMP(HWND hWnd, int bmp_flags)
{
DWORD *v3; // esi
struct tagRECT Rect; // [esp+8h] [ebp-10h]
v3 = a2;
GetClientRect(a2, &Rect);
v4 = (_DWORD *)local_10007F46();
v5 = v4;
v4[1] = Rect.right;
v4[2] = Rect.bottom;
*v4 = SMemAlloc(Rect.right * Rect.bottom, "C:\\Src\\Diablo\\DiabloUI\\Doom.cpp", 139, 0);
SetWindowLongA(v3, -21, (LONG)v5);
return SDlgSetBitmapI(v3, 0, &byte_10029448, -1, a3, *v5, 0, v5[1], v5[2], -1);
} */
// 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);
GetClientRect(hWnd, &Rect);
v3 = local_AllocWndLongData();
v3[1] = Rect.right;
v3[2] = Rect.bottom;
*v3 = (DWORD)SMemAlloc(Rect.right * Rect.bottom, "C:\\Src\\Diablo\\DiabloUI\\Doom.cpp", 139, 0);
SetWindowLongA(hWnd, -21, (LONG)v3);
SDlgSetBitmapI(hWnd, 0, (char *)&wndtext_pointer, -1, bmp_flags, (void *)*v3, 0, v3[1], v3[2], -1);
}
// ref: 0x1000678A
_DWORD *__fastcall Doom_1000678A(HWND hWnd, HWND a2) { return 0; }
/* {
HWND v2; // edi
void __fastcall Doom_GetWindowROP3(HWND hWnd1, HWND hWnd2)
{
_DWORD *v3; // ebx
_DWORD *result; // eax
_DWORD *v5; // esi
LONG v4; // eax MAPDST
struct tagRECT Rect; // [esp+Ch] [ebp-14h]
HWND hWnda; // [esp+1Ch] [ebp-4h]
v2 = a2;
hWnda = hWnd;
v3 = (_DWORD *)GetWindowLongA(hWnd, -21);
result = (_DWORD *)GetWindowLongA(v2, -21);
v5 = result;
if ( v3 && *v3 && result )
v3 = (_DWORD *)GetWindowLongA(hWnd1, -21);
v4 = GetWindowLongA(hWnd2, -21);
if ( v3 && *v3 && v4 )
{
if ( *result )
if ( *(_DWORD *)v4 )
{
GetWindowRect(v2, &Rect);
ScreenToClient(hWnda, (LPPOINT)&Rect);
ScreenToClient(hWnda, (LPPOINT)&Rect.right);
result = (_DWORD *)SBltROP3(
*v5,
Rect.left + *v3 + Rect.top * v3[1],
v5[1],
v5[2],
v5[1],
v3[1],
0,
13369376);
GetWindowRect(hWnd2, &Rect);
ScreenToClient(hWnd1, (LPPOINT)&Rect);
ScreenToClient(hWnd1, (LPPOINT)&Rect.right);
SBltROP3(
*(void **)v4,
(void *)(Rect.left + *v3 + Rect.top * v3[1]),
*(_DWORD *)(v4 + 4),
*(_DWORD *)(v4 + 8),
*(_DWORD *)(v4 + 4),
v3[1],
0,
0xCC0020u);
}
}
return result;
} */
// 100103F4: using guessed type int __stdcall SBltROP3(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
}
// ref: 0x1000680A
int __fastcall Doom_1000680A(HWND hDlg, int *a2, int a3, int a4) { return 0; }
/* {
int *v4; // esi
HWND v5; // edi
void __fastcall Doom_ParseWndProc2(HWND hWnd, int *msgtbl, int a3, int a4)
{
HWND v6; // eax
int result; // eax
v4 = a2;
v5 = hDlg;
while ( 1 )
while ( *msgtbl )
{
result = *v4;
if ( !*v4 )
break;
v6 = GetDlgItem(v5, result);
Doom_10006839(v5, v6, (char *)a3, a4);
++v4;
v6 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndTxt2(hWnd, (int)v6, a3, a4);
++msgtbl;
}
return result;
} */
}
// ref: 0x10006839
void __fastcall Doom_10006839(HWND a1, HWND a2, char *a3, int a4) { return; }
/* {
void __fastcall Doom_GetSetWndTxt2(HWND hWnd, int msg, int nFont, int a4)
{
HWND v4; // esi
int v5; // eax
CHAR String; // [esp+4h] [ebp-100h]
char String[256]; // [esp+4h] [ebp-100h]
v4 = a2;
if ( a2 )
v4 = (HWND)msg;
if ( msg )
{
Doom_1000678A(a1, a2);
artfont_10001058(a3);
Doom_1000663F(v4, a4);
GetWindowTextA(v4, &String, 255);
if ( strlen(&String) )
Doom_GetWindowROP3(hWnd, (HWND)msg);
artfont_SetArtFont(nFont);
Doom_PrintStrWithSpin(v4, a4);
GetWindowTextA(v4, String, 255);
if ( strlen(String) )
{
v5 = GetWindowLongA(v4, -21);
local_10007FA4(v5, &String);
SetWindowTextA(v4, &byte_10029448);
local_SetWndLongStr(v5, String);
SetWindowTextA(v4, (LPCSTR)&wndtext_pointer);
}
}
} */
}
// ref: 0x100068AB
int __fastcall Doom_100068AB(HWND hWnd, int *a2, int a3) { return 0; }
/* {
int *v3; // esi
HWND v4; // edi
void __fastcall Doom_ParseWndProc3(HWND hWnd, int *msgtbl, int a3)
{
HWND v5; // eax
int result; // eax
v3 = a2;
v4 = hWnd;
while ( 1 )
while ( *msgtbl )
{
result = *v3;
if ( !*v3 )
break;
v5 = GetDlgItem(v4, result);
Doom_100068D6(v4, v5, a3);
++v3;
v5 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndTxt3(hWnd, (int)v5, a3);
++msgtbl;
}
return result;
} */
}
// ref: 0x100068D6
void __fastcall Doom_100068D6(HWND hWnd, HWND a2, int a3) { return; }
/* {
void __fastcall Doom_GetSetWndTxt3(HWND hWnd, int msg, int nFont)
{
HWND v3; // esi
HWND v4; // edi
int v5; // eax
int v6; // eax
CHAR String; // [esp+8h] [ebp-100h]
char String[256]; // [esp+8h] [ebp-100h]
v3 = a2;
v3 = (HWND)msg;
v4 = hWnd;
if ( a2 )
if ( msg )
{
Doom_10006719((int)hWnd, a2, 1);
Doom_1000678A(v4, v3);
artfont_10001058((char *)a3);
Doom_AllocAndSetBMP(hWnd, 1);
Doom_GetWindowROP3(v4, v3);
artfont_SetArtFont(nFont);
v5 = GetWindowLongA(v3, -16);
Doom_1000695D(v3, v5);
GetWindowTextA(v3, &String, 255);
if ( strlen(&String) )
Doom_PrintStrWithSpn2(v3, v5);
GetWindowTextA(v3, String, 255);
if ( strlen(String) )
{
v6 = GetWindowLongA(v3, -21);
local_10007FA4(v6, &String);
SetWindowTextA(v3, &byte_10029448);
local_SetWndLongStr(v6, String);
SetWindowTextA(v3, (LPCSTR)&wndtext_pointer);
}
}
} */
}
// ref: 0x1000695D
_DWORD *__fastcall Doom_1000695D(HWND hWnd, int a2) { return 0; }
/* {
_DWORD *result; // eax
void __fastcall Doom_PrintStrWithSpn2(HWND hWnd, int justify_type)
{
_DWORD *v2; // eax
_DWORD *v3; // esi
unsigned char *v4; // edi
char *v4; // edi
int v5; // eax
CHAR String; // [esp+4h] [ebp-108h]
int v7; // [esp+104h] [ebp-8h]
HWND hWnda; // [esp+108h] [ebp-4h]
v7 = a2;
hWnda = hWnd;
result = (_DWORD *)GetWindowLongA(hWnd, -21);
v3 = result;
if ( result && *result )
char String[256]; // [esp+4h] [ebp-108h]
v2 = (_DWORD *)GetWindowLongA(hWnd, -21);
v3 = v2;
if ( v2 && *v2 )
{
GetWindowTextA(hWnda, &String, 255);
v4 = (unsigned char *)&String;
if ( !strlen(&String) )
v4 = (unsigned char *)(v3 + 4);
if ( v7 & 2 )
GetWindowTextA(hWnd, String, 255);
v4 = String;
if ( !strlen(String) )
v4 = (char *)(v3 + 4);
if ( justify_type & 2 )
{
v5 = v3[1] - artfont_10001329(v4) - 1;
v5 = v3[1] - artfont_GetFontWidth(v4) - 1;
}
else if ( v7 & 1 )
else if ( justify_type & 1 )
{
v5 = (v3[1] - artfont_10001329(v4) - 1) / 2;
v5 = (v3[1] - artfont_GetFontWidth(v4) - 1) / 2;
}
else
{
v5 = 0;
}
artfont_100013CD(v4, v3, v5, 0);
result = (_DWORD *)InvalidateRect(hWnda, 0, 0);
artfont_PrintFontStr(v4, (DWORD **)v3, v5, 0);
InvalidateRect(hWnd, 0, 0);
}
return result;
} */
}
// ref: 0x10006A13
int __fastcall Doom_10006A13(HWND hDlg, int *a2, int a3) { return 0; }
/* {
int *v3; // esi
HWND v4; // edi
void __fastcall Doom_ParseWndProc4(HWND hWnd, int *msgtbl, int a3)
{
HWND v5; // eax
int result; // eax
v3 = a2;
v4 = hDlg;
while ( 1 )
while ( *msgtbl )
{
result = *v3;
if ( !*v3 )
break;
v5 = GetDlgItem(v4, result);
Doom_10006A3E(v4, v5, (char *)a3);
++v3;
v5 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndTxt4(hWnd, (int)v5, a3);
++msgtbl;
}
return result;
} */
}
// ref: 0x10006A3E
void __fastcall Doom_10006A3E(HWND a1, HWND a2, char *a3) { return; }
/* {
void __fastcall Doom_GetSetWndTxt4(HWND hWnd, int msg, int nFont)
{
HWND v3; // edi
int v4; // eax
int v5; // eax
CHAR String; // [esp+8h] [ebp-100h]
char String[256]; // [esp+8h] [ebp-100h]
v3 = a2;
if ( a2 )
v3 = (HWND)msg;
if ( msg )
{
Doom_1000678A(a1, a2);
artfont_10001058(a3);
Doom_GetWindowROP3(hWnd, (HWND)msg);
artfont_SetArtFont(nFont);
v4 = GetWindowLongA(v3, -16);
Doom_1000695D(v3, v4);
GetWindowTextA(v3, &String, 255);
if ( strlen(&String) )
Doom_PrintStrWithSpn2(v3, v4);
GetWindowTextA(v3, String, 255);
if ( strlen(String) )
{
v5 = GetWindowLongA(v3, -21);
local_10007FA4(v5, &String);
SetWindowTextA(v3, &byte_10029448);
local_SetWndLongStr(v5, String);
SetWindowTextA(v3, (LPCSTR)&wndtext_pointer);
}
}
} */
}
// ref: 0x10006AB8
int __fastcall Doom_10006AB8(HWND hWnd, int *a2, int a3) { return 0; }
/* {
int *v3; // esi
HWND v4; // edi
void __fastcall Doom_ParseWndProc5(HWND hWnd, int *msgtbl, int a3)
{
HWND v5; // eax
int result; // eax
v3 = a2;
v4 = hWnd;
while ( 1 )
while ( *msgtbl )
{
result = *v3;
if ( !*v3 )
break;
v5 = GetDlgItem(v4, result);
Doom_10006AE3(v4, v5, a3);
++v3;
v5 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndTxt5(hWnd, (int)v5, a3);
++msgtbl;
}
return result;
} */
}
// ref: 0x10006AE3
void __fastcall Doom_10006AE3(HWND hWnd, HWND a2, int a3) { return; }
/* {
void __fastcall Doom_GetSetWndTxt5(HWND hWnd, int msg, int nFont)
{
HWND v3; // esi
HWND v4; // edi
v3 = a2;
v4 = hWnd;
if ( a2 )
v3 = (HWND)msg;
if ( msg )
{
Doom_10006719((int)hWnd, a2, 1);
Doom_1000678A(v4, v3);
artfont_10001058((char *)a3);
Doom_10006B12(v3);
Doom_AllocAndSetBMP(hWnd, 1);
Doom_GetWindowROP3(hWnd, v3);
artfont_SetArtFont(nFont);
Doom_PrintTextMsg403(v3);
}
} */
}
// ref: 0x10006B12
void UNKCALL Doom_10006B12(HWND hWnd) { return; }
/* {
HWND v1; // ebx
_DWORD *v2; // eax
void __fastcall Doom_PrintTextMsg403(HWND hWnd)
{
BYTE *v2; // eax
int v3; // edi
int v4; // edi
int v5; // esi
int v6; // esi
unsigned char *v7; // ebx
char *i; // ebx
int v8; // eax
char v9; // [esp+3h] [ebp-11Dh]
CHAR String; // [esp+4h] [ebp-11Ch]
//char v9; // [esp+3h] [ebp-11Dh]
char String[256]; // [esp+4h] [ebp-11Ch]
struct tagRECT Rect; // [esp+104h] [ebp-1Ch]
LRESULT v12; // [esp+114h] [ebp-Ch]
_DWORD *v13; // [esp+118h] [ebp-8h]
BYTE *pWidthBin; // [esp+118h] [ebp-8h]
size_t v14; // [esp+11Ch] [ebp-4h]
v1 = hWnd;
v2 = (_DWORD *)GetWindowLongA(hWnd, -21);
v13 = v2;
if ( v2 && *v2 )
v2 = (BYTE *)GetWindowLongA(hWnd, -21);
pWidthBin = v2;
if ( v2 && *(_DWORD *)v2 )
{
GetWindowTextA(v1, &String, 255);
v14 = strlen(&String);
v3 = Focus_10007482();
v4 = artfont_10001310() + v3;
GetClientRect(v1, &Rect);
v5 = Focus_10007482();
v6 = Rect.right - 2 * (artfont_10001310() + v5);
v12 = SendMessageA(v1, 0x403u, 0, 0);
GetWindowTextA(hWnd, String, 255);
v14 = strlen(String);
v3 = Focus_GetSpinWidthOrZero();
v4 = artfont_GetFontDefWidth() + v3;
GetClientRect(hWnd, &Rect);
v5 = Focus_GetSpinWidthOrZero();
v6 = Rect.right - 2 * (artfont_GetFontDefWidth() + v5);
v12 = SendMessageA(hWnd, 0x403u, 0, 0);
if ( v12 == 1 )
*(&v9 + v14) = 0;
v7 = (unsigned char *)&String;
if ( String )
String[v14-1] = 0; // *(&v9 + v14) = 0;
for ( i = String; *i; ++i )
{
do
{
if ( artfont_10001329(v7) <= v6 )
break;
++v7;
}
while ( *v7 );
if ( artfont_GetFontWidth(i) <= v6 )
break;
}
if ( v12 )
*(&v9 + v14) = 124;
v8 = artfont_100012F6();
artfont_100013CD(v7, v13, v4, (v13[2] - v8) / 2);
String[v14-1] = 124; // *(&v9 + v14) = 124;
v8 = artfont_GetFontMaxHeight();
artfont_PrintFontStr(i, (DWORD **)pWidthBin, v4, (*((_DWORD *)pWidthBin + 2) - v8) / 2);
}
} */
}
// ref: 0x10006C08
int __fastcall Doom_10006C08(HWND hDlg, int *a2, int a3) { return 0; }
/* {
int *v3; // esi
HWND v4; // edi
void __fastcall Doom_ParseWndProc6(HWND hWnd, int *msgtbl, int a3)
{
HWND v5; // eax
int result; // eax
v3 = a2;
v4 = hDlg;
while ( 1 )
while ( *msgtbl )
{
result = *v3;
if ( !*v3 )
break;
v5 = GetDlgItem(v4, result);
Doom_10006C33(v4, v5, (char *)a3);
++v3;
v5 = GetDlgItem(hWnd, *msgtbl);
Doom_GetSetWndTxt6(hWnd, (int)v5, a3);
++msgtbl;
}
return result;
} */
}
// ref: 0x10006C33
void __fastcall Doom_10006C33(HWND a1, HWND a2, char *a3) { return; }
/* {
void __fastcall Doom_GetSetWndTxt6(HWND hWnd, int msg, int nFont)
{
HWND v3; // esi
v3 = a2;
if ( a2 )
v3 = (HWND)msg;
if ( msg )
{
Doom_1000678A(a1, a2);
artfont_10001058(a3);
Doom_10006B12(v3);
Doom_GetWindowROP3(hWnd, (HWND)msg);
artfont_SetArtFont(nFont);
Doom_PrintTextMsg403(v3);
}
} */
}
// ref: 0x10006C53
int __fastcall Doom_10006C53(HWND hDlg, int *a2) { return 0; }
/* {
int *v2; // edi
HWND v3; // ebx
int result; // eax
HWND v5; // eax
HWND v6; // esi
_DWORD *v7; // eax
void __fastcall Doom_DeleteFreeProcs(HWND hWnd, int *msgtbl)
{
int i; // eax
HWND v5; // eax MAPDST
void **v7; // eax
v2 = a2;
v3 = hDlg;
for ( result = *a2; *v2; result = *v2 )
for ( i = *msgtbl; *msgtbl; i = *msgtbl )
{
v5 = GetDlgItem(v3, result);
v6 = v5;
v5 = GetDlgItem(hWnd, i);
if ( v5 )
{
v7 = (_DWORD *)GetWindowLongA(v5, -21);
local_10007F72(v7);
SetWindowLongA(v6, -21, 0);
v7 = (void **)GetWindowLongA(v5, -21);
local_FreeMemPtr(v7);
SetWindowLongA(v5, -21, 0);
}
++v2;
++msgtbl;
}
return result;
} */
}

334
DiabloUI/focus.cpp

@ -1,288 +1,246 @@
// ref: 0x10007458
int (__stdcall *UNKCALL Focus_10007458(void *arg))(_DWORD) { return 0; }
/* {
int v1; // esi
int (__stdcall *result)(_DWORD); // eax
v1 = (int)arg;
if ( dword_10029CA4 && arg != (void *)dword_10029CA8 )
void __fastcall Focus_CheckPlayMove(LPARAM lParam)
{
if ( sgbSpinnersLoaded && lParam != dword_10029CA8 )
{
if ( dword_10029CAC )
result = TitleSnd_10010315();
dword_10029CA8 = v1;
TitleSnd_PlayMoveSound();
dword_10029CA8 = lParam;
}
return result;
} */
// 10029CA4: using guessed type int dword_10029CA4;
}
// 10029CA4: using guessed type int sgbSpinnersLoaded;
// 10029CA8: using guessed type int dword_10029CA8;
// 10029CAC: using guessed type int dword_10029CAC;
// ref: 0x10007482
int Focus_10007482() { return 0; }
/* {
return dword_10029CA4 != 0 ? dword_10029C98 : 0;
} */
// 10029C98: using guessed type int dword_10029C98;
// 10029CA4: using guessed type int dword_10029CA4;
int __cdecl Focus_GetSpinWidthOrZero()
{
return sgbSpinnersLoaded != 0 ? focus_spin_width : 0;
}
// 10029CA4: using guessed type int sgbSpinnersLoaded;
// ref: 0x10007492
_DWORD *__fastcall Focus_10007492(HWND hWnd, HWND a2) { return 0; }
/* {
void __fastcall Focus_BlitSpinner(HWND hWnd1, HWND hWnd2)
{
_DWORD *v2; // edi
_DWORD *result; // eax
_DWORD *v4; // esi
int v5; // eax
int v6; // ST14_4
LONG v3; // eax MAPDST
int v5; // eax MAPDST
int v7; // eax
struct tagRECT Rect; // [esp+8h] [ebp-18h]
HWND v9; // [esp+18h] [ebp-8h]
HWND hWnda; // [esp+1Ch] [ebp-4h]
char *v9; // [esp+18h] [ebp-8h]
hWnda = a2;
v9 = hWnd;
v2 = (_DWORD *)GetWindowLongA(hWnd, -21);
result = (_DWORD *)GetWindowLongA(hWnda, -21);
v4 = result;
if ( v2 && result && *v2 )
v9 = (char *)hWnd1;
v2 = (_DWORD *)GetWindowLongA(hWnd1, -21);
v3 = GetWindowLongA(hWnd2, -21);
if ( v2 && v3 && *v2 )
{
if ( *result )
if ( *(_DWORD *)v3 )
{
GetWindowRect(hWnda, &Rect);
ScreenToClient(v9, (LPPOINT)&Rect);
ScreenToClient(v9, (LPPOINT)&Rect.right);
SBltROP3(*v4, Rect.left + *v2 + Rect.top * v2[1], dword_10029C98, v4[2], v4[1], v2[1], 0, 13369376);
GetWindowRect(hWnd2, &Rect);
ScreenToClient((HWND)v9, (LPPOINT)&Rect);
ScreenToClient((HWND)v9, (LPPOINT)&Rect.right);
SBltROP3(
*(void **)v3,
(void *)(Rect.left + *v2 + Rect.top * v2[1]),
focus_spin_width,
*(_DWORD *)(v3 + 8),
*(_DWORD *)(v3 + 4),
v2[1],
0,
0xCC0020u);
v5 = v2[1];
v6 = v5;
v7 = *v2 + Rect.top * v5;
v9 = (HWND)v4[1];
v9 = *(char **)(v3 + 4);
SBltROP3(
(char *)v9 + *v4 - dword_10029C98,
(char *)v9 + v7 - dword_10029C98 + Rect.left,
dword_10029C98,
v4[2],
v9,
v6,
&v9[*(_DWORD *)v3 - focus_spin_width],
&v9[v7 - focus_spin_width + Rect.left],
focus_spin_width,
*(_DWORD *)(v3 + 8),
(int)v9,
v5,
0,
13369376);
result = (_DWORD *)Focus_10007566(hWnda);
0xCC0020u);
Focus_CenterSpinFromSide(hWnd2);
}
}
return result;
} */
// 100103F4: using guessed type int __stdcall SBltROP3(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 10029C98: using guessed type int dword_10029C98;
}
// ref: 0x10007566
BOOL UNKCALL Focus_10007566(HWND hWnd) { return 0; }
/* {
HWND v1; // edi
void __fastcall Focus_CenterSpinFromSide(HWND hWnd)
{
struct tagRECT Rect; // [esp+8h] [ebp-10h]
v1 = hWnd;
GetClientRect(hWnd, &Rect);
--Rect.bottom;
Rect.left = --Rect.right - dword_10029C98;
InvalidateRect(v1, &Rect, 0);
Rect.left = --Rect.right - focus_spin_width;
InvalidateRect(hWnd, &Rect, 0);
Rect.left = 0;
Rect.right = dword_10029C98 - 1;
return InvalidateRect(v1, &Rect, 0);
} */
// 10029C98: using guessed type int dword_10029C98;
Rect.right = focus_spin_width - 1;
InvalidateRect(hWnd, &Rect, 0);
}
// ref: 0x100075B7
_DWORD *__fastcall Focus_100075B7(HWND hWnd, HWND a2) { return 0; }
/* {
void __fastcall Focus_GetAndBlitSpin(HWND hWnd, LPARAM lParam)
{
HWND v2; // esi
HWND v3; // edi
_DWORD *result; // eax
v2 = a2;
v3 = hWnd;
GetWindowLongA(a2, -12);
result = Focus_10007492(v3, v2);
v2 = (HWND)lParam;
GetWindowLongA((HWND)lParam, -12);
Focus_BlitSpinner(hWnd, v2);
dword_10029CAC = 1;
return result;
} */
}
// 10029CAC: using guessed type int dword_10029CAC;
// ref: 0x100075DC
int __fastcall Focus_100075DC(HWND hWnd, HWND a2) { return 0; }
/* {
HWND v2; // edi
HWND v3; // ebx
_DWORD *v4; // eax
_DWORD *v5; // esi
BOOL __fastcall Focus_DoBlitSpinIncFrame(HWND hWnd1, HWND hWnd2)
{
void **v4; // eax
void **v5; // esi
int v7; // edi
struct tagRECT Rect; // [esp+Ch] [ebp-14h]
HWND hWnda; // [esp+1Ch] [ebp-4h]
v2 = hWnd;
v3 = a2;
hWnda = hWnd;
if ( !dword_10029CA4 )
if ( !sgbSpinnersLoaded )
return 0;
if ( !a2 )
if ( !hWnd2 )
return 0;
GetWindowLongA(a2, -12);
if ( v2 != GetParent(v3) )
GetWindowLongA(hWnd2, -12);
if ( hWnd1 != GetParent(hWnd2) )
return 0;
Focus_10007492(v2, v3);
v4 = (_DWORD *)GetWindowLongA(v3, -21);
Focus_BlitSpinner(hWnd1, hWnd2);
v4 = (void **)GetWindowLongA(hWnd2, -21);
v5 = v4;
if ( !v4 || !*v4 )
return 0;
GetWindowRect(v3, &Rect);
ScreenToClient(v2, (LPPOINT)&Rect);
ScreenToClient(hWnda, (LPPOINT)&Rect.right);
if ( dword_10029C78[dword_10029CB0] )
GetWindowRect(hWnd2, &Rect);
ScreenToClient(hWnd1, (LPPOINT)&Rect);
ScreenToClient(hWnd1, (LPPOINT)&Rect.right);
if ( SpinnerTransOut[sgnSpinnerFrame] )
{
v7 = (v5[2] - dword_10029C9C) / 2;
STransBlt(*v5, 0, v7, v5[1], dword_10029C78[dword_10029CB0]);
STransBlt(*v5, v5[1] - dword_10029C98, v7, v5[1], dword_10029C78[dword_10029CB0]);
Focus_10007566(v3);
v7 = ((signed int)v5[2] - focus_spin_height) / 2;
STransBlt(*v5, 0, v7, (int)v5[1], SpinnerTransOut[sgnSpinnerFrame]);
STransBlt(*v5, (int)v5[1] - focus_spin_width, v7, (int)v5[1], SpinnerTransOut[sgnSpinnerFrame]);
Focus_CenterSpinFromSide(hWnd2);
}
if ( ++dword_10029CB0 >= 8 )
dword_10029CB0 = 0;
if ( ++sgnSpinnerFrame >= 8 )
sgnSpinnerFrame = 0;
return 1;
} */
// 1001036A: using guessed type int __stdcall STransBlt(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 10029C98: using guessed type int dword_10029C98;
// 10029C9C: using guessed type int dword_10029C9C;
// 10029CA4: using guessed type int dword_10029CA4;
// 10029CB0: using guessed type int dword_10029CB0;
}
// 10029C9C: using guessed type int focus_spin_height;
// 10029CA4: using guessed type int sgbSpinnersLoaded;
// 10029CB0: using guessed type int sgnSpinnerFrame;
// ref: 0x100076C3
int Focus_100076C3() { return 0; }
/* {
int *v0; // esi
int result; // eax
void __cdecl Focus_DeleteSpinners()
{
HANDLE *v0; // esi
v0 = dword_10029C78;
v0 = SpinnerTransOut;
do
{
result = *v0;
if ( *v0 )
{
result = STransDelete(*v0);
STransDelete(*v0);
*v0 = 0;
}
++v0;
}
while ( (signed int)v0 < (signed int)&dword_10029C98 );
while ( (signed int)v0 < (signed int)&SpinnerTransOut[8] );
dword_10029CAC = 0;
dword_10029CA8 = 0;
dword_10029CA4 = 0;
return result;
} */
// 1001033A: using guessed type int __stdcall STransDelete(_DWORD);
// 10029C98: using guessed type int dword_10029C98;
// 10029CA4: using guessed type int dword_10029CA4;
sgbSpinnersLoaded = 0;
}
// 10029CA4: using guessed type int sgbSpinnersLoaded;
// 10029CA8: using guessed type int dword_10029CA8;
// 10029CAC: using guessed type int dword_10029CAC;
// ref: 0x100076FA
void Focus_100076FA() { return; }
/* {
void __cdecl Focus_ResetSpinToZero()
{
dword_10029CAC = 0;
dword_10029CA8 = 0;
} */
}
// 10029CA8: using guessed type int dword_10029CA8;
// 10029CAC: using guessed type int dword_10029CAC;
// ref: 0x1000770E
signed int Focus_1000770E() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_10029CA0 = 2139095040;
return result;
} */
// 10029CA0: using guessed type int dword_10029CA0;
void __cdecl Focus_cpp_init()
{
focus_cpp_float = focus_cpp_float_value;
}
// 1001F42C: using guessed type int focus_cpp_float_value;
// 10029CA0: using guessed type int focus_cpp_float;
// ref: 0x10007719
void UNKCALL Focus_10007719(void *arg) { return; }
/* {
int *v1; // esi
void __fastcall Focus_LoadSpinner(const char *pszFileName)
{
HANDLE *v1; // esi
int v2; // ecx
int v3; // eax
int v4; // ebx
int v5; // [esp+4h] [ebp-1Ch]
int v6; // [esp+8h] [ebp-18h]
int v7; // [esp+Ch] [ebp-14h]
int v8; // [esp+10h] [ebp-10h]
int v9; // [esp+14h] [ebp-Ch]
int v10; // [esp+18h] [ebp-8h]
int v11; // [esp+1Ch] [ebp-4h]
int a5[4]; // [esp+4h] [ebp-1Ch]
DWORD data[2]; // [esp+14h] [ebp-Ch]
BYTE *pBuffer; // [esp+1Ch] [ebp-4h]
if ( !dword_10029CA4 )
if ( !sgbSpinnersLoaded )
{
v11 = 0;
pBuffer = 0;
dword_10029CAC = 0;
dword_10029CA8 = 0;
local_100078BE((int)arg, &v11, &v9);
v1 = dword_10029C78;
memset(dword_10029C78, 0, 0x20u);
if ( v11 )
local_LoadArtImage(pszFileName, &pBuffer, data);
v1 = SpinnerTransOut;
memset(SpinnerTransOut, 0, 0x20u);
if ( pBuffer )
{
v2 = v9;
dword_10029C98 = v9;
v3 = v10 / 8;
v2 = data[0];
focus_spin_width = data[0];
v3 = (signed int)data[1] / 8;
v4 = 0;
dword_10029C9C = v10 / 8;
focus_spin_height = (signed int)data[1] / 8;
while ( 1 )
{
v7 = v2 - 1;
v6 = v4 * v3;
v5 = 0;
v8 = v3 + v4 * v3 - 1;
STransCreateI(v11, v2, v3, 8, &v5, 16777466, v1);
a5[2] = v2 - 1;
a5[1] = v4 * v3;
a5[0] = 0;
a5[3] = v3 + v4 * v3 - 1;
STransCreateI(pBuffer, v2, v3, 8, (int)a5, 16777466, v1);
++v1;
++v4;
if ( (signed int)v1 >= (signed int)&dword_10029C98 )
if ( (signed int)v1 >= (signed int)&SpinnerTransOut[8] )
break;
v3 = dword_10029C9C;
v2 = dword_10029C98;
v3 = focus_spin_height;
v2 = focus_spin_width;
}
SMemFree(v11, "C:\\Src\\Diablo\\DiabloUI\\Focus.cpp", 246, 0);
SMemFree(pBuffer, "C:\\Src\\Diablo\\DiabloUI\\Focus.cpp", 246, 0);
}
dword_10029CB0 = 0;
dword_10029CA4 = 1;
sgnSpinnerFrame = 0;
sgbSpinnersLoaded = 1;
}
} */
// 10010340: using guessed type int __stdcall SMemFree(_DWORD, _DWORD, _DWORD, _DWORD);
// 10010346: using guessed type int __stdcall STransCreateI(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 10029C98: using guessed type int dword_10029C98;
// 10029C9C: using guessed type int dword_10029C9C;
// 10029CA4: using guessed type int dword_10029CA4;
}
// 10029C9C: using guessed type int focus_spin_height;
// 10029CA4: using guessed type int sgbSpinnersLoaded;
// 10029CA8: using guessed type int dword_10029CA8;
// 10029CAC: using guessed type int dword_10029CAC;
// 10029CB0: using guessed type int dword_10029CB0;
// 10029CB0: using guessed type int sgnSpinnerFrame;
// ref: 0x100077E9
int __fastcall Focus_100077E9(int a1, void *a2, HWND hWnd) { return 0; }
/* {
int v3; // esi
v3 = a1;
Focus_10007719(a2);
return SDlgSetTimer(v3, 1, 55, Focus_10007804);
} */
// 10010412: using guessed type int __stdcall SDlgSetTimer(_DWORD, _DWORD, _DWORD, _DWORD);
void __fastcall Focus_SetFocusTimer(HWND hWnd, const char *pszFileName)
{
Focus_LoadSpinner(pszFileName);
SDlgSetTimer((int)hWnd, 1, 55, Focus_SetFocusAndBlit);
}
// ref: 0x10007804
int __stdcall Focus_10007804(HWND hWnd, int a2, int a3, int a4) { return 0; }
/* {
HWND v4; // eax
void __stdcall Focus_SetFocusAndBlit(int hWnd)
{
HWND v1; // eax
v4 = GetFocus();
return Focus_100075DC(hWnd, v4);
} */
v1 = GetFocus();
Focus_DoBlitSpinIncFrame((HWND)hWnd, v1);
}
// ref: 0x10007818
int UNKCALL Focus_10007818(void *arg) { return 0; }
/* {
SDlgKillTimer(arg, 1);
return Focus_100076C3();
} */
// 10010418: using guessed type int __stdcall SDlgKillTimer(_DWORD, _DWORD);
void __fastcall Focus_KillFocusTimer(HWND hWnd)
{
SDlgKillTimer((int)hWnd, 1);
Focus_DeleteSpinners();
}

64
DiabloUI/titlesnd.cpp

@ -1,49 +1,33 @@
// ref: 0x10010306
void UNKCALL TitleSnd_10010306(void *arg) { return; }
/* {
dword_1002A594 = (int (__stdcall *)(_DWORD))arg;
} */
// 1002A594: using guessed type int (__stdcall *dword_1002A594)(_DWORD);
void __fastcall TitleSnd_SetSoundFunction(void (__stdcall *func)(char *file))
{
gfnSoundFunction = func;
}
// ref: 0x1001030D
void TitleSnd_1001030D() { return; }
/* {
dword_1002A594 = 0;
} */
// 1002A594: using guessed type int (__stdcall *dword_1002A594)(_DWORD);
void __cdecl TitleSnd_InitSoundFunc()
{
gfnSoundFunction = 0;
}
// ref: 0x10010315
int (__stdcall *TitleSnd_10010315())(_DWORD) { return 0; }
/* {
int (__stdcall *result)(_DWORD); // eax
result = dword_1002A594;
if ( dword_1002A594 )
result = (int (__stdcall *)(_DWORD))dword_1002A594("sfx\\items\\titlemov.wav");
return result;
} */
// 1002A594: invalid function type has been ignored
// 1002A594: using guessed type int (__stdcall *dword_1002A594)(_DWORD);
void __cdecl TitleSnd_PlayMoveSound()
{
if ( gfnSoundFunction )
gfnSoundFunction("sfx\\items\\titlemov.wav");
}
// ref: 0x1001031F
int (__stdcall *TitleSnd_1001031F())(_DWORD) { return 0; }
/* {
int (__stdcall *result)(_DWORD); // eax
result = dword_1002A594;
if ( dword_1002A594 )
result = (int (__stdcall *)(_DWORD))dword_1002A594("sfx\\items\\titlslct.wav");
return result;
} */
// 1002A594: using guessed type int (__stdcall *dword_1002A594)(_DWORD);
void __cdecl TitleSnd_PlaySelectSound()
{
if ( gfnSoundFunction )
gfnSoundFunction("sfx\\items\\titlslct.wav");
}
// ref: 0x1001032E
signed int TitleSnd_1001032E() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_1002A590 = 2139095040;
return result;
} */
// 1002A590: using guessed type int dword_1002A590;
void __cdecl TitleSnd_cpp_init()
{
titlesnd_cpp_float = titlesnd_cpp_float_value;
}
// 1001F480: using guessed type int titlesnd_cpp_float_value;
// 1002A590: using guessed type int titlesnd_cpp_float;

Loading…
Cancel
Save