{
char tmp[1024];
char buf[2];
- int mode;
+ BIT_FLAGS mode;
cptr act;
/* Roguelike */
{
int i, k, n, cs, os;
- int mode = 0;
+ BIT_FLAGS mode = 0;
bool flag = FALSE;
bool prev = FALSE;
* @param mode オプションフラグ
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, int mode)
+HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode)
{
int i, k;
* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
-s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown)
+s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
{
MULTIPLY mult = 10;
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int mode)
+static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, BIT_FLAGS mode)
{
int num = 0, bonus, chance, vir;
HIT_POINT k;
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-bool py_attack(int y, int x, int mode)
+bool py_attack(int y, int x, BIT_FLAGS mode)
{
bool fear = FALSE;
bool mdeath = FALSE;
char key[1024];
char buf[1024];
- int mode;
+ BIT_FLAGS mode;
/* Roguelike */
if (rogue_like_commands)
char buf[1024];
- int mode;
+ BIT_FLAGS mode;
/* Roguelike */
}
else
{
- s16b This = r_ptr->r_pkills;
+ MONSTER_NUMBER This = r_ptr->r_pkills;
if (This > 0)
{
}
else
{
- s16b This = r_ptr->r_pkills;
+ MONSTER_NUMBER This = r_ptr->r_pkills;
if (This > 0)
{
#ifdef JP
/* p,tは人と数える by ita */
if (my_strchr("pt", r_ptr->d_char))
- fprintf(fff, " %3d 人の %s\n", This, r_name + r_ptr->name);
+ fprintf(fff, " %3d 人の %s\n", (int)This, r_name + r_ptr->name);
else
- fprintf(fff, " %3d 体の %s\n", This, r_name + r_ptr->name);
+ fprintf(fff, " %3d 体の %s\n", (int)This, r_name + r_ptr->name);
#else
if (This < 2)
{
}
-bool ang_sort_comp_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b)
+bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b)
{
QUEST_IDX *q_num = (QUEST_IDX *)u;
quest_type *qa = &quest[q_num[a]];
return (qa->comptime <= qb->comptime);
}
-void ang_sort_swap_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b)
+void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b)
{
QUEST_IDX *q_num = (QUEST_IDX *)u;
QUEST_IDX tmp;
int pet_ctr;
monster_type *m_ptr;
- int mode = 0;
+ BIT_FLAGS mode = 0;
char buf[160];
char target_buf[160];
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_life_spell(int spell, int mode)
+static cptr do_life_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_sorcery_spell(int spell, int mode)
+static cptr do_sorcery_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_nature_spell(int spell, int mode)
+static cptr do_nature_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_chaos_spell(int spell, int mode)
+static cptr do_chaos_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_death_spell(int spell, int mode)
+static cptr do_death_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_trump_spell(int spell, int mode)
+static cptr do_trump_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_arcane_spell(int spell, int mode)
+static cptr do_arcane_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_craft_spell(int spell, int mode)
+static cptr do_craft_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_daemon_spell(int spell, int mode)
+static cptr do_daemon_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_crusade_spell(int spell, int mode)
+static cptr do_crusade_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
*/
-static cptr do_music_spell(MAGIC_NUM2 spell, int mode)
+static cptr do_music_spell(MAGIC_NUM2 spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-static cptr do_hissatsu_spell(int spell, int mode)
+static cptr do_hissatsu_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
*/
-static cptr do_hex_spell(int spell, int mode)
+static cptr do_hex_spell(int spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
* @param mode 求める処理
* @return 各領域魔法に各種テキストを求めた場合は文字列参照ポインタ、そうでない場合はNULLポインタを返す。
*/
-cptr do_spell(REALM_IDX realm, SPELL_IDX spell, int mode)
+cptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode)
{
switch (realm)
{
}
if ((p_ptr->muta2 & MUT2_DISARM) && one_in_(10000))
{
- int slot = 0;
+ INVENTORY_IDX slot = 0;
object_type *o_ptr = NULL;
disturb(0, 1);
* #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL から選択。
* @return なし
*/
-void set_action(int typ)
+void set_action(ACTION_IDX typ)
{
int prev_typ = p_ptr->action;
extern bool is_explosive_rune_grid(cave_type *c_ptr);
extern void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, int mode);
+extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
extern void health_track(MONSTER_IDX m_idx);
extern void monster_race_track(MONRACE_IDX r_idx);
extern void object_kind_track(IDX k_idx);
extern bool test_hit_fire(int chance, monster_type *m_ptr, int vis, char* o_name);
extern bool test_hit_norm(int chance, int ac, int vis);
extern HIT_POINT critical_shot(int weight, int plus_ammo, int plus_bow, HIT_POINT dam);
-extern HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, int mode);
-extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown);
+extern HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode);
+extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown);
extern void search(void);
extern void py_pickup_aux(int o_idx);
extern void carry(bool pickup);
-extern bool py_attack(int y, int x, int mode);
+extern bool py_attack(int y, int x, BIT_FLAGS mode);
extern bool pattern_seq(int c_y, int c_x, int n_y, int n_x);
extern bool player_can_enter(s16b feature, u16b mode);
extern bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode);
extern void do_cmd_save_screen(void);
extern void do_cmd_knowledge_quests_completed(FILE *fff, IDX quest_num[]);
extern void do_cmd_knowledge_quests_failed(FILE *fff, IDX quest_num[]);
-extern bool ang_sort_comp_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b);
-extern void ang_sort_swap_quest_num(vptr u, vptr v, QUEST_IDX a, QUEST_IDX b);
+extern bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b);
+extern void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b);
extern void do_cmd_knowledge(void);
extern void plural_aux(char * Name);
extern void do_cmd_checkquest(void);
/* do-spell.c */
extern void stop_singing(void);
-extern cptr do_spell(REALM_IDX realm, SPELL_IDX spell, int mode);
+extern cptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
/* dungeon.c */
extern void leave_quest_check(void);
/* files.c */
extern void safe_setuid_drop(void);
extern void safe_setuid_grab(void);
-extern s16b tokenize(char *buf, s16b num, char **tokens, int mode);
-extern void display_player(int mode);
+extern s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode);
+extern void display_player(BIT_FLAGS mode);
extern errr make_character_dump(FILE *fff);
extern errr file_character(cptr name);
extern errr process_pref_file_command(char *buf);
extern errr check_load_init(void);
extern errr check_time(void);
extern errr check_load(void);
-extern bool show_file(bool show_version, cptr name, cptr what, int line, int mode);
+extern bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode);
extern void do_cmd_help(void);
extern void process_player_name(bool sf);
extern void get_name(void);
/* monster1.c */
extern void roff_top(MONRACE_IDX r_idx);
-extern void screen_roff(MONRACE_IDX r_idx, int mode);
+extern void screen_roff(MONRACE_IDX r_idx, BIT_FLAGS mode);
extern void display_roff(MONRACE_IDX r_idx);
extern void output_monster_spoiler(MONRACE_IDX r_idx, void (*roff_func)(byte attr, cptr str));
extern void create_name(int type, char *name);
extern MONSTER_IDX m_pop(void);
extern errr get_mon_num_prep(monster_hook_type monster_hook, monster_hook_type monster_hook2);
extern MONRACE_IDX get_mon_num(DEPTH level);
-extern void monster_desc(char *desc, monster_type *m_ptr, int mode);
+extern void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode);
extern int lore_do_probe(MONRACE_IDX r_idx);
extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
extern void sanity_blast(monster_type *m_ptr, bool necro);
extern COMMAND_CODE show_equip(int target_item);
extern void toggle_inven_equip(void);
extern bool can_get_item(void);
-extern bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode);
+extern bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode);
/* object2.c */
extern void excise_object_idx(int o_idx);
extern bool recall_player(TIME_EFFECT turns);
extern bool word_of_recall(void);
extern bool reset_recall(void);
-extern bool apply_disenchant(int mode);
+extern bool apply_disenchant(BIT_FLAGS mode);
extern void mutate_player(void);
extern void apply_nexus(monster_type *m_ptr);
extern void phlogiston(void);
extern void brand_weapon(int brand_type);
extern void call_the_(void);
-extern void fetch(int dir, int wgt, bool require_los);
+extern void fetch(DIRECTION dir, WEIGHT wgt, bool require_los);
extern void alter_reality(void);
extern bool warding_glyph(void);
extern bool place_mirror(void);
extern int remove_all_curse(void);
extern bool alchemy(void);
extern bool enchant(object_type *o_ptr, int n, int eflag);
-extern bool enchant_spell(int num_hit, int num_dam, int num_ac);
+extern bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac);
extern bool artifact_scroll(void);
extern bool ident_spell(bool only_equip);
extern bool mundane_spell(bool only_equip);
extern errr fd_kill(cptr file);
extern errr fd_move(cptr file, cptr what);
extern errr fd_copy(cptr file, cptr what);
-extern int fd_make(cptr file, int mode);
+extern int fd_make(cptr file, BIT_FLAGS mode);
extern int fd_open(cptr file, int flags);
extern errr fd_lock(int fd, int what);
extern errr fd_seek(int fd, huge n);
extern bool askfor(char *buf, int len);
extern bool get_string(cptr prompt, char *buf, int len);
extern bool get_check(cptr prompt);
-extern bool get_check_strict(cptr prompt, int mode);
+extern bool get_check_strict(cptr prompt, BIT_FLAGS mode);
extern bool get_com(cptr prompt, char *command, bool z_escape);
extern QUANTITY get_quantity(cptr prompt, QUANTITY max);
extern void pause_line(int row);
/* effects.c */
-extern void set_action(int typ);
+extern void set_action(ACTION_IDX typ);
extern void reset_tim_flags(void);
extern void dispel_player(void);
extern bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec);
extern void ang_sort(vptr u, vptr v, int n);
extern bool target_able(MONSTER_IDX m_idx);
extern bool target_okay(void);
-extern bool target_set(int mode);
+extern bool target_set(BIT_FLAGS mode);
extern void target_set_prepare_look(void);
extern bool get_aim_dir(DIRECTION *dp);
extern bool get_hack_dir(DIRECTION *dp);
/* mspells3.c */
extern bool do_cmd_cast_learned(void);
extern void learn_spell(int monspell);
-extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode);
+extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, BIT_FLAGS mode);
/* mspells4.c */
extern bool spell_learnable(MONSTER_IDX m_idx);
extern void do_cmd_hissatsu(void);
extern void do_cmd_hissatsu_browse(void);
extern void do_cmd_gain_hissatsu(void);
-extern MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr, int mode);
+extern MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr, BIT_FLAGS mode);
/* mutation.c */
extern int count_bits(BIT_FLAGS x);
#ifdef ALLOW_EASY_FLOOR /* TNB */
/* object1.c */
-extern int scan_floor(int *items, POSITION y, POSITION x, int mode);
+extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
extern COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width);
-extern bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode);
+extern bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode);
extern void py_pickup_floor(bool pickup);
/* variable.c */
* Hack -- We will always extract at least one token
* </pre>
*/
-s16b tokenize(char *buf, s16b num, char **tokens, int mode)
+s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode)
{
int i = 0;
/* Process "C:<str>" -- create keymap */
case 'C':
{
- int mode;
+ BIT_FLAGS mode;
char tmp[1024];
if (tokenize(buf+2, 2, zz, TOKENIZE_CHECKQUOTE) != 2) return 1;
* Mode 4 = mutations
* </pre>
*/
-void display_player(int mode)
+void display_player(BIT_FLAGS mode)
{
int i;
* Return FALSE on 'q' to exit from a deep, otherwise TRUE.
* </pre>
*/
-bool show_file(bool show_version, cptr name, cptr what, int line, int mode)
+bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode)
{
int i, n, skey;
char floor_savefile[1024];
int i;
int fd = -1;
- int mode = 0644;
+ BIT_FLAGS mode = 0644;
#ifdef SET_UID
# ifdef SECURE
typedef s16b CLASS_IDX; /*!< ゲーム中のプレイヤー職業ID型を定義 */
typedef s16b MIMIC_RACE_IDX; /*!< ゲーム中のプレイヤー変身種族ID型を定義 */
typedef s16b PATRON_IDX; /*!< ゲーム中のプレイヤーパトロンID型を定義 */
+typedef s32b ACTION_IDX; /*!< プレイヤーが現在取っている常時行動のID定義 */
typedef s16b MONRACE_IDX; /*!< ゲーム中のモンスター種族ID型を定義 */
typedef s16b MONSTER_IDX; /*!< ゲーム中のモンスター個体ID型を定義 */
* @param mode 剣術のスレイ型ID
* @return スレイの倍率(/10倍)
*/
-MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr, int mode)
+MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr, BIT_FLAGS mode)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
cptr desc;
- int mode = -1;
+ BIT_FLAGS mode = -1;
if (!fff) return;
{
int fd;
- int mode = 0644;
+ BIT_FLAGS mode = 0644;
errr err = 1;
{
int fd = -1;
- int mode = 0664;
+ BIT_FLAGS mode = 0664;
FILE *fp;
rd_byte(&r_ptr->r_xtra2);
/* Count drops */
- rd_byte(&r_ptr->r_drop_gold);
- rd_byte(&r_ptr->r_drop_item);
+ rd_byte(&tmp8u);
+ r_ptr->r_drop_gold = (ITEM_NUMBER)tmp8u;
+ rd_byte(&tmp8u);
+ r_ptr->r_drop_item = (ITEM_NUMBER)tmp8u;
/* Count spells */
rd_byte(&tmp8u);
}
/* Read the "Racial" monster limit per level */
- rd_byte(&r_ptr->max_num);
+ rd_byte(&tmp8u);
+ r_ptr->max_num = (MONSTER_NUMBER)tmp8u;
/* Location in saved floor */
rd_s16b(&r_ptr->floor_id);
p_ptr->autopick_autoregister = tmp8u ? TRUE : FALSE;
rd_byte(&tmp8u); /* oops */
- rd_byte(&p_ptr->action);
+ rd_byte(&tmp8u);
+ p_ptr->action = (ACTION_IDX)tmp8u;
if (!z_older_than(10, 4, 3))
{
rd_byte(&tmp8u);
* left edge of the screen, on a cleared line, in which the recall is
* to take place. One extra blank line is left after the recall.
*/
-static void roff_aux(MONRACE_IDX r_idx, int mode)
+static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
{
monster_race *r_ptr = &r_info[r_idx];
bool magic = FALSE;
bool reinforce = FALSE;
- u32b flags1;
- u32b flags2;
- u32b flags3;
- u32b flags4;
- u32b a_ability_flags1;
- u32b a_ability_flags2;
- u32b flags7;
- u32b flagsr;
+ BIT_FLAGS flags1;
+ BIT_FLAGS flags2;
+ BIT_FLAGS flags3;
+ BIT_FLAGS flags4;
+ BIT_FLAGS a_ability_flags1;
+ BIT_FLAGS a_ability_flags2;
+ BIT_FLAGS flags7;
+ BIT_FLAGS flagsr;
- byte drop_gold, drop_item;
+ ITEM_NUMBER drop_gold, drop_item;
int vn = 0;
byte color[96];
* @param mode 表示オプション
* @return なし
*/
-void screen_roff(MONRACE_IDX r_idx, int mode)
+void screen_roff(MONRACE_IDX r_idx, BIT_FLAGS mode)
{
/* Flush messages */
msg_print(NULL);
* MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE
* --> Reflexive, genderized if visable ("himself") or "itself"
*/
-void monster_desc(char *desc, monster_type *m_ptr, int mode)
+void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode)
{
cptr res;
monster_race *r_ptr;
*/
/*
*/
-void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode)
+void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, BIT_FLAGS mode)
{
switch (mode)
{
* Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
* and "x" is the "current" command_cmd code.\n
*/
-static bool get_tag(COMMAND_CODE *cp, char tag, int mode)
+static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode)
{
COMMAND_CODE i;
COMMAND_CODE start, end;
* Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
* and "x" is the "current" command_cmd code.\n
*/
-static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floor_num)
+static bool get_tag_floor(COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], FLOOR_IDX floor_num)
{
COMMAND_CODE i;
cptr s;
* @param mode 所持品リストか装備品リストかの切り替え
* @return なし
*/
-static void prepare_label_string(char *label, int mode)
+static void prepare_label_string(char *label, BIT_FLAGS mode)
{
cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
*/
/*
*/
-static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
+static void prepare_label_string_floor(char *label, FLOOR_IDX floor_list[], FLOOR_IDX floor_num)
{
cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int i;
* We always erase the prompt when we are done, leaving a blank line,\n
* or a warning message, if appropriate, if no items are available.\n
*/
-bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, int mode)
+bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
{
OBJECT_IDX this_o_idx, next_o_idx = 0;
* mode & 0x02 -- Marked items only
* mode & 0x04 -- Stop after first
*/
-int scan_floor(int *items, POSITION y, POSITION x, int mode)
+ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode)
{
- int this_o_idx, next_o_idx;
+ OBJECT_IDX this_o_idx, next_o_idx;
- int num = 0;
+ ITEM_NUMBER num = 0;
/* Sanity */
if (!in_bounds(y, x)) return 0;
object_type *o_ptr;
char o_name[MAX_NLEN];
-
char tmp_val[80];
COMMAND_CODE out_index[23];
char out_desc[23][MAX_NLEN];
COMMAND_CODE target_item_label = 0;
- int floor_list[23];
- int floor_num;
+ OBJECT_IDX floor_list[23];
+ ITEM_NUMBER floor_num;
TERM_POSITION wid, hgt;
char floor_label[52 + 1];
* @param mode オプションフラグ
* @return プレイヤーによりアイテムが選択されたならTRUEを返す。/
*/
-bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
+bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
{
char n1 = ' ', n2 = ' ', which = ' ';
char tmp_val[160];
char out_val[160];
- int floor_num, floor_list[23], floor_top = 0;
+ ITEM_NUMBER floor_num;
+ OBJECT_IDX floor_list[23];
+ int floor_top = 0;
TERM_POSITION min_width = 0;
extern bool select_the_force;
* @param mode エッセンスの大別ID
* @return なし
*/
-static void add_essence(int mode)
+static void add_essence(BIT_FLAGS mode)
{
OBJECT_IDX item;
int max_num = 0;
DUNGEON_IDX choose_dungeon(cptr note, POSITION y, POSITION x)
{
DUNGEON_IDX select_dungeon;
- int i, num = 0;
- s16b *dun;
+ DUNGEON_IDX i;
+ int num = 0;
+ DUNGEON_IDX *dun;
/* Hack -- No need to choose dungeon in some case */
if (lite_town || vanilla_town || ironman_downward)
* @return 劣化処理に関するメッセージが発せられた場合はTRUEを返す /
* Return "TRUE" if the player notices anything
*/
-bool apply_disenchant(int mode)
+bool apply_disenchant(BIT_FLAGS mode)
{
int t = 0;
object_type *o_ptr;
* @param require_los 射線の通りを要求するならばTRUE
* @return なし
*/
-void fetch(int dir, int wgt, bool require_los)
+void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
{
- int ty, tx;
+ POSITION ty, tx;
OBJECT_IDX i;
- cave_type *c_ptr;
- object_type *o_ptr;
- char o_name[MAX_NLEN];
+ cave_type *c_ptr;
+ object_type *o_ptr;
+ char o_name[MAX_NLEN];
/* Check to see if an object is already there */
if (cave[p_ptr->y][p_ptr->x].o_idx)
* Note that "num_ac" requires armour, else weapon
* Returns TRUE if attempted, FALSE if cancelled
*/
-bool enchant_spell(int num_hit, int num_dam, int num_ac)
+bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
{
OBJECT_IDX item;
bool okay = FALSE;
BIT_FLAGS special_attack; /* Special attack capacity -LM- */
BIT_FLAGS special_defense; /* Special block capacity -LM- */
- byte action; /* Currently action */
+ ACTION_IDX action; /* Currently action */
BIT_FLAGS spell_learned1; /* bit mask of spells learned */
BIT_FLAGS spell_learned2; /* bit mask of spells learned */
* of "O_RDONLY", "O_WRONLY", and "O_RDWR" in "A-win-h", and then
* we must simulate the effect of the proper "open()" call below.
*/
-int fd_make(cptr file, int mode)
+int fd_make(cptr file, BIT_FLAGS mode)
{
char buf[1024];
* mode & CHECK_NO_HISTORY : no message_add
* mode & CHECK_DEFAULT_Y : accept any key as y, except n and Esc.
*/
-bool get_check_strict(cptr prompt, int mode)
+bool get_check_strict(cptr prompt, BIT_FLAGS mode)
{
int i;
char buf[80];
int i;
char cmd;
- int mode;
+ BIT_FLAGS mode;
cptr act;
}
else
{
- int mode;
+ BIT_FLAGS mode;
cptr act, s;
/* Roguelike */
continue;
}
#endif
- *str = tolower(*str);
+ *str = (char)tolower(*str);
}
}
*
* Return the number of target_able monsters in the set.
*/
-static void target_set_prepare(int mode)
+static void target_set_prepare(BIT_FLAGS mode)
{
int y, x;
int min_hgt, max_hgt, min_wid, max_wid;
*
* This function must handle blindness/hallucination.
*/
-static int target_set_aux(int y, int x, int mode, cptr info)
+static int target_set_aux(int y, int x, BIT_FLAGS mode, cptr info)
{
cave_type *c_ptr = &cave[y][x];
s16b this_o_idx, next_o_idx = 0;
* This command will cancel any old target, even if used from
* inside the "look" command.
*/
-bool target_set(int mode)
+bool target_set(BIT_FLAGS mode)
{
int i, d, m, t, bd;
POSITION y = p_ptr->y;