From c17c9486a22ce9f2160b2d2ad559d9a19e453f83 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sun, 22 Mar 2015 15:22:02 +0100 Subject: Rename miscellaneous .h headers to .hpp --- src/birth.cc | 4 +- src/bldg.cc | 2 +- src/cmd1.cc | 4 +- src/cmd2.cc | 2 +- src/cmd3.cc | 4 +- src/cmd4.cc | 4 +- src/cmd5.cc | 2 +- src/cmd6.cc | 2 +- src/cmd7.cc | 4 +- src/device_allocation.cc | 2 +- src/device_allocation.h | 25 ------------- src/device_allocation.hpp | 17 +++++++++ src/device_allocation_fwd.h | 16 -------- src/device_allocation_fwd.hpp | 8 ++++ src/dice.cc | 2 +- src/dice.h | 21 ----------- src/dice.hpp | 13 +++++++ src/dice_fwd.h | 20 ---------- src/dice_fwd.hpp | 12 ++++++ src/dungeon.cc | 6 +-- src/files.cc | 4 +- src/generate.cc | 2 +- src/help.cc | 2 +- src/hiscore.cc | 2 +- src/hiscore.h | 86 ------------------------------------------- src/hiscore.hpp | 78 +++++++++++++++++++++++++++++++++++++++ src/hooks.cc | 2 +- src/hooks.h | 18 --------- src/hooks.hpp | 10 +++++ src/init2.cc | 6 +-- src/loadsave.cc | 6 +-- src/lua_bind.cc | 2 +- src/melee2.cc | 6 +-- src/messages.cc | 3 +- src/messages.h | 18 --------- src/messages.hpp | 9 +++++ src/modules.cc | 2 +- src/monster2.cc | 2 +- src/object1.cc | 4 +- src/object2.cc | 4 +- src/powers.cc | 4 +- src/q_betwen.cc | 2 +- src/q_dragons.cc | 2 +- src/q_eol.cc | 2 +- src/q_evil.cc | 2 +- src/q_fireprof.cc | 4 +- src/q_god.cc | 4 +- src/q_haunted.cc | 2 +- src/q_hobbit.cc | 4 +- src/q_invas.cc | 2 +- src/q_library.cc | 4 +- src/q_main.cc | 2 +- src/q_narsil.cc | 2 +- src/q_nazgul.cc | 2 +- src/q_nirna.cc | 2 +- src/q_one.cc | 2 +- src/q_poison.cc | 6 +-- src/q_rand.cc | 4 +- src/q_shroom.cc | 4 +- src/q_spider.cc | 2 +- src/q_thief.cc | 2 +- src/q_thrain.cc | 6 +-- src/q_troll.cc | 2 +- src/q_ultrag.cc | 2 +- src/q_wight.cc | 4 +- src/q_wolves.cc | 2 +- src/quark.cc | 3 +- src/quark.h | 15 -------- src/quark.hpp | 7 ++++ src/quest.cc | 2 +- src/quest.h | 11 ------ src/quest.hpp | 3 ++ src/randart.cc | 2 +- src/range.cc | 2 +- src/range.h | 23 ------------ src/range.hpp | 15 ++++++++ src/range_fwd.h | 12 ------ src/range_fwd.hpp | 4 ++ src/skills.cc | 2 +- src/spell_type.cc | 6 +-- src/spell_type.hpp | 4 +- src/spells2.cc | 2 +- src/spells5.cc | 2 +- src/squelch/condition.cc | 2 +- src/squelch/rule.cc | 2 +- src/store.cc | 4 +- src/util.cc | 4 +- src/wild.cc | 2 +- src/wizard2.cc | 2 +- src/xtra1.cc | 4 +- src/xtra2.cc | 4 +- 91 files changed, 282 insertions(+), 369 deletions(-) delete mode 100644 src/device_allocation.h create mode 100644 src/device_allocation.hpp delete mode 100644 src/device_allocation_fwd.h create mode 100644 src/device_allocation_fwd.hpp delete mode 100644 src/dice.h create mode 100644 src/dice.hpp delete mode 100644 src/dice_fwd.h create mode 100644 src/dice_fwd.hpp delete mode 100644 src/hiscore.h create mode 100644 src/hiscore.hpp delete mode 100644 src/hooks.h create mode 100644 src/hooks.hpp delete mode 100644 src/messages.h create mode 100644 src/messages.hpp delete mode 100644 src/quark.h create mode 100644 src/quark.hpp delete mode 100644 src/quest.h create mode 100644 src/quest.hpp delete mode 100644 src/range.h create mode 100644 src/range.hpp delete mode 100644 src/range_fwd.h create mode 100644 src/range_fwd.hpp (limited to 'src') diff --git a/src/birth.cc b/src/birth.cc index 55705a45..81ee4007 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -16,10 +16,10 @@ #include "files.hpp" #include "gods.hpp" #include "help.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init2.hpp" #include "mimic.hpp" -#include "messages.h" +#include "messages.hpp" #include "modules.hpp" #include "monster2.hpp" #include "notes.hpp" diff --git a/src/bldg.cc b/src/bldg.cc index 0718cb93..0c62a826 100644 --- a/src/bldg.cc +++ b/src/bldg.cc @@ -16,7 +16,7 @@ #include "angband.h" #include "cmd3.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "mimic.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/cmd1.cc b/src/cmd1.cc index 2b1b6ea1..f387fc26 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -14,7 +14,7 @@ #include "cmd5.hpp" #include "files.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "lua_bind.hpp" #include "melee1.hpp" #include "melee2.hpp" @@ -24,7 +24,7 @@ #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" diff --git a/src/cmd2.cc b/src/cmd2.cc index ac6cbf1e..41b9f54c 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -14,7 +14,7 @@ #include "cmd1.hpp" #include "files.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "levels.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/cmd3.cc b/src/cmd3.cc index dd517bf5..2b69d288 100644 --- a/src/cmd3.cc +++ b/src/cmd3.cc @@ -11,12 +11,12 @@ #include "cave.hpp" #include "files.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "monster1.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "squeltch.hpp" #include "store.hpp" #include "tables.hpp" diff --git a/src/cmd4.cc b/src/cmd4.cc index b2c83b9c..02e826b2 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -10,10 +10,10 @@ #include "angband.h" #include "corrupt.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "levels.hpp" -#include "messages.h" +#include "messages.hpp" #include "monster2.hpp" #include "notes.hpp" #include "object1.hpp" diff --git a/src/cmd5.cc b/src/cmd5.cc index 81e909f3..f57c6d62 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -27,7 +27,7 @@ #include "util.h" #include "variable.h" #include "variable.hpp" -#include "quark.h" +#include "quark.hpp" #include "wizard2.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/cmd6.cc b/src/cmd6.cc index 6d3dcf56..c1d49c72 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -14,7 +14,7 @@ #include "cmd7.hpp" #include "corrupt.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "lua_bind.hpp" #include "mimic.hpp" #include "monster2.hpp" diff --git a/src/cmd7.cc b/src/cmd7.cc index faa5825c..81296411 100644 --- a/src/cmd7.cc +++ b/src/cmd7.cc @@ -14,13 +14,13 @@ #include "cmd5.hpp" #include "cmd6.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" diff --git a/src/device_allocation.cc b/src/device_allocation.cc index 9d8267e8..ec2d208c 100644 --- a/src/device_allocation.cc +++ b/src/device_allocation.cc @@ -1,4 +1,4 @@ -#include "device_allocation.h" +#include "device_allocation.hpp" #include diff --git a/src/device_allocation.h b/src/device_allocation.h deleted file mode 100644 index f4fc5c38..00000000 --- a/src/device_allocation.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "device_allocation_fwd.h" -#include "range.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Device allocation for skill - */ -struct device_allocation -{ - byte tval; - s32b rarity; - range_type base_level; - range_type max_level; -}; - -struct device_allocation *device_allocation_new(byte tval); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/device_allocation.hpp b/src/device_allocation.hpp new file mode 100644 index 00000000..28854eac --- /dev/null +++ b/src/device_allocation.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "device_allocation_fwd.hpp" +#include "range.hpp" + +/* + * Device allocation for skill + */ +struct device_allocation +{ + byte tval; + s32b rarity; + range_type base_level; + range_type max_level; +}; + +struct device_allocation *device_allocation_new(byte tval); diff --git a/src/device_allocation_fwd.h b/src/device_allocation_fwd.h deleted file mode 100644 index 1bfe41a1..00000000 --- a/src/device_allocation_fwd.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "angband.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct device_allocation device_allocation; -struct device_allocation; - -struct device_allocation *device_allocation_new(byte tval); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/device_allocation_fwd.hpp b/src/device_allocation_fwd.hpp new file mode 100644 index 00000000..8d5b3c6a --- /dev/null +++ b/src/device_allocation_fwd.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "angband.h" + +typedef struct device_allocation device_allocation; +struct device_allocation; + +struct device_allocation *device_allocation_new(byte tval); diff --git a/src/dice.cc b/src/dice.cc index 2f024d6a..91bbdca9 100644 --- a/src/dice.cc +++ b/src/dice.cc @@ -1,4 +1,4 @@ -#include "dice.h" +#include "dice.hpp" #include diff --git a/src/dice.h b/src/dice.h deleted file mode 100644 index 9b07357e..00000000 --- a/src/dice.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "dice_fwd.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Dice - */ -struct dice_type -{ - long base; /* Base value to which roll is added. */ - long num; /* Number of dice */ - long sides; /* Sides per dice */ -}; - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/dice.hpp b/src/dice.hpp new file mode 100644 index 00000000..40a49e37 --- /dev/null +++ b/src/dice.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "dice_fwd.hpp" + +/** + * Dice + */ +struct dice_type +{ + long base; /* Base value to which roll is added. */ + long num; /* Number of dice */ + long sides; /* Sides per dice */ +}; diff --git a/src/dice_fwd.h b/src/dice_fwd.h deleted file mode 100644 index be1ed85f..00000000 --- a/src/dice_fwd.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "angband.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct dice_type dice_type; -struct dice_type; - -void dice_init(dice_type *dice, long base, long num, long sides); -bool_ dice_parse(dice_type *dice, cptr s); -void dice_parse_checked(dice_type *dice, cptr s); -long dice_roll(dice_type *dice); -void dice_print(dice_type *dice, char *buf); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/dice_fwd.hpp b/src/dice_fwd.hpp new file mode 100644 index 00000000..ffc8fbfa --- /dev/null +++ b/src/dice_fwd.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "angband.h" + +typedef struct dice_type dice_type; +struct dice_type; + +void dice_init(dice_type *dice, long base, long num, long sides); +bool_ dice_parse(dice_type *dice, cptr s); +void dice_parse_checked(dice_type *dice, cptr s); +long dice_roll(dice_type *dice); +void dice_print(dice_type *dice, char *buf); diff --git a/src/dungeon.cc b/src/dungeon.cc index 68ccef82..953ea536 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -27,7 +27,7 @@ #include "gen_evol.hpp" #include "gods.hpp" #include "help.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init2.hpp" #include "levels.hpp" #include "loadsave.h" @@ -43,8 +43,8 @@ #include "object2.hpp" #include "options.hpp" #include "powers.hpp" -#include "quest.h" -#include "quark.h" +#include "quest.hpp" +#include "quark.hpp" #include "skills.hpp" #include "spell_type.hpp" #include "spells1.hpp" diff --git a/src/files.cc b/src/files.cc index 78784938..25cadc05 100644 --- a/src/files.cc +++ b/src/files.cc @@ -13,8 +13,8 @@ #include "cave.hpp" #include "corrupt.hpp" #include "cmd3.hpp" -#include "hiscore.h" -#include "hooks.h" +#include "hiscore.hpp" +#include "hooks.hpp" #include "init1.hpp" #include "levels.hpp" #include "loadsave.h" diff --git a/src/generate.cc b/src/generate.cc index 7362b0a2..a874a6e9 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -8,7 +8,7 @@ #include "angband.h" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "levels.hpp" #include "loadsave.hpp" diff --git a/src/help.cc b/src/help.cc index 0fb910d8..6391851d 100644 --- a/src/help.cc +++ b/src/help.cc @@ -11,7 +11,7 @@ #include "angband.h" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "object1.hpp" #include "options.hpp" #include "skills.hpp" diff --git a/src/hiscore.cc b/src/hiscore.cc index 2f17237f..9d55bbde 100644 --- a/src/hiscore.cc +++ b/src/hiscore.cc @@ -1,4 +1,4 @@ -#include "hiscore.h" +#include "hiscore.hpp" #include "angband.h" #include "util.hpp" diff --git a/src/hiscore.h b/src/hiscore.h deleted file mode 100644 index e4923165..00000000 --- a/src/hiscore.h +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include "h-basic.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Semi-Portable High Score List Entry (128 bytes) -- BEN - * - * All fields listed below are null terminated ascii strings. - * - * In addition, the "number" fields are right justified, and - * space padded, to the full available length (minus the "null"). - * - * Note that "string comparisons" are thus valid on "pts". - */ - -typedef struct high_score high_score; - -struct high_score -{ - char what[8]; /* Version info (string) */ - - char pts[10]; /* Total Score (number) */ - - char gold[10]; /* Total Gold (number) */ - - char turns[10]; /* Turns Taken (number) */ - - char day[10]; /* Time stamp (string) */ - - char who[16]; /* Player Name (string) */ - - char unused_1[8]; /* Kept for compatibility only */ - - char sex[2]; /* Player Sex (string) */ - char p_r[3]; /* Player Race (number) */ - char p_s[3]; /* Player Subrace (number) */ - char p_c[3]; /* Player Class (number) */ - char p_cs[3]; /* Player Class spec (number) */ - - char cur_lev[4]; /* Current Player Level (number) */ - char cur_dun[4]; /* Current Dungeon Level (number) */ - char max_lev[4]; /* Max Player Level (number) */ - char max_dun[4]; /* Max Dungeon Level (number) */ - - char unused_2[4]; /* Kept for compatibility only */ - char unused_3[4]; /* Kept for compatibility only */ - char inside_quest[4]; /* Did the player die in a quest? */ - char unused_4[4]; /* Kept for compatibility only */ - - char how[32]; /* Method of death (string) */ -}; - -/* - * Seek score 'i' in the highscore file - */ -int highscore_seek(int highscore_fd, int i); - -/* - * Read one score from the highscore file - */ -errr highscore_read(int highscore_fd, high_score *score); - -/* - * Write one score to the highscore file - */ -int highscore_write(int highscore_fd, high_score *score); - -/* - * Determine where a new score *would* be placed - * Return the location (0 is best) or -1 on failure - */ -int highscore_where(int highscore_fd, high_score *score); - -/* - * Place an entry into the high score file. Return the location (0 is - * best) or -1 on "failure" - */ -int highscore_add(int highscore_fd, high_score *score); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/hiscore.hpp b/src/hiscore.hpp new file mode 100644 index 00000000..0e9afa41 --- /dev/null +++ b/src/hiscore.hpp @@ -0,0 +1,78 @@ +#pragma once + +#include "h-basic.h" + +/* + * Semi-Portable High Score List Entry (128 bytes) -- BEN + * + * All fields listed below are null terminated ascii strings. + * + * In addition, the "number" fields are right justified, and + * space padded, to the full available length (minus the "null"). + * + * Note that "string comparisons" are thus valid on "pts". + */ + +typedef struct high_score high_score; + +struct high_score +{ + char what[8]; /* Version info (string) */ + + char pts[10]; /* Total Score (number) */ + + char gold[10]; /* Total Gold (number) */ + + char turns[10]; /* Turns Taken (number) */ + + char day[10]; /* Time stamp (string) */ + + char who[16]; /* Player Name (string) */ + + char unused_1[8]; /* Kept for compatibility only */ + + char sex[2]; /* Player Sex (string) */ + char p_r[3]; /* Player Race (number) */ + char p_s[3]; /* Player Subrace (number) */ + char p_c[3]; /* Player Class (number) */ + char p_cs[3]; /* Player Class spec (number) */ + + char cur_lev[4]; /* Current Player Level (number) */ + char cur_dun[4]; /* Current Dungeon Level (number) */ + char max_lev[4]; /* Max Player Level (number) */ + char max_dun[4]; /* Max Dungeon Level (number) */ + + char unused_2[4]; /* Kept for compatibility only */ + char unused_3[4]; /* Kept for compatibility only */ + char inside_quest[4]; /* Did the player die in a quest? */ + char unused_4[4]; /* Kept for compatibility only */ + + char how[32]; /* Method of death (string) */ +}; + +/* + * Seek score 'i' in the highscore file + */ +int highscore_seek(int highscore_fd, int i); + +/* + * Read one score from the highscore file + */ +errr highscore_read(int highscore_fd, high_score *score); + +/* + * Write one score to the highscore file + */ +int highscore_write(int highscore_fd, high_score *score); + +/* + * Determine where a new score *would* be placed + * Return the location (0 is best) or -1 on failure + */ +int highscore_where(int highscore_fd, high_score *score); + +/* + * Place an entry into the high score file. Return the location (0 is + * best) or -1 on "failure" + */ +int highscore_add(int highscore_fd, high_score *score); diff --git a/src/hooks.cc b/src/hooks.cc index 77b93cf7..43c6e6d3 100644 --- a/src/hooks.cc +++ b/src/hooks.cc @@ -5,7 +5,7 @@ * not for profit purposes provided that this copyright and statement are * included in all such copies. */ -#include "hooks.h" +#include "hooks.hpp" #include "angband.h" #include diff --git a/src/hooks.h b/src/hooks.h deleted file mode 100644 index 76587faf..00000000 --- a/src/hooks.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "angband.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef bool_ (*hook_func_t)(void *, void *, void *); - -extern void add_hook_new(int h_idx, hook_func_t hook_func, cptr name, void *data); -extern void del_hook_new(int h_idx, hook_func_t hook_func); -extern int process_hooks_restart; -extern bool_ process_hooks_new(int h_idx, void *in, void *out); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/hooks.hpp b/src/hooks.hpp new file mode 100644 index 00000000..9c17fe56 --- /dev/null +++ b/src/hooks.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "angband.h" + +typedef bool_ (*hook_func_t)(void *, void *, void *); + +extern void add_hook_new(int h_idx, hook_func_t hook_func, cptr name, void *data); +extern void del_hook_new(int h_idx, hook_func_t hook_func); +extern int process_hooks_restart; +extern bool_ process_hooks_new(int h_idx, void *in, void *out); diff --git a/src/init2.cc b/src/init2.cc index b924c914..a30bb15f 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -7,12 +7,12 @@ #include "generate.hpp" #include "gen_evol.hpp" #include "gen_maze.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "lua_bind.hpp" -#include "messages.h" +#include "messages.hpp" #include "modules.hpp" -#include "quark.h" +#include "quark.hpp" #include "randart.hpp" #include "script.h" #include "spells3.hpp" diff --git a/src/loadsave.cc b/src/loadsave.cc index 9c897c47..b21bc723 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -6,13 +6,13 @@ #include "init1.hpp" #include "init2.hpp" #include "levels.hpp" -#include "messages.h" +#include "messages.hpp" #include "modules.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" -#include "quark.h" -#include "hooks.h" +#include "quark.hpp" +#include "hooks.hpp" #include "tables.hpp" #include "util.hpp" #include "util.h" diff --git a/src/lua_bind.cc b/src/lua_bind.cc index 9237678f..501d9edc 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -13,7 +13,7 @@ #include "corrupt.hpp" #include "init1.hpp" #include "monster2.hpp" -#include "range.h" +#include "range.hpp" #include "skills.hpp" #include "spell_type.hpp" #include "spells2.hpp" diff --git a/src/melee2.cc b/src/melee2.cc index fdd31846..09c47340 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -17,15 +17,15 @@ #include "cave.hpp" #include "cmd1.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "melee1.hpp" -#include "messages.h" +#include "messages.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" diff --git a/src/messages.cc b/src/messages.cc index 32117198..4701f86e 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -1,4 +1,5 @@ -#include "messages.h" +#include "messages.hpp" + #include "tome/make_array.hpp" #include "angband.h" diff --git a/src/messages.h b/src/messages.h deleted file mode 100644 index 0e9e2d14..00000000 --- a/src/messages.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "h-basic.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void message_init(); -s16b message_num(); -cptr message_str(int age); -byte message_color(int age); -byte message_type(int age); -void message_add(cptr msg, byte color); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/messages.hpp b/src/messages.hpp new file mode 100644 index 00000000..22943ab9 --- /dev/null +++ b/src/messages.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "h-basic.h" + +void message_init(); +s16b message_num(); +cptr message_str(int age); +byte message_color(int age); +void message_add(cptr msg, byte color); diff --git a/src/modules.cc b/src/modules.cc index 071f1ae9..ffcf743c 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -14,7 +14,7 @@ #include "cave.hpp" #include "corrupt.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "joke.hpp" #include "lua_bind.hpp" #include "monster2.hpp" diff --git a/src/monster2.cc b/src/monster2.cc index 039b53e9..d7f96974 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -10,7 +10,7 @@ #include "angband.h" #include "cave.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "levels.hpp" #include "mimic.hpp" #include "monster3.hpp" diff --git a/src/object1.cc b/src/object1.cc index 2e9f09ff..3c269c60 100644 --- a/src/object1.cc +++ b/src/object1.cc @@ -14,14 +14,14 @@ #include "cmd6.hpp" #include "dungeon.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "lua_bind.hpp" #include "mimic.hpp" #include "monster1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "skills.hpp" #include "spell_type.hpp" #include "spells5.hpp" diff --git a/src/object2.cc b/src/object2.cc index c5f4fa44..a3abdbba 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -11,8 +11,8 @@ #include "angband.h" #include "cave.hpp" #include "spell_type.hpp" -#include "device_allocation.h" -#include "hooks.h" +#include "device_allocation.hpp" +#include "hooks.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "object1.hpp" diff --git a/src/powers.cc b/src/powers.cc index 4c85f2d9..0b4f87bc 100644 --- a/src/powers.cc +++ b/src/powers.cc @@ -14,14 +14,14 @@ #include "cmd2.hpp" #include "cmd7.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "spells1.hpp" #include "spells2.hpp" #include "tables.hpp" diff --git a/src/q_betwen.cc b/src/q_betwen.cc index 7b660d4a..2dafc804 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -1,7 +1,7 @@ #include "q_betwen.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" diff --git a/src/q_dragons.cc b/src/q_dragons.cc index be0d1ccd..cd8b2efe 100644 --- a/src/q_dragons.cc +++ b/src/q_dragons.cc @@ -1,7 +1,7 @@ #include "q_dragons.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "tables.hpp" diff --git a/src/q_eol.cc b/src/q_eol.cc index 62c0eddc..c5ce5232 100644 --- a/src/q_eol.cc +++ b/src/q_eol.cc @@ -2,7 +2,7 @@ #include "cave.hpp" #include "generate.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "monster2.hpp" #include "object2.hpp" #include "tables.hpp" diff --git a/src/q_evil.cc b/src/q_evil.cc index d8ef0eb6..1398ccf3 100644 --- a/src/q_evil.cc +++ b/src/q_evil.cc @@ -1,7 +1,7 @@ #include "q_evil.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "tables.hpp" diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc index e092102f..4a88965a 100644 --- a/src/q_fireprof.cc +++ b/src/q_fireprof.cc @@ -1,6 +1,6 @@ #include "q_fireprof.hpp" -#include "quark.h" -#include "hooks.h" +#include "quark.hpp" +#include "hooks.hpp" #include "lua_bind.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/q_god.cc b/src/q_god.cc index aa1516f4..c6488170 100644 --- a/src/q_god.cc +++ b/src/q_god.cc @@ -1,6 +1,6 @@ #include "q_god.hpp" -#include "quark.h" -#include "hooks.h" +#include "quark.hpp" +#include "hooks.hpp" #include "object2.hpp" #include "tables.hpp" #include "util.hpp" diff --git a/src/q_haunted.cc b/src/q_haunted.cc index 0b577361..3b0b99fe 100644 --- a/src/q_haunted.cc +++ b/src/q_haunted.cc @@ -1,7 +1,7 @@ #include "q_haunted.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "traps.hpp" diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc index aca1cf01..38dbcf68 100644 --- a/src/q_hobbit.cc +++ b/src/q_hobbit.cc @@ -1,8 +1,8 @@ #include "q_hobbit.hpp" #include "cave.hpp" -#include "hooks.h" -#include "messages.h" +#include "hooks.hpp" +#include "messages.hpp" #include "monster2.hpp" #include "object2.hpp" #include "tables.hpp" diff --git a/src/q_invas.cc b/src/q_invas.cc index e9d80cc8..a34b67c7 100644 --- a/src/q_invas.cc +++ b/src/q_invas.cc @@ -1,7 +1,7 @@ #include "q_invas.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "tables.hpp" diff --git a/src/q_library.cc b/src/q_library.cc index 94570ebd..f8f7fb29 100644 --- a/src/q_library.cc +++ b/src/q_library.cc @@ -1,6 +1,6 @@ #include "q_library.hpp" -#include "quark.h" -#include "hooks.h" +#include "quark.hpp" +#include "hooks.hpp" #include "lua_bind.hpp" #include "monster2.hpp" #include "object2.hpp" diff --git a/src/q_main.cc b/src/q_main.cc index 45c50e9b..27aa9ad6 100644 --- a/src/q_main.cc +++ b/src/q_main.cc @@ -1,6 +1,6 @@ #include "q_main.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "tables.hpp" #include "util.hpp" #include "variable.hpp" diff --git a/src/q_narsil.cc b/src/q_narsil.cc index a9359739..e2188c3b 100644 --- a/src/q_narsil.cc +++ b/src/q_narsil.cc @@ -1,6 +1,6 @@ #include "q_narsil.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "object2.hpp" #include "tables.hpp" #include "util.hpp" diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc index e298f41f..267e712a 100644 --- a/src/q_nazgul.cc +++ b/src/q_nazgul.cc @@ -1,7 +1,7 @@ #include "q_nazgul.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "monster2.hpp" #include "object2.hpp" #include "tables.hpp" diff --git a/src/q_nirna.cc b/src/q_nirna.cc index 0f9ec203..a86f9a19 100644 --- a/src/q_nirna.cc +++ b/src/q_nirna.cc @@ -1,7 +1,7 @@ #include "q_nirna.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "tables.hpp" diff --git a/src/q_one.cc b/src/q_one.cc index 1780b4d3..19076f4f 100644 --- a/src/q_one.cc +++ b/src/q_one.cc @@ -2,7 +2,7 @@ #include "cave.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/q_poison.cc b/src/q_poison.cc index 7d709db5..3a834e31 100644 --- a/src/q_poison.cc +++ b/src/q_poison.cc @@ -1,11 +1,11 @@ #include "q_poison.hpp" #include "cave.hpp" -#include "quark.h" -#include "messages.h" +#include "quark.hpp" +#include "messages.hpp" #include "monster2.hpp" #include "object2.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "tables.hpp" #include "util.hpp" #include "variable.hpp" diff --git a/src/q_rand.cc b/src/q_rand.cc index 904fa5d4..2703705a 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -2,10 +2,10 @@ #include "cave.hpp" #include "generate.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "lua_bind.hpp" -#include "messages.h" +#include "messages.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "object1.hpp" diff --git a/src/q_shroom.cc b/src/q_shroom.cc index 5cef00c8..3e2ffed5 100644 --- a/src/q_shroom.cc +++ b/src/q_shroom.cc @@ -1,8 +1,8 @@ #include "q_shroom.hpp" #include "cave.hpp" -#include "hooks.h" -#include "messages.h" +#include "hooks.hpp" +#include "messages.hpp" #include "monster2.hpp" #include "object2.hpp" #include "tables.hpp" diff --git a/src/q_spider.cc b/src/q_spider.cc index beddc16d..957399ae 100644 --- a/src/q_spider.cc +++ b/src/q_spider.cc @@ -2,7 +2,7 @@ #include "cave.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" diff --git a/src/q_thief.cc b/src/q_thief.cc index 9ae23f8e..2560e9fd 100644 --- a/src/q_thief.cc +++ b/src/q_thief.cc @@ -1,7 +1,7 @@ #include "q_thief.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "object1.hpp" diff --git a/src/q_thrain.cc b/src/q_thrain.cc index 96d1d9bb..dc215fe3 100644 --- a/src/q_thrain.cc +++ b/src/q_thrain.cc @@ -2,12 +2,12 @@ #include "cave.hpp" #include "generate.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "lua_bind.hpp" -#include "quark.h" +#include "quark.hpp" #include "randart.hpp" -#include "messages.h" +#include "messages.hpp" #include "monster2.hpp" #include "object2.hpp" #include "tables.hpp" diff --git a/src/q_troll.cc b/src/q_troll.cc index 0289d9e9..500c62cf 100644 --- a/src/q_troll.cc +++ b/src/q_troll.cc @@ -1,7 +1,7 @@ #include "q_troll.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" diff --git a/src/q_ultrag.cc b/src/q_ultrag.cc index d9af6f9f..96c80d02 100644 --- a/src/q_ultrag.cc +++ b/src/q_ultrag.cc @@ -1,7 +1,7 @@ #include "q_ultrag.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" diff --git a/src/q_wight.cc b/src/q_wight.cc index 2fd72668..70ea86d2 100644 --- a/src/q_wight.cc +++ b/src/q_wight.cc @@ -1,11 +1,11 @@ #include "q_wight.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" -#include "quark.h" +#include "quark.hpp" #include "tables.hpp" #include "util.hpp" #include "variable.hpp" diff --git a/src/q_wolves.cc b/src/q_wolves.cc index b6f9d8e2..2270f498 100644 --- a/src/q_wolves.cc +++ b/src/q_wolves.cc @@ -1,7 +1,7 @@ #include "q_wolves.hpp" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "tables.hpp" diff --git a/src/quark.cc b/src/quark.cc index f6db6653..add16830 100644 --- a/src/quark.cc +++ b/src/quark.cc @@ -1,4 +1,5 @@ -#include "quark.h" +#include "quark.hpp" + #include "angband.h" #include diff --git a/src/quark.h b/src/quark.h deleted file mode 100644 index 1eec6eae..00000000 --- a/src/quark.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "h-basic.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void quark_init(); -cptr quark_str(s16b num); -s16b quark_add(cptr str); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/quark.hpp b/src/quark.hpp new file mode 100644 index 00000000..f573ec21 --- /dev/null +++ b/src/quark.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include "h-basic.h" + +void quark_init(); +cptr quark_str(s16b num); +s16b quark_add(cptr str); diff --git a/src/quest.cc b/src/quest.cc index f93abefe..c4e68872 100644 --- a/src/quest.cc +++ b/src/quest.cc @@ -1,4 +1,4 @@ -#include "quest.h" +#include "quest.hpp" #include "angband.h" #include "tables.hpp" diff --git a/src/quest.h b/src/quest.h deleted file mode 100644 index 58ff98e4..00000000 --- a/src/quest.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -extern void init_hooks_quests(); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/quest.hpp b/src/quest.hpp new file mode 100644 index 00000000..7ff3cd3c --- /dev/null +++ b/src/quest.hpp @@ -0,0 +1,3 @@ +#pragma once + +extern void init_hooks_quests(); diff --git a/src/randart.cc b/src/randart.cc index 7d88ada6..69adecc4 100644 --- a/src/randart.cc +++ b/src/randart.cc @@ -11,7 +11,7 @@ #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "spells2.hpp" #include "util.hpp" #include "variable.h" diff --git a/src/range.cc b/src/range.cc index 412c187a..7bd407c7 100644 --- a/src/range.cc +++ b/src/range.cc @@ -1,4 +1,4 @@ -#include "range.h" +#include "range.hpp" #include diff --git a/src/range.h b/src/range.h deleted file mode 100644 index 0cd049dc..00000000 --- a/src/range.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "range_fwd.h" -#include "angband.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Range - */ -struct range_type -{ - s32b min; - s32b max; -}; - -void range_init(range_type *range, s32b min, s32b max); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/range.hpp b/src/range.hpp new file mode 100644 index 00000000..8e2c949e --- /dev/null +++ b/src/range.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "range_fwd.hpp" +#include "angband.h" + +/* + * Range + */ +struct range_type +{ + s32b min; + s32b max; +}; + +void range_init(range_type *range, s32b min, s32b max); diff --git a/src/range_fwd.h b/src/range_fwd.h deleted file mode 100644 index 1e76e354..00000000 --- a/src/range_fwd.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct range_type range_type; -struct range_type; - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/range_fwd.hpp b/src/range_fwd.hpp new file mode 100644 index 00000000..b5eef3fa --- /dev/null +++ b/src/range_fwd.hpp @@ -0,0 +1,4 @@ +#pragma once + +typedef struct range_type range_type; +struct range_type; diff --git a/src/skills.cc b/src/skills.cc index 5b93ce2e..87aebd9c 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -14,7 +14,7 @@ #include "cmd7.hpp" #include "gods.hpp" #include "help.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "lua_bind.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/spell_type.cc b/src/spell_type.cc index 867068f8..1b9d31ec 100644 --- a/src/spell_type.cc +++ b/src/spell_type.cc @@ -1,7 +1,7 @@ #include "spell_type.hpp" -#include "range.h" -#include "device_allocation.h" -#include "dice.h" +#include "range.hpp" +#include "device_allocation.hpp" +#include "dice.hpp" #include "spells4.hpp" #include "angband.h" diff --git a/src/spell_type.hpp b/src/spell_type.hpp index c053f9fd..c08742dd 100644 --- a/src/spell_type.hpp +++ b/src/spell_type.hpp @@ -6,8 +6,8 @@ #include #include "h-basic.h" #include "types_fwd.h" -#include "device_allocation_fwd.h" -#include "range_fwd.h" +#include "device_allocation_fwd.hpp" +#include "range_fwd.hpp" /* * Casting type diff --git a/src/spells2.cc b/src/spells2.cc index a15c0e39..fe26a53f 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -13,7 +13,7 @@ #include "cmd1.hpp" #include "cmd7.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "melee2.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/spells5.cc b/src/spells5.cc index 6dcb8f84..d1e5b433 100644 --- a/src/spells5.cc +++ b/src/spells5.cc @@ -2,7 +2,7 @@ #include "angband.h" #include "spell_type.hpp" -#include "device_allocation.h" +#include "device_allocation.hpp" #include "spells3.hpp" #include "spells4.hpp" #include "variable.hpp" diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc index 221ab677..8d8eb028 100644 --- a/src/squelch/condition.cc +++ b/src/squelch/condition.cc @@ -9,7 +9,7 @@ #include "object1.hpp" #include "object2.hpp" #include "skills.hpp" -#include "quark.h" +#include "quark.hpp" #include "util.hpp" #include "variable.hpp" diff --git a/src/squelch/rule.cc b/src/squelch/rule.cc index a8bcd19e..44c110cb 100644 --- a/src/squelch/rule.cc +++ b/src/squelch/rule.cc @@ -8,7 +8,7 @@ #include "../modules.hpp" #include "../object1.hpp" #include "../object2.hpp" -#include "../quark.h" +#include "../quark.hpp" #include "../tables.hpp" #include "../util.hpp" #include "../variable.hpp" diff --git a/src/store.cc b/src/store.cc index e61e3685..1a26f536 100644 --- a/src/store.cc +++ b/src/store.cc @@ -14,11 +14,11 @@ #include "cmd4.hpp" #include "cmd5.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "spell_type.hpp" #include "skills.hpp" #include "spells5.hpp" diff --git a/src/util.cc b/src/util.cc index fc1d6aa8..65143e52 100644 --- a/src/util.cc +++ b/src/util.cc @@ -9,9 +9,9 @@ #include "cmd3.hpp" #include "cmd4.hpp" #include "init1.hpp" -#include "messages.h" +#include "messages.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "tables.h" #include "tables.hpp" #include "variable.h" diff --git a/src/wild.cc b/src/wild.cc index 5ac9f739..7e42bdb9 100644 --- a/src/wild.cc +++ b/src/wild.cc @@ -10,7 +10,7 @@ #include "angband.h" #include "cave.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "init1.hpp" #include "monster2.hpp" #include "options.hpp" diff --git a/src/wizard2.cc b/src/wizard2.cc index 37f31156..046a95bc 100644 --- a/src/wizard2.cc +++ b/src/wizard2.cc @@ -13,7 +13,7 @@ #include "cmd4.hpp" #include "corrupt.hpp" #include "files.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/xtra1.cc b/src/xtra1.cc index 1dfa0566..bf1dce39 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -14,9 +14,9 @@ #include "cmd7.hpp" #include "files.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "levels.hpp" -#include "messages.h" +#include "messages.hpp" #include "mimic.hpp" #include "monster1.hpp" #include "monster2.hpp" diff --git a/src/xtra2.cc b/src/xtra2.cc index 80179045..7f20b466 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -13,7 +13,7 @@ #include "corrupt.hpp" #include "files.hpp" #include "gods.hpp" -#include "hooks.h" +#include "hooks.hpp" #include "melee2.hpp" #include "mimic.hpp" #include "monster1.hpp" @@ -23,7 +23,7 @@ #include "object1.hpp" #include "object2.hpp" #include "options.hpp" -#include "quark.h" +#include "quark.hpp" #include "randart.hpp" #include "skills.hpp" #include "spells1.hpp" -- cgit v1.2.3