Hengband  2.1.4
データ構造 | マクロ定義 | 関数 | 変数
util.c ファイル
#include "angband.h"
util.c の依存先関係図:

データ構造

struct  menu_naiyou
 
struct  special_menu_naiyou
 

マクロ定義

#define O_BINARY   0
 
#define MENU_CLASS   1
 
#define MENU_WILD   2
 
#define REPEAT_MAX   20
 
#define CUTOFF   4
 

関数

struct passwd * getpwuid (uid_t uid)
 
struct passwd * getpwnam (const char *name)
 
void user_name (char *buf, int id)
 
errr path_parse (char *buf, int max, cptr file)
 
static errr path_temp (char *buf, int max)
 
errr path_build (char *buf, int max, cptr path, cptr file)
 
FILE * my_fopen (cptr file, cptr mode)
 
errr my_fclose (FILE *fff)
 
FILE * my_fopen_temp (char *buf, int max)
 
errr my_fgets (FILE *fff, char *buf, huge n)
 
errr my_fputs (FILE *fff, cptr buf, huge n)
 
errr fd_kill (cptr file)
 
errr fd_move (cptr file, cptr what)
 
errr fd_copy (cptr file, cptr what)
 
int fd_make (cptr file, int mode)
 
int fd_open (cptr file, int flags)
 
errr fd_lock (int fd, int what)
 
errr fd_seek (int fd, huge n)
 
errr fd_chop (int fd, huge n)
 
errr fd_read (int fd, char *buf, huge n)
 
errr fd_write (int fd, cptr buf, huge n)
 
errr fd_close (int fd)
 
void move_cursor (int row, int col)
 
static char octify (uint i)
 
static char hexify (uint i)
 
static int deoct (char c)
 
static int dehex (char c)
 
static int my_stricmp (cptr a, cptr b)
 
static int my_strnicmp (cptr a, cptr b, int n)
 
static void trigger_text_to_ascii (char **bufptr, cptr *strptr)
 
void text_to_ascii (char *buf, cptr str)
 
static bool trigger_ascii_to_text (char **bufptr, cptr *strptr)
 
void ascii_to_text (char *buf, cptr str)
 
sint macro_find_exact (cptr pat)
 
static sint macro_find_check (cptr pat)
 
static sint macro_find_maybe (cptr pat)
 
static sint macro_find_ready (cptr pat)
 
errr macro_add (cptr pat, cptr act)
 
void flush (void)
 
void bell (void)
 
void sound (int val)
 
errr play_music (int type, int val)
 
void select_floor_music ()
 
static char inkey_aux (void)
 
static void forget_macro_action (void)
 
char inkey (void)
 
void quark_init (void)
 
s16b quark_add (cptr str)
 
cptr quark_str (s16b i)
 
s32b message_num (void)
 保存中の過去ゲームメッセージの数を返す。 / How many messages are "available"? [詳解]
 
cptr message_str (int age)
 過去のゲームメッセージを返す。 / Recall the "text" of a saved message @params age メッセージの世代 [詳解]
 
void message_add (cptr str)
 ゲームメッセージをログに追加する。 / Add a new message, with great efficiency @params str 保存したいメッセージ [詳解]
 
static void msg_flush (int x)
 
void msg_print (cptr msg)
 
void msg_print_wizard (int cheat_type, cptr msg)
 
void screen_save (void)
 
void screen_load (void)
 
void msg_format (cptr fmt,...)
 
void msg_format_wizard (int cheat_type, cptr fmt,...)
 
void c_put_str (byte attr, cptr str, int row, int col)
 
void put_str (cptr str, int row, int col)
 
void c_prt (byte attr, cptr str, int row, int col)
 
void prt (cptr str, int row, int col)
 
void c_roff (byte a, cptr str)
 
void roff (cptr str)
 
void clear_from (int row)
 
bool askfor_aux (char *buf, int len, bool numpad_cursor)
 
bool askfor (char *buf, int len)
 
bool get_string (cptr prompt, char *buf, int len)
 
bool get_check (cptr prompt)
 
bool get_check_strict (cptr prompt, int mode)
 
bool get_com (cptr prompt, char *command, bool z_escape)
 
s16b get_quantity (cptr prompt, int max)
 
void pause_line (int row)
 
static char inkey_from_menu (void)
 
void request_command (int shopping)
 
bool is_a_vowel (int ch)
 
int get_keymap_dir (char ch)
 
void repeat_push (int what)
 
bool repeat_pull (int *what)
 
void repeat_check (void)
 
static void swap (tag_type *a, tag_type *b)
 
static void InsertionSort (tag_type elements[], int number)
 
static tag_type median3 (tag_type elements[], int left, int right)
 
static void quicksort (tag_type elements[], int left, int right)
 
void tag_sort (tag_type elements[], int number)
 
void build_gamma_table (int gamma)
 
errr type_string (cptr str, uint len)
 
void roff_to_buf (cptr str, int maxlen, char *tbuf, size_t bufsize)
 
size_t my_strcpy (char *buf, const char *src, size_t bufsize)
 
size_t my_strcat (char *buf, const char *src, size_t bufsize)
 
char * my_strstr (const char *haystack, const char *needle)
 
char * my_strchr (const char *ptr, char ch)
 
void str_tolower (char *str)
 
int inkey_special (bool numpad_cursor)
 

変数

static int num_more = 0
 
static char inkey_macro_trigger_string [1024]
 
static bool macro__use [256]
 
static bool parse_macro = FALSE
 
static bool parse_under = FALSE
 
static cptr inkey_next = NULL
 
static int screen_depth = 0
 
static char request_command_buffer [256]
 
menu_naiyou menu_info [10][10]
 
special_menu_naiyou special_menu_info []
 
static int repeat__cnt = 0
 
static int repeat__idx = 0
 
static int repeat__key [REPEAT_MAX]
 
byte gamma_table [256]
 
static s16b gamma_helper [256]
 

マクロ定義詳解

◆ CUTOFF

#define CUTOFF   4

◆ MENU_CLASS

#define MENU_CLASS   1

◆ MENU_WILD

#define MENU_WILD   2

◆ O_BINARY

#define O_BINARY   0

◆ REPEAT_MAX

#define REPEAT_MAX   20

関数詳解

◆ ascii_to_text()

void ascii_to_text ( char *  buf,
cptr  str 
)
呼び出し関係図:

◆ askfor()

bool askfor ( char *  buf,
int  len 
)
呼び出し関係図:

◆ askfor_aux()

bool askfor_aux ( char *  buf,
int  len,
bool  numpad_cursor 
)
呼び出し関係図:

◆ bell()

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

◆ build_gamma_table()

void build_gamma_table ( int  gamma)

◆ c_prt()

void c_prt ( byte  attr,
cptr  str,
int  row,
int  col 
)
呼び出し関係図:

◆ c_put_str()

void c_put_str ( byte  attr,
cptr  str,
int  row,
int  col 
)
呼び出し関係図:

◆ c_roff()

void c_roff ( byte  a,
cptr  str 
)
呼び出し関係図:

◆ clear_from()

void clear_from ( int  row)
呼び出し関係図:

◆ dehex()

static int dehex ( char  c)
static
被呼び出し関係図:

◆ deoct()

static int deoct ( char  c)
static
被呼び出し関係図:

◆ fd_chop()

errr fd_chop ( int  fd,
huge  n 
)

◆ fd_close()

errr fd_close ( int  fd)

◆ fd_copy()

errr fd_copy ( cptr  file,
cptr  what 
)
呼び出し関係図:

◆ fd_kill()

errr fd_kill ( cptr  file)
呼び出し関係図:

◆ fd_lock()

errr fd_lock ( int  fd,
int  what 
)

◆ fd_make()

int fd_make ( cptr  file,
int  mode 
)
呼び出し関係図:

◆ fd_move()

errr fd_move ( cptr  file,
cptr  what 
)
呼び出し関係図:

◆ fd_open()

int fd_open ( cptr  file,
int  flags 
)
呼び出し関係図:

◆ fd_read()

errr fd_read ( int  fd,
char *  buf,
huge  n 
)

◆ fd_seek()

errr fd_seek ( int  fd,
huge  n 
)

◆ fd_write()

errr fd_write ( int  fd,
cptr  buf,
huge  n 
)

◆ flush()

void flush ( void  )

◆ forget_macro_action()

static void forget_macro_action ( void  )
static
呼び出し関係図:
被呼び出し関係図:

◆ get_check()

bool get_check ( cptr  prompt)
呼び出し関係図:

◆ get_check_strict()

bool get_check_strict ( cptr  prompt,
int  mode 
)
呼び出し関係図:

◆ get_com()

bool get_com ( cptr  prompt,
char *  command,
bool  z_escape 
)
呼び出し関係図:

◆ get_keymap_dir()

int get_keymap_dir ( char  ch)

◆ get_quantity()

s16b get_quantity ( cptr  prompt,
int  max 
)
呼び出し関係図:

◆ get_string()

bool get_string ( cptr  prompt,
char *  buf,
int  len 
)
呼び出し関係図:

◆ getpwnam()

struct passwd* getpwnam ( const char *  name)
被呼び出し関係図:

◆ getpwuid()

struct passwd* getpwuid ( uid_t  uid)
被呼び出し関係図:

◆ hexify()

static char hexify ( uint  i)
static
被呼び出し関係図:

◆ inkey()

char inkey ( void  )
呼び出し関係図:

◆ inkey_aux()

static char inkey_aux ( void  )
static
呼び出し関係図:
被呼び出し関係図:

◆ inkey_from_menu()

static char inkey_from_menu ( void  )
static
呼び出し関係図:
被呼び出し関係図:

◆ inkey_special()

int inkey_special ( bool  numpad_cursor)
呼び出し関係図:

◆ InsertionSort()

static void InsertionSort ( tag_type  elements[],
int  number 
)
static
被呼び出し関係図:

◆ is_a_vowel()

bool is_a_vowel ( int  ch)

◆ macro_add()

errr macro_add ( cptr  pat,
cptr  act 
)
呼び出し関係図:

◆ macro_find_check()

static sint macro_find_check ( cptr  pat)
static
呼び出し関係図:
被呼び出し関係図:

◆ macro_find_exact()

sint macro_find_exact ( cptr  pat)
呼び出し関係図:

◆ macro_find_maybe()

static sint macro_find_maybe ( cptr  pat)
static
呼び出し関係図:
被呼び出し関係図:

◆ macro_find_ready()

static sint macro_find_ready ( cptr  pat)
static
呼び出し関係図:
被呼び出し関係図:

◆ median3()

static tag_type median3 ( tag_type  elements[],
int  left,
int  right 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ message_add()

void message_add ( cptr  str)

ゲームメッセージをログに追加する。 / Add a new message, with great efficiency @params str 保存したいメッセージ

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

◆ message_num()

s32b message_num ( void  )

保存中の過去ゲームメッセージの数を返す。 / How many messages are "available"?

戻り値
残っているメッセージの数

◆ message_str()

cptr message_str ( int  age)

過去のゲームメッセージを返す。 / Recall the "text" of a saved message @params age メッセージの世代

戻り値
メッセージの文字列ポインタ
呼び出し関係図:

◆ move_cursor()

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

◆ msg_flush()

static void msg_flush ( int  x)
static
呼び出し関係図:
被呼び出し関係図:

◆ msg_format()

void msg_format ( cptr  fmt,
  ... 
)
呼び出し関係図:

◆ msg_format_wizard()

void msg_format_wizard ( int  cheat_type,
cptr  fmt,
  ... 
)
呼び出し関係図:

◆ msg_print()

void msg_print ( cptr  msg)
呼び出し関係図:

◆ msg_print_wizard()

void msg_print_wizard ( int  cheat_type,
cptr  msg 
)
呼び出し関係図:

◆ my_fclose()

errr my_fclose ( FILE *  fff)

◆ my_fgets()

errr my_fgets ( FILE *  fff,
char *  buf,
huge  n 
)

◆ my_fopen()

FILE* my_fopen ( cptr  file,
cptr  mode 
)
呼び出し関係図:

◆ my_fopen_temp()

FILE* my_fopen_temp ( char *  buf,
int  max 
)
呼び出し関係図:

◆ my_fputs()

errr my_fputs ( FILE *  fff,
cptr  buf,
huge  n 
)

◆ my_strcat()

size_t my_strcat ( char *  buf,
const char *  src,
size_t  bufsize 
)
呼び出し関係図:

◆ my_strchr()

char* my_strchr ( const char *  ptr,
char  ch 
)

◆ my_strcpy()

size_t my_strcpy ( char *  buf,
const char *  src,
size_t  bufsize 
)

◆ my_stricmp()

static int my_stricmp ( cptr  a,
cptr  b 
)
static
被呼び出し関係図:

◆ my_strnicmp()

static int my_strnicmp ( cptr  a,
cptr  b,
int  n 
)
static
被呼び出し関係図:

◆ my_strstr()

char* my_strstr ( const char *  haystack,
const char *  needle 
)

◆ octify()

static char octify ( uint  i)
static
被呼び出し関係図:

◆ path_build()

errr path_build ( char *  buf,
int  max,
cptr  path,
cptr  file 
)
呼び出し関係図:

◆ path_parse()

errr path_parse ( char *  buf,
int  max,
cptr  file 
)
呼び出し関係図:

◆ path_temp()

static errr path_temp ( char *  buf,
int  max 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ pause_line()

void pause_line ( int  row)
呼び出し関係図:

◆ play_music()

errr play_music ( int  type,
int  val 
)
呼び出し関係図:

◆ prt()

void prt ( cptr  str,
int  row,
int  col 
)
呼び出し関係図:

◆ put_str()

void put_str ( cptr  str,
int  row,
int  col 
)
呼び出し関係図:

◆ quark_add()

s16b quark_add ( cptr  str)
呼び出し関係図:

◆ quark_init()

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

◆ quark_str()

cptr quark_str ( s16b  i)

◆ quicksort()

static void quicksort ( tag_type  elements[],
int  left,
int  right 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ repeat_check()

void repeat_check ( void  )
呼び出し関係図:
被呼び出し関係図:

◆ repeat_pull()

bool repeat_pull ( int *  what)
被呼び出し関係図:

◆ repeat_push()

void repeat_push ( int  what)
被呼び出し関係図:

◆ request_command()

void request_command ( int  shopping)
呼び出し関係図:

◆ roff()

void roff ( cptr  str)
呼び出し関係図:

◆ roff_to_buf()

void roff_to_buf ( cptr  str,
int  maxlen,
char *  tbuf,
size_t  bufsize 
)

◆ screen_load()

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

◆ screen_save()

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

◆ select_floor_music()

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

◆ sound()

void sound ( int  val)
呼び出し関係図:

◆ str_tolower()

void str_tolower ( char *  str)

◆ swap()

static void swap ( tag_type a,
tag_type b 
)
static
被呼び出し関係図:

◆ tag_sort()

void tag_sort ( tag_type  elements[],
int  number 
)
呼び出し関係図:
被呼び出し関係図:

◆ text_to_ascii()

void text_to_ascii ( char *  buf,
cptr  str 
)
呼び出し関係図:

◆ trigger_ascii_to_text()

static bool trigger_ascii_to_text ( char **  bufptr,
cptr strptr 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ trigger_text_to_ascii()

static void trigger_text_to_ascii ( char **  bufptr,
cptr strptr 
)
static
呼び出し関係図:
被呼び出し関係図:

◆ type_string()

errr type_string ( cptr  str,
uint  len 
)
呼び出し関係図:

◆ user_name()

void user_name ( char *  buf,
int  id 
)
呼び出し関係図:
被呼び出し関係図:

変数詳解

◆ gamma_helper

s16b gamma_helper[256]
static
初期値:
=
{
0,-1420,-1242,-1138,-1065,-1007,-961,-921,-887,-857,-830,-806,-783,-762,-744,-726,
-710,-694,-679,-666,-652,-640,-628,-617,-606,-596,-586,-576,-567,-577,-549,-541,
-532,-525,-517,-509,-502,-495,-488,-482,-475,-469,-463,-457,-451,-455,-439,-434,
-429,-423,-418,-413,-408,-403,-398,-394,-389,-385,-380,-376,-371,-367,-363,-359,
-355,-351,-347,-343,-339,-336,-332,-328,-325,-321,-318,-314,-311,-308,-304,-301,
-298,-295,-291,-288,-285,-282,-279,-276,-273,-271,-268,-265,-262,-259,-257,-254,
-251,-248,-246,-243,-241,-238,-236,-233,-231,-228,-226,-223,-221,-219,-216,-214,
-212,-209,-207,-205,-203,-200,-198,-196,-194,-192,-190,-188,-186,-184,-182,-180,
-178,-176,-174,-172,-170,-168,-166,-164,-162,-160,-158,-156,-155,-153,-151,-149,
-147,-146,-144,-142,-140,-139,-137,-135,-134,-132,-130,-128,-127,-125,-124,-122,
-120,-119,-117,-116,-114,-112,-111,-109,-108,-106,-105,-103,-102,-100,-99,-97,
-96,-95,-93,-92,-90,-89,-87,-86,-85,-83,-82,-80,-79,-78,-76,-75,
-74,-72,-71,-70,-68,-67,-66,-65,-63,-62,-61,-59,-58,-57,-56,-54,
-53,-52,-51,-50,-48,-47,-46,-45,-44,-42,-41,-40,-39,-38,-37,-35,
-34,-33,-32,-31,-30,-29,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,
-17,-16,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1
}

◆ gamma_table

byte gamma_table[256]

◆ inkey_macro_trigger_string

char inkey_macro_trigger_string[1024]
static

◆ inkey_next

cptr inkey_next = NULL
static

◆ macro__use

bool macro__use[256]
static

◆ menu_info

menu_naiyou menu_info[10][10]

◆ num_more

int num_more = 0
static

◆ parse_macro

bool parse_macro = FALSE
static

◆ parse_under

bool parse_under = FALSE
static

◆ repeat__cnt

int repeat__cnt = 0
static

◆ repeat__idx

int repeat__idx = 0
static

◆ repeat__key

int repeat__key[REPEAT_MAX]
static

◆ request_command_buffer

char request_command_buffer[256]
static

◆ screen_depth

int screen_depth = 0
static

◆ special_menu_info

special_menu_naiyou special_menu_info[]
初期値:
=
{
{"MindCraft/Special", 0, 0, MENU_CLASS, CLASS_MINDCRAFTER},
{"Imitation/Special", 0, 0, MENU_CLASS, CLASS_IMITATOR},
{"Song/Special", 0, 0, MENU_CLASS, CLASS_BARD},
{"Technique/Special", 0, 0, MENU_CLASS, CLASS_SAMURAI},
{"Mind/Magic/Special", 0, 0, MENU_CLASS, CLASS_FORCETRAINER},
{"BrutalPower/Special", 0, 0, MENU_CLASS, CLASS_BERSERKER},
{"Technique/Special", 0, 0, MENU_CLASS, CLASS_SMITH},
{"MirrorMagic/Special", 0, 0, MENU_CLASS, CLASS_MIRROR_MASTER},
{"Ninjutsu/Special", 0, 0, MENU_CLASS, CLASS_NINJA},
{"Enter global map(<)", 2, 6, MENU_WILD, FALSE},
{"Enter local map(>)", 2, 7, MENU_WILD, TRUE},
{"", 0, 0, 0, 0},
}
#define CLASS_BARD
Definition: defines.h:853
#define CLASS_MINDCRAFTER
Definition: defines.h:845
#define CLASS_BERSERKER
Definition: defines.h:859
#define FALSE
コンパイル環境に定義がない場合のFALSE定義
Definition: h-define.h:69
#define CLASS_SMITH
Definition: defines.h:860
#define CLASS_NINJA
Definition: defines.h:862
#define CLASS_SAMURAI
Definition: defines.h:855
#define CLASS_FORCETRAINER
Definition: defines.h:856
#define MENU_CLASS
Definition: util.c:4207
#define CLASS_IMITATOR
Definition: defines.h:848
#define TRUE
コンパイル環境に定義がない場合のTRUE定義
Definition: h-define.h:66
#define MENU_WILD
Definition: util.c:4208
#define CLASS_MIRROR_MASTER
Definition: defines.h:861