• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision05e2aac8a912fd05bd3c722c717030950b823b99 (tree)
Time2019-08-30 00:01:15
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_wiz_jump() に player_type * 引数を追加. / Add player_type * argument to do_cmd_wiz_jump().

Change Summary

Incremental Difference

--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -296,7 +296,6 @@ static void do_cmd_wiz_change_aux(void)
296296 char tmp_val[160];
297297 char ppp[80];
298298
299-
300299 /* Query the stats */
301300 for (i = 0; i < A_MAX; i++)
302301 {
@@ -1303,7 +1302,7 @@ static void do_cmd_wiz_cure_all(void)
13031302 * Go to any level
13041303 * @return なし
13051304 */
1306-static void do_cmd_wiz_jump(void)
1305+static void do_cmd_wiz_jump(player_type *creature_ptr)
13071306 {
13081307 /* Ask for level */
13091308 if (command_arg <= 0)
@@ -1316,7 +1315,7 @@ static void do_cmd_wiz_jump(void)
13161315 sprintf(ppp, "Jump which dungeon : ");
13171316
13181317 /* Default */
1319- sprintf(tmp_val, "%d", p_ptr->dungeon_idx);
1318+ sprintf(tmp_val, "%d", creature_ptr->dungeon_idx);
13201319
13211320 /* Ask for a level */
13221321 if (!get_string(ppp, tmp_val, 2)) return;
@@ -1337,10 +1336,10 @@ static void do_cmd_wiz_jump(void)
13371336 /* Extract request */
13381337 command_arg = (COMMAND_ARG)atoi(tmp_val);
13391338
1340- p_ptr->dungeon_idx = tmp_dungeon_type;
1339+ creature_ptr->dungeon_idx = tmp_dungeon_type;
13411340 }
1342- if (command_arg < d_info[p_ptr->dungeon_idx].mindepth) command_arg = 0;
1343- if (command_arg > d_info[p_ptr->dungeon_idx].maxdepth) command_arg = (COMMAND_ARG)d_info[p_ptr->dungeon_idx].maxdepth;
1341+ if (command_arg < d_info[creature_ptr->dungeon_idx].mindepth) command_arg = 0;
1342+ if (command_arg > d_info[creature_ptr->dungeon_idx].maxdepth) command_arg = (COMMAND_ARG)d_info[creature_ptr->dungeon_idx].maxdepth;
13441343
13451344 /* Accept request */
13461345 msg_format("You jump to dungeon level %d.", command_arg);
@@ -1352,26 +1351,26 @@ static void do_cmd_wiz_jump(void)
13521351
13531352 prepare_change_floor_mode(CFM_RAND_PLACE);
13541353
1355- if (!current_floor_ptr->dun_level) p_ptr->dungeon_idx = 0;
1356- p_ptr->inside_arena = FALSE;
1357- p_ptr->wild_mode = FALSE;
1354+ if (!current_floor_ptr->dun_level) creature_ptr->dungeon_idx = 0;
1355+ creature_ptr->inside_arena = FALSE;
1356+ creature_ptr->wild_mode = FALSE;
13581357
13591358 leave_quest_check();
13601359
1361- if (record_stair) exe_write_diary(p_ptr, NIKKI_WIZ_TELE,0,NULL);
1360+ if (record_stair) exe_write_diary(creature_ptr, NIKKI_WIZ_TELE,0,NULL);
13621361
1363- p_ptr->inside_quest = 0;
1364- free_turn(p_ptr);
1362+ creature_ptr->inside_quest = 0;
1363+ free_turn(creature_ptr);
13651364
13661365 /* Prevent energy_need from being too lower than 0 */
1367- p_ptr->energy_need = 0;
1366+ creature_ptr->energy_need = 0;
13681367
13691368 /*
13701369 * Clear all saved floors
13711370 * and create a first saved floor
13721371 */
13731372 prepare_change_floor_mode(CFM_FIRST_FLOOR);
1374- p_ptr->leaving = TRUE;
1373+ creature_ptr->leaving = TRUE;
13751374 }
13761375
13771376
@@ -1776,7 +1775,7 @@ void do_cmd_debug(void)
17761775
17771776 /* Go up or down in the dungeon */
17781777 case 'j':
1779- do_cmd_wiz_jump();
1778+ do_cmd_wiz_jump(p_ptr);
17801779 break;
17811780
17821781 /* Self-Knowledge */
Show on old repository browser