additional organization, add consistant class-header relationship
This commit is contained in:
1 parent
080de6c68c
commit
0e0a012baf
74 files changed
+415
-34
No files matched your search
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by neo on 2019-08-15.
|
||||
|
||||
|
||||
#include "../pinball.h"
|
||||
|
||||
//----- (0100789A) --------------------------------------------------------
|
||||
INT __stdcall a_dialog(HINSTANCE hInstance, HWND hWnd, int a3)
|
||||
{
|
||||
CHAR *v3; // eax
|
||||
CHAR *v4; // eax
|
||||
HICON v5; // eax
|
||||
CHAR String1; // [esp+Ch] [ebp-194h]
|
||||
CHAR szOtherStuff; // [esp+D4h] [ebp-CCh]
|
||||
|
||||
v3 = get_rc_string(38, 0);
|
||||
lstrcpyA(&String1, v3);
|
||||
v4 = get_rc_string(102, 0);
|
||||
lstrcpyA(&szOtherStuff, v4);
|
||||
v5 = LoadIconA(hInstance, "ICON_1");
|
||||
return ShellAboutA(hWnd, &String1, &szOtherStuff, v5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "../pinball.h"
|
||||
|
||||
//----- (0100772D) --------------------------------------------------------
|
||||
void __stdcall help_introduction(int a1, int a2)
|
||||
{
|
||||
CHAR *v2; // ebx
|
||||
CHAR *v3; // eax
|
||||
CHAR *v4; // eax
|
||||
HWND v5; // eax
|
||||
CHAR *lpString1; // [esp+8h] [ebp-4h]
|
||||
|
||||
v2 = (CHAR *)memoryallocate(0x1F4u);
|
||||
if ( v2 )
|
||||
{
|
||||
lpString1 = (CHAR *)memoryallocate(0x1F4u);
|
||||
if ( lpString1 )
|
||||
{
|
||||
v3 = get_rc_string(178, 0);
|
||||
options_get_string(0, "HelpFile", v2, v3, 500);
|
||||
v4 = get_rc_string(166, 0);
|
||||
options_get_string((DWORD)v4, "HelpFile", v2, v2, 500);
|
||||
lstrcpyA(lpString1, v2);
|
||||
memoryfree((int)v2);
|
||||
v5 = GetDesktopWindow();
|
||||
HtmlHelpA(v5, lpString1, 0, 0);
|
||||
memoryfree((int)lpString1);
|
||||
}
|
||||
else
|
||||
{
|
||||
memoryfree((int)v2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----- (0101CF1A) --------------------------------------------------------
|
||||
HWND __stdcall HtmlHelpA(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD_PTR dwData)
|
||||
{
|
||||
HMODULE v4; // ecx
|
||||
FARPROC v5; // eax
|
||||
CHAR LibFileName; // [esp+Ch] [ebp-108h]
|
||||
|
||||
v4 = hModule;
|
||||
if ( hModule || (HMODULE)dword_1025728 != hModule )
|
||||
goto LABEL_13;
|
||||
if ( sub_101CEB6((LPBYTE)&LibFileName) )
|
||||
hModule = LoadLibraryA(&LibFileName);
|
||||
v4 = hModule;
|
||||
if ( hModule || (v4 = LoadLibraryA("hhctrl.ocx"), (hModule = v4) != 0) )
|
||||
{
|
||||
LABEL_13:
|
||||
v5 = (FARPROC)pHtmlHelpA;
|
||||
if ( pHtmlHelpA )
|
||||
return (HWND)((int (__stdcall *)(HWND, LPCSTR, UINT, DWORD_PTR))v5)(hwndCaller, pszFile, uCommand, dwData);
|
||||
v5 = GetProcAddress(v4, (LPCSTR)0xE);
|
||||
pHtmlHelpA = (HWND (__stdcall *)(HWND, const char *, unsigned int, unsigned int))v5;
|
||||
if ( v5 )
|
||||
return (HWND)((int (__stdcall *)(HWND, LPCSTR, UINT, DWORD_PTR))v5)(hwndCaller, pszFile, uCommand, dwData);
|
||||
}
|
||||
dword_1025728 = 1;
|
||||
return 0;
|
||||
}
|
||||
// 1025720: using guessed type HWND (__stdcall *pHtmlHelpA)(HWND, const char *, unsigned int, unsigned int);
|
||||
// 1025728: using guessed type int dword_1025728;
|
||||
@@ -0,0 +1,405 @@
|
||||
//
|
||||
// Created by neo on 2019-08-15.
|
||||
//
|
||||
|
||||
#include "../pinball.h"
|
||||
|
||||
//----- (01004C3C) --------------------------------------------------------
|
||||
int __stdcall high_score_clear_table(int a1)
|
||||
{
|
||||
int result; // eax
|
||||
signed int v2; // ecx
|
||||
|
||||
result = a1;
|
||||
v2 = 5;
|
||||
do
|
||||
{
|
||||
*(_DWORD *)(result + 32) = -999;
|
||||
*(_BYTE *)result = 0;
|
||||
result += 36;
|
||||
--v2;
|
||||
}
|
||||
while ( v2 );
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (01004C60) --------------------------------------------------------
|
||||
signed int __stdcall high_score_get_score_position(int a1, int a2)
|
||||
{
|
||||
signed int result; // eax
|
||||
_DWORD *v3; // ecx
|
||||
|
||||
if ( a2 <= 0 )
|
||||
return -1;
|
||||
result = 0;
|
||||
v3 = (_DWORD *)(a1 + 32);
|
||||
while ( a2 <= *v3 )
|
||||
{
|
||||
++result;
|
||||
v3 += 9;
|
||||
if ( result >= 5 )
|
||||
return -1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (01004C8D) --------------------------------------------------------
|
||||
int __stdcall high_score_place_new_score_into(int a1, int a2, LPCSTR lpString, int a4)
|
||||
{
|
||||
char *v4; // edi
|
||||
int v5; // eax
|
||||
int v6; // esi
|
||||
|
||||
if ( a4 >= 0 )
|
||||
{
|
||||
if ( a4 <= 4 )
|
||||
{
|
||||
v4 = (char *)(a1 + 144);
|
||||
v5 = 5 - a4;
|
||||
do
|
||||
{
|
||||
--v5;
|
||||
qmemcpy(v4, v4 - 36, 0x24u);
|
||||
v4 -= 36;
|
||||
}
|
||||
while ( v5 );
|
||||
}
|
||||
v6 = a1 + 36 * a4;
|
||||
*(_DWORD *)(v6 + 32) = a2;
|
||||
if ( lstrlenA(lpString) >= 31 )
|
||||
*((_BYTE *)lpString + 31) = 0;
|
||||
lstrcpyA((LPSTR)v6, lpString);
|
||||
*(_BYTE *)(v6 + 31) = 0;
|
||||
}
|
||||
return a4;
|
||||
}
|
||||
|
||||
//----- (01004CF9) --------------------------------------------------------
|
||||
char *__stdcall scramble_number_string(int Val, char *DstBuf)
|
||||
{
|
||||
return __ltoa(Val, DstBuf, 10);
|
||||
}
|
||||
|
||||
//----- (01004D18) --------------------------------------------------------
|
||||
signed int __stdcall high_score_read(int a1, int a2)
|
||||
{
|
||||
int i; // eax
|
||||
CHAR *dwDisposition; // [esp+10h] [ebp-30h]
|
||||
CHAR *v5; // [esp+14h] [ebp-2Ch]
|
||||
signed int Val; // [esp+18h] [ebp-28h]
|
||||
int v7; // [esp+1Ch] [ebp-24h]
|
||||
LPSTR lpString1; // [esp+20h] [ebp-20h]
|
||||
CHAR *lpString2; // [esp+24h] [ebp-1Ch]
|
||||
char DstBuf; // [esp+28h] [ebp-18h]
|
||||
|
||||
v7 = 0;
|
||||
high_score_clear_table(a1);
|
||||
lpString2 = (CHAR *)memoryallocate(0x12Cu);
|
||||
if ( !lpString2 )
|
||||
return 1;
|
||||
v5 = (CHAR *)memoryallocate(0x12Cu);
|
||||
Val = 0;
|
||||
lpString1 = (LPSTR)a1;
|
||||
dwDisposition = get_rc_string(166, 0);
|
||||
do
|
||||
{
|
||||
__itoa(Val, &DstBuf, 10);
|
||||
lstrcatA(&DstBuf, ".Name");
|
||||
options_get_string((DWORD)dwDisposition, &DstBuf, lpString2, WindowName, 32);
|
||||
lpString2[32] = 0;
|
||||
lstrcpyA(lpString1, lpString2);
|
||||
__itoa(Val, &DstBuf, 10);
|
||||
lstrcatA(&DstBuf, ".Score");
|
||||
options_get_string((DWORD)dwDisposition, &DstBuf, lpString2, WindowName, 300);
|
||||
*((_DWORD *)lpString1 + 8) = _atol(lpString2);
|
||||
for ( i = lstrlenA(lpString1); --i >= 0; v7 += lpString1[i] )
|
||||
;
|
||||
v7 += *((_DWORD *)lpString1 + 8);
|
||||
++Val;
|
||||
lpString1 += 36;
|
||||
}
|
||||
while ( Val < 5 );
|
||||
scramble_number_string(v7, lpString2);
|
||||
options_get_string((DWORD)dwDisposition, "Verification", v5, WindowName, 300);
|
||||
if ( lstrcmpA(lpString2, v5) )
|
||||
high_score_clear_table(a1);
|
||||
memoryfree((int)lpString2);
|
||||
memoryfree((int)v5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----- (01004E87) --------------------------------------------------------
|
||||
int __stdcall high_score_write(LPCSTR lpString, int a2)
|
||||
{
|
||||
LPCSTR v2; // ebx
|
||||
int i; // eax
|
||||
HKEY phkResult; // [esp+8h] [ebp-28h]
|
||||
signed int Val; // [esp+Ch] [ebp-24h]
|
||||
int v7; // [esp+10h] [ebp-20h]
|
||||
char *v8; // [esp+14h] [ebp-1Ch]
|
||||
char DstBuf; // [esp+18h] [ebp-18h]
|
||||
|
||||
v2 = lpString;
|
||||
v7 = 0;
|
||||
v8 = (char *)memoryallocate(0x12Cu);
|
||||
if ( !v8 )
|
||||
return 1;
|
||||
Val = 0;
|
||||
phkResult = (HKEY)get_rc_string(166, 0);
|
||||
do
|
||||
{
|
||||
__itoa(Val, &DstBuf, 10);
|
||||
lstrcatA(&DstBuf, ".Name");
|
||||
options_set_string(phkResult, &DstBuf, v2);
|
||||
__itoa(Val, &DstBuf, 10);
|
||||
lstrcatA(&DstBuf, ".Score");
|
||||
__ltoa(*((_DWORD *)v2 + 8), v8, 10);
|
||||
options_set_string(phkResult, &DstBuf, v8);
|
||||
for ( i = lstrlenA(v2); --i >= 0; v7 += v2[i] )
|
||||
;
|
||||
v7 += *((_DWORD *)v2 + 8);
|
||||
++Val;
|
||||
v2 += 36;
|
||||
}
|
||||
while ( Val < 5 );
|
||||
scramble_number_string(v7, v8);
|
||||
options_set_string(phkResult, "Verification", v8);
|
||||
memoryfree((int)v8);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----- (01004F99) --------------------------------------------------------
|
||||
char *__stdcall score_string_format(int a1, char *a2)
|
||||
{
|
||||
char *result; // eax
|
||||
DWORD dwDisposition; // [esp+4h] [ebp-20h]
|
||||
DWORD cbData; // [esp+8h] [ebp-1Ch]
|
||||
char *Dest; // [esp+Ch] [ebp-18h]
|
||||
HKEY phkResult; // [esp+10h] [ebp-14h]
|
||||
CHAR String1; // [esp+14h] [ebp-10h]
|
||||
|
||||
result = a2;
|
||||
Dest = a2;
|
||||
if ( a1 == -999 )
|
||||
{
|
||||
*a2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstrcpyA(&String1, ",");
|
||||
if ( !RegCreateKeyExA(
|
||||
HKEY_CURRENT_USER,
|
||||
"Control Panel\\International",
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0xF003Fu,
|
||||
0,
|
||||
&phkResult,
|
||||
&dwDisposition) )
|
||||
{
|
||||
cbData = 10;
|
||||
RegQueryValueExA(phkResult, "sThousand", 0, 0, (LPBYTE)&String1, &cbData);
|
||||
RegCloseKey(phkResult);
|
||||
}
|
||||
phkResult = (HKEY)(a1 % 1000000000 / 1000000);
|
||||
if ( a1 / 1000000000 <= 0 )
|
||||
{
|
||||
if ( (signed int)phkResult <= 0 )
|
||||
{
|
||||
if ( a1 % 1000000 / 1000 <= 0 )
|
||||
_sprintf(Dest, "%ld", a1);
|
||||
else
|
||||
_sprintf(Dest, "%ld%s%03ld", a1 % 1000000 / 1000, &String1, a1 % 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
_sprintf(Dest, "%ld%s%03ld%s%03ld", phkResult, &String1, a1 % 1000000 / 1000, &String1, a1 % 1000);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_sprintf(
|
||||
Dest,
|
||||
"%ld%s%03ld%s%03ld%s%03ld",
|
||||
a1 / 1000000000,
|
||||
&String1,
|
||||
phkResult,
|
||||
&String1,
|
||||
a1 % 1000000 / 1000,
|
||||
&String1,
|
||||
a1 % 1000);
|
||||
}
|
||||
result = Dest;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (010050E2) --------------------------------------------------------
|
||||
void __stdcall hsdlg_show_score(HWND hDlg, LPCSTR lpString, int a3, int a4)
|
||||
{
|
||||
HWND v4; // eax
|
||||
HWND v5; // eax
|
||||
CHAR String; // [esp+10h] [ebp-28h]
|
||||
|
||||
if ( a4 < 5 )
|
||||
{
|
||||
score_string_format(a3, &String);
|
||||
if ( String )
|
||||
{
|
||||
v4 = GetDlgItem(hDlg, a4 + 401);
|
||||
SetWindowTextA(v4, lpString);
|
||||
v5 = GetDlgItem(hDlg, a4 + 501);
|
||||
SetWindowTextA(v5, &String);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----- (01005159) --------------------------------------------------------
|
||||
void __stdcall show_high_scores(HWND hDlg, LPCSTR lpString)
|
||||
{
|
||||
LPCSTR v2; // edi
|
||||
signed int v3; // ebx
|
||||
int v4; // esi
|
||||
|
||||
v2 = lpString;
|
||||
v3 = 0;
|
||||
v4 = 0;
|
||||
do
|
||||
{
|
||||
if ( high_score_dlg_enter_name == 1 && high_score_position == v4 )
|
||||
{
|
||||
hsdlg_show_score(hDlg, " ", high_score_dlg_score, v4);
|
||||
v3 = 1;
|
||||
}
|
||||
hsdlg_show_score(hDlg, v2, *((_DWORD *)v2 + 8), v4++ + v3);
|
||||
v2 += 36;
|
||||
}
|
||||
while ( v4 < 5 );
|
||||
}
|
||||
// 1028270: using guessed type int high_score_dlg_enter_name;
|
||||
|
||||
//----- (010051B5) --------------------------------------------------------
|
||||
BOOL __stdcall HighScore(HWND hWnd, UINT a2, WPARAM a3, LPARAM a4)
|
||||
{
|
||||
CHAR *v4; // eax
|
||||
CHAR *v5; // eax
|
||||
HWND v7; // eax
|
||||
HWND v8; // edi
|
||||
HWND v9; // eax
|
||||
signed int nIDDlgItem; // [esp+Ch] [ebp-1D4h]
|
||||
CHAR String1; // [esp+14h] [ebp-1CCh]
|
||||
CHAR String; // [esp+DCh] [ebp-104h]
|
||||
char v13; // [esp+FBh] [ebp-E5h]
|
||||
|
||||
switch ( a2 )
|
||||
{
|
||||
case 0x10u:
|
||||
SendMessageA(hWnd, 0x111u, 2u, 0);
|
||||
break;
|
||||
case 0x53u:
|
||||
WinHelpA(*(HWND *)(a4 + 12), "pinball.hlp", 0xCu, (ULONG_PTR)&unk_1023460);
|
||||
break;
|
||||
case 0x7Bu:
|
||||
WinHelpA((HWND)a3, "pinball.hlp", 0xAu, (ULONG_PTR)&unk_1023460);
|
||||
break;
|
||||
case 0x110u:
|
||||
show_high_scores(hWnd, high_score_dlg_hst);
|
||||
nIDDlgItem = 601;
|
||||
do
|
||||
{
|
||||
v7 = GetDlgItem(hWnd, nIDDlgItem);
|
||||
ShowWindow(v7, 0);
|
||||
++nIDDlgItem;
|
||||
}
|
||||
while ( nIDDlgItem < 611 );
|
||||
if ( high_score_dlg_enter_name == 1 )
|
||||
{
|
||||
if ( high_score_position == -1 )
|
||||
{
|
||||
high_score_dlg_enter_name = 0;
|
||||
return 1;
|
||||
}
|
||||
v8 = GetDlgItem(hWnd, high_score_position + 601);
|
||||
ShowWindow(v8, 5);
|
||||
EnableWindow(v8, 1);
|
||||
SetFocus(v8);
|
||||
if ( high_score_default_name )
|
||||
{
|
||||
SetWindowTextA(v8, high_score_default_name);
|
||||
SendMessageA(v8, 0xB1u, 0, -1);
|
||||
}
|
||||
SendMessageA(v8, 0xC5u, 0x1Fu, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFocus(hWnd);
|
||||
}
|
||||
v9 = GetParent(hWnd);
|
||||
if ( v9 )
|
||||
center_in(v9, hWnd);
|
||||
return 0;
|
||||
case 0x111u:
|
||||
if ( a3 == 1 )
|
||||
{
|
||||
if ( high_score_dlg_enter_name != 1 )
|
||||
goto LABEL_15;
|
||||
GetDlgItemTextA(hWnd, high_score_position + 601, &String, 32);
|
||||
v13 = 0;
|
||||
high_score_place_new_score_into((int)high_score_dlg_hst, high_score_dlg_score, &String, high_score_position);
|
||||
}
|
||||
else if ( a3 != 2 )
|
||||
{
|
||||
if ( a3 == 112 )
|
||||
{
|
||||
v4 = get_rc_string(41, 0);
|
||||
lstrcpyA(&String1, v4);
|
||||
v5 = get_rc_string(40, 0);
|
||||
if ( MessageBoxA(hWnd, v5, &String1, 0x101u) == 1 )
|
||||
{
|
||||
high_score_clear_table((int)high_score_dlg_hst);
|
||||
if ( high_score_dlg_enter_name )
|
||||
EndDialog(hWnd, 1);
|
||||
else
|
||||
EndDialog(hWnd, 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
high_score_dlg_enter_name = 0;
|
||||
LABEL_15:
|
||||
EndDialog(hWnd, 0);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// 1028270: using guessed type int high_score_dlg_enter_name;
|
||||
|
||||
//----- (01005412) --------------------------------------------------------
|
||||
INT_PTR __stdcall show_high_score_dialog(const CHAR *a1)
|
||||
{
|
||||
high_score_dlg_enter_name = 0;
|
||||
high_score_dlg_score = 0;
|
||||
high_score_dlg_hst = a1;
|
||||
return DialogBoxParamA(hinst, "dlg_highscores", hwnd_frame, HighScore, 0);
|
||||
}
|
||||
// 1028270: using guessed type int high_score_dlg_enter_name;
|
||||
|
||||
//----- (01005452) --------------------------------------------------------
|
||||
INT_PTR __stdcall show_and_set_high_score_dialog(const CHAR *a1, int a2, int a3, const CHAR *a4)
|
||||
{
|
||||
INT_PTR result; // eax
|
||||
|
||||
high_score_position = a3;
|
||||
high_score_dlg_score = a2;
|
||||
high_score_dlg_hst = a1;
|
||||
high_score_dlg_enter_name = 1;
|
||||
high_score_default_name = a4;
|
||||
do
|
||||
result = DialogBoxParamA(hinst, "dlg_highscores", hwnd_frame, HighScore, 0);
|
||||
while ( result );
|
||||
return result;
|
||||
}
|
||||
// 1028270: using guessed type int high_score_dlg_enter_name;
|
||||
|
||||
|
||||
@@ -0,0 +1,587 @@
|
||||
//
|
||||
// Created by neo on 2019-08-15.
|
||||
//
|
||||
|
||||
#include "pinball.h"
|
||||
|
||||
//----- (010034B6) --------------------------------------------------------
|
||||
CHAR *__stdcall options_path_init(LPCSTR lpString)
|
||||
{
|
||||
int v1; // eax
|
||||
CHAR *result; // eax
|
||||
|
||||
v1 = lstrlenA(lpString);
|
||||
result = (CHAR *)memoryallocate(v1 + 1);
|
||||
lpString2 = result;
|
||||
if ( result )
|
||||
result = lstrcpyA(result, lpString);
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (010034E7) --------------------------------------------------------
|
||||
void __stdcall options_path_uninit()
|
||||
{
|
||||
if ( lpString2 )
|
||||
memoryfree((int)lpString2);
|
||||
lpString2 = 0;
|
||||
}
|
||||
|
||||
//----- (01003503) --------------------------------------------------------
|
||||
LPCSTR __stdcall options_path(LPCSTR lpString2)
|
||||
{
|
||||
CHAR *v1; // eax
|
||||
|
||||
v1 = lpString1;
|
||||
if ( !lpString1 )
|
||||
{
|
||||
v1 = (CHAR *)memoryallocate(0x7D0u);
|
||||
lpString1 = v1;
|
||||
if ( !v1 )
|
||||
return ::lpString2;
|
||||
}
|
||||
lstrcpyA(v1, ::lpString2);
|
||||
if ( lpString2 )
|
||||
{
|
||||
lstrcatA(lpString1, "\\");
|
||||
lstrcatA(lpString1, lpString2);
|
||||
}
|
||||
return lpString1;
|
||||
}
|
||||
|
||||
//----- (0100356C) --------------------------------------------------------
|
||||
void __stdcall options_path_free()
|
||||
{
|
||||
if ( lpString1 )
|
||||
memoryfree((int)lpString1);
|
||||
lpString1 = 0;
|
||||
}
|
||||
|
||||
//----- (01003588) --------------------------------------------------------
|
||||
HKEY __stdcall options_get_int(DWORD cbData, LPCSTR lpValueName, HKEY phkResult)
|
||||
{
|
||||
HKEY result; // eax
|
||||
const CHAR *v4; // eax
|
||||
DWORD dwDisposition; // [esp+4h] [ebp-8h]
|
||||
BYTE Data[4]; // [esp+8h] [ebp-4h]
|
||||
|
||||
result = phkResult;
|
||||
*(_DWORD *)Data = phkResult;
|
||||
if ( lpString2 )
|
||||
{
|
||||
v4 = options_path((LPCSTR)cbData);
|
||||
if ( !RegCreateKeyExA(HKEY_CURRENT_USER, v4, 0, 0, 0, 0xF003Fu, 0, &phkResult, &dwDisposition) )
|
||||
{
|
||||
cbData = 4;
|
||||
RegQueryValueExA(phkResult, lpValueName, 0, 0, Data, &cbData);
|
||||
RegCloseKey(phkResult);
|
||||
}
|
||||
options_path_free();
|
||||
result = *(HKEY *)Data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (01003601) --------------------------------------------------------
|
||||
void __stdcall options_get_string(DWORD dwDisposition, LPCSTR lpValueName, LPSTR lpString1, LPCSTR lpString2, int iMaxLength)
|
||||
{
|
||||
const CHAR *v5; // edi
|
||||
const CHAR *v6; // eax
|
||||
|
||||
v5 = (const CHAR *)iMaxLength;
|
||||
lstrcpynA(lpString1, lpString2, iMaxLength);
|
||||
if ( ::lpString2 )
|
||||
{
|
||||
v6 = options_path((LPCSTR)dwDisposition);
|
||||
if ( !RegCreateKeyExA(HKEY_CURRENT_USER, v6, 0, 0, 0, 0xF003Fu, 0, (PHKEY)&iMaxLength, &dwDisposition) )
|
||||
{
|
||||
lpString2 = v5;
|
||||
RegQueryValueExA((HKEY)iMaxLength, lpValueName, 0, 0, (LPBYTE)lpString1, (LPDWORD)&lpString2);
|
||||
RegCloseKey((HKEY)iMaxLength);
|
||||
}
|
||||
options_path_free();
|
||||
}
|
||||
}
|
||||
|
||||
//----- (0100367C) --------------------------------------------------------
|
||||
void __stdcall options_set_int(HKEY phkResult, LPCSTR lpValueName, BYTE Data)
|
||||
{
|
||||
const CHAR *v3; // eax
|
||||
DWORD dwDisposition; // [esp+4h] [ebp-4h]
|
||||
|
||||
if ( lpString2 )
|
||||
{
|
||||
v3 = options_path((LPCSTR)phkResult);
|
||||
if ( !RegCreateKeyExA(HKEY_CURRENT_USER, v3, 0, 0, 0, 0xF003Fu, 0, &phkResult, &dwDisposition) )
|
||||
{
|
||||
RegSetValueExA(phkResult, lpValueName, 0, 4u, &Data, 4u);
|
||||
RegCloseKey(phkResult);
|
||||
}
|
||||
options_path_free();
|
||||
}
|
||||
}
|
||||
|
||||
//----- (010036E3) --------------------------------------------------------
|
||||
void __stdcall options_set_string(HKEY phkResult, LPCSTR lpValueName, LPCSTR lpString)
|
||||
{
|
||||
const CHAR *v3; // eax
|
||||
int v4; // eax
|
||||
DWORD dwDisposition; // [esp+4h] [ebp-4h]
|
||||
|
||||
if ( lpString2 )
|
||||
{
|
||||
v3 = options_path((LPCSTR)phkResult);
|
||||
if ( !RegCreateKeyExA(HKEY_CURRENT_USER, v3, 0, 0, 0, 0xF003Fu, 0, &phkResult, &dwDisposition) )
|
||||
{
|
||||
v4 = lstrlenA(lpString);
|
||||
RegSetValueExA(phkResult, lpValueName, 0, 1u, (const BYTE *)lpString, v4 + 1);
|
||||
RegCloseKey(phkResult);
|
||||
}
|
||||
options_path_free();
|
||||
}
|
||||
}
|
||||
|
||||
//----- (010055F3) --------------------------------------------------------
|
||||
void __stdcall options_uninit()
|
||||
{
|
||||
options_set_int(0, "Sounds", (BYTE)options);
|
||||
options_set_int(0, "Music", (BYTE)phkResult);
|
||||
options_set_int(0, "FullScreen", (BYTE)dword_102822C);
|
||||
options_set_int(0, "Players", (BYTE)dword_1028234);
|
||||
options_set_int(0, "Left Flippper key", (BYTE)dword_1028238);
|
||||
options_set_int(0, "Right Flipper key", (BYTE)dword_102823C);
|
||||
options_set_int(0, "Plunger key", (BYTE)dword_1028240);
|
||||
options_set_int(0, "Left Table Bump key", (BYTE)dword_1028244);
|
||||
options_set_int(0, "Right Table Bump key", (BYTE)dword_1028248);
|
||||
options_set_int(0, "Bottom Table Bump key", (BYTE)dword_102824C);
|
||||
}
|
||||
|
||||
//----- (010056A9) --------------------------------------------------------
|
||||
HMENU __stdcall options_menu_set(UINT uIDEnableItem, int a2)
|
||||
{
|
||||
HMENU result; // eax
|
||||
|
||||
result = hMenu;
|
||||
if ( hMenu )
|
||||
result = (HMENU)EnableMenuItem(hMenu, uIDEnableItem, a2 == 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (010056D3) --------------------------------------------------------
|
||||
HMENU __stdcall options_menu_check(UINT uIDCheckItem, int a2)
|
||||
{
|
||||
HMENU result; // eax
|
||||
|
||||
result = hMenu;
|
||||
if ( hMenu )
|
||||
result = (HMENU)CheckMenuItem(hMenu, uIDCheckItem, a2 != 0 ? 8 : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (010056FF) --------------------------------------------------------
|
||||
HMENU __stdcall options_toggle(UINT uIDCheckItem)
|
||||
{
|
||||
HMENU result; // eax
|
||||
int v2; // ST08_4
|
||||
int v3; // esi
|
||||
bool v4; // zf
|
||||
int v5; // ST08_4
|
||||
|
||||
switch ( uIDCheckItem )
|
||||
{
|
||||
case 0xC9u:
|
||||
v3 = options == 0;
|
||||
v5 = options == 0;
|
||||
options = (HKEY)(options == 0);
|
||||
Sound_Enable(0, 7, v5);
|
||||
return options_menu_check(uIDCheckItem, v3);
|
||||
case 0xCAu:
|
||||
v3 = phkResult == 0;
|
||||
v4 = phkResult != 0;
|
||||
phkResult = (HKEY)(phkResult == 0);
|
||||
if ( v4 )
|
||||
midi_music_stop();
|
||||
else
|
||||
midi_play_pb_theme(0);
|
||||
return options_menu_check(uIDCheckItem, v3);
|
||||
case 0x193u:
|
||||
v2 = dword_102822C == 0;
|
||||
dword_102822C = (HKEY)(dword_102822C == 0);
|
||||
v3 = v2;
|
||||
fullscrn_set_screen_mode(v2);
|
||||
return options_menu_check(uIDCheckItem, v3);
|
||||
}
|
||||
if ( (signed int)uIDCheckItem > 407 && (signed int)uIDCheckItem <= 411 )
|
||||
{
|
||||
dword_1028234 = (HKEY)(uIDCheckItem - 407);
|
||||
options_menu_check(0x198u, uIDCheckItem == 408);
|
||||
options_menu_check(0x199u, dword_1028234 == (HKEY)2);
|
||||
options_menu_check(0x19Au, dword_1028234 == (HKEY)3);
|
||||
result = options_menu_check(0x19Bu, dword_1028234 == (HKEY)4);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//----- (0100580C) --------------------------------------------------------
|
||||
unsigned int __stdcall get_vk_key_name(__int16 a1, LPSTR lpString)
|
||||
{
|
||||
LONG v2; // eax
|
||||
|
||||
v2 = MapVirtualKeyA((unsigned __int16)a1, 0) << 16;
|
||||
if ( (unsigned __int16)a1 >= 0x21u && (unsigned __int16)a1 <= 0x2Eu )
|
||||
v2 |= 0x1000000u;
|
||||
return GetKeyNameTextA(v2, lpString, 19) != 0 ? (unsigned int)lpString : 0;
|
||||
}
|
||||
|
||||
//----- (01005850) --------------------------------------------------------
|
||||
BOOL __stdcall KeyMapDlgProc(HWND a1, UINT a2, WPARAM a3, LPARAM a4)
|
||||
{
|
||||
unsigned int v5; // eax
|
||||
LRESULT v6; // eax
|
||||
unsigned int v7; // eax
|
||||
LRESULT v8; // eax
|
||||
unsigned int v9; // eax
|
||||
LRESULT v10; // eax
|
||||
unsigned int v11; // eax
|
||||
LRESULT v12; // eax
|
||||
unsigned int v13; // eax
|
||||
LRESULT v14; // eax
|
||||
unsigned int v15; // eax
|
||||
LRESULT v16; // eax
|
||||
unsigned __int16 v17; // ax
|
||||
unsigned __int16 v18; // ax
|
||||
unsigned __int16 v19; // ax
|
||||
unsigned __int16 v20; // ax
|
||||
unsigned __int16 v21; // ax
|
||||
unsigned __int16 v22; // ax
|
||||
HKEY v23; // ebx
|
||||
__int16 *v24; // edi
|
||||
HKEY *v25; // esi
|
||||
CHAR *v26; // eax
|
||||
CHAR *v27; // eax
|
||||
__int16 v28; // cx
|
||||
__int16 v29; // dx
|
||||
INT_PTR v30; // eax
|
||||
__int16 v31; // [esp+Ch] [ebp-B0h]
|
||||
HKEY v32; // [esp+10h] [ebp-ACh]
|
||||
HKEY v33; // [esp+14h] [ebp-A8h]
|
||||
HKEY v34; // [esp+18h] [ebp-A4h]
|
||||
HKEY v35; // [esp+1Ch] [ebp-A0h]
|
||||
HKEY v36; // [esp+20h] [ebp-9Ch]
|
||||
HKEY v37; // [esp+24h] [ebp-98h]
|
||||
INT_PTR nResult; // [esp+28h] [ebp-94h]
|
||||
WPARAM v39; // [esp+2Ch] [ebp-90h]
|
||||
__int16 *i; // [esp+30h] [ebp-8Ch]
|
||||
LPARAM v41; // [esp+34h] [ebp-88h]
|
||||
WPARAM wParam; // [esp+38h] [ebp-84h]
|
||||
HWND hDlg; // [esp+3Ch] [ebp-80h]
|
||||
CHAR String1; // [esp+40h] [ebp-7Ch]
|
||||
CHAR lParam[20]; // [esp+A4h] [ebp-18h]
|
||||
|
||||
hDlg = a1;
|
||||
switch ( a2 )
|
||||
{
|
||||
case 0x53u:
|
||||
WinHelpA(*(HWND *)(a4 + 12), "pinball.hlp", 0xCu, (ULONG_PTR)&unk_1023540);
|
||||
return 1;
|
||||
case 0x7Bu:
|
||||
WinHelpA((HWND)a3, "pinball.hlp", 0xAu, (ULONG_PTR)&unk_1023540);
|
||||
return 1;
|
||||
case 0x110u:
|
||||
i = &vk_list;
|
||||
if ( vk_list == -1 )
|
||||
return 1;
|
||||
while ( 1 )
|
||||
{
|
||||
v28 = *i;
|
||||
v29 = *i & 0x4000;
|
||||
v30 = (unsigned __int8)*i;
|
||||
v39 = (unsigned __int8)*i;
|
||||
v31 = v29;
|
||||
if ( v29 )
|
||||
{
|
||||
wParam = 128;
|
||||
nResult = (unsigned __int16)v30;
|
||||
do
|
||||
{
|
||||
if ( nResult == MapVirtualKeyA((unsigned __int16)wParam, 2u) )
|
||||
break;
|
||||
++wParam;
|
||||
}
|
||||
while ( (unsigned __int16)wParam < 0x100u );
|
||||
LOWORD(v30) = wParam;
|
||||
if ( (_WORD)wParam != 256 )
|
||||
{
|
||||
*(_WORD *)lParam = (unsigned __int8)v39;
|
||||
v39 = wParam;
|
||||
nResult = wParam;
|
||||
LABEL_32:
|
||||
v41 = (unsigned __int16)v30;
|
||||
while ( 1 )
|
||||
{
|
||||
if ( v31 || get_vk_key_name(v30, lParam) )
|
||||
{
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 401, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 401, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_1028238 )
|
||||
SendDlgItemMessageA(hDlg, 401, 0x14Eu, wParam, 0);
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 402, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 402, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_102823C )
|
||||
SendDlgItemMessageA(hDlg, 402, 0x14Eu, wParam, 0);
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 403, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 403, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_1028240 )
|
||||
SendDlgItemMessageA(hDlg, 403, 0x14Eu, wParam, 0);
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 404, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 404, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_1028244 )
|
||||
SendDlgItemMessageA(hDlg, 404, 0x14Eu, wParam, 0);
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 405, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 405, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_1028248 )
|
||||
SendDlgItemMessageA(hDlg, 405, 0x14Eu, wParam, 0);
|
||||
wParam = (unsigned __int16)SendDlgItemMessageA(hDlg, 406, 0x14Au, 0xFFFFFFFF, (LPARAM)lParam);
|
||||
SendDlgItemMessageA(hDlg, 406, 0x151u, wParam, v41);
|
||||
if ( (HKEY)v41 == dword_102824C )
|
||||
SendDlgItemMessageA(hDlg, 406, 0x14Eu, wParam, 0);
|
||||
}
|
||||
++v39;
|
||||
++v41;
|
||||
if ( (unsigned __int16)v39 > (unsigned __int16)nResult )
|
||||
break;
|
||||
LOWORD(v30) = v39;
|
||||
}
|
||||
goto LABEL_49;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( v28 >= 0 )
|
||||
{
|
||||
nResult = v30;
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
LOWORD(nResult) = *i;
|
||||
}
|
||||
if ( (unsigned __int16)v30 <= (unsigned __int16)nResult )
|
||||
goto LABEL_32;
|
||||
}
|
||||
LABEL_49:
|
||||
++i;
|
||||
if ( *i == -1 )
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if ( a2 != 273 )
|
||||
return 0;
|
||||
nResult = (unsigned __int16)a3;
|
||||
switch ( (unsigned __int16)a3 )
|
||||
{
|
||||
case 1u:
|
||||
v39 = 0;
|
||||
v17 = SendDlgItemMessageA(a1, 401, 0x147u, 0, 0);
|
||||
v32 = (HKEY)SendDlgItemMessageA(hDlg, 401, 0x150u, v17, 0);
|
||||
v18 = SendDlgItemMessageA(hDlg, 402, 0x147u, 0, 0);
|
||||
v33 = (HKEY)SendDlgItemMessageA(hDlg, 402, 0x150u, v18, 0);
|
||||
v19 = SendDlgItemMessageA(hDlg, 403, 0x147u, 0, 0);
|
||||
v34 = (HKEY)SendDlgItemMessageA(hDlg, 403, 0x150u, v19, 0);
|
||||
v20 = SendDlgItemMessageA(hDlg, 404, 0x147u, 0, 0);
|
||||
v35 = (HKEY)SendDlgItemMessageA(hDlg, 404, 0x150u, v20, 0);
|
||||
v21 = SendDlgItemMessageA(hDlg, 405, 0x147u, 0, 0);
|
||||
v36 = (HKEY)SendDlgItemMessageA(hDlg, 405, 0x150u, v21, 0);
|
||||
v22 = SendDlgItemMessageA(hDlg, 406, 0x147u, 0, 0);
|
||||
v23 = (HKEY)SendDlgItemMessageA(hDlg, 406, 0x150u, v22, 0);
|
||||
v37 = v23;
|
||||
v24 = (__int16 *)1;
|
||||
v25 = &v32;
|
||||
while ( !v39 )
|
||||
{
|
||||
for ( i = v24; (signed int)i < 6; i = (__int16 *)((char *)i + 1) )
|
||||
{
|
||||
if ( v39 )
|
||||
break;
|
||||
if ( *v25 == *(&v32 + (_DWORD)i) )
|
||||
{
|
||||
v26 = get_rc_string(43, 0);
|
||||
lstrcpyA(&String1, v26);
|
||||
v27 = get_rc_string(39, 0);
|
||||
MessageBoxA(hDlg, v27, &String1, 0x2000u);
|
||||
v39 = 1;
|
||||
}
|
||||
}
|
||||
v24 = (__int16 *)((char *)v24 + 1);
|
||||
++v25;
|
||||
if ( (signed int)v24 - 1 >= 5 )
|
||||
{
|
||||
if ( v39 )
|
||||
return 1;
|
||||
dword_1028238 = v32;
|
||||
dword_102823C = v33;
|
||||
dword_1028240 = v34;
|
||||
dword_1028244 = v35;
|
||||
dword_1028248 = v36;
|
||||
dword_102824C = v23;
|
||||
goto LABEL_20;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2u:
|
||||
LABEL_20:
|
||||
EndDialog(hDlg, nResult);
|
||||
break;
|
||||
case 0x1F5u:
|
||||
v5 = get_vk_key_name(dword_1028250, lParam);
|
||||
v6 = SendDlgItemMessageA(hDlg, 401, 0x158u, 0, v5);
|
||||
SendDlgItemMessageA(hDlg, 401, 0x14Eu, v6, 0);
|
||||
v7 = get_vk_key_name(dword_1028254, lParam);
|
||||
v8 = SendDlgItemMessageA(hDlg, 402, 0x158u, 0, v7);
|
||||
SendDlgItemMessageA(hDlg, 402, 0x14Eu, v8, 0);
|
||||
v9 = get_vk_key_name(dword_1028258, lParam);
|
||||
v10 = SendDlgItemMessageA(hDlg, 403, 0x158u, 0, v9);
|
||||
SendDlgItemMessageA(hDlg, 403, 0x14Eu, v10, 0);
|
||||
v11 = get_vk_key_name(dword_102825C, lParam);
|
||||
v12 = SendDlgItemMessageA(hDlg, 404, 0x158u, 0, v11);
|
||||
SendDlgItemMessageA(hDlg, 404, 0x14Eu, v12, 0);
|
||||
v13 = get_vk_key_name(dword_1028260, lParam);
|
||||
v14 = SendDlgItemMessageA(hDlg, 405, 0x158u, 0, v13);
|
||||
SendDlgItemMessageA(hDlg, 405, 0x14Eu, v14, 0);
|
||||
v15 = get_vk_key_name(dword_1028264, lParam);
|
||||
v16 = SendDlgItemMessageA(hDlg, 406, 0x158u, 0, v15);
|
||||
SendDlgItemMessageA(hDlg, 406, 0x14Eu, v16, 0);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
// 1023508: using guessed type __int16 vk_list;
|
||||
|
||||
//----- (01005F45) --------------------------------------------------------
|
||||
INT_PTR __stdcall options_keyboard()
|
||||
{
|
||||
return DialogBoxParamA(hinst, "KEYMAPPER", hwnd_frame, KeyMapDlgProc, 0);
|
||||
}
|
||||
|
||||
//----- (01005F69) --------------------------------------------------------
|
||||
void __stdcall options_init(HMENU a1)
|
||||
{
|
||||
CHAR *v1; // eax
|
||||
CHAR *v2; // edi
|
||||
|
||||
hMenu = a1;
|
||||
options = (HKEY)1;
|
||||
phkResult = 0;
|
||||
dword_102822C = 0;
|
||||
dword_1028228 = (HKEY)5;
|
||||
dword_1028230 = (HKEY)2;
|
||||
*(_DWORD *)&dword_1028250 = 90;
|
||||
*(_DWORD *)&dword_1028254 = 191;
|
||||
*(_DWORD *)&dword_1028258 = 32;
|
||||
*(_DWORD *)&dword_102825C = 88;
|
||||
*(_DWORD *)&dword_1028260 = 190;
|
||||
*(_DWORD *)&dword_1028264 = 38;
|
||||
get_rc_int(159, (int *)&dword_1028250);
|
||||
get_rc_int(160, (int *)&dword_1028254);
|
||||
get_rc_int(161, (int *)&dword_1028258);
|
||||
get_rc_int(162, (int *)&dword_102825C);
|
||||
get_rc_int(163, (int *)&dword_1028260);
|
||||
get_rc_int(164, (int *)&dword_1028264);
|
||||
dword_1028238 = *(HKEY *)&dword_1028250;
|
||||
dword_102823C = *(HKEY *)&dword_1028254;
|
||||
dword_1028240 = *(HKEY *)&dword_1028258;
|
||||
dword_1028244 = *(HKEY *)&dword_102825C;
|
||||
dword_1028248 = *(HKEY *)&dword_1028260;
|
||||
dword_1028234 = (HKEY)1;
|
||||
dword_102824C = *(HKEY *)&dword_1028264;
|
||||
options = options_get_int(0, "Sounds", options);
|
||||
phkResult = options_get_int(0, "Music", phkResult);
|
||||
dword_1028228 = options_get_int(0, "Average", dword_1028228);
|
||||
dword_102822C = options_get_int(0, "FullScreen", dword_102822C);
|
||||
dword_1028230 = options_get_int(0, "Priority_Adjustment", dword_1028230);
|
||||
dword_1028234 = options_get_int(0, "Players", dword_1028234);
|
||||
dword_1028238 = options_get_int(0, "Left Flippper key", dword_1028238);
|
||||
dword_102823C = options_get_int(0, "Right Flipper key", dword_102823C);
|
||||
dword_1028240 = options_get_int(0, "Plunger key", dword_1028240);
|
||||
dword_1028244 = options_get_int(0, "Left Table Bump key", dword_1028244);
|
||||
dword_1028248 = options_get_int(0, "Right Table Bump key", dword_1028248);
|
||||
dword_102824C = options_get_int(0, "Bottom Table Bump key", dword_102824C);
|
||||
options_menu_check(0xC9u, (int)options);
|
||||
Sound_Enable(0, 7, (int)options);
|
||||
options_menu_check(0xCAu, (int)phkResult);
|
||||
options_menu_check(0x193u, (int)dword_102822C);
|
||||
options_menu_check(0x198u, dword_1028234 == (HKEY)1);
|
||||
options_menu_check(0x199u, dword_1028234 == (HKEY)2);
|
||||
options_menu_check(0x19Au, dword_1028234 == (HKEY)3);
|
||||
options_menu_check(0x19Bu, dword_1028234 == (HKEY)4);
|
||||
v1 = (CHAR *)memoryallocate(0x1F4u);
|
||||
v2 = v1;
|
||||
if ( v1 )
|
||||
{
|
||||
options_get_string(0, "Shell Exe", v1, WindowName, 500);
|
||||
if ( !*v2 )
|
||||
{
|
||||
if ( hMenu )
|
||||
{
|
||||
DeleteMenu(hMenu, 0x195u, 0);
|
||||
DrawMenuBar(hwnd_frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----- (010067F3) --------------------------------------------------------
|
||||
int __stdcall FindShiftKeys()
|
||||
{
|
||||
signed int v0; // esi
|
||||
int v1; // eax
|
||||
int result; // eax
|
||||
CHAR String; // [esp+Ch] [ebp-18h]
|
||||
|
||||
RightShift = -1;
|
||||
LeftShift = -1;
|
||||
v0 = 0;
|
||||
do
|
||||
{
|
||||
if ( MapVirtualKeyA(v0, 1u) == 16 )
|
||||
{
|
||||
LeftShift = v0;
|
||||
break;
|
||||
}
|
||||
++v0;
|
||||
}
|
||||
while ( v0 < 256 );
|
||||
while ( ++v0 < 256 )
|
||||
{
|
||||
if ( MapVirtualKeyA(v0, 1u) == 16 )
|
||||
{
|
||||
RightShift = v0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !GetKeyNameTextA(LeftShift << 16, &String, 19) || !__strnicmp(&String, "right", 5u) )
|
||||
{
|
||||
v1 = RightShift;
|
||||
}
|
||||
else
|
||||
{
|
||||
v1 = LeftShift;
|
||||
LeftShift = RightShift;
|
||||
RightShift = v1;
|
||||
}
|
||||
result = GetKeyNameTextA(v1 << 16, &String, 19);
|
||||
if ( result )
|
||||
{
|
||||
result = __strnicmp(&String, "left", 4u);
|
||||
if ( result )
|
||||
{
|
||||
result = LeftShift;
|
||||
LeftShift = RightShift;
|
||||
RightShift = result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// 10235EC: using guessed type int LeftShift;
|
||||
// 10235F0: using guessed type int RightShift;
|
||||
Reference in new issue
Block a user