diff --git a/config/symbols.json b/config/symbols.json index d0a16b3a..f14285f7 100644 --- a/config/symbols.json +++ b/config/symbols.json @@ -23248,7 +23248,7 @@ { "file_offset": 4951098, "flags": 0, "name": "_render_camera_debug_this_fucking_frustum" }, { "file_offset": 4951104, "flags": 0, "name": "_render_debug_globals", "static": true }, { "file_offset": 4980812, "flags": 0, "name": "_bss_004c004c" }, -{ "file_offset": 4980856, "flags": 0, "name": "_lighting_storage" }, +{ "file_offset": 4980856, "flags": 0, "name": "?lighting_storage@?1??object_get_cached_render_lighting@@9@9", "static": true }, { "file_offset": 4980976, "flags": 0, "name": "_render_object_globals", "static": true }, { "file_offset": 4982004, "flags": 0, "name": "_debug_inactive_objects" }, { "file_offset": 4982005, "flags": 0, "name": "_reported_rendered_object_overflow", "static": true }, diff --git a/source/ai/action_vehicle.c b/source/ai/action_vehicle.c index 82dae1b7..0736dca8 100644 --- a/source/ai/action_vehicle.c +++ b/source/ai/action_vehicle.c @@ -70,11 +70,7 @@ symbols in this file: #include "cseries.h" #include "actions.h" - -#define object_get_bounding_sphere object_get_bounding_sphere_inline #include "actors.h" -#undef object_get_bounding_sphere - #include "actor_definitions.h" #include "ai_debug.h" #include "props.h" @@ -157,22 +153,6 @@ boolean unit_get_seat_entrance_point( /* ---------- public code */ -void object_get_bounding_sphere( - long object_index, - real_point3d *center, - real *radius) -{ - struct object_datum *object = object_get(object_index); - - match_assert("..\\objects\\objects.h", 535, center); - match_assert("..\\objects\\objects.h", 536, radius); - - *center = object->object.bounding_sphere_center; - *radius = object->object.bounding_sphere_radius; - - return; -} - void action_vehicle_begin( long actor_index) { diff --git a/source/ai/path.c b/source/ai/path.c index f7a7d665..94f473ae 100644 --- a/source/ai/path.c +++ b/source/ai/path.c @@ -1043,7 +1043,7 @@ boolean path_state_build_path( if (state->debug) { - *(struct path_result *)state->debug->__unknown140A0 = *path; + state->debug->result = *path; if (state->debug->path_build_result != _path_build_result_success) { diff --git a/source/ai/path.h b/source/ai/path.h index 66e0dd73..ac731402 100644 --- a/source/ai/path.h +++ b/source/ai/path.h @@ -264,7 +264,7 @@ struct path_debug_storage short path_traverse_result; short path_build_result; struct path_state path_state; - char __unknown140A0[0x5C]; + struct path_result result; short raw_step_count; word pad_140FE; struct path_step raw_steps[64]; diff --git a/source/objects/object_lights.c b/source/objects/object_lights.c index f0c70b31..2553c63c 100644 --- a/source/objects/object_lights.c +++ b/source/objects/object_lights.c @@ -140,6 +140,10 @@ symbols in this file: /* ---------- headers */ +/* objects.h lies in this unit's own directory, so January's __FILE__ for it was the absolute + path (see OBJECTS_H_FILE in objects.h) */ +#define OBJECTS_H_FILE "c:\\halo\\source\\objects\\objects.h" + #include "cseries/cseries.h" #include "cseries/errors.h" #include "cseries/profile.h" diff --git a/source/objects/objects.h b/source/objects/objects.h index 29de9dc1..1256e31a 100644 --- a/source/objects/objects.h +++ b/source/objects/objects.h @@ -188,6 +188,14 @@ enum #define object_get(index) ((struct object_datum*)object_get_and_verify_type(index, _object_mask_all)) #define object_try_and_get(index) ((struct object_datum*)object_try_and_get_and_verify_type(index, _object_mask_all)) +/* the inline assertions below report January's __FILE__ for this header, and January spelled it + two ways: its string census has "..\objects\objects.h" defined by action_vehicle (and + referenced by render_objects) and "c:\halo\source\objects\objects.h" defined by + object_lights; a unit that needs the absolute spelling defines OBJECTS_H_FILE first */ +#ifndef OBJECTS_H_FILE +#define OBJECTS_H_FILE "..\\objects\\objects.h" +#endif + /* ---------- structures */ typedef void (*object_deleted_proc)(long); @@ -488,8 +496,8 @@ __inline void object_get_bounding_sphere( { struct object_datum *object = object_get(object_index); - match_assert("c:\\halo\\source\\objects\\objects.h", 535, center); - match_assert("c:\\halo\\source\\objects\\objects.h", 536, radius); + match_assert(OBJECTS_H_FILE, 535, center); + match_assert(OBJECTS_H_FILE, 536, radius); *center = object->object.bounding_sphere_center; *radius = object->object.bounding_sphere_radius; @@ -504,8 +512,8 @@ __inline void object_get_render_bounding_sphere( { struct object_datum *object = object_get(object_index); - match_assert("..\\objects\\objects.h", 551, center); - match_assert("..\\objects\\objects.h", 552, radius); + match_assert(OBJECTS_H_FILE, 551, center); + match_assert(OBJECTS_H_FILE, 552, radius); *center = object->object.bounding_sphere_center; *radius = object_definition_get(object->definition_index)->object.render_bounding_radius; diff --git a/source/render/render_objects.c b/source/render/render_objects.c index 66bc767b..7c6d8d08 100644 --- a/source/render/render_objects.c +++ b/source/render/render_objects.c @@ -304,7 +304,6 @@ static struct profile_section render_object_shadows_section = struct data_array *cached_object_render_states; -struct render_lighting lighting_storage = { 0 }; static struct render_object_globals render_object_globals = { 0 }; boolean debug_inactive_objects = FALSE; @@ -356,6 +355,7 @@ struct render_lighting *object_get_cached_render_lighting( long object_index, real level_of_detail_pixels) { + static struct render_lighting lighting_storage; long render_state_index = object_get_cached_render_state( object_index, level_of_detail_pixels);