Moved .rodata in unknown_043920 from asm to C.

This commit is contained in:
David Benepe
2021-05-31 18:43:02 -05:00
parent 3e4c435960
commit e1675f4cc0
2 changed files with 290 additions and 1195 deletions
File diff suppressed because it is too large Load Diff
+290 -10
View File
@@ -116,11 +116,291 @@ s16 D_800DCDD4[4] = {
/************ .rodata ************/
extern f64 D_800E6768;
extern f64 D_800E6770;
extern f64 D_800E6778;
extern f64 D_800E6780;
extern f32 D_800E6A00;
const char D_800E6280[] = "%.1f,%.1f,%.1f\n";
const char D_800E6290[] = "Chk ovflow!!\n";
const char D_800E62A0[] = "Back\n";
const DoubleLiteral D_800E62A8 = { -2500.0 };
const DoubleLiteral D_800E62B0 = { 0.025 };
const DoubleLiteral D_800E62B8 = { 0.561 };
const DoubleLiteral D_800E62C0 = { 0.004 };
const DoubleLiteral D_800E62C8 = { 0.025 };
const DoubleLiteral D_800E62D0 = { 0.561 };
const DoubleLiteral D_800E62D8 = { 0.004 };
const DoubleLiteral D_800E62E0 = { 0.2 };
const DoubleLiteral D_800E62E8 = { 0.004 };
const DoubleLiteral D_800E62F0 = { 0.595 };
const DoubleLiteral D_800E62F8 = { 0.025 };
const DoubleLiteral D_800E6300 = { 500.0 };
const DoubleLiteral D_800E6308 = { 650.0 };
const DoubleLiteral D_800E6310 = { -0.3 };
// Jump table in func_8004447C
const u32 D_800E6318[] = {
0x800446AC, 0x80044A04, 0x80044A04, 0x80044A04,
0x80044A04, 0x80044F54, 0x80044A04
};
// Jump table in func_8004447C
const u32 D_800E6334[] = {
0x80044A2C, 0x80044A44, 0x80044A60, 0x80044A94,
0x80044ADC, 0x80044AC8
};
const DoubleLiteral D_800E6350 = { 300.0 };
// Jump table in func_800452A0
const u32 D_800E6358[] = {
0x800456A0, 0x800456A8, 0x800456B0, 0x800456BC,
0x800456CC, 0x800456D4, 0x800456B0, 0x800456DC
};
const FloatLiteral D_800E6378 = { 1000000.0f };
// Jump table in
const u32 D_800E637C[] = {
0x80045ADC, 0x80045AF8, 0x80045B30, 0x80045B30,
0x80045B58, 0x80045B70, 0x80045BB8, 0x80045ADC
};
const DoubleLiteral D_800E63A0 = { 500.0 };
const DoubleLiteral D_800E63A8 = { 1.15 };
const DoubleLiteral D_800E63B0 = { 0.016 };
const DoubleLiteral D_800E63B8 = { 0.016 };
const DoubleLiteral D_800E63C0 = { 1.2 };
const DoubleLiteral D_800E63C8 = { 0.046 };
const DoubleLiteral D_800E63D0 = { 1.2 };
const FloatLiteral D_800E63D8 = { 1.2f };
const DoubleLiteral D_800E63E0 = { 0.046 };
const DoubleLiteral D_800E63E8 = { 0.3 };
const FloatLiteral D_800E63F0 = { 0.004f };
const DoubleLiteral D_800E63F8 = { 0.025 };
const DoubleLiteral D_800E6400 = { 300.0 };
const DoubleLiteral D_800E6408 = { 0.02 };
const DoubleLiteral D_800E6410 = { 1.7 };
const DoubleLiteral D_800E6418 = { 0.35 };
const DoubleLiteral D_800E6420 = { 0.2 };
const DoubleLiteral D_800E6428 = { 0.07 };
const DoubleLiteral D_800E6430 = { 0.8 };
const DoubleLiteral D_800E6438 = { 0.65 };
const DoubleLiteral D_800E6440 = { 0.65 };
const DoubleLiteral D_800E6448 = { 35.0 };
const FloatLiteral D_800E6450 = { -10000.0f };
const DoubleLiteral D_800E6458 = { 0.8 };
const DoubleLiteral D_800E6460 = { 0.05 };
const FloatLiteral D_800E6468 = { 0.11f };
// Jump table in func_80048C7C
const u32 D_800E646C[] = {
0x80048D40, 0x80048D40, 0x80048E50, 0x80048DAC,
0x80048E18, 0x80048DB8
};
const DoubleLiteral D_800E6488 = { 0.7 };
const DoubleLiteral D_800E6490 = { 20.5 };
const DoubleLiteral D_800E6498 = { 65.0 };
const DoubleLiteral D_800E64A0 = { 0.16666666666666666 };
const DoubleLiteral D_800E64A8 = { 1.09 };
const DoubleLiteral D_800E64B0 = { 0.4 };
const DoubleLiteral D_800E64B8 = { 0.01 };
const DoubleLiteral D_800E64C0 = { 0.01 };
const DoubleLiteral D_800E64C8 = { 0.016 };
const DoubleLiteral D_800E64D0 = { 1.2 };
const FloatLiteral D_800E64D8 = { 1.2f };
const DoubleLiteral D_800E64E0 = { 0.016 };
const FloatLiteral D_800E64E8 = { 1.4f };
const FloatLiteral D_800E64EC = { 0.01f };
const FloatLiteral D_800E64F0 = { 0.02f };
const FloatLiteral D_800E64F4 = { 0.004f };
const DoubleLiteral D_800E64F8 = { 0.6 };
const DoubleLiteral D_800E6500 = { 0.3 };
const FloatLiteral D_800E6508 = { 1.2f };
const DoubleLiteral D_800E6510 = { 0.00015 };
const DoubleLiteral D_800E6518 = { 1.8 };
const DoubleLiteral D_800E6520 = { 0.4 };
const FloatLiteral D_800E6528 = { 0.4f };
const DoubleLiteral D_800E6530 = { 0.058823529411764705 };
const DoubleLiteral D_800E6538 = { 0.05 };
const DoubleLiteral D_800E6540 = { 0.65 };
const DoubleLiteral D_800E6548 = { 0.65 };
const DoubleLiteral D_800E6550 = { 0.7 };
const DoubleLiteral D_800E6558 = { 0.4 };
const DoubleLiteral D_800E6560 = { 0.005555555555555556 };
const FloatLiteral D_800E6568 = { 0.4f };
const DoubleLiteral D_800E6570 = { 65.0 };
const DoubleLiteral D_800E6578 = { 0.2 };
const FloatLiteral D_800E6580 = { 1.3f };
const FloatLiteral D_800E6584 = { 0.1f };
const FloatLiteral D_800E6588 = { 0.002f };
const FloatLiteral D_800E658C = { 0.01f };
const DoubleLiteral D_800E6590 = { 1.2 };
const DoubleLiteral D_800E6598 = { 0.45 };
const FloatLiteral D_800E65A0 = { -0.02f };
const FloatLiteral D_800E65A4 = { 0.87f };
const FloatLiteral D_800E65A8 = { 0.9f };
const FloatLiteral D_800E65AC = { -10000.0f };
// Jump table in func_8004DE38
const u32 D_800E65B0[] = {
0x8004EB84, 0x8004EBBC, 0x8004EBD8, 0x8004EBF4,
0x8004EBA0, 0x8004EC10, 0x8004EC50, 0x8004EC90,
0x8004EC90, 0x8004ED88, 0x8004EBF4, 0x8004ECD0,
0x8004ED10, 0x8004ED50
};
const FloatLiteral D_800E65E8 = { 1.12f };
const FloatLiteral D_800E65EC = { 0.02f };
const FloatLiteral D_800E65F0 = { -0.02f };
const FloatLiteral D_800E65F4 = { 265.0f };
const DoubleLiteral D_800E65F8 = { 1500.0 };
const DoubleLiteral D_800E6600 = { 0.065 };
const DoubleLiteral D_800E6608 = { 0.3 };
const DoubleLiteral D_800E6610 = { 0.1 };
const DoubleLiteral D_800E6618 = { 0.3 };
const DoubleLiteral D_800E6620 = { 0.1 };
const DoubleLiteral D_800E6628 = { 0.004 };
const DoubleLiteral D_800E6630 = { 0.65 };
const DoubleLiteral D_800E6638 = { 0.024999999999999998 };
const DoubleLiteral D_800E6640 = { 0.4 };
const DoubleLiteral D_800E6648 = { 1.1 };
const DoubleLiteral D_800E6650 = { -0.3 };
const DoubleLiteral D_800E6658 = { 0.3 };
const FloatLiteral D_800E6660 = { 0.02f };
const DoubleLiteral D_800E6668 = { 0.9 };
const DoubleLiteral D_800E6670 = { 0.7 };
const DoubleLiteral D_800E6678 = { 1.7 };
const DoubleLiteral D_800E6680 = { 0.15 };
const DoubleLiteral D_800E6688 = { 0.3 };
const DoubleLiteral D_800E6690 = { 0.32 };
const DoubleLiteral D_800E6698 = { -0.04 };
const DoubleLiteral D_800E66A0 = { 0.04 };
const DoubleLiteral D_800E66A8 = { 0.9 };
const DoubleLiteral D_800E66B0 = { 0.3 };
const DoubleLiteral D_800E66B8 = { 0.1 };
const FloatLiteral D_800E66C0 = { 0.1f };
const DoubleLiteral D_800E66C8 = { 0.05 };
// Jump table in func_8005250C
const u32 D_800E66D0[] = {
0x80052678, 0x80052978, 0x80052978, 0x800527AC,
0x8005280C, 0x80052858, 0x800528A4, 0x80052910
};
const DoubleLiteral D_800E66F0 = { 0.97 };
const DoubleLiteral D_800E66F8 = { 0.87 };
const DoubleLiteral D_800E6700 = { 0.9 };
const DoubleLiteral D_800E6708 = { 0.3 };
const DoubleLiteral D_800E6710 = { 1.6 };
const DoubleLiteral D_800E6718 = { 0.025 };
const FloatLiteral D_800E6720 = { 0.45f };
const DoubleLiteral D_800E6728 = { 0.97 };
const DoubleLiteral D_800E6730 = { 0.2 };
const DoubleLiteral D_800E6738 = { 0.2 };
const DoubleLiteral D_800E6740 = { 1.33 };
const DoubleLiteral D_800E6748 = { 0.53 };
const DoubleLiteral D_800E6750 = { 1.8 };
const FloatLiteral D_800E6758 = { 1.8f };
const DoubleLiteral D_800E6760 = { 0.2 };
const DoubleLiteral D_800E6768 = { 0.1 };
const DoubleLiteral D_800E6770 = { 0.2 };
const DoubleLiteral D_800E6778 = { 0.05 };
const DoubleLiteral D_800E6780 = { 0.1 };
const DoubleLiteral D_800E6788 = { 0.4 };
const DoubleLiteral D_800E6790 = { 0.1 };
const DoubleLiteral D_800E6798 = { 1.4 };
const FloatLiteral D_800E67A0 = { 0.1f };
// Jump table in func_80053E9C
const u32 D_800E67A4[] = {
0x80053FF0, 0x8005406C, 0x800540FC, 0x8005408C,
0x800540C4, 0x80054098
};
const DoubleLiteral D_800E67C0 = { 20.5 };
const DoubleLiteral D_800E67C8 = { 0.3 };
const DoubleLiteral D_800E67D0 = { 0.1 };
const DoubleLiteral D_800E67D8 = { 0.3 };
const DoubleLiteral D_800E67E0 = { 0.1 };
const DoubleLiteral D_800E67E8 = { -0.3 };
const DoubleLiteral D_800E67F0 = { 0.3 };
const DoubleLiteral D_800E67F8 = { 0.9 };
const FloatLiteral D_800E6800 = { 0.02f };
const DoubleLiteral D_800E6808 = { 1.7 };
const DoubleLiteral D_800E6810 = { 0.15 };
const DoubleLiteral D_800E6818 = { 0.32 };
const DoubleLiteral D_800E6820 = { -0.04 };
const DoubleLiteral D_800E6828 = { 0.04 };
const DoubleLiteral D_800E6830 = { 0.9 };
const DoubleLiteral D_800E6838 = { 1.075 };
const DoubleLiteral D_800E6840 = { 0.15 };
const DoubleLiteral D_800E6848 = { 0.7 };
const FloatLiteral D_800E6850 = { 1500.0f };
// Jump table in func_80055EC0
const u32 D_800E6854[] = {
0x8005635C, 0x80056370, 0x80056380, 0x8005639C,
0x800563EC, 0x80056508, 0x8005655C, 0x80056508,
0x800563EC, 0x80056620, 0x800563CC, 0x80056380,
0x800565C0, 0x800565E0, 0x80056600, 0x800563EC,
0x80056828
};
// Jump table in func_80055EC0
const u32 D_800E6894[] = {
0x80056834, 0x80056840, 0x8005684C, 0x80056884,
0x80056884, 0x80056884, 0x80056884, 0x80056884,
0x80056884, 0x80056874, 0x80056880
};
const FloatLiteral D_800E68C4 = { 10000.0f };
const FloatLiteral D_800E68C8 = { 10000.0f };
const FloatLiteral D_800E68CC = { 0.025f };
// Jump table in func_80057A40
const u32 D_800E68D0[] = {
0x80057BBC, 0x80057BE4, 0x80057CD0, 0x80057C0C,
0x80057C34, 0x80057C5C, 0x80057C84, 0x80057CAC
};
const DoubleLiteral D_800E68F0 = { 91.75 };
const DoubleLiteral D_800E68F8 = { 90.0 };
const DoubleLiteral D_800E6900 = { 48.5 };
const DoubleLiteral D_800E6908 = { 0.95 };
const DoubleLiteral D_800E6910 = { 65.0 };
const DoubleLiteral D_800E6918 = { 1.3 };
const DoubleLiteral D_800E6920 = { -0.2 };
const DoubleLiteral D_800E6928 = { 1.2 };
const DoubleLiteral D_800E6930 = { 1.2 };
const DoubleLiteral D_800E6938 = { 0.8 };
const DoubleLiteral D_800E6940 = { 0.45 };
const FloatLiteral D_800E6948 = { -0.02f };
const FloatLiteral D_800E694C = { 1000000.0f };
const DoubleLiteral D_800E6950 = { 160000.0 };
const FloatLiteral D_800E6958 = { 0.8f };
const DoubleLiteral D_800E6960 = { 160000.0 };
// Jump table in func_8005A6F0
const u32 D_800E6968[] = {
0x8005AF80, 0x8005AFD8, 0x8005B004, 0x8005B030,
0x8005AFAC, 0x8005B05C, 0x8005B094, 0x8005B0CC,
0x8005B0CC, 0x8005B1B0, 0x8005B030, 0x8005B10C,
0x8005B144, 0x8005B17C
};
const DoubleLiteral D_800E69A0 = { 0.9 };
const FloatLiteral D_800E69A8 = { 0.02f };
const FloatLiteral D_800E69AC = { -0.02f };
const FloatLiteral D_800E69B0 = { 265.0f };
const DoubleLiteral D_800E69B8 = { 1500.0 };
const DoubleLiteral D_800E69C0 = { 0.025 };
const DoubleLiteral D_800E69C8 = { 0.595 };
const DoubleLiteral D_800E69D0 = { 0.004 };
const DoubleLiteral D_800E69D8 = { 1.3 };
const DoubleLiteral D_800E69E0 = { 150.0 };
const FloatLiteral D_800E69E8 = { 0.01f };
const DoubleLiteral D_800E69F0 = { 0.01 };
const DoubleLiteral D_800E69F8 = { 35.0 };
const FloatLiteral D_800E6A00 = { 0.05f };
/*********************************/
@@ -350,7 +630,7 @@ void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1) {
void func_80053664(Player_64 *arg0) {
if (arg0->throttle > 0.0) {
arg0->throttle -= D_800E6768;
arg0->throttle -= D_800E6768.doubleLiteral;
}
if (D_8011D528 & 0x8000) {
@@ -359,12 +639,12 @@ void func_80053664(Player_64 *arg0) {
if (D_8011D528 & 0x4000) {
if (arg0->brake < 1.0) {
arg0->brake += D_800E6770;
arg0->brake += D_800E6770.doubleLiteral;
}
} else {
//! @bug Will cause a negative brake value resulting in higher velocity
if (arg0->brake > D_800E6778) {
arg0->brake -= D_800E6780;
if (arg0->brake > D_800E6778.doubleLiteral) {
arg0->brake -= D_800E6780.doubleLiteral;
}
}
}
@@ -569,7 +849,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A6F0.s")
GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005B818.s")
void func_8005C25C(void) {
D_800DCB9C[0] = D_800E6A00;
D_800DCB9C[0] = D_800E6A00.floatLiteral;
}
/* Unknown Size */