u32b tmp32u;
u16b limit;
- cave_template_type *templates;
+ grid_template_type *templates;
/*** Wipe all current_floor_ptr->grid_array ***/
rd_u16b(&limit);
/* Allocate the "template" array */
- C_MAKE(templates, limit, cave_template_type);
+ C_MAKE(templates, limit, grid_template_type);
/* Read the templates */
for (i = 0; i < limit; i++)
{
- cave_template_type *ct_ptr = &templates[i];
+ grid_template_type *ct_ptr = &templates[i];
/* Read it */
rd_u16b(&tmp16u);
}
/* Free the "template" array */
- C_KILL(templates, limit, cave_template_type);
+ C_KILL(templates, limit, grid_template_type);
/*** Objects ***/
*/
static void wr_saved_floor(saved_floor_type *sf_ptr)
{
- cave_template_type *templates;
+ grid_template_type *templates;
u16b max_num_temp;
u16b num_temp = 0;
int dummy_why;
max_num_temp = 255;
/* Allocate the "template" array */
- C_MAKE(templates, max_num_temp, cave_template_type);
+ C_MAKE(templates, max_num_temp, grid_template_type);
/* Extract template array */
for (y = 0; y < current_floor_ptr->height; y++)
/* If the max_num_temp is too small, increase it. */
if (num_temp >= max_num_temp)
{
- cave_template_type *old_template = templates;
+ grid_template_type *old_template = templates;
/* Re-allocate the "template" array */
- C_MAKE(templates, max_num_temp + 255, cave_template_type);
- (void)C_COPY(templates, old_template, max_num_temp, cave_template_type);
- C_KILL(old_template, max_num_temp, cave_template_type);
+ C_MAKE(templates, max_num_temp + 255, grid_template_type);
+ (void)C_COPY(templates, old_template, max_num_temp, grid_template_type);
+ C_KILL(old_template, max_num_temp, grid_template_type);
max_num_temp += 255;
}
/* Dump the templates */
for (i = 0; i < num_temp; i++)
{
- cave_template_type *ct_ptr = &templates[i];
+ grid_template_type *ct_ptr = &templates[i];
/* Dump it */
wr_u16b((u16b)ct_ptr->info);
/* Free the "template" array */
- C_KILL(templates, max_num_temp, cave_template_type);
+ C_KILL(templates, max_num_temp, grid_template_type);
/*** Dump objects ***/
*/
bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
{
- cave_template_type *who = (cave_template_type *)(u);
+ grid_template_type *who = (grid_template_type *)(u);
u16b o1 = who[a].occurrence;
u16b o2 = who[b].occurrence;
*/
void ang_sort_swap_cave_temp(vptr u, vptr v, int a, int b)
{
- cave_template_type *who = (cave_template_type *)(u);
+ grid_template_type *who = (grid_template_type *)(u);
- cave_template_type holder;
+ grid_template_type holder;
/* Unused */
(void)v;