OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
48ec65f
)
[Refactor] #38993 cur_wid/hgt を floor_type に取り込み width/heightに改名。 / Move cur_wid...
author
deskull
<deskull@users.sourceforge.jp>
Tue, 26 Feb 2019 17:02:19 +0000
(
02:02
+0900)
committer
deskull
<deskull@users.sourceforge.jp>
Tue, 26 Feb 2019 17:02:19 +0000
(
02:02
+0900)
30 files changed:
src/cmd4.c
patch
|
blob
|
history
src/defines.h
patch
|
blob
|
history
src/dungeon.c
patch
|
blob
|
history
src/externs.h
patch
|
blob
|
history
src/floor-events.c
patch
|
blob
|
history
src/floor-generate.c
patch
|
blob
|
history
src/floor-save.c
patch
|
blob
|
history
src/floor-streams.c
patch
|
blob
|
history
src/grid.c
patch
|
blob
|
history
src/init1.c
patch
|
blob
|
history
src/load.c
patch
|
blob
|
history
src/main-win.c
patch
|
blob
|
history
src/mind.c
patch
|
blob
|
history
src/monster2.c
patch
|
blob
|
history
src/object2.c
patch
|
blob
|
history
src/player-move.c
patch
|
blob
|
history
src/rooms-city.c
patch
|
blob
|
history
src/rooms-vault.c
patch
|
blob
|
history
src/rooms.c
patch
|
blob
|
history
src/save.c
patch
|
blob
|
history
src/spells-floor.c
patch
|
blob
|
history
src/spells1.c
patch
|
blob
|
history
src/spells2.c
patch
|
blob
|
history
src/spells3.c
patch
|
blob
|
history
src/types.h
patch
|
blob
|
history
src/variable.c
patch
|
blob
|
history
src/view-mainwindow.c
patch
|
blob
|
history
src/wild.c
patch
|
blob
|
history
src/wizard2.c
patch
|
blob
|
history
src/xtra2.c
patch
|
blob
|
history
diff --git
a/src/cmd4.c
b/src/cmd4.c
index
069c2fd
..
e2fe86f
100644
(file)
--- a/
src/cmd4.c
+++ b/
src/cmd4.c
@@
-5270,9
+5270,9
@@
static void do_cmd_knowledge_artifacts(void)
}
/* Check the dungeon */
}
/* Check the dungeon */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
diff --git
a/src/defines.h
b/src/defines.h
index
c2661ad
..
47756f2
100644
(file)
--- a/
src/defines.h
+++ b/
src/defines.h
@@
-3407,20
+3407,20
@@
* Determines if a map location is fully inside the outer walls
*/
#define in_bounds(Y,X) \
* Determines if a map location is fully inside the outer walls
*/
#define in_bounds(Y,X) \
- (((Y) > 0) && ((X) > 0) && ((Y) < cur
_hgt-1) && ((X) < cur_wid
-1))
+ (((Y) > 0) && ((X) > 0) && ((Y) < cur
rent_floor_ptr->height-1) && ((X) < current_floor_ptr->width
-1))
/*
* Determines if a map location is on or inside the outer walls
*/
#define in_bounds2(Y,X) \
/*
* Determines if a map location is on or inside the outer walls
*/
#define in_bounds2(Y,X) \
- (((Y) >= 0) && ((X) >= 0) && ((Y) < cur
_hgt) && ((X) < cur_wid
))
+ (((Y) >= 0) && ((X) >= 0) && ((Y) < cur
rent_floor_ptr->height) && ((X) < current_floor_ptr->width
))
/*
* Determines if a map location is on or inside the outer walls
* (unsigned version)
*/
#define in_bounds2u(Y,X) \
/*
* Determines if a map location is on or inside the outer walls
* (unsigned version)
*/
#define in_bounds2u(Y,X) \
- (((Y) < cur
_hgt) && ((X) < cur_wid
))
+ (((Y) < cur
rent_floor_ptr->height) && ((X) < current_floor_ptr->width
))
/*
* Determines if a map location is currently "on screen" -RAK-
/*
* Determines if a map location is currently "on screen" -RAK-
diff --git
a/src/dungeon.c
b/src/dungeon.c
index
8da6074
..
6031c01
100644
(file)
--- a/
src/dungeon.c
+++ b/
src/dungeon.c
@@
-3406,8
+3406,8
@@
static void process_world(void)
int number_mon = 0;
/* Count all hostile monsters */
int number_mon = 0;
/* Count all hostile monsters */
- for (i2 = 0; i2 < cur
_wid
; ++i2)
- for (j2 = 0; j2 < cur
_hg
t; j2++)
+ for (i2 = 0; i2 < cur
rent_floor_ptr->width
; ++i2)
+ for (j2 = 0; j2 < cur
rent_floor_ptr->heigh
t; j2++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[j2][i2];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[j2][i2];
@@
-5962,8
+5962,8
@@
void play_game(bool new_game)
record_o_name[0] = '\0';
/* Reset map panel */
record_o_name[0] = '\0';
/* Reset map panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
/* Sexy gal gets bonus to maximum weapon skill of whip */
if (p_ptr->pseikaku == SEIKAKU_SEXY)
/* Sexy gal gets bonus to maximum weapon skill of whip */
if (p_ptr->pseikaku == SEIKAKU_SEXY)
diff --git
a/src/externs.h
b/src/externs.h
index
6bd16ea
..
968f39a
100644
(file)
--- a/
src/externs.h
+++ b/
src/externs.h
@@
-159,8
+159,6
@@
extern s16b command_new;
extern bool msg_flag;
extern s16b running;
extern GAME_TURN resting;
extern bool msg_flag;
extern s16b running;
extern GAME_TURN resting;
-extern POSITION cur_hgt;
-extern POSITION cur_wid;
extern MONSTER_NUMBER num_repro;
extern DEPTH object_level;
extern DEPTH monster_level;
extern MONSTER_NUMBER num_repro;
extern DEPTH object_level;
extern DEPTH monster_level;
diff --git
a/src/floor-events.c
b/src/floor-events.c
index
b7e1833
..
104362f
100644
(file)
--- a/
src/floor-events.c
+++ b/
src/floor-events.c
@@
-9,9
+9,9
@@
void day_break()
if (!p_ptr->wild_mode)
{
/* Hack -- Scan the town */
if (!p_ptr->wild_mode)
{
/* Hack -- Scan the town */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-46,9
+46,9
@@
void night_falls(void)
if (!p_ptr->wild_mode)
{
/* Hack -- Scan the town */
if (!p_ptr->wild_mode)
{
/* Hack -- Scan the town */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-97,9
+97,9
@@
MONSTER_NUMBER count_all_hostile_monsters(void)
POSITION x, y;
MONSTER_NUMBER number_mon = 0;
POSITION x, y;
MONSTER_NUMBER number_mon = 0;
- for (x = 0; x < cur
_wid
; ++x)
+ for (x = 0; x < cur
rent_floor_ptr->width
; ++x)
{
{
- for (y = 0; y < cur
_hg
t; ++y)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; ++y)
{
MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
{
MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
diff --git
a/src/floor-generate.c
b/src/floor-generate.c
index
2173b79
..
015cd7c
100644
(file)
--- a/
src/floor-generate.c
+++ b/
src/floor-generate.c
@@
-221,9
+221,9
@@
static bool alloc_stairs(IDX feat, int num, int walls)
int candidates = 0;
int pick;
int candidates = 0;
int pick;
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
if (alloc_stairs_aux(y, x, walls))
{
{
if (alloc_stairs_aux(y, x, walls))
{
@@
-247,9
+247,9
@@
static bool alloc_stairs(IDX feat, int num, int walls)
/* Choose a random one */
pick = randint1(candidates);
/* Choose a random one */
pick = randint1(candidates);
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
if (alloc_stairs_aux(y, x, walls))
{
{
if (alloc_stairs_aux(y, x, walls))
{
@@
-295,7
+295,7
@@
static void alloc_object(int set, EFFECT_ID typ, int num)
grid_type *g_ptr;
/* A small level has few objects. */
grid_type *g_ptr;
/* A small level has few objects. */
- num = num * cur
_hgt * cur_wid
/ (MAX_HGT*MAX_WID) +1;
+ num = num * cur
rent_floor_ptr->height * current_floor_ptr->width
/ (MAX_HGT*MAX_WID) +1;
/* Place some objects */
for (k = 0; k < num; k++)
/* Place some objects */
for (k = 0; k < num; k++)
@@
-307,8
+307,8
@@
static void alloc_object(int set, EFFECT_ID typ, int num)
dummy++;
dummy++;
- y = randint0(cur
_hg
t);
- x = randint0(cur
_wid
);
+ y = randint0(cur
rent_floor_ptr->heigh
t);
+ x = randint0(cur
rent_floor_ptr->width
);
g_ptr = ¤t_floor_ptr->grid_array[y][x];
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-425,8
+425,8
@@
bool place_quest_monsters(void)
grid_type *g_ptr;
feature_type *f_ptr;
grid_type *g_ptr;
feature_type *f_ptr;
- y = randint0(cur
_hg
t);
- x = randint0(cur
_wid
);
+ y = randint0(cur
rent_floor_ptr->heigh
t);
+ x = randint0(cur
rent_floor_ptr->width
);
g_ptr = ¤t_floor_ptr->grid_array[y][x];
f_ptr = &f_info[g_ptr->feat];
g_ptr = ¤t_floor_ptr->grid_array[y][x];
f_ptr = &f_info[g_ptr->feat];
@@
-581,8
+581,8
@@
static bool cave_gen(void)
dun_tun_jct = rand_range(DUN_TUN_JCT_MIN, DUN_TUN_JCT_MAX);
/* Actual maximum number of rooms on this level */
dun_tun_jct = rand_range(DUN_TUN_JCT_MIN, DUN_TUN_JCT_MAX);
/* Actual maximum number of rooms on this level */
- dun->row_rooms = cur
_hg
t / BLOCK_HGT;
- dun->col_rooms = cur
_wid
/ BLOCK_WID;
+ dun->row_rooms = cur
rent_floor_ptr->heigh
t / BLOCK_HGT;
+ dun->col_rooms = cur
rent_floor_ptr->width
/ BLOCK_WID;
/* Initialize the room table */
for (y = 0; y < dun->row_rooms; y++)
/* Initialize the room table */
for (y = 0; y < dun->row_rooms; y++)
@@
-606,34
+606,34
@@
static bool cave_gen(void)
if (dun->empty_level)
{
/* Start with floors */
if (dun->empty_level)
{
/* Start with floors */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
place_floor_bold(y, x);
}
}
/* Special boundary walls -- Top and bottom */
{
place_floor_bold(y, x);
}
}
/* Special boundary walls -- Top and bottom */
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
place_extra_bold(0, x);
{
place_extra_bold(0, x);
- place_extra_bold(cur
_hg
t - 1, x);
+ place_extra_bold(cur
rent_floor_ptr->heigh
t - 1, x);
}
/* Special boundary walls -- Left and right */
}
/* Special boundary walls -- Left and right */
- for (y = 1; y < (cur
_hg
t - 1); y++)
+ for (y = 1; y < (cur
rent_floor_ptr->heigh
t - 1); y++)
{
place_extra_bold(y, 0);
{
place_extra_bold(y, 0);
- place_extra_bold(y, cur
_wid
- 1);
+ place_extra_bold(y, cur
rent_floor_ptr->width
- 1);
}
}
else
{
/* Start with walls */
}
}
else
{
/* Start with walls */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
place_extra_bold(y, x);
}
{
place_extra_bold(y, x);
}
@@
-646,7
+646,7
@@
static bool cave_gen(void)
/* Build maze */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_MAZE)
{
/* Build maze */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_MAZE)
{
- build_maze_vault(cur
_wid/2-1, cur_hgt/2-1, cur_wid-4, cur_hg
t-4, FALSE);
+ build_maze_vault(cur
rent_floor_ptr->width/2-1, current_floor_ptr->height/2-1, current_floor_ptr->width-4, current_floor_ptr->heigh
t-4, FALSE);
/* Place 3 or 4 down stairs near some walls */
if (!alloc_stairs(feat_down_stair, rand_range(2, 3), 3)) return FALSE;
/* Place 3 or 4 down stairs near some walls */
if (!alloc_stairs(feat_down_stair, rand_range(2, 3), 3)) return FALSE;
@@
-671,7
+671,7
@@
static bool cave_gen(void)
{
while (one_in_(DUN_MOS_DEN))
{
{
while (one_in_(DUN_MOS_DEN))
{
- place_trees(randint1(cur
_wid - 2), randint1(cur_hg
t - 2));
+ place_trees(randint1(cur
rent_floor_ptr->width - 2), randint1(current_floor_ptr->heigh
t - 2));
}
}
}
}
@@
-867,17
+867,17
@@
static bool cave_gen(void)
}
/* Special boundary walls -- Top and bottom */
}
/* Special boundary walls -- Top and bottom */
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[0][x]);
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[0][x]);
- place_bound_perm_wall(¤t_floor_ptr->grid_array[cur
_hg
t - 1][x]);
+ place_bound_perm_wall(¤t_floor_ptr->grid_array[cur
rent_floor_ptr->heigh
t - 1][x]);
}
/* Special boundary walls -- Left and right */
}
/* Special boundary walls -- Left and right */
- for (y = 1; y < (cur
_hg
t - 1); y++)
+ for (y = 1; y < (cur
rent_floor_ptr->heigh
t - 1); y++)
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[y][0]);
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[y][0]);
- place_bound_perm_wall(¤t_floor_ptr->grid_array[y][cur
_wid
- 1]);
+ place_bound_perm_wall(¤t_floor_ptr->grid_array[y][cur
rent_floor_ptr->width
- 1]);
}
/* Determine the character location */
}
/* Determine the character location */
@@
-894,12
+894,12
@@
static bool cave_gen(void)
i = d_info[p_ptr->dungeon_idx].min_m_alloc_level;
/* To make small levels a bit more playable */
i = d_info[p_ptr->dungeon_idx].min_m_alloc_level;
/* To make small levels a bit more playable */
- if (cur
_hgt < MAX_HGT || cur_wid
< MAX_WID)
+ if (cur
rent_floor_ptr->height < MAX_HGT || current_floor_ptr->width
< MAX_WID)
{
int small_tester = i;
{
int small_tester = i;
- i = (i * cur
_hg
t) / MAX_HGT;
- i = (i * cur
_wid
) / MAX_WID;
+ i = (i * cur
rent_floor_ptr->heigh
t) / MAX_HGT;
+ i = (i * cur
rent_floor_ptr->width
) / MAX_WID;
i += 1;
if (i > small_tester) i = small_tester;
i += 1;
if (i > small_tester) i = small_tester;
@@
-945,9
+945,9
@@
static bool cave_gen(void)
if (dun->empty_level && (!one_in_(DARK_EMPTY) || (randint1(100) > current_floor_ptr->dun_level)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
{
/* Lite the current_floor_ptr->grid_array */
if (dun->empty_level && (!one_in_(DARK_EMPTY) || (randint1(100) > current_floor_ptr->dun_level)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
{
/* Lite the current_floor_ptr->grid_array */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW);
}
{
current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW);
}
@@
-1025,8
+1025,8
@@
static void generate_challenge_arena(void)
POSITION qx = 0;
/* Smallest area */
POSITION qx = 0;
/* Smallest area */
- cur
_hg
t = SCREEN_HGT;
- cur
_wid
= SCREEN_WID;
+ cur
rent_floor_ptr->heigh
t = SCREEN_HGT;
+ cur
rent_floor_ptr->width
= SCREEN_WID;
/* Start with solid walls */
for (y = 0; y < MAX_HGT; y++)
/* Start with solid walls */
for (y = 0; y < MAX_HGT; y++)
@@
-1186,9
+1186,9
@@
static void generate_fixed_floor(void)
POSITION x, y;
/* Start with perm walls */
POSITION x, y;
/* Start with perm walls */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
place_solid_perm_bold(y, x);
}
{
place_solid_perm_bold(y, x);
}
@@
-1242,26
+1242,26
@@
static bool level_gen(concptr *why)
while ((level_height == MAX_HGT/SCREEN_HGT) && (level_width == MAX_WID/SCREEN_WID));
}
while ((level_height == MAX_HGT/SCREEN_HGT) && (level_width == MAX_WID/SCREEN_WID));
}
- cur
_hg
t = level_height * SCREEN_HGT;
- cur
_wid
= level_width * SCREEN_WID;
+ cur
rent_floor_ptr->heigh
t = level_height * SCREEN_HGT;
+ cur
rent_floor_ptr->width
= level_width * SCREEN_WID;
/* Assume illegal panel */
/* Assume illegal panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
msg_format_wizard(CHEAT_DUNGEON,
_("小さなフロア: X:%d, Y:%d", "A 'small' dungeon level: X:%d, Y:%d."),
msg_format_wizard(CHEAT_DUNGEON,
_("小さなフロア: X:%d, Y:%d", "A 'small' dungeon level: X:%d, Y:%d."),
- cur
_wid, cur_hg
t);
+ cur
rent_floor_ptr->width, current_floor_ptr->heigh
t);
}
else
{
/* Big dungeon */
}
else
{
/* Big dungeon */
- cur
_hg
t = MAX_HGT;
- cur
_wid
= MAX_WID;
+ cur
rent_floor_ptr->heigh
t = MAX_HGT;
+ cur
rent_floor_ptr->width
= MAX_WID;
/* Assume illegal panel */
/* Assume illegal panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
}
/* Make a dungeon */
}
/* Make a dungeon */
@@
-1281,9
+1281,9
@@
void wipe_generate_random_floor_flags(void)
{
POSITION x, y;
{
POSITION x, y;
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
/* Wipe unused flags */
current_floor_ptr->grid_array[y][x].info &= ~(CAVE_MASK);
{
/* Wipe unused flags */
current_floor_ptr->grid_array[y][x].info &= ~(CAVE_MASK);
@@
-1292,9
+1292,9
@@
void wipe_generate_random_floor_flags(void)
if (current_floor_ptr->dun_level)
{
if (current_floor_ptr->dun_level)
{
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
/* There might be trap */
current_floor_ptr->grid_array[y][x].info |= CAVE_UNSAFE;
{
/* There might be trap */
current_floor_ptr->grid_array[y][x].info |= CAVE_UNSAFE;
diff --git
a/src/floor-save.c
b/src/floor-save.c
index
071a10e
..
c2a51eb
100644
(file)
--- a/
src/floor-save.c
+++ b/
src/floor-save.c
@@
-323,8
+323,8
@@
static void build_dead_end(void)
set_floor_and_wall(0);
/* Smallest area */
set_floor_and_wall(0);
/* Smallest area */
- cur
_hg
t = SCREEN_HGT;
- cur
_wid
= SCREEN_WID;
+ cur
rent_floor_ptr->heigh
t = SCREEN_HGT;
+ cur
rent_floor_ptr->width
= SCREEN_WID;
/* Filled with permanent walls */
for (y = 0; y < MAX_HGT; y++)
/* Filled with permanent walls */
for (y = 0; y < MAX_HGT; y++)
@@
-337,8
+337,8
@@
static void build_dead_end(void)
}
/* Place at center of the floor */
}
/* Place at center of the floor */
- p_ptr->y = cur
_hg
t / 2;
- p_ptr->x = cur
_wid
/ 2;
+ p_ptr->y = cur
rent_floor_ptr->heigh
t / 2;
+ p_ptr->x = cur
rent_floor_ptr->width
/ 2;
/* Give one square */
place_floor_bold(p_ptr->y, p_ptr->x);
/* Give one square */
place_floor_bold(p_ptr->y, p_ptr->x);
@@
-756,9
+756,9
@@
static void locate_connected_stairs(saved_floor_type *sf_ptr)
int i;
/* Search usable stairs */
int i;
/* Search usable stairs */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
@@
-1473,9
+1473,9
@@
void stair_creation(void)
{
POSITION x, y;
{
POSITION x, y;
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
diff --git
a/src/floor-streams.c
b/src/floor-streams.c
index
93c4d94
..
ba49bb8
100644
(file)
--- a/
src/floor-streams.c
+++ b/
src/floor-streams.c
@@
-164,8
+164,8
@@
void add_river(IDX feat1, IDX feat2)
/* Hack -- Choose starting point */
/* Hack -- Choose starting point */
- y2 = randint1(cur
_hgt / 2 - 2) + cur_hg
t / 2;
- x2 = randint1(cur
_wid / 2 - 2) + cur_wid
/ 2;
+ y2 = randint1(cur
rent_floor_ptr->height / 2 - 2) + current_floor_ptr->heigh
t / 2;
+ x2 = randint1(cur
rent_floor_ptr->width / 2 - 2) + current_floor_ptr->width
/ 2;
/* Hack -- Choose ending point somewhere on boundary */
switch(randint1(4))
/* Hack -- Choose ending point somewhere on boundary */
switch(randint1(4))
@@
-173,7
+173,7
@@
void add_river(IDX feat1, IDX feat2)
case 1:
{
/* top boundary */
case 1:
{
/* top boundary */
- x1 = randint1(cur
_wid
-2)+1;
+ x1 = randint1(cur
rent_floor_ptr->width
-2)+1;
y1 = 1;
break;
}
y1 = 1;
break;
}
@@
-181,21
+181,21
@@
void add_river(IDX feat1, IDX feat2)
{
/* left boundary */
x1 = 1;
{
/* left boundary */
x1 = 1;
- y1 = randint1(cur
_hg
t-2)+1;
+ y1 = randint1(cur
rent_floor_ptr->heigh
t-2)+1;
break;
}
case 3:
{
/* right boundary */
break;
}
case 3:
{
/* right boundary */
- x1 = cur
_wid
-1;
- y1 = randint1(cur
_hg
t-2)+1;
+ x1 = cur
rent_floor_ptr->width
-1;
+ y1 = randint1(cur
rent_floor_ptr->heigh
t-2)+1;
break;
}
case 4:
{
/* bottom boundary */
break;
}
case 4:
{
/* bottom boundary */
- x1 = randint1(cur
_wid
-2)+1;
- y1 = cur
_hg
t-1;
+ x1 = randint1(cur
rent_floor_ptr->width
-2)+1;
+ y1 = cur
rent_floor_ptr->heigh
t-1;
break;
}
}
break;
}
}
@@
-241,8
+241,8
@@
void build_streamer(IDX feat, int chance)
bool streamer_may_have_gold = have_flag(streamer_ptr->flags, FF_MAY_HAVE_GOLD);
/* Hack -- Choose starting point */
bool streamer_may_have_gold = have_flag(streamer_ptr->flags, FF_MAY_HAVE_GOLD);
/* Hack -- Choose starting point */
- y = rand_spread(cur
_hgt / 2, cur_hg
t / 6);
- x = rand_spread(cur
_wid / 2, cur_wid
/ 6);
+ y = rand_spread(cur
rent_floor_ptr->height / 2, current_floor_ptr->heigh
t / 6);
+ x = rand_spread(cur
rent_floor_ptr->width / 2, current_floor_ptr->width
/ 6);
/* Choose a random compass direction */
dir = randint0(8);
/* Choose a random compass direction */
dir = randint0(8);
@@
-448,8
+448,8
@@
void destroy_level(void)
for (n = 0; n < randint1(5); n++)
{
/* Pick an epi-center */
for (n = 0; n < randint1(5); n++)
{
/* Pick an epi-center */
- x1 = rand_range(5, cur
_wid
- 1 - 5);
- y1 = rand_range(5, cur
_hg
t - 1 - 5);
+ x1 = rand_range(5, cur
rent_floor_ptr->width
- 1 - 5);
+ y1 = rand_range(5, cur
rent_floor_ptr->heigh
t - 1 - 5);
(void)destroy_area(y1, x1, 15, TRUE);
}
(void)destroy_area(y1, x1, 15, TRUE);
}
diff --git
a/src/grid.c
b/src/grid.c
index
f31b7af
..
f54a1ba
100644
(file)
--- a/
src/grid.c
+++ b/
src/grid.c
@@
-51,8
+51,8
@@
bool new_player_spot(void)
while (max_attempts--)
{
/* Pick a legal spot */
while (max_attempts--)
{
/* Pick a legal spot */
- y = (POSITION)rand_range(1, cur
_hg
t - 2);
- x = (POSITION)rand_range(1, cur
_wid
- 2);
+ y = (POSITION)rand_range(1, cur
rent_floor_ptr->heigh
t - 2);
+ x = (POSITION)rand_range(1, cur
rent_floor_ptr->width
- 2);
g_ptr = ¤t_floor_ptr->grid_array[y][x];
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-2411,9
+2411,9
@@
void prt_map(void)
/* Get bounds */
xmin = (0 < panel_col_min) ? panel_col_min : 0;
/* Get bounds */
xmin = (0 < panel_col_min) ? panel_col_min : 0;
- xmax = (cur
_wid - 1 > panel_col_max) ? panel_col_max : cur_wid
- 1;
+ xmax = (cur
rent_floor_ptr->width - 1 > panel_col_max) ? panel_col_max : current_floor_ptr->width
- 1;
ymin = (0 < panel_row_min) ? panel_row_min : 0;
ymin = (0 < panel_row_min) ? panel_row_min : 0;
- ymax = (cur
_hgt - 1 > panel_row_max) ? panel_row_max : cur_hg
t - 1;
+ ymax = (cur
rent_floor_ptr->height - 1 > panel_row_max) ? panel_row_max : current_floor_ptr->heigh
t - 1;
/* Bottom section of screen */
for (y = 1; y <= ymin - panel_row_prt; y++)
/* Bottom section of screen */
for (y = 1; y <= ymin - panel_row_prt; y++)
@@
-2664,8
+2664,8
@@
void display_map(int *cy, int *cx)
wid -= 14;
if (use_bigtile) wid /= 2;
wid -= 14;
if (use_bigtile) wid /= 2;
- yrat = (cur
_hg
t + hgt - 1) / hgt;
- xrat = (cur
_wid
+ wid - 1) / wid;
+ yrat = (cur
rent_floor_ptr->heigh
t + hgt - 1) / hgt;
+ xrat = (cur
rent_floor_ptr->width
+ wid - 1) / wid;
/* Disable lighting effects */
view_special_lite = FALSE;
/* Disable lighting effects */
view_special_lite = FALSE;
@@
-2703,19
+2703,19
@@
void display_map(int *cy, int *cx)
}
/* Allocate the maps */
}
/* Allocate the maps */
- C_MAKE(bigma, (cur
_hg
t + 2), TERM_COLOR *);
- C_MAKE(bigmc, (cur
_hg
t + 2), char_ptr);
- C_MAKE(bigmp, (cur
_hg
t + 2), byte_ptr);
+ C_MAKE(bigma, (cur
rent_floor_ptr->heigh
t + 2), TERM_COLOR *);
+ C_MAKE(bigmc, (cur
rent_floor_ptr->heigh
t + 2), char_ptr);
+ C_MAKE(bigmp, (cur
rent_floor_ptr->heigh
t + 2), byte_ptr);
/* Allocate and wipe each line map */
/* Allocate and wipe each line map */
- for (y = 0; y < (cur
_hg
t + 2); y++)
+ for (y = 0; y < (cur
rent_floor_ptr->heigh
t + 2); y++)
{
/* Allocate one row each array */
{
/* Allocate one row each array */
- C_MAKE(bigma[y], (cur
_wid
+ 2), TERM_COLOR);
- C_MAKE(bigmc[y], (cur
_wid
+ 2), char);
- C_MAKE(bigmp[y], (cur
_wid
+ 2), byte);
+ C_MAKE(bigma[y], (cur
rent_floor_ptr->width
+ 2), TERM_COLOR);
+ C_MAKE(bigmc[y], (cur
rent_floor_ptr->width
+ 2), char);
+ C_MAKE(bigmp[y], (cur
rent_floor_ptr->width
+ 2), byte);
- for (x = 0; x < cur
_wid
+ 2; ++x)
+ for (x = 0; x < cur
rent_floor_ptr->width
+ 2; ++x)
{
/* Nothing here */
bigma[y][x] = TERM_WHITE;
{
/* Nothing here */
bigma[y][x] = TERM_WHITE;
@@
-2727,9
+2727,9
@@
void display_map(int *cy, int *cx)
}
/* Fill in the map */
}
/* Fill in the map */
- for (i = 0; i < cur
_wid
; ++i)
+ for (i = 0; i < cur
rent_floor_ptr->width
; ++i)
{
{
- for (j = 0; j < cur
_hg
t; ++j)
+ for (j = 0; j < cur
rent_floor_ptr->heigh
t; ++j)
{
x = i / xrat + 1;
y = j / yrat + 1;
{
x = i / xrat + 1;
y = j / yrat + 1;
@@
-2760,9
+2760,9
@@
void display_map(int *cy, int *cx)
}
}
}
}
- for (j = 0; j < cur
_hg
t; ++j)
+ for (j = 0; j < cur
rent_floor_ptr->heigh
t; ++j)
{
{
- for (i = 0; i < cur
_wid
; ++i)
+ for (i = 0; i < cur
rent_floor_ptr->width
; ++i)
{
x = i / xrat + 1;
y = j / yrat + 1;
{
x = i / xrat + 1;
y = j / yrat + 1;
@@
-2898,18
+2898,18
@@
void display_map(int *cy, int *cx)
C_KILL(object_autopick_yx, (hgt + 2), object_type **);
/* Free each line map */
C_KILL(object_autopick_yx, (hgt + 2), object_type **);
/* Free each line map */
- for (y = 0; y < (cur
_hg
t + 2); y++)
+ for (y = 0; y < (cur
rent_floor_ptr->heigh
t + 2); y++)
{
/* Free one row each array */
{
/* Free one row each array */
- C_KILL(bigma[y], (cur
_wid
+ 2), TERM_COLOR);
- C_KILL(bigmc[y], (cur
_wid
+ 2), SYMBOL_CODE);
- C_KILL(bigmp[y], (cur
_wid
+ 2), byte);
+ C_KILL(bigma[y], (cur
rent_floor_ptr->width
+ 2), TERM_COLOR);
+ C_KILL(bigmc[y], (cur
rent_floor_ptr->width
+ 2), SYMBOL_CODE);
+ C_KILL(bigmp[y], (cur
rent_floor_ptr->width
+ 2), byte);
}
/* Free each line map */
}
/* Free each line map */
- C_KILL(bigma, (cur
_hg
t + 2), TERM_COLOR *);
- C_KILL(bigmc, (cur
_hg
t + 2), char_ptr);
- C_KILL(bigmp, (cur
_hg
t + 2), byte_ptr);
+ C_KILL(bigma, (cur
rent_floor_ptr->heigh
t + 2), TERM_COLOR *);
+ C_KILL(bigmc, (cur
rent_floor_ptr->heigh
t + 2), char_ptr);
+ C_KILL(bigmp, (cur
rent_floor_ptr->heigh
t + 2), byte_ptr);
}
}
@@
-3441,7
+3441,7
@@
void update_lite(void)
/* Maximal south */
max_y = p_ptr->y + p;
/* Maximal south */
max_y = p_ptr->y + p;
- if (max_y > cur
_hgt - 1) max_y = cur_hg
t - 1;
+ if (max_y > cur
rent_floor_ptr->height - 1) max_y = current_floor_ptr->heigh
t - 1;
/* Maximal west */
min_x = p_ptr->x - p;
/* Maximal west */
min_x = p_ptr->x - p;
@@
-3449,7
+3449,7
@@
void update_lite(void)
/* Maximal east */
max_x = p_ptr->x + p;
/* Maximal east */
max_x = p_ptr->x + p;
- if (max_x > cur
_wid - 1) max_x = cur_wid
- 1;
+ if (max_x > cur
rent_floor_ptr->width - 1) max_x = current_floor_ptr->width
- 1;
/* Scan the maximal box */
for (y = min_y; y <= max_y; y++)
/* Scan the maximal box */
for (y = min_y; y <= max_y; y++)
@@
-4297,8
+4297,8
@@
void update_view(void)
int full, over;
int full, over;
- POSITION y_max = cur
_hg
t - 1;
- POSITION x_max = cur
_wid
- 1;
+ POSITION y_max = cur
rent_floor_ptr->heigh
t - 1;
+ POSITION x_max = cur
rent_floor_ptr->width
- 1;
grid_type *g_ptr;
grid_type *g_ptr;
@@
-4781,9
+4781,9
@@
void forget_flow(void)
POSITION x, y;
/* Check the entire dungeon */
POSITION x, y;
/* Check the entire dungeon */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
/* Forget the old data */
current_floor_ptr->grid_array[y][x].dist = 0;
{
/* Forget the old data */
current_floor_ptr->grid_array[y][x].dist = 0;
@@
-4835,9
+4835,9
@@
void update_flow(void)
}
/* Erase all of the current flow information */
}
/* Erase all of the current flow information */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
current_floor_ptr->grid_array[y][x].cost = 0;
current_floor_ptr->grid_array[y][x].dist = 0;
{
current_floor_ptr->grid_array[y][x].cost = 0;
current_floor_ptr->grid_array[y][x].dist = 0;
@@
-4947,9
+4947,9
@@
void update_smell(void)
if (++scent_when == 254)
{
/* Scan the entire dungeon */
if (++scent_when == 254)
{
/* Scan the entire dungeon */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
int w = current_floor_ptr->grid_array[y][x].when;
current_floor_ptr->grid_array[y][x].when = (w > 128) ? (w - 128) : 0;
{
int w = current_floor_ptr->grid_array[y][x].when;
current_floor_ptr->grid_array[y][x].when = (w > 128) ? (w - 128) : 0;
@@
-5007,9
+5007,9
@@
void map_area(POSITION range)
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan that area */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan that area */
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
{
if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
@@
-5599,9
+5599,9
@@
void glow_deep_lava_and_bldg(void)
/* Not in the darkness dungeon */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
/* Not in the darkness dungeon */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
diff --git
a/src/init1.c
b/src/init1.c
index
cbfd5f5
..
e4d33c2
100644
(file)
--- a/
src/init1.c
+++ b/
src/init1.c
@@
-4273,15
+4273,15
@@
static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
/* Hack - Set the dungeon size */
panels_y = (*y / SCREEN_HGT);
if (*y % SCREEN_HGT) panels_y++;
/* Hack - Set the dungeon size */
panels_y = (*y / SCREEN_HGT);
if (*y % SCREEN_HGT) panels_y++;
- cur
_hg
t = panels_y * SCREEN_HGT;
+ cur
rent_floor_ptr->heigh
t = panels_y * SCREEN_HGT;
panels_x = (*x / SCREEN_WID);
if (*x % SCREEN_WID) panels_x++;
panels_x = (*x / SCREEN_WID);
if (*x % SCREEN_WID) panels_x++;
- cur
_wid
= panels_x * SCREEN_WID;
+ cur
rent_floor_ptr->width
= panels_x * SCREEN_WID;
/* Assume illegal panel */
/* Assume illegal panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
/* Place player in a quest level */
if (p_ptr->inside_quest)
/* Place player in a quest level */
if (p_ptr->inside_quest)
diff --git
a/src/load.c
b/src/load.c
index
7e2dfd1
..
70a83ea
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-2579,9
+2579,9
@@
static errr rd_dungeon_old(void)
p_ptr->x = (POSITION)tmp16s;
if (z_older_than(10, 3, 13) && !current_floor_ptr->dun_level && !p_ptr->inside_arena) {p_ptr->y = 33;p_ptr->x = 131;}
rd_s16b(&tmp16s);
p_ptr->x = (POSITION)tmp16s;
if (z_older_than(10, 3, 13) && !current_floor_ptr->dun_level && !p_ptr->inside_arena) {p_ptr->y = 33;p_ptr->x = 131;}
rd_s16b(&tmp16s);
- cur
_hg
t = (POSITION)tmp16s;
+ cur
rent_floor_ptr->heigh
t = (POSITION)tmp16s;
rd_s16b(&tmp16s);
rd_s16b(&tmp16s);
- cur
_wid
= (POSITION)tmp16s;
+ cur
rent_floor_ptr->width
= (POSITION)tmp16s;
rd_s16b(&tmp16s); /* max_panel_rows */
rd_s16b(&tmp16s); /* max_panel_cols */
rd_s16b(&tmp16s); /* max_panel_rows */
rd_s16b(&tmp16s); /* max_panel_cols */
@@
-2590,8
+2590,8
@@
static errr rd_dungeon_old(void)
#endif
/* Maximal size */
#endif
/* Maximal size */
- ymax = cur
_hg
t;
- xmax = cur
_wid
;
+ ymax = cur
rent_floor_ptr->heigh
t;
+ xmax = cur
rent_floor_ptr->width
;
/*** Run length decoding ***/
/*** Run length decoding ***/
@@
-3040,9
+3040,9
@@
static errr rd_saved_floor(saved_floor_type *sf_ptr)
p_ptr->x = (POSITION)tmp16u;
rd_s16b(&tmp16s);
p_ptr->x = (POSITION)tmp16u;
rd_s16b(&tmp16s);
- cur
_hg
t = (POSITION)tmp16s;
+ cur
rent_floor_ptr->heigh
t = (POSITION)tmp16s;
rd_s16b(&tmp16s);
rd_s16b(&tmp16s);
- cur
_wid
= (POSITION)tmp16s;
+ cur
rent_floor_ptr->width
= (POSITION)tmp16s;
rd_byte(&p_ptr->feeling);
rd_byte(&p_ptr->feeling);
@@
-3080,8
+3080,8
@@
static errr rd_saved_floor(saved_floor_type *sf_ptr)
}
/* Maximal size */
}
/* Maximal size */
- ymax = cur
_hg
t;
- xmax = cur
_wid
;
+ ymax = cur
rent_floor_ptr->heigh
t;
+ xmax = cur
rent_floor_ptr->width
;
/*** Run length decoding ***/
/*** Run length decoding ***/
diff --git
a/src/main-win.c
b/src/main-win.c
index
a848e2a
..
5a62975
100644
(file)
--- a/
src/main-win.c
+++ b/
src/main-win.c
@@
-3176,8
+3176,8
@@
static void windows_map(void)
{
min_x = 0;
min_y = 0;
{
min_x = 0;
min_y = 0;
- max_x = cur
_wid
;
- max_y = cur
_hg
t;
+ max_x = cur
rent_floor_ptr->width
;
+ max_y = cur
rent_floor_ptr->heigh
t;
}
/* Draw the map */
}
/* Draw the map */
diff --git
a/src/mind.c
b/src/mind.c
index
45fe878
..
f27470b
100644
(file)
--- a/
src/mind.c
+++ b/
src/mind.c
@@
-1287,8
+1287,8
@@
static int number_of_mirrors(void)
{
POSITION x, y;
int val = 0;
{
POSITION x, y;
int val = 0;
- for (x = 0; x < cur
_wid
; x++) {
- for (y = 0; y < cur
_hg
t; y++) {
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++) {
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++) {
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) val++;
}
}
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) val++;
}
}
@@
-1370,8
+1370,8
@@
static bool cast_mirror_spell(int spell)
break;
/* mirror sleeping */
case 9:
break;
/* mirror sleeping */
case 9:
- for (x = 0; x < cur
_wid
; x++) {
- for (y = 0; y < cur
_hg
t; y++) {
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++) {
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++) {
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) {
project(0, 2, y, x, (HIT_POINT)plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) {
project(0, 2, y, x, (HIT_POINT)plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
diff --git
a/src/monster2.c
b/src/monster2.c
index
11ec6de
..
2f4cf03
100644
(file)
--- a/
src/monster2.c
+++ b/
src/monster2.c
@@
-3002,8
+3002,8
@@
static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
number_mon = 0;
/* Count all quest monsters */
number_mon = 0;
/* Count all quest monsters */
- for (i2 = 0; i2 < cur
_wid
; ++i2)
- for (j2 = 0; j2 < cur
_hg
t; j2++)
+ for (i2 = 0; i2 < cur
rent_floor_ptr->width
; ++i2)
+ for (j2 = 0; j2 < cur
rent_floor_ptr->heigh
t; j2++)
if (current_floor_ptr->grid_array[j2][i2].m_idx > 0)
if (m_list[current_floor_ptr->grid_array[j2][i2].m_idx].r_idx == quest[hoge].r_idx)
number_mon++;
if (current_floor_ptr->grid_array[j2][i2].m_idx > 0)
if (m_list[current_floor_ptr->grid_array[j2][i2].m_idx].r_idx == quest[hoge].r_idx)
number_mon++;
@@
-3743,8
+3743,8
@@
bool alloc_guardian(bool def_val)
while (try_count)
{
/* Get a random spot */
while (try_count)
{
/* Get a random spot */
- oy = randint1(cur
_hg
t - 4) + 2;
- ox = randint1(cur
_wid
- 4) + 2;
+ oy = randint1(cur
rent_floor_ptr->heigh
t - 4) + 2;
+ ox = randint1(cur
rent_floor_ptr->width
- 4) + 2;
/* Is it a good spot ? */
if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(current_floor_ptr->grid_array[oy][ox].feat, &r_info[guardian], 0))
/* Is it a good spot ? */
if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(current_floor_ptr->grid_array[oy][ox].feat, &r_info[guardian], 0))
@@
-3786,8
+3786,8
@@
bool alloc_monster(POSITION dis, BIT_FLAGS mode)
while (attempts_left--)
{
/* Pick a location */
while (attempts_left--)
{
/* Pick a location */
- y = randint0(cur
_hg
t);
- x = randint0(cur
_wid
);
+ y = randint0(cur
rent_floor_ptr->heigh
t);
+ x = randint0(cur
rent_floor_ptr->width
);
/* Require empty floor grid (was "naked") */
if (current_floor_ptr->dun_level)
/* Require empty floor grid (was "naked") */
if (current_floor_ptr->dun_level)
diff --git
a/src/object2.c
b/src/object2.c
index
eacbdae
..
3710ce6
100644
(file)
--- a/
src/object2.c
+++ b/
src/object2.c
@@
-5089,9
+5089,9
@@
OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
{
int candidates = 0, pick;
{
int candidates = 0, pick;
- for (ty = 1; ty < cur
_hg
t - 1; ty++)
+ for (ty = 1; ty < cur
rent_floor_ptr->heigh
t - 1; ty++)
{
{
- for (tx = 1; tx < cur
_wid
- 1; tx++)
+ for (tx = 1; tx < cur
rent_floor_ptr->width
- 1; tx++)
{
/* A valid space found */
if (cave_drop_bold(ty, tx)) candidates++;
{
/* A valid space found */
if (cave_drop_bold(ty, tx)) candidates++;
@@
-5128,9
+5128,9
@@
OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
/* Choose a random one */
pick = randint1(candidates);
/* Choose a random one */
pick = randint1(candidates);
- for (ty = 1; ty < cur
_hg
t - 1; ty++)
+ for (ty = 1; ty < cur
rent_floor_ptr->heigh
t - 1; ty++)
{
{
- for (tx = 1; tx < cur
_wid
- 1; tx++)
+ for (tx = 1; tx < cur
rent_floor_ptr->width
- 1; tx++)
{
if (cave_drop_bold(ty, tx))
{
{
if (cave_drop_bold(ty, tx))
{
diff --git
a/src/player-move.c
b/src/player-move.c
index
768b7ac
..
8509dcb
100644
(file)
--- a/
src/player-move.c
+++ b/
src/player-move.c
@@
-1138,8
+1138,8
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
{
p_ptr->wilderness_y--;
p_ptr->wilderness_x--;
{
p_ptr->wilderness_y--;
p_ptr->wilderness_x--;
- p_ptr->oldpy = cur
_hg
t - 2;
- p_ptr->oldpx = cur
_wid
- 2;
+ p_ptr->oldpy = cur
rent_floor_ptr->heigh
t - 2;
+ p_ptr->oldpx = cur
rent_floor_ptr->width
- 2;
ambush_flag = FALSE;
}
ambush_flag = FALSE;
}
@@
-1147,7
+1147,7
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
{
p_ptr->wilderness_y--;
p_ptr->wilderness_x++;
{
p_ptr->wilderness_y--;
p_ptr->wilderness_x++;
- p_ptr->oldpy = cur
_hg
t - 2;
+ p_ptr->oldpy = cur
rent_floor_ptr->heigh
t - 2;
p_ptr->oldpx = 1;
ambush_flag = FALSE;
}
p_ptr->oldpx = 1;
ambush_flag = FALSE;
}
@@
-1157,7
+1157,7
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
p_ptr->wilderness_y++;
p_ptr->wilderness_x--;
p_ptr->oldpy = 1;
p_ptr->wilderness_y++;
p_ptr->wilderness_x--;
p_ptr->oldpy = 1;
- p_ptr->oldpx = cur
_wid
- 2;
+ p_ptr->oldpx = cur
rent_floor_ptr->width
- 2;
ambush_flag = FALSE;
}
ambush_flag = FALSE;
}
@@
-1173,7
+1173,7
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
else if (y == 0)
{
p_ptr->wilderness_y--;
else if (y == 0)
{
p_ptr->wilderness_y--;
- p_ptr->oldpy = cur
_hg
t - 2;
+ p_ptr->oldpy = cur
rent_floor_ptr->heigh
t - 2;
p_ptr->oldpx = x;
ambush_flag = FALSE;
}
p_ptr->oldpx = x;
ambush_flag = FALSE;
}
@@
-1189,7
+1189,7
@@
void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
else if (x == 0)
{
p_ptr->wilderness_x--;
else if (x == 0)
{
p_ptr->wilderness_x--;
- p_ptr->oldpx = cur
_wid
- 2;
+ p_ptr->oldpx = cur
rent_floor_ptr->width
- 2;
p_ptr->oldpy = y;
ambush_flag = FALSE;
}
p_ptr->oldpy = y;
ambush_flag = FALSE;
}
@@
-2278,9
+2278,9
@@
void forget_travel_flow(void)
{
POSITION x, y;
/* Check the entire dungeon / Forget the old data */
{
POSITION x, y;
/* Check the entire dungeon / Forget the old data */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
travel.cost[y][x] = MAX_SHORT;
{
travel.cost[y][x] = MAX_SHORT;
diff --git
a/src/rooms-city.c
b/src/rooms-city.c
index
b3536ee
..
091d795
100644
(file)
--- a/
src/rooms-city.c
+++ b/
src/rooms-city.c
@@
-201,9
+201,9
@@
bool build_type16(void)
bool prevent_bm = FALSE;
/* Hack -- If already exist black market, prevent building */
bool prevent_bm = FALSE;
/* Hack -- If already exist black market, prevent building */
- for (y = 0; (y < cur
_hg
t) && !prevent_bm; y++)
+ for (y = 0; (y < cur
rent_floor_ptr->heigh
t) && !prevent_bm; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
if (current_floor_ptr->grid_array[y][x].feat == FF_STORE)
{
{
if (current_floor_ptr->grid_array[y][x].feat == FF_STORE)
{
diff --git
a/src/rooms-vault.c
b/src/rooms-vault.c
index
18a1da1
..
0eac513
100644
(file)
--- a/
src/rooms-vault.c
+++ b/
src/rooms-vault.c
@@
-656,7
+656,7
@@
bool build_type7(void)
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur
_hg
t - 2)
+ if (x + 2 > cur
rent_floor_ptr->heigh
t - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
@@
-736,7
+736,7
@@
bool build_type8(void)
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur
_hg
t - 2)
+ if (x + 2 > cur
rent_floor_ptr->heigh
t - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
@@
-1258,7
+1258,7
@@
bool build_type17(void)
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur
_hg
t - 2)
+ if (x + 2 > cur
rent_floor_ptr->heigh
t - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
diff --git
a/src/rooms.c
b/src/rooms.c
index
91b8841
..
c30e79f
100644
(file)
--- a/
src/rooms.c
+++ b/
src/rooms.c
@@
-1145,8
+1145,8
@@
void build_cavern(void)
if ((current_floor_ptr->dun_level <= randint1(50)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;
/* Make a current_floor_ptr->grid_array the size of the dungeon */
if ((current_floor_ptr->dun_level <= randint1(50)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;
/* Make a current_floor_ptr->grid_array the size of the dungeon */
- xsize = cur
_wid
- 1;
- ysize = cur
_hg
t - 1;
+ xsize = cur
rent_floor_ptr->width
- 1;
+ ysize = cur
rent_floor_ptr->heigh
t - 1;
x0 = xsize / 2;
y0 = ysize / 2;
x0 = xsize / 2;
y0 = ysize / 2;
@@
-1335,8
+1335,8
@@
void build_lake(int type)
}
/* Make the size of the dungeon */
}
/* Make the size of the dungeon */
- xsize = cur
_wid
- 1;
- ysize = cur
_hg
t - 1;
+ xsize = cur
rent_floor_ptr->width
- 1;
+ ysize = cur
rent_floor_ptr->heigh
t - 1;
x0 = xsize / 2;
y0 = ysize / 2;
x0 = xsize / 2;
y0 = ysize / 2;
@@
-2126,7
+2126,7
@@
bool generate_rooms(void)
int total_prob;
int prob_list[ROOM_T_MAX];
int rooms_built = 0;
int total_prob;
int prob_list[ROOM_T_MAX];
int rooms_built = 0;
- int area_size = 100 * (cur
_hgt*cur_wid
) / (MAX_HGT*MAX_WID);
+ int area_size = 100 * (cur
rent_floor_ptr->height*current_floor_ptr->width
) / (MAX_HGT*MAX_WID);
int level_index = MIN(10, div_round(current_floor_ptr->dun_level, 10));
/* Number of each type of room on this level */
int level_index = MIN(10, div_round(current_floor_ptr->dun_level, 10));
/* Number of each type of room on this level */
diff --git
a/src/save.c
b/src/save.c
index
61e06fc
..
7719d33
100644
(file)
--- a/
src/save.c
+++ b/
src/save.c
@@
-943,8
+943,8
@@
static void wr_saved_floor(saved_floor_type *sf_ptr)
wr_u16b((s16b)num_repro);
wr_u16b((u16b)p_ptr->y);
wr_u16b((u16b)p_ptr->x);
wr_u16b((s16b)num_repro);
wr_u16b((u16b)p_ptr->y);
wr_u16b((u16b)p_ptr->x);
- wr_u16b((u16b)cur
_hg
t);
- wr_u16b((u16b)cur
_wid
);
+ wr_u16b((u16b)cur
rent_floor_ptr->heigh
t);
+ wr_u16b((u16b)cur
rent_floor_ptr->width
);
wr_byte(p_ptr->feeling);
wr_byte(p_ptr->feeling);
@@
-969,9
+969,9
@@
static void wr_saved_floor(saved_floor_type *sf_ptr)
C_MAKE(templates, max_num_temp, cave_template_type);
/* Extract template array */
C_MAKE(templates, max_num_temp, cave_template_type);
/* Extract template array */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-1049,9
+1049,9
@@
static void wr_saved_floor(saved_floor_type *sf_ptr)
prev_u16b = 0;
/* Dump the current_floor_ptr->grid_array */
prev_u16b = 0;
/* Dump the current_floor_ptr->grid_array */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
diff --git
a/src/spells-floor.c
b/src/spells-floor.c
index
334403b
..
9dc3abe
100644
(file)
--- a/
src/spells-floor.c
+++ b/
src/spells-floor.c
@@
-40,10
+40,10
@@
void wiz_lite(bool ninja)
}
/* Scan all normal grids */
}
/* Scan all normal grids */
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
/* Scan all normal grids */
{
/* Scan all normal grids */
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-115,9
+115,9
@@
void wiz_dark(void)
POSITION y, x;
/* Forget every grid */
POSITION y, x;
/* Forget every grid */
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-128,17
+128,17
@@
void wiz_dark(void)
}
/* Forget every grid on horizontal edge */
}
/* Forget every grid on horizontal edge */
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
current_floor_ptr->grid_array[0][x].info &= ~(CAVE_MARK);
{
current_floor_ptr->grid_array[0][x].info &= ~(CAVE_MARK);
- current_floor_ptr->grid_array[cur
_hg
t - 1][x].info &= ~(CAVE_MARK);
+ current_floor_ptr->grid_array[cur
rent_floor_ptr->heigh
t - 1][x].info &= ~(CAVE_MARK);
}
/* Forget every grid on vertical edge */
}
/* Forget every grid on vertical edge */
- for (y = 1; y < (cur
_hg
t - 1); y++)
+ for (y = 1; y < (cur
rent_floor_ptr->heigh
t - 1); y++)
{
current_floor_ptr->grid_array[y][0].info &= ~(CAVE_MARK);
{
current_floor_ptr->grid_array[y][0].info &= ~(CAVE_MARK);
- current_floor_ptr->grid_array[y][cur
_wid
- 1].info &= ~(CAVE_MARK);
+ current_floor_ptr->grid_array[y][cur
rent_floor_ptr->width
- 1].info &= ~(CAVE_MARK);
}
/* Forget all objects */
}
/* Forget all objects */
diff --git
a/src/spells1.c
b/src/spells1.c
index
2830618
..
f368d7e
100644
(file)
--- a/
src/spells1.c
+++ b/
src/spells1.c
@@
-60,9
+60,9
@@
static void next_mirror(POSITION* next_y, POSITION* next_x, POSITION cury, POSIT
POSITION x, y;
int num;
POSITION x, y;
int num;
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) {
mirror_y[mirror_num] = y;
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) {
mirror_y[mirror_num] = y;
@@
-6486,9
+6486,9
@@
bool binding_field(HIT_POINT dam)
monster_target_y = p_ptr->y;
monster_target_x = p_ptr->x;
monster_target_y = p_ptr->y;
monster_target_x = p_ptr->x;
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]) &&
distance(p_ptr->y, p_ptr->x, y, x) <= MAX_RANGE &&
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]) &&
distance(p_ptr->y, p_ptr->x, y, x) <= MAX_RANGE &&
@@
-6620,9
+6620,9
@@
void seal_of_mirror(HIT_POINT dam)
{
POSITION x, y;
{
POSITION x, y;
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
diff --git
a/src/spells2.c
b/src/spells2.c
index
1526098
..
e53f275
100644
(file)
--- a/
src/spells2.c
+++ b/
src/spells2.c
@@
-45,9
+45,9
@@
static bool detect_feat_flag(POSITION range, int flag, bool known)
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan the current panel */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan the current panel */
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x <= cur
_wid
- 1; x++)
+ for (x = 1; x <= cur
rent_floor_ptr->width
- 1; x++)
{
int dist = distance(p_ptr->y, p_ptr->x, y, x);
if (dist > range) continue;
{
int dist = distance(p_ptr->y, p_ptr->x, y, x);
if (dist > range) continue;
@@
-3864,9
+3864,9
@@
void remove_all_mirrors(bool explode)
{
POSITION x, y;
{
POSITION x, y;
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
{
if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
diff --git
a/src/spells3.c
b/src/spells3.c
index
b5c7edd
..
48505ba
100644
(file)
--- a/
src/spells3.c
+++ b/
src/spells3.c
@@
-263,9
+263,9
@@
bool teleport_player_aux(POSITION dis, BIT_FLAGS mode)
int min, pick, i;
int left = MAX(1, p_ptr->x - dis);
int min, pick, i;
int left = MAX(1, p_ptr->x - dis);
- int right = MIN(cur
_wid
- 2, p_ptr->x + dis);
+ int right = MIN(cur
rent_floor_ptr->width
- 2, p_ptr->x + dis);
int top = MAX(1, p_ptr->y - dis);
int top = MAX(1, p_ptr->y - dis);
- int bottom = MIN(cur
_hg
t - 2, p_ptr->y + dis);
+ int bottom = MIN(cur
rent_floor_ptr->heigh
t - 2, p_ptr->y + dis);
if (p_ptr->wild_mode) return FALSE;
if (p_ptr->wild_mode) return FALSE;
@@
-1390,9
+1390,9
@@
static bool vanish_dungeon(void)
}
/* Scan all normal grids */
}
/* Scan all normal grids */
- for (y = 1; y < cur
_hg
t - 1; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t - 1; y++)
{
{
- for (x = 1; x < cur
_wid
- 1; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
- 1; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-1424,7
+1424,7
@@
static bool vanish_dungeon(void)
}
/* Special boundary walls -- Top and bottom */
}
/* Special boundary walls -- Top and bottom */
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[0][x];
f_ptr = &f_info[g_ptr->mimic];
{
g_ptr = ¤t_floor_ptr->grid_array[0][x];
f_ptr = &f_info[g_ptr->mimic];
@@
-1441,7
+1441,7
@@
static bool vanish_dungeon(void)
if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
}
if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
}
- g_ptr = ¤t_floor_ptr->grid_array[cur
_hg
t - 1][x];
+ g_ptr = ¤t_floor_ptr->grid_array[cur
rent_floor_ptr->heigh
t - 1][x];
f_ptr = &f_info[g_ptr->mimic];
/* Lose room and vault */
f_ptr = &f_info[g_ptr->mimic];
/* Lose room and vault */
@@
-1458,7
+1458,7
@@
static bool vanish_dungeon(void)
}
/* Special boundary walls -- Left and right */
}
/* Special boundary walls -- Left and right */
- for (y = 1; y < (cur
_hg
t - 1); y++)
+ for (y = 1; y < (cur
rent_floor_ptr->heigh
t - 1); y++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][0];
f_ptr = &f_info[g_ptr->mimic];
{
g_ptr = ¤t_floor_ptr->grid_array[y][0];
f_ptr = &f_info[g_ptr->mimic];
@@
-1475,7
+1475,7
@@
static bool vanish_dungeon(void)
if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
}
if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
}
- g_ptr = ¤t_floor_ptr->grid_array[y][cur
_wid
- 1];
+ g_ptr = ¤t_floor_ptr->grid_array[y][cur
rent_floor_ptr->width
- 1];
f_ptr = &f_info[g_ptr->mimic];
/* Lose room and vault */
f_ptr = &f_info[g_ptr->mimic];
/* Lose room and vault */
diff --git
a/src/types.h
b/src/types.h
index
64455e7
..
c92f065
100644
(file)
--- a/
src/types.h
+++ b/
src/types.h
@@
-1878,4
+1878,6
@@
typedef struct {
grid_type *grid_array[MAX_HGT];
DEPTH dun_level; /*!< 現在の実ダンジョン階層base_levelの参照元となる / Current dungeon level */
DEPTH base_level;
grid_type *grid_array[MAX_HGT];
DEPTH dun_level; /*!< 現在の実ダンジョン階層base_levelの参照元となる / Current dungeon level */
DEPTH base_level;
+ POSITION width; /* Current dungeon width */
+ POSITION height; /* Current dungeon height */
} floor_type;
\ No newline at end of file
} floor_type;
\ No newline at end of file
diff --git
a/src/variable.c
b/src/variable.c
index
2015e50
..
8670d32
100644
(file)
--- a/
src/variable.c
+++ b/
src/variable.c
@@
-111,8
+111,6
@@
bool msg_flag; /* Used in msg_print() for "buffering" */
s16b running; /* Current counter for running, if any */
GAME_TURN resting; /* Current counter for resting, if any */
s16b running; /* Current counter for running, if any */
GAME_TURN resting; /* Current counter for resting, if any */
-POSITION cur_hgt; /* Current dungeon height */
-POSITION cur_wid; /* Current dungeon width */
MONSTER_NUMBER num_repro; /*!< Current reproducer count */
DEPTH object_level; /*!< アイテムの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current object creation level */
DEPTH monster_level; /*!< モンスターの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current monster creation level */
MONSTER_NUMBER num_repro; /*!< Current reproducer count */
DEPTH object_level; /*!< アイテムの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current object creation level */
DEPTH monster_level; /*!< モンスターの生成レベル、current_floor_ptr->base_levelを起点に一時変更する時に参照 / Current monster creation level */
diff --git
a/src/view-mainwindow.c
b/src/view-mainwindow.c
index
2172aea
..
24d0f0f
100644
(file)
--- a/
src/view-mainwindow.c
+++ b/
src/view-mainwindow.c
@@
-2435,8
+2435,8
@@
void resize_map(void)
panel_col_max = 0;
/* Reset the panels */
panel_col_max = 0;
/* Reset the panels */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
verify_panel();
verify_panel();
@@
-2497,11
+2497,11
@@
bool change_panel(POSITION dy, POSITION dx)
x = panel_col_min + dx * wid / 2;
/* Verify the row */
x = panel_col_min + dx * wid / 2;
/* Verify the row */
- if (y > cur
_hgt - hgt) y = cur_hg
t - hgt;
+ if (y > cur
rent_floor_ptr->height - hgt) y = current_floor_ptr->heigh
t - hgt;
if (y < 0) y = 0;
/* Verify the col */
if (y < 0) y = 0;
/* Verify the col */
- if (x > cur
_wid - wid) x = cur_wid
- wid;
+ if (x > cur
rent_floor_ptr->width - wid) x = current_floor_ptr->width
- wid;
if (x < 0) x = 0;
/* Handle "changes" */
if (x < 0) x = 0;
/* Handle "changes" */
diff --git
a/src/wild.c
b/src/wild.c
index
9adb0ca
..
d0af4de
100644
(file)
--- a/
src/wild.c
+++ b/
src/wild.c
@@
-424,8
+424,8
@@
static void generate_area(POSITION y, POSITION x, bool border, bool corner)
/* Hack -- Induce consistant flavors */
Rand_state_set(wilderness[y][x].seed);
/* Hack -- Induce consistant flavors */
Rand_state_set(wilderness[y][x].seed);
- dy = rand_range(6, cur
_hg
t - 6);
- dx = rand_range(6, cur
_wid
- 6);
+ dy = rand_range(6, cur
rent_floor_ptr->heigh
t - 6);
+ dx = rand_range(6, cur
rent_floor_ptr->width
- 6);
current_floor_ptr->grid_array[dy][dx].feat = feat_entrance;
current_floor_ptr->grid_array[dy][dx].special = wilderness[y][x].entrance;
current_floor_ptr->grid_array[dy][dx].feat = feat_entrance;
current_floor_ptr->grid_array[dy][dx].special = wilderness[y][x].entrance;
@@
-455,12
+455,12
@@
void wilderness_gen(void)
feature_type *f_ptr;
/* Big town */
feature_type *f_ptr;
/* Big town */
- cur
_hg
t = MAX_HGT;
- cur
_wid
= MAX_WID;
+ cur
rent_floor_ptr->heigh
t = MAX_HGT;
+ cur
rent_floor_ptr->width
= MAX_WID;
/* Assume illegal panel */
/* Assume illegal panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
/* Init the wilderness */
/* Init the wilderness */
@@
-564,9
+564,9
@@
void wilderness_gen(void)
current_floor_ptr->grid_array[MAX_HGT - 1][MAX_WID - 1].mimic = border.south_east;
/* Light up or darken the area */
current_floor_ptr->grid_array[MAX_HGT - 1][MAX_WID - 1].mimic = border.south_east;
/* Light up or darken the area */
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-610,9
+610,9
@@
void wilderness_gen(void)
if (p_ptr->teleport_town)
{
if (p_ptr->teleport_town)
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-635,9
+635,9
@@
void wilderness_gen(void)
else if (p_ptr->leaving_dungeon)
{
else if (p_ptr->leaving_dungeon)
{
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
{
g_ptr = ¤t_floor_ptr->grid_array[y][x];
@@
-725,15
+725,15
@@
void wilderness_gen_small(void)
current_floor_ptr->grid_array[j][i].info |= (CAVE_GLOW | CAVE_MARK);
}
current_floor_ptr->grid_array[j][i].info |= (CAVE_GLOW | CAVE_MARK);
}
- cur
_hg
t = (s16b) max_wild_y;
- cur
_wid
= (s16b) max_wild_x;
+ cur
rent_floor_ptr->heigh
t = (s16b) max_wild_y;
+ cur
rent_floor_ptr->width
= (s16b) max_wild_x;
- if (cur
_hgt > MAX_HGT) cur_hg
t = MAX_HGT;
- if (cur
_wid > MAX_WID) cur_wid
= MAX_WID;
+ if (cur
rent_floor_ptr->height > MAX_HGT) current_floor_ptr->heigh
t = MAX_HGT;
+ if (cur
rent_floor_ptr->width > MAX_WID) current_floor_ptr->width
= MAX_WID;
/* Assume illegal panel */
/* Assume illegal panel */
- panel_row_min = cur
_hg
t;
- panel_col_min = cur
_wid
;
+ panel_row_min = cur
rent_floor_ptr->heigh
t;
+ panel_col_min = cur
rent_floor_ptr->width
;
/* Place the player */
p_ptr->x = p_ptr->wilderness_x;
/* Place the player */
p_ptr->x = p_ptr->wilderness_x;
diff --git
a/src/wizard2.c
b/src/wizard2.c
index
79d5459
..
a2b9f61
100644
(file)
--- a/
src/wizard2.c
+++ b/
src/wizard2.c
@@
-1913,9
+1913,9
@@
void do_cmd_debug(void)
/* Make every dungeon square "known" to test streamers -KMW- */
case 'u':
/* Make every dungeon square "known" to test streamers -KMW- */
case 'u':
- for (y = 0; y < cur
_hg
t; y++)
+ for (y = 0; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 0; x < cur
_wid
; x++)
+ for (x = 0; x < cur
rent_floor_ptr->width
; x++)
{
current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
}
{
current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
}
diff --git
a/src/xtra2.c
b/src/xtra2.c
index
d510ea1
..
e68406f
100644
(file)
--- a/
src/xtra2.c
+++ b/
src/xtra2.c
@@
-299,8
+299,8
@@
void verify_panel(void)
get_screen_size(&wid, &hgt);
get_screen_size(&wid, &hgt);
- max_prow_min = cur
_hg
t - hgt;
- max_pcol_min = cur
_wid
- wid;
+ max_prow_min = cur
rent_floor_ptr->heigh
t - hgt;
+ max_pcol_min = cur
rent_floor_ptr->width
- wid;
/* Bounds checking */
if (max_prow_min < 0) max_prow_min = 0;
/* Bounds checking */
if (max_prow_min < 0) max_prow_min = 0;
@@
-793,9
+793,9
@@
static void target_set_prepare(BIT_FLAGS mode)
{
/* Inner range */
min_hgt = MAX((p_ptr->y - MAX_RANGE), 0);
{
/* Inner range */
min_hgt = MAX((p_ptr->y - MAX_RANGE), 0);
- max_hgt = MIN((p_ptr->y + MAX_RANGE), cur
_hg
t - 1);
+ max_hgt = MIN((p_ptr->y + MAX_RANGE), cur
rent_floor_ptr->heigh
t - 1);
min_wid = MAX((p_ptr->x - MAX_RANGE), 0);
min_wid = MAX((p_ptr->x - MAX_RANGE), 0);
- max_wid = MIN((p_ptr->x + MAX_RANGE), cur
_wid
- 1);
+ max_wid = MIN((p_ptr->x + MAX_RANGE), cur
rent_floor_ptr->width
- 1);
}
else /* not targetting */
{
}
else /* not targetting */
{
@@
-1746,11
+1746,11
@@
bool target_set(BIT_FLAGS mode)
}
/* Slide into legality */
}
/* Slide into legality */
- if (x >= cur
_wid-1) x = cur_wid
- 2;
+ if (x >= cur
rent_floor_ptr->width-1) x = current_floor_ptr->width
- 2;
else if (x <= 0) x = 1;
/* Slide into legality */
else if (x <= 0) x = 1;
/* Slide into legality */
- if (y >= cur
_hgt-1) y = cur_hg
t- 2;
+ if (y >= cur
rent_floor_ptr->height-1) y = current_floor_ptr->heigh
t- 2;
else if (y <= 0) y = 1;
}
}
else if (y <= 0) y = 1;
}
}
@@
-1920,11
+1920,11
@@
bool target_set(BIT_FLAGS mode)
}
/* Slide into legality */
}
/* Slide into legality */
- if (x >= cur
_wid-1) x = cur_wid
- 2;
+ if (x >= cur
rent_floor_ptr->width-1) x = current_floor_ptr->width
- 2;
else if (x <= 0) x = 1;
/* Slide into legality */
else if (x <= 0) x = 1;
/* Slide into legality */
- if (y >= cur
_hgt-1) y = cur_hg
t- 2;
+ if (y >= cur
rent_floor_ptr->height-1) y = current_floor_ptr->heigh
t- 2;
else if (y <= 0) y = 1;
}
}
else if (y <= 0) y = 1;
}
}
@@
-2410,9
+2410,9
@@
static void tgt_pt_prepare(void)
if (!expand_list) return;
/* Scan the current panel */
if (!expand_list) return;
/* Scan the current panel */
- for (y = 1; y < cur
_hg
t; y++)
+ for (y = 1; y < cur
rent_floor_ptr->heigh
t; y++)
{
{
- for (x = 1; x < cur
_wid
; x++)
+ for (x = 1; x < cur
rent_floor_ptr->width
; x++)
{
/* Require "interesting" contents */
if (!tgt_pt_accept(y, x)) continue;
{
/* Require "interesting" contents */
if (!tgt_pt_accept(y, x)) continue;
@@
-2579,11
+2579,11
@@
bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
}
/* Slide into legality */
}
/* Slide into legality */
- if (x >= cur
_wid-1) x = cur_wid
- 2;
+ if (x >= cur
rent_floor_ptr->width-1) x = current_floor_ptr->width
- 2;
else if (x <= 0) x = 1;
/* Slide into legality */
else if (x <= 0) x = 1;
/* Slide into legality */
- if (y >= cur
_hgt-1) y = cur_hg
t- 2;
+ if (y >= cur
rent_floor_ptr->height-1) y = current_floor_ptr->heigh
t- 2;
else if (y <= 0) y = 1;
}
else if (y <= 0) y = 1;
}