29 changed files with 5504 additions and 6207 deletions
@ -1,322 +1,295 @@
|
||||
// ref: 0x10001058
|
||||
void __fastcall artfont_SetArtFont(int nFont) |
||||
{ |
||||
switch ( nFont ) |
||||
{ |
||||
case 0: |
||||
sgpCurrFont = &font16g; |
||||
break; |
||||
case 2: |
||||
sgpCurrFont = &font24g; |
||||
break; |
||||
case 3: |
||||
sgpCurrFont = &font24s; |
||||
break; |
||||
case 4: |
||||
sgpCurrFont = &font30g; |
||||
break; |
||||
case 5: |
||||
sgpCurrFont = &font30s; |
||||
break; |
||||
case 6: |
||||
sgpCurrFont = &font42g; |
||||
break; |
||||
case 7: |
||||
sgpCurrFont = &font42y; |
||||
break; |
||||
default: |
||||
sgpCurrFont = &font16s; |
||||
break; |
||||
} |
||||
switch (nFont) { |
||||
case 0: |
||||
sgpCurrFont = &font16g; |
||||
break; |
||||
case 2: |
||||
sgpCurrFont = &font24g; |
||||
break; |
||||
case 3: |
||||
sgpCurrFont = &font24s; |
||||
break; |
||||
case 4: |
||||
sgpCurrFont = &font30g; |
||||
break; |
||||
case 5: |
||||
sgpCurrFont = &font30s; |
||||
break; |
||||
case 6: |
||||
sgpCurrFont = &font42g; |
||||
break; |
||||
case 7: |
||||
sgpCurrFont = &font42y; |
||||
break; |
||||
default: |
||||
sgpCurrFont = &font16s; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
// ref: 0x10001098
|
||||
void __cdecl artfont_InitAllFonts() |
||||
{ |
||||
font42g.active = 0; |
||||
font42y.active = 0; |
||||
font30g.active = 0; |
||||
font30s.active = 0; |
||||
font24g.active = 0; |
||||
font24s.active = 0; |
||||
font16g.active = 0; |
||||
font16s.active = 0; |
||||
sgpCurrFont = 0; |
||||
font42g.active = 0; |
||||
font42y.active = 0; |
||||
font30g.active = 0; |
||||
font30s.active = 0; |
||||
font24g.active = 0; |
||||
font24s.active = 0; |
||||
font16g.active = 0; |
||||
font16s.active = 0; |
||||
sgpCurrFont = 0; |
||||
} |
||||
|
||||
// ref: 0x100010C8
|
||||
void __cdecl artfont_FreeAllFonts() |
||||
{ |
||||
artfont_FreeArtFont(&font42g); |
||||
artfont_FreeArtFont(&font42y); |
||||
artfont_FreeArtFont(&font30g); |
||||
artfont_FreeArtFont(&font30s); |
||||
artfont_FreeArtFont(&font24g); |
||||
artfont_FreeArtFont(&font24s); |
||||
artfont_FreeArtFont(&font16g); |
||||
artfont_FreeArtFont(&font16s); |
||||
sgpCurrFont = 0; |
||||
artfont_FreeArtFont(&font42g); |
||||
artfont_FreeArtFont(&font42y); |
||||
artfont_FreeArtFont(&font30g); |
||||
artfont_FreeArtFont(&font30s); |
||||
artfont_FreeArtFont(&font24g); |
||||
artfont_FreeArtFont(&font24s); |
||||
artfont_FreeArtFont(&font16g); |
||||
artfont_FreeArtFont(&font16s); |
||||
sgpCurrFont = 0; |
||||
} |
||||
|
||||
// ref: 0x10001120
|
||||
void __fastcall artfont_FreeArtFont(FontStruct *pFont) |
||||
{ |
||||
HANDLE *v2; // esi
|
||||
signed int v3; // ebx
|
||||
HANDLE *v2; // esi
|
||||
signed int v3; // ebx
|
||||
|
||||
if ( pFont->active ) |
||||
{ |
||||
v2 = pFont->fonttrans; |
||||
v3 = 256; |
||||
do |
||||
{ |
||||
if ( *v2 ) |
||||
{ |
||||
STransDelete(*v2); |
||||
*v2 = 0; |
||||
} |
||||
++v2; |
||||
--v3; |
||||
} |
||||
while ( v3 ); |
||||
pFont->active = 0; |
||||
} |
||||
if (pFont->active) { |
||||
v2 = pFont->fonttrans; |
||||
v3 = 256; |
||||
do { |
||||
if (*v2) { |
||||
STransDelete(*v2); |
||||
*v2 = 0; |
||||
} |
||||
++v2; |
||||
--v3; |
||||
} while (v3); |
||||
pFont->active = 0; |
||||
} |
||||
} |
||||
|
||||
// ref: 0x10001159
|
||||
BOOL __cdecl artfont_LoadAllFonts() |
||||
{ |
||||
artfont_LoadArtFont(&font30g, "ui_art\\font30.bin", "ui_art\\font30g.pcx"); |
||||
artfont_LoadArtFont(&font30s, "ui_art\\font30.bin", "ui_art\\font30s.pcx"); |
||||
artfont_LoadArtFont(&font24g, "ui_art\\font24.bin", "ui_art\\font24g.pcx"); |
||||
artfont_LoadArtFont(&font24s, "ui_art\\font24.bin", "ui_art\\font24s.pcx"); |
||||
artfont_LoadArtFont(&font16g, "ui_art\\font16.bin", "ui_art\\font16g.pcx"); |
||||
artfont_LoadArtFont(&font16s, "ui_art\\font16.bin", "ui_art\\font16s.pcx"); |
||||
artfont_LoadArtFont(&font42g, "ui_art\\font42.bin", "ui_art\\font42g.pcx"); |
||||
artfont_LoadArtFont(&font42y, "ui_art\\font42.bin", "ui_art\\font42y.pcx"); |
||||
return 1; |
||||
artfont_LoadArtFont(&font30g, "ui_art\\font30.bin", "ui_art\\font30g.pcx"); |
||||
artfont_LoadArtFont(&font30s, "ui_art\\font30.bin", "ui_art\\font30s.pcx"); |
||||
artfont_LoadArtFont(&font24g, "ui_art\\font24.bin", "ui_art\\font24g.pcx"); |
||||
artfont_LoadArtFont(&font24s, "ui_art\\font24.bin", "ui_art\\font24s.pcx"); |
||||
artfont_LoadArtFont(&font16g, "ui_art\\font16.bin", "ui_art\\font16g.pcx"); |
||||
artfont_LoadArtFont(&font16s, "ui_art\\font16.bin", "ui_art\\font16s.pcx"); |
||||
artfont_LoadArtFont(&font42g, "ui_art\\font42.bin", "ui_art\\font42g.pcx"); |
||||
artfont_LoadArtFont(&font42y, "ui_art\\font42.bin", "ui_art\\font42y.pcx"); |
||||
return 1; |
||||
} |
||||
|
||||
// ref: 0x100011FB
|
||||
void __fastcall artfont_LoadArtFont(FontStruct *pFont, const char *pszBinFile, const char *pszFileName) |
||||
{ |
||||
LONG v4; // eax
|
||||
signed int v5; // edi
|
||||
unsigned char v6; // al
|
||||
int v7; // ecx
|
||||
int a5[4]; // [esp+8h] [ebp-20h]
|
||||
DWORD size[2]; // [esp+18h] [ebp-10h]
|
||||
BYTE *pBuffer; // [esp+20h] [ebp-8h]
|
||||
HANDLE phFile; // [esp+24h] [ebp-4h]
|
||||
HANDLE *a1a; // [esp+30h] [ebp+8h]
|
||||
LONG v4; // eax
|
||||
signed int v5; // edi
|
||||
unsigned char v6; // al
|
||||
int v7; // ecx
|
||||
int a5[4]; // [esp+8h] [ebp-20h]
|
||||
DWORD size[2]; // [esp+18h] [ebp-10h]
|
||||
BYTE *pBuffer; // [esp+20h] [ebp-8h]
|
||||
HANDLE phFile; // [esp+24h] [ebp-4h]
|
||||
HANDLE *a1a; // [esp+30h] [ebp+8h]
|
||||
|
||||
if ( !pFont->active && SFileOpenFile(pszBinFile, &phFile) ) |
||||
{ |
||||
v4 = SFileGetFileSize(phFile, 0); |
||||
if ( SFileReadFile(phFile, pFont, v4, 0, 0) ) |
||||
{ |
||||
SFileCloseFile(phFile); |
||||
local_LoadArtImage(pszFileName, &pBuffer, size); |
||||
memset(pFont->fonttrans, 0, 0x400u); |
||||
if ( pBuffer ) |
||||
{ |
||||
v5 = 0; |
||||
a1a = pFont->fonttrans; |
||||
do |
||||
{ |
||||
v6 = pFont->fontbin[v5 + 2]; |
||||
if ( v6 ) |
||||
{ |
||||
v7 = pFont->fontbin[1]; |
||||
a5[2] = v6; |
||||
a5[1] = v5 * v7; |
||||
a5[0] = 0; |
||||
a5[3] = v7 + v5 * v7 - 1; |
||||
STransCreateI(pBuffer, size[0], size[1], 8, (int)a5, 16777248, a1a); |
||||
} |
||||
++a1a; |
||||
++v5; |
||||
} |
||||
while ( v5 <= 256 ); |
||||
pFont->active = 1; |
||||
SMemFree(pBuffer, "C:\\Src\\Diablo\\DiabloUI\\artfont.cpp", 206, 0); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
SFileCloseFile(phFile); |
||||
} |
||||
} |
||||
if (!pFont->active && SFileOpenFile(pszBinFile, &phFile)) { |
||||
v4 = SFileGetFileSize(phFile, 0); |
||||
if (SFileReadFile(phFile, pFont, v4, 0, 0)) { |
||||
SFileCloseFile(phFile); |
||||
local_LoadArtImage(pszFileName, &pBuffer, size); |
||||
memset(pFont->fonttrans, 0, 0x400u); |
||||
if (pBuffer) { |
||||
v5 = 0; |
||||
a1a = pFont->fonttrans; |
||||
do { |
||||
v6 = pFont->fontbin[v5 + 2]; |
||||
if (v6) { |
||||
v7 = pFont->fontbin[1]; |
||||
a5[2] = v6; |
||||
a5[1] = v5 * v7; |
||||
a5[0] = 0; |
||||
a5[3] = v7 + v5 * v7 - 1; |
||||
STransCreateI(pBuffer, size[0], size[1], 8, (int)a5, 16777248, a1a); |
||||
} |
||||
++a1a; |
||||
++v5; |
||||
} while (v5 <= 256); |
||||
pFont->active = 1; |
||||
SMemFree(pBuffer, "C:\\Src\\Diablo\\DiabloUI\\artfont.cpp", 206, 0); |
||||
} |
||||
} else { |
||||
SFileCloseFile(phFile); |
||||
} |
||||
} |
||||
} |
||||
|
||||
// ref: 0x100012F6
|
||||
int __cdecl artfont_GetFontMaxHeight() |
||||
{ |
||||
int result; // eax
|
||||
int result; // eax
|
||||
|
||||
if ( sgpCurrFont && sgpCurrFont->active ) |
||||
result = sgpCurrFont->fontbin[1]; |
||||
else |
||||
result = 0; |
||||
return result; |
||||
if (sgpCurrFont && sgpCurrFont->active) |
||||
result = sgpCurrFont->fontbin[1]; |
||||
else |
||||
result = 0; |
||||
return result; |
||||
} |
||||
|
||||
// ref: 0x10001310
|
||||
int __cdecl artfont_GetFontDefWidth() |
||||
{ |
||||
int result; // eax
|
||||
int result; // eax
|
||||
|
||||
if ( sgpCurrFont && sgpCurrFont->active ) |
||||
result = sgpCurrFont->fontbin[0]; |
||||
else |
||||
result = 0; |
||||
return result; |
||||
if (sgpCurrFont && sgpCurrFont->active) |
||||
result = sgpCurrFont->fontbin[0]; |
||||
else |
||||
result = 0; |
||||
return result; |
||||
} |
||||
|
||||
// ref: 0x10001329
|
||||
int __fastcall artfont_GetFontWidth(char *str) |
||||
{ |
||||
int result; // eax
|
||||
unsigned char i; // bl
|
||||
unsigned char v3; // bl
|
||||
int v4; // esi
|
||||
int result; // eax
|
||||
unsigned char i; // bl
|
||||
unsigned char v3; // bl
|
||||
int v4; // esi
|
||||
|
||||
result = 0; |
||||
if ( !sgpCurrFont || !sgpCurrFont->active ) |
||||
return 0; |
||||
for ( i = *str; *str; i = *str ) |
||||
{ |
||||
v3 = sgpCurrFont->fontbin[i + 2]; |
||||
if ( v3 ) |
||||
v4 = v3; |
||||
else |
||||
v4 = sgpCurrFont->fontbin[0]; |
||||
result += v4; |
||||
++str; |
||||
} |
||||
return result; |
||||
result = 0; |
||||
if (!sgpCurrFont || !sgpCurrFont->active) |
||||
return 0; |
||||
for (i = *str; *str; i = *str) { |
||||
v3 = sgpCurrFont->fontbin[i + 2]; |
||||
if (v3) |
||||
v4 = v3; |
||||
else |
||||
v4 = sgpCurrFont->fontbin[0]; |
||||
result += v4; |
||||
++str; |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
// ref: 0x1000136C
|
||||
void __cdecl artfont_cpp_init() |
||||
{ |
||||
artfont_cpp_float = 2139095040; |
||||
artfont_cpp_float = 2139095040; |
||||
} |
||||
// 10026BB0: using guessed type int artfont_cpp_float;
|
||||
|
||||
// ref: 0x10001377
|
||||
int __fastcall artfont_GetFontBreak(char *str) |
||||
{ |
||||
int result; // eax
|
||||
unsigned char v2; // dl
|
||||
unsigned char v3; // dl
|
||||
int result; // eax
|
||||
unsigned char v2; // dl
|
||||
unsigned char v3; // dl
|
||||
|
||||
result = 0; |
||||
if ( !sgpCurrFont || !sgpCurrFont->active ) |
||||
return 0; |
||||
while ( 1 ) |
||||
{ |
||||
v3 = *str; |
||||
if ( !*str ) |
||||
break; |
||||
if ( v3 == '\n' ) |
||||
break; |
||||
if ( v3 == ' ' ) |
||||
break; |
||||
v2 = sgpCurrFont->fontbin[v3 + 2]; |
||||
if ( !v2 ) |
||||
break; |
||||
result += v2; |
||||
++str; |
||||
} |
||||
return result; |
||||
result = 0; |
||||
if (!sgpCurrFont || !sgpCurrFont->active) |
||||
return 0; |
||||
while (1) { |
||||
v3 = *str; |
||||
if (!*str) |
||||
break; |
||||
if (v3 == '\n') |
||||
break; |
||||
if (v3 == ' ') |
||||
break; |
||||
v2 = sgpCurrFont->fontbin[v3 + 2]; |
||||
if (!v2) |
||||
break; |
||||
result += v2; |
||||
++str; |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
// ref: 0x100013B3
|
||||
void __cdecl artfont_delete_operator(void *ptr) |
||||
{ |
||||
if ( ptr ) |
||||
SMemFree(ptr, "delete", -1, 0); |
||||
if (ptr) |
||||
SMemFree(ptr, "delete", -1, 0); |
||||
} |
||||
|
||||
// ref: 0x100013CD
|
||||
void __fastcall artfont_PrintFontStr(char *str, DWORD **pSurface, int sx, int sy) |
||||
{ |
||||
FontStruct *v5; // esi
|
||||
unsigned char v6; // cl
|
||||
int v7; // edi
|
||||
unsigned char v8; // dl
|
||||
int v9; // edi
|
||||
DWORD *v10; // ecx
|
||||
HANDLE hTrans; // [esp+Ch] [ebp-8h]
|
||||
HANDLE hTransa; // [esp+Ch] [ebp-8h]
|
||||
FontStruct *v5; // esi
|
||||
unsigned char v6; // cl
|
||||
int v7; // edi
|
||||
unsigned char v8; // dl
|
||||
int v9; // edi
|
||||
DWORD *v10; // ecx
|
||||
HANDLE hTrans; // [esp+Ch] [ebp-8h]
|
||||
HANDLE hTransa; // [esp+Ch] [ebp-8h]
|
||||
|
||||
if ( pSurface ) |
||||
{ |
||||
if ( *pSurface ) |
||||
{ |
||||
v5 = sgpCurrFont; |
||||
if ( sgpCurrFont ) |
||||
{ |
||||
if ( sgpCurrFont->active ) |
||||
{ |
||||
if ( sx < 0 ) |
||||
sx = 0; |
||||
if ( sy < 0 ) |
||||
sy = 0; |
||||
v6 = *str; |
||||
if ( *str ) |
||||
{ |
||||
while ( 1 ) |
||||
{ |
||||
hTrans = (HANDLE)(sy + v5->fontbin[1]); |
||||
if ( sy + v5->fontbin[1] > (signed int)pSurface[2] ) |
||||
return; |
||||
if ( v6 == '\n' ) |
||||
break; |
||||
v7 = v6; |
||||
v8 = v5->fontbin[v6 + 2]; |
||||
if ( !v8 ) |
||||
{ |
||||
v9 = v5->fontbin[0]; |
||||
if ( sx + v9 + artfont_GetFontBreak(++str) < (signed int)pSurface[1] ) |
||||
{ |
||||
sx += v9; |
||||
} |
||||
else |
||||
{ |
||||
sx = 0; |
||||
sy = (int)hTrans; |
||||
} |
||||
goto LABEL_23; |
||||
} |
||||
hTransa = v5->fonttrans[v6]; |
||||
if ( v5->fonttrans[v6] ) |
||||
{ |
||||
v10 = pSurface[1]; |
||||
if ( sx + v8 <= (signed int)v10 ) |
||||
{ |
||||
STransBlt(*pSurface, sx, sy, (int)v10, hTransa); |
||||
v5 = sgpCurrFont; |
||||
sx += sgpCurrFont->fontbin[v7 + 2]; |
||||
goto LABEL_22; |
||||
} |
||||
sx = 0; |
||||
sy += v5->fontbin[1]; |
||||
} |
||||
LABEL_23: |
||||
v6 = *str; |
||||
if ( !*str ) |
||||
return; |
||||
} |
||||
sx = 0; |
||||
sy += v5->fontbin[1]; |
||||
LABEL_22: |
||||
++str; |
||||
goto LABEL_23; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if (pSurface) { |
||||
if (*pSurface) { |
||||
v5 = sgpCurrFont; |
||||
if (sgpCurrFont) { |
||||
if (sgpCurrFont->active) { |
||||
if (sx < 0) |
||||
sx = 0; |
||||
if (sy < 0) |
||||
sy = 0; |
||||
v6 = *str; |
||||
if (*str) { |
||||
while (1) { |
||||
hTrans = (HANDLE)(sy + v5->fontbin[1]); |
||||
if (sy + v5->fontbin[1] > (signed int)pSurface[2]) |
||||
return; |
||||
if (v6 == '\n') |
||||
break; |
||||
v7 = v6; |
||||
v8 = v5->fontbin[v6 + 2]; |
||||
if (!v8) { |
||||
v9 = v5->fontbin[0]; |
||||
if (sx + v9 + artfont_GetFontBreak(++str) < (signed int)pSurface[1]) { |
||||
sx += v9; |
||||
} else { |
||||
sx = 0; |
||||
sy = (int)hTrans; |
||||
} |
||||
goto LABEL_23; |
||||
} |
||||
hTransa = v5->fonttrans[v6]; |
||||
if (v5->fonttrans[v6]) { |
||||
v10 = pSurface[1]; |
||||
if (sx + v8 <= (signed int)v10) { |
||||
STransBlt(*pSurface, sx, sy, (int)v10, hTransa); |
||||
v5 = sgpCurrFont; |
||||
sx += sgpCurrFont->fontbin[v7 + 2]; |
||||
goto LABEL_22; |
||||
} |
||||
sx = 0; |
||||
sy += v5->fontbin[1]; |
||||
} |
||||
LABEL_23: |
||||
v6 = *str; |
||||
if (!*str) |
||||
return; |
||||
} |
||||
sx = 0; |
||||
sy += v5->fontbin[1]; |
||||
LABEL_22: |
||||
++str; |
||||
goto LABEL_23; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -1,157 +1,148 @@
|
||||
// ref: 0x10004054
|
||||
BOOL __stdcall UiCopyProtError(int *pdwResult) |
||||
{ |
||||
int v1; // eax
|
||||
int v2; // eax
|
||||
char Buffer[128]; // [esp+0h] [ebp-80h]
|
||||
int v1; // eax
|
||||
int v2; // eax
|
||||
char Buffer[128]; // [esp+0h] [ebp-80h]
|
||||
|
||||
if ( DiabloUI_GetSpawned() ) |
||||
LoadStringA(ghUiInst, 0x3Fu, Buffer, 127); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Bu, Buffer, 127); |
||||
v1 = (int)SDrawGetFrameWindow(); |
||||
v2 = SDlgDialogBoxParam(ghUiInst, "OKCANCEL_DIALOG", v1, CopyProt_WndProc, (int)Buffer); |
||||
if ( pdwResult ) |
||||
*pdwResult = v2; |
||||
return 1; |
||||
if (DiabloUI_GetSpawned()) |
||||
LoadStringA(ghUiInst, 0x3Fu, Buffer, 127); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Bu, Buffer, 127); |
||||
v1 = (int)SDrawGetFrameWindow(); |
||||
v2 = SDlgDialogBoxParam(ghUiInst, "OKCANCEL_DIALOG", v1, CopyProt_WndProc, (int)Buffer); |
||||
if (pdwResult) |
||||
*pdwResult = v2; |
||||
return 1; |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x100040AF
|
||||
LRESULT __stdcall CopyProt_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
||||
{ |
||||
HWND v4; // ecx
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
LONG v7; // eax
|
||||
HWND v9; // eax
|
||||
HWND v4; // ecx
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
LONG v7; // eax
|
||||
HWND v9; // eax
|
||||
|
||||
if ( Msg == 2 ) |
||||
{ |
||||
CopyProt_FreeCopyResrcs(); |
||||
Fade_UpdatePaletteRange(10); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg <= 0x103 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if ( Msg <= 0x105 ) |
||||
{ |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg == 272 ) |
||||
{ |
||||
CopyProt_LoadCopyStuff(hWnd, lParam); |
||||
return 1; |
||||
} |
||||
if ( Msg != 273 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
switch ( (unsigned short)wParam ) |
||||
{ |
||||
case 1u: |
||||
v6 = GetFocus(); |
||||
v7 = GetWindowLongA(v6, -12); |
||||
v4 = hWnd; |
||||
if ( v7 == 1109 ) |
||||
{ |
||||
v5 = 1; |
||||
goto LABEL_13; |
||||
} |
||||
goto LABEL_12; |
||||
case 2u: |
||||
v4 = hWnd; |
||||
LABEL_12: |
||||
v5 = 2; |
||||
goto LABEL_13; |
||||
case 0x455u: |
||||
v4 = hWnd; |
||||
v5 = 1; |
||||
LABEL_13: |
||||
CopyProt_EndCopyDlg(v4, v5); |
||||
break; |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg == 2) { |
||||
CopyProt_FreeCopyResrcs(); |
||||
Fade_UpdatePaletteRange(10); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg <= 0x103) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg <= 0x105) { |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg == 272) { |
||||
CopyProt_LoadCopyStuff(hWnd, lParam); |
||||
return 1; |
||||
} |
||||
if (Msg != 273) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
switch ((unsigned short)wParam) { |
||||
case 1u: |
||||
v6 = GetFocus(); |
||||
v7 = GetWindowLongA(v6, -12); |
||||
v4 = hWnd; |
||||
if (v7 == 1109) { |
||||
v5 = 1; |
||||
goto LABEL_13; |
||||
} |
||||
goto LABEL_12; |
||||
case 2u: |
||||
v4 = hWnd; |
||||
LABEL_12: |
||||
v5 = 2; |
||||
goto LABEL_13; |
||||
case 0x455u: |
||||
v4 = hWnd; |
||||
v5 = 1; |
||||
LABEL_13: |
||||
CopyProt_EndCopyDlg(v4, v5); |
||||
break; |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x10004173
|
||||
void __cdecl CopyProt_FreeCopyResrcs() |
||||
{ |
||||
if ( copyprot_artpal ) |
||||
{ |
||||
FreeResource(copyprot_artpal); |
||||
copyprot_artpal = 0; |
||||
} |
||||
if ( copyprot_btnart ) |
||||
{ |
||||
FreeResource(copyprot_btnart); |
||||
copyprot_btnart = 0; |
||||
} |
||||
if ( copyprot_popupart ) |
||||
{ |
||||
FreeResource(copyprot_popupart); |
||||
copyprot_popupart = 0; |
||||
} |
||||
if (copyprot_artpal) { |
||||
FreeResource(copyprot_artpal); |
||||
copyprot_artpal = 0; |
||||
} |
||||
if (copyprot_btnart) { |
||||
FreeResource(copyprot_btnart); |
||||
copyprot_btnart = 0; |
||||
} |
||||
if (copyprot_popupart) { |
||||
FreeResource(copyprot_popupart); |
||||
copyprot_popupart = 0; |
||||
} |
||||
} |
||||
|
||||
// ref: 0x100041B5
|
||||
BOOL __fastcall CopyProt_LoadCopyStuff(HWND hWnd, int a2) |
||||
{ |
||||
HRSRC v2; // eax
|
||||
HRSRC v3; // eax
|
||||
HRSRC v4; // eax
|
||||
void *v5; // edi
|
||||
void *v6; // ebx
|
||||
HWND v7; // eax
|
||||
PALETTEENTRY pPalEntries[256]; // [esp+Ch] [ebp-420h]
|
||||
int msgs[3]; // [esp+40Ch] [ebp-20h]
|
||||
DWORD data[2]; // [esp+418h] [ebp-14h]
|
||||
LPCSTR lpString; // [esp+420h] [ebp-Ch]
|
||||
void *v13; // [esp+424h] [ebp-8h]
|
||||
HRSRC v2; // eax
|
||||
HRSRC v3; // eax
|
||||
HRSRC v4; // eax
|
||||
void *v5; // edi
|
||||
void *v6; // ebx
|
||||
HWND v7; // eax
|
||||
PALETTEENTRY pPalEntries[256]; // [esp+Ch] [ebp-420h]
|
||||
int msgs[3]; // [esp+40Ch] [ebp-20h]
|
||||
DWORD data[2]; // [esp+418h] [ebp-14h]
|
||||
LPCSTR lpString; // [esp+420h] [ebp-Ch]
|
||||
void *v13; // [esp+424h] [ebp-8h]
|
||||
|
||||
msgs[2] = 0; |
||||
lpString = (LPCSTR)a2; |
||||
data[0] = 112; |
||||
data[1] = 140; |
||||
msgs[0] = 1109; |
||||
msgs[1] = 2; |
||||
v2 = FindResourceA(ghUiInst, "IDR_POPUPART", "ART_FILES"); |
||||
copyprot_popupart = LoadResource(ghUiInst, v2); |
||||
v3 = FindResourceA(ghUiInst, "IDR_BTNART", "ART_FILES"); |
||||
copyprot_btnart = LoadResource(ghUiInst, v3); |
||||
v4 = FindResourceA(ghUiInst, "IDR_ARTPAL", "ART_FILES"); |
||||
copyprot_artpal = LoadResource(ghUiInst, v4); |
||||
v5 = LockResource(copyprot_popupart); |
||||
v6 = LockResource(copyprot_btnart); |
||||
v13 = LockResource(copyprot_artpal); |
||||
if ( v5 ) |
||||
SDlgSetBitmapI(hWnd, 0, &nullcharacter, -1, 1, v5, 0, 284, 148, -1); |
||||
ShowCursor(1); |
||||
Fade_SetInputWindow(hWnd); |
||||
if ( v6 ) |
||||
local_FitButtonDlg(hWnd, msgs, v6, data); |
||||
if ( v13 ) |
||||
{ |
||||
memcpy(pPalEntries, v13, 0x400u); |
||||
SDrawUpdatePalette(0, 0x100u, pPalEntries, 1); |
||||
} |
||||
v7 = GetDlgItem(hWnd, 1026); |
||||
SetWindowTextA(v7, lpString); |
||||
return 1; |
||||
msgs[2] = 0; |
||||
lpString = (LPCSTR)a2; |
||||
data[0] = 112; |
||||
data[1] = 140; |
||||
msgs[0] = 1109; |
||||
msgs[1] = 2; |
||||
v2 = FindResourceA(ghUiInst, "IDR_POPUPART", "ART_FILES"); |
||||
copyprot_popupart = LoadResource(ghUiInst, v2); |
||||
v3 = FindResourceA(ghUiInst, "IDR_BTNART", "ART_FILES"); |
||||
copyprot_btnart = LoadResource(ghUiInst, v3); |
||||
v4 = FindResourceA(ghUiInst, "IDR_ARTPAL", "ART_FILES"); |
||||
copyprot_artpal = LoadResource(ghUiInst, v4); |
||||
v5 = LockResource(copyprot_popupart); |
||||
v6 = LockResource(copyprot_btnart); |
||||
v13 = LockResource(copyprot_artpal); |
||||
if (v5) |
||||
SDlgSetBitmapI(hWnd, 0, &nullcharacter, -1, 1, v5, 0, 284, 148, -1); |
||||
ShowCursor(1); |
||||
Fade_SetInputWindow(hWnd); |
||||
if (v6) |
||||
local_FitButtonDlg(hWnd, msgs, v6, data); |
||||
if (v13) { |
||||
memcpy(pPalEntries, v13, 0x400u); |
||||
SDrawUpdatePalette(0, 0x100u, pPalEntries, 1); |
||||
} |
||||
v7 = GetDlgItem(hWnd, 1026); |
||||
SetWindowTextA(v7, lpString); |
||||
return 1; |
||||
} |
||||
|
||||
// ref: 0x1000430C
|
||||
void __fastcall CopyProt_EndCopyDlg(HWND hWnd, int a2) |
||||
{ |
||||
ShowCursor(0); |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
ShowCursor(0); |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
} |
||||
|
||||
// ref: 0x10004329
|
||||
void __cdecl CopyProt_cpp_init() |
||||
{ |
||||
CopyProt_cpp_float = CopyProt_cpp_float_value; |
||||
CopyProt_cpp_float = CopyProt_cpp_float_value; |
||||
} |
||||
// 1001F3F8: using guessed type int CopyProt_cpp_float_value;
|
||||
// 10029620: using guessed type int CopyProt_cpp_float;
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
// ref: 0x1000523E
|
||||
BOOL __stdcall UiGetDefaultStats(int pclass, _uidefaultstats *pStats) |
||||
{ |
||||
if ( !pStats ) |
||||
return 0; |
||||
pStats->strength = defstats[pclass][0]; |
||||
pStats->magic = defstats[pclass][1]; |
||||
pStats->dexterity = defstats[pclass][2]; |
||||
pStats->vitality = defstats[pclass][3]; |
||||
return 1; |
||||
if (!pStats) |
||||
return 0; |
||||
pStats->strength = defstats[pclass][0]; |
||||
pStats->magic = defstats[pclass][1]; |
||||
pStats->dexterity = defstats[pclass][2]; |
||||
pStats->vitality = defstats[pclass][3]; |
||||
return 1; |
||||
} |
||||
|
||||
// ref: 0x10005287
|
||||
void __cdecl CreaStat_cpp_init() |
||||
{ |
||||
CreaStat_cpp_float = CreaStat_cpp_float_value; |
||||
CreaStat_cpp_float = CreaStat_cpp_float_value; |
||||
} |
||||
// 1001F404: using guessed type int CreaStat_cpp_float_value;
|
||||
// 100296E0: using guessed type int CreaStat_cpp_float;
|
||||
|
||||
@ -1,109 +1,95 @@
|
||||
// ref: 0x100063B3
|
||||
BOOL __stdcall UiBetaDisclaimer(int a1) |
||||
{ |
||||
int v1; // eax
|
||||
int v1; // eax
|
||||
|
||||
v1 = (int)SDrawGetFrameWindow(); |
||||
SDlgDialogBoxParam(ghUiInst, "DISCLAIMER_DIALOG", v1, disclaim_WndProc, a1); |
||||
return 1; |
||||
v1 = (int)SDrawGetFrameWindow(); |
||||
SDlgDialogBoxParam(ghUiInst, "DISCLAIMER_DIALOG", v1, disclaim_WndProc, a1); |
||||
return 1; |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x100063DA
|
||||
LRESULT __stdcall disclaim_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
||||
{ |
||||
HWND v5; // eax
|
||||
HWND v5; // eax
|
||||
|
||||
if ( Msg > 0x111 ) |
||||
{ |
||||
if ( Msg != 513 && Msg != 516 ) |
||||
{ |
||||
if ( Msg == 528 ) |
||||
{ |
||||
if ( (_WORD)wParam == 513 || (_WORD)wParam == 516 ) |
||||
disclaim_FadeFromDisclaim(hWnd); |
||||
} |
||||
else if ( Msg == 2024 ) |
||||
{ |
||||
if ( !Fade_CheckRange5() ) |
||||
Fade_SetFadeTimer((int)hWnd); |
||||
return 0; |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
} |
||||
else if ( Msg != 273 ) |
||||
{ |
||||
if ( Msg != 2 ) |
||||
{ |
||||
if ( Msg != 256 ) |
||||
{ |
||||
if ( Msg > 0x103 ) |
||||
{ |
||||
if ( Msg <= 0x105 ) |
||||
{ |
||||
v5 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v5, Msg, wParam, lParam); |
||||
} |
||||
else if ( Msg == 272 ) |
||||
{ |
||||
disclaim_LoadDisclaimGFX(hWnd); |
||||
PostMessageA(hWnd, 0x7E8u, 0, 0); |
||||
return 1; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
goto LABEL_21; |
||||
} |
||||
disclaim_DelDisclaimProcs(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg > 0x111) { |
||||
if (Msg != 513 && Msg != 516) { |
||||
if (Msg == 528) { |
||||
if ((_WORD)wParam == 513 || (_WORD)wParam == 516) |
||||
disclaim_FadeFromDisclaim(hWnd); |
||||
} else if (Msg == 2024) { |
||||
if (!Fade_CheckRange5()) |
||||
Fade_SetFadeTimer((int)hWnd); |
||||
return 0; |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
} else if (Msg != 273) { |
||||
if (Msg != 2) { |
||||
if (Msg != 256) { |
||||
if (Msg > 0x103) { |
||||
if (Msg <= 0x105) { |
||||
v5 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v5, Msg, wParam, lParam); |
||||
} else if (Msg == 272) { |
||||
disclaim_LoadDisclaimGFX(hWnd); |
||||
PostMessageA(hWnd, 0x7E8u, 0, 0); |
||||
return 1; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
goto LABEL_21; |
||||
} |
||||
disclaim_DelDisclaimProcs(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
LABEL_21: |
||||
disclaim_FadeFromDisclaim(hWnd); |
||||
return 0; |
||||
disclaim_FadeFromDisclaim(hWnd); |
||||
return 0; |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x100064C9
|
||||
void __fastcall disclaim_DelDisclaimProcs(HWND hWnd) |
||||
{ |
||||
void **v2; // eax
|
||||
void **v2; // eax
|
||||
|
||||
Doom_DeleteFreeProcs(hWnd, disclaim_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, disclaim_msgtbl1); |
||||
v2 = (void **)GetWindowLongA(hWnd, -21); |
||||
local_FreeMemPtr(v2); |
||||
Doom_DeleteFreeProcs(hWnd, disclaim_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, disclaim_msgtbl1); |
||||
v2 = (void **)GetWindowLongA(hWnd, -21); |
||||
local_FreeMemPtr(v2); |
||||
} |
||||
|
||||
// ref: 0x100064F3
|
||||
void __fastcall disclaim_LoadDisclaimGFX(HWND hWnd) |
||||
{ |
||||
DWORD *v2; // eax MAPDST
|
||||
DWORD *v2; // eax MAPDST
|
||||
|
||||
v2 = local_AllocWndLongData(); |
||||
if ( v2 ) |
||||
{ |
||||
SetWindowLongA(hWnd, -21, (LONG)v2); |
||||
local_LoadArtWithPal(hWnd, 0, &nullcharacter, -1, 1, "ui_art\\disclaim.pcx", (BYTE **)v2, v2 + 1, 0); |
||||
Fade_NoInputAndArt(hWnd, 0); |
||||
} |
||||
Doom_ParseWndProc3(hWnd, disclaim_msgtbl1, 5); |
||||
Doom_ParseWndProc3(hWnd, disclaim_msgtbl2, 2); |
||||
v2 = local_AllocWndLongData(); |
||||
if (v2) { |
||||
SetWindowLongA(hWnd, -21, (LONG)v2); |
||||
local_LoadArtWithPal(hWnd, 0, &nullcharacter, -1, 1, "ui_art\\disclaim.pcx", (BYTE **)v2, v2 + 1, 0); |
||||
Fade_NoInputAndArt(hWnd, 0); |
||||
} |
||||
Doom_ParseWndProc3(hWnd, disclaim_msgtbl1, 5); |
||||
Doom_ParseWndProc3(hWnd, disclaim_msgtbl2, 2); |
||||
} |
||||
|
||||
// ref: 0x10006552
|
||||
void __fastcall disclaim_FadeFromDisclaim(HWND hWnd) |
||||
{ |
||||
Fade_Range5SetZero(); |
||||
Fade_UpdatePaletteRange(10); |
||||
SDlgEndDialog(hWnd, (void *)HANDLE_FLAG_INHERIT); |
||||
Fade_Range5SetZero(); |
||||
Fade_UpdatePaletteRange(10); |
||||
SDlgEndDialog(hWnd, (void *)HANDLE_FLAG_INHERIT); |
||||
} |
||||
|
||||
// ref: 0x10006571
|
||||
void __cdecl disclaim_cpp_init() |
||||
{ |
||||
disclaim_cpp_float = disclaim_cpp_float_value; |
||||
disclaim_cpp_float = disclaim_cpp_float_value; |
||||
} |
||||
// 1001F418: using guessed type int disclaim_cpp_float_value;
|
||||
// 10029850: using guessed type int disclaim_cpp_float;
|
||||
|
||||
@ -1,147 +1,137 @@
|
||||
// ref: 0x10006F7C
|
||||
LRESULT __stdcall EntName_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
||||
{ |
||||
int v4; // edx
|
||||
HWND v5; // eax
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
int v4; // edx
|
||||
HWND v5; // eax
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
|
||||
v4 = 2; |
||||
if ( Msg == 2 ) |
||||
{ |
||||
EntName_DelEntNameMsgs(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg <= 0x103 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if ( Msg <= 0x105 ) |
||||
{ |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
switch ( Msg ) |
||||
{ |
||||
case 0x110u: |
||||
entname_charname = (char *)lParam; |
||||
EntName_LoadFocusChkName(hWnd); |
||||
return 0; |
||||
case 0x111u: |
||||
if ( (unsigned short)wParam != 1 ) |
||||
{ |
||||
if ( (unsigned short)wParam != 2 ) |
||||
{ |
||||
if ( (unsigned short)wParam == 1065 ) |
||||
EntName_GetMessageName(hWnd, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
goto LABEL_11; |
||||
} |
||||
goto LABEL_18; |
||||
case 0x113u: |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if ( Msg != 513 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
v5 = GetDlgItem(hWnd, 1056); |
||||
if ( local_GetBottomRect(hWnd, v5, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
LABEL_18: |
||||
v4 = 1; |
||||
goto LABEL_11; |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if ( local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
v4 = 2; |
||||
LABEL_11: |
||||
EntName_SetCharName(hWnd, v4); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
v4 = 2; |
||||
if (Msg == 2) { |
||||
EntName_DelEntNameMsgs(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg <= 0x103) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg <= 0x105) { |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
switch (Msg) { |
||||
case 0x110u: |
||||
entname_charname = (char *)lParam; |
||||
EntName_LoadFocusChkName(hWnd); |
||||
return 0; |
||||
case 0x111u: |
||||
if ((unsigned short)wParam != 1) { |
||||
if ((unsigned short)wParam != 2) { |
||||
if ((unsigned short)wParam == 1065) |
||||
EntName_GetMessageName(hWnd, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
goto LABEL_11; |
||||
} |
||||
goto LABEL_18; |
||||
case 0x113u: |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if (Msg != 513) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
v5 = GetDlgItem(hWnd, 1056); |
||||
if (local_GetBottomRect(hWnd, v5, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
LABEL_18: |
||||
v4 = 1; |
||||
goto LABEL_11; |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if (local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
v4 = 2; |
||||
LABEL_11: |
||||
EntName_SetCharName(hWnd, v4); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x1000709E
|
||||
void __fastcall EntName_DelEntNameMsgs(HWND hWnd) |
||||
{ |
||||
HWND v2; // eax
|
||||
HWND v2; // eax
|
||||
|
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, entname_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
} |
||||
|
||||
// ref: 0x100070DB
|
||||
void __fastcall EntName_LoadFocusChkName(HWND hWnd) |
||||
{ |
||||
HWND v2; // edi
|
||||
LONG v3; // eax
|
||||
HWND v4; // ebx
|
||||
char Buffer[32]; // [esp+Ch] [ebp-20h]
|
||||
HWND v2; // edi
|
||||
LONG v3; // eax
|
||||
HWND v4; // ebx
|
||||
char Buffer[32]; // [esp+Ch] [ebp-20h]
|
||||
|
||||
v2 = GetParent(hWnd); |
||||
if ( SelHero_GetHeroIsGood() == 1 ) |
||||
LoadStringA(ghUiInst, 0x20u, Buffer, 31); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Fu, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(hWnd, -21, v3); |
||||
Doom_ParseWndProc3(hWnd, entname_msgtbl1, 5); |
||||
Doom_ParseWndProcs(hWnd, entname_msgtbl2, 4, 0); |
||||
Doom_ParseWndProc5(hWnd, entname_msgtbl3, 2); |
||||
Focus_LoadSpinner("ui_art\\focus.pcx"); |
||||
SDlgSetTimer((int)hWnd, 1, 55, 0); |
||||
v4 = GetDlgItem(hWnd, 1065); |
||||
SendMessageA(v4, 0x401u, 0xFu, 0); |
||||
if ( SelHero_GetHeroIsGood() == 1 ) |
||||
SendMessageA(v4, 0x404u, 0, (LPARAM)" ,<>%&\\\"?*#/"); |
||||
v2 = GetParent(hWnd); |
||||
if (SelHero_GetHeroIsGood() == 1) |
||||
LoadStringA(ghUiInst, 0x20u, Buffer, 31); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Fu, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(hWnd, -21, v3); |
||||
Doom_ParseWndProc3(hWnd, entname_msgtbl1, 5); |
||||
Doom_ParseWndProcs(hWnd, entname_msgtbl2, 4, 0); |
||||
Doom_ParseWndProc5(hWnd, entname_msgtbl3, 2); |
||||
Focus_LoadSpinner("ui_art\\focus.pcx"); |
||||
SDlgSetTimer((int)hWnd, 1, 55, 0); |
||||
v4 = GetDlgItem(hWnd, 1065); |
||||
SendMessageA(v4, 0x401u, 0xFu, 0); |
||||
if (SelHero_GetHeroIsGood() == 1) |
||||
SendMessageA(v4, 0x404u, 0, (LPARAM) " ,<>%&\\\"?*#/"); |
||||
} |
||||
|
||||
// ref: 0x100071AC
|
||||
void __fastcall EntName_SetCharName(HWND hWnd, int a2) |
||||
{ |
||||
char *v4; // ST08_4
|
||||
HWND v5; // eax
|
||||
char *v4; // ST08_4
|
||||
HWND v5; // eax
|
||||
|
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
v4 = entname_charname; |
||||
v5 = GetDlgItem(hWnd, 1065); |
||||
GetWindowTextA(v5, v4, 16); |
||||
entname_charname[15] = 0; |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
v4 = entname_charname; |
||||
v5 = GetDlgItem(hWnd, 1065); |
||||
GetWindowTextA(v5, v4, 16); |
||||
entname_charname[15] = 0; |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
} |
||||
|
||||
// ref: 0x100071ED
|
||||
void __fastcall EntName_GetMessageName(HWND hWnd, unsigned int a2, int a3) |
||||
{ |
||||
unsigned int v3; // edx
|
||||
HWND v5; // eax
|
||||
unsigned int v3; // edx
|
||||
HWND v5; // eax
|
||||
|
||||
v3 = (a2 >> 16) - 1; |
||||
if ( v3 ) |
||||
{ |
||||
if ( v3 == 2 ) |
||||
Doom_ParseWndProc6(hWnd, entname_msgtbl3, 2); |
||||
} |
||||
else |
||||
{ |
||||
v5 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v5); |
||||
} |
||||
v3 = (a2 >> 16) - 1; |
||||
if (v3) { |
||||
if (v3 == 2) |
||||
Doom_ParseWndProc6(hWnd, entname_msgtbl3, 2); |
||||
} else { |
||||
v5 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v5); |
||||
} |
||||
} |
||||
|
||||
// ref: 0x10007220
|
||||
void __cdecl EntName_cpp_init() |
||||
{ |
||||
EntName_cpp_float = EntName_cpp_float_value; |
||||
EntName_cpp_float = EntName_cpp_float_value; |
||||
} |
||||
// 1001F424: using guessed type int EntName_cpp_float_value;
|
||||
// 10029860: using guessed type int EntName_cpp_float;
|
||||
|
||||
@ -1,157 +1,140 @@
|
||||
// ref: 0x1000722B
|
||||
void __fastcall Fade_ApplyPaletteRange(int range1, int range2) |
||||
{ |
||||
tagPALETTEENTRY *v4; // eax MAPDST
|
||||
BYTE *v6; // esi
|
||||
BYTE v7; // al
|
||||
tagPALETTEENTRY *v4; // eax MAPDST
|
||||
BYTE *v6; // esi
|
||||
BYTE v7; // al
|
||||
|
||||
v4 = local_GetArtPalEntry(0); |
||||
if ( range1 == range2 ) |
||||
{ |
||||
memcpy(fadepal, v4, 0x400u); |
||||
} |
||||
else if ( range2 ) |
||||
{ |
||||
v6 = &fadepal[0].peGreen; |
||||
do |
||||
{ |
||||
v7 = range2 * v4->peRed / range1; |
||||
++v4; |
||||
*(v6 - 1) = v7; |
||||
*v6 = range2 * v4[-1].peGreen / range1; |
||||
v6 += 4; |
||||
*(v6 - 3) = range2 * v4[-1].peBlue / range1; |
||||
} |
||||
while ( (signed int)v6 < (signed int)&fadepal[256].peGreen ); |
||||
} |
||||
else |
||||
{ |
||||
memcpy(fadepal, v4, 0x400u); |
||||
local_ClearPalette(fadepal); |
||||
} |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
v4 = local_GetArtPalEntry(0); |
||||
if (range1 == range2) { |
||||
memcpy(fadepal, v4, 0x400u); |
||||
} else if (range2) { |
||||
v6 = &fadepal[0].peGreen; |
||||
do { |
||||
v7 = range2 * v4->peRed / range1; |
||||
++v4; |
||||
*(v6 - 1) = v7; |
||||
*v6 = range2 * v4[-1].peGreen / range1; |
||||
v6 += 4; |
||||
*(v6 - 3) = range2 * v4[-1].peBlue / range1; |
||||
} while ((signed int)v6 < (signed int)&fadepal[256].peGreen); |
||||
} else { |
||||
memcpy(fadepal, v4, 0x400u); |
||||
local_ClearPalette(fadepal); |
||||
} |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
} |
||||
|
||||
// ref: 0x100072BE
|
||||
void __fastcall Fade_UpdatePaletteRange(int range) |
||||
{ |
||||
tagPALETTEENTRY *v2; // eax
|
||||
tagPALETTEENTRY *v3; // edi
|
||||
BYTE *v4; // ecx
|
||||
BYTE v5; // al
|
||||
HPALETTE v6; // ebx
|
||||
int v7; // [esp+10h] [ebp-4h]
|
||||
tagPALETTEENTRY *v2; // eax
|
||||
tagPALETTEENTRY *v3; // edi
|
||||
BYTE *v4; // ecx
|
||||
BYTE v5; // al
|
||||
HPALETTE v6; // ebx
|
||||
int v7; // [esp+10h] [ebp-4h]
|
||||
|
||||
v2 = local_GetArtPalEntry(0); |
||||
memcpy(fadepal, v2, 0x400u); |
||||
if ( range > 0 ) |
||||
{ |
||||
v7 = range; |
||||
do |
||||
{ |
||||
v3 = local_GetArtPalEntry(0); |
||||
v4 = &fadepal[0].peGreen; |
||||
do |
||||
{ |
||||
v5 = v3->peRed / range; |
||||
++v3; |
||||
*(v4 - 1) -= v5; |
||||
*v4 -= v3[-1].peGreen / range; |
||||
v4 += 4; |
||||
*(v4 - 3) -= v3[-1].peBlue / range; |
||||
} |
||||
while ( (signed int)v4 < (signed int)&fadepal[256].peGreen ); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
--v7; |
||||
} |
||||
while ( v7 ); |
||||
} |
||||
local_ClearPalette(fadepal); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
local_SetCursorDefault(); |
||||
SDrawClearSurface(0); |
||||
v6 = (HPALETTE)GetStockObject(15); |
||||
GetPaletteEntries(v6, 0, 0xAu, fadepal); |
||||
GetPaletteEntries(v6, 0xAu, 0xAu, &fadepal[246]); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
v2 = local_GetArtPalEntry(0); |
||||
memcpy(fadepal, v2, 0x400u); |
||||
if (range > 0) { |
||||
v7 = range; |
||||
do { |
||||
v3 = local_GetArtPalEntry(0); |
||||
v4 = &fadepal[0].peGreen; |
||||
do { |
||||
v5 = v3->peRed / range; |
||||
++v3; |
||||
*(v4 - 1) -= v5; |
||||
*v4 -= v3[-1].peGreen / range; |
||||
v4 += 4; |
||||
*(v4 - 3) -= v3[-1].peBlue / range; |
||||
} while ((signed int)v4 < (signed int)&fadepal[256].peGreen); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
--v7; |
||||
} while (v7); |
||||
} |
||||
local_ClearPalette(fadepal); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
local_SetCursorDefault(); |
||||
SDrawClearSurface(0); |
||||
v6 = (HPALETTE)GetStockObject(15); |
||||
GetPaletteEntries(v6, 0, 0xAu, fadepal); |
||||
GetPaletteEntries(v6, 0xAu, 0xAu, &fadepal[246]); |
||||
SDrawUpdatePalette(0, 0x100u, fadepal, 1); |
||||
} |
||||
// 1001043C: using guessed type int __stdcall SDrawClearSurface(_DWORD);
|
||||
|
||||
// ref: 0x1000739F
|
||||
BOOL __cdecl Fade_CheckRange5() |
||||
{ |
||||
BOOL result; // eax
|
||||
BOOL result; // eax
|
||||
|
||||
result = 0; |
||||
if ( sgbIsFading ) |
||||
{ |
||||
if ( sgbFadeRange <= 5 ) |
||||
result = 1; |
||||
} |
||||
return result; |
||||
result = 0; |
||||
if (sgbIsFading) { |
||||
if (sgbFadeRange <= 5) |
||||
result = 1; |
||||
} |
||||
return result; |
||||
} |
||||
// 10029C70: using guessed type int sgbIsFading;
|
||||
|
||||
// ref: 0x100073B4
|
||||
void __cdecl Fade_Range5SetZero() |
||||
{ |
||||
if ( Fade_CheckRange5() ) |
||||
sgbIsFading = 0; |
||||
if (Fade_CheckRange5()) |
||||
sgbIsFading = 0; |
||||
} |
||||
// 10029C70: using guessed type int sgbIsFading;
|
||||
|
||||
// ref: 0x100073C5
|
||||
void __fastcall Fade_NoInputAndArt(HWND hWnd, BOOL bShowCurs) |
||||
{ |
||||
HWND v3; // eax
|
||||
HWND v3; // eax
|
||||
|
||||
v3 = GetParent(hWnd); |
||||
local_DisableKeyWaitMouse(v3); |
||||
if ( bShowCurs ) |
||||
local_SetCursorArt(); |
||||
sgbIsFading = 0; |
||||
sgbFadeRange = 0; |
||||
v3 = GetParent(hWnd); |
||||
local_DisableKeyWaitMouse(v3); |
||||
if (bShowCurs) |
||||
local_SetCursorArt(); |
||||
sgbIsFading = 0; |
||||
sgbFadeRange = 0; |
||||
} |
||||
// 10029C70: using guessed type int sgbIsFading;
|
||||
|
||||
// ref: 0x100073EF
|
||||
void __fastcall Fade_SetInputWindow(HWND hWnd) |
||||
{ |
||||
HWND v1; // eax
|
||||
HWND v1; // eax
|
||||
|
||||
v1 = GetParent(hWnd); |
||||
local_DisableKeyWaitMouse(v1); |
||||
v1 = GetParent(hWnd); |
||||
local_DisableKeyWaitMouse(v1); |
||||
} |
||||
|
||||
// ref: 0x100073FD
|
||||
void __fastcall Fade_SetFadeTimer(int nTime) |
||||
{ |
||||
if ( !sgbIsFading ) |
||||
{ |
||||
SDlgSetTimer(nTime, 16, 50, Fade_TimerFunctionDlg); |
||||
sgbIsFading = 1; |
||||
} |
||||
if (!sgbIsFading) { |
||||
SDlgSetTimer(nTime, 16, 50, Fade_TimerFunctionDlg); |
||||
sgbIsFading = 1; |
||||
} |
||||
} |
||||
// 10029C70: using guessed type int sgbIsFading;
|
||||
|
||||
// ref: 0x10007420
|
||||
void __stdcall Fade_TimerFunctionDlg(int a1, int a2, int a3, int a4) |
||||
{ |
||||
if ( sgbFadeRange > 5 ) |
||||
{ |
||||
SDlgKillTimer(a1, 16); |
||||
} |
||||
else |
||||
{ |
||||
Fade_ApplyPaletteRange(5, sgbFadeRange); |
||||
++sgbFadeRange; |
||||
} |
||||
if (sgbFadeRange > 5) { |
||||
SDlgKillTimer(a1, 16); |
||||
} else { |
||||
Fade_ApplyPaletteRange(5, sgbFadeRange); |
||||
++sgbFadeRange; |
||||
} |
||||
} |
||||
|
||||
// ref: 0x1000744D
|
||||
void __cdecl Fade_cpp_init() |
||||
{ |
||||
fade_cpp_float = fade_cpp_float_value; |
||||
fade_cpp_float = fade_cpp_float_value; |
||||
} |
||||
// 1001F428: using guessed type int fade_cpp_float_value;
|
||||
// 10029868: using guessed type int fade_cpp_float;
|
||||
|
||||
@ -1,167 +1,151 @@
|
||||
// ref: 0x10009D66
|
||||
LRESULT __stdcall SelClass_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
||||
{ |
||||
HWND v4; // eax
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
HWND v4; // eax
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
|
||||
if ( Msg == 2 ) |
||||
{ |
||||
SelClass_FreeClassMsgTbl(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg <= 0x103 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if ( Msg <= 0x105 ) |
||||
{ |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg == 272 ) |
||||
{ |
||||
SelClass_LoadClassFocus(hWnd); |
||||
return 0; |
||||
} |
||||
if ( Msg != 273 ) |
||||
{ |
||||
if ( Msg != 275 ) |
||||
{ |
||||
if ( Msg == 513 ) |
||||
{ |
||||
v4 = GetDlgItem(hWnd, 1056); |
||||
if ( local_GetBottomRect(hWnd, v4, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
v5 = 1; |
||||
LABEL_19: |
||||
SelClass_CheckClassSpawn(hWnd, v5); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if ( local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
LABEL_21: |
||||
v5 = 2; |
||||
goto LABEL_19; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if ( HIWORD(wParam) == 7 ) |
||||
{ |
||||
Focus_GetAndBlitSpin(hWnd, lParam); |
||||
} |
||||
else |
||||
{ |
||||
if ( HIWORD(wParam) != 6 ) |
||||
{ |
||||
v5 = 1; |
||||
if ( HIWORD(wParam) == 5 || (_WORD)wParam == 1 ) |
||||
goto LABEL_19; |
||||
if ( (_WORD)wParam != 2 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
goto LABEL_21; |
||||
} |
||||
Focus_CheckPlayMove(lParam); |
||||
Focus_DoBlitSpinIncFrame(hWnd, (HWND)lParam); |
||||
SelClass_SetDefaultStats(hWnd, (unsigned short)wParam); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg == 2) { |
||||
SelClass_FreeClassMsgTbl(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg <= 0x103) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg <= 0x105) { |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg == 272) { |
||||
SelClass_LoadClassFocus(hWnd); |
||||
return 0; |
||||
} |
||||
if (Msg != 273) { |
||||
if (Msg != 275) { |
||||
if (Msg == 513) { |
||||
v4 = GetDlgItem(hWnd, 1056); |
||||
if (local_GetBottomRect(hWnd, v4, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
v5 = 1; |
||||
LABEL_19: |
||||
SelClass_CheckClassSpawn(hWnd, v5); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if (local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
LABEL_21: |
||||
v5 = 2; |
||||
goto LABEL_19; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if (HIWORD(wParam) == 7) { |
||||
Focus_GetAndBlitSpin(hWnd, lParam); |
||||
} else { |
||||
if (HIWORD(wParam) != 6) { |
||||
v5 = 1; |
||||
if (HIWORD(wParam) == 5 || (_WORD)wParam == 1) |
||||
goto LABEL_19; |
||||
if ((_WORD)wParam != 2) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
goto LABEL_21; |
||||
} |
||||
Focus_CheckPlayMove(lParam); |
||||
Focus_DoBlitSpinIncFrame(hWnd, (HWND)lParam); |
||||
SelClass_SetDefaultStats(hWnd, (unsigned short)wParam); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x10009EC0
|
||||
void __fastcall SelClass_FreeClassMsgTbl(HWND hWnd) |
||||
{ |
||||
HWND v2; // eax
|
||||
HWND v2; // eax
|
||||
|
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, selclass_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
} |
||||
|
||||
// ref: 0x10009EFD
|
||||
void __fastcall SelClass_LoadClassFocus(HWND hWnd) |
||||
{ |
||||
HWND v1; // edi
|
||||
HWND v2; // esi
|
||||
LONG v3; // eax
|
||||
char Buffer[32]; // [esp+8h] [ebp-20h]
|
||||
HWND v1; // edi
|
||||
HWND v2; // esi
|
||||
LONG v3; // eax
|
||||
char Buffer[32]; // [esp+8h] [ebp-20h]
|
||||
|
||||
v1 = hWnd; |
||||
v2 = GetParent(hWnd); |
||||
if ( SelHero_GetHeroIsGood() == 1 ) |
||||
LoadStringA(ghUiInst, 0x20u, Buffer, 31); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Fu, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(v1, -21, v3); |
||||
local_DoUiWndProc(v1, (DWORD *)selclass_msgtbl3); |
||||
Doom_ParseWndProc3(v1, selclass_msgtbl1, 5); |
||||
Doom_ParseWndProcs(v1, selclass_msgtbl2, 4, 0); |
||||
Doom_ParseWndProcs(v1, selclass_msgtbl3, 2, 1); |
||||
Focus_LoadSpinner("ui_art\\focus.pcx"); |
||||
SDlgSetTimer((int)v1, 1, 55, 0); |
||||
v1 = hWnd; |
||||
v2 = GetParent(hWnd); |
||||
if (SelHero_GetHeroIsGood() == 1) |
||||
LoadStringA(ghUiInst, 0x20u, Buffer, 31); |
||||
else |
||||
LoadStringA(ghUiInst, 0x1Fu, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(v1, -21, v3); |
||||
local_DoUiWndProc(v1, (DWORD *)selclass_msgtbl3); |
||||
Doom_ParseWndProc3(v1, selclass_msgtbl1, 5); |
||||
Doom_ParseWndProcs(v1, selclass_msgtbl2, 4, 0); |
||||
Doom_ParseWndProcs(v1, selclass_msgtbl3, 2, 1); |
||||
Focus_LoadSpinner("ui_art\\focus.pcx"); |
||||
SDlgSetTimer((int)v1, 1, 55, 0); |
||||
} |
||||
|
||||
// ref: 0x10009FA2
|
||||
void __fastcall SelClass_SetDefaultStats(HWND hWnd, int a2) |
||||
{ |
||||
char v2; // bl
|
||||
HWND v4; // eax
|
||||
_uiheroinfo pInfo; // [esp+8h] [ebp-34h]
|
||||
_uidefaultstats a2a; // [esp+34h] [ebp-8h]
|
||||
char v2; // bl
|
||||
HWND v4; // eax
|
||||
_uiheroinfo pInfo; // [esp+8h] [ebp-34h]
|
||||
_uidefaultstats a2a; // [esp+34h] [ebp-8h]
|
||||
|
||||
v2 = a2; |
||||
SelHero_SetClassStats(a2 - 1062, &a2a); |
||||
memset(&pInfo, 0, 0x2Cu); |
||||
pInfo.strength = a2a.strength; |
||||
pInfo.magic = a2a.magic; |
||||
pInfo.dexterity = a2a.dexterity; |
||||
pInfo.vitality = a2a.vitality; |
||||
pInfo.level = 1; |
||||
pInfo.heroclass = v2 - 38; |
||||
v4 = GetParent(hWnd); |
||||
SelHero_PrintHeroInfo(v4, &pInfo); |
||||
v2 = a2; |
||||
SelHero_SetClassStats(a2 - 1062, &a2a); |
||||
memset(&pInfo, 0, 0x2Cu); |
||||
pInfo.strength = a2a.strength; |
||||
pInfo.magic = a2a.magic; |
||||
pInfo.dexterity = a2a.dexterity; |
||||
pInfo.vitality = a2a.vitality; |
||||
pInfo.level = 1; |
||||
pInfo.heroclass = v2 - 38; |
||||
v4 = GetParent(hWnd); |
||||
SelHero_PrintHeroInfo(v4, &pInfo); |
||||
} |
||||
|
||||
// ref: 0x1000A00D
|
||||
void __fastcall SelClass_CheckClassSpawn(HWND hWnd, int a2) |
||||
{ |
||||
HWND v4; // eax
|
||||
HWND v5; // eax
|
||||
HWND v4; // eax
|
||||
HWND v5; // eax
|
||||
|
||||
if ( DiabloUI_GetSpawned() && a2 == 1 && (v4 = GetFocus(), GetWindowLongA(v4, -12) != 1062) ) |
||||
{ |
||||
SelYesNo_SpawnErrDialog(hWnd, 69, 0); |
||||
} |
||||
else |
||||
{ |
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
if ( a2 == 1 ) |
||||
{ |
||||
v5 = GetFocus(); |
||||
a2 = GetWindowLongA(v5, -12); |
||||
} |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
} |
||||
if (DiabloUI_GetSpawned() && a2 == 1 && (v4 = GetFocus(), GetWindowLongA(v4, -12) != 1062)) { |
||||
SelYesNo_SpawnErrDialog(hWnd, 69, 0); |
||||
} else { |
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
if (a2 == 1) { |
||||
v5 = GetFocus(); |
||||
a2 = GetWindowLongA(v5, -12); |
||||
} |
||||
SDlgEndDialog(hWnd, (HANDLE)a2); |
||||
} |
||||
} |
||||
|
||||
// ref: 0x1000A077
|
||||
void __cdecl SelClass_cpp_init() |
||||
{ |
||||
SelClass_cpp_float = SelClass_cpp_float_value; |
||||
SelClass_cpp_float = SelClass_cpp_float_value; |
||||
} |
||||
// 1001F450: using guessed type int SelClass_cpp_float_value;
|
||||
// 1002A348: using guessed type int SelClass_cpp_float;
|
||||
|
||||
@ -1,134 +1,121 @@
|
||||
// ref: 0x1000E1C2
|
||||
LRESULT __stdcall SelLoad_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
||||
{ |
||||
HWND v4; // eax
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
HWND v4; // eax
|
||||
int v5; // edx
|
||||
HWND v6; // eax
|
||||
HWND v7; // eax
|
||||
HWND v9; // eax
|
||||
|
||||
if ( Msg == 2 ) |
||||
{ |
||||
SelLoad_DeleteProcsAndSpin(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg <= 0x103 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if ( Msg <= 0x105 ) |
||||
{ |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if ( Msg == 272 ) |
||||
{ |
||||
SelLoad_LoadFocusAndMsg(hWnd); |
||||
return 0; |
||||
} |
||||
if ( Msg != 273 ) |
||||
{ |
||||
if ( Msg != 275 ) |
||||
{ |
||||
if ( Msg == 513 ) |
||||
{ |
||||
v4 = GetDlgItem(hWnd, 1056); |
||||
if ( local_GetBottomRect(hWnd, v4, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
v5 = 1; |
||||
LABEL_19: |
||||
SelLoad_SelectSndLoad(hWnd, v5); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if ( local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16) ) |
||||
{ |
||||
LABEL_21: |
||||
v5 = 2; |
||||
goto LABEL_19; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if ( HIWORD(wParam) == 7 ) |
||||
{ |
||||
Focus_GetAndBlitSpin(hWnd, lParam); |
||||
} |
||||
else |
||||
{ |
||||
if ( HIWORD(wParam) != 6 ) |
||||
{ |
||||
v5 = 1; |
||||
if ( HIWORD(wParam) == 5 || (_WORD)wParam == 1 ) |
||||
goto LABEL_19; |
||||
if ( (_WORD)wParam != 2 ) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
goto LABEL_21; |
||||
} |
||||
Focus_CheckPlayMove(lParam); |
||||
Focus_DoBlitSpinIncFrame(hWnd, (HWND)lParam); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg == 2) { |
||||
SelLoad_DeleteProcsAndSpin(hWnd); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg <= 0x103) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
if (Msg <= 0x105) { |
||||
v9 = (HWND)SDrawGetFrameWindow(); |
||||
SendMessageA(v9, Msg, wParam, lParam); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
if (Msg == 272) { |
||||
SelLoad_LoadFocusAndMsg(hWnd); |
||||
return 0; |
||||
} |
||||
if (Msg != 273) { |
||||
if (Msg != 275) { |
||||
if (Msg == 513) { |
||||
v4 = GetDlgItem(hWnd, 1056); |
||||
if (local_GetBottomRect(hWnd, v4, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
v5 = 1; |
||||
LABEL_19: |
||||
SelLoad_SelectSndLoad(hWnd, v5); |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v6 = GetDlgItem(hWnd, 1054); |
||||
if (local_GetBottomRect(hWnd, v6, (unsigned short)lParam, (unsigned int)lParam >> 16)) { |
||||
LABEL_21: |
||||
v5 = 2; |
||||
goto LABEL_19; |
||||
} |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
v7 = GetFocus(); |
||||
Focus_DoBlitSpinIncFrame(hWnd, v7); |
||||
return 0; |
||||
} |
||||
if (HIWORD(wParam) == 7) { |
||||
Focus_GetAndBlitSpin(hWnd, lParam); |
||||
} else { |
||||
if (HIWORD(wParam) != 6) { |
||||
v5 = 1; |
||||
if (HIWORD(wParam) == 5 || (_WORD)wParam == 1) |
||||
goto LABEL_19; |
||||
if ((_WORD)wParam != 2) |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
goto LABEL_21; |
||||
} |
||||
Focus_CheckPlayMove(lParam); |
||||
Focus_DoBlitSpinIncFrame(hWnd, (HWND)lParam); |
||||
} |
||||
return (LRESULT)SDlgDefDialogProc(hWnd, Msg, (HDC)wParam, (HWND)lParam); |
||||
} |
||||
// 10010382: using guessed type _DWORD __stdcall SDrawGetFrameWindow();
|
||||
|
||||
// ref: 0x1000E30E
|
||||
void __fastcall SelLoad_DeleteProcsAndSpin(HWND hWnd) |
||||
{ |
||||
HWND v2; // eax
|
||||
HWND v2; // eax
|
||||
|
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
Focus_DeleteSpinners(); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl3); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl2); |
||||
Doom_DeleteFreeProcs(hWnd, selload_msgtbl1); |
||||
v2 = GetParent(hWnd); |
||||
SelHero_SetStringWithMsg(v2, 0); |
||||
} |
||||
|
||||
// ref: 0x1000E34B
|
||||
void __fastcall SelLoad_LoadFocusAndMsg(HWND hWnd) |
||||
{ |
||||
HWND v2; // edi
|
||||
LONG v3; // eax
|
||||
char Buffer[32]; // [esp+8h] [ebp-20h]
|
||||
HWND v2; // edi
|
||||
LONG v3; // eax
|
||||
char Buffer[32]; // [esp+8h] [ebp-20h]
|
||||
|
||||
v2 = GetParent(hWnd); |
||||
LoadStringA(ghUiInst, 0x1Du, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(hWnd, -21, v3); |
||||
local_DoUiWndProc(hWnd, (DWORD *)selload_msgtbl3); |
||||
Doom_ParseWndProc3(hWnd, selload_msgtbl1, 5); |
||||
Doom_ParseWndProcs(hWnd, selload_msgtbl2, 4, 0); |
||||
Doom_ParseWndProcs(hWnd, selload_msgtbl3, 2, 1); |
||||
Focus_LoadSpinner("ui_art\\focus16.pcx"); |
||||
SDlgSetTimer((int)hWnd, 1, 55, 0); |
||||
v2 = GetParent(hWnd); |
||||
LoadStringA(ghUiInst, 0x1Du, Buffer, 31); |
||||
SelHero_SetStringWithMsg(v2, Buffer); |
||||
v3 = GetWindowLongA(v2, -21); |
||||
SetWindowLongA(hWnd, -21, v3); |
||||
local_DoUiWndProc(hWnd, (DWORD *)selload_msgtbl3); |
||||
Doom_ParseWndProc3(hWnd, selload_msgtbl1, 5); |
||||
Doom_ParseWndProcs(hWnd, selload_msgtbl2, 4, 0); |
||||
Doom_ParseWndProcs(hWnd, selload_msgtbl3, 2, 1); |
||||
Focus_LoadSpinner("ui_art\\focus16.pcx"); |
||||
SDlgSetTimer((int)hWnd, 1, 55, 0); |
||||
} |
||||
|
||||
// ref: 0x1000E3E2
|
||||
void __fastcall SelLoad_SelectSndLoad(HWND hWnd, int a2) |
||||
{ |
||||
int v2; // esi
|
||||
HWND v4; // eax
|
||||
int v2; // esi
|
||||
HWND v4; // eax
|
||||
|
||||
v2 = a2; |
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
if ( v2 == 1 ) |
||||
{ |
||||
v4 = GetFocus(); |
||||
v2 = GetWindowLongA(v4, -12); |
||||
} |
||||
SDlgEndDialog(hWnd, (HANDLE)v2); |
||||
v2 = a2; |
||||
TitleSnd_PlaySelectSound(); |
||||
SDlgKillTimer((int)hWnd, 1); |
||||
if (v2 == 1) { |
||||
v4 = GetFocus(); |
||||
v2 = GetWindowLongA(v4, -12); |
||||
} |
||||
SDlgEndDialog(hWnd, (HANDLE)v2); |
||||
} |
||||
|
||||
// ref: 0x1000E41A
|
||||
void __cdecl SelLoad_cpp_init() |
||||
{ |
||||
SelLoad_cpp_float = SelLoad_cpp_float_value; |
||||
SelLoad_cpp_float = SelLoad_cpp_float_value; |
||||
} |
||||
// 1001F46C: using guessed type int SelLoad_cpp_float_value;
|
||||
// 1002A4C8: using guessed type int SelLoad_cpp_float;
|
||||
|
||||
@ -1,33 +1,33 @@
|
||||
// ref: 0x10010306
|
||||
void __fastcall TitleSnd_SetSoundFunction(void (__stdcall *func)(char *file)) |
||||
void __fastcall TitleSnd_SetSoundFunction(void(__stdcall *func)(char *file)) |
||||
{ |
||||
gfnSoundFunction = func; |
||||
gfnSoundFunction = func; |
||||
} |
||||
|
||||
// ref: 0x1001030D
|
||||
void __cdecl TitleSnd_InitSoundFunc() |
||||
{ |
||||
gfnSoundFunction = 0; |
||||
gfnSoundFunction = 0; |
||||
} |
||||
|
||||
// ref: 0x10010315
|
||||
void __cdecl TitleSnd_PlayMoveSound() |
||||
{ |
||||
if ( gfnSoundFunction ) |
||||
gfnSoundFunction("sfx\\items\\titlemov.wav"); |
||||
if (gfnSoundFunction) |
||||
gfnSoundFunction("sfx\\items\\titlemov.wav"); |
||||
} |
||||
|
||||
// ref: 0x1001031F
|
||||
void __cdecl TitleSnd_PlaySelectSound() |
||||
{ |
||||
if ( gfnSoundFunction ) |
||||
gfnSoundFunction("sfx\\items\\titlslct.wav"); |
||||
if (gfnSoundFunction) |
||||
gfnSoundFunction("sfx\\items\\titlslct.wav"); |
||||
} |
||||
|
||||
// ref: 0x1001032E
|
||||
void __cdecl TitleSnd_cpp_init() |
||||
{ |
||||
titlesnd_cpp_float = titlesnd_cpp_float_value; |
||||
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…
Reference in new issue