/*!
* @brief ダンジョンの壁部にストリーマー(地質の変化)を与える /
* Places "streamers" of rock through dungeon
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param feat ストリーマー地形ID
* @param chance 生成密度
* @return なし
* hidden gold types are currently unused.
* </pre>
*/
-void build_streamer(floor_type *floor_ptr, FEAT_IDX feat, int chance)
+void build_streamer(player_type *player_ptr, FEAT_IDX feat, int chance)
{
int i;
POSITION y, x, tx, ty;
bool streamer_may_have_gold = have_flag(streamer_ptr->flags, FF_MAY_HAVE_GOLD);
/* Hack -- Choose starting point */
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
y = rand_spread(floor_ptr->height / 2, floor_ptr->height / 6);
x = rand_spread(floor_ptr->width / 2, floor_ptr->width / 6);
int d = DUN_STR_RNG;
/* Pick a nearby grid */
- while (1)
+ while (TRUE)
{
ty = rand_spread(y, d);
tx = rand_spread(x, d);
}
}
- delete_object(ty, tx);
+ delete_object(floor_ptr, ty, tx);
}
/* Clear previous contents, add proper vein type */
/* Hack -- Add some known treasure */
if (one_in_(chance))
{
- cave_alter_feat(ty, tx, FF_MAY_HAVE_GOLD);
+ cave_alter_feat(player_ptr, ty, tx, FF_MAY_HAVE_GOLD);
}
/* Hack -- Add some hidden treasure */
else if (one_in_(chance / 4))
{
- cave_alter_feat(ty, tx, FF_MAY_HAVE_GOLD);
- cave_alter_feat(ty, tx, FF_ENSECRET);
+ cave_alter_feat(player_ptr, ty, tx, FF_MAY_HAVE_GOLD);
+ cave_alter_feat(player_ptr, ty, tx, FF_ENSECRET);
}
}
}
* Build a destroyed level
* @return なし
*/
-void destroy_level(floor_type *floor_ptr)
+void destroy_level(player_type *player_ptr)
{
- POSITION y1, x1;
- int n;
-
- /* Note destroyed levels */
msg_print_wizard(CHEAT_DUNGEON, _("階に*破壊*の痕跡を生成しました。", "Destroyed Level."));
/* Drop a few epi-centers (usually about two) */
- for (n = 0; n < randint1(5); n++)
+ POSITION y1, x1;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ for (int n = 0; n < randint1(5); n++)
{
/* Pick an epi-center */
x1 = rand_range(5, floor_ptr->width - 1 - 5);
y1 = rand_range(5, floor_ptr->height - 1 - 5);
- (void)destroy_area(floor_ptr, y1, x1, 15, TRUE);
+ (void)destroy_area(player_ptr, y1, x1, 15, TRUE);
}
}