diff --git a/src/achievement.cpp b/src/achievement.cpp index 912e778ce7664..7c8462835a61f 100644 --- a/src/achievement.cpp +++ b/src/achievement.cpp @@ -1,7 +1,7 @@ #include "achievement.h" #include -#include +#include #include #include #include @@ -14,19 +14,15 @@ #include "enums.h" #include "event.h" #include "event_statistics.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "json.h" -#include "json_error.h" #include "past_achievements_info.h" #include "stats_tracker.h" #include "string_formatter.h" #include "translations.h" -template struct enum_traits; - static const achievement_id achievement_achievement_arcade_mode( "achievement_arcade_mode" ); // Some details about how achievements work diff --git a/src/achievement.h b/src/achievement.h index 6beae2c14c94c..132f48b6ff6e0 100644 --- a/src/achievement.h +++ b/src/achievement.h @@ -23,15 +23,10 @@ class JsonObject; class JsonOut; class achievements_tracker; -struct achievement_requirement; -template struct enum_traits; - -namespace cata -{ -class event; -} // namespace cata class requirement_watcher; class stats_tracker; +struct achievement_requirement; +template struct enum_traits; enum class achievement_comparison : int { equal, diff --git a/src/action.cpp b/src/action.cpp index f32ae76a924ac..844d47d9a2d4a 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -13,6 +14,7 @@ #include "cached_options.h" // IWYU pragma: keep #include "cata_utility.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" @@ -26,6 +28,7 @@ #include "item_location.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "memory_fast.h" #include "messages.h" diff --git a/src/action.h b/src/action.h index 703fdad44a47f..cc4a2c39610ba 100644 --- a/src/action.h +++ b/src/action.h @@ -7,9 +7,11 @@ #include #include #include +#include #include #include "coords_fwd.h" +#include "point.h" class input_context; struct input_event; diff --git a/src/active_item_cache.h b/src/active_item_cache.h index 53112979a2366..79916033ea5e2 100644 --- a/src/active_item_cache.h +++ b/src/active_item_cache.h @@ -8,6 +8,7 @@ #include #include "coordinates.h" +#include "point.h" #include "safe_reference.h" class item; diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 275d365d223dc..a85d564e53539 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -15,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -27,6 +25,7 @@ #include "avatar.h" #include "avatar_action.h" #include "bodypart.h" +#include "cached_options.h" #include "calendar.h" #include "cata_assert.h" #include "cata_utility.h" @@ -44,14 +43,13 @@ #include "event.h" #include "event_bus.h" #include "faction.h" -#include "field_type.h" #include "fault.h" +#include "field_type.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" -#include "game_inventory.h" #include "gates.h" #include "gun_mode.h" #include "handle_liquid.h" @@ -67,20 +65,21 @@ #include "iuse_actor.h" #include "json.h" #include "json_error.h" -#include "line.h" #include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" #include "martialarts.h" +#include "memory_fast.h" #include "messages.h" #include "monster.h" -#include "morale_types.h" #include "mtype.h" #include "npc.h" #include "options.h" #include "output.h" +#include "overmap_ui.h" #include "pickup.h" #include "pimpl.h" #include "player_activity.h" @@ -92,14 +91,15 @@ #include "requirements.h" #include "ret_val.h" #include "rng.h" +#include "safe_reference.h" #include "shearing.h" #include "skill.h" #include "sounds.h" #include "string_formatter.h" #include "translation.h" #include "translations.h" -#include "trap.h" #include "try_parse_integer.h" +#include "type_id.h" #include "ui.h" #include "uistate.h" #include "units.h" diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 1befe8def8852..11cdfc2818d21 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -15,11 +14,10 @@ #include #include #include +#include #include #include "activity_actor.h" -#include "activity_type.h" -#include "advanced_inv.h" #include "avatar.h" #include "avatar_action.h" #include "bionics.h" @@ -32,7 +30,6 @@ #include "character_id.h" #include "character_martial_arts.h" #include "clzones.h" -#include "colony.h" #include "color.h" #include "construction.h" #include "coordinates.h" @@ -40,11 +37,11 @@ #include "creature_tracker.h" #include "cuboid_rectangle.h" #include "debug.h" +#include "effect_on_condition.h" #include "enums.h" #include "event.h" #include "event_bus.h" #include "fault.h" -#include "field_type.h" #include "flag.h" #include "flexbuffer_json-inl.h" #include "game.h" @@ -58,33 +55,33 @@ #include "item.h" #include "item_factory.h" #include "item_location.h" -#include "item_stack.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" -#include "line.h" #include "magic.h" +#include "magic_type.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "martialarts.h" +#include "memory_fast.h" #include "messages.h" #include "mongroup.h" #include "monster.h" #include "mtype.h" #include "npc.h" +#include "npc_opinion.h" #include "omdata.h" #include "output.h" #include "overmap.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" #include "pocket_type.h" #include "point.h" #include "proficiency.h" -#include "recipe.h" -#include "recipe_dictionary.h" #include "requirements.h" #include "ret_val.h" #include "rng.h" @@ -104,8 +101,6 @@ #include "weakpoint.h" #include "weather.h" -enum class creature_size : int; - #define dbg(x) DebugLog((x),D_GAME) << __FILE__ << ":" << __LINE__ << ": " static const activity_id ACT_ARMOR_LAYERS( "ACT_ARMOR_LAYERS" ); diff --git a/src/activity_handlers.h b/src/activity_handlers.h index 82a9e377d11cd..941d4b2ca88ab 100644 --- a/src/activity_handlers.h +++ b/src/activity_handlers.h @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "coords_fwd.h" diff --git a/src/activity_item_handling.cpp b/src/activity_item_handling.cpp index 8956b8d5aeec7..9c23f98a064e4 100644 --- a/src/activity_item_handling.cpp +++ b/src/activity_item_handling.cpp @@ -10,18 +10,18 @@ #include #include #include +#include #include #include #include "activity_actor_definitions.h" -#include "activity_type.h" #include "avatar.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" #include "clzones.h" -#include "colony.h" #include "construction.h" +#include "coordinates.h" #include "craft_command.h" #include "creature.h" #include "creature_tracker.h" @@ -45,6 +45,7 @@ #include "itype.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" #include "messages.h" @@ -75,6 +76,7 @@ #include "weather.h" struct use_function; +using item_filter = std::function; static const activity_id ACT_BUILD( "ACT_BUILD" ); static const activity_id ACT_BUTCHER_FULL( "ACT_BUTCHER_FULL" ); diff --git a/src/activity_type.cpp b/src/activity_type.cpp index fb39e19f977ae..d7d0c26b570ed 100644 --- a/src/activity_type.cpp +++ b/src/activity_type.cpp @@ -1,6 +1,7 @@ #include "activity_type.h" #include +#include #include #include #include @@ -10,10 +11,10 @@ #include "activity_handlers.h" #include "assign.h" #include "debug.h" -#include "flexbuffer_json-inl.h" +#include "enums.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json_error.h" #include "sounds.h" #include "string_formatter.h" #include "translations.h" diff --git a/src/activity_type.h b/src/activity_type.h index 26fcd334708ea..29fc910f7eab3 100644 --- a/src/activity_type.h +++ b/src/activity_type.h @@ -5,7 +5,6 @@ #include #include -#include "enums.h" #include "game_constants.h" #include "translation.h" #include "type_id.h" @@ -14,10 +13,9 @@ class Character; class JsonObject; class activity_type; class player_activity; +enum class distraction_type : int; template struct enum_traits; -using activity_id = string_id; - /** @relates string_id */ template<> const activity_type &string_id::obj() const; diff --git a/src/addiction.cpp b/src/addiction.cpp index 69a8a4c563489..352b6f1f7ea27 100644 --- a/src/addiction.cpp +++ b/src/addiction.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -17,14 +16,13 @@ #include "effect_on_condition.h" #include "enums.h" #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "rng.h" #include "talker.h" #include "text_snippets.h" +class JsonObject; + static const efftype_id effect_hallu( "hallu" ); static const efftype_id effect_shakes( "shakes" ); diff --git a/src/addiction.h b/src/addiction.h index 938f48c115e28..fe0718b119a60 100644 --- a/src/addiction.h +++ b/src/addiction.h @@ -10,10 +10,11 @@ #include "translation.h" #include "type_id.h" -class Character; class JsonObject; class JsonOut; +class Character; + struct add_type { private: translation _type_name; diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp index bf3d9e9ccd60a..b3d0a5e522562 100644 --- a/src/advanced_inv.cpp +++ b/src/advanced_inv.cpp @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -18,7 +18,6 @@ #include #include "activity_actor_definitions.h" -#include "activity_type.h" #include "advanced_inv_listitem.h" #include "advanced_inv_pagination.h" #include "auto_pickup.h" @@ -35,10 +34,8 @@ #include "enums.h" #include "game.h" #include "game_constants.h" -#include "imgui/imgui.h" #include "input.h" #include "input_context.h" -#include "input_enums.h" #include "inventory.h" #include "inventory_ui.h" #include "item.h" @@ -54,7 +51,6 @@ #include "pimpl.h" #include "player_activity.h" #include "point.h" -#include "popup.h" #include "ret_val.h" #include "string_formatter.h" #include "string_input_popup.h" diff --git a/src/advanced_inv_area.cpp b/src/advanced_inv_area.cpp index d2cac905e437e..55a82216b949c 100644 --- a/src/advanced_inv_area.cpp +++ b/src/advanced_inv_area.cpp @@ -1,5 +1,7 @@ #include "advanced_inv_area.h" +#include +#include #include #include #include diff --git a/src/advanced_inv_area.h b/src/advanced_inv_area.h index c6d0968e09370..bff2e4e048139 100644 --- a/src/advanced_inv_area.h +++ b/src/advanced_inv_area.h @@ -6,6 +6,7 @@ #include #include +#include "coordinates.h" #include "item_location.h" #include "point.h" #include "units.h" diff --git a/src/advanced_inv_listitem.h b/src/advanced_inv_listitem.h index b3fd7c48fa9cc..6174d74a4c1f8 100644 --- a/src/advanced_inv_listitem.h +++ b/src/advanced_inv_listitem.h @@ -10,7 +10,6 @@ #include "units.h" class item_category; - enum aim_location : char; /** diff --git a/src/advanced_inv_pagination.cpp b/src/advanced_inv_pagination.cpp index 89509ff61d4c3..bcf2b81deb92d 100644 --- a/src/advanced_inv_pagination.cpp +++ b/src/advanced_inv_pagination.cpp @@ -1,12 +1,10 @@ #include "advanced_inv_pagination.h" -#include #include +#include "advanced_inv_listitem.h" #include "advanced_inv_pane.h" -class item_category; - void advanced_inventory_pagination::reset_page() { line = 0; diff --git a/src/advanced_inv_pane.cpp b/src/advanced_inv_pane.cpp index a2300a371efb1..3cd43b6fd50e6 100644 --- a/src/advanced_inv_pane.cpp +++ b/src/advanced_inv_pane.cpp @@ -1,10 +1,9 @@ #include "advanced_inv_pane.h" #include -#include #include -#include #include +#include #include #include "advanced_inv_area.h" @@ -13,6 +12,7 @@ #include "cata_assert.h" #include "character.h" #include "character_attire.h" +#include "coordinates.h" #include "flag.h" #include "item.h" #include "item_search.h" @@ -21,6 +21,7 @@ #include "map_selector.h" #include "options.h" #include "pocket_type.h" +#include "point.h" #include "type_id.h" #include "uistate.h" #include "units.h" diff --git a/src/advanced_inv_pane.h b/src/advanced_inv_pane.h index ee6f74e9c038a..5d4f9b4ee6b77 100644 --- a/src/advanced_inv_pane.h +++ b/src/advanced_inv_pane.h @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -17,8 +16,6 @@ class item; struct advanced_inv_pane_save_state; -enum aim_location : char; - enum advanced_inv_sortby { SORTBY_NONE, SORTBY_NAME, diff --git a/src/ammo.cpp b/src/ammo.cpp index 6152e91180a1e..7eddb208efcbd 100644 --- a/src/ammo.cpp +++ b/src/ammo.cpp @@ -1,14 +1,14 @@ #include "ammo.h" +#include #include #include #include #include "debug.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "item.h" -#include "json_error.h" #include "type_id.h" namespace diff --git a/src/ammo_effect.cpp b/src/ammo_effect.cpp index ff0a1887d80b8..7ef8060776909 100644 --- a/src/ammo_effect.cpp +++ b/src/ammo_effect.cpp @@ -1,12 +1,9 @@ #include "ammo_effect.h" -#include - #include "debug.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" generic_factory &get_all_ammo_effects() { diff --git a/src/anatomy.cpp b/src/anatomy.cpp index a64e01d017d9d..3136fe6740d26 100644 --- a/src/anatomy.cpp +++ b/src/anatomy.cpp @@ -1,9 +1,6 @@ #include "anatomy.h" -#include #include -#include -#include #include #include @@ -13,10 +10,7 @@ #include "debug.h" #include "flag.h" #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "messages.h" #include "output.h" #include "rng.h" diff --git a/src/anatomy.h b/src/anatomy.h index 7b6dfc7b6acd9..0ae5d220f6991 100644 --- a/src/anatomy.h +++ b/src/anatomy.h @@ -12,9 +12,8 @@ class Creature; class JsonObject; -class anatomy; -using anatomy_id = string_id; + /** * A structure that contains body parts. diff --git a/src/animation.cpp b/src/animation.cpp index d804a06facb98..52b0bf5ec7eae 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -1,8 +1,11 @@ #include "animation.h" +#include + #include "avatar.h" #include "cached_options.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "cursesdef.h" @@ -24,6 +27,7 @@ #include "units_fwd.h" #include "viewer.h" #include "weather.h" +#include "weather_type.h" #if defined(TILES) #include "cata_tiles.h" // all animation functions will be pushed out to a cata_tiles function in some manner @@ -32,14 +36,11 @@ #include #include -#include -#include -#include #include #include #include +#include #include -#include #include #include diff --git a/src/armor_layers.cpp b/src/armor_layers.cpp index 6c53a2bf979a5..fca550da41efe 100644 --- a/src/armor_layers.cpp +++ b/src/armor_layers.cpp @@ -1,8 +1,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -10,13 +12,13 @@ #include #include -#include "activity_type.h" #include "body_part_set.h" #include "bodypart.h" #include "catacharset.h" #include "character.h" #include "character_attire.h" #include "color.h" +#include "coordinates.h" #include "creature.h" #include "cursesdef.h" #include "damage.h" @@ -30,13 +32,11 @@ #include "item.h" #include "item_location.h" #include "itype.h" -#include "line.h" #include "output.h" #include "pimpl.h" #include "player_activity.h" #include "point.h" #include "string_formatter.h" -#include "subbodypart.h" #include "translation.h" #include "translations.h" #include "type_id.h" diff --git a/src/ascii_art.cpp b/src/ascii_art.cpp index 0021d4295820a..8c7bf493c71bf 100644 --- a/src/ascii_art.cpp +++ b/src/ascii_art.cpp @@ -1,15 +1,12 @@ #include "ascii_art.h" -#include #include #include "assign.h" #include "catacharset.h" #include "debug.h" -#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "output.h" static const int ascii_art_width = 41; diff --git a/src/assign.cpp b/src/assign.cpp index bc685a2bde86f..a488c2b21d3ee 100644 --- a/src/assign.cpp +++ b/src/assign.cpp @@ -1,6 +1,5 @@ #include "assign.h" -#include #include #include diff --git a/src/assign.h b/src/assign.h index c658c709df3a6..2276d276719d7 100644 --- a/src/assign.h +++ b/src/assign.h @@ -2,7 +2,6 @@ #ifndef CATA_SRC_ASSIGN_H #define CATA_SRC_ASSIGN_H -#include #include #include #include @@ -14,8 +13,8 @@ #include "calendar.h" #include "damage.h" #include "flat_set.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "type_id.h" #include "units.h" diff --git a/src/auto_note.cpp b/src/auto_note.cpp index cc0a913171621..e26dc716ae056 100644 --- a/src/auto_note.cpp +++ b/src/auto_note.cpp @@ -1,17 +1,17 @@ #include "auto_note.h" #include +#include #include -#include +#include #include -#include #include "cata_utility.h" #include "color.h" #include "cursesdef.h" #include "filesystem.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "input_context.h" #include "input_popup.h" diff --git a/src/auto_pickup.cpp b/src/auto_pickup.cpp index 4d2351c09610c..a0ada90170a64 100644 --- a/src/auto_pickup.cpp +++ b/src/auto_pickup.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -14,12 +15,13 @@ #include "cata_utility.h" #include "character.h" #include "color.h" +#include "coordinates.h" #include "cursesdef.h" #include "filesystem.h" #include "flag.h" #include "flat_set.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input_context.h" #include "input_popup.h" #include "item.h" diff --git a/src/auto_pickup.h b/src/auto_pickup.h index eb86d622fc52f..cdb0389cb3c82 100644 --- a/src/auto_pickup.h +++ b/src/auto_pickup.h @@ -2,23 +2,23 @@ #ifndef CATA_SRC_AUTO_PICKUP_H #define CATA_SRC_AUTO_PICKUP_H -#include #include #include +#include #include #include #include +#include "coords_fwd.h" #include "enums.h" +#include "item_location.h" #include "item_stack.h" class JsonArray; class JsonObject; class JsonOut; class item; -class item_location; struct itype; -struct tripoint; namespace auto_pickup { diff --git a/src/avatar.cpp b/src/avatar.cpp index 473e99f365368..52bb94d77be37 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -34,9 +34,8 @@ #include "event.h" #include "event_bus.h" #include "faction.h" -#include "field_type.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "game_inventory.h" @@ -47,41 +46,36 @@ #include "itype.h" #include "iuse.h" #include "json.h" -#include "line.h" #include "map.h" #include "map_memory.h" -#include "mapdata.h" +#include "map_scale_constants.h" #include "martialarts.h" #include "messages.h" #include "mission.h" #include "move_mode.h" -#include "mutation.h" #include "npc.h" +#include "npc_opinion.h" #include "output.h" -#include "overmap.h" #include "overmapbuffer.h" #include "pathfinding.h" #include "pimpl.h" +#include "point.h" #include "profession.h" #include "ranged.h" #include "recipe.h" #include "ret_val.h" #include "rng.h" -#include "scenario.h" #include "skill.h" -#include "sleep.h" #include "stomach.h" #include "string_formatter.h" #include "talker.h" #include "talker_avatar.h" #include "timed_event.h" #include "translations.h" -#include "trap.h" #include "type_id.h" #include "ui.h" #include "units.h" #include "value_ptr.h" -#include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/avatar.h b/src/avatar.h index de4aa64ca3536..e415d3d281443 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -17,39 +17,34 @@ #include "calendar.h" #include "character.h" #include "character_id.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "enums.h" #include "game_constants.h" #include "item.h" +#include "item_location.h" #include "magic_teleporter_list.h" #include "mdarray.h" -#include "point.h" +#include "memory_fast.h" #include "type_id.h" #include "units.h" +class JsonObject; +class JsonOut; class advanced_inv_area; class advanced_inv_listitem; class advanced_inventory_pane; class cata_path; class diary; -class faction; -class item_location; -class JsonObject; -class JsonOut; class map_memory; class memorized_tile; class mission; class monster; -class nc_color; class npc; class talker; struct bionic; struct mtype; +struct tripoint; -namespace catacurses -{ -class window; -} // namespace catacurses namespace debug_menu { class mission_debug; diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index b718ce97601ae..3a1b057faca85 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "math_defines.h" #include "messages.h" @@ -50,6 +52,7 @@ #include "output.h" #include "pimpl.h" #include "player_activity.h" +#include "point.h" #include "projectile.h" #include "ranged.h" #include "ret_val.h" diff --git a/src/avatar_action.h b/src/avatar_action.h index 414b7712df831..e132483410b95 100644 --- a/src/avatar_action.h +++ b/src/avatar_action.h @@ -6,9 +6,8 @@ #include #include -#include "activity_type.h" #include "coordinates.h" -#include "point.h" +#include "type_id.h" class Character; class avatar; diff --git a/src/ballistics.cpp b/src/ballistics.cpp index f74fdb7b25d72..90bbf08b621dc 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -2,14 +2,15 @@ #include #include +#include #include #include #include #include #include -#include "calendar.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" @@ -23,6 +24,7 @@ #include "line.h" #include "make_static.h" #include "map.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "messages.h" #include "monster.h" @@ -30,6 +32,7 @@ #include "options.h" #include "point.h" #include "projectile.h" +#include "ranged.h" #include "rng.h" #include "sounds.h" #include "translations.h" diff --git a/src/ballistics.h b/src/ballistics.h index e4da7a63b7a0a..64d9aaf8f44c8 100644 --- a/src/ballistics.h +++ b/src/ballistics.h @@ -9,6 +9,7 @@ #include #include +#include "coords_fwd.h" #include "weakpoint.h" #include "weighted_list.h" @@ -17,7 +18,6 @@ class dispersion_sources; class vehicle; struct dealt_projectile_attack; struct projectile; -struct tripoint; /** Aim result for a single projectile attack */ struct projectile_attack_aim { diff --git a/src/basecamp.cpp b/src/basecamp.cpp index 456dd80452b13..b4e188655df2b 100644 --- a/src/basecamp.cpp +++ b/src/basecamp.cpp @@ -1,6 +1,8 @@ #include "basecamp.h" #include +#include +#include #include #include #include @@ -19,6 +21,7 @@ #include "clzones.h" #include "color.h" #include "debug.h" +#include "event.h" #include "event_bus.h" #include "faction.h" #include "faction_camp.h" @@ -28,13 +31,13 @@ #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "messages.h" #include "npc.h" #include "output.h" #include "overmap.h" #include "overmapbuffer.h" -#include "pimpl.h" #include "recipe.h" #include "recipe_dictionary.h" #include "recipe_groups.h" diff --git a/src/basecamp.h b/src/basecamp.h index b35a539241da0..9b12f5010d6cb 100644 --- a/src/basecamp.h +++ b/src/basecamp.h @@ -2,9 +2,7 @@ #ifndef CATA_SRC_BASECAMP_H #define CATA_SRC_BASECAMP_H -#include #include -#include #include #include #include @@ -12,16 +10,21 @@ #include #include #include +#include #include +#include #include -#include "coords_fwd.h" +#include "calendar.h" +#include "coordinates.h" #include "craft_command.h" #include "game_constants.h" #include "game_inventory.h" #include "inventory.h" +#include "item.h" #include "map.h" #include "mapgendata.h" +#include "memory_fast.h" #include "mission_companion.h" #include "point.h" #include "requirements.h" @@ -36,15 +39,10 @@ class JsonOut; class basecamp; class character_id; class faction; -class item; class npc; class recipe; -class time_duration; -class zone_data; -struct MonsterGroupResult; enum class farm_ops; - -using faction_id = string_id; +struct MonsterGroupResult; const int work_day_hours = 10; const int work_day_rest_hours = 8; diff --git a/src/behavior.cpp b/src/behavior.cpp index 9932eb0b4301f..d081cebb0225a 100644 --- a/src/behavior.cpp +++ b/src/behavior.cpp @@ -1,7 +1,6 @@ #include "behavior.h" #include -#include #include #include @@ -9,11 +8,9 @@ #include "behavior_strategy.h" #include "cata_assert.h" #include "debug.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" using namespace behavior; diff --git a/src/behavior_oracle.cpp b/src/behavior_oracle.cpp index 77048331d9fe5..def199b2bbf9f 100644 --- a/src/behavior_oracle.cpp +++ b/src/behavior_oracle.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "behavior.h" #include "character_oracle.h" diff --git a/src/behavior_strategy.cpp b/src/behavior_strategy.cpp index 1b38b92eca6a0..a94d661a3080a 100644 --- a/src/behavior_strategy.cpp +++ b/src/behavior_strategy.cpp @@ -1,6 +1,7 @@ #include "behavior_strategy.h" #include +#include #include "behavior.h" diff --git a/src/behavior_strategy.h b/src/behavior_strategy.h index a7472cea8a3ce..b7ed6d5060dc2 100644 --- a/src/behavior_strategy.h +++ b/src/behavior_strategy.h @@ -11,8 +11,6 @@ namespace behavior class node_t; class oracle_t; - -enum class status_t : char; struct behavior_return; class strategy_t diff --git a/src/bionics.cpp b/src/bionics.cpp index de77a9449e9a4..2dfba63e81dbf 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -3,9 +3,10 @@ #include #include #include -#include #include +#include #include +#include #include #include #include @@ -17,7 +18,6 @@ #include "action.h" #include "activity_actor_definitions.h" -#include "activity_type.h" #include "assign.h" #include "avatar.h" #include "avatar_action.h" @@ -28,7 +28,6 @@ #include "character.h" #include "character_attire.h" #include "character_martial_arts.h" -#include "colony.h" #include "color.h" #include "condition.h" #include "coordinates.h" @@ -45,20 +44,17 @@ #include "explosion.h" #include "field_type.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "generic_factory.h" #include "global_vars.h" #include "handle_liquid.h" -#include "init.h" #include "inventory.h" #include "item.h" #include "item_location.h" #include "itype.h" #include "json.h" -#include "json_error.h" -#include "line.h" #include "magic_enchantment.h" #include "make_static.h" #include "map.h" @@ -71,6 +67,7 @@ #include "npc.h" #include "options.h" #include "output.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" diff --git a/src/bionics.h b/src/bionics.h index 8718ee7bf054f..21de736cdbf22 100644 --- a/src/bionics.h +++ b/src/bionics.h @@ -18,7 +18,6 @@ #include "flat_set.h" #include "item.h" #include "magic.h" -#include "npc.h" #include "translation.h" #include "type_id.h" #include "units.h" @@ -28,8 +27,6 @@ class Character; class JsonObject; class JsonOut; -enum class character_stat : char; - struct bionic_data { bionic_data(); diff --git a/src/bionics_ui.cpp b/src/bionics_ui.cpp index 5dced78d52090..855b525fefae5 100644 --- a/src/bionics_ui.cpp +++ b/src/bionics_ui.cpp @@ -1,11 +1,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -30,7 +30,6 @@ #include "item_location.h" #include "localized_comparator.h" #include "make_static.h" -#include "npc.h" #include "options.h" #include "output.h" #include "pimpl.h" diff --git a/src/bodygraph.cpp b/src/bodygraph.cpp index 8ad5391977f2e..231adfe35ae5d 100644 --- a/src/bodygraph.cpp +++ b/src/bodygraph.cpp @@ -17,12 +17,10 @@ #include "damage.h" #include "debug.h" #include "enums.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "input_context.h" -#include "json_error.h" #include "make_static.h" #include "memory_fast.h" #include "output.h" diff --git a/src/bodypart.cpp b/src/bodypart.cpp index fd1580505624a..d1c118da83e70 100644 --- a/src/bodypart.cpp +++ b/src/bodypart.cpp @@ -1,6 +1,7 @@ #include "bodypart.h" #include +#include #include #include #include @@ -11,12 +12,10 @@ #include "body_part_set.h" #include "debug.h" #include "enum_conversions.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "json.h" -#include "json_error.h" #include "localized_comparator.h" #include "rng.h" #include "subbodypart.h" diff --git a/src/bodypart.h b/src/bodypart.h index 51c0c2510bf25..7121a387c7752 100644 --- a/src/bodypart.h +++ b/src/bodypart.h @@ -28,7 +28,6 @@ struct localized_comparator; template struct enum_traits; template class generic_factory; -using bodypart_str_id = string_id; using bodypart_id = int_id; extern const bodypart_str_id body_part_head; @@ -66,8 +65,6 @@ struct enum_traits { static constexpr body_part last = body_part::num_bp; }; -enum class side : int; - // Drench cache enum water_tolerance { WT_IGNORED = 0, diff --git a/src/bonuses.cpp b/src/bonuses.cpp index 7e2533ff5d369..2c8f187f4c08b 100644 --- a/src/bonuses.cpp +++ b/src/bonuses.cpp @@ -2,13 +2,12 @@ #include #include -#include #include #include "character.h" #include "damage.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "string_formatter.h" #include "translation.h" #include "translations.h" diff --git a/src/build_reqs.h b/src/build_reqs.h index 6b08bbf2a3b6e..d56389d61e097 100644 --- a/src/build_reqs.h +++ b/src/build_reqs.h @@ -39,7 +39,6 @@ struct parameterized_build_reqs { }; build_reqs get_build_reqs_for_furn_ter_ids( - const std::pair, std::map> &changed_ids, - ter_id const &base_ter = ter_str_id( "t_dirt" ).id() ); + const std::pair, std::map> &changed_ids ); #endif // CATA_SRC_BUILD_REQS_H diff --git a/src/butchery_requirements.cpp b/src/butchery_requirements.cpp index 5ec31384a32f0..34183143bbddd 100644 --- a/src/butchery_requirements.cpp +++ b/src/butchery_requirements.cpp @@ -1,18 +1,16 @@ #include "butchery_requirements.h" #include -#include -#include +#include #include #include "activity_handlers.h" #include "creature.h" #include "debug.h" #include "enum_conversions.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "item.h" #include "requirements.h" diff --git a/src/cata_algo.h b/src/cata_algo.h index 83887df64d30f..73a7613d61604 100644 --- a/src/cata_algo.h +++ b/src/cata_algo.h @@ -3,6 +3,7 @@ #define CATA_SRC_CATA_ALGO_H #include +#include #include #include #include diff --git a/src/cata_bitset.h b/src/cata_bitset.h index 6eeecd65a7a3f..933c8f750ca64 100644 --- a/src/cata_bitset.h +++ b/src/cata_bitset.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index 820bd0f410a19..7ce05d62fdc46 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -4,26 +4,45 @@ #include #include #include -#undef IMGUI_DEFINE_MATH_OPERATORS -#include +#include +#include +#include +#include +#include +#include +#include +#include +#undef IMGUI_DEFINE_MATH_OPERATORS +#include "cata_path.h" +#include "catacharset.h" #include "color.h" +#include "debug.h" +#include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input.h" +#include "input_context.h" +#include "input_enums.h" +#include "json_error.h" +#include "json_loader.h" +#include "options.h" #include "output.h" #include "path_info.h" +#include "point.h" #include "system_locale.h" +#include "translations.h" #include "ui_manager.h" -#include "input_context.h" static ImGuiKey cata_key_to_imgui( int cata_key ); #ifdef TUI -#include "wcwidth.h" #include #include #include #include "color_loader.h" +#include "wcwidth.h" struct RGBTuple { uint8_t Blue; @@ -229,13 +248,14 @@ RGBTuple color_loader::from_rgb( const int r, const int g, const int b return result; } #else -#include "sdl_utils.h" +#include +#include + +#include "font_loader.h" #include "sdl_font.h" +#include "sdl_utils.h" #include "sdltiles.h" -#include "font_loader.h" #include "wcwidth.h" -#include -#include ImVec4 cataimgui::imvec4_from_color( nc_color &color ) { diff --git a/src/cata_imgui.h b/src/cata_imgui.h index 936b6e43d7dd9..41677c781d851 100644 --- a/src/cata_imgui.h +++ b/src/cata_imgui.h @@ -1,14 +1,16 @@ #pragma once +#include +#include #include #include #include -#include #include - -#include "font_loader.h" +#include class nc_color; +struct font_config; struct input_event; + using ImGuiInputTextFlags = int; #if defined(IMTUI) || !(defined(WIN32) || defined(TILES)) @@ -16,17 +18,15 @@ using ImGuiInputTextFlags = int; #endif #ifndef TUI +#include "color_loader.h" #include "sdl_geometry.h" #include "sdl_wrappers.h" -#include "color_loader.h" #endif -#include "text.h" - -struct point; -struct ImVec2; -struct ImVec4; class Font; class input_context; +struct ImVec2; +struct ImVec4; +struct point; namespace cataimgui { diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index 6c97af7c941e1..44674a80d8f8e 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -1,78 +1,121 @@ #if defined(TILES) -#include "cata_tiles.h" #include #include #include +#include +#include #include #include +#include +#include +#include +#include #include +#include +#include +#include +#include #include #include +#include #include +#include +#include #include +#include +#include #include +#include +#include +#include #include "action.h" +#include "animation.h" #include "avatar.h" #include "cached_options.h" #include "calendar.h" #include "cata_assert.h" +#include "cata_path.h" +#include "cata_tiles.h" #include "cata_utility.h" #include "catacharset.h" #include "character.h" #include "character_id.h" #include "clzones.h" +#include "colony.h" #include "color.h" +#include "coordinates.h" +#include "creature.h" #include "creature_tracker.h" +#include "cuboid_rectangle.h" #include "cursesdef.h" #include "cursesport.h" #include "debug.h" +#include "dialogue.h" +#include "enum_conversions.h" +#include "enums.h" #include "field.h" #include "field_type.h" -#include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" #include "input.h" -#include "int_id.h" #include "item.h" #include "item_factory.h" #include "itype.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" +#include "level_cache.h" +#include "lightmap.h" +#include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_extras.h" #include "map_memory.h" +#include "map_scale_constants.h" #include "mapdata.h" +#include "maptile_fwd.h" +#include "mdarray.h" #include "mod_tileset.h" #include "monster.h" #include "monstergenerator.h" #include "mtype.h" #include "mutation.h" #include "npc.h" +#include "npc_attack.h" +#include "omdata.h" +#include "options.h" #include "output.h" #include "overlay_ordering.h" #include "overmap.h" #include "path_info.h" +#include "pimpl.h" #include "pixel_minimap.h" +#include "point.h" #include "rect_range.h" #include "scent_map.h" +#include "sdl_geometry.h" #include "sdl_utils.h" #include "sdl_wrappers.h" #include "sdltiles.h" #include "sounds.h" #include "string_formatter.h" -#include "string_id.h" #include "submap.h" #include "tileray.h" -#include "translations.h" +#include "translation.h" #include "trap.h" #include "type_id.h" +#include "units.h" #include "units_utility.h" +#include "value_ptr.h" #include "veh_type.h" #include "vehicle.h" +#include "viewer.h" #include "vpart_position.h" #include "weather.h" +#include "weather_type.h" #include "weighted_list.h" #define dbg(x) DebugLog((x),D_SDL) << __FILE__ << ":" << __LINE__ << ": " diff --git a/src/cata_tiles.h b/src/cata_tiles.h index 7b234d5dc8465..98318f1b0689c 100644 --- a/src/cata_tiles.h +++ b/src/cata_tiles.h @@ -2,39 +2,48 @@ #ifndef CATA_SRC_CATA_TILES_H #define CATA_SRC_CATA_TILES_H +#include +#include #include #include #include +#include #include +#include #include #include +#include #include #include #include "animation.h" -#include "cata_type_traits.h" +#include "calendar.h" +#include "coordinates.h" #include "creature.h" #include "cuboid_rectangle.h" -#include "enums.h" -#include "lightmap.h" -#include "line.h" -#include "map_memory.h" +#include "lightmap.h" // IWYU pragma: keep #include "mapdata.h" #include "options.h" #include "pimpl.h" #include "point.h" -#include "sdl_wrappers.h" #include "sdl_geometry.h" +#include "sdl_wrappers.h" #include "type_id.h" +#include "units.h" #include "weather.h" #include "weighted_list.h" class Character; class JsonObject; +class cata_path; +class memorized_tile; +class monster; +class nc_color; class pixel_minimap; +enum class direction : unsigned int; +enum class lit_level : int; extern void set_displaybuffer_rendertarget(); -using ter_str_id = string_id; /** Structures */ struct tile_type { @@ -291,6 +300,7 @@ class tileset_cache bool force, bool pump_events, bool terrain ); private: class loader; + std::unordered_map> tilesets_; }; diff --git a/src/cata_utility.cpp b/src/cata_utility.cpp index b3075445be4c2..406a77b2dbb16 100644 --- a/src/cata_utility.cpp +++ b/src/cata_utility.cpp @@ -5,15 +5,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/cata_utility.h b/src/cata_utility.h index 0dd57888b08ad..601040e7a1343 100644 --- a/src/cata_utility.h +++ b/src/cata_utility.h @@ -4,27 +4,27 @@ #include #include -#include #include +#include #include -#include +#include #include #include #include #include -#include #include #include // IWYU pragma: keep +#include #include #include #include #include #include "enums.h" -#include "path_info.h" class JsonOut; class JsonValue; +class cata_path; class translation; /** diff --git a/src/cata_variant.h b/src/cata_variant.h index a7ceffff435a8..7e6201d4dffc7 100644 --- a/src/cata_variant.h +++ b/src/cata_variant.h @@ -21,9 +21,8 @@ class JsonOut; class JsonValue; -template struct enum_traits; - enum class mutagen_technique : int; +template struct enum_traits; namespace debug_menu { diff --git a/src/catacharset.cpp b/src/catacharset.cpp index 03184dab307bc..9527b93bf10a0 100644 --- a/src/catacharset.cpp +++ b/src/catacharset.cpp @@ -1,18 +1,17 @@ #include "catacharset.h" -#include #include -#include +#include -#include "cata_assert.h" #include "output.h" #include "wcwidth.h" #if defined(_WIN32) #if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU -#include "platform_win.h" +#include "platform_win.h" // IWYU pragma: keep #endif -#include "mmsystem.h" +// IWYU pragma: no_include +#include #endif //copied from SDL2_ttf code diff --git a/src/character.cpp b/src/character.cpp index c01b860c4403e..186fcb958a538 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -19,6 +18,7 @@ #include "action.h" #include "activity_actor_definitions.h" #include "activity_handlers.h" +#include "addiction.h" #include "anatomy.h" #include "avatar.h" #include "avatar_action.h" @@ -30,13 +30,13 @@ #include "character_attire.h" #include "character_martial_arts.h" #include "city.h" -#include "colony.h" #include "color.h" #include "construction.h" #include "coordinates.h" #include "creature_tracker.h" #include "cursesdef.h" #include "debug.h" +#include "dialogue.h" #include "disease.h" #include "display.h" #include "effect.h" @@ -54,6 +54,7 @@ #include "fungal_effects.h" #include "game.h" #include "game_constants.h" +#include "game_inventory.h" #include "gun_mode.h" #include "handle_liquid.h" #include "input_context.h" @@ -74,9 +75,9 @@ #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" -#include "maptile_fwd.h" #include "martialarts.h" #include "math_defines.h" #include "memorial_logger.h" @@ -93,6 +94,7 @@ #include "output.h" #include "overlay_ordering.h" #include "overmap_types.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pathfinding.h" #include "profession.h" @@ -127,8 +129,7 @@ #include "weather.h" #include "weather_type.h" -class activity_actor; -struct dealt_projectile_attack; +using drop_locations = std::list; static const activity_id ACT_AUTODRIVE( "ACT_AUTODRIVE" ); static const activity_id ACT_CONSUME_DRINK_MENU( "ACT_CONSUME_DRINK_MENU" ); diff --git a/src/character.h b/src/character.h index f17cf4ecac946..a067c2b85fc62 100644 --- a/src/character.h +++ b/src/character.h @@ -10,20 +10,19 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include #include #include +#include "action.h" #include "activity_tracker.h" -#include "activity_type.h" -#include "addiction.h" #include "body_part_set.h" #include "bodypart.h" #include "calendar.h" @@ -32,7 +31,8 @@ #include "character_id.h" #include "city.h" // IWYU pragma: keep #include "compatibility.h" -#include "coords_fwd.h" +#include "coordinates.h" +#include "craft_command.h" #include "creature.h" #include "damage.h" #include "enums.h" @@ -41,12 +41,17 @@ #include "inventory.h" #include "item.h" #include "item_location.h" -#include "magic_enchantment.h" +#include "item_pocket.h" +#include "magic.h" +#include "memory_fast.h" +#include "monster.h" #include "pimpl.h" #include "player_activity.h" #include "pocket_type.h" #include "point.h" +#include "proficiency.h" #include "ranged.h" +#include "requirements.h" #include "ret_val.h" #include "safe_reference.h" #include "sleep.h" @@ -64,60 +69,47 @@ class JsonOut; class SkillLevel; class SkillLevelMap; class activity_actor; +class addiction; class basecamp; class bionic_collection; class character_martial_arts; -class craft_command; class dispersion_sources; class effect; -class effect_source; +class enchant_cache; class faction; -class item_pocket; -class known_magic; class ma_technique; class map; -class monster; -class nc_color; class player_morale; class profession; -class proficiency_set; class recipe; class recipe_subset; -class spell; class ui_adaptor; class vehicle; class vpart_reference; + namespace catacurses { class window; } // namespace catacurses +enum class recipe_filter_flags : int; +enum class steed_type : int; +enum npc_attitude : int; struct bionic; struct construction; struct dealt_projectile_attack; -struct display_proficiency; -struct field_immunity_data; /// @brief Item slot used to apply modifications from food and meds struct islot_comestible; -struct item_comp; struct itype; struct mutation_branch; struct mutation_category_trait; struct mutation_variant; struct pathfinding_settings; struct projectile; -struct requirement_data; -struct tool_comp; struct trait_and_var; struct trap; struct w_point; template struct enum_traits; -enum npc_attitude : int; -enum action_id : int; -enum class recipe_filter_flags : int; -enum class steed_type : int; -enum class proficiency_bonus_type : int; - using drop_location = std::pair; using drop_locations = std::list; diff --git a/src/character_ammo.cpp b/src/character_ammo.cpp index 0760907616e2b..edbbb3b1a2894 100644 --- a/src/character_ammo.cpp +++ b/src/character_ammo.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/src/character_armor.cpp b/src/character_armor.cpp index b68c42e9bc464..7d7b2983dc96d 100644 --- a/src/character_armor.cpp +++ b/src/character_armor.cpp @@ -10,6 +10,7 @@ #include "bodypart.h" #include "character.h" #include "character_attire.h" +#include "coordinates.h" #include "damage.h" #include "enums.h" #include "flag.h" @@ -23,7 +24,6 @@ #include "material.h" #include "memorial_logger.h" #include "mutation.h" -#include "npc.h" #include "output.h" #include "pimpl.h" #include "point.h" @@ -35,9 +35,6 @@ #include "units.h" #include "viewer.h" -struct weakpoint; -struct weakpoint_attack; - static const bionic_id bio_ads( "bio_ads" ); static const json_character_flag json_flag_SEESLEEP( "SEESLEEP" ); diff --git a/src/character_attire.cpp b/src/character_attire.cpp index 1d116992fd034..5d512fc8e090b 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -4,10 +4,10 @@ #include #include #include -#include #include #include #include +#include #include "avatar_action.h" #include "bodygraph.h" @@ -24,18 +24,15 @@ #include "event_bus.h" #include "fire.h" #include "flag.h" -#include "flat_set.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "inventory.h" #include "item_contents.h" #include "item_pocket.h" #include "itype.h" #include "json.h" -#include "json_error.h" #include "line.h" -#include "magic_enchantment.h" #include "make_static.h" #include "melee.h" #include "messages.h" diff --git a/src/character_attire.h b/src/character_attire.h index bc1de53091fb7..584b0ae0bad80 100644 --- a/src/character_attire.h +++ b/src/character_attire.h @@ -19,6 +19,7 @@ #include "color.h" #include "item.h" #include "item_location.h" +#include "item_pocket.h" #include "ret_val.h" #include "subbodypart.h" #include "type_id.h" @@ -32,7 +33,6 @@ class advanced_inv_area; class advanced_inv_listitem; class advanced_inventory_pane; class avatar; -class item_pocket; class npc; class player_morale; struct bodygraph_info; diff --git a/src/character_body.cpp b/src/character_body.cpp index 56bf0c9c4ad4c..2f1241b4eee25 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -17,6 +17,7 @@ #include "character.h" #include "character_attire.h" #include "color.h" +#include "coordinates.h" #include "creature.h" #include "display.h" #include "effect.h" @@ -49,7 +50,6 @@ #include "weather_gen.h" class item; -struct mutation_branch; static const bionic_id bio_sleep_shutdown( "bio_sleep_shutdown" ); diff --git a/src/character_crafting.cpp b/src/character_crafting.cpp index 34ea4e01e38f5..e97ca8eb6ed65 100644 --- a/src/character_crafting.cpp +++ b/src/character_crafting.cpp @@ -7,6 +7,7 @@ #include #include "cached_options.h" +#include "calendar.h" #include "character.h" #include "inventory.h" #include "item.h" diff --git a/src/character_escape.cpp b/src/character_escape.cpp index 95bc8de46b4db..de9ace7e91826 100644 --- a/src/character_escape.cpp +++ b/src/character_escape.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include "bodypart.h" @@ -7,6 +8,7 @@ #include "character.h" #include "character_attire.h" #include "character_martial_arts.h" +#include "coordinates.h" #include "creature_tracker.h" #include "damage.h" #include "debug.h" diff --git a/src/character_guns.cpp b/src/character_guns.cpp index b55a52cfb1fb3..89d869ecbae27 100644 --- a/src/character_guns.cpp +++ b/src/character_guns.cpp @@ -12,6 +12,7 @@ #include "activity_actor_definitions.h" #include "character.h" #include "color.h" +#include "coordinates.h" #include "debug.h" #include "enums.h" #include "flag.h" diff --git a/src/character_inventory.cpp b/src/character_inventory.cpp index 7ccaf27c76cf3..da54199d32ee3 100644 --- a/src/character_inventory.cpp +++ b/src/character_inventory.cpp @@ -1,8 +1,6 @@ #include -#include #include #include -#include #include #include #include @@ -19,6 +17,7 @@ #include "catacharset.h" #include "character.h" #include "character_attire.h" +#include "coordinates.h" #include "debug.h" #include "enums.h" #include "flag.h" @@ -30,19 +29,17 @@ #include "itype.h" #include "iuse.h" #include "iuse_actor.h" -#include "line.h" #include "map.h" #include "map_selector.h" #include "options.h" #include "pimpl.h" #include "pocket_type.h" -#include "point.h" #include "ret_val.h" #include "string_formatter.h" #include "translations.h" #include "type_id.h" #include "ui.h" -#include "units_fwd.h" +#include "units.h" #include "vehicle.h" #include "visitable.h" #include "vpart_position.h" diff --git a/src/character_martial_arts.cpp b/src/character_martial_arts.cpp index f498ad62cc1f8..7c3bd6ed02711 100644 --- a/src/character_martial_arts.cpp +++ b/src/character_martial_arts.cpp @@ -1,15 +1,14 @@ #include "character_martial_arts.h" -#include +#include #include "action.h" #include "character.h" #include "color.h" #include "enums.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "json.h" -#include "json_error.h" #include "martialarts.h" #include "messages.h" #include "output.h" diff --git a/src/character_martial_arts.h b/src/character_martial_arts.h index 95f36598e6151..d411f4423224e 100644 --- a/src/character_martial_arts.h +++ b/src/character_martial_arts.h @@ -2,9 +2,12 @@ #ifndef CATA_SRC_CHARACTER_MARTIAL_ARTS_H #define CATA_SRC_CHARACTER_MARTIAL_ARTS_H +#include #include +#include #include +#include "damage.h" #include "martialarts.h" #include "type_id.h" diff --git a/src/character_modifier.cpp b/src/character_modifier.cpp index 937425bf74c0a..0cd655e82057a 100644 --- a/src/character_modifier.cpp +++ b/src/character_modifier.cpp @@ -2,21 +2,20 @@ #include #include +#include #include #include -#include +#include #include "character.h" #include "debug.h" #include "effect.h" #include "enum_conversions.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "messages.h" #include "move_mode.h" #include "output.h" diff --git a/src/character_morale.cpp b/src/character_morale.cpp index 0e4a545e742a8..573834c31ee13 100644 --- a/src/character_morale.cpp +++ b/src/character_morale.cpp @@ -18,6 +18,7 @@ #include "messages.h" #include "morale.h" #include "pimpl.h" +#include "point.h" #include "type_id.h" #include "units.h" diff --git a/src/character_oracle.cpp b/src/character_oracle.cpp index cf0a8928ce806..feb4313d906a4 100644 --- a/src/character_oracle.cpp +++ b/src/character_oracle.cpp @@ -1,5 +1,6 @@ #include "character_oracle.h" +#include #include #include diff --git a/src/character_proficiency.cpp b/src/character_proficiency.cpp index d159c6b9223cb..1b59ab37011b0 100644 --- a/src/character_proficiency.cpp +++ b/src/character_proficiency.cpp @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/src/city.cpp b/src/city.cpp index fdb4c4298737f..0a734c744764b 100644 --- a/src/city.cpp +++ b/src/city.cpp @@ -2,16 +2,12 @@ #include #include -#include #include #include "coordinates.h" #include "debug.h" #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "options.h" #include "rng.h" #include "text_snippets.h" diff --git a/src/city.h b/src/city.h index 9103b8bdf421e..a3989676dc9b5 100644 --- a/src/city.h +++ b/src/city.h @@ -7,6 +7,7 @@ #include #include "coordinates.h" +#include "point.h" #include "type_id.h" class JsonObject; diff --git a/src/climbing.cpp b/src/climbing.cpp index 15ed8d16e55c5..aba840341d264 100644 --- a/src/climbing.cpp +++ b/src/climbing.cpp @@ -1,23 +1,20 @@ #include "climbing.h" #include -#include -#include +#include #include #include "cata_utility.h" #include "character.h" #include "creature_tracker.h" #include "debug.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "map.h" #include "vpart_position.h" -template struct enum_traits; +template struct enum_traits; static const climbing_aid_id climbing_aid_default( "default" ); diff --git a/src/clothing_mod.cpp b/src/clothing_mod.cpp index a9992152263bc..dd994e04cc59a 100644 --- a/src/clothing_mod.cpp +++ b/src/clothing_mod.cpp @@ -2,18 +2,15 @@ #include #include -#include #include #include #include "debug.h" #include "enum_conversions.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "item.h" -#include "json_error.h" namespace { diff --git a/src/clzones.cpp b/src/clzones.cpp index e52b2aa92b198..23ac6a8508ade 100644 --- a/src/clzones.cpp +++ b/src/clzones.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -17,14 +18,11 @@ #include "construction.h" #include "construction_group.h" #include "debug.h" -#include "faction.h" #include "field_type.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" -#include "game_constants.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "iexamine.h" -#include "init.h" #include "item.h" #include "item_category.h" #include "item_group.h" @@ -32,7 +30,6 @@ #include "item_search.h" #include "itype.h" #include "json.h" -#include "json_error.h" #include "localized_comparator.h" #include "make_static.h" #include "map.h" diff --git a/src/clzones.h b/src/clzones.h index 8dd8246382f45..81858c5e66482 100644 --- a/src/clzones.h +++ b/src/clzones.h @@ -3,13 +3,13 @@ #define CATA_SRC_CLZONES_H #include -#include #include #include #include #include #include #include +#include #include #include #include @@ -17,6 +17,7 @@ #include "coordinates.h" #include "cuboid_rectangle.h" +#include "map_scale_constants.h" #include "memory_fast.h" #include "point.h" #include "translation.h" @@ -25,12 +26,10 @@ class JsonObject; class JsonOut; class JsonValue; -class faction; class item; class map; struct construction; -using faction_id = string_id; inline const faction_id your_fac( "your_followers" ); const std::string type_fac_hash_str = "__FAC__"; diff --git a/src/color.cpp b/src/color.cpp index 9ddf32fb85ba0..028d47c7c8fb2 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -3,19 +3,21 @@ #include #include #include -#include +#include +#include +#include #include -#include #include #include +#include "cata_imgui.h" #include "cata_path.h" #include "cata_utility.h" #include "cursesdef.h" #include "debug.h" #include "filesystem.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "imgui/imgui.h" #include "input_context.h" #include "json.h" @@ -27,7 +29,6 @@ #include "translations.h" #include "ui.h" #include "ui_manager.h" -#include "cata_imgui.h" nc_color::operator ImVec4() { diff --git a/src/color.h b/src/color.h index efa1f7ac69de3..2dd1b96532bf1 100644 --- a/src/color.h +++ b/src/color.h @@ -3,13 +3,175 @@ #define CATA_SRC_COLOR_H #include -#include +#include #include #include +#include #include #include "translation.h" + +// def_x is a color that maps to x with default settings +enum color_id { + def_c_black = 0, + def_c_white, + def_c_light_gray, + def_c_dark_gray, + def_c_red, + def_c_green, + def_c_blue, + def_c_cyan, + def_c_magenta, + def_c_brown, + def_c_light_red, + def_c_light_green, + def_c_light_blue, + def_c_light_cyan, + def_c_pink, + def_c_yellow, + + def_h_black, + def_h_white, + def_h_light_gray, + def_h_dark_gray, + def_h_red, + def_h_green, + def_h_blue, + def_h_cyan, + def_h_magenta, + def_h_brown, + def_h_light_red, + def_h_light_green, + def_h_light_blue, + def_h_light_cyan, + def_h_pink, + def_h_yellow, + + def_i_black, + def_i_white, + def_i_light_gray, + def_i_dark_gray, + def_i_red, + def_i_green, + def_i_blue, + def_i_cyan, + def_i_magenta, + def_i_brown, + def_i_light_red, + def_i_light_green, + def_i_light_blue, + def_i_light_cyan, + def_i_pink, + def_i_yellow, + + def_c_unset, + + def_c_black_red, + def_c_white_red, + def_c_light_gray_red, + def_c_dark_gray_red, + def_c_red_red, + def_c_green_red, + def_c_blue_red, + def_c_cyan_red, + def_c_magenta_red, + def_c_brown_red, + def_c_light_red_red, + def_c_light_green_red, + def_c_light_blue_red, + def_c_light_cyan_red, + def_c_pink_red, + def_c_yellow_red, + + def_c_black_white, + def_c_dark_gray_white, + def_c_light_gray_white, + def_c_white_white, + def_c_red_white, + def_c_light_red_white, + def_c_green_white, + def_c_light_green_white, + def_c_brown_white, + def_c_yellow_white, + def_c_blue_white, + def_c_light_blue_white, + def_c_magenta_white, + def_c_pink_white, + def_c_cyan_white, + def_c_light_cyan_white, + + def_c_black_green, + def_c_dark_gray_green, + def_c_light_gray_green, + def_c_white_green, + def_c_red_green, + def_c_light_red_green, + def_c_green_green, + def_c_light_green_green, + def_c_brown_green, + def_c_yellow_green, + def_c_blue_green, + def_c_light_blue_green, + def_c_magenta_green, + def_c_pink_green, + def_c_cyan_green, + def_c_light_cyan_green, + + def_c_black_yellow, + def_c_dark_gray_yellow, + def_c_light_gray_yellow, + def_c_white_yellow, + def_c_red_yellow, + def_c_light_red_yellow, + def_c_green_yellow, + def_c_light_green_yellow, + def_c_brown_yellow, + def_c_yellow_yellow, + def_c_blue_yellow, + def_c_light_blue_yellow, + def_c_magenta_yellow, + def_c_pink_yellow, + def_c_cyan_yellow, + def_c_light_cyan_yellow, + + def_c_black_magenta, + def_c_dark_gray_magenta, + def_c_light_gray_magenta, + def_c_white_magenta, + def_c_red_magenta, + def_c_light_red_magenta, + def_c_green_magenta, + def_c_light_green_magenta, + def_c_brown_magenta, + def_c_yellow_magenta, + def_c_blue_magenta, + def_c_light_blue_magenta, + def_c_magenta_magenta, + def_c_pink_magenta, + def_c_cyan_magenta, + def_c_light_cyan_magenta, + + def_c_black_cyan, + def_c_dark_gray_cyan, + def_c_light_gray_cyan, + def_c_white_cyan, + def_c_red_cyan, + def_c_light_red_cyan, + def_c_green_cyan, + def_c_light_green_cyan, + def_c_brown_cyan, + def_c_yellow_cyan, + def_c_blue_cyan, + def_c_light_blue_cyan, + def_c_magenta_cyan, + def_c_pink_cyan, + def_c_cyan_cyan, + def_c_light_cyan_cyan, + + num_colors +}; + #define all_colors get_all_colors() #define c_black all_colors.get(def_c_black) @@ -175,169 +337,9 @@ #define c_bad all_colors.get(def_c_red) #define c_neutral all_colors.get(def_c_yellow) -// def_x is a color that maps to x with default settings -enum color_id { - def_c_black = 0, - def_c_white, - def_c_light_gray, - def_c_dark_gray, - def_c_red, - def_c_green, - def_c_blue, - def_c_cyan, - def_c_magenta, - def_c_brown, - def_c_light_red, - def_c_light_green, - def_c_light_blue, - def_c_light_cyan, - def_c_pink, - def_c_yellow, - - def_h_black, - def_h_white, - def_h_light_gray, - def_h_dark_gray, - def_h_red, - def_h_green, - def_h_blue, - def_h_cyan, - def_h_magenta, - def_h_brown, - def_h_light_red, - def_h_light_green, - def_h_light_blue, - def_h_light_cyan, - def_h_pink, - def_h_yellow, - - def_i_black, - def_i_white, - def_i_light_gray, - def_i_dark_gray, - def_i_red, - def_i_green, - def_i_blue, - def_i_cyan, - def_i_magenta, - def_i_brown, - def_i_light_red, - def_i_light_green, - def_i_light_blue, - def_i_light_cyan, - def_i_pink, - def_i_yellow, - - def_c_unset, - - def_c_black_red, - def_c_white_red, - def_c_light_gray_red, - def_c_dark_gray_red, - def_c_red_red, - def_c_green_red, - def_c_blue_red, - def_c_cyan_red, - def_c_magenta_red, - def_c_brown_red, - def_c_light_red_red, - def_c_light_green_red, - def_c_light_blue_red, - def_c_light_cyan_red, - def_c_pink_red, - def_c_yellow_red, - - def_c_black_white, - def_c_dark_gray_white, - def_c_light_gray_white, - def_c_white_white, - def_c_red_white, - def_c_light_red_white, - def_c_green_white, - def_c_light_green_white, - def_c_brown_white, - def_c_yellow_white, - def_c_blue_white, - def_c_light_blue_white, - def_c_magenta_white, - def_c_pink_white, - def_c_cyan_white, - def_c_light_cyan_white, - - def_c_black_green, - def_c_dark_gray_green, - def_c_light_gray_green, - def_c_white_green, - def_c_red_green, - def_c_light_red_green, - def_c_green_green, - def_c_light_green_green, - def_c_brown_green, - def_c_yellow_green, - def_c_blue_green, - def_c_light_blue_green, - def_c_magenta_green, - def_c_pink_green, - def_c_cyan_green, - def_c_light_cyan_green, - - def_c_black_yellow, - def_c_dark_gray_yellow, - def_c_light_gray_yellow, - def_c_white_yellow, - def_c_red_yellow, - def_c_light_red_yellow, - def_c_green_yellow, - def_c_light_green_yellow, - def_c_brown_yellow, - def_c_yellow_yellow, - def_c_blue_yellow, - def_c_light_blue_yellow, - def_c_magenta_yellow, - def_c_pink_yellow, - def_c_cyan_yellow, - def_c_light_cyan_yellow, - - def_c_black_magenta, - def_c_dark_gray_magenta, - def_c_light_gray_magenta, - def_c_white_magenta, - def_c_red_magenta, - def_c_light_red_magenta, - def_c_green_magenta, - def_c_light_green_magenta, - def_c_brown_magenta, - def_c_yellow_magenta, - def_c_blue_magenta, - def_c_light_blue_magenta, - def_c_magenta_magenta, - def_c_pink_magenta, - def_c_cyan_magenta, - def_c_light_cyan_magenta, - - def_c_black_cyan, - def_c_dark_gray_cyan, - def_c_light_gray_cyan, - def_c_white_cyan, - def_c_red_cyan, - def_c_light_red_cyan, - def_c_green_cyan, - def_c_light_green_cyan, - def_c_brown_cyan, - def_c_yellow_cyan, - def_c_blue_cyan, - def_c_light_blue_cyan, - def_c_magenta_cyan, - def_c_pink_cyan, - def_c_cyan_cyan, - def_c_light_cyan_cyan, - - num_colors -}; - -class cata_path; class JsonArray; class JsonOut; +class cata_path; void init_colors(); diff --git a/src/common_types.h b/src/common_types.h index 5316dca3bb4b7..b247b568ad53a 100644 --- a/src/common_types.h +++ b/src/common_types.h @@ -6,6 +6,7 @@ #include #include "json.h" +#include "flexbuffer_json.h" // IWYU pragma: keep /** * An interval of numeric values between @ref min and @ref max (including both). diff --git a/src/computer.cpp b/src/computer.cpp index 3e97c18291e5d..5f61d0bea31dc 100644 --- a/src/computer.cpp +++ b/src/computer.cpp @@ -1,22 +1,23 @@ #include "computer.h" +#include #include #include #include #include "debug.h" #include "enum_conversions.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "json.h" -#include "json_error.h" #include "output.h" +#include "point.h" #include "talker.h" #include "talker_furniture.h" #include "translation.h" #include "translations.h" -template struct enum_traits; +template struct enum_traits; computer_option::computer_option() : name( "Unknown" ), action( COMPACT_NULL ), security( 0 ) diff --git a/src/computer.h b/src/computer.h index 079a6a66b823c..7fe816f215ac3 100644 --- a/src/computer.h +++ b/src/computer.h @@ -10,7 +10,6 @@ #include "calendar.h" #include "coordinates.h" -#include "point.h" #include "type_id.h" class JsonObject; diff --git a/src/computer_session.cpp b/src/computer_session.cpp index 7b26d03522109..dfe2c0a863bb0 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -13,7 +13,6 @@ #include "calendar.h" #include "character.h" #include "character_id.h" -#include "colony.h" #include "color.h" #include "computer.h" #include "coordinates.h" @@ -27,7 +26,6 @@ #include "field_type.h" #include "flag.h" #include "game.h" -#include "game_constants.h" #include "game_inventory.h" #include "input.h" #include "input_context.h" @@ -38,13 +36,13 @@ #include "localized_comparator.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "messages.h" #include "mission.h" #include "monster.h" #include "mtype.h" #include "mutation.h" -#include "npc.h" #include "omdata.h" #include "options.h" #include "output.h" diff --git a/src/construction.cpp b/src/construction.cpp index 2fc0a8ed475cd..590f0f1893e4b 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -3,33 +3,34 @@ #include #include #include +#include #include #include #include #include #include "action.h" -#include "activity_type.h" #include "avatar.h" #include "build_reqs.h" +#include "cached_options.h" #include "calendar.h" #include "cata_scope_helpers.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "color.h" #include "construction_category.h" #include "construction_group.h" #include "coordinates.h" #include "creature.h" +#include "cuboid_rectangle.h" #include "cursesdef.h" #include "cursesport.h" #include "debug.h" #include "enums.h" #include "event.h" #include "event_bus.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "input.h" @@ -37,12 +38,11 @@ #include "inventory.h" #include "item.h" #include "item_group.h" -#include "item_stack.h" #include "iteminfo_query.h" #include "iuse.h" -#include "json_error.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "memory_fast.h" #include "messages.h" @@ -50,7 +50,6 @@ #include "npc.h" #include "options.h" #include "output.h" -#include "overmap.h" #include "panels.h" #include "player_activity.h" #include "point.h" @@ -73,7 +72,9 @@ #include "vehicle.h" #include "vpart_position.h" -class read_only_visitable; +#if defined( TILES ) +#include "cata_tiles.h" +#endif static const activity_id ACT_BUILD( "ACT_BUILD" ); static const activity_id ACT_MULTIPLE_CONSTRUCTION( "ACT_MULTIPLE_CONSTRUCTION" ); @@ -2517,9 +2518,9 @@ void finalize_constructions() } build_reqs get_build_reqs_for_furn_ter_ids( - const std::pair, std::map> &changed_ids, - ter_id const &base_ter ) + const std::pair, std::map> &changed_ids ) { + ter_id const &base_ter = ter_t_dirt.id(); build_reqs total_reqs; if( !finalized ) { diff --git a/src/construction_category.cpp b/src/construction_category.cpp index 69ea3df4adefd..9ecc88a5060cd 100644 --- a/src/construction_category.cpp +++ b/src/construction_category.cpp @@ -1,12 +1,7 @@ #include "construction_category.h" -#include - #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" namespace { diff --git a/src/construction_group.cpp b/src/construction_group.cpp index e063be848f391..4fc7b484612ee 100644 --- a/src/construction_group.cpp +++ b/src/construction_group.cpp @@ -1,12 +1,7 @@ #include "construction_group.h" -#include - #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" namespace { diff --git a/src/consumption.cpp b/src/consumption.cpp index ae25bb49aca12..d11b60bfb08d7 100644 --- a/src/consumption.cpp +++ b/src/consumption.cpp @@ -1,8 +1,9 @@ #include #include #include -#include #include +#include +#include #include #include #include @@ -15,6 +16,7 @@ #include #include "addiction.h" +#include "assign.h" #include "avatar.h" #include "bodypart.h" #include "calendar.h" @@ -22,6 +24,7 @@ #include "character.h" #include "color.h" #include "contents_change_handler.h" +#include "coordinates.h" #include "creature.h" #include "debug.h" #include "dialogue.h" @@ -41,7 +44,6 @@ #include "itype.h" #include "iuse.h" #include "iuse_actor.h" -#include "line.h" #include "magic_enchantment.h" #include "make_static.h" #include "map.h" diff --git a/src/contents_change_handler.cpp b/src/contents_change_handler.cpp index ccc6153812933..b713ebeeae18c 100644 --- a/src/contents_change_handler.cpp +++ b/src/contents_change_handler.cpp @@ -1,14 +1,13 @@ -#include "character.h" -#include "contents_change_handler.h" - #include +#include +#include "character.h" +#include "contents_change_handler.h" #include "debug.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "item_pocket.h" #include "json.h" -#include "json_error.h" void contents_change_handler::add_unsealed( const item_location &loc ) { diff --git a/src/coordinate_conversions.cpp b/src/coordinate_conversions.cpp index c77b265a14b40..ac754026f3b71 100644 --- a/src/coordinate_conversions.cpp +++ b/src/coordinate_conversions.cpp @@ -1,6 +1,6 @@ #include "coordinate_conversions.h" -#include "game_constants.h" +#include "map_scale_constants.h" static int divide( int v, int m ) { diff --git a/src/coordinate_conversions.h b/src/coordinate_conversions.h index daeb3d587060a..5557248ea6cb2 100644 --- a/src/coordinate_conversions.h +++ b/src/coordinate_conversions.h @@ -2,7 +2,6 @@ #ifndef CATA_SRC_COORDINATE_CONVERSIONS_H #define CATA_SRC_COORDINATE_CONVERSIONS_H -#include "map_scale_constants.h" #include "point.h" /** diff --git a/src/coordinates.h b/src/coordinates.h index 37a566a6c8ee9..d7173610d58b7 100644 --- a/src/coordinates.h +++ b/src/coordinates.h @@ -2,7 +2,9 @@ #ifndef CATA_SRC_COORDINATES_H #define CATA_SRC_COORDINATES_H +#include #include +#include #include #include #include @@ -10,24 +12,22 @@ #include #include #include -#include #include #include "cata_inline.h" -#include "coords_fwd.h" +#include "coords_fwd.h" // IWYU pragma: export #include "cuboid_rectangle.h" #include "debug.h" -#include "map_scale_constants.h" #include "line.h" // IWYU pragma: keep +#include "map_scale_constants.h" #include "point.h" class JsonOut; class JsonValue; -enum class direction : unsigned; - namespace coords { +template class coord_point_ob; constexpr int map_squares_per( scale s ) { diff --git a/src/craft_command.cpp b/src/craft_command.cpp index a036bddc220fe..72e5034713987 100644 --- a/src/craft_command.cpp +++ b/src/craft_command.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -16,8 +17,8 @@ #include "enum_conversions.h" #include "enum_traits.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "inventory.h" #include "item.h" diff --git a/src/craft_command.h b/src/craft_command.h index 5cedd85eca806..ec708cac19651 100644 --- a/src/craft_command.h +++ b/src/craft_command.h @@ -7,8 +7,9 @@ #include #include -#include "point.h" +#include "coordinates.h" #include "recipe.h" +#include "requirements.h" #include "type_id.h" class Character; @@ -16,8 +17,6 @@ class JsonObject; class JsonOut; class item; class read_only_visitable; -struct item_comp; -struct tool_comp; template struct enum_traits; /** diff --git a/src/crafting.cpp b/src/crafting.cpp index be18137dd2bc2..28da21dd7e46e 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -17,7 +16,6 @@ #include "activity_actor_definitions.h" #include "activity_handlers.h" -#include "activity_type.h" #include "avatar.h" #include "calendar.h" #include "cata_assert.h" @@ -25,7 +23,6 @@ #include "character.h" #include "character_attire.h" #include "character_id.h" -#include "colony.h" #include "color.h" #include "coordinates.h" #include "craft_command.h" @@ -46,7 +43,6 @@ #include "item.h" #include "item_components.h" #include "item_location.h" -#include "item_stack.h" #include "itype.h" #include "iuse.h" #include "line.h" @@ -85,6 +81,8 @@ #include "vpart_position.h" #include "weather.h" +class basecamp; + static const activity_id ACT_CRAFT( "ACT_CRAFT" ); static const activity_id ACT_DISASSEMBLE( "ACT_DISASSEMBLE" ); static const activity_id ACT_MULTIPLE_CRAFT( "ACT_MULTIPLE_CRAFT" ); @@ -127,8 +125,6 @@ static const std::string flag_NO_ENCHANTMENT( "NO_ENCHANTMENT" ); static const std::string flag_NO_MANIP( "NO_MANIP" ); static const std::string flag_NO_RESIZE( "NO_RESIZE" ); -class basecamp; - static bool crafting_allowed( const Character &p, const recipe &rec ) { if( p.morale_crafting_speed_multiplier( rec ) <= 0.0f ) { diff --git a/src/crafting_gui.cpp b/src/crafting_gui.cpp index f005e9ed4dcf9..6c0919681a766 100644 --- a/src/crafting_gui.cpp +++ b/src/crafting_gui.cpp @@ -6,14 +6,16 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include -#include +#include #include #include @@ -30,10 +32,11 @@ #include "display.h" #include "flag.h" #include "flat_set.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "game_inventory.h" +#include "generic_factory.h" #include "input.h" #include "input_context.h" #include "input_enums.h" @@ -44,11 +47,14 @@ #include "item_location.h" #include "itype.h" #include "localized_comparator.h" +#include "magic_enchantment.h" #include "options.h" #include "output.h" +#include "pimpl.h" #include "point.h" #include "popup.h" #include "recipe.h" +#include "recipe_dictionary.h" #include "requirements.h" #include "skill.h" #include "string_formatter.h" diff --git a/src/crafting_gui.h b/src/crafting_gui.h index 104f9f6e2e36c..4742977d715e7 100644 --- a/src/crafting_gui.h +++ b/src/crafting_gui.h @@ -3,16 +3,17 @@ #define CATA_SRC_CRAFTING_GUI_H #include +#include #include #include -#include "recipe_dictionary.h" +#include "recipe.h" #include "type_id.h" class Character; -class inventory; class JsonObject; -class recipe; +class inventory; +class recipe_subset; /** * Open crafting menu where user selects who will craft what (the crafter & the recipe). diff --git a/src/crash.cpp b/src/crash.cpp index 305000a317070..96781322cfddf 100644 --- a/src/crash.cpp +++ b/src/crash.cpp @@ -1,5 +1,7 @@ #include "crash.h" +#include + // IWYU pragma: no_include #if defined(BACKTRACE) @@ -25,9 +27,15 @@ #if defined(_WIN32) #if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU -#include "platform_win.h" +#include "platform_win.h" // IWYU pragma: keep #endif -#include + +#include // IWYU pragma: keep +#include +#include +#include +#include // for FILE_ATTRIBUTE_NORMAL, GENERIC_WRITE +#include #endif #include "debug.h" diff --git a/src/creature.cpp b/src/creature.cpp index 66fd8d0721b83..d2e2262a15397 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -35,13 +35,12 @@ #include "explosion.h" #include "field.h" #include "flat_set.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "item.h" #include "item_location.h" -#include "json_error.h" #include "level_cache.h" #include "lightmap.h" #include "line.h" @@ -49,12 +48,12 @@ #include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "mattack_common.h" #include "mdarray.h" #include "messages.h" #include "monster.h" -#include "morale_types.h" #include "mtype.h" #include "npc.h" #include "options.h" @@ -65,7 +64,6 @@ #include "sounds.h" #include "talker.h" #include "talker_avatar.h" -#include "talker_character.h" #include "talker_monster.h" #include "talker_npc.h" #include "translation.h" diff --git a/src/creature.h b/src/creature.h index 38480c268ab90..f15db1b9ddf6d 100644 --- a/src/creature.h +++ b/src/creature.h @@ -14,14 +14,15 @@ #include #include #include -#include #include #include #include "bodypart.h" #include "calendar.h" +#include "character_id.h" +#include "color.h" #include "compatibility.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "damage.h" #include "debug.h" #include "effect_source.h" @@ -37,21 +38,24 @@ class Character; class JsonObject; class JsonOut; -class anatomy; class avatar; class body_part_set; -class character_id; +class const_talker; class effect; class effects_map; +class enchant_cache; class field; class field_entry; class item; class monster; -class nc_color; class npc; class talker; -class const_talker; class translation; +namespace enchant_vals +{ +enum class mod : int; +} // namespace enchant_vals + namespace catacurses { class window; @@ -64,8 +68,6 @@ struct projectile_attack_results; struct trap; template struct enum_traits; -using anatomy_id = string_id; - enum class creature_size : int { // Keep it starting at 1 - damage done to monsters depends on it // Squirrel, cat, human toddler diff --git a/src/creature_tracker.cpp b/src/creature_tracker.cpp index 0d41369055c57..61e9280f09232 100644 --- a/src/creature_tracker.cpp +++ b/src/creature_tracker.cpp @@ -1,6 +1,5 @@ #include "creature_tracker.h" -#include #include #include #include diff --git a/src/creature_tracker.h b/src/creature_tracker.h index 7110d26f3ffea..5430e95e66a38 100644 --- a/src/creature_tracker.h +++ b/src/creature_tracker.h @@ -8,17 +8,18 @@ #include #include #include +#include #include -#include "coords_fwd.h" +#include "coordinates.h" #include "creature.h" -#include "type_id.h" +#include "memory_fast.h" +#include "npc.h" class JsonArray; class JsonOut; class game; class monster; -class npc; struct tripoint; class creature_tracker diff --git a/src/cube_direction.h b/src/cube_direction.h index 8801fc33d70e9..9370c33a8ae02 100644 --- a/src/cube_direction.h +++ b/src/cube_direction.h @@ -2,11 +2,11 @@ #ifndef CATA_SRC_CUBE_DIRECTION_H #define CATA_SRC_CUBE_DIRECTION_H +#include #include -#include "enum_traits.h" - struct tripoint; +template struct enum_traits; namespace om_direction { diff --git a/src/cursesdef.h b/src/cursesdef.h index 0b90040088c2a..586dbf8f570c7 100644 --- a/src/cursesdef.h +++ b/src/cursesdef.h @@ -2,9 +2,9 @@ #ifndef CATA_SRC_CURSESDEF_H #define CATA_SRC_CURSESDEF_H -#include #include -#include +#include +#include #include "string_formatter.h" diff --git a/src/damage.cpp b/src/damage.cpp index 84cfcc1bb1886..5cb8b515ab571 100644 --- a/src/damage.cpp +++ b/src/damage.cpp @@ -13,13 +13,11 @@ #include "debug.h" #include "dialogue.h" #include "effect_on_condition.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" #include "item.h" #include "json.h" -#include "json_error.h" #include "make_static.h" #include "monster.h" #include "mtype.h" diff --git a/src/damage.h b/src/damage.h index 6811c0dacf6a8..6b2164d3fa705 100644 --- a/src/damage.h +++ b/src/damage.h @@ -2,6 +2,7 @@ #ifndef CATA_SRC_DAMAGE_H #define CATA_SRC_DAMAGE_H +#include #include #include #include diff --git a/src/debug.cpp b/src/debug.cpp index fc1d9d53879dd..dec631563b289 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1,46 +1,41 @@ #include "debug.h" -#include + // IWYU pragma: no_include -#include // IWYU pragma: no_include -#include +#include #include -#include #include -#include -#include -#include #include +#include +#include #include #include -#include #include -#include -#include -#include +#include // IWYU pragma: keep #include #include #include #include -#include #include #include "cached_options.h" #include "cata_assert.h" -#include "cata_scope_helpers.h" #include "cata_utility.h" #include "color.h" #include "cursesdef.h" +#include "demangle.h" #include "filesystem.h" #include "get_version.h" #include "input.h" +#include "input_enums.h" #include "loading_ui.h" #include "mod_manager.h" #include "options.h" #include "output.h" #include "path_info.h" #include "point.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui_manager.h" @@ -62,9 +57,18 @@ # if defined(LIBBACKTRACE) # include # endif +# include +# include +# include +# include +# include +# include +# include +# include +# include # elif defined(__ANDROID__) -# include # include +# include # else # include # include @@ -82,6 +86,7 @@ #if defined(__ANDROID__) // used by android_version() function for __system_property_get(). #include + #include "input_context.h" #endif diff --git a/src/debug.h b/src/debug.h index bd4549a69e53b..746a46b62be7d 100644 --- a/src/debug.h +++ b/src/debug.h @@ -2,8 +2,12 @@ #ifndef CATA_SRC_DEBUG_H #define CATA_SRC_DEBUG_H -#include "string_formatter.h" +#include +#include #include +#include + +#include "string_formatter.h" /** * debugmsg(msg, ...) diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 2ab3e468fc052..cfb4ce3e64b1c 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -2,18 +2,19 @@ #include #include +#include #include #include #include #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include "character_id.h" #include "character_martial_arts.h" #include "city.h" -#include "clzones.h" #include "color.h" #include "coordinate_conversions.h" #include "coordinates.h" @@ -48,7 +48,6 @@ #include "creature_tracker.h" #include "cursesdef.h" #include "debug.h" -#include "imgui_demo.h" #include "dialogue.h" #include "dialogue_chatbin.h" #include "dialogue_helpers.h" @@ -62,14 +61,14 @@ #include "faction.h" #include "filesystem.h" #include "game.h" -#include "game_constants.h" #include "game_inventory.h" #include "global_vars.h" +#include "imgui_demo.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "item.h" -#include "item_group.h" #include "item_location.h" #include "itype.h" #include "json.h" @@ -78,6 +77,7 @@ #include "map.h" #include "map_extras.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapgen.h" #include "mapgendata.h" #include "martialarts.h" @@ -90,6 +90,7 @@ #include "mutation.h" #include "npc.h" #include "npc_class.h" +#include "npc_opinion.h" #include "npctalk.h" #include "omdata.h" #include "options.h" @@ -119,8 +120,8 @@ #include "try_parse_integer.h" #include "type_id.h" #include "ui.h" -#include "uistate.h" #include "ui_manager.h" +#include "uistate.h" #include "units.h" #include "units_utility.h" #include "veh_type.h" diff --git a/src/debug_menu.h b/src/debug_menu.h index af2a5f23c0268..d14b6e95be5b7 100644 --- a/src/debug_menu.h +++ b/src/debug_menu.h @@ -7,13 +7,15 @@ #include #include #include +#include #include "coordinates.h" +#include "line.h" +#include "point.h" class Character; class Creature; struct mongroup; - template struct enum_traits; namespace debug_menu diff --git a/src/dialogue_chatbin.cpp b/src/dialogue_chatbin.cpp index d4919a9c7fd2f..2f048ee3fef7d 100644 --- a/src/dialogue_chatbin.cpp +++ b/src/dialogue_chatbin.cpp @@ -1,7 +1,8 @@ #include "dialogue_chatbin.h" -#include #include +#include +#include #include "mission.h" diff --git a/src/dialogue_helpers.h b/src/dialogue_helpers.h index eac6cb315a70e..e1bbb65887349 100644 --- a/src/dialogue_helpers.h +++ b/src/dialogue_helpers.h @@ -15,15 +15,14 @@ #include "calendar.h" #include "debug.h" #include "global_vars.h" -#include "math_parser_type.h" #include "translation.h" -class JsonArray; class JsonObject; class math_exp; class npc; -struct dialogue; +enum class math_type_t : int; struct const_dialogue; +struct dialogue; using talkfunction_ptr = std::add_pointer_t; using dialogue_fun_ptr = std::add_pointer_t; diff --git a/src/dialogue_win.cpp b/src/dialogue_win.cpp index fce88e727bcc4..dfb1b7d53235e 100644 --- a/src/dialogue_win.cpp +++ b/src/dialogue_win.cpp @@ -1,8 +1,11 @@ #include "dialogue_win.h" +#include #include #include +#include "catacharset.h" +#include "debug.h" #include "input_context.h" #include "output.h" #include "point.h" diff --git a/src/diary.cpp b/src/diary.cpp index 346527c7be05c..685516aa76d2a 100644 --- a/src/diary.cpp +++ b/src/diary.cpp @@ -13,9 +13,10 @@ #include "cata_utility.h" #include "catacharset.h" #include "color.h" +#include "enum_conversions.h" #include "filesystem.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "json.h" #include "json_error.h" @@ -24,7 +25,6 @@ #include "mission.h" #include "mtype.h" #include "mutation.h" -#include "npc.h" #include "output.h" #include "path_info.h" #include "pimpl.h" diff --git a/src/diary_ui.cpp b/src/diary_ui.cpp index 3e33fbd968bb1..62d4c7faba768 100644 --- a/src/diary_ui.cpp +++ b/src/diary_ui.cpp @@ -1,7 +1,6 @@ #include "game.h" // IWYU pragma: associated #include -#include #include #include #include @@ -13,6 +12,7 @@ #include "diary.h" #include "input_context.h" #include "output.h" +#include "point.h" #include "scores_ui.h" #include "string_editor_window.h" #include "string_formatter.h" diff --git a/src/disease.cpp b/src/disease.cpp index 805f0e7865e37..1f210fbd6584c 100644 --- a/src/disease.cpp +++ b/src/disease.cpp @@ -2,10 +2,7 @@ #include "debug.h" #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" namespace { diff --git a/src/display.cpp b/src/display.cpp index 09c6b455ab9ea..7e467af67f211 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -5,11 +5,12 @@ #include #include #include +#include #include -#include #include #include "avatar.h" +#include "basecamp.h" #include "bodygraph.h" #include "calendar.h" #include "cata_utility.h" @@ -17,6 +18,7 @@ #include "creature.h" #include "debug.h" #include "effect.h" +#include "faction.h" #include "game.h" #include "game_constants.h" #include "make_static.h" @@ -43,6 +45,7 @@ #include "vpart_position.h" #include "weather.h" #include "weather_type.h" +#include "widget.h" static const efftype_id effect_bite( "bite" ); static const efftype_id effect_bleed( "bleed" ); diff --git a/src/display.h b/src/display.h index ba69fd2dc9e29..999e45ccc7954 100644 --- a/src/display.h +++ b/src/display.h @@ -10,17 +10,18 @@ #include "bodypart.h" #include "color.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "point.h" -#include "widget.h" +#include "translation.h" +#include "type_id.h" class Character; class Creature; class avatar; class mood_face; class time_point; -class translation; class vehicle; +enum class cardinal_direction : int; // These are the supported data variables for coloring bodygraphs. enum class bodygraph_var : int { diff --git a/src/distraction_manager.cpp b/src/distraction_manager.cpp index 0e2689d6008ba..c934fbf114506 100644 --- a/src/distraction_manager.cpp +++ b/src/distraction_manager.cpp @@ -1,6 +1,5 @@ #include "distraction_manager.h" -#include #include #include diff --git a/src/distribution.cpp b/src/distribution.cpp index 78f333e4081b8..b22f6fe802d12 100644 --- a/src/distribution.cpp +++ b/src/distribution.cpp @@ -4,8 +4,8 @@ #include #include -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "memory_fast.h" #include "rng.h" #include "string_formatter.h" diff --git a/src/distribution.h b/src/distribution.h index 4d97e4ff51551..c37ecdabd51ff 100644 --- a/src/distribution.h +++ b/src/distribution.h @@ -2,13 +2,12 @@ #ifndef CATA_SRC_DISTRIBUTION_H #define CATA_SRC_DISTRIBUTION_H -#include #include #include "memory_fast.h" // IWYU pragma: keep -struct int_distribution_impl; class JsonValue; +struct int_distribution_impl; // This represents a probability distribution over the integers, which is // abstract and can be read from a JSON definition diff --git a/src/do_turn.cpp b/src/do_turn.cpp index 400ef97d66230..ebcab21cf1115 100644 --- a/src/do_turn.cpp +++ b/src/do_turn.cpp @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -37,10 +37,10 @@ #include "help.h" #include "input.h" #include "input_context.h" -#include "line.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapbuffer.h" #include "mapdata.h" #include "memorial_logger.h" @@ -52,6 +52,7 @@ #include "npc.h" #include "options.h" #include "output.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" @@ -60,6 +61,7 @@ #include "rng.h" #include "scent_map.h" #include "sdlsound.h" +#include "simple_pathfinding.h" #include "sounds.h" #include "stats_tracker.h" #include "string_formatter.h" diff --git a/src/drawing_primitives.h b/src/drawing_primitives.h index 60ecc15dc6b2f..e62dc42c341c4 100644 --- a/src/drawing_primitives.h +++ b/src/drawing_primitives.h @@ -6,7 +6,6 @@ #include "coords_fwd.h" -struct point; struct rl_vec2d; void draw_line( const std::function &set, const point_bub_ms &p1, diff --git a/src/editmap.cpp b/src/editmap.cpp index efe1eae6fcb2e..d0b6709e8d463 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -1,28 +1,29 @@ #include "editmap.h" -#include -#include +#include #include +#include #include #include #include #include +#include #include #include +#include #include #include #include #include "avatar.h" +#include "cached_options.h" #include "calendar.h" #include "cata_scope_helpers.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" -#include "cuboid_rectangle.h" #include "debug.h" #include "debug_menu.h" #include "demangle.h" @@ -30,14 +31,16 @@ #include "field_type.h" #include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" +#include "input_context.h" #include "input_enums.h" #include "item.h" #include "level_cache.h" #include "line.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" +#include "maptile_fwd.h" #include "mdarray.h" #include "memory_fast.h" #include "monster.h" @@ -53,15 +56,19 @@ #include "string_formatter.h" #include "string_input_popup.h" #include "submap.h" +#include "tileray.h" #include "translation.h" #include "translations.h" #include "trap.h" #include "ui.h" #include "ui_manager.h" #include "uistate.h" +#include "units.h" #include "vehicle.h" #include "vpart_position.h" +class uilist_impl; + // NOLINTNEXTLINE(cata-static-int_id-constants) static const ter_id undefined_ter_id( -1 ); diff --git a/src/editmap.h b/src/editmap.h index b1c4cd3668477..b624ad15980fd 100644 --- a/src/editmap.h +++ b/src/editmap.h @@ -13,12 +13,12 @@ #include "coordinates.h" #include "cursesdef.h" #include "memory_fast.h" -#include "input_context.h" #include "point.h" #include "type_id.h" class Creature; class field; +class input_context; class map; class smallmap; class tinymap; diff --git a/src/effect.cpp b/src/effect.cpp index 8c8d7eba02660..cc3a56a478b76 100644 --- a/src/effect.cpp +++ b/src/effect.cpp @@ -1,28 +1,25 @@ #include "effect.h" #include +#include +#include #include -#include #include -#include #include #include "bodypart.h" #include "cata_assert.h" -#include "cata_variant.h" #include "character.h" #include "color.h" #include "debug.h" #include "effect_source.h" -#include "enum_conversions.h" #include "enums.h" #include "event.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "json.h" -#include "json_error.h" #include "magic_enchantment.h" #include "messages.h" #include "output.h" @@ -32,6 +29,8 @@ #include "translations.h" #include "units.h" +enum class cata_variant_type : int; + static const efftype_id effect_bandaged( "bandaged" ); static const efftype_id effect_beartrap( "beartrap" ); static const efftype_id effect_crushed( "crushed" ); diff --git a/src/effect_on_condition.cpp b/src/effect_on_condition.cpp index 023a28fd18679..0c9d606ea3115 100644 --- a/src/effect_on_condition.cpp +++ b/src/effect_on_condition.cpp @@ -1,11 +1,10 @@ #include "effect_on_condition.h" -#include #include #include +#include #include #include -#include #include "avatar.h" #include "calendar.h" @@ -16,11 +15,11 @@ #include "condition.h" #include "creature.h" #include "debug.h" -#include "flexbuffer_json-inl.h" +#include "event.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "generic_factory.h" -#include "init.h" #include "mod_tracker.h" #include "npc.h" #include "output.h" diff --git a/src/effect_on_condition.h b/src/effect_on_condition.h index a954f6d0a71eb..77c16748bded1 100644 --- a/src/effect_on_condition.h +++ b/src/effect_on_condition.h @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -13,15 +12,14 @@ #include "dialogue.h" #include "dialogue_helpers.h" -#include "event.h" #include "event_subscriber.h" #include "type_id.h" class Character; class JsonObject; class JsonValue; -class talker; class time_duration; +enum class event_type : int; struct effect_on_condition; template struct enum_traits; template class generic_factory; diff --git a/src/effect_source.h b/src/effect_source.h index 4b7ba50abb4fb..cf08e4134d615 100644 --- a/src/effect_source.h +++ b/src/effect_source.h @@ -5,7 +5,6 @@ #include #include "character_id.h" -#include "item.h" #include "type_id.h" class Character; diff --git a/src/emit.cpp b/src/emit.cpp index 3a3ad826183ea..4716fab8aa0aa 100644 --- a/src/emit.cpp +++ b/src/emit.cpp @@ -1,15 +1,13 @@ #include "emit.h" -#include #include #include -#include "debug.h" - #include "condition.h" -#include "flexbuffer_json-inl.h" +#include "debug.h" +#include "dialogue_helpers.h" #include "flexbuffer_json.h" -#include "json.h" +#include "flexbuffer_json-inl.h" static std::map emits_all; diff --git a/src/emit.h b/src/emit.h index bb1bdf00f937c..ebb43f7dd8b3a 100644 --- a/src/emit.h +++ b/src/emit.h @@ -2,14 +2,13 @@ #ifndef CATA_SRC_EMIT_H #define CATA_SRC_EMIT_H +#include #include -#include -#include "field_type.h" #include "type_id.h" -#include class JsonObject; +struct const_dialogue; class emit { diff --git a/src/end_screen.cpp b/src/end_screen.cpp index 3d1c6507b4b17..46ec596fc7f51 100644 --- a/src/end_screen.cpp +++ b/src/end_screen.cpp @@ -1,6 +1,6 @@ -#include "assign.h" #include "condition.h" #include "end_screen.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" namespace diff --git a/src/end_screen.h b/src/end_screen.h index d9b0722347b9d..881b23a9a8ab1 100644 --- a/src/end_screen.h +++ b/src/end_screen.h @@ -2,14 +2,16 @@ #ifndef CATA_SRC_DEATH_SCREEN_H #define CATA_SRC_DEATH_SCREEN_H -#include +#include +#include +#include +#include #include -#include "ascii_art.h" -#include "effect_on_condition.h" #include "type_id.h" class JsonObject; +struct const_dialogue; struct end_screen { public: diff --git a/src/event.h b/src/event.h index a6b024c3be714..12b056a29fe51 100644 --- a/src/event.h +++ b/src/event.h @@ -4,9 +4,9 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/src/event_bus.cpp b/src/event_bus.cpp index a1cf43a0d6cdb..07fbe0d78bf5a 100644 --- a/src/event_bus.cpp +++ b/src/event_bus.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "calendar.h" #include "cata_variant.h" @@ -15,6 +16,11 @@ #include "item_location.h" #include "talker.h" // IWYU pragma: keep +namespace cata::event_detail +{ +template struct event_spec; +} // namespace cata::event_detail + event_subscriber::~event_subscriber() { if( subscribed_to ) { @@ -101,6 +107,7 @@ namespace { template struct make_dyn_helper; + template struct make_dyn_helper> { using Spec = cata::event_detail::event_spec; diff --git a/src/event_field_transformations.cpp b/src/event_field_transformations.cpp index b875cfad8723b..1fc0e8a9e3142 100644 --- a/src/event_field_transformations.cpp +++ b/src/event_field_transformations.cpp @@ -2,9 +2,11 @@ #include #include +#include #include #include #include +#include #include "coordinates.h" #include "itype.h" diff --git a/src/event_statistics.cpp b/src/event_statistics.cpp index 5eee5840c7b61..6e6ad6e37cb96 100644 --- a/src/event_statistics.cpp +++ b/src/event_statistics.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -17,11 +16,10 @@ #include "enums.h" #include "event.h" #include "event_field_transformations.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" +#include "hash_utils.h" #include "output.h" #include "stats_tracker.h" #include "string_formatter.h" diff --git a/src/event_statistics.h b/src/event_statistics.h index 57785b1e1cf2d..e33bd144b4a46 100644 --- a/src/event_statistics.h +++ b/src/event_statistics.h @@ -13,17 +13,13 @@ #include "translation.h" #include "type_id.h" +class JsonObject; class cata_variant; - -enum class cata_variant_type : int; class event_multiset; - -enum class event_type : int; -class JsonObject; - -enum class monotonically : int; class stats_tracker; class stats_tracker_state; +enum class cata_variant_type : int; +enum class monotonically : int; using event_fields_type = std::unordered_map; diff --git a/src/explosion.cpp b/src/explosion.cpp index c735a95d2d04b..d8202cdc77998 100644 --- a/src/explosion.cpp +++ b/src/explosion.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -31,10 +30,9 @@ #include "fault.h" #include "field_type.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" #include "item.h" #include "item_factory.h" #include "item_location.h" @@ -43,6 +41,8 @@ #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" +#include "map_selector.h" #include "mapdata.h" #include "math_defines.h" #include "mdarray.h" @@ -58,7 +58,6 @@ #include "shadowcasting.h" #include "sounds.h" #include "translations.h" -#include "trap.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" diff --git a/src/explosion.h b/src/explosion.h index a8246a0f8e9ac..1761c438fd5cb 100644 --- a/src/explosion.h +++ b/src/explosion.h @@ -7,14 +7,14 @@ #include #include +#include "color.h" #include "coordinates.h" -#include "map.h" +#include "point.h" #include "type_id.h" class Creature; class JsonObject; -class nc_color; -struct tripoint; +class map; struct shrapnel_data { int casing_mass = 0; diff --git a/src/faction.cpp b/src/faction.cpp index dc0c516e37473..9b0c6f78b04f1 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -2,8 +2,7 @@ #include #include -#include -#include +#include #include #include #include @@ -21,14 +20,14 @@ #include "debug.h" #include "display.h" #include "faction_camp.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" #include "input_context.h" -#include "json_error.h" #include "line.h" #include "localized_comparator.h" +#include "map_scale_constants.h" +#include "memory_fast.h" #include "mission_companion.h" #include "mtype.h" #include "npc.h" @@ -43,6 +42,7 @@ #include "type_id.h" #include "ui.h" #include "ui_manager.h" +#include "vitamin.h" static const faction_id faction_no_faction( "no_faction" ); static const faction_id faction_your_followers( "your_followers" ); diff --git a/src/faction.h b/src/faction.h index 2d71287ee58ba..9833c1a4e9100 100644 --- a/src/faction.h +++ b/src/faction.h @@ -2,12 +2,12 @@ #ifndef CATA_SRC_FACTION_H #define CATA_SRC_FACTION_H +#include #include +#include #include #include -#include #include -#include #include #include #include @@ -19,7 +19,8 @@ #include "stomach.h" #include "translation.h" #include "type_id.h" -#include "vitamin.h" + +enum class vitamin_type : int; namespace catacurses { @@ -34,15 +35,12 @@ std::string fac_respect_text( int val ); std::string fac_wealth_text( int val, int size ); std::string fac_combat_ability_text( int val ); -class item; class JsonObject; class JsonOut; class JsonValue; -class faction; +class item; class npc; -using faction_id = string_id; - namespace npc_factions { void finalize(); diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index 3a57b685d7131..6670155395537 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -1,26 +1,35 @@ #include "faction_camp.h" // IWYU pragma: associated #include -#include +#include +#include +#include +#include +#include #include #include #include +#include #include #include #include +#include +#include +#include #include #include -#include "activity_actor_definitions.h" -#include "activity_type.h" #include "avatar.h" #include "basecamp.h" +#include "build_reqs.h" #include "calendar.h" +#include "cata_assert.h" #include "cata_utility.h" +#include "cata_variant.h" #include "catacharset.h" #include "character.h" +#include "character_id.h" #include "clzones.h" -#include "colony.h" #include "color.h" #include "coordinates.h" #include "crafting_gui.h" @@ -30,23 +39,30 @@ #include "faction.h" #include "flag.h" #include "game.h" +#include "game_constants.h" #include "game_inventory.h" +#include "global_vars.h" #include "iexamine.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "inventory_ui.h" #include "item.h" #include "item_group.h" +#include "item_location.h" #include "item_pocket.h" -#include "item_stack.h" #include "itype.h" #include "kill_tracker.h" #include "line.h" #include "localized_comparator.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" +#include "mapgen.h" #include "mapgen_functions.h" +#include "mapgendata.h" +#include "mdarray.h" #include "memory_fast.h" #include "messages.h" #include "mission.h" @@ -60,16 +76,20 @@ #include "overmap.h" #include "overmap_ui.h" #include "overmapbuffer.h" +#include "pimpl.h" #include "player_activity.h" #include "point.h" #include "recipe.h" #include "recipe_groups.h" #include "requirements.h" +#include "ret_val.h" #include "rng.h" #include "simple_pathfinding.h" #include "skill.h" +#include "stomach.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui.h" @@ -80,9 +100,6 @@ #include "visitable.h" #include "vpart_position.h" #include "weather.h" -#include "weighted_list.h" - -class character_id; static const activity_id ACT_MOVE_LOOT( "ACT_MOVE_LOOT" ); diff --git a/src/faction_camp.h b/src/faction_camp.h index f241a8b38ba73..f57f2d81ee9d7 100644 --- a/src/faction_camp.h +++ b/src/faction_camp.h @@ -2,7 +2,6 @@ #ifndef CATA_SRC_FACTION_CAMP_H #define CATA_SRC_FACTION_CAMP_H -#include #include #include #include @@ -17,7 +16,7 @@ class window; } // namespace catacurses class npc; struct mission_entry; -struct point; + namespace base_camps { enum tab_mode : int; diff --git a/src/fault.cpp b/src/fault.cpp index 8a4c9ce69d5ce..0ef3313581c02 100644 --- a/src/fault.cpp +++ b/src/fault.cpp @@ -1,12 +1,15 @@ #include "fault.h" -#include #include #include #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" +#include "item.h" #include "requirements.h" +#include "rng.h" namespace { diff --git a/src/fault.h b/src/fault.h index 703b97b6e8e8f..0b872eefaea2d 100644 --- a/src/fault.h +++ b/src/fault.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "calendar.h" #include "memory_fast.h" @@ -13,12 +14,9 @@ #include "translation.h" #include "type_id.h" -template class generic_factory; - -class fault; -class fault_fix; class JsonObject; -struct requirement_data; +class item; +template class generic_factory; namespace faults { diff --git a/src/field_type.cpp b/src/field_type.cpp index 97be3d2fe041f..7f977abec1201 100644 --- a/src/field_type.cpp +++ b/src/field_type.cpp @@ -1,12 +1,14 @@ #include "field_type.h" -#include +#include +#include #include "debug.h" #include "enum_conversions.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" const field_type_str_id fd_null = field_type_str_id::NULL_ID(); const field_type_str_id fd_acid( "fd_acid" ); diff --git a/src/field_type.h b/src/field_type.h index bd7a464015ebd..fbcd61b22340b 100644 --- a/src/field_type.h +++ b/src/field_type.h @@ -2,12 +2,12 @@ #ifndef CATA_SRC_FIELD_TYPE_H #define CATA_SRC_FIELD_TYPE_H -#include #include #include -#include +#include #include #include +#include #include #include #include @@ -20,16 +20,15 @@ #include "effect.h" #include "effect_source.h" #include "enums.h" -#include "mapdata.h" #include "map_field.h" -#include "translations.h" +#include "mapdata.h" +#include "translation.h" #include "type_id.h" class JsonObject; +struct field_type; template struct enum_traits; - -class field_entry; -struct field_proc_data; +template class generic_factory; enum class description_affix : int { DESCRIPTION_AFFIX_IN, @@ -177,8 +176,6 @@ extern const field_type_str_id fd_tindalos_rift; extern const field_type_str_id fd_toxic_gas; extern const field_type_str_id fd_web; -struct field_type; - struct field_type { public: void load( const JsonObject &jo, std::string_view src ); diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 786e74154731b..dae7f9c69aa26 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -1,16 +1,18 @@ #include "filesystem.h" #include +#include #include -#include -#include #include #include #include +#include #include #include #include -#include +#include +#include +#include #include #if defined(EMSCRIPTEN) @@ -21,7 +23,6 @@ #include "debug.h" #if defined(_WIN32) -# include "platform_win.h" static const std::array invalid_names = { std::string_view( "CON" ), diff --git a/src/filesystem.h b/src/filesystem.h index ac5fe5e94746f..2a7731b7c0f13 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -3,14 +3,10 @@ #define CATA_SRC_FILESYSTEM_H #include -#include #include // IWYU pragma: keep #include #include "cata_path.h" -#include "catacharset.h" -#include "compatibility.h" -#include "path_info.h" bool assure_dir_exist( const std::string &path ); bool dir_exist( const std::string &path ); diff --git a/src/flag.cpp b/src/flag.cpp index cf08715074c5d..2e88e406cc76e 100644 --- a/src/flag.cpp +++ b/src/flag.cpp @@ -1,11 +1,10 @@ #include "flag.h" +#include + #include "debug.h" #include "flexbuffer_json-inl.h" -#include "flexbuffer_json.h" #include "generic_factory.h" -#include "init.h" -#include "json_error.h" #include "type_id.h" const flag_id flag_ABLATIVE_LARGE( "ABLATIVE_LARGE" ); diff --git a/src/font_loader.cpp b/src/font_loader.cpp index cae84f2b5494d..774b951092b02 100644 --- a/src/font_loader.cpp +++ b/src/font_loader.cpp @@ -1,5 +1,21 @@ #include "font_loader.h" +#include +#include +#include +#include +#include +#include + +#include "cata_path.h" +#include "cata_utility.h" +#include "debug.h" +#include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "json.h" +#include "path_info.h" + #if defined( TILES ) #include "json_loader.h" diff --git a/src/font_loader.h b/src/font_loader.h index 9ba43fd87c205..fab372eed5f18 100644 --- a/src/font_loader.h +++ b/src/font_loader.h @@ -4,21 +4,19 @@ #define IMGUI_DEFINE_MATH_OPERATORS #include +#include +#include + +class JsonObject; +class cata_path; + #undef IMGUI_DEFINE_MATH_OPERATORS #if defined( TILES ) -#include -#include #include #include -#include "cata_utility.h" -#include "debug.h" -#include "filesystem.h" -#include "json.h" -#include "path_info.h" - // The font-configuration values modifiable by the user. struct font_config { // Path to the font file. diff --git a/src/fragment_cloud.h b/src/fragment_cloud.h index a36a1ad4ca058..f5e3c3fc0999e 100644 --- a/src/fragment_cloud.h +++ b/src/fragment_cloud.h @@ -3,6 +3,7 @@ #define CATA_SRC_FRAGMENT_CLOUD_H enum class quadrant : int; + /* * fragment_cloud represents the density and velocity of fragments passing through a square. */ diff --git a/src/fungal_effects.cpp b/src/fungal_effects.cpp index 3968c957b270b..57f67f4c7e1a2 100644 --- a/src/fungal_effects.cpp +++ b/src/fungal_effects.cpp @@ -1,9 +1,11 @@ #include "fungal_effects.h" -#include #include #include +#include +#include +#include "bodypart.h" #include "calendar.h" #include "character.h" #include "coordinates.h" @@ -14,7 +16,6 @@ #include "field_type.h" #include "game.h" #include "item.h" -#include "item_stack.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -23,7 +24,6 @@ #include "mtype.h" #include "point.h" #include "rng.h" -#include "string_formatter.h" #include "translations.h" #include "type_id.h" diff --git a/src/game.cpp b/src/game.cpp index f178310a8b281..49f9c39ecd45d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -5,12 +5,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include "action.h" #include "activity_actor_definitions.h" #include "activity_handlers.h" -#include "activity_type.h" #include "ascii_art.h" #include "auto_note.h" #include "auto_pickup.h" @@ -59,14 +59,13 @@ #include "cata_utility.h" #include "cata_variant.h" #include "catacharset.h" +#include "char_validity_check.h" #include "character.h" #include "character_attire.h" #include "character_martial_arts.h" -#include "char_validity_check.h" #include "city.h" #include "climbing.h" #include "clzones.h" -#include "colony.h" #include "color.h" #include "computer.h" #include "computer_session.h" @@ -98,8 +97,8 @@ #include "field_type.h" #include "filesystem.h" #include "flag.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "game_inventory.h" #include "game_ui.h" @@ -107,6 +106,7 @@ #include "gates.h" #include "get_version.h" #include "harvest.h" +#include "hash_utils.h" #include "iexamine.h" #include "imgui/imgui_stdlib.h" #include "init.h" @@ -121,7 +121,6 @@ #include "item_location.h" #include "item_pocket.h" #include "item_search.h" -#include "item_stack.h" #include "iteminfo_query.h" #include "itype.h" #include "iuse.h" @@ -156,6 +155,7 @@ #include "move_mode.h" #include "mtype.h" #include "npc.h" +#include "npc_opinion.h" #include "npctrade.h" #include "omdata.h" #include "options.h" @@ -169,6 +169,7 @@ #include "pathfinding.h" #include "pickup.h" #include "player_activity.h" +#include "point.h" #include "popup.h" #include "profession.h" #include "proficiency.h" @@ -186,12 +187,14 @@ #include "stats_tracker.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "submap.h" #include "talker.h" #include "text_snippets.h" #include "tileray.h" #include "timed_event.h" #include "translation.h" #include "translation_cache.h" +#include "translation_manager.h" #include "translations.h" #include "trap.h" #include "ui.h" @@ -208,16 +211,29 @@ #include "visitable.h" #include "vpart_position.h" #include "vpart_range.h" -#include "wcwidth.h" #include "weakpoint.h" #include "weather.h" #include "weather_type.h" #include "worldfactory.h" #if defined(TILES) +#include "cata_tiles.h" #include "sdl_utils.h" +#include "sdl_wrappers.h" #endif // TILES +#if defined(_WIN32) +#if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU +# include "platform_win.h" // IWYU pragma: keep +#endif + +#include // for SYSTEMTIME +#include // for WIN32 +#include // for ??? +#include // for GetLocalTime +#include // for ?? +#endif + #if defined(__clang__) || defined(__GNUC__) #define UNUSED __attribute__((unused)) #else @@ -379,17 +395,6 @@ static const trait_id trait_WAYFARER( "WAYFARER" ); static const zone_type_id zone_type_LOOT_CUSTOM( "LOOT_CUSTOM" ); static const zone_type_id zone_type_NO_AUTO_PICKUP( "NO_AUTO_PICKUP" ); -#if defined(TILES) -#include "cata_tiles.h" -#endif // TILES - -#if defined(_WIN32) -#if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU -# include "platform_win.h" -#endif -# include -#endif - #define dbg(x) DebugLog((x),D_GAME) << __FILE__ << ":" << __LINE__ << ": " static constexpr int DANGEROUS_PROXIMITY = 5; @@ -2935,8 +2940,6 @@ bool game::is_game_over() return false; } -class end_screen_data; - class end_screen_data { friend class end_screen_ui_impl; diff --git a/src/game.h b/src/game.h index 90831f12d145a..26147fb601868 100644 --- a/src/game.h +++ b/src/game.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include @@ -21,21 +21,26 @@ #include "character.h" #include "character_id.h" #include "color.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "creature.h" #include "cursesdef.h" #include "enums.h" -#include "game_constants.h" #include "global_vars.h" +#include "input_context.h" +#include "item.h" #include "item_location.h" +#include "map_scale_constants.h" #include "memory_fast.h" +#include "monster.h" #include "overmap_ui.h" #include "pimpl.h" -#include "point.h" #include "type_id.h" +#include "ui_manager.h" #include "units_fwd.h" #include "weather.h" +struct tripoint; + constexpr int DEFAULT_TILESET_ZOOM = 16; // The reference to the one and only game instance. @@ -46,8 +51,6 @@ extern std::unique_ptr g; extern const int savegame_version; extern int savegame_loading_version; -class input_context; - input_context get_default_mode_input_context(); enum quit_status { @@ -65,8 +68,6 @@ enum safe_mode_type { SAFE_MODE_STOP = 2, // New monsters spotted, no movement allowed }; -enum action_id : int; - class JsonValue; class achievements_tracker; class avatar; @@ -76,13 +77,11 @@ class eoc_events; class event_bus; class faction_manager; class field_entry; -class item; class kill_tracker; class live_view; class map; class map_item_stack; class memorial_logger; -class monster; class npc; class npc_template; class overmap; @@ -93,10 +92,10 @@ class spell_events; class static_popup; class stats_tracker; class timed_event_manager; -class ui_adaptor; class uilist; class vehicle; class viewer; +enum action_id : int; struct special_game; struct visibility_variables; template class tripoint_range; diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp index ba856e7c1ee27..6309606fb4687 100644 --- a/src/game_inventory.cpp +++ b/src/game_inventory.cpp @@ -1,10 +1,10 @@ #include "game_inventory.h" +#include #include #include -#include +#include #include -#include #include #include #include @@ -12,7 +12,6 @@ #include #include -#include "activity_type.h" #include "activity_actor_definitions.h" #include "avatar.h" #include "bionics.h" @@ -20,28 +19,37 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "character_id.h" #include "color.h" -#include "cursesdef.h" +#include "coordinates.h" #include "damage.h" #include "debug.h" #include "display.h" #include "enums.h" #include "flag.h" #include "game.h" +#include "game_constants.h" #include "input.h" #include "input_context.h" #include "inventory.h" #include "inventory_ui.h" #include "item.h" +#include "item_contents.h" #include "item_location.h" #include "item_pocket.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" +#include "map.h" +#include "mapdata.h" #include "messages.h" +#include "npc.h" #include "npctrade.h" #include "options.h" +#include "output.h" #include "pimpl.h" +#include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "recipe.h" #include "recipe_dictionary.h" @@ -50,13 +58,14 @@ #include "skill.h" #include "stomach.h" #include "string_formatter.h" +#include "text.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui_manager.h" #include "units.h" #include "units_utility.h" #include "value_ptr.h" -#include "veh_type.h" #include "vitamin.h" static const activity_id ACT_CONSUME_DRINK_MENU( "ACT_CONSUME_DRINK_MENU" ); diff --git a/src/game_inventory.h b/src/game_inventory.h index 953c01cbe4cbd..016ded9438b9d 100644 --- a/src/game_inventory.h +++ b/src/game_inventory.h @@ -4,17 +4,23 @@ #include #include +#include +#include +#include #include +#include #include "cata_imgui.h" +#include "coords_fwd.h" +#include "input_context.h" #include "inventory_ui.h" #include "item.h" #include "item_location.h" +#include "point.h" #include "type_id.h" +#include "units_fwd.h" class Character; -struct tripoint; - class repair_item_actor; class salvage_actor; diff --git a/src/gamemode_tutorial.cpp b/src/gamemode_tutorial.cpp index 3b77f5d6f651a..8acb3059ce90c 100644 --- a/src/gamemode_tutorial.cpp +++ b/src/gamemode_tutorial.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "action.h" #include "avatar.h" @@ -11,20 +12,25 @@ #include "debug.h" #include "game.h" #include "item.h" +#include "item_location.h" #include "loading_ui.h" #include "map.h" #include "map_iterator.h" -#include "mapdata.h" +#include "omdata.h" #include "output.h" #include "overmap.h" #include "overmapbuffer.h" +#include "pocket_type.h" #include "point.h" #include "profession.h" #include "scent_map.h" +#include "stomach.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "type_id.h" +#include "units.h" #include "weather.h" static const furn_str_id furn_f_rack( "f_rack" ); diff --git a/src/gamemode_tutorial.h b/src/gamemode_tutorial.h index c67ea68656ede..8730686304ac2 100644 --- a/src/gamemode_tutorial.h +++ b/src/gamemode_tutorial.h @@ -11,8 +11,6 @@ template struct enum_traits; -enum action_id : int; - enum class tut_lesson : int { LESSON_INTRO = 0, LESSON_MOVE, LESSON_MOVEMENT_MODES, LESSON_LOOK, LESSON_OPEN, LESSON_CLOSE, LESSON_SMASH, diff --git a/src/gates.cpp b/src/gates.cpp index c44c635b8e578..987f20d23e525 100644 --- a/src/gates.cpp +++ b/src/gates.cpp @@ -2,29 +2,38 @@ #include #include +#include #include #include -#include +#include +#include #include #include "activity_actor_definitions.h" #include "avatar.h" +#include "bodypart.h" #include "character.h" -#include "colony.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" // TODO: This is a circular dependency #include "generic_factory.h" #include "iexamine.h" #include "item.h" -#include "json.h" +#include "itype.h" #include "map.h" #include "mapdata.h" #include "messages.h" +#include "monster.h" #include "player_activity.h" #include "point.h" +#include "rng.h" +#include "sounds.h" +#include "translation.h" #include "translations.h" #include "units.h" #include "vehicle.h" diff --git a/src/gates.h b/src/gates.h index 0c9b7ca806e79..22a92bb98ee11 100644 --- a/src/gates.h +++ b/src/gates.h @@ -3,6 +3,7 @@ #define CATA_SRC_GATES_H #include +#include #include "coords_fwd.h" #include "type_id.h" diff --git a/src/generic_factory.cpp b/src/generic_factory.cpp index cf515a12e64a9..39c4004e21ab8 100644 --- a/src/generic_factory.cpp +++ b/src/generic_factory.cpp @@ -1,5 +1,9 @@ #include "generic_factory.h" +#include "catacharset.h" +#include "output.h" +#include "wcwidth.h" + bool one_char_symbol_reader( const JsonObject &jo, const std::string_view member_name, int &sym, bool ) { diff --git a/src/generic_factory.h b/src/generic_factory.h index 1a663f5e66f91..c0e4bf5ed9318 100644 --- a/src/generic_factory.h +++ b/src/generic_factory.h @@ -4,25 +4,34 @@ #include #include +#include +#include +#include #include +#include +#include +#include +#include #include +#include #include -#include "assign.h" #include "cached_options.h" -#include "catacharset.h" #include "cata_scope_helpers.h" -#include "cata_type_traits.h" +#include "cata_utility.h" #include "debug.h" -#include "enum_bitset.h" +#include "demangle.h" +#include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "init.h" #include "int_id.h" -#include "json.h" #include "mod_tracker.h" -#include "output.h" +#include "string_formatter.h" #include "string_id.h" #include "units.h" -#include "wcwidth.h" + +template class enum_bitset; /** A generic class to store objects identified by a `string_id`. @@ -112,9 +121,6 @@ const my_class &string_id::obj() const \endcode */ -template -class string_id_reader; - template class generic_factory { diff --git a/src/global_vars.h b/src/global_vars.h index 2500fd3cb7e8d..ecad8e4fabbf7 100644 --- a/src/global_vars.h +++ b/src/global_vars.h @@ -5,6 +5,8 @@ #include "json.h" +class JsonObject; + enum class var_type : int { u, npc, diff --git a/src/grab.cpp b/src/grab.cpp index fbda00296a7ac..812a3e0c3c537 100644 --- a/src/grab.cpp +++ b/src/grab.cpp @@ -1,21 +1,24 @@ #include "game.h" // IWYU pragma: associated +#include #include +#include #include #include "avatar.h" #include "debug.h" #include "map.h" #include "messages.h" +#include "point.h" #include "rng.h" #include "sounds.h" #include "tileray.h" #include "translations.h" +#include "units.h" #include "units_utility.h" #include "vehicle.h" #include "vpart_position.h" #include "vpart_range.h" -#include bool game::grabbed_veh_move( const tripoint_rel_ms &dp ) { diff --git a/src/gun_mode.h b/src/gun_mode.h index 0f18269857ea8..efb1fd20f544a 100644 --- a/src/gun_mode.h +++ b/src/gun_mode.h @@ -5,7 +5,7 @@ #include #include -#include "translations.h" +#include "translation.h" class item; diff --git a/src/handle_action.cpp b/src/handle_action.cpp index 8c2a3fa28d723..57ca04576f95b 100644 --- a/src/handle_action.cpp +++ b/src/handle_action.cpp @@ -5,13 +5,14 @@ #include #include #include +#include #include #include +#include #include #include "action.h" #include "activity_actor_definitions.h" -#include "activity_type.h" #include "advanced_inv.h" #include "auto_note.h" #include "auto_pickup.h" @@ -22,6 +23,7 @@ #include "bodypart.h" #include "cached_options.h" #include "calendar.h" +#include "cata_utility.h" #include "catacharset.h" #include "character.h" #include "character_attire.h" @@ -57,8 +59,8 @@ #include "itype.h" #include "iuse.h" #include "level_cache.h" -#include "line.h" #include "magic.h" +#include "magic_type.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" @@ -70,12 +72,12 @@ #include "move_mode.h" #include "mtype.h" #include "mutation.h" -#include "npc.h" #include "options.h" #include "output.h" #include "overmap_ui.h" #include "panels.h" #include "player_activity.h" +#include "point.h" #include "popup.h" #include "ranged.h" #include "rng.h" @@ -100,6 +102,8 @@ #include "weather_type.h" #include "worldfactory.h" +enum class direction : unsigned int; + #if defined(TILES) #include "cata_tiles.h" // all animation functions will be pushed out to a cata_tiles function in some manner #include "sdltiles.h" diff --git a/src/handle_liquid.cpp b/src/handle_liquid.cpp index 250466ed79736..4c158ea1f8e88 100644 --- a/src/handle_liquid.cpp +++ b/src/handle_liquid.cpp @@ -3,21 +3,20 @@ #include #include #include -#include #include -#include +#include #include #include #include +#include +#include #include #include "action.h" #include "activity_actor_definitions.h" -#include "activity_type.h" #include "cached_options.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "color.h" #include "coordinates.h" #include "debug.h" @@ -34,6 +33,7 @@ #include "player_activity.h" #include "string_formatter.h" #include "translations.h" +#include "type_id.h" #include "ui.h" #include "units.h" #include "veh_interact.h" diff --git a/src/handle_liquid.h b/src/handle_liquid.h index 13dc1f38f5b2d..c53c0e8e92810 100644 --- a/src/handle_liquid.h +++ b/src/handle_liquid.h @@ -4,8 +4,6 @@ #include "coordinates.h" #include "item_location.h" -#include "item_stack.h" -#include "map.h" #include "point.h" class item; diff --git a/src/harvest.cpp b/src/harvest.cpp index c9dbe6c3f1e94..010ed1a04116a 100644 --- a/src/harvest.cpp +++ b/src/harvest.cpp @@ -3,14 +3,15 @@ #include #include #include +#include #include -#include "assign.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" #include "item_group.h" -#include "json.h" #include "output.h" #include "string_formatter.h" #include "text_snippets.h" diff --git a/src/harvest.h b/src/harvest.h index 59b65b394a069..70867defe2581 100644 --- a/src/harvest.h +++ b/src/harvest.h @@ -2,19 +2,18 @@ #ifndef CATA_SRC_HARVEST_H #define CATA_SRC_HARVEST_H -#include -#include -#include #include #include +#include #include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; class butchery_requirements; +template class generic_factory; using butchery_requirements_id = string_id; diff --git a/src/help.cpp b/src/help.cpp index 3812e32f19de9..9f61f2592ef69 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -3,19 +3,26 @@ #include #include #include +#include #include +#include #include #include #include +#include #include #include "action.h" +#include "cata_path.h" +#include "cata_utility.h" #include "catacharset.h" #include "color.h" #include "cursesdef.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input_context.h" -#include "json_error.h" +#include "input_enums.h" #include "output.h" #include "path_info.h" #include "point.h" @@ -24,8 +31,6 @@ #include "translations.h" #include "ui_manager.h" -class JsonObject; - help &get_help() { static help single_instance; diff --git a/src/help.h b/src/help.h index e5ed2b6b8e56d..5b41a33f51ef6 100644 --- a/src/help.h +++ b/src/help.h @@ -2,18 +2,18 @@ #ifndef CATA_SRC_HELP_H #define CATA_SRC_HELP_H -#include #include #include #include #include #include "cuboid_rectangle.h" -#include "input.h" +#include "point.h" +#include "translation.h" -class JsonArray; class JsonObject; -class translation; +struct input_event; + namespace catacurses { class window; diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 9614c31506df1..bbf0173d3331c 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -1,9 +1,12 @@ #include "iexamine.h" #include +#include #include #include #include +#include +#include #include #include #include @@ -12,7 +15,6 @@ #include #include "activity_actor_definitions.h" -#include "activity_type.h" #include "ammo.h" #include "avatar.h" #include "basecamp.h" @@ -21,7 +23,6 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "color.h" #include "construction.h" #include "construction_group.h" @@ -35,6 +36,7 @@ #include "enums.h" #include "event.h" #include "event_bus.h" +#include "faction.h" #include "field_type.h" #include "flag.h" #include "fungal_effects.h" @@ -44,26 +46,29 @@ #include "handle_liquid.h" #include "harvest.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "item.h" +#include "item_components.h" #include "item_location.h" -#include "item_stack.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" -#include "line.h" #include "magic.h" #include "magic_teleporter_list.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" +#include "memory_fast.h" #include "messages.h" #include "mission_companion.h" #include "mtype.h" #include "mutation.h" #include "npc.h" +#include "omdata.h" #include "options.h" #include "output.h" #include "overmap.h" @@ -72,13 +77,15 @@ #include "player_activity.h" #include "point.h" #include "recipe.h" -#include "recipe_dictionary.h" #include "requirements.h" #include "rng.h" #include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "talker.h" // IWYU pragma: keep +#include "tileray.h" #include "timed_event.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "try_parse_integer.h" @@ -92,6 +99,7 @@ #include "vehicle_selector.h" #include "visitable.h" #include "vpart_position.h" +#include "vpart_range.h" #include "weather.h" static const activity_id ACT_ATM( "ACT_ATM" ); diff --git a/src/iexamine.h b/src/iexamine.h index 2f2b0b71a75f1..b348eee5e7663 100644 --- a/src/iexamine.h +++ b/src/iexamine.h @@ -2,11 +2,10 @@ #ifndef CATA_SRC_IEXAMINE_H #define CATA_SRC_IEXAMINE_H -#include #include #include #include -#include +#include #include #include @@ -14,13 +13,12 @@ #include "ret_val.h" #include "type_id.h" -class item; -class JsonObject; class Character; +class JsonObject; +class item; class time_point; class vpart_reference; struct itype; -struct tripoint; using seed_tuple = std::tuple; diff --git a/src/iexamine_actors.cpp b/src/iexamine_actors.cpp index 4b0c70539291d..5a4ba80dc6fa7 100644 --- a/src/iexamine_actors.cpp +++ b/src/iexamine_actors.cpp @@ -1,17 +1,36 @@ #include "iexamine_actors.h" -#include "avatar.h" +#include +#include +#include +#include + +#include "calendar.h" +#include "character.h" +#include "coordinates.h" +#include "creature.h" +#include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "generic_factory.h" -#include "itype.h" +#include "item.h" +#include "item_location.h" #include "map.h" +#include "map_iterator.h" #include "mapgen_functions.h" #include "mapgendata.h" -#include "map_iterator.h" #include "messages.h" +#include "monster.h" #include "mtype.h" #include "output.h" +#include "point.h" +#include "ret_val.h" +#include "talker.h" +#include "translations.h" +#include "ui.h" #include "veh_appliance.h" static const ter_str_id ter_t_door_metal_c( "t_door_metal_c" ); diff --git a/src/iexamine_actors.h b/src/iexamine_actors.h index c50aa93f693cb..131bfe2601eff 100644 --- a/src/iexamine_actors.h +++ b/src/iexamine_actors.h @@ -2,9 +2,14 @@ #ifndef CATA_SRC_IEXAMINE_ACTORS_H #define CATA_SRC_IEXAMINE_ACTORS_H -#include "iexamine.h" - #include +#include +#include +#include + +#include "coords_fwd.h" +#include "iexamine.h" +#include "type_id.h" class Character; class item_location; diff --git a/src/imgui_demo.cpp b/src/imgui_demo.cpp index db3e16c8109db..657ead1dd00b6 100644 --- a/src/imgui_demo.cpp +++ b/src/imgui_demo.cpp @@ -1,11 +1,14 @@ #include "imgui_demo.h" #include +#include #include "cata_imgui.h" -#include "ui_manager.h" +#include "color.h" #include "input_context.h" +#include "text.h" #include "translations.h" +#include "ui_manager.h" imgui_demo_ui::imgui_demo_ui(): cataimgui::window( _( "ImGui Demo Screen" ) ) diff --git a/src/imgui_demo.h b/src/imgui_demo.h index bb3071830a07d..6004706f95106 100644 --- a/src/imgui_demo.h +++ b/src/imgui_demo.h @@ -2,8 +2,15 @@ #ifndef CATA_SRC_IMGUI_DEMO_H #define CATA_SRC_IMGUI_DEMO_H +#include + #include "cata_imgui.h" +namespace cataimgui +{ +struct Paragraph; +} // namespace cataimgui + class imgui_demo_ui : public cataimgui::window { public: diff --git a/src/init.cpp b/src/init.cpp index 23757cbc41149..4fdc96bcdab4b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,14 +1,18 @@ #include "init.h" +#include #include +#include #include #include #include #include +#include #include #include "achievement.h" #include "activity_type.h" +#include "addiction.h" #include "ammo.h" #include "ammo_effect.h" #include "anatomy.h" @@ -31,6 +35,7 @@ #include "construction_group.h" #include "crafting_gui.h" #include "creature.h" +#include "damage.h" #include "debug.h" #include "dialogue.h" #include "disease.h" @@ -44,7 +49,10 @@ #include "field_type.h" #include "filesystem.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "gates.h" +#include "global_vars.h" #include "harvest.h" #include "help.h" #include "input.h" @@ -52,19 +60,21 @@ #include "item_category.h" #include "item_factory.h" #include "itype.h" +#include "json_error.h" #include "json_loader.h" #include "loading_ui.h" #include "lru_cache.h" #include "magic.h" #include "magic_enchantment.h" #include "magic_ter_furn_transform.h" +#include "magic_type.h" #include "map_extras.h" #include "mapdata.h" #include "mapgen.h" #include "martialarts.h" #include "material.h" -#include "mission.h" #include "math_parser_jmath.h" +#include "mission.h" #include "mod_tileset.h" #include "monfaction.h" #include "mongroup.h" @@ -72,10 +82,12 @@ #include "mood_face.h" #include "morale_types.h" #include "move_mode.h" +#include "mtype.h" #include "mutation.h" #include "npc.h" #include "npc_class.h" #include "omdata.h" +#include "options.h" #include "overlay_ordering.h" #include "overmap.h" #include "overmap_connection.h" @@ -92,12 +104,15 @@ #include "scenario.h" #include "scent_map.h" #include "sdltiles.h" // IWYU pragma: keep +#include "shop_cons_rate.h" #include "skill.h" #include "skill_boost.h" #include "sounds.h" #include "speech.h" #include "speed_description.h" #include "start_location.h" +#include "string_formatter.h" +#include "subbodypart.h" #include "test_data.h" #include "text_snippets.h" #include "translations.h" diff --git a/src/init.h b/src/init.h index c7f3d0184e85c..8b6537eac1884 100644 --- a/src/init.h +++ b/src/init.h @@ -11,12 +11,11 @@ #include #include +#include "cata_path.h" #include "memory_fast.h" -#include "path_info.h" class JsonObject; class JsonValue; -struct json_source_location; /** * This class is used to load (and unload) the dynamic diff --git a/src/input.cpp b/src/input.cpp index 8362bc90d5721..c40de5db82e7d 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -3,8 +3,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -19,8 +19,8 @@ #include "catacharset.h" #include "debug.h" #include "filesystem.h" -#include "flexbuffer_json-inl.h" #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input_context.h" // IWYU pragma: keep #include "json.h" #include "json_error.h" diff --git a/src/input.h b/src/input.h index b6810ee2b4206..33482644855d2 100644 --- a/src/input.h +++ b/src/input.h @@ -10,7 +10,6 @@ #include "translation.h" class cata_path; -class keybindings_ui; // Curses key constants constexpr int KEY_ESCAPE = 27; diff --git a/src/input_context.cpp b/src/input_context.cpp index cb5cdd0160d0c..7a813be431da0 100644 --- a/src/input_context.cpp +++ b/src/input_context.cpp @@ -3,36 +3,33 @@ #include #include #include +#include #include #include -#include #include #include #include +#include #include #include "action.h" +#include "cata_imgui.h" #include "cata_utility.h" #include "catacharset.h" #include "color.h" #include "coordinates.h" -#include "cuboid_rectangle.h" -#include "cursesdef.h" #include "game.h" -#include "help.h" #include "input.h" -#include "map.h" +#include "map.h" // IWYU pragma: keep #include "options.h" #include "output.h" #include "point.h" #include "popup.h" #include "sdltiles.h" // IWYU pragma: keep #include "string_formatter.h" -#include "string_input_popup.h" #include "translations.h" +#include "ui.h" #include "ui_manager.h" -#include "cata_imgui.h" -#include "imgui/imgui.h" enum class kb_menu_status { remove, reset, add, add_global, execute, show, filter diff --git a/src/input_context.h b/src/input_context.h index 380f12f5f0d6d..ab4e87e650b48 100644 --- a/src/input_context.h +++ b/src/input_context.h @@ -13,14 +13,14 @@ #endif #include "action.h" +#include "coords_fwd.h" #include "input_enums.h" #include "point.h" #include "translation.h" +class hotkey_queue; enum class kb_menu_status; -class hotkey_queue; -class keybindings_ui; namespace catacurses { class window; diff --git a/src/input_popup.cpp b/src/input_popup.cpp index 8bfcfbfedf65d..e5c6772a4c34d 100644 --- a/src/input_popup.cpp +++ b/src/input_popup.cpp @@ -1,12 +1,15 @@ #include "input_popup.h" -#include "cata_utility.h" +#include + #include "imgui/imgui.h" -#include "imgui/imgui_internal.h" #include "imgui/imgui_stdlib.h" +#include "input_enums.h" +#include "text.h" +#include "translations.h" #include "ui.h" -#include "uistate.h" #include "ui_manager.h" +#include "uistate.h" input_popup::input_popup( int width, const std::string &title, const point &pos, ImGuiWindowFlags flags ) : diff --git a/src/input_popup.h b/src/input_popup.h index 2bbd1fc8d8bdd..6828cfd9570c8 100644 --- a/src/input_popup.h +++ b/src/input_popup.h @@ -2,12 +2,20 @@ #ifndef CATA_SRC_INPUT_POPUP_H #define CATA_SRC_INPUT_POPUP_H -#include +#include +#include +#include +#include +#include +#include +#include #include "cata_imgui.h" #include "color.h" #include "imgui/imgui.h" #include "input_context.h" +#include "point.h" +#include "translation.h" struct callback_input { std::string action; diff --git a/src/inventory.cpp b/src/inventory.cpp index d90dcacd3f8d3..212a25fd0348c 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -4,23 +4,22 @@ #include #include #include +#include #include #include -#include #include "avatar.h" #include "calendar.h" #include "character.h" -#include "colony.h" -#include "damage.h" +#include "coordinates.h" #include "debug.h" #include "enums.h" #include "flag.h" #include "iexamine.h" #include "inventory_ui.h" // auto inventory blocking +#include "item_components.h" #include "item_stack.h" #include "itype.h" -#include "make_static.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -30,11 +29,11 @@ #include "pocket_type.h" #include "point.h" #include "proficiency.h" -#include "ret_val.h" #include "rng.h" #include "translations.h" #include "type_id.h" #include "units.h" +#include "value_ptr.h" #include "vpart_position.h" static const itype_id itype_acetaminophen( "acetaminophen" ); @@ -51,8 +50,6 @@ static const itype_id itype_tramadol( "tramadol" ); static const material_id material_iron( "iron" ); -struct itype; - const invlet_wrapper inv_chars( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#&()+.:;=@[\\]^_{|}" ); diff --git a/src/inventory.h b/src/inventory.h index 2f4cde2f35285..545a1e18a484e 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -7,11 +7,12 @@ #include #include #include -#include #include #include #include #include +#include +#include #include #include #include @@ -20,7 +21,6 @@ #include "cata_utility.h" #include "coords_fwd.h" #include "item.h" -#include "magic_enchantment.h" #include "proficiency.h" #include "type_id.h" #include "units_fwd.h" @@ -30,10 +30,10 @@ class Character; class JsonArray; class JsonOut; class JsonValue; +class item_components; class item_stack; class map; class npc; -struct tripoint; using invstack = std::list >; using invslice = std::vector *>; diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index ea64f29be3d9b..cdc2413a8c85d 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -1,7 +1,10 @@ #include "inventory_ui.h" -#include +#include #include +#include +#include +#include #include "activity_actor_definitions.h" #include "avatar_action.h" @@ -10,20 +13,30 @@ #include "cata_utility.h" #include "catacharset.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" #include "cuboid_rectangle.h" #include "debug.h" +#include "enum_conversions.h" #include "enums.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_inventory.h" -#include "inventory.h" #include "input.h" +#include "input_enums.h" +#include "inventory.h" #include "item.h" #include "item_category.h" +#include "item_contents.h" #include "item_pocket.h" #include "item_search.h" #include "item_stack.h" #include "item_tname.h" +#include "json.h" #include "line.h" +#include "localized_comparator.h" #include "make_static.h" #include "map.h" #include "map_selector.h" @@ -32,18 +45,19 @@ #include "options.h" #include "output.h" #include "point.h" -#include "popup.h" #include "ret_val.h" #include "sdltiles.h" -#include "localized_comparator.h" #include "string_formatter.h" #include "string_input_popup.h" #include "trade_ui.h" +#include "translation.h" +#include "translation_cache.h" #include "translations.h" #include "type_id.h" -#include "uistate.h" +#include "ui.h" #include "ui_iteminfo.h" #include "ui_manager.h" +#include "uistate.h" #include "units.h" #include "units_utility.h" #include "vehicle.h" @@ -61,7 +75,6 @@ #include #include #include -#include #include #include diff --git a/src/inventory_ui.h b/src/inventory_ui.h index 798b32978a295..c8c962bbc7e71 100644 --- a/src/inventory_ui.h +++ b/src/inventory_ui.h @@ -2,6 +2,7 @@ #ifndef CATA_SRC_INVENTORY_UI_H #define CATA_SRC_INVENTORY_UI_H +#include #include #include #include @@ -11,30 +12,36 @@ #include #include #include +#include #include #include #include "color.h" +#include "coords_fwd.h" #include "cuboid_rectangle.h" #include "cursesdef.h" #include "debug.h" #include "input_context.h" -#include "item_category.h" #include "item_location.h" #include "memory_fast.h" -#include "pocket_type.h" #include "pimpl.h" +#include "pocket_type.h" +#include "point.h" #include "translations.h" #include "units_fwd.h" -class basecamp; class Character; +class JsonObject; +class JsonOut; +class basecamp; class inventory_selector_preset; class item; +class item_category; class item_stack; class string_input_popup; class tinymap; class ui_adaptor; +template struct enum_traits; enum class navigation_mode : int { ITEM = 0, @@ -217,6 +224,7 @@ class inventory_entry }; struct inventory_selector_save_state; + class inventory_selector_preset { public: diff --git a/src/item.cpp b/src/item.cpp index aa440ae88f064..2968e5757cfe0 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -3,19 +3,23 @@ #include #include #include -#include +#include #include -#include #include +#include #include #include #include +#include #include #include #include #include +#include #include +#include #include +#include #include #include @@ -23,28 +27,29 @@ #include "ascii_art.h" #include "avatar.h" #include "bionics.h" +#include "body_part_set.h" #include "bodygraph.h" #include "bodypart.h" +#include "cached_options.h" #include "calendar.h" #include "cata_assert.h" #include "cata_utility.h" -#include "catacharset.h" #include "character.h" #include "character_id.h" #include "character_martial_arts.h" #include "city.h" #include "clothing_mod.h" -#include "clzones.h" #include "color.h" #include "coordinates.h" #include "craft_command.h" #include "creature.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "dispersion.h" -#include "display.h" #include "effect.h" // for weed_msg #include "effect_source.h" +#include "enum_bitset.h" #include "enum_traits.h" #include "enums.h" #include "explosion.h" @@ -53,8 +58,12 @@ #include "field_type.h" #include "fire.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" +#include "game_inventory.h" +#include "generic_factory.h" #include "gun_mode.h" #include "iexamine.h" #include "inventory.h" @@ -72,13 +81,15 @@ #include "magic_enchantment.h" #include "make_static.h" #include "map.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "martialarts.h" #include "material.h" +#include "math_defines.h" #include "messages.h" #include "mod_manager.h" #include "monster.h" #include "mtype.h" -#include "mutation.h" #include "npc.h" #include "options.h" #include "output.h" @@ -98,24 +109,27 @@ #include "skill.h" #include "stomach.h" #include "string_formatter.h" -#include "string_id.h" #include "string_id_utils.h" +#include "subbodypart.h" +#include "talker.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "trait_group.h" #include "trap.h" #include "try_parse_integer.h" #include "units.h" -#include "units_fwd.h" #include "units_utility.h" #include "value_ptr.h" +#include "veh_type.h" #include "vehicle.h" #include "vitamin.h" -#include "veh_type.h" #include "vpart_position.h" +#include "vpart_range.h" #include "weather.h" #include "weather_gen.h" #include "weather_type.h" +#include "weighted_list.h" static const std::string GUN_MODE_VAR_NAME( "item::mode" ); static const std::string CLOTHING_MOD_VAR_PREFIX( "clothing_mod_" ); @@ -238,8 +252,6 @@ static const int PRICE_FILTHY_MALUS = 100; // cents static constexpr float MIN_LINK_EFFICIENCY = 0.001f; -class npc_class; - using npc_class_id = string_id; light_emission nolight = {0, 0, 0}; diff --git a/src/item.h b/src/item.h index de2a3fb4eb878..4aeb69447490f 100644 --- a/src/item.h +++ b/src/item.h @@ -4,14 +4,14 @@ #include #include +#include #include #include -#include #include #include -#include #include #include +#include #include #include #include @@ -19,55 +19,53 @@ #include "calendar.h" #include "cata_lazy.h" #include "cata_utility.h" -#include "compatibility.h" +#include "color.h" +#include "coordinates.h" +#include "damage.h" #include "enums.h" #include "gun_mode.h" #include "io_tags.h" #include "item_components.h" #include "item_contents.h" #include "item_location.h" +#include "item_pocket.h" #include "item_tname.h" #include "material.h" +#include "point.h" #include "requirements.h" +#include "ret_val.h" +#include "rng.h" #include "safe_reference.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" #include "visitable.h" -#include "vpart_position.h" -#include "rng.h" + class Character; class Creature; class JsonObject; class JsonOut; class book_proficiency_bonuses; -class enchantment; class enchant_cache; -class faction; +class enchantment; class gun_type_type; class gunmod_location; class item; class iteminfo_query; class monster; -class nc_color; -enum class pocket_type; +class optional_vpart_position; class recipe; class relic; -struct part_material; +class vehicle; +enum class pocket_type; struct armor_portion_data; -struct itype_variant_data; struct islot_comestible; struct itype; -struct item_comp; -template -struct comp_selection; -struct tool_comp; +struct itype_variant_data; struct mtype; -struct tripoint; -template -class ret_val; +struct part_material; +template struct comp_selection; // IWYU pragma: keep template struct enum_traits; -class vehicle; namespace enchant_vals { @@ -75,21 +73,14 @@ enum class mod : int; } // namespace enchant_vals using bodytype_id = std::string; -using faction_id = string_id; -class item_category; -struct islot_armor; -struct use_function; - -enum art_effect_passive : int; -enum class side : int; class body_part_set; +class item_category; class map; -struct damage_instance; -struct damage_unit; -struct fire_data; -enum class link_state : int; - +enum class side : int; enum clothing_mod_type : int; +struct fire_data; +struct islot_armor; +struct use_function; struct light_emission { unsigned short luminance; diff --git a/src/item_action.cpp b/src/item_action.cpp index 2430206ea09a1..b38cd788e23dd 100644 --- a/src/item_action.cpp +++ b/src/item_action.cpp @@ -1,6 +1,7 @@ #include "item_action.h" #include +#include #include #include #include @@ -11,28 +12,34 @@ #include #include "avatar.h" -#include "catacharset.h" #include "character.h" #include "clone_ptr.h" +#include "coordinates.h" #include "debug.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "item.h" #include "item_contents.h" #include "item_factory.h" +#include "item_location.h" #include "item_pocket.h" #include "itype.h" #include "iuse.h" #include "make_static.h" #include "output.h" #include "pimpl.h" +#include "pocket_type.h" #include "ret_val.h" #include "string_formatter.h" #include "translations.h" #include "type_id.h" #include "ui.h" +#include "visitable.h" static const std::string errstring( "ERROR" ); diff --git a/src/item_action.h b/src/item_action.h index 4551b09132ca4..c965293b455a0 100644 --- a/src/item_action.h +++ b/src/item_action.h @@ -2,17 +2,16 @@ #ifndef CATA_SRC_ITEM_ACTION_H #define CATA_SRC_ITEM_ACTION_H -#include #include #include #include -#include "translations.h" +#include "translation.h" +class Character; class JsonObject; class item; class item_action; -class Character; using item_action_id = std::string; using item_action_map = std::map< item_action_id, item * >; diff --git a/src/item_category.cpp b/src/item_category.cpp index cbb54d3dab864..9025c4b8e0e28 100644 --- a/src/item_category.cpp +++ b/src/item_category.cpp @@ -1,10 +1,8 @@ #include "item_category.h" -#include - +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" -#include "json.h" namespace { diff --git a/src/item_category.h b/src/item_category.h index 19e5308e8e206..03d7414c19bff 100644 --- a/src/item_category.h +++ b/src/item_category.h @@ -2,14 +2,15 @@ #ifndef CATA_SRC_ITEM_CATEGORY_H #define CATA_SRC_ITEM_CATEGORY_H -#include #include -#include #include +#include +#include +#include #include #include "flat_set.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/item_components.cpp b/src/item_components.cpp index a34529e20c6e7..5f0c870c77192 100644 --- a/src/item_components.cpp +++ b/src/item_components.cpp @@ -1,8 +1,17 @@ #include "item_components.h" +#include +#include + +#include "debug.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "item.h" #include "itype.h" +#include "json.h" +#include "ret_val.h" +#include "rng.h" #include "type_id.h" std::vector item_components::operator[]( const itype_id it_id ) diff --git a/src/item_components.h b/src/item_components.h index b8e3c05adf4c8..f6ecad4b5350b 100644 --- a/src/item_components.h +++ b/src/item_components.h @@ -2,17 +2,17 @@ #ifndef CATA_SRC_ITEM_COMPONENTS_H #define CATA_SRC_ITEM_COMPONENTS_H -#include +#include #include -#include +#include #include #include "type_id.h" #include "value_ptr.h" -class item; class JsonOut; class JsonValue; +class item; template class ret_val; diff --git a/src/item_contents.cpp b/src/item_contents.cpp index 2bf6c84ed2b71..9e2b144d28f48 100644 --- a/src/item_contents.cpp +++ b/src/item_contents.cpp @@ -1,24 +1,28 @@ #include "item_contents.h" #include -#include +#include +#include +#include +#include #include +#include #include +#include #include #include "avatar.h" #include "cata_imgui.h" #include "character.h" #include "color.h" -#include "cursesdef.h" #include "debug.h" #include "enum_conversions.h" #include "enums.h" #include "flat_set.h" -#include "imgui/imgui.h" #include "input.h" -#include "input_popup.h" #include "input_context.h" +#include "input_enums.h" +#include "input_popup.h" #include "inventory.h" #include "item.h" #include "item_category.h" @@ -31,8 +35,8 @@ #include "make_static.h" #include "map.h" #include "output.h" -#include "point.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "units.h" diff --git a/src/item_contents.h b/src/item_contents.h index 0c16a50dec358..d5f496920cdd3 100644 --- a/src/item_contents.h +++ b/src/item_contents.h @@ -4,29 +4,31 @@ #include #include -#include #include #include #include #include +#include #include #include #include "coords_fwd.h" #include "enums.h" #include "item_pocket.h" +#include "pocket_type.h" #include "ret_val.h" #include "type_id.h" -#include "units_fwd.h" +#include "units.h" #include "visitable.h" class Character; +class JsonObject; class JsonOut; class item; class item_location; class iteminfo_query; +class map; struct iteminfo; -struct tripoint; /// NEW!ness to player, if they seen such item already enum class content_newness { diff --git a/src/item_factory.cpp b/src/item_factory.cpp index e3b345038d933..112a3d7f006df 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -13,6 +13,7 @@ #include "ammo.h" #include "assign.h" +#include "body_part_set.h" #include "bodypart.h" #include "cached_options.h" #include "calendar.h" @@ -21,6 +22,7 @@ #include "cata_utility.h" #include "catacharset.h" #include "color.h" +#include "coords_fwd.h" #include "damage.h" #include "debug.h" #include "effect_on_condition.h" @@ -29,6 +31,8 @@ #include "explosion.h" #include "flag.h" #include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" #include "init.h" @@ -36,9 +40,13 @@ #include "item.h" #include "item_contents.h" #include "item_group.h" +#include "item_pocket.h" #include "iuse_actor.h" +#include "mapdata.h" #include "material.h" +#include "mod_tracker.h" #include "options.h" +#include "output.h" #include "pocket_type.h" #include "proficiency.h" #include "recipe.h" @@ -48,16 +56,16 @@ #include "ret_val.h" #include "stomach.h" #include "string_formatter.h" +#include "subbodypart.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "try_parse_integer.h" -#include "ui.h" #include "units.h" #include "value_ptr.h" #include "veh_type.h" #include "vitamin.h" -struct tripoint; template struct enum_traits; static const ammo_effect_str_id ammo_effect_COOKOFF( "COOKOFF" ); diff --git a/src/item_factory.h b/src/item_factory.h index 72a812b4fa012..0cc161e1143e1 100644 --- a/src/item_factory.h +++ b/src/item_factory.h @@ -3,12 +3,13 @@ #define CATA_SRC_ITEM_FACTORY_H #include -#include #include #include #include +#include #include #include +#include #include #include #include diff --git a/src/item_group.cpp b/src/item_group.cpp index 8680b65c6cbf7..c634df9c767e3 100644 --- a/src/item_group.cpp +++ b/src/item_group.cpp @@ -1,32 +1,37 @@ #include "item_group.h" #include -#include -#include +#include +#include #include #include -#include #include #include "calendar.h" #include "cata_assert.h" +#include "cata_scope_helpers.h" #include "cata_utility.h" #include "debug.h" #include "enum_traits.h" #include "enums.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" #include "item_factory.h" #include "itype.h" +#include "iuse.h" #include "iuse_actor.h" -#include "json.h" #include "make_static.h" #include "options.h" #include "pocket_type.h" #include "relic.h" #include "ret_val.h" #include "rng.h" +#include "string_formatter.h" #include "type_id.h" #include "units.h" diff --git a/src/item_group.h b/src/item_group.h index 06b63e4b86a87..1031c5a4ac73d 100644 --- a/src/item_group.h +++ b/src/item_group.h @@ -2,7 +2,8 @@ #ifndef CATA_SRC_ITEM_GROUP_H #define CATA_SRC_ITEM_GROUP_H -#include +#include +#include #include #include #include @@ -11,11 +12,13 @@ #include #include +#include "enums.h" #include "item.h" #include "relic.h" #include "type_id.h" #include "value_ptr.h" +class Item_spawn_data; class JsonObject; class JsonValue; class time_point; diff --git a/src/item_location.cpp b/src/item_location.cpp index 1c89f5eadac70..14be6cb99740b 100644 --- a/src/item_location.cpp +++ b/src/item_location.cpp @@ -1,32 +1,37 @@ #include "item_location.h" #include +#include #include -#include -#include -#include #include #include +#include #include +#include #include #include "character.h" #include "character_id.h" #include "color.h" -#include "creature_tracker.h" #include "debug.h" +#include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "item.h" #include "item_pocket.h" #include "json.h" #include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_selector.h" +#include "pimpl.h" #include "point.h" #include "ret_val.h" #include "safe_reference.h" #include "string_formatter.h" +#include "talker.h" #include "talker_item.h" #include "translations.h" #include "units.h" diff --git a/src/item_location.h b/src/item_location.h index 3b443303bc4d2..3cd095eea699e 100644 --- a/src/item_location.h +++ b/src/item_location.h @@ -6,18 +6,18 @@ #include #include "coordinates.h" +#include "point.h" #include "units_fwd.h" class Character; class JsonObject; class JsonOut; +class const_talker; class item; class item_pocket; class map_cursor; -class vehicle_cursor; class talker; -class const_talker; -struct tripoint; +class vehicle_cursor; template class ret_val; /** diff --git a/src/item_pocket.cpp b/src/item_pocket.cpp index 95884229204af..88584fe9a8dbc 100644 --- a/src/item_pocket.cpp +++ b/src/item_pocket.cpp @@ -1,36 +1,51 @@ #include "item_pocket.h" #include -#include +#include +#include +#include #include #include +#include #include #include "ammo.h" +#include "bodypart.h" #include "calendar.h" +#include "cata_path.h" #include "cata_utility.h" #include "character.h" #include "color.h" +#include "coordinates.h" #include "crafting.h" -#include "creature_tracker.h" +#include "damage.h" #include "debug.h" +#include "enum_traits.h" #include "enums.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "handle_liquid.h" #include "item.h" #include "item_category.h" +#include "item_contents.h" #include "item_factory.h" #include "item_location.h" #include "itype.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "localized_comparator.h" #include "map.h" +#include "material.h" #include "math_defines.h" #include "messages.h" #include "output.h" +#include "path_info.h" +#include "point.h" #include "string_formatter.h" +#include "subbodypart.h" #include "translations.h" #include "units.h" #include "units_utility.h" diff --git a/src/item_pocket.h b/src/item_pocket.h index 3e98e32ea3219..ea258403b3edb 100644 --- a/src/item_pocket.h +++ b/src/item_pocket.h @@ -4,13 +4,13 @@ #include #include -#include #include #include -#include #include #include +#include #include +#include #include #include "coords_fwd.h" @@ -18,21 +18,21 @@ #include "flat_set.h" #include "pocket_type.h" #include "ret_val.h" +#include "translation.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" #include "visitable.h" class Character; +class JsonArray; class JsonObject; class JsonOut; class item; class item_location; +class map; class pocket_data; struct iteminfo; -struct itype; -struct tripoint; -class map; class item_pocket { diff --git a/src/item_search.cpp b/src/item_search.cpp index eaf7fcb54276a..2e21a60e16658 100644 --- a/src/item_search.cpp +++ b/src/item_search.cpp @@ -12,6 +12,7 @@ #include "itype.h" #include "make_static.h" #include "material.h" +#include "math_parser_type.h" #include "requirements.h" #include "type_id.h" diff --git a/src/item_stack.cpp b/src/item_stack.cpp index 71d140ae82a0b..ebbceae17356e 100644 --- a/src/item_stack.cpp +++ b/src/item_stack.cpp @@ -2,15 +2,16 @@ #include +#include "coordinates.h" #include "debug.h" #include "enums.h" #include "item.h" #include "map.h" +#include "mapdata.h" #include "output.h" +#include "point.h" #include "units.h" -struct tripoint; - size_t item_stack::size() const { return items->size(); diff --git a/src/item_tname.cpp b/src/item_tname.cpp index 819d511f4c438..bc787bd19da58 100644 --- a/src/item_tname.cpp +++ b/src/item_tname.cpp @@ -1,6 +1,15 @@ #include "item_tname.h" +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include @@ -9,6 +18,7 @@ #include "color.h" #include "coordinates.h" #include "debug.h" +#include "enum_conversions.h" #include "enums.h" #include "fault.h" #include "flag.h" @@ -21,13 +31,15 @@ #include "map.h" #include "mutation.h" #include "options.h" -#include "point.h" #include "recipe.h" #include "relic.h" #include "string_formatter.h" +#include "translation.h" +#include "translation_cache.h" #include "translations.h" #include "type_id.h" #include "units.h" +#include "value_ptr.h" static const flag_id json_flag_HINT_THE_LOCATION( "HINT_THE_LOCATION" ); diff --git a/src/item_tname.h b/src/item_tname.h index c806001fd1dbe..4135c849a2744 100644 --- a/src/item_tname.h +++ b/src/item_tname.h @@ -2,13 +2,16 @@ #ifndef CATA_SRC_ITEM_TNAME_H #define CATA_SRC_ITEM_TNAME_H +#include #include +#include #include +#include #include "enum_bitset.h" -#include "enum_traits.h" class item; +template struct enum_traits; namespace tname { diff --git a/src/iteminfo_query.h b/src/iteminfo_query.h index 269da704902f3..264f114ec6bf5 100644 --- a/src/iteminfo_query.h +++ b/src/iteminfo_query.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include enum class iteminfo_parts : size_t { diff --git a/src/itype.cpp b/src/itype.cpp index eb5ee11eb5291..247723eb6dafa 100644 --- a/src/itype.cpp +++ b/src/itype.cpp @@ -1,6 +1,7 @@ #include "itype.h" -#include +#include +#include #include #include "ammo.h" @@ -9,12 +10,13 @@ #include "debug.h" #include "item.h" #include "make_static.h" +#include "material.h" #include "recipe.h" +#include "requirements.h" #include "ret_val.h" +#include "subbodypart.h" #include "translations.h" -struct tripoint; - std::string gunmod_location::name() const { // Yes, currently the name is just the translated id. diff --git a/src/itype.h b/src/itype.h index 2764b2f8e6d8f..e59d2223ac0a0 100644 --- a/src/itype.h +++ b/src/itype.h @@ -2,45 +2,46 @@ #ifndef CATA_SRC_ITYPE_H #define CATA_SRC_ITYPE_H -#include #include -#include +#include // IWYU pragma: keep #include #include #include #include #include +#include +#include +#include +#include #include +#include #include +#include "body_part_set.h" #include "bodypart.h" #include "calendar.h" #include "color.h" // nc_color +#include "coords_fwd.h" #include "damage.h" #include "enums.h" // point #include "explosion.h" -#include "game_constants.h" +#include "item.h" #include "item_pocket.h" #include "iuse.h" // use_function #include "mapdata.h" #include "proficiency.h" #include "relic.h" #include "stomach.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" +class Character; class Item_factory; class JsonObject; -class item; -struct tripoint; template struct enum_traits; - -enum art_effect_active : int; -enum art_charge : int; -enum art_charge_req : int; -enum art_effect_passive : int; +// IWYU pragma: no_forward_declare std::hash class gun_modifier_data { diff --git a/src/iuse.cpp b/src/iuse.cpp index 275dc475eef53..bb52be897aa04 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -7,13 +7,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include +#include #include #include #include @@ -21,22 +22,26 @@ #include "action.h" #include "activity_actor_definitions.h" -#include "activity_type.h" #include "avatar.h" #include "avatar_action.h" #include "bionics.h" #include "bodypart.h" +#include "cached_options.h" #include "calendar.h" +#include "cata_assert.h" #include "cata_utility.h" +#include "catacharset.h" #include "character.h" -#include "construction.h" +#include "character_id.h" #include "character_martial_arts.h" #include "city.h" #include "color.h" +#include "construction.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "cuboid_rectangle.h" +#include "cursesdef.h" #include "damage.h" #include "debug.h" #include "effect.h" // for weed_msg @@ -47,6 +52,8 @@ #include "field.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "fungal_effects.h" #include "game.h" #include "game_constants.h" @@ -55,6 +62,7 @@ #include "harvest.h" #include "iexamine.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "inventory_ui.h" #include "item.h" @@ -63,11 +71,15 @@ #include "iteminfo_query.h" #include "itype.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "line.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" +#include "map_selector.h" #include "mapdata.h" #include "martialarts.h" #include "memorial_logger.h" @@ -83,9 +95,11 @@ #include "options.h" #include "output.h" #include "overmap.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "popup.h" // For play_game #include "recipe.h" @@ -93,6 +107,7 @@ #include "requirements.h" #include "ret_val.h" #include "rng.h" +#include "safe_reference.h" #include "sounds.h" #include "speech.h" #include "stomach.h" @@ -100,12 +115,14 @@ #include "string_input_popup.h" #include "teleport.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "try_parse_integer.h" #include "type_id.h" #include "ui.h" #include "ui_manager.h" +#include "units.h" #include "units_utility.h" #include "value_ptr.h" #include "veh_interact.h" @@ -114,7 +131,6 @@ #include "vitamin.h" #include "vpart_position.h" #include "vpart_range.h" -#include "units.h" #include "weather.h" #include "weather_gen.h" #include "weather_type.h" diff --git a/src/iuse.h b/src/iuse.h index e29195c5ab5a7..5475b9ecdcb1f 100644 --- a/src/iuse.h +++ b/src/iuse.h @@ -2,15 +2,17 @@ #ifndef CATA_SRC_IUSE_H #define CATA_SRC_IUSE_H -#include #include #include -#include +#include +#include #include #include "clone_ptr.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "item_location.h" +#include "point.h" +#include "ret_val.h" #include "type_id.h" #include "units.h" @@ -19,7 +21,6 @@ class JsonObject; class item; class monster; struct iteminfo; -template class ret_val; // iuse methods return the number of charges expended, which is usually "1", or no value. // Returning 0 indicates the item has not been used up, though it may have been successfully activated. diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 207cac9f876df..4bfcc7a3e67a1 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -1,38 +1,40 @@ #include "iuse_actor.h" -#include +#include #include #include #include #include +#include #include #include #include #include #include -#include -#include -#include +#include #include "action.h" #include "activity_actor_definitions.h" #include "activity_handlers.h" -#include "activity_type.h" #include "assign.h" #include "avatar.h" // IWYU pragma: keep #include "bionics.h" #include "bodypart.h" #include "calendar.h" +#include "cata_imgui.h" +#include "catacharset.h" #include "character.h" #include "character_id.h" #include "clothing_mod.h" #include "clzones.h" -#include "colony.h" +#include "condition.h" +#include "coordinates.h" #include "crafting.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "effect.h" #include "effect_on_condition.h" #include "enum_conversions.h" @@ -40,22 +42,25 @@ #include "explosion.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" #include "game_inventory.h" #include "generic_factory.h" +#include "global_vars.h" #include "inventory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" #include "item_group.h" #include "item_location.h" #include "item_pocket.h" #include "itype.h" -#include "json.h" -#include "json_loader.h" -#include "line.h" #include "magic.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" #include "material.h" @@ -65,16 +70,19 @@ #include "mtype.h" #include "music.h" #include "mutation.h" +#include "npc.h" #include "output.h" #include "overmap.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "recipe.h" #include "recipe_dictionary.h" #include "requirements.h" #include "rng.h" +#include "safe_reference.h" #include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" @@ -91,9 +99,7 @@ #include "visitable.h" #include "vitamin.h" #include "vpart_position.h" -#include "vpart_range.h" #include "weather.h" -#include "weather_type.h" static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); static const activity_id ACT_REPAIR_ITEM( "ACT_REPAIR_ITEM" ); diff --git a/src/iuse_actor.h b/src/iuse_actor.h index 3b1aa9d016e4f..39e7325c9dce2 100644 --- a/src/iuse_actor.h +++ b/src/iuse_actor.h @@ -3,16 +3,14 @@ #define CATA_SRC_IUSE_ACTOR_H #include -#include #include -#include -#include #include #include #include #include #include +#include "bodypart.h" #include "calendar.h" #include "color.h" #include "coords_fwd.h" @@ -21,7 +19,7 @@ #include "explosion.h" #include "iuse.h" #include "ret_val.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" @@ -31,8 +29,6 @@ class item; class item_location; class npc_template; struct furn_t; -struct iteminfo; -struct tripoint; /** * Transform an item into a specific type. diff --git a/src/iuse_software_kitten.cpp b/src/iuse_software_kitten.cpp index ced35c9cb91fe..88b7608bded33 100644 --- a/src/iuse_software_kitten.cpp +++ b/src/iuse_software_kitten.cpp @@ -4,6 +4,7 @@ #include #include // Needed for rand() #include +#include #include #include #include @@ -11,9 +12,11 @@ #include "cuboid_rectangle.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "output.h" #include "rng.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "ui_manager.h" diff --git a/src/iuse_software_kitten.h b/src/iuse_software_kitten.h index ac61a9d6c9047..d27afdef73f75 100644 --- a/src/iuse_software_kitten.h +++ b/src/iuse_software_kitten.h @@ -2,7 +2,9 @@ #ifndef CATA_SRC_IUSE_SOFTWARE_KITTEN_H #define CATA_SRC_IUSE_SOFTWARE_KITTEN_H -#include +#include +#include +#include #include #include "color.h" diff --git a/src/iuse_software_lightson.cpp b/src/iuse_software_lightson.cpp index 12195923cc590..ef13694aef7cc 100644 --- a/src/iuse_software_lightson.cpp +++ b/src/iuse_software_lightson.cpp @@ -1,5 +1,6 @@ #include "iuse_software_lightson.h" +#include #include #include #include diff --git a/src/iuse_software_sokoban.cpp b/src/iuse_software_sokoban.cpp index 92133c1003966..669dd2355779b 100644 --- a/src/iuse_software_sokoban.cpp +++ b/src/iuse_software_sokoban.cpp @@ -1,6 +1,8 @@ #include "iuse_software_sokoban.h" #include +#include +#include #include #include #include diff --git a/src/iuse_software_sokoban.h b/src/iuse_software_sokoban.h index 3458e888c0ef8..c522205708d4f 100644 --- a/src/iuse_software_sokoban.h +++ b/src/iuse_software_sokoban.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/src/json.cpp b/src/json.cpp index 9b0d48d1a30c1..84effe6bb24d3 100644 --- a/src/json.cpp +++ b/src/json.cpp @@ -19,6 +19,7 @@ #include #include "cached_options.h" +#include "catacharset.h" #include "cata_scope_helpers.h" #include "cata_utility.h" #include "wcwidth.h" diff --git a/src/kill_tracker.cpp b/src/kill_tracker.cpp index f3bd8e51e75a1..e68e09ada02fa 100644 --- a/src/kill_tracker.cpp +++ b/src/kill_tracker.cpp @@ -1,21 +1,18 @@ #include "kill_tracker.h" +#include +#include #include -#include #include -#include "avatar.h" #include "cata_variant.h" #include "character.h" #include "character_id.h" -#include "color.h" #include "event.h" #include "game.h" #include "mtype.h" #include "npc.h" -#include "options.h" -#include "string_formatter.h" -#include "translations.h" +#include "weakpoint.h" void kill_tracker::reset( const std::map &kills_, const std::vector &npc_kills_ ) diff --git a/src/kill_tracker.h b/src/kill_tracker.h index 71a6a376779ad..ca4dfb82331ed 100644 --- a/src/kill_tracker.h +++ b/src/kill_tracker.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_KILL_TRACKER_H #define CATA_SRC_KILL_TRACKER_H -#include #include +#include #include #include "event_subscriber.h" @@ -12,11 +12,6 @@ class JsonObject; class JsonOut; -namespace cata -{ -class event; -} // namespace cata - class kill_tracker : public event_subscriber { /** to keep track of new kills, need to access private member (kills, npc_kills), may include getter for thows and remove frend class diary. */ diff --git a/src/lang_stats.cpp b/src/lang_stats.cpp index b5a29320d9df3..d77cae4f69a17 100644 --- a/src/lang_stats.cpp +++ b/src/lang_stats.cpp @@ -1,10 +1,10 @@ -#include #include +#include +#include using namespace std::literals::string_view_literals; static constexpr std::initializer_list all_lang_stats = { -#include }; const lang_stats *lang_stats_for( std::string_view lang ) diff --git a/src/level_cache.cpp b/src/level_cache.cpp index bf40e3200457e..34ce4456f49cd 100644 --- a/src/level_cache.cpp +++ b/src/level_cache.cpp @@ -1,6 +1,9 @@ #include "level_cache.h" -#include +#include + +#include "lightmap.h" +#include "shadowcasting.h" level_cache::level_cache() { diff --git a/src/level_cache.h b/src/level_cache.h index 531b24f8fae3d..584d3d1e02529 100644 --- a/src/level_cache.h +++ b/src/level_cache.h @@ -8,13 +8,15 @@ #include #include -#include "game_constants.h" -#include "lightmap.h" +#include "coordinates.h" +#include "map_scale_constants.h" +#include "mdarray.h" #include "point.h" #include "shadowcasting.h" -#include "value_ptr.h" +// IWYU pragma: no_forward_declare four_quadrants class vehicle; +enum class lit_level : int; struct level_cache { public: diff --git a/src/lightmap.cpp b/src/lightmap.cpp index 869b08abe1822..6f9867157113b 100644 --- a/src/lightmap.cpp +++ b/src/lightmap.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -17,16 +18,20 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" +#include "coordinates.h" #include "cuboid_rectangle.h" #include "debug.h" #include "field.h" +#include "field_type.h" #include "fragment_cloud.h" // IWYU pragma: keep #include "game.h" +#include "game_constants.h" #include "item.h" +#include "item_pocket.h" #include "item_stack.h" #include "level_cache.h" #include "line.h" +#include "magic_enchantment.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -40,7 +45,6 @@ #include "tileray.h" #include "type_id.h" #include "units.h" -#include "units_utility.h" #include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/line.cpp b/src/line.cpp index 8017f0eb282ad..7de07d8fc6aa0 100644 --- a/src/line.cpp +++ b/src/line.cpp @@ -7,13 +7,14 @@ #include #include "cata_assert.h" +#include "coordinates.h" +#include "debug.h" #include "enums.h" #include "math_defines.h" #include "output.h" #include "string_formatter.h" #include "translations.h" #include "units.h" -#include "units_fwd.h" bool trigdist; diff --git a/src/line.h b/src/line.h index 6b67e45984ac4..46e6af9c6c608 100644 --- a/src/line.h +++ b/src/line.h @@ -4,16 +4,22 @@ #include #include +#include #include -#include +#include #include #include "coords_fwd.h" +#include "enums.h" #include "point.h" #include "units.h" -template struct enum_traits; +namespace coords +{ +template class coord_point_ob; +} // namespace coords struct rl_vec2d; +template struct enum_traits; extern bool trigdist; diff --git a/src/live_view.cpp b/src/live_view.cpp index f63defe9a71c1..0ba2a1f3f4cba 100644 --- a/src/live_view.cpp +++ b/src/live_view.cpp @@ -1,12 +1,12 @@ #include "live_view.h" #include // min & max -#include -#include #include #include +#include "cached_options.h" #include "color.h" +#include "coordinates.h" #include "cursesdef.h" #include "game.h" #include "map.h" diff --git a/src/loading_ui.cpp b/src/loading_ui.cpp index 568475eac58b9..60e808bd880e0 100644 --- a/src/loading_ui.cpp +++ b/src/loading_ui.cpp @@ -1,22 +1,33 @@ #include "loading_ui.h" +#include +#include +#include +#include +#include + #include "cached_options.h" -#include "options.h" +#include "cata_path.h" +#include "filesystem.h" #include "input.h" #include "output.h" +#include "path_info.h" +#include "rng.h" +#include "type_id.h" #include "ui_manager.h" #if defined(TILES) #define IMGUI_DEFINE_MATH_OPERATORS #include "imgui/imgui.h" #undef IMGUI_DEFINE_MATH_OPERATORS + #include "mod_manager.h" -#include "path_info.h" -#include "sdltiles.h" #include "sdl_wrappers.h" +#include "sdltiles.h" #include "worldfactory.h" #else #include "cursesdef.h" +#include "options.h" #endif // TILES struct ui_state { diff --git a/src/localized_comparator.cpp b/src/localized_comparator.cpp index 5b8bad4e2c977..a0a06fc3aa588 100644 --- a/src/localized_comparator.cpp +++ b/src/localized_comparator.cpp @@ -7,6 +7,7 @@ #include "catacharset.h" #include "localized_comparator.h" +#include "translation.h" bool localized_comparator::operator()( const std::string &l, const std::string &r ) const { diff --git a/src/localized_comparator.h b/src/localized_comparator.h index b1e56a419233c..33bbb3b7fc97d 100644 --- a/src/localized_comparator.h +++ b/src/localized_comparator.h @@ -2,7 +2,12 @@ #ifndef CATA_SRC_LOCALIZED_COMPARATOR_H #define CATA_SRC_LOCALIZED_COMPARATOR_H -#include "translation.h" +#include +#include +#include +#include + +class translation; // Localized comparison operator, intended for sorting strings when they should // be sorted according to the user's locale. diff --git a/src/magic.cpp b/src/magic.cpp index de58631f08750..f4c33c9d8c9e5 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -2,9 +2,11 @@ #include #include +#include #include #include #include +#include #include #include @@ -15,25 +17,28 @@ #include "cata_utility.h" #include "catacharset.h" #include "character.h" +#include "character_id.h" #include "color.h" #include "condition.h" #include "creature.h" #include "creature_tracker.h" -#include "cursesdef.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "enum_conversions.h" #include "enums.h" #include "event.h" #include "event_bus.h" #include "field.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "game_constants.h" #include "generic_factory.h" -#include "imgui/imgui.h" #include "input_context.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "json.h" -#include "line.h" #include "localized_comparator.h" #include "magic_enchantment.h" #include "map.h" @@ -45,18 +50,24 @@ #include "mtype.h" #include "mutation.h" #include "npc.h" +#include "npc_attack.h" #include "output.h" #include "pimpl.h" #include "point.h" #include "projectile.h" +#include "ranged.h" #include "requirements.h" #include "rng.h" #include "sounds.h" #include "string_formatter.h" +#include "talker.h" +#include "text.h" #include "translations.h" #include "ui.h" #include "units.h" +struct species_type; + static const ammo_effect_str_id ammo_effect_MAGIC( "MAGIC" ); static const json_character_flag json_flag_CANNOT_ATTACK( "CANNOT_ATTACK" ); diff --git a/src/magic.h b/src/magic.h index 39c88f85606ad..e49698179cb1c 100644 --- a/src/magic.h +++ b/src/magic.h @@ -3,17 +3,20 @@ #define CATA_SRC_MAGIC_H #include -#include #include -#include #include #include #include #include +#include +#include +#include #include #include "body_part_set.h" #include "bodypart.h" +#include "calendar.h" +#include "color.h" #include "coordinates.h" #include "damage.h" #include "dialogue_helpers.h" @@ -22,7 +25,7 @@ #include "magic_type.h" #include "point.h" #include "sounds.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "ui.h" @@ -30,10 +33,7 @@ class Character; class Creature; class JsonObject; class JsonOut; -class nc_color; class spell; -class time_duration; - struct dealt_projectile_attack; struct requirement_data; @@ -41,11 +41,6 @@ namespace spell_effect { struct override_parameters; } // namespace spell_effect - -namespace cata -{ -class event; -} // namespace cata template struct enum_traits; enum class spell_flag : int { diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index fd369c1166253..4b10443fd7c6e 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -1,26 +1,31 @@ #include "magic_enchantment.h" -#include +#include #include #include -#include "avatar.h" #include "calendar.h" #include "character.h" #include "condition.h" +#include "coordinates.h" #include "creature.h" +#include "damage.h" #include "debug.h" #include "dialogue.h" #include "dialogue_helpers.h" #include "enum_conversions.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" #include "json.h" #include "map.h" -#include "point.h" +#include "mod_tracker.h" +#include "monster.h" #include "rng.h" #include "skill.h" +#include "talker.h" #include "units.h" namespace io diff --git a/src/magic_enchantment.h b/src/magic_enchantment.h index 6ffc374ed0c9c..707aac68b52bc 100644 --- a/src/magic_enchantment.h +++ b/src/magic_enchantment.h @@ -2,28 +2,32 @@ #ifndef CATA_SRC_MAGIC_ENCHANTMENT_H #define CATA_SRC_MAGIC_ENCHANTMENT_H -#include +#include #include -#include #include -#include +#include +#include #include #include +#include "body_part_set.h" #include "calendar.h" +#include "color.h" #include "dialogue_helpers.h" #include "magic.h" +#include "translation.h" #include "type_id.h" #include "units_fwd.h" -#include class Character; class Creature; class JsonObject; class JsonOut; +class JsonValue; class item; -struct dialogue; -struct dbl_or_var; +class monster; +struct const_dialogue; + namespace enchant_vals { // the different types of values that can be modified by enchantments diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 34580062a2d93..11744543a123e 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -3,12 +3,10 @@ #include #include #include +#include #include -#include -#include #include #include -#include #include #include #include @@ -21,13 +19,14 @@ #include "calendar.h" #include "character.h" #include "character_martial_arts.h" -#include "colony.h" #include "color.h" +#include "condition.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" #include "enums.h" #include "explosion.h" @@ -35,7 +34,9 @@ #include "field_type.h" #include "fungal_effects.h" #include "game.h" +#include "global_vars.h" #include "item.h" +#include "item_group.h" #include "kill_tracker.h" #include "line.h" #include "magic.h" @@ -44,11 +45,11 @@ #include "magic_ter_furn_transform.h" #include "map.h" #include "map_iterator.h" +#include "memory_fast.h" #include "messages.h" #include "mongroup.h" #include "monster.h" #include "monstergenerator.h" -#include "morale.h" #include "mtype.h" #include "npc.h" #include "overmapbuffer.h" @@ -58,14 +59,18 @@ #include "ret_val.h" #include "rng.h" #include "string_formatter.h" +#include "talker.h" #include "teleport.h" #include "timed_event.h" #include "translations.h" +#include "trap.h" #include "type_id.h" #include "units.h" #include "vehicle.h" #include "vpart_position.h" +class translation; + static const efftype_id effect_teleglow( "teleglow" ); static const flag_id json_flag_FIT( "FIT" ); diff --git a/src/magic_teleporter_list.cpp b/src/magic_teleporter_list.cpp index 30282c8ccd5d7..98a89154389b2 100644 --- a/src/magic_teleporter_list.cpp +++ b/src/magic_teleporter_list.cpp @@ -4,29 +4,28 @@ #include #include #include -#include #include #include #include "avatar.h" #include "calendar.h" -#include "catacharset.h" +#include "cata_imgui.h" +#include "cata_utility.h" #include "character.h" -#include "color.h" #include "coordinates.h" #include "creature_tracker.h" -#include "cursesdef.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "imgui/imgui.h" #include "json.h" #include "map.h" #include "map_iterator.h" +#include "mapdata.h" #include "messages.h" #include "output.h" #include "panels.h" #include "point.h" -#include "string_formatter.h" #include "string_input_popup.h" #include "translations.h" #include "type_id.h" diff --git a/src/magic_teleporter_list.h b/src/magic_teleporter_list.h index 5470b2caff314..9aa505366fb14 100644 --- a/src/magic_teleporter_list.h +++ b/src/magic_teleporter_list.h @@ -2,17 +2,16 @@ #ifndef CATA_SRC_MAGIC_TELEPORTER_LIST_H #define CATA_SRC_MAGIC_TELEPORTER_LIST_H -#include #include #include #include +#include #include "coordinates.h" class Character; class JsonObject; class JsonOut; -struct tripoint; class teleporter_list { diff --git a/src/magic_ter_fur_transform.cpp b/src/magic_ter_fur_transform.cpp index 3df7a8e352eb1..f666c6d3578dd 100644 --- a/src/magic_ter_fur_transform.cpp +++ b/src/magic_ter_fur_transform.cpp @@ -1,26 +1,27 @@ -#include #include -#include #include -#include #include +#include #include #include #include "avatar.h" +#include "coordinates.h" #include "creature.h" #include "enums.h" +#include "field.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "magic_ter_furn_transform.h" #include "map.h" #include "mapdata.h" +#include "point.h" #include "submap.h" +#include "translation.h" #include "trap.h" #include "type_id.h" - -struct tripoint; -template struct weighted_int_list; +#include "weighted_list.h" namespace { diff --git a/src/magic_type.cpp b/src/magic_type.cpp index 4d95b6330257f..07c6179c8220d 100644 --- a/src/magic_type.cpp +++ b/src/magic_type.cpp @@ -3,7 +3,10 @@ #include "condition.h" #include "effect_on_condition.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" +#include "json.h" #include "math_parser_jmath.h" // LOADING diff --git a/src/magic_type.h b/src/magic_type.h index 02b7280b5880e..c18da9a4ff171 100644 --- a/src/magic_type.h +++ b/src/magic_type.h @@ -4,12 +4,19 @@ #include +#include +#include +#include #include #include "dialogue_helpers.h" #include "enum_bitset.h" #include "type_id.h" +class JsonObject; +class JsonOut; +template struct enum_traits; + enum class magic_energy_type : int { hp, mana, diff --git a/src/main.cpp b/src/main.cpp index d5d183ab514cb..d2beef6c1290a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,31 +7,42 @@ // KG: Yes, the above is inaccurate now. It's also a poem, it stays. // IWYU pragma: no_include -#include -#include #include #include #include -#include #include #include +#include #include #include +#include #include #include +#include #include +#include #include #include #if defined(_WIN32) -#include "platform_win.h" +#if 1 // Prevent IWYU reordering platform_win.h below mmsystem.h +# include "platform_win.h" +#endif +#include // for AttachConsole, ATTACH_PARENT_PRO... +#include // for INVALID_HANDLE_VALUE +#include // for HANDLE, HINSTANCE, APIENTRY, LPSTR +#include // for GetStdHandle +#include // for _In_, _In_opt_ #else #include #endif +#include #include #include "cached_options.h" +#include "cata_imgui.h" #include "cata_path.h" +#include "cata_scope_helpers.h" #include "color.h" #include "compatibility.h" #include "crash.h" @@ -41,12 +52,13 @@ #include "event.h" #include "event_bus.h" #include "filesystem.h" +#include "flexbuffer_json.h" #include "game.h" #include "game_constants.h" #include "game_ui.h" #include "get_version.h" -#include "help.h" #include "input.h" +#include "json.h" #include "main_menu.h" #include "mapsharing.h" #include "memory_fast.h" @@ -59,7 +71,6 @@ #include "translations.h" #include "type_id.h" #include "ui_manager.h" -#include "cata_imgui.h" #if defined(EMSCRIPTEN) #include @@ -70,8 +81,6 @@ # include "prefix.h" #endif -class ui_adaptor; - #if defined(TILES) || defined(SDL_SOUND) # if defined(_MSC_VER) && defined(USE_VCPKG) # include diff --git a/src/main_menu.cpp b/src/main_menu.cpp index 9331200dd2e84..fc132fa384e1f 100644 --- a/src/main_menu.cpp +++ b/src/main_menu.cpp @@ -1,14 +1,18 @@ #include "main_menu.h" #include +#include +#include #include #include -#include +#include #include -#include #include #include +#include #include +#include +#include #include #include #include @@ -19,20 +23,20 @@ #include "auto_pickup.h" #include "avatar.h" -#include "cata_imgui.h" +#include "cata_path.h" #include "cata_scope_helpers.h" #include "cata_utility.h" #include "catacharset.h" #include "character_id.h" #include "color.h" #include "debug.h" -#include "imgui_demo.h" #include "enums.h" #include "filesystem.h" #include "game.h" #include "gamemode.h" #include "get_version.h" #include "help.h" +#include "imgui_demo.h" #include "localized_comparator.h" #include "mapbuffer.h" #include "mapsharing.h" @@ -49,13 +53,14 @@ #include "sounds.h" #include "string_formatter.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" +#include "ui.h" #include "ui_manager.h" #include "wcwidth.h" #include "worldfactory.h" -#include "imgui/imgui.h" - static const mod_id MOD_INFORMATION_dda( "dda" ); static const mod_id MOD_INFORMATION_dda_tutorial( "dda_tutorial" ); diff --git a/src/main_menu.h b/src/main_menu.h index de9ed3686e4a6..2578e4298ce3e 100644 --- a/src/main_menu.h +++ b/src/main_menu.h @@ -3,12 +3,15 @@ #define CATA_SRC_MAIN_MENU_H #include +#include +#include #include #include "cuboid_rectangle.h" #include "cursesdef.h" #include "enums.h" #include "input_context.h" +#include "input_enums.h" #include "point.h" #include "worldfactory.h" diff --git a/src/map.cpp b/src/map.cpp index b255283656f59..af1b2d96155d1 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -5,16 +5,18 @@ #include #include #include +#include +#include +#include #include #include #include #include -#include #include +#include #include #include "active_item_cache.h" -#include "ammo.h" #include "ammo_effect.h" #include "avatar.h" #include "basecamp.h" @@ -30,7 +32,6 @@ #include "color.h" #include "construction.h" #include "coordinates.h" -#include "coords_fwd.h" #include "creature.h" #include "creature_tracker.h" #include "cuboid_rectangle.h" @@ -44,11 +45,11 @@ #include "field.h" #include "field_type.h" #include "flag.h" +#include "flat_set.h" #include "fragment_cloud.h" #include "fungal_effects.h" #include "game.h" #include "harvest.h" -#include "iexamine.h" #include "input.h" #include "item.h" #include "item_category.h" @@ -67,22 +68,23 @@ #include "mapbuffer.h" #include "mapdata.h" #include "mapgen.h" -#include "material.h" #include "math_defines.h" -#include "mission.h" #include "memory_fast.h" #include "messages.h" +#include "mission.h" #include "mongroup.h" #include "monster.h" #include "mtype.h" +#include "omdata.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "pathfinding.h" +#include "player_activity.h" #include "pocket_type.h" #include "projectile.h" #include "ranged.h" #include "relic.h" -#include "ret_val.h" #include "rng.h" #include "safe_reference.h" #include "scent_map.h" @@ -91,8 +93,10 @@ #include "string_formatter.h" #include "submap.h" #include "tileray.h" +#include "translation.h" #include "translations.h" #include "trap.h" +#include "ui.h" #include "ui_manager.h" #include "units.h" #include "value_ptr.h" diff --git a/src/map.h b/src/map.h index 118ec8d67216e..48b997f49e4fe 100644 --- a/src/map.h +++ b/src/map.h @@ -8,43 +8,49 @@ #include #include #include -#include #include #include #include -#include #include #include +#include #include #include #include #include #include "active_item_cache.h" +#include "bodypart.h" #include "calendar.h" -#include "cata_assert.h" #include "cata_type_traits.h" #include "cata_utility.h" +#include "character_id.h" #include "colony.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "creature.h" #include "enums.h" #include "game_constants.h" #include "item.h" +#include "item_location.h" #include "item_stack.h" #include "level_cache.h" #include "lightmap.h" -#include "line.h" #include "lru_cache.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "map_selector.h" #include "mapdata.h" #include "maptile_fwd.h" +#include "mdarray.h" #include "point.h" -#include "rng.h" +#include "shadowcasting.h" #include "type_id.h" #include "units.h" -#include "value_ptr.h" +#include "vpart_position.h" + +enum class direction : unsigned int; +struct field_type; +struct rl_vec2d; #if defined(TILES) #include "cata_tiles.h" @@ -57,34 +63,24 @@ namespace catacurses class window; } // namespace catacurses class Character; -class Creature; class basecamp; -class character_id; class computer; class field; class field_entry; -class item_location; class mapgendata; class monster; -class optional_vpart_position; -class relic_procgen_data; +class npc_template; class submap; +class tileray; class vehicle; class zone_data; +struct MonsterGroupResult; struct fragment_cloud; +struct mongroup; struct partial_con; +struct projectile; struct spawn_data; struct trap; -template -class tripoint_range; - -enum class special_item_type : int; -class npc_template; -class tileray; -class vpart_reference; -struct MonsterGroupResult; -struct mongroup; -struct projectile; struct veh_collision; struct wrapped_vehicle { @@ -93,18 +89,13 @@ struct wrapped_vehicle { }; using VehicleList = std::vector; +class PathfindingFlags; class map; - -enum class ter_furn_flag : int; +struct field_proc_data; struct pathfinding_cache; struct pathfinding_settings; template struct weighted_int_list; -struct field_proc_data; - -class PathfindingFlags; - -using relic_procgen_id = string_id; class map_stack : public item_stack { diff --git a/src/map_extras.cpp b/src/map_extras.cpp index 09b7489d3c81e..60746a503aa46 100644 --- a/src/map_extras.cpp +++ b/src/map_extras.cpp @@ -1,56 +1,47 @@ #include "map_extras.h" -#include #include +#include #include #include +#include #include -#include -#include #include #include #include #include #include -#include "auto_note.h" #include "calendar.h" #include "cata_utility.h" #include "cellular_automata.h" -#include "character_id.h" -#include "city.h" -#include "colony.h" #include "coordinates.h" -#include "creature_tracker.h" #include "debug.h" #include "enum_conversions.h" #include "enums.h" #include "field_type.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "fungal_effects.h" -#include "game.h" -#include "game_constants.h" #include "generic_factory.h" #include "item.h" #include "item_group.h" -#include "json.h" #include "line.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "mapgen.h" #include "mapgen_functions.h" #include "mapgendata.h" -#include "mongroup.h" -#include "options.h" -#include "overmap.h" +#include "omdata.h" #include "overmapbuffer.h" #include "point.h" #include "regional_settings.h" +#include "ret_val.h" #include "rng.h" #include "sets_intersect.h" #include "string_formatter.h" -#include "string_id.h" -#include "text_snippets.h" #include "translations.h" #include "trap.h" #include "type_id.h" @@ -63,6 +54,8 @@ #include "vpart_range.h" #include "weighted_list.h" +class npc_template; + static const flag_id json_flag_FILTHY( "FILTHY" ); static const furn_str_id furn_f_barricade_road( "f_barricade_road" ); @@ -195,8 +188,6 @@ static const vproto_id vehicle_prototype_humvee( "humvee" ); static const vproto_id vehicle_prototype_military_cargo_truck( "military_cargo_truck" ); static const vproto_id vehicle_prototype_road_roller( "road_roller" ); -class npc_template; - namespace io { diff --git a/src/map_extras.h b/src/map_extras.h index 50c28a7d33f34..66056e55e890e 100644 --- a/src/map_extras.h +++ b/src/map_extras.h @@ -3,23 +3,24 @@ #define CATA_SRC_MAP_EXTRAS_H #include -#include +#include #include +#include #include +#include +#include #include "catacharset.h" #include "color.h" #include "coords_fwd.h" #include "flat_set.h" -#include "string_id.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; class map; class mapgendata; class tinymap; -struct tripoint; template class generic_factory; template struct enum_traits; diff --git a/src/map_field.cpp b/src/map_field.cpp index 88bc27b61afb7..df307665464c9 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -4,11 +4,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -22,12 +20,12 @@ #include "calendar.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "effect.h" #include "emit.h" #include "enums.h" @@ -36,16 +34,16 @@ #include "fire.h" #include "fungal_effects.h" #include "game.h" -#include "game_constants.h" #include "item.h" #include "itype.h" #include "level_cache.h" -#include "line.h" #include "make_static.h" #include "map.h" #include "map_field.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" +#include "maptile_fwd.h" #include "material.h" #include "messages.h" #include "mongroup.h" @@ -57,8 +55,11 @@ #include "rng.h" #include "scent_block.h" #include "scent_map.h" +#include "string_formatter.h" #include "submap.h" +#include "talker.h" #include "teleport.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "units.h" diff --git a/src/map_field.h b/src/map_field.h index e8a99ec0c725f..277dc3c247376 100644 --- a/src/map_field.h +++ b/src/map_field.h @@ -2,12 +2,13 @@ #ifndef CATA_SRC_MAP_FIELD_H #define CATA_SRC_MAP_FIELD_H +#include + #include "coords_fwd.h" -struct tripoint; class field_entry; -struct field_type; struct field_proc_data; +struct field_type; namespace map_field_processing { diff --git a/src/map_item_stack.cpp b/src/map_item_stack.cpp index 472c460c1d098..71b4c44bea47e 100644 --- a/src/map_item_stack.cpp +++ b/src/map_item_stack.cpp @@ -7,7 +7,6 @@ #include "item.h" #include "item_category.h" #include "item_search.h" -#include "line.h" map_item_stack::item_group::item_group() : count( 0 ), it( nullptr ) { diff --git a/src/map_item_stack.h b/src/map_item_stack.h index 60ad25032e085..18f974105024b 100644 --- a/src/map_item_stack.h +++ b/src/map_item_stack.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_MAP_ITEM_STACK_H #define CATA_SRC_MAP_ITEM_STACK_H -#include +#include #include #include "coordinates.h" diff --git a/src/map_memory.cpp b/src/map_memory.cpp index a0fa71092f2cc..c04c9e2a0fe17 100644 --- a/src/map_memory.cpp +++ b/src/map_memory.cpp @@ -1,11 +1,21 @@ -#include "cata_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "cached_options.h" +#include "cata_assert.h" +#include "cata_path.h" #include "cata_utility.h" #include "coordinate_conversions.h" #include "cuboid_rectangle.h" #include "debug.h" #include "filesystem.h" -#include "line.h" #include "map_memory.h" #include "path_info.h" #include "string_formatter.h" diff --git a/src/map_memory.h b/src/map_memory.h index fe92ece2b4c3d..dbfd83455d3ec 100644 --- a/src/map_memory.h +++ b/src/map_memory.h @@ -2,20 +2,23 @@ #ifndef CATA_SRC_MAP_MEMORY_H #define CATA_SRC_MAP_MEMORY_H -#include - -#include "game_constants.h" +#include +#include +#include +#include +#include + +#include "coordinates.h" +#include "map_scale_constants.h" #include "mdarray.h" #include "memory_fast.h" #include "point.h" // IWYU pragma: keep +#include "type_id.h" -class JsonObject; +class JsonArray; class JsonOut; class JsonValue; -struct ter_t; -using ter_str_id = string_id; - class memorized_tile { public: diff --git a/src/map_selector.cpp b/src/map_selector.cpp index cd0d695a52671..6ccf0b5fe90b8 100644 --- a/src/map_selector.cpp +++ b/src/map_selector.cpp @@ -5,12 +5,13 @@ #include #include -#include "game_constants.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "rng.h" class game; + // NOLINTNEXTLINE(cata-static-declarations) extern std::unique_ptr g; diff --git a/src/map_selector.h b/src/map_selector.h index 5979cbff2860a..4d709d8daaf67 100644 --- a/src/map_selector.h +++ b/src/map_selector.h @@ -3,16 +3,12 @@ #define CATA_SRC_MAP_SELECTOR_H #include -#include -#include #include #include "coordinates.h" #include "point.h" #include "visitable.h" -class item; - class map_cursor : public visitable { private: diff --git a/src/mapbuffer.cpp b/src/mapbuffer.cpp index a9f212fc78c66..0f74feaaddd6e 100644 --- a/src/mapbuffer.cpp +++ b/src/mapbuffer.cpp @@ -3,30 +3,38 @@ #include #include #include +#include +#include #include #include #include #include #include +#include "cata_path.h" #include "cata_utility.h" #include "debug.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input.h" #include "json.h" #include "map.h" #include "output.h" #include "overmapbuffer.h" #include "path_info.h" +#include "point.h" #include "popup.h" #include "string_formatter.h" #include "submap.h" #include "translations.h" +#include "type_id.h" #include "ui_manager.h" #define dbg(x) DebugLog((x),D_MAP) << __FILE__ << ":" << __LINE__ << ": " class game; + // NOLINTNEXTLINE(cata-static-declarations) extern std::unique_ptr g; // NOLINTNEXTLINE(cata-static-declarations) diff --git a/src/mapbuffer.h b/src/mapbuffer.h index 7c748f94f9a71..ef08c5ca1164b 100644 --- a/src/mapbuffer.h +++ b/src/mapbuffer.h @@ -2,16 +2,14 @@ #ifndef CATA_SRC_MAPBUFFER_H #define CATA_SRC_MAPBUFFER_H -#include #include #include #include -#include "coords_fwd.h" -#include "point.h" +#include "coordinates.h" -class cata_path; class JsonArray; +class cata_path; class submap; /** diff --git a/src/mapdata.cpp b/src/mapdata.cpp index dfac7527100bd..091880191fc66 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -1,27 +1,30 @@ #include "mapdata.h" #include -#include +#include #include +#include #include #include #include #include #include "assign.h" +#include "avatar.h" #include "calendar.h" #include "character.h" #include "color.h" #include "debug.h" #include "enum_conversions.h" -#include "game.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "harvest.h" #include "iexamine.h" #include "iexamine_actors.h" +#include "item.h" #include "item_group.h" #include "iteminfo_query.h" -#include "json.h" #include "mod_manager.h" #include "output.h" #include "rng.h" diff --git a/src/mapdata.h b/src/mapdata.h index b6f5bec4271a0..d2008268a4f38 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -5,32 +5,31 @@ #include #include #include -#include +#include #include #include +#include +#include #include #include "calendar.h" #include "clone_ptr.h" #include "color.h" +#include "coords_fwd.h" #include "enum_bitset.h" #include "game_constants.h" #include "iexamine.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" -struct ter_t; - -using ter_str_id = string_id; - -class JsonObject; class Character; -struct iexamine_actor; +class JsonObject; +struct connect_group; struct furn_t; struct itype; -struct tripoint; +struct ter_t; // size of connect groups bitset; increase if needed const int NUM_TERCONN = 256; diff --git a/src/mapgen.cpp b/src/mapgen.cpp index f67794b868932..a8b33e993b64e 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -2,58 +2,72 @@ #include #include +#include #include #include +#include +#include +#include #include #include #include #include #include #include +#include #include +#include #include #include "all_enum_values.h" #include "avatar.h" #include "calendar.h" #include "cata_assert.h" +#include "cata_utility.h" #include "catacharset.h" #include "character_id.h" #include "city.h" #include "clzones.h" -#include "colony.h" #include "common_types.h" #include "computer.h" #include "condition.h" #include "coordinates.h" +#include "creature.h" +#include "creature_tracker.h" +#include "cube_direction.h" #include "cuboid_rectangle.h" #include "debug.h" +#include "dialogue.h" #include "drawing_primitives.h" #include "enum_conversions.h" #include "enums.h" -#include "field.h" #include "field_type.h" +#include "flat_set.h" #include "game.h" -#include "game_constants.h" #include "generic_factory.h" #include "global_vars.h" #include "input.h" #include "item.h" +#include "item_category.h" #include "item_factory.h" #include "item_group.h" #include "itype.h" +#include "jmapgen_flags.h" +#include "json_error.h" #include "level_cache.h" #include "line.h" #include "magic_ter_furn_transform.h" #include "map.h" #include "map_extras.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapbuffer.h" #include "mapdata.h" #include "mapgen_functions.h" #include "mapgendata.h" #include "mapgenformat.h" #include "memory_fast.h" +#include "messages.h" #include "mission.h" #include "mongroup.h" #include "npc.h" @@ -64,13 +78,16 @@ #include "overmapbuffer.h" #include "pocket_type.h" #include "point.h" +#include "regional_settings.h" #include "ret_val.h" #include "rng.h" #include "string_formatter.h" #include "submap.h" +#include "talker.h" #include "text_snippets.h" #include "tileray.h" #include "to_string_id.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "units.h" @@ -81,7 +98,6 @@ #include "vpart_position.h" #include "vpart_range.h" #include "weighted_list.h" -#include "creature_tracker.h" static const furn_str_id furn_f_ash( "f_ash" ); static const furn_str_id furn_f_bed( "f_bed" ); @@ -1328,6 +1344,7 @@ class mapgen_value public: using StringId = to_string_id_t; struct void_; + using Id_unless_string = std::conditional_t, void_, Id>; diff --git a/src/mapgen.h b/src/mapgen.h index f332022cc177d..41b9a8a0d3811 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -3,32 +3,42 @@ #define CATA_SRC_MAPGEN_H #include -#include +#include +#include #include #include #include +#include +#include #include #include #include #include +#include "cata_assert.h" #include "cata_variant.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "dialogue_helpers.h" -#include "jmapgen_flags.h" -#include "json.h" +#include "enum_bitset.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "jmapgen_flags.h" // IWYU pragma: keep +#include "mapgen_parameter.h" #include "memory_fast.h" #include "point.h" -#include "regional_settings.h" +#include "ret_val.h" #include "type_id.h" +#include "value_ptr.h" #include "weighted_list.h" class map; class mapgendata; -struct mapgen_arguments; -template class mapgen_value; class mission; class tinymap; +struct mapgen_arguments; +struct oter_t; +template struct enum_traits; +template class mapgen_value; using building_gen_pointer = void ( * )( mapgendata & ); diff --git a/src/mapgen_functions.cpp b/src/mapgen_functions.cpp index ad611002296b2..82f561d85b6dc 100644 --- a/src/mapgen_functions.cpp +++ b/src/mapgen_functions.cpp @@ -1,31 +1,31 @@ #include "mapgen_functions.h" +#include #include #include +#include #include -#include -#include #include #include +#include #include #include #include #include "calendar.h" -#include "character_id.h" +#include "cata_utility.h" +#include "coordinates.h" +#include "creature_tracker.h" #include "cuboid_rectangle.h" #include "debug.h" -#include "enums.h" -#include "field_type.h" #include "flood_fill.h" -#include "game_constants.h" -#include "line.h" #include "map.h" #include "map_iterator.h" -#include "mapdata.h" +#include "map_scale_constants.h" #include "mapgen.h" #include "mapgendata.h" #include "mapgenformat.h" +#include "math_defines.h" #include "omdata.h" #include "overmap.h" #include "point.h" @@ -35,7 +35,8 @@ #include "trap.h" #include "vehicle_group.h" #include "weighted_list.h" -#include "creature_tracker.h" + +class Creature; static const oter_str_id oter_river_c_not_nw( "river_c_not_nw" ); static const oter_str_id oter_river_c_not_se( "river_c_not_se" ); @@ -72,8 +73,6 @@ static const ter_str_id ter_t_water_sh( "t_water_sh" ); static const vspawn_id VehicleSpawn_default_subway_deadend( "default_subway_deadend" ); -class npc_template; - tripoint_bub_ms rotate_point( const tripoint_bub_ms &p, int rotations ) { if( p.x() < 0 || p.x() >= SEEX * 2 || diff --git a/src/mapgen_functions.h b/src/mapgen_functions.h index 7377c0bf3bd88..996cb8606c2f1 100644 --- a/src/mapgen_functions.h +++ b/src/mapgen_functions.h @@ -2,23 +2,22 @@ #ifndef CATA_SRC_MAPGEN_FUNCTIONS_H #define CATA_SRC_MAPGEN_FUNCTIONS_H +#include #include -#include #include +#include #include #include "coords_fwd.h" -#include "mapdata.h" +#include "ret_val.h" #include "type_id.h" class map; class mapgendata; class mission; +class tinymap; struct mapgen_arguments; struct mapgen_parameters; -struct point; -class tinymap; -struct tripoint; using mapgen_update_func = std::function; class JsonObject; diff --git a/src/mapgendata.cpp b/src/mapgendata.cpp index 52244d5797548..e19cf5da63104 100644 --- a/src/mapgendata.cpp +++ b/src/mapgendata.cpp @@ -1,11 +1,19 @@ #include "mapgendata.h" +#include +#include + #include "all_enum_values.h" +#include "coordinates.h" +#include "cube_direction.h" #include "debug.h" +#include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "hash_utils.h" #include "json.h" +#include "line.h" #include "map.h" -#include "mapdata.h" #include "omdata.h" #include "overmapbuffer.h" #include "point.h" diff --git a/src/mapgendata.h b/src/mapgendata.h index d7ae38dc67375..4a0fcbffc397d 100644 --- a/src/mapgendata.h +++ b/src/mapgendata.h @@ -2,20 +2,35 @@ #ifndef CATA_SRC_MAPGENDATA_H #define CATA_SRC_MAPGENDATA_H +#include +#include +#include +#include +#include +#include +#include +#include + #include "calendar.h" #include "cata_variant.h" #include "coords_fwd.h" #include "cube_direction.h" +#include "debug.h" #include "enum_bitset.h" #include "jmapgen_flags.h" -#include "mapgen.h" #include "type_id.h" #include "weighted_list.h" +enum class direction : unsigned int; + +// IWYU pragma: no_forward_declare jmapgen_flags +// IWYU pragma: no_forward_declare cube_direction + +class JsonOut; class JsonValue; class map; class mission; -struct point; +enum class mapgen_phase; struct regional_settings; namespace om_direction diff --git a/src/mapgenformat.cpp b/src/mapgenformat.cpp index 29cad25e3c2a8..78b3ede5339dd 100644 --- a/src/mapgenformat.cpp +++ b/src/mapgenformat.cpp @@ -1,9 +1,10 @@ #include "mapgenformat.h" #include +#include +#include "coordinates.h" #include "map.h" -#include "mapdata.h" #include "point.h" static const furn_str_id furn_f_toilet( "f_toilet" ); diff --git a/src/mapgenformat.h b/src/mapgenformat.h index 86bbc53e6dece..c4300c21e20e8 100644 --- a/src/mapgenformat.h +++ b/src/mapgenformat.h @@ -3,8 +3,8 @@ #define CATA_SRC_MAPGENFORMAT_H #include -#include -#include +#include +#include #include #include "type_id.h" diff --git a/src/mapsharing.cpp b/src/mapsharing.cpp index 7193efe126891..b0123cce89d0e 100644 --- a/src/mapsharing.cpp +++ b/src/mapsharing.cpp @@ -1,9 +1,14 @@ #include "mapsharing.h" #include -#include +#include +#include +#include +#include #include +#include #include +#include #include "filesystem.h" #include "ofstream_wrapper.h" @@ -13,7 +18,11 @@ #endif // __linux__ #if defined(_WIN32) -#include "platform_win.h" +#if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU +#include "platform_win.h" // IWYU pragma: keep +#endif + +#include // for GetCurrentProcessId #endif #if defined(EMSCRIPTEN) diff --git a/src/martialarts.cpp b/src/martialarts.cpp index 13421f81e6cc6..e9edb15a6b60c 100644 --- a/src/martialarts.cpp +++ b/src/martialarts.cpp @@ -1,42 +1,55 @@ #include "martialarts.h" #include +#include #include #include #include #include +#include #include #include #include "bodypart.h" +#include "cata_imgui.h" +#include "cata_utility.h" #include "character.h" #include "character_attire.h" #include "character_martial_arts.h" #include "color.h" #include "condition.h" -#include "cursesdef.h" +#include "creature.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "effect.h" +#include "effect_on_condition.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" #include "input_context.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "itype.h" #include "localized_comparator.h" -#include "map.h" +#include "messages.h" #include "output.h" #include "pimpl.h" -#include "point.h" #include "skill.h" #include "string_formatter.h" +#include "subbodypart.h" +#include "talker.h" +#include "text.h" #include "translations.h" #include "ui_manager.h" #include "value_ptr.h" #include "weighted_list.h" +class json_flag; + static const bionic_id bio_armor_arms( "bio_armor_arms" ); static const bionic_id bio_armor_legs( "bio_armor_legs" ); static const bionic_id bio_cqb( "bio_cqb" ); diff --git a/src/martialarts.h b/src/martialarts.h index a8e5ee700d2c8..f646c993db636 100644 --- a/src/martialarts.h +++ b/src/martialarts.h @@ -3,29 +3,29 @@ #define CATA_SRC_MARTIALARTS_H #include -#include +#include #include #include +#include #include #include #include "bodypart.h" #include "bonuses.h" -#include "effect_on_condition.h" #include "calendar.h" #include "flat_set.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "ui.h" -class input_context; -struct input_event; - class Character; class JsonObject; class effect; class item; +class item_location; +struct const_dialogue; struct itype; +template class generic_factory; const matec_id tec_none( "tec_none" ); diff --git a/src/material.cpp b/src/material.cpp index fe388627e6e44..b732ff606e6af 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -1,16 +1,18 @@ #include "material.h" #include -#include +#include +#include #include #include +#include #include "assign.h" -#include "calendar.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" -#include "json.h" #include "make_static.h" namespace diff --git a/src/material.h b/src/material.h index ae8d338ed636c..684e18fb6caf7 100644 --- a/src/material.h +++ b/src/material.h @@ -3,22 +3,23 @@ #define CATA_SRC_MATERIAL_H #include -#include #include -#include #include #include #include +#include #include #include #include "damage.h" #include "fire.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" +#include "units.h" -class material_type; class JsonObject; +class material_type; +template struct enum_traits; using mat_burn_products = std::vector>; using material_list = std::vector; diff --git a/src/math_parser_diag.cpp b/src/math_parser_diag.cpp index 42208daa6fbd6..9c8dbbc1b8089 100644 --- a/src/math_parser_diag.cpp +++ b/src/math_parser_diag.cpp @@ -8,6 +8,7 @@ #include "condition.h" #include "dialogue.h" #include "enums.h" +#include "faction.h" #include "field.h" #include "game.h" #include "magic.h" diff --git a/src/math_parser_func.cpp b/src/math_parser_func.cpp index 893da263a851c..2efdd3ac8ce5a 100644 --- a/src/math_parser_func.cpp +++ b/src/math_parser_func.cpp @@ -1,5 +1,6 @@ #include "math_parser_func.h" +#include #include #include diff --git a/src/math_parser_func.h b/src/math_parser_func.h index 6c3a6febaed6e..0d2d57f9b86fb 100644 --- a/src/math_parser_func.h +++ b/src/math_parser_func.h @@ -6,10 +6,12 @@ #include #include #include -#include #include +#include #include +#include "debug.h" +#include "math_defines.h" #include "rng.h" #include "units.h" diff --git a/src/math_parser_jmath.cpp b/src/math_parser_jmath.cpp index acad627b74685..aad7171a17556 100644 --- a/src/math_parser_jmath.cpp +++ b/src/math_parser_jmath.cpp @@ -1,13 +1,16 @@ #include "math_parser_jmath.h" +#include #include #include -#include "condition.h" #include "dialogue.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "math_parser.h" #include "math_parser_diag.h" +#include "string_formatter.h" namespace { diff --git a/src/math_parser_jmath.h b/src/math_parser_jmath.h index 801fe8329eada..03dc2221c4112 100644 --- a/src/math_parser_jmath.h +++ b/src/math_parser_jmath.h @@ -4,13 +4,14 @@ #include #include +#include #include #include "math_parser.h" #include "type_id.h" class JsonObject; -struct dialogue; +struct const_dialogue; struct jmath_func { jmath_func_id id; diff --git a/src/mattack_actors.cpp b/src/mattack_actors.cpp index 717ef6a5f8d6c..38ff2b76e9f14 100644 --- a/src/mattack_actors.cpp +++ b/src/mattack_actors.cpp @@ -1,45 +1,65 @@ #include "mattack_actors.h" #include +#include +#include #include #include #include +#include #include +#include #include "avatar.h" #include "bodypart.h" #include "calendar.h" #include "character.h" +#include "character_attire.h" +#include "condition.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" +#include "debug.h" +#include "dialogue.h" +#include "effect.h" #include "effect_on_condition.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "generic_factory.h" +#include "global_vars.h" #include "gun_mode.h" #include "input.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "item_pocket.h" #include "line.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "messages.h" #include "monster.h" #include "mtype.h" #include "npc.h" #include "options.h" +#include "output.h" +#include "pocket_type.h" #include "point.h" #include "projectile.h" -#include "ret_val.h" #include "rng.h" #include "sounds.h" +#include "talker.h" #include "tileray.h" #include "translations.h" #include "ui_manager.h" -#include "vehicle.h" +#include "units.h" #include "veh_type.h" +#include "vehicle.h" #include "viewer.h" +#include "vpart_position.h" static const damage_type_id damage_bash( "bash" ); diff --git a/src/mattack_actors.h b/src/mattack_actors.h index c73dae7c33f0d..23b2c15aa2df3 100644 --- a/src/mattack_actors.h +++ b/src/mattack_actors.h @@ -3,23 +3,24 @@ #define CATA_SRC_MATTACK_ACTORS_H #include -#include #include -#include +#include #include #include #include "bodypart.h" +#include "coords_fwd.h" #include "damage.h" #include "magic.h" #include "mattack_common.h" -#include "translations.h" +#include "mtype.h" +#include "translation.h" +#include "type_id.h" #include "weighted_list.h" class Creature; class JsonObject; class monster; -struct mon_effect_data; class leap_actor : public mattack_actor { diff --git a/src/mattack_common.h b/src/mattack_common.h index ba30d821b78ef..7e1c5395dd1fd 100644 --- a/src/mattack_common.h +++ b/src/mattack_common.h @@ -2,18 +2,17 @@ #ifndef CATA_SRC_MATTACK_COMMON_H #define CATA_SRC_MATTACK_COMMON_H -#include // IWYU pragma: keep +#include #include -#include +#include // IWYU pragma: keep +#include -#include "condition.h" #include "clone_ptr.h" -#include "creature.h" -#include "dialogue.h" -#include "type_id.h" +#include "dialogue_helpers.h" class JsonObject; class monster; +struct const_dialogue; using mattack_id = std::string; using mon_action_attack = bool ( * )( monster * ); diff --git a/src/medical_ui.cpp b/src/medical_ui.cpp index 76fdc7d8b3985..159d8ac916be7 100644 --- a/src/medical_ui.cpp +++ b/src/medical_ui.cpp @@ -1,23 +1,44 @@ #include +#include #include #include +#include +#include #include +#include #include +#include #include "addiction.h" #include "avatar_action.h" -#include "creature.h" +#include "bodypart.h" +#include "calendar.h" +#include "catacharset.h" #include "character.h" #include "character_modifier.h" +#include "color.h" +#include "coordinates.h" +#include "creature.h" +#include "cursesdef.h" #include "display.h" #include "effect.h" #include "flag.h" #include "game.h" +#include "game_constants.h" #include "input_context.h" +#include "input_enums.h" #include "output.h" +#include "point.h" +#include "string_formatter.h" +#include "translation.h" +#include "translations.h" +#include "type_id.h" #include "ui_manager.h" +#include "units.h" #include "weather.h" +class avatar; + static const efftype_id effect_bite( "bite" ); static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_infected( "infected" ); diff --git a/src/melee.cpp b/src/melee.cpp index 1aa26a8433021..6c5da4b2699eb 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -5,33 +5,37 @@ #include #include #include -#include +#include #include -#include #include #include #include #include #include #include +#include #include #include -#include "avatar.h" #include "anatomy.h" -#include "bodypart.h" +#include "avatar.h" #include "bionics.h" -#include "cached_options.h" +#include "body_part_set.h" +#include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "character_attire.h" #include "character_martial_arts.h" +#include "color.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" +#include "effect.h" #include "effect_on_condition.h" -#include "enum_bitset.h" #include "enums.h" #include "event.h" #include "event_bus.h" @@ -40,6 +44,8 @@ #include "game_constants.h" #include "game_inventory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" #include "item_location.h" #include "itype.h" #include "line.h" @@ -49,7 +55,6 @@ #include "map_iterator.h" #include "mapdata.h" #include "martialarts.h" -#include "memory_fast.h" #include "messages.h" #include "monattack.h" #include "monster.h" @@ -58,15 +63,21 @@ #include "npc.h" #include "output.h" #include "pimpl.h" +#include "pocket_type.h" #include "point.h" #include "popup.h" +#include "proficiency.h" #include "projectile.h" +#include "ret_val.h" #include "rng.h" #include "sounds.h" #include "string_formatter.h" +#include "subbodypart.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "units.h" +#include "value_ptr.h" #include "vehicle.h" #include "vpart_position.h" #include "weakpoint.h" diff --git a/src/memorial_logger.cpp b/src/memorial_logger.cpp index eaf19f545c48c..d44f2d782c78f 100644 --- a/src/memorial_logger.cpp +++ b/src/memorial_logger.cpp @@ -1,5 +1,6 @@ #include "memorial_logger.h" +#include #include #include #include @@ -16,6 +17,7 @@ #include "calendar.h" #include "cata_variant.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "coordinates.h" #include "debug.h" @@ -25,11 +27,14 @@ #include "event.h" #include "event_statistics.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "get_version.h" #include "inventory.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" #include "itype.h" #include "json.h" #include "json_loader.h" @@ -47,13 +52,17 @@ #include "past_games_info.h" #include "pimpl.h" #include "profession.h" +#include "proficiency.h" #include "skill.h" #include "stats_tracker.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "type_id.h" #include "units.h" +// IWYU pragma: no_forward_declare debug_menu::debug_menu_index + static const efftype_id effect_adrenaline( "adrenaline" ); static const efftype_id effect_datura( "datura" ); static const efftype_id effect_drunk( "drunk" ); diff --git a/src/memorial_logger.h b/src/memorial_logger.h index f8db25be64e18..3cdbcf790a85a 100644 --- a/src/memorial_logger.h +++ b/src/memorial_logger.h @@ -3,8 +3,9 @@ #define CATA_SRC_MEMORIAL_LOGGER_H #include -#include #include +#include +#include #include #include "calendar.h" @@ -12,10 +13,6 @@ #include "string_formatter.h" #include "type_id.h" -namespace cata -{ -class event; -} // namespace cata class JsonObject; class JsonOut; diff --git a/src/messages.cpp b/src/messages.cpp index 3df98f1bd0981..c247bc315827d 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -3,19 +3,25 @@ #include "cached_options.h" #include "calendar.h" #include "catacharset.h" +#include "character.h" #include "color.h" #include "cursesdef.h" #include "debug.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "input_context.h" #include "json.h" #include "output.h" #include "panels.h" #include "point.h" +#include "rng.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" #include "ui_manager.h" #include "viewer.h" @@ -23,10 +29,13 @@ #include #endif #include +#include +#include #include #include #include #include +#include #include "options.h" diff --git a/src/messages.h b/src/messages.h index ddaa551ee9b99..97903c533ad15 100644 --- a/src/messages.h +++ b/src/messages.h @@ -3,8 +3,7 @@ #define CATA_SRC_MESSAGES_H #include -#include -#include +#include #include #include @@ -17,7 +16,6 @@ class Creature; class JsonObject; class JsonOut; class translation; -struct tripoint; namespace catacurses { diff --git a/src/mission.cpp b/src/mission.cpp index 3af9382c660f3..874dfee1957f5 100644 --- a/src/mission.cpp +++ b/src/mission.cpp @@ -6,14 +6,13 @@ #include #include #include -#include #include #include #include #include #include "avatar.h" -#include "colony.h" +#include "character.h" #include "creature.h" #include "debug.h" #include "dialogue.h" @@ -29,12 +28,12 @@ #include "map_iterator.h" #include "monster.h" #include "npc.h" -#include "overmap.h" +#include "omdata.h" #include "overmapbuffer.h" +#include "player_activity.h" #include "point.h" #include "requirements.h" -#include "string_formatter.h" -#include "translations.h" +#include "talker.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/mission.h b/src/mission.h index 48d650b58d12b..c2bbfb576c4b6 100644 --- a/src/mission.h +++ b/src/mission.h @@ -3,25 +3,21 @@ #define CATA_SRC_MISSION_H #include -#include #include -#include #include #include +#include #include #include #include "calendar.h" #include "character_id.h" -#include "coords_fwd.h" -#include "dialogue.h" +#include "coordinates.h" +#include "dialogue_helpers.h" #include "enums.h" -#include "game_constants.h" #include "npc_favor.h" -#include "omdata.h" -#include "overmap.h" -#include "talker.h" -#include "translations.h" +#include "point.h" +#include "translation.h" #include "type_id.h" class Creature; @@ -33,10 +29,11 @@ class item; class mission; class npc; class overmapbuffer; +struct const_dialogue; +struct dialogue; +struct oter_type_t; template struct enum_traits; -enum npc_mission : int; - namespace debug_menu { class mission_debug; diff --git a/src/mission_companion.cpp b/src/mission_companion.cpp index de28b831a6ba2..b11a25f7ca30e 100644 --- a/src/mission_companion.cpp +++ b/src/mission_companion.cpp @@ -1,7 +1,10 @@ #include "mission_companion.h" #include +#include +#include #include +#include #include #include #include @@ -9,6 +12,7 @@ #include #include #include +#include #include #include @@ -16,29 +20,32 @@ #include "bodypart.h" #include "calendar.h" #include "cata_assert.h" +#include "cata_utility.h" #include "catacharset.h" #include "character.h" -#include "colony.h" +#include "character_id.h" #include "color.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "cursesdef.h" #include "debug.h" +#include "enum_conversions.h" #include "enums.h" #include "faction.h" #include "faction_camp.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" #include "input_context.h" #include "inventory.h" #include "item.h" #include "item_group.h" -#include "item_stack.h" #include "itype.h" -#include "line.h" +#include "json.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "memory_fast.h" #include "messages.h" @@ -53,6 +60,7 @@ #include "rng.h" #include "skill.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" @@ -60,8 +68,6 @@ #include "weather.h" #include "weighted_list.h" -class character_id; - static const efftype_id effect_riding( "riding" ); static const furn_str_id furn_f_plant_harvest( "f_plant_harvest" ); diff --git a/src/mission_companion.h b/src/mission_companion.h index 610a53f89b4d0..5c1997173d13b 100644 --- a/src/mission_companion.h +++ b/src/mission_companion.h @@ -2,25 +2,27 @@ #ifndef CATA_SRC_MISSION_COMPANION_H #define CATA_SRC_MISSION_COMPANION_H -#include #include -#include #include +#include #include #include #include "calendar.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "mapgendata.h" #include "memory_fast.h" -#include "point.h" #include "type_id.h" +class JsonOut; +class JsonValue; class item; class monster; class npc; class npc_template; struct comp_rank; +struct tripoint; +template struct enum_traits; using npc_ptr = shared_ptr_fast; using comp_list = std::vector; diff --git a/src/mission_start.cpp b/src/mission_start.cpp index 4be14e6b429e5..1f1cd8551f9e8 100644 --- a/src/mission_start.cpp +++ b/src/mission_start.cpp @@ -1,8 +1,10 @@ #include "mission.h" // IWYU pragma: associated +#include +#include #include -#include #include +#include #include #include "avatar.h" @@ -10,24 +12,23 @@ #include "computer.h" #include "coordinates.h" #include "debug.h" -#include "enum_traits.h" +#include "dialogue.h" #include "game.h" -#include "game_constants.h" #include "item.h" #include "line.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "messages.h" #include "npc.h" -#include "omdata.h" #include "overmap.h" #include "overmapbuffer.h" #include "point.h" #include "rng.h" #include "string_formatter.h" +#include "talker.h" #include "translations.h" -#include "units.h" static const furn_str_id furn_f_bed( "f_bed" ); static const furn_str_id furn_f_console( "f_console" ); diff --git a/src/mission_ui.cpp b/src/mission_ui.cpp index 8e5e2250da1a0..52a4d4c909b40 100644 --- a/src/mission_ui.cpp +++ b/src/mission_ui.cpp @@ -7,19 +7,23 @@ #include "avatar.h" #include "calendar.h" +#include "cata_imgui.h" #include "color.h" -#include "debug.h" +#include "dialogue.h" +#include "dialogue_helpers.h" +#include "game_constants.h" #include "input_context.h" #include "mission.h" #include "npc.h" #include "output.h" #include "string_formatter.h" +#include "talker.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" +#include "units.h" #include "units_utility.h" -#include "cata_imgui.h" -#include "imgui/imgui.h" enum class mission_ui_tab_enum : int { ACTIVE = 0, @@ -46,8 +50,6 @@ static mission_ui_tab_enum &operator--( mission_ui_tab_enum &c ) return c; } -class mission_ui; - class mission_ui { friend class mission_ui_impl; diff --git a/src/mission_util.cpp b/src/mission_util.cpp index ba7f0fa690b83..e44b0e856db5d 100644 --- a/src/mission_util.cpp +++ b/src/mission_util.cpp @@ -1,10 +1,9 @@ -#include #include -#include #include -#include #include #include +#include +#include #include #include @@ -12,15 +11,18 @@ #include "cata_assert.h" #include "character.h" #include "city.h" -#include "coordinates.h" #include "condition.h" +#include "coordinates.h" #include "debug.h" #include "dialogue.h" +#include "dialogue_helpers.h" #include "enum_conversions.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "json.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapgen_functions.h" #include "messages.h" #include "mission.h" diff --git a/src/missiondef.cpp b/src/missiondef.cpp index bacdb435d4c5f..bc99c020bd319 100644 --- a/src/missiondef.cpp +++ b/src/missiondef.cpp @@ -1,19 +1,19 @@ #include "mission.h" // IWYU pragma: associated #include -#include +#include #include #include "assign.h" -#include "calendar.h" #include "condition.h" #include "debug.h" +#include "dialogue.h" #include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "init.h" #include "item.h" -#include "json.h" -#include "npc.h" #include "rng.h" static const mission_type_id mission_MISSION_EXPLORE_SARCOPHAGUS( "MISSION_EXPLORE_SARCOPHAGUS" ); diff --git a/src/mmap_file.cpp b/src/mmap_file.cpp index f6459fc9eb21b..67dd31cec4a84 100644 --- a/src/mmap_file.cpp +++ b/src/mmap_file.cpp @@ -2,25 +2,30 @@ #ifdef _WIN32 -#include +#if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU +# include "platform_win.h" // IWYU pragma: keep +#endif -#include "platform_win.h" +#include // for CreateFileW, GetFileSizeEx, OPEN_EXISTING +#include // for INVALID_HANDLE_VALUE, CloseHandle +#include // for CreateFileMappingW, MapViewOfFile, UnmapViewO... +#include // for HANDLE, FILE_SHARE_DELETE, FILE_SHARE_READ #else +#include #include -#include #include -#include +#include #include +#include "cata_scope_helpers.h" +#include "cata_utility.h" + #endif #include -#include "cata_scope_helpers.h" -#include "cata_utility.h" - mmap_file::mmap_file() = default; mmap_file::~mmap_file() diff --git a/src/mmap_file.h b/src/mmap_file.h index 71b388a9e3d75..2f35cdf7b77b5 100644 --- a/src/mmap_file.h +++ b/src/mmap_file.h @@ -2,11 +2,12 @@ #ifndef CATA_SRC_MMAP_FILE_H #define CATA_SRC_MMAP_FILE_H +#include +#include +#include #include #include -#include - class mmap_file { public: @@ -23,6 +24,7 @@ class mmap_file // Opaque type to platform specific mmap implementation which can clean up the view when destructed. struct handle; + std::shared_ptr mmap_handle; }; diff --git a/src/mod_manager.cpp b/src/mod_manager.cpp index 74dad45734c8e..e7658b3fc0f63 100644 --- a/src/mod_manager.cpp +++ b/src/mod_manager.cpp @@ -1,18 +1,20 @@ #include "mod_manager.h" #include +#include #include #include #include #include #include -#include #include "assign.h" #include "cata_utility.h" #include "debug.h" #include "dependency_tree.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "json.h" #include "localized_comparator.h" #include "path_info.h" diff --git a/src/mod_manager.h b/src/mod_manager.h index fb0e72b6c559e..fc8ce6f23c75e 100644 --- a/src/mod_manager.h +++ b/src/mod_manager.h @@ -3,24 +3,24 @@ #define CATA_SRC_MOD_MANAGER_H #include -#include #include #include #include #include #include +#include "cata_path.h" #include "output.h" -#include "path_info.h" #include "pimpl.h" +#include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "type_id.h" -struct WORLD; - class JsonObject; class dependency_tree; class mod_manager; +struct WORLD; const std::vector> &get_mod_list_categories(); const std::vector> &get_mod_list_tabs(); diff --git a/src/mod_tileset.cpp b/src/mod_tileset.cpp index 555c7efeb04e4..ad5abf591aecc 100644 --- a/src/mod_tileset.cpp +++ b/src/mod_tileset.cpp @@ -3,7 +3,8 @@ #include #include -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" std::vector all_mod_tilesets; diff --git a/src/mod_tileset.h b/src/mod_tileset.h index 3fd3b5469eaa5..cb7658b4ad59b 100644 --- a/src/mod_tileset.h +++ b/src/mod_tileset.h @@ -3,9 +3,10 @@ #define CATA_SRC_MOD_TILESET_H #include // IWYU pragma: keep +#include #include -#include "path_info.h" +#include "cata_path.h" class JsonObject; class mod_tileset; diff --git a/src/monattack.cpp b/src/monattack.cpp index 51e4c29666d00..022f49d86f50c 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -9,24 +9,24 @@ #include #include #include -#include #include -#include #include #include +#include #include #include -#include "activity_type.h" +#include "active_item_cache.h" #include "ballistics.h" #include "bionics.h" #include "bodypart.h" #include "calendar.h" #include "cata_assert.h" +#include "cata_utility.h" #include "character.h" #include "character_id.h" #include "character_martial_arts.h" -#include "colony.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "damage.h" @@ -35,38 +35,33 @@ #include "effect.h" #include "effect_source.h" #include "enums.h" -#include "event.h" -#include "event_bus.h" #include "explosion.h" #include "field_type.h" #include "flag.h" #include "fungal_effects.h" #include "game.h" #include "game_constants.h" -#include "gun_mode.h" #include "harvest.h" #include "item.h" -#include "item_stack.h" +#include "item_location.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" #include "line.h" -#include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "martialarts.h" #include "material.h" -#include "mattack_actors.h" #include "mattack_common.h" #include "memorial_logger.h" +#include "memory_fast.h" #include "messages.h" #include "mission.h" -#include "mondefense.h" #include "monfaction.h" #include "monster.h" #include "mtype.h" -#include "npc.h" #include "output.h" #include "pathfinding.h" #include "pimpl.h" @@ -75,20 +70,18 @@ #include "rng.h" #include "sounds.h" #include "speech.h" +#include "stomach.h" #include "string_formatter.h" #include "text_snippets.h" -#include "tileray.h" #include "timed_event.h" +#include "translation.h" #include "translations.h" +#include "trap.h" #include "type_id.h" #include "ui.h" -#include "ui_manager.h" #include "units.h" #include "value_ptr.h" -#include "vehicle.h" -#include "veh_type.h" #include "viewer.h" -#include "vpart_position.h" #include "weighted_list.h" static const activity_id ACT_RELOAD( "ACT_RELOAD" ); diff --git a/src/mondeath.cpp b/src/mondeath.cpp index d24ae9079c82c..b82be71282284 100644 --- a/src/mondeath.cpp +++ b/src/mondeath.cpp @@ -3,31 +3,19 @@ #include #include #include -#include -#include -#include #include #include -#include #include #include #include #include "calendar.h" -#include "character.h" -#include "colony.h" +#include "coordinates.h" #include "creature.h" -#include "debug.h" #include "enums.h" -#include "explosion.h" -#include "field_type.h" -#include "fungal_effects.h" -#include "game.h" #include "harvest.h" -#include "item_stack.h" +#include "item.h" #include "itype.h" -#include "kill_tracker.h" -#include "line.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" @@ -39,13 +27,10 @@ #include "point.h" #include "rng.h" #include "sounds.h" -#include "string_formatter.h" -#include "timed_event.h" #include "translations.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" -#include "viewer.h" static const efftype_id effect_no_ammo( "no_ammo" ); diff --git a/src/mondeath.h b/src/mondeath.h index 0f1e09e0b4106..f6fba7ffaf18c 100644 --- a/src/mondeath.h +++ b/src/mondeath.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_MONDEATH_H #define CATA_SRC_MONDEATH_H -#include "item.h" +#include "item_location.h" class monster; diff --git a/src/mondefense.cpp b/src/mondefense.cpp index e9756b902d406..bd29298a146c4 100644 --- a/src/mondefense.cpp +++ b/src/mondefense.cpp @@ -1,30 +1,29 @@ #include "mondefense.h" -#include #include -#include -#include #include +#include #include #include #include #include #include "ballistics.h" +#include "bodypart.h" +#include "character.h" +#include "character_attire.h" +#include "coordinates.h" #include "creature.h" #include "damage.h" #include "dispersion.h" #include "enums.h" -#include "gun_mode.h" #include "item.h" -#include "line.h" +#include "item_location.h" #include "mattack_actors.h" #include "mattack_common.h" #include "messages.h" #include "monster.h" #include "mtype.h" -#include "npc.h" -#include "point.h" #include "projectile.h" #include "rng.h" #include "sounds.h" diff --git a/src/monexamine.cpp b/src/monexamine.cpp index 667c8185c8651..fd2ad1aff4502 100644 --- a/src/monexamine.cpp +++ b/src/monexamine.cpp @@ -1,7 +1,5 @@ #include "monexamine.h" -#include -#include #include #include #include @@ -11,9 +9,11 @@ #include "activity_actor_definitions.h" #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "debug.h" #include "enums.h" @@ -31,11 +31,11 @@ #include "mtype.h" #include "npc.h" #include "output.h" -#include "player_activity.h" #include "point.h" #include "rng.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "talker.h" // IWYU pragma: keep; completes get_talker_for definition #include "translations.h" #include "type_id.h" #include "ui.h" diff --git a/src/monfaction.cpp b/src/monfaction.cpp index 953f3bcb85ba2..a760f3c74a587 100644 --- a/src/monfaction.cpp +++ b/src/monfaction.cpp @@ -1,16 +1,14 @@ #include "monfaction.h" -#include #include #include -#include #include #include #include "debug.h" #include "debug_menu.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" // for legacy reasons "monfaction::id" is called "name" in json static generic_factory faction_factory( "MONSTER_FACTION", "name" ); diff --git a/src/monfaction.h b/src/monfaction.h index 3b00134e869dd..98cb543cb2844 100644 --- a/src/monfaction.h +++ b/src/monfaction.h @@ -3,11 +3,13 @@ #define CATA_SRC_MONFACTION_H #include -#include #include #include #include #include +#include +#include +#include #include #include "type_id.h" diff --git a/src/mongroup.cpp b/src/mongroup.cpp index 1283fef1dd8a1..d8c0491a96c96 100644 --- a/src/mongroup.cpp +++ b/src/mongroup.cpp @@ -8,7 +8,9 @@ #include "calendar.h" #include "cata_utility.h" #include "debug.h" -#include "json.h" +#include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "mtype.h" #include "options.h" #include "rng.h" diff --git a/src/mongroup.h b/src/mongroup.h index 2a5d9d6b0218b..271d45662d193 100644 --- a/src/mongroup.h +++ b/src/mongroup.h @@ -2,13 +2,13 @@ #ifndef CATA_SRC_MONGROUP_H #define CATA_SRC_MONGROUP_H -#include #include #include +#include #include #include "calendar.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "enums.h" #include "io_tags.h" #include "mapgen.h" @@ -21,6 +21,7 @@ class JsonOut; // from overmap.h class overmap; struct MonsterGroupEntry; +template struct enum_traits; using FreqDef = std::vector; using FreqDef_iter = FreqDef::iterator; diff --git a/src/monmove.cpp b/src/monmove.cpp index 6c9c88933bed3..e63f16995e4b9 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -9,29 +9,28 @@ #include #include #include -#include #include -#include #include "behavior.h" #include "bionics.h" -#include "cached_options.h" +#include "cata_assert.h" #include "cata_utility.h" #include "character.h" -#include "colony.h" #include "creature_tracker.h" +#include "damage.h" #include "debug.h" +#include "effect.h" +#include "enums.h" #include "field.h" #include "field_type.h" #include "game.h" -#include "game_constants.h" #include "line.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "mattack_common.h" -#include "memory_fast.h" #include "messages.h" #include "monfaction.h" #include "mongroup.h" @@ -41,16 +40,15 @@ #include "options.h" #include "pathfinding.h" #include "pimpl.h" +#include "point.h" #include "rng.h" #include "scent_map.h" #include "sounds.h" #include "string_formatter.h" -#include "submap.h" #include "tileray.h" #include "translations.h" #include "trap.h" #include "units.h" -#include "veh_type.h" #include "vehicle.h" #include "viewer.h" #include "vpart_position.h" diff --git a/src/monster.cpp b/src/monster.cpp index 491eb80e0cf81..5b1113f30e071 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -1,44 +1,54 @@ #include "monster.h" #include -#include #include +#include +#include +#include #include #include #include #include #include +#include #include "ascii_art.h" #include "avatar.h" #include "bodypart.h" -#include "catacharset.h" +#include "cached_options.h" #include "cata_imgui.h" +#include "catacharset.h" #include "character.h" -#include "colony.h" #include "coordinates.h" #include "creature_tracker.h" #include "cursesdef.h" +#include "damage.h" #include "debug.h" +#include "dialogue.h" +#include "dialogue_helpers.h" #include "effect.h" #include "effect_on_condition.h" #include "effect_source.h" +#include "enums.h" #include "event.h" #include "event_bus.h" #include "explosion.h" #include "faction.h" #include "field_type.h" +#include "flat_set.h" #include "game.h" -#include "game_constants.h" #include "harvest.h" #include "item.h" #include "item_group.h" +#include "item_location.h" +#include "item_pocket.h" #include "itype.h" -#include "imgui/imgui.h" -#include "line.h" +#include "magic.h" +#include "magic_enchantment.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "mattack_common.h" #include "melee.h" @@ -55,19 +65,24 @@ #include "options.h" #include "output.h" #include "overmapbuffer.h" +#include "pathfinding.h" #include "pimpl.h" +#include "pocket_type.h" +#include "point.h" #include "projectile.h" #include "rng.h" +#include "shearing.h" #include "sounds.h" +#include "speed_description.h" #include "string_formatter.h" +#include "talker.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "type_id.h" +#include "ui.h" #include "units.h" -#include "veh_type.h" -#include "vehicle.h" -#include "vpart_position.h" #include "viewer.h" #include "weakpoint.h" #include "weather.h" @@ -204,8 +219,6 @@ static const trait_id trait_PHEROMONE_MAMMAL( "PHEROMONE_MAMMAL" ); static const trait_id trait_TERRIFYING( "TERRIFYING" ); static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); -struct pathfinding_settings; - // Limit the number of iterations for next upgrade_time calculations. // This also sets the percentage of monsters that will never upgrade. // The rough formula is 2^(-x), e.g. for x = 5 it's 0.03125 (~ 3%). diff --git a/src/monster.h b/src/monster.h index 7bce8a71c999e..c505ea82fa6d0 100644 --- a/src/monster.h +++ b/src/monster.h @@ -2,26 +2,29 @@ #ifndef CATA_SRC_MONSTER_H #define CATA_SRC_MONSTER_H +#include #include #include #include #include -#include #include -#include #include #include +#include +#include +#include +#include #include #include +#include "bodypart.h" #include "calendar.h" #include "character_id.h" #include "color.h" #include "compatibility.h" +#include "coordinates.h" #include "creature.h" -#include "damage.h" -#include "enums.h" -#include "point.h" +#include "item.h" #include "type_id.h" #include "units_fwd.h" #include "value_ptr.h" @@ -30,19 +33,13 @@ class Character; class JsonObject; class JsonOut; -class effect; class effect_source; -class item; -struct monster_plan; -namespace catacurses -{ -class window; -} // namespace catacurses -struct dealt_projectile_attack; -struct pathfinding_settings; -struct trap; - +class map; enum class mon_trigger : int; +enum class phase_id : int; +struct monster_plan; +struct mtype; +struct tripoint; class mon_special_attack { diff --git a/src/monster_oracle.cpp b/src/monster_oracle.cpp index ffdabe49e09b9..746e4e59e6147 100644 --- a/src/monster_oracle.cpp +++ b/src/monster_oracle.cpp @@ -1,11 +1,17 @@ +#include +#include +#include + #include "behavior.h" +#include "coordinates.h" +#include "item.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" +#include "material.h" #include "monster.h" #include "monster_oracle.h" - -struct tripoint; +#include "type_id.h" namespace behavior { diff --git a/src/monster_oracle.h b/src/monster_oracle.h index 43bc4355ed72f..89342ecf08d0b 100644 --- a/src/monster_oracle.h +++ b/src/monster_oracle.h @@ -2,15 +2,15 @@ #ifndef CATA_SRC_MONSTER_ORACLE_H #define CATA_SRC_MONSTER_ORACLE_H -#include +#include +#include "behavior.h" #include "behavior_oracle.h" class monster; namespace behavior { -enum class status_t : char; class monster_oracle_t : public oracle_t { diff --git a/src/monstergenerator.cpp b/src/monstergenerator.cpp index f139b9fa84026..5968dd4673c4b 100644 --- a/src/monstergenerator.cpp +++ b/src/monstergenerator.cpp @@ -2,42 +2,51 @@ #include "monstergenerator.h" // IWYU pragma: associated #include -#include -#include -#include +#include #include #include #include +#include #include #include "assign.h" #include "bodypart.h" #include "cached_options.h" #include "calendar.h" +#include "cata_utility.h" #include "catacharset.h" +#include "condition.h" #include "creature.h" #include "damage.h" #include "debug.h" -#include "enum_conversions.h" +#include "enums.h" #include "field_type.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "game_constants.h" #include "generic_factory.h" #include "item.h" #include "item_group.h" -#include "json.h" -#include "make_static.h" +#include "magic.h" #include "mattack_actors.h" #include "monattack.h" -#include "mondeath.h" #include "mondefense.h" #include "mongroup.h" #include "options.h" #include "pathfinding.h" #include "rng.h" -#include "translations.h" +#include "shearing.h" +#include "string_formatter.h" #include "type_id.h" #include "units.h" #include "weakpoint.h" +namespace behavior +{ +class node_t; +} // namespace behavior +struct itype; + static const material_id material_flesh( "flesh" ); static const speed_description_id speed_description_DEFAULT( "DEFAULT" ); @@ -49,11 +58,6 @@ namespace generic_factory mon_flags( "monster flags" ); } // namespace -namespace behavior -{ -class node_t; -} // namespace behavior - namespace io { diff --git a/src/monstergenerator.h b/src/monstergenerator.h index 10c64be9d035a..269a3a6486c45 100644 --- a/src/monstergenerator.h +++ b/src/monstergenerator.h @@ -2,26 +2,29 @@ #ifndef CATA_SRC_MONSTERGENERATOR_H #define CATA_SRC_MONSTERGENERATOR_H -#include -#include #include #include #include +#include +#include +#include +#include +#include #include +#include "creature.h" #include "enum_bitset.h" -#include "enums.h" -#include "generic_factory.h" #include "mattack_common.h" +#include "monster.h" #include "mtype.h" #include "pimpl.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -class Creature; class JsonObject; -class monster; +enum class phase_id : int; struct dealt_projectile_attack; +template class generic_factory; using mon_action_death = void ( * )( monster & ); using mon_action_attack = bool ( * )( monster * ); diff --git a/src/mood_face.cpp b/src/mood_face.cpp index 0f6968e7990f2..7787df999554e 100644 --- a/src/mood_face.cpp +++ b/src/mood_face.cpp @@ -1,9 +1,11 @@ #include "mood_face.h" +#include +#include + #include "avatar.h" -#include "debug.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "mutation.h" #include "options.h" diff --git a/src/mood_face.h b/src/mood_face.h index f53fa52d1c4a2..3770e61b50f41 100644 --- a/src/mood_face.h +++ b/src/mood_face.h @@ -2,15 +2,17 @@ #ifndef CATA_SRC_MOOD_FACE_H #define CATA_SRC_MOOD_FACE_H +#include +#include +#include #include #include "type_id.h" class JsonObject; -class JsonOut; +class mood_face_value; template class generic_factory; -class mood_face_value; class mood_face { diff --git a/src/morale.cpp b/src/morale.cpp index 038b78145b1ed..a14dff2abcd4f 100644 --- a/src/morale.cpp +++ b/src/morale.cpp @@ -3,11 +3,13 @@ #include #include #include +#include #include #include #include #include +#include "body_part_set.h" #include "bodypart.h" #include "cata_utility.h" #include "catacharset.h" diff --git a/src/morale.h b/src/morale.h index b6f23380d698b..f8d86c1778844 100644 --- a/src/morale.h +++ b/src/morale.h @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include #include "calendar.h" diff --git a/src/morale_types.cpp b/src/morale_types.cpp index 742d74339ee2f..da28e197585f6 100644 --- a/src/morale_types.cpp +++ b/src/morale_types.cpp @@ -1,14 +1,9 @@ #include "morale_types.h" -#include -#include -#include - +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "itype.h" -#include "json.h" #include "string_formatter.h" -#include "debug.h" namespace { diff --git a/src/morale_types.h b/src/morale_types.h index 6769740a51a46..06998415e96b2 100644 --- a/src/morale_types.h +++ b/src/morale_types.h @@ -2,10 +2,12 @@ #ifndef CATA_SRC_MORALE_TYPES_H #define CATA_SRC_MORALE_TYPES_H -#include +#include +#include +#include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/move_mode.cpp b/src/move_mode.cpp index 24de344ffb3bd..9203a713cff8a 100644 --- a/src/move_mode.cpp +++ b/src/move_mode.cpp @@ -2,14 +2,16 @@ #include #include -#include #include +#include #include "assign.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" -#include "json.h" +#include "translations.h" static std::vector move_modes_sorted; diff --git a/src/move_mode.h b/src/move_mode.h index bbd7d6c6df674..fea9934772f4e 100644 --- a/src/move_mode.h +++ b/src/move_mode.h @@ -3,12 +3,14 @@ #define CATA_SRC_MOVE_MODE_H #include -#include #include +#include +#include +#include #include #include "color.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" diff --git a/src/mtype.cpp b/src/mtype.cpp index db1c7ed1e39d6..a9c083b530394 100644 --- a/src/mtype.cpp +++ b/src/mtype.cpp @@ -1,22 +1,28 @@ #include "mtype.h" #include -#include #include #include #include "behavior_strategy.h" #include "creature.h" +#include "enums.h" #include "field_type.h" +#include "game_constants.h" #include "item.h" #include "itype.h" #include "mod_manager.h" -#include "mondeath.h" #include "monstergenerator.h" #include "output.h" +#include "point.h" +#include "string_formatter.h" #include "translations.h" #include "units.h" -#include "weakpoint.h" + +namespace catacurses +{ +class window; +} // namespace catacurses static const harvest_id harvest_list_human( "human" ); diff --git a/src/mtype.h b/src/mtype.h index 01dc8b98a31cf..88a9e01c2930c 100644 --- a/src/mtype.h +++ b/src/mtype.h @@ -2,37 +2,39 @@ #ifndef CATA_SRC_MTYPE_H #define CATA_SRC_MTYPE_H -#include -#include #include #include #include #include +#include +#include #include #include "behavior.h" #include "calendar.h" #include "color.h" +#include "creature.h" #include "damage.h" #include "enum_bitset.h" -#include "enums.h" #include "magic.h" #include "mattack_common.h" +#include "monster.h" #include "pathfinding.h" #include "shearing.h" -#include "speed_description.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" // IWYU pragma: keep #include "weakpoint.h" -class Creature; -class monster; +enum class phase_id : int; +namespace catacurses +{ +class window; +} // namespace catacurses struct dealt_projectile_attack; +struct point; template struct enum_traits; -enum class creature_size : int; - using mon_action_death = void ( * )( monster & ); using mon_action_attack = bool ( * )( monster * ); using mon_action_defend = void ( * )( monster &, Creature *, dealt_projectile_attack const * ); diff --git a/src/music.cpp b/src/music.cpp index e766c39cc31f3..e721545256e5a 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -1,6 +1,7 @@ #include "music.h" #include "debug.h" +#include "enum_conversions.h" namespace io { diff --git a/src/music.h b/src/music.h index 562d192051378..0f0910d064fbe 100644 --- a/src/music.h +++ b/src/music.h @@ -1,9 +1,9 @@ #pragma once #include #include +#include -#include "enum_conversions.h" -#include "enum_traits.h" +template struct enum_traits; namespace music { diff --git a/src/mutation.cpp b/src/mutation.cpp index 3ca0b6b7e2ef3..87f76f42b3487 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -1,21 +1,24 @@ #include "mutation.h" #include +#include +#include #include #include +#include #include +#include #include -#include "activity_type.h" #include "avatar_action.h" -#include "avatar.h" #include "bionics.h" -#include "character_attire.h" +#include "cata_utility.h" #include "character.h" #include "color.h" -#include "condition.h" +#include "coordinates.h" #include "creature.h" #include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" #include "enums.h" #include "event.h" @@ -24,13 +27,12 @@ #include "game.h" #include "item.h" #include "itype.h" +#include "magic.h" #include "magic_enchantment.h" #include "make_static.h" -#include "magic.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" -#include "memorial_logger.h" #include "messages.h" #include "monster.h" #include "omdata.h" @@ -40,11 +42,15 @@ #include "pathfinding.h" #include "pimpl.h" #include "player_activity.h" +#include "relic.h" #include "rng.h" +#include "subbodypart.h" +#include "talker.h" #include "text_snippets.h" #include "translations.h" +#include "ui.h" #include "uistate.h" -#include "units.h" +#include "weighted_list.h" static const activity_id ACT_PULL_CREATURE( "ACT_PULL_CREATURE" ); static const activity_id ACT_TREE_COMMUNION( "ACT_TREE_COMMUNION" ); diff --git a/src/mutation.h b/src/mutation.h index cc1690037dab1..7a3bfdbf41181 100644 --- a/src/mutation.h +++ b/src/mutation.h @@ -2,38 +2,37 @@ #ifndef CATA_SRC_MUTATION_H #define CATA_SRC_MUTATION_H -#include -#include +#include #include -#include #include #include #include -#include +#include #include #include +#include "bodypart.h" #include "calendar.h" -#include "character.h" +#include "color.h" #include "damage.h" -#include "hash_utils.h" -#include "magic.h" +#include "enums.h" #include "memory_fast.h" #include "point.h" #include "sleep.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" +#include "units.h" #include "value_ptr.h" +class Character; class JsonArray; class JsonObject; +class JsonOut; +class JsonValue; class Trait_group; class item; -class nc_color; +struct const_dialogue; struct dream; - -enum game_message_type : int; - template struct enum_traits; extern std::vector dreams; diff --git a/src/mutation_data.cpp b/src/mutation_data.cpp index 5df9b6e918863..132eb8110724a 100644 --- a/src/mutation_data.cpp +++ b/src/mutation_data.cpp @@ -1,11 +1,13 @@ #include "mutation.h" // IWYU pragma: associated +#include #include +#include #include #include #include #include -#include +#include #include #include "assign.h" @@ -15,16 +17,20 @@ #include "effect_on_condition.h" #include "enum_conversions.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "json.h" #include "localized_comparator.h" -#include "magic.h" +#include "magic_enchantment.h" #include "make_static.h" #include "memory_fast.h" #include "npc.h" #include "string_formatter.h" #include "trait_group.h" #include "translations.h" +#include "ui.h" +#include "weighted_list.h" static const mutation_category_id mutation_category_ANY( "ANY" ); diff --git a/src/mutation_type.cpp b/src/mutation_type.cpp index eeeb6ec47663f..40c418904cd25 100644 --- a/src/mutation_type.cpp +++ b/src/mutation_type.cpp @@ -1,6 +1,7 @@ #include "mutation.h" // IWYU pragma: associated -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" struct mutation_type { std::string id; diff --git a/src/mutation_ui.cpp b/src/mutation_ui.cpp index 5d00cefdeb0c6..7057c4695ab49 100644 --- a/src/mutation_ui.cpp +++ b/src/mutation_ui.cpp @@ -1,9 +1,13 @@ #include "character.h" // IWYU pragma: associated #include //std::min +#include #include +#include #include +#include #include +#include #include #include "avatar.h" @@ -11,6 +15,7 @@ #include "cursesdef.h" #include "enums.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "magic.h" #include "mutation.h" @@ -19,6 +24,7 @@ #include "string_formatter.h" #include "translations.h" #include "ui_manager.h" + enum class mutation_menu_mode { activating, examining, diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index 23f76dd0bcea8..da0ce88b33a68 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -21,17 +22,22 @@ #include "addiction.h" #include "bionics.h" #include "calendar_ui.h" +#include "cata_path.h" #include "cata_utility.h" #include "catacharset.h" #include "character.h" #include "character_martial_arts.h" #include "city.h" #include "color.h" +#include "cuboid_rectangle.h" #include "cursesdef.h" +#include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "input_context.h" -#include "inventory.h" +#include "input_enums.h" #include "item.h" #include "json.h" #include "loading_ui.h" @@ -45,17 +51,20 @@ #include "mod_manager.h" #include "monster.h" #include "mutation.h" +#include "npc.h" #include "options.h" #include "output.h" #include "overmap_ui.h" #include "path_info.h" #include "pimpl.h" #include "player_difficulty.h" +#include "point.h" #include "profession.h" #include "profession_group.h" #include "proficiency.h" #include "recipe.h" #include "recipe_dictionary.h" +#include "ret_val.h" #include "rng.h" #include "scenario.h" #include "skill.h" @@ -64,6 +73,7 @@ #include "string_formatter.h" #include "string_input_popup.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui.h" diff --git a/src/npc.cpp b/src/npc.cpp index b5a5632080688..c58c00bc8c787 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -5,20 +5,20 @@ #include #include #include -#include #include #include -#include "activity_type.h" #include "activity_actor_definitions.h" +#include "activity_type.h" #include "auto_pickup.h" #include "basecamp.h" #include "bodypart.h" #include "catacharset.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "character_martial_arts.h" -#include "clzones.h" +#include "creature.h" #include "creature_tracker.h" #include "cursesdef.h" #include "damage.h" @@ -27,23 +27,26 @@ #include "dialogue_chatbin.h" #include "effect.h" #include "effect_on_condition.h" +#include "enum_conversions.h" +#include "enum_traits.h" #include "enums.h" #include "event.h" #include "event_bus.h" #include "faction.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "gates.h" #include "game_constants.h" #include "game_inventory.h" +#include "gates.h" #include "item.h" #include "item_group.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" -#include "json.h" #include "magic.h" -#include "make_static.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" @@ -53,9 +56,9 @@ #include "mtype.h" #include "mutation.h" #include "npc_class.h" +#include "npctalk.h" #include "npctrade.h" #include "npctrade_utils.h" -#include "npctalk.h" #include "options.h" #include "output.h" #include "overmap.h" @@ -64,6 +67,7 @@ #include "player_activity.h" #include "ret_val.h" #include "rng.h" +#include "shop_cons_rate.h" #include "skill.h" #include "sounds.h" #include "stomach.h" @@ -71,7 +75,6 @@ #include "talker.h" #include "talker_npc.h" #include "text_snippets.h" -#include "tileray.h" #include "trait_group.h" #include "translations.h" #include "units.h" @@ -81,7 +84,6 @@ #include "viewer.h" #include "visitable.h" #include "vpart_position.h" -#include "vpart_range.h" static const efftype_id effect_bouldering( "bouldering" ); static const efftype_id effect_controlled( "controlled" ); @@ -169,8 +171,6 @@ static const trait_id trait_PROF_DICEMASTER( "PROF_DICEMASTER" ); static const trait_id trait_SQUEAMISH( "SQUEAMISH" ); static const trait_id trait_TERRIFYING( "TERRIFYING" ); -class monfaction; - static void starting_clothes( npc &who, const npc_class_id &type, bool male ); static void starting_inv( npc &who, const npc_class_id &type ); static void starting_inv_ammo( npc &who, std::list &res, int multiplier ); diff --git a/src/npc.h b/src/npc.h index 36c6110fcacb7..904032db17893 100644 --- a/src/npc.h +++ b/src/npc.h @@ -2,61 +2,69 @@ #ifndef CATA_SRC_NPC_H #define CATA_SRC_NPC_H -#include +#include #include -#include #include -#include #include #include #include -#include #include #include #include -#include +#include #include #include #include -#include "activity_type.h" #include "auto_pickup.h" -#include "basecamp.h" #include "calendar.h" #include "character.h" #include "color.h" -#include "coords_fwd.h" -#include "creature.h" +#include "compatibility.h" +#include "coordinates.h" #include "dialogue_chatbin.h" -#include "enums.h" -#include "faction.h" -#include "game_constants.h" #include "inventory.h" #include "item.h" #include "item_location.h" #include "line.h" #include "lru_cache.h" +#include "map_scale_constants.h" #include "memory_fast.h" #include "mission_companion.h" #include "npc_attack.h" #include "npc_opinion.h" #include "pimpl.h" #include "point.h" +#include "ret_val.h" #include "sounds.h" #include "string_formatter.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -#include "units_fwd.h" +class Creature; class JsonObject; class JsonOut; class JsonValue; +class cata_path; +class character_id; +class const_talker; +class faction; class mission; class monfaction; class monster; -class npc_class; class talker; class vehicle; +namespace auto_pickup +{ +class npc_settings; +} // namespace auto_pickup +namespace npc_factions +{ +enum class relationship : int; +} // namespace npc_factions +struct Target_attributes; +struct const_dialogue; +struct faction_price_rule; constexpr int NPC_PERSONALITY_MIN = -10; constexpr int NPC_PERSONALITY_MAX = 10; @@ -69,17 +77,10 @@ namespace catacurses { class window; } // namespace catacurses -struct bionic_data; -struct mission_type; +class gun_mode; struct overmap_location; struct pathfinding_settings; -enum game_message_type : int; -class gun_mode; - -using bionic_id = string_id; -using npc_class_id = string_id; -using mission_type_id = string_id; using mfaction_id = int_id; using overmap_location_str_id = string_id; using drop_location = std::pair; diff --git a/src/npc_attack.cpp b/src/npc_attack.cpp index da87d0a8547b6..6d4e86735eab6 100644 --- a/src/npc_attack.cpp +++ b/src/npc_attack.cpp @@ -1,21 +1,37 @@ #include "npc_attack.h" +#include +#include +#include +#include +#include +#include + #include "cata_utility.h" #include "character.h" +#include "creature.h" #include "creature_tracker.h" +#include "damage.h" +#include "debug.h" #include "dialogue.h" +#include "dialogue_helpers.h" #include "flag.h" +#include "game_constants.h" +#include "inventory.h" #include "item.h" -#include "itype.h" -#include "line.h" +#include "item_location.h" #include "magic.h" #include "magic_spell_effect_helpers.h" #include "map.h" #include "messages.h" #include "npc.h" +#include "pimpl.h" #include "point.h" #include "projectile.h" #include "ranged.h" +#include "ret_val.h" +#include "rng.h" +#include "talker.h" static const bionic_id bio_hydraulics( "bio_hydraulics" ); diff --git a/src/npc_class.cpp b/src/npc_class.cpp index 38956414eedeb..5291f9c2815ca 100644 --- a/src/npc_class.cpp +++ b/src/npc_class.cpp @@ -1,27 +1,30 @@ #include "npc_class.h" #include -#include -#include -#include -#include #include #include #include #include "avatar.h" #include "condition.h" +#include "creature.h" #include "debug.h" #include "dialogue.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item_group.h" -#include "itype.h" -#include "json.h" #include "mutation.h" #include "npc.h" #include "rng.h" +#include "shop_cons_rate.h" #include "skill.h" +#include "string_formatter.h" #include "trait_group.h" +#include "translations.h" +#include "weighted_list.h" + +class item; static generic_factory npc_class_factory( "npc_class" ); diff --git a/src/npc_class.h b/src/npc_class.h index 23cfb1cd41acc..fba4728ec49cb 100644 --- a/src/npc_class.h +++ b/src/npc_class.h @@ -3,20 +3,24 @@ #define CATA_SRC_NPC_CLASS_H #include -#include #include +#include +#include +#include #include -#include "shop_cons_rate.h" -#include "translations.h" +#include "calendar.h" +#include "faction.h" +#include "translation.h" #include "type_id.h" -class npc; class JsonObject; class Trait_group; - +class item; +class npc; struct const_dialogue; -struct faction_price_rule; +struct shopkeeper_blacklist; +struct shopkeeper_cons_rates; namespace trait_group { diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 7e98ca0eb33ce..10e0ff3ccacad 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -4,37 +4,41 @@ #include #include #include +#include #include +#include #include #include #include #include #include +#include #include "active_item_cache.h" -#include "activity_handlers.h" #include "activity_actor_definitions.h" -#include "ammo.h" +#include "activity_handlers.h" #include "avatar.h" #include "basecamp.h" #include "bionics.h" +#include "body_part_set.h" #include "bodypart.h" #include "cata_algo.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "clzones.h" -#include "colony.h" #include "coordinates.h" #include "creature.h" #include "creature_tracker.h" -#include "damage.h" #include "debug.h" #include "dialogue_chatbin.h" #include "dispersion.h" #include "effect.h" #include "enums.h" +#include "event.h" #include "event_bus.h" #include "explosion.h" +#include "faction.h" #include "field.h" #include "field_type.h" #include "flag.h" @@ -49,10 +53,11 @@ #include "iuse.h" #include "iuse_actor.h" #include "line.h" +#include "magic.h" #include "map.h" #include "map_iterator.h" +#include "map_selector.h" #include "mapdata.h" -#include "material.h" #include "messages.h" #include "mission.h" #include "monster.h" @@ -61,7 +66,6 @@ #include "npctalk.h" #include "omdata.h" #include "options.h" -#include "overmap.h" #include "overmap_location.h" #include "overmapbuffer.h" #include "player_activity.h" @@ -69,21 +73,24 @@ #include "ranged.h" #include "ret_val.h" #include "rng.h" +#include "simple_pathfinding.h" #include "sleep.h" #include "sounds.h" #include "stomach.h" -#include "talker.h" +#include "talker.h" // IWYU pragma: keep; completes get_talker_for definition #include "translations.h" #include "units.h" #include "value_ptr.h" #include "veh_type.h" #include "vehicle.h" +#include "vehicle_selector.h" #include "viewer.h" #include "visitable.h" -#include "vehicle_selector.h" #include "vpart_position.h" #include "vpart_range.h" +enum class side : int; + static const activity_id ACT_CRAFT( "ACT_CRAFT" ); static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); static const activity_id ACT_MOVE_LOOT( "ACT_MOVE_LOOT" ); diff --git a/src/npctalk.cpp b/src/npctalk.cpp index 42f109980eddb..e0d49157519b1 100644 --- a/src/npctalk.cpp +++ b/src/npctalk.cpp @@ -3,22 +3,31 @@ #include #include #include +#include #include #include #include #include +#include +#include #include +#include +#include #include +#include +#include #include #include +#include #include #include "achievement.h" -#include "activity_type.h" #include "auto_pickup.h" #include "avatar.h" #include "bionics.h" +#include "bodypart.h" #include "calendar.h" +#include "cata_lazy.h" #include "cata_utility.h" #include "catacharset.h" #include "character.h" @@ -26,75 +35,110 @@ #include "city.h" #include "clzones.h" #include "color.h" -#include "computer.h" #include "condition.h" #include "coordinates.h" #include "crafting_gui.h" +#include "creature.h" #include "creature_tracker.h" +#include "damage.h" #include "debug.h" +#include "dialogue.h" +#include "dialogue_chatbin.h" #include "dialogue_helpers.h" +#include "dialogue_win.h" #include "effect_on_condition.h" +#include "enum_conversions.h" +#include "enum_traits.h" #include "enums.h" +#include "event.h" #include "event_bus.h" #include "explosion.h" #include "faction.h" #include "faction_camp.h" +#include "field.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "game_inventory.h" #include "generic_factory.h" +#include "global_vars.h" #include "help.h" #include "input_context.h" +#include "input_enums.h" +#include "inventory.h" +#include "inventory_ui.h" #include "item.h" #include "item_category.h" +#include "item_group.h" +#include "item_location.h" #include "itype.h" #include "kill_tracker.h" -#include "line.h" #include "magic.h" #include "map.h" +#include "map_iterator.h" +#include "map_scale_constants.h" +#include "map_selector.h" #include "mapbuffer.h" #include "mapgen_functions.h" +#include "mapgendata.h" #include "martialarts.h" +#include "math_parser_type.h" +#include "memory_fast.h" #include "messages.h" #include "mission.h" +#include "mongroup.h" +#include "monster.h" #include "mtype.h" #include "mutation.h" #include "npc.h" +#include "npc_class.h" +#include "npc_opinion.h" #include "npctalk.h" #include "npctalk_rules.h" #include "npctrade.h" -#include "npc_class.h" #include "output.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" #include "pocket_type.h" #include "point.h" -#include "popup.h" +#include "proficiency.h" #include "recipe.h" #include "recipe_groups.h" -#include "ret_val.h" +#include "requirements.h" #include "rng.h" +#include "simple_pathfinding.h" #include "skill.h" #include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "submap.h" #include "talker.h" #include "talker_topic.h" #include "teleport.h" #include "text_snippets.h" #include "timed_event.h" -#include "translations.h" +#include "translation.h" #include "translation_gendered.h" +#include "translations.h" +#include "trap.h" #include "ui.h" #include "ui_manager.h" #include "uistate.h" +#include "units.h" #include "veh_type.h" #include "vehicle.h" +#include "visitable.h" #include "vitamin.h" #include "vpart_position.h" #include "vpart_range.h" +#include "weather.h" +#include "weighted_list.h" + +class recipe_subset; static const activity_id ACT_AIM( "ACT_AIM" ); static const activity_id ACT_SOCIALIZE( "ACT_SOCIALIZE" ); diff --git a/src/npctalk.h b/src/npctalk.h index d1a5437059763..24cba2250f890 100644 --- a/src/npctalk.h +++ b/src/npctalk.h @@ -2,13 +2,17 @@ #ifndef CATA_SRC_NPCTALK_H #define CATA_SRC_NPCTALK_H -#include "npc.h" +#include +#include +#include + +#include "calendar.h" #include "type_id.h" +class Character; class item; class json_talk_topic; class npc; -class time_duration; namespace talk_function { diff --git a/src/npctalk_funcs.cpp b/src/npctalk_funcs.cpp index c5257d368f201..b77fe266285c3 100644 --- a/src/npctalk_funcs.cpp +++ b/src/npctalk_funcs.cpp @@ -1,29 +1,30 @@ #include "npctalk.h" // IWYU pragma: associated +#include +#include #include #include -#include #include +#include #include -#include #include +#include #include #include +#include #include #include "activity_actor_definitions.h" -#include -#include "activity_type.h" #include "auto_pickup.h" #include "avatar.h" #include "basecamp.h" #include "bionics.h" #include "bodypart.h" #include "calendar.h" -#include "cata_utility.h" #include "character.h" #include "character_id.h" #include "character_martial_arts.h" +#include "clzones.h" #include "coordinates.h" #include "creature.h" #include "debug.h" @@ -37,15 +38,14 @@ #include "game_inventory.h" #include "item.h" #include "item_location.h" -#include "line.h" #include "magic.h" #include "map.h" -#include "memory_fast.h" #include "messages.h" #include "mission.h" #include "monster.h" #include "mutation.h" #include "npc.h" +#include "npc_opinion.h" #include "npctrade.h" #include "output.h" #include "overmap.h" @@ -55,11 +55,15 @@ #include "player_activity.h" #include "point.h" #include "rng.h" +#include "simple_pathfinding.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "viewer.h" +struct itype; + static const activity_id ACT_FIND_MOUNT( "ACT_FIND_MOUNT" ); static const activity_id ACT_MOVE_LOOT( "ACT_MOVE_LOOT" ); static const activity_id ACT_MULTIPLE_BUTCHER( "ACT_MULTIPLE_BUTCHER" ); @@ -111,8 +115,6 @@ static const mtype_id mon_horse( "mon_horse" ); static const zone_type_id zone_type_CAMP_FOOD( "CAMP_FOOD" ); static const zone_type_id zone_type_CAMP_STORAGE( "CAMP_STORAGE" ); -struct itype; - static void spawn_animal( npc &p, const mtype_id &mon ); void talk_function::nothing( npc & ) diff --git a/src/npctalk_rules.cpp b/src/npctalk_rules.cpp index b9ce7b3197df2..8f6c216eb829c 100644 --- a/src/npctalk_rules.cpp +++ b/src/npctalk_rules.cpp @@ -1,26 +1,30 @@ #include "npctalk_rules.h" -#include -#include -#include -#include -#include #include #include #include -#include +#include #include #include -#include +#include #include +#include "auto_pickup.h" #include "cata_imgui.h" -#include "dialogue.h" +#include "character.h" +#include "character_id.h" +#include "color.h" +#include "debug.h" #include "game.h" -#include "npctalk.h" -#include "ui_manager.h" #include "imgui/imgui.h" #include "imgui/imgui_internal.h" +#include "input_context.h" +#include "input_enums.h" +#include "npc.h" +#include "pimpl.h" +#include "string_formatter.h" +#include "translation.h" +#include "ui_manager.h" static std::map recharge_map = { {cbm_recharge_rule::CBM_RECHARGE_ALL, "" }, diff --git a/src/npctalk_rules.h b/src/npctalk_rules.h index e4bd9da1e00f0..27c373afc1479 100644 --- a/src/npctalk_rules.h +++ b/src/npctalk_rules.h @@ -3,24 +3,17 @@ #define CATA_SRC_NPCTALK_RULES_H #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include #include "cata_imgui.h" -#include "dialogue.h" -#include "npctalk.h" -#include "ui_manager.h" +#include "game_constants.h" #include "imgui/imgui.h" +#include "translations.h" + +class input_context; +class npc; +struct input_event; class follower_rules_ui { diff --git a/src/npctrade.cpp b/src/npctrade.cpp index 040cd98f7268c..6d97dce400d52 100644 --- a/src/npctrade.cpp +++ b/src/npctrade.cpp @@ -1,23 +1,32 @@ #include "npctrade.h" #include -#include +#include +#include +#include #include #include +#include +#include #include #include #include #include "avatar.h" #include "character.h" +#include "character_attire.h" #include "debug.h" +#include "enums.h" #include "faction.h" #include "item.h" #include "item_category.h" // IWYU pragma: keep +#include "item_contents.h" #include "item_location.h" #include "item_pocket.h" #include "npc.h" +#include "npc_opinion.h" #include "npctrade_utils.h" +#include "pocket_type.h" #include "ret_val.h" #include "skill.h" #include "trade_ui.h" diff --git a/src/npctrade.h b/src/npctrade.h index b54fd4f2acd60..fd4681b1b5659 100644 --- a/src/npctrade.h +++ b/src/npctrade.h @@ -7,16 +7,16 @@ #include #include +#include "item.h" #include "item_location.h" #include "trade_ui.h" -#include "units_fwd.h" +#include "units.h" constexpr char const *VAR_TRADE_IGNORE = "trade_ignore"; class Character; -class item; class npc; -struct faction_price_rule; + class item_pricing { public: diff --git a/src/npctrade_utils.cpp b/src/npctrade_utils.cpp index 7b84a028f5934..b3aaf44319535 100644 --- a/src/npctrade_utils.cpp +++ b/src/npctrade_utils.cpp @@ -1,13 +1,34 @@ #include "npctrade_utils.h" +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include #include "calendar.h" #include "clzones.h" +#include "coordinates.h" +#include "debug.h" +#include "game_constants.h" +#include "item.h" +#include "item_location.h" +#include "map.h" +#include "mapdata.h" #include "npc.h" #include "npc_class.h" +#include "pocket_type.h" +#include "point.h" #include "rng.h" +#include "shop_cons_rate.h" +#include "type_id.h" +#include "units.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/ofstream_wrapper.h b/src/ofstream_wrapper.h index 6ceff93a78db5..6e8adc85bd69a 100644 --- a/src/ofstream_wrapper.h +++ b/src/ofstream_wrapper.h @@ -2,6 +2,8 @@ #ifndef CATA_SRC_OFSTREAM_WRAPPER_H #define CATA_SRC_OFSTREAM_WRAPPER_H +#include + #include "filesystem.h" /** diff --git a/src/omdata.h b/src/omdata.h index 35bbbaeeef94a..fc2e1996d7234 100644 --- a/src/omdata.h +++ b/src/omdata.h @@ -6,44 +6,50 @@ #include #include #include -#include -#include -#include +#include #include #include #include +#include +#include #include #include "assign.h" -#include "catacharset.h" #include "color.h" #include "common_types.h" #include "coords_fwd.h" #include "cube_direction.h" #include "enum_bitset.h" +#include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "mapgen_parameter.h" +#include "memory_fast.h" #include "point.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" +class mapgendata; class overmap_land_use_code; + +namespace coords +{ +template class coord_point_ob; +} // namespace coords struct MonsterGroup; struct city; template struct enum_traits; +template class generic_factory; using overmap_land_use_code_id = string_id; -class JsonObject; -class JsonValue; class overmap; class overmap_connection; -class overmap_special; class overmap_special_batch; +enum class om_vision_level : int8_t; struct mapgen_arguments; struct oter_t; struct overmap_location; -enum class om_vision_level : int8_t; - inline const overmap_land_use_code_id land_use_code_forest( "forest" ); inline const overmap_land_use_code_id land_use_code_wetland( "wetland" ); inline const overmap_land_use_code_id land_use_code_wetland_forest( "wetland_forest" ); diff --git a/src/options.cpp b/src/options.cpp index 21db7cd7f41b7..64367dcc50679 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,20 +1,30 @@ #include "options.h" +#include #include #include #include +#include #include +#include +#include +#include #include +#include #include "cached_options.h" #include "calendar.h" +#include "cata_path.h" #include "cata_utility.h" #include "catacharset.h" #include "color.h" +#include "cuboid_rectangle.h" #include "cursesdef.h" #include "cursesport.h" // IWYU pragma: keep #include "debug.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "generic_factory.h" @@ -23,13 +33,16 @@ #include "json.h" #include "lang_stats.h" #include "line.h" +#include "map_scale_constants.h" #include "mapsharing.h" #include "output.h" #include "path_info.h" #include "point.h" #include "popup.h" -#include "sdltiles.h" // IWYU pragma: keep +#include "ret_val.h" +#include "rng.h" #include "sdlsound.h" +#include "sdltiles.h" // IWYU pragma: keep #include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" @@ -41,6 +54,7 @@ #if defined(TILES) #include "cata_tiles.h" +#include "sdl_wrappers.h" #endif // TILES #if defined(__ANDROID__) diff --git a/src/options.h b/src/options.h index 8c434908694d9..8e620f98f2693 100644 --- a/src/options.h +++ b/src/options.h @@ -4,22 +4,22 @@ #include #include -#include #include #include #include +#include #include #include #include #include -#include "translations.h" +#include "translation.h" #include "type_id.h" -class cata_path; class JsonArray; -class JsonOut; class JsonObject; +class JsonOut; +class cata_path; class options_manager { diff --git a/src/output.cpp b/src/output.cpp index e5a01a852fff3..57332c3a694f7 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -1,20 +1,21 @@ #include "output.h" -#include // IWYU pragma: no_include #include #include +#include #include #include #include #include -#include #include #include +#include #include #include #include #include +#include #include #include "cached_options.h" // IWYU pragma: keep @@ -22,15 +23,14 @@ #include "cata_utility.h" #include "catacharset.h" #include "color.h" -#include "cursesport.h" // IWYU pragma: keep #include "cursesdef.h" -#include "game_constants.h" -#include "imgui/imgui.h" +#include "cursesport.h" // IWYU pragma: keep +#include "game.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "item.h" #include "line.h" -#include "game.h" #include "options.h" #include "point.h" #include "popup.h" @@ -38,14 +38,18 @@ #include "sdltiles.h" // IWYU pragma: keep #include "string_formatter.h" #include "string_input_popup.h" +#include "text.h" +#include "translation.h" +#include "ui.h" #include "ui_manager.h" #include "unicode.h" +#include "units.h" #include "units_utility.h" #include "wcwidth.h" #if defined(__ANDROID__) -#include #include +#include #endif // Display data diff --git a/src/output.h b/src/output.h index c2226daca7e4b..1acc8735530fc 100644 --- a/src/output.h +++ b/src/output.h @@ -3,23 +3,24 @@ #define CATA_SRC_OUTPUT_H #include -#include +#include #include #include #include #include -#include #include +#include #include +#include #include #include #include +#include #include #include #include #include "cata_assert.h" -#include "catacharset.h" #include "color.h" #include "cuboid_rectangle.h" #include "debug.h" @@ -32,7 +33,6 @@ #include "units_fwd.h" class input_context; - struct input_event; namespace catacurses diff --git a/src/overlay_ordering.cpp b/src/overlay_ordering.cpp index ae9c544919fce..683f968b59d83 100644 --- a/src/overlay_ordering.cpp +++ b/src/overlay_ordering.cpp @@ -4,7 +4,8 @@ #include #include -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" std::map base_mutation_overlay_ordering; std::map tileset_mutation_overlay_ordering; diff --git a/src/overmap.cpp b/src/overmap.cpp index 373435fc8f25e..ae455bcdf0261 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -15,11 +16,12 @@ #include #include "all_enum_values.h" +#include "assign.h" #include "auto_note.h" #include "avatar.h" -#include "assign.h" #include "cached_options.h" #include "cata_assert.h" +#include "cata_path.h" #include "cata_utility.h" #include "cata_views.h" #include "catacharset.h" @@ -27,18 +29,25 @@ #include "coordinates.h" #include "cuboid_rectangle.h" #include "debug.h" +#include "dialogue.h" #include "distribution.h" #include "effect_on_condition.h" +#include "enum_conversions.h" #include "flood_fill.h" #include "game.h" #include "generic_factory.h" #include "json.h" #include "line.h" +#include "map.h" +#include "map_extras.h" #include "map_iterator.h" #include "mapbuffer.h" #include "mapgen.h" #include "mapgen_functions.h" +#include "mapgendata.h" +#include "math_defines.h" #include "messages.h" +#include "mod_tracker.h" #include "mongroup.h" #include "monster.h" #include "mtype.h" @@ -57,8 +66,10 @@ #include "sets_intersect.h" #include "simple_pathfinding.h" #include "string_formatter.h" +#include "talker.h" #include "text_snippets.h" #include "translations.h" +#include "weighted_list.h" static const mongroup_id GROUP_NEMESIS( "GROUP_NEMESIS" ); static const mongroup_id GROUP_OCEAN_DEEP( "GROUP_OCEAN_DEEP" ); @@ -129,8 +140,6 @@ static const overmap_location_id overmap_location_swamp( "swamp" ); static const species_id species_ZOMBIE( "ZOMBIE" ); -class map_extra; - #define dbg(x) DebugLog((x),D_MAP_GEN) << __FILE__ << ":" << __LINE__ << ": " static constexpr int BUILDINGCHANCE = 4; diff --git a/src/overmap.h b/src/overmap.h index 8470f65d7889d..93fc02faac2a1 100644 --- a/src/overmap.h +++ b/src/overmap.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -13,20 +14,28 @@ #include #include #include +#include +#include #include +#include #include #include #include "basecamp.h" #include "city.h" -#include "coords_fwd.h" +#include "colony.h" +#include "color.h" +#include "coordinates.h" #include "cube_direction.h" #include "enums.h" -#include "game_constants.h" -#include "mapgendata.h" +#include "flexbuffer_json-inl.h" +#include "hash_utils.h" +#include "map_scale_constants.h" #include "mdarray.h" #include "memory_fast.h" #include "mongroup.h" +#include "monster.h" +#include "omdata.h" #include "overmap_types.h" // IWYU pragma: keep #include "point.h" #include "rng.h" @@ -35,11 +44,14 @@ class JsonArray; class JsonObject; class JsonOut; +class JsonValue; class cata_path; class character_id; class npc; class overmap_connection; +struct mapgen_arguments; struct regional_settings; +template struct enum_traits; namespace pf { diff --git a/src/overmap_connection.cpp b/src/overmap_connection.cpp index 1704a8d0496c1..42dee404a0c0e 100644 --- a/src/overmap_connection.cpp +++ b/src/overmap_connection.cpp @@ -4,11 +4,12 @@ #include #include #include +#include #include "cata_assert.h" #include "debug.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "overmap_location.h" namespace diff --git a/src/overmap_connection.h b/src/overmap_connection.h index 3d6fde7fc0959..079d4a923d1a2 100644 --- a/src/overmap_connection.h +++ b/src/overmap_connection.h @@ -2,14 +2,15 @@ #ifndef CATA_SRC_OVERMAP_CONNECTION_H #define CATA_SRC_OVERMAP_CONNECTION_H -#include #include #include +#include +#include +#include #include -#include "int_id.h" #include "omdata.h" -#include "string_id.h" +#include "type_id.h" class JsonObject; struct overmap_location; diff --git a/src/overmap_location.cpp b/src/overmap_location.cpp index 4eba55814d235..c1b4a4509d98d 100644 --- a/src/overmap_location.cpp +++ b/src/overmap_location.cpp @@ -1,13 +1,15 @@ #include "overmap_location.h" -#include -#include +#include #include +#include #include #include "debug.h" +#include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "omdata.h" #include "rng.h" diff --git a/src/overmap_location.h b/src/overmap_location.h index d7e6885dd3a9a..4dca09fab3f89 100644 --- a/src/overmap_location.h +++ b/src/overmap_location.h @@ -2,7 +2,9 @@ #ifndef CATA_SRC_OVERMAP_LOCATION_H #define CATA_SRC_OVERMAP_LOCATION_H -#include +#include +#include +#include #include #include "flat_set.h" diff --git a/src/overmap_noise.h b/src/overmap_noise.h index 4c76b1554f9bd..065c8353c86e2 100644 --- a/src/overmap_noise.h +++ b/src/overmap_noise.h @@ -4,6 +4,7 @@ #include "coordinates.h" #include "game_constants.h" +#include "point.h" namespace om_noise { diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index f362e435fb86a..a8d8478d01044 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -3,14 +3,16 @@ #include #include #include -#include #include +#include #include #include #include +#include #include #include #include +#include #include #include #include @@ -18,35 +20,45 @@ #include "activity_actor_definitions.h" #include "all_enum_values.h" +#include "avatar.h" #include "basecamp.h" +#include "cached_options.h" #include "calendar.h" -#include "enum_conversions.h" -#ifdef TILES -#include "cata_tiles.h" -#endif // TILES +#include "cata_assert.h" #include "cata_scope_helpers.h" #include "cata_utility.h" +#include "cata_variant.h" #include "catacharset.h" #include "character.h" +#include "character_id.h" #include "city.h" #include "clzones.h" #include "color.h" #include "coordinates.h" #include "cuboid_rectangle.h" #include "cursesdef.h" -#include "display.h" +#include "debug.h" #include "debug_menu.h" +#include "display.h" +#include "enum_conversions.h" #include "game.h" #include "game_constants.h" #include "game_ui.h" #include "input_context.h" +#include "input_enums.h" #include "line.h" #include "localized_comparator.h" #include "map.h" #include "map_iterator.h" #include "mapbuffer.h" +#include "mapdata.h" +#include "mapgen_parameter.h" +#include "mapgendata.h" +#include "memory_fast.h" +#include "messages.h" #include "mission.h" #include "mongroup.h" +#include "monster.h" #include "npc.h" #include "omdata.h" #include "options.h" @@ -57,9 +69,11 @@ #include "point.h" #include "regional_settings.h" #include "rng.h" +#include "simple_pathfinding.h" #include "sounds.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui.h" @@ -72,7 +86,7 @@ #include "weather_gen.h" #include "weather_type.h" -class character_id; +enum class cube_direction : int; static const activity_id ACT_TRAVELLING( "ACT_TRAVELLING" ); diff --git a/src/overmap_ui.h b/src/overmap_ui.h index 2f7bc6d4f9d33..77aa2295274f6 100644 --- a/src/overmap_ui.h +++ b/src/overmap_ui.h @@ -2,26 +2,30 @@ #ifndef CATA_SRC_OVERMAP_UI_H #define CATA_SRC_OVERMAP_UI_H -#include "avatar.h" -#include "coords_fwd.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include "city.h" +#include "color.h" +#include "coordinates.h" #include "input_context.h" -#include "regional_settings.h" +#include "map_scale_constants.h" +#include "point.h" #include "string_id.h" -#include "ui_manager.h" +#include "weather_type.h" + +class ui_adaptor; constexpr int RANDOM_CITY_ENTRY = INT_MIN; class uilist; -namespace catacurses -{ -class window; -} // namespace catacurses - -class input_context; -class nc_color; - -struct weather_type; using weather_type_id = string_id; namespace ui diff --git a/src/overmapbuffer.cpp b/src/overmapbuffer.cpp index 7de5541b7937f..a5f7a46b1b4cb 100644 --- a/src/overmapbuffer.cpp +++ b/src/overmapbuffer.cpp @@ -1,8 +1,10 @@ #include "overmapbuffer.h" #include -#include +#include +#include #include +#include #include #include #include @@ -17,13 +19,11 @@ #include "character_id.h" #include "city.h" #include "color.h" -#include "common_types.h" #include "coordinates.h" #include "cuboid_rectangle.h" #include "debug.h" #include "filesystem.h" #include "game.h" -#include "game_constants.h" #include "line.h" #include "map.h" #include "memory_fast.h" @@ -31,6 +31,7 @@ #include "mongroup.h" #include "monster.h" #include "npc.h" +#include "omdata.h" #include "overmap.h" #include "overmap_connection.h" #include "overmap_types.h" @@ -42,8 +43,6 @@ #include "translations.h" #include "vehicle.h" -class map_extra; - static const oter_type_str_id oter_type_bridgehead_ground( "bridgehead_ground" ); static const oter_type_str_id oter_type_bridgehead_ramp( "bridgehead_ramp" ); diff --git a/src/overmapbuffer.h b/src/overmapbuffer.h index 7823b8ec5133d..48860dffacec4 100644 --- a/src/overmapbuffer.h +++ b/src/overmapbuffer.h @@ -4,39 +4,46 @@ #include #include -#include +#include #include -#include #include #include +#include +#include #include #include #include #include +#include "cata_path.h" #include "coordinates.h" #include "enums.h" -#include "json.h" +#include "map_scale_constants.h" #include "memory_fast.h" -#include "omdata.h" +#include "overmap.h" #include "overmap_types.h" +#include "point.h" #include "simple_pathfinding.h" #include "type_id.h" +class JsonObject; +class JsonOut; +class JsonValue; class basecamp; class character_id; -enum class cube_direction : int; -enum class om_vision_level : int8_t; -class map_extra; class monster; class npc; -class overmap; -class overmap_special_batch; +class overmap_special; class vehicle; +enum class cube_direction : int; +enum class oter_travel_cost_type : int; + +namespace om_direction +{ +enum class type : int; +} // namespace om_direction struct mapgen_arguments; struct mongroup; -struct om_vehicle; -struct radio_tower; struct regional_settings; struct overmap_path_params { diff --git a/src/panels.cpp b/src/panels.cpp index 068f6b4cada8a..2637404d92ed8 100644 --- a/src/panels.cpp +++ b/src/panels.cpp @@ -3,24 +3,27 @@ #include #include #include -#include #include +#include #include +#include +#include #include #include "avatar.h" #include "cached_options.h" -#include "cata_imgui.h" #include "cata_utility.h" #include "catacharset.h" #include "color.h" +#include "coordinates.h" #include "cursesdef.h" -#include "display.h" #include "debug.h" +#include "display.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" #include "game_constants.h" #include "game_ui.h" -#include "imgui/imgui.h" #include "input_context.h" #include "json.h" #include "map.h" @@ -33,7 +36,9 @@ #include "path_info.h" #include "point.h" #include "string_formatter.h" +#include "translations.h" #include "type_id.h" +#include "ui.h" #include "ui_manager.h" #include "widget.h" diff --git a/src/panels.h b/src/panels.h index 3dd2015132b0f..4447b10b13689 100644 --- a/src/panels.h +++ b/src/panels.h @@ -3,25 +3,19 @@ #define CATA_SRC_PANELS_H #include -#include #include #include #include -#include "bodypart.h" -#include "color.h" #include "coords_fwd.h" -#include "translations.h" -#include "widget.h" +#include "translation.h" +#include "type_id.h" class JsonArray; class JsonOut; class avatar; -class Character; -class Creature; -class mood_face; +class widget; struct point; -enum class cardinal_direction; enum face_type : int { face_human = 0, diff --git a/src/past_achievements_info.cpp b/src/past_achievements_info.cpp index 0105616613899..8ef0125044a72 100644 --- a/src/past_achievements_info.cpp +++ b/src/past_achievements_info.cpp @@ -1,10 +1,17 @@ +#include #include +#include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "json_error.h" +#include "json_loader.h" #include "past_achievements_info.h" #include "past_games_info.h" -#include "achievement.h" -#include "json.h" -#include "json_loader.h" +#include "path_info.h" +#include "string_formatter.h" + +class cata_path; void past_achievements_info::clear() { diff --git a/src/past_achievements_info.h b/src/past_achievements_info.h index 4e4c27f3d6ee5..bda5287ebc7c8 100644 --- a/src/past_achievements_info.h +++ b/src/past_achievements_info.h @@ -3,8 +3,10 @@ #define CATA_SRC_PAST_ACHIEVEMENTS_INFO_H #include +#include +#include -#include "achievement.h" +#include "type_id.h" class past_achievements_info { diff --git a/src/past_games_info.cpp b/src/past_games_info.cpp index a4e928e401a28..30a6a72331b93 100644 --- a/src/past_games_info.cpp +++ b/src/past_games_info.cpp @@ -1,19 +1,25 @@ #include "past_games_info.h" #include +#include +#include #include #include #include -#include -#include #include +#include #include "achievement.h" +#include "cata_path.h" #include "cata_utility.h" #include "debug.h" #include "event.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "hash_utils.h" #include "input.h" +#include "json_error.h" #include "json_loader.h" #include "memorial_logger.h" #include "output.h" diff --git a/src/past_games_info.h b/src/past_games_info.h index 7ee075757ffb2..3a712d3a78165 100644 --- a/src/past_games_info.h +++ b/src/past_games_info.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_PAST_GAMES_INFO_H #define CATA_SRC_PAST_GAMES_INFO_H -#include #include +#include #include #include diff --git a/src/path_info.cpp b/src/path_info.cpp index c3fb4e62ec30d..129ce8d698922 100644 --- a/src/path_info.cpp +++ b/src/path_info.cpp @@ -1,6 +1,8 @@ #include "path_info.h" #include +#include +#include #include #include "debug.h" @@ -10,10 +12,7 @@ #include "options.h" #include "rng.h" #include "system_locale.h" - -#if defined(_WIN32) -#include -#endif +#include "translations.h" /** * Return a locale specific path, or if there is no path for the current diff --git a/src/pathfinding.cpp b/src/pathfinding.cpp index d9db720469098..5b52db5dc08a5 100644 --- a/src/pathfinding.cpp +++ b/src/pathfinding.cpp @@ -2,12 +2,13 @@ #include #include +#include +#include #include -#include +#include #include #include #include -#include #include #include @@ -15,18 +16,20 @@ #include "coordinates.h" #include "debug.h" #include "game.h" -#include "gates.h" #include "line.h" #include "map.h" +#include "map_scale_constants.h" #include "mapdata.h" +#include "maptile_fwd.h" #include "point.h" #include "submap.h" #include "trap.h" -#include "type_id.h" #include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" +class field; + // Turns two indexed to a 2D array into an index to equivalent 1D array static constexpr int flat_index( const point_bub_ms &p ) { diff --git a/src/pathfinding.h b/src/pathfinding.h index 7b83e3c49e6e1..15a2d9f164b2a 100644 --- a/src/pathfinding.h +++ b/src/pathfinding.h @@ -2,12 +2,13 @@ #ifndef CATA_SRC_PATHFINDING_H #define CATA_SRC_PATHFINDING_H +#include #include +#include -#include "coords_fwd.h" -#include "game_constants.h" +#include "coordinates.h" +#include "creature.h" #include "mdarray.h" -#include "character.h" // An attribute of a particular map square that is of interest in pathfinding. // Has a maximum of 32 members. For more, the datatype underlying PathfindingFlags diff --git a/src/pickup.cpp b/src/pickup.cpp index ae7783d023953..ef56b5be85d62 100644 --- a/src/pickup.cpp +++ b/src/pickup.cpp @@ -1,6 +1,9 @@ #include "pickup.h" #include +#include +#include +#include #include #include #include @@ -11,15 +14,21 @@ #include "activity_actor_definitions.h" #include "auto_pickup.h" #include "character.h" -#include "colony.h" +#include "contents_change_handler.h" #include "debug.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" +#include "game_constants.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "item.h" +#include "item_contents.h" #include "item_location.h" #include "item_stack.h" +#include "json.h" #include "line.h" #include "map.h" #include "mapdata.h" @@ -34,7 +43,6 @@ #include "type_id.h" #include "ui.h" #include "units.h" -#include "units_utility.h" using ItemCount = std::pair; using PickupMap = std::map; diff --git a/src/pickup.h b/src/pickup.h index d3a59ea978653..00d76fe332afe 100644 --- a/src/pickup.h +++ b/src/pickup.h @@ -4,13 +4,15 @@ #include -#include "coords_fwd.h" +#include "coordinates.h" #include "cuboid_rectangle.h" #include "item_location.h" #include "point.h" #include "units.h" class Character; +class JsonObject; +class JsonOut; class item; namespace Pickup diff --git a/src/pinyin.cpp b/src/pinyin.cpp index c2a78ec2f11ab..15f4267570feb 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -1,12 +1,15 @@ #include "pinyin.h" -#include "third-party/pinyin/pinyin_data.hpp" #include +#include #include #include #include +#include #include +#include "third-party/pinyin/pinyin_data.hpp" + namespace pinyin { bool pinyin_match( const std::u32string_view str, const std::u32string_view qry ) diff --git a/src/pinyin.h b/src/pinyin.h index e7e3d5c8e887f..2d4fa749f9c2b 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_PINYIN_H #define CATA_SRC_PINYIN_H -#include +#include namespace pinyin { diff --git a/src/pixel_minimap.cpp b/src/pixel_minimap.cpp index 87bcfb3b5b803..8b0c2ba4e6df5 100644 --- a/src/pixel_minimap.cpp +++ b/src/pixel_minimap.cpp @@ -8,34 +8,37 @@ #include #include #include -#include #include #include +#include #include #include #include "cached_options.h" #include "cata_assert.h" -#include "cata_utility.h" #include "cata_tiles.h" +#include "cata_utility.h" #include "character.h" -#include "color.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" -#include "game_constants.h" -#include "int_id.h" +#include "level_cache.h" #include "lightmap.h" #include "map.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "math_defines.h" +#include "mdarray.h" #include "monster.h" #include "pixel_minimap_projectors.h" #include "sdl_utils.h" +#include "type_id.h" #include "vehicle.h" +#include "viewer.h" #include "vpart_position.h" class game; + // NOLINTNEXTLINE(cata-static-declarations) extern std::unique_ptr g; diff --git a/src/pixel_minimap.h b/src/pixel_minimap.h index 9e38b4a66d9ca..36c7e0fad1166 100644 --- a/src/pixel_minimap.h +++ b/src/pixel_minimap.h @@ -7,8 +7,8 @@ #include "coordinates.h" #include "point.h" -#include "sdl_wrappers.h" #include "sdl_geometry.h" +#include "sdl_wrappers.h" class pixel_minimap_projector; @@ -87,6 +87,7 @@ class pixel_minimap //the minimap texture pool which is used to reduce new texture allocation spam class shared_texture_pool; + std::unique_ptr tex_pool; std::map cache; diff --git a/src/player_activity.cpp b/src/player_activity.cpp index 4db2c76bdaa04..cf33690596181 100644 --- a/src/player_activity.cpp +++ b/src/player_activity.cpp @@ -2,32 +2,41 @@ #include #include -#include +#include #include "activity_actor_definitions.h" #include "activity_handlers.h" #include "activity_type.h" #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "character.h" #include "construction.h" +#include "creature.h" +#include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" -#include "field.h" +#include "event.h" #include "event_bus.h" +#include "field.h" #include "game.h" #include "item.h" #include "itype.h" +#include "magic.h" #include "map.h" #include "rng.h" #include "skill.h" #include "sounds.h" #include "stomach.h" #include "string_formatter.h" +#include "talker.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "uistate.h" #include "units.h" #include "value_ptr.h" +#include "weather.h" static const activity_id ACT_AIM( "ACT_AIM" ); static const activity_id ACT_ARMOR_LAYERS( "ACT_ARMOR_LAYERS" ); diff --git a/src/player_activity.h b/src/player_activity.h index f1c547bc20dfc..7f9b9534f7394 100644 --- a/src/player_activity.h +++ b/src/player_activity.h @@ -4,10 +4,11 @@ #include #include -#include +#include #include #include #include +#include #include #include @@ -15,7 +16,7 @@ #include "calendar.h" #include "clone_ptr.h" #include "compatibility.h" -#include "coords_fwd.h" +#include "coordinates.h" #include "enums.h" #include "item_location.h" #include "memory_fast.h" diff --git a/src/player_difficulty.cpp b/src/player_difficulty.cpp index 6b307495017eb..1f2691d6461ce 100644 --- a/src/player_difficulty.cpp +++ b/src/player_difficulty.cpp @@ -1,12 +1,31 @@ +#include +#include +#include +#include +#include +#include +#include + #include "avatar.h" +#include "bodypart.h" +#include "character.h" #include "character_martial_arts.h" -#include "make_static.h" -#include "martialarts.h" +#include "inventory.h" +#include "item.h" #include "mutation.h" +#include "npc.h" +#include "npc_opinion.h" #include "options.h" +#include "pimpl.h" +#include "player_activity.h" #include "player_difficulty.h" #include "profession.h" +#include "proficiency.h" #include "skill.h" +#include "stomach.h" +#include "string_formatter.h" +#include "translations.h" +#include "type_id.h" static const damage_type_id damage_bash( "bash" ); diff --git a/src/player_difficulty.h b/src/player_difficulty.h index 0d927a1be72c0..59104ffdaa279 100644 --- a/src/player_difficulty.h +++ b/src/player_difficulty.h @@ -3,6 +3,10 @@ #define CATA_SRC_PLAYER_DIFFICULTY_H #include +#include + +class Character; +class avatar; // The point after which stats cost double constexpr int HIGH_STAT = 12; diff --git a/src/player_display.cpp b/src/player_display.cpp index 9e6dfd6e9b0c9..b71f4a22abab3 100644 --- a/src/player_display.cpp +++ b/src/player_display.cpp @@ -1,10 +1,17 @@ #include #include #include -#include #include +#include +#include +#include #include +#include #include +#include +#include +#include +#include #include "addiction.h" #include "avatar.h" @@ -17,28 +24,36 @@ #include "character.h" #include "character_modifier.h" #include "color.h" +#include "coordinates.h" +#include "creature.h" #include "cursesdef.h" #include "debug.h" #include "display.h" #include "effect.h" -#include "flag.h" #include "enum_conversions.h" +#include "flag.h" #include "game.h" +#include "game_constants.h" #include "game_inventory.h" #include "input_context.h" +#include "item.h" +#include "item_location.h" #include "itype.h" +#include "magic_enchantment.h" #include "mutation.h" #include "options.h" #include "output.h" #include "pimpl.h" -#include "profession.h" +#include "point.h" #include "proficiency.h" #include "sdltiles.h" #include "skill.h" #include "skill_ui.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" #include "ui.h" #include "ui_manager.h" #include "units.h" diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index f75d50d473771..e2572c32754c9 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -1,16 +1,21 @@ #include #include +#include #include #include +#include #include #include +#include +#include #include "activity_handlers.h" -#include "activity_type.h" #include "avatar.h" #include "bodypart.h" #include "calendar.h" #include "character.h" +#include "coordinates.h" +#include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "effect.h" @@ -20,7 +25,10 @@ #include "field_type.h" #include "fungal_effects.h" #include "game.h" +#include "game_constants.h" #include "input.h" +#include "item.h" +#include "item_location.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" @@ -28,18 +36,22 @@ #include "martialarts.h" #include "messages.h" #include "mongroup.h" -#include "monster.h" #include "player_activity.h" +#include "point.h" +#include "ret_val.h" #include "rng.h" #include "sounds.h" #include "stomach.h" #include "string_formatter.h" #include "teleport.h" +#include "translation.h" #include "translations.h" +#include "type_id.h" #include "uistate.h" #include "units.h" #include "vitamin.h" #include "weather.h" +#include "weighted_list.h" static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); diff --git a/src/point.cpp b/src/point.cpp index caed7bcee8f6e..b54d5aa69aec7 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -1,11 +1,13 @@ #include "point.h" -#include #include +#include +#include #include #include -#include +#include +#include "cata_assert.h" #include "debug.h" point point::from_string( const std::string &s ) diff --git a/src/point.h b/src/point.h index c1c2b45695a21..2f01ca99bbadd 100644 --- a/src/point.h +++ b/src/point.h @@ -4,15 +4,15 @@ #include #include -#include +#include #include #include #include #include +#include +#include #include -#include "cata_assert.h" - class JsonArray; class JsonOut; diff --git a/src/popup.cpp b/src/popup.cpp index 0e65dd1c2f20b..35d110c4ebe7e 100644 --- a/src/popup.cpp +++ b/src/popup.cpp @@ -4,16 +4,14 @@ #include #include -#include "options.h" #include "cached_options.h" +#include "cata_imgui.h" #include "catacharset.h" +#include "color.h" +#include "imgui/imgui.h" #include "input_context.h" #include "output.h" #include "ui_manager.h" -#include "ui.h" -#include "cata_imgui.h" -#include "imgui/imgui.h" -#include "color.h" class query_popup_impl : public cataimgui::window { diff --git a/src/popup.h b/src/popup.h index 090a5f30892d7..d56da75d18ef1 100644 --- a/src/popup.h +++ b/src/popup.h @@ -6,12 +6,15 @@ #include #include #include +#include +#include #include #include "color.h" #include "input_enums.h" +#include "point.h" +#include "string_formatter.h" -class ui_adaptor; class query_popup_impl; /** diff --git a/src/profession.cpp b/src/profession.cpp index 21adb99253f3c..7331e104694d3 100644 --- a/src/profession.cpp +++ b/src/profession.cpp @@ -1,37 +1,40 @@ #include "profession.h" +#include #include #include #include -#include #include #include +#include -#include "game.h" #include "achievement.h" #include "addiction.h" #include "avatar.h" #include "calendar.h" +#include "character.h" #include "debug.h" #include "effect_on_condition.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "game.h" #include "generic_factory.h" #include "item.h" #include "item_group.h" #include "itype.h" -#include "json.h" #include "magic.h" #include "mission.h" #include "mutation.h" #include "options.h" -#include "past_games_info.h" #include "past_achievements_info.h" #include "pimpl.h" #include "translations.h" #include "type_id.h" +#include "value_ptr.h" #include "visitable.h" -#include -#include + +struct bionic_data; static const achievement_id achievement_achievement_arcade_mode( "achievement_arcade_mode" ); static const trait_group::Trait_group_tag diff --git a/src/profession.h b/src/profession.h index fbc06d724e81c..3073e9c704ca8 100644 --- a/src/profession.h +++ b/src/profession.h @@ -2,28 +2,28 @@ #ifndef CATA_SRC_PROFESSION_H #define CATA_SRC_PROFESSION_H -#include #include #include +#include #include #include +#include #include #include +#include "addiction.h" +#include "mutation.h" #include "ret_val.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" +class Character; class JsonObject; -class addiction; class avatar; class item; -class Character; template class generic_factory; -struct trait_and_var; - class profession { public: diff --git a/src/profession_group.cpp b/src/profession_group.cpp index 17d3163a09001..35e4dfd45d035 100644 --- a/src/profession_group.cpp +++ b/src/profession_group.cpp @@ -1,8 +1,12 @@ #include "profession_group.h" #include "assign.h" +#include "debug.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" +class JsonObject; + namespace { generic_factory profession_group_factory( "profession_group" ); diff --git a/src/profession_group.h b/src/profession_group.h index 54b3d06c9b854..c930be253effa 100644 --- a/src/profession_group.h +++ b/src/profession_group.h @@ -2,8 +2,13 @@ #ifndef CATA_SRC_PROFESSION_GROUP_H #define CATA_SRC_PROFESSION_GROUP_H +#include +#include +#include + #include "type_id.h" -#include "json.h" + +class JsonObject; struct profession_group { diff --git a/src/proficiency.cpp b/src/proficiency.cpp index 0d2968a646da8..b41f4f273ad9a 100644 --- a/src/proficiency.cpp +++ b/src/proficiency.cpp @@ -7,10 +7,11 @@ #include #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "json.h" #include "localized_comparator.h" -#include "enums.h" #include "options.h" const float book_proficiency_bonus::default_time_factor = 0.5f; diff --git a/src/proficiency.h b/src/proficiency.h index 2e44afdb3449d..47d089b3b1cce 100644 --- a/src/proficiency.h +++ b/src/proficiency.h @@ -2,22 +2,21 @@ #ifndef CATA_SRC_PROFICIENCY_H #define CATA_SRC_PROFICIENCY_H -#include #include #include #include -#include #include +#include +#include +#include #include "calendar.h" #include "color.h" #include "flat_set.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -#include "mod_tracker.h" - -class JsonArray; +class Character; class JsonObject; class JsonOut; struct display_proficiency; @@ -25,7 +24,6 @@ struct learning_proficiency; template struct enum_traits; template class generic_factory; -class Character; enum class proficiency_bonus_type : int { strength, diff --git a/src/proficiency_ui.cpp b/src/proficiency_ui.cpp index 99db31765dd83..0cdf08c322a7c 100644 --- a/src/proficiency_ui.cpp +++ b/src/proficiency_ui.cpp @@ -1,8 +1,31 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "calendar.h" +#include "cata_utility.h" #include "character.h" +#include "color.h" +#include "cursesdef.h" +#include "debug.h" #include "input_context.h" +#include "memory_fast.h" #include "output.h" +#include "point.h" #include "proficiency.h" +#include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" +#include "translations.h" +#include "type_id.h" +#include "ui.h" #include "ui_manager.h" // Basic layout: diff --git a/src/projectile.cpp b/src/projectile.cpp index ced449f811c8a..2062481bd991f 100644 --- a/src/projectile.cpp +++ b/src/projectile.cpp @@ -1,26 +1,34 @@ #include "projectile.h" #include +#include #include #include -#include #include #include "ammo_effect.h" +#include "calendar.h" #include "character.h" #include "condition.h" +#include "creature.h" #include "creature_tracker.h" #include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" #include "enums.h" #include "explosion.h" #include "field.h" +#include "field_type.h" +#include "global_vars.h" #include "item.h" +#include "magic.h" #include "map.h" #include "map_iterator.h" #include "mapdata.h" #include "messages.h" #include "rng.h" +#include "string_formatter.h" +#include "talker.h" #include "translations.h" #include "type_id.h" diff --git a/src/projectile.h b/src/projectile.h index 63d1179a1b5d1..54253f9394812 100644 --- a/src/projectile.h +++ b/src/projectile.h @@ -2,13 +2,17 @@ #ifndef CATA_SRC_PROJECTILE_H #define CATA_SRC_PROJECTILE_H -#include +#include #include #include +#include +#include #include "compatibility.h" #include "coordinates.h" #include "damage.h" +#include "point.h" +#include "type_id.h" class Creature; class item; diff --git a/src/ranged.cpp b/src/ranged.cpp index faaa4af2a23a7..d40d31d720747 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -11,41 +11,53 @@ #include #include #include +#include #include #include #include "activity_actor_definitions.h" #include "avatar.h" -#include "bionics.h" #include "ballistics.h" +#include "bionics.h" +#include "bodypart.h" #include "cached_options.h" #include "calendar.h" #include "cata_scope_helpers.h" #include "cata_utility.h" #include "catacharset.h" #include "character.h" +#include "character_id.h" #include "color.h" +#include "creature.h" #include "creature_tracker.h" #include "cursesdef.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "dispersion.h" #include "enums.h" #include "event.h" #include "event_bus.h" -#include "fault.h" +#include "explosion.h" #include "flag.h" #include "game.h" #include "game_constants.h" #include "gun_mode.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "item.h" +#include "item_contents.h" #include "item_location.h" +#include "item_tname.h" #include "itype.h" #include "line.h" #include "magic.h" +#include "magic_enchantment.h" +#include "magic_type.h" #include "map.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "math_defines.h" #include "memory_fast.h" #include "messages.h" @@ -55,6 +67,7 @@ #include "options.h" #include "output.h" #include "panels.h" +#include "pimpl.h" #include "pocket_type.h" #include "point.h" #include "projectile.h" @@ -63,9 +76,9 @@ #include "skill.h" #include "sounds.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "trap.h" -#include "try_parse_integer.h" #include "type_id.h" #include "ui.h" #include "ui_manager.h" diff --git a/src/ranged.h b/src/ranged.h index 3a44503f2883c..d389440fc8db8 100644 --- a/src/ranged.h +++ b/src/ranged.h @@ -2,15 +2,14 @@ #ifndef CATA_SRC_RANGED_H #define CATA_SRC_RANGED_H -#include +#include #include -#include "creature.h" -#include "point.h" +#include "coordinates.h" +class Character; class aim_activity_actor; class avatar; -class Character; class gun_mode; class item; class item_location; @@ -18,6 +17,7 @@ class map; class spell; class turret_data; class vehicle; +enum class creature_size : int; struct vehicle_part; // Recoil change less or equal to this value (in MoA) stops further aiming diff --git a/src/recipe.cpp b/src/recipe.cpp index 0a8a9b2074a05..8976e4a6ba689 100644 --- a/src/recipe.cpp +++ b/src/recipe.cpp @@ -2,33 +2,44 @@ #include #include -#include +#include #include #include #include #include +#include #include "assign.h" #include "cached_options.h" #include "calendar.h" #include "cartesian_product.h" +#include "cata_assert.h" #include "cata_utility.h" +#include "cata_variant.h" #include "character.h" #include "color.h" #include "crafting_gui.h" #include "debug.h" -#include "enum_traits.h" #include "effect_on_condition.h" +#include "enum_traits.h" +#include "enums.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" #include "inventory.h" #include "item.h" +#include "item_components.h" #include "item_group.h" +#include "item_tname.h" #include "itype.h" #include "json.h" +#include "mapgen.h" #include "mapgen_functions.h" -#include "npc.h" +#include "mapgen_parameter.h" +#include "mapgendata.h" +#include "math_defines.h" #include "output.h" #include "proficiency.h" #include "recipe_dictionary.h" diff --git a/src/recipe.h b/src/recipe.h index 9e9532bf75787..53e053a592fc1 100644 --- a/src/recipe.h +++ b/src/recipe.h @@ -5,9 +5,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -17,13 +15,15 @@ #include "build_reqs.h" #include "calendar.h" #include "requirements.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "value_ptr.h" class Character; class JsonObject; +class cata_variant; class item; +class item_components; template struct enum_traits; enum class recipe_filter_flags : int { diff --git a/src/recipe_dictionary.cpp b/src/recipe_dictionary.cpp index 247ff2200e296..f6aa3dd0f3c47 100644 --- a/src/recipe_dictionary.cpp +++ b/src/recipe_dictionary.cpp @@ -22,6 +22,7 @@ #include "mapgen.h" #include "math_parser.h" #include "mod_manager.h" +#include "mod_tracker.h" #include "output.h" #include "requirements.h" #include "skill.h" diff --git a/src/recipe_groups.cpp b/src/recipe_groups.cpp index 6a6bff2d2a6f4..14dc0b025fe52 100644 --- a/src/recipe_groups.cpp +++ b/src/recipe_groups.cpp @@ -1,15 +1,22 @@ #include "recipe_groups.h" -#include +#include #include +#include +#include +#include #include #include +#include "cata_variant.h" #include "debug.h" +#include "enum_conversions.h" +#include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" +#include "mapgendata.h" #include "overmap.h" -#include "translations.h" #include "type_id.h" // recipe_groups namespace diff --git a/src/recipe_groups.h b/src/recipe_groups.h index acfdf89d44ce8..995536f15350b 100644 --- a/src/recipe_groups.h +++ b/src/recipe_groups.h @@ -2,14 +2,16 @@ #ifndef CATA_SRC_RECIPE_GROUPS_H #define CATA_SRC_RECIPE_GROUPS_H -#include +#include #include +#include +#include +#include "translation.h" #include "type_id.h" -#include "mapgendata.h" class JsonObject; -class translation; +struct mapgen_arguments; namespace recipe_group { diff --git a/src/regional_settings.cpp b/src/regional_settings.cpp index 2198ef7a8e5b2..79fdee23ac16f 100644 --- a/src/regional_settings.cpp +++ b/src/regional_settings.cpp @@ -1,22 +1,28 @@ #include "regional_settings.h" #include +#include +#include #include #include #include #include +#include #include #include "debug.h" #include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "map_extras.h" #include "options.h" #include "output.h" #include "rng.h" #include "string_formatter.h" -#include "translations.h" +#include "translation.h" + +class mapgendata; ter_furn_id::ter_furn_id() : ter( ter_str_id::NULL_ID().id() ), furn( furn_str_id::NULL_ID().id() ) { } diff --git a/src/regional_settings.h b/src/regional_settings.h index 558bad5c2bf7e..bdacf457f0909 100644 --- a/src/regional_settings.h +++ b/src/regional_settings.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_REGIONAL_SETTINGS_H #define CATA_SRC_REGIONAL_SETTINGS_H -#include +#include #include #include #include @@ -11,6 +11,7 @@ #include #include "enums.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "memory_fast.h" #include "omdata.h" @@ -19,6 +20,7 @@ #include "weighted_list.h" class JsonObject; +class mapgendata; class building_bin { diff --git a/src/relic.cpp b/src/relic.cpp index da9a784a20a1f..cc72b1f5aa9a8 100644 --- a/src/relic.cpp +++ b/src/relic.cpp @@ -1,23 +1,25 @@ #include "relic.h" #include -#include #include -#include #include #include "calendar.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "debug.h" +#include "enum_conversions.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "json.h" #include "magic.h" #include "magic_enchantment.h" #include "map.h" +#include "point.h" #include "rng.h" -#include "string_id.h" #include "translations.h" #include "type_id.h" #include "weather.h" diff --git a/src/relic.h b/src/relic.h index 249f521ed0191..01a6dcab5faf3 100644 --- a/src/relic.h +++ b/src/relic.h @@ -4,30 +4,29 @@ #include #include -#include +#include +#include #include #include #include "calendar.h" +#include "coords_fwd.h" +#include "creature.h" #include "item.h" #include "magic.h" #include "magic_enchantment.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "weighted_list.h" class Character; -class Creature; class JsonObject; class JsonOut; class relic; -class relic_procgen_data; struct relic_charge_info; struct relic_charge_template; struct tripoint; -using relic_procgen_id = string_id; - class relic_procgen_data { public: diff --git a/src/requirements.cpp b/src/requirements.cpp index 0678a3a69b688..3add994f3df7e 100644 --- a/src/requirements.cpp +++ b/src/requirements.cpp @@ -2,12 +2,14 @@ #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -16,19 +18,24 @@ #include "cata_utility.h" #include "character.h" #include "color.h" +#include "coordinates.h" #include "debug.h" #include "debug_menu.h" #include "enum_traits.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "inventory.h" #include "item.h" #include "item_factory.h" +#include "item_pocket.h" +#include "item_tname.h" #include "itype.h" #include "json.h" #include "localized_comparator.h" #include "make_static.h" #include "output.h" -#include "point.h" +#include "pocket_type.h" #include "string_formatter.h" #include "translations.h" #include "value_ptr.h" diff --git a/src/requirements.h b/src/requirements.h index a7a9a59761c0b..196bc4d99ddc5 100644 --- a/src/requirements.h +++ b/src/requirements.h @@ -2,12 +2,12 @@ #ifndef CATA_SRC_REQUIREMENTS_H #define CATA_SRC_REQUIREMENTS_H +#include #include -#include -#include #include #include #include +#include #include #include #include @@ -15,7 +15,7 @@ #include #include "crafting.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class Character; diff --git a/src/rng.cpp b/src/rng.cpp index 2fcf17b7e2791..9e7eb24d8e871 100644 --- a/src/rng.cpp +++ b/src/rng.cpp @@ -5,7 +5,9 @@ #include #include "calendar.h" +#include "cata_assert.h" #include "cata_utility.h" +#include "debug.h" #include "units.h" unsigned int rng_bits() diff --git a/src/rng.h b/src/rng.h index 50a60a7962efd..1a39eab655719 100644 --- a/src/rng.h +++ b/src/rng.h @@ -5,17 +5,18 @@ #include #include #include -#include #include #include +#include #include +#include +#include #include "coords_fwd.h" -#include "units_fwd.h" +#include "units.h" class map; class time_duration; -struct tripoint; template class tripoint_range; diff --git a/src/rotatable_symbols.cpp b/src/rotatable_symbols.cpp index b3801516a4a3c..d5b30e6b77db5 100644 --- a/src/rotatable_symbols.cpp +++ b/src/rotatable_symbols.cpp @@ -1,15 +1,17 @@ #include "rotatable_symbols.h" -#include #include +#include #include #include #include +#include #include #include "catacharset.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "string_formatter.h" namespace diff --git a/src/safe_reference.cpp b/src/safe_reference.cpp index 6feedbba8d5de..fb7bdbf49d9a8 100644 --- a/src/safe_reference.cpp +++ b/src/safe_reference.cpp @@ -1,5 +1,7 @@ #include "safe_reference.h" +#include + static_assert( std::is_nothrow_move_constructible_v ); static_assert( std::is_nothrow_move_assignable_v ); diff --git a/src/safemode_ui.cpp b/src/safemode_ui.cpp index 9fe42daa168fc..0ebf0fd6a9cb9 100644 --- a/src/safemode_ui.cpp +++ b/src/safemode_ui.cpp @@ -1,18 +1,27 @@ #include "safemode_ui.h" #include +#include +#include +#include +#include #include #include #include +#include "cata_path.h" #include "cata_utility.h" +#include "catacharset.h" #include "character.h" #include "color.h" #include "cursesdef.h" #include "debug.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input_context.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "monstergenerator.h" #include "mtype.h" @@ -22,7 +31,9 @@ #include "point.h" #include "string_formatter.h" #include "string_input_popup.h" +#include "translation.h" #include "translations.h" +#include "ui.h" #include "ui_manager.h" safemode &get_safemode() diff --git a/src/safemode_ui.h b/src/safemode_ui.h index 188b803bfeb01..6caa09a673938 100644 --- a/src/safemode_ui.h +++ b/src/safemode_ui.h @@ -3,8 +3,8 @@ #define CATA_SRC_SAFEMODE_UI_H #include -#include #include +#include #include #include diff --git a/src/savegame.cpp b/src/savegame.cpp index 3508f47d146d3..0eccb615086fa 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -1,10 +1,13 @@ #include "game.h" // IWYU pragma: associated -#include #include +#include +#include #include #include #include +#include +#include #include #include #include @@ -16,17 +19,28 @@ #include "basecamp.h" #include "cata_io.h" #include "cata_path.h" +#include "cata_utility.h" #include "city.h" +#include "colony.h" #include "coordinates.h" #include "creature_tracker.h" #include "debug.h" +#include "dialogue_chatbin.h" +#include "effect.h" +#include "enum_conversions.h" #include "faction.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "hash_utils.h" #include "input.h" +#include "inventory.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "kill_tracker.h" #include "map.h" +#include "mapgendata.h" +#include "mdarray.h" #include "messages.h" #include "mission.h" #include "mongroup.h" @@ -35,13 +49,18 @@ #include "omdata.h" #include "options.h" #include "overmap.h" -#include "overmapbuffer.h" #include "overmap_types.h" +#include "overmapbuffer.h" #include "path_info.h" +#include "player_activity.h" +#include "point.h" #include "regional_settings.h" #include "scent_map.h" #include "stats_tracker.h" +#include "submap.h" #include "timed_event.h" +#include "units.h" +#include "vehicle.h" class overmap_connection; diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 3c40666ff16fa..cc66ac771a49e 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -10,21 +10,17 @@ #include #include #include -#include #include -#include #include -#include #include #include #include -#include -#include #include #include #include #include #include +#include #include #include #include @@ -34,7 +30,7 @@ #include "active_item_cache.h" #include "activity_actor.h" #include "activity_actor_definitions.h" -#include "activity_type.h" +#include "activity_tracker.h" #include "addiction.h" #include "assign.h" #include "auto_pickup.h" @@ -47,6 +43,7 @@ #include "cata_utility.h" #include "cata_variant.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "character_martial_arts.h" #include "clone_ptr.h" @@ -60,18 +57,24 @@ #include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "dialogue_chatbin.h" +#include "dialogue_helpers.h" #include "effect.h" #include "effect_source.h" +#include "enum_conversions.h" #include "event.h" #include "event_bus.h" #include "faction.h" #include "field.h" -#include "field_type.h" #include "flag.h" #include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" +#include "generic_factory.h" +#include "global_vars.h" +#include "hash_utils.h" #include "inventory.h" #include "item.h" #include "item_contents.h" @@ -79,27 +82,32 @@ #include "item_location.h" #include "item_pocket.h" #include "itype.h" +#include "iuse.h" #include "json.h" +#include "json_error.h" #include "kill_tracker.h" -#include "lru_cache.h" #include "magic.h" #include "magic_teleporter_list.h" #include "make_static.h" #include "map.h" #include "map_memory.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "mattack_common.h" +#include "mdarray.h" #include "memory_fast.h" #include "mission.h" +#include "mission_companion.h" #include "monster.h" #include "morale.h" #include "mtype.h" #include "mutation.h" #include "npc.h" -#include "options.h" +#include "npc_opinion.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" +#include "pocket_type.h" #include "point.h" #include "profession.h" #include "proficiency.h" @@ -109,23 +117,25 @@ #include "requirements.h" #include "ret_val.h" #include "rng.h" +#include "safe_reference.h" #include "scenario.h" #include "skill.h" #include "stats_tracker.h" #include "stomach.h" +#include "string_formatter.h" #include "submap.h" #include "text_snippets.h" #include "tileray.h" +#include "trap.h" +#include "units.h" #include "units_utility.h" #include "value_ptr.h" #include "veh_type.h" #include "vehicle.h" #include "vitamin.h" #include "vpart_position.h" -#include "vpart_range.h" #include "weather.h" -struct mutation_branch; struct oter_type_t; static const activity_id ACT_FETCH_REQUIRED( "ACT_FETCH_REQUIRED" ); diff --git a/src/savegame_legacy.cpp b/src/savegame_legacy.cpp index 671d3fb6fed70..4d99e13d97312 100644 --- a/src/savegame_legacy.cpp +++ b/src/savegame_legacy.cpp @@ -1,13 +1,13 @@ #include -#include +#include #include #include #include -#include "activity_type.h" #include "debug.h" #include "npc.h" #include "player_activity.h" +#include "type_id.h" static const activity_id ACT_AIM( "ACT_AIM" ); static const activity_id ACT_ARMOR_LAYERS( "ACT_ARMOR_LAYERS" ); diff --git a/src/scenario.cpp b/src/scenario.cpp index 9cb5af2ac756f..511386d48682c 100644 --- a/src/scenario.cpp +++ b/src/scenario.cpp @@ -1,22 +1,24 @@ #include "scenario.h" #include +#include #include +#include +#include +#include #include "achievement.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" -#include "map_extras.h" #include "mission.h" #include "mutation.h" #include "options.h" -#include "past_games_info.h" #include "past_achievements_info.h" #include "profession.h" #include "rng.h" #include "start_location.h" -#include "string_id.h" #include "translations.h" static const achievement_id achievement_achievement_arcade_mode( "achievement_arcade_mode" ); diff --git a/src/scenario.h b/src/scenario.h index e753ac19aae03..3d8fb16057e17 100644 --- a/src/scenario.h +++ b/src/scenario.h @@ -2,14 +2,16 @@ #ifndef CATA_SRC_SCENARIO_H #define CATA_SRC_SCENARIO_H -#include +#include #include #include +#include +#include #include #include "calendar.h" -#include "effect_on_condition.h" -#include "translations.h" +#include "ret_val.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/scent_block.cpp b/src/scent_block.cpp index 97fef9891d18b..14f32f414ec9f 100644 --- a/src/scent_block.cpp +++ b/src/scent_block.cpp @@ -1,5 +1,8 @@ +#include + #include "coordinates.h" #include "scent_block.h" +#include "scent_map.h" scent_block::scent_block( const tripoint_bub_sm &sub, scent_map &scents ) // NOLINTNEXTLINE(cata-use-named-point-constants) diff --git a/src/scent_block.h b/src/scent_block.h index 22f1a2f293968..dccb9aad4e975 100644 --- a/src/scent_block.h +++ b/src/scent_block.h @@ -2,12 +2,13 @@ #ifndef CATA_SRC_SCENT_BLOCK_H #define CATA_SRC_SCENT_BLOCK_H -#include #include #include "coordinates.h" +#include "map_scale_constants.h" #include "point.h" -#include "scent_map.h" + +class scent_map; struct scent_block { template diff --git a/src/scent_map.cpp b/src/scent_map.cpp index 4fbccd7d6047c..8ca6e463576ee 100644 --- a/src/scent_map.cpp +++ b/src/scent_map.cpp @@ -1,8 +1,9 @@ #include "scent_map.h" #include +#include #include -#include +#include #include "assign.h" #include "calendar.h" @@ -11,8 +12,8 @@ #include "cuboid_rectangle.h" #include "cursesdef.h" #include "debug.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "map.h" #include "output.h" #include "point.h" diff --git a/src/scent_map.h b/src/scent_map.h index 8e795e38e00ae..cc4809ae2fdd1 100644 --- a/src/scent_map.h +++ b/src/scent_map.h @@ -3,16 +3,17 @@ #define CATA_SRC_SCENT_MAP_H #include -#include #include #include +#include +#include +#include #include #include "calendar.h" #include "coordinates.h" #include "enums.h" // IWYU pragma: keep #include "map_scale_constants.h" -#include "point.h" #include "type_id.h" class JsonObject; diff --git a/src/scores_ui.cpp b/src/scores_ui.cpp index 76344b07c6c50..618e0b11916b8 100644 --- a/src/scores_ui.cpp +++ b/src/scores_ui.cpp @@ -1,31 +1,38 @@ #include "scores_ui.h" +#include +#include #include #include +#include +#include #include #include #include #include #include "achievement.h" +#include "avatar.h" +#include "cata_imgui.h" #include "color.h" -#include "cursesdef.h" +#include "enum_traits.h" #include "event_statistics.h" #include "game.h" #include "input_context.h" -#include "localized_comparator.h" #include "kill_tracker.h" +#include "localized_comparator.h" #include "mtype.h" #include "options.h" -#include "output.h" #include "past_games_info.h" -#include "point.h" #include "stats_tracker.h" #include "string_formatter.h" +#include "string_id.h" +#include "translation.h" #include "translations.h" -#include "ui.h" #include "ui_manager.h" +template struct enum_traits; + enum class scores_ui_tab : int { achievements = 0, conducts, @@ -40,8 +47,6 @@ struct enum_traits { static constexpr scores_ui_tab last = scores_ui_tab::num_tabs; }; -class scores_ui; - class scores_ui { friend class scores_ui_impl; diff --git a/src/sdl_font.cpp b/src/sdl_font.cpp index 9ea5b7cec114c..88345f0f82f49 100644 --- a/src/sdl_font.cpp +++ b/src/sdl_font.cpp @@ -1,6 +1,7 @@ #if defined( TILES ) #include "sdl_font.h" +#include "catacharset.h" #include "font_loader.h" #include "output.h" #include "sdl_utils.h" diff --git a/src/sdl_gamepad.cpp b/src/sdl_gamepad.cpp index 0b9a66a6a26e7..35d52e4db6ee5 100644 --- a/src/sdl_gamepad.cpp +++ b/src/sdl_gamepad.cpp @@ -1,6 +1,12 @@ #if defined(TILES) #include "sdl_gamepad.h" + +#include +#include + #include "debug.h" +#include "input.h" +#include "input_enums.h" #define dbg(x) DebugLog((x),D_SDL) << __FILE__ << ":" << __LINE__ << ": " diff --git a/src/sdl_gamepad.h b/src/sdl_gamepad.h index 01f0e68995ccb..d5f61527ce84c 100644 --- a/src/sdl_gamepad.h +++ b/src/sdl_gamepad.h @@ -1,9 +1,9 @@ #pragma once #ifndef CATA_SRC_SDL_GAMEPAD_H #define CATA_SRC_SDL_GAMEPAD_H +struct input_event; #if defined(TILES) -#include "input.h" #include "sdl_wrappers.h" #define SDL_GAMEPAD_SCHEDULER (SDL_USEREVENT+1) diff --git a/src/sdl_geometry.cpp b/src/sdl_geometry.cpp index c94841bd975af..759c1234783ea 100644 --- a/src/sdl_geometry.cpp +++ b/src/sdl_geometry.cpp @@ -1,7 +1,11 @@ #if defined(TILES) #include "sdl_geometry.h" +#include +#include + #include "debug.h" +#include "point.h" #include "sdl_utils.h" void GeometryRenderer::horizontal_line( const SDL_Renderer_Ptr &renderer, const point &pos, int x2, diff --git a/src/sdl_geometry.h b/src/sdl_geometry.h index 4159a10a3b5c7..4e3e92837793d 100644 --- a/src/sdl_geometry.h +++ b/src/sdl_geometry.h @@ -2,11 +2,11 @@ #ifndef CATA_SRC_SDL_GEOMETRY_H #define CATA_SRC_SDL_GEOMETRY_H +struct point; #if defined(TILES) #include #include "sdl_wrappers.h" -#include "point.h" /// Interface to render geometry with SDL_Renderer. class GeometryRenderer diff --git a/src/sdl_utils.cpp b/src/sdl_utils.cpp index 955db12b8e722..a7b2b77d3a5db 100644 --- a/src/sdl_utils.cpp +++ b/src/sdl_utils.cpp @@ -2,13 +2,17 @@ #include "sdl_utils.h" +#include #include +#include +#include #include #include "color.h" #include "color_loader.h" #include "cursesport.h" #include "debug.h" +#include "point.h" #include "sdltiles.h" static color_pixel_function_map builtin_color_pixel_functions = { diff --git a/src/sdl_utils.h b/src/sdl_utils.h index ce1f7a5e6be52..e1c97fcb751a2 100644 --- a/src/sdl_utils.h +++ b/src/sdl_utils.h @@ -2,13 +2,11 @@ #ifndef CATA_SRC_SDL_UTILS_H #define CATA_SRC_SDL_UTILS_H -#include -#include #include #include #include -#include "color.h" +#include "color.h" // IWYU pragma: keep #include "options.h" #include "sdl_wrappers.h" diff --git a/src/sdlsound.cpp b/src/sdlsound.cpp index 73fb9739d6106..71ac7bc190d7e 100644 --- a/src/sdlsound.cpp +++ b/src/sdlsound.cpp @@ -2,17 +2,23 @@ #include "sdlsound.h" -#include #include #include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include #include +#include #include +#include +#include +#include +#include #include +#include #if defined(_MSC_VER) && defined(USE_VCPKG) # include @@ -21,9 +27,11 @@ #endif #include "cached_options.h" +#include "cata_path.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "init.h" -#include "json.h" #include "messages.h" #include "music.h" #include "options.h" diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 7493c446c95a6..5b670c3de4ac6 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -1,8 +1,27 @@ #include "cursesdef.h" // IWYU pragma: associated #include "sdltiles.h" // IWYU pragma: associated +#include +#include +#include + +#include "basecamp.h" +#include "character.h" +#include "city.h" +#include "coordinates.h" #include "cuboid_rectangle.h" +#include "input_context.h" +#include "input_enums.h" +#include "lightmap.h" +#include "map_scale_constants.h" +#include "memory_fast.h" +#include "mongroup.h" +#include "omdata.h" +#include "overmap.h" #include "point.h" +#include "rng.h" +#include "translations.h" +#include "type_id.h" #if defined(TILES) @@ -11,18 +30,16 @@ #include #include #include +#include // for atexit(), and getenv()/setenv() on linux #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #if defined(_MSC_VER) && defined(USE_VCPKG) # include @@ -35,7 +52,7 @@ #include "avatar.h" #include "cached_options.h" -#include "cata_assert.h" +#include "cata_imgui.h" #include "cata_scope_helpers.h" #include "cata_tiles.h" #include "cata_utility.h" @@ -44,48 +61,36 @@ #include "color_loader.h" #include "cursesport.h" #include "debug.h" -#include "filesystem.h" -#include "flag.h" #include "font_loader.h" #include "game.h" #include "game_constants.h" #include "game_ui.h" -#include "hash_utils.h" #include "input.h" -#include "json.h" -#include "line.h" #include "map.h" #include "map_extras.h" -#include "mapbuffer.h" #include "mission.h" #include "npc.h" #include "options.h" #include "output.h" #include "overmap_ui.h" #include "overmapbuffer.h" -#include "path_info.h" -#include "sdl_geometry.h" -#include "sdl_wrappers.h" #include "sdl_font.h" #include "sdl_gamepad.h" +#include "sdl_geometry.h" +#include "sdl_wrappers.h" #include "sdlsound.h" #include "string_formatter.h" -#include "uistate.h" #include "ui_manager.h" +#include "uistate.h" #include "wcwidth.h" -#include "cata_imgui.h" std::unique_ptr imclient; -#if defined(__linux__) -# include // getenv()/setenv() -#endif - #if defined(_WIN32) # if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU # include "platform_win.h" # endif -# include +# include // for HWND #endif #if defined(__ANDROID__) diff --git a/src/sdltiles.h b/src/sdltiles.h index 2617b6716a08e..3a38895b8fbe0 100644 --- a/src/sdltiles.h +++ b/src/sdltiles.h @@ -4,18 +4,14 @@ #include "point.h" // IWYU pragma: keep -namespace catacurses -{ -class window; -} // namespace catacurses - #if defined(TILES) +#include #include #include #include "color_loader.h" -#include "coords_fwd.h" +#include "cursesdef.h" // IWYU pragma: keep #include "sdl_wrappers.h" #include "string_id.h" @@ -25,16 +21,10 @@ class window; #endif class cata_tiles; - struct weather_type; using weather_type_id = string_id; -namespace catacurses -{ -class window; -} // namespace catacurses - extern std::shared_ptr tilecontext; extern std::shared_ptr closetilecontext; extern std::shared_ptr fartilecontext; diff --git a/src/shadowcasting.cpp b/src/shadowcasting.cpp index e8ce5a4d9f988..5671a336c73f1 100644 --- a/src/shadowcasting.cpp +++ b/src/shadowcasting.cpp @@ -2,8 +2,8 @@ #include #include -#include +#include "coordinates.h" #include "cuboid_rectangle.h" #include "fragment_cloud.h" // IWYU pragma: keep #include "line.h" diff --git a/src/shadowcasting.h b/src/shadowcasting.h index b7b47b77eeb08..c85374fe29aaf 100644 --- a/src/shadowcasting.h +++ b/src/shadowcasting.h @@ -5,16 +5,16 @@ #include #include #include -#include -#include +#include +#include +#include #include "coords_fwd.h" -#include "game_constants.h" #include "lightmap.h" +#include "map_scale_constants.h" #include "mdarray.h" -struct point; -struct tripoint; +struct fragment_cloud; // For light we store four values, depending on the direction that the light // comes from. This allows us to determine whether the side of the wall the diff --git a/src/shearing.cpp b/src/shearing.cpp index d349a8d2160ac..f2032093c5111 100644 --- a/src/shearing.cpp +++ b/src/shearing.cpp @@ -1,7 +1,11 @@ #include "shearing.h" +#include +#include #include +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "monster.h" #include "rng.h" diff --git a/src/shearing.h b/src/shearing.h index 2d2153473600a..5d7ff0b74b7e8 100644 --- a/src/shearing.h +++ b/src/shearing.h @@ -1,12 +1,10 @@ #pragma once -#include "damage.h" +#include "type_id.h" #ifndef CATA_SRC_SHEARING_H #define CATA_SRC_SHEARING_H #include -#include "itype.h" - class JsonObject; class monster; diff --git a/src/shop_cons_rate.cpp b/src/shop_cons_rate.cpp index 69d8e90b3614e..5e782824860d5 100644 --- a/src/shop_cons_rate.cpp +++ b/src/shop_cons_rate.cpp @@ -1,13 +1,20 @@ #include "shop_cons_rate.h" +#include +#include + #include "avatar.h" #include "condition.h" +#include "creature.h" +#include "debug.h" #include "dialogue.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" +#include "item.h" #include "item_category.h" #include "item_group.h" #include "itype.h" -#include "json.h" #include "npc.h" namespace diff --git a/src/shop_cons_rate.h b/src/shop_cons_rate.h index e5ef8acc07e39..590bb92d43f27 100644 --- a/src/shop_cons_rate.h +++ b/src/shop_cons_rate.h @@ -2,11 +2,19 @@ #ifndef CATA_SRC_SHOP_CONS_RATE_H #define CATA_SRC_SHOP_CONS_RATE_H +#include +#include +#include +#include + #include "generic_factory.h" +#include "translation.h" #include "type_id.h" #include "units.h" class JsonObject; +class JsonValue; +class item; class npc; struct const_dialogue; diff --git a/src/simple_pathfinding.cpp b/src/simple_pathfinding.cpp index 6730862862cdf..c5eae1a92b8cc 100644 --- a/src/simple_pathfinding.cpp +++ b/src/simple_pathfinding.cpp @@ -1,13 +1,21 @@ #include "simple_pathfinding.h" +#include +#include +#include +#include +#include #include #include +#include #include #include +#include #include +#include "cata_assert.h" #include "coordinates.h" -#include "enums.h" +#include "debug.h" #include "hash_utils.h" #include "line.h" #include "omdata.h" diff --git a/src/simple_pathfinding.h b/src/simple_pathfinding.h index 27d024e1e7764..542e59677afa0 100644 --- a/src/simple_pathfinding.h +++ b/src/simple_pathfinding.h @@ -2,12 +2,13 @@ #ifndef CATA_SRC_SIMPLE_PATHFINDING_H #define CATA_SRC_SIMPLE_PATHFINDING_H +#include #include #include +#include #include #include "coords_fwd.h" -#include "enums.h" #include "omdata.h" #include "point.h" diff --git a/src/skill.cpp b/src/skill.cpp index 8847093c8a145..f16cdcedb257b 100644 --- a/src/skill.cpp +++ b/src/skill.cpp @@ -2,19 +2,20 @@ #include #include +#include #include -#include +#include +#include #include -#include "cata_utility.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "item.h" -#include "json.h" #include "options.h" #include "recipe.h" #include "rng.h" -#include "translations.h" static const skill_id skill_archery( "archery" ); static const skill_id skill_bashing( "bashing" ); diff --git a/src/skill.h b/src/skill.h index 00895c87dea8c..1891f608c379d 100644 --- a/src/skill.h +++ b/src/skill.h @@ -2,8 +2,9 @@ #ifndef CATA_SRC_SKILL_H #define CATA_SRC_SKILL_H +#include #include -#include +#include #include #include #include @@ -12,7 +13,7 @@ #include "calendar.h" #include "game_constants.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; diff --git a/src/skill_boost.cpp b/src/skill_boost.cpp index a642aa96e2435..c63d47ae04270 100644 --- a/src/skill_boost.cpp +++ b/src/skill_boost.cpp @@ -2,12 +2,10 @@ #include #include -#include -#include #include +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" namespace { diff --git a/src/skill_boost.h b/src/skill_boost.h index 3d6744991b18b..b8cbab369efb1 100644 --- a/src/skill_boost.h +++ b/src/skill_boost.h @@ -2,11 +2,12 @@ #ifndef CATA_SRC_SKILL_BOOST_H #define CATA_SRC_SKILL_BOOST_H -#include #include +#include +#include +#include #include -#include "string_id.h" #include "type_id.h" class JsonObject; diff --git a/src/skill_ui.cpp b/src/skill_ui.cpp index 627735c7d818a..a6f860ce2c106 100644 --- a/src/skill_ui.cpp +++ b/src/skill_ui.cpp @@ -1,5 +1,6 @@ #include "skill_ui.h" +#include "skill.h" #include "type_id.h" #include "ui.h" diff --git a/src/skill_ui.h b/src/skill_ui.h index e0d5fdcbe4b28..e5beba9de1f63 100644 --- a/src/skill_ui.h +++ b/src/skill_ui.h @@ -4,7 +4,7 @@ #include -#include "skill.h" +class Skill; /** * For building list of skills including category as headers. diff --git a/src/sleep.cpp b/src/sleep.cpp index e5411b315b180..85d62dec58f3a 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -1,15 +1,20 @@ #include "sleep.h" -#include +#include #include #include #include "character.h" +#include "debug.h" #include "flag.h" -#include "game.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" +#include "item_stack.h" #include "map.h" +#include "mapdata.h" +#include "translations.h" #include "trap.h" #include "type_id.h" #include "veh_type.h" diff --git a/src/sleep.h b/src/sleep.h index c001f84917a24..7035ad63bbe84 100644 --- a/src/sleep.h +++ b/src/sleep.h @@ -7,7 +7,6 @@ #include "calendar.h" #include "coordinates.h" -#include "enum_traits.h" #include "enums.h" #include "point.h" #include "translation.h" @@ -15,6 +14,7 @@ class Character; class JsonObject; class item; +template struct enum_traits; /** * Information for evaluating the comfort of a location. diff --git a/src/smart_controller_ui.cpp b/src/smart_controller_ui.cpp index 17d5ec8456cc6..00ab0786d403a 100644 --- a/src/smart_controller_ui.cpp +++ b/src/smart_controller_ui.cpp @@ -1,6 +1,7 @@ #include "smart_controller_ui.h" #include +#include #include #include #include @@ -12,6 +13,7 @@ #include "point.h" #include "string_formatter.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" diff --git a/src/sounds.cpp b/src/sounds.cpp index 9eaf679f26b9c..43bc7f161c176 100644 --- a/src/sounds.cpp +++ b/src/sounds.cpp @@ -4,42 +4,53 @@ #include #include #include +#include +#include #include -#include +#include +#include +#include +#include #include -#include "activity_type.h" #include "cached_options.h" // IWYU pragma: keep #include "calendar.h" #include "character.h" #include "coordinates.h" +#include "creature.h" #include "creature_tracker.h" #include "debug.h" #include "effect.h" #include "enums.h" #include "game.h" -#include "game_constants.h" +#include "item.h" +#include "item_location.h" #include "itype.h" // IWYU pragma: keep #include "line.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "messages.h" #include "monster.h" #include "music.h" #include "npc.h" #include "output.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "player_activity.h" #include "point.h" #include "rng.h" #include "safemode_ui.h" #include "string_formatter.h" +#include "translation.h" #include "translations.h" #include "trap.h" #include "type_id.h" #include "uistate.h" #include "units.h" +#include "value_ptr.h" #include "veh_type.h" // IWYU pragma: keep #include "vehicle.h" #include "vpart_position.h" diff --git a/src/speech.cpp b/src/speech.cpp index ee0113fe9967f..3c5f8d2dc17c2 100644 --- a/src/speech.cpp +++ b/src/speech.cpp @@ -6,7 +6,8 @@ #include #include -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "rng.h" static std::map> speech; diff --git a/src/speech.h b/src/speech.h index 0770f34d7e4a9..234ce65889eb5 100644 --- a/src/speech.h +++ b/src/speech.h @@ -2,9 +2,9 @@ #ifndef CATA_SRC_SPEECH_H #define CATA_SRC_SPEECH_H -#include +#include -#include "translations.h" +#include "translation.h" class JsonObject; diff --git a/src/speed_description.cpp b/src/speed_description.cpp index 34340b1580b38..bf6637da77618 100644 --- a/src/speed_description.cpp +++ b/src/speed_description.cpp @@ -1,8 +1,10 @@ #include "speed_description.h" +#include + +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" -#include "make_static.h" namespace { diff --git a/src/speed_description.h b/src/speed_description.h index 3609887d8d50c..a5d5a68db87bd 100644 --- a/src/speed_description.h +++ b/src/speed_description.h @@ -3,15 +3,17 @@ #define CATA_SRC_SPEED_DESCRIPTION_H #include +#include +#include #include +#include "translation.h" #include "type_id.h" class JsonObject; -class JsonOut; +class speed_description_value; template class generic_factory; -class speed_description_value; class speed_description { diff --git a/src/start_location.cpp b/src/start_location.cpp index 6be19942ca325..0944bb8e3d457 100644 --- a/src/start_location.cpp +++ b/src/start_location.cpp @@ -1,33 +1,41 @@ #include "start_location.h" #include -#include +#include +#include +#include +#include "assign.h" #include "avatar.h" #include "bodypart.h" #include "calendar.h" +#include "cata_variant.h" +#include "character.h" #include "city.h" #include "clzones.h" -#include "colony.h" #include "coordinates.h" #include "creature.h" #include "debug.h" -#include "effect_source.h" #include "enum_conversions.h" +#include "enums.h" #include "field_type.h" -#include "game_constants.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "map.h" #include "map_extras.h" #include "map_iterator.h" #include "mapdata.h" -#include "options.h" +#include "mapgen_parameter.h" +#include "mapgendata.h" +#include "mdarray.h" +#include "omdata.h" #include "output.h" #include "overmap.h" #include "overmapbuffer.h" #include "point.h" #include "rng.h" +#include "translations.h" class item; diff --git a/src/start_location.h b/src/start_location.h index 6d2326bf2e8de..c64800d64721c 100644 --- a/src/start_location.h +++ b/src/start_location.h @@ -2,26 +2,25 @@ #ifndef CATA_SRC_START_LOCATION_H #define CATA_SRC_START_LOCATION_H +#include #include -#include #include #include +#include #include #include -#include "assign.h" #include "common_types.h" #include "coords_fwd.h" -#include "enums.h" -#include "game_constants.h" #include "map_scale_constants.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; class avatar; -struct city; class tinymap; +enum class ot_match_type : int; +struct city; struct start_location_placement_constraints { numeric_interval city_size{ 0, INT_MAX }; diff --git a/src/stats_tracker.cpp b/src/stats_tracker.cpp index e81143b361eb4..b33c9b25d54c6 100644 --- a/src/stats_tracker.cpp +++ b/src/stats_tracker.cpp @@ -11,6 +11,7 @@ #include "cata_assert.h" #include "debug.h" #include "event_statistics.h" +#include "flexbuffer_json.h" // IWYU pragma: keep #include "json.h" static bool event_data_matches( const cata::event::data_type &data, diff --git a/src/stomach.cpp b/src/stomach.cpp index 9033e7c81f8a3..018fe770349c2 100644 --- a/src/stomach.cpp +++ b/src/stomach.cpp @@ -1,13 +1,21 @@ #include #include -#include +#include +#include #include +#include #include +#include "cata_assert.h" #include "cata_utility.h" #include "character.h" +#include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "itype.h" #include "json.h" +#include "magic_enchantment.h" +#include "pimpl.h" #include "stomach.h" #include "units.h" #include "vitamin.h" diff --git a/src/stomach.h b/src/stomach.h index 0e1993107e9a9..9e4150ac8a792 100644 --- a/src/stomach.h +++ b/src/stomach.h @@ -2,8 +2,12 @@ #ifndef CATA_SRC_STOMACH_H #define CATA_SRC_STOMACH_H +#include #include +#include +#include #include +#include #include "calendar.h" #include "type_id.h" diff --git a/src/string_editor_window.cpp b/src/string_editor_window.cpp index 0b89d488f0f91..80d3704b88f73 100644 --- a/src/string_editor_window.cpp +++ b/src/string_editor_window.cpp @@ -1,18 +1,27 @@ #include "string_editor_window.h" +#include +#include +#include +#include + #if defined(TILES) #include "sdl_wrappers.h" #endif #if defined(__ANDROID__) #include + #include "cata_utility.h" #include "options.h" #endif +#include "cata_utility.h" #include "catacharset.h" +#include "color.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "output.h" #include "ui_manager.h" #include "unicode.h" diff --git a/src/string_editor_window.h b/src/string_editor_window.h index 62d0c8f639ac8..3bce79b817b4b 100644 --- a/src/string_editor_window.h +++ b/src/string_editor_window.h @@ -3,18 +3,18 @@ #define CATA_SRC_STRING_EDITOR_WINDOW_H #include +#include #include +#include #include "catacharset.h" #include "cursesdef.h" #include "point.h" class folded_text; - -struct ime_preview_range; - class input_context; class ui_adaptor; +struct ime_preview_range; /// /// Editor, to let the player edit text. diff --git a/src/string_formatter.h b/src/string_formatter.h index 0fed6c017dc99..73df5ec95be09 100644 --- a/src/string_formatter.h +++ b/src/string_formatter.h @@ -3,12 +3,12 @@ #define CATA_SRC_STRING_FORMATTER_H #include -#include -#include #include #include +#include #include #include +#include #include "demangle.h" diff --git a/src/string_id.h b/src/string_id.h index d55c54042f761..50e7dfb1fe953 100644 --- a/src/string_id.h +++ b/src/string_id.h @@ -7,7 +7,9 @@ #include #include #include +#include #include +#include constexpr int64_t INVALID_VERSION = -1; constexpr int INVALID_CID = -1; diff --git a/src/string_input_popup.cpp b/src/string_input_popup.cpp index d8143b8db5340..56ff7b62c8dcc 100644 --- a/src/string_input_popup.cpp +++ b/src/string_input_popup.cpp @@ -1,13 +1,20 @@ #include "string_input_popup.h" #include +#include #include "cata_scope_helpers.h" #include "catacharset.h" +#include "condition.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "output.h" #include "point.h" +#include "ret_val.h" +#include "translation.h" #include "translations.h" #include "try_parse_integer.h" #include "ui.h" diff --git a/src/string_input_popup.h b/src/string_input_popup.h index dc496a9ebab39..e1384b6ed6eab 100644 --- a/src/string_input_popup.h +++ b/src/string_input_popup.h @@ -5,21 +5,25 @@ #include #include #include -#include -#include #include +#include +#include +#include +#include #include #include "color.h" #include "cursesdef.h" -#include "condition.h" +#include "dialogue_helpers.h" +class JsonObject; class input_context; class scrolling_text_view; +class translation; class ui_adaptor; class utf8_wrapper; struct point; -class JsonObject; + /** * Shows a window querying the user for input. * diff --git a/src/subbodypart.cpp b/src/subbodypart.cpp index 8a4732741470d..9e04420b88233 100644 --- a/src/subbodypart.cpp +++ b/src/subbodypart.cpp @@ -1,16 +1,9 @@ #include "subbodypart.h" -#include -#include -#include -#include -#include #include -#include "debug.h" -#include "enum_conversions.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "type_id.h" namespace diff --git a/src/subbodypart.h b/src/subbodypart.h index 16cb6af3dd17a..8b04729f3e4f6 100644 --- a/src/subbodypart.h +++ b/src/subbodypart.h @@ -2,29 +2,20 @@ #ifndef CATA_SRC_SUBBODYPART_H #define CATA_SRC_SUBBODYPART_H -#include -#include -#include -#include #include +#include #include #include #include "damage.h" -#include "enums.h" -#include "flat_set.h" -#include "int_id.h" -#include "string_id.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; -class JsonOut; -class JsonValue; -struct sub_body_part_type; struct body_part_type; +struct sub_body_part_type; +template struct enum_traits; -using sub_bodypart_str_id = string_id; using sub_bodypart_id = int_id; enum class side : int { diff --git a/src/submap.cpp b/src/submap.cpp index 2849956535971..245d6b1ebde69 100644 --- a/src/submap.cpp +++ b/src/submap.cpp @@ -1,12 +1,11 @@ #include "submap.h" -#include #include -#include #include #include #include "basecamp.h" +#include "debug.h" #include "mapdata.h" #include "tileray.h" #include "trap.h" diff --git a/src/submap.h b/src/submap.h index 81a4e75dcabd1..3767f15523722 100644 --- a/src/submap.h +++ b/src/submap.h @@ -4,37 +4,40 @@ #include #include -#include -#include #include #include +#include #include #include +#include #include #include "active_item_cache.h" -#include "basecamp.h" +#include "basecamp.h" // IWYU pragma: keep #include "calendar.h" #include "cata_type_traits.h" #include "colony.h" #include "compatibility.h" #include "computer.h" #include "construction.h" +#include "coordinates.h" #include "field.h" -#include "game_constants.h" #include "item.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "mapgen.h" #include "mdarray.h" #include "point.h" #include "trap.h" #include "type_id.h" +#include "units.h" #include "vehicle.h" +// IWYU pragma: no_forward_declare vehicle + class JsonOut; +class JsonValue; class map; -class vehicle; -struct furn_t; -struct ter_t; struct spawn_point { point_sm_ms pos; diff --git a/src/suffer.cpp b/src/suffer.cpp index ea0778fefe875..c826a03f9abce 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -1,29 +1,33 @@ -#include #include #include #include #include -#include #include #include #include #include #include -#include +#include +#include #include #include #include "activity_handlers.h" +#include "activity_tracker.h" #include "addiction.h" #include "bionics.h" +#include "body_part_set.h" #include "bodypart.h" #include "calendar.h" #include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "color.h" +#include "coordinates.h" #include "creature.h" #include "creature_tracker.h" #include "debug.h" -#include "display.h" +#include "dialogue.h" #include "effect.h" #include "effect_on_condition.h" #include "enums.h" @@ -36,35 +40,33 @@ #include "inventory.h" #include "item.h" #include "item_location.h" +#include "lightmap.h" #include "magic.h" #include "magic_enchantment.h" #include "map.h" -#include "memory_fast.h" +#include "map_iterator.h" +#include "mapdata.h" #include "messages.h" #include "monster.h" -#include "morale_types.h" #include "mtype.h" #include "mutation.h" -#include "npc.h" #include "options.h" #include "output.h" -#include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" #include "point.h" #include "rng.h" -#include "skill.h" #include "sounds.h" #include "stomach.h" -#include "string_formatter.h" +#include "talker.h" #include "teleport.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "uistate.h" #include "units.h" #include "weather.h" -#include "weather_type.h" static const addiction_id addiction_alcohol( "alcohol" ); static const addiction_id addiction_nicotine( "nicotine" ); diff --git a/src/system_locale.cpp b/src/system_locale.cpp index 1fd8b06d20303..304413fca346f 100644 --- a/src/system_locale.cpp +++ b/src/system_locale.cpp @@ -1,26 +1,32 @@ -#include +#include "system_locale.h" + +#include #include -#include +#include #if defined(_WIN32) #if 1 // Prevent IWYU reordering platform_win.h below mmsystem.h -# include "platform_win.h" +# include "platform_win.h" // IWYU pragma: keep #endif -# include "mmsystem.h" +#include // for DWORD, LOCALE_USER_DEFAULT, LPSTR, TCHAR +#include // for GetUserDefaultUILanguage, GetLocaleInfo, LOCA... #elif defined(__APPLE__) #include #include #elif defined(__ANDROID__) #include -#include "sdl_wrappers.h" // for SDL_AndroidGetJNIEnv() + #include "debug.h" // for DebugLog/D_INFO/D_MAIN +#include "sdl_wrappers.h" // for SDL_AndroidGetJNIEnv() #elif defined(__linux__) +#include // for std::strcmp #include +#else +#include // for std::strcmp #endif -#include "cata_utility.h" -#include "options.h" -#include "system_locale.h" +#include "cata_utility.h" // IWYU pragma: keep +#include "options.h" // IWYU pragma: keep #ifndef _WIN32 namespace diff --git a/src/talker.h b/src/talker.h index bf774c0fa79e0..1301f31968c91 100644 --- a/src/talker.h +++ b/src/talker.h @@ -2,14 +2,16 @@ #ifndef CATA_SRC_TALKER_H #define CATA_SRC_TALKER_H +#include + #include "coords_fwd.h" #include "effect.h" #include "item.h" #include "messages.h" #include "type_id.h" +#include "translations.h" #include "units.h" #include "units_fwd.h" -#include class computer; class faction; diff --git a/src/talker_avatar.cpp b/src/talker_avatar.cpp index 4766f0769860d..4cbe5a093f1b3 100644 --- a/src/talker_avatar.cpp +++ b/src/talker_avatar.cpp @@ -1,9 +1,12 @@ #include #include +#include #include "avatar.h" #include "calendar.h" -#include "character.h" +#include "coordinates.h" +#include "debug.h" +#include "enums.h" #include "game.h" #include "messages.h" #include "monster.h" @@ -13,6 +16,7 @@ #include "output.h" #include "talker.h" #include "talker_avatar.h" +#include "translation.h" #include "translations.h" static const efftype_id effect_pacified( "pacified" ); diff --git a/src/talker_avatar.h b/src/talker_avatar.h index e36f73c13f915..d6c9c100e356a 100644 --- a/src/talker_avatar.h +++ b/src/talker_avatar.h @@ -2,16 +2,14 @@ #ifndef CATA_SRC_TALKER_AVATAR_H #define CATA_SRC_TALKER_AVATAR_H -#include +#include +#include #include "avatar.h" +#include "talker.h" #include "talker_character.h" #include "type_id.h" -class avatar; -class talker; -class translation; - /* * Talker wrapper class for avatar. */ diff --git a/src/talker_character.cpp b/src/talker_character.cpp index a396513d58cbe..bf056efc8467d 100644 --- a/src/talker_character.cpp +++ b/src/talker_character.cpp @@ -1,23 +1,53 @@ +#include +#include +#include +#include +#include +#include +#include #include - -#include "avatar.h" +#include +#include +#include +#include +#include + +#include "addiction.h" +#include "calendar.h" +#include "cata_utility.h" +#include "character_attire.h" #include "character_id.h" #include "character_martial_arts.h" +#include "coordinates.h" +#include "creature.h" +#include "damage.h" +#include "debug.h" #include "effect.h" +#include "faction.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "magic.h" +#include "martialarts.h" +#include "messages.h" #include "npc.h" #include "npctalk.h" +#include "output.h" #include "pimpl.h" #include "player_activity.h" #include "point.h" +#include "proficiency.h" +#include "ret_val.h" #include "skill.h" +#include "string_formatter.h" #include "talker_character.h" +#include "translation.h" +#include "translations.h" +#include "units.h" #include "vehicle.h" #include "weather.h" -class time_duration; +struct bionic; static const flag_id json_flag_FIT( "FIT" ); static const json_character_flag json_flag_SEESLEEP( "SEESLEEP" ); diff --git a/src/talker_character.h b/src/talker_character.h index e6c06335890f8..0997f197eb28e 100644 --- a/src/talker_character.h +++ b/src/talker_character.h @@ -2,31 +2,16 @@ #ifndef CATA_SRC_TALKER_CHARACTER_H #define CATA_SRC_TALKER_CHARACTER_H -#include -#include -#include +#include #include +#include "bodypart.h" #include "character.h" #include "coords_fwd.h" -#include "npc.h" +#include "enums.h" #include "talker.h" #include "type_id.h" - -class character_id; -class faction; -class item; - -class time_duration; -class vehicle; -struct tripoint; - -struct mutation_variant; - -namespace npc_factions -{ -enum class relationship : int; -} // namespace npc_factions +#include "units_fwd.h" /* * Talker wrapper class for const Character access. diff --git a/src/talker_furniture.cpp b/src/talker_furniture.cpp index 85b490bceac2b..9344eb0684d53 100644 --- a/src/talker_furniture.cpp +++ b/src/talker_furniture.cpp @@ -1,12 +1,13 @@ #include "talker_furniture.h" +#include +#include + #include "character.h" #include "computer.h" -#include "item.h" -#include "itype.h" -#include "magic.h" +#include "coordinates.h" +#include "map.h" #include "point.h" -#include "vehicle.h" std::string talker_furniture_const::disp_name() const { diff --git a/src/talker_furniture.h b/src/talker_furniture.h index 2f9176c970dae..89108a08fcc9c 100644 --- a/src/talker_furniture.h +++ b/src/talker_furniture.h @@ -2,13 +2,13 @@ #ifndef CATA_SRC_TALKER_FURNITURE_H #define CATA_SRC_TALKER_FURNITURE_H -#include +#include +#include #include "coords_fwd.h" #include "talker.h" class computer; -struct tripoint; /* * Talker wrapper class for furniture diff --git a/src/talker_item.cpp b/src/talker_item.cpp index 3ae0a9fca0789..b1b87e7e415b3 100644 --- a/src/talker_item.cpp +++ b/src/talker_item.cpp @@ -1,11 +1,20 @@ #include "talker_item.h" +#include +#include + +#include "bodypart.h" +#include "cata_utility.h" #include "character.h" +#include "coordinates.h" +#include "debug.h" #include "item.h" +#include "item_location.h" #include "itype.h" -#include "magic.h" +#include "map.h" +#include "messages.h" #include "point.h" -#include "vehicle.h" +#include "units.h" static const ammotype ammo_battery( "battery" ); diff --git a/src/talker_item.h b/src/talker_item.h index 7b0b55a8819a6..d0d9b2fe12689 100644 --- a/src/talker_item.h +++ b/src/talker_item.h @@ -2,15 +2,15 @@ #ifndef CATA_SRC_TALKER_ITEM_H #define CATA_SRC_TALKER_ITEM_H -#include +#include +#include #include "coords_fwd.h" #include "talker.h" #include "type_id.h" +#include "units_fwd.h" -class item; - -struct tripoint; +class item_location; /* * Talker wrapper class for item. diff --git a/src/talker_monster.cpp b/src/talker_monster.cpp index 06fed96897fa6..0955247190c24 100644 --- a/src/talker_monster.cpp +++ b/src/talker_monster.cpp @@ -1,15 +1,19 @@ #include "talker_monster.h" +#include +#include + #include "character.h" +#include "coordinates.h" +#include "creature.h" +#include "damage.h" +#include "debug.h" #include "effect.h" -#include "item.h" -#include "magic.h" +#include "messages.h" #include "monster.h" #include "mtype.h" #include "point.h" -#include "vehicle.h" - -class time_duration; +#include "units.h" std::string talker_monster_const::disp_name() const { diff --git a/src/talker_monster.h b/src/talker_monster.h index 6019e8c0fd3ee..dda544ad95c97 100644 --- a/src/talker_monster.h +++ b/src/talker_monster.h @@ -2,24 +2,15 @@ #ifndef CATA_SRC_TALKER_MONSTER_H #define CATA_SRC_TALKER_MONSTER_H -#include -#include +#include #include -#include +#include "bodypart.h" #include "coords_fwd.h" #include "monster.h" #include "talker.h" #include "type_id.h" -class faction; -class item; -class mission; -class npc; -class time_duration; -class vehicle; -struct tripoint; - /* * Talker wrapper class for monster. */ diff --git a/src/talker_npc.cpp b/src/talker_npc.cpp index 15e299051c4ce..48333300f4ffc 100644 --- a/src/talker_npc.cpp +++ b/src/talker_npc.cpp @@ -1,9 +1,12 @@ #include +#include #include +#include #include #include #include #include +#include #include "auto_pickup.h" #include "avatar.h" @@ -13,33 +16,35 @@ #include "coordinates.h" #include "debug.h" #include "dialogue_chatbin.h" +#include "faction.h" #include "game.h" #include "game_inventory.h" #include "item.h" #include "item_location.h" #include "itype.h" -#include "magic.h" #include "make_static.h" -#include "martialarts.h" +#include "memory_fast.h" #include "messages.h" #include "mission.h" #include "mission_companion.h" #include "mutation.h" #include "npc.h" +#include "npc_opinion.h" #include "npctalk.h" #include "npctrade.h" #include "output.h" #include "overmapbuffer.h" +#include "pimpl.h" #include "player_activity.h" -#include "proficiency.h" #include "ret_val.h" -#include "skill.h" #include "string_formatter.h" #include "talker.h" #include "talker_npc.h" +#include "translation.h" #include "translations.h" #include "units.h" #include "units_utility.h" +#include "value_ptr.h" static const efftype_id effect_lying_down( "lying_down" ); static const efftype_id effect_narcosis( "narcosis" ); diff --git a/src/talker_npc.h b/src/talker_npc.h index 78bf65f327382..df981f8cc1a93 100644 --- a/src/talker_npc.h +++ b/src/talker_npc.h @@ -2,18 +2,14 @@ #ifndef CATA_SRC_TALKER_NPC_H #define CATA_SRC_TALKER_NPC_H -#include +#include +#include -#include "faction.h" #include "npc.h" +#include "talker.h" #include "talker_character.h" #include "type_id.h" -class Character; -class item; -class mission; -class talker; - /* */ class talker_npc_const : public const_talker_cloner diff --git a/src/talker_topic.cpp b/src/talker_topic.cpp index 6afa56c0364a8..fa947cc6dea61 100644 --- a/src/talker_topic.cpp +++ b/src/talker_topic.cpp @@ -1,6 +1,5 @@ #include -#include "npc.h" #include "talker_topic.h" std::vector talker_topic_const::get_topics( bool ) const diff --git a/src/talker_topic.h b/src/talker_topic.h index 22fe6ba94832a..e0c2336cc1412 100644 --- a/src/talker_topic.h +++ b/src/talker_topic.h @@ -2,13 +2,13 @@ #ifndef CATA_SRC_TALKER_TOPIC_H #define CATA_SRC_TALKER_TOPIC_H +#include +#include #include #include #include "talker.h" -struct tripoint; - /* * Talker wrapper class for an empty talker thats just topics */ diff --git a/src/teleport.cpp b/src/teleport.cpp index aee47188bff4b..e805aca968731 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -2,9 +2,10 @@ #include #include -#include +#include +#include -#include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "character.h" #include "coordinates.h" @@ -18,13 +19,14 @@ #include "explosion.h" #include "game.h" #include "map.h" +#include "map_scale_constants.h" #include "messages.h" #include "point.h" #include "rng.h" #include "translations.h" #include "type_id.h" +#include "units.h" #include "viewer.h" -#include "map_iterator.h" static const efftype_id effect_teleglow( "teleglow" ); diff --git a/src/temp_crafting_inventory.cpp b/src/temp_crafting_inventory.cpp index c41f45d4b3984..088d1949e171f 100644 --- a/src/temp_crafting_inventory.cpp +++ b/src/temp_crafting_inventory.cpp @@ -1,6 +1,8 @@ #include "temp_crafting_inventory.h" +#include + temp_crafting_inventory::temp_crafting_inventory( const read_only_visitable &v ) { add_all_ref( v ); diff --git a/src/temp_crafting_inventory.h b/src/temp_crafting_inventory.h index 00b42e0f410a4..bb1e46105d4d3 100644 --- a/src/temp_crafting_inventory.h +++ b/src/temp_crafting_inventory.h @@ -3,7 +3,6 @@ #define CATA_SRC_TEMP_CRAFTING_INVENTORY_H #include -#include #include "colony.h" #include "item.h" diff --git a/src/test_data.cpp b/src/test_data.cpp index e9b884bb76fc0..bdbefd8aec4b8 100644 --- a/src/test_data.cpp +++ b/src/test_data.cpp @@ -1,6 +1,9 @@ #include "test_data.h" +#include + #include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" std::set test_data::legacy_to_hit; diff --git a/src/test_data.h b/src/test_data.h index 44364cf3bf344..c86b5a3f45626 100644 --- a/src/test_data.h +++ b/src/test_data.h @@ -2,18 +2,23 @@ #ifndef CATA_TEST_DATA_H #define CATA_TEST_DATA_H +#include #include #include #include +#include +#include +#include #include #include "coordinates.h" +#include "pocket_type.h" #include "point.h" #include "type_id.h" -#include "pocket_type.h" class Character; class JsonObject; +// IWYU pragma: no_forward_declare pocket_type struct efficiency_data { std::vector forward; diff --git a/src/text.cpp b/src/text.cpp index 3a1f35f32613e..0beb102a948ec 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -1,6 +1,10 @@ #define IMGUI_DEFINE_MATH_OPERATORS +#include +#include + #include "imgui/imgui.h" #include "imgui/imgui_internal.h" + #undef IMGUI_DEFINE_MATH_OPERATORS #include "color.h" diff --git a/src/text.h b/src/text.h index 7d9fcf3087939..75a07ee23e189 100644 --- a/src/text.h +++ b/src/text.h @@ -2,13 +2,14 @@ #ifndef CATA_SRC_TEXT_H #define CATA_SRC_TEXT_H -#include #include +#include #include #include +#include #include -#include "color.h" +class nc_color; // This is an experimental text API. Where possible, it is better to // use TextParagraph or TextColoredParagraph to wrap text rather than diff --git a/src/text_snippets.cpp b/src/text_snippets.cpp index 10a9eef1a4b4a..9f9c39262b3c3 100644 --- a/src/text_snippets.cpp +++ b/src/text_snippets.cpp @@ -1,14 +1,16 @@ #include "text_snippets.h" -#include #include -#include +#include +#include #include #include +#include "cata_utility.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" #include "path_info.h" #include "rng.h" diff --git a/src/text_snippets.h b/src/text_snippets.h index bec4ca2fa59e4..2cf2f16f3c0e4 100644 --- a/src/text_snippets.h +++ b/src/text_snippets.h @@ -2,20 +2,21 @@ #ifndef CATA_SRC_TEXT_SNIPPETS_H #define CATA_SRC_TEXT_SNIPPETS_H -#include +#include #include #include #include #include +#include #include -#include "translations.h" #include "dialogue.h" +#include "translation.h" #include "type_id.h" -class cata_path; class JsonArray; class JsonObject; +class cata_path; class snippet_library { diff --git a/src/text_style_check_reader.cpp b/src/text_style_check_reader.cpp index d6590ca5f7f22..9c80f953f8227 100644 --- a/src/text_style_check_reader.cpp +++ b/src/text_style_check_reader.cpp @@ -1,4 +1,14 @@ +#include +#include +#include + +#include "cached_options.h" +#include "catacharset.h" +#include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" +#include "json_error.h" #include "text_style_check.h" text_style_check_reader::text_style_check_reader( const allow_object object_allowed ) diff --git a/src/tgz_archiver.cpp b/src/tgz_archiver.cpp index 93a5392a27dc0..b396d190c1749 100644 --- a/src/tgz_archiver.cpp +++ b/src/tgz_archiver.cpp @@ -3,15 +3,16 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include "debug.h" -#include "filesystem.h" #include "zlib.h" tgz_archiver::~tgz_archiver() diff --git a/src/tgz_archiver.h b/src/tgz_archiver.h index 7cab43f604ba1..7f41cfb283dc1 100644 --- a/src/tgz_archiver.h +++ b/src/tgz_archiver.h @@ -3,11 +3,12 @@ #define CATA_SRC_MAP_TGZ_ARCHIVER_H #include #include +#include #include +#include #include #include -#include "filesystem.h" #include "zlib.h" class tgz_archiver diff --git a/src/tileray.cpp b/src/tileray.cpp index b88ce1e5f8a7a..40b0607973d2f 100644 --- a/src/tileray.cpp +++ b/src/tileray.cpp @@ -1,5 +1,6 @@ #include "tileray.h" +#include #include #include #include diff --git a/src/tileray.h b/src/tileray.h index 84eba74848e0c..578523f8e64e1 100644 --- a/src/tileray.h +++ b/src/tileray.h @@ -2,7 +2,7 @@ #ifndef CATA_SRC_TILERAY_H #define CATA_SRC_TILERAY_H -#include +#include #include "point.h" #include "units.h" diff --git a/src/timed_event.cpp b/src/timed_event.cpp index 65d1e8bb77a71..1d724c595a92b 100644 --- a/src/timed_event.cpp +++ b/src/timed_event.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -16,22 +15,22 @@ #include "event.h" #include "event_bus.h" #include "game.h" -#include "game_constants.h" -#include "line.h" #include "magic.h" #include "map.h" #include "map_extras.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapbuffer.h" -#include "mapdata.h" #include "mapgen_functions.h" +#include "mapgendata.h" +#include "mdarray.h" #include "memorial_logger.h" #include "messages.h" #include "monster.h" -#include "options.h" #include "rng.h" #include "sounds.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "type_id.h" diff --git a/src/timed_event.h b/src/timed_event.h index ab9c79be4dfec..c0edfba49da43 100644 --- a/src/timed_event.h +++ b/src/timed_event.h @@ -3,11 +3,16 @@ #define CATA_SRC_TIMED_EVENT_H #include +#include #include "calendar.h" -#include "coords_fwd.h" +#include "coordinates.h" +#include "point.h" #include "submap.h" +class JsonArray; +class JsonOut; + enum class timed_event_type : int { NONE, HELP, diff --git a/src/trade_ui.cpp b/src/trade_ui.cpp index 318c0a1372725..f819e3279b7cc 100644 --- a/src/trade_ui.cpp +++ b/src/trade_ui.cpp @@ -1,9 +1,13 @@ #include "trade_ui.h" +#include #include #include +#include +#include #include +#include #include "character.h" #include "clzones.h" @@ -12,12 +16,15 @@ #include "game_constants.h" #include "inventory_ui.h" #include "item.h" +#include "item_category.h" #include "npc.h" +#include "npc_opinion.h" #include "npctrade.h" #include "npctrade_utils.h" #include "options.h" #include "output.h" #include "point.h" +#include "ret_val.h" #include "string_formatter.h" #include "type_id.h" diff --git a/src/trade_ui.h b/src/trade_ui.h index d0ed9284a06fe..c7d60e8d66181 100644 --- a/src/trade_ui.h +++ b/src/trade_ui.h @@ -11,16 +11,20 @@ #include #include "character.h" +#include "coordinates.h" +#include "creature.h" #include "cursesdef.h" #include "input_context.h" #include "inventory_ui.h" #include "item_location.h" +#include "memory_fast.h" +#include "point.h" #include "translations.h" #include "ui_manager.h" +#include "units.h" class npc; class trade_ui; -struct point; class trade_selector : public inventory_drop_selector { diff --git a/src/trait_group.cpp b/src/trait_group.cpp index 17df989b0bb5a..910aa157c9288 100644 --- a/src/trait_group.cpp +++ b/src/trait_group.cpp @@ -4,12 +4,12 @@ #include #include #include -#include #include #include "cata_assert.h" #include "debug.h" -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "mutation.h" #include "rng.h" #include "string_formatter.h" diff --git a/src/trait_group.h b/src/trait_group.h index 7693e43404bdf..9d7bba79931a2 100644 --- a/src/trait_group.h +++ b/src/trait_group.h @@ -2,18 +2,17 @@ #ifndef CATA_SRC_TRAIT_GROUP_H #define CATA_SRC_TRAIT_GROUP_H -#include #include +#include #include +#include "mutation.h" #include "type_id.h" class JsonObject; class JsonValue; class Trait_group; -struct trait_and_var; - namespace trait_group { diff --git a/src/translation.cpp b/src/translation.cpp index 8ba2a2bca2183..7828f1e2ac6ab 100644 --- a/src/translation.cpp +++ b/src/translation.cpp @@ -1,13 +1,19 @@ #include "translation.h" +#include +#include #include +#include #include "cached_options.h" -#include "cata_utility.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" +#include "json_error.h" #include "localized_comparator.h" +#include "rng.h" +#include "translations.h" translation::translation( const plural_tag ) : raw_pl( cata::make_value() ) {} diff --git a/src/translation.h b/src/translation.h index 1101f66fc55c1..8167747f64f83 100644 --- a/src/translation.h +++ b/src/translation.h @@ -2,6 +2,7 @@ #ifndef CATA_SRC_TRANSLATION_H #define CATA_SRC_TRANSLATION_H +#include #include #include @@ -9,6 +10,7 @@ #include "value_ptr.h" class JsonObject; +class JsonOut; class JsonValue; /** diff --git a/src/translation_document.cpp b/src/translation_document.cpp index da8d489e6657d..60138a9b27bfb 100644 --- a/src/translation_document.cpp +++ b/src/translation_document.cpp @@ -1,7 +1,10 @@ #if defined(LOCALIZE) +#include +#include + #include "debug.h" -#include "filesystem.h" +#include "mmap_file.h" #include "string_formatter.h" #include "translation_document.h" #include "translation_plural_evaluator.h" diff --git a/src/translation_document.h b/src/translation_document.h index b0ef932749797..b0d2885dae820 100644 --- a/src/translation_document.h +++ b/src/translation_document.h @@ -2,6 +2,10 @@ #ifndef CATA_SRC_TRANSLATION_DOCUMENT_H #define CATA_SRC_TRANSLATION_DOCUMENT_H +#include +#include + +class mmap_file; #if defined(LOCALIZE) #include @@ -9,7 +13,6 @@ #include #include -#include "mmap_file.h" #include "translation_plural_evaluator.h" class InvalidTranslationDocumentException : public std::exception diff --git a/src/translation_gendered.cpp b/src/translation_gendered.cpp index 43247bd4dd383..f699d18e66999 100644 --- a/src/translation_gendered.cpp +++ b/src/translation_gendered.cpp @@ -1,8 +1,10 @@ +#include #include +#include #include +#include "cata_utility.h" #include "debug.h" -#include "output.h" #include "translation_gendered.h" #include "translations.h" diff --git a/src/translation_manager.cpp b/src/translation_manager.cpp index e17deb8585563..7280221553234 100644 --- a/src/translation_manager.cpp +++ b/src/translation_manager.cpp @@ -1,5 +1,13 @@ #if defined(LOCALIZE) +#include +#include +#include +#include +#include + +#include "pimpl.h" +#include "translation_manager.h" #include "translation_manager_impl.h" TranslationManager &TranslationManager::GetInstance() diff --git a/src/translation_manager.h b/src/translation_manager.h index 848f45b4e1f60..0fcceda353961 100644 --- a/src/translation_manager.h +++ b/src/translation_manager.h @@ -2,9 +2,10 @@ #ifndef CATA_SRC_TRANSLATION_MANAGER_H #define CATA_SRC_TRANSLATION_MANAGER_H +#include +#include #if defined(LOCALIZE) -#include #include #include @@ -14,6 +15,7 @@ class TranslationManager { private: class Impl; + pimpl impl; public: TranslationManager() = default; diff --git a/src/translation_manager_impl.cpp b/src/translation_manager_impl.cpp index b83de64bf05e6..e628f8a142963 100644 --- a/src/translation_manager_impl.cpp +++ b/src/translation_manager_impl.cpp @@ -1,13 +1,15 @@ #if defined(LOCALIZE) #include +#include +#include #include "cached_options.h" #include "debug.h" #include "filesystem.h" #include "path_info.h" -#include "translations.h" #include "translation_manager_impl.h" +#include "translations.h" std::uint32_t TranslationManager::Impl::Hash( const char *str ) { diff --git a/src/translation_manager_impl.h b/src/translation_manager_impl.h index ec2c4819c0d55..c783e018d2ecb 100644 --- a/src/translation_manager_impl.h +++ b/src/translation_manager_impl.h @@ -2,6 +2,13 @@ #ifndef CATA_SRC_TRANSLATION_MANAGER_IMPL_H #define CATA_SRC_TRANSLATION_MANAGER_IMPL_H +#include +#include +#include +#include +#include +#include +#include #if defined(LOCALIZE) #include diff --git a/src/translation_plural_evaluator.cpp b/src/translation_plural_evaluator.cpp index 96eb9a99fc958..29bb3e62fa2f0 100644 --- a/src/translation_plural_evaluator.cpp +++ b/src/translation_plural_evaluator.cpp @@ -1,9 +1,12 @@ #if defined(LOCALIZE) -#include +#include +#include #include #include -#include "enum_conversions.h" +#include + +#include "ret_val.h" #include "string_formatter.h" #include "translation_plural_evaluator.h" #include "try_parse_integer.h" diff --git a/src/translation_plural_evaluator.h b/src/translation_plural_evaluator.h index abafa3901304c..cef02cf7ee4db 100644 --- a/src/translation_plural_evaluator.h +++ b/src/translation_plural_evaluator.h @@ -2,6 +2,10 @@ #ifndef CATA_SRC_TRANSLATION_PLURAL_EVALUATOR_H #define CATA_SRC_TRANSLATION_PLURAL_EVALUATOR_H +#include +#include +#include +#include #if defined(LOCALIZE) #include diff --git a/src/translations.cpp b/src/translations.cpp index 84f1ec26860b4..eac4b21e9d9c6 100644 --- a/src/translations.cpp +++ b/src/translations.cpp @@ -1,12 +1,20 @@ +#include +#include +#include +#include #include +#include +#include #include "cata_utility.h" #include "debug.h" #include "get_version.h" #include "path_info.h" +#include "string_formatter.h" #include "text_snippets.h" -#include "translations.h" +#include "translation.h" #include "translation_gendered.h" +#include "translations.h" // int version/generation that is incremented each time language is changed // used to invalidate translation cache diff --git a/src/translations.h b/src/translations.h index eda68b6c38491..a480f949dae5b 100644 --- a/src/translations.h +++ b/src/translations.h @@ -2,11 +2,14 @@ #ifndef CATA_SRC_TRANSLATIONS_H #define CATA_SRC_TRANSLATIONS_H +#include // on some systems pulls in libintl.h anyway, // so preemptively include it before the gettext overrides. #include // IWYU pragma: keep +#include -#include "translation.h" +#include "translation.h" // IWYU pragma: keep +#include "translation_manager.h" #if !defined(translate_marker) /** diff --git a/src/trap.cpp b/src/trap.cpp index 16a05939d16de..0da2970dcde61 100644 --- a/src/trap.cpp +++ b/src/trap.cpp @@ -1,26 +1,29 @@ #include "trap.h" -#include #include -#include +#include #include #include "assign.h" +#include "bodypart.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "debug.h" +#include "effect_on_condition.h" #include "event.h" #include "event_bus.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" -#include "json.h" -#include "line.h" #include "map.h" #include "map_iterator.h" #include "messages.h" #include "point.h" #include "rng.h" #include "string_formatter.h" +#include "translations.h" static const flag_id json_flag_ECHOLOCATION_DETECTABLE( "ECHOLOCATION_DETECTABLE" ); static const flag_id json_flag_SONAR_DETECTABLE( "SONAR_DETECTABLE" ); diff --git a/src/trap.h b/src/trap.h index 4fcdc5e057385..749eed47688df 100644 --- a/src/trap.h +++ b/src/trap.h @@ -4,27 +4,26 @@ #include #include -#include +#include #include +#include #include #include #include #include "color.h" #include "coords_fwd.h" -#include "effect_on_condition.h" #include "flat_set.h" +#include "item.h" #include "magic.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" class Character; class Creature; class JsonObject; -class item; class map; -struct tripoint; namespace trapfunc { diff --git a/src/trapfunc.cpp b/src/trapfunc.cpp index c409a6a6b27de..cb01ea9765152 100644 --- a/src/trapfunc.cpp +++ b/src/trapfunc.cpp @@ -1,41 +1,44 @@ #include "trap.h" // IWYU pragma: associated #include +#include #include #include #include #include -#include "avatar.h" #include "bodypart.h" #include "calendar.h" -#include "cata_assert.h" #include "character.h" -#include "colony.h" +#include "condition.h" #include "coordinates.h" #include "creature.h" -#include "creature_tracker.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" +#include "effect_on_condition.h" #include "enums.h" #include "explosion.h" #include "game.h" -#include "game_constants.h" +#include "global_vars.h" #include "item.h" -#include "make_static.h" #include "map.h" #include "map_iterator.h" -#include "mapdata.h" +#include "map_scale_constants.h" #include "mapgen_functions.h" +#include "mapgendata.h" #include "messages.h" #include "monster.h" #include "mtype.h" #include "npc.h" #include "output.h" #include "point.h" +#include "ranged.h" +#include "ret_val.h" #include "rng.h" #include "sounds.h" -#include "teleport.h" +#include "string_formatter.h" +#include "talker.h" #include "timed_event.h" #include "translations.h" #include "units.h" diff --git a/src/try_parse_integer.cpp b/src/try_parse_integer.cpp index cad3ce77b6d5d..9cf288f62ecaa 100644 --- a/src/try_parse_integer.cpp +++ b/src/try_parse_integer.cpp @@ -1,7 +1,10 @@ #include "try_parse_integer.h" +#include #include +#include +#include "string_formatter.h" #include "translations.h" template diff --git a/src/try_parse_integer.h b/src/try_parse_integer.h index 9517cb61b6e56..091ba2b528c8a 100644 --- a/src/try_parse_integer.h +++ b/src/try_parse_integer.h @@ -2,6 +2,8 @@ #ifndef CATA_SRC_TRY_PARSE_INTEGER_H #define CATA_SRC_TRY_PARSE_INTEGER_H +#include + #include "ret_val.h" /** diff --git a/src/turret.cpp b/src/turret.cpp index 4dddc032b5816..c9e1b97748f80 100644 --- a/src/turret.cpp +++ b/src/turret.cpp @@ -1,5 +1,6 @@ #include "vehicle.h" // IWYU pragma: associated +#include #include #include #include @@ -11,9 +12,12 @@ #include "enums.h" #include "gun_mode.h" #include "item.h" +#include "item_contents.h" +#include "item_pocket.h" #include "itype.h" #include "messages.h" #include "npc.h" +#include "pocket_type.h" #include "projectile.h" #include "ranged.h" #include "string_formatter.h" diff --git a/src/type_id.h b/src/type_id.h index e765a5655a1f1..cdae496ef79a6 100644 --- a/src/type_id.h +++ b/src/type_id.h @@ -23,6 +23,9 @@ struct ammo_effect; using ammo_effect_id = int_id; using ammo_effect_str_id = string_id; +class anatomy; +using anatomy_id = string_id; + struct attack_vector; using attack_vector_id = string_id; @@ -273,6 +276,10 @@ using proficiency_category_id = string_id; class proficiency; using proficiency_id = string_id; +class relic_procgen_data; +using relic_procgen_id = string_id; + + struct ter_t; using ter_id = int_id; using ter_str_id = string_id; diff --git a/src/ui.cpp b/src/ui.cpp index 612342c27b50e..1493272779240 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1,33 +1,33 @@ #include "ui.h" -#include #include #include -#include -#include +#include #include +#include #include +#include #include "avatar.h" #include "cached_options.h" // IWYU pragma: keep #include "cata_assert.h" +#include "cata_imgui.h" #include "cata_utility.h" #include "catacharset.h" +#include "coordinates.h" #include "game.h" +#include "imgui/imgui.h" +#include "imgui/imgui_internal.h" #include "input.h" +#include "input_popup.h" #include "memory_fast.h" #include "output.h" -#include "sdltiles.h" -#include "input_popup.h" -#include "translations.h" +#include "point.h" #include "ui_manager.h" -#include "cata_imgui.h" -#include "imgui/imgui.h" -#include "imgui/imgui_internal.h" #if defined(__ANDROID__) -#include #include +#include #include "options.h" #endif diff --git a/src/ui.h b/src/ui.h index 817b3bb0c6d54..67e7d34caad3c 100644 --- a/src/ui.h +++ b/src/ui.h @@ -2,6 +2,8 @@ #ifndef CATA_SRC_UI_H #define CATA_SRC_UI_H +#include +#include #include #include #include @@ -15,20 +17,20 @@ #include "cata_assert.h" #include "cata_imgui.h" #include "color.h" -#include "cuboid_rectangle.h" +#include "coords_fwd.h" #include "cursesdef.h" +#include "input_enums.h" +#include "translation.h" + #define IMGUI_DEFINE_MATH_OPERATORS #include "imgui/imgui.h" + #undef IMGUI_DEFINE_MATH_OPERATORS #include "input_context.h" #include "memory_fast.h" #include "pimpl.h" -#include "point.h" #include "string_formatter.h" -class scrollbar; -class translation; - //////////////////////////////////////////////////////////////////////////////////// /** * uilist constants diff --git a/src/ui_extended_description.cpp b/src/ui_extended_description.cpp index ee1d7a26ab3bc..2745eb5732e2e 100644 --- a/src/ui_extended_description.cpp +++ b/src/ui_extended_description.cpp @@ -1,12 +1,20 @@ #include "ui_extended_description.h" +#include + #include "character.h" +#include "color.h" +#include "creature.h" #include "creature_tracker.h" -#include "faction.h" #include "map.h" +#include "mapdata.h" +#include "point.h" +#include "string_formatter.h" +#include "translations.h" +#include "type_id.h" #include "ui_manager.h" -#include "vehicle.h" -#include "veh_type.h" +#include "viewer.h" +#include "vpart_position.h" static const trait_id trait_ILLITERATE( "ILLITERATE" ); diff --git a/src/ui_extended_description.h b/src/ui_extended_description.h index 99c1b5001f028..1adaf14352826 100644 --- a/src/ui_extended_description.h +++ b/src/ui_extended_description.h @@ -2,10 +2,13 @@ #ifndef CATA_SRC_UI_EXTENDED_DESCRIPTION_H #define CATA_SRC_UI_EXTENDED_DESCRIPTION_H +#include +#include +#include + #include "cata_imgui.h" #include "coordinates.h" #include "input_context.h" -#include "imgui/imgui.h" #include "output.h" enum class description_target : int { diff --git a/src/ui_iteminfo.cpp b/src/ui_iteminfo.cpp index 17cfcd26336a8..8c4c0cad2b3f2 100644 --- a/src/ui_iteminfo.cpp +++ b/src/ui_iteminfo.cpp @@ -1,8 +1,13 @@ #include "ui_iteminfo.h" -#include "messages.h" +#include +#include +#include + +#include "color.h" +#include "input_enums.h" +#include "translations.h" #include "ui_manager.h" -#include "imgui/imgui_internal.h" iteminfo_window::iteminfo_window( item_info_data &info, point pos, int width, int height, diff --git a/src/ui_iteminfo.h b/src/ui_iteminfo.h index f61bf0c9b5990..9f5603b0a1973 100644 --- a/src/ui_iteminfo.h +++ b/src/ui_iteminfo.h @@ -3,9 +3,10 @@ #define CATA_SRC_UI_ITEMINFO_H #include "cata_imgui.h" +#include "imgui/imgui.h" #include "input_context.h" #include "output.h" -#include "imgui/imgui.h" +#include "point.h" class iteminfo_window : public cataimgui::window { diff --git a/src/ui_manager.cpp b/src/ui_manager.cpp index 7607f42955d36..ca020d5a7b116 100644 --- a/src/ui_manager.cpp +++ b/src/ui_manager.cpp @@ -1,19 +1,22 @@ #include "ui_manager.h" #include -#include #include +#include +#include #include #include "cached_options.h" #include "cata_assert.h" +#include "cata_imgui.h" #include "cata_scope_helpers.h" -#include "cata_utility.h" #include "cursesdef.h" -#include "game_ui.h" #include "point.h" #include "sdltiles.h" // IWYU pragma: keep -#include "cata_imgui.h" + +#if defined(TILES) +#include "sdl_wrappers.h" +#endif #if defined(EMSCRIPTEN) #include diff --git a/src/ui_manager.h b/src/ui_manager.h index 1623dd5ee4b61..feca1e2e71043 100644 --- a/src/ui_manager.h +++ b/src/ui_manager.h @@ -3,6 +3,7 @@ #define CATA_SRC_UI_MANAGER_H #include +#include #include "cuboid_rectangle.h" #include "point.h" diff --git a/src/unicode.cpp b/src/unicode.cpp index 7e3679158a11f..45d22466d5e1e 100644 --- a/src/unicode.cpp +++ b/src/unicode.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include // https://en.wikipedia.org/wiki/Unicode_block diff --git a/src/units.cpp b/src/units.cpp index bb2451460907d..6600202a590f8 100644 --- a/src/units.cpp +++ b/src/units.cpp @@ -1,9 +1,11 @@ #include "units.h" +#include + #include "calendar.h" #include "json.h" #include "string_formatter.h" -#include "units_utility.h" +#include "translations.h" namespace units { diff --git a/src/units.h b/src/units.h index 7d0247e7cd205..237061cad709e 100644 --- a/src/units.h +++ b/src/units.h @@ -3,20 +3,21 @@ #define CATA_SRC_UNITS_H #include -#include #include -#include +#include #include #include #include #include +#include #include #include #include +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "json.h" #include "math_defines.h" -#include "translations.h" #include "units_fwd.h" // IWYU pragma: export class time_duration; diff --git a/src/units_utility.h b/src/units_utility.h index f30764343257f..e3447a4b99b46 100644 --- a/src/units_utility.h +++ b/src/units_utility.h @@ -1,7 +1,8 @@ #pragma once #include -#include +#include #include +#include #ifndef CATA_SRC_UNITS_UTILITY_H #define CATA_SRC_UNITS_UTILITY_H diff --git a/src/veh_appliance.cpp b/src/veh_appliance.cpp index fd1f2a72aab25..6db1984cb6167 100644 --- a/src/veh_appliance.cpp +++ b/src/veh_appliance.cpp @@ -1,17 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "cached_options.h" +#include "calendar.h" +#include "cata_imgui.h" +#include "cata_utility.h" +#include "character.h" +#include "color.h" +#include "debug.h" +#include "enums.h" #include "game.h" #include "handle_liquid.h" -#include "imgui/imgui.h" +#include "input_enums.h" #include "inventory.h" +#include "item_location.h" #include "itype.h" +#include "iuse.h" +#include "map.h" #include "map_iterator.h" -#include "action.h" #include "messages.h" #include "output.h" #include "overmapbuffer.h" #include "player_activity.h" -#include "skill.h" +#include "requirements.h" +#include "ret_val.h" +#include "string_formatter.h" #include "string_input_popup.h" +#include "translations.h" #include "ui.h" #include "ui_manager.h" #include "units.h" @@ -20,8 +42,11 @@ #include "veh_type.h" #include "veh_utils.h" #include "vehicle.h" +#include "vpart_position.h" #include "vpart_range.h" +class uilist_impl; + static const activity_id ACT_VEHICLE( "ACT_VEHICLE" ); static const itype_id fuel_type_battery( "battery" ); diff --git a/src/veh_appliance.h b/src/veh_appliance.h index e456ade5aac90..f672490592a26 100644 --- a/src/veh_appliance.h +++ b/src/veh_appliance.h @@ -2,12 +2,23 @@ #ifndef CATA_SRC_VEH_APPLIANCE_H #define CATA_SRC_VEH_APPLIANCE_H +#include +#include +#include + #include "coordinates.h" +#include "cursesdef.h" #include "input_context.h" +#include "item.h" +#include "memory_fast.h" #include "player_activity.h" +#include "point.h" +#include "type_id.h" +#include "ui.h" +#include "ui_manager.h" +class Character; class vehicle; -class ui_adaptor; vpart_id vpart_appliance_from_item( const itype_id &item_id ); bool place_appliance( const tripoint_bub_ms &p, const vpart_id &vpart, diff --git a/src/veh_interact.cpp b/src/veh_interact.cpp index 9c7bf9f55cd71..49931d4ab52cb 100644 --- a/src/veh_interact.cpp +++ b/src/veh_interact.cpp @@ -5,22 +5,19 @@ #include #include #include -#include +#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include "activity_handlers.h" -#include "activity_type.h" #include "avatar.h" #include "calendar.h" #include "cata_scope_helpers.h" @@ -28,8 +25,6 @@ #include "catacharset.h" #include "character.h" #include "character_id.h" -#include "clzones.h" -#include "colony.h" #include "contents_change_handler.h" #include "creature_tracker.h" #include "debug.h" @@ -40,6 +35,7 @@ #include "game.h" #include "game_constants.h" #include "handle_liquid.h" +#include "inventory.h" #include "item.h" #include "item_group.h" #include "itype.h" @@ -56,19 +52,23 @@ #include "overmapbuffer.h" #include "pimpl.h" #include "point.h" +#include "proficiency.h" #include "requirements.h" +#include "ret_val.h" +#include "rng.h" #include "skill.h" #include "string_formatter.h" #include "string_input_popup.h" #include "tileray.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" #include "units.h" #include "units_utility.h" #include "value_ptr.h" -#include "veh_type.h" #include "veh_shape.h" +#include "veh_type.h" #include "veh_utils.h" #include "vehicle.h" #include "vehicle_selector.h" diff --git a/src/veh_interact.h b/src/veh_interact.h index 1ab0200241774..229b58af09a6d 100644 --- a/src/veh_interact.h +++ b/src/veh_interact.h @@ -15,14 +15,19 @@ #include "coordinates.h" #include "cursesdef.h" #include "input_context.h" +#include "input_enums.h" #include "item_location.h" #include "mapdata.h" +#include "memory_fast.h" #include "player_activity.h" +#include "point.h" #include "type_id.h" -#include "units_fwd.h" +#include "units.h" +#include "vpart_position.h" class Character; class inventory; +class time_duration; class vpart_info; struct requirement_data; diff --git a/src/veh_shape.cpp b/src/veh_shape.cpp index c4335fddeec2a..4add8a161b90d 100644 --- a/src/veh_shape.cpp +++ b/src/veh_shape.cpp @@ -1,15 +1,33 @@ #include "veh_shape.h" -#include "animation.h" +#include +#include +#include +#include + #include "avatar.h" #include "cached_options.h" +#include "cata_scope_helpers.h" +#include "color.h" +#include "debug.h" #include "game.h" +#include "input_enums.h" +#include "map.h" +#include "map_scale_constants.h" +#include "memory_fast.h" #include "options.h" #include "output.h" #include "player_activity.h" +#include "point.h" +#include "ret_val.h" +#include "translations.h" +#include "ui.h" +#include "ui_manager.h" +#include "units.h" #include "veh_type.h" #include "veh_utils.h" -#include "ui_manager.h" +#include "vehicle.h" +#include "vpart_range.h" veh_shape::veh_shape( vehicle &vehicle ): veh( vehicle ) { } diff --git a/src/veh_shape.h b/src/veh_shape.h index fb59115f1eb8b..838c55f3bd04d 100644 --- a/src/veh_shape.h +++ b/src/veh_shape.h @@ -2,9 +2,19 @@ #ifndef CATA_SRC_VEH_SHAPE_H #define CATA_SRC_VEH_SHAPE_H -#include "vehicle.h" +#include +#include +#include +#include +#include + +#include "coordinates.h" +#include "input_context.h" +#include "vpart_position.h" class player_activity; +class vehicle; +template class ret_val; class veh_shape { diff --git a/src/veh_type.cpp b/src/veh_type.cpp index 50121f18578c2..02ab47dacd3d9 100644 --- a/src/veh_type.cpp +++ b/src/veh_type.cpp @@ -1,28 +1,35 @@ #include "veh_type.h" #include +#include #include -#include +#include +#include #include #include -#include -#include #include #include #include "ammo.h" #include "assign.h" #include "cata_assert.h" +#include "catacharset.h" #include "character.h" +#include "clzones.h" #include "color.h" +#include "damage.h" #include "debug.h" +#include "enums.h" #include "flag.h" +#include "flat_set.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" -#include "init.h" #include "item.h" #include "item_factory.h" #include "item_group.h" +#include "item_pocket.h" #include "itype.h" #include "json.h" #include "output.h" @@ -36,10 +43,10 @@ #include "value_ptr.h" #include "vehicle.h" #include "vehicle_group.h" +#include "vpart_position.h" +#include "vpart_range.h" #include "wcwidth.h" -class npc; - namespace { generic_factory vehicle_prototype_factory( "vehicle", "id" ); diff --git a/src/veh_type.h b/src/veh_type.h index e471eaaefca71..e7c0e19a973e5 100644 --- a/src/veh_type.h +++ b/src/veh_type.h @@ -2,33 +2,34 @@ #ifndef CATA_SRC_VEH_TYPE_H #define CATA_SRC_VEH_TYPE_H -#include #include #include -#include #include #include -#include #include #include #include +#include +#include #include #include #include "calendar.h" #include "color.h" -#include "compatibility.h" #include "coordinates.h" -#include "damage.h" +#include "memory_fast.h" +#include "point.h" #include "requirements.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" #include "units.h" -class JsonObject; class Character; +class JsonObject; +class JsonOut; class vehicle; - +class vpart_info; +struct vehicle_prototype; template class generic_factory; namespace vehicles diff --git a/src/veh_utils.cpp b/src/veh_utils.cpp index 349bb013940df..20c7c642dc543 100644 --- a/src/veh_utils.cpp +++ b/src/veh_utils.cpp @@ -1,29 +1,36 @@ #include "veh_utils.h" #include +#include #include #include #include #include +#include #include #include #include "avatar.h" #include "calendar.h" +#include "cata_imgui.h" #include "character.h" -#include "craft_command.h" +#include "coordinates.h" +#include "debug.h" #include "enums.h" #include "game.h" #include "game_constants.h" #include "input_context.h" +#include "input_enums.h" #include "inventory.h" #include "item.h" #include "map.h" +#include "memory_fast.h" #include "point.h" #include "requirements.h" +#include "translation.h" #include "translations.h" #include "ui.h" -#include "units_fwd.h" +#include "units.h" #include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/src/veh_utils.h b/src/veh_utils.h index b83500643261f..8e0653dd12153 100644 --- a/src/veh_utils.h +++ b/src/veh_utils.h @@ -2,11 +2,14 @@ #ifndef CATA_SRC_VEH_UTILS_H #define CATA_SRC_VEH_UTILS_H +#include +#include #include +#include #include -#include "point.h" #include "color.h" +#include "point.h" #include "type_id.h" class Character; diff --git a/src/vehicle.cpp b/src/vehicle.cpp index cca1365cc0287..d73d0b78325bc 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -20,7 +20,6 @@ #include #include "activity_handlers.h" -#include "activity_type.h" #include "avatar.h" #include "bionics.h" #include "cata_assert.h" @@ -33,6 +32,7 @@ #include "creature.h" #include "creature_tracker.h" #include "cuboid_rectangle.h" +#include "damage.h" #include "debug.h" #include "enum_traits.h" #include "enums.h" @@ -42,15 +42,20 @@ #include "faction.h" #include "field_type.h" #include "flag.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" +#include "game_constants.h" #include "item.h" #include "item_group.h" #include "itype.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapbuffer.h" #include "mapdata.h" #include "material.h" @@ -62,15 +67,18 @@ #include "npc.h" #include "options.h" #include "output.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" #include "pocket_type.h" +#include "proficiency.h" #include "ret_val.h" #include "rng.h" #include "sounds.h" #include "string_formatter.h" #include "submap.h" +#include "translation.h" #include "translations.h" #include "units_utility.h" #include "value_ptr.h" @@ -80,6 +88,8 @@ #include "weather_gen.h" #include "weather_type.h" +class Skill; + /* * Speed up all those if ( blarg == "structure" ) statements that are used everywhere; * assemble "structure" once here instead of repeatedly later. diff --git a/src/vehicle.h b/src/vehicle.h index 1e005e558a163..a606f03a0dc08 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -2,32 +2,35 @@ #ifndef CATA_SRC_VEHICLE_H #define CATA_SRC_VEHICLE_H +#include #include #include -#include #include -#include #include #include -#include +#include #include #include #include #include +#include #include #include +#include #include #include #include "active_item_cache.h" #include "calendar.h" #include "cata_bitset.h" +#include "cata_utility.h" #include "character_id.h" #include "clzones.h" #include "colony.h" -#include "coords_fwd.h" -#include "damage.h" -#include "game_constants.h" +#include "color.h" +#include "coordinates.h" +#include "debug.h" +#include "enums.h" #include "item.h" #include "item_group.h" #include "item_location.h" @@ -35,36 +38,31 @@ #include "line.h" #include "map.h" #include "point.h" +#include "ret_val.h" +#include "safe_reference.h" #include "tileray.h" #include "type_id.h" #include "units.h" +#include "vpart_position.h" #include "vpart_range.h" class Character; class Creature; +class JsonArray; class JsonObject; class JsonOut; -class map; class monster; -class nc_color; class npc; -class vehicle; -class vehicle_part_range; class veh_menu; +class vehicle; class vpart_info; -class vpart_position; class vpart_variant; -class zone_data; -struct input_event; +enum class ter_furn_flag : int; +enum vpart_bitflags : int; struct itype; -struct uilist_entry; +struct vehicle_part; template struct enum_traits; -enum vpart_bitflags : int; -enum class ter_furn_flag : int; -template -class vehicle_part_with_feature_range; - void handbrake(); void practice_athletic_proficiency( Character &p ); @@ -2322,6 +2320,7 @@ class vehicle tripoint_abs_ms autodrive_local_target = tripoint_abs_ms::zero; // current node the autopilot is aiming for class autodrive_controller; + std::shared_ptr active_autodrive_controller; // NOLINT(cata-serialize) public: diff --git a/src/vehicle_autodrive.cpp b/src/vehicle_autodrive.cpp index 7ca3de4de4d17..ed744262fa5d2 100644 --- a/src/vehicle_autodrive.cpp +++ b/src/vehicle_autodrive.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -28,8 +29,9 @@ #include "map.h" #include "map_iterator.h" #include "map_memory.h" +#include "map_scale_constants.h" #include "mapdata.h" -#include "messages.h" +#include "mdarray.h" #include "point.h" #include "tileray.h" #include "translations.h" diff --git a/src/vehicle_group.cpp b/src/vehicle_group.cpp index 0f2c601966db0..71827f6cf33a6 100644 --- a/src/vehicle_group.cpp +++ b/src/vehicle_group.cpp @@ -1,20 +1,19 @@ #include "vehicle_group.h" -#include -#include #include -#include +#include #include +#include #include +#include "coordinates.h" #include "debug.h" -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "map.h" #include "memory_fast.h" #include "point.h" -#include "translations.h" #include "units.h" -#include "vehicle.h" #include "vpart_position.h" using vplacement_id = string_id; diff --git a/src/vehicle_group.h b/src/vehicle_group.h index f872c8fb589d2..39f756056b0ce 100644 --- a/src/vehicle_group.h +++ b/src/vehicle_group.h @@ -2,8 +2,9 @@ #ifndef CATA_SRC_VEHICLE_GROUP_H #define CATA_SRC_VEHICLE_GROUP_H -#include #include +#include +#include #include #include @@ -12,7 +13,7 @@ #include "memory_fast.h" #include "rng.h" #include "type_id.h" -#include "units_fwd.h" +#include "units.h" #include "weighted_list.h" class JsonObject; @@ -21,7 +22,6 @@ class VehicleSpawn; class map; using vspawn_id = string_id; -struct point; extern std::unordered_map vgroups; diff --git a/src/vehicle_move.cpp b/src/vehicle_move.cpp index 781481207dbb1..d53e522610733 100644 --- a/src/vehicle_move.cpp +++ b/src/vehicle_move.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,14 +11,15 @@ #include #include -#include "avatar.h" #include "bodypart.h" #include "cata_assert.h" #include "cata_utility.h" #include "character.h" #include "creature.h" #include "creature_tracker.h" +#include "damage.h" #include "debug.h" +#include "effect_source.h" #include "enums.h" #include "explosion.h" #include "field.h" @@ -26,6 +28,7 @@ #include "itype.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "material.h" #include "messages.h" diff --git a/src/vehicle_part.cpp b/src/vehicle_part.cpp index 6f6a211bc9b1a..fe15e31ff6bbc 100644 --- a/src/vehicle_part.cpp +++ b/src/vehicle_part.cpp @@ -1,15 +1,12 @@ #include "vehicle.h" // IWYU pragma: associated #include -#include #include #include #include #include "ammo.h" -#include "cata_assert.h" #include "character.h" -#include "color.h" #include "debug.h" #include "enums.h" #include "fault.h" @@ -17,18 +14,16 @@ #include "game.h" #include "item.h" #include "itype.h" -#include "iuse_actor.h" #include "map.h" #include "messages.h" #include "npc.h" #include "pocket_type.h" -#include "ret_val.h" +#include "requirements.h" #include "string_formatter.h" #include "translations.h" #include "units.h" #include "value_ptr.h" #include "veh_type.h" -#include "vpart_position.h" #include "weather.h" static const ammotype ammo_battery( "battery" ); diff --git a/src/vehicle_selector.cpp b/src/vehicle_selector.cpp index 16bbda88a6cc1..cbf054649b276 100644 --- a/src/vehicle_selector.cpp +++ b/src/vehicle_selector.cpp @@ -2,8 +2,8 @@ #include +#include "coordinates.h" #include "map.h" -#include "point.h" #include "vpart_position.h" vehicle_selector::vehicle_selector( const tripoint_bub_ms &pos, int radius, bool accessible, diff --git a/src/vehicle_selector.h b/src/vehicle_selector.h index 49cf3f7c59728..d091c9d0b0089 100644 --- a/src/vehicle_selector.h +++ b/src/vehicle_selector.h @@ -4,17 +4,13 @@ #include #include -#include -#include #include #include "coords_fwd.h" #include "type_id.h" #include "visitable.h" -class item; class vehicle; -struct tripoint; class vehicle_cursor : public visitable { diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp index 03d7ad175172e..0870df52703b7 100644 --- a/src/vehicle_use.cpp +++ b/src/vehicle_use.cpp @@ -12,7 +12,6 @@ #include "action.h" #include "activity_actor_definitions.h" #include "activity_handlers.h" -#include "activity_type.h" #include "avatar.h" #include "character.h" #include "clzones.h" @@ -22,16 +21,18 @@ #include "debug.h" #include "enums.h" #include "game.h" +#include "game_inventory.h" #include "gates.h" +#include "handle_liquid.h" #include "iexamine.h" #include "inventory.h" #include "item.h" #include "itype.h" #include "iuse.h" -#include "game_inventory.h" #include "make_static.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapdata.h" #include "messages.h" #include "monster.h" diff --git a/src/visitable.cpp b/src/visitable.cpp index d45175a7fae11..88e92d2bc893e 100644 --- a/src/visitable.cpp +++ b/src/visitable.cpp @@ -2,37 +2,37 @@ #include #include -#include #include #include #include #include -#include #include #include "active_item_cache.h" #include "bionics.h" #include "character.h" +#include "character_attire.h" #include "colony.h" +#include "coordinates.h" #include "debug.h" #include "flag.h" #include "inventory.h" #include "item.h" #include "item_contents.h" #include "item_pocket.h" +#include "itype.h" #include "make_static.h" #include "map.h" #include "map_selector.h" -#include "memory_fast.h" -#include "monster.h" -#include "mtype.h" +#include "mapdata.h" #include "mutation.h" #include "pimpl.h" +#include "pocket_type.h" #include "point.h" +#include "stomach.h" #include "submap.h" #include "temp_crafting_inventory.h" #include "units.h" -#include "value_ptr.h" #include "veh_type.h" #include "vehicle.h" #include "vehicle_selector.h" diff --git a/src/visitable.h b/src/visitable.h index 044f3de548d1b..5b13914fd374e 100644 --- a/src/visitable.h +++ b/src/visitable.h @@ -5,13 +5,14 @@ #include #include #include +#include #include #include "cata_utility.h" #include "type_id.h" -class item; class Character; +class item; enum class VisitResponse : int { ABORT, // Stop processing after this node diff --git a/src/vitamin.cpp b/src/vitamin.cpp index 65921e388c4b3..1871275589ab2 100644 --- a/src/vitamin.cpp +++ b/src/vitamin.cpp @@ -1,13 +1,12 @@ #include "vitamin.h" -#include #include -#include "assign.h" #include "calendar.h" #include "debug.h" #include "enum_conversions.h" -#include "json.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "options.h" #include "units.h" #include "units_utility.h" diff --git a/src/vitamin.h b/src/vitamin.h index b0f505e99196d..d58cd9e9dabe9 100644 --- a/src/vitamin.h +++ b/src/vitamin.h @@ -2,8 +2,8 @@ #ifndef CATA_SRC_VITAMIN_H #define CATA_SRC_VITAMIN_H -#include #include +#include #include #include #include @@ -11,9 +11,8 @@ #include "calendar.h" #include "stomach.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" -#include "units.h" class JsonObject; template struct enum_traits; diff --git a/src/vpart_position.h b/src/vpart_position.h index e6b5e4f255408..44be73c87f6d1 100644 --- a/src/vpart_position.h +++ b/src/vpart_position.h @@ -2,29 +2,25 @@ #ifndef CATA_SRC_VPART_POSITION_H #define CATA_SRC_VPART_POSITION_H -#include #include -#include -#include +#include #include +#include #include -#include #include +#include "coords_fwd.h" +#include "item.h" #include "type_id.h" -struct input_event; -class inventory; class Character; +class inventory; class vehicle; class vehicle_stack; class vpart_info; -struct vehicle_part; - -enum vpart_bitflags : int; class vpart_reference; -struct point; -struct tripoint; +enum vpart_bitflags : int; +struct vehicle_part; /** * Reference to a position (a point) of the @ref vehicle. diff --git a/src/vpart_range.h b/src/vpart_range.h index 1fb7af0d787af..7750b7d6593c1 100644 --- a/src/vpart_range.h +++ b/src/vpart_range.h @@ -2,17 +2,15 @@ #ifndef CATA_SRC_VPART_RANGE_H #define CATA_SRC_VPART_RANGE_H -#include #include #include -#include #include #include +#include -#include "cata_assert.h" -#include "vehicle.h" #include "vpart_position.h" +class vehicle; enum class part_status_flag : int; /** diff --git a/src/weakpoint.cpp b/src/weakpoint.cpp index 464ced6021522..69bdd93165118 100644 --- a/src/weakpoint.cpp +++ b/src/weakpoint.cpp @@ -2,25 +2,35 @@ #include #include +#include +#include #include #include #include "assign.h" #include "calendar.h" #include "character.h" +#include "condition.h" #include "creature.h" #include "damage.h" #include "debug.h" +#include "dialogue.h" #include "effect_on_condition.h" #include "effect_source.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" #include "item.h" +#include "magic_enchantment.h" #include "make_static.h" #include "messages.h" #include "monster.h" #include "mtype.h" +#include "pimpl.h" +#include "proficiency.h" #include "rng.h" +#include "talker.h" #include "translations.h" static const limb_score_id limb_score_reaction( "reaction" ); @@ -31,9 +41,6 @@ static const skill_id skill_melee( "melee" ); static const skill_id skill_throw( "throw" ); static const skill_id skill_unarmed( "unarmed" ); -class JsonArray; -class JsonObject; - namespace { diff --git a/src/weakpoint.h b/src/weakpoint.h index bbbcd7eef159f..ff9525331d1f8 100644 --- a/src/weakpoint.h +++ b/src/weakpoint.h @@ -3,15 +3,14 @@ #define CATA_SRC_WEAKPOINT_H #include -#include -#include +#include #include #include +#include +#include #include #include -#include "condition.h" -#include "damage.h" #include "translation.h" #include "type_id.h" @@ -20,6 +19,11 @@ class Creature; class JsonArray; class JsonObject; class JsonValue; +class item; +class time_duration; +struct const_dialogue; +struct damage_instance; +struct resistances; // Information about an attack on a weak point. struct weakpoint_attack { diff --git a/src/weather.cpp b/src/weather.cpp index 9b5123607ed9d..6aecd597e8937 100644 --- a/src/weather.cpp +++ b/src/weather.cpp @@ -4,18 +4,18 @@ #include #include #include +#include +#include #include -#include #include #include -#include "activity_type.h" +#include "body_part_set.h" #include "bodypart.h" #include "calendar.h" -#include "cata_utility.h" #include "character.h" +#include "character_attire.h" #include "city.h" -#include "colony.h" #include "coordinates.h" #include "creature.h" #include "debug.h" @@ -24,17 +24,21 @@ #include "game.h" #include "game_constants.h" #include "item.h" +#include "item_contents.h" +#include "item_location.h" #include "line.h" #include "map.h" -#include "map_iterator.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "math_defines.h" #include "messages.h" -#include "monster.h" -#include "mtype.h" +#include "omdata.h" #include "options.h" #include "overmap.h" +#include "overmap_ui.h" #include "overmapbuffer.h" #include "pocket_type.h" +#include "point.h" #include "regional_settings.h" #include "ret_val.h" #include "rng.h" diff --git a/src/weather.h b/src/weather.h index 398c4dca0b8da..d323c0b095614 100644 --- a/src/weather.h +++ b/src/weather.h @@ -3,13 +3,14 @@ #define CATA_SRC_WEATHER_H #include +#include #include "calendar.h" #include "catacharset.h" #include "color.h" -#include "coords_fwd.h" +#include "coordinates.h" +#include "line.h" #include "pimpl.h" -#include "point.h" #include "type_id.h" #include "units.h" #include "weather_gen.h" @@ -75,8 +76,6 @@ constexpr float extreme = 906; } // namespace irradiance #include -#include -#include #include #include #include @@ -84,7 +83,6 @@ constexpr float extreme = 906; class Character; class Creature; class item; -struct rl_vec2d; struct trap; double precip_mm_per_hour( precip_class p ); diff --git a/src/weather_gen.cpp b/src/weather_gen.cpp index 54fb43e5407c3..ab51e6487f64e 100644 --- a/src/weather_gen.cpp +++ b/src/weather_gen.cpp @@ -1,25 +1,29 @@ #include "weather_gen.h" #include +#include #include #include +#include #include #include #include -#include +#include #include "avatar.h" #include "cata_utility.h" -#include "condition.h" #include "dialogue.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game_constants.h" #include "generic_factory.h" -#include "json.h" #include "math_defines.h" +#include "pimpl.h" #include "point.h" #include "rng.h" #include "simplexnoise.h" -#include "translations.h" +#include "talker.h" +#include "translation.h" #include "weather.h" #include "weather_type.h" diff --git a/src/weather_gen.h b/src/weather_gen.h index 1ddba7f02447b..3ed7e9ef651af 100644 --- a/src/weather_gen.h +++ b/src/weather_gen.h @@ -2,17 +2,16 @@ #ifndef CATA_SRC_WEATHER_GEN_H #define CATA_SRC_WEATHER_GEN_H -#include -#include +#include #include #include "calendar.h" #include "coordinates.h" +#include "point.h" #include "type_id.h" #include "units.h" class JsonObject; -struct tripoint; struct w_point { units::temperature temperature = 0_K; diff --git a/src/weather_type.cpp b/src/weather_type.cpp index c7d1550dea9da..bc9389350fb8d 100644 --- a/src/weather_type.cpp +++ b/src/weather_type.cpp @@ -1,14 +1,11 @@ #include "weather_type.h" -#include -#include - #include "assign.h" #include "condition.h" #include "debug.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" -#include namespace { diff --git a/src/weather_type.h b/src/weather_type.h index 53d8ea41f211b..922043b53ec7d 100644 --- a/src/weather_type.h +++ b/src/weather_type.h @@ -2,24 +2,23 @@ #ifndef CATA_SRC_WEATHER_TYPE_H #define CATA_SRC_WEATHER_TYPE_H -#include #include -#include -#include +#include #include #include +#include +#include #include #include "calendar.h" #include "catacharset.h" #include "color.h" -#include "damage.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" class JsonObject; -template struct enum_traits; struct const_dialogue; +template struct enum_traits; template class generic_factory; diff --git a/src/widget.cpp b/src/widget.cpp index bd4d9f407e83d..ebbb5a8ac0d42 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1,14 +1,42 @@ #include "widget.h" +#include +#include +#include +#include +#include +#include + +#include "avatar.h" +#include "cata_utility.h" +#include "catacharset.h" +#include "character.h" +#include "character_attire.h" #include "character_martial_arts.h" #include "color.h" #include "condition.h" +#include "coordinates.h" +#include "creature.h" +#include "cursesdef.h" +#include "debug.h" +#include "dialogue.h" #include "display.h" +#include "enum_conversions.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "generic_factory.h" -#include "json.h" +#include "global_vars.h" +#include "magic.h" +#include "magic_enchantment.h" +#include "npc.h" #include "output.h" -#include "overmapbuffer.h" -#include "npctalk.h" +#include "panels.h" +#include "pimpl.h" +#include "point.h" +#include "string_formatter.h" +#include "talker.h" +#include "translations.h" +#include "units.h" const static flag_id json_flag_W_DISABLED_BY_DEFAULT( "W_DISABLED_BY_DEFAULT" ); const static flag_id json_flag_W_DISABLED_WHEN_EMPTY( "W_DISABLED_WHEN_EMPTY" ); diff --git a/src/widget.h b/src/widget.h index 70a685cebda45..2ea9e192b959c 100644 --- a/src/widget.h +++ b/src/widget.h @@ -2,17 +2,26 @@ #ifndef CATA_SRC_WIDGET_H #define CATA_SRC_WIDGET_H +#include +#include +#include #include +#include +#include #include -#include "avatar.h" -#include "enum_traits.h" -#include "generic_factory.h" -#include "panels.h" -#include "string_id.h" -#include "translations.h" +#include "bodypart.h" +#include "color.h" +#include "cursesdef.h" // IWYU pragma: keep +#include "dialogue_helpers.h" +#include "output.h" +#include "translation.h" #include "type_id.h" +class avatar; +struct const_dialogue; +template struct enum_traits; + // These are the supported data variables for widgets, defined as enum widget_var. // widget_var names may be given as the "var" field in widget JSON. enum class widget_var : int { @@ -151,12 +160,11 @@ struct enum_traits { // Use generic_factory for loading JSON data. class JsonObject; -template -class generic_factory; class widget; - // Forward declaration, due to codependency on panels.h -class window_panel; +class window_panel; // IWYU pragma: keep +template +class generic_factory; struct widget_clause { private: diff --git a/src/wish.cpp b/src/wish.cpp index 25261f64add58..72215e39619d0 100644 --- a/src/wish.cpp +++ b/src/wish.cpp @@ -2,62 +2,70 @@ #include #include +#include #include #include #include #include #include +#include #include +#include #include #include #include "bionics.h" +#include "bodypart.h" #include "calendar.h" -#include "catacharset.h" #include "cata_imgui.h" #include "character.h" #include "color.h" -#include "cursesdef.h" +#include "creature.h" #include "debug.h" #include "effect.h" #include "enums.h" #include "game.h" -#include "imgui/imgui.h" +#include "game_constants.h" #include "input.h" #include "input_context.h" +#include "input_enums.h" #include "input_popup.h" #include "item.h" -#include "item_group.h" #include "item_factory.h" +#include "item_group.h" #include "itype.h" #include "localized_comparator.h" -#include "overmap.h" -#include "overmapbuffer.h" #include "map.h" +#include "memory_fast.h" #include "mongroup.h" #include "monster.h" #include "monstergenerator.h" #include "mtype.h" #include "mutation.h" #include "output.h" +#include "overmap.h" +#include "overmapbuffer.h" +#include "pimpl.h" #include "point.h" #include "proficiency.h" #include "skill.h" #include "string_formatter.h" #include "string_input_popup.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "type_id.h" #include "ui.h" #include "uistate.h" #include "units.h" +#include "value_ptr.h" + +class uilist_impl; static const efftype_id effect_pet( "pet" ); static const mongroup_id GROUP_ZOMBIE( "GROUP_ZOMBIE" ); -class ui_adaptor; - class wish_mutate_callback: public uilist_callback { public: diff --git a/src/worldfactory.cpp b/src/worldfactory.cpp index 064aa88e954ef..dcd68de4941a0 100644 --- a/src/worldfactory.cpp +++ b/src/worldfactory.cpp @@ -2,13 +2,21 @@ #include #include -#include +#include +#include +#include +#include #include #include -#include +#include +#include +#include +#include #include +#include #include -#include +#include +#include #include #include "cata_utility.h" @@ -19,6 +27,8 @@ #include "debug.h" #include "enums.h" #include "filesystem.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "input_context.h" #include "input_popup.h" #include "json.h" @@ -31,6 +41,7 @@ #include "string_formatter.h" #include "string_input_popup.h" #include "text_snippets.h" +#include "translation.h" #include "translations.h" #include "ui.h" #include "ui_manager.h" diff --git a/src/worldfactory.h b/src/worldfactory.h index 9019b0945d362..42a3b0703c460 100644 --- a/src/worldfactory.h +++ b/src/worldfactory.h @@ -4,21 +4,21 @@ #include #include -#include #include #include -#include #include +#include +#include "cata_path.h" #include "cuboid_rectangle.h" #include "options.h" #include "pimpl.h" +#include "point.h" #include "type_id.h" -enum class special_game_type; - class JsonArray; class JsonObject; +enum class special_game_type; namespace catacurses { @@ -85,9 +85,9 @@ struct WORLD { bool create_timestamp(); }; +class input_context; class mod_manager; class mod_ui; -class input_context; class worldfactory { diff --git a/tests/act_build_test.cpp b/tests/act_build_test.cpp index 45b4e25e53ea9..ca75b2e165724 100644 --- a/tests/act_build_test.cpp +++ b/tests/act_build_test.cpp @@ -1,18 +1,43 @@ #include +#include +#include +#include +#include +#include +#include +#include #include #include "activity_handlers.h" +#include "activity_type.h" #include "avatar.h" -#include "avatar_action.h" +#include "basecamp.h" +#include "calendar.h" #include "cata_catch.h" -#include "activity_type.h" +#include "character.h" #include "clzones.h" #include "construction.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "faction.h" #include "game.h" +#include "game_constants.h" +#include "item.h" +#include "map.h" #include "map_helpers.h" +#include "map_iterator.h" +#include "map_scale_constants.h" +#include "memory_fast.h" +#include "npc.h" #include "options_helpers.h" #include "pathfinding.h" +#include "pimpl.h" +#include "player_activity.h" #include "player_helpers.h" +#include "point.h" +#include "requirements.h" +#include "type_id.h" +#include "weather_type.h" static const activity_id ACT_MULTIPLE_CONSTRUCTION( "ACT_MULTIPLE_CONSTRUCTION" ); diff --git a/tests/active_item_cache_test.cpp b/tests/active_item_cache_test.cpp index 3c69f051abcb2..79c85f3a64c6b 100644 --- a/tests/active_item_cache_test.cpp +++ b/tests/active_item_cache_test.cpp @@ -1,12 +1,16 @@ +#include #include #include "calendar.h" #include "cata_catch.h" -#include "game_constants.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "point.h" +#include "type_id.h" static const itype_id itype_firecracker_act( "firecracker_act" ); diff --git a/tests/active_item_test.cpp b/tests/active_item_test.cpp index d4783b28fd352..143e8eb8568c3 100644 --- a/tests/active_item_test.cpp +++ b/tests/active_item_test.cpp @@ -1,15 +1,24 @@ #include -#include +#include #include +#include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "ret_val.h" +#include "type_id.h" +#include "units.h" +#include "value_ptr.h" static const itype_id itype_chainsaw_on( "chainsaw_on" ); static const itype_id itype_debug_backpack( "debug_backpack" ); diff --git a/tests/activity_scheduling_helper.cpp b/tests/activity_scheduling_helper.cpp index d0826c217d840..4362f5d0437a5 100644 --- a/tests/activity_scheduling_helper.cpp +++ b/tests/activity_scheduling_helper.cpp @@ -1,11 +1,13 @@ #include "activity_scheduling_helper.h" #include +#include #include -#include +#include "activity_tracker.h" #include "avatar.h" #include "cata_catch.h" +#include "character_attire.h" #include "debug.h" #include "item.h" #include "make_static.h" diff --git a/tests/activity_scheduling_helper.h b/tests/activity_scheduling_helper.h index 169b6fee668aa..db90089cc000d 100644 --- a/tests/activity_scheduling_helper.h +++ b/tests/activity_scheduling_helper.h @@ -2,11 +2,12 @@ #define CATA_TESTS_ACTIVITY_SCHEDULING_HELPER_H #include -#include +#include #include #include #include "activity_actor.h" +#include "activity_type.h" #include "calendar.h" #include "clone_ptr.h" #include "type_id.h" diff --git a/tests/activity_tracker_test.cpp b/tests/activity_tracker_test.cpp index 4ff43cd382f4f..9aa771ea12954 100644 --- a/tests/activity_tracker_test.cpp +++ b/tests/activity_tracker_test.cpp @@ -1,12 +1,13 @@ -#include "cata_catch.h" +#include +#include +#include #include "activity_tracker.h" #include "calendar.h" +#include "cata_catch.h" #include "game_constants.h" #include "rng.h" -#include - static void test_activity_tracker( const std::vector &values ) { activity_tracker tracker; diff --git a/tests/addiction_test.cpp b/tests/addiction_test.cpp index a284621b69a9c..1a59bd3374335 100644 --- a/tests/addiction_test.cpp +++ b/tests/addiction_test.cpp @@ -1,6 +1,13 @@ #include "addiction.h" + +#include +#include +#include + #include "cata_catch.h" #include "character.h" +#include "enums.h" +#include "item.h" #include "itype.h" #include "player_helpers.h" diff --git a/tests/algo_test.cpp b/tests/algo_test.cpp index 9b268dc3f7fcd..e3661d3bdcfad 100644 --- a/tests/algo_test.cpp +++ b/tests/algo_test.cpp @@ -1,12 +1,12 @@ #pragma GCC diagnostic ignored "-Wunused-macros" #define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER -#include "cata_catch.h" - #include #include +#include #include #include "cata_algo.h" +#include "cata_catch.h" static void check_cycle_finding( std::unordered_map> &g, std::vector> &expected ) diff --git a/tests/ammo_set_test.cpp b/tests/ammo_set_test.cpp index 30bf78ebd7b26..e6a024972e84f 100644 --- a/tests/ammo_set_test.cpp +++ b/tests/ammo_set_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/tests/ammo_test.cpp b/tests/ammo_test.cpp index 316d57835f803..e4e7d88011efa 100644 --- a/tests/ammo_test.cpp +++ b/tests/ammo_test.cpp @@ -1,9 +1,12 @@ -#include "cata_catch.h" - #include +#include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "damage.h" #include "item.h" +#include "pocket_type.h" +#include "ret_val.h" #include "type_id.h" #include "units.h" diff --git a/tests/archery_damage_test.cpp b/tests/archery_damage_test.cpp index 55be9aa981513..a2ae4e7ad8332 100644 --- a/tests/archery_damage_test.cpp +++ b/tests/archery_damage_test.cpp @@ -11,13 +11,16 @@ * * The concept is to bracket these threshods with various bows using standard hunting loadouts. */ -#include +#include #include #include #include +#include #include "cata_catch.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "damage.h" #include "game_constants.h" #include "item.h" diff --git a/tests/battery_density_test.cpp b/tests/battery_density_test.cpp index 0db45fbebe7af..5906b82221328 100644 --- a/tests/battery_density_test.cpp +++ b/tests/battery_density_test.cpp @@ -1,6 +1,18 @@ +#include +#include +#include +#include +#include +#include +#include +#include + #include "cata_catch.h" #include "item_factory.h" #include "itype.h" +#include "type_id.h" +#include "units.h" +#include "value_ptr.h" static const ammotype ammo_battery( "battery" ); static const flag_id json_flag_DEBUG_ONLY( "DEBUG_ONLY" ); diff --git a/tests/battery_mod_test.cpp b/tests/battery_mod_test.cpp index 8e18d03244b5d..c3663c933d502 100644 --- a/tests/battery_mod_test.cpp +++ b/tests/battery_mod_test.cpp @@ -1,6 +1,4 @@ #include -#include -#include #include #include #include @@ -8,8 +6,11 @@ #include "avatar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" #include "debug.h" #include "item.h" +#include "item_contents.h" #include "itype.h" #include "iuse.h" #include "iuse_actor.h" diff --git a/tests/behavior_test.cpp b/tests/behavior_test.cpp index fe39af6fc955b..4078bf34435c8 100644 --- a/tests/behavior_test.cpp +++ b/tests/behavior_test.cpp @@ -1,27 +1,39 @@ #include -#include -#include +#include +#include #include +#include +#include #include #include "behavior.h" +#include "behavior_oracle.h" #include "behavior_strategy.h" +#include "calendar.h" #include "cata_catch.h" +#include "character_attire.h" #include "character_oracle.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "item_location.h" #include "map.h" #include "map_helpers.h" #include "map_iterator.h" +#include "mapgen.h" +#include "mapgendata.h" #include "monattack.h" #include "monster.h" #include "monster_oracle.h" #include "mtype.h" #include "npc.h" #include "player_helpers.h" +#include "pocket_type.h" #include "point.h" #include "type_id.h" +#include "units.h" #include "weather.h" +#include "weighted_list.h" static const itype_id itype_2x4( "2x4" ); static const itype_id itype_backpack( "backpack" ); @@ -39,7 +51,6 @@ static const string_id behavior_node_t_npc_needs( "npc_needs" namespace behavior { -class oracle_t; static sequential_t default_sequential; static fallback_t default_fallback; diff --git a/tests/bionics_test.cpp b/tests/bionics_test.cpp index 421a224c869c7..14558f3a3f7c1 100644 --- a/tests/bionics_test.cpp +++ b/tests/bionics_test.cpp @@ -1,15 +1,23 @@ -#include -#include +#include #include +#include #include -#include +#include +#include +#include #include "avatar.h" #include "bionics.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "debug.h" +#include "enums.h" #include "game.h" #include "item.h" +#include "item_location.h" #include "map_helpers.h" #include "npc.h" #include "options_helpers.h" @@ -19,6 +27,7 @@ #include "ret_val.h" #include "type_id.h" #include "units.h" +#include "weather_type.h" static const bionic_id bio_batteries( "bio_batteries" ); // Change to some other weapon CBM if bio_blade is ever removed diff --git a/tests/calendar_test.cpp b/tests/calendar_test.cpp index 4e5c837842af0..92d6bcab5440c 100644 --- a/tests/calendar_test.cpp +++ b/tests/calendar_test.cpp @@ -1,4 +1,3 @@ -#include #include #include "calendar.h" diff --git a/tests/cardio_test.cpp b/tests/cardio_test.cpp index 8e81f747f1ed6..df49d7e243704 100644 --- a/tests/cardio_test.cpp +++ b/tests/cardio_test.cpp @@ -1,10 +1,19 @@ -#include "avatar.h" +#include +#include + +#include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "game.h" -#include "options.h" #include "map.h" #include "map_helpers.h" +#include "options.h" #include "player_helpers.h" +#include "point.h" +#include "type_id.h" // Cardio Fitness // -------------- diff --git a/tests/cartesian_product_test.cpp b/tests/cartesian_product_test.cpp index 0f09a5ff62e4f..1e3dc99313bc7 100644 --- a/tests/cartesian_product_test.cpp +++ b/tests/cartesian_product_test.cpp @@ -1,6 +1,7 @@ -#include "cata_catch.h" +#include #include "cartesian_product.h" +#include "cata_catch.h" TEST_CASE( "cartesian_product", "[nogame]" ) { diff --git a/tests/cata_generators.cpp b/tests/cata_generators.cpp index c651d243cda9b..0b31e2d82a2e1 100644 --- a/tests/cata_generators.cpp +++ b/tests/cata_generators.cpp @@ -1,7 +1,7 @@ #include "cata_generators.h" -#include #include +#include #include "point.h" #include "rng.h" diff --git a/tests/cata_generators.h b/tests/cata_generators.h index 28d92124f4f70..4b89bb3925d5c 100644 --- a/tests/cata_generators.h +++ b/tests/cata_generators.h @@ -5,11 +5,8 @@ // Some Catch2 Generators for generating our data types #include "cata_catch.h" -#include "game_constants.h" #include "map_scale_constants.h" - -struct point; -struct tripoint; +#include "point.h" Catch::Generators::GeneratorWrapper random_points( int low = -1000, int high = 1000 ); diff --git a/tests/cata_utility_test.cpp b/tests/cata_utility_test.cpp index f862363357593..55a3b2571be10 100644 --- a/tests/cata_utility_test.cpp +++ b/tests/cata_utility_test.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -8,8 +7,8 @@ #include #include "assertion_helpers.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "cata_utility.h" #include "debug_menu.h" #include "units.h" #include "units_utility.h" diff --git a/tests/cata_variant_test.cpp b/tests/cata_variant_test.cpp index e95c70d07c955..81552562e2611 100644 --- a/tests/cata_variant_test.cpp +++ b/tests/cata_variant_test.cpp @@ -1,12 +1,13 @@ #include #include -#include +#include -#include "cata_variant.h" #include "cata_catch.h" +#include "cata_variant.h" #include "character_id.h" #include "debug_menu.h" #include "enum_conversions.h" +#include "flexbuffer_json.h" #include "json.h" #include "json_loader.h" #include "point.h" diff --git a/tests/catacharset_test.cpp b/tests/catacharset_test.cpp index d8895670a024e..a67b8e3561d50 100644 --- a/tests/catacharset_test.cpp +++ b/tests/catacharset_test.cpp @@ -1,15 +1,15 @@ #include -#include +#include +#include #include #include #include #include #include -#include "catacharset.h" #include "cata_catch.h" +#include "catacharset.h" #include "localized_comparator.h" -#include "translations.h" #include "unicode.h" TEST_CASE( "utf8_width", "[catacharset][nogame]" ) diff --git a/tests/char_biometrics_test.cpp b/tests/char_biometrics_test.cpp index 1846d25955ec2..22fc3bdf7b732 100644 --- a/tests/char_biometrics_test.cpp +++ b/tests/char_biometrics_test.cpp @@ -1,12 +1,15 @@ -#include #include +#include +#include #include #include -#include +#include +#include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" #include "creature.h" #include "display.h" #include "game_constants.h" diff --git a/tests/char_edible_rating_test.cpp b/tests/char_edible_rating_test.cpp index f28adc5bc8711..c255fef24bede 100644 --- a/tests/char_edible_rating_test.cpp +++ b/tests/char_edible_rating_test.cpp @@ -1,4 +1,3 @@ -#include #include #include diff --git a/tests/char_exposure_test.cpp b/tests/char_exposure_test.cpp index 2535cba844072..a2409a5d3bf4e 100644 --- a/tests/char_exposure_test.cpp +++ b/tests/char_exposure_test.cpp @@ -1,7 +1,7 @@ -#include #include #include +#include "bodypart.h" #include "cata_catch.h" #include "character.h" #include "item.h" diff --git a/tests/char_healing_test.cpp b/tests/char_healing_test.cpp index 62ca6b63045c5..979181c013bb2 100644 --- a/tests/char_healing_test.cpp +++ b/tests/char_healing_test.cpp @@ -1,6 +1,8 @@ -#include +#include +#include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" diff --git a/tests/char_sight_test.cpp b/tests/char_sight_test.cpp index 08a1a8f4dc767..95c141c9d332d 100644 --- a/tests/char_sight_test.cpp +++ b/tests/char_sight_test.cpp @@ -1,19 +1,26 @@ -#include #include +#include #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "flag.h" #include "game.h" #include "item.h" #include "lightmap.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" +#include "memory_fast.h" +#include "npc.h" #include "options_helpers.h" #include "overmapbuffer.h" #include "player_helpers.h" +#include "point.h" #include "type_id.h" +#include "weather_type.h" static const efftype_id effect_boomered( "boomered" ); static const efftype_id effect_darkness( "darkness" ); diff --git a/tests/char_stamina_test.cpp b/tests/char_stamina_test.cpp index e1a63f4870c6b..f78196420abb8 100644 --- a/tests/char_stamina_test.cpp +++ b/tests/char_stamina_test.cpp @@ -1,8 +1,9 @@ -#include "cata_catch.h" - +#include "bodypart.h" #include "calendar.h" +#include "cata_catch.h" #include "character.h" #include "item.h" +#include "npc.h" #include "options.h" #include "player_helpers.h" #include "type_id.h" diff --git a/tests/char_suffer_test.cpp b/tests/char_suffer_test.cpp index e67fe3870b73e..4d4609fcf26a6 100644 --- a/tests/char_suffer_test.cpp +++ b/tests/char_suffer_test.cpp @@ -1,24 +1,26 @@ -#include -#include #include #include #include #include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" #include "creature.h" #include "flag.h" #include "game.h" #include "item.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" #include "options_helpers.h" #include "player_helpers.h" -#include "test_statistics.h" +#include "point.h" #include "type_id.h" +#include "weather_type.h" static const efftype_id effect_grabbed( "grabbed" ); diff --git a/tests/char_volume_test.cpp b/tests/char_volume_test.cpp index 9b2e7e36f6b5d..747e445a805e7 100644 --- a/tests/char_volume_test.cpp +++ b/tests/char_volume_test.cpp @@ -1,16 +1,17 @@ -#include -#include +#include -#include "avatar.h" #include "cata_catch.h" #include "character.h" -#include "game.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "item.h" #include "map.h" #include "map_helpers.h" -#include "mutation.h" #include "player_helpers.h" -#include "vehicle.h" -#include "veh_type.h" +#include "point.h" +#include "type_id.h" +#include "units.h" +#include "vpart_position.h" static const itype_id itype_backpack_giant( "backpack_giant" ); static const itype_id itype_rock_volume_test( "rock_volume_test" ); diff --git a/tests/character_modifier_test.cpp b/tests/character_modifier_test.cpp index 50a18debb2379..07657fff410af 100644 --- a/tests/character_modifier_test.cpp +++ b/tests/character_modifier_test.cpp @@ -1,11 +1,22 @@ +#include +#include +#include +#include +#include + #include "bodypart.h" #include "cata_catch.h" #include "character.h" #include "character_modifier.h" +#include "creature.h" #include "damage.h" +#include "item.h" #include "magic_enchantment.h" #include "mutation.h" +#include "npc.h" +#include "pimpl.h" #include "player_helpers.h" +#include "type_id.h" static const bodypart_str_id body_part_test_bird_foot_l( "test_bird_foot_l" ); static const bodypart_str_id body_part_test_bird_foot_r( "test_bird_foot_r" ); diff --git a/tests/clzones_test.cpp b/tests/clzones_test.cpp index 4a914a6002267..ee91a72588d1a 100644 --- a/tests/clzones_test.cpp +++ b/tests/clzones_test.cpp @@ -1,18 +1,29 @@ -#include +#include +#include #include #include "activity_actor_definitions.h" +#include "activity_type.h" #include "avatar.h" +#include "calendar.h" #include "cata_catch.h" #include "clzones.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "faction.h" #include "item.h" -#include "item_category.h" +#include "item_pocket.h" +#include "map.h" #include "map_helpers.h" +#include "player_activity.h" #include "player_helpers.h" #include "pocket_type.h" #include "point.h" #include "ret_val.h" #include "type_id.h" +#include "units.h" +#include "vehicle.h" +#include "vpart_position.h" static const activity_id ACT_MOVE_LOOT( "ACT_MOVE_LOOT" ); diff --git a/tests/colony_test.cpp b/tests/colony_test.cpp index c903274733acf..9773a9cf8e1dc 100644 --- a/tests/colony_test.cpp +++ b/tests/colony_test.cpp @@ -1,7 +1,6 @@ #include // std::find #include -#include // std::greater -#include +#include #include // range-insert testing #include "cata_catch.h" diff --git a/tests/comestible_test.cpp b/tests/comestible_test.cpp index 72adc75d644c7..e512de5d93f4d 100644 --- a/tests/comestible_test.cpp +++ b/tests/comestible_test.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/connect_rotate_test.cpp b/tests/connect_rotate_test.cpp index 16a41e08e9e78..6fe95aeb23180 100644 --- a/tests/connect_rotate_test.cpp +++ b/tests/connect_rotate_test.cpp @@ -1,14 +1,19 @@ #if (defined(TILES)) +#include +#include + #include "avatar.h" #include "cata_catch.h" -#include "cata_tiles.h" +#include "type_id.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "map.h" -#include "mapdata.h" #include "map_helpers.h" +#include "mapdata.h" #include "player_helpers.h" -#include "sdltiles.h" +#include "point.h" static const ter_str_id ter_t_floor( "t_floor" ); static const ter_str_id ter_t_pavement( "t_pavement" ); diff --git a/tests/consumption_time_test.cpp b/tests/consumption_time_test.cpp index 934b3c8366f87..77a933bc94095 100644 --- a/tests/consumption_time_test.cpp +++ b/tests/consumption_time_test.cpp @@ -1,6 +1,10 @@ +#include + #include "avatar.h" -#include "item.h" +#include "calendar.h" #include "cata_catch.h" +#include "item.h" +#include "type_id.h" static const itype_id itype_mustard( "mustard" ); diff --git a/tests/coordinate_test.cpp b/tests/coordinate_test.cpp index 70075518b3f2e..840bcbd3eafda 100644 --- a/tests/coordinate_test.cpp +++ b/tests/coordinate_test.cpp @@ -1,11 +1,14 @@ #include -#include #include #include +#include +#include -#include "cata_generators.h" #include "cata_catch.h" +#include "cata_generators.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "map_scale_constants.h" #include "point.h" static constexpr int num_trials = 5; diff --git a/tests/coverage_test.cpp b/tests/coverage_test.cpp index 640b16d074193..354ff8b54f5bd 100644 --- a/tests/coverage_test.cpp +++ b/tests/coverage_test.cpp @@ -1,17 +1,31 @@ #include +#include #include +#include #include "ballistics.h" +#include "bodypart.h" +#include "calendar.h" #include "cata_catch.h" -#include "creature.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "damage.h" #include "dispersion.h" +#include "item.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "monster.h" #include "npc.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" #include "projectile.h" -#include "ranged.h" +#include "ret_val.h" +#include "string_formatter.h" +#include "subbodypart.h" +#include "type_id.h" +#include "weakpoint.h" static const damage_type_id damage_bullet( "bullet" ); diff --git a/tests/crafting_test.cpp b/tests/crafting_test.cpp index 83a1a557fa90c..2d53159b1cc42 100644 --- a/tests/crafting_test.cpp +++ b/tests/crafting_test.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -14,33 +16,50 @@ #include "activity_type.h" #include "avatar.h" #include "calendar.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "craft_command.h" +#include "enums.h" #include "game.h" +#include "game_constants.h" +#include "game_inventory.h" #include "inventory.h" #include "item.h" +#include "item_components.h" +#include "item_contents.h" +#include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" +#include "mapdata.h" #include "npc.h" +#include "output.h" #include "pimpl.h" #include "player_activity.h" #include "player_helpers.h" #include "pocket_type.h" #include "point.h" +#include "proficiency.h" #include "recipe.h" #include "recipe_dictionary.h" #include "requirements.h" #include "ret_val.h" #include "skill.h" +#include "string_formatter.h" #include "temp_crafting_inventory.h" #include "type_id.h" +#include "units.h" #include "value_ptr.h" #include "veh_appliance.h" #include "veh_type.h" #include "vehicle.h" +#include "vpart_position.h" +#include "vpart_range.h" static const activity_id ACT_CRAFT( "ACT_CRAFT" ); diff --git a/tests/creature_effect_test.cpp b/tests/creature_effect_test.cpp index ad7abc6c25e9f..b109a8bd9641e 100644 --- a/tests/creature_effect_test.cpp +++ b/tests/creature_effect_test.cpp @@ -1,6 +1,10 @@ +#include + #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" +#include "creature.h" #include "monster.h" #include "mtype.h" #include "type_id.h" diff --git a/tests/creature_in_field_test.cpp b/tests/creature_in_field_test.cpp index f66cfc950cc77..56f272a3ab8fe 100644 --- a/tests/creature_in_field_test.cpp +++ b/tests/creature_in_field_test.cpp @@ -1,4 +1,6 @@ #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" #include "monster.h" diff --git a/tests/creature_test.cpp b/tests/creature_test.cpp index 49e73e8e88145..383ceb56430f0 100644 --- a/tests/creature_test.cpp +++ b/tests/creature_test.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -5,10 +6,12 @@ #include "bodypart.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature.h" #include "enum_traits.h" -#include "monster.h" #include "mtype.h" +#include "npc.h" #include "player_helpers.h" #include "rng.h" #include "test_statistics.h" diff --git a/tests/degradation_test.cpp b/tests/degradation_test.cpp index 791d3c673753c..6e3dd3894b9d4 100644 --- a/tests/degradation_test.cpp +++ b/tests/degradation_test.cpp @@ -1,20 +1,31 @@ +#include +#include #include +#include #include "activity_handlers.h" +#include "activity_type.h" +#include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "flag.h" #include "item.h" +#include "item_contents.h" +#include "item_location.h" #include "itype.h" -#include "iuse_actor.h" #include "iuse.h" -#include "map_helpers.h" #include "map.h" +#include "map_helpers.h" +#include "map_scale_constants.h" +#include "map_selector.h" +#include "player_activity.h" #include "player_helpers.h" -#include "vehicle.h" -#include "veh_utils.h" -#include "veh_type.h" -#include "vpart_position.h" -#include "vpart_range.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "type_id.h" static const activity_id ACT_REPAIR_ITEM( "ACT_REPAIR_ITEM" ); diff --git a/tests/distribution_test.cpp b/tests/distribution_test.cpp index 4274bd1dfd3f8..a0a17109d2ea4 100644 --- a/tests/distribution_test.cpp +++ b/tests/distribution_test.cpp @@ -1,8 +1,8 @@ -#include +#include #include "cata_catch.h" #include "distribution.h" -#include "json.h" +#include "flexbuffer_json.h" #include "json_loader.h" TEST_CASE( "poisson_distribution", "[distribution]" ) diff --git a/tests/effect_test.cpp b/tests/effect_test.cpp index 6543cddb8cd3b..a13df47199c4b 100644 --- a/tests/effect_test.cpp +++ b/tests/effect_test.cpp @@ -1,28 +1,32 @@ -#include #include #include #include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" #include "character_id.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "damage.h" #include "effect.h" #include "effect_source.h" #include "game.h" +#include "item.h" #include "map.h" #include "map_helpers.h" #include "monster.h" #include "npc.h" +#include "npc_attack.h" #include "player_helpers.h" #include "point.h" +#include "stomach.h" #include "type_id.h" -class Creature; - static const damage_type_id damage_cut( "cut" ); static const efftype_id effect_bleed( "bleed" ); diff --git a/tests/effective_dps_test.cpp b/tests/effective_dps_test.cpp index 5e112bb343dbd..6ab3a550bb122 100644 --- a/tests/effective_dps_test.cpp +++ b/tests/effective_dps_test.cpp @@ -1,17 +1,28 @@ #include +#include #include -#include - +#include +#include +#include +#include +#include +#include +#include + +#include "auto_pickup.h" #include "avatar.h" #include "cata_catch.h" #include "flag.h" #include "item.h" #include "item_factory.h" +#include "item_location.h" +#include "itype.h" #include "melee.h" #include "monster.h" #include "player_helpers.h" -#include "sounds.h" #include "ret_val.h" +#include "sounds.h" +#include "string_formatter.h" #include "test_data.h" #include "type_id.h" @@ -30,8 +41,6 @@ static const skill_id skill_melee( "melee" ); static const skill_id skill_stabbing( "stabbing" ); static const skill_id skill_unarmed( "unarmed" ); -struct itype; - // Run a large number of trials of a player attacking a monster with a given weapon, // and return the average damage done per second. static double weapon_dps_trials( avatar &attacker, monster &defender, item &weapon ) diff --git a/tests/enchantments_test.cpp b/tests/enchantments_test.cpp index d1debfd9f889e..406465723821c 100644 --- a/tests/enchantments_test.cpp +++ b/tests/enchantments_test.cpp @@ -1,13 +1,22 @@ +#include +#include + #include "avatar.h" +#include "bodypart.h" +#include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "field.h" +#include "game.h" #include "item.h" -#include "item_group.h" #include "item_location.h" -#include "game.h" #include "map.h" #include "map_helpers.h" +#include "messages.h" #include "monster.h" #include "npc.h" #include "player_helpers.h" diff --git a/tests/encumbrance_test.cpp b/tests/encumbrance_test.cpp index 864a8e4a01fc2..47fc5d1f43fa0 100644 --- a/tests/encumbrance_test.cpp +++ b/tests/encumbrance_test.cpp @@ -1,14 +1,15 @@ #include -#include -#include #include #include #include "bodypart.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" #include "item.h" +#include "item_contents.h" #include "npc.h" +#include "pocket_type.h" #include "type_id.h" static const flag_id json_flag_UNDERSIZE( "UNDERSIZE" ); diff --git a/tests/eoc_test.cpp b/tests/eoc_test.cpp index 89819ed252e7e..8162d6670a49d 100644 --- a/tests/eoc_test.cpp +++ b/tests/eoc_test.cpp @@ -1,17 +1,57 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "activity_type.h" #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "character_attire.h" +#include "character_id.h" #include "character_martial_arts.h" +#include "computer.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" +#include "damage.h" +#include "debug.h" +#include "dialogue.h" +#include "dialogue_helpers.h" #include "effect_on_condition.h" +#include "field_type.h" #include "game.h" +#include "global_vars.h" +#include "item.h" +#include "item_location.h" +#include "line.h" +#include "magic.h" #include "make_static.h" +#include "map.h" #include "map_helpers.h" -#include "mutation.h" +#include "map_iterator.h" +#include "map_selector.h" +#include "mapdata.h" +#include "memory_fast.h" +#include "messages.h" +#include "monster.h" +#include "npc.h" #include "overmapbuffer.h" -#include "timed_event.h" +#include "pimpl.h" +#include "player_activity.h" #include "player_helpers.h" #include "point.h" +#include "recipe.h" +#include "rng.h" +#include "talker.h" +#include "timed_event.h" +#include "type_id.h" static const activity_id ACT_ADD_VARIABLE_COMPLETE( "ACT_ADD_VARIABLE_COMPLETE" ); static const activity_id ACT_ADD_VARIABLE_DURING( "ACT_ADD_VARIABLE_DURING" ); diff --git a/tests/event_test.cpp b/tests/event_test.cpp index 7ed81c7d5ec37..c55a702fd80ee 100644 --- a/tests/event_test.cpp +++ b/tests/event_test.cpp @@ -1,9 +1,8 @@ -#include #include #include "calendar.h" -#include "cata_variant.h" #include "cata_catch.h" +#include "cata_variant.h" #include "character_id.h" #include "event.h" #include "event_bus.h" diff --git a/tests/explosion_balance_test.cpp b/tests/explosion_balance_test.cpp index d01c82defe9d1..26306d24c7c0b 100644 --- a/tests/explosion_balance_test.cpp +++ b/tests/explosion_balance_test.cpp @@ -1,29 +1,37 @@ +#include +#include #include #include +#include #include +#include +#include #include +#include #include #include "avatar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature.h" +#include "damage.h" #include "explosion.h" #include "fragment_cloud.h" #include "game.h" #include "item.h" #include "itype.h" +#include "iuse.h" #include "iuse_actor.h" -#include "line.h" #include "map.h" #include "map_helpers.h" #include "monster.h" -#include "mtype.h" #include "point.h" #include "projectile.h" +#include "rng.h" #include "test_statistics.h" #include "type_id.h" #include "units.h" -#include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" #include "vpart_range.h" diff --git a/tests/faction_camp_test.cpp b/tests/faction_camp_test.cpp index e055ba677f3e7..0919c4d1bf224 100644 --- a/tests/faction_camp_test.cpp +++ b/tests/faction_camp_test.cpp @@ -1,18 +1,21 @@ -#include -#include -#include -#include +#include #include "basecamp.h" #include "cata_catch.h" +#include "character.h" #include "clzones.h" #include "coordinates.h" +#include "coords_fwd.h" #include "faction.h" +#include "item.h" +#include "item_components.h" #include "map.h" #include "map_helpers.h" -#include "overmap.h" #include "overmapbuffer.h" #include "player_helpers.h" +#include "point.h" +#include "stomach.h" +#include "type_id.h" static const itype_id itype_test_100_kcal( "test_100_kcal" ); static const itype_id itype_test_200_kcal( "test_200_kcal" ); diff --git a/tests/faction_price_rules_test.cpp b/tests/faction_price_rules_test.cpp index b931b8566f859..24a597e3636cd 100644 --- a/tests/faction_price_rules_test.cpp +++ b/tests/faction_price_rules_test.cpp @@ -1,10 +1,25 @@ +#include + #include "avatar.h" +#include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "faction.h" +#include "item.h" +#include "item_location.h" #include "itype.h" #include "map_selector.h" #include "npc.h" #include "npctrade.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "trade_ui.h" +#include "type_id.h" +#include "units.h" static const itype_id itype_FMCNote( "FMCNote" ); static const itype_id itype_battery( "battery" ); diff --git a/tests/fake_messages.cpp b/tests/fake_messages.cpp index e6b4566108ae7..37f8d31f21454 100644 --- a/tests/fake_messages.cpp +++ b/tests/fake_messages.cpp @@ -1,23 +1,15 @@ #include -#include +#include #include #include #include "calendar.h" -#include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" #include "enums.h" +#include "flexbuffer_json.h" +#include "json.h" #include "messages.h" - -class Creature; -class JsonObject; -class JsonOut; -struct tripoint; - -namespace catacurses -{ -class window; -} // namespace catacurses - /** * For unit testing we just store all messages so they can be dumped in the * event of a test failure. diff --git a/tests/field_test.cpp b/tests/field_test.cpp index 25c83da0a8077..d4dfe36f2cb2b 100644 --- a/tests/field_test.cpp +++ b/tests/field_test.cpp @@ -1,10 +1,13 @@ -#include +#include #include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" -#include "effect.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "field.h" #include "field_type.h" #include "item.h" @@ -15,8 +18,9 @@ #include "options_helpers.h" #include "player_helpers.h" #include "point.h" +#include "string_formatter.h" #include "type_id.h" -#include "weather.h" +#include "weather_type.h" static const efftype_id effect_test_rash( "test_rash" ); diff --git a/tests/firstaid_test.cpp b/tests/firstaid_test.cpp index 91c4a8ebf7a5c..894f5e450baf0 100644 --- a/tests/firstaid_test.cpp +++ b/tests/firstaid_test.cpp @@ -1,14 +1,24 @@ +#include +#include + #include "activity_actor_definitions.h" +#include "activity_type.h" #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "item.h" +#include "item_location.h" #include "itype.h" -#include "npc.h" -#include "type_id.h" -#include "map.h" #include "map_helpers.h" +#include "npc.h" +#include "player_activity.h" #include "player_helpers.h" -#include "activity_scheduling_helper.h" +#include "point.h" +#include "type_id.h" static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); diff --git a/tests/flat_set_test.cpp b/tests/flat_set_test.cpp index e5fd16cebda3f..3423035a54f61 100644 --- a/tests/flat_set_test.cpp +++ b/tests/flat_set_test.cpp @@ -1,5 +1,3 @@ -#include -#include #include #include #include diff --git a/tests/focus_test.cpp b/tests/focus_test.cpp index e3b9ef9510607..76548ba9186a9 100644 --- a/tests/focus_test.cpp +++ b/tests/focus_test.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "avatar.h" #include "cata_catch.h" diff --git a/tests/fold_string_test.cpp b/tests/fold_string_test.cpp index 35cd74cca7b48..1d46bb9c20999 100644 --- a/tests/fold_string_test.cpp +++ b/tests/fold_string_test.cpp @@ -1,10 +1,9 @@ -#include "cata_catch.h" - #include -#include -#include #include +#include +#include +#include "cata_catch.h" #include "output.h" template diff --git a/tests/food_fun_for_test.cpp b/tests/food_fun_for_test.cpp index 69f3a7d40aeb3..1aa40842e4164 100644 --- a/tests/food_fun_for_test.cpp +++ b/tests/food_fun_for_test.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include diff --git a/tests/fuel_test.cpp b/tests/fuel_test.cpp index f947701631c61..54feb52ad6070 100644 --- a/tests/fuel_test.cpp +++ b/tests/fuel_test.cpp @@ -1,5 +1,9 @@ +#include + #include "cata_catch.h" #include "item.h" +#include "type_id.h" +#include "units.h" static const itype_id itype_battery( "battery" ); static const itype_id itype_gasoline( "gasoline" ); diff --git a/tests/gates_test.cpp b/tests/gates_test.cpp index 71d0a6b7f0d99..2f07218be122b 100644 --- a/tests/gates_test.cpp +++ b/tests/gates_test.cpp @@ -1,12 +1,16 @@ +#include +#include + #include "avatar.h" #include "avatar_action.h" #include "cata_catch.h" #include "coordinates.h" -#include "gates.h" +#include "coords_fwd.h" #include "map.h" -#include "mapdata.h" #include "map_helpers.h" +#include "mapdata.h" #include "player_helpers.h" +#include "point.h" #include "sounds.h" #include "type_id.h" diff --git a/tests/ground_destroy_test.cpp b/tests/ground_destroy_test.cpp index e125f1eff53ba..0d4b41783a241 100644 --- a/tests/ground_destroy_test.cpp +++ b/tests/ground_destroy_test.cpp @@ -1,8 +1,12 @@ +#include #include +#include #include #include "avatar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "itype.h" #include "map.h" diff --git a/tests/harvest_test.cpp b/tests/harvest_test.cpp index efb847c3b1934..46e57668d925e 100644 --- a/tests/harvest_test.cpp +++ b/tests/harvest_test.cpp @@ -1,12 +1,22 @@ +#include + #include "activity_handlers.h" +#include "activity_type.h" #include "cata_catch.h" -#include "harvest.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "item.h" #include "item_group.h" -#include "itype.h" +#include "item_location.h" #include "map.h" +#include "map_scale_constants.h" +#include "map_selector.h" #include "monster.h" -#include "mtype.h" +#include "player_activity.h" #include "player_helpers.h" +#include "point.h" +#include "type_id.h" static const activity_id ACT_DISSECT( "ACT_DISSECT" ); diff --git a/tests/hash_test.cpp b/tests/hash_test.cpp index 5edb56f8671a0..282d896b810a7 100644 --- a/tests/hash_test.cpp +++ b/tests/hash_test.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include "cata_catch.h" diff --git a/tests/health_test.cpp b/tests/health_test.cpp index 60c8a8f41dbee..17c19dc660216 100644 --- a/tests/health_test.cpp +++ b/tests/health_test.cpp @@ -1,13 +1,8 @@ -#include "cata_catch.h" - -#include -#include -#include -#include - #include "calendar.h" -#include "enums.h" +#include "cata_catch.h" +#include "character.h" #include "npc.h" +#include "type_id.h" static const efftype_id effect_lying_down( "lying_down" ); static const efftype_id effect_npc_suspend( "npc_suspend" ); diff --git a/tests/iexamine_test.cpp b/tests/iexamine_test.cpp index 7a0487264867b..53b52d170d75d 100644 --- a/tests/iexamine_test.cpp +++ b/tests/iexamine_test.cpp @@ -1,13 +1,13 @@ -#include "cata_catch.h" -#include "map.h" - -#include "action.h" #include "calendar.h" -#include "game.h" +#include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "iexamine.h" -#include "mapdata.h" +#include "map.h" #include "map_helpers.h" +#include "mapdata.h" #include "point.h" +#include "type_id.h" TEST_CASE( "mapdata_examine" ) { diff --git a/tests/invlet_test.cpp b/tests/invlet_test.cpp index 412e1d8939085..ba67adae70e66 100644 --- a/tests/invlet_test.cpp +++ b/tests/invlet_test.cpp @@ -1,16 +1,21 @@ #include -#include #include #include #include +#include #include #include #include #include +#include #include "activity_actor_definitions.h" #include "avatar.h" #include "cata_catch.h" +#include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "inventory.h" #include "item.h" #include "item_location.h" diff --git a/tests/item_autopickup_test.cpp b/tests/item_autopickup_test.cpp index 1880feb44dfa6..dcf686362ec89 100644 --- a/tests/item_autopickup_test.cpp +++ b/tests/item_autopickup_test.cpp @@ -1,12 +1,30 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "auto_pickup.h" #include "avatar.h" +#include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "enums.h" #include "item.h" +#include "item_location.h" +#include "item_stack.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" #include "options.h" #include "pickup.h" #include "player_helpers.h" #include "pocket_type.h" +#include "rng.h" +#include "type_id.h" static const itype_id itype_aspirin( "aspirin" ); static const itype_id itype_backpack( "backpack" ); diff --git a/tests/item_contents_test.cpp b/tests/item_contents_test.cpp index 8c5970028a78d..de4f9b2389bf7 100644 --- a/tests/item_contents_test.cpp +++ b/tests/item_contents_test.cpp @@ -1,11 +1,17 @@ #include +#include #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" #include "item.h" #include "item_contents.h" +#include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" #include "pocket_type.h" #include "point.h" #include "ret_val.h" diff --git a/tests/item_countdown_test.cpp b/tests/item_countdown_test.cpp index 9f911f4a7345b..ac20baa696adb 100644 --- a/tests/item_countdown_test.cpp +++ b/tests/item_countdown_test.cpp @@ -1,7 +1,10 @@ #include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "map.h" +#include "type_id.h" static const itype_id itype_arrow_field_point_fletched( "arrow_field_point_fletched" ); static const itype_id itype_arrow_flamming( "arrow_flamming" ); diff --git a/tests/item_group_test.cpp b/tests/item_group_test.cpp index aa179e51b39e8..1ece19f1906d0 100644 --- a/tests/item_group_test.cpp +++ b/tests/item_group_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -7,6 +6,8 @@ #include #include "cata_catch.h" +#include "cata_utility.h" +#include "enums.h" #include "flag.h" #include "item.h" #include "item_group.h" diff --git a/tests/item_location_test.cpp b/tests/item_location_test.cpp index 3d1dbc3e6fbaa..1589587538562 100644 --- a/tests/item_location_test.cpp +++ b/tests/item_location_test.cpp @@ -1,9 +1,12 @@ #include -#include #include +#include +#include #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "item_location.h" #include "map.h" diff --git a/tests/item_pickup_test.cpp b/tests/item_pickup_test.cpp index 26230788a942e..a5b39fd101df7 100644 --- a/tests/item_pickup_test.cpp +++ b/tests/item_pickup_test.cpp @@ -1,10 +1,24 @@ +#include +#include +#include +#include + #include "avatar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" +#include "npc.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" #include "rng.h" +#include "type_id.h" static const itype_id itype_backpack_hiking( "backpack_hiking" ); static const itype_id itype_debug_modular_m4_carbine( "debug_modular_m4_carbine" ); diff --git a/tests/item_pocket_test.cpp b/tests/item_pocket_test.cpp index 7aa4b0c86063d..4a9cfb9bb9844 100644 --- a/tests/item_pocket_test.cpp +++ b/tests/item_pocket_test.cpp @@ -1,8 +1,10 @@ +#include +#include +#include #include -#include +#include #include #include -#include #include #include #include @@ -12,23 +14,38 @@ #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "cata_scope_helpers.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "debug.h" #include "enums.h" #include "flag.h" +#include "flat_set.h" +#include "handle_liquid.h" #include "item.h" #include "item_category.h" +#include "item_contents.h" #include "item_factory.h" +#include "item_group.h" #include "item_location.h" #include "item_pocket.h" #include "itype.h" +#include "iuse.h" #include "iuse_actor.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" #include "mapgen_helpers.h" +#include "player_activity.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" #include "ret_val.h" +#include "rng.h" #include "test_data.h" +#include "translation.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" diff --git a/tests/item_spawn_test.cpp b/tests/item_spawn_test.cpp index ce34b3fc5dbf7..01c68ea109582 100644 --- a/tests/item_spawn_test.cpp +++ b/tests/item_spawn_test.cpp @@ -1,16 +1,26 @@ +#include +#include +#include +#include +#include #include #include "cata_catch.h" -#include "game.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "item_group.h" +#include "map.h" #include "map_helpers.h" #include "mutation.h" +#include "point.h" #include "profession.h" #include "recipe.h" #include "test_data.h" +#include "type_id.h" +#include "units.h" #include "vehicle.h" -#include "veh_type.h" +#include "vpart_position.h" static std::string get_section_name( const spawn_type &type ) { diff --git a/tests/item_stackable_test.cpp b/tests/item_stackable_test.cpp index eef051871f2d4..e31b7d3a1dd16 100644 --- a/tests/item_stackable_test.cpp +++ b/tests/item_stackable_test.cpp @@ -1,12 +1,11 @@ -#include #include #include #include "cata_catch.h" +#include "enums.h" #include "item_factory.h" #include "itype.h" -#include "type_id.h" -#include "units.h" +#include "value_ptr.h" TEST_CASE( "non-solid-comestibles-are-stackable", "[item]" ) { diff --git a/tests/item_test.cpp b/tests/item_test.cpp index 0dfe0335a0288..a014f789c3235 100644 --- a/tests/item_test.cpp +++ b/tests/item_test.cpp @@ -1,27 +1,43 @@ -#include "cata_catch.h" -#include "item.h" - +#include #include +#include #include #include +#include +#include #include +#include +#include +#include +#include #include #include "avatar.h" #include "avatar_action.h" +#include "bodypart.h" #include "calendar.h" +#include "cata_catch.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "flag.h" #include "game.h" +#include "item.h" #include "item_category.h" #include "item_factory.h" +#include "item_location.h" #include "itype.h" +#include "material.h" #include "math_defines.h" #include "monstergenerator.h" #include "mtype.h" #include "player_helpers.h" #include "pocket_type.h" +#include "point.h" #include "ret_val.h" +#include "string_formatter.h" +#include "subbodypart.h" #include "test_data.h" #include "type_id.h" #include "units.h" diff --git a/tests/item_tick_action_test.cpp b/tests/item_tick_action_test.cpp index 0bf1026b1256d..8fc70a91c0c31 100644 --- a/tests/item_tick_action_test.cpp +++ b/tests/item_tick_action_test.cpp @@ -1,7 +1,9 @@ -#include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "map.h" +#include "type_id.h" static const itype_id itype_chainsaw_off( "chainsaw_off" ); static const itype_id itype_chainsaw_on( "chainsaw_on" ); diff --git a/tests/item_tname_test.cpp b/tests/item_tname_test.cpp index 09fc519da61f4..2544e3a945c8f 100644 --- a/tests/item_tname_test.cpp +++ b/tests/item_tname_test.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include "avatar.h" #include "calendar.h" @@ -9,12 +11,15 @@ #include "flag.h" #include "item.h" #include "item_category.h" +#include "item_contents.h" #include "item_pocket.h" #include "item_tname.h" #include "itype.h" #include "options_helpers.h" #include "pocket_type.h" #include "ret_val.h" +#include "translation_manager.h" +#include "translations.h" #include "type_id.h" #include "value_ptr.h" diff --git a/tests/item_type_name_test.cpp b/tests/item_type_name_test.cpp index c8f26fa58dc4b..3421d4c5e5b1b 100644 --- a/tests/item_type_name_test.cpp +++ b/tests/item_type_name_test.cpp @@ -1,4 +1,3 @@ -#include #include #include "calendar.h" diff --git a/tests/iteminfo_test.cpp b/tests/iteminfo_test.cpp index 9a3db00d2cf49..3ba79c0203f96 100644 --- a/tests/iteminfo_test.cpp +++ b/tests/iteminfo_test.cpp @@ -1,25 +1,33 @@ -#include -#include +#include +#include #include #include #include +#include #include #include "avatar.h" +#include "body_part_set.h" #include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" #include "flag.h" #include "item.h" +#include "item_location.h" #include "iteminfo_query.h" #include "itype.h" #include "make_static.h" #include "options_helpers.h" #include "output.h" #include "player_helpers.h" +#include "pocket_type.h" #include "recipe.h" #include "recipe_dictionary.h" +#include "ret_val.h" +#include "string_formatter.h" +#include "subbodypart.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" diff --git a/tests/itemname_test.cpp b/tests/itemname_test.cpp index a02754b625979..38f9f05b226d7 100644 --- a/tests/itemname_test.cpp +++ b/tests/itemname_test.cpp @@ -1,10 +1,10 @@ -#include #include #include #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "color.h" #include "flag.h" #include "item.h" #include "player_helpers.h" diff --git a/tests/iuse_actor_test.cpp b/tests/iuse_actor_test.cpp index 98cf68ef153fd..3b5d5a8dd2a8e 100644 --- a/tests/iuse_actor_test.cpp +++ b/tests/iuse_actor_test.cpp @@ -1,16 +1,17 @@ #include #include -#include +#include #include -#include #include #include -#include +#include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" -#include "colony.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature_tracker.h" #include "game.h" #include "item.h" diff --git a/tests/iuse_test.cpp b/tests/iuse_test.cpp index 419492eeba4eb..d30b557ae2c4f 100644 --- a/tests/iuse_test.cpp +++ b/tests/iuse_test.cpp @@ -1,17 +1,30 @@ +#include #include -#include +#include +#include #include #include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "flag.h" +#include "inventory.h" #include "item.h" +#include "item_location.h" #include "itype.h" +#include "iuse.h" +#include "map.h" #include "map_helpers.h" -#include "morale_types.h" +#include "map_selector.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" #include "type_id.h" #include "value_ptr.h" diff --git a/tests/json_test.cpp b/tests/json_test.cpp index d50cdc8fe1d73..65274c23b883c 100644 --- a/tests/json_test.cpp +++ b/tests/json_test.cpp @@ -1,33 +1,34 @@ -#include #include #include -#include #include #include #include #include #include #include +#include #include #include +#include "body_part_set.h" #include "bodypart.h" #include "cached_options.h" -#include "cata_scope_helpers.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "cata_scope_helpers.h" #include "colony.h" -#include "damage.h" #include "debug.h" +#include "dialogue_helpers.h" #include "enum_bitset.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "item.h" #include "json.h" +#include "json_error.h" #include "json_loader.h" #include "magic.h" -#include "mutation.h" +#include "magic_type.h" #include "sounds.h" -#include "string_formatter.h" -#include "translations.h" +#include "translation.h" #include "type_id.h" static const damage_type_id damage_pure( "pure" ); diff --git a/tests/limb_test.cpp b/tests/limb_test.cpp index d774b01056eb3..eb7a91fbb2fbf 100644 --- a/tests/limb_test.cpp +++ b/tests/limb_test.cpp @@ -1,16 +1,30 @@ +#include +#include + +#include "body_part_set.h" #include "bodypart.h" +#include "calendar.h" #include "cata_catch.h" +#include "cata_scope_helpers.h" #include "character.h" -#include "character_modifier.h" -#include "damage.h" +#include "coordinates.h" #include "flag.h" #include "item.h" #include "itype.h" #include "magic_enchantment.h" +#include "map.h" #include "map_helpers.h" -#include "mutation.h" +#include "npc.h" +#include "npc_opinion.h" #include "options_helpers.h" +#include "pimpl.h" #include "player_helpers.h" +#include "subbodypart.h" +#include "type_id.h" +#include "units.h" +#include "weather.h" +#include "weather_gen.h" +#include "weather_type.h" static const bodypart_str_id body_part_test_arm_l( "test_arm_l" ); static const bodypart_str_id body_part_test_arm_r( "test_arm_r" ); diff --git a/tests/line_test.cpp b/tests/line_test.cpp index 2843e004b1bee..376aae242a0bf 100644 --- a/tests/line_test.cpp +++ b/tests/line_test.cpp @@ -1,16 +1,17 @@ #include #include +#include #include #include #include -#include +#include #include -#include #include -#include "cata_generators.h" #include "cata_catch.h" +#include "cata_generators.h" #include "coordinates.h" +#include "coords_fwd.h" #include "line.h" #include "point.h" #include "rng.h" diff --git a/tests/list_test.cpp b/tests/list_test.cpp index 8fb7df70b36ab..f0e57baf9bd04 100644 --- a/tests/list_test.cpp +++ b/tests/list_test.cpp @@ -1,9 +1,7 @@ #include // std::find #include // log redirection -#include // std::greater #include -#include -#include +#include #include // range-insert testing #include "cata_catch.h" diff --git a/tests/magic_spell_effect_test.cpp b/tests/magic_spell_effect_test.cpp index 685f765f332ba..03ac84e0526fd 100644 --- a/tests/magic_spell_effect_test.cpp +++ b/tests/magic_spell_effect_test.cpp @@ -1,11 +1,18 @@ +#include #include -#include +#include +#include +#include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "field.h" -#include "json.h" +#include "field_type.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "json_loader.h" #include "magic.h" #include "magic_spell_effect_helpers.h" diff --git a/tests/magic_spell_test.cpp b/tests/magic_spell_test.cpp index bccc5f525be5e..110b14be9ad27 100644 --- a/tests/magic_spell_test.cpp +++ b/tests/magic_spell_test.cpp @@ -1,14 +1,21 @@ -#include #include +#include #include #include "avatar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" +#include "dialogue_helpers.h" #include "game.h" #include "magic.h" +#include "magic_type.h" +#include "map.h" #include "map_helpers.h" #include "monster.h" +#include "npc.h" #include "pimpl.h" #include "player_helpers.h" #include "point.h" diff --git a/tests/make_static_test.cpp b/tests/make_static_test.cpp index aed7f6d69421f..090737df9aac5 100644 --- a/tests/make_static_test.cpp +++ b/tests/make_static_test.cpp @@ -1,4 +1,3 @@ -#include #include #include diff --git a/tests/map_bash_test.cpp b/tests/map_bash_test.cpp index d0aa93edfadbb..512663a67be24 100644 --- a/tests/map_bash_test.cpp +++ b/tests/map_bash_test.cpp @@ -1,10 +1,24 @@ +#include +#include +#include +#include +#include + #include "cata_catch.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "item.h" #include "map.h" -#include "mapdata.h" #include "map_helpers.h" +#include "mapdata.h" +#include "npc.h" #include "player_helpers.h" +#include "point.h" +#include "string_formatter.h" #include "test_data.h" +#include "type_id.h" static const furn_str_id furn_test_f_bash_persist( "test_f_bash_persist" ); static const furn_str_id furn_test_f_eoc( "test_f_eoc" ); diff --git a/tests/map_extra_test.cpp b/tests/map_extra_test.cpp index 49db3b22b6725..d5ec71777b489 100644 --- a/tests/map_extra_test.cpp +++ b/tests/map_extra_test.cpp @@ -1,11 +1,11 @@ #include #include -#include #include #include #include "cata_catch.h" #include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "map.h" #include "map_extras.h" diff --git a/tests/map_helpers.cpp b/tests/map_helpers.cpp index 7c03283ee5516..9eaa93a5a26b8 100644 --- a/tests/map_helpers.cpp +++ b/tests/map_helpers.cpp @@ -1,26 +1,24 @@ #include "map_helpers.h" -#include "catch/catch.hpp" - -#include -#include -#include #include -#include +#include #include +#include "avatar.h" +#include "basecamp.h" #include "calendar.h" -#include "cata_assert.h" +#include "catch/catch.hpp" #include "character.h" +#include "character_attire.h" #include "clzones.h" -#include "faction.h" +#include "coordinates.h" #include "field.h" #include "game.h" -#include "game_constants.h" #include "item.h" #include "map.h" #include "map_iterator.h" -#include "mapdata.h" +#include "map_scale_constants.h" +#include "monster.h" #include "npc.h" #include "overmapbuffer.h" #include "pocket_type.h" diff --git a/tests/map_helpers.h b/tests/map_helpers.h index 2a04613e665bf..68e604e5c233c 100644 --- a/tests/map_helpers.h +++ b/tests/map_helpers.h @@ -2,7 +2,7 @@ #ifndef CATA_TESTS_MAP_HELPERS_H #define CATA_TESTS_MAP_HELPERS_H -#include +#include #include "calendar.h" #include "coords_fwd.h" @@ -10,7 +10,6 @@ class map; class monster; -struct tripoint; void wipe_map_terrain( map *target = nullptr ); void clear_creatures(); diff --git a/tests/map_iterator_test.cpp b/tests/map_iterator_test.cpp index 6c26c7c8a5a68..1a0dcfbaed0eb 100644 --- a/tests/map_iterator_test.cpp +++ b/tests/map_iterator_test.cpp @@ -1,9 +1,13 @@ -#include "cata_catch.h" - #include #include +#include +#include +#include +#include "cata_catch.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "line.h" #include "map_iterator.h" #include "point.h" diff --git a/tests/map_memory_test.cpp b/tests/map_memory_test.cpp index bc845bc19b85f..db18c574f0c82 100644 --- a/tests/map_memory_test.cpp +++ b/tests/map_memory_test.cpp @@ -1,14 +1,15 @@ #include #include -#include -#include +#include +#include #include "cata_catch.h" -#include "game_constants.h" -#include "json.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "lru_cache.h" #include "map.h" #include "map_memory.h" +#include "map_scale_constants.h" #include "point.h" static constexpr tripoint_abs_ms p1{ -SEEX - 2, -SEEY - 3, -1 }; diff --git a/tests/map_path_test.cpp b/tests/map_path_test.cpp index ce7c3971d4711..3ee85e2c03536 100644 --- a/tests/map_path_test.cpp +++ b/tests/map_path_test.cpp @@ -1,9 +1,13 @@ +#include +#include + #include "cata_catch.h" #include "coordinates.h" #include "coords_fwd.h" -#include "game.h" #include "map.h" #include "map_helpers.h" +#include "map_iterator.h" +#include "point.h" #include "type_id.h" static void place_obstacle( map &m, const std::vector &places ) diff --git a/tests/map_test.cpp b/tests/map_test.cpp index cb156c11a4fc3..7cb7a93b3b277 100644 --- a/tests/map_test.cpp +++ b/tests/map_test.cpp @@ -1,19 +1,39 @@ -#include "cata_catch.h" -#include "map.h" - +#include +#include +#include #include +#include +#include +#include #include +#include "active_item_cache.h" #include "avatar.h" +#include "calendar.h" +#include "cata_catch.h" +#include "cata_scope_helpers.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "cuboid_rectangle.h" #include "enums.h" -#include "itype.h" #include "game.h" -#include "game_constants.h" +#include "item.h" +#include "item_contents.h" +#include "item_location.h" +#include "itype.h" +#include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" +#include "map_selector.h" +#include "monster.h" +#include "pocket_type.h" #include "point.h" +#include "ret_val.h" #include "submap.h" #include "type_id.h" +#include "units.h" +#include "value_ptr.h" +#include "weather.h" static const itype_id itype_almond_milk( "almond_milk" ); static const itype_id itype_bag_plastic( "bag_plastic" ); diff --git a/tests/map_test_case.cpp b/tests/map_test_case.cpp index 9fd0bc2aafbb4..064f47de5fca9 100644 --- a/tests/map_test_case.cpp +++ b/tests/map_test_case.cpp @@ -3,11 +3,14 @@ #include #include #include +#include #include "field.h" #include "level_cache.h" #include "map.h" #include "map_test_case.h" +#include "mdarray.h" +#include "shadowcasting.h" tripoint_bub_ms map_test_case::get_origin() { diff --git a/tests/map_test_case.h b/tests/map_test_case.h index aec12bbf80bbe..058037ed41b5b 100644 --- a/tests/map_test_case.h +++ b/tests/map_test_case.h @@ -2,15 +2,16 @@ #define CATA_TESTS_MAP_TEST_CASE_H #include -#include #include #include #include +#include #include #include "cata_catch.h" -#include "map.h" -#include "mapdata.h" +#include "type_id.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "point.h" /** diff --git a/tests/map_test_case_test.cpp b/tests/map_test_case_test.cpp index 7a1d3e4bd9edf..db79998882977 100644 --- a/tests/map_test_case_test.cpp +++ b/tests/map_test_case_test.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "map_test_case.h" diff --git a/tests/mapgen_helpers.cpp b/tests/mapgen_helpers.cpp index b6b35bfbb493b..9f25072cb0287 100644 --- a/tests/mapgen_helpers.cpp +++ b/tests/mapgen_helpers.cpp @@ -1,9 +1,16 @@ #include "mapgen_helpers.h" + +#include +#include + +#include "calendar.h" +#include "coordinates.h" #include "map.h" #include "mapgen.h" #include "mapgen_functions.h" #include "mapgendata.h" #include "overmapbuffer.h" +#include "weighted_list.h" static const oter_str_id oter_field( "field" ); diff --git a/tests/mapgen_helpers.h b/tests/mapgen_helpers.h index 2776dc517590b..ce01c04aae5df 100644 --- a/tests/mapgen_helpers.h +++ b/tests/mapgen_helpers.h @@ -1,13 +1,12 @@ #ifndef CATA_TESTS_MAPGEN_HELPERS_H #define CATA_TESTS_MAPGEN_HELPERS_H -#include "cached_options.h" -#include "cata_scope_helpers.h" -#include "coordinates.h" +#include + +#include "coords_fwd.h" #include "type_id.h" class map; -class vehicle; using fprep_t = std::function; diff --git a/tests/mapgen_place_vehicles_test.cpp b/tests/mapgen_place_vehicles_test.cpp index 5379815fac34b..01320963f5753 100644 --- a/tests/mapgen_place_vehicles_test.cpp +++ b/tests/mapgen_place_vehicles_test.cpp @@ -1,11 +1,14 @@ #include "avatar.h" #include "cata_catch.h" -#include "game.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" #include "mapgen_helpers.h" #include "player_helpers.h" -#include "vehicle.h" +#include "point.h" +#include "type_id.h" +#include "vpart_position.h" static const nested_mapgen_id nested_mapgen_test_nested_place_shopping_cart( "test_nested_place_shopping_cart" ); diff --git a/tests/mapgen_remove_npcs_test.cpp b/tests/mapgen_remove_npcs_test.cpp index 54552e27c1515..b0002315e63a3 100644 --- a/tests/mapgen_remove_npcs_test.cpp +++ b/tests/mapgen_remove_npcs_test.cpp @@ -1,13 +1,24 @@ +#include +#include +#include + #include "avatar.h" +#include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "game.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "mapgen_helpers.h" #include "npc.h" #include "overmapbuffer.h" #include "player_helpers.h" +#include "point.h" +#include "type_id.h" static const string_id npc_template_test_npc_trader( "test_npc_trader" ); static const string_id npc_template_thug( "thug" ); diff --git a/tests/mapgen_remove_vehicles_test.cpp b/tests/mapgen_remove_vehicles_test.cpp index 793a708f47db0..602072801a486 100644 --- a/tests/mapgen_remove_vehicles_test.cpp +++ b/tests/mapgen_remove_vehicles_test.cpp @@ -1,11 +1,17 @@ #include "avatar.h" #include "cata_catch.h" -#include "game.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "mapgen_helpers.h" #include "player_helpers.h" +#include "point.h" +#include "type_id.h" +#include "units.h" #include "vehicle.h" +#include "vpart_position.h" static const nested_mapgen_id nested_mapgen_test_nested_remove_all_1x1( "test_nested_remove_all_1x1" ); diff --git a/tests/martial_art_test.cpp b/tests/martial_art_test.cpp index 80cd87f89b708..2c461fa37cbed 100644 --- a/tests/martial_art_test.cpp +++ b/tests/martial_art_test.cpp @@ -1,14 +1,29 @@ -#include +#include +#include +#include +#include +#include +#include +#include "bodypart.h" +#include "calendar.h" #include "catch/catch.hpp" -#include "player_helpers.h" - -#include "avatar.h" #include "character_martial_arts.h" -#include "martialarts.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" +#include "item.h" +#include "magic_enchantment.h" #include "map_helpers.h" +#include "map_scale_constants.h" +#include "martialarts.h" +#include "monster.h" #include "mtype.h" #include "npc.h" +#include "pimpl.h" +#include "player_helpers.h" +#include "point.h" +#include "type_id.h" static const bodypart_str_id body_part_debug_tail( "debug_tail" ); static const efftype_id effect_downed( "downed" ); diff --git a/tests/materials_test.cpp b/tests/materials_test.cpp index a1343beaa6bcf..48757c3e3e94b 100644 --- a/tests/materials_test.cpp +++ b/tests/materials_test.cpp @@ -1,11 +1,24 @@ +#include +#include #include +#include +#include +#include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "damage.h" #include "fire.h" #include "item.h" -#include "cata_catch.h" +#include "item_location.h" #include "map_helpers.h" +#include "map_scale_constants.h" +#include "material.h" #include "npc.h" +#include "point.h" #include "projectile.h" +#include "string_formatter.h" +#include "type_id.h" static const ammo_effect_str_id ammo_effect_SHATTER_SELF( "SHATTER_SELF" ); diff --git a/tests/math_parser_test.cpp b/tests/math_parser_test.cpp index d9a1b4a21a803..7e1bcaec231e3 100644 --- a/tests/math_parser_test.cpp +++ b/tests/math_parser_test.cpp @@ -1,14 +1,25 @@ -#include "cata_catch.h" - +#include +#include #include +#include #include +#include +#include +#include +#include #include "avatar.h" +#include "cata_catch.h" +#include "cata_scope_helpers.h" +#include "debug.h" #include "dialogue.h" #include "global_vars.h" #include "math_parser.h" #include "math_parser_func.h" +#include "math_parser_type.h" #include "npc.h" +#include "talker.h" +#include "type_id.h" static const skill_id skill_survival( "survival" ); diff --git a/tests/mdarray_test.cpp b/tests/mdarray_test.cpp index 81f3148b4c66d..9a8d86be451ab 100644 --- a/tests/mdarray_test.cpp +++ b/tests/mdarray_test.cpp @@ -1,5 +1,7 @@ #include "cata_catch.h" - +#include "coordinates.h" +#include "coords_fwd.h" +#include "map_scale_constants.h" #include "mdarray.h" TEST_CASE( "mdarray_default_size_sensible", "[mdarray]" ) diff --git a/tests/melee_dodge_hit_test.cpp b/tests/melee_dodge_hit_test.cpp index 27c748cdb43fd..4893f9009f54c 100644 --- a/tests/melee_dodge_hit_test.cpp +++ b/tests/melee_dodge_hit_test.cpp @@ -1,21 +1,17 @@ -#include #include -#include +#include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" #include "creature.h" -#include "creature_tracker.h" #include "flag.h" -#include "game.h" #include "item.h" +#include "item_location.h" #include "map_helpers.h" -#include "monattack.h" #include "monster.h" #include "mtype.h" #include "player_helpers.h" -#include "point.h" #include "type_id.h" static const itype_id itype_roller_shoes_on( "roller_shoes_on" ); diff --git a/tests/melee_test.cpp b/tests/melee_test.cpp index 4de0ab66388b1..df634465e5e3c 100644 --- a/tests/melee_test.cpp +++ b/tests/melee_test.cpp @@ -1,14 +1,22 @@ +#include #include +#include #include #include +#include +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature.h" -#include "game_constants.h" #include "item.h" +#include "item_location.h" #include "map_helpers.h" -#include "monattack.h" +#include "map_scale_constants.h" +#include "messages.h" #include "monster.h" #include "mtype.h" #include "npc.h" diff --git a/tests/memorial_test.cpp b/tests/memorial_test.cpp index c251456f3ad1b..9a832d0dd4262 100644 --- a/tests/memorial_test.cpp +++ b/tests/memorial_test.cpp @@ -1,15 +1,15 @@ -#include -#include -#include +#include #include #include #include +#include #include #include "achievement.h" #include "avatar.h" #include "bodypart.h" #include "cata_catch.h" +#include "cata_utility.h" #include "character_id.h" #include "debug_menu.h" #include "event.h" @@ -19,7 +19,6 @@ #include "memorial_logger.h" #include "mutation.h" #include "npc.h" -#include "output.h" #include "player_helpers.h" #include "profession.h" #include "stats_tracker.h" diff --git a/tests/mission_test.cpp b/tests/mission_test.cpp index f292b206629cb..3762abbefe824 100644 --- a/tests/mission_test.cpp +++ b/tests/mission_test.cpp @@ -1,11 +1,21 @@ +#include +#include +#include + #include "avatar.h" #include "cata_catch.h" -#include "character.h" +#include "character_id.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "game.h" -#include "player_helpers.h" +#include "item.h" +#include "map.h" #include "map_helpers.h" #include "mission.h" #include "npc.h" +#include "player_helpers.h" +#include "point.h" +#include "type_id.h" static const itype_id itype_test_rock( "test_rock" ); diff --git a/tests/modify_morale_test.cpp b/tests/modify_morale_test.cpp index 55f3911bd8061..a2447a8adcbce 100644 --- a/tests/modify_morale_test.cpp +++ b/tests/modify_morale_test.cpp @@ -1,14 +1,16 @@ -#include -#include #include -#include +#include #include #include #include "avatar.h" #include "cata_catch.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "flag.h" #include "item.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" #include "point.h" diff --git a/tests/monfactions_test.cpp b/tests/monfactions_test.cpp index c73025dce64c3..64eb68ab3150e 100644 --- a/tests/monfactions_test.cpp +++ b/tests/monfactions_test.cpp @@ -1,8 +1,10 @@ +#include #include +#include +#include #include #include "cata_catch.h" -#include "filesystem.h" #include "monfaction.h" #include "type_id.h" diff --git a/tests/mongroup_test.cpp b/tests/mongroup_test.cpp index 9c8be281ded22..10c6bf930c940 100644 --- a/tests/mongroup_test.cpp +++ b/tests/mongroup_test.cpp @@ -1,18 +1,34 @@ +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include "calendar.h" #include "cata_catch.h" #include "cata_utility.h" +#include "character.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" +#include "enums.h" #include "game.h" -#include "item.h" #include "map.h" #include "map_helpers.h" #include "mongroup.h" +#include "monster.h" #include "mtype.h" #include "options.h" #include "options_helpers.h" #include "player_helpers.h" +#include "point.h" +#include "string_formatter.h" +#include "type_id.h" static const mongroup_id GROUP_PETS( "GROUP_PETS" ); static const mongroup_id GROUP_PET_DOGS( "GROUP_PET_DOGS" ); diff --git a/tests/monster_attack_test.cpp b/tests/monster_attack_test.cpp index a2e19e633723b..47a0a1ad36a17 100644 --- a/tests/monster_attack_test.cpp +++ b/tests/monster_attack_test.cpp @@ -1,32 +1,36 @@ #include -#include +#include +#include +#include +#include +#include -#include "cached_options.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "cata_scope_helpers.h" #include "character.h" #include "character_martial_arts.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature.h" -#include "line.h" +#include "effect.h" +#include "game.h" #include "map.h" #include "map_helpers.h" -#include "martialarts.h" -#include "mattack_actors.h" #include "mattack_common.h" #include "messages.h" -#include "monattack.h" #include "monster.h" #include "mtype.h" #include "options_helpers.h" +#include "pimpl.h" #include "player_helpers.h" #include "point.h" #include "test_statistics.h" #include "type_id.h" +#include "units.h" #include "weather.h" #include "weather_type.h" -#include "game.h" -#include "units.h" static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_grabbed( "grabbed" ); diff --git a/tests/monster_test.cpp b/tests/monster_test.cpp index 67b83286fbe9f..dd4141c52df4b 100644 --- a/tests/monster_test.cpp +++ b/tests/monster_test.cpp @@ -1,26 +1,29 @@ -#include #include #include +#include #include #include #include -#include #include #include #include #include -#include "cata_utility.h" +#include "avatar.h" +#include "calendar.h" #include "cata_catch.h" #include "cata_scope_helpers.h" #include "character.h" -#include "filesystem.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "game.h" -#include "game_constants.h" +#include "item.h" #include "line.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "monster.h" #include "monstergenerator.h" #include "mtype.h" @@ -30,8 +33,6 @@ #include "test_statistics.h" #include "type_id.h" -class item; - using move_statistics = statistics; static const mtype_id mon_dog_zombie_brute( "mon_dog_zombie_brute" ); diff --git a/tests/monster_vision_test.cpp b/tests/monster_vision_test.cpp index 50d9c25b71307..301f15d75e664 100644 --- a/tests/monster_vision_test.cpp +++ b/tests/monster_vision_test.cpp @@ -1,17 +1,15 @@ -#include "cached_options.h" #include "calendar.h" #include "cata_catch.h" -#include "cata_scope_helpers.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" -#include "mapdata.h" #include "monster.h" -#include "options_helpers.h" +#include "point.h" +#include "type_id.h" static const ter_str_id ter_t_floor( "t_floor" ); -struct tripoint; - static monster &spawn_and_clear( const tripoint_bub_ms &pos, bool set_floor ) { if( set_floor ) { diff --git a/tests/moon_test.cpp b/tests/moon_test.cpp index c1f7679861578..b5cc83a0011c2 100644 --- a/tests/moon_test.cpp +++ b/tests/moon_test.cpp @@ -1,4 +1,3 @@ -#include #include #include "calendar.h" diff --git a/tests/morale_test.cpp b/tests/morale_test.cpp index 2ab7a4429c4a9..11b40c91dbd4f 100644 --- a/tests/morale_test.cpp +++ b/tests/morale_test.cpp @@ -1,17 +1,24 @@ #include -#include -#include +#include +#include #include "avatar.h" #include "bodypart.h" +#include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "faction.h" #include "item.h" +#include "item_location.h" #include "map_helpers.h" #include "morale.h" #include "npc.h" +#include "pimpl.h" #include "player_helpers.h" -#include "calendar.h" +#include "point.h" +#include "subbodypart.h" #include "type_id.h" static const efftype_id effect_cold( "cold" ); diff --git a/tests/move_cost_test.cpp b/tests/move_cost_test.cpp index 494b03c52f1c5..efd656b41d5ed 100644 --- a/tests/move_cost_test.cpp +++ b/tests/move_cost_test.cpp @@ -1,10 +1,16 @@ #include "avatar.h" #include "avatar_action.h" +#include "bodypart.h" +#include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "flag.h" +#include "item.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" +#include "type_id.h" // Test cases related to movement cost // diff --git a/tests/mutation_test.cpp b/tests/mutation_test.cpp index 418a0e9596abe..0946a9b2857b0 100644 --- a/tests/mutation_test.cpp +++ b/tests/mutation_test.cpp @@ -1,15 +1,24 @@ +#include #include +#include +#include #include #include +#include #include #include +#include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "creature.h" +#include "dialogue.h" #include "effect_on_condition.h" +#include "enum_conversions.h" #include "mutation.h" #include "npc.h" #include "player_helpers.h" +#include "talker.h" #include "type_id.h" static const effect_on_condition_id effect_on_condition_changing_mutate2( "changing_mutate2" ); diff --git a/tests/name_test.cpp b/tests/name_test.cpp index 3cbb69b1bbcb9..0d73c1365bdb2 100644 --- a/tests/name_test.cpp +++ b/tests/name_test.cpp @@ -1,9 +1,10 @@ -#include +#include #include #include #include "cata_catch.h" -#include "enum_traits.h" +#include "cata_path.h" +#include "path_info.h" #include "text_snippets.h" class IsOneOf : public Catch::MatcherBase diff --git a/tests/nest_conditional_placement_test.cpp b/tests/nest_conditional_placement_test.cpp index 745b1f08d8040..cb7a2a9cb07c9 100644 --- a/tests/nest_conditional_placement_test.cpp +++ b/tests/nest_conditional_placement_test.cpp @@ -1,11 +1,16 @@ +#include + #include "cata_catch.h" #include "city.h" #include "coordinates.h" -#include "game_constants.h" +#include "coords_fwd.h" #include "map.h" +#include "map_scale_constants.h" +#include "omdata.h" #include "overmap.h" #include "overmapbuffer.h" -#include "test_data.h" +#include "point.h" +#include "type_id.h" static const oter_str_id oter_field( "field" ); static const oter_str_id oter_ncpt_predecessors( "ncpt_predecessors" ); diff --git a/tests/new_character_test.cpp b/tests/new_character_test.cpp index 63be23a7a8c66..19fe514b289f8 100644 --- a/tests/new_character_test.cpp +++ b/tests/new_character_test.cpp @@ -1,9 +1,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include #include @@ -12,7 +15,6 @@ #include "cata_catch.h" #include "inventory.h" #include "item.h" -#include "iuse.h" #include "mutation.h" #include "pimpl.h" #include "player_helpers.h" diff --git a/tests/normalized_test_names_test.cpp b/tests/normalized_test_names_test.cpp index cdc2a6c622042..70a17ee4db141 100644 --- a/tests/normalized_test_names_test.cpp +++ b/tests/normalized_test_names_test.cpp @@ -1,10 +1,8 @@ -#include "cata_catch.h" - -#include -#include -#include -#include #include +#include +#include + +#include "cata_catch.h" TEST_CASE( "enforce_normalized_test_cases" ) { diff --git a/tests/npc_attack_test.cpp b/tests/npc_attack_test.cpp index 8aebf1e6063c3..9a46d47db7b8f 100644 --- a/tests/npc_attack_test.cpp +++ b/tests/npc_attack_test.cpp @@ -1,15 +1,32 @@ -#include "catch/catch.hpp" +#include +#include +#include +#include "calendar.h" +#include "catch/catch.hpp" +#include "character.h" +#include "character_id.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" +#include "faction.h" #include "flag.h" #include "game.h" +#include "item.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" +#include "monster.h" #include "npc.h" #include "npc_attack.h" -#include "npc_class.h" #include "options_helpers.h" +#include "overmap_ui.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "type_id.h" static const faction_id faction_your_followers( "your_followers" ); diff --git a/tests/npc_behavior_rules_test.cpp b/tests/npc_behavior_rules_test.cpp index d5bc56b0d9409..8a16528ddbca0 100644 --- a/tests/npc_behavior_rules_test.cpp +++ b/tests/npc_behavior_rules_test.cpp @@ -1,43 +1,28 @@ -#include #include #include -#include -#include #include -#include #include -#include "calendar.h" #include "cata_catch.h" #include "character.h" -#include "common_types.h" -#include "creature_tracker.h" -#include "faction.h" -#include "field.h" -#include "field_type.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "game.h" #include "gates.h" -#include "line.h" #include "map.h" #include "map_helpers.h" +#include "map_iterator.h" #include "mapgen_helpers.h" #include "memory_fast.h" #include "npc.h" #include "npctalk.h" #include "overmapbuffer.h" -#include "pathfinding.h" -#include "pimpl.h" #include "player_helpers.h" #include "point.h" -#include "test_data.h" -#include "text_snippets.h" +#include "string_formatter.h" #include "type_id.h" #include "units.h" -#include "veh_type.h" #include "vehicle.h" -#include "vpart_position.h" - -class Creature; static const furn_str_id furn_f_chair( "f_chair" ); diff --git a/tests/npc_blacklist_test.cpp b/tests/npc_blacklist_test.cpp index 18e78ee77dca4..78635dff1d582 100644 --- a/tests/npc_blacklist_test.cpp +++ b/tests/npc_blacklist_test.cpp @@ -1,5 +1,7 @@ #include "cata_catch.h" +#include "item.h" #include "npc.h" +#include "type_id.h" static const itype_id itype_bow_saw( "bow_saw" ); diff --git a/tests/npc_shop_cons_rates_test.cpp b/tests/npc_shop_cons_rates_test.cpp index 8717607422dbf..a060556610748 100644 --- a/tests/npc_shop_cons_rates_test.cpp +++ b/tests/npc_shop_cons_rates_test.cpp @@ -1,6 +1,10 @@ #include "cata_catch.h" +#include "item.h" #include "npc.h" #include "npc_class.h" +#include "shop_cons_rate.h" +#include "type_id.h" +#include "units.h" static const itype_id itype_FMCNote( "FMCNote" ); static const itype_id itype_bow_saw( "bow_saw" ); diff --git a/tests/npc_shopkeeper_item_groups_test.cpp b/tests/npc_shopkeeper_item_groups_test.cpp index f5a3b7e129a82..52b65527a2c54 100644 --- a/tests/npc_shopkeeper_item_groups_test.cpp +++ b/tests/npc_shopkeeper_item_groups_test.cpp @@ -1,13 +1,29 @@ +#include +#include +#include +#include +#include + #include "avatar.h" #include "cata_catch.h" +#include "character_id.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature_tracker.h" #include "game.h" +#include "item.h" #include "item_group.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" #include "npc.h" #include "npc_class.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "type_id.h" static const itype_id itype_bag_plastic( "bag_plastic" ); static const itype_id itype_hammer( "hammer" ); diff --git a/tests/npc_talk_test.cpp b/tests/npc_talk_test.cpp index 9f71be0cfd90c..05f1d083907d1 100644 --- a/tests/npc_talk_test.cpp +++ b/tests/npc_talk_test.cpp @@ -1,34 +1,50 @@ #include +#include #include +#include #include +#include #include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "coordinates.h" +#include "coords_fwd.h" #include "dialogue.h" #include "dialogue_chatbin.h" +#include "dialogue_win.h" #include "effect.h" +#include "enums.h" #include "event.h" #include "event_bus.h" #include "faction.h" #include "game.h" +#include "global_vars.h" #include "input_enums.h" +#include "inventory.h" #include "item.h" #include "item_category.h" +#include "item_location.h" +#include "magic.h" #include "map.h" #include "map_helpers.h" +#include "messages.h" #include "mission.h" #include "npc.h" +#include "npc_opinion.h" #include "npctalk.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_helpers.h" #include "point.h" #include "type_id.h" +#include "units.h" +#include "weather.h" +#include "weather_gen.h" static const bionic_id bio_ads( "bio_ads" ); static const bionic_id bio_power_storage( "bio_power_storage" ); diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index b089af35aff9a..33c2c9ad64a2a 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -7,21 +8,29 @@ #include #include +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" #include "common_types.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "faction.h" #include "field.h" #include "field_type.h" #include "game.h" -#include "line.h" +#include "item.h" +#include "item_group.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" #include "memory_fast.h" +#include "monster.h" #include "npc.h" #include "npctalk.h" +#include "output.h" #include "overmapbuffer.h" #include "pathfinding.h" #include "pimpl.h" @@ -35,8 +44,6 @@ #include "vehicle.h" #include "vpart_position.h" -class Creature; - static const efftype_id effect_bouldering( "bouldering" ); static const efftype_id effect_sleep( "sleep" ); diff --git a/tests/options_helpers.cpp b/tests/options_helpers.cpp index 001d2a64497d4..b6f1d74f91a03 100644 --- a/tests/options_helpers.cpp +++ b/tests/options_helpers.cpp @@ -1,7 +1,11 @@ #include "options_helpers.h" +#include + +#include "calendar.h" #include "options.h" #include "weather.h" +#include "weather_type.h" override_option::override_option( const std::string &option, const std::string &value ) : option_( option ) diff --git a/tests/options_test.cpp b/tests/options_test.cpp index 656d7147bf9d6..964f3a42b41f2 100644 --- a/tests/options_test.cpp +++ b/tests/options_test.cpp @@ -1,5 +1,14 @@ +#include +#include +#include +#include +#include + #include "cata_catch.h" #include "options.h" +#include "string_formatter.h" +#include "translation.h" +#include "type_id.h" static const option_slider_id option_slider_test_world_difficulty( "test_world_difficulty" ); diff --git a/tests/overmap_noise_test.cpp b/tests/overmap_noise_test.cpp index 82d24fc2017e4..2bacdb53f445b 100644 --- a/tests/overmap_noise_test.cpp +++ b/tests/overmap_noise_test.cpp @@ -1,10 +1,13 @@ #include +#include +#include #include "cata_catch.h" #include "coordinates.h" -#include "filesystem.h" -#include "game_constants.h" +#include "coords_fwd.h" +#include "map_scale_constants.h" #include "overmap_noise.h" +#include "point.h" static void export_raw_noise( const std::string &filename, const om_noise::om_noise_layer &noise, int width, int height ) diff --git a/tests/overmap_test.cpp b/tests/overmap_test.cpp index d886f2c7c2ea1..a21b04cb48f8b 100644 --- a/tests/overmap_test.cpp +++ b/tests/overmap_test.cpp @@ -1,29 +1,46 @@ +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include -#include "all_enum_values.h" -#include "ammo.h" #include "calendar.h" #include "cata_catch.h" #include "city.h" #include "common_types.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" #include "enums.h" #include "game.h" -#include "game_constants.h" #include "global_vars.h" +#include "item.h" #include "item_factory.h" #include "itype.h" #include "map.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "mapbuffer.h" #include "omdata.h" #include "output.h" #include "overmap.h" #include "overmap_types.h" #include "overmapbuffer.h" +#include "point.h" +#include "recipe.h" +#include "rng.h" #include "test_data.h" #include "type_id.h" +#include "value_ptr.h" #include "vehicle.h" #include "vpart_position.h" diff --git a/tests/player_activities_test.cpp b/tests/player_activities_test.cpp index a0ad226ac1061..69e0eb7a85185 100644 --- a/tests/player_activities_test.cpp +++ b/tests/player_activities_test.cpp @@ -1,21 +1,45 @@ -#include "catch/catch.hpp" -#include "map_helpers.h" -#include "monster_helpers.h" -#include "player_helpers.h" -#include "activity_scheduling_helper.h" +#include +#include +#include +#include +#include +#include +#include #include "activity_actor_definitions.h" +#include "activity_type.h" #include "avatar.h" #include "calendar.h" +#include "catch/catch.hpp" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "enums.h" #include "flag.h" -#include "game.h" +#include "inventory.h" +#include "item.h" +#include "item_location.h" #include "itype.h" +#include "iuse.h" #include "iuse_actor.h" #include "map.h" +#include "map_helpers.h" +#include "mapdata.h" #include "monster.h" +#include "monster_helpers.h" +#include "npc.h" #include "options_helpers.h" +#include "pimpl.h" +#include "player_activity.h" +#include "player_helpers.h" +#include "pocket_type.h" #include "point.h" +#include "proficiency.h" +#include "ret_val.h" +#include "type_id.h" +#include "units.h" +#include "value_ptr.h" +#include "weather_type.h" static const activity_id ACT_AIM( "ACT_AIM" ); static const activity_id ACT_BOLTCUTTING( "ACT_BOLTCUTTING" ); diff --git a/tests/player_helpers.cpp b/tests/player_helpers.cpp index 4c689e018dc11..43449ec3d4a6a 100644 --- a/tests/player_helpers.cpp +++ b/tests/player_helpers.cpp @@ -1,20 +1,27 @@ #include #include #include +#include #include +#include #include #include #include "avatar.h" #include "bionics.h" +#include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" #include "character_id.h" #include "character_martial_arts.h" +#include "coordinates.h" #include "game.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "itype.h" +#include "magic.h" #include "make_static.h" #include "map.h" #include "npc.h" @@ -28,6 +35,7 @@ #include "skill.h" #include "stomach.h" #include "type_id.h" +#include "value_ptr.h" static const itype_id itype_debug_backpack( "debug_backpack" ); static const itype_id itype_debug_nutrition( "debug_nutrition" ); diff --git a/tests/player_helpers.h b/tests/player_helpers.h index da391f688091e..40ff1a206e145 100644 --- a/tests/player_helpers.h +++ b/tests/player_helpers.h @@ -2,15 +2,14 @@ #ifndef CATA_TESTS_PLAYER_HELPERS_H #define CATA_TESTS_PLAYER_HELPERS_H -#include +#include #include +#include "character.h" #include "coords_fwd.h" +#include "item.h" #include "npc.h" - -class item; -class Character; -struct point; +#include "type_id.h" int get_remaining_charges( const itype_id &tool_id ); bool player_has_item_of_type( const itype_id &id ); diff --git a/tests/player_test.cpp b/tests/player_test.cpp index 1070574487d1c..c51d136896632 100644 --- a/tests/player_test.cpp +++ b/tests/player_test.cpp @@ -1,14 +1,17 @@ #include #include -#include +#include #include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" #include "item.h" +#include "pimpl.h" #include "player_helpers.h" #include "type_id.h" +#include "units.h" #include "weather.h" static const itype_id itype_balclava( "balclava" ); diff --git a/tests/point_test.cpp b/tests/point_test.cpp index 94b3519243489..7aea3e813f46a 100644 --- a/tests/point_test.cpp +++ b/tests/point_test.cpp @@ -1,10 +1,15 @@ -#include +#include +#include +#include +#include +#include #include #include #include "cata_catch.h" #include "cata_scope_helpers.h" #include "coordinates.h" +#include "coords_fwd.h" #include "cuboid_rectangle.h" #include "point.h" diff --git a/tests/projectile_test.cpp b/tests/projectile_test.cpp index 5d8fc6b399cd7..aa3088d354c54 100644 --- a/tests/projectile_test.cpp +++ b/tests/projectile_test.cpp @@ -1,12 +1,12 @@ -#include #include #include -#include #include #include "ballistics.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature_tracker.h" #include "damage.h" #include "dispersion.h" diff --git a/tests/ranged_balance_test.cpp b/tests/ranged_balance_test.cpp index acdc7bace7727..1b8adeb1b9d6a 100644 --- a/tests/ranged_balance_test.cpp +++ b/tests/ranged_balance_test.cpp @@ -1,38 +1,40 @@ -#include +#include #include #include -#include +#include #include +#include #include #include +#include #include #include "anatomy.h" #include "ballistics.h" #include "bodypart.h" #include "calendar.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "cata_utility.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "creature.h" #include "dispersion.h" #include "game_constants.h" -#include "inventory.h" #include "item.h" #include "item_location.h" -#include "itype.h" #include "json.h" #include "map_helpers.h" #include "monster.h" #include "npc.h" -#include "pimpl.h" #include "player_helpers.h" #include "point.h" -#include "ret_val.h" +#include "ranged.h" +#include "rng.h" #include "test_statistics.h" #include "translations.h" #include "type_id.h" #include "units.h" -#include "value_ptr.h" static const character_modifier_id character_modifier_ranged_dispersion_manip_mod( "ranged_dispersion_manip_mod" ); diff --git a/tests/reading_test.cpp b/tests/reading_test.cpp index efa3d0a34ca56..36424896b9a7b 100644 --- a/tests/reading_test.cpp +++ b/tests/reading_test.cpp @@ -1,18 +1,25 @@ -#include -#include +#include #include #include #include -#include "avatar.h" #include "activity_actor_definitions.h" +#include "activity_type.h" +#include "avatar.h" +#include "bodypart.h" #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "map_helpers.h" +#include "player_activity.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "ret_val.h" #include "skill.h" #include "type_id.h" #include "value_ptr.h" diff --git a/tests/recipe_test.cpp b/tests/recipe_test.cpp index c29210406c71a..542bb8c4128d7 100644 --- a/tests/recipe_test.cpp +++ b/tests/recipe_test.cpp @@ -1,10 +1,14 @@ +#include #include #include +#include +#include +#include "build_reqs.h" #include "calendar.h" #include "cata_catch.h" -#include "character.h" #include "json.h" +#include "mapgendata.h" #include "recipe.h" #include "requirements.h" #include "type_id.h" diff --git a/tests/reload_magazine_test.cpp b/tests/reload_magazine_test.cpp index 084f9c1cc6048..06ea6e45809d9 100644 --- a/tests/reload_magazine_test.cpp +++ b/tests/reload_magazine_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -15,8 +14,6 @@ #include "type_id.h" #include "visitable.h" -struct itype; - static const ammotype ammo_223( "223" ); static const ammotype ammo_38( "38" ); diff --git a/tests/reload_option_test.cpp b/tests/reload_option_test.cpp index 568ea795aa6a5..a85ba6a98380e 100644 --- a/tests/reload_option_test.cpp +++ b/tests/reload_option_test.cpp @@ -1,9 +1,9 @@ -#include #include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "character_attire.h" #include "item.h" #include "item_location.h" #include "itype.h" diff --git a/tests/reload_time_test.cpp b/tests/reload_time_test.cpp index bafb030d4f658..90017fbc3f044 100644 --- a/tests/reload_time_test.cpp +++ b/tests/reload_time_test.cpp @@ -1,17 +1,20 @@ -#include "cata_catch.h" +#include +#include #include "activity_actor_definitions.h" #include "avatar.h" #include "calendar.h" -#include "creature_tracker.h" -#include +#include "cata_catch.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" +#include "item_location.h" #include "map.h" +#include "map_helpers.h" #include "player_helpers.h" #include "point.h" - -#include -#include "map_helpers.h" +#include "type_id.h" static const itype_id itype_ammo_pouch( "ammo_pouch" ); static const itype_id itype_arrow_wood( "arrow_wood" ); diff --git a/tests/reloading_test.cpp b/tests/reloading_test.cpp index ad3cb657a7e1d..7cbf67e6ed986 100644 --- a/tests/reloading_test.cpp +++ b/tests/reloading_test.cpp @@ -1,19 +1,25 @@ #include -#include #include #include +#include #include #include "activity_actor_definitions.h" #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "game.h" #include "item.h" +#include "item_contents.h" #include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" +#include "map_selector.h" #include "player_activity.h" #include "player_helpers.h" #include "pocket_type.h" diff --git a/tests/requirements_test.cpp b/tests/requirements_test.cpp index 729674877f943..b688e026b9ceb 100644 --- a/tests/requirements_test.cpp +++ b/tests/requirements_test.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include #include #include "cata_catch.h" diff --git a/tests/rng_test.cpp b/tests/rng_test.cpp index 7e35c3c6ad9ae..d82269b264611 100644 --- a/tests/rng_test.cpp +++ b/tests/rng_test.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include #include "cata_catch.h" diff --git a/tests/rot_test.cpp b/tests/rot_test.cpp index 39acfda432ba4..687aa14a1c674 100644 --- a/tests/rot_test.cpp +++ b/tests/rot_test.cpp @@ -1,10 +1,12 @@ #include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "item.h" #include "map.h" -#include "point.h" #include "type_id.h" +#include "units.h" #include "weather.h" static const flag_id json_flag_FROZEN( "FROZEN" ); diff --git a/tests/shadowcasting_test.cpp b/tests/shadowcasting_test.cpp index d38869a1e0630..e88260998fa07 100644 --- a/tests/shadowcasting_test.cpp +++ b/tests/shadowcasting_test.cpp @@ -1,19 +1,22 @@ -#include #include #include #include #include +#include +#include +#include #include -#include #include #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "cuboid_rectangle.h" -#include "game_constants.h" #include "level_cache.h" #include "lightmap.h" #include "line.h" // For rl_dist. #include "map.h" +#include "map_scale_constants.h" #include "mdarray.h" #include "point.h" #include "rng.h" diff --git a/tests/simple_pathfinding_test.cpp b/tests/simple_pathfinding_test.cpp index 9b1fcb6cb0405..7ba78c81d97a4 100644 --- a/tests/simple_pathfinding_test.cpp +++ b/tests/simple_pathfinding_test.cpp @@ -1,12 +1,16 @@ +#include +#include #include +#include #include "cata_catch.h" -#include "simple_pathfinding.h" - #include "coordinates.h" +#include "coords_fwd.h" #include "cuboid_rectangle.h" #include "line.h" +#include "omdata.h" #include "point.h" +#include "simple_pathfinding.h" template static void test_greedy_line_path() diff --git a/tests/skill_test.cpp b/tests/skill_test.cpp index 9c4abc38b07b7..d2ff4bfceec81 100644 --- a/tests/skill_test.cpp +++ b/tests/skill_test.cpp @@ -1,3 +1,5 @@ +#include + #include "calendar.h" #include "cata_catch.h" #include "character.h" diff --git a/tests/speed_description_test.cpp b/tests/speed_description_test.cpp index 4bec40b879192..12300195ad39f 100644 --- a/tests/speed_description_test.cpp +++ b/tests/speed_description_test.cpp @@ -1,10 +1,12 @@ +#include +#include +#include + #include "catch/catch.hpp" #include "monster.h" #include "mtype.h" #include "player_helpers.h" -#include "speed_description.h" - -#include +#include "type_id.h" static const mtype_id mon_test_speed_desc_base( "mon_test_speed_desc_base" ); static const mtype_id mon_test_speed_desc_base_150( "mon_test_speed_desc_base_150" ); diff --git a/tests/start_date_test.cpp b/tests/start_date_test.cpp index 1d2fab9d48063..ce0a6cc2f52ac 100644 --- a/tests/start_date_test.cpp +++ b/tests/start_date_test.cpp @@ -1,10 +1,12 @@ -#include "catch/catch.hpp" +#include +#include +#include "calendar.h" #include "cata_scope_helpers.h" +#include "catch/catch.hpp" #include "game.h" #include "scenario.h" -#include "options.h" -#include "options_helpers.h" +#include "string_id.h" static const string_id scenario_test_custom_both( "test_custom_both" ); static const string_id scenario_test_custom_cataclysm( "test_custom_cataclysm" ); diff --git a/tests/stats_tracker_test.cpp b/tests/stats_tracker_test.cpp index 0f84ec9a9f52f..aa529440d5771 100644 --- a/tests/stats_tracker_test.cpp +++ b/tests/stats_tracker_test.cpp @@ -1,17 +1,15 @@ -#include "cata_catch.h" -#include "stats_tracker.h" - -#include #include #include +#include #include -#include #include #include #include #include "achievement.h" +#include "bodypart.h" #include "calendar.h" +#include "cata_catch.h" #include "cata_variant.h" #include "character.h" #include "character_id.h" @@ -19,12 +17,15 @@ #include "event_bus.h" #include "event_statistics.h" #include "event_subscriber.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" #include "game.h" -#include "game_constants.h" -#include "json.h" #include "json_loader.h" +#include "map_scale_constants.h" +#include "mapdata.h" #include "options_helpers.h" #include "point.h" +#include "stats_tracker.h" #include "type_id.h" static const event_statistic_id event_statistic_avatar_damage_taken( "avatar_damage_taken" ); diff --git a/tests/stomach_contents_test.cpp b/tests/stomach_contents_test.cpp index c5c56ec0d1868..0c040982933d4 100644 --- a/tests/stomach_contents_test.cpp +++ b/tests/stomach_contents_test.cpp @@ -1,7 +1,9 @@ +#include #include -#include +#include #include +#include "activity_tracker.h" #include "avatar.h" #include "calendar.h" #include "cata_catch.h" diff --git a/tests/string_formatter_test.cpp b/tests/string_formatter_test.cpp index f83a416182df8..cc14ff8b8b31c 100644 --- a/tests/string_formatter_test.cpp +++ b/tests/string_formatter_test.cpp @@ -1,9 +1,12 @@ #include #include -#include +#include #include +#include +#include #include -#include +#include +#include #include "cata_catch.h" #include "cata_scope_helpers.h" diff --git a/tests/string_ids_test.cpp b/tests/string_ids_test.cpp index 0ecb3f11bcf7a..960227bc24d20 100644 --- a/tests/string_ids_test.cpp +++ b/tests/string_ids_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -9,10 +8,9 @@ #include "cata_catch.h" #include "field_type.h" #include "string_id_utils.h" +#include "to_string_id.h" #include "type_id.h" -class json_flag; - TEST_CASE( "sizeof_new_id", "[.][int_id][string_id]" ) { DYNAMIC_SECTION( "sizeof: int_id: " << sizeof( flag_id ) ) {} diff --git a/tests/string_test.cpp b/tests/string_test.cpp index 2425a9a3a573f..f8730b6bfc529 100644 --- a/tests/string_test.cpp +++ b/tests/string_test.cpp @@ -1,7 +1,14 @@ -#include +#include +#include #include +#include +#include +#include #include "cata_catch.h" +#include "cata_utility.h" +#include "catacharset.h" +#include "debug.h" #include "output.h" static void test_remove_color_tags( const std::string_view original, const std::string &expected ) diff --git a/tests/stringmaker.cpp b/tests/stringmaker.cpp index b5f07b9314667..c196ef390100d 100644 --- a/tests/stringmaker.cpp +++ b/tests/stringmaker.cpp @@ -1,6 +1,6 @@ #include "cata_variant.h" -#include "cuboid_rectangle.h" #include "dialogue.h" +#include "enum_conversions.h" #include "item.h" #include "stringmaker.h" diff --git a/tests/stringmaker.h b/tests/stringmaker.h index d95db15180253..4e2053f90a665 100644 --- a/tests/stringmaker.h +++ b/tests/stringmaker.h @@ -2,21 +2,21 @@ #ifndef CATA_TESTS_STRINGMAKER_H #define CATA_TESTS_STRINGMAKER_H -#include "cuboid_rectangle.h" +#include + +#include "calendar.h" #include "cata_catch.h" +#include "cata_variant.h" +#include "cuboid_rectangle.h" +#include "dialogue.h" +#include "item.h" +#include "line.h" +#include "point.h" #include "string_formatter.h" #include "string_id.h" // StringMaker specializations for Cata types for reporting via Catch2 macros -class item; -struct point; -struct rl_vec2d; -class cata_variant; -class time_duration; -class time_point; -struct talk_response; - namespace Catch { diff --git a/tests/submap_load_test.cpp b/tests/submap_load_test.cpp index b052d88358db4..8f536749c9e81 100644 --- a/tests/submap_load_test.cpp +++ b/tests/submap_load_test.cpp @@ -1,22 +1,27 @@ -#include +#include +#include #include #include #include -#include +#include #include +#include #include #include "calendar.h" #include "cata_catch.h" #include "colony.h" #include "construction.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" #include "field.h" -#include "game_constants.h" +#include "flexbuffer_json-inl.h" +#include "flexbuffer_json.h" #include "item.h" -#include "json.h" #include "json_loader.h" #include "make_static.h" -#include "mapdata.h" +#include "map_scale_constants.h" #include "point.h" #include "string_formatter.h" #include "submap.h" diff --git a/tests/submap_test.cpp b/tests/submap_test.cpp index 02ac388456ab4..dd07d9cc006c2 100644 --- a/tests/submap_test.cpp +++ b/tests/submap_test.cpp @@ -1,8 +1,9 @@ #include "cata_catch.h" -#include "submap.h" - -#include "game_constants.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "map_scale_constants.h" #include "point.h" +#include "submap.h" #include "type_id.h" TEST_CASE( "submap_rotation", "[submap]" ) diff --git a/tests/sun_test.cpp b/tests/sun_test.cpp index d18656a6cadb7..aa3cefdaa96c9 100644 --- a/tests/sun_test.cpp +++ b/tests/sun_test.cpp @@ -1,17 +1,21 @@ -#include "cata_catch.h" #include "calendar.h" // IWYU pragma: associated +#include +#include +#include #include #include +#include #include +#include #include +#include "cata_catch.h" #include "cata_scope_helpers.h" #include "hash_utils.h" #include "line.h" #include "options_helpers.h" -#include "output.h" -#include "stringmaker.h" +#include "units.h" #include "units_utility.h" // SUN TESTS diff --git a/tests/temperature_test.cpp b/tests/temperature_test.cpp index f6a69504c0f0a..69c1109b490eb 100644 --- a/tests/temperature_test.cpp +++ b/tests/temperature_test.cpp @@ -1,12 +1,14 @@ #include "calendar.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "flag.h" #include "game_constants.h" #include "item.h" #include "map.h" -#include "point.h" +#include "type_id.h" +#include "units.h" #include "weather.h" static const itype_id itype_meat_cooked( "meat_cooked" ); diff --git a/tests/test_statistics.h b/tests/test_statistics.h index 3270ce26e7c0a..da1376a6b665b 100644 --- a/tests/test_statistics.h +++ b/tests/test_statistics.h @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include #include diff --git a/tests/text_snippets_test.cpp b/tests/text_snippets_test.cpp index c3339eb2e9918..16290de80e699 100644 --- a/tests/text_snippets_test.cpp +++ b/tests/text_snippets_test.cpp @@ -1,9 +1,9 @@ -#include #include +#include #include "cata_catch.h" #include "text_snippets.h" -#include "translations.h" +#include "translation.h" TEST_CASE( "random_snippet_with_small_seed", "[text_snippets][rng]" ) { diff --git a/tests/throw_activation_test.cpp b/tests/throw_activation_test.cpp index bf3db25466925..16af006c2a8de 100644 --- a/tests/throw_activation_test.cpp +++ b/tests/throw_activation_test.cpp @@ -1,7 +1,9 @@ -#include "calendar.h" #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "item.h" #include "map.h" +#include "type_id.h" static const field_type_str_id field_fd_acid( "fd_acid" ); diff --git a/tests/throwing_test.cpp b/tests/throwing_test.cpp index 9fd118ecd574c..3c58d9d90b0b3 100644 --- a/tests/throwing_test.cpp +++ b/tests/throwing_test.cpp @@ -1,16 +1,19 @@ #include #include #include +#include #include #include "avatar.h" #include "calendar.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "damage.h" #include "game.h" #include "game_constants.h" #include "item.h" -#include "line.h" #include "map_helpers.h" #include "monster.h" #include "npc.h" diff --git a/tests/tool_quality_test.cpp b/tests/tool_quality_test.cpp index 204672af5091f..5cf58c0aec87f 100644 --- a/tests/tool_quality_test.cpp +++ b/tests/tool_quality_test.cpp @@ -1,7 +1,17 @@ -#include "avatar.h" +#include +#include +#include +#include + #include "cata_catch.h" +#include "character.h" +#include "character_attire.h" +#include "item.h" +#include "item_location.h" #include "itype.h" #include "player_helpers.h" +#include "pocket_type.h" +#include "ret_val.h" #include "type_id.h" static const itype_id itype_UPS_ON( "UPS_ON" ); diff --git a/tests/translation_system_test.cpp b/tests/translation_system_test.cpp index 5022aed0460eb..ae6691841fe83 100644 --- a/tests/translation_system_test.cpp +++ b/tests/translation_system_test.cpp @@ -1,10 +1,18 @@ #include #include +#include +#include +#include +#include +#include + #include "cata_catch.h" #include "filesystem.h" #include "string_formatter.h" #include "translation_document.h" +#include "translation_manager.h" #include "translation_manager_impl.h" +#include "translation_plural_evaluator.h" #if defined(LOCALIZE) diff --git a/tests/translations_test.cpp b/tests/translations_test.cpp index c8688336f7c9d..62694f30719ea 100644 --- a/tests/translations_test.cpp +++ b/tests/translations_test.cpp @@ -1,8 +1,8 @@ -#include #include #include #include "cata_catch.h" +#include "translation.h" #include "translations.h" // wrapping in another macro to prevent collection of the test string for translation diff --git a/tests/try_parse_integer_test.cpp b/tests/try_parse_integer_test.cpp index 41d91834aef3a..9f10075816961 100644 --- a/tests/try_parse_integer_test.cpp +++ b/tests/try_parse_integer_test.cpp @@ -1,5 +1,12 @@ +#include +#include +#include +#include + #include "cata_catch.h" #include "cata_scope_helpers.h" +#include "demangle.h" +#include "ret_val.h" #include "try_parse_integer.h" template diff --git a/tests/uncraft_test.cpp b/tests/uncraft_test.cpp index 32321952ff8ca..77454c3c63123 100644 --- a/tests/uncraft_test.cpp +++ b/tests/uncraft_test.cpp @@ -1,12 +1,19 @@ +#include +#include + #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" #include "item.h" #include "item_location.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" +#include "recipe.h" #include "recipe_dictionary.h" +#include "type_id.h" // Tests for disassembling items from an "uncraft" recipe. // diff --git a/tests/units_test.cpp b/tests/units_test.cpp index 5f66d105ed167..20b68c0083091 100644 --- a/tests/units_test.cpp +++ b/tests/units_test.cpp @@ -1,11 +1,9 @@ -#include #include -#include #include "calendar.h" -#include "cata_utility.h" #include "cata_catch.h" -#include "json.h" +#include "cata_utility.h" +#include "flexbuffer_json.h" #include "json_loader.h" #include "math_defines.h" #include "options_helpers.h" diff --git a/tests/unload_naked_test.cpp b/tests/unload_naked_test.cpp index 4c453c786d9eb..17ece926b0e86 100644 --- a/tests/unload_naked_test.cpp +++ b/tests/unload_naked_test.cpp @@ -1,13 +1,13 @@ -#include -#include -#include +#include +#include #include "avatar.h" -#include "calendar.h" #include "catch/catch.hpp" +#include "character.h" #include "item.h" -#include "map.h" +#include "item_location.h" #include "map_helpers.h" +#include "player_activity.h" #include "player_helpers.h" #include "type_id.h" diff --git a/tests/unseal_and_spill_test.cpp b/tests/unseal_and_spill_test.cpp index 60cbfdd790b02..5f961b1ced163 100644 --- a/tests/unseal_and_spill_test.cpp +++ b/tests/unseal_and_spill_test.cpp @@ -1,11 +1,10 @@ -#include #include -#include #include #include #include #include #include +#include #include #include "avatar.h" @@ -13,16 +12,17 @@ #include "cata_catch.h" #include "cata_scope_helpers.h" #include "character.h" -#include "colony.h" +#include "character_attire.h" #include "contents_change_handler.h" +#include "coordinates.h" #include "item.h" #include "item_location.h" #include "item_pocket.h" -#include "item_stack.h" #include "map.h" #include "map_helpers.h" #include "map_selector.h" #include "player_helpers.h" +#include "pocket_type.h" #include "ret_val.h" #include "type_id.h" #include "units.h" diff --git a/tests/value_ptr_test.cpp b/tests/value_ptr_test.cpp index 9139ff5040c0f..386ce25318ad8 100644 --- a/tests/value_ptr_test.cpp +++ b/tests/value_ptr_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include "cata_catch.h" #include "value_ptr.h" diff --git a/tests/vehicle_drag_test.cpp b/tests/vehicle_drag_test.cpp index 492ce51eb66c9..b4e7a3c007a9a 100644 --- a/tests/vehicle_drag_test.cpp +++ b/tests/vehicle_drag_test.cpp @@ -1,11 +1,13 @@ #include -#include -#include +#include +#include #include #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" #include "point.h" diff --git a/tests/vehicle_efficiency_test.cpp b/tests/vehicle_efficiency_test.cpp index d25101cf19f74..2e415ebc0f005 100644 --- a/tests/vehicle_efficiency_test.cpp +++ b/tests/vehicle_efficiency_test.cpp @@ -13,10 +13,11 @@ #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "enums.h" #include "item.h" #include "itype.h" -#include "line.h" #include "map.h" #include "map_helpers.h" #include "point.h" diff --git a/tests/vehicle_export_test.cpp b/tests/vehicle_export_test.cpp index 7aa038e62ba85..9b9bc91fd79fb 100644 --- a/tests/vehicle_export_test.cpp +++ b/tests/vehicle_export_test.cpp @@ -1,12 +1,24 @@ -#include +#include +#include +#include +#include #include #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "flexbuffer_json.h" +#include "flexbuffer_json-inl.h" +#include "json.h" #include "json_loader.h" +#include "map.h" #include "map_helpers.h" -#include "vehicle.h" +#include "point.h" +#include "type_id.h" +#include "units.h" #include "veh_type.h" +#include "vehicle.h" static const vproto_id vehicle_prototype_veh_export_test( "veh_export_test" ); diff --git a/tests/vehicle_fake_part_test.cpp b/tests/vehicle_fake_part_test.cpp index c9519ce3210e5..b4c3c6969fbdf 100644 --- a/tests/vehicle_fake_part_test.cpp +++ b/tests/vehicle_fake_part_test.cpp @@ -1,23 +1,26 @@ -#include -#include +#include +#include +#include +#include #include #include "action.h" -#include "avatar.h" +#include "cata_assert.h" #include "catch/catch.hpp" -#include "damage.h" -#include "enums.h" -#include "game.h" -#include "item.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" #include "point.h" +#include "tileray.h" #include "type_id.h" +#include "units.h" +#include "veh_type.h" #include "vehicle.h" #include "vpart_position.h" #include "vpart_range.h" -#include "veh_type.h" static const vproto_id vehicle_prototype_bicycle( "bicycle" ); static const vproto_id vehicle_prototype_obstacle_test( "obstacle_test" ); diff --git a/tests/vehicle_interact_test.cpp b/tests/vehicle_interact_test.cpp index 3d00cc59593b5..fa438e75430c1 100644 --- a/tests/vehicle_interact_test.cpp +++ b/tests/vehicle_interact_test.cpp @@ -1,13 +1,17 @@ #include -#include +#include #include #include #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "enums.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" @@ -20,6 +24,7 @@ #include "veh_appliance.h" #include "veh_type.h" #include "vehicle.h" +#include "vpart_position.h" static const itype_id itype_UPS_ON( "UPS_ON" ); static const itype_id itype_battery_ups( "battery_ups" ); diff --git a/tests/vehicle_part_test.cpp b/tests/vehicle_part_test.cpp index b3916b51e38f0..bc9ebc96ca619 100644 --- a/tests/vehicle_part_test.cpp +++ b/tests/vehicle_part_test.cpp @@ -1,10 +1,11 @@ -#include -#include +#include +#include #include #include #include #include #include +#include #include #include @@ -12,10 +13,11 @@ #include "calendar.h" #include "cata_catch.h" #include "character.h" -#include "damage.h" -#include "game.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" @@ -26,8 +28,9 @@ #include "requirements.h" #include "type_id.h" #include "units.h" -#include "veh_utils.h" +#include "value_ptr.h" #include "veh_type.h" +#include "veh_utils.h" #include "vehicle.h" #include "vpart_position.h" #include "vpart_range.h" diff --git a/tests/vehicle_power_test.cpp b/tests/vehicle_power_test.cpp index 2f24ec884e029..cf3375f701e95 100644 --- a/tests/vehicle_power_test.cpp +++ b/tests/vehicle_power_test.cpp @@ -1,9 +1,16 @@ +#include #include +#include +#include #include #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" +#include "item.h" #include "map.h" #include "map_helpers.h" #include "options_helpers.h" @@ -11,7 +18,7 @@ #include "type_id.h" #include "units.h" #include "vehicle.h" -#include "weather.h" +#include "vpart_position.h" #include "weather_type.h" static const efftype_id effect_blind( "blind" ); diff --git a/tests/vehicle_ramp_test.cpp b/tests/vehicle_ramp_test.cpp index f442a8736e97b..458d4624642ea 100644 --- a/tests/vehicle_ramp_test.cpp +++ b/tests/vehicle_ramp_test.cpp @@ -1,7 +1,6 @@ #include -#include +#include #include -#include #include #include #include @@ -10,11 +9,14 @@ #include "calendar.h" #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "game.h" -#include "game_constants.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "monster.h" #include "point.h" #include "tileray.h" diff --git a/tests/vehicle_split_test.cpp b/tests/vehicle_split_test.cpp index 805aace258f58..1545d3ad6befe 100644 --- a/tests/vehicle_split_test.cpp +++ b/tests/vehicle_split_test.cpp @@ -1,8 +1,11 @@ +#include #include #include #include "cata_catch.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "map.h" #include "map_helpers.h" #include "point.h" diff --git a/tests/vehicle_test.cpp b/tests/vehicle_test.cpp index 5edbf5710d8c3..465e1171223ec 100644 --- a/tests/vehicle_test.cpp +++ b/tests/vehicle_test.cpp @@ -1,23 +1,36 @@ +#include +#include #include +#include +#include #include +#include "activity_actor.h" +#include "activity_actor_definitions.h" #include "avatar.h" #include "cata_catch.h" #include "character.h" -#include "damage.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "debug.h" #include "enums.h" #include "item.h" #include "itype.h" #include "map.h" #include "map_helpers.h" -#include "activity_actor_definitions.h" +#include "map_scale_constants.h" +#include "player_activity.h" #include "player_helpers.h" #include "point.h" +#include "ret_val.h" #include "type_id.h" #include "units.h" #include "veh_appliance.h" -#include "vehicle.h" #include "veh_type.h" +#include "vehicle.h" +#include "vpart_position.h" +#include "vpart_range.h" static const damage_type_id damage_pure( "pure" ); diff --git a/tests/vehicle_turrets_test.cpp b/tests/vehicle_turrets_test.cpp index c97f868336eaf..5226b22fe7d63 100644 --- a/tests/vehicle_turrets_test.cpp +++ b/tests/vehicle_turrets_test.cpp @@ -1,27 +1,26 @@ -#include "cata_catch.h" - -#include -#include #include -#include +#include #include -#include "ammo.h" +#include "cata_catch.h" #include "character.h" #include "coordinates.h" +#include "coords_fwd.h" +#include "explosion.h" #include "item.h" -#include "item_location.h" #include "itype.h" -#include "make_static.h" #include "map.h" #include "map_helpers.h" #include "player_helpers.h" #include "point.h" +#include "ret_val.h" #include "type_id.h" #include "units.h" #include "value_ptr.h" #include "veh_type.h" #include "vehicle.h" +#include "vpart_position.h" +#include "vpart_range.h" static const ammo_effect_str_id ammo_effect_RECYCLED( "RECYCLED" ); diff --git a/tests/vision_test.cpp b/tests/vision_test.cpp index a5b35d28f2872..69c3a6704dce5 100644 --- a/tests/vision_test.cpp +++ b/tests/vision_test.cpp @@ -1,33 +1,35 @@ #include -#include #include -#include #include #include #include +#include #include #include "avatar.h" -#include "cached_options.h" #include "calendar.h" #include "cata_catch.h" -#include "cata_scope_helpers.h" #include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "game.h" -#include "item.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" #include "map_test_case.h" -#include "mapdata.h" +#include "monster.h" #include "mtype.h" #include "options_helpers.h" #include "player_helpers.h" #include "point.h" +#include "string_formatter.h" #include "type_id.h" #include "units.h" #include "vehicle.h" #include "vpart_position.h" #include "vpart_range.h" +#include "weather_type.h" static const efftype_id effect_narcosis( "narcosis" ); diff --git a/tests/visitable_remove_test.cpp b/tests/visitable_remove_test.cpp index 99e2b50d86096..69f2f629fe9a0 100644 --- a/tests/visitable_remove_test.cpp +++ b/tests/visitable_remove_test.cpp @@ -1,22 +1,23 @@ #include #include #include -#include -#include #include #include #include "calendar.h" -#include "cata_utility.h" #include "cata_catch.h" +#include "cata_utility.h" #include "character.h" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "inventory.h" #include "item.h" +#include "item_location.h" #include "itype.h" #include "map.h" #include "map_helpers.h" #include "map_selector.h" -#include "pimpl.h" #include "player_helpers.h" #include "point.h" #include "rng.h" diff --git a/tests/visitable_zone_test.cpp b/tests/visitable_zone_test.cpp index c04892e493663..5025453d2c00b 100644 --- a/tests/visitable_zone_test.cpp +++ b/tests/visitable_zone_test.cpp @@ -1,13 +1,22 @@ +#include +#include +#include +#include + #include "cata_catch.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "creature.h" #include "creature_tracker.h" #include "cuboid_rectangle.h" #include "map.h" #include "map_helpers.h" #include "map_iterator.h" +#include "map_scale_constants.h" #include "monster.h" +#include "point.h" #include "rng.h" - -#include +#include "type_id.h" // The area of the whole map from two below to one above ground level. static const tripoint_bub_ms p1( 0, 0, -2 ); diff --git a/tests/water_movement_test.cpp b/tests/water_movement_test.cpp index d135d44fdc84b..47f407209a497 100644 --- a/tests/water_movement_test.cpp +++ b/tests/water_movement_test.cpp @@ -1,18 +1,31 @@ +#include #include +#include +#include +#include #include +#include +#include #include +#include #include "avatar.h" #include "avatar_action.h" +#include "calendar.h" #include "cata_catch.h" -#include "creature.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "game.h" +#include "item.h" #include "map.h" #include "map_helpers.h" #include "mutation.h" +#include "player_helpers.h" +#include "point.h" #include "profession.h" #include "skill.h" -#include "player_helpers.h" +#include "string_formatter.h" #include "type_id.h" static const efftype_id effect_winded( "winded" ); diff --git a/tests/weakpoint_test.cpp b/tests/weakpoint_test.cpp index e7e3631d013cd..707bfb14175b2 100644 --- a/tests/weakpoint_test.cpp +++ b/tests/weakpoint_test.cpp @@ -1,15 +1,22 @@ +#include +#include +#include #include #include +#include #include "avatar.h" +#include "bodypart.h" #include "cata_catch.h" +#include "character.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "damage.h" -#include "game_constants.h" #include "monster.h" #include "mtype.h" #include "player_helpers.h" -#include "point.h" #include "type_id.h" +#include "weakpoint.h" static const damage_type_id damage_bash( "bash" ); static const damage_type_id damage_bullet( "bullet" ); diff --git a/tests/weary_test.cpp b/tests/weary_test.cpp index 6bd4abba3acb3..8796f3c95d6fb 100644 --- a/tests/weary_test.cpp +++ b/tests/weary_test.cpp @@ -1,10 +1,14 @@ +#include +#include + #include "activity_actor_definitions.h" #include "activity_scheduling_helper.h" +#include "activity_tracker.h" +#include "activity_type.h" #include "avatar.h" #include "calendar.h" #include "cata_catch.h" #include "player_helpers.h" -#include "point.h" #include "type_id.h" static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); diff --git a/tests/weather_test.cpp b/tests/weather_test.cpp index e608466d585d3..cd62fac19ee32 100644 --- a/tests/weather_test.cpp +++ b/tests/weather_test.cpp @@ -1,14 +1,21 @@ #include +#include +#include #include -#include +#include +#include +#include #include #include "calendar.h" #include "cata_catch.h" #include "cata_scope_helpers.h" +#include "coordinates.h" +#include "coords_fwd.h" #include "options_helpers.h" -#include "point.h" +#include "pimpl.h" #include "type_id.h" +#include "units.h" #include "weather.h" #include "weather_gen.h" #include "weather_type.h" diff --git a/tests/widget_test.cpp b/tests/widget_test.cpp index 3c55ee9a6922b..80cf1b7c3945a 100644 --- a/tests/widget_test.cpp +++ b/tests/widget_test.cpp @@ -1,22 +1,50 @@ -#include "catch/catch.hpp" - +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "activity_tracker.h" +#include "avatar.h" +#include "bodypart.h" +#include "calendar.h" +#include "cata_scope_helpers.h" #include "cata_utility.h" +#include "catch/catch.hpp" +#include "character_attire.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "cursesdef.h" +#include "effect.h" #include "game.h" #include "game_constants.h" -#include "player_helpers.h" -#include "map.h" +#include "item.h" +#include "magic.h" #include "map_helpers.h" #include "mission.h" #include "monster.h" -#include "morale.h" -#include "overmapbuffer.h" #include "options_helpers.h" +#include "overmap.h" +#include "overmap_ui.h" +#include "overmapbuffer.h" +#include "pimpl.h" +#include "player_helpers.h" +#include "point.h" +#include "string_formatter.h" +#include "translation.h" +#include "type_id.h" +#include "units.h" #include "weather.h" #include "weather_type.h" #include "widget.h" -#include - // Needed for screen scraping #if defined(TILES) #include "cursesport.h" diff --git a/tests/wield_times_test.cpp b/tests/wield_times_test.cpp index 26d40674f7c79..9e0674ec26d81 100644 --- a/tests/wield_times_test.cpp +++ b/tests/wield_times_test.cpp @@ -1,9 +1,11 @@ -#include "cata_catch.h" - #include +#include #include "avatar.h" #include "calendar.h" +#include "cata_catch.h" +#include "character_attire.h" +#include "coordinates.h" #include "item.h" #include "item_location.h" #include "map.h" diff --git a/tests/worldfactory_test.cpp b/tests/worldfactory_test.cpp index 046180e0e277a..21dd72cc1540d 100644 --- a/tests/worldfactory_test.cpp +++ b/tests/worldfactory_test.cpp @@ -1,3 +1,6 @@ +#include +#include + #include "cata_catch.h" #include "worldfactory.h" diff --git a/tests/zones_custom_test.cpp b/tests/zones_custom_test.cpp index 465b9a805ef9c..ce30ca7c4e5b1 100644 --- a/tests/zones_custom_test.cpp +++ b/tests/zones_custom_test.cpp @@ -1,7 +1,17 @@ +#include + #include "cata_catch.h" #include "clzones.h" +#include "coordinates.h" +#include "coords_fwd.h" +#include "item.h" #include "map.h" #include "map_helpers.h" +#include "map_scale_constants.h" +#include "pocket_type.h" +#include "point.h" +#include "ret_val.h" +#include "type_id.h" static const itype_id itype_bag_plastic( "bag_plastic" ); static const itype_id itype_bow_saw( "bow_saw" ); diff --git a/tools/iwyu/cpp.generic.imp b/tools/iwyu/cpp.generic.imp new file mode 100644 index 0000000000000..e0da58cca4c20 --- /dev/null +++ b/tools/iwyu/cpp.generic.imp @@ -0,0 +1,40 @@ +[ + { include: ["", "public", "", "public"] }, + + { symbol: ["std::ceil", "private", "", "public"] }, + { symbol: ["std::round", "private", "", "public"] }, + { symbol: ["std::pow", "private", "", "public"] }, + { symbol: ["std::fstream", "private", "", "public"] }, + { symbol: ["std::ifstream", "private", "", "public"] }, + { symbol: ["std::ofstream", "private", "", "public"] }, + { symbol: ["std::stringstream", "private", "", "public"] }, + { symbol: ["std::istringstream", "private", "", "public"] }, + { symbol: ["std::ostringstream", "private", "", "public"] }, + { symbol: ["std::hash", "private", "", "public"] }, + { symbol: ["std::hash", "private", "", "public"] }, + { symbol: ["std::hash", "private", "", "public"] }, + { symbol: ["std::addressof", "private", "", "public"] }, + { symbol: ["std::forward", "private", "", "public"] }, + { symbol: ["std::move", "private", "", "public"] }, + { symbol: ["std::fill", "private", "", "public"] }, + { symbol: ["std::find", "private", "", "public"] }, + { symbol: ["std::memchr", "private", "", "public"] }, + + { symbol: ["std::qsort", "private", "", "public"] }, + + { symbol: ["uint8_t", "private", "", "public"] }, + + + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + + {symbol: ["std::min", "private", "", "public"]}, + {symbol: ["std::max", "private", "", "public"]}, + + {symbol: ["errno", "private", "", "public"]}, + {symbol: ["std::abort", "private", "", "public"]}, + {symbol: ["abort", "private", "", "public"]}, +] diff --git a/tools/iwyu/gcc.stdlib.imp b/tools/iwyu/gcc.stdlib.imp index 5fbacbf672cdf..e9234004efe6b 100644 --- a/tools/iwyu/gcc.stdlib.imp +++ b/tools/iwyu/gcc.stdlib.imp @@ -1,4 +1,6 @@ [ + { "ref": "cpp.generic.imp" }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -21,11 +23,11 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, - { include: ["", "public", "", "public"] }, - { include: ["", "public", "", "public"] }, - { include: ["", "public", "", "public"] }, - { include: ["", "public", "", "public"] }, - { include: ["", "public", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -41,16 +43,6 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, - { symbol: ["std::ceil", "private", "", "public"] }, - { symbol: ["std::round", "private", "", "public"] }, - { symbol: ["std::pow", "private", "", "public"] }, - { symbol: ["std::fstream", "private", "", "public"] }, - { symbol: ["std::ifstream", "private", "", "public"] }, - { symbol: ["std::ofstream", "private", "", "public"] }, - { symbol: ["std::stringstream", "private", "", "public"] }, - { symbol: ["std::istringstream", "private", "", "public"] }, - { symbol: ["std::ostringstream", "private", "", "public"] }, - { symbol: ["std::hash", "private", "", "public"] }, - { symbol: ["std::hash", "private", "", "public"] }, - { symbol: ["std::hash", "private", "", "public"] }, + + ] diff --git a/tools/iwyu/running-on-windows.md b/tools/iwyu/running-on-windows.md new file mode 100644 index 0000000000000..ad26d158b77ba --- /dev/null +++ b/tools/iwyu/running-on-windows.md @@ -0,0 +1,124 @@ +this is a bit poorly structured, but leaving for posterity. +I just really wanted to avoid WSL. And I also failed to make this work in msys. So Powershell+MSVS here we go. + +# step 1: build clang. I chose clang-19 because that's the latest at the moment, but this is up to you. +YOU CANNOT USE PRE-BUILT CLANG downloadable from their github. It was compiled on different machine with different symbols. You'll be sad if you try. +You can't skip this step. + +Generic docs are on the website: https://clang.llvm.org/get_started.html +Slightly modified for my own needs: + +```ps1 +git clone --depth=1 --branch=llvmorg-19.1.6 https://github.com/llvm/llvm-project.git llvm-19 +# cmake was getting stuck running git update-index for some reason. Running it manually fixed the issue, but it might be placebo +cd llvm-19 ; git update-index --refresh ; cd .. +mkdir -p build-19-msvc +cd build-19-msvc +cmake '-DLLVM_ENABLE_PROJECTS=clang;lld' -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 ..\llvm-19\llvm\ +cmake --build . --config=Release --target=lld --target=clang -j4 +``` +Two things of note: +- `-DLLVM_TARGETS_TO_BUILD=X86` is neccessary to make the build take less than eternity +- `lld` is somehow a separate project and is somehow neccessary for the clang to work [without extra difficulties] + +# step2: build iwuy. +Surprisingly straightforward actually. Official docs: https://github.com/include-what-you-use/include-what-you-use + +```ps1 +git clone https://github.com/include-what-you-use/include-what-you-use.git +cd include-what-you-use +git checkout clang_19 +mkdir build +cd build +cmake -DCMAKE_PREFIX_PATH=H:\PATH\TO\LLVM\build-19-msvc\ -DCMAKE_BUILD_TYPE=Release .. +``` + +# step 3 grab your compilation database +whichever method you like, there are plenty. Here's what I used: Add a `CMakeUserPresets.json` to root of cata repo with the following content: + +```json +{ + "version": 4, + "cmakeMinimumRequired": { + "major": 3, + "minor": 20, + "patch": 0 + }, + "configurePresets": [ + { + "name": "my-clang", + "generator": "Ninja", + "environment": { + "VCPKG_ROOT": "H:/soft/vcpkg", + "NINJA": "H:/soft/ninja/ninja.exe", + "CLANG_DIR": "H:/work/github/llvm/build-19-msvc/Release/bin" + }, + "cacheVariables": { + "DCMAKE_EXPORT_COMPILE_COMMANDS": true, + "CMAKE_MAKE_PROGRAM": "$env{NINJA}", + "CMAKE_C_COMPILER": "$env{CLANG_DIR}/clang.exe", + "CMAKE_CXX_COMPILER": "$env{CLANG_DIR}/clang++.exe", + "CMAKE_RC_COMPILER": "$env{CLANG_DIR}/llvm-rc.exe", + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + + "TILES": true, + "SOUND": true, + "BACKTRACE": true + } + } + ] +} +``` +(adjust the vars in the `environment` section as appropriate) +Then do +```ps1 +mkdir -p .\build\ +cd build +cmake --preset=my-clang .. +cd .. +``` + +# step 4. Running iwyu +First we need to add iwyu to path (this is actually required) +```ps1 +$env:PATH+=";PATH\TO\include-what-you-use\build\bin\Release" +``` +then actually run it. + +```ps1 +mkdir -p out +H:\work\github\include-what-you-use\iwyu_tool.py --jobs=4 -p .\build\ src/ -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=../tools/iwyu/cata.imp > out/iwyu-out.txt +``` + +Important to note: +1) `include-what-you-use.exe` needs to be on the path, but `iwyu_tool.py` doesn't +2) the path to just-built compilation database is passed via `-p` +3) the path to mappting file is relative to the `-p`, not to the current dir +4) the `--cxx17ns` flags are chosen for no particular reason. Check out `include-what-you-use.exe --help` to see other options +5) `--jobs=4` is self-explanatory +6) this runs on all files in `src` *recursively* (so, it includes `src/third-party`). Consider using wildcards (`src/*.cpp`) or some script shenaningans to work around that. + +If you look in the output files, you might notice that they have some newlines compare to what you'd see in the terminal. I have no idea how to fix it, but luckily it does not affect the IWYU tooling ability to apply the fixes. + +# step 5 apply the fixes +The expected way to apply the fixes is to run +```ps1 +python H:\work\github\include-what-you-use\fix_includes.py .\src\achievement.cpp < out/iwyu-files-all.txt +``` +however if you are in powershell, you'll see that this does not work, for two and a half reasons: +- the `command < file` is linux thing that pwsh doesn't do, you need to instead `Get-Content file | command` +- fix_includes.py expects absolute paths because that is what iwyu_tool output. This is seemingly different from linux (and less pleasant at that). +- the file names as you see in the `iwyu` output are not the same as `fix_includes` expects them to be. The former have *forward* slashes (`/`), the latter has *backwards* slashes (/`). So it just skips them. We need to do cursed string manipulation. So there goes + +```ps1 +Get-Content out/iwyu-iwyu-out.txt | python H:\work\github\include-what-you-use\fix_includes.py --reorder --dry_run (Get-Item src\*).FullName.Replace('\', '/') +``` +(remove `--dry-run` when satisfied) +- or, perhaps much easier, select the files you want via `--only_re` flag. For example +```ps1 +Get-Content out/iwyu-iwyu-out.txt | python H:\work\github\include-what-you-use\fix_includes.py --reorder --dry_run --only_re '.*/src/ac.*.cpp' +``` + +# step 6 +Hooray! Now just check that the changes make sense, update the mappings (in this directory) (if neccessary) (docs link: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md), slap some pragmas, make sure it compliles and all that. + diff --git a/tools/iwyu/sdl.imp b/tools/iwyu/sdl.imp index 1167d631901a6..f9a6d3e4e2859 100644 --- a/tools/iwyu/sdl.imp +++ b/tools/iwyu/sdl.imp @@ -1,4 +1,6 @@ [ + { include: ["", "public", "", "public"] }, + { include: ["\"SDL_audio.h\"", "private", "", "public"] }, { include: ["\"SDL_blendmode.h\"", "private", "", "public"] }, { include: ["\"SDL_clipboard.h\"", "private", "", "public"] }, @@ -19,6 +21,30 @@ { include: ["\"SDL_timer.h\"", "private", "", "public"] }, { include: ["\"SDL_version.h\"", "public", "", "public"] }, { include: ["\"SDL_video.h\"", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "public", "", "public"] }, + { include: ["", "private", "", "public"] }, + { symbol: ["SDL_Init", "private", "", "public"] }, { symbol: ["SDL_InitSubSystem", "private", "", "public"] }, { symbol: ["SDL_Quit", "private", "", "public"] }, diff --git a/tools/iwyu/vs.stdlib.imp b/tools/iwyu/vs.stdlib.imp index b7335ad4c3962..aeb7ac2956990 100644 --- a/tools/iwyu/vs.stdlib.imp +++ b/tools/iwyu/vs.stdlib.imp @@ -1,7 +1,38 @@ [ + { "ref": "cpp.generic.imp" }, + { symbol: ["M_PI", "private", "\"math_defines.h\"", "public"] }, { symbol: ["M_PI_2", "private", "\"math_defines.h\"", "public"] }, { symbol: ["M_SQRT2", "private", "\"math_defines.h\"", "public"] }, { symbol: ["nanosleep", "private", "\"posix_time.h\"", "public"] }, { symbol: ["timespec", "private", "\"posix_time.h\"", "public"] }, + + { include: ["<__msvc_string_view.hpp>", "private", "", "public"] }, + { include: ["<__msvc_chrono.hpp>", "private", "", "public"] }, + { include: ["<__msvc_iter_core.hpp>", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "private"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, + + { include: ["", "private", "", "public"] }, + ]