extern void sanity_blast(monster_type *m_ptr, bool necro);
extern void update_mon(MONSTER_IDX m_idx, bool full);
extern void update_monsters(bool full);
-extern bool place_monster_aux(IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
+extern bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
extern bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode);
extern bool alloc_horde(POSITION y, POSITION x);
extern bool alloc_guardian(bool def_val);
extern bool alloc_monster(int dis, u32b mode);
-extern bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode);
-extern bool summon_named_creature (int who, int oy, int ox, MONRACE_IDX r_idx, u32b mode);
+extern bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
+extern bool summon_named_creature (MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, u32b mode);
extern void update_smart_learn(MONSTER_IDX m_idx, int what);
extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
if (6 != sscanf(buf+2, "%d:%dd%d:%d:%d:%d",
&ac, &hd1, &hd2, &th, &td, &ta)) return (1);
- a_ptr->ac = ac;
- a_ptr->dd = hd1;
- a_ptr->ds = hd2;
- a_ptr->to_h = th;
- a_ptr->to_d = td;
- a_ptr->to_a = ta;
+ a_ptr->ac = (ARMOUR_CLASS)ac;
+ a_ptr->dd = (DICE_NUMBER)hd1;
+ a_ptr->ds = (DICE_SID)hd2;
+ a_ptr->to_h = (HIT_PROB)th;
+ a_ptr->to_d = (HIT_POINT)td;
+ a_ptr->to_a = (ARMOUR_CLASS)ta;
}
/* Hack -- Process 'U' for activation index */
{
byte tmp8u;
s16b tmp16s;
+ u32b tmp32u;
char buf[128];
/* Read the monster race */
if (z_older_than(10, 4, 5))
m_ptr->exp = 0;
else
- rd_u32b(&m_ptr->exp);
+ rd_u32b(&tmp32u);
+ m_ptr->exp = tmp32u;
if (z_older_than(10, 2, 2))
{
char buf[128];
byte tmp8u;
s16b tmp16s;
+ u32b tmp32u;
if (h_older_than(1, 5, 0, 0))
{
if (flags & SAVE_MON_SMART) rd_u32b(&m_ptr->smart);
else m_ptr->smart = 0;
- if (flags & SAVE_MON_EXP) rd_u32b(&m_ptr->exp);
+ if (flags & SAVE_MON_EXP)
+ {
+ rd_u32b(&tmp32u);
+ m_ptr->exp = (EXP)tmp32u;
+ }
else m_ptr->exp = 0;
m_ptr->mflag = 0; /* Not saved */
static void load_quick_start(void)
{
byte tmp8u;
+ s16b tmp16s;
int i;
if (z_older_than(11, 0, 13))
for (i = 0; i < 6; i++) rd_s16b(&previous_char.stat_max[i]);
for (i = 0; i < 6; i++) rd_s16b(&previous_char.stat_max_max[i]);
- for (i = 0; i < PY_MAX_LEVEL; i++) rd_s16b(&previous_char.player_hp[i]);
+ for (i = 0; i < PY_MAX_LEVEL; i++)
+ {
+ rd_s16b(&tmp16s);
+ previous_char.player_hp[i] = (HIT_POINT)tmp16s;
+ }
rd_s16b(&previous_char.chaos_patron);
{
for (i = 0; i < MAX_MANE; i++)
{
- rd_s16b(&p_ptr->mane_spell[i]);
- rd_s16b(&p_ptr->mane_dam[i]);
+ rd_s16b(&tmp16s);
+ p_ptr->mane_spell[i] = (SPELL_IDX)tmp16s;
+ rd_s16b(&tmp16s);
+ p_ptr->mane_dam[i] = (SPELL_IDX)tmp16s;
}
rd_s16b(&p_ptr->mane_num);
}
* Note the use of the new "monster allocation table" code to restrict
* the "get_mon_num()" function to "legal" escort types.
*/
-bool place_monster_aux(IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
int i, j, n;
monster_race *r_ptr = &r_info[r_idx];
*
* Note that this function may not succeed, though this is very rare.
*/
-bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
+bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode)
{
POSITION x, y;
MONRACE_IDX r_idx;
* @param mode 生成オプション
* @return 召喚できたらtrueを返す
*/
-bool summon_named_creature (int who, int oy, int ox, MONRACE_IDX r_idx, u32b mode)
+bool summon_named_creature (MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
int x, y;
* 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(int *cp, char tag, int floor_list[], int floor_num)
+static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floor_num)
{
int i;
cptr s;
void do_cmd_racial_power(void)
{
power_desc_type power_desc[36];
- int num, i = 0;
- int ask = TRUE;
- int lvl = p_ptr->lev;
+ int num;
+ COMMAND_CODE i = 0;
+ int ask = TRUE;
+ PLAYER_LEVEL lvl = p_ptr->lev;
bool flag, redraw, cast = FALSE;
bool warrior = ((p_ptr->pclass == CLASS_WARRIOR || p_ptr->pclass == CLASS_BERSERKER) ? TRUE : FALSE);
char choice;
bool ml; /* Monster is "visible" */
- IDX hold_o_idx; /* Object being held (if any) */
+ OBJECT_IDX hold_o_idx; /* Object being held (if any) */
POSITION target_y; /* Can attack !los player */
POSITION target_x; /* Can attack !los player */
- u16b nickname; /* Monster's Nickname */
+ STR_OFFSET nickname; /* Monster's Nickname */
- u32b exp;
+ EXP exp;
- u32b smart; /* Field for "smart_learn" */
+ BIT_FLAGS smart; /* Field for "smart_learn" */
- s16b parent_m_idx;
+ MONSTER_IDX parent_m_idx;
};