-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path___22808h.c
92 lines (78 loc) · 2.39 KB
/
___22808h.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
#include "drally.h"
#include "drally_structs_fixed.h"
#pragma pack(1)
typedef struct x655_s {
__DWORD__ r;
__DWORD__ g;
__DWORD__ b;
} x655_t;
extern x655_t ___19eb50h[0x100];
extern __BYTE__ ___1a0d60h[];
extern __BYTE__ ___1a1ef8h[];
extern __BYTE__ ___1a01e0h[];
extern __POINTER__ ___1a0fb8h;
extern __DWORD__ ___24cc58h_msx_volume;
void ___10b80h_cdecl(const char *, __DWORD__, const char *, __DWORD__, const char *, __DWORD__, __DWORD__);
void ___606dfh(void);
void ___605deh_cdecl(__DWORD__, __DWORD__);
void ___3d890h(void);
void ___1240ch(void);
void ___24548h(void);
void ___2faf0h(void);
void ___3d2bch(void);
void ___12940h(void);
void ___11564h_cdecl(__DWORD__, __DWORD__, __DWORD__);
void ___223c4h(void);
void ___2b318h(void);
void ___58c60h(void);
void dRally_Sound_setMasterVolume(__DWORD__ vol);
void __DISPLAY_SET_PALETTE_COLOR(__DWORD__ b, __DWORD__ g, __DWORD__ r, __DWORD__ n);
void dRally_Sound_release(void);
void dRally_Sound_load(__DWORD__ msx_t, const char * msx_f, __DWORD__ sfx_t, const char * sfx_f, __DWORD__ num_ch);
void dRally_Sound_setMusicVolume(__DWORD__ vol);
void dRally_Sound_setSampleRate(__DWORD__ freq);
void dRally_Sound_play(void);
void __VESA101_SETMODE(void);
__DWORD__ GET_FILE_SIZE(const char *);
void ___22808h(void){
__DWORD__ rr, gg, bb;
__DWORD__ eax, ebx, ecx, edx, edi, ebp;
__POINTER__ esi;
__BYTE__ esp[0x70];
int i, k, n;
racer_t * s_6c;
s_6c = (racer_t *)___1a01e0h;
strcat(strcpy(esp, ___1a0d60h), "endani.haf");
if(GET_FILE_SIZE(esp) != 0) ___10b80h_cdecl("endani.haf", 1, "tr0-mus.cmf", 2, "endani-e.cmf", 1, 0x78);
___606dfh();
__VESA101_SETMODE();
___605deh_cdecl(70, 0);
___3d890h(); // Title Screen
___1240ch();
___24548h();
___2faf0h();
___3d2bch();
___12940h();
esi = ___1a0fb8h+3*s_6c[D(___1a1ef8h)].color;
___11564h_cdecl(B(esi), B(esi+1), B(esi+2));
___223c4h();
___2b318h();
k = -1;
while(++k < 51){
___58c60h(); // wait 1 frame
i = 100-2*k;
dRally_Sound_setMasterVolume(655*i);
n = -1;
while(++n < 0x100){
rr = ((i*___19eb50h[n].r+0x8000)>>0x10)&0xff;
gg = ((i*___19eb50h[n].g+0x8000)>>0x10)&0xff;
bb = ((i*___19eb50h[n].b+0x8000)>>0x10)&0xff;
__DISPLAY_SET_PALETTE_COLOR(bb, gg, rr, n);
}
}
dRally_Sound_release();
dRally_Sound_load(1, "MEN-MUS.CMF", 2, "MEN-SAM.CMF", 5);
dRally_Sound_setMusicVolume(___24cc58h_msx_volume);
dRally_Sound_setSampleRate(0x5622);
dRally_Sound_play();
}