Skip to content

Commit

Permalink
Moved s_datum_header to cseries
Browse files Browse the repository at this point in the history
Updated `c_window_manager`
Updated `s_level_globals`
Updated `s_object_render_data`
Updated `s_havok_proxy_datum `
Mapped `objects_information` (WIP)
Updated certain pragma warnings
  • Loading branch information
twist84 committed Jan 10, 2025
1 parent e413ec1 commit 8bb1cf2
Show file tree
Hide file tree
Showing 68 changed files with 69 additions and 146 deletions.
1 change: 0 additions & 1 deletion game/source/ai/actor_dynamic_firing_position.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "ai/actors.hpp"
#include "ai/sector.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct firing_position_definition
{
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/ai_dialogue.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct vocalization_records :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/ai_flocks.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct flock_datum :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/cl_engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ai/actors.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"

// #TODO: confirm the following enum

Expand Down
1 change: 0 additions & 1 deletion game/source/ai/formations.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct formation_datum :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/joint_behavior.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "ai/ai_actions.hpp"
#include "ai/sector.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct invitation_data
{
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/objectives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ai/clump.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "tag_files/tag_groups.hpp"

struct s_objective_datum :
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/props.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ai/joint_behavior.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct prop_ref_datum :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/squad_patrol.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct squad_patrol_datum :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/ai/swarms.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct swarm_datum :
s_datum_header
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "tag_files/files_windows.hpp"
#include "tag_files/tag_groups.hpp"

Expand Down
21 changes: 4 additions & 17 deletions game/source/cache/cache_files.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ const long k_cache_file_version = 18;
#pragma pack(push, 4)
union s_cache_file_header
{
#pragma warning(push)
#pragma warning(disable : 4200)
byte base[];
#pragma warning(pop)
__pragma(warning(disable : 4200)) byte base[];

struct
{
Expand Down Expand Up @@ -147,10 +144,7 @@ static_assert(sizeof(cache_address) == 0x4);

union cache_file_tag_instance
{
#pragma warning(push)
#pragma warning(disable : 4200)
byte base[];
#pragma warning(pop)
__pragma(warning(disable : 4200)) byte base[];

struct
{
Expand All @@ -166,11 +160,7 @@ union cache_file_tag_instance

s_cache_file_tag_group tag_group;

#pragma warning(push)
#pragma warning(disable : 4200)
dword dependencies[];
#pragma warning(pop)

__pragma(warning(disable : 4200)) dword dependencies[];
};

char const* get_name()
Expand Down Expand Up @@ -232,10 +222,7 @@ static_assert(sizeof(s_cache_file_reports) == 0x8);

union s_cache_file_section_header
{
#pragma warning(push)
#pragma warning(disable : 4200)
byte base[];
#pragma warning(pop)
__pragma(warning(disable : 4200)) byte base[];

struct
{
Expand Down
1 change: 0 additions & 1 deletion game/source/camera/director.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "camera/observer.hpp"
#include "camera/orbiting_camera.hpp"
#include "camera/static_camera.hpp"
#include "memory/data.hpp"

enum e_director_mode
{
Expand Down
1 change: 0 additions & 1 deletion game/source/camera/observer.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

#define OBSERVER_SIGNATURE 'rad!'

Expand Down
6 changes: 6 additions & 0 deletions game/source/cseries/cseries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ static_assert(sizeof(real) == 0x4);

typedef char utf8;

struct s_datum_header
{
short identifier;
};
static_assert(sizeof(s_datum_header) == 0x2);

#define SIZEOF_BITS(value) 8 * sizeof(value)

const long CHAR_BYTES = sizeof(char);
Expand Down
1 change: 0 additions & 1 deletion game/source/cutscene/recorded_animations.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "units/units.hpp"

struct direction_playback_controller
Expand Down
1 change: 0 additions & 1 deletion game/source/devices/devices.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "animations/mixing_board/channels/animation_channel.hpp"
#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "objects/objects.hpp"

struct device_group_datum :
Expand Down
1 change: 0 additions & 1 deletion game/source/effects/beams.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

enum e_effect_pass;

Expand Down
1 change: 0 additions & 1 deletion game/source/effects/contrails.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

enum e_effect_pass;

Expand Down
1 change: 0 additions & 1 deletion game/source/effects/decals.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "multithreading/message_queue.hpp"

struct s_game_non_bsp_zone_set;
Expand Down
1 change: 0 additions & 1 deletion game/source/effects/effects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "effects/player_effects.hpp"
#include "effects/screen_effect.hpp"
#include "effects/vision_mode.hpp"
#include "memory/data.hpp"
#include "objects/damage_owner.hpp"
#include "objects/damage_reporting.hpp"

Expand Down
1 change: 0 additions & 1 deletion game/source/effects/light_volumes.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

enum e_effect_pass;

Expand Down
1 change: 0 additions & 1 deletion game/source/effects/particle.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_particle :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/effects/particle_emitter.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_particle_emitter :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/effects/particle_location.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_particle_location :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/effects/particle_system.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

enum e_effect_pass;

Expand Down
1 change: 0 additions & 1 deletion game/source/effects/screen_effect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "cseries/cseries.hpp"
#include "math/function_definitions.hpp"
#include "memory/data.hpp"
#include "tag_files/tag_groups.hpp"

struct s_screen_effect_datum :
Expand Down
1 change: 0 additions & 1 deletion game/source/game/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "game/player_mapping.hpp"
#include "game/players.hpp"
#include "game/survival_mode.hpp"
#include "memory/data.hpp"
#include "render/render_visibility_collection.hpp"
#include "saved_games/game_state.hpp"
#include "shell/shell.hpp"
Expand Down
1 change: 0 additions & 1 deletion game/source/game/game_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "game/materials.hpp"
#include "game/materials_definitions.hpp"
#include "math/function_definitions.hpp"
#include "memory/data.hpp"
#include "render/render_visibility_collection.hpp"
#include "sound/sound_definitions.hpp"
#include "tag_files/tag_groups.hpp"
Expand Down
1 change: 0 additions & 1 deletion game/source/game/player_mapping.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"
#include "shell/shell.hpp"

struct s_player_mapping_globals
Expand Down
1 change: 0 additions & 1 deletion game/source/gpu_particle/beam_gpu.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_beam_gpu :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/gpu_particle/contrail_gpu.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_contrail_gpu :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/gpu_particle/light_volume_gpu.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_light_volume_gpu :
s_datum_header
Expand Down
1 change: 0 additions & 1 deletion game/source/gpu_particle/particle_block.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

struct c_particle_emitter_gpu :
s_datum_header
Expand Down
1 change: 1 addition & 0 deletions game/source/hs/hs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "hs/hs_globals_external.hpp"
#include "hs/hs_runtime.hpp"
#include "hs/hs_scenario_definitions.hpp"
#include "memory/data.hpp"
#include "objects/objects.hpp"
#include "scenario/scenario.hpp"
#include "shell/shell.hpp"
Expand Down
2 changes: 1 addition & 1 deletion game/source/hs/hs.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "cseries/cseries.hpp"
#include "memory/data.hpp"

#define HS_TYPE_IS_TAG_REFERENCE(_hs_type) ((_hs_type) >= _hs_type_effect && (_hs_type) <= _hs_type_bink_definition)
#define HS_TYPE_IS_ENUM(_hs_type) ((_hs_type) >= _hs_type_game_difficulty && (_hs_type) <= _hs_type_secondary_skull)
Expand Down Expand Up @@ -146,6 +145,7 @@ struct hs_function_definition_debug;
struct hs_global_external;
struct hs_global_external_debug;
struct s_tag_block;
struct s_data_array;

extern bool const _hs_type_boolean_default;
extern real const _hs_type_real_default;
Expand Down
14 changes: 4 additions & 10 deletions game/source/hs/hs_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ struct hs_function_definition
char const* parameters;

short formal_parameter_count;
#pragma warning(push)
#pragma warning(disable : 4200)
union
{
c_enum<e_hs_type, short, _hs_unparsed, k_hs_type_count> formal_parameters_[];
short formal_parameters[];
__pragma(warning(disable : 4200)) c_enum<e_hs_type, short, _hs_unparsed, k_hs_type_count> formal_parameters_[];
__pragma(warning(disable : 4200)) short formal_parameters[];
};
#pragma warning(pop)
};
static_assert(sizeof(hs_function_definition) == 0x10);

Expand All @@ -39,14 +36,11 @@ struct hs_function_definition_debug
char const* parameters;

short formal_parameter_count;
#pragma warning(push)
#pragma warning(disable : 4200)
union
{
c_enum<e_hs_type, short, _hs_unparsed, k_hs_type_count> formal_parameters_[];
short formal_parameters[];
__pragma(warning(disable : 4200)) c_enum<e_hs_type, short, _hs_unparsed, k_hs_type_count> formal_parameters_[];
__pragma(warning(disable : 4200)) short formal_parameters[];
};
#pragma warning(pop)
};
static_assert(sizeof(hs_function_definition_debug) == 0x20);

Expand Down
1 change: 0 additions & 1 deletion game/source/hs/hs_runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "cseries/cseries.hpp"
#include "hs/hs.hpp"
#include "memory/data.hpp"
#include "scenario/scenario_trigger_volumes.hpp"

enum e_hs_thread_type
Expand Down
Loading

0 comments on commit 8bb1cf2

Please sign in to comment.