Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
データ構造 | マクロ定義 | 型定義 | 関数 | 変数
wizard1.c

ウィザードモードの処理(スポイラー出力中心) / Spoiler generation -BEN- [詳細]

#include "angband.h"
wizard1.cのインクルード依存関係図

データ構造

struct  grouper
 
struct  flag_desc
 
struct  pval_info_type
 
struct  obj_desc_list
 

マクロ定義

#define POSITIZE(v)   (((v) >= 0) ? "+" : "")
 
#define INDENT1   " "
 
#define INDENT2   " "
 
#define MAX_LINE_LEN   75
 
#define N_ELEMENTS(a)   (sizeof (a) / sizeof ((a)[0]))
 
#define ITEM_SEP   ','
 
#define LIST_SEP   ';'
 
#define MAX_EVOL_DEPTH   64
 

型定義

typedef struct flag_desc flag_desc
 

関数

static cptr attr_to_text (monster_race *r_ptr)
 シンボル職の記述名を返す / Extract a textual representation of an attribute [詳細]
 
static void kind_info (char *buf, char *dam, char *wgt, int *lev, s32b *val, int k)
 ベースアイテムの各情報を文字列化する / Describe the kind [詳細]
 
static void spoil_obj_desc (cptr fname)
 各ベースアイテムの情報を一行毎に記述する / Create a spoiler file for items [詳細]
 
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 (cptr str)
 ファイルポインタ先に複数のハイフンで装飾した文字列を出力する / Write a line to the spoiler file and then "underline" it with hypens [詳細]
 
static cptrspoiler_flag_aux (const u32b art_flags[TR_FLAG_SIZE], const flag_desc *flag_ptr, cptr *desc_ptr, const int n_elmnts)
 アーティファクトの特性一覧を出力する / Write a line to the spoiler file and then "underline" it with hypens [詳細]
 
static void analyze_general (object_type *o_ptr, char *desc_ptr)
 アイテムの特定記述内容を返す / Acquire a "basic" description "The Cloak of Death [1,+10]" [詳細]
 
static void analyze_pval (object_type *o_ptr, pval_info_type *p_ptr)
 アーティファクトがプレイヤーに与えるpval修正を構造体に収める / List "player traits" altered by an artifact's pval. [詳細]
 
static void analyze_slay (object_type *o_ptr, cptr *slay_list)
 アーティファクトの種族スレイ特性を構造体に収める / Note the slaying specialties of a weapon [詳細]
 
static void analyze_brand (object_type *o_ptr, cptr *brand_list)
 アーティファクトの属性ブランド特性を構造体に収める / Note an object's elemental brands [詳細]
 
static void analyze_resist (object_type *o_ptr, cptr *resist_list)
 アーティファクトの通常耐性を構造体に収める / Note an object's elemental brands [詳細]
 
static void analyze_immune (object_type *o_ptr, cptr *immune_list)
 アーティファクトの免疫特性を構造体に収める / Note the immunities granted by an object [詳細]
 
static void analyze_sustains (object_type *o_ptr, cptr *sustain_list)
 アーティファクトの維持特性を構造体に収める / Note which stats an object sustains [詳細]
 
static void analyze_misc_magic (object_type *o_ptr, cptr *misc_list)
 アーティファクトのその他の特性を構造体に収める / Note miscellaneous powers bestowed by an artifact such as see invisible, free action, permanent light, etc. [詳細]
 
static void analyze_addition (object_type *o_ptr, char *addition)
 アーティファクトの追加ランダム特性を構造体に収める / Note additional ability and/or resistance of fixed artifacts [詳細]
 
static void analyze_misc (object_type *o_ptr, char *misc_desc)
 アーティファクトの基本情報を文字列に収める / Determine the minimum depth an artifact can appear, its rarity, its weight, and its value in gold pieces [詳細]
 
static void object_analyze (object_type *o_ptr, obj_desc_list *desc_ptr)
 アーティファクトの情報全体を構造体に収める / Fill in an object description structure for a given object and its value in gold pieces [詳細]
 
static void print_header (void)
 バッファにアーティファクト出力情報ヘッダを収める / [詳細]
 
static void spoiler_outlist (cptr header, cptr *list, char separator)
 フラグ名称を出力する汎用関数 [詳細]
 
static void spoiler_print_art (obj_desc_list *art_ptr)
 アーティファクト一件をスポイラー出力する / Create a spoiler file entry for an artifact [詳細]
 
static bool make_fake_artifact (object_type *o_ptr, int name1)
 アーティファクト情報を出力するためにダミー生成を行う / Hack – Create a "forged" artifact [詳細]
 
static void spoil_artifact (cptr fname)
 アーティファクト情報のスポイラー出力を行うメインルーチン / Create a spoiler file for artifacts [詳細]
 
static void spoil_mon_desc (cptr fname)
 モンスター簡易情報のスポイラー出力を行うメインルーチン / Create a spoiler file for monsters -BEN- [詳細]
 
static void spoil_out (cptr str)
 文字列をファイルポインタに出力する / Buffer text to the given file. [詳細]
 
static void roff_func (byte attr, cptr str)
 関数ポインタ用の出力関数 / Hook function used in spoil_mon_info() [詳細]
 
static void spoil_mon_info (cptr fname)
 モンスター詳細情報をスポイラー出力するメインルーチン / Create a spoiler file for monsters (-SHAWN-) [詳細]
 
static bool int_n_cmp (int *a, int *b, int length)
 int配列でstrncmp()と似た比較処理を行う / Compare two int-type array like strncmp() and return TRUE if equals [詳細]
 
static bool is_partial_tree (int *tree, int *partial_tree)
 ある木が指定された木の部分木かどうかを返す / Returns TRUE if an evolution tree is "partial tree" [詳細]
 
static bool ang_sort_comp_evol_tree (vptr u, vptr v, int a, int b)
 進化ツリーをソートするためモンスター種族の判定関数 / Sorting hook – Comp function [詳細]
 
static void ang_sort_swap_evol_tree (vptr u, vptr v, int a, int b)
 進化ツリーをソートするため木構造のスワップ関数 / Sorting hook – Swap function [詳細]
 
static void spoil_mon_evol (cptr fname)
 進化ツリーをスポイラー出力するメインルーチン / Print monsters' evolution information to file [詳細]
 
void do_cmd_spoilers (void)
 スポイラー出力を行うコマンドのメインルーチン / Create Spoiler files -BEN- [詳細]
 
static void random_artifact_analyze (object_type *o_ptr, obj_desc_list *desc_ptr)
 ランダムアーティファクト1件を解析する / Fill in an object description structure for a given object [詳細]
 
static void spoiler_print_randart (object_type *o_ptr, obj_desc_list *art_ptr)
 ランダムアーティファクト1件をスポイラー出力する / Create a spoiler file entry for an artifact [詳細]
 
static void spoil_random_artifact_aux (object_type *o_ptr, int i)
 ランダムアーティファクト内容をスポイラー出力するサブルーチン / [詳細]
 
void spoil_random_artifact (cptr fname)
 ランダムアーティファクト内容をスポイラー出力するメインルーチン / Create a list file for random artifacts [詳細]
 

変数

static FILE * fff = NULL
 
static grouper group_item []
 
static grouper group_artifact []
 
static flag_desc stat_flags_desc []
 
static flag_desc pval_flags1_desc []
 
static flag_desc slay_flags_desc []
 
static flag_desc brand_flags_desc []
 
static const flag_desc resist_flags_desc []
 
static const flag_desc immune_flags_desc []
 
static const flag_desc sustain_flags_desc []
 
static const flag_desc misc_flags2_desc []
 
static const flag_desc misc_flags3_desc []
 

説明

ウィザードモードの処理(スポイラー出力中心) / Spoiler generation -BEN-

日付
2014/02/17
作者
Copyright (c) 1997 Ben Harrison, and others 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. 2013 Deskull rearranged comment for Doxygen.

マクロ定義

#define INDENT1   " "
#define INDENT2   " "
#define ITEM_SEP   ','
#define LIST_SEP   ';'
#define MAX_EVOL_DEPTH   64
#define MAX_LINE_LEN   75
#define N_ELEMENTS (   a)    (sizeof (a) / sizeof ((a)[0]))
#define POSITIZE (   v)    (((v) >= 0) ? "+" : "")

型定義

typedef struct flag_desc flag_desc

関数

static void analyze_addition ( object_type o_ptr,
char *  addition 
)
static

アーティファクトの追加ランダム特性を構造体に収める / Note additional ability and/or resistance of fixed artifacts

引数
o_ptrオブジェクト構造体の参照ポインタ
addition追加ランダム耐性構造体の参照ポインタ
戻り値
なし

呼出しグラフ:

static void analyze_brand ( object_type o_ptr,
cptr brand_list 
)
static

アーティファクトの属性ブランド特性を構造体に収める / Note an object's elemental brands

引数
o_ptrオブジェクト構造体の参照ポインタ
brand_list属性ブランド構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_general ( object_type o_ptr,
char *  desc_ptr 
)
static

アイテムの特定記述内容を返す / Acquire a "basic" description "The Cloak of Death [1,+10]"

引数
o_ptr記述を得たいオブジェクトの参照ポインタ
desc_ptr記述内容を返すための文字列参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_immune ( object_type o_ptr,
cptr immune_list 
)
static

アーティファクトの免疫特性を構造体に収める / Note the immunities granted by an object

引数
o_ptrオブジェクト構造体の参照ポインタ
immune_list免疫構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_misc ( object_type o_ptr,
char *  misc_desc 
)
static

アーティファクトの基本情報を文字列に収める / Determine the minimum depth an artifact can appear, its rarity, its weight, and its value in gold pieces

引数
o_ptrオブジェクト構造体の参照ポインタ
misc_desc基本情報を収める文字列参照ポインタ
戻り値
なし

呼出しグラフ:

static void analyze_misc_magic ( object_type o_ptr,
cptr misc_list 
)
static

アーティファクトのその他の特性を構造体に収める / Note miscellaneous powers bestowed by an artifact such as see invisible, free action, permanent light, etc.

引数
o_ptrオブジェクト構造体の参照ポインタ
misc_listその他の特性構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_pval ( object_type o_ptr,
pval_info_type p_ptr 
)
static

アーティファクトがプレイヤーに与えるpval修正を構造体に収める / List "player traits" altered by an artifact's pval.

These include stats, speed, infravision, tunneling, stealth, searching, and extra attacks.

引数
o_ptrオブジェクト構造体の参照ポインタ
p_ptrpval修正構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_resist ( object_type o_ptr,
cptr resist_list 
)
static

アーティファクトの通常耐性を構造体に収める / Note an object's elemental brands

引数
o_ptrオブジェクト構造体の参照ポインタ
resist_list通常耐性構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_slay ( object_type o_ptr,
cptr slay_list 
)
static

アーティファクトの種族スレイ特性を構造体に収める / Note the slaying specialties of a weapon

引数
o_ptrオブジェクト構造体の参照ポインタ
slay_list種族スレイ構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void analyze_sustains ( object_type o_ptr,
cptr sustain_list 
)
static

アーティファクトの維持特性を構造体に収める / Note which stats an object sustains

引数
o_ptrオブジェクト構造体の参照ポインタ
sustain_list維持特性構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool ang_sort_comp_evol_tree ( vptr  u,
vptr  v,
int  a,
int  b 
)
static

進化ツリーをソートするためモンスター種族の判定関数 / Sorting hook – Comp function

引数
u進化木構造データ
v未使用
a比較したいモンスター種族ID1
b比較したいモンスター種族ID2
戻り値
2が大きければTRUEを返す

呼出しグラフ:

static void ang_sort_swap_evol_tree ( vptr  u,
vptr  v,
int  a,
int  b 
)
static

進化ツリーをソートするため木構造のスワップ関数 / Sorting hook – Swap function

引数
u進化木構造データ
v未使用
aスワップしたい木構造1
bスワップしたい木構造2
戻り値
2が大きければTRUEを返す

呼出しグラフ:

static cptr attr_to_text ( monster_race r_ptr)
static

シンボル職の記述名を返す / Extract a textual representation of an attribute

引数
r_ptrモンスター種族の構造体ポインタ
戻り値
シンボル職の記述名

呼出しグラフ:

void do_cmd_spoilers ( void  )

スポイラー出力を行うコマンドのメインルーチン / Create Spoiler files -BEN-

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool int_n_cmp ( int *  a,
int *  b,
int  length 
)
static

int配列でstrncmp()と似た比較処理を行う / Compare two int-type array like strncmp() and return TRUE if equals

引数
a比較するint配列1
b比較するint配列2
length
戻り値
両者の値が等しければTRUEを返す

呼出しグラフ:

static bool is_partial_tree ( int *  tree,
int *  partial_tree 
)
static

ある木が指定された木の部分木かどうかを返す / Returns TRUE if an evolution tree is "partial tree"

引数
tree元となる木構造リスト
partial_tree部分木かどうか判定したい木構造リスト
戻り値
部分木ならばTRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static void kind_info ( char *  buf,
char *  dam,
char *  wgt,
int *  lev,
s32b val,
int  k 
)
static

ベースアイテムの各情報を文字列化する / Describe the kind

引数
buf名称を返すバッファ参照ポインタ
damダメージダイス記述を返すバッファ参照ポインタ
wgt重量記述を返すバッファ参照ポインタ
lev生成階記述を返すバッファ参照ポインタ
val価値を返すバッファ参照ポインタ
kベースアイテムID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool make_fake_artifact ( object_type o_ptr,
int  name1 
)
static

アーティファクト情報を出力するためにダミー生成を行う / Hack – Create a "forged" artifact

引数
o_ptr一時生成先を保管するオブジェクト構造体
name1生成するアーティファクトID
戻り値
生成が成功した場合TRUEを返す

関数の呼び出しグラフ:

呼出しグラフ:

static void object_analyze ( object_type o_ptr,
obj_desc_list desc_ptr 
)
static

アーティファクトの情報全体を構造体に収める / Fill in an object description structure for a given object and its value in gold pieces

引数
o_ptrオブジェクト構造体の参照ポインタ
desc_ptr全アーティファクト情報を収める文字列参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void print_header ( void  )
static

バッファにアーティファクト出力情報ヘッダを収める /

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void random_artifact_analyze ( object_type o_ptr,
obj_desc_list desc_ptr 
)
static

ランダムアーティファクト1件を解析する / Fill in an object description structure for a given object

引数
o_ptrランダムアーティファクトのオブジェクト構造体参照ポインタ
desc_ptr記述内容を収める構造体参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void roff_func ( byte  attr,
cptr  str 
)
static

関数ポインタ用の出力関数 / Hook function used in spoil_mon_info()

引数
attr未使用
str文字列参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_artifact ( cptr  fname)
static

アーティファクト情報のスポイラー出力を行うメインルーチン / Create a spoiler file for artifacts

引数
fname生成ファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_mon_desc ( cptr  fname)
static

モンスター簡易情報のスポイラー出力を行うメインルーチン / Create a spoiler file for monsters -BEN-

引数
fname生成ファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_mon_evol ( cptr  fname)
static

進化ツリーをスポイラー出力するメインルーチン / Print monsters' evolution information to file

引数
fname出力ファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_mon_info ( cptr  fname)
static

モンスター詳細情報をスポイラー出力するメインルーチン / Create a spoiler file for monsters (-SHAWN-)

引数
fnameファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_obj_desc ( cptr  fname)
static

各ベースアイテムの情報を一行毎に記述する / Create a spoiler file for items

引数
fnameファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_out ( cptr  str)
static

文字列をファイルポインタに出力する / Buffer text to the given file.

(-SHAWN-) This is basically c_roff() from mon-desc.c with a few changes.

引数
str文字列参照ポインタ
戻り値
なし

呼出しグラフ:

void spoil_random_artifact ( cptr  fname)

ランダムアーティファクト内容をスポイラー出力するメインルーチン / Create a list file for random artifacts

引数
fname出力ファイル名
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoil_random_artifact_aux ( object_type o_ptr,
int  i 
)
static

ランダムアーティファクト内容をスポイラー出力するサブルーチン /

引数
o_ptrランダムアーティファクトのオブジェクト構造体参照ポインタ
i出力したい記録ランダムアーティファクトID
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoiler_blanklines ( int  n)
static

ファイルポインタ先に改行を複数出力する / Write out `n' blank lines to the spoiler file

引数
n改行を出力する数
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static cptr* spoiler_flag_aux ( const u32b  art_flags[TR_FLAG_SIZE],
const flag_desc flag_ptr,
cptr desc_ptr,
const int  n_elmnts 
)
static

アーティファクトの特性一覧を出力する / Write a line to the spoiler file and then "underline" it with hypens

引数
art_flagsアーティファクトのフラグ群
flag_ptrフラグ記述情報の参照ポインタ
desc_ptr記述内容を返すための文字列参照ポインタ
n_elmntsフラグの要素数
戻り値
desc_ptrと同じアドレス
This function does most of the actual "analysis". Given a set of bit flags
(which will be from one of the flags fields from the object in question),
a "flag description structure", a "description list", and the number of
elements in the "flag description structure", this function sets the
"description list" members to the appropriate descriptions contained in
the "flag description structure".
The possibly updated description pointer is returned.

呼出しグラフ:

static void spoiler_out_n_chars ( int  n,
char  c 
)
static

ファイルポインタ先に同じ文字を複数出力する / Write out `n' of the character `c' to the spoiler file

引数
n出力する数
c出力するキャラクタ
戻り値
なし

呼出しグラフ:

static void spoiler_outlist ( cptr  header,
cptr list,
char  separator 
)
static

フラグ名称を出力する汎用関数

引数
headerヘッダに出力するフラグ群の名前
listフラグ名リスト
separatorフラグ表示の区切り記号
戻り値
なし

呼出しグラフ:

static void spoiler_print_art ( obj_desc_list art_ptr)
static

アーティファクト一件をスポイラー出力する / Create a spoiler file entry for an artifact

引数
art_ptrアーティファクト情報をまとめた構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoiler_print_randart ( object_type o_ptr,
obj_desc_list art_ptr 
)
static

ランダムアーティファクト1件をスポイラー出力する / Create a spoiler file entry for an artifact

引数
o_ptrランダムアーティファクトのオブジェクト構造体参照ポインタ
art_ptr記述内容を収めた構造体参照ポインタ Fill in an object description structure for a given object
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void spoiler_underline ( cptr  str)
static

ファイルポインタ先に複数のハイフンで装飾した文字列を出力する / Write a line to the spoiler file and then "underline" it with hypens

引数
str出力したい文字列
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

変数

flag_desc brand_flags_desc[]
static
初期値:
=
{
{ TR_BRAND_ACID, "Acid Brand" },
{ TR_BRAND_ELEC, "Lightning Brand" },
{ TR_BRAND_FIRE, "Flame Tongue" },
{ TR_BRAND_COLD, "Frost Brand" },
{ TR_BRAND_POIS, "Poisoned" },
{ TR_FORCE_WEAPON, "Force" },
{ TR_CHAOTIC, "Mark of Chaos" },
{ TR_VAMPIRIC, "Vampiric" },
{ TR_IMPACT, "Earthquake impact on hit" },
{ TR_VORPAL, "Very sharp" },
}
FILE* fff = NULL
static
grouper group_artifact[]
static
grouper group_item[]
static
const flag_desc immune_flags_desc[]
static
初期値:
=
{
{ TR_IM_ACID, "Acid" },
{ TR_IM_ELEC, "Lightning" },
{ TR_IM_FIRE, "Fire" },
{ TR_IM_COLD, "Cold" },
}
const flag_desc misc_flags2_desc[]
static
初期値:
=
{
{ TR_THROW, "Throwing" },
{ TR_REFLECT, "Reflection" },
{ TR_FREE_ACT, "Free Action" },
{ TR_HOLD_EXP, "Hold Experience" },
}
const flag_desc misc_flags3_desc[]
static
flag_desc pval_flags1_desc[]
static
初期値:
=
{
{ TR_STEALTH, "Stealth" },
{ TR_SEARCH, "Searching" },
{ TR_INFRA, "Infravision" },
{ TR_TUNNEL, "Tunneling" },
{ TR_BLOWS, "Attacks" },
{ TR_SPEED, "Speed" }
}
const flag_desc resist_flags_desc[]
static
flag_desc slay_flags_desc[]
static
flag_desc stat_flags_desc[]
static
初期値:
=
{
{ TR_STR, "STR" },
{ TR_INT, "INT" },
{ TR_WIS, "WIS" },
{ TR_DEX, "DEX" },
{ TR_CON, "CON" },
{ TR_CHR, "CHR" }
}
const flag_desc sustain_flags_desc[]
static
初期値:
=
{
{ TR_SUST_STR, "STR" },
{ TR_SUST_INT, "INT" },
{ TR_SUST_WIS, "WIS" },
{ TR_SUST_DEX, "DEX" },
{ TR_SUST_CON, "CON" },
{ TR_SUST_CHR, "CHR" },
}