OSDN Git Service

[Refactor] #37353 AMIGAサポート打ち切りに伴い、byte_hack型のtypedefを削除 / Removed the typedef 'byte_...
authorHourier <hourier@users.sourceforge.jp>
Thu, 20 Feb 2020 12:33:45 +0000 (21:33 +0900)
committerHourier <hourier@users.sourceforge.jp>
Thu, 20 Feb 2020 12:33:45 +0000 (21:33 +0900)
18 files changed:
src/artifact.c
src/birth.c
src/bldg.c
src/cmd/cmd-dump.c
src/cmd/cmd-smith.c
src/grid.c
src/h-type.h
src/load.c
src/main-win.c
src/object-boost.c
src/player-status.c
src/rooms.c
src/save.c
src/view-mainwindow.c
src/wild.c
src/wizard1.c
src/wizard2.c
src/z-term.c

index fa1428c..15fe7a2 100644 (file)
@@ -1545,7 +1545,7 @@ static void give_activation_power(object_type *o_ptr)
        }
 
        /* 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;
 }
index 6de7176..b751da1 100644 (file)
@@ -794,7 +794,7 @@ static byte choose_realm(player_type *creature_ptr, s32b choices, int *count)
        /* Clean up */
        clear_from(10);
 
-       return (byte_hack)(picks[k]);
+       return (byte)(picks[k]);
 }
 
 
@@ -2636,7 +2636,7 @@ static bool get_player_race(player_type *creature_ptr)
        }
 
        /* Set race */
-       creature_ptr->prace = (byte_hack)k;
+       creature_ptr->prace = (byte)k;
 
        rp_ptr = &race_info[creature_ptr->prace];
 
@@ -2808,7 +2808,7 @@ static bool get_player_class(player_type *creature_ptr)
        }
 
        /* 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];
 
@@ -4007,7 +4007,7 @@ static bool player_birth_aux(player_type *creature_ptr)
        }
 
        /* Set sex */
-       creature_ptr->psex = (byte_hack)k;
+       creature_ptr->psex = (byte)k;
        sp_ptr = &sex_info[creature_ptr->psex];
 
        /* Display */
index b66095b..aadc457 100644 (file)
@@ -3012,7 +3012,7 @@ static PRICE repair_broken_weapon_aux(player_type *player_ptr, PRICE bcost)
 
        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)
        {
index 8933908..85bfbd1 100644 (file)
@@ -3533,7 +3533,7 @@ void do_cmd_load_screen(void)
                        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 */
index 642709a..e96de1a 100644 (file)
@@ -527,7 +527,7 @@ static void drain_essence(player_type *creature_ptr)
        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;
index fb50f5d..bc8d21c 100644 (file)
@@ -913,8 +913,8 @@ void update_flow(player_type *subject_ptr)
                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 */
index a2f688c..1ea8b50 100644 (file)
@@ -60,9 +60,6 @@ typedef int errr;
 #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++ */
 
index e2d2ac2..0117054 100644 (file)
@@ -366,7 +366,7 @@ static void rd_item_old(object_type *o_ptr)
 {
        rd_s16b(&o_ptr->k_idx);
 
-       byte_hack tmp8u;
+       byte tmp8u;
        rd_byte(&tmp8u);
        o_ptr->iy = (POSITION)tmp8u;
        rd_byte(&tmp8u);
@@ -615,7 +615,7 @@ static void rd_item(object_type *o_ptr)
        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);
@@ -2887,7 +2887,7 @@ static errr rd_dungeon(player_type *player_ptr)
        }
 
        rd_s16b(&max_floor_id);
-       byte_hack tmp8u;
+       byte tmp8u;
        rd_byte(&tmp8u);
        player_ptr->dungeon_idx = (DUNGEON_IDX)tmp8u;
        byte num;
index 785c708..e4becee 100644 (file)
@@ -599,7 +599,7 @@ static HWND hwndSaver;
  * 現在使用中のタイル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
@@ -1214,7 +1214,7 @@ static void load_prefs(void)
        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);
index 487cac8..d2abd4c 100644 (file)
@@ -425,7 +425,7 @@ void one_activation(object_type *o_ptr)
        }
 
        /* 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;
 }
index 04160b6..44c5ac6 100644 (file)
@@ -2950,7 +2950,7 @@ void calc_bonuses(player_type *creature_ptr)
 
        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);
index 1bf83e0..d071c35 100644 (file)
@@ -438,8 +438,8 @@ bool find_space(player_type *player_ptr, POSITION *y, POSITION *x, POSITION heig
        /* 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++;
        }
 
@@ -899,8 +899,8 @@ static void cave_fill(player_type *player_ptr, POSITION y, POSITION x)
                                        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;
index f37a7aa..4e6d8ce 100644 (file)
@@ -187,26 +187,26 @@ static void wr_item(object_type *o_ptr)
        /*** 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);
 
@@ -268,8 +268,8 @@ static void wr_monster(monster_type *m_ptr)
 
        /*** 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);
@@ -349,8 +349,8 @@ static void wr_lore(MONRACE_IDX r_idx)
        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 */
@@ -372,7 +372,7 @@ static void wr_lore(MONRACE_IDX r_idx)
        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);
@@ -549,11 +549,11 @@ static void wr_ghost(void)
 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);
@@ -600,12 +600,12 @@ static void wr_extra(player_type *creature_ptr)
        }
 
        /* 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);
@@ -640,7 +640,7 @@ static void wr_extra(player_type *creature_ptr)
        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);
@@ -779,7 +779,7 @@ static void wr_extra(player_type *creature_ptr)
        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);
@@ -857,7 +857,7 @@ static void wr_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr)
                /*** 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);
@@ -1072,7 +1072,7 @@ static bool wr_dungeon(player_type *player_ptr)
        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.) ***/
@@ -1100,7 +1100,7 @@ static bool wr_dungeon(player_type *player_ptr)
                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);
@@ -1271,7 +1271,7 @@ static bool wr_savefile_new(player_type *player_ptr)
                /* (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;
@@ -1284,8 +1284,8 @@ static bool wr_savefile_new(player_type *player_ptr)
                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 */
@@ -1342,7 +1342,7 @@ static bool wr_savefile_new(player_type *player_ptr)
        /* 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++)
index 6466b76..e492169 100644 (file)
@@ -3475,7 +3475,7 @@ void display_map(player_type *player_ptr, int *cy, int *cx)
                        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
@@ -3743,7 +3743,7 @@ void print_path(player_type *player_ptr, POSITION y, POSITION x)
 {
        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;
index 81654d5..25e984b 100644 (file)
@@ -835,7 +835,7 @@ errr parse_line_wilderness(player_type *creature_ptr, char *buf, int xmin, int x
                                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;
                        
@@ -907,7 +907,7 @@ errr parse_line_wilderness(player_type *creature_ptr, char *buf, int xmin, int x
        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;
index 21116a0..9fabd26 100644 (file)
@@ -1535,7 +1535,7 @@ static bool make_fake_artifact(object_type *o_ptr, IDX name1)
        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;
index fb44601..282a672 100644 (file)
@@ -310,7 +310,7 @@ static void do_cmd_wiz_reset_class(player_type *creature_ptr)
        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);
@@ -1113,7 +1113,7 @@ static void wiz_quantity_item(object_type *o_ptr)
                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)
index c51bd70..91a9258 100644 (file)
@@ -532,12 +532,12 @@ void Term_queue_char(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c, TERM_COLOR ta
        *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) ||
@@ -689,12 +689,12 @@ void Term_queue_line(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR *a, char *c, TERM
        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;
        }
 }
 
@@ -822,12 +822,12 @@ void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
        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;
        }
 }
 
@@ -1686,7 +1686,7 @@ errr Term_fresh(void)
                                }
 
                                /* 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) */
@@ -1695,7 +1695,7 @@ errr Term_fresh(void)
                }
 
                /* No rows are invalid */
-               Term->y1 = (byte_hack)h;
+               Term->y1 = (byte)h;
                Term->y2 = 0;
        }
 
@@ -1812,8 +1812,8 @@ errr Term_gotoxy(TERM_LEN x, TERM_LEN y)
        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;
@@ -1966,7 +1966,7 @@ errr Term_addstr(int n, TERM_COLOR a, concptr s)
        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;
@@ -2116,7 +2116,7 @@ errr Term_erase(TERM_LEN x, TERM_LEN y, int n)
                        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;
@@ -2133,12 +2133,12 @@ errr Term_erase(TERM_LEN x, TERM_LEN y, int n)
        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 */
@@ -2238,8 +2238,8 @@ errr Term_redraw_section(TERM_LEN x1, TERM_LEN y1, TERM_LEN x2, TERM_LEN y2)
        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++)
@@ -2258,8 +2258,8 @@ errr Term_redraw_section(TERM_LEN x1, TERM_LEN y1, TERM_LEN x2, TERM_LEN y2)
                        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];