OSDN Git Service

[Refactor] #37353 モンスターの時限ステータス定義を monster.h へ移動.
[hengband/hengband.git] / src / defines.h
1 #pragma once
2
3 /*!
4  *  @file defines.h
5  *  @brief 主要なマクロ定義ヘッダ / Purpose: global constants and macro definitions
6  *  @date 2014/01/02
7  *  @author
8  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
9  *\n
10  * This software may be copied and distributed for educational, research,\n
11  * and not for profit purposes provided that this copyright and statement\n
12  * are included in all such copies.  Other copyrights may also apply.\n
13  *  @details
14  * Do not edit this file unless you know *exactly* what you are doing.\n
15  *\n
16  * Some of the values in this file were chosen to preserve game balance,\n
17  * while others are hard-coded based on the format of old save-files, the\n
18  * definition of arrays in various places, mathematical properties, fast\n
19  * computation, storage limits, or the format of external text files.\n
20  *\n
21  * Changing some of these values will induce crashes or memory errors or\n
22  * savefile mis-reads.  Most of the comments in this file are meant as\n
23  * reminders, not complete descriptions, and even a complete knowledge\n
24  * of the source may not be sufficient to fully understand the effects\n
25  * of changing certain definitions.\n
26  *\n
27  * Lastly, note that the code does not always use the symbolic constants\n
28  * below, and sometimes uses various hard-coded values that may not even\n
29  * be defined in this file, but which may be related to definitions here.\n
30  * This is of course bad programming practice, but nobody is perfect...\n
31  *\n
32  * For example, there are MANY things that depend on the screen being\n
33  * 80x24, with the top line used for messages, the bottom line being\n
34  * used for status, and exactly 22 lines used to show the dungeon.\n
35  * Just because your screen can hold 46 lines does not mean that the\n
36  * game will work if you try to use 44 lines to show the dungeon.\n
37  *\n
38  * You have been warned.\n
39  */
40
41 /*
42  * Arena constants
43  */
44 #define ARENA_DEFEATED_OLD_VER (-(MAX_SHORT)) /*<! 旧バージョンの闘技場敗北定義 */
45
46 /*!
47  * @brief 視界及び光源の過渡処理配列サイズ / Maximum size of the "temp" array (see "current_floor_ptr->grid_array.c")
48  * @details We must be as large as "VIEW_MAX" and "LITE_MAX" for proper functioning
49  * of "update_view()" and "update_lite()".  We must also be as large as the
50  * largest illuminatable room, but no room is larger than 800 grids.  We
51  * must also be large enough to allow "good enough" use as a circular queue,
52  * to calculate monster flow, but note that the flow code is "paranoid".
53  */
54 #define TEMP_MAX 2298
55
56 /*!
57  * @brief 再描画処理用配列サイズ / Maximum size of the "redraw" array (see "current_floor_ptr->grid_array.c")
58  * @details We must be large for proper functioning of delayed redrawing.
59  * We must also be as large as two times of the largest view area.
60  * Note that maximum view grids are 1149 entries.
61  */
62 #define REDRAW_MAX 2298
63
64
65 /*!
66  * @brief マクロ登録の最大数 / Maximum number of macros (see "io.c")
67  * @note Default: assume at most 256 macros are used
68  */
69 #define MACRO_MAX       256
70
71 /*!
72  * @brief 銘情報の最大数 / Maximum number of "quarks" (see "io.c")
73  * @note 
74  * Default: assume at most 512 different inscriptions are used<br>
75  * Was 512... 256 quarks added for random artifacts<br>
76  */
77 #define QUARK_MAX       768
78
79 /*
80  * OPTION: Maximum number of messages to remember (see "io.c")
81  * Default: assume maximal memorization of 2048 total messages
82  */
83 #define MESSAGE_MAX  81920
84
85 /*
86  * OPTION: Maximum space for the message text buffer (see "io.c")
87  * Default: assume that each of the 2048 messages is repeated an
88  * average of three times, and has an average length of 48
89  */
90 #define MESSAGE_BUF 655360
91
92
93 /*** Screen Locations ***/
94
95 /*
96  * Is the monster seen by the player?
97  */
98 #define is_seen(A) \
99         ((bool)((A)->ml && (!ignore_unview || p_ptr->inside_battle || \
100          (player_can_see_bold((A)->fy, (A)->fx) && projectable(p_ptr->y, p_ptr->x, (A)->fy, (A)->fx)))))
101
102
103 /* Maximum "Nazguls" number */
104 #define MAX_NAZGUL_NUM 5
105
106 /*
107   Language selection macro
108 */
109 #ifdef JP
110 #define _(JAPANESE,ENGLISH) (JAPANESE)
111 #else
112 #define _(JAPANESE,ENGLISH) (ENGLISH)
113 #endif