OSDN Git Service

[Refactor] #3247 max_o_idx とmax_m_idx をハードコードにし、misc.txt から定義文を外した
authorHourier <66951241+Hourier@users.noreply.github.com>
Wed, 3 May 2023 04:20:24 +0000 (13:20 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Wed, 3 May 2023 04:20:24 +0000 (13:20 +0900)
lib/edit/misc.txt
src/floor/fixed-map-generator.cpp
src/world/world.h

index 5ba39f6..1e0cc77 100644 (file)
@@ -5,9 +5,3 @@ M:WX:99
 
 # Maximum y size of the wilderness
 M:WY:66
-
-# Maximum size for "o_list[]"
-M:O:1024
-
-# Maximum size for "m_list[]"
-M:M:1024
index 9025cf5..453f160 100644 (file)
@@ -396,11 +396,7 @@ static bool parse_qtw_M(qtwg_type *qtwg_ptr, char **zz)
         return true;
     }
 
-    if (zz[0][0] == 'O') {
-        w_ptr->max_o_idx = (OBJECT_IDX)atoi(zz[1]);
-    } else if (zz[0][0] == 'M') {
-        w_ptr->max_m_idx = (MONSTER_IDX)atoi(zz[1]);
-    } else if (zz[0][0] == 'W') {
+    if (zz[0][0] == 'W') {
         if (zz[0][1] == 'X') {
             w_ptr->max_wild_x = (POSITION)atoi(zz[1]);
         }
index 5d4e79d..2e873d2 100644 (file)
@@ -65,8 +65,8 @@ struct world_type {
 
     bool wizard{}; /* This world under wizard mode */
 
-    OBJECT_IDX max_o_idx{}; /*!< Maximum number of objects in the level */
-    MONSTER_IDX max_m_idx{}; /*!< Maximum number of monsters in the level */
+    OBJECT_IDX max_o_idx = 1024; /*!< 1フロアに存在可能な最大アイテム数 */
+    MONSTER_IDX max_m_idx = 1024; /*!< 1フロアに存在可能な最大モンスター数 */
 };
 
 extern world_type *w_ptr;