Angband
Functions
ui-mon-lore.c File Reference

Monster memory UI. More...

#include "angband.h"
#include "init.h"
#include "mon-lore.h"
#include "ui-mon-lore.h"
#include "ui-output.h"
#include "ui-prefs.h"
#include "ui-term.h"
#include "z-textblock.h"

Functions

void lore_title (textblock *tb, const struct monster_race *race)
 Place a monster recall title into a textblock. More...
 
void lore_description (textblock *tb, const struct monster_race *race, const struct monster_lore *original_lore, bool spoilers)
 Place a full monster recall description (with title) into a textblock, with or without spoilers. More...
 
void lore_show_interactive (const struct monster_race *race, const struct monster_lore *lore)
 Display monster recall modally and wait for a keypress. More...
 
void lore_show_subwindow (const struct monster_race *race, const struct monster_lore *lore)
 Display monster recall statically. More...
 

Detailed Description

Monster memory UI.

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

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

◆ lore_description()

void lore_description ( textblock tb,
const struct monster_race race,
const struct monster_lore original_lore,
bool  spoilers 
)

Place a full monster recall description (with title) into a textblock, with or without spoilers.

Parameters
tbis the textblock we are placing the description into.
raceis the monster race we are describing.
original_loreis the known information about the monster race.
spoilersindicates what information is used; true will display full information without subjective information and monster flavor, while false only shows what the player knows.

References cheat_monster_lore(), monster_race::flags, lore_append_abilities(), lore_append_attack(), lore_append_awareness(), lore_append_drop(), lore_append_exp(), lore_append_flavor(), lore_append_friends(), lore_append_kills(), lore_append_movement(), lore_append_spells(), lore_append_toughness(), lore_is_fully_known(), lore_title(), monster_flags_known(), OPT, rf_has, RF_SIZE, and textblock_append().

Referenced by lore_show_interactive(), lore_show_subwindow(), mon_lore(), and spoil_mon_info().

◆ lore_show_interactive()

void lore_show_interactive ( const struct monster_race race,
const struct monster_lore lore 
)

Display monster recall modally and wait for a keypress.

This is intended to be called when the main window is active (hence the message flushing).

Parameters
raceis the monster race we are describing.
loreis the known information about the monster race.

References EVENT_MESSAGE_FLUSH, event_signal(), lore_description(), NULL, SCREEN_REGION, textblock_free(), textblock_new(), and textui_textblock_show().

Referenced by context_menu_cave(), do_cmd_query_symbol(), and target_set_interactive_aux().

◆ lore_show_subwindow()

void lore_show_subwindow ( const struct monster_race race,
const struct monster_lore lore 
)

Display monster recall statically.

This is intended to be called in a subwindow, since it clears the entire window before drawing, and has no interactivity.

Parameters
raceis the monster race we are describing.
loreis the known information about the monster race.

References term::hgt, lore_description(), NULL, SCREEN_REGION, Term, Term_erase(), textblock_free(), textblock_new(), and textui_textblock_place().

Referenced by update_monster_subwindow().

◆ lore_title()

void lore_title ( textblock tb,
const struct monster_race race 
)

Place a monster recall title into a textblock.

If graphics are turned on, this appends the title with the appropriate tile. Note: if the title is the only thing in the textblock, make sure to append a newline so that the textui stuff works properly.

Parameters
tbis the textblock we are placing the title into.
raceis the monster race we are describing.

References COLOUR_VIOLET, monster_race::d_attr, monster_race::d_char, monster_race::flags, monster_x_attr, monster_x_char, monster_race::name, OPT, rf_has, RF_UNIQUE, monster_race::ridx, textblock_append(), textblock_append_pict(), tile_height, and tile_width.

Referenced by do_cmd_query_symbol(), and lore_description().