diff --git a/source/cseries/cseries.h b/source/cseries/cseries.h index 90c5c1d6..40d2e013 100644 --- a/source/cseries/cseries.h +++ b/source/cseries/cseries.h @@ -95,8 +95,6 @@ typedef byte boolean; typedef unsigned long tag; -typedef float real; - /* ---------- prototypes/CSERIES.C */ void cseries_initialize(void); diff --git a/source/math/real_math.h b/source/math/real_math.h index 7a8431ce..bf16a970 100644 --- a/source/math/real_math.h +++ b/source/math/real_math.h @@ -14,6 +14,23 @@ file has inline function assertions. /* ---------- structures */ +typedef float real; + +union real_euler_angles3d +{ + real n[3]; + struct { real yaw, pitch, roll; }; +}; +typedef union real_euler_angles3d real_euler_angles3d; + +union real_point3d +{ + real n[3]; + struct { real x, y, z; }; + struct { real u, v, w; }; +}; +typedef union real_point3d real_point3d; + /* ---------- prototypes/REAL_MATH.C */ void real_math_initialize(void); diff --git a/source/objects/object_types.h b/source/objects/object_types.h index 811f7e3c..dd21285e 100644 --- a/source/objects/object_types.h +++ b/source/objects/object_types.h @@ -1,7 +1,5 @@ /* OBJECT_TYPES.H - -header included in hcex build. */ #ifndef __OBJECT_TYPES_H @@ -10,14 +8,43 @@ header included in hcex build. /* ---------- constants */ -/* ---------- macros */ +enum +{ + _object_type_biped= 0, + _object_type_vehicle, + _object_type_weapon, + _object_type_equipment, + _object_type_garbage, + _object_type_projectile, + _object_type_scenery, + _object_type_machine, + _object_type_control, + _object_type_light_fixture, + _object_type_placeholder, + _object_type_sound_scenery, + NUMBER_OF_OBJECT_TYPES, -/* ---------- structures */ + _object_mask_all= UNSIGNED_LONG_MAX, + _object_mask_unit= (FLAG(_object_type_biped)|FLAG(_object_type_vehicle)), + _object_mask_biped= FLAG(_object_type_biped), + _object_mask_vehicle= FLAG(_object_type_vehicle), + _object_mask_item= (FLAG(_object_type_weapon)|FLAG(_object_type_equipment)|FLAG(_object_type_garbage)), + _object_mask_weapon= FLAG(_object_type_weapon), + _object_mask_equipment= FLAG(_object_type_equipment), + _object_mask_garbage= FLAG(_object_type_garbage), + _object_mask_projectile= FLAG(_object_type_projectile), + _object_mask_scenery= FLAG(_object_type_scenery), + _object_mask_sound_scenery= FLAG(_object_type_sound_scenery), + _object_mask_device= (FLAG(_object_type_machine)|FLAG(_object_type_control)|FLAG(_object_type_light_fixture)), + _object_mask_machine= FLAG(_object_type_machine), + _object_mask_control= FLAG(_object_type_control), + _object_mask_light_fixture= FLAG(_object_type_light_fixture), + _object_mask_placeholder= FLAG(_object_type_placeholder), -/* ---------- prototypes/EXAMPLE.C */ - -/* ---------- globals */ - -/* ---------- public code */ + _object_mask_sightblocking= (FLAG(_object_type_vehicle)|FLAG(_object_type_scenery)|FLAG(_object_type_machine)), + _object_mask_cannot_interpolate= (FLAG(_object_type_projectile)|FLAG(_object_type_scenery)|FLAG(_object_type_machine)|FLAG(_object_type_control)| + FLAG(_object_type_light_fixture)|FLAG(_object_type_placeholder)|FLAG(_object_type_sound_scenery)), + _object_mask_remove_on_bsp_switch= (FLAG(_object_type_scenery)|FLAG(_object_type_light_fixture)) +}; #endif // __OBJECT_TYPES_H diff --git a/source/objects/placeholder_definitions.c b/source/objects/placeholder_definitions.c index c6042210..96a46d5d 100644 --- a/source/objects/placeholder_definitions.c +++ b/source/objects/placeholder_definitions.c @@ -1,35 +1,55 @@ /* PLACEHOLDER_DEFINITIONS.C - -symbols in this file: -00134D00 0010: - _placeholder_initialize (0000) -00134D10 0010: - _placeholder_initialize_for_new_map (0000) -00134D20 0010: - _placeholder_dispose_from_old_map (0000) -00134D30 0010: - _placeholder_dispose (0000) -00134D40 0010: - _placeholder_place (0000) -00134D50 0010: - _placeholder_new (0000) -00134D60 0010: - _placeholder_delete (0000) */ /* ---------- headers */ -/* ---------- constants */ - -/* ---------- macros */ - -/* ---------- structures */ - -/* ---------- prototypes */ - -/* ---------- globals */ +#include "cseries.h" +#include "placeholder_definitions.h" +#include "real_math.h" +#include "scenario_definitions.h" /* ---------- public code */ -/* ---------- private code */ +void placeholder_initialize( + void) +{ + return; +} + +void placeholder_initialize_for_new_map( + void) +{ + return; +} + +void placeholder_dispose_from_old_map( + void) +{ + return; +} + +void placeholder_dispose( + void) +{ + return; +} + +void placeholder_place( + long placeholder_index, + struct scenario_placeholder_datum *scenario_placeholder) +{ + return; +} + +boolean placeholder_new( + long object_index) +{ + return TRUE; +} + +void placeholder_delete( + long placeholder_index) +{ + return; +} diff --git a/source/objects/placeholder_definitions.h b/source/objects/placeholder_definitions.h index 1120fdef..c07b03d5 100644 --- a/source/objects/placeholder_definitions.h +++ b/source/objects/placeholder_definitions.h @@ -16,6 +16,14 @@ header included in hcex build. /* ---------- prototypes/EXAMPLE.C */ +void placeholder_initialize(void); +void placeholder_initialize_for_new_map(void); +void placeholder_dispose_from_old_map(void); +void placeholder_dispose(void); +void placeholder_place(long placeholder_index, struct scenario_placeholder_datum *scenario_placeholder); +boolean placeholder_new(long object_index); +void placeholder_delete(long placeholder_index); + /* ---------- globals */ /* ---------- public code */ diff --git a/source/scenario/scenario_definitions.h b/source/scenario/scenario_definitions.h index a6f516b4..c82662f4 100644 --- a/source/scenario/scenario_definitions.h +++ b/source/scenario/scenario_definitions.h @@ -14,6 +14,24 @@ header included in hcex build. /* ---------- structures */ +struct scenario_object_datum +{ + short palette_entry_index; + short name_index; + word placement_flags; + short variant_number; + real_point3d position; + real_euler_angles3d rotation; + word on_bsp_flags; + word misc_flags; + unsigned long unused; +}; + +struct scenario_placeholder_datum +{ + struct scenario_object_datum object; +}; + /* ---------- prototypes/EXAMPLE.C */ /* ---------- globals */