5 * @brief グローバルな構造体の定義 / global type declarations
9 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
10 * This software may be copied and distributed for educational, research,
11 * and not for profit purposes provided that this copyright and statement
12 * are included in all such copies. Other copyrights may also apply.
16 * このファイルはangband.hでのみインクルードすること。
17 * This file should ONLY be included by "angband.h"
19 * Note that "char" may or may not be signed, and that "signed char"
20 * may or may not work on all machines. So always use "s16b" or "s32b"
21 * for signed values. Also, note that unsigned values cause math problems
22 * in many cases, so try to only use "u16b" and "u32b" for "bit flags",
23 * unless you really need the extra bit of information, or you really
24 * need to restrict yourself to a single byte for storage reasons.
26 * Also, if possible, attempt to restrict yourself to sub-fields of
27 * known size (use "s16b" or "s32b" instead of "int", and "byte" instead
28 * of "bool"), and attempt to align all fields along four-byte words, to
29 * optimize storage issues on 32-bit machines. Also, avoid "bit flags"
30 * since these increase the code size and slow down execution. When
31 * you need to store bit flags, use one byte per flag, or, where space
32 * is an issue, use a "byte" or "u16b" or "u32b", and add special code
33 * to access the various bit flags.
35 * Many of these structures were developed to reduce the number of global
36 * variables, facilitate structured program design, allow the use of ascii
37 * template files, simplify access to indexed data, or facilitate efficient
38 * clearing of many variables at once.
40 * Certain data is saved in multiple places for efficient access, currently,
41 * this includes the tval/sval/weight fields in "object_type", various fields
42 * in "header_type", and the "m_idx" and "o_idx" fields in "grid_type". All
43 * of these could be removed, but this would, in general, slow down the game
44 * and increase the complexity of the code.
52 //#include "player-skill.h"
56 * The "name" of spell 'N' is stored as spell_names[X][N],
57 * where X is 0 for mage-spells and 1 for priest-spells.
59 typedef struct magic_type magic_type;
63 PLAYER_LEVEL slevel; /* Required level (to learn) */
64 MANA_POINT smana; /* Required mana (to cast) */
65 PERCENTAGE sfail; /* Minimum chance of failure */
66 EXP sexp; /* Encoded experience bonus */
69 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);