Skip to content

Commit

Permalink
Added render_water globals
Browse files Browse the repository at this point in the history
  • Loading branch information
theTwister authored and theTwister committed Sep 13, 2023
1 parent 1f13b45 commit 287a470
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions game/game.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ POPD
<ClCompile Include="source\render\render_objects_static_lighting.cpp" />
<ClCompile Include="source\render\render_structure.cpp" />
<ClCompile Include="source\render\render_visibility.cpp" />
<ClCompile Include="source\render\render_water.cpp" />
<ClCompile Include="source\render\views\render_player_view.cpp" />
<ClCompile Include="source\render\views\render_view.cpp" />
<ClCompile Include="source\render\views\split_screen_config.cpp" />
Expand Down Expand Up @@ -897,6 +898,7 @@ POPD
<ClInclude Include="source\render\render_structure.hpp" />
<ClInclude Include="source\render\render_visibility.hpp" />
<ClInclude Include="source\render\render_visibility_collection.hpp" />
<ClInclude Include="source\render\render_water.hpp" />
<ClInclude Include="source\render\views\render_player_view.hpp" />
<ClInclude Include="source\render\views\render_view.hpp" />
<ClInclude Include="source\render\views\split_screen_config.hpp" />
Expand Down
6 changes: 6 additions & 0 deletions game/game.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,9 @@
<ClCompile Include="source\physics\water_physics.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\render\render_water.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\camera\camera.hpp">
Expand Down Expand Up @@ -2489,6 +2492,9 @@
<ClInclude Include="source\physics\water_physics.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="source\render\render_water.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="source\tag_files\string_ids\string_ids.global_strings.inl">
Expand Down
6 changes: 6 additions & 0 deletions game/source/main/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "physics/water_physics.hpp"
#include "render/old_render_debug.hpp"
#include "render/render_visibility.hpp"
#include "render/render_water.hpp"
#include "simulation/simulation_debug_globals.hpp"
#include "sound/sound_manager.hpp"
#include "units/bipeds.hpp"
Expand Down Expand Up @@ -478,6 +479,11 @@ s_console_global const k_console_globals[] =
//CONSOLE_GLOBAL_DECLARE_LONG(debug_objects_type_mask),
CONSOLE_GLOBAL_DECLARE_BOOL(debug_objects_player_only),

CONSOLE_GLOBAL_DECLARE_BOOL2(render_water, render_water_enabled),
CONSOLE_GLOBAL_DECLARE_BOOL2(render_water_tessellated, render_water_tessellation_enabled),
CONSOLE_GLOBAL_DECLARE_BOOL2(render_water_interaction, render_water_interaction_enabled),
CONSOLE_GLOBAL_DECLARE_BOOL2(render_water_wireframe, render_water_wireframe_enabled),

CONSOLE_GLOBAL_DECLARE_BOOL(debug_structure_markers),
CONSOLE_GLOBAL_DECLARE_BOOL(debug_structure_surface_references),
CONSOLE_GLOBAL_DECLARE_BOOL(debug_structure_soft_ceilings),
Expand Down
9 changes: 9 additions & 0 deletions game/source/render/render_water.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "render/render_water.hpp"

#include "cseries/cseries.hpp"

REFERENCE_DECLARE(0x019146EE, bool, render_water_enabled);
REFERENCE_DECLARE(0x019146F1, bool, render_water_tessellation_enabled);
REFERENCE_DECLARE(0x019146F2, bool, render_water_interaction_enabled);
REFERENCE_DECLARE(0x050FAB18, bool, render_water_wireframe_enabled);

7 changes: 7 additions & 0 deletions game/source/render/render_water.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

extern bool& render_water_enabled;
extern bool& render_water_tessellation_enabled;
extern bool& render_water_interaction_enabled;
extern bool& render_water_wireframe_enabled;

0 comments on commit 287a470

Please sign in to comment.