X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fexterns.h;h=da08f8f270ba8793ceb26fea5aa0e5e8b8477dc2;hb=9a44855a30a336d0a1900a21ddf15fbbbe05407d;hp=0fc8538b3fb0739499fdf57596a0f10fd155190e;hpb=c2ec52a9d4b050becc309c7bce4e7979974b17cb;p=hengband%2Fhengband.git diff --git a/src/externs.h b/src/externs.h index 0fc8538b3..da08f8f27 100644 --- a/src/externs.h +++ b/src/externs.h @@ -156,7 +156,7 @@ extern COMMAND_ARG command_arg; extern s16b command_rep; extern DIRECTION command_dir; extern s16b command_see; -extern TERM_POSITION command_gap; +extern TERM_LEN command_gap; extern s16b command_wrk; extern s16b command_new; extern bool msg_flag; @@ -165,7 +165,7 @@ extern GAME_TURN resting; extern POSITION cur_hgt; extern POSITION cur_wid; extern DEPTH dun_level; -extern s16b num_repro; +extern MONSTER_NUMBER num_repro; extern DEPTH object_level; extern DEPTH monster_level; extern DEPTH base_level; @@ -258,10 +258,10 @@ extern u32b message__head; extern u32b message__tail; extern u32b *message__ptr; extern char *message__buf; -extern u32b option_flag[8]; -extern u32b option_mask[8]; -extern u32b window_flag[8]; -extern u32b window_mask[8]; +extern BIT_FLAGS option_flag[8]; +extern BIT_FLAGS option_mask[8]; +extern BIT_FLAGS window_flag[8]; +extern BIT_FLAGS window_mask[8]; extern term *angband_term[8]; extern const char angband_term_name[8][16]; extern byte angband_color_table[256][4]; @@ -282,9 +282,9 @@ extern s16b alloc_kind_size; extern alloc_entry *alloc_kind_table; extern s16b alloc_race_size; extern alloc_entry *alloc_race_table; -extern byte misc_to_attr[256]; +extern TERM_COLOR misc_to_attr[256]; extern char misc_to_char[256]; -extern byte tval_to_attr[128]; +extern TERM_COLOR tval_to_attr[128]; extern char tval_to_char[128]; extern cptr keymap_act[KEYMAP_MODES][256]; extern player_type *p_ptr; @@ -479,10 +479,10 @@ extern void update_local_illumination(POSITION y, POSITION x); extern bool player_can_see_bold(POSITION y, POSITION x); extern bool cave_valid_bold(POSITION y, POSITION x); extern bool no_lite(void); -extern void apply_default_feat_lighting(byte f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]); -extern void map_info(POSITION y, POSITION x, byte *ap, char *cp, byte *tap, char *tcp); +extern void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]); +extern void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap, char *tcp); extern void move_cursor_relative(int row, int col); -extern void print_rel(char c, byte a, TERM_POSITION y, TERM_POSITION x); +extern void print_rel(char c, byte a, TERM_LEN y, TERM_LEN x); extern void note_spot(POSITION y, POSITION x); extern void display_dungeon(void); extern void lite_spot(POSITION y, POSITION x); @@ -503,9 +503,9 @@ extern void update_smell(void); extern void map_area(POSITION range); extern void wiz_lite(bool ninja); extern void wiz_dark(void); -extern void cave_set_feat(POSITION y, POSITION x, IDX feat); -extern IDX conv_dungeon_feat(IDX newfeat); -extern IDX feat_state(IDX feat, int action); +extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat); +extern FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat); +extern FEAT_IDX feat_state(IDX feat, int action); extern void cave_alter_feat(POSITION y, POSITION x, int action); extern void remove_mirror(POSITION y, POSITION x); extern bool is_mirror_grid(cave_type *c_ptr); @@ -516,23 +516,23 @@ extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2); 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 void disturb(int stop_search, int flush_output); +extern void object_kind_track(KIND_OBJECT_IDX k_idx); +extern void disturb(bool stop_search, bool flush_output); extern void glow_deep_lava_and_bldg(void); extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode); extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode); /* cmd1.c */ -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 s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown); +extern bool test_hit_norm(int chance, ARMOUR_CLASS ac, int vis); +extern HIT_POINT critical_shot(WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam); +extern HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown); extern void search(void); extern void py_pickup_aux(OBJECT_IDX o_idx); extern void carry(bool pickup); extern bool pattern_seq(POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x); extern bool player_can_enter(s16b feature, u16b mode); -extern bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode); -extern bool trap_can_be_ignored(int feat); +extern bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode); +extern bool trap_can_be_ignored(FEAT_IDX feat); extern void move_player(DIRECTION dir, bool do_pickup, bool break_trap); extern void run_step(DIRECTION dir); #ifdef TRAVEL @@ -668,7 +668,7 @@ extern void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode); /* floors.c */ extern void init_saved_floors(bool force); extern void clear_saved_floor_files(void); -extern saved_floor_type *get_sf_ptr(s16b floor_id); +extern saved_floor_type *get_sf_ptr(FLOOR_IDX floor_id); extern s16b get_new_floor_id(void); extern void prepare_change_floor_mode(BIT_FLAGS mode); extern void precalc_cur_num_of_pet(void); @@ -701,7 +701,7 @@ extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode); /* melee1.c */ /* monster-process.c */ extern bool test_hit_fire(int chance, monster_type *m_ptr, int vis, char* o_name); -extern HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode); +extern HIT_POINT critical_norm(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode); extern bool py_attack(POSITION y, POSITION x, BIT_FLAGS mode); extern bool make_attack_normal(MONSTER_IDX m_idx); extern void process_monsters(void); @@ -717,8 +717,6 @@ extern bool set_monster_monfear(MONSTER_IDX m_idx, int v); extern bool set_monster_invulner(MONSTER_IDX m_idx, int v, bool energy_need); extern void process_monsters_mtimed(int mtimed_idx); extern void dispel_monster_status(MONSTER_IDX m_idx); -extern u32b get_curse(int power, object_type *o_ptr); -extern void curse_equipment(int chance, int heavy_chance); extern void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, IDX who); extern bool process_the_world(int num, MONSTER_IDX who, bool vs_player); extern void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx); @@ -736,7 +734,7 @@ extern void set_friendly(monster_type *m_ptr); extern void set_pet(monster_type *m_ptr); extern void set_hostile(monster_type *m_ptr); extern void anger_monster(monster_type *m_ptr); -extern bool monster_can_cross_terrain(s16b feat, monster_race *r_ptr, u16b mode); +extern bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, u16b mode); extern bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, u16b mode); extern bool are_enemies(monster_type *m_ptr1, monster_type *m_ptr2); extern bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr); @@ -783,8 +781,8 @@ extern void monster_drop_carried_objects(monster_type *m_ptr); extern int m_bonus(int max, DEPTH level); extern void reset_visuals(void); -extern void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE]); -extern void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE]); +extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]); +extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]); extern cptr item_activation(object_type *o_ptr); extern bool screen_object(object_type *o_ptr, BIT_FLAGS mode); extern char index_to_label(int i); @@ -851,12 +849,12 @@ extern INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt); extern void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt); extern void combine_pack(void); extern void reorder_pack(void); -extern void display_koff(IDX k_idx); +extern void display_koff(KIND_OBJECT_IDX k_idx); extern object_type *choose_warning_item(void); -extern bool process_warning(int xx, int yy); +extern bool process_warning(POSITION xx, POSITION yy); extern void do_cmd_kaji(bool only_browse); -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_flags(object_type *o_ptr, BIT_FLAGS *flgs); +extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds); extern void torch_lost_fuel(object_type *o_ptr); extern cptr essence_name[]; @@ -932,7 +930,7 @@ extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION ra extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad); extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad); extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam); -extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, int dd, int ds, int num, int dev); +extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev); extern void call_chaos(void); extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam); extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam); @@ -1000,8 +998,8 @@ extern void cast_shuffle(void); extern bool_hack life_stream(bool_hack message, bool_hack virtue); extern bool_hack heroism(int base); extern bool_hack berserk(int base); -extern bool_hack cure_light_wounds(int dice, int sides); -extern bool_hack cure_serious_wounds(int dice, int sides); +extern bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides); +extern bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides); extern bool_hack cure_critical_wounds(HIT_POINT pow); extern bool_hack true_healing(HIT_POINT pow); extern bool_hack restore_mana(bool_hack magic_eater); @@ -1014,9 +1012,9 @@ extern bool psychometry(void); /* spells3.c */ extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode); extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode); -extern bool teleport_player_aux(int dis, BIT_FLAGS mode); -extern void teleport_player(int dis, BIT_FLAGS mode); -extern void teleport_player_away(MONSTER_IDX m_idx, int dis); +extern bool teleport_player_aux(POSITION dis, BIT_FLAGS mode); +extern void teleport_player(POSITION dis, BIT_FLAGS mode); +extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis); extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode); extern void teleport_away_followable(MONSTER_IDX m_idx); extern void teleport_level(MONSTER_IDX m_idx); @@ -1051,26 +1049,13 @@ extern bool bless_weapon(void); extern bool pulish_shield(void); extern bool potion_smash_effect(MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx); extern void display_spell_list(void); -extern s16b experience_of_spell(int spell, int realm); -extern int mod_need_mana(int need_mana, int spell, int realm); +extern EXP experience_of_spell(SPELL_IDX spell, REALM_IDX use_realm); +extern MANA_POINT mod_need_mana(MANA_POINT need_mana, SPELL_IDX spell, REALM_IDX realm); extern PERCENTAGE mod_spell_chance_1(PERCENTAGE chance); extern PERCENTAGE mod_spell_chance_2(PERCENTAGE chance); extern PERCENTAGE spell_chance(SPELL_IDX spell, REALM_IDX realm); extern bool spell_okay(int spell, bool learned, bool study_pray, int realm); -extern void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_POSITION y, TERM_POSITION x, REALM_IDX realm); -extern bool hates_acid(object_type *o_ptr); -extern bool hates_elec(object_type *o_ptr); -extern bool hates_fire(object_type *o_ptr); -extern bool hates_cold(object_type *o_ptr); -extern int set_acid_destroy(object_type *o_ptr); -extern int set_elec_destroy(object_type *o_ptr); -extern int set_fire_destroy(object_type *o_ptr); -extern int set_cold_destroy(object_type *o_ptr); -extern int inven_damage(inven_func typ, int perc); -extern int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); -extern int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); -extern int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); -extern int cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura); +extern void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX realm); extern bool rustproof(void); extern bool curse_armor(void); extern bool curse_weapon_object(bool force, object_type *o_ptr); @@ -1081,6 +1066,8 @@ extern bool dimension_door(void); extern bool mirror_tunnel(void); extern bool summon_kin_player(DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode); extern void massacre(void); +extern bool eat_lock(void); +extern bool shock_power(void); /* store.c */ extern bool combine_and_reorder_home(int store_num); @@ -1100,8 +1087,8 @@ extern QUEST_IDX quest_number(DEPTH level); extern QUEST_IDX random_quest_number(DEPTH level); extern bool tele_town(void); extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow); -extern HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, HIT_POINT dam); -extern HIT_POINT calc_expect_crit(int weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari); +extern HIT_POINT calc_expect_crit_shot(WEIGHT weight, int plus_ammo,int plus_bow, HIT_POINT dam); +extern HIT_POINT calc_expect_crit(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari); /* util.c */ extern errr path_parse(char *buf, int max, cptr file); @@ -1147,7 +1134,7 @@ extern void msg_format_wizard(int cheat_type, cptr fmt, ...); #endif /* SWIG */ extern void screen_save(void); extern void screen_load(void); -extern void c_put_str(byte attr, cptr str, int row, int col); +extern void c_put_str(TERM_COLOR attr, cptr str, int row, int col); extern void put_str(cptr str, int row, int col); extern void c_prt(byte attr, cptr str, int row, int col); extern void prt(cptr str, int row, int col); @@ -1205,7 +1192,7 @@ extern void window_stuff(void); extern void handle_stuff(void); extern s16b empty_hands(bool riding_control); extern bool heavy_armor(void); -extern void print_monster_list(TERM_POSITION x, TERM_POSITION y, TERM_POSITION max_lines); +extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines); extern void update_playtime(void); @@ -1282,17 +1269,17 @@ extern bool set_superstealth(bool set); /* xtra2.c */ extern void check_experience(void); -extern void complete_quest(int quest_num); +extern void complete_quest(QUEST_IDX quest_num); extern void check_quest_completion(monster_type *m_ptr); extern void check_find_art_quest_completion(object_type *o_ptr); extern cptr extract_note_dies(monster_race *r_ptr); extern void monster_death(MONSTER_IDX m_idx, bool drop_item); extern bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note); -extern void get_screen_size(int *wid_p, int *hgt_p); +extern void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p); extern void panel_bounds_center(void); extern void resize_map(void); extern void redraw_window(void); -extern bool change_panel(int dy, int dx); +extern bool change_panel(POSITION dy, POSITION dx); extern void verify_panel(void); extern cptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode); extern void ang_sort_aux(vptr u, vptr v, int p, int q); @@ -1303,8 +1290,8 @@ 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); +extern bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed); extern bool get_rep_dir(DIRECTION *dp, bool under); -extern bool get_rep_dir2(DIRECTION *dp); extern void gain_level_reward(int chosen_reward); extern bool tgt_pt(POSITION *x, POSITION *y); extern void do_poly_wounds(void); @@ -1355,8 +1342,8 @@ extern void do_cmd_mind_browse(void); 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 clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend); +extern bool summon_possible(POSITION y1, POSITION x1); extern bool raise_possible(monster_type *m_ptr); extern bool dispel_check(MONSTER_IDX m_idx); extern bool spell_is_inate(SPELL_IDX spell); @@ -1366,7 +1353,7 @@ extern void bolt(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int d extern void breath(POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type); /* mspells2.c */ -extern void get_project_point(int sy, int sx, int *ty, int *tx, BIT_FLAGS flg); +extern void get_project_point(POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg); extern bool monst_spell_monst(MONSTER_IDX m_idx); /* mspells3.c */ @@ -1377,7 +1364,7 @@ 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 HIT_POINT monspell_to_player(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx); -extern HIT_POINT monspell_to_monster(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, IDX t_idx); +extern HIT_POINT monspell_to_monster(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx); extern HIT_POINT monspell_damage(int SPELL_NUM, MONSTER_IDX m_idx, int TYPE); extern HIT_POINT monspell_race_damage(int SPELL_NUM, MONRACE_IDX r_idx, int TYPE); extern HIT_POINT monspell_bluemage_damage(int SPELL_NUM, PLAYER_LEVEL plev, int TYPE); @@ -1442,50 +1429,32 @@ extern void fsetfileinfo(cptr path, u32b fcreator, u32b ftype); /* extern int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, ...); */ #endif - -#ifdef ALLOW_REPEAT /* TNB */ - /* util.c */ extern void repeat_push(COMMAND_CODE what); extern bool repeat_pull(COMMAND_CODE *what); extern void repeat_check(void); -#endif /* ALLOW_REPEAT -- TNB */ - -#ifdef ALLOW_EASY_OPEN /* TNB */ - /* variable.c */ extern bool easy_open; /* cmd2.c */ extern bool easy_open_door(POSITION y, POSITION x); -#endif /* ALLOW_EASY_OPEN -- TNB */ - -#ifdef ALLOW_EASY_DISARM /* TNB */ - /* variable.c */ extern bool easy_disarm; /* cmd2.c */ extern bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir); -#endif /* ALLOW_EASY_DISARM -- TNB */ - - -#ifdef ALLOW_EASY_FLOOR /* TNB */ - /* object1.c */ 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 COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width); extern bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode); extern void py_pickup_floor(bool pickup); /* variable.c */ extern bool easy_floor; -#endif /* ALLOW_EASY_FLOOR -- TNB */ - /* obj_kind.c */ extern bool object_is_potion(object_type *o_ptr); extern bool object_is_shoukinkubi(object_type *o_ptr);