}
}
+
/*!
* @brief パターン終点到達時のテレポート処理を行う
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
static void pattern_teleport(player_type *creature_ptr)
wreck_the_pattern(creature_ptr);
}
- pattern_type = f_info[p_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat].subtype;
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
+ pattern_type = f_info[floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat].subtype;
switch (pattern_type)
{
(void)restore_level(creature_ptr);
(void)cure_critical_wounds(creature_ptr, 1000);
- cave_set_feat(creature_ptr->current_floor_ptr, creature_ptr->y, creature_ptr->x, feat_pattern_old);
+ cave_set_feat(floor_ptr, creature_ptr->y, creature_ptr->x, feat_pattern_old);
msg_print(_("「パターン」のこの部分は他の部分より強力でないようだ。", "This section of the Pattern looks less powerful."));
/*
return (&p_ptr->inventory_list[choices[randint0(number)]]);
}
+
static void process_world_aux_digestion(player_type *creature_ptr)
{
if (!creature_ptr->phase_out)
flush();
msg_print(NULL);
- (void)get_hack_dir(&dire);
+ (void)get_hack_dir(creature_ptr, &dire);
fire_ball(creature_ptr, GF_MANA, dire, creature_ptr->lev * 2, 3);
}
}
/* Process objects on floor */
- for (i = 1; i < p_ptr->current_floor_ptr->o_max; i++)
+ for (i = 1; i < creature_ptr->current_floor_ptr->o_max; i++)
{
- object_type *o_ptr = &p_ptr->current_floor_ptr->o_list[i];
+ object_type *o_ptr = &creature_ptr->current_floor_ptr->o_list[i];
if (!OBJECT_IS_VALID(o_ptr)) continue;
creature_ptr->reset_concent = TRUE;
/* Parse the command */
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
switch (command_cmd)
{
/* Ignore */
/* Go up staircase */
case '<':
{
- if (!creature_ptr->wild_mode && !p_ptr->current_floor_ptr->dun_level && !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->current_floor_ptr->inside_quest)
+ if (!creature_ptr->wild_mode && !floor_ptr->dun_level && !floor_ptr->inside_arena && !floor_ptr->inside_quest)
{
if (vanilla_town) break;
{
msg_print(_("呪文を唱えられない!", "You cannot cast spells!"));
}
- else if (p_ptr->current_floor_ptr->dun_level && (d_info[creature_ptr->dungeon_idx].flags1 & DF1_NO_MAGIC) && (creature_ptr->pclass != CLASS_BERSERKER) && (creature_ptr->pclass != CLASS_SMITH))
+ else if (floor_ptr->dun_level && (d_info[creature_ptr->dungeon_idx].flags1 & DF1_NO_MAGIC) && (creature_ptr->pclass != CLASS_BERSERKER) && (creature_ptr->pclass != CLASS_SMITH))
{
msg_print(_("ダンジョンが魔法を吸収した!", "The dungeon absorbs all attempted magic!"));
msg_print(NULL);
/* Identify symbol */
case '/':
{
- do_cmd_query_symbol();
+ do_cmd_query_symbol(creature_ptr);
break;
}
(void)drop_near(owner_ptr, o_ptr, 0, owner_ptr->y, owner_ptr->x);
vary_item(owner_ptr, INVEN_PACK, -255);
- handle_stuff();
+ handle_stuff(owner_ptr);
}
/*!
}
}
- handle_stuff();
+ handle_stuff(creature_ptr);
}
load = FALSE;
creature_ptr->counter = FALSE;
creature_ptr->now_damaged = FALSE;
- handle_stuff();
+ handle_stuff(creature_ptr);
/* Place the cursor on the player */
move_cursor_relative(creature_ptr->y, creature_ptr->x);
command_rep--;
creature_ptr->redraw |= (PR_STATE);
- handle_stuff();
+ handle_stuff(creature_ptr);
/* Hack -- Assume messages were seen */
msg_flag = FALSE;
creature_ptr->timewalk = FALSE;
creature_ptr->energy_need = ENERGY_NEED();
- handle_stuff();
+ handle_stuff(creature_ptr);
}
}
player_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_EQUIPPY | PR_MAP);
player_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS | PU_VIEW | PU_LITE | PU_MON_LITE | PU_TORCH | PU_MONSTERS | PU_DISTANCE | PU_FLOW);
- handle_stuff();
+ handle_stuff(player_ptr);
/* Leave "xtra" mode */
current_world_ptr->character_xtra = FALSE;
player_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
player_ptr->update |= (PU_COMBINE | PU_REORDER);
- handle_stuff();
+ handle_stuff(player_ptr);
Term_fresh();
if (quest_num && (is_fixed_quest_idx(quest_num) &&
process_player(player_ptr);
process_upkeep_with_speed(player_ptr);
- handle_stuff();
+ handle_stuff(player_ptr);
/* Hack -- Hilite the player */
move_cursor_relative(player_ptr->y, player_ptr->x);
/* Process all of the monsters */
process_monsters(player_ptr);
- handle_stuff();
+ handle_stuff(player_ptr);
/* Hack -- Hilite the player */
move_cursor_relative(player_ptr->y, player_ptr->x);
/* Process the world */
process_world(player_ptr);
- handle_stuff();
+ handle_stuff(player_ptr);
/* Hack -- Hilite the player */
move_cursor_relative(player_ptr->y, player_ptr->x);
autopick_load_pref(FALSE);
}
+
/*!
* @brief 1ゲームプレイの主要ルーチン / Actually play a game
* @return なし
player_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
player_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
- handle_stuff();
+ handle_stuff(player_ptr);
/* Set or clear "rogue_like_commands" if requested */
if (arg_force_original) rogue_like_commands = FALSE;
/* Hack -- prevent "icky" message */
current_world_ptr->character_xtra = TRUE;
- handle_stuff();
+ handle_stuff(player_ptr);
current_world_ptr->character_xtra = FALSE;
}
}
+
/*!
* @brief ターンのオーバーフローに対する対処
* @details ターン及びターンを記録する変数をターンの限界の1日前まで巻き戻す.
}
}
+
/*!
* @brief ゲーム終了処理 /
* Close up the current game (player may or may not be dead)
bool do_send = TRUE;
/* concptr p = "[i:キャラクタの情報, f:ファイル書き出し, t:スコア, x:*鑑定*, ESC:ゲーム終了]"; */
- handle_stuff();
+ handle_stuff(player_ptr);
/* Flush the messages */
msg_print(NULL);
/* Forget the high score fd */
highscore_fd = -1;
- /* Kill all temporal files */
+ /* Kill all temporary files */
clear_saved_floor_files(player_ptr);
/* Allow suspending now */
* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window"
* @return なし
*/
-void handle_stuff(void)
+void handle_stuff(player_type *player_ptr)
{
- if (p_ptr->update) update_creature(p_ptr);
- if (p_ptr->redraw) redraw_stuff(p_ptr);
- if (p_ptr->window) window_stuff();
+ if (player_ptr->update) update_creature(player_ptr);
+ if (player_ptr->redraw) redraw_stuff(player_ptr);
+ if (player_ptr->window) window_stuff(player_ptr);
}
-void update_output(void)
+
+void update_output(player_type *player_ptr)
{
- if (p_ptr->redraw) redraw_stuff(p_ptr);
- if (p_ptr->window) window_stuff();
+ if (player_ptr->redraw) redraw_stuff(player_ptr);
+ if (player_ptr->window) window_stuff(player_ptr);
}
-