OSDN Git Service

[Refactor] #37353 MAC_MPWのプリプロを削除 (CARBON と MACH_O_CARBONは保留) / Removed preprocessor...
[hengband/hengband.git] / src / util.h
index 8251828..96224ca 100644 (file)
@@ -17,9 +17,9 @@
 #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
@@ -44,31 +44,31 @@ extern int 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)))
@@ -76,9 +76,9 @@ extern int PlayerUID;
 #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
@@ -86,9 +86,9 @@ extern int PlayerUID;
 #endif
 
 
- /*
- * Sort-array element
- */
 /*
 * Sort-array element
 */
 typedef struct tag_type tag_type;
 
 struct tag_type
@@ -267,40 +267,40 @@ extern concptr keymap_act[KEYMAP_MODES][256];
 #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);
@@ -310,15 +310,11 @@ extern void user_name(char *buf, int id);
 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;
@@ -420,7 +416,7 @@ extern bool get_check_strict(concptr prompt, BIT_FLAGS mode);
 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);