OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / save.c
index ec61b98..384b234 100644 (file)
@@ -476,6 +476,7 @@ static void wr_options(void)
 
        if (p_ptr->wizard) c |= 0x0002;
 
+       if (cheat_sight) c |= 0x0040;
        if (cheat_turn) c |= 0x0080;
 
        if (cheat_peek) c |= 0x0100;
@@ -797,7 +798,7 @@ static void wr_extra(void)
        wr_byte(p_ptr->knowledge);
        wr_byte(p_ptr->autopick_autoregister);
        wr_byte(0);     /* oops */
-       wr_byte(p_ptr->action);
+       wr_byte((byte_hack)p_ptr->action);
        wr_byte(0);
        wr_byte(preserve_mode);
        wr_byte(p_ptr->wait_report_score);
@@ -940,7 +941,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
                /*** The saved floor ***/
 
                wr_s16b(sf_ptr->floor_id);
-               wr_byte(sf_ptr->savefile_id);
+               wr_byte((byte_hack)sf_ptr->savefile_id);
                wr_s16b((s16b)sf_ptr->dun_level);
                wr_s32b(sf_ptr->last_visit);
                wr_u32b(sf_ptr->visit_mark);
@@ -1043,7 +1044,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
                cave_template_type *ct_ptr = &templates[i];
 
                /* Dump it */
-               wr_u16b(ct_ptr->info);
+               wr_u16b((u16b)ct_ptr->info);
                wr_s16b(ct_ptr->feat);
                wr_s16b(ct_ptr->mimic);
                wr_s16b(ct_ptr->special);
@@ -1211,7 +1212,7 @@ static bool wr_dungeon(void)
                saved_floor_type *sf_ptr = &saved_floors[i];
 
                wr_s16b(sf_ptr->floor_id);
-               wr_byte(sf_ptr->savefile_id);
+               wr_byte((byte_hack)sf_ptr->savefile_id);
                wr_s16b((s16b)sf_ptr->dun_level);
                wr_s32b(sf_ptr->last_visit);
                wr_u32b(sf_ptr->visit_mark);
@@ -1387,14 +1388,14 @@ static bool wr_savefile_new(void)
        wr_u16b(tmp16u);
 
        /* Dump the quests */
-       tmp16u = max_quests;
+       tmp16u = max_q_idx;
        wr_u16b(tmp16u);
 
        /* Dump the quests */
        tmp8u = MAX_RANDOM_QUEST-MIN_RANDOM_QUEST;
        wr_byte(tmp8u);
 
-       for (i = 0; i < max_quests; i++)
+       for (i = 0; i < max_q_idx; i++)
        {
                quest_type* const q_ptr = &quest[i];