#pragma once
-
+#include "geometry.h"
/*
* Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits",
#define KTRL(X) ((X) & 0x1F)
#define ESCAPE '\033'
-/*
- * Hack -- Prepare to use the "Secure" routines
- */
+ /*
+ * Hack -- Prepare to use the "Secure" routines
+ */
#if defined(SET_UID) && defined(SECURE)
extern int PlayerUID;
# define getuid() PlayerUID
#define MAX_MACRO_MOD 12
#define MAX_MACRO_TRIG 200 /*!< 登録を許すマクロ(トリガー)の最大数 */
-/*
- * Object flags
- *
- * Old variables for object flags such as flags1, flags2, and flags3
- * are obsolated. Now single array flgs[TR_FLAG_SIZE] contains all
- * object flags. And each flag is refered by single index number
- * instead of a bit mask.
- *
- * Therefore it's very easy to add a lot of new flags; no one need to
- * worry about in which variable a new flag should be put, nor to
- * modify a huge number of files all over the source directory at once
- * to add new flag variables such as flags4, a_ability_flags1, etc...
- *
- * All management of flags is now treated using a set of macros
- * instead of bit operations.
- * Note: These macros are using division, modulo, and bit shift
- * operations, and it seems that these operations are rather slower
- * than original bit operation. But since index numbers are almost
- * always given as constant, such slow operations are performed in the
- * compile time. So there is no problem on the speed.
- *
- * Exceptions of new flag management is a set of flags to control
- * object generation and the curse flags. These are not yet rewritten
- * in new index form; maybe these have no merit of rewriting.
- */
+ /*
+ * Object flags
+ *
+ * Old variables for object flags such as flags1, flags2, and flags3
+ * are obsolated. Now single array flgs[TR_FLAG_SIZE] contains all
+ * object flags. And each flag is refered by single index number
+ * instead of a bit mask.
+ *
+ * Therefore it's very easy to add a lot of new flags; no one need to
+ * worry about in which variable a new flag should be put, nor to
+ * modify a huge number of files all over the source directory at once
+ * to add new flag variables such as flags4, a_ability_flags1, etc...
+ *
+ * All management of flags is now treated using a set of macros
+ * instead of bit operations.
+ * Note: These macros are using division, modulo, and bit shift
+ * operations, and it seems that these operations are rather slower
+ * than original bit operation. But since index numbers are almost
+ * always given as constant, such slow operations are performed in the
+ * compile time. So there is no problem on the speed.
+ *
+ * Exceptions of new flag management is a set of flags to control
+ * object generation and the curse flags. These are not yet rewritten
+ * in new index form; maybe these have no merit of rewriting.
+ */
#define have_flag(ARRAY, INDEX) !!((ARRAY)[(INDEX)/32] & (1L << ((INDEX)%32)))
#define add_flag(ARRAY, INDEX) ((ARRAY)[(INDEX)/32] |= (1L << ((INDEX)%32)))
#define is_pval_flag(INDEX) ((TR_STR <= (INDEX) && (INDEX) <= TR_MAGIC_MASTERY) || (TR_STEALTH <= (INDEX) && (INDEX) <= TR_BLOWS))
#define have_pval_flags(ARRAY) !!((ARRAY)[0] & (0x00003f7f))
- /*
- Language selection macro
- */
+ /*
+ Language selection macro
+ */
#ifdef JP
#define _(JAPANESE,ENGLISH) (JAPANESE)
#else
#endif
- /*
- * Sort-array element
- */
+ /*
+ * Sort-array element
+ */
typedef struct tag_type tag_type;
struct tag_type
#define SOUND_GLASS 65 /*!< A glass feature was crashed */
#define SOUND_REFLECT 66 /*!< A bolt was reflected */
-/*
- * Mega-Hack -- maximum known sounds
- */
+ /*
+ * Mega-Hack -- maximum known sounds
+ */
#define SOUND_MAX 67 /*!< 効果音定義の最大数 */
-/*!
- * @brief 銘情報の最大数 / Maximum number of "quarks" (see "io.c")
- * @note
- * Default: assume at most 512 different inscriptions are used<br>
- * Was 512... 256 quarks added for random artifacts<br>
- */
+ /*!
+ * @brief 銘情報の最大数 / Maximum number of "quarks" (see "io.c")
+ * @note
+ * Default: assume at most 512 different inscriptions are used<br>
+ * Was 512... 256 quarks added for random artifacts<br>
+ */
#define QUARK_MAX 768
-/*
- * OPTION: Maximum number of messages to remember (see "io.c")
- * Default: assume maximal memorization of 2048 total messages
- */
+ /*
+ * OPTION: Maximum number of messages to remember (see "io.c")
+ * Default: assume maximal memorization of 2048 total messages
+ */
#define MESSAGE_MAX 81920
-/*
- * OPTION: Maximum space for the message text buffer (see "io.c")
- * Default: assume that each of the 2048 messages is repeated an
- * average of three times, and has an average length of 48
- */
+ /*
+ * OPTION: Maximum space for the message text buffer (see "io.c")
+ * Default: assume that each of the 2048 messages is repeated an
+ * average of three times, and has an average length of 48
+ */
#define MESSAGE_BUF 655360
-/*
- * Hack -- The main "screen"
- */
+ /*
+ * Hack -- The main "screen"
+ */
#define term_screen (angband_term[0])
-/*
- * Hack -- conditional (or "bizarre") externs
- */
+ /*
+ * Hack -- conditional (or "bizarre") externs
+ */
#ifdef SET_UID
extern void user_name(char *buf, int id);
#endif
-#if 0
-#ifndef HAS_STRICMP
-extern int stricmp(concptr a, concptr b);
-#endif
-#endif
-
#ifndef HAVE_USLEEP
extern int usleep(huge usecs);
#endif
-#if defined(MAC_MPW) && defined(CARBON)
-extern void convert_pathname(char *path);
-#endif
-
#if defined(MACH_O_CARBON)
extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
#endif
-#if defined(MAC_MPW) || defined(MACH_O_CARBON)
+#if defined(MACH_O_CARBON)
/* Globals needed */
extern u32b _ftype;
extern u32b _fcreator;
extern void msg_format(concptr fmt, ...);
extern void msg_format_wizard(int cheat_type, concptr fmt, ...);
#endif /* SWIG */
-extern void screen_save(void);
-extern void screen_load(void);
+extern void screen_save();
+extern void screen_load();
extern void c_put_str(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col);
extern void put_str(concptr str, TERM_LEN row, TERM_LEN col);
extern void c_prt(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col);
extern bool get_com(concptr prompt, char *command, bool z_escape);
extern QUANTITY get_quantity(concptr prompt, QUANTITY max);
extern void pause_line(int row);
-extern void request_command(int shopping);
+extern void request_command(player_type *player_ptr, int shopping);
extern bool is_a_vowel(int ch);
extern int get_keymap_dir(char ch);
extern errr type_string(concptr str, uint len);