OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / load.c
index f4c6595..d57c92d 100644 (file)
 #include "angband.h"
 #include "generate.h"
 #include "trap.h"
+#include "mutation.h"
+#include "quest.h"
+#include "store.h"
+#include "artifact.h"
+#include "avatar.h"
 
 
 /*
@@ -144,7 +149,7 @@ static bool z_older_than(byte x, byte y, byte z)
  * @details
  * Avoid the top two lines, to avoid interference with "msg_print()".
  */
-static void note(cptr msg)
+static void note(concptr msg)
 {
        static TERM_LEN y = 2;
 
@@ -1682,8 +1687,8 @@ static void load_quick_start(void)
        rd_s16b(&previous_char.sc);
        rd_s32b(&previous_char.au);
 
-       for (i = 0; i < 6; i++) rd_s16b(&previous_char.stat_max[i]);
-       for (i = 0; i < 6; i++) rd_s16b(&previous_char.stat_max_max[i]);
+       for (i = 0; i < A_MAX; i++) rd_s16b(&previous_char.stat_max[i]);
+       for (i = 0; i < A_MAX; i++) rd_s16b(&previous_char.stat_max_max[i]);
 
        for (i = 0; i < PY_MAX_LEVEL; i++)
        {
@@ -1770,9 +1775,9 @@ static void rd_extra(void)
        rd_s16b(&p_ptr->wt);
 
        /* Read the stat info */
-       for (i = 0; i < 6; i++) rd_s16b(&p_ptr->stat_max[i]);
-       for (i = 0; i < 6; i++) rd_s16b(&p_ptr->stat_max_max[i]);
-       for (i = 0; i < 6; i++) rd_s16b(&p_ptr->stat_cur[i]);
+       for (i = 0; i < A_MAX; i++) rd_s16b(&p_ptr->stat_max[i]);
+       for (i = 0; i < A_MAX; i++) rd_s16b(&p_ptr->stat_max_max[i]);
+       for (i = 0; i < A_MAX; i++) rd_s16b(&p_ptr->stat_cur[i]);
 
        strip_bytes(24);
        rd_s32b(&p_ptr->au);
@@ -2418,10 +2423,7 @@ static errr rd_inventory(void)
                /* Wield equipment */
                if (n >= INVEN_RARM)
                {
-                       /* Player touches it */
                        q_ptr->marked |= OM_TOUCHED;
-
-                       /* Copy object */
                        object_copy(&inventory[n], q_ptr);
 
                        /* Add the weight */
@@ -2446,10 +2448,7 @@ static errr rd_inventory(void)
                        /* Get a slot */
                        n = slot++;
 
-                       /* Player touches it */
                        q_ptr->marked |= OM_TOUCHED;
-
-                       /* Copy object */
                        object_copy(&inventory[n], q_ptr);
 
                        /* Add the weight */