OSDN Git Service

[Refactor] #37353 型の置換(C_MAKE)。 / Type replacement(C_MAKE).
[hengband/hengband.git] / src / types.h
index 10ccb95..c94e9c8 100644 (file)
@@ -681,8 +681,8 @@ struct option_type
        byte    o_set;
        byte    o_bit;
 
-       cptr    o_text;
-       cptr    o_desc;
+       concptr o_text;
+       concptr o_desc;
 };
 
 
@@ -698,7 +698,7 @@ struct quest_type
        QUEST_STATUS status;          /*!< クエストの進行ステータス / Is the quest taken, completed, finished? */
        QUEST_TYPE type;              /*!< クエストの種別 / The quest type */
 
-       char name[60];          /*!< クエスト名 / Quest name */
+       GAME_TEXT name[60];          /*!< クエスト名 / Quest name */
        DEPTH level;            /*!< 処理階層 / Dungeon level */
        MONRACE_IDX r_idx;      /*!< クエスト対象のモンスターID / Monster race */
 
@@ -723,17 +723,12 @@ typedef struct owner_type owner_type;
 
 struct owner_type
 {
-       cptr owner_name;        /* Name */
-
+       concptr owner_name;     /* Name */
        PRICE max_cost;         /* Purse limit */
-
        byte max_inflate;       /* Inflation (max) */
        byte min_inflate;       /* Inflation (min) */
-
        byte haggle_per;        /* Haggle unit */
-
        byte insult_max;        /* Insult limit */
-
        byte owner_race;        /* Owner race */
 };
 
@@ -819,11 +814,11 @@ typedef struct player_sex player_sex;
 
 struct player_sex
 {
-       cptr title;                     /* Type of sex */
-       cptr winner;            /* Name of winner */
+       concptr title;                  /* Type of sex */
+       concptr winner;         /* Name of winner */
 #ifdef JP
-       cptr E_title;           /* 英語性別 */
-       cptr E_winner;          /* 英語性別 */
+       concptr E_title;                /* 英語性別 */
+       concptr E_winner;               /* 英語性別 */
 #endif
 };
 
@@ -836,10 +831,10 @@ typedef struct player_race player_race;
 
 struct player_race
 {
-       cptr title;                     /* Type of race */
+       concptr title;                  /* Type of race */
 
 #ifdef JP
-       cptr E_title;           /* 英語種族 */
+       concptr E_title;                /* 英語種族 */
 #endif
        s16b r_adj[6];          /* Racial stat bonuses */
 
@@ -883,10 +878,10 @@ typedef struct player_class player_class;
 
 struct player_class
 {
-       cptr title;                     /* Type of class */
+       concptr title;                  /* Type of class */
 
 #ifdef JP
-       cptr E_title;           /* 英語職業 */
+       concptr E_title;                /* 英語職業 */
 #endif
        s16b c_adj[6];          /* Class stat modifier */
 
@@ -918,10 +913,10 @@ struct player_class
 typedef struct player_seikaku player_seikaku;
 struct player_seikaku
 {
-       cptr title;                     /* Type of seikaku */
+       concptr title;                  /* Type of seikaku */
 
 #ifdef JP
-       cptr E_title;           /* 英語性格 */
+       concptr E_title;                /* 英語性格 */
 #endif
 
        s16b a_adj[6];          /* seikaku stat bonuses */
@@ -1120,7 +1115,7 @@ struct player_type
 
        HIT_POINT player_hp[PY_MAX_LEVEL];
        char died_from[80];       /* What killed the player */
-       cptr last_message;        /* Last message on death or retirement */
+       concptr last_message;        /* Last message on death or retirement */
        char history[4][60];      /* Textual "history" for the Player */
 
        u16b total_winner;        /* Total winner */
@@ -1200,11 +1195,27 @@ struct player_type
 
        s16b cur_lite;          /* Radius of lite (if any) */
 
-
-       u32b notice;            /* Special Updates (bit flags) */
-       u32b update;            /* Pending Updates (bit flags) */
-       u32b redraw;            /* Normal Redraws (bit flags) */
-       u32b window;            /* Window Redraws (bit flags) */
+       BIT_FLAGS update;       /* Pending Updates */
+               #define PU_BONUS        0x00000001L     /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */
+               #define PU_TORCH        0x00000002L     /*!< ステータス更新フラグ: 光源半径 / Calculate torch radius */
+               #define PU_HP           0x00000010L     /*!< ステータス更新フラグ: HP / Calculate chp and mhp */
+               #define PU_MANA         0x00000020L     /*!< ステータス更新フラグ: MP / Calculate csp and msp */
+               #define PU_SPELLS       0x00000040L     /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
+               #define PU_COMBINE      0x00000100L     /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
+               #define PU_REORDER      0x00000200L     /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
+               #define PU_AUTODESTROY  0x00000400L     /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
+               #define PU_UN_VIEW      0x00010000L     /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
+               #define PU_UN_LITE      0x00020000L     /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
+               #define PU_VIEW         0x00100000L     /*!< ステータス更新フラグ: 視界 / Update view */
+               #define PU_LITE         0x00200000L     /*!< ステータス更新フラグ: 明暗範囲 / Update lite */
+               #define PU_MON_LITE     0x00400000L     /*!< ステータス更新フラグ: モンスターの光源範囲 / Monster illumination */
+               #define PU_DELAY_VIS    0x00800000L     /*!< ステータス更新フラグ: 視界の追加更新 / Mega-Hack -- Delayed visual update */
+               #define PU_MONSTERS     0x01000000L     /*!< ステータス更新フラグ: モンスターのステータス / Update monsters */
+               #define PU_DISTANCE     0x02000000L     /*!< ステータス更新フラグ: プレイヤーとモンスターの距離 / Update distances */
+               #define PU_FLOW         0x10000000L     /*!< ステータス更新フラグ: プレイヤーから各マスへの到達距離 / Update flow */
+
+       BIT_FLAGS redraw;       /* Normal Redraws */
+       BIT_FLAGS window;       /* Window Redraws */
 
        s16b stat_use[6];       /* Current modified stats */
        s16b stat_top[6];       /* Maximal modified stats */
@@ -1212,7 +1223,7 @@ struct player_type
        bool sutemi;
        bool counter;
 
-       ALIGNMENT align;                                /* Good/evil/neutral */
+       ALIGNMENT align; /* Good/evil/neutral */
        POSITION run_py;
        POSITION run_px;
        DIRECTION fishing_dir;
@@ -1340,7 +1351,6 @@ struct player_type
         */
        ACTION_SKILL_POWER skill_srh;
 
-
        ACTION_SKILL_POWER skill_fos;   /*!< 行動技能値:探索 / Skill: Searching frequency */
        ACTION_SKILL_POWER skill_thn;   /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
        ACTION_SKILL_POWER skill_thb;   /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
@@ -1359,7 +1369,7 @@ struct player_type
 
        POSITION y;     /* Player location in dungeon */
        POSITION x;     /* Player location in dungeon */
-       char name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
+       GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
 };
 
 
@@ -1404,7 +1414,7 @@ typedef struct martial_arts martial_arts;
 
 struct martial_arts
 {
-       cptr    desc;       /* A verbose attack description */
+       concptr    desc;       /* A verbose attack description */
        int     min_level;  /* Minimum level to use */
        int     chance;     /* Chance of 'success' */
        int     dd;         /* Damage dice */
@@ -1416,9 +1426,9 @@ typedef struct kamae kamae;
 
 struct kamae
 {
-       cptr    desc;       /* A verbose kamae description */
+       concptr    desc;       /* A verbose kamae description */
        int     min_level;  /* Minimum level to use */
-       cptr    info;
+       concptr    info;
 };
 
 /* Mindcrafters */
@@ -1428,7 +1438,7 @@ struct mind_type
        int     min_lev;
        int     mana_cost;
        int     fail;
-       cptr    name;
+       concptr    name;
 };
 
 typedef struct mind_power mind_power;
@@ -1448,7 +1458,7 @@ struct monster_power
        int     manedam;
        int     manefail;
        int     use_stat;
-       cptr    name;
+       concptr    name;
 };
 
 
@@ -1460,11 +1470,11 @@ typedef struct building_type building_type;
 
 struct building_type
 {
-       char name[20];                  /* proprietor name */
-       char owner_name[20];            /* proprietor name */
+       GAME_TEXT name[20];                  /* proprietor name */
+       GAME_TEXT owner_name[20];            /* proprietor name */
        char owner_race[20];            /* proprietor race */
 
-       char act_names[8][30];          /* action names */
+       GAME_TEXT act_names[8][30];          /* action names */
        PRICE member_costs[8];           /* Costs for class members of building */
        PRICE other_costs[8];               /* Costs for nonguild members */
        char letters[8];                /* action letters */
@@ -1499,12 +1509,12 @@ struct border_type
 typedef struct wilderness_type wilderness_type;
 struct wilderness_type
 {
-       int         terrain;
-       int         town;
-       int         road;
-       u32b        seed;
-       DEPTH        level;
-       byte        entrance;
+       int terrain;
+       int town;
+       int road;
+       u32b seed;
+       DEPTH level;
+       byte entrance;
 };
 
 
@@ -1515,20 +1525,19 @@ struct wilderness_type
 typedef struct town_type town_type;
 struct town_type
 {
-       char        name[32];
-       u32b        seed;      /* Seed for RNG */
-       store_type      *store;    /* The stores [MAX_STORES] */
-       byte        numstores;
+       GAME_TEXT name[32];
+       u32b seed;      /* Seed for RNG */
+       store_type *store;    /* The stores [MAX_STORES] */
+       byte numstores;
 };
 
 /* Dungeons */
 typedef struct dun_type dun_type;
 struct dun_type
 {
-       byte min_level; /* Minimum level in the dungeon */
-       byte max_level; /* Maximum dungeon level allowed */
-
-       cptr name;      /* The name of the dungeon */
+       DEPTH min_level; /* Minimum level in the dungeon */
+       DEPTH max_level; /* Maximum dungeon level allowed */
+       concptr name;      /* The name of the dungeon */
 };
 
 /*
@@ -1538,8 +1547,8 @@ typedef struct tag_type tag_type;
 
 struct tag_type
 {
-       int     tag;
-       int     index;
+       int tag;
+       int index;
 };
 
 typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
@@ -1566,24 +1575,24 @@ typedef struct high_score high_score;
 
 struct high_score
 {
-       char what[8];           /* Version info (string) */
-       char pts[10];           /* Total Score (number) */
-       char gold[10];          /* Total Gold (number) */
-       char turns[10];         /* Turns Taken (number) */
-       char day[10];           /* Time stamp (string) */
-       char who[16];           /* Player Name (string) */
-       char uid[8];            /* Player UID (number) */
-       char sex[2];            /* Player Sex (string) */
-       char p_r[3];            /* Player Race (number) */
-       char p_c[3];            /* Player Class (number) */
-       char p_a[3];            /* Player Seikaku (number) */
-
-       char cur_lev[4];                /* Current Player Level (number) */
-       char cur_dun[4];                /* Current Dungeon Level (number) */
-       char max_lev[4];                /* Max Player Level (number) */
-       char max_dun[4];                /* Max Dungeon Level (number) */
-
-       char how[40];           /* Method of death (string) */
+       GAME_TEXT what[8];              /* Version info (string) */
+       GAME_TEXT pts[10];              /* Total Score (number) */
+       GAME_TEXT gold[10];             /* Total Gold (number) */
+       GAME_TEXT turns[10];            /* Turns Taken (number) */
+       GAME_TEXT day[10];              /* Time stamp (string) */
+       GAME_TEXT who[16];              /* Player Name (string) */
+       GAME_TEXT uid[8];               /* Player UID (number) */
+       GAME_TEXT sex[2];               /* Player Sex (string) */
+       GAME_TEXT p_r[3];               /* Player Race (number) */
+       GAME_TEXT p_c[3];               /* Player Class (number) */
+       GAME_TEXT p_a[3];               /* Player Seikaku (number) */
+
+       GAME_TEXT cur_lev[4];           /* Current Player Level (number) */
+       GAME_TEXT cur_dun[4];           /* Current Dungeon Level (number) */
+       GAME_TEXT max_lev[4];           /* Max Player Level (number) */
+       GAME_TEXT max_dun[4];           /* Max Dungeon Level (number) */
+
+       GAME_TEXT how[40];              /* Method of death (string) */
 };
 
 
@@ -1598,8 +1607,9 @@ feat_prob;
 /* A structure for the != dungeon types */
 typedef struct dungeon_info_type dungeon_info_type;
 struct dungeon_info_type {
-       STR_OFFSET name;                /* Name */
-       STR_OFFSET text;                /* Description */
+
+       STR_OFFSET name; /* Name */
+       STR_OFFSET text; /* Description */
 
        POSITION dy;
        POSITION dx;
@@ -1654,8 +1664,8 @@ struct dungeon_info_type {
  * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
  */
 typedef struct {
-       cptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
-       cptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
+       concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
+       concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
        BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
        byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
        byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
@@ -1732,7 +1742,7 @@ typedef struct {
 #endif
 
 typedef struct {
-       cptr flag;
+       concptr flag;
        byte index;
        byte level;
        s32b value;
@@ -1740,11 +1750,11 @@ typedef struct {
                int constant;
                DICE_NUMBER dice;
        } timeout;
-       cptr desc;
+       concptr desc;
 } activation_type;
 
 typedef struct {
        int flag;
        int type;
-       cptr name;
+       concptr name;
 } dragonbreath_type;