Hengband  2.2.1
マクロ定義 | 関数 | 変数
core.h ファイル
被依存関係図:

[ソースコード]

マクロ定義

#define VERSION_NAME   "Hengband"
 バリアント名称 / Name of the version/variant [詳解]
 
#define FAKE_VERSION   0
 ゲームのバージョン番号定義 / "Program Version Number" of the game [詳解]
 
#define FAKE_VER_MAJOR   12
 ゲームのバージョン番号定義(メジャー番号 + 10) [詳解]
 
#define FAKE_VER_MINOR   2
 ゲームのバージョン番号定義(マイナー番号) [詳解]
 
#define FAKE_VER_PATCH   1
 ゲームのバージョン番号定義(パッチ番号) [詳解]
 
#define FAKE_VER_EXTRA   7
 ゲームのバージョン番号定義(エクストラ番号) [詳解]
 
#define IS_STABLE_VERSION   (FAKE_VER_MINOR % 2 == 0 && FAKE_VER_EXTRA == 0)
 バージョンが開発版が安定版かを返す [詳解]
 
#define H_VER_MAJOR   (FAKE_VER_MAJOR-10)
 セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later [詳解]
 
#define H_VER_MINOR   FAKE_VER_MINOR
 セーブファイル上のバージョン定義(マイナー番号) [詳解]
 
#define H_VER_PATCH   FAKE_VER_PATCH
 セーブファイル上のバージョン定義(パッチ番号) [詳解]
 
#define H_VER_EXTRA   FAKE_VER_EXTRA
 セーブファイル上のバージョン定義(エクストラ番号) [詳解]
 
#define ANGBAND_2_8_1
 Angband 2.8.1以降から有効な処理分岐を定義 [詳解]
 
#define ZANGBAND
 Zangband 以降から有効な処理分岐を定義 [詳解]
 
#define SPECIAL_KEY_QUEST   255
 
#define SPECIAL_KEY_BUILDING   254
 
#define SPECIAL_KEY_STORE   253
 
#define SPECIAL_KEY_QUIT   252
 
#define INIT_NAME_ONLY   0x01
 
#define INIT_SHOW_TEXT   0x02
 
#define INIT_ASSIGN   0x04
 
#define INIT_CREATE_DUNGEON   0x08
 
#define INIT_ONLY_FEATURES   0x10
 
#define INIT_ONLY_BUILDINGS   0x20
 

関数

void play_game (bool new_game)
 1ゲームプレイの主要ルーチン / Actually play a game [詳解]
 
void update_playtime (void)
 実ゲームプレイ時間を更新する [詳解]
 
s32b turn_real (s32b hoge)
 ゲームターンからの実時間換算を行うための補正をかける [詳解]
 
void prevent_turn_overflow (void)
 ターンのオーバーフローに対する対処 [詳解]
 
void close_game (void)
 ゲーム終了処理 / Close up the current game (player may or may not be dead) [詳解]
 
void handle_stuff (void)
 全更新処理をチェックして処理していく Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" [詳解]
 
void update_output (void)
 

変数

const concptr copyright [5]
 コピーライト情報 / Hack – Link a copyright message into the executable [詳解]
 
int init_flags
 
concptr ANGBAND_SYS
 Hack – The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file [詳解]
 
concptr ANGBAND_KEYBOARD
 
concptr ANGBAND_GRAF
 Hack – The special Angband "Graphics Suffix" This variable is used to choose an appropriate "graf-xxx" file [詳解]
 
bool can_save
 
COMMAND_CODE now_message
 
bool repair_monsters
 
bool repair_objects
 

マクロ定義詳解

◆ ANGBAND_2_8_1

#define ANGBAND_2_8_1

Angband 2.8.1以降から有効な処理分岐を定義

◆ FAKE_VER_EXTRA

#define FAKE_VER_EXTRA   7

ゲームのバージョン番号定義(エクストラ番号)

◆ FAKE_VER_MAJOR

#define FAKE_VER_MAJOR   12

ゲームのバージョン番号定義(メジャー番号 + 10)

◆ FAKE_VER_MINOR

#define FAKE_VER_MINOR   2

ゲームのバージョン番号定義(マイナー番号)

◆ FAKE_VER_PATCH

#define FAKE_VER_PATCH   1

ゲームのバージョン番号定義(パッチ番号)

◆ FAKE_VERSION

#define FAKE_VERSION   0

ゲームのバージョン番号定義 / "Program Version Number" of the game

本FAKE_VERSIONそのものは未使用である。Zangと整合性を合わせるための疑似的処理のためFAKE_VER_MAJORは実値-10が該当のバージョン番号となる。

FAKE_VER_MAJOR=1,2 were reserved for ZAngband version 1.x.x/2.x.x .
Program Version of Hengband version is
  "(FAKE_VER_MAJOR-10).(FAKE_VER_MINOR).(FAKE_VER_PATCH)".

◆ H_VER_EXTRA

#define H_VER_EXTRA   FAKE_VER_EXTRA

セーブファイル上のバージョン定義(エクストラ番号)

◆ H_VER_MAJOR

#define H_VER_MAJOR   (FAKE_VER_MAJOR-10)

セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later

当面FAKE_VER_*を参照しておく。

First three digits may be same as the Program Version.  But not
always same.  It means that newer version may preserves lower
compatibility with the older version.
For example, newer Hengband 1.4.4 creates savefiles marked with
Savefile Version 1.4.0.0 .  It means that Hengband 1.4.0 can load a
savefile of Hengband 1.4.4 (lower compatibility!).
Upper compatibility is always guaranteed.

セーブファイル上のバージョン定義(メジャー番号)

◆ H_VER_MINOR

#define H_VER_MINOR   FAKE_VER_MINOR

セーブファイル上のバージョン定義(マイナー番号)

◆ H_VER_PATCH

#define H_VER_PATCH   FAKE_VER_PATCH

セーブファイル上のバージョン定義(パッチ番号)

◆ INIT_ASSIGN

#define INIT_ASSIGN   0x04

◆ INIT_CREATE_DUNGEON

#define INIT_CREATE_DUNGEON   0x08

◆ INIT_NAME_ONLY

#define INIT_NAME_ONLY   0x01

◆ INIT_ONLY_BUILDINGS

#define INIT_ONLY_BUILDINGS   0x20

◆ INIT_ONLY_FEATURES

#define INIT_ONLY_FEATURES   0x10

◆ INIT_SHOW_TEXT

#define INIT_SHOW_TEXT   0x02

◆ IS_STABLE_VERSION

#define IS_STABLE_VERSION   (FAKE_VER_MINOR % 2 == 0 && FAKE_VER_EXTRA == 0)

バージョンが開発版が安定版かを返す

◆ SPECIAL_KEY_BUILDING

#define SPECIAL_KEY_BUILDING   254

◆ SPECIAL_KEY_QUEST

#define SPECIAL_KEY_QUEST   255

◆ SPECIAL_KEY_QUIT

#define SPECIAL_KEY_QUIT   252

◆ SPECIAL_KEY_STORE

#define SPECIAL_KEY_STORE   253

◆ VERSION_NAME

#define VERSION_NAME   "Hengband"

バリアント名称 / Name of the version/variant

◆ ZANGBAND

#define ZANGBAND

Zangband 以降から有効な処理分岐を定義

関数詳解

◆ close_game()

void close_game ( void  )

ゲーム終了処理 / Close up the current game (player may or may not be dead)

戻り値
なし
This function is called only from "main.c" and "signals.c".
呼び出し関係図:

◆ handle_stuff()

void handle_stuff ( void  )

全更新処理をチェックして処理していく Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window"

戻り値
なし
呼び出し関係図:

◆ play_game()

void play_game ( bool  new_game)

1ゲームプレイの主要ルーチン / Actually play a game

戻り値
なし
覚え書き
If the "new_game" parameter is true, then, after loading the savefile, we will commit suicide, if necessary, to allow the player to start a new game.

◆ prevent_turn_overflow()

void prevent_turn_overflow ( void  )

ターンのオーバーフローに対する対処

ターン及びターンを記録する変数をターンの限界の1日前まで巻き戻す.

戻り値
修正をかけた後のゲームターン

◆ turn_real()

s32b turn_real ( s32b  hoge)

ゲームターンからの実時間換算を行うための補正をかける

引数
hogeゲームターン

アンデッド種族は18:00からゲームを開始するので、この修正を予め行う。

戻り値
修正をかけた後のゲームターン

◆ update_output()

void update_output ( void  )
呼び出し関係図:

◆ update_playtime()

void update_playtime ( void  )

実ゲームプレイ時間を更新する

変数詳解

◆ ANGBAND_GRAF

concptr ANGBAND_GRAF

Hack – The special Angband "Graphics Suffix" This variable is used to choose an appropriate "graf-xxx" file

◆ ANGBAND_KEYBOARD

concptr ANGBAND_KEYBOARD

◆ ANGBAND_SYS

concptr ANGBAND_SYS

Hack – The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file

◆ can_save

bool can_save

◆ copyright

const concptr copyright[5]

コピーライト情報 / Hack – Link a copyright message into the executable

◆ init_flags

int init_flags

◆ now_message

COMMAND_CODE now_message

◆ repair_monsters

bool repair_monsters

◆ repair_objects

bool repair_objects