* Some "local" parameters, used to help write savefiles
*/
-static FILE *fff; /* Current save "file" */
-
-static byte xor_byte; /* Simple encryption */
-
-static u32b v_stamp = 0L; /* A simple "checksum" on the actual values */
-static u32b x_stamp = 0L; /* A simple "checksum" on the encoded bytes */
+static FILE *fff; /* Current save "file" */
+static byte xor_byte; /* Simple encryption */
+static u32b v_stamp = 0L; /* A simple "checksum" on the actual values */
+static u32b x_stamp = 0L; /* A simple "checksum" on the encoded bytes */
/*** Write only un-obvious elements ***/
wr_s16b(o_ptr->k_idx);
- /* Location */
wr_byte((byte_hack)o_ptr->iy);
wr_byte((byte_hack)o_ptr->ix);
wr_u32b(r_ptr->r_flags6);
wr_u32b(r_ptr->r_flagsr);
-
/* Monster limit per level */
wr_byte((byte_hack)r_ptr->max_num);
/*!
- * @brief 店舗情報を書き込む / Write a "store" record
+ * @brief セーブデータに店舗情報を書き込む / Write a "store" record
* @param st_ptr 店舗情報の参照ポインタ
* @return なし
*/
/*!
- * @brief 乱数情報を書き込む / Write RNG state
- * @return なし
+ * @brief セーブデータに乱数情報を書き込む / Write RNG state
+ * @return 常に0(成功を返す)
*/
static errr wr_randomizer(void)
{
int i;
-
- /* Zero */
wr_u16b(0);
-
- /* Place */
wr_u16b(Rand_place);
- /* State */
for (i = 0; i < RAND_DEG; i++)
{
wr_u32b(Rand_state[i]);
}
- /* Success */
return (0);
}
/*** Oops ***/
- /* Oops */
for (i = 0; i < 4; i++) wr_u32b(0L);
wr_byte(p_ptr->psex);
wr_byte((byte_hack)p_ptr->realm1);
wr_byte((byte_hack)p_ptr->realm2);
- wr_byte(0); /* oops */
+ wr_byte(0);
wr_byte((byte)p_ptr->hitdie);
wr_u16b(p_ptr->expfact);
wr_s16b((s16b)max_dlv[i]);
/* More info */
- wr_s16b(0); /* oops */
- wr_s16b(0); /* oops */
- wr_s16b(0); /* oops */
- wr_s16b(0); /* oops */
+ wr_s16b(0);
+ wr_s16b(0);
+ wr_s16b(0);
+ wr_s16b(0);
wr_s16b(p_ptr->sc);
wr_s16b(p_ptr->concent);
wr_u32b(p_ptr->special_defense);
wr_byte(p_ptr->knowledge);
wr_byte(p_ptr->autopick_autoregister);
- wr_byte(0); /* oops */
+ wr_byte(0);
wr_byte((byte_hack)p_ptr->action);
wr_byte(0);
wr_byte(preserve_mode);
for (i = 0; i < 12; i++) wr_u32b(0L);
/* Ignore some flags */
- wr_u32b(0L); /* oops */
- wr_u32b(0L); /* oops */
- wr_u32b(0L); /* oops */
+ wr_u32b(0L);
+ wr_u32b(0L);
+ wr_u32b(0L);
/* Write the "object seeds" */
* Medium level player saver
* @return 成功すればtrue
* @details
- * XXX XXX XXX Angband 2.8.0 will use "fd" instead of "fff" if possible
+ * Angband 2.8.0 will use "fd" instead of "fff" if possible
*/
static bool save_player_aux(char *name)
{
#if !defined(MACINTOSH) && !defined(WINDOWS)
- /* XXX XXX XXX Fix this */
+ /* Fix this */
/* Verify the existance of the savefile */
if (access(savefile, 0) < 0)
msg_print(_("セーブファイルは現在使用中です。", "Savefile is currently in use."));
msg_print(NULL);
- /* Oops */
return (FALSE);
}
#endif
- /* Okay */
if (!err)
{
/* Open the savefile */
{
what = _("無効なタイム・スタンプです", "Invalid timestamp");
- /* Oops */
err = -1;
}
}
#endif
- /* Okay */
if (!err)
{
/* Give a conversion warning */
#endif
msg_print(NULL);
- /* Oops */
return (FALSE);
}