forked from diasurgical/devilution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodmstat.cpp
More file actions
196 lines (182 loc) · 4.9 KB
/
modmstat.cpp
File metadata and controls
196 lines (182 loc) · 4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// ref: 0x10008C62
int __stdcall ModmStat_10008C62(char *a1, int a2, int a3, int a4, int a5) { return 0; }
/* {
int result; // eax
strcpy(&byte_1002A264, a1);
result = 1;
dword_1002A258 = 1;
dword_1002A260 = (int (*)(void))a5;
return result;
} */
// 1002A258: using guessed type int dword_1002A258;
// 1002A260: using guessed type int (*dword_1002A260)(void);
// ref: 0x10008C87
int UNKCALL ModmStat_10008C87(void *arg) { return 0; }
/* {
return SDlgDialogBoxParam(hInstance, "MODMSTAT_DIALOG", arg, ModmStat_10008CA0, 0);
} */
// 10010370: using guessed type int __stdcall SDlgDialogBoxParam(DWORD, DWORD, DWORD, DWORD, DWORD);
// ref: 0x10008CA0
int __stdcall ModmStat_10008CA0(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return 0; }
/* {
HWND v4; // eax
HWND v6; // eax
if ( Msg == 2 )
{
ModmStat_10008DB3(hWnd);
}
else if ( Msg > 0x103 )
{
if ( Msg <= 0x105 )
{
v6 = (HWND)SDrawGetFrameWindow(NULL);
SendMessageA(v6, Msg, wParam, lParam);
}
else
{
switch ( Msg )
{
case 0x110u:
ModmStat_10008DE4(hWnd);
return 0;
case 0x111u:
if ( HIWORD(wParam) == 7 )
{
Focus_100075B7(hWnd, (HWND)lParam);
}
else if ( HIWORD(wParam) == 6 )
{
Focus_10007458((void *)lParam);
Focus_100075DC(hWnd, (HWND)lParam);
}
else if ( (WORD)wParam == 1 || (WORD)wParam == 2 )
{
ModmStat_10008E89((int)hWnd, 1);
}
break;
case 0x113u:
if ( dword_1002A258 )
ModmStat_10008EBF(hWnd);
if ( Modem_10008653() )
{
dword_1002A25C = 1;
ModmStat_10008E89((int)hWnd, 0);
}
v4 = GetFocus();
Focus_100075DC(hWnd, v4);
return 0;
}
}
}
return SDlgDefDialogProc(hWnd, Msg, wParam, lParam);
} */
// 1001037C: using guessed type int __stdcall SDlgDefDialogProc(DWORD, DWORD, DWORD, DWORD);
// 10010382: using guessed type DWORD __stdcall SDrawGetFrameWindow();
// 1002A258: using guessed type int dword_1002A258;
// 1002A25C: using guessed type int dword_1002A25C;
// ref: 0x10008DB3
int UNKCALL ModmStat_10008DB3(HWND hDlg) { return 0; }
/* {
HWND v1; // esi
DWORD *v2; // eax
v1 = hDlg;
v2 = (DWORD *)GetWindowLongA(hDlg, -21);
local_10007F72(v2);
Focus_100076C3();
Doom_10006C53(v1, (int *)&unk_10022CB4);
return Doom_10006C53(v1, (int *)&unk_10022CAC);
} */
// ref: 0x10008DE4
BOOL UNKCALL ModmStat_10008DE4(HWND hWnd) { return 0; }
/* {
HWND v1; // esi
int v2; // eax
int *v3; // edi
HWND v4; // eax
BOOL result; // eax
v1 = hWnd;
v2 = local_10007F46();
v3 = (int *)v2;
if ( v2 )
{
SetWindowLongA(v1, -21, v2);
local_10007944((int)v1, 0, "Popup", -1, 1, (int)"ui_art\\black.pcx", v3, v3 + 1, 1);
}
Doom_100068AB(v1, (int *)&unk_10022CAC, 3);
Doom_1000658C(v1, (int *)&unk_10022CB4, 4, 1);
Focus_10007719("ui_art\\focus.pcx");
SDlgSetTimer(v1, 1, 55, 0);
local_10007DE9(v1, (int *)&unk_10022CB4);
byte_1002A264 = 0;
dword_1002A258 = 0;
dword_1002A260 = 0;
v4 = GetDlgItem(v1, 2);
result = ShowWindow(v4, 0);
dword_1002A25C = 0;
return result;
} */
// 10010412: using guessed type int __stdcall SDlgSetTimer(DWORD, DWORD, DWORD, DWORD);
// 1002A258: using guessed type int dword_1002A258;
// 1002A25C: using guessed type int dword_1002A25C;
// 1002A260: using guessed type int (*dword_1002A260)(void);
// ref: 0x10008E89
int __fastcall ModmStat_10008E89(int a1, int a2) { return 0; }
/* {
int v2; // edi
int v3; // esi
int result; // eax
v2 = a2;
v3 = a1;
if ( dword_1002A25C )
{
TitleSnd_1001031F();
SDlgKillTimer(v3, 1);
if ( v2 )
{
if ( dword_1002A260 )
dword_1002A260();
}
result = SDlgEndDialog(v3, 0);
}
return result;
} */
// 1002A260: invalid function type has been ignored
// 10010376: using guessed type int __stdcall SDlgEndDialog(DWORD, DWORD);
// 10010418: using guessed type int __stdcall SDlgKillTimer(DWORD, DWORD);
// 1002A25C: using guessed type int dword_1002A25C;
// 1002A260: using guessed type int (*dword_1002A260)(void);
// ref: 0x10008EBF
void UNKCALL ModmStat_10008EBF(HWND hDlg) { return; }
/* {
HWND v1; // edi
HWND v2; // eax
int v3; // eax
HWND v4; // eax
dword_1002A258 = 0;
v1 = hDlg;
if ( dword_1002A260 )
{
v2 = GetDlgItem(hDlg, 1026);
if ( v2 )
{
v3 = GetWindowLongA(v2, -21);
local_10007FA4(v3, &byte_1002A264);
Doom_10006A13(v1, (int *)&unk_10022CAC, 3);
v4 = GetDlgItem(v1, 2);
ShowWindow(v4, 1);
dword_1002A25C = 1;
}
}
} */
// 1002A258: using guessed type int dword_1002A258;
// 1002A25C: using guessed type int dword_1002A25C;
// 1002A260: using guessed type int (*dword_1002A260)(void);
// ref: 0x10008F26
signed int ModmStat_10008F26() { return 0; }
/* {
signed int result; // eax
result = 2139095040;
dword_1002A254 = 2139095040;
return result;
} */
// 1002A254: using guessed type int dword_1002A254;