ui-mon-list.h File Reference

Monster list UI. More...

#include "angband.h"

Go to the source code of this file.


void monster_list_show_subwindow (int height, int width)
 Display the monster list statically. More...
void monster_list_show_interactive (int height, int width)
 Display the monster list interactively. More...
void monster_list_force_subwindow_update (void)
 Force an update to the monster list subwindow. More...

Detailed Description

Monster list UI.

Copyright (c) 1997-2007 Ben Harrison, James E. Wilson, Robert A. Koeneke Copyright (c) 2013 Ben Semmler

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Function Documentation

◆ monster_list_force_subwindow_update()

void monster_list_force_subwindow_update ( void  )

Force an update to the monster list subwindow.

There are conditions that monster_list_reset() can't catch, so we set the turn an invalid value to force the list to update.

References monster_list_s::creation_turn, and monster_list_shared_instance().

Referenced by new_level_display_update().

◆ monster_list_show_interactive()

void monster_list_show_interactive ( int  height,
int  width 

Display the monster list interactively.

This will dynamically size the list for the best appearance. This should only be used in the main term.

heightis the height limit for the list.
widthis the width limit for the list.

References buf, keypress::code, region::col, max_height, max_width, MIN, monster_list_collect(), monster_list_compare_exp(), monster_list_format_textblock(), monster_list_free(), monster_list_get_glyphs(), monster_list_new(), monster_list_sort(), monster_list_standard_compare(), my_strcpy(), region::page_rows, region_erase_bordered(), region::row, textblock_free(), textblock_new(), textui_textblock_show(), and region::width.

Referenced by do_cmd_monlist().

◆ monster_list_show_subwindow()

void monster_list_show_subwindow ( int  height,
int  width 

Display the monster list statically.

This will force the list to be displayed to the provided dimensions. Contents will be adjusted accordingly.

In order to support more efficient monster flicker animations, this function uses a shared list object so that it's not constantly allocating and freeing the list.

heightis the height of the list.
widthis the width of the list.

References cave, cave_monster(), cave_monster_max(), monster_list_s::creation_turn, i, mflag_has, monster_list_collect(), monster_list_format_textblock(), monster_list_get_glyphs(), monster_list_reset(), monster_list_shared_instance(), monster_list_sort(), monster_list_standard_compare(), SCREEN_REGION, textblock_free(), textblock_new(), and textui_textblock_place().

Referenced by update_monlist_subwindow().