diff --git a/common/include/editor/editor.h b/common/include/editor/editor.h index dbc2df6ac..407b8971f 100644 --- a/common/include/editor/editor.h +++ b/common/include/editor/editor.h @@ -31,7 +31,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ui.h" #include "fmtcheck.h" -#ifdef __cplusplus #include "fwd-window.h" #include "fwd-segment.h" #include "objnum.h" @@ -558,5 +557,3 @@ extern void close_all_windows(void); // Amount to stretch a texture map by. // The two different ones are for the two dimensions of a texture map. extern fix Stretch_scale_x, Stretch_scale_y; - -#endif diff --git a/common/include/editor/texpage.h b/common/include/editor/texpage.h index 01d0cdb2a..5c4371504 100644 --- a/common/include/editor/texpage.h +++ b/common/include/editor/texpage.h @@ -28,8 +28,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ui.h" -#ifdef __cplusplus #include "fwd-event.h" +#include "fwd-segment.h" extern int TextureLights; extern int TextureEffects; @@ -45,5 +45,3 @@ void texpage_close(); int texpage_do(const d_event &event); #endif - -#endif diff --git a/common/main/automap.h b/common/main/automap.h index bc300d44c..bfd26c7d9 100644 --- a/common/main/automap.h +++ b/common/main/automap.h @@ -27,7 +27,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "pstypes.h" -#ifdef __cplusplus #include #include "fwd-segment.h" #include "dxxsconf.h" @@ -42,7 +41,6 @@ namespace dsx { void do_automap(); void automap_clear_visited(d_level_unique_automap_state &LevelUniqueAutomapState); } -#endif #if defined(DXX_BUILD_DESCENT_II) #include "object.h" @@ -50,6 +48,7 @@ void automap_clear_visited(d_level_unique_automap_state &LevelUniqueAutomapState #include "d_array.h" #include "d_range.h" #include "fwd-event.h" +#include "fwd-game.h" #include "segment.h" namespace dsx { @@ -91,5 +90,4 @@ extern marker_message_text_t Marker_input; extern d_marker_state MarkerState; } #endif - #endif diff --git a/common/main/d_levelstate.h b/common/main/d_levelstate.h index 8831bcb26..03d20815d 100644 --- a/common/main/d_levelstate.h +++ b/common/main/d_levelstate.h @@ -10,6 +10,7 @@ #include "object.h" #include "morph.h" +#ifdef dsx namespace dcx { struct d_level_unique_morph_object_state @@ -58,3 +59,4 @@ struct d_level_unique_object_state extern d_level_unique_object_state LevelUniqueObjectState; } +#endif diff --git a/common/main/fwd-wall.h b/common/main/fwd-wall.h index 8bf073248..45bc63a3c 100644 --- a/common/main/fwd-wall.h +++ b/common/main/fwd-wall.h @@ -11,7 +11,6 @@ #include #include #include "piggy.h" -#include "maths.h" #include "textures.h" #include "fwd-object.h" #include "fwd-segment.h" diff --git a/common/main/fwd-weapon.h b/common/main/fwd-weapon.h index 2ac6b5cd7..8174c6c08 100644 --- a/common/main/fwd-weapon.h +++ b/common/main/fwd-weapon.h @@ -25,7 +25,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #pragma once -#ifdef __cplusplus #include "pack.h" #include "pstypes.h" #include "maths.h" @@ -36,13 +35,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "fwd-powerup.h" +#ifdef dsx #if defined(DXX_BUILD_DESCENT_II) #define LASER_HELIX_MASK 7 // must match number of bits in flags #define MAX_SUPER_LASER_LEVEL laser_level::_6 // Note, laser levels are numbered from 0. #endif -#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II) - struct PHYSFS_File; #if 0 void weapon_info_write(PHYSFS_File *, const weapon_info &); @@ -219,9 +217,7 @@ extern void smega_rock_stuff(void); extern void init_smega_detonates(void); #endif } -#endif -#ifdef dsx namespace dsx { void InitWeaponOrdering(); void CyclePrimary(player_info &); @@ -238,5 +234,3 @@ void DropCurrentWeapon(player_info &); void DropSecondaryWeapon(player_info &); } #endif - -#endif diff --git a/common/main/gauges.h b/common/main/gauges.h index 72c7d6ed9..4cc2b504b 100644 --- a/common/main/gauges.h +++ b/common/main/gauges.h @@ -31,6 +31,7 @@ struct bitmap_index; #include "fwd-object.h" #include "kconfig.h" +#include "game.h" //from gauges.c diff --git a/common/main/kmatrix.h b/common/main/kmatrix.h index 472b1c70e..fb6cf7786 100644 --- a/common/main/kmatrix.h +++ b/common/main/kmatrix.h @@ -47,7 +47,10 @@ enum class kmatrix_network : uint8_t } #ifdef dsx +#include "kconfig.h" + namespace dsx { + kmatrix_result kmatrix_view(kmatrix_network network, control_info &Controls); // shows matrix screen. Retruns 0 if aborted (quitting game) and 1 if proceeding to next level if applicable. kmatrix_result multi_endlevel_score(); } diff --git a/common/main/newdemo.h b/common/main/newdemo.h index 3e539c598..76a24a0cf 100644 --- a/common/main/newdemo.h +++ b/common/main/newdemo.h @@ -128,9 +128,9 @@ void newdemo_record_multi_score(unsigned pnum, int score); extern void newdemo_record_primary_ammo(int new_ammo); extern void newdemo_record_secondary_ammo(int new_ammo); void newdemo_record_door_opening(segnum_t segnum, int side); -void newdemo_record_laser_level(laser_level old_level, laser_level new_level); #ifdef dsx +void newdemo_record_laser_level(laser_level old_level, laser_level new_level); namespace dsx { #if defined(DXX_BUILD_DESCENT_II) void newdemo_record_player_afterburner(fix afterburner); diff --git a/common/main/piggy.h b/common/main/piggy.h index f3669e7ba..4f9440a99 100644 --- a/common/main/piggy.h +++ b/common/main/piggy.h @@ -32,7 +32,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "fwd-partial_range.h" #include "dxxsconf.h" #include "dsx-ns.h" -#include #ifdef dsx namespace dsx { @@ -114,7 +113,6 @@ constexpr std::integral_constant MAX_BITMAP_FILES{}; #define MAX_SOUND_FILES MAX_SOUNDS -#ifdef dsx namespace dsx { extern void piggy_bitmap_page_in( bitmap_index bmp ); void piggy_bitmap_page_out_all(); @@ -129,10 +127,7 @@ static inline void _piggy_page_in(bitmap_index bmp) { piggy_bitmap_page_in( bmp ); } } -} -#endif -namespace dsx { #if defined(DXX_BUILD_DESCENT_I) void piggy_read_sounds(int pc_shareware); #elif defined(DXX_BUILD_DESCENT_II) diff --git a/common/main/sounds.h b/common/main/sounds.h index e35cbee6a..b4e615439 100644 --- a/common/main/sounds.h +++ b/common/main/sounds.h @@ -28,6 +28,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define _SOUNDS_H #include +#include +#include +#include "dsx-ns.h" #ifdef dsx #if defined(DXX_BUILD_DESCENT_I)