Hengband  2.2.1
マクロ定義 | 関数 | 変数
view-mainwindow.h ファイル
#include "feature.h"
view-mainwindow.h の依存先関係図:
被依存関係図:

[ソースコード]

マクロ定義

#define ROW_MAP   0
 
#define COL_MAP   12
 
#define PW_INVEN   0x00000001L
 サブウィンドウ描画フラグ: 所持品-装備品 / Display inven/equip [詳解]
 
#define PW_EQUIP   0x00000002L
 サブウィンドウ描画フラグ: 装備品-所持品 / Display equip/inven [詳解]
 
#define PW_SPELL   0x00000004L
 サブウィンドウ描画フラグ: 魔法一覧 / Display spell list [詳解]
 
#define PW_PLAYER   0x00000008L
 サブウィンドウ描画フラグ: プレイヤーのステータス / Display character [詳解]
 
#define PW_MONSTER_LIST   0x00000010L
 サブウィンドウ描画フラグ: 視界内モンスターの一覧 / Display monster list [詳解]
 
#define PW_MESSAGE   0x00000040L
 サブウィンドウ描画フラグ: メッセージログ / Display messages [詳解]
 
#define PW_OVERHEAD   0x00000080L
 サブウィンドウ描画フラグ: 周辺の光景 / Display overhead view [詳解]
 
#define PW_MONSTER   0x00000100L
 サブウィンドウ描画フラグ: モンスターの思い出 / Display monster recall [詳解]
 
#define PW_OBJECT   0x00000200L
 サブウィンドウ描画フラグ: アイテムの知識 / Display object recall [詳解]
 
#define PW_DUNGEON   0x00000400L
 サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view [詳解]
 
#define PW_SNAPSHOT   0x00000800L
 サブウィンドウ描画フラグ: 記念写真 / Display snap-shot [詳解]
 
#define PW_BORG_1   0x00004000L
 サブウィンドウ描画フラグ: ボーグメッセージ / Display borg messages [詳解]
 
#define PW_BORG_2   0x00008000L
 サブウィンドウ描画フラグ: ボーグステータス / Display borg status [詳解]
 
#define PR_MISC   0x00000001L
 再描画フラグ: 種族と職業 / Display Race/Class [詳解]
 
#define PR_TITLE   0x00000002L
 再描画フラグ: 称号 / Display Title [詳解]
 
#define PR_LEV   0x00000004L
 再描画フラグ: レベル / Display Level [詳解]
 
#define PR_EXP   0x00000008L
 再描画フラグ: 経験値 / Display Experience [詳解]
 
#define PR_STATS   0x00000010L
 再描画フラグ: ステータス / Display Stats [詳解]
 
#define PR_ARMOR   0x00000020L
 再描画フラグ: AC / Display Armor [詳解]
 
#define PR_HP   0x00000040L
 再描画フラグ: HP / Display Hitpoints [詳解]
 
#define PR_MANA   0x00000080L
 再描画フラグ: MP / Display Mana [詳解]
 
#define PR_GOLD   0x00000100L
 再描画フラグ: 所持金 / Display Gold [詳解]
 
#define PR_DEPTH   0x00000200L
 再描画フラグ: ダンジョンの階 / Display Depth [詳解]
 
#define PR_EQUIPPY   0x00000400L
 再描画フラグ: 装備シンボル / Display equippy chars [詳解]
 
#define PR_HEALTH   0x00000800L
 再描画フラグ: モンスターのステータス / Display Health Bar [詳解]
 
#define PR_CUT   0x00001000L
 再描画フラグ: 負傷度 / Display Extra (Cut) [詳解]
 
#define PR_STUN   0x00002000L
 再描画フラグ: 朦朧度 / Display Extra (Stun) [詳解]
 
#define PR_HUNGER   0x00004000L
 再描画フラグ: 空腹度 / Display Extra (Hunger) [詳解]
 
#define PR_STATUS   0x00008000L
 再描画フラグ: プレイヤーの付与状態 / Display Status Bar [詳解]
 
#define PR_XXX0   0x00010000L
 (unused) [詳解]
 
#define PR_UHEALTH   0x00020000L
 再描画フラグ: ペットのステータス / Display Uma Health Bar [詳解]
 
#define PR_XXX1   0x00040000L
 (unused) [詳解]
 
#define PR_XXX2   0x00080000L
 (unused) [詳解]
 
#define PR_STATE   0x00100000L
 再描画フラグ: プレイヤーの行動状態 / Display Extra (State) [詳解]
 
#define PR_SPEED   0x00200000L
 再描画フラグ: 加速 / Display Extra (Speed) [詳解]
 
#define PR_STUDY   0x00400000L
 再描画フラグ: 学習 / Display Extra (Study) [詳解]
 
#define PR_IMITATION   0x00800000L
 再描画フラグ: ものまね / Display Extra (Imitation) [詳解]
 
#define PR_EXTRA   0x01000000L
 再描画フラグ: 拡張ステータス全体 / Display Extra Info [詳解]
 
#define PR_BASIC   0x02000000L
 再描画フラグ: 基本ステータス全体 / Display Basic Info [詳解]
 
#define PR_MAP   0x04000000L
 再描画フラグ: ゲームマップ / Display Map [詳解]
 
#define PR_WIPE   0x08000000L
 再描画フラグ: 画面消去 / Hack – Total Redraw [詳解]
 
#define panel_contains(Y, X)
 

関数

void get_screen_size (TERM_LEN *wid_p, TERM_LEN *hgt_p)
 現在のコンソール表示の縦横を返す。 / Get term size and calculate screen size [詳解]
 
int panel_col_of (int col)
 
void apply_default_feat_lighting (TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_char[F_LIT_MAX])
 調査中 [詳解]
 
void prt_map (void)
 
void map_info (POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
 Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location [詳解]
 
void display_map (floor_type *floor_ptr, int *cy, int *cx)
 
void do_cmd_view_map (void)
 
void health_track (MONSTER_IDX m_idx)
 
void prt_time (void)
 ゲーム時刻を表示する / Print time [詳解]
 
concptr map_name (void)
 現在のマップ名を返す / [詳解]
 
void print_monster_list (TERM_LEN x, TERM_LEN y, TERM_LEN max_lines)
 モンスターの出現リストを表示する / Print monster info in line [詳解]
 
void move_cursor_relative (int row, int col)
 
void prt_path (POSITION y, POSITION x)
 
void monster_race_track (MONRACE_IDX r_idx)
 
void object_kind_track (KIND_OBJECT_IDX k_idx)
 
void resize_map (void)
 コンソールのリサイズに合わせてマップを再描画する / Map resizing whenever the main term changes size [詳解]
 
void redraw_window (void)
 コンソールを再描画する / Redraw a term when it is resized [詳解]
 
bool change_panel (POSITION dy, POSITION dx)
 フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン) [詳解]
 
void window_stuff (void)
 p_ptr->window のフラグに応じた更新をまとめて行う / Handle "p_ptr->window" [詳解]
 
void redraw_stuff (void)
 p_ptr->redraw のフラグに応じた更新をまとめて行う / Handle "p_ptr->redraw" [詳解]
 

変数

POSITION panel_row_min
 
POSITION panel_row_max
 
POSITION panel_col_min
 
POSITION panel_col_max
 
POSITION panel_col_prt
 
POSITION panel_row_prt
 

マクロ定義詳解

◆ COL_MAP

#define COL_MAP   12

◆ panel_contains

#define panel_contains (   Y,
 
)
値:
(((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \
((X) >= panel_col_min) && ((X) <= panel_col_max))
POSITION panel_row_max
Definition: view-mainwindow.c:61
POSITION panel_col_max
Definition: view-mainwindow.c:62
POSITION panel_row_min
Definition: view-mainwindow.c:61
POSITION panel_col_min
Definition: view-mainwindow.c:62

◆ PR_ARMOR

#define PR_ARMOR   0x00000020L

再描画フラグ: AC / Display Armor

◆ PR_BASIC

#define PR_BASIC   0x02000000L

再描画フラグ: 基本ステータス全体 / Display Basic Info

◆ PR_CUT

#define PR_CUT   0x00001000L

再描画フラグ: 負傷度 / Display Extra (Cut)

◆ PR_DEPTH

#define PR_DEPTH   0x00000200L

再描画フラグ: ダンジョンの階 / Display Depth

◆ PR_EQUIPPY

#define PR_EQUIPPY   0x00000400L

再描画フラグ: 装備シンボル / Display equippy chars

◆ PR_EXP

#define PR_EXP   0x00000008L

再描画フラグ: 経験値 / Display Experience

◆ PR_EXTRA

#define PR_EXTRA   0x01000000L

再描画フラグ: 拡張ステータス全体 / Display Extra Info

◆ PR_GOLD

#define PR_GOLD   0x00000100L

再描画フラグ: 所持金 / Display Gold

◆ PR_HEALTH

#define PR_HEALTH   0x00000800L

再描画フラグ: モンスターのステータス / Display Health Bar

◆ PR_HP

#define PR_HP   0x00000040L

再描画フラグ: HP / Display Hitpoints

◆ PR_HUNGER

#define PR_HUNGER   0x00004000L

再描画フラグ: 空腹度 / Display Extra (Hunger)

◆ PR_IMITATION

#define PR_IMITATION   0x00800000L

再描画フラグ: ものまね / Display Extra (Imitation)

◆ PR_LEV

#define PR_LEV   0x00000004L

再描画フラグ: レベル / Display Level

◆ PR_MANA

#define PR_MANA   0x00000080L

再描画フラグ: MP / Display Mana

◆ PR_MAP

#define PR_MAP   0x04000000L

再描画フラグ: ゲームマップ / Display Map

◆ PR_MISC

#define PR_MISC   0x00000001L

再描画フラグ: 種族と職業 / Display Race/Class

◆ PR_SPEED

#define PR_SPEED   0x00200000L

再描画フラグ: 加速 / Display Extra (Speed)

◆ PR_STATE

#define PR_STATE   0x00100000L

再描画フラグ: プレイヤーの行動状態 / Display Extra (State)

◆ PR_STATS

#define PR_STATS   0x00000010L

再描画フラグ: ステータス / Display Stats

◆ PR_STATUS

#define PR_STATUS   0x00008000L

再描画フラグ: プレイヤーの付与状態 / Display Status Bar

◆ PR_STUDY

#define PR_STUDY   0x00400000L

再描画フラグ: 学習 / Display Extra (Study)

◆ PR_STUN

#define PR_STUN   0x00002000L

再描画フラグ: 朦朧度 / Display Extra (Stun)

◆ PR_TITLE

#define PR_TITLE   0x00000002L

再描画フラグ: 称号 / Display Title

◆ PR_UHEALTH

#define PR_UHEALTH   0x00020000L

再描画フラグ: ペットのステータス / Display Uma Health Bar

◆ PR_WIPE

#define PR_WIPE   0x08000000L

再描画フラグ: 画面消去 / Hack – Total Redraw

◆ PR_XXX0

#define PR_XXX0   0x00010000L

(unused)

◆ PR_XXX1

#define PR_XXX1   0x00040000L

(unused)

◆ PR_XXX2

#define PR_XXX2   0x00080000L

(unused)

◆ PW_BORG_1

#define PW_BORG_1   0x00004000L

サブウィンドウ描画フラグ: ボーグメッセージ / Display borg messages

◆ PW_BORG_2

#define PW_BORG_2   0x00008000L

サブウィンドウ描画フラグ: ボーグステータス / Display borg status

◆ PW_DUNGEON

#define PW_DUNGEON   0x00000400L

サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view

◆ PW_EQUIP

#define PW_EQUIP   0x00000002L

サブウィンドウ描画フラグ: 装備品-所持品 / Display equip/inven

◆ PW_INVEN

#define PW_INVEN   0x00000001L

サブウィンドウ描画フラグ: 所持品-装備品 / Display inven/equip

◆ PW_MESSAGE

#define PW_MESSAGE   0x00000040L

サブウィンドウ描画フラグ: メッセージログ / Display messages

◆ PW_MONSTER

#define PW_MONSTER   0x00000100L

サブウィンドウ描画フラグ: モンスターの思い出 / Display monster recall

◆ PW_MONSTER_LIST

#define PW_MONSTER_LIST   0x00000010L

サブウィンドウ描画フラグ: 視界内モンスターの一覧 / Display monster list

◆ PW_OBJECT

#define PW_OBJECT   0x00000200L

サブウィンドウ描画フラグ: アイテムの知識 / Display object recall

◆ PW_OVERHEAD

#define PW_OVERHEAD   0x00000080L

サブウィンドウ描画フラグ: 周辺の光景 / Display overhead view

◆ PW_PLAYER

#define PW_PLAYER   0x00000008L

サブウィンドウ描画フラグ: プレイヤーのステータス / Display character

◆ PW_SNAPSHOT

#define PW_SNAPSHOT   0x00000800L

サブウィンドウ描画フラグ: 記念写真 / Display snap-shot

◆ PW_SPELL

#define PW_SPELL   0x00000004L

サブウィンドウ描画フラグ: 魔法一覧 / Display spell list

◆ ROW_MAP

#define ROW_MAP   0

関数詳解

◆ apply_default_feat_lighting()

void apply_default_feat_lighting ( TERM_COLOR  f_attr[F_LIT_MAX],
SYMBOL_CODE  f_char[F_LIT_MAX] 
)

調査中

todo:
コメントを付加すること

◆ change_panel()

bool change_panel ( POSITION  dy,
POSITION  dx 
)

フォーカスを当てるべきマップ描画の基準座標を指定する(サブルーチン)

引数
dy変更先のフロアY座標
dx変更先のフロアX座標 Handle a request to change the current panel Return TRUE if the panel was changed. Also used in do_cmd_locate
戻り値
実際に再描画が必要だった場合TRUEを返す
呼び出し関係図:

◆ display_map()

void display_map ( floor_type floor_ptr,
int *  cy,
int *  cx 
)
呼び出し関係図:

◆ do_cmd_view_map()

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

◆ get_screen_size()

void get_screen_size ( TERM_LEN wid_p,
TERM_LEN hgt_p 
)

現在のコンソール表示の縦横を返す。 / Get term size and calculate screen size

引数
wid_pコンソールの表示幅文字数を返す
hgt_pコンソールの表示行数を返す
戻り値
なし
呼び出し関係図:

◆ health_track()

void health_track ( MONSTER_IDX  m_idx)

◆ map_info()

void map_info ( POSITION  y,
POSITION  x,
TERM_COLOR ap,
SYMBOL_CODE cp,
TERM_COLOR tap,
SYMBOL_CODE tcp 
)

Mコマンドによる縮小マップの表示を行う / Extract the attr/char to display at the given (legal) map location

Basically, we "paint" the chosen attr/char in several passes, starting
with any known "terrain features" (defaulting to darkness), then adding
any known "objects", and finally, adding any known "monsters". This
is not the fastest method but since most of the calls to this function
are made for grids with no monsters or objects, it is fast enough.

Note that this function, if used on the grid containing the "player",
will return the attr/char of the grid underneath the player, and not
the actual player attr/char itself, allowing a lot of optimization
in various "display" functions.

Note that the "zero" entry in the feature/object/monster arrays are
used to provide "special" attr/char codes, with "monster zero" being
used for the player attr/char, "object zero" being used for the "stack"
attr/char, and "feature zero" being used for the "nothing" attr/char,
though this function makes use of only "feature zero".

Note that monsters can have some "special" flags, including "ATTR_MULTI",
which means their color changes, and "ATTR_CLEAR", which means they take
the color of whatever is under them, and "CHAR_CLEAR", which means that
they take the symbol of whatever is under them. Technically, the flag
"CHAR_MULTI" is supposed to indicate that a monster looks strange when
examined, but this flag is currently ignored.

Currently, we do nothing with multi-hued objects, because there are
not any. If there were, they would have to set "shimmer_objects"
when they were created, and then new "shimmer" code in "dungeon.c"
would have to be created handle the "shimmer" effect, and the code
in "p_ptr->current_floor_ptr->grid_array.c" would have to be updated to create the shimmer effect.

Note the effects of hallucination. Objects always appear as random
"objects", monsters as random "monsters", and normal grids occasionally
appear as random "monsters" or "objects", but note that these random
"monsters" and "objects" are really just "colored ascii symbols".

Note that "floors" and "invisible traps" (and "zero" features) are
drawn as "floors" using a special check for optimization purposes,
and these are the only features which get drawn using the special
lighting effects activated by "view_special_lite".

Note the use of the "mimic" field in the "terrain feature" processing,
which allows any feature to "pretend" to be another feature. This is
used to "hide" secret doors, and to make all "doors" appear the same,
and all "walls" appear the same, and "hidden" treasure stay hidden.
It is possible to use this field to make a feature "look" like a floor,
but the "special lighting effects" for floors will not be used.

Note the use of the new "terrain feature" information. Note that the
assumption that all interesting "objects" and "terrain features" are
memorized allows extremely optimized processing below. Note the use
of separate flags on objects to mark them as memorized allows a grid
to have memorized "terrain" without granting knowledge of any object
which may appear in that grid.

Note the efficient code used to determine if a "floor" grid is
"memorized" or "viewable" by the player, where the test for the
grid being "viewable" is based on the facts that (1) the grid
must be "lit" (torch-lit or perma-lit), (2) the grid must be in
line of sight, and (3) the player must not be blind, and uses the
assumption that all torch-lit grids are in line of sight.

Note that floors (and invisible traps) are the only grids which are
not memorized when seen, so only these grids need to check to see if
the grid is "viewable" to the player (if it is not memorized). Since
most non-memorized grids are in fact walls, this induces massive
efficiency, at the cost of forcing the memorization of non-floor
grids when they are first seen. Note that "invisible traps" are
always treated exactly like "floors", which prevents "cheating".

Note the "special lighting effects" which can be activated for floor
grids using the "view_special_lite" option (for "white" floor grids),
causing certain grids to be displayed using special colors. If the
player is "blind", we will use "dark gray", else if the grid is lit
by the torch, and the "view_yellow_lite" option is set, we will use
"yellow", else if the grid is "dark", we will use "dark gray", else
if the grid is not "viewable", and the "view_bright_lite" option is
set, and the we will use "slate" (gray). We will use "white" for all
other cases, in particular, for illuminated viewable floor grids.

Note the "special lighting effects" which can be activated for wall
grids using the "view_granite_lite" option (for "white" wall grids),
causing certain grids to be displayed using special colors. If the
player is "blind", we will use "dark gray", else if the grid is lit
by the torch, and the "view_yellow_lite" option is set, we will use
"yellow", else if the "view_bright_lite" option is set, and the grid
is not "viewable", or is "dark", or is glowing, but not when viewed
from the player's current location, we will use "slate" (gray). We
will use "white" for all other cases, in particular, for correctly
illuminated viewable wall grids.

Note that, when "view_granite_lite" is set, we use an inline version
of the "player_can_see_bold()" function to check the "viewability" of
grids when the "view_bright_lite" option is set, and we do NOT use
any special colors for "dark" wall grids, since this would allow the
player to notice the walls of illuminated rooms from a hallway that
happened to run beside the room. The alternative, by the way, would
be to prevent the generation of hallways next to rooms, but this
would still allow problems when digging towards a room.

Note that bizarre things must be done when the "attr" and/or "char"
codes have the "high-bit" set, since these values are used to encode
various "special" pictures in some versions, and certain situations,
such as "multi-hued" or "clear" monsters, cause the attr/char codes
to be "scrambled" in various ways.

Note that eventually we may use the "&" symbol for embedded treasure,
and use the "*" symbol to indicate multiple objects, though this will
have to wait for Angband 2.8.0 or later. Note that currently, this
is not important, since only one object or terrain feature is allowed
in each grid. If needed, "k_info[0]" will hold the "stack" attr/char.

Note the assumption that doing "x_ptr = &x_info[x]" plus a few of
"x_ptr->xxx", is quicker than "x_info[x].xxx", if this is incorrect
then a whole lot of code should be changed... XXX XXX

呼び出し関係図:

◆ map_name()

concptr map_name ( void  )

現在のマップ名を返す /

戻り値
マップ名の文字列参照ポインタ

◆ monster_race_track()

void monster_race_track ( MONRACE_IDX  r_idx)

◆ move_cursor_relative()

void move_cursor_relative ( int  row,
int  col 
)
呼び出し関係図:

◆ object_kind_track()

void object_kind_track ( KIND_OBJECT_IDX  k_idx)

◆ panel_col_of()

int panel_col_of ( int  col)

◆ print_monster_list()

void print_monster_list ( TERM_LEN  x,
TERM_LEN  y,
TERM_LEN  max_lines 
)

モンスターの出現リストを表示する / Print monster info in line

引数
x表示列
y表示行
max_lines最大何行描画するか
呼び出し関係図:

◆ prt_map()

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

◆ prt_path()

void prt_path ( POSITION  y,
POSITION  x 
)
呼び出し関係図:

◆ prt_time()

void prt_time ( void  )

ゲーム時刻を表示する / Print time

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

◆ redraw_stuff()

void redraw_stuff ( void  )

p_ptr->redraw のフラグに応じた更新をまとめて行う / Handle "p_ptr->redraw"

戻り値
なし

更新処理の対象はゲーム中の全描画処理

呼び出し関係図:

◆ redraw_window()

void redraw_window ( void  )

コンソールを再描画する / Redraw a term when it is resized

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

◆ resize_map()

void resize_map ( void  )

コンソールのリサイズに合わせてマップを再描画する / Map resizing whenever the main term changes size

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

◆ window_stuff()

void window_stuff ( void  )

p_ptr->window のフラグに応じた更新をまとめて行う / Handle "p_ptr->window"

戻り値
なし

更新処理の対象はサブウィンドウ全般

呼び出し関係図:

変数詳解

◆ panel_col_max

POSITION panel_col_max

◆ panel_col_min

POSITION panel_col_min

◆ panel_col_prt

POSITION panel_col_prt

◆ panel_row_max

POSITION panel_row_max

◆ panel_row_min

POSITION panel_row_min

◆ panel_row_prt

POSITION panel_row_prt