From 50ef0802151de7338a5bef8c71d8925b74b7b1de Mon Sep 17 00:00:00 2001 From: Hourier <66951241+Hourier@users.noreply.github.com> Date: Sun, 30 Oct 2022 00:04:38 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#2680=20DUN=5FSTR=5F*=20=E3=81=8C?= =?utf8?q?=E5=90=841=E7=AE=87=E6=89=80=E3=81=8B=E3=82=89=E3=81=97=E3=81=8B?= =?utf8?q?=E5=8F=82=E7=85=A7=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA?= =?utf8?q?=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81floor-stre?= =?utf8?q?ams.cpp=20=E3=81=A8cave-gnerator.cpp=20=E3=81=AB=E3=81=9D?= =?utf8?q?=E3=82=8C=E3=81=9E=E3=82=8C=E9=96=A2=E6=95=B0=E5=86=85=E3=82=B3?= =?utf8?q?=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB=E5=AE=9A=E6=95=B0=E3=81=A8?= =?utf8?q?=E3=81=97=E3=81=A6=E5=86=8D=E5=AE=9A=E7=BE=A9=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/floor/cave-generator.cpp | 12 ++++++++---- src/floor/floor-streams.cpp | 6 ++++-- src/system/gamevalue.h | 12 ------------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/floor/cave-generator.cpp b/src/floor/cave-generator.cpp index c04762247..92be74bc8 100644 --- a/src/floor/cave-generator.cpp +++ b/src/floor/cave-generator.cpp @@ -265,14 +265,18 @@ static void make_aqua_streams(PlayerType *player_ptr, dun_data_type *dd_ptr, dun } if (d_ptr->stream2) { - for (int i = 0; i < DUN_STR_QUA; i++) { - build_streamer(player_ptr, d_ptr->stream2, DUN_STR_QC); + constexpr auto num_quartz = 4; + constexpr auto chance_quartz = 15; + for (auto i = 0; i < num_quartz; i++) { + build_streamer(player_ptr, d_ptr->stream2, chance_quartz); } } if (d_ptr->stream1) { - for (int i = 0; i < DUN_STR_MAG; i++) { - build_streamer(player_ptr, d_ptr->stream1, DUN_STR_MC); + constexpr auto num_magma = 6; + constexpr auto chance_magma = 30; + for (auto i = 0; i < num_magma; i++) { + build_streamer(player_ptr, d_ptr->stream1, chance_magma); } } } diff --git a/src/floor/floor-streams.cpp b/src/floor/floor-streams.cpp index 191432bf1..f90fc222a 100644 --- a/src/floor/floor-streams.cpp +++ b/src/floor/floor-streams.cpp @@ -307,8 +307,10 @@ void build_streamer(PlayerType *player_ptr, FEAT_IDX feat, int chance) dummy++; /* One grid per density */ - for (i = 0; i < DUN_STR_DEN; i++) { - int d = DUN_STR_RNG; + constexpr auto stream_density = 5; + for (i = 0; i < stream_density; i++) { + constexpr auto stream_width = 5; + int d = stream_width; /* Pick a nearby grid */ while (true) { diff --git a/src/system/gamevalue.h b/src/system/gamevalue.h index 998c9eab3..cf4e13e99 100644 --- a/src/system/gamevalue.h +++ b/src/system/gamevalue.h @@ -54,18 +54,6 @@ #define MAX_VAMPIRIC_DRAIN 50 /*!< 吸血処理の最大回復HP */ -/* - * Dungeon streamer generation values - */ -#define DUN_STR_DEN 5 /* Density of streamers */ -#define DUN_STR_RNG 5 /* Width of streamers */ -#define DUN_STR_MAG 6 /* Number of magma streamers */ -#define DUN_STR_MC 30 /* 1/chance of treasure per magma */ -#define DUN_STR_QUA 4 /* Number of quartz streamers */ -#define DUN_STR_QC 15 /* 1/chance of treasure per quartz */ -#define DUN_STR_WLW 1 /* Width of lava & water streamers -KMW- */ -#define DUN_STR_DWLW 8 /* Density of water & lava streams -KMW- */ - #define DUN_MOS_DEN 2 /* Density of moss streamers */ #define DUN_MOS_RNG 10 /* Width of moss streamers */ #define DUN_STR_MOS 2 /* Number of moss streamers */ -- 2.11.0