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

プレイヤーの作成を行う / Create a player character [詳細]

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

データ構造

struct  hist_type
 生い立ちメッセージテーブルの構造体定義 / Player background information [詳細]
 

マクロ定義

#define AUTOROLLER_STEP   5431L
 オートローラーの内容を描画する間隔 / How often the autoroller will update the display and pause to check for user interuptions. [詳細]
 
#define MAX_TRIES   100
 ランダムクエストのモンスターを確定するために試行する回数 / Maximum number of tries for selection of a proper quest monster [詳細]
 
#define MAX_CLASS_CHOICE   MAX_CLASS
 
#define MAXITEMS   8
 
#define HISTPREF_LIMIT   1024
 

型定義

typedef struct hist_type hist_type
 生い立ちメッセージテーブル / Forward declare [詳細]
 

関数

static void birth_quit (void)
 プレイヤー作成を中断して変愚蛮怒を終了する [詳細]
 
static void show_help (cptr helpfile)
 指定されたヘルプファイルを表示する / Show specific help file [詳細]
 
static byte choose_realm (s32b choices, int *count)
 プレイヤーの魔法領域を選択する / Choose from one of the available magical realms [詳細]
 
static bool get_player_realms (void)
 選択した魔法領域の解説を表示する / Choose the magical realms [詳細]
 
static void save_prev_data (birther *birther_ptr)
 プレイヤーのクイックスタート情報をプレイヤー構造体から保存する / Save the current data for later [詳細]
 
static void load_prev_data (bool swap)
 プレイヤーのクイックスタート情報をプレイヤー構造体へ読み込む / Load the previous data [詳細]
 
static int adjust_stat (int value, int amount)
 プレイヤーの能力値表現に基づいて加減算を行う。 [詳細]
 
static void get_stats (void)
 プレイヤーの能力値を一通りロールする。 / Roll for a characters stats [詳細]
 
void get_max_stats (void)
 プレイヤーの限界ステータスを決める。 [詳細]
 
static void get_extra (bool roll_hitdie)
 その他「オートローラ中は算出の対象にしない」副次ステータスを処理する / Roll for some info that the auto-roller ignores [詳細]
 
static void get_history (void)
 プレイヤーの生い立ちの自動生成を行う。 / Get the racial history, and social class, using the "history charts". [詳細]
 
void get_height_weight (void)
 プレイヤーの身長体重を決める / Get character's height and weight [詳細]
 
static void get_ahw (void)
 プレイヤーの年齢を決める。 / Computes character's age, height, and weight by henkma [詳細]
 
static void get_money (void)
 プレイヤーの初期所持金を決める。 / Get the player's starting money [詳細]
 
static void birth_put_stats (void)
 put_stats()のサブルーチンとして、オートロール中のステータスを表示する / Display stat values, subset of "put_stats()" [詳細]
 
static void k_info_reset (void)
 ベースアイテム構造体の鑑定済みフラグをリセットする。 [詳細]
 
static void player_wipe (void)
 プレイヤー構造体の内容を初期値で消去する / Clear all the global "character" data [詳細]
 
static bool mon_hook_quest (int r_idx)
 モンスターがクエストの討伐対象に成り得るかを返す / Hook function for quest monsters [詳細]
 
void determine_random_questor (quest_type *q_ptr)
 ランダムクエストの討伐ユニークを決める / Determine the random quest uniques [詳細]
 
static void init_dungeon_quests (void)
 ダンジョン内部のクエストを初期化する / Initialize random quests and final quests [詳細]
 
static void init_turn (void)
 ゲームターンを初期化する / Reset turn [詳細]
 
static void wield_all (void)
 所持状態にあるアイテムの中から一部枠の装備可能なものを装備させる。 [詳細]
 
static bool monster_hook_human (int r_idx)
 バルログが死体を食べられるモンスターかの判定 / Hook function for human corpses [詳細]
 
static void add_outfit (object_type *o_ptr)
 初期所持アイテムの処理 / Add an outfit object [詳細]
 
void player_outfit (void)
 種族/職業/性格などに基づき初期所持アイテムを設定するメインセット関数。 / Init players with some belongings [詳細]
 
static bool get_player_race (void)
 プレイヤーの種族選択を行う / Player race [詳細]
 
static bool get_player_class (void)
 プレイヤーの職業選択を行う / Player class [詳細]
 
static bool get_player_seikaku (void)
 プレイヤーの性格選択を行う / Player Player seikaku [詳細]
 
static bool get_stat_limits (void)
 オートローラで得たい能力値の基準を決める。 [詳細]
 
static bool get_chara_limits (void)
 オートローラで得たい年齢、身長、体重、社会的地位の基準を決める。 [詳細]
 
void add_history_from_pref_line (cptr t)
 生い立ちメッセージの内容をバッファに加える。 / Hook function for reading the histpref.prf file. [詳細]
 
static bool do_cmd_histpref (void)
 生い立ちメッセージをファイルからロードする。 [詳細]
 
static void edit_history (void)
 生い立ちメッセージを編集する。/Character background edit-mode [詳細]
 
static bool player_birth_aux (void)
 player_birth()関数のサブセット/Helper function for 'player_birth()' [詳細]
 
static bool ask_quick_start (void)
 クイックスタート処理の問い合わせと実行を行う。/Ask whether the player use Quick Start or not. [詳細]
 
void player_birth (void)
 プレイヤー作成処理のメインルーチン/ Create a new character. [詳細]
 
void dump_yourself (FILE *fff)
 プレイヤー作成処理中のステータス表示処理 [詳細]
 

変数

static hist_type bg []
 生い立ちテーブルの定義 / Background information (see below)

Chart progression by race:
Human –> 1 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Half-Elf –> 4 –> 1 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Elf/High-Elf –> 7 –> 8 –> 9 –> 54 –> 55 –> 56
Hobbit –> 10 –> 11 –> 3 –> 50 –> 51 –> 52 –> 53
Gnome –> 13 –> 14 –> 3 –> 50 –> 51 –> 52 –> 53
Dwarf –> 16 –> 17 –> 18 –> 57 –> 58 –> 59 –> 60 –> 61
Half-Orc –> 19 –> 20 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Half-Troll –> 22 –> 23 –> 62 –> 63 –> 64 –> 65 –> 66

XXX XXX XXX This table must be correct or drastic errors may occur!
[詳細]
 
static cptr race_jouhou [MAX_RACES]
 種族の解説メッセージテーブル [詳細]
 
static cptr class_jouhou [MAX_CLASS]
 職業の解説メッセージテーブル [詳細]
 
static cptr seikaku_jouhou [MAX_SEIKAKU]
 性格の解説メッセージテーブル [詳細]
 
static cptr realm_jouhou [VALID_REALM]
 魔法領域の詳細解説メッセージテーブル [詳細]
 
static cptr realm_subinfo [VALID_REALM]
 魔法領域の簡易解説メッセージテーブル [詳細]
 
static s16b stat_limit [6]
 オートローラの能力値的要求水準 / Autoroll limit [詳細]
 
struct {
   s16b   agemin
 
   s16b   agemax
 
   s16b   htmin
 
   s16b   htmax
 
   s16b   wtmin
 
   s16b   wtmax
 
   s16b   scmin
 
   s16b   scmax
 
chara_limit
 オートローラの年齢、身長、体重、社会的地位の要求水準 [詳細]
 
static s32b stat_match [6]
 オートローラ中、各能力値が水準を超えた回数 / Autoroll matches [詳細]
 
static s32b auto_round
 オートローラの試行回数 / Autoroll round [詳細]
 
static byte player_init [MAX_CLASS][3][2]
 プレイヤーの職業毎の初期装備テーブル。/
Each player starts out with a few items, given as tval/sval pairs. [詳細]
 
static char * histpref_buf = NULL
 

説明

プレイヤーの作成を行う / Create a player character

日付
2013/12/28
作者
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke

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 Doxygen向けのコメント整理

マクロ定義

#define AUTOROLLER_STEP   5431L

オートローラーの内容を描画する間隔 / How often the autoroller will update the display and pause to check for user interuptions.

Bigger values will make the autoroller faster, but slower system may have problems because the user can't stop the autoroller for this number of rolls.

#define HISTPREF_LIMIT   1024
#define MAX_CLASS_CHOICE   MAX_CLASS
#define MAX_TRIES   100

ランダムクエストのモンスターを確定するために試行する回数 / Maximum number of tries for selection of a proper quest monster

#define MAXITEMS   8

型定義

typedef struct hist_type hist_type

生い立ちメッセージテーブル / Forward declare

関数

void add_history_from_pref_line ( cptr  t)

生い立ちメッセージの内容をバッファに加える。 / Hook function for reading the histpref.prf file.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void add_outfit ( object_type o_ptr)
static

初期所持アイテムの処理 / Add an outfit object

アイテムを既知のものとした上でwield_all()関数により装備させる。

引数
o_ptr処理したいオブジェクト構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static int adjust_stat ( int  value,
int  amount 
)
static

プレイヤーの能力値表現に基づいて加減算を行う。

引数
value現在の能力値
amount加減算する値
戻り値
加減算の結果

呼出しグラフ:

static bool ask_quick_start ( void  )
static

クイックスタート処理の問い合わせと実行を行う。/Ask whether the player use Quick Start or not.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void birth_put_stats ( void  )
static

put_stats()のサブルーチンとして、オートロール中のステータスを表示する / Display stat values, subset of "put_stats()"

See 'display_player()' for screen layout constraints.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void birth_quit ( void  )
static

プレイヤー作成を中断して変愚蛮怒を終了する

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static byte choose_realm ( s32b  choices,
int *  count 
)
static

プレイヤーの魔法領域を選択する / Choose from one of the available magical realms

引数
choices選択可能な魔法領域のビット配列
count選択可能な魔法領域を返すポインタ群。
戻り値
選択した魔法領域のID

関数の呼び出しグラフ:

呼出しグラフ:

void determine_random_questor ( quest_type q_ptr)

ランダムクエストの討伐ユニークを決める / Determine the random quest uniques

引数
q_ptrクエスト構造体の参照ポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool do_cmd_histpref ( void  )
static

生い立ちメッセージをファイルからロードする。

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void dump_yourself ( FILE *  fff)

プレイヤー作成処理中のステータス表示処理

引数
fffファイルポインタ
戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void edit_history ( void  )
static

生い立ちメッセージを編集する。/Character background edit-mode

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void get_ahw ( void  )
static

プレイヤーの年齢を決める。 / Computes character's age, height, and weight by henkma

内部でget_height_weight()も呼び出している。

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool get_chara_limits ( void  )
static

オートローラで得たい年齢、身長、体重、社会的地位の基準を決める。

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void get_extra ( bool  roll_hitdie)
static

その他「オートローラ中は算出の対象にしない」副次ステータスを処理する / Roll for some info that the auto-roller ignores

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void get_height_weight ( void  )

プレイヤーの身長体重を決める / Get character's height and weight

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void get_history ( void  )
static

プレイヤーの生い立ちの自動生成を行う。 / Get the racial history, and social class, using the "history charts".

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void get_max_stats ( void  )

プレイヤーの限界ステータスを決める。

戻り値
なし

呼出しグラフ:

static void get_money ( void  )
static

プレイヤーの初期所持金を決める。 / Get the player's starting money

戻り値
なし

呼出しグラフ:

static bool get_player_class ( void  )
static

プレイヤーの職業選択を行う / Player class

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool get_player_race ( void  )
static

プレイヤーの種族選択を行う / Player race

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool get_player_realms ( void  )
static

選択した魔法領域の解説を表示する / Choose the magical realms

戻り値
ユーザが魔法領域の確定を選んだらTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

static bool get_player_seikaku ( void  )
static

プレイヤーの性格選択を行う / Player Player seikaku

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool get_stat_limits ( void  )
static

オートローラで得たい能力値の基準を決める。

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void get_stats ( void  )
static

プレイヤーの能力値を一通りロールする。 / Roll for a characters stats

calc_bonuses()による、独立ステータスからの副次ステータス算出も行っている。 For efficiency, we include a chunk of "calc_bonuses()".

戻り値
なし

呼出しグラフ:

static void init_dungeon_quests ( void  )
static

ダンジョン内部のクエストを初期化する / Initialize random quests and final quests

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void init_turn ( void  )
static

ゲームターンを初期化する / Reset turn

アンデッド系種族は開始時刻を夜からにする。

戻り値
なし

呼出しグラフ:

static void k_info_reset ( void  )
static

ベースアイテム構造体の鑑定済みフラグをリセットする。

戻り値
なし

呼出しグラフ:

static void load_prev_data ( bool  swap)
static

プレイヤーのクイックスタート情報をプレイヤー構造体へ読み込む / Load the previous data

引数
swapTRUEならば現在のプレイヤー構造体上との内容をスワップする形で読み込む。
戻り値
なし。

関数の呼び出しグラフ:

呼出しグラフ:

static bool mon_hook_quest ( int  r_idx)
static

モンスターがクエストの討伐対象に成り得るかを返す / Hook function for quest monsters

引数
r_idxモンスターID
戻り値
討伐対象にできるならTRUEを返す。

呼出しグラフ:

static bool monster_hook_human ( int  r_idx)
static

バルログが死体を食べられるモンスターかの判定 / Hook function for human corpses

引数
r_idxモンスターID
戻り値
死体を食べられるならTRUEを返す。

関数の呼び出しグラフ:

呼出しグラフ:

void player_birth ( void  )

プレイヤー作成処理のメインルーチン/ Create a new character.

Note that we may be called with "junk" leftover in the various fields, so we must be sure to clear them first.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static bool player_birth_aux ( void  )
static

player_birth()関数のサブセット/Helper function for 'player_birth()'

The delay may be reduced, but is recommended to keep players from continuously rolling up characters, which can be VERY expensive CPU wise. And it cuts down on player stupidity.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

void player_outfit ( void  )

種族/職業/性格などに基づき初期所持アイテムを設定するメインセット関数。 / Init players with some belongings

Having an item makes the player "aware" of its purpose.

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void player_wipe ( void  )
static

プレイヤー構造体の内容を初期値で消去する / Clear all the global "character" data

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

static void save_prev_data ( birther birther_ptr)
static

プレイヤーのクイックスタート情報をプレイヤー構造体から保存する / Save the current data for later

引数
birther_ptrクイックスタート構造体の参照ポインタ
戻り値
なし。

呼出しグラフ:

static void show_help ( cptr  helpfile)
static

指定されたヘルプファイルを表示する / Show specific help file

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

関数の呼び出しグラフ:

呼出しグラフ:

static void wield_all ( void  )
static

所持状態にあるアイテムの中から一部枠の装備可能なものを装備させる。

アンデッド系種族は開始時刻を夜からにする。

戻り値
なし

関数の呼び出しグラフ:

呼出しグラフ:

変数

s16b agemax
s16b agemin
s32b auto_round
static

オートローラの試行回数 / Autoroll round

hist_type bg[]
static

生い立ちテーブルの定義 / Background information (see below)

Chart progression by race:
Human –> 1 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Half-Elf –> 4 –> 1 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Elf/High-Elf –> 7 –> 8 –> 9 –> 54 –> 55 –> 56
Hobbit –> 10 –> 11 –> 3 –> 50 –> 51 –> 52 –> 53
Gnome –> 13 –> 14 –> 3 –> 50 –> 51 –> 52 –> 53
Dwarf –> 16 –> 17 –> 18 –> 57 –> 58 –> 59 –> 60 –> 61
Half-Orc –> 19 –> 20 –> 2 –> 3 –> 50 –> 51 –> 52 –> 53
Half-Troll –> 22 –> 23 –> 62 –> 63 –> 64 –> 65 –> 66

XXX XXX XXX This table must be correct or drastic errors may occur!

struct { ... } chara_limit

オートローラの年齢、身長、体重、社会的地位の要求水準

cptr class_jouhou[MAX_CLASS]
static

職業の解説メッセージテーブル

char* histpref_buf = NULL
static
s16b htmax
s16b htmin
byte player_init[MAX_CLASS][3][2]
static

プレイヤーの職業毎の初期装備テーブル。/
Each player starts out with a few items, given as tval/sval pairs.


In addition, he always has some food and a few torches.

cptr race_jouhou[MAX_RACES]
static

種族の解説メッセージテーブル

cptr realm_jouhou[VALID_REALM]
static

魔法領域の詳細解説メッセージテーブル

cptr realm_subinfo[VALID_REALM]
static

魔法領域の簡易解説メッセージテーブル

s16b scmax
s16b scmin
cptr seikaku_jouhou[MAX_SEIKAKU]
static

性格の解説メッセージテーブル

s16b stat_limit[6]
static

オートローラの能力値的要求水準 / Autoroll limit

s32b stat_match[6]
static

オートローラ中、各能力値が水準を超えた回数 / Autoroll matches

s16b wtmax
s16b wtmin