Hengband  2.2.1
util.h
[詳解]
1 #pragma once
2 
3 #include "geometry.h"
4 
5 /*
6  * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits",
7  * and "Control-Characters".
8  *
9  * Note that all "index" values must be "lowercase letters", while
10  * all "digits" must be "digits". Control characters can be made
11  * from any legal characters.
12  */
13 #define A2I(X) ((X) - 'a')
14 #define I2A(X) ((char)(X) + 'a')
15 #define D2I(X) ((X) - '0')
16 #define I2D(X) ((X) + '0')
17 #define KTRL(X) ((X) & 0x1F)
18 #define ESCAPE '\033'
19 
20 /*
21  * Hack -- Prepare to use the "Secure" routines
22  */
23 #if defined(SET_UID) && defined(SECURE)
24 extern int PlayerUID;
25 # define getuid() PlayerUID
26 # define geteuid() PlayerUID
27 #endif
28 
29 #define KEYMAP_MODE_ORIG 0 /*!< オリジナルキー配置 / Mode for original keyset commands */
30 #define KEYMAP_MODE_ROGUE 1 /*!< ローグライクキー配置 / Mode for roguelike keyset commands */
31 #define KEYMAP_MODES 2 /*!< キー配置の数 / Number of keymap modes */
32 
33 #define SCREEN_BUF_MAX_SIZE (4 * 65536) /*!< Max size of screen dump buffer */
34 
35 /* Cheat Info Type */
36 #define CHEAT_OBJECT 0
37 #define CHEAT_MONSTER 1
38 #define CHEAT_DUNGEON 2
39 #define CHEAT_MISC 3
40 
41 /*
42  * Max numbers of macro trigger names
43  */
44 #define MAX_MACRO_MOD 12
45 #define MAX_MACRO_TRIG 200 /*!< 登録を許すマクロ(トリガー)の最大数 */
46 
47 /*
48  * Object flags
49  *
50  * Old variables for object flags such as flags1, flags2, and flags3
51  * are obsolated. Now single array flgs[TR_FLAG_SIZE] contains all
52  * object flags. And each flag is refered by single index number
53  * instead of a bit mask.
54  *
55  * Therefore it's very easy to add a lot of new flags; no one need to
56  * worry about in which variable a new flag should be put, nor to
57  * modify a huge number of files all over the source directory at once
58  * to add new flag variables such as flags4, a_ability_flags1, etc...
59  *
60  * All management of flags is now treated using a set of macros
61  * instead of bit operations.
62  * Note: These macros are using division, modulo, and bit shift
63  * operations, and it seems that these operations are rather slower
64  * than original bit operation. But since index numbers are almost
65  * always given as constant, such slow operations are performed in the
66  * compile time. So there is no problem on the speed.
67  *
68  * Exceptions of new flag management is a set of flags to control
69  * object generation and the curse flags. These are not yet rewritten
70  * in new index form; maybe these have no merit of rewriting.
71  */
72 
73 #define have_flag(ARRAY, INDEX) !!((ARRAY)[(INDEX)/32] & (1L << ((INDEX)%32)))
74 #define add_flag(ARRAY, INDEX) ((ARRAY)[(INDEX)/32] |= (1L << ((INDEX)%32)))
75 #define remove_flag(ARRAY, INDEX) ((ARRAY)[(INDEX)/32] &= ~(1L << ((INDEX)%32)))
76 #define is_pval_flag(INDEX) ((TR_STR <= (INDEX) && (INDEX) <= TR_MAGIC_MASTERY) || (TR_STEALTH <= (INDEX) && (INDEX) <= TR_BLOWS))
77 #define have_pval_flags(ARRAY) !!((ARRAY)[0] & (0x00003f7f))
78 
79  /*
80  Language selection macro
81  */
82 #ifdef JP
83 #define _(JAPANESE,ENGLISH) (JAPANESE)
84 #else
85 #define _(JAPANESE,ENGLISH) (ENGLISH)
86 #endif
87 
88 
89  /*
90  * Sort-array element
91  */
92 typedef struct tag_type tag_type;
93 
94 struct tag_type
95 {
96  int tag;
97  int index;
98 };
99 
100 /*
101  * An entry for the object/monster allocation functions
102  *
103  * Pass 1 is determined from allocation information
104  * Pass 2 is determined from allocation restriction
105  * Pass 3 is determined from allocation calculation
106  */
107 
108 typedef struct alloc_entry alloc_entry;
109 
111 {
112  KIND_OBJECT_IDX index; /* The actual index */
113 
114  DEPTH level; /* Base dungeon level */
115  PROB prob1; /* Probability, pass 1 */
116  PROB prob2; /* Probability, pass 2 */
117  PROB prob3; /* Probability, pass 3 */
118 
119  u16b total; /* Unused for now */
120 };
121 
122 extern u32b message__next;
123 extern u32b message__last;
124 extern u32b message__head;
125 extern u32b message__tail;
126 extern u32b *message__ptr;
127 extern char *message__buf;
128 
129 extern bool msg_flag;
130 
131 extern s16b macro__num;
132 extern concptr *macro__pat;
133 extern concptr *macro__act;
134 extern bool *macro__cmd;
135 extern char *macro__buf;
136 
137 extern bool get_com_no_macros;
138 
139 extern bool inkey_base;
140 extern bool inkey_xtra;
141 extern bool inkey_scan;
142 extern bool inkey_flag;
143 
144 extern bool use_menu;
145 
146 extern pos_list tmp_pos;
147 
148 extern STR_OFFSET quark__num;
149 extern concptr *quark__str;
150 /*
151  * Automatically generated "variable" declarations
152  */
153 extern int max_macrotrigger;
154 extern concptr macro_template;
159 
161 extern COMMAND_ARG command_arg;
162 extern s16b command_rep;
163 extern DIRECTION command_dir;
164 extern s16b command_see;
165 extern TERM_LEN command_gap;
166 extern s16b command_wrk;
167 extern s16b command_new;
168 
169 extern concptr keymap_act[KEYMAP_MODES][256];
170 
171 /*** Music constants ***/
172 
173 #define MUSIC_BASIC_DEFAULT 0
174 #define MUSIC_BASIC_GAMEOVER 1
175 #define MUSIC_BASIC_EXIT 2
176 #define MUSIC_BASIC_TOWN 3
177 #define MUSIC_BASIC_FIELD1 4
178 #define MUSIC_BASIC_FIELD2 5
179 #define MUSIC_BASIC_FIELD3 6
180 #define MUSIC_BASIC_DUN_LOW 7
181 #define MUSIC_BASIC_DUN_MED 8
182 #define MUSIC_BASIC_DUN_HIGH 9
183 #define MUSIC_BASIC_DUN_FEEL1 10
184 #define MUSIC_BASIC_DUN_FEEL2 11
185 #define MUSIC_BASIC_WINNER 12
186 #define MUSIC_BASIC_BUILD 13
187 #define MUSIC_BASIC_WILD 14
188 #define MUSIC_BASIC_QUEST 15
189 #define MUSIC_BASIC_ARENA 16
190 #define MUSIC_BASIC_BATTLE 17
191 #define MUSIC_BASIC_QUEST_CLEAR 18
192 #define MUSIC_BASIC_FINAL_QUEST_CLEAR 19
193 #define MUSIC_BASIC_AMBUSH 20
194 #define MUSIC_BASIC_MAX 21 /*!< BGM定義の最大数 */
195 
196 /*** Sound constants ***/
197 
198 /*
199  * Mega-Hack -- some primitive sound support (see "main-win.c")
200  *
201  * Some "sound" constants for "Term_xtra(TERM_XTRA_SOUND, val)"
202  */
203 #define SOUND_HIT 1
204 #define SOUND_MISS 2
205 #define SOUND_FLEE 3
206 #define SOUND_DROP 4
207 #define SOUND_KILL 5
208 #define SOUND_LEVEL 6
209 #define SOUND_DEATH 7
210 #define SOUND_STUDY 8
211 #define SOUND_TELEPORT 9
212 #define SOUND_SHOOT 10
213 #define SOUND_QUAFF 11
214 #define SOUND_ZAP 12
215 #define SOUND_WALK 13
216 #define SOUND_TPOTHER 14
217 #define SOUND_HITWALL 15
218 #define SOUND_EAT 16
219 #define SOUND_STORE1 17
220 #define SOUND_STORE2 18
221 #define SOUND_STORE3 19
222 #define SOUND_STORE4 20
223 #define SOUND_DIG 21
224 #define SOUND_OPENDOOR 22
225 #define SOUND_SHUTDOOR 23
226 #define SOUND_TPLEVEL 24
227 #define SOUND_SCROLL 25
228 #define SOUND_BUY 26
229 #define SOUND_SELL 27
230 #define SOUND_WARN 28
231 #define SOUND_ROCKET 29 /*!< Somebody's shooting rockets */
232 #define SOUND_N_KILL 30 /*!< The player kills a non-living/undead monster */
233 #define SOUND_U_KILL 31 /*!< The player kills a unique */
234 #define SOUND_QUEST 32 /*!< The player has just completed a quest */
235 #define SOUND_HEAL 33 /*!< The player was healed a little bit */
236 #define SOUND_X_HEAL 34 /*!< The player was healed full health */
237 #define SOUND_BITE 35 /*!< A monster bites you */
238 #define SOUND_CLAW 36 /*!< A monster claws you */
239 #define SOUND_M_SPELL 37 /*!< A monster casts a miscellaneous spell */
240 #define SOUND_SUMMON 38 /*!< A monster casts a summoning spell */
241 #define SOUND_BREATH 39 /*!< A monster breathes */
242 #define SOUND_BALL 40 /*!< A monster casts a ball / bolt spell */
243 #define SOUND_M_HEAL 41 /*!< A monster heals itself somehow */
244 #define SOUND_ATK_SPELL 42 /*!< A monster casts a misc. offensive spell */
245 #define SOUND_EVIL 43 /*!< Something nasty has just happened! */
246 #define SOUND_TOUCH 44 /*!< A monster touches you */
247 #define SOUND_STING 45 /*!< A monster stings you */
248 #define SOUND_CRUSH 46 /*!< A monster crushes / envelopes you */
249 #define SOUND_SLIME 47 /*!< A monster drools/spits/etc on you */
250 #define SOUND_WAIL 48 /*!< A monster wails */
251 #define SOUND_WINNER 49 /*!< Just won the game! */
252 #define SOUND_FIRE 50 /*!< An item was burned */
253 #define SOUND_ACID 51 /*!< An item was destroyed by acid */
254 #define SOUND_ELEC 52 /*!< An item was destroyed by electricity */
255 #define SOUND_COLD 53 /*!< An item was shattered */
256 #define SOUND_ILLEGAL 54 /*!< Illegal command attempted */
257 #define SOUND_FAIL 55 /*!< Fail to get a spell off / activate an item */
258 #define SOUND_WAKEUP 56 /*!< A monster wakes up */
259 #define SOUND_INVULN 57 /*!< Invulnerability! */
260 #define SOUND_FALL 58 /*!< Falling through a trapdoor... */
261 #define SOUND_PAIN 59 /*!< A monster is in pain! */
262 #define SOUND_DESTITEM 60 /*!< An item was destroyed by misc. means */
263 #define SOUND_MOAN 61 /*!< A monster makes a moan/beg/insult attack */
264 #define SOUND_SHOW 62 /*!< A monster makes a "show" attack */
265 #define SOUND_UNUSED 63 /*!< (no sound for gaze attacks) */
266 #define SOUND_EXPLODE 64 /*!< Something (or somebody) explodes */
267 #define SOUND_GLASS 65 /*!< A glass feature was crashed */
268 #define SOUND_REFLECT 66 /*!< A bolt was reflected */
269 
270 /*
271  * Mega-Hack -- maximum known sounds
272  */
273 #define SOUND_MAX 67 /*!< 効果音定義の最大数 */
274 
275 /*!
276  * @brief 銘情報の最大数 / Maximum number of "quarks" (see "io.c")
277  * @note
278  * Default: assume at most 512 different inscriptions are used<br>
279  * Was 512... 256 quarks added for random artifacts<br>
280  */
281 #define QUARK_MAX 768
282 
283 /*
284  * OPTION: Maximum number of messages to remember (see "io.c")
285  * Default: assume maximal memorization of 2048 total messages
286  */
287 #define MESSAGE_MAX 81920
288 
289 /*
290  * OPTION: Maximum space for the message text buffer (see "io.c")
291  * Default: assume that each of the 2048 messages is repeated an
292  * average of three times, and has an average length of 48
293  */
294 #define MESSAGE_BUF 655360
295 
296 /*
297  * Hack -- The main "screen"
298  */
299 #define term_screen (angband_term[0])
300 
301 /*
302  * Hack -- conditional (or "bizarre") externs
303  */
304 
305 #ifdef SET_UID
306 extern void user_name(char *buf, int id);
307 #endif
308 
309 #if 0
310 #ifndef HAS_STRICMP
311 extern int stricmp(concptr a, concptr b);
312 #endif
313 #endif
314 
315 #ifndef HAVE_USLEEP
316 extern int usleep(huge usecs);
317 #endif
318 
319 #if defined(MAC_MPW) && defined(CARBON)
320 extern void convert_pathname(char *path);
321 #endif
322 
323 #if defined(MACH_O_CARBON)
324 extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
325 #endif
326 
327 #if defined(MAC_MPW) || defined(MACH_O_CARBON)
328 /* Globals needed */
329 extern u32b _ftype;
330 extern u32b _fcreator;
331 #endif
332 
333 /*
334  * Hack -- force definitions -- see fd_seek()
335  */
336 #ifndef SEEK_SET
337 # define SEEK_SET 0
338 #endif
339 #ifndef SEEK_CUR
340 # define SEEK_CUR 1
341 #endif
342 #ifndef SEEK_END
343 # define SEEK_END 2
344 #endif
345 
346  /*
347  * Hack -- force definitions -- see fd_lock()
348  */
349 #ifndef F_UNLCK
350 # define F_UNLCK 0
351 #endif
352 #ifndef F_RDLCK
353 # define F_RDLCK 1
354 #endif
355 #ifndef F_WRLCK
356 # define F_WRLCK 2
357 #endif
358 
359 extern const char hexsym[16];
360 
361 extern errr path_parse(char *buf, int max, concptr file);
362 extern errr path_build(char *buf, int max, concptr path, concptr file);
363 extern FILE *my_fopen(concptr file, concptr mode);
364 extern FILE *my_fopen_temp(char *buf, int max);
365 extern errr my_fgets(FILE *fff, char *buf, huge n);
366 extern errr my_fputs(FILE *fff, concptr buf, huge n);
367 extern errr my_fclose(FILE *fff);
368 extern errr fd_kill(concptr file);
369 extern errr fd_move(concptr file, concptr what);
370 extern errr fd_copy(concptr file, concptr what);
371 extern int fd_make(concptr file, BIT_FLAGS mode);
372 extern int fd_open(concptr file, int flags);
373 extern errr fd_lock(int fd, int what);
374 extern errr fd_seek(int fd, huge n);
375 extern errr fd_chop(int fd, huge n);
376 extern errr fd_read(int fd, char *buf, huge n);
377 extern errr fd_write(int fd, concptr buf, huge n);
378 extern errr fd_close(int fd);
379 extern void flush(void);
380 extern void bell(void);
381 extern errr play_music(int type, int num);
382 extern void select_floor_music(player_type *player_ptr);
383 extern void sound(int num);
384 extern void move_cursor(int row, int col);
385 extern void text_to_ascii(char *buf, concptr str);
386 extern void ascii_to_text(char *buf, concptr str);
387 extern errr macro_add(concptr pat, concptr act);
388 extern sint macro_find_exact(concptr pat);
389 extern char inkey(void);
390 extern concptr quark_str(STR_OFFSET num);
391 extern void quark_init(void);
392 extern u16b quark_add(concptr str);
393 extern s32b message_num(void);
394 extern concptr message_str(int age);
395 extern void message_add(concptr msg);
396 extern void msg_erase(void);
397 extern void msg_print(concptr msg);
398 extern void msg_print_wizard(int cheat_type, concptr msg);
399 #ifndef SWIG
400 extern void msg_format(concptr fmt, ...);
401 extern void msg_format_wizard(int cheat_type, concptr fmt, ...);
402 #endif /* SWIG */
403 extern void screen_save(void);
404 extern void screen_load(void);
406 extern void put_str(concptr str, TERM_LEN row, TERM_LEN col);
407 extern void c_prt(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col);
408 extern void prt(concptr str, TERM_LEN row, TERM_LEN col);
409 extern void c_roff(TERM_COLOR attr, concptr str);
410 extern void roff(concptr str);
411 extern void clear_from(int row);
412 extern bool askfor_aux(char *buf, int len, bool numpad_cursor);
413 extern bool askfor(char *buf, int len);
414 extern bool get_string(concptr prompt, char *buf, int len);
415 
416 /*
417  * Bit flags for control of get_check_strict()
418  */
419 #define CHECK_OKAY_CANCEL 0x01
420 #define CHECK_NO_ESCAPE 0x02
421 #define CHECK_NO_HISTORY 0x04
422 #define CHECK_DEFAULT_Y 0x08
423 extern bool get_check(concptr prompt);
424 extern bool get_check_strict(concptr prompt, BIT_FLAGS mode);
425 
426 extern bool get_com(concptr prompt, char *command, bool z_escape);
427 extern QUANTITY get_quantity(concptr prompt, QUANTITY max);
428 extern void pause_line(int row);
429 extern void request_command(int shopping);
430 extern bool is_a_vowel(int ch);
431 extern int get_keymap_dir(char ch);
432 extern errr type_string(concptr str, uint len);
433 extern void roff_to_buf(concptr str, int wlen, char *tbuf, size_t bufsize);
434 
435 #ifdef SORT_R_INFO
436 extern void tag_sort(tag_type elements[], int number);
437 #endif /* SORT_R_INFO */
438 
439 #ifdef SUPPORT_GAMMA
440 extern byte gamma_table[256];
441 extern void build_gamma_table(int gamma);
442 #endif /* SUPPORT_GAMMA */
443 
444 extern size_t my_strcpy(char *buf, concptr src, size_t bufsize);
445 extern size_t my_strcat(char *buf, concptr src, size_t bufsize);
446 extern char *my_strstr(concptr haystack, concptr needle);
447 extern char *my_strchr(concptr ptr, char ch);
448 extern void str_tolower(char *str);
449 
450 /*
451  * Special key code used for inkey_special()
452  */
453 #define SKEY_MOD_MASK 0x0f00
454 #define SKEY_MOD_SHIFT 0x0100
455 #define SKEY_MOD_CONTROL 0x0200
456 
457 #define SKEY_MASK 0xf000
458 #define SKEY_DOWN 0xf001
459 #define SKEY_LEFT 0xf002
460 #define SKEY_RIGHT 0xf003
461 #define SKEY_UP 0xf004
462 #define SKEY_PGUP 0xf005
463 #define SKEY_PGDOWN 0xf006
464 #define SKEY_TOP 0xf007
465 #define SKEY_BOTTOM 0xf008
466 extern int inkey_special(bool numpad_cursor);
467 
468 /* util.c */
469 extern void repeat_push(COMMAND_CODE what);
470 extern bool repeat_pull(COMMAND_CODE *what);
471 extern void repeat_check(void);
#define MAX_MACRO_TRIG
登録を許すマクロ(トリガー)の最大数
Definition: util.h:45
concptr macro_template
Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ
Definition: util.c:127
concptr * macro__act
Definition: util.c:88
char * buf
Definition: chuukei.c:98
concptr keymap_act[KEYMAP_MODES][256]
Definition: util.c:41
errr my_fgets(FILE *fff, char *buf, huge n)
Definition: util.c:563
u32b * message__ptr
Definition: util.c:66
s16b macro__num
Definition: util.c:78
bool * macro__cmd
Definition: util.c:93
void c_put_str(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col)
Definition: util.c:3164
const char * concptr
文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings)
Definition: h-type.h:47
void screen_save(void)
Definition: util.c:3077
#define MAX_MACRO_MOD
Definition: util.h:44
bool get_check_strict(concptr prompt, BIT_FLAGS mode)
Definition: util.c:3725
int fd_make(concptr file, BIT_FLAGS mode)
Definition: util.c:796
u32b message__tail
Definition: util.c:61
void msg_print_wizard(int cheat_type, concptr msg)
Definition: util.c:3047
u16b total
Definition: util.h:119
int col
Definition: files.c:1586
void msg_print(concptr msg)
Definition: util.c:2899
TERM_LEN command_gap
Definition: util.c:139
s16b PROB
確率の重みの型定義
Definition: h-type.h:244
int max_macrotrigger
現在登録中のマクロ(トリガー)の数
Definition: util.c:126
PROB prob3
Definition: util.h:117
DEPTH level
Definition: util.h:114
char inkey(void)
Definition: util.c:2167
void roff_to_buf(concptr str, int wlen, char *tbuf, size_t bufsize)
Definition: util.c:5236
s16b COMMAND_CODE
コマンド内容の型定義
Definition: h-type.h:232
u16b quark_add(concptr str)
Definition: util.c:2420
size_t my_strcpy(char *buf, concptr src, size_t bufsize)
Definition: util.c:5342
errr fd_kill(concptr file)
Definition: util.c:707
char * my_strchr(concptr ptr, char ch)
Definition: util.c:5459
size_t my_strcat(char *buf, concptr src, size_t bufsize)
Definition: util.c:5408
void put_str(concptr str, TERM_LEN row, TERM_LEN col)
Definition: util.c:3173
void repeat_check(void)
Definition: util.c:4930
s16b COMMAND_ARG
コマンド引数の型定義
Definition: h-type.h:233
void sound(int num)
Definition: util.c:1777
s16b command_rep
各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command
Definition: util.c:135
concptr macro_trigger_name[MAX_MACRO_TRIG]
マクロのトリガーコード
Definition: util.c:130
bool askfor(char *buf, int len)
Definition: util.c:3672
bool askfor_aux(char *buf, int len, bool numpad_cursor)
Definition: util.c:3425
int tag
Definition: util.h:96
byte gamma_table[256]
Definition: util.c:5096
void select_floor_music(player_type *player_ptr)
Definition: util.c:1801
bool is_a_vowel(int ch)
Definition: util.c:4758
errr type_string(concptr str, uint len)
Definition: util.c:5201
concptr macro_modifier_name[MAX_MACRO_MOD]
マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列
Definition: util.c:129
s32b DEPTH
ゲーム中の階層レベルの型定義
Definition: h-type.h:216
u32b message__last
Definition: util.c:51
COMMAND_ARG command_arg
各種コマンドの汎用的な引数として扱う / Gives argument of current command
Definition: util.c:134
concptr * quark__str
Definition: util.c:119
void c_prt(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col)
Definition: util.c:3185
errr fd_seek(int fd, huge n)
Definition: util.c:905
concptr macro_trigger_keycode[2][MAX_MACRO_TRIG]
マクロの内容
Definition: util.c:131
int TERM_LEN
コンソール表示座標の型定義
Definition: h-type.h:236
concptr macro_modifier_chr
&x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ
Definition: util.c:128
unsigned long huge
Definition: h-type.h:91
u32b BIT_FLAGS
32ビットのフラグ配列の型定義
Definition: h-type.h:225
int errr
エラーコードの定義 / Error codes for function return values
Definition: h-type.h:57
errr my_fputs(FILE *fff, concptr buf, huge n)
Definition: util.c:658
unsigned short u16b
Definition: h-type.h:99
s16b command_new
Definition: util.c:140
errr play_music(int type, int num)
Definition: util.c:1789
errr fd_write(int fd, concptr buf, huge n)
Definition: util.c:980
signed long s32b
Definition: h-type.h:107
void c_roff(TERM_COLOR attr, concptr str)
Definition: util.c:3220
void user_name(char *buf, int id)
Definition: util.c:230
void msg_erase(void)
Definition: util.c:2868
errr my_fclose(FILE *fff)
Definition: util.c:509
int index
Definition: util.h:97
bool inkey_base
Definition: util.c:102
Definition: util.h:94
Definition: util.h:110
errr fd_chop(int fd, huge n)
Definition: util.c:926
s16b command_see
Definition: util.c:137
int inkey_special(bool numpad_cursor)
Definition: util.c:5501
void bell(void)
Definition: util.c:1761
void repeat_push(COMMAND_CODE what)
Definition: util.c:4905
void ascii_to_text(char *buf, concptr str)
Definition: util.c:1447
DIRECTION command_dir
各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command
Definition: util.c:136
errr fd_close(int fd)
Definition: util.c:1013
int sint
sint型をintとして定義 / A signed, standard integer (at least 2 bytes)
Definition: h-type.h:84
int usleep(huge usecs)
s32b message_num(void)
保存中の過去ゲームメッセージの数を返す。 / How many messages are "available"?
Definition: util.c:2492
void msg_format_wizard(int cheat_type, concptr fmt,...)
Definition: util.c:3133
void clear_from(int row)
Definition: util.c:3393
u32b STR_OFFSET
テキストオフセットの型定義
Definition: h-type.h:212
s16b KIND_OBJECT_IDX
ゲーム中のベースアイテムID型を定義
Definition: h-type.h:142
byte TERM_COLOR
テキスト表示色の型定義
Definition: h-type.h:237
void msg_format(concptr fmt,...)
Definition: util.c:3111
sint macro_find_exact(concptr pat)
Definition: util.c:1557
concptr * macro__pat
Definition: util.c:83
u32b message__head
Definition: util.c:56
bool use_menu
Definition: util.c:107
TERM_COLOR attr
Definition: view-mainwindow.c:342
errr path_build(char *buf, int max, concptr path, concptr file)
ファイル入出力のためのパス生成する。/ Create a new path by appending a file (or directory) to a path.
Definition: util.c:442
int get_keymap_dir(char ch)
Definition: util.c:4846
void prt(concptr str, TERM_LEN row, TERM_LEN col)
Definition: util.c:3197
void message_add(concptr msg)
ゲームメッセージをログに追加する。 / Add a new message, with great efficiency @params str 保存したいメッセージ
Definition: util.c:2544
errr path_parse(char *buf, int max, concptr file)
Definition: util.c:311
bool get_check(concptr prompt)
Definition: util.c:3712
#define KEYMAP_MODES
キー配置の数 / Number of keymap modes
Definition: util.h:31
unsigned int uint
Definition: h-type.h:85
void screen_load(void)
Definition: util.c:3095
unsigned long u32b
Definition: h-type.h:108
void roff(concptr str)
Definition: util.c:3381
int DIRECTION
ゲーム中の方角の型定義
Definition: h-type.h:198
int len
Definition: files.c:1588
void request_command(int shopping)
Definition: util.c:4455
concptr message_str(int age)
過去のゲームメッセージを返す。 / Recall the "text" of a saved message @params age メッセージの世代
Definition: util.c:2516
int fd_open(concptr file, int flags)
Definition: util.c:826
bool inkey_scan
Definition: util.c:104
FILE * my_fopen(concptr file, concptr mode)
Definition: util.c:480
bool get_string(concptr prompt, char *buf, int len)
Definition: util.c:3688
STR_OFFSET quark__num
Definition: util.c:114
errr fd_copy(concptr file, concptr what)
Definition: util.c:745
Definition: player-status.h:86
bool msg_flag
Definition: util.c:73
QUANTITY get_quantity(concptr prompt, QUANTITY max)
Definition: util.c:3866
char * macro__buf
Definition: util.c:98
int row
Definition: files.c:1587
signed short s16b
Definition: h-type.h:98
FILE * my_fopen_temp(char *buf, int max)
Definition: util.c:546
COMMAND_CODE command_cmd
Definition: util.c:133
static FILE * fff
Definition: load.c:96
bool inkey_flag
Definition: util.c:105
char * my_strstr(concptr haystack, concptr needle)
Definition: util.c:5431
pos_list tmp_pos
Definition: util.c:109
errr fd_read(int fd, char *buf, huge n)
Definition: util.c:947
void str_tolower(char *str)
Definition: util.c:5477
void flush(void)
Definition: util.c:1751
u32b message__next
Definition: util.c:46
void build_gamma_table(int gamma)
Definition: util.c:5125
PROB prob2
Definition: util.h:116
void move_cursor(int row, int col)
Definition: util.c:1079
bool get_com_no_macros
Definition: util.c:100
s16b command_wrk
Definition: util.c:138
char * message__buf
Definition: util.c:71
errr fd_lock(int fd, int what)
Definition: util.c:843
bool get_com(concptr prompt, char *command, bool z_escape)
Definition: util.c:3836
KIND_OBJECT_IDX index
Definition: util.h:112
const char hexsym[16]
10進数から16進数への変換テーブル / Global array for converting numbers to uppercase hecidecimal digit This array ca...
Definition: util.c:32
bool inkey_xtra
Definition: util.c:103
errr macro_add(concptr pat, concptr act)
Definition: util.c:1688
concptr quark_str(STR_OFFSET num)
Definition: util.c:2448
void quark_init(void)
Definition: util.c:2404
void pause_line(int row)
Definition: util.c:3959
errr fd_move(concptr file, concptr what)
Definition: util.c:724
bool repeat_pull(COMMAND_CODE *what)
Definition: util.c:4918
void text_to_ascii(char *buf, concptr str)
Definition: util.c:1255
Definition: geometry.h:56
PROB prob1
Definition: util.h:115
void tag_sort(tag_type elements[], int number)
Definition: util.c:5086
int QUANTITY
インターフェース上の指定個数
Definition: h-type.h:247