-
Notifications
You must be signed in to change notification settings - Fork 13
/
___20220h.c
104 lines (92 loc) · 4.46 KB
/
___20220h.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
#include "drally.h"
#include "drally_fonts.h"
#include "drally_keyboard.h"
#include "drally_structs_free.h"
#include "sfx.h"
extern kb_control_t ___1a1140h;
extern __POINTER__ ___1a112ch__VESA101_ACTIVESCREEN_PTR;
extern __POINTER__ ___1a1124h__VESA101h_ScreenBufferA;
extern __DWORD__ ___24cc54h_sfx_volume;
void ___12cb8h__VESA101_PRESENTSCREEN(void);
void ___13248h_cdecl(__DWORD__, __DWORD__ ,__DWORD__, __DWORD__, __DWORD__);
int ___252e0h_cdecl(const char *);
void dRally_Sound_pushEffect(__BYTE__, __BYTE__, __DWORD__, __DWORD__, __DWORD__, __DWORD__);
__BYTE__ ___5994ch(void);
__BYTE__ ___59b3ch(void);
static const __BYTE__ ReservedKeys[0xf] = {
DR_SCAN_P,
DR_SCAN_TAB,
DR_SCAN_F1,
DR_SCAN_F2,
DR_SCAN_F3,
DR_SCAN_F4,
DR_SCAN_F5,
DR_SCAN_F6,
DR_SCAN_F7,
DR_SCAN_F8,
DR_SCAN_F9,
DR_SCAN_F10,
DR_SCAN_F11,
DR_SCAN_F12,
DR_SCAN_ESCAPE
};
static __DWORD__ InvalidConfiguration(void){
const char * msg = "Invalid key configuration!";
memcpy(___1a1124h__VESA101h_ScreenBufferA, ___1a112ch__VESA101_ACTIVESCREEN_PTR, 0x4b000);
___13248h_cdecl(0x1a, 0xc2 , 0x253, 0x56, 1);
___12e78h_v3(___1a10cch___185ba9h, msg, 322-___252e0h_cdecl(msg), 203);
___12e78h_v3(___1a10cch___185ba9h, "Press any key to re-enter.", 95, 235);
___12cb8h__VESA101_PRESENTSCREEN();
dRally_Sound_pushEffect(1, SFX_BUMMER, 0, ___24cc54h_sfx_volume, 0x28000, 0x8000);
___5994ch();
___59b3ch();
while(___5994ch() == 0);
___5994ch();
___59b3ch();
memcpy(___1a112ch__VESA101_ACTIVESCREEN_PTR, ___1a1124h__VESA101h_ScreenBufferA, 0x4b000);
___12cb8h__VESA101_PRESENTSCREEN();
return 1;
}
__DWORD__ ___20220h(void){
int k, n;
n = -1;
while(++n < 0xf){
if(___1a1140h.turbo_boost == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.horn == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.steer_left == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.steer_right == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.brake == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.drop_mine == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.accelerate == ReservedKeys[n]) return InvalidConfiguration();
if(___1a1140h.machine_gun == ReservedKeys[n]) return InvalidConfiguration();
}
if(___1a1140h.machine_gun == ___1a1140h.accelerate) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.drop_mine) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.brake) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.steer_right) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.steer_left) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.machine_gun == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.drop_mine) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.brake) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.steer_right) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.steer_left) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.accelerate == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.drop_mine == ___1a1140h.brake) return InvalidConfiguration();
if(___1a1140h.drop_mine == ___1a1140h.steer_right) return InvalidConfiguration();
if(___1a1140h.drop_mine == ___1a1140h.steer_left) return InvalidConfiguration();
if(___1a1140h.drop_mine == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.drop_mine == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.brake == ___1a1140h.steer_right) return InvalidConfiguration();
if(___1a1140h.brake == ___1a1140h.steer_left) return InvalidConfiguration();
if(___1a1140h.brake == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.brake == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.steer_right == ___1a1140h.steer_left) return InvalidConfiguration();
if(___1a1140h.steer_right == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.steer_right == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.steer_left == ___1a1140h.horn) return InvalidConfiguration();
if(___1a1140h.steer_left == ___1a1140h.turbo_boost) return InvalidConfiguration();
if(___1a1140h.horn == ___1a1140h.turbo_boost) return InvalidConfiguration();
return 0;
}