From e2a5aef8ac652ed35b9131cf15a1accc95608f85 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 9 Jul 2023 10:07:30 +0300 Subject: [PATCH 26/26] AI: Rename aihunt.[ch] as daihunter.[ch] See osdn #48373 Signed-off-by: Marko Lindqvist --- ai/default/Makefile.am | 4 ++-- ai/default/{aihunt.c => daihunter.c} | 11 ++++------- ai/default/{aihunt.h => daihunter.h} | 9 +++------ ai/default/daimilitary.c | 2 +- ai/default/daiunit.c | 2 +- meson.build | 2 +- 6 files changed, 12 insertions(+), 18 deletions(-) rename ai/default/{aihunt.c => daihunter.c} (98%) rename ai/default/{aihunt.h => daihunter.h} (91%) diff --git a/ai/default/Makefile.am b/ai/default/Makefile.am index 833733774c..15f094cc08 100644 --- a/ai/default/Makefile.am +++ b/ai/default/Makefile.am @@ -24,8 +24,6 @@ libdefaultai_la_SOURCES = \ aiguard.h \ aihand.c \ aihand.h \ - aihunt.c \ - aihunt.h \ aiparatrooper.c \ aiparatrooper.h \ aitech.c \ @@ -42,6 +40,8 @@ libdefaultai_la_SOURCES = \ daidomestic.h \ daieffects.c \ daieffects.h \ + daihunter.c \ + daihunter.h \ dailog.c \ dailog.h \ daimilitary.c \ diff --git a/ai/default/aihunt.c b/ai/default/daihunter.c similarity index 98% rename from ai/default/aihunt.c rename to ai/default/daihunter.c index acfdd44ad6..039a0945eb 100644 --- a/ai/default/aihunt.c +++ b/ai/default/daihunter.c @@ -34,7 +34,6 @@ #include "pf_tools.h" /* server */ -#include "citytools.h" #include "srv_log.h" #include "unithand.h" #include "unittools.h" @@ -42,18 +41,16 @@ /* server/advisors */ #include "advdata.h" #include "advgoto.h" -#include "advtools.h" /* ai */ #include "handicaps.h" /* ai/default */ -#include "daicity.h" #include "daiplayer.h" #include "daitools.h" #include "daiunit.h" -#include "aihunt.h" +#include "daihunter.h" /**********************************************************************//** @@ -227,7 +224,7 @@ static void dai_hunter_missile_want(struct player *pplayer, static void eval_hunter_want(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, - struct unit_type *best_type, + struct unit_type *best_type, int veteran) { struct unit *virtualunit; @@ -330,8 +327,8 @@ static void dai_hunter_try_launch(struct ai_type *ait, continue; } unit_list_iterate(ptile->units, victim) { - enum diplstate_type ds = - player_diplstate_get(pplayer, unit_owner(victim))->type; + enum diplstate_type ds + = player_diplstate_get(pplayer, unit_owner(victim))->type; const struct unit_type *ptype; const struct unit_type *victim_type; diff --git a/ai/default/aihunt.h b/ai/default/daihunter.h similarity index 91% rename from ai/default/aihunt.h rename to ai/default/daihunter.h index bf08ddc919..f0b58d75ec 100644 --- a/ai/default/aihunt.h +++ b/ai/default/daihunter.h @@ -10,15 +10,12 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ***********************************************************************/ -#ifndef FC__AIHUNT_H -#define FC__AIHUNT_H +#ifndef FC__DAIHUNTER_H +#define FC__DAIHUNTER_H /* utility */ #include "support.h" /* bool type */ -/* common */ -#include "fc_types.h" - void dai_hunter_choice(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, bool allow_gold_upkeep); @@ -26,4 +23,4 @@ bool dai_hunter_qualify(struct player *pplayer, struct unit *punit); int dai_hunter_manage(struct ai_type *ait, struct player *pplayer, struct unit *punit); -#endif /* FC__AIHUNT_H */ +#endif /* FC__DAIHUNTER_H */ diff --git a/ai/default/daimilitary.c b/ai/default/daimilitary.c index 4aa168d7d5..25e213e935 100644 --- a/ai/default/daimilitary.c +++ b/ai/default/daimilitary.c @@ -57,12 +57,12 @@ #include "aidiplomat.h" #include "aiferry.h" #include "aihand.h" -#include "aihunt.h" #include "aiparatrooper.h" #include "aitech.h" #include "daicity.h" #include "daidata.h" #include "daieffects.h" +#include "daihunter.h" #include "dailog.h" #include "daiplayer.h" #include "daitools.h" diff --git a/ai/default/daiunit.c b/ai/default/daiunit.c index 26dd0fc9fe..12b2bbd577 100644 --- a/ai/default/daiunit.c +++ b/ai/default/daiunit.c @@ -71,11 +71,11 @@ #include "aiferry.h" #include "aiguard.h" #include "aihand.h" -#include "aihunt.h" #include "aiparatrooper.h" #include "daicity.h" #include "daidata.h" #include "daieffects.h" +#include "daihunter.h" #include "dailog.h" #include "daimilitary.h" #include "daiplayer.h" diff --git a/meson.build b/meson.build index f1f5cb8aed..24cdc463ee 100644 --- a/meson.build +++ b/meson.build @@ -1212,7 +1212,6 @@ ais = static_library('fc_ai', 'ai/default/aiferry.c', 'ai/default/aiguard.c', 'ai/default/aihand.c', - 'ai/default/aihunt.c', 'ai/default/aiparatrooper.c', 'ai/default/aitech.c', 'ai/default/daiactions.c', @@ -1221,6 +1220,7 @@ ais = static_library('fc_ai', 'ai/default/daidiplomacy.c', 'ai/default/daidomestic.c', 'ai/default/daieffects.c', + 'ai/default/daihunter.c', 'ai/default/dailog.c', 'ai/default/daimilitary.c', 'ai/default/daiplayer.c', -- 2.40.1