for (i = 0; i < b; i++)
{
- int y = 0, x = 0;
+ POSITION y = 0, x = 0;
int count;
for (count = 0; count <= 20; count++)
if (cast)
{
- int y, x;
+ POSITION y, x;
if (p_ptr->riding)
{
if (cave[y][x].m_idx)
{
int i;
- int ty = y, tx = x;
- int oy = y, ox = x;
- int m_idx = cave[y][x].m_idx;
+ POSITION ty = y, tx = x;
+ POSITION oy = y, ox = x;
+ IDX m_idx = cave[y][x].m_idx;
monster_type *m_ptr = &m_list[m_idx];
char m_name[80];
extern u16b bolt_pict(int y, int x, int ny, int nx, int typ);
extern sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg);
extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
-extern bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int monspell);
+extern bool project(int who, int rad, int y, int x, HIT_POINT dam, int typ, int flg, int monspell);
extern int project_length;
extern bool binding_field(int dam);
extern void seal_of_mirror(int dam);
extern bool get_rep_dir(int *dp, bool under);
extern bool get_rep_dir2(int *dp);
extern void gain_level_reward(int chosen_reward);
-extern bool tgt_pt (int *x, int *y);
+extern bool tgt_pt(int *x, int *y);
extern void do_poly_wounds(void);
extern void change_race(int new_race, cptr effect_msg);
extern HIT_POINT mon_damage_mod(monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear);
typedef s16b IDX; /*!< ゲーム中のID型を定義 */
-typedef byte POSITION; /*!< ゲーム中の座標型を定義 */
+typedef s32b POSITION; /*!< ゲーム中の座標型を定義 */
typedef s16b HIT_POINT; /*!< ゲーム中のHP/ダメージ型を定義 */
typedef s16b HIT_PROB; /*!< ゲーム中の命中修正値を定義 */
typedef s16b BASE_STATUS; /*!< ゲーム中の基礎能力値型を定義 */
typedef s16b PARAMETER_VALUE; /*!< ゲーム中のアイテム能力値の型定義 */
typedef s16b WEIGHT; /*!< ゲーム中の重量の型定義 */
+typedef int DICE_NUMBER; /*!< ゲーム中のダイス数の型定義 */
+typedef int DICE_SID; /*!< ゲーム中のダイス面の型定義 */
+
+
typedef u32b STR_OFFSET; /*!< テキストオフセットの型定義 */
/*** Pointers to all the basic types defined above ***/
static void rd_item_old(object_type *o_ptr)
{
char buf[128];
+ byte_hack tmp8u;
/* Kind */
rd_s16b(&o_ptr->k_idx);
/* Location */
- rd_byte(&o_ptr->iy);
- rd_byte(&o_ptr->ix);
+ rd_byte(&tmp8u);
+ o_ptr->iy = (POSITION)tmp8u;
+ rd_byte(&tmp8u);
+ o_ptr->ix = (POSITION)tmp8u;
/* Type/Subtype */
rd_byte(&o_ptr->tval);
object_kind *k_ptr;
u32b flags;
char buf[128];
+ byte_hack tmp8u;
if (h_older_than(1, 5, 0, 0))
{
rd_s16b(&o_ptr->k_idx);
/* Location */
- rd_byte(&o_ptr->iy);
- rd_byte(&o_ptr->ix);
+ rd_byte(&tmp8u);
+ o_ptr->iy = (POSITION)tmp8u;
+ rd_byte(&tmp8u);
+ o_ptr->ix = (POSITION)tmp8u;
/* Type/Subtype */
k_ptr = &k_info[o_ptr->k_idx];
rd_byte(&m_ptr->sub_align);
/* Read the other information */
- rd_byte(&m_ptr->fy);
- rd_byte(&m_ptr->fx);
+ rd_byte(&tmp8u);
+ m_ptr->fy = (POSITION)tmp8u;
+ rd_byte(&tmp8u);
+ m_ptr->fx = (POSITION)tmp8u;
+
rd_s16b(&m_ptr->hp);
rd_s16b(&m_ptr->maxhp);
if (z_older_than(11, 0, 5))
rd_s16b(&m_ptr->r_idx);
/* Read the other information */
- rd_byte(&m_ptr->fy);
- rd_byte(&m_ptr->fx);
+ rd_byte(&tmp8u);
+ m_ptr->fy = (POSITION)tmp8u;
+ rd_byte(&tmp8u);
+ m_ptr->fx = (POSITION)tmp8u;
+
rd_s16b(&m_ptr->hp);
rd_s16b(&m_ptr->maxhp);
rd_s16b(&m_ptr->max_maxhp);
* and "update_view()" and "update_monsters()" need to be called.
* </pre>
*/
-bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int monspell)
+bool project(int who, int rad, int y, int x, HIT_POINT dam, int typ, int flg, int monspell)
{
int i, t, dist;
{
int i, t, y, x, yy, xx, dy, dx;
int damage = 0;
- int sn = 0, sy = 0, sx = 0;
+ int sn = 0;
+ POSITION sy = 0, sx = 0;
bool hurt = FALSE;
cave_type *c_ptr;
bool map[32][32];
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
int typ = mbe_info[r_ptr->blow[i].effect].explode_type;
- int d_dice = r_ptr->blow[i].d_dice;
- int d_side = r_ptr->blow[i].d_side;
- int damage = damroll(d_dice, d_side);
+ DICE_NUMBER d_dice = r_ptr->blow[i].d_dice;
+ DICE_SID d_side = r_ptr->blow[i].d_side;
+ HIT_POINT damage = damroll(d_dice, d_side);
project(m_idx, 3, y, x, damage, typ, flg, -1);
break;