-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path___148cch.c
122 lines (93 loc) · 3.14 KB
/
___148cch.c
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
#include "drally.h"
#include "drally_keyboard.h"
#include "drally_fonts.h"
#include "sfx.h"
extern __BYTE__ ___185ba9h[];
extern __POINTER__ ___1a10cch;
extern __POINTER__ ___1a10e0h;
extern __POINTER__ ___1a112ch__VESA101_ACTIVESCREEN_PTR;
extern int ___1a1e68h;
extern __POINTER__ ___1a10f4h;
#if defined(DR_MULTIPLAYER)
extern __DWORD__ ___19bd60h;
#endif // DR_MULTIPLAYER
extern __DWORD__ ___24cc54h_sfx_volume;
void ___12cb8h__VESA101_PRESENTSCREEN(void);
void ___1398ch__VESA101_PRESENTRECTANGLE(__DWORD__ offset, __POINTER__ src, __DWORD__ w, __DWORD__ h);
void ___2ab50h(void);
__BYTE__ ___5994ch(void);
#if defined(DR_MULTIPLAYER)
void ___23758h(void);
#endif // DR_MULTIPLAYER
void dRally_Sound_pushEffect(__BYTE__ channel, __BYTE__ n, __DWORD__ unk, __DWORD__ a0, __DWORD__ a1, __DWORD__ a2);
void ___12e78h_v2(__POINTER__ font_data, font_props_t * font_props, const char * str, int x, int y);
static void helper_true(int x, int y){
___12e78h_v3(___1a10cch___185ba9h, "yes", x+30, y-7);
___12e78h_v3(___1a10e0h___185ba9h, "no", x+200, y-7);
}
static void helper_false(int x, int y){
___12e78h_v3(___1a10e0h___185ba9h, "yes", x+30, y-7);
___12e78h_v3(___1a10cch___185ba9h, "no", x+200, y-7);
}
static void helperToBreak(int x, int y, __BOOL__ IsToBreak){ (IsToBreak == 1)?helper_true(x, y):helper_false(x, y); }
int ___148cch_cdecl(int x, int y, __DWORD__ A3, __BOOL__ * IsToBreak){
int n, i, j, status;
__BYTE__ tmp;
helperToBreak(x, y, *IsToBreak);
___12cb8h__VESA101_PRESENTSCREEN();
status = 0;
while(!status){
___2ab50h();
___2ab50h();
n = -1;
while(++n < 0x14) memset(___1a112ch__VESA101_ACTIVESCREEN_PTR+0x280*(y+n)+x+7+0xaa*!*IsToBreak, 0xc4, 0x14);
j = -1;
while(++j < 0x14){
i = -1;
while(++i < 0x14){
tmp = read_b(___1a10f4h+0x190*___1a1e68h+0x14*j+i);
if(tmp) write_b(___1a112ch__VESA101_ACTIVESCREEN_PTR+0x280*(y+j)+x+i+7+0xaa*!*IsToBreak, tmp);
}
}
___1398ch__VESA101_PRESENTRECTANGLE(0x280*y+x+2, ___1a112ch__VESA101_ACTIVESCREEN_PTR+0x280*y+x+2, 0xf0, 0x1c);
___1a1e68h++;
if(___1a1e68h > 0x31) ___1a1e68h = 0;
switch(___5994ch()){
case DR_SCAN_ESCAPE:
if(A3 != 0){
status = -2;
*IsToBreak = 0;
}
break;
case DR_SCAN_Y:
case DR_SCAN_LEFT:
case DR_SCAN_KP_4:
if(*IsToBreak == 0) dRally_Sound_pushEffect(1, SFX_CLICK_2, 0, ___24cc54h_sfx_volume, 0x28000, 0x8000);
n = -1;
while(++n < 0x19) memset(___1a112ch__VESA101_ACTIVESCREEN_PTR+0x280*(y+n)+x+2, 0xc4, 0xf0);
helperToBreak(x, y, (*IsToBreak = 1));
break;
case DR_SCAN_N:
case DR_SCAN_RIGHT:
case DR_SCAN_KP_6:
if(*IsToBreak == 1) dRally_Sound_pushEffect(1, SFX_CLICK_2, 0, ___24cc54h_sfx_volume, 0x28000, 0x8000);
n = -1;
while(++n < 0x19) memset(___1a112ch__VESA101_ACTIVESCREEN_PTR+0x280*(y+n)+x+2, 0xc4, 0xf0);
helperToBreak(x, y, (*IsToBreak = 0));
break;
case DR_SCAN_ENTER:
case DR_SCAN_KP_ENTER:
status = -1;
break;
case DR_SCAN_F1:
#if defined(DR_MULTIPLAYER)
if(___19bd60h != 0) ___23758h();
#endif
break;
default:
break;
}
}
dRally_Sound_pushEffect(1, SFX_CLICK_4, 0, ___24cc54h_sfx_volume, 0x28000, 0x8000);
return !!(status != -2);
}