Integrate data at 0x009A37E4 - 0x009A39C4

This commit is contained in:
Marijn van der Werf 2016-09-17 19:08:30 +02:00
parent 59d2c7a341
commit 1a6392cbc9
1 changed files with 156 additions and 4 deletions

View File

@ -368,6 +368,158 @@ static const unk_9a36c4 Unk9A36C4[] = {
{-1, -1, 12327},
};
/** rct2: 0x009A37E4 */
static const sint32 Unk9A37E4[] = {
2147483647,
2106585154,
1985590284,
1636362342,
1127484953,
2106585154,
1985590284,
1636362342,
1127484953,
58579923,
0,
-555809667,
-1073741824,
-1518500249,
-1859775391,
-2074309916,
-2147483647,
58579923,
0,
-555809667,
-1073741824,
-1518500249,
-1859775391,
-2074309916,
1859775393,
1073741824,
0,
-1073741824,
-1859775393,
1859775393,
1073741824,
0,
-1073741824,
-1859775393,
1859775393,
1073741824,
0,
-1073741824,
-1859775393,
1859775393,
1073741824,
0,
-1073741824,
-1859775393,
2144540595,
2139311823,
2144540595,
2139311823,
2135719507,
2135719507,
2125953864,
2061796213,
1411702590,
2125953864,
2061796213,
1411702590,
1985590284,
1636362342,
1127484953,
2115506168,
};
/** rct2: 0x009A38D4 */
static const sint32 Unk9A38D4[] = {
0,
417115092,
817995863,
1390684831,
1827693544,
-417115092,
-817995863,
-1390684831,
-1827693544,
2066040965,
2147483647,
2074309916,
1859775393,
1518500249,
1073741824,
555809666,
0,
-2066040965,
-2147483647,
-2074309916,
-1859775393,
-1518500249,
-1073741824,
-555809666,
1073741824,
1859775393,
2147483647,
1859775393,
1073741824,
-1073741824,
-1859775393,
-2147483647,
-1859775393,
-1073741824,
1073741824,
1859775393,
2147483647,
1859775393,
1073741824,
-1073741824,
-1859775393,
-2147483647,
-1859775393,
-1073741824,
112390610,
187165532,
-112390610,
-187165532,
224473165,
-224473165,
303325208,
600568389,
1618265062,
-303325208,
-600568389,
-1618265062,
-817995863,
-1390684831,
-1827693544,
369214930,
};
/** rct2: 0x009A39C4 */
static const sint32 Unk9A39C4[] = {
2147483647,
2096579710,
1946281152,
2096579710,
1946281152,
1380375879,
555809667,
-372906620,
-1231746017,
-1859775391,
1380375879,
555809667,
-372906620,
-1231746017,
-1859775391,
0,
2096579710,
1946281152,
2096579710,
1946281152,
};
static bool vehicle_move_info_valid(int cd, int typeAndDirection, int offset)
{
if (cd >= countof(gTrackVehicleInfo)) {
@ -2944,12 +3096,12 @@ static void vehicle_update_crash_setup(rct_vehicle* vehicle) {
int x = stru_9A3AC4[trainVehicle->sprite_direction / 2].x;
int y = stru_9A3AC4[trainVehicle->sprite_direction / 2].y;
int ecx = RCT2_ADDRESS(0x009A37E4, sint32)[trainVehicle->vehicle_sprite_type] >> 15;
int ecx = Unk9A37E4[trainVehicle->vehicle_sprite_type] >> 15;
x *= ecx;
y *= ecx;
x >>= 16;
y >>= 16;
ecx = RCT2_ADDRESS(0x009A38D4, sint32)[trainVehicle->vehicle_sprite_type] >> 23;
ecx = Unk9A38D4[trainVehicle->vehicle_sprite_type] >> 23;
x *= edx;
y *= edx;
ecx *= edx;
@ -4807,8 +4959,8 @@ produceScream:
*/
void vehicle_get_g_forces(rct_vehicle *vehicle, int *verticalG, int *lateralG)
{
int gForceVert = (((sint64)0x280000) * RCT2_ADDRESS(0x009A37E4, sint32)[vehicle->vehicle_sprite_type]) >> 32;
gForceVert = (((sint64)gForceVert) * RCT2_ADDRESS(0x009A39C4, sint32)[vehicle->bank_rotation]) >> 32;
int gForceVert = (((sint64)0x280000) * Unk9A37E4[vehicle->vehicle_sprite_type]) >> 32;
gForceVert = (((sint64)gForceVert) * Unk9A39C4[vehicle->bank_rotation]) >> 32;
int lateralFactor = 0, vertFactor = 0;
// Note shr has meant some of the below functions cast a known negative number to