OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#37287 #37353 (2.2.0.89) 新しい型定義を全大文字化。 / New typedef change to full-large letter.
[hengband/hengband.git]
/
src
/
load.c
diff --git
a/src/load.c
b/src/load.c
index
9203561
..
bd06158
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-137,7
+137,7
@@
static bool z_older_than(byte x, byte y, byte z)
/*!
* @brief ゲームスクリーンにメッセージを表示する / Hack -- Show information on the screen, one line at a time.
/*!
* @brief ゲームスクリーンにメッセージを表示する / Hack -- Show information on the screen, one line at a time.
- * @param
cptr
表示文字列
+ * @param
msg
表示文字列
* @return なし
* @details
* Avoid the top two lines, to avoid interference with "msg_print()".
* @return なし
* @details
* Avoid the top two lines, to avoid interference with "msg_print()".
@@
-238,7
+238,7
@@
static void rd_s32b(s32b *ip)
/*!
* @brief ロードファイルポインタから文字列を読み込んでポインタに渡す / Hack -- read a string
/*!
* @brief ロードファイルポインタから文字列を読み込んでポインタに渡す / Hack -- read a string
- * @param
ip
読み込みポインタ
+ * @param
str
読み込みポインタ
* @param max 最大読み取りバイト数
* @return なし
*/
* @param max 最大読み取りバイト数
* @return なし
*/
@@
-1182,8
+1182,8
@@
static void rd_lore(int r_idx)
r_ptr->r_flags2 &= r_ptr->flags2;
r_ptr->r_flags3 &= r_ptr->flags3;
r_ptr->r_flags4 &= r_ptr->flags4;
r_ptr->r_flags2 &= r_ptr->flags2;
r_ptr->r_flags3 &= r_ptr->flags3;
r_ptr->r_flags4 &= r_ptr->flags4;
- r_ptr->r_flags5 &= r_ptr->
flags5
;
- r_ptr->r_flags6 &= r_ptr->
flags6
;
+ r_ptr->r_flags5 &= r_ptr->
a_ability_flags1
;
+ r_ptr->r_flags6 &= r_ptr->
a_ability_flags2
;
r_ptr->r_flagsr &= r_ptr->flagsr;
}
r_ptr->r_flagsr &= r_ptr->flagsr;
}
@@
-1436,6
+1436,8
@@
static void rd_options(void)
cheat_know = (c & 0x1000) ? TRUE : FALSE;
cheat_live = (c & 0x2000) ? TRUE : FALSE;
cheat_save = (c & 0x4000) ? TRUE : FALSE;
cheat_know = (c & 0x1000) ? TRUE : FALSE;
cheat_live = (c & 0x2000) ? TRUE : FALSE;
cheat_save = (c & 0x4000) ? TRUE : FALSE;
+ cheat_diary_output = (c & 0x8000) ? TRUE : FALSE;
+ cheat_turn = (c & 0x0080) ? TRUE : FALSE;
rd_byte((byte *)&autosave_l);
rd_byte((byte *)&autosave_t);
rd_byte((byte *)&autosave_l);
rd_byte((byte *)&autosave_t);
@@
-1623,7
+1625,7
@@
static void rd_extra(void)
s16b tmp16s;
u16b tmp16u;
s16b tmp16s;
u16b tmp16u;
- rd_string(p
layer_name, sizeof(player_
name));
+ rd_string(p
_ptr->name, sizeof(p_ptr->
name));
rd_string(p_ptr->died_from, sizeof(p_ptr->died_from));
rd_string(p_ptr->died_from, sizeof(p_ptr->died_from));
@@
-1704,7
+1706,7
@@
static void rd_extra(void)
for (i = 0; i < 5; i++) for (j = 0; j < 60; j++) rd_s16b(&p_ptr->weapon_exp[i][j]);
else
for (i = 0; i < 5; i++) for (j = 0; j < 64; j++) rd_s16b(&p_ptr->weapon_exp[i][j]);
for (i = 0; i < 5; i++) for (j = 0; j < 60; j++) rd_s16b(&p_ptr->weapon_exp[i][j]);
else
for (i = 0; i < 5; i++) for (j = 0; j < 64; j++) rd_s16b(&p_ptr->weapon_exp[i][j]);
- for (i = 0; i <
10
; i++) rd_s16b(&p_ptr->skill_exp[i]);
+ for (i = 0; i <
GINOU_MAX
; i++) rd_s16b(&p_ptr->skill_exp[i]);
if (z_older_than(10, 4, 1))
{
if (p_ptr->pclass != CLASS_BEASTMASTER) p_ptr->skill_exp[GINOU_RIDING] /= 2;
if (z_older_than(10, 4, 1))
{
if (p_ptr->pclass != CLASS_BEASTMASTER) p_ptr->skill_exp[GINOU_RIDING] /= 2;
@@
-1749,7
+1751,7
@@
static void rd_extra(void)
if (z_older_than(10, 0, 1))
{
if (z_older_than(10, 0, 1))
{
- for (i = 0; i <
OLD_
MAX_MANE; i++)
+ for (i = 0; i < MAX_MANE; i++)
{
p_ptr->mane_spell[i] = -1;
p_ptr->mane_dam[i] = 0;
{
p_ptr->mane_spell[i] = -1;
p_ptr->mane_dam[i] = 0;
@@
-2368,20
+2370,40
@@
static void rd_messages(void)
int i;
char buf[128];
int i;
char buf[128];
- s16b num;
- /* Total */
- rd_s16b(&num);
+ if (h_older_than(2, 2, 0, 75))
+ {
+ u16b num;
+ /* Total */
+ rd_u16b(&num);
- /* Read the messages */
- for (i = 0; i < num; i++)
+ /* Read the messages */
+ for (i = 0; i < num; i++)
+ {
+ /* Read the message */
+ rd_string(buf, sizeof(buf));
+
+ /* Save the message */
+ message_add(buf);
+ }
+ }
+ else
{
{
- /* Read the message */
- rd_string(buf, sizeof(buf));
+ u32b num;
+ /* Total */
+ rd_u32b(&num);
+
+ /* Read the messages */
+ for (i = 0; i < num; i++)
+ {
+ /* Read the message */
+ rd_string(buf, sizeof(buf));
- /* Save the message */
- message_add(buf);
+ /* Save the message */
+ message_add(buf);
+ }
}
}
+
}
}
@@
-2437,17
+2459,17
@@
static errr rd_dungeon_old(void)
rd_s16b(&num_repro);
rd_s16b(&tmp16s);
rd_s16b(&num_repro);
rd_s16b(&tmp16s);
- py = (int)tmp16s;
+ p
_ptr->
y = (int)tmp16s;
rd_s16b(&tmp16s);
rd_s16b(&tmp16s);
- px = (int)tmp16s;
- if (z_older_than(10, 3, 13) && !dun_level && !p_ptr->inside_arena) {p
y = 33;p
x = 131;}
+ p
_ptr->
x = (int)tmp16s;
+ if (z_older_than(10, 3, 13) && !dun_level && !p_ptr->inside_arena) {p
_ptr->y = 33;p_ptr->
x = 131;}
rd_s16b(&cur_hgt);
rd_s16b(&cur_wid);
rd_s16b(&tmp16s); /* max_panel_rows */
rd_s16b(&tmp16s); /* max_panel_cols */
#if 0
rd_s16b(&cur_hgt);
rd_s16b(&cur_wid);
rd_s16b(&tmp16s); /* max_panel_rows */
rd_s16b(&tmp16s); /* max_panel_cols */
#if 0
- if (!p
y || !px) {py = 10;p
x = 10;}/* ダンジョン生成に失敗してセグメンテったときの復旧用 */
+ if (!p
_ptr->y || !p_ptr->x) {p_ptr->y = 10;p_ptr->
x = 10;}/* ダンジョン生成に失敗してセグメンテったときの復旧用 */
#endif
/* Maximal size */
#endif
/* Maximal size */
@@
-2705,7
+2727,7
@@
static errr rd_dungeon_old(void)
/* Read the dungeon items */
for (i = 1; i < limit; i++)
{
/* Read the dungeon items */
for (i = 1; i < limit; i++)
{
-
int
o_idx;
+
IDX
o_idx;
object_type *o_ptr;
object_type *o_ptr;
@@
-2820,7
+2842,7
@@
static errr rd_dungeon_old(void)
/*!
/*!
- * @brie
d
保存されたフロアを読み込む / Read the saved floor
+ * @brie
f
保存されたフロアを読み込む / Read the saved floor
* @return なし
* @details
* The monsters/objects must be loaded in the same order
* @return なし
* @details
* The monsters/objects must be loaded in the same order
@@
-2887,10
+2909,10
@@
static errr rd_saved_floor(saved_floor_type *sf_ptr)
rd_s16b(&num_repro);
rd_u16b(&tmp16u);
rd_s16b(&num_repro);
rd_u16b(&tmp16u);
- py = (int)tmp16u;
+ p
_ptr->
y = (int)tmp16u;
rd_u16b(&tmp16u);
rd_u16b(&tmp16u);
- px = (int)tmp16u;
+ p
_ptr->
x = (int)tmp16u;
rd_s16b(&cur_hgt);
rd_s16b(&cur_wid);
rd_s16b(&cur_hgt);
rd_s16b(&cur_wid);
@@
-3111,9
+3133,10
@@
static errr rd_saved_floor(saved_floor_type *sf_ptr)
}
}
-/*
- * Read the dungeon (new method)
- *
+/*!
+ * @brief 保存されたフロアを読み込む(現版) / Read the dungeon (new method)
+ * @return なし
+ * @details
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
@@
-3254,8
+3277,9
@@
static errr rd_dungeon(void)
}
}
-/*
- * Actually read the savefile
+/*!
+ * @brief ロード処理全体のサブ関数 / Actually read the savefile
+ * @return エラーコード
*/
static errr rd_savefile_new_aux(void)
{
*/
static errr rd_savefile_new_aux(void)
{
@@
-3275,12
+3299,6
@@
static errr rd_savefile_new_aux(void)
#endif
#endif
- /* Mention the savefile version */
- note(format(
- _("バージョン %d.%d.%d のセーブ・ファイルをロード中...", "Loading a %d.%d.%d savefile..."),
- (z_major > 9) ? z_major - 10 : z_major, z_minor, z_patch));
-
-
/* Strip the version bytes */
strip_bytes(4);
/* Strip the version bytes */
strip_bytes(4);
@@
-3299,6
+3317,12
@@
static errr rd_savefile_new_aux(void)
rd_byte(&h_ver_minor);
rd_byte(&h_ver_major);
rd_byte(&h_ver_minor);
rd_byte(&h_ver_major);
+ /* Mention the savefile version */
+ note(format(
+ _("バージョン %d.%d.%d.%d のセーブ・ファイルをロード中...", "Loading a %d.%d.%d.%d savefile..."),
+ (h_ver_major > 9) ? h_ver_major - 10 : h_ver_major, h_ver_minor, h_ver_patch, h_ver_extra));
+
+
/* Operating system info */
rd_u32b(&sf_system);
/* Operating system info */
rd_u32b(&sf_system);
@@
-3382,7
+3406,6
@@
static errr rd_savefile_new_aux(void)
/* Read the object memory */
for (i = 0; i < tmp16u; i++)
{
/* Read the object memory */
for (i = 0; i < tmp16u; i++)
{
- byte tmp8u;
object_kind *k_ptr = &k_info[i];
rd_byte(&tmp8u);
object_kind *k_ptr = &k_info[i];
rd_byte(&tmp8u);
@@
-3839,9
+3862,9
@@
static errr rd_savefile_new_aux(void)
return (0);
}
return (0);
}
-
-/*
- *
Actually read the savefile
+/*!
+ * @brief ロード処理全体のメイン関数 / Actually read the savefile
+ *
@return エラーコード
*/
errr rd_savefile_new(void)
{
*/
errr rd_savefile_new(void)
{
@@
-3873,8
+3896,10
@@
errr rd_savefile_new(void)
}
}
-/*
- * Actually load and verify a floor save data
+/*!
+ * @brief 保存フロア読み込みのサブ関数 / Actually load and verify a floor save data
+ * @param sf_ptr 保存フロア読み込み先
+ * @return 成功したらtrue
*/
static bool load_floor_aux(saved_floor_type *sf_ptr)
{
*/
static bool load_floor_aux(saved_floor_type *sf_ptr)
{
@@
-3934,8
+3959,11
@@
static bool load_floor_aux(saved_floor_type *sf_ptr)
}
}
-/*
- * Attempt to load the temporally saved-floor data
+/*!
+ * @brief 一時保存フロア情報を読み込む / Attempt to load the temporally saved-floor data
+ * @param sf_ptr 保存フロア読み込み先
+ * @param mode オプション
+ * @return 成功したらtrue
*/
bool load_floor(saved_floor_type *sf_ptr, u32b mode)
{
*/
bool load_floor(saved_floor_type *sf_ptr, u32b mode)
{