X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fcmd5.c;h=1264072020defd60eaab072ab2ae32deeb321ae6;hb=9d4b877c27a36774ae5256db6237264298837607;hp=18e30e150cf543df4a556253bcf4a0ab632bd6e3;hpb=eae7eb9bbf15c84434084f6fc15f3d6ddfe32d22;p=hengband%2Fhengband.git diff --git a/src/cmd5.c b/src/cmd5.c index 18e30e150..126407202 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -64,14 +64,14 @@ bool select_the_force = FALSE; * The "known" should be TRUE for cast/pray, FALSE for study * */ -static int get_spell(int *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int use_realm) +static int get_spell(COMMAND_CODE *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, REALM_IDX use_realm) { int i; - int spell = -1; + SPELL_IDX spell = -1; int num = 0; int ask = TRUE; - int need_mana; - int spells[64]; + MANA_POINT need_mana; + SPELL_IDX spells[64]; bool flag, redraw, okay; char choice; const magic_type *s_ptr; @@ -406,7 +406,7 @@ static bool player_has_no_spellbooks(void) */ static void confirm_use_force(bool browse_only) { - int item; + SPELL_IDX item; char which; #ifdef ALLOW_REPEAT @@ -466,12 +466,15 @@ static void confirm_use_force(bool browse_only) */ void do_cmd_browse(void) { - int item, sval, use_realm = 0, j, line; - int spell = -1; + OBJECT_IDX item; + OBJECT_SUBTYPE_VALUE sval; + REALM_IDX use_realm = 0; + int j, line; + SPELL_IDX spell = -1; int num = 0; - byte spells[64]; - char temp[62*4]; + int spells[64]; + char temp[62*4]; object_type *o_ptr; @@ -654,12 +657,14 @@ static void change_realm2(CHARACTER_IDX next_realm) */ void do_cmd_study(void) { - int i, item, sval; + int i; + OBJECT_IDX item; + OBJECT_SUBTYPE_VALUE sval; int increment = 0; bool learned = FALSE; /* Spells of realm2 will have an increment of +32 */ - int spell = -1; + SPELL_IDX spell = -1; cptr p = spell_category_name(mp_ptr->spell_book); @@ -1051,9 +1056,10 @@ static void wild_magic(int spell) */ void do_cmd_cast(void) { - int item; + OBJECT_IDX item; OBJECT_SUBTYPE_VALUE sval; - int spell, realm; + SPELL_IDX spell; + REALM_IDX realm; int chance; int increment = 0; int use_realm; @@ -1594,7 +1600,7 @@ void check_pets_num_and_align(monster_type *m_ptr, bool inc) int calculate_upkeep(void) { s32b old_friend_align = friend_align; - int m_idx; + MONSTER_IDX m_idx; bool have_a_unique = FALSE; s32b total_friend_levels = 0; @@ -1657,11 +1663,11 @@ void do_cmd_pet_dismiss(void) { monster_type *m_ptr; bool all_pets = FALSE; - IDX pet_ctr; + MONSTER_IDX pet_ctr; int i; int Dismissed = 0; - u16b *who; + MONSTER_IDX *who; u16b dummy_why; int max_pet = 0; int cu, cv; @@ -1672,7 +1678,7 @@ void do_cmd_pet_dismiss(void) Term->scr->cv = 1; /* Allocate the "who" array */ - C_MAKE(who, max_m_idx, u16b); + C_MAKE(who, max_m_idx, MONSTER_IDX); /* Process the monsters (backwards) */ for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--) @@ -1781,7 +1787,7 @@ void do_cmd_pet_dismiss(void) Term->scr->cv = cv; Term_fresh(); - C_KILL(who, max_m_idx, u16b); + C_KILL(who, max_m_idx, MONSTER_IDX); #ifdef JP msg_format("%d 体のペットを放しました。", Dismissed); @@ -1803,7 +1809,7 @@ static bool player_can_ride_aux(cave_type *c_ptr, bool now_riding) { bool p_can_enter; bool old_character_xtra = character_xtra; - int old_riding = p_ptr->riding; + MONSTER_IDX old_riding = p_ptr->riding; bool old_riding_ryoute = p_ptr->riding_ryoute; bool old_old_riding_ryoute = p_ptr->old_riding_ryoute; bool old_pf_ryoute = (p_ptr->pet_extra_flags & PF_RYOUTE) ? TRUE : FALSE; @@ -1842,7 +1848,7 @@ static bool player_can_ride_aux(cave_type *c_ptr, bool now_riding) * @param force TRUEならば強制的に落馬する * @return 実際に落馬したらTRUEを返す */ -bool rakuba(int dam, bool force) +bool rakuba(HIT_POINT dam, bool force) { int i, y, x, oy, ox; int sn = 0, sy = 0, sx = 0; @@ -2204,7 +2210,7 @@ static void do_name_pet(void) */ void do_cmd_pet(void) { - int i = 0; + SPELL_IDX i = 0; int num; int powers[36]; cptr power_desc[36]; @@ -2518,7 +2524,7 @@ void do_cmd_pet(void) ask = (isupper(choice)); /* Lowercase */ - if (ask) choice = tolower(choice); + if (ask) choice = (char)tolower(choice); /* Extract request */ i = (islower(choice) ? A2I(choice) : -1);