From 643798a7858961cfd6d8821829570b3504f6f5ff Mon Sep 17 00:00:00 2001 From: Berthalamew <40469582+Berthalamew@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:08:15 -0500 Subject: [PATCH 1/3] add player_effect_apply_camera_effect_matrix rewrite --- xlive/Blam/Engine/effects/particle_state.h | 3 +- xlive/Blam/Engine/effects/player_effects.cpp | 172 +++ xlive/Blam/Engine/effects/player_effects.h | 83 +- xlive/Blam/Engine/game/player_vibration.cpp | 8 +- xlive/Blam/Engine/game/player_vibration.h | 4 +- .../Engine/interface/first_person_weapons.cpp | 4 +- xlive/Blam/Engine/main/interpolator.cpp | 4 +- xlive/Blam/Engine/math/matrix_math.cpp | 34 + xlive/Blam/Engine/math/matrix_math.h | 4 + xlive/Blam/Engine/math/periodic_functions.cpp | 7 +- xlive/Blam/Engine/math/periodic_functions.h | 21 +- xlive/Blam/Engine/math/random_math.cpp | 47 +- xlive/Blam/Engine/math/random_math.h | 1057 ++++++++++++++++- xlive/Blam/Engine/math/real_math.h | 2 +- xlive/Blam/Engine/models/render_models.cpp | 6 +- .../Engine/scenario/scenario_definitions.h | 20 +- xlive/Blam/Engine/units/bipeds.cpp | 4 +- 17 files changed, 1433 insertions(+), 47 deletions(-) diff --git a/xlive/Blam/Engine/effects/particle_state.h b/xlive/Blam/Engine/effects/particle_state.h index 635c1a752..141b0c8f5 100644 --- a/xlive/Blam/Engine/effects/particle_state.h +++ b/xlive/Blam/Engine/effects/particle_state.h @@ -4,7 +4,8 @@ #include "particle_system.h" -enum e_particle_state_flags : uint32 { +enum e_particle_state_flags : uint32 +{ _particle_update_flag_0 = FLAG(0), _particle_update_flag_1 = FLAG(1), _particle_update_flag_2 = FLAG(2), diff --git a/xlive/Blam/Engine/effects/player_effects.cpp b/xlive/Blam/Engine/effects/player_effects.cpp index 9280832d3..654fea940 100644 --- a/xlive/Blam/Engine/effects/player_effects.cpp +++ b/xlive/Blam/Engine/effects/player_effects.cpp @@ -1,8 +1,180 @@ #include "stdafx.h" #include "player_effects.h" +#include "Blam/Engine/game/game_time.h" +#include "Blam/Engine/game/player_vibration.h" +#include "Blam/Engine/main/interpolator.h" +#include "Blam/Engine/math/random_math.h" + +void player_effect_apply_camera_effect_matrix_internal(real_matrix4x3* matrix, real32 a2, real32 a3); +real32 player_effect_transition_function_evaluate(e_transition_function_type function_type, real32 a2, real32 a3, real32 a4); + +s_player_effect_globals* player_effect_globals_get(void) +{ + return Memory::GetAddress(0x4CE860, 0x4F504C); +} + +/* void __cdecl player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* matrix) { INVOKE(0xA432D, 0x963AA, player_effect_apply_camera_effect_matrix, user_index, matrix); return; +}*/ + +void player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* matrix) +{ + real_matrix4x3 calculated_matrix; + if (user_index != NONE) + { + s_player_effect_globals* player_effects_globals = player_effect_globals_get(); + if (player_effects_globals->flags.test(_player_effect_global_bit_0)) + { + real32 vibration_intensity = player_effects_globals->max_intensity; + calculated_matrix = global_identity4x3; + + if (player_effects_globals->attack_time_ticks > 0) + { + real32 attack_time = player_effects_globals->attack_time_ticks / player_effects_globals->attack_time_ticks_1; + if (!player_effects_globals->flags.test(_player_effect_global_bit_1)) + { + attack_time = 1.0f - attack_time; + } + + vibration_intensity *= attack_time; + } + + if (vibration_intensity >= 0.0f) + { + if (vibration_intensity > 1.0f) + { + vibration_intensity = 1.0f; + } + } + else + { + vibration_intensity = 0.0f; + } + + rumble_player_set_scripted_scale(vibration_intensity); + + real_vector3d random_angles; + random_angles.k = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + random_angles.j = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + random_angles.i = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + multiply_vectors3d(&random_angles, &player_effects_globals->position.orientation, &random_angles); + scale_vector3d(&random_angles, vibration_intensity, &random_angles); + + matrix4x3_rotation_from_angles(&calculated_matrix, random_angles.i, random_angles.j, random_angles.k); + + random_angles.i = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + random_angles.j = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + random_angles.k = _real_random_range(get_local_random_seed_address(), -1.0f, 1.0f); + + calculated_matrix.position.x = random_angles.i * player_effects_globals->position.position.y * vibration_intensity; + calculated_matrix.position.y = random_angles.j * player_effects_globals->position.position.x * vibration_intensity; + calculated_matrix.position.z = random_angles.k * player_effects_globals->position.position.z * vibration_intensity; + matrix4x3_multiply(matrix, &calculated_matrix, matrix); + } + else + { + s_player_effect_user_globals* user_effect = &player_effects_globals->user_effects[user_index]; + bool bit_1_result = user_effect->flags.test(_player_effect_user_global_bit_1); + if (user_effect->field_80 > 0 || bit_1_result) + { + real32 function_result; + if (bit_1_result) + { + function_result = 1.0f; + } + else + { + real32 timing = user_effect->camera_impulse.duration - (real32)user_effect->field_80 - halo_interpolator_get_interpolation_time(); + function_result = player_effect_transition_function_evaluate(user_effect->camera_impulse.fade_function, user_effect->transition_function_scale_9C, timing, user_effect->camera_impulse.duration); + } + + real_vector3d vector; + cross_product3d(&global_up3d, &user_effect->vector_0, &vector); + + real32 function_result_scaled = user_effect->camera_impulse.rotation * function_result; + matrix4x3_rotation_from_axis_and_angle(&calculated_matrix, &vector, sin(function_result_scaled), cos(function_result_scaled)); + + real32 position_scaler = user_effect->camera_impulse.pushback * function_result; + calculated_matrix.position.x = user_effect->vector_0.i * position_scaler; + calculated_matrix.position.y = user_effect->vector_0.j * position_scaler; + calculated_matrix.position.z = user_effect->vector_0.k * position_scaler; + point_from_line3d(&calculated_matrix.position, &user_effect->vector_C, function_result, &calculated_matrix.position); + matrix4x3_multiply(matrix, &calculated_matrix, matrix); + } + + bool bit_2_result = user_effect->flags.test(_player_effect_user_global_bit_2); + if (user_effect->field_82 > 0 || bit_2_result) + { + calculated_matrix = global_identity4x3; + + real32 transition_function_result; + real32 timing = user_effect->camera_shaking.duration - game_ticks_to_seconds((real32)user_effect->field_82) - halo_interpolator_get_interpolation_time(); + if (bit_2_result) + { + transition_function_result = 1.0f; + } + else + { + transition_function_result = player_effect_transition_function_evaluate(user_effect->camera_shaking.falloff_function, user_effect->transition_function_scale_98, timing, user_effect->camera_shaking.duration); + } + + real32 seconds_result = timing / user_effect->camera_shaking.wobble_function_period; + real32 periodic_function_result = periodic_function_evaluate(user_effect->camera_shaking.wobble_function, seconds_result); + real32 periodic_function_result_scaled = periodic_function_result * transition_function_result * user_effect->camera_shaking.wobble_weight + transition_function_result * (1.0 - user_effect->camera_shaking.wobble_weight); + + // Set v1 to 0 if v1_value is less than 0 + real32 v1_value = user_effect->camera_shaking.random_translation * periodic_function_result_scaled; + real32 v1 = (v1_value <= 0.0f ? 0.0f : v1_value); + + // Set v2 to 0 if v2_value is less than 0 + real32 v2_value = user_effect->camera_shaking.random_rotation * periodic_function_result_scaled; + real32 v2 = (v2_value <= 0.0f ? 0.0f : v2_value); + + if (user_effect->field_7C > 0) + { + real32 seconds_7C = game_ticks_to_seconds((real32)user_effect->field_7C); + real32 seconds_7C_x2 = seconds_7C + seconds_7C; + + v1 += seconds_7C_x2 * user_effect->field_74; + v2 += seconds_7C_x2 * user_effect->field_78; + + rumble_player_continuous(user_index, user_effect->rumble_intensity_left, user_effect->rumble_intensity_right); + } + player_effect_apply_camera_effect_matrix_internal(&calculated_matrix, v1, v2); + matrix4x3_multiply(matrix, &calculated_matrix, matrix); + } + } + } + + return; } + + +void player_effect_apply_camera_effect_matrix_internal(real_matrix4x3* matrix, real32 a2, real32 a3) +{ + real_vector3d vector; + + if (a3 != 0.0f) + { + _random_direction3d(get_local_random_seed_address(), NULL, __FILE__, __LINE__, &vector); + matrix4x3_rotation_from_axis_and_angle(matrix, &vector, sin(a3), cos(a3)); + } + if (a2 != 0.0f) + { + _random_direction3d(get_local_random_seed_address(), NULL, __FILE__, __LINE__, &vector); + matrix->position.x = vector.i * a2; + matrix->position.y = vector.j * a2; + matrix->position.z = vector.k * a2; + } + return; +} + +real32 player_effect_transition_function_evaluate(e_transition_function_type function_type, real32 a2, real32 a3, real32 a4) +{ + real32 function_value = 1.0f - (a3 / a4); + return transition_function_evaluate(function_type, function_value) * a2; +} \ No newline at end of file diff --git a/xlive/Blam/Engine/effects/player_effects.h b/xlive/Blam/Engine/effects/player_effects.h index f2f251790..115379d79 100644 --- a/xlive/Blam/Engine/effects/player_effects.h +++ b/xlive/Blam/Engine/effects/player_effects.h @@ -1,4 +1,85 @@ #pragma once +#include "Blam/Engine/camera/observer.h" #include "Blam/Engine/math/matrix_math.h" +#include "Blam/Engine/math/periodic_functions.h" +#include "Blam/Engine/Networking/Session/NetworkSession.h" -void __cdecl player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* matrix); +enum e_player_effect_user_global_flags : uint8 +{ + _player_effect_user_global_bit_0 = 0, + _player_effect_user_global_bit_1 = 1, + _player_effect_user_global_bit_2 = 2, + k_player_effect_user_global_flag_count +}; + +enum e_player_effect_global_flags : uint32 +{ + _player_effect_global_bit_0 = 0, + _player_effect_global_bit_1 = 1, + k_player_effect_global_flag_count +}; + +struct s_temporary_camera_impulse +{ + real32 duration; + e_transition_function_type fade_function; + real32 rotation; + real32 pushback; + real_bounds jitter; +}; +CHECK_STRUCT_SIZE(s_temporary_camera_impulse, 24); + +struct s_player_effect_camera_shaking +{ + real32 duration; + e_transition_function_type falloff_function; + real32 random_translation; + real_angle random_rotation; + e_periodic_function_type wobble_function; + real32 wobble_function_period; + real32 wobble_weight; +}; +CHECK_STRUCT_SIZE(s_player_effect_camera_shaking, 28); + +struct s_player_effect_user_globals +{ + real_vector3d vector_0; + real_vector3d vector_C; + int8 field_C[16]; + real_argb_color screen_flash_color; + s_temporary_camera_impulse camera_impulse; + s_player_effect_camera_shaking camera_shaking; + real32 rumble_intensity_left; + real32 rumble_intensity_right; + real32 field_74; + real32 field_78; + int16 field_7C; + int16 game_time; + int16 field_80; + int16 field_82; + int8 field_84[4]; + c_flags flags; + int8 field_89; + int8 field_8A[14]; + real32 transition_function_scale_98; + real32 transition_function_scale_9C; +}; +CHECK_STRUCT_SIZE(s_player_effect_user_globals, 160); + +struct s_player_effect_globals +{ + int32 field_0; + int16 field_4; + bool field_6; + int8 field_7; + s_observer_command_displacement position; + real32 max_intensity; + int16 attack_time_ticks; + int16 attack_time_ticks_1; + c_flags flags; + uint32 current_time_ticks; + s_player_effect_user_globals user_effects[k_number_of_users]; +}; +CHECK_STRUCT_SIZE(s_player_effect_globals, 688); + +void player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* matrix); diff --git a/xlive/Blam/Engine/game/player_vibration.cpp b/xlive/Blam/Engine/game/player_vibration.cpp index e7ff59613..c01553244 100644 --- a/xlive/Blam/Engine/game/player_vibration.cpp +++ b/xlive/Blam/Engine/game/player_vibration.cpp @@ -1,8 +1,14 @@ #include "stdafx.h" #include "player_vibration.h" -void rumble_player_set_scripted_scale(real32 scale) +void __cdecl rumble_player_set_scripted_scale(real32 scale) { INVOKE(0x9004F, 0x8EC60, rumble_player_set_scripted_scale, scale); return; } + +void __cdecl rumble_player_continuous(int32 user_index, real32 rumble_intensity_left, real32 rumble_intensity_right) +{ + INVOKE(0x90222, 0x8EE33, rumble_player_continuous, user_index, rumble_intensity_left, rumble_intensity_right); + return; +} \ No newline at end of file diff --git a/xlive/Blam/Engine/game/player_vibration.h b/xlive/Blam/Engine/game/player_vibration.h index 1dc1f1144..963dfeb8c 100644 --- a/xlive/Blam/Engine/game/player_vibration.h +++ b/xlive/Blam/Engine/game/player_vibration.h @@ -1,3 +1,5 @@ #pragma once -void rumble_player_set_scripted_scale(real32 scale); +void __cdecl rumble_player_set_scripted_scale(real32 scale); + +void __cdecl rumble_player_continuous(int32 user_index, real32 rumble_intensity_left, real32 rumble_intensity_right); diff --git a/xlive/Blam/Engine/interface/first_person_weapons.cpp b/xlive/Blam/Engine/interface/first_person_weapons.cpp index f2a6164f6..3c08d9a8a 100644 --- a/xlive/Blam/Engine/interface/first_person_weapons.cpp +++ b/xlive/Blam/Engine/interface/first_person_weapons.cpp @@ -176,7 +176,7 @@ void __cdecl first_person_weapons_update_nodes(int32 user_index, int32 weapon_sl // Clear weapon orientations if (node_count > 0) { - for (uint32 i = 0; i < weapon_data->node_orientations_count; i++) + for (int32 i = 0; i < weapon_data->node_orientations_count; i++) { memcpy(fp_orientations->weapon_orientations, &global_identity_orientation, sizeof(real_orientation)); } @@ -585,7 +585,7 @@ void __cdecl first_person_weapon_build_model_nodes(int32 node_matrices_count, { if (node_matrices_count > 0) { - for (uint32 node_index = 0; node_index < node_matrices_count; node_index++) + for (int32 node_index = 0; node_index < node_matrices_count; node_index++) { matrix4x3_multiply(camera_matrix, &node_matrices[node_index], &fp_model_data->nodes[node_index]); } diff --git a/xlive/Blam/Engine/main/interpolator.cpp b/xlive/Blam/Engine/main/interpolator.cpp index 7ddfb04ea..683f4b789 100644 --- a/xlive/Blam/Engine/main/interpolator.cpp +++ b/xlive/Blam/Engine/main/interpolator.cpp @@ -193,7 +193,7 @@ bool halo_interpolator_interpolate_object_node_matrices(datum object_index, real (*node_matrices) = g_frame_data_intermediate->object_data[out_abs_object_index].node_matrices; if (*out_node_count > 0) { - for (uint32 node_index = 0; node_index < *out_node_count; node_index++) + for (int32 node_index = 0; node_index < *out_node_count; node_index++) { real_point3d* target_position = &g_target_interpolation_frame_data->object_data[out_abs_object_index].node_matrices[node_index].position; real_point3d* previous_position = &g_previous_interpolation_frame_data->object_data[out_abs_object_index].node_matrices[node_index].position; @@ -344,7 +344,7 @@ bool halo_interpolator_interpolate_weapon(datum user_index, datum animation_inde if (target_node_count > 0 && target_node_count == previous_node_count) { *nodes = g_frame_data_intermediate->weapon_data[user_index][weapon_slot].nodes; - for (uint32 node_index = 0; node_index < target_node_count; node_index++) + for (int32 node_index = 0; node_index < target_node_count; node_index++) { matrix4x3_interpolate(&g_previous_interpolation_frame_data->weapon_data[user_index][weapon_slot].nodes[node_index], &g_target_interpolation_frame_data->weapon_data[user_index][weapon_slot].nodes[node_index], diff --git a/xlive/Blam/Engine/math/matrix_math.cpp b/xlive/Blam/Engine/math/matrix_math.cpp index 3b4cb934a..0f3fc56e7 100644 --- a/xlive/Blam/Engine/math/matrix_math.cpp +++ b/xlive/Blam/Engine/math/matrix_math.cpp @@ -126,6 +126,40 @@ real_vector3d* matrix4x3_transform_vector(const real_matrix4x3* matrix, const re return out; } +real_matrix4x3* matrix4x3_rotation_from_angles(real_matrix4x3* matrix, real32 i, real32 j, real32 k) +{ + matrix->scale = 1.0f; + + real_vector3d cosine_vector; + cosine_vector.i = cos(i); + cosine_vector.j = cos(j); + cosine_vector.k = cos(k); + + real_vector3d sine_vector; + sine_vector.i = sin(i); + sine_vector.j = sin(j); + sine_vector.k = sin(k); + + matrix->vectors.forward.j = (sine_vector.i * cosine_vector.k) - ((sine_vector.j * sine_vector.k) * cosine_vector.i); + matrix->vectors.forward.i = cosine_vector.i * cosine_vector.j; + matrix->vectors.forward.k = ((sine_vector.j * cosine_vector.k) * cosine_vector.i) + (sine_vector.i * sine_vector.k); + matrix->vectors.left.i = -(cosine_vector.j * sine_vector.i); + matrix->vectors.left.j = ((sine_vector.j * sine_vector.k) * sine_vector.i) + (cosine_vector.i * cosine_vector.k); + matrix->vectors.up.i = -0.0f - sine_vector.j; + matrix->vectors.left.k = (cosine_vector.i * sine_vector.k) - ((sine_vector.j * cosine_vector.k) * sine_vector.i); + matrix->vectors.up.j = -0.0f - (cosine_vector.j * sine_vector.k); + matrix->vectors.up.k = cosine_vector.j * cosine_vector.k; + matrix->position.x = 0.0f; + matrix->position.y = 0.0f; + matrix->position.z = 0.0f; + return matrix; +} + +real_matrix4x3* __cdecl matrix4x3_rotation_from_axis_and_angle(real_matrix4x3* matrix, real_vector3d* vector, real32 axis, real32 angle) +{ + return INVOKE(0x775C1, 0x751B7, matrix4x3_rotation_from_axis_and_angle, matrix, vector, axis, angle); +} + void matrix4x3_interpolate(const real_matrix4x3* previous, const real_matrix4x3* target, real32 fractional_ticks, real_matrix4x3* out_mat) { real_quaternion q1_previous, q2_target, q3_interpolated; diff --git a/xlive/Blam/Engine/math/matrix_math.h b/xlive/Blam/Engine/math/matrix_math.h index 66d9feece..5cf85a2e0 100644 --- a/xlive/Blam/Engine/math/matrix_math.h +++ b/xlive/Blam/Engine/math/matrix_math.h @@ -40,6 +40,10 @@ real_point3d* matrix4x3_transform_point(const real_matrix4x3* matrix, const real real_vector3d* matrix4x3_transform_vector(const real_matrix4x3* matrix, const real_vector3d* in, real_vector3d* out); +real_matrix4x3* matrix4x3_rotation_from_angles(real_matrix4x3* matrix, real32 i, real32 j, real32 k); + +real_matrix4x3* __cdecl matrix4x3_rotation_from_axis_and_angle(real_matrix4x3* matrix, real_vector3d* vector, real32 axis, real32 angle); + void matrix4x3_interpolate(const real_matrix4x3* previous, const real_matrix4x3* target, real32 fractional_ticks, real_matrix4x3* out_mat); void __cdecl matrix3x3_from_forward_and_up(real_matrix3x3* out_matrix, real_vector3d* forward_vector, real_vector3d* up_vector); diff --git a/xlive/Blam/Engine/math/periodic_functions.cpp b/xlive/Blam/Engine/math/periodic_functions.cpp index ceda624b7..f7f040beb 100644 --- a/xlive/Blam/Engine/math/periodic_functions.cpp +++ b/xlive/Blam/Engine/math/periodic_functions.cpp @@ -1,7 +1,12 @@ #include "stdafx.h" #include "periodic_functions.h" -real32 __cdecl transition_function_evaluate(int16 function_type, real32 function_value) +real32 __cdecl transition_function_evaluate(e_transition_function_type function_type, real32 function_value) { return INVOKE(0x8F3F7, 0x74E6E, transition_function_evaluate, function_type, function_value); } + +real32 __cdecl periodic_function_evaluate(e_periodic_function_type function_type, real32 function_value) +{ + return INVOKE(0x8F2D4, 0x74D4B, periodic_function_evaluate, function_type, function_value); +} diff --git a/xlive/Blam/Engine/math/periodic_functions.h b/xlive/Blam/Engine/math/periodic_functions.h index e4594f8a8..7db85634f 100644 --- a/xlive/Blam/Engine/math/periodic_functions.h +++ b/xlive/Blam/Engine/math/periodic_functions.h @@ -13,4 +13,23 @@ enum e_transition_function_type : int16 k_transition_functions_count }; -real32 __cdecl transition_function_evaluate(int16 function_type, real32 function_value); +enum e_periodic_function_type : int16 +{ + _periodic_function_one = 0, + _periodic_function_zero = 1, + _periodic_function_cosine = 2, + _periodic_function_cosine_variable_period = 3, + _periodic_function_diagonal_wave = 4, + _periodic_function_diagonal_wave_variable_period = 5, + _periodic_function_slide = 6, + _periodic_function_slide_variable_period = 7, + _periodic_function_noise = 8, + _periodic_function_jitter = 9, + _periodic_function_wander = 10, + _periodic_function_spark = 11, + k_periodic_functions_count +}; + +real32 __cdecl transition_function_evaluate(e_transition_function_type function_type, real32 function_value); + +real32 __cdecl periodic_function_evaluate(e_periodic_function_type function_type, real32 function_value); diff --git a/xlive/Blam/Engine/math/random_math.cpp b/xlive/Blam/Engine/math/random_math.cpp index f9c31005f..41c124b5d 100644 --- a/xlive/Blam/Engine/math/random_math.cpp +++ b/xlive/Blam/Engine/math/random_math.cpp @@ -1,33 +1,68 @@ #include "stdafx.h" - #include "random_math.h" +// More info: +// https://www.cec.uchile.cl/cinetica/pcordero/MC_libros/NumericalRecipesinC.pdf +// Page 284 to 285 + +#define RANDOM_A 1664525 +#define RANDOM_C 1013904223 + +#define RANDOM_FLONE 1.0f +#define RANDOM_MASK 0xffff + +// RANDOM_MULTIPLIER Compiles to 0.000015259022 +#define RANDOM_MULTIPLIER RANDOM_FLONE / (real32)RANDOM_MASK + +#define RANDOM(seed) (((seed) = RANDOM_A * (seed) + RANDOM_C) >> 16) +#define REAL_RANDOM(seed) (RANDOM(seed) * RANDOM_MULTIPLIER) + +#define RANDOM_RANGE(seed, lower_bound, delta) ((lower_bound) + (((delta) * RANDOM(seed)) >> 16)) +#define REAL_RANDOM_RANGE(seed, lower_bound, delta) ((lower_bound) + (delta) * REAL_RANDOM(seed)) + s_random_math* random_math_get_globals() { return *Memory::GetAddress(0x4A8280, 0x4D2500); } -DWORD random_math_get_seed() +uint32 random_math_get_seed() { return random_math_get_globals()->seed; } -DWORD random_math_get_random_number() +uint32 random_math_get_random_number() { return random_math_get_globals()->random_number; } -DWORD* random_math_get_random_number_pointer() +uint32* get_local_random_seed_address() { return &random_math_get_globals()->random_number; } -void random_math_set_seed(DWORD seed) +void random_math_set_seed(uint32 seed) { random_math_get_globals()->seed = seed; } -void random_math_set_random_number(DWORD random_number) +void random_math_set_random_number(uint32 random_number) { random_math_get_globals()->random_number = random_number; } + +real32 _real_random_range(uint32* seed, real32 lower_bound, real32 upper_bound) +{ + return REAL_RANDOM_RANGE(*seed, lower_bound, upper_bound - lower_bound); +} + +int16 _random_range(uint32* seed, int16 lower_bound, int16 upper_bound) +{ + return RANDOM_RANGE(*seed, lower_bound, upper_bound - lower_bound); +} + +real_vector3d* _random_direction3d(uint32* seed, const char* type, char* file, int32 line, real_vector3d* direction) +{ + int16 index = _random_range(seed, 0, 1026); + *direction = g_random_direction_table[index]; + return direction; +} diff --git a/xlive/Blam/Engine/math/random_math.h b/xlive/Blam/Engine/math/random_math.h index f981a5977..7aad0ba52 100644 --- a/xlive/Blam/Engine/math/random_math.h +++ b/xlive/Blam/Engine/math/random_math.h @@ -1,15 +1,1058 @@ #pragma once +#include "real_math.h" + +#define RANDOM_DIRECTION_TABLE_SIZE 1026 struct s_random_math { - DWORD seed; - DWORD random_number; + uint32 seed; + uint32 random_number; }; s_random_math* random_math_get_globals(); -DWORD random_math_get_seed(); -DWORD random_math_get_random_number(); -DWORD* random_math_get_random_number_pointer(); -void random_math_set_seed(DWORD seed); -void random_math_set_random_number(DWORD random_number); +uint32 random_math_get_seed(); + +uint32 random_math_get_random_number(); + +uint32* get_local_random_seed_address(); + +void random_math_set_seed(uint32 seed); + +void random_math_set_random_number(uint32 random_number); + +real32 _real_random_range(uint32* seed, real32 lower_bound, real32 upper_bound); + +int16 _random_range(uint32* seed, int16 lower_bound, int16 upper_bound); + +real_vector3d* _random_direction3d(uint32* seed, const char* type, char* file, int32 line, real_vector3d* direction); + +static const real_vector3d g_random_direction_table[RANDOM_DIRECTION_TABLE_SIZE] = +{ + { 0.0, 0.0, 1.0 }, + { 0.0, 1.0, 0.0 }, + { 1.0, 0.0, 0.0 }, + { 0.0, -1.0, 0.0 }, + { -1.0, 0.0, 0.0 }, + { 0.0, 0.0, -1.0 }, + { 0.066519, 0.0, 0.99778497 }, + { 0.14142101, 0.0, 0.98995 }, + { 0.22486, 0.0, 0.97439098 }, + { 0.316228, 0.0, 0.94868302 }, + { 0.41380301, 0.0, 0.910366 }, + { 0.51449603, 0.0, 0.85749298 }, + { 0.61394101, 0.0, 0.789352 }, + { 0.70710701, 0.0, 0.70710701 }, + { 0.789352, 0.0, 0.61394101 }, + { 0.85749298, 0.0, 0.51449603 }, + { 0.910366, 0.0, 0.41380301 }, + { 0.94868302, 0.0, 0.316228 }, + { 0.97439098, 0.0, 0.22486 }, + { 0.98995, 0.0, 0.14142101 }, + { 0.99778497, 0.0, 0.066519 }, + { 0.0, 0.066519, 0.99778497 }, + { 0.0, 0.14142101, 0.98995 }, + { 0.0, 0.22486, 0.97439098 }, + { 0.0, 0.316228, 0.94868302 }, + { 0.0, 0.41380301, 0.910366 }, + { 0.0, 0.51449603, 0.85749298 }, + { 0.0, 0.61394101, 0.789352 }, + { 0.0, 0.70710701, 0.70710701 }, + { 0.0, 0.789352, 0.61394101 }, + { 0.0, 0.85749298, 0.51449603 }, + { 0.0, 0.910366, 0.41380301 }, + { 0.0, 0.94868302, 0.316228 }, + { 0.0, 0.97439098, 0.22486 }, + { 0.0, 0.98995, 0.14142101 }, + { 0.0, 0.99778497, 0.066519 }, + { 0.071066998, 0.071066998, 0.994937 }, + { 0.15162, 0.07581, 0.98552799 }, + { 0.07581, 0.15162, 0.98552799 }, + { 0.24174701, 0.080582, 0.96698701 }, + { 0.162221, 0.162221, 0.97332799 }, + { 0.080582, 0.24174701, 0.96698701 }, + { 0.34050301, 0.085125998, 0.936382 }, + { 0.259161, 0.172774, 0.95025498 }, + { 0.172774, 0.259161, 0.95025498 }, + { 0.085125998, 0.34050301, 0.936382 }, + { 0.44543499, 0.089087002, 0.89087099 }, + { 0.36514801, 0.182574, 0.912871 }, + { 0.27617201, 0.27617201, 0.92057502 }, + { 0.182574, 0.36514801, 0.912871 }, + { 0.089087002, 0.44543499, 0.89087099 }, + { 0.55234498, 0.092056997, 0.82851702 }, + { 0.476731, 0.19069301, 0.85811597 }, + { 0.38851401, 0.29138601, 0.87415701 }, + { 0.29138601, 0.38851401, 0.87415701 }, + { 0.19069199, 0.476731, 0.85811597 }, + { 0.092056997, 0.55234498, 0.82851702 }, + { 0.65561002, 0.093658999, 0.74926901 }, + { 0.58834797, 0.196116, 0.78446501 }, + { 0.50507599, 0.30304599, 0.80812198 }, + { 0.40824801, 0.40824801, 0.81649703 }, + { 0.30304599, 0.50507599, 0.80812198 }, + { 0.196116, 0.58834797, 0.78446501 }, + { 0.093658999, 0.65561002, 0.74926901 }, + { 0.74926901, 0.093658999, 0.65561002 }, + { 0.69310302, 0.19802999, 0.69310302 }, + { 0.61885297, 0.30942601, 0.721995 }, + { 0.52704602, 0.421637, 0.73786497 }, + { 0.421637, 0.52704602, 0.73786497 }, + { 0.30942601, 0.61885297, 0.721995 }, + { 0.198029, 0.69310302, 0.69310302 }, + { 0.093658999, 0.74926901, 0.65561002 }, + { 0.82851702, 0.092056997, 0.55234498 }, + { 0.78446501, 0.196116, 0.58834797 }, + { 0.721995, 0.30942601, 0.61885297 }, + { 0.63960201, 0.42640099, 0.63960201 }, + { 0.53916401, 0.53916401, 0.64699697 }, + { 0.42640099, 0.63960201, 0.63960201 }, + { 0.30942601, 0.721995, 0.61885297 }, + { 0.196116, 0.78446501, 0.58834797 }, + { 0.092056997, 0.82851702, 0.55234498 }, + { 0.89087099, 0.089087002, 0.44543499 }, + { 0.85811597, 0.19069301, 0.476731 }, + { 0.80812198, 0.30304599, 0.50507599 }, + { 0.73786497, 0.421637, 0.52704602 }, + { 0.64699697, 0.53916401, 0.53916401 }, + { 0.53916401, 0.64699697, 0.53916401 }, + { 0.421637, 0.73786497, 0.52704602 }, + { 0.30304599, 0.80812198, 0.50507599 }, + { 0.19069301, 0.85811597, 0.476731 }, + { 0.089087002, 0.89087099, 0.44543499 }, + { 0.936382, 0.085125998, 0.34050301 }, + { 0.912871, 0.182574, 0.36514801 }, + { 0.87415701, 0.29138601, 0.38851401 }, + { 0.81649703, 0.40824801, 0.40824801 }, + { 0.73786497, 0.52704602, 0.421637 }, + { 0.63960201, 0.63960201, 0.42640099 }, + { 0.52704602, 0.73786497, 0.421637 }, + { 0.40824801, 0.81649703, 0.40824801 }, + { 0.29138601, 0.87415701, 0.38851401 }, + { 0.182574, 0.912871, 0.36514801 }, + { 0.085125998, 0.936382, 0.34050301 }, + { 0.96698803, 0.080582, 0.24174701 }, + { 0.95025498, 0.172774, 0.259161 }, + { 0.92057502, 0.27617201, 0.27617201 }, + { 0.87415701, 0.38851401, 0.29138601 }, + { 0.80812198, 0.50507599, 0.30304599 }, + { 0.721995, 0.61885297, 0.30942601 }, + { 0.61885297, 0.721995, 0.30942601 }, + { 0.50507599, 0.80812198, 0.30304599 }, + { 0.38851401, 0.87415701, 0.29138601 }, + { 0.27617201, 0.92057502, 0.27617201 }, + { 0.172774, 0.95025498, 0.259161 }, + { 0.080582, 0.96698803, 0.24174701 }, + { 0.98552698, 0.07581, 0.15162 }, + { 0.97332901, 0.162221, 0.162221 }, + { 0.95025498, 0.259161, 0.172774 }, + { 0.912871, 0.36514801, 0.182574 }, + { 0.85811597, 0.476731, 0.19069301 }, + { 0.78446501, 0.58834797, 0.196116 }, + { 0.69310302, 0.69310302, 0.19802999 }, + { 0.58834797, 0.78446501, 0.196116 }, + { 0.476731, 0.85811597, 0.19069301 }, + { 0.36514801, 0.912871, 0.182574 }, + { 0.259161, 0.95025498, 0.172774 }, + { 0.162221, 0.97332901, 0.162221 }, + { 0.07581, 0.98552698, 0.15162 }, + { 0.994937, 0.071066998, 0.071066998 }, + { 0.98552698, 0.15162, 0.07581 }, + { 0.96698803, 0.24174701, 0.080582 }, + { 0.936382, 0.34050301, 0.085125998 }, + { 0.89087099, 0.44543499, 0.089087002 }, + { 0.82851702, 0.55234498, 0.092056997 }, + { 0.74926901, 0.65561002, 0.093658999 }, + { 0.65561002, 0.74926901, 0.093658999 }, + { 0.55234498, 0.82851702, 0.092056997 }, + { 0.44543499, 0.89087099, 0.089087002 }, + { 0.34050301, 0.936382, 0.085125998 }, + { 0.24174701, 0.96698803, 0.080582 }, + { 0.15162, 0.98552698, 0.07581 }, + { 0.071066998, 0.994937, 0.071066998 }, + { 0.066519, 0.99778497, 0.0 }, + { 0.14142101, 0.98995, 0.0 }, + { 0.22486, 0.97439098, 0.0 }, + { 0.316228, 0.94868302, 0.0 }, + { 0.41380301, 0.910366, 0.0 }, + { 0.51449603, 0.85749298, 0.0 }, + { 0.61394101, 0.789352, 0.0 }, + { 0.70710701, 0.70710701, 0.0 }, + { 0.789352, 0.61394101, 0.0 }, + { 0.85749298, 0.51449603, 0.0 }, + { 0.910366, 0.41380301, 0.0 }, + { 0.94868302, 0.316228, 0.0 }, + { 0.97439098, 0.22486, 0.0 }, + { 0.98995, 0.14142101, 0.0 }, + { 0.99778497, 0.066519, 0.0 }, + { 0.0, -0.066519, 0.99778497 }, + { 0.0, -0.14142101, 0.98995 }, + { 0.0, -0.22486, 0.97439098 }, + { 0.0, -0.316228, 0.94868302 }, + { 0.0, -0.41380301, 0.910366 }, + { 0.0, -0.51449603, 0.85749298 }, + { 0.0, -0.61394101, 0.789352 }, + { 0.0, -0.70710701, 0.70710701 }, + { 0.0, -0.789352, 0.61394101 }, + { 0.0, -0.85749298, 0.51449603 }, + { 0.0, -0.910366, 0.41380301 }, + { 0.0, -0.94868302, 0.316228 }, + { 0.0, -0.97439098, 0.22486 }, + { 0.0, -0.98995, 0.14142101 }, + { 0.0, -0.99778497, 0.066519 }, + { 0.071066998, -0.071066998, 0.994937 }, + { 0.07581, -0.15162, 0.98552799 }, + { 0.15162, -0.07581, 0.98552799 }, + { 0.080582, -0.24174701, 0.96698701 }, + { 0.162221, -0.162221, 0.97332799 }, + { 0.24174701, -0.080582, 0.96698701 }, + { 0.085125998, -0.34050301, 0.936382 }, + { 0.172774, -0.259161, 0.95025498 }, + { 0.259161, -0.172774, 0.95025498 }, + { 0.34050301, -0.085125998, 0.936382 }, + { 0.089087002, -0.44543499, 0.89087099 }, + { 0.182574, -0.36514801, 0.912871 }, + { 0.27617201, -0.27617201, 0.92057502 }, + { 0.36514801, -0.182574, 0.912871 }, + { 0.44543499, -0.089087002, 0.89087099 }, + { 0.092056997, -0.55234498, 0.82851702 }, + { 0.19069301, -0.476731, 0.85811597 }, + { 0.29138601, -0.38851401, 0.87415701 }, + { 0.38851401, -0.29138601, 0.87415701 }, + { 0.476731, -0.19069199, 0.85811597 }, + { 0.55234498, -0.092056997, 0.82851702 }, + { 0.093658999, -0.65561002, 0.74926901 }, + { 0.196116, -0.58834797, 0.78446501 }, + { 0.30304599, -0.50507599, 0.80812198 }, + { 0.40824801, -0.40824801, 0.81649703 }, + { 0.50507599, -0.30304599, 0.80812198 }, + { 0.58834797, -0.196116, 0.78446501 }, + { 0.65561002, -0.093658999, 0.74926901 }, + { 0.093658999, -0.74926901, 0.65561002 }, + { 0.19802999, -0.69310302, 0.69310302 }, + { 0.30942601, -0.61885297, 0.721995 }, + { 0.421637, -0.52704602, 0.73786497 }, + { 0.52704602, -0.421637, 0.73786497 }, + { 0.61885297, -0.30942601, 0.721995 }, + { 0.69310302, -0.198029, 0.69310302 }, + { 0.74926901, -0.093658999, 0.65561002 }, + { 0.092056997, -0.82851702, 0.55234498 }, + { 0.196116, -0.78446501, 0.58834797 }, + { 0.30942601, -0.721995, 0.61885297 }, + { 0.42640099, -0.63960201, 0.63960201 }, + { 0.53916401, -0.53916401, 0.64699697 }, + { 0.63960201, -0.42640099, 0.63960201 }, + { 0.721995, -0.30942601, 0.61885297 }, + { 0.78446501, -0.196116, 0.58834797 }, + { 0.82851702, -0.092056997, 0.55234498 }, + { 0.089087002, -0.89087099, 0.44543499 }, + { 0.19069301, -0.85811597, 0.476731 }, + { 0.30304599, -0.80812198, 0.50507599 }, + { 0.421637, -0.73786497, 0.52704602 }, + { 0.53916401, -0.64699697, 0.53916401 }, + { 0.64699697, -0.53916401, 0.53916401 }, + { 0.73786497, -0.421637, 0.52704602 }, + { 0.80812198, -0.30304599, 0.50507599 }, + { 0.85811597, -0.19069301, 0.476731 }, + { 0.89087099, -0.089087002, 0.44543499 }, + { 0.085125998, -0.936382, 0.34050301 }, + { 0.182574, -0.912871, 0.36514801 }, + { 0.29138601, -0.87415701, 0.38851401 }, + { 0.40824801, -0.81649703, 0.40824801 }, + { 0.52704602, -0.73786497, 0.421637 }, + { 0.63960201, -0.63960201, 0.42640099 }, + { 0.73786497, -0.52704602, 0.421637 }, + { 0.81649703, -0.40824801, 0.40824801 }, + { 0.87415701, -0.29138601, 0.38851401 }, + { 0.912871, -0.182574, 0.36514801 }, + { 0.936382, -0.085125998, 0.34050301 }, + { 0.080582, -0.96698803, 0.24174701 }, + { 0.172774, -0.95025498, 0.259161 }, + { 0.27617201, -0.92057502, 0.27617201 }, + { 0.38851401, -0.87415701, 0.29138601 }, + { 0.50507599, -0.80812198, 0.30304599 }, + { 0.61885297, -0.721995, 0.30942601 }, + { 0.721995, -0.61885297, 0.30942601 }, + { 0.80812198, -0.50507599, 0.30304599 }, + { 0.87415701, -0.38851401, 0.29138601 }, + { 0.92057502, -0.27617201, 0.27617201 }, + { 0.95025498, -0.172774, 0.259161 }, + { 0.96698803, -0.080582, 0.24174701 }, + { 0.07581, -0.98552698, 0.15162 }, + { 0.162221, -0.97332901, 0.162221 }, + { 0.259161, -0.95025498, 0.172774 }, + { 0.36514801, -0.912871, 0.182574 }, + { 0.476731, -0.85811597, 0.19069301 }, + { 0.58834797, -0.78446501, 0.196116 }, + { 0.69310302, -0.69310302, 0.19802999 }, + { 0.78446501, -0.58834797, 0.196116 }, + { 0.85811597, -0.476731, 0.19069301 }, + { 0.912871, -0.36514801, 0.182574 }, + { 0.95025498, -0.259161, 0.172774 }, + { 0.97332901, -0.162221, 0.162221 }, + { 0.98552698, -0.07581, 0.15162 }, + { 0.071066998, -0.994937, 0.071066998 }, + { 0.15162, -0.98552698, 0.07581 }, + { 0.24174701, -0.96698803, 0.080582 }, + { 0.34050301, -0.936382, 0.085125998 }, + { 0.44543499, -0.89087099, 0.089087002 }, + { 0.55234498, -0.82851702, 0.092056997 }, + { 0.65561002, -0.74926901, 0.093658999 }, + { 0.74926901, -0.65561002, 0.093658999 }, + { 0.82851702, -0.55234498, 0.092056997 }, + { 0.89087099, -0.44543499, 0.089087002 }, + { 0.936382, -0.34050301, 0.085125998 }, + { 0.96698803, -0.24174701, 0.080582 }, + { 0.98552698, -0.15162, 0.07581 }, + { 0.994937, -0.071066998, 0.071066998 }, + { 0.99778497, -0.066519, 0.0 }, + { 0.98995, -0.14142101, 0.0 }, + { 0.97439098, -0.22486, 0.0 }, + { 0.94868302, -0.316228, 0.0 }, + { 0.910366, -0.41380301, 0.0 }, + { 0.85749298, -0.51449603, 0.0 }, + { 0.789352, -0.61394101, 0.0 }, + { 0.70710701, -0.70710701, 0.0 }, + { 0.61394101, -0.789352, 0.0 }, + { 0.51449603, -0.85749298, 0.0 }, + { 0.41380301, -0.910366, 0.0 }, + { 0.316228, -0.94868302, 0.0 }, + { 0.22486, -0.97439098, 0.0 }, + { 0.14142101, -0.98995, 0.0 }, + { 0.066519, -0.99778497, 0.0 }, + { -0.066519, 0.0, 0.99778497 }, + { -0.14142101, 0.0, 0.98995 }, + { -0.22486, 0.0, 0.97439098 }, + { -0.316228, 0.0, 0.94868302 }, + { -0.41380301, 0.0, 0.910366 }, + { -0.51449603, 0.0, 0.85749298 }, + { -0.61394101, 0.0, 0.789352 }, + { -0.70710701, 0.0, 0.70710701 }, + { -0.789352, 0.0, 0.61394101 }, + { -0.85749298, 0.0, 0.51449603 }, + { -0.910366, 0.0, 0.41380301 }, + { -0.94868302, 0.0, 0.316228 }, + { -0.97439098, 0.0, 0.22486 }, + { -0.98995, 0.0, 0.14142101 }, + { -0.99778497, 0.0, 0.066519 }, + { -0.071066998, -0.071066998, 0.994937 }, + { -0.15162, -0.07581, 0.98552799 }, + { -0.07581, -0.15162, 0.98552799 }, + { -0.24174701, -0.080582, 0.96698701 }, + { -0.162221, -0.162221, 0.97332799 }, + { -0.080582, -0.24174701, 0.96698701 }, + { -0.34050301, -0.085125998, 0.936382 }, + { -0.259161, -0.172774, 0.95025498 }, + { -0.172774, -0.259161, 0.95025498 }, + { -0.085125998, -0.34050301, 0.936382 }, + { -0.44543499, -0.089087002, 0.89087099 }, + { -0.36514801, -0.182574, 0.912871 }, + { -0.27617201, -0.27617201, 0.92057502 }, + { -0.182574, -0.36514801, 0.912871 }, + { -0.089087002, -0.44543499, 0.89087099 }, + { -0.55234498, -0.092056997, 0.82851702 }, + { -0.476731, -0.19069301, 0.85811597 }, + { -0.38851401, -0.29138601, 0.87415701 }, + { -0.29138601, -0.38851401, 0.87415701 }, + { -0.19069199, -0.476731, 0.85811597 }, + { -0.092056997, -0.55234498, 0.82851702 }, + { -0.65561002, -0.093658999, 0.74926901 }, + { -0.58834797, -0.196116, 0.78446501 }, + { -0.50507599, -0.30304599, 0.80812198 }, + { -0.40824801, -0.40824801, 0.81649703 }, + { -0.30304599, -0.50507599, 0.80812198 }, + { -0.196116, -0.58834797, 0.78446501 }, + { -0.093658999, -0.65561002, 0.74926901 }, + { -0.74926901, -0.093658999, 0.65561002 }, + { -0.69310302, -0.19802999, 0.69310302 }, + { -0.61885297, -0.30942601, 0.721995 }, + { -0.52704602, -0.421637, 0.73786497 }, + { -0.421637, -0.52704602, 0.73786497 }, + { -0.30942601, -0.61885297, 0.721995 }, + { -0.198029, -0.69310302, 0.69310302 }, + { -0.093658999, -0.74926901, 0.65561002 }, + { -0.82851702, -0.092056997, 0.55234498 }, + { -0.78446501, -0.196116, 0.58834797 }, + { -0.721995, -0.30942601, 0.61885297 }, + { -0.63960201, -0.42640099, 0.63960201 }, + { -0.53916401, -0.53916401, 0.64699697 }, + { -0.42640099, -0.63960201, 0.63960201 }, + { -0.30942601, -0.721995, 0.61885297 }, + { -0.196116, -0.78446501, 0.58834797 }, + { -0.092056997, -0.82851702, 0.55234498 }, + { -0.89087099, -0.089087002, 0.44543499 }, + { -0.85811597, -0.19069301, 0.476731 }, + { -0.80812198, -0.30304599, 0.50507599 }, + { -0.73786497, -0.421637, 0.52704602 }, + { -0.64699697, -0.53916401, 0.53916401 }, + { -0.53916401, -0.64699697, 0.53916401 }, + { -0.421637, -0.73786497, 0.52704602 }, + { -0.30304599, -0.80812198, 0.50507599 }, + { -0.19069301, -0.85811597, 0.476731 }, + { -0.089087002, -0.89087099, 0.44543499 }, + { -0.936382, -0.085125998, 0.34050301 }, + { -0.912871, -0.182574, 0.36514801 }, + { -0.87415701, -0.29138601, 0.38851401 }, + { -0.81649703, -0.40824801, 0.40824801 }, + { -0.73786497, -0.52704602, 0.421637 }, + { -0.63960201, -0.63960201, 0.42640099 }, + { -0.52704602, -0.73786497, 0.421637 }, + { -0.40824801, -0.81649703, 0.40824801 }, + { -0.29138601, -0.87415701, 0.38851401 }, + { -0.182574, -0.912871, 0.36514801 }, + { -0.085125998, -0.936382, 0.34050301 }, + { -0.96698803, -0.080582, 0.24174701 }, + { -0.95025498, -0.172774, 0.259161 }, + { -0.92057502, -0.27617201, 0.27617201 }, + { -0.87415701, -0.38851401, 0.29138601 }, + { -0.80812198, -0.50507599, 0.30304599 }, + { -0.721995, -0.61885297, 0.30942601 }, + { -0.61885297, -0.721995, 0.30942601 }, + { -0.50507599, -0.80812198, 0.30304599 }, + { -0.38851401, -0.87415701, 0.29138601 }, + { -0.27617201, -0.92057502, 0.27617201 }, + { -0.172774, -0.95025498, 0.259161 }, + { -0.080582, -0.96698803, 0.24174701 }, + { -0.98552698, -0.07581, 0.15162 }, + { -0.97332901, -0.162221, 0.162221 }, + { -0.95025498, -0.259161, 0.172774 }, + { -0.912871, -0.36514801, 0.182574 }, + { -0.85811597, -0.476731, 0.19069301 }, + { -0.78446501, -0.58834797, 0.196116 }, + { -0.69310302, -0.69310302, 0.19802999 }, + { -0.58834797, -0.78446501, 0.196116 }, + { -0.476731, -0.85811597, 0.19069301 }, + { -0.36514801, -0.912871, 0.182574 }, + { -0.259161, -0.95025498, 0.172774 }, + { -0.162221, -0.97332901, 0.162221 }, + { -0.07581, -0.98552698, 0.15162 }, + { -0.994937, -0.071066998, 0.071066998 }, + { -0.98552698, -0.15162, 0.07581 }, + { -0.96698803, -0.24174701, 0.080582 }, + { -0.936382, -0.34050301, 0.085125998 }, + { -0.89087099, -0.44543499, 0.089087002 }, + { -0.82851702, -0.55234498, 0.092056997 }, + { -0.74926901, -0.65561002, 0.093658999 }, + { -0.65561002, -0.74926901, 0.093658999 }, + { -0.55234498, -0.82851702, 0.092056997 }, + { -0.44543499, -0.89087099, 0.089087002 }, + { -0.34050301, -0.936382, 0.085125998 }, + { -0.24174701, -0.96698803, 0.080582 }, + { -0.15162, -0.98552698, 0.07581 }, + { -0.071066998, -0.994937, 0.071066998 }, + { -0.066519, -0.99778497, 0.0 }, + { -0.14142101, -0.98995, 0.0 }, + { -0.22486, -0.97439098, 0.0 }, + { -0.316228, -0.94868302, 0.0 }, + { -0.41380301, -0.910366, 0.0 }, + { -0.51449603, -0.85749298, 0.0 }, + { -0.61394101, -0.789352, 0.0 }, + { -0.70710701, -0.70710701, 0.0 }, + { -0.789352, -0.61394101, 0.0 }, + { -0.85749298, -0.51449603, 0.0 }, + { -0.910366, -0.41380301, 0.0 }, + { -0.94868302, -0.316228, 0.0 }, + { -0.97439098, -0.22486, 0.0 }, + { -0.98995, -0.14142101, 0.0 }, + { -0.99778497, -0.066519, 0.0 }, + { -0.071066998, 0.071066998, 0.994937 }, + { -0.07581, 0.15162, 0.98552799 }, + { -0.15162, 0.07581, 0.98552799 }, + { -0.080582, 0.24174701, 0.96698701 }, + { -0.162221, 0.162221, 0.97332799 }, + { -0.24174701, 0.080582, 0.96698701 }, + { -0.085125998, 0.34050301, 0.936382 }, + { -0.172774, 0.259161, 0.95025498 }, + { -0.259161, 0.172774, 0.95025498 }, + { -0.34050301, 0.085125998, 0.936382 }, + { -0.089087002, 0.44543499, 0.89087099 }, + { -0.182574, 0.36514801, 0.912871 }, + { -0.27617201, 0.27617201, 0.92057502 }, + { -0.36514801, 0.182574, 0.912871 }, + { -0.44543499, 0.089087002, 0.89087099 }, + { -0.092056997, 0.55234498, 0.82851702 }, + { -0.19069301, 0.476731, 0.85811597 }, + { -0.29138601, 0.38851401, 0.87415701 }, + { -0.38851401, 0.29138601, 0.87415701 }, + { -0.476731, 0.19069199, 0.85811597 }, + { -0.55234498, 0.092056997, 0.82851702 }, + { -0.093658999, 0.65561002, 0.74926901 }, + { -0.196116, 0.58834797, 0.78446501 }, + { -0.30304599, 0.50507599, 0.80812198 }, + { -0.40824801, 0.40824801, 0.81649703 }, + { -0.50507599, 0.30304599, 0.80812198 }, + { -0.58834797, 0.196116, 0.78446501 }, + { -0.65561002, 0.093658999, 0.74926901 }, + { -0.093658999, 0.74926901, 0.65561002 }, + { -0.19802999, 0.69310302, 0.69310302 }, + { -0.30942601, 0.61885297, 0.721995 }, + { -0.421637, 0.52704602, 0.73786497 }, + { -0.52704602, 0.421637, 0.73786497 }, + { -0.61885297, 0.30942601, 0.721995 }, + { -0.69310302, 0.198029, 0.69310302 }, + { -0.74926901, 0.093658999, 0.65561002 }, + { -0.092056997, 0.82851702, 0.55234498 }, + { -0.196116, 0.78446501, 0.58834797 }, + { -0.30942601, 0.721995, 0.61885297 }, + { -0.42640099, 0.63960201, 0.63960201 }, + { -0.53916401, 0.53916401, 0.64699697 }, + { -0.63960201, 0.42640099, 0.63960201 }, + { -0.721995, 0.30942601, 0.61885297 }, + { -0.78446501, 0.196116, 0.58834797 }, + { -0.82851702, 0.092056997, 0.55234498 }, + { -0.089087002, 0.89087099, 0.44543499 }, + { -0.19069301, 0.85811597, 0.476731 }, + { -0.30304599, 0.80812198, 0.50507599 }, + { -0.421637, 0.73786497, 0.52704602 }, + { -0.53916401, 0.64699697, 0.53916401 }, + { -0.64699697, 0.53916401, 0.53916401 }, + { -0.73786497, 0.421637, 0.52704602 }, + { -0.80812198, 0.30304599, 0.50507599 }, + { -0.85811597, 0.19069301, 0.476731 }, + { -0.89087099, 0.089087002, 0.44543499 }, + { -0.085125998, 0.936382, 0.34050301 }, + { -0.182574, 0.912871, 0.36514801 }, + { -0.29138601, 0.87415701, 0.38851401 }, + { -0.40824801, 0.81649703, 0.40824801 }, + { -0.52704602, 0.73786497, 0.421637 }, + { -0.63960201, 0.63960201, 0.42640099 }, + { -0.73786497, 0.52704602, 0.421637 }, + { -0.81649703, 0.40824801, 0.40824801 }, + { -0.87415701, 0.29138601, 0.38851401 }, + { -0.912871, 0.182574, 0.36514801 }, + { -0.936382, 0.085125998, 0.34050301 }, + { -0.080582, 0.96698803, 0.24174701 }, + { -0.172774, 0.95025498, 0.259161 }, + { -0.27617201, 0.92057502, 0.27617201 }, + { -0.38851401, 0.87415701, 0.29138601 }, + { -0.50507599, 0.80812198, 0.30304599 }, + { -0.61885297, 0.721995, 0.30942601 }, + { -0.721995, 0.61885297, 0.30942601 }, + { -0.80812198, 0.50507599, 0.30304599 }, + { -0.87415701, 0.38851401, 0.29138601 }, + { -0.92057502, 0.27617201, 0.27617201 }, + { -0.95025498, 0.172774, 0.259161 }, + { -0.96698803, 0.080582, 0.24174701 }, + { -0.07581, 0.98552698, 0.15162 }, + { -0.162221, 0.97332901, 0.162221 }, + { -0.259161, 0.95025498, 0.172774 }, + { -0.36514801, 0.912871, 0.182574 }, + { -0.476731, 0.85811597, 0.19069301 }, + { -0.58834797, 0.78446501, 0.196116 }, + { -0.69310302, 0.69310302, 0.19802999 }, + { -0.78446501, 0.58834797, 0.196116 }, + { -0.85811597, 0.476731, 0.19069301 }, + { -0.912871, 0.36514801, 0.182574 }, + { -0.95025498, 0.259161, 0.172774 }, + { -0.97332901, 0.162221, 0.162221 }, + { -0.98552698, 0.07581, 0.15162 }, + { -0.071066998, 0.994937, 0.071066998 }, + { -0.15162, 0.98552698, 0.07581 }, + { -0.24174701, 0.96698803, 0.080582 }, + { -0.34050301, 0.936382, 0.085125998 }, + { -0.44543499, 0.89087099, 0.089087002 }, + { -0.55234498, 0.82851702, 0.092056997 }, + { -0.65561002, 0.74926901, 0.093658999 }, + { -0.74926901, 0.65561002, 0.093658999 }, + { -0.82851702, 0.55234498, 0.092056997 }, + { -0.89087099, 0.44543499, 0.089087002 }, + { -0.936382, 0.34050301, 0.085125998 }, + { -0.96698803, 0.24174701, 0.080582 }, + { -0.98552698, 0.15162, 0.07581 }, + { -0.994937, 0.071066998, 0.071066998 }, + { -0.066519, 0.99778497, 0.0 }, + { -0.14142101, 0.98995, 0.0 }, + { -0.22486, 0.97439098, 0.0 }, + { -0.316228, 0.94868302, 0.0 }, + { -0.41380301, 0.910366, 0.0 }, + { -0.51449603, 0.85749298, 0.0 }, + { -0.61394101, 0.789352, 0.0 }, + { -0.70710701, 0.70710701, 0.0 }, + { -0.789352, 0.61394101, 0.0 }, + { -0.85749298, 0.51449603, 0.0 }, + { -0.910366, 0.41380301, 0.0 }, + { -0.94868302, 0.316228, 0.0 }, + { -0.97439098, 0.22486, 0.0 }, + { -0.98995, 0.14142101, 0.0 }, + { -0.99778497, 0.066519, 0.0 }, + { -0.99778497, 0.0, -0.066519 }, + { -0.98995, 0.0, -0.14142101 }, + { -0.97439098, 0.0, -0.22486 }, + { -0.94868302, 0.0, -0.316228 }, + { -0.910366, 0.0, -0.41380301 }, + { -0.85749298, 0.0, -0.51449603 }, + { -0.789352, 0.0, -0.61394101 }, + { -0.70710701, 0.0, -0.70710701 }, + { -0.61394101, 0.0, -0.789352 }, + { -0.51449603, 0.0, -0.85749298 }, + { -0.41380301, 0.0, -0.910366 }, + { -0.316228, 0.0, -0.94868302 }, + { -0.22486, 0.0, -0.97439098 }, + { -0.14142101, 0.0, -0.98995 }, + { -0.066519, 0.0, -0.99778497 }, + { 0.0, 0.99778497, -0.066519 }, + { 0.0, 0.98995, -0.14142101 }, + { 0.0, 0.97439098, -0.22486 }, + { 0.0, 0.94868302, -0.316228 }, + { 0.0, 0.910366, -0.41380301 }, + { 0.0, 0.85749298, -0.51449603 }, + { 0.0, 0.789352, -0.61394101 }, + { 0.0, 0.70710701, -0.70710701 }, + { 0.0, 0.61394101, -0.789352 }, + { 0.0, 0.51449603, -0.85749298 }, + { 0.0, 0.41380301, -0.910366 }, + { 0.0, 0.316228, -0.94868302 }, + { 0.0, 0.22486, -0.97439098 }, + { 0.0, 0.14142101, -0.98995 }, + { 0.0, 0.066519, -0.99778497 }, + { -0.071066998, 0.071066998, -0.994937 }, + { -0.15162, 0.07581, -0.98552799 }, + { -0.07581, 0.15162, -0.98552799 }, + { -0.24174701, 0.080582, -0.96698701 }, + { -0.162221, 0.162221, -0.97332799 }, + { -0.080582, 0.24174701, -0.96698701 }, + { -0.34050301, 0.085125998, -0.936382 }, + { -0.259161, 0.172774, -0.95025498 }, + { -0.172774, 0.259161, -0.95025498 }, + { -0.085125998, 0.34050301, -0.936382 }, + { -0.44543499, 0.089087002, -0.89087099 }, + { -0.36514801, 0.182574, -0.912871 }, + { -0.27617201, 0.27617201, -0.92057502 }, + { -0.182574, 0.36514801, -0.912871 }, + { -0.089087002, 0.44543499, -0.89087099 }, + { -0.55234498, 0.092056997, -0.82851702 }, + { -0.476731, 0.19069301, -0.85811597 }, + { -0.38851401, 0.29138601, -0.87415701 }, + { -0.29138601, 0.38851401, -0.87415701 }, + { -0.19069199, 0.476731, -0.85811597 }, + { -0.092056997, 0.55234498, -0.82851702 }, + { -0.65561002, 0.093658999, -0.74926901 }, + { -0.58834797, 0.196116, -0.78446501 }, + { -0.50507599, 0.30304599, -0.80812198 }, + { -0.40824801, 0.40824801, -0.81649703 }, + { -0.30304599, 0.50507599, -0.80812198 }, + { -0.196116, 0.58834797, -0.78446501 }, + { -0.093658999, 0.65561002, -0.74926901 }, + { -0.74926901, 0.093658999, -0.65561002 }, + { -0.69310302, 0.19802999, -0.69310302 }, + { -0.61885297, 0.30942601, -0.721995 }, + { -0.52704602, 0.421637, -0.73786497 }, + { -0.421637, 0.52704602, -0.73786497 }, + { -0.30942601, 0.61885297, -0.721995 }, + { -0.198029, 0.69310302, -0.69310302 }, + { -0.093658999, 0.74926901, -0.65561002 }, + { -0.82851702, 0.092056997, -0.55234498 }, + { -0.78446501, 0.196116, -0.58834797 }, + { -0.721995, 0.30942601, -0.61885297 }, + { -0.63960201, 0.42640099, -0.63960201 }, + { -0.53916401, 0.53916401, -0.64699697 }, + { -0.42640099, 0.63960201, -0.63960201 }, + { -0.30942601, 0.721995, -0.61885297 }, + { -0.196116, 0.78446501, -0.58834797 }, + { -0.092056997, 0.82851702, -0.55234498 }, + { -0.89087099, 0.089087002, -0.44543499 }, + { -0.85811597, 0.19069301, -0.476731 }, + { -0.80812198, 0.30304599, -0.50507599 }, + { -0.73786497, 0.421637, -0.52704602 }, + { -0.64699697, 0.53916401, -0.53916401 }, + { -0.53916401, 0.64699697, -0.53916401 }, + { -0.421637, 0.73786497, -0.52704602 }, + { -0.30304599, 0.80812198, -0.50507599 }, + { -0.19069301, 0.85811597, -0.476731 }, + { -0.089087002, 0.89087099, -0.44543499 }, + { -0.936382, 0.085125998, -0.34050301 }, + { -0.912871, 0.182574, -0.36514801 }, + { -0.87415701, 0.29138601, -0.38851401 }, + { -0.81649703, 0.40824801, -0.40824801 }, + { -0.73786497, 0.52704602, -0.421637 }, + { -0.63960201, 0.63960201, -0.42640099 }, + { -0.52704602, 0.73786497, -0.421637 }, + { -0.40824801, 0.81649703, -0.40824801 }, + { -0.29138601, 0.87415701, -0.38851401 }, + { -0.182574, 0.912871, -0.36514801 }, + { -0.085125998, 0.936382, -0.34050301 }, + { -0.96698803, 0.080582, -0.24174701 }, + { -0.95025498, 0.172774, -0.259161 }, + { -0.92057502, 0.27617201, -0.27617201 }, + { -0.87415701, 0.38851401, -0.29138601 }, + { -0.80812198, 0.50507599, -0.30304599 }, + { -0.721995, 0.61885297, -0.30942601 }, + { -0.61885297, 0.721995, -0.30942601 }, + { -0.50507599, 0.80812198, -0.30304599 }, + { -0.38851401, 0.87415701, -0.29138601 }, + { -0.27617201, 0.92057502, -0.27617201 }, + { -0.172774, 0.95025498, -0.259161 }, + { -0.080582, 0.96698803, -0.24174701 }, + { -0.98552698, 0.07581, -0.15162 }, + { -0.97332901, 0.162221, -0.162221 }, + { -0.95025498, 0.259161, -0.172774 }, + { -0.912871, 0.36514801, -0.182574 }, + { -0.85811597, 0.476731, -0.19069301 }, + { -0.78446501, 0.58834797, -0.196116 }, + { -0.69310302, 0.69310302, -0.19802999 }, + { -0.58834797, 0.78446501, -0.196116 }, + { -0.476731, 0.85811597, -0.19069301 }, + { -0.36514801, 0.912871, -0.182574 }, + { -0.259161, 0.95025498, -0.172774 }, + { -0.162221, 0.97332901, -0.162221 }, + { -0.07581, 0.98552698, -0.15162 }, + { -0.994937, 0.071066998, -0.071066998 }, + { -0.98552698, 0.15162, -0.07581 }, + { -0.96698803, 0.24174701, -0.080582 }, + { -0.936382, 0.34050301, -0.085125998 }, + { -0.89087099, 0.44543499, -0.089087002 }, + { -0.82851702, 0.55234498, -0.092056997 }, + { -0.74926901, 0.65561002, -0.093658999 }, + { -0.65561002, 0.74926901, -0.093658999 }, + { -0.55234498, 0.82851702, -0.092056997 }, + { -0.44543499, 0.89087099, -0.089087002 }, + { -0.34050301, 0.936382, -0.085125998 }, + { -0.24174701, 0.96698803, -0.080582 }, + { -0.15162, 0.98552698, -0.07581 }, + { -0.071066998, 0.994937, -0.071066998 }, + { 0.0, -0.99778497, -0.066519 }, + { 0.0, -0.98995, -0.14142101 }, + { 0.0, -0.97439098, -0.22486 }, + { 0.0, -0.94868302, -0.316228 }, + { 0.0, -0.910366, -0.41380301 }, + { 0.0, -0.85749298, -0.51449603 }, + { 0.0, -0.789352, -0.61394101 }, + { 0.0, -0.70710701, -0.70710701 }, + { 0.0, -0.61394101, -0.789352 }, + { 0.0, -0.51449603, -0.85749298 }, + { 0.0, -0.41380301, -0.910366 }, + { 0.0, -0.316228, -0.94868302 }, + { 0.0, -0.22486, -0.97439098 }, + { 0.0, -0.14142101, -0.98995 }, + { 0.0, -0.066519, -0.99778497 }, + { -0.071066998, -0.071066998, -0.994937 }, + { -0.07581, -0.15162, -0.98552799 }, + { -0.15162, -0.07581, -0.98552799 }, + { -0.080582, -0.24174701, -0.96698701 }, + { -0.162221, -0.162221, -0.97332799 }, + { -0.24174701, -0.080582, -0.96698701 }, + { -0.085125998, -0.34050301, -0.936382 }, + { -0.172774, -0.259161, -0.95025498 }, + { -0.259161, -0.172774, -0.95025498 }, + { -0.34050301, -0.085125998, -0.936382 }, + { -0.089087002, -0.44543499, -0.89087099 }, + { -0.182574, -0.36514801, -0.912871 }, + { -0.27617201, -0.27617201, -0.92057502 }, + { -0.36514801, -0.182574, -0.912871 }, + { -0.44543499, -0.089087002, -0.89087099 }, + { -0.092056997, -0.55234498, -0.82851702 }, + { -0.19069301, -0.476731, -0.85811597 }, + { -0.29138601, -0.38851401, -0.87415701 }, + { -0.38851401, -0.29138601, -0.87415701 }, + { -0.476731, -0.19069199, -0.85811597 }, + { -0.55234498, -0.092056997, -0.82851702 }, + { -0.093658999, -0.65561002, -0.74926901 }, + { -0.196116, -0.58834797, -0.78446501 }, + { -0.30304599, -0.50507599, -0.80812198 }, + { -0.40824801, -0.40824801, -0.81649703 }, + { -0.50507599, -0.30304599, -0.80812198 }, + { -0.58834797, -0.196116, -0.78446501 }, + { -0.65561002, -0.093658999, -0.74926901 }, + { -0.093658999, -0.74926901, -0.65561002 }, + { -0.19802999, -0.69310302, -0.69310302 }, + { -0.30942601, -0.61885297, -0.721995 }, + { -0.421637, -0.52704602, -0.73786497 }, + { -0.52704602, -0.421637, -0.73786497 }, + { -0.61885297, -0.30942601, -0.721995 }, + { -0.69310302, -0.198029, -0.69310302 }, + { -0.74926901, -0.093658999, -0.65561002 }, + { -0.092056997, -0.82851702, -0.55234498 }, + { -0.196116, -0.78446501, -0.58834797 }, + { -0.30942601, -0.721995, -0.61885297 }, + { -0.42640099, -0.63960201, -0.63960201 }, + { -0.53916401, -0.53916401, -0.64699697 }, + { -0.63960201, -0.42640099, -0.63960201 }, + { -0.721995, -0.30942601, -0.61885297 }, + { -0.78446501, -0.196116, -0.58834797 }, + { -0.82851702, -0.092056997, -0.55234498 }, + { -0.089087002, -0.89087099, -0.44543499 }, + { -0.19069301, -0.85811597, -0.476731 }, + { -0.30304599, -0.80812198, -0.50507599 }, + { -0.421637, -0.73786497, -0.52704602 }, + { -0.53916401, -0.64699697, -0.53916401 }, + { -0.64699697, -0.53916401, -0.53916401 }, + { -0.73786497, -0.421637, -0.52704602 }, + { -0.80812198, -0.30304599, -0.50507599 }, + { -0.85811597, -0.19069301, -0.476731 }, + { -0.89087099, -0.089087002, -0.44543499 }, + { -0.085125998, -0.936382, -0.34050301 }, + { -0.182574, -0.912871, -0.36514801 }, + { -0.29138601, -0.87415701, -0.38851401 }, + { -0.40824801, -0.81649703, -0.40824801 }, + { -0.52704602, -0.73786497, -0.421637 }, + { -0.63960201, -0.63960201, -0.42640099 }, + { -0.73786497, -0.52704602, -0.421637 }, + { -0.81649703, -0.40824801, -0.40824801 }, + { -0.87415701, -0.29138601, -0.38851401 }, + { -0.912871, -0.182574, -0.36514801 }, + { -0.936382, -0.085125998, -0.34050301 }, + { -0.080582, -0.96698803, -0.24174701 }, + { -0.172774, -0.95025498, -0.259161 }, + { -0.27617201, -0.92057502, -0.27617201 }, + { -0.38851401, -0.87415701, -0.29138601 }, + { -0.50507599, -0.80812198, -0.30304599 }, + { -0.61885297, -0.721995, -0.30942601 }, + { -0.721995, -0.61885297, -0.30942601 }, + { -0.80812198, -0.50507599, -0.30304599 }, + { -0.87415701, -0.38851401, -0.29138601 }, + { -0.92057502, -0.27617201, -0.27617201 }, + { -0.95025498, -0.172774, -0.259161 }, + { -0.96698803, -0.080582, -0.24174701 }, + { -0.07581, -0.98552698, -0.15162 }, + { -0.162221, -0.97332901, -0.162221 }, + { -0.259161, -0.95025498, -0.172774 }, + { -0.36514801, -0.912871, -0.182574 }, + { -0.476731, -0.85811597, -0.19069301 }, + { -0.58834797, -0.78446501, -0.196116 }, + { -0.69310302, -0.69310302, -0.19802999 }, + { -0.78446501, -0.58834797, -0.196116 }, + { -0.85811597, -0.476731, -0.19069301 }, + { -0.912871, -0.36514801, -0.182574 }, + { -0.95025498, -0.259161, -0.172774 }, + { -0.97332901, -0.162221, -0.162221 }, + { -0.98552698, -0.07581, -0.15162 }, + { -0.071066998, -0.994937, -0.071066998 }, + { -0.15162, -0.98552698, -0.07581 }, + { -0.24174701, -0.96698803, -0.080582 }, + { -0.34050301, -0.936382, -0.085125998 }, + { -0.44543499, -0.89087099, -0.089087002 }, + { -0.55234498, -0.82851702, -0.092056997 }, + { -0.65561002, -0.74926901, -0.093658999 }, + { -0.74926901, -0.65561002, -0.093658999 }, + { -0.82851702, -0.55234498, -0.092056997 }, + { -0.89087099, -0.44543499, -0.089087002 }, + { -0.936382, -0.34050301, -0.085125998 }, + { -0.96698803, -0.24174701, -0.080582 }, + { -0.98552698, -0.15162, -0.07581 }, + { -0.994937, -0.071066998, -0.071066998 }, + { 0.99778497, 0.0, -0.066519 }, + { 0.98995, 0.0, -0.14142101 }, + { 0.97439098, 0.0, -0.22486 }, + { 0.94868302, 0.0, -0.316228 }, + { 0.910366, 0.0, -0.41380301 }, + { 0.85749298, 0.0, -0.51449603 }, + { 0.789352, 0.0, -0.61394101 }, + { 0.70710701, 0.0, -0.70710701 }, + { 0.61394101, 0.0, -0.789352 }, + { 0.51449603, 0.0, -0.85749298 }, + { 0.41380301, 0.0, -0.910366 }, + { 0.316228, 0.0, -0.94868302 }, + { 0.22486, 0.0, -0.97439098 }, + { 0.14142101, 0.0, -0.98995 }, + { 0.066519, 0.0, -0.99778497 }, + { 0.071066998, -0.071066998, -0.994937 }, + { 0.15162, -0.07581, -0.98552799 }, + { 0.07581, -0.15162, -0.98552799 }, + { 0.24174701, -0.080582, -0.96698701 }, + { 0.162221, -0.162221, -0.97332799 }, + { 0.080582, -0.24174701, -0.96698701 }, + { 0.34050301, -0.085125998, -0.936382 }, + { 0.259161, -0.172774, -0.95025498 }, + { 0.172774, -0.259161, -0.95025498 }, + { 0.085125998, -0.34050301, -0.936382 }, + { 0.44543499, -0.089087002, -0.89087099 }, + { 0.36514801, -0.182574, -0.912871 }, + { 0.27617201, -0.27617201, -0.92057502 }, + { 0.182574, -0.36514801, -0.912871 }, + { 0.089087002, -0.44543499, -0.89087099 }, + { 0.55234498, -0.092056997, -0.82851702 }, + { 0.476731, -0.19069301, -0.85811597 }, + { 0.38851401, -0.29138601, -0.87415701 }, + { 0.29138601, -0.38851401, -0.87415701 }, + { 0.19069199, -0.476731, -0.85811597 }, + { 0.092056997, -0.55234498, -0.82851702 }, + { 0.65561002, -0.093658999, -0.74926901 }, + { 0.58834797, -0.196116, -0.78446501 }, + { 0.50507599, -0.30304599, -0.80812198 }, + { 0.40824801, -0.40824801, -0.81649703 }, + { 0.30304599, -0.50507599, -0.80812198 }, + { 0.196116, -0.58834797, -0.78446501 }, + { 0.093658999, -0.65561002, -0.74926901 }, + { 0.74926901, -0.093658999, -0.65561002 }, + { 0.69310302, -0.19802999, -0.69310302 }, + { 0.61885297, -0.30942601, -0.721995 }, + { 0.52704602, -0.421637, -0.73786497 }, + { 0.421637, -0.52704602, -0.73786497 }, + { 0.30942601, -0.61885297, -0.721995 }, + { 0.198029, -0.69310302, -0.69310302 }, + { 0.093658999, -0.74926901, -0.65561002 }, + { 0.82851702, -0.092056997, -0.55234498 }, + { 0.78446501, -0.196116, -0.58834797 }, + { 0.721995, -0.30942601, -0.61885297 }, + { 0.63960201, -0.42640099, -0.63960201 }, + { 0.53916401, -0.53916401, -0.64699697 }, + { 0.42640099, -0.63960201, -0.63960201 }, + { 0.30942601, -0.721995, -0.61885297 }, + { 0.196116, -0.78446501, -0.58834797 }, + { 0.092056997, -0.82851702, -0.55234498 }, + { 0.89087099, -0.089087002, -0.44543499 }, + { 0.85811597, -0.19069301, -0.476731 }, + { 0.80812198, -0.30304599, -0.50507599 }, + { 0.73786497, -0.421637, -0.52704602 }, + { 0.64699697, -0.53916401, -0.53916401 }, + { 0.53916401, -0.64699697, -0.53916401 }, + { 0.421637, -0.73786497, -0.52704602 }, + { 0.30304599, -0.80812198, -0.50507599 }, + { 0.19069301, -0.85811597, -0.476731 }, + { 0.089087002, -0.89087099, -0.44543499 }, + { 0.936382, -0.085125998, -0.34050301 }, + { 0.912871, -0.182574, -0.36514801 }, + { 0.87415701, -0.29138601, -0.38851401 }, + { 0.81649703, -0.40824801, -0.40824801 }, + { 0.73786497, -0.52704602, -0.421637 }, + { 0.63960201, -0.63960201, -0.42640099 }, + { 0.52704602, -0.73786497, -0.421637 }, + { 0.40824801, -0.81649703, -0.40824801 }, + { 0.29138601, -0.87415701, -0.38851401 }, + { 0.182574, -0.912871, -0.36514801 }, + { 0.085125998, -0.936382, -0.34050301 }, + { 0.96698803, -0.080582, -0.24174701 }, + { 0.95025498, -0.172774, -0.259161 }, + { 0.92057502, -0.27617201, -0.27617201 }, + { 0.87415701, -0.38851401, -0.29138601 }, + { 0.80812198, -0.50507599, -0.30304599 }, + { 0.721995, -0.61885297, -0.30942601 }, + { 0.61885297, -0.721995, -0.30942601 }, + { 0.50507599, -0.80812198, -0.30304599 }, + { 0.38851401, -0.87415701, -0.29138601 }, + { 0.27617201, -0.92057502, -0.27617201 }, + { 0.172774, -0.95025498, -0.259161 }, + { 0.080582, -0.96698803, -0.24174701 }, + { 0.98552698, -0.07581, -0.15162 }, + { 0.97332901, -0.162221, -0.162221 }, + { 0.95025498, -0.259161, -0.172774 }, + { 0.912871, -0.36514801, -0.182574 }, + { 0.85811597, -0.476731, -0.19069301 }, + { 0.78446501, -0.58834797, -0.196116 }, + { 0.69310302, -0.69310302, -0.19802999 }, + { 0.58834797, -0.78446501, -0.196116 }, + { 0.476731, -0.85811597, -0.19069301 }, + { 0.36514801, -0.912871, -0.182574 }, + { 0.259161, -0.95025498, -0.172774 }, + { 0.162221, -0.97332901, -0.162221 }, + { 0.07581, -0.98552698, -0.15162 }, + { 0.994937, -0.071066998, -0.071066998 }, + { 0.98552698, -0.15162, -0.07581 }, + { 0.96698803, -0.24174701, -0.080582 }, + { 0.936382, -0.34050301, -0.085125998 }, + { 0.89087099, -0.44543499, -0.089087002 }, + { 0.82851702, -0.55234498, -0.092056997 }, + { 0.74926901, -0.65561002, -0.093658999 }, + { 0.65561002, -0.74926901, -0.093658999 }, + { 0.55234498, -0.82851702, -0.092056997 }, + { 0.44543499, -0.89087099, -0.089087002 }, + { 0.34050301, -0.936382, -0.085125998 }, + { 0.24174701, -0.96698803, -0.080582 }, + { 0.15162, -0.98552698, -0.07581 }, + { 0.071066998, -0.994937, -0.071066998 }, + { 0.071066998, 0.071066998, -0.994937 }, + { 0.07581, 0.15162, -0.98552799 }, + { 0.15162, 0.07581, -0.98552799 }, + { 0.080582, 0.24174701, -0.96698701 }, + { 0.162221, 0.162221, -0.97332799 }, + { 0.24174701, 0.080582, -0.96698701 }, + { 0.085125998, 0.34050301, -0.936382 }, + { 0.172774, 0.259161, -0.95025498 }, + { 0.259161, 0.172774, -0.95025498 }, + { 0.34050301, 0.085125998, -0.936382 }, + { 0.089087002, 0.44543499, -0.89087099 }, + { 0.182574, 0.36514801, -0.912871 }, + { 0.27617201, 0.27617201, -0.92057502 }, + { 0.36514801, 0.182574, -0.912871 }, + { 0.44543499, 0.089087002, -0.89087099 }, + { 0.092056997, 0.55234498, -0.82851702 }, + { 0.19069301, 0.476731, -0.85811597 }, + { 0.29138601, 0.38851401, -0.87415701 }, + { 0.38851401, 0.29138601, -0.87415701 }, + { 0.476731, 0.19069199, -0.85811597 }, + { 0.55234498, 0.092056997, -0.82851702 }, + { 0.093658999, 0.65561002, -0.74926901 }, + { 0.196116, 0.58834797, -0.78446501 }, + { 0.30304599, 0.50507599, -0.80812198 }, + { 0.40824801, 0.40824801, -0.81649703 }, + { 0.50507599, 0.30304599, -0.80812198 }, + { 0.58834797, 0.196116, -0.78446501 }, + { 0.65561002, 0.093658999, -0.74926901 }, + { 0.093658999, 0.74926901, -0.65561002 }, + { 0.19802999, 0.69310302, -0.69310302 }, + { 0.30942601, 0.61885297, -0.721995 }, + { 0.421637, 0.52704602, -0.73786497 }, + { 0.52704602, 0.421637, -0.73786497 }, + { 0.61885297, 0.30942601, -0.721995 }, + { 0.69310302, 0.198029, -0.69310302 }, + { 0.74926901, 0.093658999, -0.65561002 }, + { 0.092056997, 0.82851702, -0.55234498 }, + { 0.196116, 0.78446501, -0.58834797 }, + { 0.30942601, 0.721995, -0.61885297 }, + { 0.42640099, 0.63960201, -0.63960201 }, + { 0.53916401, 0.53916401, -0.64699697 }, + { 0.63960201, 0.42640099, -0.63960201 }, + { 0.721995, 0.30942601, -0.61885297 }, + { 0.78446501, 0.196116, -0.58834797 }, + { 0.82851702, 0.092056997, -0.55234498 }, + { 0.089087002, 0.89087099, -0.44543499 }, + { 0.19069301, 0.85811597, -0.476731 }, + { 0.30304599, 0.80812198, -0.50507599 }, + { 0.421637, 0.73786497, -0.52704602 }, + { 0.53916401, 0.64699697, -0.53916401 }, + { 0.64699697, 0.53916401, -0.53916401 }, + { 0.73786497, 0.421637, -0.52704602 }, + { 0.80812198, 0.30304599, -0.50507599 }, + { 0.85811597, 0.19069301, -0.476731 }, + { 0.89087099, 0.089087002, -0.44543499 }, + { 0.085125998, 0.936382, -0.34050301 }, + { 0.182574, 0.912871, -0.36514801 }, + { 0.29138601, 0.87415701, -0.38851401 }, + { 0.40824801, 0.81649703, -0.40824801 }, + { 0.52704602, 0.73786497, -0.421637 }, + { 0.63960201, 0.63960201, -0.42640099 }, + { 0.73786497, 0.52704602, -0.421637 }, + { 0.81649703, 0.40824801, -0.40824801 }, + { 0.87415701, 0.29138601, -0.38851401 }, + { 0.912871, 0.182574, -0.36514801 }, + { 0.936382, 0.085125998, -0.34050301 }, + { 0.080582, 0.96698803, -0.24174701 }, + { 0.172774, 0.95025498, -0.259161 }, + { 0.27617201, 0.92057502, -0.27617201 }, + { 0.38851401, 0.87415701, -0.29138601 }, + { 0.50507599, 0.80812198, -0.30304599 }, + { 0.61885297, 0.721995, -0.30942601 }, + { 0.721995, 0.61885297, -0.30942601 }, + { 0.80812198, 0.50507599, -0.30304599 }, + { 0.87415701, 0.38851401, -0.29138601 }, + { 0.92057502, 0.27617201, -0.27617201 }, + { 0.95025498, 0.172774, -0.259161 }, + { 0.96698803, 0.080582, -0.24174701 }, + { 0.07581, 0.98552698, -0.15162 }, + { 0.162221, 0.97332901, -0.162221 }, + { 0.259161, 0.95025498, -0.172774 }, + { 0.36514801, 0.912871, -0.182574 }, + { 0.476731, 0.85811597, -0.19069301 }, + { 0.58834797, 0.78446501, -0.196116 }, + { 0.69310302, 0.69310302, -0.19802999 }, + { 0.78446501, 0.58834797, -0.196116 }, + { 0.85811597, 0.476731, -0.19069301 }, + { 0.912871, 0.36514801, -0.182574 }, + { 0.95025498, 0.259161, -0.172774 }, + { 0.97332901, 0.162221, -0.162221 }, + { 0.98552698, 0.07581, -0.15162 }, + { 0.071066998, 0.994937, -0.071066998 }, + { 0.15162, 0.98552698, -0.07581 }, + { 0.24174701, 0.96698803, -0.080582 }, + { 0.34050301, 0.936382, -0.085125998 }, + { 0.44543499, 0.89087099, -0.089087002 }, + { 0.55234498, 0.82851702, -0.092056997 }, + { 0.65561002, 0.74926901, -0.093658999 }, + { 0.74926901, 0.65561002, -0.093658999 }, + { 0.82851702, 0.55234498, -0.092056997 }, + { 0.89087099, 0.44543499, -0.089087002 }, + { 0.936382, 0.34050301, -0.085125998 }, + { 0.96698803, 0.24174701, -0.080582 }, + { 0.98552698, 0.15162, -0.07581 }, + { 0.994937, 0.071066998, -0.071066998 } +}; diff --git a/xlive/Blam/Engine/math/real_math.h b/xlive/Blam/Engine/math/real_math.h index 20e4fce48..2e4800fcc 100644 --- a/xlive/Blam/Engine/math/real_math.h +++ b/xlive/Blam/Engine/math/real_math.h @@ -223,7 +223,7 @@ static BLAM_MATH_INL real_point3d* point_from_line3d(const real_point3d* point, { real_vector3d direction_scaled; scale_vector3d(direction, length, &direction_scaled); - add_vectors3d(point, &direction_scaled, out); + add_vectors3d(&direction_scaled, point, out); return out; } diff --git a/xlive/Blam/Engine/models/render_models.cpp b/xlive/Blam/Engine/models/render_models.cpp index 74683cc58..f8c2f97a3 100644 --- a/xlive/Blam/Engine/models/render_models.cpp +++ b/xlive/Blam/Engine/models/render_models.cpp @@ -8,13 +8,13 @@ int32 __cdecl render_model_find_marker_group_by_name(datum render_model_index, s void __cdecl render_model_apply_two_bone_ik(datum render_model_index, int32 node_index, - real_matrix4x3* matrix_1, - real_matrix4x3* matrix_2, + real_matrix4x3* bone_1, + real_matrix4x3* bone_2, real32 ratio, int32 node_matrices_count, real_matrix4x3* out) { - INVOKE(0x37A561, 0x3252D1, render_model_apply_two_bone_ik, render_model_index, node_index, matrix_1, matrix_2, ratio, node_matrices_count, out); + INVOKE(0x37A561, 0x3252D1, render_model_apply_two_bone_ik, render_model_index, node_index, bone_1, bone_2, ratio, node_matrices_count, out); return; } diff --git a/xlive/Blam/Engine/scenario/scenario_definitions.h b/xlive/Blam/Engine/scenario/scenario_definitions.h index e54b518db..961e142eb 100644 --- a/xlive/Blam/Engine/scenario/scenario_definitions.h +++ b/xlive/Blam/Engine/scenario/scenario_definitions.h @@ -112,22 +112,6 @@ enum e_scenario_function_flags : int scenario_function_flag_always_active = FLAG(3) // Function Does Not Deactivate When At Or Below Lower Bound }; -enum e_scenario_function_type : short -{ - scenario_function_type_one = 0, - scenario_function_type_zero = 1, - scenario_function_type_cosine = 2, - scenario_function_type_cosine_variable_period = 3, - scenario_function_type_diagonal_wave = 4, - scenario_function_type_diagonal_wave_variable_period = 5, - scenario_function_type_slide = 6, - scenario_function_type_slide_variable_period = 7, - scenario_function_type_noise = 8, - scenario_function_type_jitter = 9, - scenario_function_type_wander = 10, - scenario_function_type_spark = 11 -}; - enum e_bounds_mode : short { @@ -146,12 +130,12 @@ struct scenario_function // Multiply this function by above period // This is the tagblock index for another scenario_function short scale_period_by; - e_scenario_function_type function; + e_periodic_function_type function; // Multiply this function by result of above function. // This is the tagblock index for another scenario_function short scale_function_by; - e_scenario_function_type wobble_function; // Curve used for wobble. + e_periodic_function_type wobble_function; // Curve used for wobble. float wobble_period_seconds; // Time it takes for magnitude of this function to complete a wobble. float wobble_magnitude_percent; // Amount of random wobble in the magnitude. float square_wave_threshold; // If non-zero, all values above square wave threshold are snapped to 1.0, and all values below it are snapped to 0.0 to create a square wave. diff --git a/xlive/Blam/Engine/units/bipeds.cpp b/xlive/Blam/Engine/units/bipeds.cpp index f917044a4..34cf6edbe 100644 --- a/xlive/Blam/Engine/units/bipeds.cpp +++ b/xlive/Blam/Engine/units/bipeds.cpp @@ -73,11 +73,11 @@ void __cdecl biped_offset_first_person_camera(const real_vector3d* camera_forwar { function_value = 1.0f; } - function_result = transition_function_evaluate(5, function_value); + function_result = transition_function_evaluate(_transition_function_cosine, function_value); } else { - function_result = transition_function_evaluate(5, 0.0f); + function_result = transition_function_evaluate(_transition_function_cosine, 0.0f); } From b5b6f41b0e41af6d124aa8a06ec2d85e61406988 Mon Sep 17 00:00:00 2001 From: Berthalamew <40469582+Berthalamew@users.noreply.github.com> Date: Tue, 26 Dec 2023 20:22:40 -0500 Subject: [PATCH 2/3] fix player_effect_apply_camera_effect_matrix - disable liquid interpolation temporarily - remove projectile_update_instantaneous logging --- xlive/Blam/Engine/effects/player_effects.cpp | 20 ++++++++++++------- xlive/Blam/Engine/effects/player_effects.h | 15 ++++++++++---- xlive/Blam/Engine/widgets/liquid.cpp | 2 +- .../GamePhysics/Patches/ProjectileFix.cpp | 4 ++-- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/xlive/Blam/Engine/effects/player_effects.cpp b/xlive/Blam/Engine/effects/player_effects.cpp index 654fea940..95fdbae63 100644 --- a/xlive/Blam/Engine/effects/player_effects.cpp +++ b/xlive/Blam/Engine/effects/player_effects.cpp @@ -11,7 +11,12 @@ real32 player_effect_transition_function_evaluate(e_transition_function_type fun s_player_effect_globals* player_effect_globals_get(void) { - return Memory::GetAddress(0x4CE860, 0x4F504C); + return *Memory::GetAddress(0x4CE860, 0x4F504C); +} + +s_player_effect_user_globals* player_effects_get_user_globals(int32 user_index) +{ + return &player_effect_globals_get()->user_effects[user_index]; } /* @@ -88,8 +93,8 @@ void player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* } else { - real32 timing = user_effect->camera_impulse.duration - (real32)user_effect->field_80 - halo_interpolator_get_interpolation_time(); - function_result = player_effect_transition_function_evaluate(user_effect->camera_impulse.fade_function, user_effect->transition_function_scale_9C, timing, user_effect->camera_impulse.duration); + real32 timing = user_effect->camera_impulse.duration - *(real32*)(&user_effect->field_80) - halo_interpolator_get_interpolation_time(); + function_result = player_effect_transition_function_evaluate((e_transition_function_type)user_effect->camera_impulse.fade_function, user_effect->transition_function_scale_9C, timing, user_effect->camera_impulse.duration); } real_vector3d vector; @@ -112,14 +117,15 @@ void player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* calculated_matrix = global_identity4x3; real32 transition_function_result; - real32 timing = user_effect->camera_shaking.duration - game_ticks_to_seconds((real32)user_effect->field_82) - halo_interpolator_get_interpolation_time(); + real32 field_82_real = (real32)user_effect->field_82; + real32 timing = user_effect->camera_shaking.duration - game_ticks_to_seconds(*(real32*)(&user_effect->field_82)) - halo_interpolator_get_interpolation_time(); if (bit_2_result) { transition_function_result = 1.0f; } else { - transition_function_result = player_effect_transition_function_evaluate(user_effect->camera_shaking.falloff_function, user_effect->transition_function_scale_98, timing, user_effect->camera_shaking.duration); + transition_function_result = player_effect_transition_function_evaluate((e_transition_function_type)user_effect->camera_shaking.falloff_function, user_effect->transition_function_scale_98, timing, user_effect->camera_shaking.duration); } real32 seconds_result = timing / user_effect->camera_shaking.wobble_function_period; @@ -136,7 +142,7 @@ void player_effect_apply_camera_effect_matrix(int32 user_index, real_matrix4x3* if (user_effect->field_7C > 0) { - real32 seconds_7C = game_ticks_to_seconds((real32)user_effect->field_7C); + real32 seconds_7C = game_ticks_to_seconds(*(real32*)(&user_effect->field_7C)); real32 seconds_7C_x2 = seconds_7C + seconds_7C; v1 += seconds_7C_x2 * user_effect->field_74; @@ -177,4 +183,4 @@ real32 player_effect_transition_function_evaluate(e_transition_function_type fun { real32 function_value = 1.0f - (a3 / a4); return transition_function_evaluate(function_type, function_value) * a2; -} \ No newline at end of file +} diff --git a/xlive/Blam/Engine/effects/player_effects.h b/xlive/Blam/Engine/effects/player_effects.h index 115379d79..c48b09111 100644 --- a/xlive/Blam/Engine/effects/player_effects.h +++ b/xlive/Blam/Engine/effects/player_effects.h @@ -22,7 +22,8 @@ enum e_player_effect_global_flags : uint32 struct s_temporary_camera_impulse { real32 duration; - e_transition_function_type fade_function; + int8 fade_function; // e_transition_function_type + int8 pad; real32 rotation; real32 pushback; real_bounds jitter; @@ -32,7 +33,7 @@ CHECK_STRUCT_SIZE(s_temporary_camera_impulse, 24); struct s_player_effect_camera_shaking { real32 duration; - e_transition_function_type falloff_function; + int8 falloff_function; // e_transition_function_type real32 random_translation; real_angle random_rotation; e_periodic_function_type wobble_function; @@ -45,7 +46,12 @@ struct s_player_effect_user_globals { real_vector3d vector_0; real_vector3d vector_C; - int8 field_C[16]; + int16 field_18; + int16 pad_1A; + real32 field_1C; + e_transition_function_type screen_flash_function; + int16 pad; + real32 field_24; real_argb_color screen_flash_color; s_temporary_camera_impulse camera_impulse; s_player_effect_camera_shaking camera_shaking; @@ -60,7 +66,8 @@ struct s_player_effect_user_globals int8 field_84[4]; c_flags flags; int8 field_89; - int8 field_8A[14]; + int16 pad_8A; + real_point3d origin; real32 transition_function_scale_98; real32 transition_function_scale_9C; }; diff --git a/xlive/Blam/Engine/widgets/liquid.cpp b/xlive/Blam/Engine/widgets/liquid.cpp index 92b44acce..ccd8438b5 100644 --- a/xlive/Blam/Engine/widgets/liquid.cpp +++ b/xlive/Blam/Engine/widgets/liquid.cpp @@ -7,6 +7,6 @@ void liquid_apply_patches(void) { // replace marker calls to interpolated one - PatchCall(Memory::GetAddress(0x18658B), object_get_markers_by_string_id); + //PatchCall(Memory::GetAddress(0x18658B), object_get_markers_by_string_id); return; } \ No newline at end of file diff --git a/xlive/H2MOD/Modules/GamePhysics/Patches/ProjectileFix.cpp b/xlive/H2MOD/Modules/GamePhysics/Patches/ProjectileFix.cpp index 03fe3a77e..06426faa3 100644 --- a/xlive/H2MOD/Modules/GamePhysics/Patches/ProjectileFix.cpp +++ b/xlive/H2MOD/Modules/GamePhysics/Patches/ProjectileFix.cpp @@ -62,14 +62,14 @@ bool __cdecl projectile_new_hook(datum projectile_object_index, int a2) void __cdecl projectile_update_instantaneous(datum projectile_object_index, real_point3d *a2) { float tick_length = projectile_get_update_tick_length(projectile_object_index, true); - LOG_TRACE_GAME("projectile_update_instantaneous() - projectile obj index: {:X}, tick length: {}", projectile_object_index, tick_length); + // LOG_TRACE_GAME("projectile_update_instantaneous() - projectile obj index: {:X}, tick length: {}", projectile_object_index, tick_length); p_projectile_update(projectile_object_index, a2, tick_length); } void __cdecl projectile_update_regular(datum projectile_object_index, real_point3d *a2) { float tick_length = projectile_get_update_tick_length(projectile_object_index, false); - LOG_TRACE_GAME("projectile_update_regular() - projectile obj index: {:X}, tick length: {}", projectile_object_index, tick_length); + // LOG_TRACE_GAME("projectile_update_regular() - projectile obj index: {:X}, tick length: {}", projectile_object_index, tick_length); p_projectile_update(projectile_object_index, a2, tick_length); } From 6f0434938ec711aeb41be1ea0ce89b8bc6238b87 Mon Sep 17 00:00:00 2001 From: Berthalamew <40469582+Berthalamew@users.noreply.github.com> Date: Tue, 26 Dec 2023 20:26:03 -0500 Subject: [PATCH 3/3] get render time as a 64 bit float --- xlive/Blam/Engine/render/render.cpp | 4 ++-- xlive/Blam/Engine/render/render.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xlive/Blam/Engine/render/render.cpp b/xlive/Blam/Engine/render/render.cpp index 652f998e0..625403c54 100644 --- a/xlive/Blam/Engine/render/render.cpp +++ b/xlive/Blam/Engine/render/render.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "render.h" -real32 get_current_render_time() +real64 get_current_render_time(void) { - return *Memory::GetAddress(0x4E6968); + return *Memory::GetAddress(0x4E6968); } diff --git a/xlive/Blam/Engine/render/render.h b/xlive/Blam/Engine/render/render.h index 0e32be440..ea0b1a934 100644 --- a/xlive/Blam/Engine/render/render.h +++ b/xlive/Blam/Engine/render/render.h @@ -1,3 +1,3 @@ #pragma once -real32 get_current_render_time(); +real64 get_current_render_time(void);