Angband
Functions | Variables
ui-death.c File Reference

Handle the UI bits that happen after the character dies. More...

#include "angband.h"
#include "cmds.h"
#include "game-input.h"
#include "init.h"
#include "obj-desc.h"
#include "obj-identify.h"
#include "obj-info.h"
#include "savefile.h"
#include "store.h"
#include "ui-death.h"
#include "ui-history.h"
#include "ui-input.h"
#include "ui-knowledge.h"
#include "ui-menu.h"
#include "ui-obj.h"
#include "ui-player.h"
#include "ui-score.h"
#include "wizard.h"

Functions

static void put_str_centred (int y, int x1, int x2, const char *fmt,...)
 Write formatted string fmt on line y, centred between points x1 and x2.
static void print_tomb (void)
 Display the tombstone.
static void display_winner (void)
 Display the winner crown.
static void death_file (const char *title, int row)
 Menu command: dump character dump to file.
static void death_info (const char *title, int row)
 Menu command: view character dump and inventory.
static void death_messages (const char *title, int row)
 Menu command: peruse pre-death messages.
static void death_scores (const char *title, int row)
 Menu command: see top twenty scores.
static void death_examine (const char *title, int row)
 Menu command: examine items in the inventory.
static void death_history (const char *title, int row)
 Menu command: view character history.
static void death_spoilers (const char *title, int row)
 Menu command: allow spoiler generation (mainly for randarts).
static void death_randarts (const char *title, int row)
void death_screen (void)
 Handle character death.

Variables

static struct menudeath_menu
 Menu structures for the death menu.
static menu_action death_actions []

Detailed Description

Handle the UI bits that happen after the character dies.

Copyright (c) 1987 - 2007 Angband contributors

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

static void death_examine ( const char *  title,
int  row 
)
static
static void death_file ( const char *  title,
int  row 
)
static

Menu command: dump character dump to file.

References buf, dump_save(), EVENT_MESSAGE_FLUSH, event_signal(), FALSE, get_file, msg, player_safe_name(), screen_load(), screen_save(), and strnfmt().

static void death_history ( const char *  title,
int  row 
)
static

Menu command: view character history.

References history_display().

static void death_info ( const char *  title,
int  row 
)
static
static void death_messages ( const char *  title,
int  row 
)
static

Menu command: peruse pre-death messages.

References do_cmd_messages(), screen_load(), and screen_save().

static void death_randarts ( const char *  title,
int  row 
)
static
static void death_scores ( const char *  title,
int  row 
)
static

Menu command: see top twenty scores.

References screen_load(), screen_save(), and show_scores().

void death_screen ( void  )
static void death_spoilers ( const char *  title,
int  row 
)
static

Menu command: allow spoiler generation (mainly for randarts).

References do_cmd_spoilers().

static void display_winner ( void  )
static
static void print_tomb ( void  )
static
static void put_str_centred ( int  y,
int  x1,
int  x2,
const char *  fmt,
  ... 
)
static

Write formatted string fmt on line y, centred between points x1 and x2.

References put_str(), and vformat().

Referenced by display_winner(), and print_tomb().

Variable Documentation

menu_action death_actions[]
static
Initial value:
{
{ 0, 'i', "Information", death_info },
{ 0, 'm', "Messages", death_messages },
{ 0, 'f', "File dump", death_file },
{ 0, 'v', "View scores", death_scores },
{ 0, 'x', "Examine items", death_examine },
{ 0, 'h', "History", death_history },
{ 0, 's', "Spoilers", death_spoilers },
{ 0, 'r', "Keep randarts", death_randarts },
{ 0, 'q', "Quit", NULL },
}
struct menu* death_menu
static

Menu structures for the death menu.

Note that Quit must always be the last option, due to a hard-coded check in death_screen