}
/* A type was chosen... */
- o_ptr->xtra2 = (byte_hack)type;
+ o_ptr->xtra2 = (byte)type;
add_flag(o_ptr->art_flags, TR_ACTIVATE);
o_ptr->timeout = 0;
}
/* Clean up */
clear_from(10);
- return (byte_hack)(picks[k]);
+ return (byte)(picks[k]);
}
}
/* Set race */
- creature_ptr->prace = (byte_hack)k;
+ creature_ptr->prace = (byte)k;
rp_ptr = &race_info[creature_ptr->prace];
}
/* Set class */
- creature_ptr->pclass = (byte_hack)k;
+ creature_ptr->pclass = (byte)k;
cp_ptr = &class_info[creature_ptr->pclass];
mp_ptr = &m_info[creature_ptr->pclass];
}
/* Set sex */
- creature_ptr->psex = (byte_hack)k;
+ creature_ptr->psex = (byte)k;
sp_ptr = &sex_info[creature_ptr->psex];
/* Display */
for (int i = 0; i < TR_FLAG_SIZE; i++) o_ptr->art_flags[i] |= k_ptr->flags[i];
if (k_ptr->pval) o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
- if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = (byte_hack)k_ptr->act_idx;
+ if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = (byte)k_ptr->act_idx;
if (dd_bonus > 0)
{
for (int i = 0; i < 16; i++)
{
/* Use attr matches */
- if (hack[i] == buf[x]) a = (byte_hack)i;
+ if (hack[i] == buf[x]) a = (byte)i;
}
/* Put the attr/char */
object_type *o_ptr;
concptr q, s;
POSITION iy, ix;
- byte_hack marked;
+ byte marked;
ITEM_NUMBER number;
OBJECT_IDX next_o_idx;
WEIGHT weight;
for (d = 0; d < 8; d++)
{
int old_head = flow_head;
- byte_hack m = subject_ptr->current_floor_ptr->grid_array[ty][tx].cost + 1;
- byte_hack n = subject_ptr->current_floor_ptr->grid_array[ty][tx].dist + 1;
+ byte m = subject_ptr->current_floor_ptr->grid_array[ty][tx].cost + 1;
+ byte n = subject_ptr->current_floor_ptr->grid_array[ty][tx].dist + 1;
grid_type *g_ptr;
/* Child location */
#undef huge
#define huge huge_hack /*!< WINDOWS環境で重複を避けるためのhuge_hack定義 / Hack -- prevent problems with WINDOWS */
-#undef byte
-#define byte byte_hack /*!< AMIGA環境で重複を避けるためのbyte_hack定義 / Hack -- prevent problems with AMIGA */
-
#undef bool
#define bool bool_hack /*!< C++環境で重複を避けるためのbool_hack定義 Hack -- prevent problems with C++ */
{
rd_s16b(&o_ptr->k_idx);
- byte_hack tmp8u;
+ byte tmp8u;
rd_byte(&tmp8u);
o_ptr->iy = (POSITION)tmp8u;
rd_byte(&tmp8u);
rd_u32b(&flags);
rd_s16b(&o_ptr->k_idx);
- byte_hack tmp8u;
+ byte tmp8u;
rd_byte(&tmp8u);
o_ptr->iy = (POSITION)tmp8u;
rd_byte(&tmp8u);
}
rd_s16b(&max_floor_id);
- byte_hack tmp8u;
+ byte tmp8u;
rd_byte(&tmp8u);
player_ptr->dungeon_idx = (DUNGEON_IDX)tmp8u;
byte num;
* 現在使用中のタイルID(0ならば未使用)
* Flag set once "graphics" has been initialized
*/
-static byte_hack current_graphics_mode = 0;
+static byte current_graphics_mode = 0;
/*
* The global bitmap
int i;
/* Extract the "arg_graphics" flag */
- arg_graphics = (byte_hack)GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);
+ arg_graphics = (byte)GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);
/* Extract the "arg_bigtile" flag */
arg_bigtile = (GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file) != 0);
}
/* A type was chosen... */
- o_ptr->xtra2 = (byte_hack)type;
+ o_ptr->xtra2 = (byte)type;
add_flag(o_ptr->art_flags, TR_ACTIVATE);
o_ptr->timeout = 0;
}
if (o_ptr->k_idx)
{
- creature_ptr->tval_ammo = (byte_hack)bow_tval_ammo(o_ptr);
+ creature_ptr->tval_ammo = (byte)bow_tval_ammo(o_ptr);
if (o_ptr->k_idx && !creature_ptr->heavy_shoot)
{
creature_ptr->num_fire = calc_num_fire(creature_ptr, o_ptr);
/* Save the room location */
if (dun->cent_n < CENT_MAX)
{
- dun->cent[dun->cent_n].y = (byte_hack)*y;
- dun->cent[dun->cent_n].x = (byte_hack)*x;
+ dun->cent[dun->cent_n].y = (byte)*y;
+ dun->cent[dun->cent_n].x = (byte)*x;
dun->cent_n++;
}
fill_data.info1, fill_data.info2, fill_data.info3))
{
/* Enqueue that entry */
- tmp_pos.y[flow_tail] = (byte_hack)j;
- tmp_pos.x[flow_tail] = (byte_hack)i;
+ tmp_pos.y[flow_tail] = (byte)j;
+ tmp_pos.x[flow_tail] = (byte)i;
/* Advance the queue */
if (++flow_tail == TEMP_MAX) flow_tail = 0;
/*** Write only un-obvious elements ***/
wr_s16b(o_ptr->k_idx);
- wr_byte((byte_hack)o_ptr->iy);
- wr_byte((byte_hack)o_ptr->ix);
+ wr_byte((byte)o_ptr->iy);
+ wr_byte((byte)o_ptr->ix);
if (flags & SAVE_ITEM_PVAL) wr_s16b(o_ptr->pval);
if (flags & SAVE_ITEM_DISCOUNT) wr_byte(o_ptr->discount);
- if (flags & SAVE_ITEM_NUMBER) wr_byte((byte_hack)o_ptr->number);
+ if (flags & SAVE_ITEM_NUMBER) wr_byte((byte)o_ptr->number);
wr_s16b((s16b)o_ptr->weight);
- if (flags & SAVE_ITEM_NAME1) wr_byte((byte_hack)o_ptr->name1);
- if (flags & SAVE_ITEM_NAME2) wr_byte((byte_hack)o_ptr->name2);
+ if (flags & SAVE_ITEM_NAME1) wr_byte((byte)o_ptr->name1);
+ if (flags & SAVE_ITEM_NAME2) wr_byte((byte)o_ptr->name2);
if (flags & SAVE_ITEM_TIMEOUT) wr_s16b(o_ptr->timeout);
if (flags & SAVE_ITEM_TO_H) wr_s16b(o_ptr->to_h);
if (flags & SAVE_ITEM_TO_D) wr_s16b((s16b)o_ptr->to_d);
if (flags & SAVE_ITEM_TO_A) wr_s16b(o_ptr->to_a);
if (flags & SAVE_ITEM_AC) wr_s16b(o_ptr->ac);
- if (flags & SAVE_ITEM_DD) wr_byte((byte_hack)o_ptr->dd);
- if (flags & SAVE_ITEM_DS) wr_byte((byte_hack)o_ptr->ds);
+ if (flags & SAVE_ITEM_DD) wr_byte((byte)o_ptr->dd);
+ if (flags & SAVE_ITEM_DS) wr_byte((byte)o_ptr->ds);
if (flags & SAVE_ITEM_IDENT) wr_byte(o_ptr->ident);
/*** Write only un-obvious elements ***/
wr_s16b(m_ptr->r_idx);
- wr_byte((byte_hack)m_ptr->fy);
- wr_byte((byte_hack)m_ptr->fx);
+ wr_byte((byte)m_ptr->fy);
+ wr_byte((byte)m_ptr->fx);
wr_s16b((s16b)m_ptr->hp);
wr_s16b((s16b)m_ptr->maxhp);
wr_s16b((s16b)m_ptr->max_maxhp);
wr_byte(r_ptr->r_xtra2);
/* Count drops */
- wr_byte((byte_hack)r_ptr->r_drop_gold);
- wr_byte((byte_hack)r_ptr->r_drop_item);
+ wr_byte((byte)r_ptr->r_drop_gold);
+ wr_byte((byte)r_ptr->r_drop_item);
/* Count spells */
wr_byte(0); /* unused now */
wr_u32b(r_ptr->r_flagsr);
/* Monster limit per level */
- wr_byte((byte_hack)r_ptr->max_num);
+ wr_byte((byte)r_ptr->max_num);
/* Location in saved floor */
wr_s16b(r_ptr->floor_id);
static void save_quick_start(void)
{
wr_byte(previous_char.psex);
- wr_byte((byte_hack)previous_char.prace);
- wr_byte((byte_hack)previous_char.pclass);
- wr_byte((byte_hack)previous_char.pseikaku);
- wr_byte((byte_hack)previous_char.realm1);
- wr_byte((byte_hack)previous_char.realm2);
+ wr_byte((byte)previous_char.prace);
+ wr_byte((byte)previous_char.pclass);
+ wr_byte((byte)previous_char.pseikaku);
+ wr_byte((byte)previous_char.realm1);
+ wr_byte((byte)previous_char.realm2);
wr_s16b(previous_char.age);
wr_s16b(previous_char.ht);
}
/* Race/Class/Gender/Spells */
- wr_byte((byte_hack)creature_ptr->prace);
- wr_byte((byte_hack)creature_ptr->pclass);
- wr_byte((byte_hack)creature_ptr->pseikaku);
- wr_byte((byte_hack)creature_ptr->psex);
- wr_byte((byte_hack)creature_ptr->realm1);
- wr_byte((byte_hack)creature_ptr->realm2);
+ wr_byte((byte)creature_ptr->prace);
+ wr_byte((byte)creature_ptr->pclass);
+ wr_byte((byte)creature_ptr->pseikaku);
+ wr_byte((byte)creature_ptr->psex);
+ wr_byte((byte)creature_ptr->realm1);
+ wr_byte((byte)creature_ptr->realm2);
wr_byte(0);
wr_byte((byte)creature_ptr->hitdie);
for (int i = 0; i < 108; i++) wr_s32b(creature_ptr->magic_num1[i]);
for (int i = 0; i < 108; i++) wr_byte(creature_ptr->magic_num2[i]);
- wr_byte((byte_hack)creature_ptr->start_race);
+ wr_byte((byte)creature_ptr->start_race);
wr_s32b(creature_ptr->old_race1);
wr_s32b(creature_ptr->old_race2);
wr_s16b(creature_ptr->old_realm);
wr_byte(creature_ptr->knowledge);
wr_byte(creature_ptr->autopick_autoregister);
wr_byte(0);
- wr_byte((byte_hack)creature_ptr->action);
+ wr_byte((byte)creature_ptr->action);
wr_byte(0);
wr_byte(preserve_mode);
wr_byte(creature_ptr->wait_report_score);
/*** The saved floor ***/
wr_s16b(sf_ptr->floor_id);
- wr_byte((byte_hack)sf_ptr->savefile_id);
+ wr_byte((byte)sf_ptr->savefile_id);
wr_s16b((s16b)sf_ptr->dun_level);
wr_s32b(sf_ptr->last_visit);
wr_u32b(sf_ptr->visit_mark);
wr_s16b(max_floor_id);
/* Current dungeon type */
- wr_byte((byte_hack)player_ptr->dungeon_idx);
+ wr_byte((byte)player_ptr->dungeon_idx);
/*** No saved floor (On the surface etc.) ***/
saved_floor_type *sf_ptr = &saved_floors[i];
wr_s16b(sf_ptr->floor_id);
- wr_byte((byte_hack)sf_ptr->savefile_id);
+ wr_byte((byte)sf_ptr->savefile_id);
wr_s16b((s16b)sf_ptr->dun_level);
wr_s32b(sf_ptr->last_visit);
wr_u32b(sf_ptr->visit_mark);
/* (prevents problems with multi-level quests) */
wr_s16b((s16b)q_ptr->level);
- wr_byte((byte_hack)q_ptr->complev);
+ wr_byte((byte)q_ptr->complev);
wr_u32b(q_ptr->comptime);
bool is_quest_running = q_ptr->status == QUEST_STATUS_TAKEN;
wr_s16b(q_ptr->type);
wr_s16b(q_ptr->r_idx);
wr_s16b(q_ptr->k_idx);
- wr_byte((byte_hack)q_ptr->flags);
- wr_byte((byte_hack)q_ptr->dungeon);
+ wr_byte((byte)q_ptr->flags);
+ wr_byte((byte)q_ptr->dungeon);
}
/* Dump the position in the wilderness */
/* Dump the ordered spells */
for (int i = 0; i < 64; i++)
{
- wr_byte((byte_hack)player_ptr->spell_order[i]);
+ wr_byte((byte)player_ptr->spell_order[i]);
}
for (int i = 0; i < INVEN_TOTAL; i++)
map_info(player_ptr, j, i, &ta, &tc, &ta, &tc);
/* Extract the priority */
- tp = (byte_hack)feat_priority;
+ tp = (byte)feat_priority;
if (match_autopick != -1
&& (match_autopick_yx[y][x] == -1
{
int path_n;
u16b path_g[512];
- byte_hack default_color = TERM_SLATE;
+ byte default_color = TERM_SLATE;
if (!display_path) return;
if (project_length == -1) return;
w_letter[index].town = 0;
if (num > 4)
- w_letter[index].road = (byte_hack)atoi(zz[4]);
+ w_letter[index].road = (byte)atoi(zz[4]);
else
w_letter[index].road = 0;
for (int i = 1; i < current_world_ptr->max_d_idx; i++)
{
if (!d_info[i].maxdepth) continue;
- wilderness[d_info[i].dy][d_info[i].dx].entrance = (byte_hack)i;
+ wilderness[d_info[i].dy][d_info[i].dx].entrance = (byte)i;
if (!wilderness[d_info[i].dy][d_info[i].dx].town)
{
wilderness[d_info[i].dy][d_info[i].dx].level = d_info[i].mindepth;
object_prep(o_ptr, i);
/* Save the name */
- o_ptr->name1 = (byte_hack)name1;
+ o_ptr->name1 = (byte)name1;
/* Extract the fields */
o_ptr->pval = a_ptr->pval;
if (tmp_int < 0 || tmp_int >= MAX_CLASS) return;
/* Save it */
- creature_ptr->pclass = (byte_hack)tmp_int;
+ creature_ptr->pclass = (byte)tmp_int;
/* Redraw inscription */
creature_ptr->window |= (PW_PLAYER);
if (tmp_int > 99) tmp_int = 99;
/* Accept modifications */
- o_ptr->number = (byte_hack)tmp_int;
+ o_ptr->number = (byte)tmp_int;
}
if (o_ptr->tval == TV_ROD)
*scr_tcc = tc;
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = (byte_hack)y;
- if (y > Term->y2) Term->y2 = (byte_hack)y;
+ if (y < Term->y1) Term->y1 = (byte)y;
+ if (y > Term->y2) Term->y2 = (byte)y;
/* Check for new min/max col info for this row */
- if (x < Term->x1[y]) Term->x1[y] = (byte_hack)x;
- if (x > Term->x2[y]) Term->x2[y] = (byte_hack)x;
+ if (x < Term->x1[y]) Term->x1[y] = (byte)x;
+ if (x > Term->x2[y]) Term->x2[y] = (byte)x;
#ifdef JP
if (((scrn->a[y][x] & AF_BIGTILE2) == AF_BIGTILE2) ||
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = (byte_hack)y;
- if (y > Term->y2) Term->y2 = (byte_hack)y;
+ if (y < Term->y1) Term->y1 = (byte)y;
+ if (y > Term->y2) Term->y2 = (byte)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
- if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte)x2;
}
}
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = (byte_hack)y;
- if (y > Term->y2) Term->y2 = (byte_hack)y;
+ if (y < Term->y1) Term->y1 = (byte)y;
+ if (y > Term->y2) Term->y2 = (byte)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
- if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte)x2;
}
}
}
/* This row is all done */
- Term->x1[y] = (byte_hack)w;
+ Term->x1[y] = (byte)w;
Term->x2[y] = 0;
/* Hack -- Flush that row (if allowed) */
}
/* No rows are invalid */
- Term->y1 = (byte_hack)h;
+ Term->y1 = (byte)h;
Term->y2 = 0;
}
if ((y < 0) || (y >= h)) return -1;
/* Remember the cursor */
- Term->scr->cx = (byte_hack)x;
- Term->scr->cy = (byte_hack)y;
+ Term->scr->cx = (byte)x;
+ Term->scr->cy = (byte)y;
/* The cursor is not useless */
Term->scr->cu = 0;
Term_queue_chars(Term->scr->cx, Term->scr->cy, n, a, s);
/* Advance the cursor */
- Term->scr->cx += (byte_hack)n;
+ Term->scr->cx += (byte)n;
/* Hack -- Notice "Useless" cursor */
if (res) Term->scr->cu = 1;
n++;
#endif
/* Save the "literal" information */
- scr_aa[x] = (byte_hack)na;
+ scr_aa[x] = (byte)na;
scr_cc[x] = (char)nc;
scr_taa[x] = 0;
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = (byte_hack)y;
- if (y > Term->y2) Term->y2 = (byte_hack)y;
+ if (y < Term->y1) Term->y1 = (byte)y;
+ if (y > Term->y2) Term->y2 = (byte)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
- if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte)x2;
}
/* Success */
if (x1 < 0) x1 = 0;
/* Set y limits */
- Term->y1 = (byte_hack)y1;
- Term->y2 = (byte_hack)y2;
+ Term->y1 = (byte)y1;
+ Term->y2 = (byte)y2;
/* Set the x limits */
for (i = Term->y1; i <= Term->y2; i++)
if (Term->scr->a[i][x2j] & AF_KANJI1) x2j++;
}
- Term->x1[i] = (byte_hack)x1j;
- Term->x2[i] = (byte_hack)x2j;
+ Term->x1[i] = (byte)x1j;
+ Term->x2[i] = (byte)x2j;
g_ptr = Term->old->c[i];