From e4cb892f10d347136f6bb555a610938babce86f6 Mon Sep 17 00:00:00 2001 From: nothere Date: Mon, 1 Dec 2003 22:43:11 +0000 Subject: [PATCH] =?utf8?q?view=5F*=5Fgrids=E3=81=8COFF=E3=81=AE=E6=99=82,?= =?utf8?q?=20=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=81=8B?= =?utf8?q?=E3=82=89=E8=A6=8B=E3=81=88=E3=81=A6=E3=81=84=E3=82=8B=E3=83=80?= =?utf8?q?=E3=83=B3=E3=82=B8=E3=83=A7=E3=83=B3=E5=A4=96=E5=91=A8=E3=81=AE?= =?utf8?q?=E5=BA=8A=E3=81=AE=20mimic=E3=81=AB=E6=8E=A5=E8=A7=A6=E3=81=99?= =?utf8?q?=E3=82=8B=E3=81=A8=E5=9C=B0=E5=BD=A2=E3=81=8C=E8=A6=8B=E3=81=88?= =?utf8?q?=E3=81=AA=E3=81=84=E6=89=B1=E3=81=84=E3=81=A8=E3=81=97=E3=81=A6?= =?utf8?q?=E3=82=BF=E3=83=BC=E3=83=B3=E3=82=92=E6=B6=88=E8=B2=BB=E3=81=97?= =?utf8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=81=A7,=20move=5Fplayer()?= =?utf8?q?=E3=81=A7=E3=81=AE=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC?= =?utf8?q?=E3=81=8C=E8=A6=8B=E3=81=88=E3=81=AA=E3=81=84=E5=9C=B0=E5=BD=A2?= =?utf8?q?=E5=88=A4=E5=AE=9A=E3=82=92player=5Fcan=5Fsee=5Fbold()=20?= =?utf8?q?=E3=81=A7=E8=A1=8C=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?utf8?q?=E6=AD=A3.=20=E3=81=BE=E3=81=9F,=20boundary=5Ffloor=5Fgrid()?= =?utf8?q?=E3=83=9E=E3=82=AF=E3=83=AD=E3=82=92defines.h=E3=81=8B=E3=82=89?= =?utf8?q?=20=E5=89=8A=E9=99=A4.=20cmd1.c=E3=81=AB=E7=A7=BB=E8=BB=A2?= =?utf8?q?=E3=81=97=E3=81=A6=E5=88=A4=E5=AE=9A=E6=9D=A1=E4=BB=B6=E3=81=A8?= =?utf8?q?=E3=83=9E=E3=82=AF=E3=83=AD=E5=90=8D=E3=82=92=E5=A4=89=E6=9B=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd1.c | 21 +++++++++++++++------ src/defines.h | 7 ------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/cmd1.c b/src/cmd1.c index eb944a583..2e259938a 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -3611,6 +3611,15 @@ void move_player_effect(int do_pickup, bool break_trap) /* + * Determine if a "boundary" grid is "floor mimic" + */ +#define boundary_floor(C, F, MF) \ + ((C)->mimic && permanent_wall(F) && \ + (have_flag((MF)->flags, FF_MOVE) || have_flag((MF)->flags, FF_CAN_FLY)) && \ + have_flag((MF)->flags, FF_PROJECT) && \ + !have_flag((MF)->flags, FF_OPEN)) + +/* * Move player in the given direction, with the given "pickup" flag. * * This routine should (probably) always induce energy expenditure. @@ -3972,7 +3981,8 @@ void move_player(int dir, int do_pickup, bool break_trap) { /* Feature code (applying "mimic" field) */ s16b feat = get_feat_mimic(c_ptr); - cptr name = f_name + f_info[feat].name; + feature_type *mimic_f_ptr = &f_info[feat]; + cptr name = f_name + mimic_f_ptr->name; oktomove = FALSE; @@ -3980,11 +3990,10 @@ void move_player(int dir, int do_pickup, bool break_trap) disturb(0, 0); /* Notice things in the dark */ - if ((!(c_ptr->info & (CAVE_MARK))) && - (p_ptr->blind || !(c_ptr->info & (CAVE_LITE)))) + if (!(c_ptr->info & CAVE_MARK) && !player_can_see_bold(y, x)) { /* Boundary floor mimic */ - if (boundary_floor_grid(c_ptr)) + if (boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) { #ifdef JP msg_print("¤½¤ì°Ê¾åÀè¤Ë¤Ï¿Ê¤á¤Ê¤¤¤è¤¦¤À¡£"); @@ -4012,7 +4021,7 @@ void move_player(int dir, int do_pickup, bool break_trap) else { /* Boundary floor mimic */ - if (boundary_floor_grid(c_ptr)) + if (boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) { #ifdef JP msg_print("¤½¤ì°Ê¾åÀè¤Ë¤Ï¿Ê¤á¤Ê¤¤¡£"); @@ -4050,7 +4059,7 @@ void move_player(int dir, int do_pickup, bool break_trap) } /* Sound */ - if (!boundary_floor_grid(c_ptr)) sound(SOUND_HITWALL); + if (!boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL); } /* Normal movement */ diff --git a/src/defines.h b/src/defines.h index 05697efe3..315c8d105 100644 --- a/src/defines.h +++ b/src/defines.h @@ -4454,13 +4454,6 @@ have_flag((F)->flags, FF_PERMANENT)) /* - * Determine if a "boundary" grid is "floor mimic" - */ -#define boundary_floor_grid(C) \ - ((C)->mimic && feat_supports_los((C)->mimic) && \ - permanent_wall(&f_info[(C)->feat])) - -/* * Get feature mimic from f_info[] (applying "mimic" field) */ #define get_feat_mimic(C) \ -- 2.11.0