forked from urxp/dRally
-
Notifications
You must be signed in to change notification settings - Fork 3
/
___190c4h.c
146 lines (116 loc) · 3.22 KB
/
___190c4h.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#include "drally.h"
#include "drally_fonts.h"
#pragma pack(1)
typedef struct x655_s {
__DWORD__ r;
__DWORD__ g;
__DWORD__ b;
} x655_t;
extern x655_t ___19eb50h[0x100];
extern __POINTER__ ___1a1138h__VESA101_BACKGROUND;
extern __POINTER__ ___1a112ch__VESA101_ACTIVESCREEN_PTR;
#if defined(DR_MULTIPLAYER)
extern __DWORD__ ___19bd60h;
#endif // DR_MULTIPLAYER
extern __BYTE__ ___185c0bh[];
extern __POINTER__ ___1a10fch;
extern __POINTER__ ___1a1108h;
void ___2b318h(void);
void ___58c60h(void);
void menu___13a98h(__DWORD__);
void ___23230h(void);
void ___12cb8h__VESA101_PRESENTSCREEN(void);
void ___12e78h_cdecl(__BYTE__ * A1, const font_props_t * A2, const char * A3, __DWORD__ dst_off);
void ___13710h(__DWORD__, __DWORD__);
void ___135fch(__DWORD__, __DWORD__, __DWORD__, __DWORD__);
void __DISPLAY_SET_PALETTE_COLOR(__DWORD__ b, __DWORD__ g, __DWORD__ r, __DWORD__ n);
__BYTE__ ___5994ch(void);
__BYTE__ ___59b3ch(void);
void ___3892ch_cdecl(__DWORD__);
static __DWORD__ helper00(__DWORD__ eax, __DWORD__ edx){
eax = edx / 0x10000 * eax;
eax += 0x8000;
eax = (int)eax>>0x10;
eax &= 0xff;
return eax;
}
void ___190c4h(void){
__DWORD__ eax, ebx, ecx, edx, edi, esi, ebp, rr, gg, bb, nn;
__BYTE__ esp[0xc];
int n;
___2b318h();
ebp = 0x32;
D(esp+0x8) = 0x640000;
while(1){
___58c60h();
esi = 0x2;
edx = ebp;
eax = ebp;
edx = (int)edx>>0x1f;
edx = (int)eax%(int)esi;
if(edx != 0) menu___13a98h(1); // SPINNING TIRE ICON
n = -1;
while(++n < 0x60){
rr = helper00(___19eb50h[n].r, D(esp+0x8));
gg = helper00(___19eb50h[n].g, D(esp+0x8));
bb = helper00(___19eb50h[n].b, D(esp+0x8));
__DISPLAY_SET_PALETTE_COLOR(bb, gg, rr, n);
}
n = -1;
while(++n < 0x80){
rr = helper00(___19eb50h[n+0x80].r, D(esp+0x8));
gg = helper00(___19eb50h[n+0x80].g, D(esp+0x8));
bb = helper00(___19eb50h[n+0x80].b, D(esp+0x8));
__DISPLAY_SET_PALETTE_COLOR(bb, gg, rr, n+0x80);
}
D(esp+0x8) -= 0x20000;
ebp--;
if((int)ebp < 0) break;
}
___59b3ch();
___5994ch();
___3892ch_cdecl(2);
memcpy(___1a112ch__VESA101_ACTIVESCREEN_PTR, ___1a1138h__VESA101_BACKGROUND, 0x4b000);
___13710h(0, 0);
___13710h(1, 1);
___135fch(0, 0x173, 0x27f, 0x6d);
#if defined(DR_MULTIPLAYER)
if(___19bd60h != 0){
___12e78h_cdecl(___1a10fch, (font_props_t *)___185c0bh, "press to enter chat mode", 0x390a3);
___12e78h_cdecl(___1a1108h, (font_props_t *)___185c0bh, "F1", 0x390d9);
}
#endif // DR_MULTIPLAYER
___23230h();
___12cb8h__VESA101_PRESENTSCREEN();
ebp = 0;
___2b318h();
D(esp) = ebp;
while(1){
___58c60h();
esi = 0x2;
edx = ebp;
eax = ebp;
edx = (int)edx>>0x1f;
edx = (int)eax%(int)esi;
if(edx != 0) menu___13a98h(1); // SPINNING TIRE ICON
n = -1;
while(++n < 0x60){
rr = helper00(___19eb50h[n].r, D(esp));
gg = helper00(___19eb50h[n].g, D(esp));
bb = helper00(___19eb50h[n].b, D(esp));
__DISPLAY_SET_PALETTE_COLOR(bb, gg, rr, n);
}
n = -1;
while(++n < 0x80){
rr = helper00(___19eb50h[n+0x80].r, D(esp));
gg = helper00(___19eb50h[n+0x80].g, D(esp));
bb = helper00(___19eb50h[n+0x80].b, D(esp));
__DISPLAY_SET_PALETTE_COLOR(bb, gg, rr, n+0x80);
}
D(esp) += 0x20000;
ebp++;
if((int)ebp >= 0x32) break;
}
___59b3ch();
___5994ch();
}