Angband
Functions | Variables
wiz-spoil.c File Reference

Spoiler generation. More...

#include "angband.h"
#include "buildid.h"
#include "cmds.h"
#include "game-world.h"
#include "init.h"
#include "mon-lore.h"
#include "monster.h"
#include "obj-desc.h"
#include "obj-identify.h"
#include "obj-info.h"
#include "obj-make.h"
#include "obj-pile.h"
#include "obj-power.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "object.h"
#include "ui-input.h"
#include "ui-knowledge.h"
#include "ui-menu.h"
#include "ui-mon-lore.h"
#include "wizard.h"
#include "z-file.h"

Functions

static void spoiler_out_n_chars (int n, char c)
 Write out `n' of the character `c' to the spoiler file.
static void spoiler_blanklines (int n)
 Write out `n' blank lines to the spoiler file.
static void spoiler_underline (const char *str, char c)
 Write a line to the spoiler file and then "underline" it with hypens.
static void kind_info (char *buf, size_t buf_len, char *dam, size_t dam_len, char *wgt, size_t wgt_len, int *lev, s32b *val, int k)
 Describe the kind.
static void spoil_obj_desc (const char *fname)
 Create a spoiler file for items.
static void spoil_artifact (const char *fname)
 Create a spoiler file for artifacts.
static void spoil_mon_desc (const char *fname)
 

Brief monster spoilers


static void spoil_mon_info (const char *fname)
 

Monster spoilers originally by: smcho.nosp@m.rse@.nosp@m.ringe.nosp@m.r.cs.nosp@m..utsa.nosp@m..edu (Shawn McHorse)


static void spoiler_menu_act (const char *title, int row)
void do_cmd_spoilers (void)
 Create Spoiler files.

Variables

static ang_filefh = NULL
 

Item Spoilers by Ben Harrison (benh@.nosp@m.phia.nosp@m.l.com)


static const grouper group_item []
 The basic items categorized by type.
static const grouper group_artifact []
 
Artifact Spoilers by: randy.nosp@m.@PIC.nosp@m.ARD.t.nosp@m.amu..nosp@m.edu (Randy Hutson)
static struct menuspoil_menu
static menu_action spoil_actions []

Detailed Description

Spoiler generation.

Copyright (c) 1997 Ben Harrison, and others

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

void do_cmd_spoilers ( void  )
static void kind_info ( char *  buf,
size_t  buf_len,
char *  dam,
size_t  dam_len,
char *  wgt,
size_t  wgt_len,
int lev,
s32b val,
int  k 
)
static
static void spoil_artifact ( const char *  fname)
static
static void spoil_mon_desc ( const char *  fname)
static
static void spoil_mon_info ( const char *  fname)
static
static void spoil_obj_desc ( const char *  fname)
static
static void spoiler_blanklines ( int  n)
static

Write out `n' blank lines to the spoiler file.

References spoiler_out_n_chars().

Referenced by spoil_artifact().

static void spoiler_menu_act ( const char *  title,
int  row 
)
static
static void spoiler_out_n_chars ( int  n,
char  c 
)
static

Write out `n' of the character `c' to the spoiler file.

References file_writec().

Referenced by spoiler_blanklines(), and spoiler_underline().

static void spoiler_underline ( const char *  str,
char  c 
)
static

Write a line to the spoiler file and then "underline" it with hypens.

References spoiler_out_n_chars(), and text_out().

Referenced by spoil_artifact().

Variable Documentation

ang_file* fh = NULL
static


Item Spoilers by Ben Harrison (benh@.nosp@m.phia.nosp@m.l.com)

The spoiler file being created

Referenced by parse_file(), and spoil_artifact().

const grouper group_artifact[]
static
Initial value:
{
{ TV_SWORD, "Edged Weapons" },
{ TV_POLEARM, "Polearms" },
{ TV_HAFTED, "Hafted Weapons" },
{ TV_BOW, "Bows" },
{ TV_DIGGING, "Diggers" },
{ TV_SOFT_ARMOR, "Body Armor" },
{ TV_HARD_ARMOR, NULL },
{ TV_DRAG_ARMOR, NULL },
{ TV_CLOAK, "Cloaks" },
{ TV_SHIELD, "Shields" },
{ TV_HELM, "Helms/Crowns" },
{ TV_CROWN, NULL },
{ TV_GLOVES, "Gloves" },
{ TV_BOOTS, "Boots" },
{ TV_LIGHT, "Light Sources" },
{ TV_AMULET, "Amulets" },
{ TV_RING, "Rings" },
{ 0, NULL }
}


Artifact Spoilers by: randy.nosp@m.@PIC.nosp@m.ARD.t.nosp@m.amu..nosp@m.edu (Randy Hutson)

(Mostly) rewritten in 2002 by Andi Sidwell and Robert Ruehlmann.

The artifacts categorized by type

const grouper group_item[]
static

The basic items categorized by type.

menu_action spoil_actions[]
static
Initial value:
{
{ 0, 0, "Brief Object Info (obj-desc.spo)", spoiler_menu_act },
{ 0, 0, "Brief Artifact Info (artifact.spo)", spoiler_menu_act },
{ 0, 0, "Brief Monster Info (mon-desc.spo)", spoiler_menu_act },
{ 0, 0, "Full Monster Info (mon-info.spo)", spoiler_menu_act },
}
struct menu* spoil_menu
static