/*!
* @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);
}
}
}