src/ui-prefs.c
void textui_prefs_init(void)
{
	int i;
	struct flavor *f;

	monster_x_attr = mem_zalloc(z_info->r_max * sizeof(byte));
	monster_x_char = mem_zalloc(z_info->r_max * sizeof(wchar_t));
	kind_x_attr = mem_zalloc(z_info->k_max * sizeof(byte));
	kind_x_char = mem_zalloc(z_info->k_max * sizeof(wchar_t));
	for (i = 0; i < LIGHTING_MAX; i++) {
		feat_x_attr[i] = mem_zalloc(z_info->f_max * sizeof(byte));
		feat_x_char[i] = mem_zalloc(z_info->f_max * sizeof(wchar_t));
	}
	for (i = 0; i < LIGHTING_MAX; i++) {
		trap_x_attr[i] = mem_zalloc(z_info->trap_max * sizeof(byte));
		trap_x_char[i] = mem_zalloc(z_info->trap_max * sizeof(wchar_t));
	}
	for (f = flavors; f; f = f->next)
		if (flavor_max < f->fidx)
			flavor_max = f->fidx;
	flavor_x_attr = mem_zalloc((flavor_max + 1) * sizeof(byte));
	flavor_x_char = mem_zalloc((flavor_max + 1) * sizeof(wchar_t));

	reset_visuals(FALSE);
}
/**
 * Initialise the glyphs for monsters, objects, traps, flavors and terrain
 */
Initialise the glyphs for monsters, objects, traps, flavors and terrain
Initialise the glyphs for monsters objects traps flavors and terrain
void textui_prefs_init(void)
{
	int i;
	struct flavor *f;
	monster_x_attr = mem_zalloc(z_info->r_max * sizeof(byte));
	monster_x_char = mem_zalloc(z_info->r_max * sizeof(wchar_t));
	kind_x_attr = mem_zalloc(z_info->k_max * sizeof(byte));
	kind_x_char = mem_zalloc(z_info->k_max * sizeof(wchar_t));
	for (i = 0; i < LIGHTING_MAX; i++) {
		feat_x_attr[i] = mem_zalloc(z_info->f_max * sizeof(byte));
		feat_x_char[i] = mem_zalloc(z_info->f_max * sizeof(wchar_t));
	}
	for (i = 0; i < LIGHTING_MAX; i++) {
		trap_x_attr[i] = mem_zalloc(z_info->trap_max * sizeof(byte));
		trap_x_char[i] = mem_zalloc(z_info->trap_max * sizeof(wchar_t));
	}
	for (f = flavors; f; f = f->next)
		if (flavor_max < f->fidx)
			flavor_max = f->fidx;
	flavor_x_attr = mem_zalloc((flavor_max + 1) * sizeof(byte));
	flavor_x_char = mem_zalloc((flavor_max + 1) * sizeof(wchar_t));
	reset_visuals(FALSE);
}
void textui_prefs_init ( void ) { int i ; struct flavor * f ; monster_x_attr = mem_zalloc ( z_info -> r_max * sizeof ( byte ) ) ; monster_x_char = mem_zalloc ( z_info -> r_max * sizeof ( wchar_t ) ) ; kind_x_attr = mem_zalloc ( z_info -> k_max * sizeof ( byte ) ) ; kind_x_char = mem_zalloc ( z_info -> k_max * sizeof ( wchar_t ) ) ; for ( i = 0 ; i < LIGHTING_MAX ; i ++ ) { feat_x_attr [ i ] = mem_zalloc ( z_info -> f_max * sizeof ( byte ) ) ; feat_x_char [ i ] = mem_zalloc ( z_info -> f_max * sizeof ( wchar_t ) ) ; } for ( i = 0 ; i < LIGHTING_MAX ; i ++ ) { trap_x_attr [ i ] = mem_zalloc ( z_info -> trap_max * sizeof ( byte ) ) ; trap_x_char [ i ] = mem_zalloc ( z_info -> trap_max * sizeof ( wchar_t ) ) ; } for ( f = flavors ; f ; f = f -> next ) if ( flavor_max < f -> fidx ) flavor_max = f -> fidx ; flavor_x_attr = mem_zalloc ( ( flavor_max + 1 ) * sizeof ( byte ) ) ; flavor_x_char = mem_zalloc ( ( flavor_max + 1 ) * sizeof ( wchar_t ) ) ; reset_visuals ( FALSE ) ; }
Initialise the glyphs for monsters, objects, traps, flavors and terrain
Initialise the glyphs for monsters objects traps flavors and terrain