-/* File: externs.h */
-
-/*
+/*!
+ * @file externs.h
+ * @brief Angband(変愚蛮怒)基本関数、グローバル変数ヘッダファイル /
+ * extern declarations (variables and functions)
+ * @date 2014/08/08
+ * @author
* Copyright (c) 1997 Ben Harrison
- *
+ * @details
* This software may be copied and distributed for educational, research,
* and not for profit purposes provided that this copyright and statement
* are included in all such copies.
- */
-
-/* Purpose: extern declarations (variables and functions) */
-
-/*
* Note that some files have their own header files
* (z-virt.h, z-util.h, z-form.h, term.h, random.h)
*/
/*
* Automatically generated "variable" declarations
*/
-
extern int max_macrotrigger;
extern cptr macro_template;
extern cptr macro_modifier_chr;
extern cptr macro_trigger_name[MAX_MACRO_TRIG];
extern cptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
-
-/* ÆüËܸìÈǵ¡Ç½ÄɲäǻȤ¦ */
extern int level_up;
/*
extern const byte feature_action_flags[FF_FLAG_MAX];
extern const dragonbreath_type dragonbreath_info[];
extern const activation_type activation_info[];
+extern const cptr artifact_bias_name[MAX_BIAS];
/* variable.c */
extern const cptr copyright[5];
extern u16b sf_saves;
extern bool arg_fiddle;
extern bool arg_wizard;
+extern bool arg_music;
extern bool arg_sound;
extern byte arg_graphics;
extern bool arg_monochrome;
extern s16b command_gap;
extern s16b command_wrk;
extern s16b command_new;
-extern s16b energy_use;
extern bool msg_flag;
extern s16b running;
extern s16b resting;
extern s32b old_turn;
extern s32b old_battle;
extern bool use_sound;
+extern bool use_music;
extern bool use_graphics;
extern bool use_bigtile;
extern s16b signal_count;
extern s16b panel_row_min, panel_row_max;
extern s16b panel_col_min, panel_col_max;
extern s16b panel_col_prt, panel_row_prt;
-extern int py;
-extern int px;
extern s16b target_who;
extern s16b target_col;
extern s16b target_row;
extern int player_uid;
extern int player_euid;
extern int player_egid;
-extern char player_name[32];
extern char player_base[32];
extern char savefile[1024];
extern char savefile_base[40];
extern const char angband_term_name[8][16];
extern byte angband_color_table[256][4];
extern const cptr angband_sound_name[SOUND_MAX];
+extern const cptr angband_music_basic_name[MUSIC_BASIC_MAX];
extern cave_type *cave[MAX_HGT];
extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
extern s16b max_floor_id;
extern void glow_deep_lava_and_bldg(void);
/* cmd1.c */
-extern bool test_hit_fire(int chance, int ac, int vis);
+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 s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam);
extern s16b critical_norm(int weight, int plus, int dam, s16b meichuu, int mode);
extern bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr);
extern bool monster_living(monster_race *r_ptr);
extern bool no_questor_or_bounty_uniques(int r_idx);
+extern void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg);
/* monster2.c */
extern bool make_gold(object_type *j_ptr);
extern void place_gold(int y, int x);
extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
-extern void acquirement(int y1, int x1, int num, bool great, bool known);
+extern void acquirement(int y1, int x1, int num, bool great, bool special, bool known);
extern void amusement(int y1, int x1, int num, bool known);
extern void init_normal_traps(void);
extern s16b choose_random_trap(void);
extern void torch_flags(object_type *o_ptr, u32b *flgs);
extern void torch_dice(object_type *o_ptr, int *dd, int *ds);
extern void torch_lost_fuel(object_type *o_ptr);
+extern cptr essence_name[];
/* racial.c */
extern bool gain_magic(void);
extern bool dimension_door(void);
extern bool mirror_tunnel(void);
extern bool summon_kin_player(int level, int y, int x, u32b mode);
-extern void massacre(int py, int px);
+extern void massacre(void);
/* store.c */
extern bool combine_and_reorder_home(int store_num);
/* bldg.c */
extern bool get_nightmare(int r_idx);
-extern void have_nightmare(int r_idx);
extern void battle_monsters(void);
extern void do_cmd_bldg(void);
extern void do_cmd_quest(void);
extern int quest_number(int level);
extern int random_quest_number(int level);
extern bool tele_town(void);
-extern s16b calc_crit_ratio_shot(int weight, int plus_ammo,int plus_bow, int dam);
+extern s16b calc_crit_ratio_shot(int plus_ammo,int plus_bow);
extern s16b calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, int dam);
extern s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari);
extern errr fd_close(int fd);
extern void flush(void);
extern void bell(void);
+extern errr play_music(int type, int num);
+extern void select_floor_music(void);
extern void sound(int num);
extern void move_cursor(int row, int col);
extern void text_to_ascii(char *buf, cptr str);
extern void gain_exp(s32b amount);
extern void calc_android_exp(void);
extern void lose_exp(s32b amount);
-extern bool drain_exp(s32b drain, s32b slip, int hold_life_prob);
+extern bool drain_exp(s32b drain, s32b slip, int hold_exp_prob);
extern void do_poly_self(void);
extern bool set_ultimate_res(int v, bool do_dec);
extern bool set_tim_res_nether(int v, bool do_dec);
extern int spell_exp_level(int spell_exp);
extern void display_rumor(bool ex);
-/* mspells1.c */
-extern bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend);
-extern bool summon_possible(int y1, int x1);
-extern bool raise_possible(monster_type *m_ptr);
-extern bool dispel_check(int m_idx);
-extern bool spell_is_inate(u16b spell);
-extern bool make_attack_spell(int m_idx);
-
-/* mspells2.c */
-extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
-extern bool monst_spell_monst(int m_idx);
-
/* artifact.c */
extern void one_sustain(object_type *o_ptr);
extern void one_high_resistance(object_type *o_ptr);
extern void show_highclass(void);
/* mind.c */
-extern mind_power mind_powers[5];
+extern mind_power const mind_powers[5];
extern void mindcraft_info(char *p, int use_mind, int power);
extern void do_cmd_mind(void);
extern void do_cmd_mind_browse(void);
/* mane.c */
extern bool do_cmd_mane(bool baigaesi);
+/* mspells1.c */
+extern bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend);
+extern bool summon_possible(int y1, int x1);
+extern bool raise_possible(monster_type *m_ptr);
+extern bool dispel_check(int m_idx);
+extern bool spell_is_inate(u16b spell);
+extern bool make_attack_spell(int m_idx);
+extern void beam(int m_idx, int y, int x, int typ, int dam_hp, int monspell, int target_type);
+extern void bolt(int m_idx, int y, int x, int typ, int dam_hp, int monspell, int target_type);
+extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, int target_type);
+
+/* mspells1.c */
+extern bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend);
+extern bool summon_possible(int y1, int x1);
+extern bool raise_possible(monster_type *m_ptr);
+extern bool dispel_check(int m_idx);
+extern bool spell_is_inate(u16b spell);
+extern bool make_attack_spell(int m_idx);
+extern void beam(int m_idx, int y, int x, int typ, int dam_hp, int monspell, int target_type);
+extern void bolt(int m_idx, int y, int x, int typ, int dam_hp, int monspell, int target_type);
+extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, int target_type);
+
+/* mspells2.c */
+extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
+extern bool monst_spell_monst(int m_idx);
+
/* 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);
+/* mspells4.c */
+extern bool spell_learnable(int m_idx);
+extern int monspell_to_player(int SPELL_NUM, int y, int x, int m_idx);
+extern int monspell_to_monster(int SPELL_NUM, int y, int x, int m_idx, int t_idx);
+extern int monspell_damage(int SPELL_NUM, int m_idx, int TYPE);
+extern int monspell_race_damage(int SPELL_NUM, int r_idx, int TYPE);
+extern int monspell_bluemage_damage(int SPELL_NUM, int plev, int TYPE);
+
/* hissatsu.c */
extern void hissatsu_info(char *p, int power);
extern void do_cmd_hissatsu(void);
#ifdef JP
/* japanese.c */
extern void sindarin_to_kana(char *kana, const char *sindarin);
-extern void jverb1( const char *in , char *out);
-extern void jverb2( const char *in , char *out);
-extern void jverb3( const char *in , char *out);
extern void jverb( const char *in , char *out , int flag);
extern void sjis2euc(char *str);
extern void euc2sjis(char *str);
extern byte codeconv(char *str);
extern bool iskanji2(cptr s, int x);
+extern void guess_convert_to_system_encoding(char* strbuf, int buflen);
#endif
#ifdef WORLD_SCORE
extern bool teleport_barrier(int m_idx);
extern bool magic_barrier(int m_idx);
extern bool multiply_barrier(int m_idx);
-