Hengband
2.2.1
|
#include "angband.h"
#include "util.h"
#include "files.h"
#include "core.h"
#include "term.h"
#include "artifact.h"
#include "bldg.h"
#include "init.h"
#include "quest.h"
#include "trap.h"
#include "rooms.h"
#include "store.h"
#include "wild.h"
#include "dungeon-file.h"
#include "feature.h"
#include "floor.h"
#include "floor-town.h"
#include "dungeon.h"
#include "rooms-vault.h"
#include "player-skill.h"
#include "player-class.h"
#include "objectkind.h"
#include "object-ego.h"
#include "world.h"
#include <sys/types.h>
#include <sys/stat.h>
関数 | |
static void | put_title (void) |
タイトル記述 [詳解] | |
void | init_file_paths (char *path) |
各データファイルを読み取るためのパスを取得する Find the default paths to all of our important sub-directories. [詳解] | |
static errr | check_modification_date (int fd, concptr template_file) |
テキストファイルとrawファイルの更新時刻を比較する Find the default paths to all of our important sub-directories. [詳解] | |
static errr | init_info_raw (int fd, header *head) |
rawファイルからのデータの読み取り処理 Initialize the "*_info" array, by parsing a binary "image" file [詳解] | |
static void | init_header (header *head, IDX num, int len) |
ヘッダ構造体の更新 Initialize the header of an *_info.raw file. [詳解] | |
static errr | init_info (concptr filename, header *head, void **info, char **name, char **text, char **tag) |
ヘッダ構造体の更新 Initialize the "*_info" array [詳解] | |
static errr | init_f_info (void) |
地形情報読み込みのメインルーチン / Initialize the "f_info" array [詳解] | |
static errr | init_k_info (void) |
ベースアイテム情報読み込みのメインルーチン / Initialize the "k_info" array [詳解] | |
static errr | init_a_info (void) |
固定アーティファクト情報読み込みのメインルーチン / Initialize the "a_info" array [詳解] | |
static errr | init_e_info (void) |
固定アーティファクト情報読み込みのメインルーチン / Initialize the "e_info" array [詳解] | |
static errr | init_r_info (void) |
モンスター種族情報読み込みのメインルーチン / Initialize the "r_info" array [詳解] | |
static errr | init_d_info (void) |
ダンジョン情報読み込みのメインルーチン / Initialize the "d_info" array [詳解] | |
errr | init_v_info (void) |
Vault情報読み込みのメインルーチン / Initialize the "v_info" array [詳解] | |
static errr | init_s_info (void) |
職業技能情報読み込みのメインルーチン / Initialize the "s_info" array [詳解] | |
static errr | init_m_info (void) |
職業魔法情報読み込みのメインルーチン / Initialize the "m_info" array [詳解] | |
static errr | init_misc (void) |
基本情報読み込みのメインルーチン / Initialize misc. [詳解] | |
static errr | init_towns (void) |
町情報読み込みのメインルーチン / Initialize town array [詳解] | |
errr | init_buildings (void) |
店情報初期化のメインルーチン / Initialize buildings [詳解] | |
static errr | init_quests (void) |
クエスト情報初期化のメインルーチン / Initialize quest array [詳解] | |
s16b | f_tag_to_index_in_init (concptr str) |
地形タグからIDを得る / Initialize quest array [詳解] | |
static errr | init_feat_variables (void) |
地形の汎用定義をタグを通じて取得する / Initialize feature variables [詳解] | |
static errr | init_other (void) |
その他の初期情報更新 / Initialize some other arrays [詳解] | |
static errr | init_object_alloc (void) |
オブジェクト配列を初期化する / Initialize some other arrays [詳解] | |
static errr | init_alloc (void) |
モンスター配列と生成テーブルを初期化する / Initialize some other arrays [詳解] | |
static void | note (concptr str) |
画面左下にシステムメッセージを表示する / Hack – take notes on line 23 [詳解] | |
static void | init_angband_aux (concptr why) |
全ゲームデータ読み込みのサブルーチン / Hack – Explain a broken "lib" folder and quit (see below). [詳解] | |
void | init_angband (void) |
全ゲームデータ読み込みのメインルーチン / Hack – main Angband initialization entry point [詳解] | |
concptr | get_check_sum (void) |
サムチェック情報を出力 / Get check sum in string form [詳解] | |
変数 | |
int | error_idx |
データ読み込み/初期化時に汎用的にエラーコードを保存するグローバル変数 [詳解] | |
int | error_line |
データ読み込み/初期化時に汎用的にエラー行数を保存するグローバル変数 [詳解] | |
concptr | err_str [PARSE_ERROR_MAX] |
エラーメッセージの名称定義 / Standard error message text [詳解] | |
header | v_head |
Vault情報のヘッダ構造体 [詳解] | |
header | f_head |
地形情報のヘッダ構造体 [詳解] | |
header | k_head |
ペースアイテム情報のヘッダ構造体 [詳解] | |
header | a_head |
固定アーティファクト情報のヘッダ構造体 [詳解] | |
header | e_head |
アイテムエゴ情報のヘッダ構造体 [詳解] | |
header | r_head |
モンスター種族情報のヘッダ構造体 [詳解] | |
header | d_head |
ダンジョン情報のヘッダ構造体 [詳解] | |
header | s_head |
プレイヤー職業技能情報のヘッダ構造体 [詳解] | |
header | m_head |
プレイヤー職業魔法情報のヘッダ構造体 [詳解] | |
static bool | feat_tag_is_not_found = FALSE |
地形タグ情報から地形IDを得られなかった場合にTRUEを返すグローバル変数 [詳解] | |
テキストファイルとrawファイルの更新時刻を比較する Find the default paths to all of our important sub-directories.
fd | ファイルディスクリプタ |
template_file | ファイル名 |
concptr get_check_sum | ( | void | ) |
サムチェック情報を出力 / Get check sum in string form
|
static |
固定アーティファクト情報読み込みのメインルーチン / Initialize the "a_info" array
|
static |
モンスター配列と生成テーブルを初期化する / Initialize some other arrays
void init_angband | ( | void | ) |
全ゲームデータ読み込みのメインルーチン / Hack – main Angband initialization entry point
This function is "messy" because various things may or may not be initialized, but the "plog()" and "quit()" functions are "supposed" to work under any conditions. Verify some files, display the "news.txt" file, create the high score file, initialize all internal arrays, and load the basic "user pref files". Be very careful to keep track of the order in which things are initialized, in particular, the only thing *known* to be available when this function is called is the "z-term.c" package, and that may not be fully initialized until the end of this function, when the default "user pref files" are loaded and "Term_xtra(TERM_XTRA_REACT,0)" is called. Note that this function attempts to verify the "news" file, and the game aborts (cleanly) on failure, since without the "news" file, it is likely that the "lib" folder has not been correctly located. Otherwise, the news file is displayed for the user. Note that this function attempts to verify (or create) the "high score" file, and the game aborts (cleanly) on failure, since one of the most common "extraction" failures involves failing to extract all sub-directories (even empty ones), such as by failing to use the "-d" option of "pkunzip", or failing to use the "save empty directories" option with "Compact Pro". This error will often be caught by the "high score" creation code below, since the "lib/apex" directory, being empty in the standard distributions, is most likely to be "lost", making it impossible to create the high score file. Note that various things are initialized by this function, including everything that was once done by "init_some_arrays". This initialization involves the parsing of special files in the "lib/data" and sometimes the "lib/edit" directories. Note that the "template" files are initialized first, since they often contain errors. This means that macros and message recall and things like that are not available until after they are done. We load the default "user pref files" here in case any "color" changes are needed before character creation. Note that the "graf-xxx.prf" file must be loaded separately, if needed, in the first (?) pass through "TERM_XTRA_REACT".
|
static |
全ゲームデータ読み込みのサブルーチン / Hack – Explain a broken "lib" folder and quit (see below).
This function is "messy" because various things may or may not be initialized, but the "plog()" and "quit()" functions are "supposed" to work under any conditions.
errr init_buildings | ( | void | ) |
店情報初期化のメインルーチン / Initialize buildings
|
static |
ダンジョン情報読み込みのメインルーチン / Initialize the "d_info" array
|
static |
固定アーティファクト情報読み込みのメインルーチン / Initialize the "e_info" array
|
static |
地形情報読み込みのメインルーチン / Initialize the "f_info" array
|
static |
地形の汎用定義をタグを通じて取得する / Initialize feature variables
void init_file_paths | ( | char * | path | ) |
各データファイルを読み取るためのパスを取得する Find the default paths to all of our important sub-directories.
path | パス保管先の文字列 |
The purpose of each sub-directory is described in "variable.c". All of the sub-directories should, by default, be located inside the main "lib" directory, whose location is very system dependant. This function takes a writable buffer, initially containing the "path" to the "lib" directory, for example, "/pkg/lib/angband/", or a system dependant string, for example, ":lib:". The buffer must be large enough to contain at least 32 more characters. Various command line options may allow some of the important directories to be changed to user-specified directories, most importantly, the "info" and "user" and "save" directories, but this is done after this function, see "main.c". In general, the initial path should end in the appropriate "PATH_SEP" string. All of the "sub-directory" paths (created below or supplied by the user) will NOT end in the "PATH_SEP" string, see the special "path_build()" function in "util.c" for more information. Mega-Hack -- support fat raw files under NEXTSTEP, using special "suffixed" directories for the "ANGBAND_DIR_DATA" directory, but requiring the directories to be created by hand by the user. Hack -- first we free all the strings, since this is known to succeed even if the strings have not been allocated yet, as long as the variables start out as "NULL". This allows this function to be called multiple times, for example, to try several base "path" values until a good one is found.
ヘッダ構造体の更新 Initialize the header of an *_info.raw file.
head | rawファイルのヘッダ |
num | データ数 |
len | データの長さ |
|
static |
ヘッダ構造体の更新 Initialize the "*_info" array
filename | ファイル名(拡張子txt/raw) |
head | 処理に用いるヘッダ構造体 |
info | データ保管先の構造体ポインタ |
name | 名称用可変文字列の保管先 |
text | テキスト用可変文字列の保管先 |
tag | タグ用可変文字列の保管先 |
rawファイルからのデータの読み取り処理 Initialize the "*_info" array, by parsing a binary "image" file
fd | ファイルディスクリプタ |
head | rawファイルのヘッダ |
|
static |
ベースアイテム情報読み込みのメインルーチン / Initialize the "k_info" array
|
static |
職業魔法情報読み込みのメインルーチン / Initialize the "m_info" array
|
static |
基本情報読み込みのメインルーチン / Initialize misc.
values
|
static |
オブジェクト配列を初期化する / Initialize some other arrays
|
static |
その他の初期情報更新 / Initialize some other arrays
|
static |
クエスト情報初期化のメインルーチン / Initialize quest array
|
static |
モンスター種族情報読み込みのメインルーチン / Initialize the "r_info" array
|
static |
職業技能情報読み込みのメインルーチン / Initialize the "s_info" array
|
static |
町情報読み込みのメインルーチン / Initialize town array
errr init_v_info | ( | void | ) |
Vault情報読み込みのメインルーチン / Initialize the "v_info" array
|
static |
画面左下にシステムメッセージを表示する / Hack – take notes on line 23
|
static |
タイトル記述
header a_head |
固定アーティファクト情報のヘッダ構造体
header d_head |
ダンジョン情報のヘッダ構造体
header e_head |
アイテムエゴ情報のヘッダ構造体
concptr err_str[PARSE_ERROR_MAX] |
エラーメッセージの名称定義 / Standard error message text
int error_idx |
データ読み込み/初期化時に汎用的にエラーコードを保存するグローバル変数
int error_line |
データ読み込み/初期化時に汎用的にエラー行数を保存するグローバル変数
header f_head |
地形情報のヘッダ構造体
header k_head |
ペースアイテム情報のヘッダ構造体
header m_head |
プレイヤー職業魔法情報のヘッダ構造体
header r_head |
モンスター種族情報のヘッダ構造体
header s_head |
プレイヤー職業技能情報のヘッダ構造体
header v_head |
Vault情報のヘッダ構造体