X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Ftypes.h;h=550076dabcb2869823b00eeb0b1fb00b2c9ee7d0;hb=32838e337dd387e48039b85154bcb5b4e38ab98c;hp=a1e0af068730ffe193ec7a31fb888bc379abf1b7;hpb=93f0530b7a28d995a3544caea505074aac4d2fe7;p=hengband%2Fhengband.git diff --git a/src/types.h b/src/types.h index a1e0af068..550076dab 100644 --- a/src/types.h +++ b/src/types.h @@ -1,21 +1,19 @@ -/* File: types.h */ - -/* +/*! + * @file types.h + * @brief ã°ãã¼ãã«ãªæ§é ä½ã®å®ç¾© / global type declarations + * @date 2014/08/10 + * @author + *
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke - * * This software may be copied and distributed for educational, research, * and not for profit purposes provided that this copyright and statement * are included in all such copies. Other copyrights may also apply. - */ - -/* Purpose: global type declarations */ - - -/* + *+ * @details + *
+ * ãã®ãã¡ã¤ã«ã¯angband.hã§ã®ã¿ã¤ã³ã¯ã«ã¼ããããã¨ã * This file should ONLY be included by "angband.h" - */ - -/* + * * Note that "char" may or may not be signed, and that "signed char" * may or may not work on all machines. So always use "s16b" or "s32b" * for signed values. Also, note that unsigned values cause math problems @@ -42,41 +40,61 @@ * in "header_type", and the "m_idx" and "o_idx" fields in "cave_type". All * of these could be removed, but this would, in general, slow down the game * and increase the complexity of the code. + **/ +/*! + * @struct feature_state + * @brief å°å½¢ç¶æ å¤åæå®æ§é ä½ / Feature state structure + */ +typedef struct feature_state feature_state; +struct feature_state +{ + byte action; /*!< å¤åæ¡ä»¶ãFF_*ã®IDã§æå® / Action (FF_*) */ + s16b result; /*!< å¤åå ID / Result (f_info ID) */ +}; -/* - * Information about terrain "features" +/*! + * @struct feature_type + * @brief å°å½¢æ å ±ã®æ§é ä½ / Information about terrain "features" */ typedef struct feature_type feature_type; struct feature_type { - u32b name; /* Name (offset) */ - u32b text; /* Text (offset) */ + u32b name; /*!< å°å½¢ååç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Name (offset) */ + u32b text; /*!< å°å½¢èª¬æåç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Text (offset) */ + s16b tag; /*!< å°å½¢ç¹æ§ã¿ã°åç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Tag (offset) */ + + s16b mimic; /*!< æªç¢ºå®æã®å¤å½¢å°å½¢ID / Feature to mimic */ - byte mimic; /* Feature to mimic */ + u32b flags[FF_FLAG_SIZE]; /*!< å°å½¢ã®åºæ¬ç¹æ§ãããé å / Flags */ - byte extra; /* Extra byte (unused) */ + u16b priority; /*!< 縮å°è¡¨ç¤ºã§çç¥ããéã®è¡¨ç¤ºåªå 度 / Map priority */ + s16b destroyed; /*!< *ç ´å£*ã«å·»ãè¾¼ã¾ããæã®å°å½¢ç§»è¡å (æªå®è£ ï¼) / Default destroyed state */ - s16b unused; /* Extra bytes (unused) */ + feature_state state[MAX_FEAT_STATES]; /*!< feature_state ãã¼ãã« */ - byte d_attr; /* Default feature attribute */ - byte d_char; /* Default feature character */ + byte subtype; /*!< å¯ç¹æ§å¤ */ + byte power; /*!< å°å½¢å¼·åº¦ */ + byte d_attr[F_LIT_MAX]; /*!< ããã©ã«ãã®å°å½¢ã·ã³ãã«ã«ã©ã¼ / Default feature attribute */ + byte d_char[F_LIT_MAX]; /*!< ããã©ã«ãã®å°å½¢ã·ã³ãã«ã¢ã«ãã¡ããã / Default feature character */ - byte x_attr; /* Desired feature attribute */ - byte x_char; /* Desired feature character */ + byte x_attr[F_LIT_MAX]; /*!< è¨å®å¤æ´å¾ã®å°å½¢ã·ã³ãã«ã«ã©ã¼ / Desired feature attribute */ + byte x_char[F_LIT_MAX]; /*!< è¨å®å¤æ´å¾ã®å°å½¢ã·ã³ãã«ã¢ã«ãã¡ããã / Desired feature character */ }; -/* - * Information about object "kinds", including player knowledge. - * +/*! + * @struct object_kind + * @brief ãã¼ã¹ã¢ã¤ãã æ å ±ã®æ§é ä½ / Information about object "kinds", including player knowledge. + * @details + * ã²ã¼ã é²è¡ç¨ã®ã»ã¼ããã¡ã¤ã«ä¸ã§ã¯ aware 㨠tried ã®ã¿ä¿å対象ã¨ãããã¨ãã¨è±æã§ã¯ãããå®éã¯ãã£ã¨ããæ§åã§ããã / * Only "aware" and "tried" are saved in the savefile */ @@ -84,100 +102,101 @@ typedef struct object_kind object_kind; struct object_kind { - u32b name; /* Name (offset) */ - u32b text; /* Text (offset) */ + u32b name; /*!< ãã¼ã¹ã¢ã¤ãã ååç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Name (offset) */ + u32b text; /*!< 解説ããã¹ãåç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Text (offset) */ + u32b flavor_name; /*!< æªç¢ºå®ååç §ã®ããã®ãã¼ã ãããã¡ãªãã»ããå¤ / Flavor name (offset) */ - byte tval; /* Object type */ - byte sval; /* Object sub type */ + byte tval; /*!< ãã¼ã¹ã¢ã¤ãã 種å¥ã®å¤§é ç®å¤ Object type */ + byte sval; /*!< ãã¼ã¹ã¢ã¤ãã 種å¥ã®å°é ç®å¤ Object sub type */ - s16b pval; /* Object extra info */ + s16b pval; /*!< ãã¼ã¹ã¢ã¤ãã ã®pvalï¼è½åä¿®æ£å ±éå¤ï¼ Object extra info */ - s16b to_h; /* Bonus to hit */ - s16b to_d; /* Bonus to damage */ - s16b to_a; /* Bonus to armor */ + s16b to_h; /*!< ãã¼ã¹ã¢ã¤ãã ã®å½ä¸ä¿®æ£å¤ / Bonus to hit */ + s16b to_d; /*!< ãã¼ã¹ã¢ã¤ãã ã®ãã¡ã¼ã¸ä¿®æ£å¤ / Bonus to damage */ + s16b to_a; /*!< ãã¼ã¹ã¢ã¤ãã ã®ACä¿®æ£å¤ / Bonus to armor */ - s16b ac; /* Base armor */ + s16b ac; /*!< ãã¼ã¹ã¢ã¤ãã ã®ACåºæ¬å¤ / Base armor */ - byte dd, ds; /* Damage dice/sides */ - - s16b weight; /* Weight */ + byte dd, ds; /*!< ãã¡ã¼ã¸ãã¤ã¹ã®æ°ã¨å¤§ãã / Damage dice/sides */ - s32b cost; /* Object "base cost" */ + s16b weight; /*!< ãã¼ã¹ã¢ã¤ãã ã®éé / Weight */ - u32b flags[TR_FLAG_SIZE]; /* Flags */ + s32b cost; /*!< ãã¼ã¹ã¢ã¤ãã ã®åºæ¬ä¾¡å¤ / Object "base cost" */ - u32b gen_flags; /* flags for generate */ + u32b flags[TR_FLAG_SIZE]; /*!< ãã¼ã¹ã¢ã¤ãã ã®åºæ¬ç¹æ§ãããé å / Flags */ - byte locale[4]; /* Allocation level(s) */ - byte chance[4]; /* Allocation chance(s) */ + u32b gen_flags; /*!< ãã¼ã¹ã¢ã¤ãã ã®çæç¹æ§ãããé å / flags for generate */ - byte level; /* Level */ - byte extra; /* Something */ + byte locale[4]; /*!< ãã¼ã¹ã¢ã¤ãã ã®çæéãã¼ãã« / Allocation level(s) */ + byte chance[4]; /*!< ãã¼ã¹ã¢ã¤ãã ã®çæ確çãã¼ãã« / Allocation chance(s) */ + byte level; /*!< ãã¼ã¹ã¢ã¤ãã ã®åºæ¬çæé / Level */ + byte extra; /*!< ãã®ä»è²ã ã®ããããã©ã°é å / Something */ - byte d_attr; /* Default object attribute */ - byte d_char; /* Default object character */ + byte d_attr; /*!< ããã©ã«ãã®ã¢ã¤ãã ã·ã³ãã«ã«ã©ã¼ / Default object attribute */ + byte d_char; /*!< ããã©ã«ãã®ã¢ã¤ãã ã·ã³ãã«ã¢ã«ãã¡ããã / Default object character */ + byte x_attr; /*!< è¨å®å¤æ´å¾ã®ã¢ã¤ãã ã·ã³ãã«ã«ã©ã¼ / Desired object attribute */ + byte x_char; /*!< è¨å®å¤æ´å¾ã®ã¢ã¤ãã ã·ã³ãã«ã¢ã«ãã¡ããã / Desired object character */ - byte x_attr; /* Desired object attribute */ - byte x_char; /* Desired object character */ + s16b flavor; /*!< 調æ»ä¸(TODO) / Special object flavor (or zero) */ + bool easy_know; /*!< ãã¼ã¹ã¢ã¤ãã ãåæãããã¼ã¹åãå¤æå¯è½ãã©ãã / This object is always known (if aware) */ - byte flavor; /* Special object flavor (or zero) */ + bool aware; /*!< ãã¼ã¹ã¢ã¤ãã ãéå®æ¸ãã©ãã / The player is "aware" of the item's effects */ - bool easy_know; /* This object is always known (if aware) */ + bool tried; /*!< ãã¼ã¹ã¢ã¤ãã ãæªéå®ã®ã¾ã¾è©¦ãããã¨ãããã / The player has "tried" one of the items */ - - bool aware; /* The player is "aware" of the item's effects */ - - bool tried; /* The player has "tried" one of the items */ + byte act_idx; /*!< çºåè½åã®ID / Activative ability index */ }; -/* - * Information about "artifacts". - * - * Note that the save-file only writes "cur_num" to the savefile. - * - * Note that "max_num" is always "1" (if that artifact "exists") - */ - typedef struct artifact_type artifact_type; +/*! + * @struct artifact_type + * @brief åºå®ã¢ã¼ãã£ãã¡ã¯ãæ å ±ã®æ§é ä½ / Artifact structure. + * @details + * @note + * the save-file only writes "cur_num" to the savefile. + * "max_num" is always "1" (if that artifact "exists") + */ struct artifact_type { - u32b name; /* Name (offset) */ - u32b text; /* Text (offset) */ + u32b name; /*!< ã¢ã¼ãã£ãã¡ã¯ãå(headerãªãã»ããåç §) / Name (offset) */ + u32b text; /*!< ã¢ã¼ãã£ãã¡ã¯ã解説(headerãªãã»ããåç §) / Text (offset) */ - byte tval; /* Artifact type */ - byte sval; /* Artifact sub type */ + byte tval; /*!< ãã¼ã¹ã¢ã¤ãã 大é ç®ID / Artifact type */ + byte sval; /*!< ãã¼ã¹ã¢ã¤ãã å°é ç®ID / Artifact sub type */ - s16b pval; /* Artifact extra info */ + s16b pval; /*!< pvalä¿®æ£å¤ / Artifact extra info */ - s16b to_h; /* Bonus to hit */ - s16b to_d; /* Bonus to damage */ - s16b to_a; /* Bonus to armor */ + s16b to_h; /*!< å½ä¸ãã¼ãã¹å¤ / Bonus to hit */ + s16b to_d; /*!< ãã¡ã¼ã¸ãã¼ãã¹å¤ / Bonus to damage */ + s16b to_a; /*!< ACãã¼ãã¹å¤ / Bonus to armor */ - s16b ac; /* Base armor */ + s16b ac; /*!< ä¸æ¸ããã¼ã¹ACå¤ / Base armor */ - byte dd, ds; /* Damage when hits */ + byte dd, ds; /*!< ãã¤ã¹å¤ / Damage when hits */ - s16b weight; /* Weight */ + s16b weight; /*!< éé / Weight */ - s32b cost; /* Artifact "cost" */ + s32b cost; /*!< åºæ¬ä¾¡æ ¼ / Artifact "cost" */ - u32b flags[TR_FLAG_SIZE]; /* Artifact Flags */ + u32b flags[TR_FLAG_SIZE]; /*! ã¢ã¤ãã ãã©ã° / Artifact Flags */ - u32b gen_flags; /* flags for generate */ + u32b gen_flags; /*! ã¢ã¤ãã çæãã©ã° / flags for generate */ + + byte level; /*! åºæ¬çæé / Artifact level */ + byte rarity; /*! ã¬ã¢ãªã㣠/ Artifact rarity */ - byte level; /* Artifact level */ - byte rarity; /* Artifact rarity */ + byte cur_num; /*! ç¾å¨ã®çææ° / Number created (0 or 1) */ + byte max_num; /*! (æªä½¿ç¨)æ大çææ° / Unused (should be "1") */ - byte cur_num; /* Number created (0 or 1) */ - byte max_num; /* Unused (should be "1") */ + s16b floor_id; /*! ã¢ã¤ãã ãè½ã¨ããããã¢ã®ID / Leaved on this location last time */ - s16b floor_id; /* Leaved on this location last time */ + byte act_idx; /*! çºåè½åID / Activative ability index */ }; @@ -209,6 +228,8 @@ struct ego_item_type u32b flags[TR_FLAG_SIZE]; /* Ego-Item Flags */ u32b gen_flags; /* flags for generate */ + + byte act_idx; /* Activative ability index */ }; @@ -234,6 +255,14 @@ struct monster_blow }; +typedef struct mbe_info_type mbe_info_type; + +struct mbe_info_type +{ + int power; /* The attack "power" */ + int explode_type; /* Explosion effect */ +}; + /* * Monster "race" information, including racial memories @@ -260,38 +289,51 @@ typedef struct monster_race monster_race; struct monster_race { - u32b name; /* Name (offset) */ + u32b name; /*!< ååãã¼ã¿ã®ãªãã»ãã(æ¥æ¬èª) / Name offset(Japanese) */ #ifdef JP - u32b E_name; /* ±Ñ¸ì̾ (offset) */ + u32b E_name; /*!< ååãã¼ã¿ã®ãªãã»ãã(è±èª) / Name offset(English) */ #endif - u32b text; /* Text (offset) */ + u32b text; /*!< æãåºããã¹ãã®ãªãã»ãã / Lore text offset */ - byte hdice; /* Creatures hit dice count */ - byte hside; /* Creatures hit dice sides */ + byte hdice; /*!< HPã®ãã¤ã¹æ° / Creatures hit dice count */ + byte hside; /*!< HPã®ãã¤ã¹é¢æ° / Creatures hit dice sides */ - s16b ac; /* Armour Class */ + s16b ac; /*!< ã¢ã¼ãã¼ã¯ã©ã¹ / Armour Class */ - s16b sleep; /* Inactive counter (base) */ - byte aaf; /* Area affect radius (1-100) */ - byte speed; /* Speed (normally 110) */ + s16b sleep; /*!< ç¡ç å¤ / Inactive counter (base) */ + byte aaf; /*!< æç¥ç¯å²(1-100ã¹ã¯ã¨ã¢) / Area affect radius (1-100) */ + byte speed; /*!< å é(110ã§+0) / Speed (normally 110) */ - s32b mexp; /* Exp value for kill */ + s32b mexp; /*!< 殺害æåºæ¬çµé¨å¤ / Exp value for kill */ - s16b extra; /* Unused (for now) */ + s16b extra; /*!< æªä½¿ç¨ / Unused (for now) */ - byte freq_spell; /* Spell frequency */ + byte freq_spell; /*!< éæ³ï¼ç¹æ®è½åä»æ§é »åº¦(1/n) / Spell frequency */ u32b flags1; /* Flags 1 (general) */ u32b flags2; /* Flags 2 (abilities) */ u32b flags3; /* Flags 3 (race/resist) */ u32b flags4; /* Flags 4 (inate/breath) */ - u32b flags5; /* Flags 5 (normal spells) */ - u32b flags6; /* Flags 6 (special spells) */ u32b flags7; /* Flags 7 (movement related abilities) */ u32b flags8; /* Flags 8 (wilderness info) */ u32b flags9; /* Flags 9 (drops info) */ + u32b flagsr; /* Flags R (resistances info) */ + + u32b a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */ + u32b a_ability_flags2; /* Activate Ability Flags 6 (special spells) */ + u32b a_ability_flags3; /* Activate Ability Flags 7 (implementing) */ + u32b a_ability_flags4; /* Activate Ability Flags 8 (implementing) */ monster_blow blow[4]; /* Up to four blows per round */ + u16b reinforce_id[6]; + u16b reinforce_dd[6]; + u16b reinforce_ds[6]; + + u16b artifact_id[4]; /* ç¹å®ã¢ã¼ãã£ãã¡ã¯ãããããID */ + u16b artifact_rarity[4]; /* ç¹å®ã¢ã¼ãã£ãã¡ã¯ãã¬ã¢åº¦ */ + u16b artifact_percent[4]; /* ç¹å®ã¢ã¼ãã£ãã¡ã¯ãããããç */ + + u32b arena_ratio; /* ã¢ãªã¼ãã®è©ä¾¡ä¿®æ£å¤(%åºæº / 0=100%) / Arena */ s16b next_r_idx; u32b next_exp; @@ -312,13 +354,14 @@ struct monster_race byte cur_num; /* Monster population on current level */ - s16b floor_id; /* Location of unique monster */ + s16b floor_id; /* Location of unique monster */ s16b r_sights; /* Count sightings of this monster */ s16b r_deaths; /* Count deaths from this monster */ - s16b r_pkills; /* Count monsters killed in this life */ + s16b r_pkills; /* Count visible monsters killed in this life */ + s16b r_akills; /* Count all monsters killed in this life */ s16b r_tkills; /* Count monsters killed in all lives */ byte r_wake; /* Number of times woken up (?) */ @@ -340,7 +383,8 @@ struct monster_race u32b r_flags4; /* Observed racial flags */ u32b r_flags5; /* Observed racial flags */ u32b r_flags6; /* Observed racial flags */ - u32b r_flags7; /* Observed racial flags */ + /* u32b r_flags7; */ /* Observed racial flags */ + u32b r_flagsr; /* Observed racial resistance flags */ }; @@ -412,7 +456,7 @@ struct cave_type { u16b info; /* Hack -- cave flags */ - byte feat; /* Hack -- feature type */ + s16b feat; /* Hack -- feature type */ s16b o_idx; /* Object in this grid */ @@ -420,7 +464,7 @@ struct cave_type s16b special; /* Special cave info */ - byte mimic; /* Feature to mimic */ + s16b mimic; /* Feature to mimic */ byte cost; /* Hack -- cost of flowing */ byte dist; /* Hack -- distance from player */ @@ -494,10 +538,10 @@ struct object_type byte name2; /* Ego-Item type, if any */ byte xtra1; /* Extra info type (now unused) */ - byte xtra2; /* Extra info index */ - byte xtra3; /* Extra info */ - s16b xtra4; /* Extra info */ - s16b xtra5; /* Extra info */ + byte xtra2; /* Extra info activation index */ + byte xtra3; /* Extra info for weaponsmith */ + s16b xtra4; /* Extra info fuel or captured monster's current HP */ + s16b xtra5; /* Extra info captured monster's max HP */ s16b to_h; /* Plusses to hit */ s16b to_d; /* Plusses to damage */ @@ -525,27 +569,6 @@ struct object_type s16b next_o_idx; /* Next object in stack (if any) */ s16b held_m_idx; /* Monster holding us (if any) */ - -#ifdef SCRIPT_OBJ_KIND - char *name; - - byte d_attr; /* Default object attribute */ - byte d_char; /* Default object character */ - - - byte x_attr; /* Desired object attribute */ - byte x_char; /* Desired object character */ - - - byte flavor; /* Special object flavor (or zero) */ - - bool easy_know; /* This object is always known (if aware) */ - - - bool aware; /* The player is "aware" of the item's effects */ - - bool tried; /* The player has "tried" one of the items */ -#endif /* SCRIPT_OBJ_KIND */ }; @@ -573,19 +596,13 @@ struct monster_type s16b hp; /* Current Hit points */ s16b maxhp; /* Max Hit points */ s16b max_maxhp; /* Max Max Hit points */ + u32b dealt_damage; /* Sum of damages dealt by player */ - s16b csleep; /* Inactive counter */ + s16b mtimed[MAX_MTIMED]; /* Timed status counter */ byte mspeed; /* Monster "speed" */ s16b energy_need; /* Monster "energy" */ - byte fast; /* Monster is stunned */ - byte slow; /* Monster is stunned */ - byte stunned; /* Monster is stunned */ - byte confused; /* Monster is confused */ - byte monfear; /* Monster is afraid */ - byte invulner; /* Monster is temporarily invulnerable */ - byte cdis; /* Current dis from player */ byte mflag; /* Extra monster flags */ @@ -602,23 +619,9 @@ struct monster_type u32b exp; -#ifdef WDT_TRACK_OPTIONS - - byte ty; /* Y location of target */ - byte tx; /* X location of target */ - - byte t_dur; /* How long are we tracking */ - - byte t_bit; /* Up to eight bit flags */ - -#endif /* WDT_TRACK_OPTIONS */ - -#ifdef DRS_SMART_OPTIONS - u32b smart; /* Field for "smart_learn" */ -#endif /* DRS_SMART_OPTIONS */ - + s16b parent_m_idx; }; @@ -682,31 +685,34 @@ struct option_type }; -/* - * Structure for the "quests" - */ typedef struct quest_type quest_type; +/*! + * @struct quest_type + * @brief ã¯ã¨ã¹ãæ å ±ã®æ§é ä½ / Structure for the "quests". + */ + struct quest_type { - s16b status; /* Is the quest taken, completed, finished? */ + s16b status; /*!< ã¯ã¨ã¹ãã®é²è¡ã¹ãã¼ã¿ã¹ / Is the quest taken, completed, finished? */ - s16b type; /* The quest type */ + s16b type; /*!< ã¯ã¨ã¹ãã®ç¨®å¥ / The quest type */ - char name[60]; /* Quest name */ - s16b level; /* Dungeon level */ - s16b r_idx; /* Monster race */ + char name[60]; /*!< ã¯ã¨ã¹ãå / Quest name */ + s16b level; /*!< å¦çé層 / Dungeon level */ + s16b r_idx; /*!< ã¯ã¨ã¹ã対象ã®ã¢ã³ã¹ã¿ã¼ID / Monster race */ - s16b cur_num; /* Number killed */ - s16b max_num; /* Number required */ + s16b cur_num; /*!< æç ´ããã¢ã³ã¹ã¿ã¼ã®æ° / Number killed */ + s16b max_num; /*!< æ±ããããã¢ã³ã¹ã¿ã¼ã®æç ´æ° / Number required */ - s16b k_idx; /* object index */ - s16b num_mon; /* number of monsters on level */ + s16b k_idx; /*!< ã¯ã¨ã¹ã対象ã®ã¢ã¤ãã ID / object index */ + s16b num_mon; /*!< QUEST_TYPE_KILL_NUMBERæã®ç®æ¨æç ´æ° number of monsters on level */ - byte flags; /* quest flags */ - byte dungeon; /* quest dungeon */ + byte flags; /*!< ã¯ã¨ã¹ãã«é¢ãããã©ã°ããã / quest flags */ + byte dungeon; /*!< ã¯ã¨ã¹ã対象ã®ãã³ã¸ã§ã³ID / quest dungeon */ - byte complev; /* player level (complete) */ + byte complev; /*!< ã¯ãªã¢æãã¬ã¤ã¤ã¼ã¬ãã« / player level (complete) */ + u32b comptime; /*!< ã¯ãªã¢æã²ã¼ã æé / quest clear time*/ }; @@ -719,7 +725,7 @@ struct owner_type { cptr owner_name; /* Name */ - s16b max_cost; /* Purse limit */ + s32b max_cost; /* Purse limit */ byte max_inflate; /* Inflation (max) */ byte min_inflate; /* Inflation (min) */ @@ -816,8 +822,8 @@ struct player_sex cptr title; /* Type of sex */ cptr winner; /* Name of winner */ #ifdef JP - cptr E_title; /* ±Ñ¸ìÀÊÌ */ - cptr E_winner; /* ±Ñ¸ìÀÊÌ */ + cptr E_title; /* è±èªæ§å¥ */ + cptr E_winner; /* è±èªæ§å¥ */ #endif }; @@ -833,7 +839,7 @@ struct player_race cptr title; /* Type of race */ #ifdef JP - cptr E_title; /* ±Ñ¸ì¼ï² */ + cptr E_title; /* è±èªç¨®æ */ #endif s16b r_adj[6]; /* Racial stat bonuses */ @@ -880,7 +886,7 @@ struct player_class cptr title; /* Type of class */ #ifdef JP - cptr E_title; /* ±Ñ¸ì¿¦¶È */ + cptr E_title; /* è±èªè·æ¥ */ #endif s16b c_adj[6]; /* Class stat modifier */ @@ -915,7 +921,7 @@ struct player_seikaku cptr title; /* Type of seikaku */ #ifdef JP - cptr E_title; /* ±Ñ¸ìÀ³Ê */ + cptr E_title; /* è±èªæ§æ ¼ */ #endif s16b a_adj[6]; /* seikaku stat bonuses */ @@ -931,7 +937,7 @@ struct player_seikaku s16b a_mhp; /* Race hit-dice modifier */ - byte no; /* ¤Î */ + byte no; /* ã® */ byte sex; /* seibetu seigen */ }; @@ -980,9 +986,10 @@ struct player_type s32b au; /* Current Gold */ + s32b max_max_exp; /* Max max experience (only to calculate score) */ s32b max_exp; /* Max experience */ s32b exp; /* Cur experience */ - u16b exp_frac; /* Cur exp frac (times 2^16) */ + u32b exp_frac; /* Cur exp frac (times 2^16) */ s16b lev; /* Level */ @@ -992,19 +999,17 @@ struct player_type s16b inside_quest; /* Inside quest level */ bool inside_battle; /* Is character inside tougijou? */ - s16b rewards[MAX_BACT]; /* Status of rewards in town */ - s32b wilderness_x; /* Coordinates in the wilderness */ s32b wilderness_y; bool wild_mode; - s16b mhp; /* Max hit pts */ - s16b chp; /* Cur hit pts */ - u16b chp_frac; /* Cur hit frac (times 2^16) */ + s32b mhp; /* Max hit pts */ + s32b chp; /* Cur hit pts */ + u32b chp_frac; /* Cur hit frac (times 2^16) */ - s16b msp; /* Max mana pts */ - s16b csp; /* Cur mana pts */ - u16b csp_frac; /* Cur mana frac (times 2^16) */ + s32b msp; /* Max mana pts */ + s32b csp; /* Cur mana pts */ + u32b csp_frac; /* Cur mana frac (times 2^16) */ s16b max_plv; /* Max Player Level */ @@ -1055,7 +1060,7 @@ struct player_type s16b tim_regen; s16b kabenuke; s16b tim_stealth; - s16b tim_ffall; + s16b tim_levitation; s16b tim_sh_touki; s16b lightspeed; s16b tsubureru; @@ -1086,6 +1091,7 @@ struct player_type byte recall_dungeon; /* Dungeon set to be recalled */ s16b energy_need; /* Energy needed for next move */ + s16b enchant_energy_need; /* Energy needed for next upkeep effect */ s16b food; /* Current nutrition */ @@ -1103,7 +1109,7 @@ struct player_type s16b spell_exp[64]; /* Proficiency of spells */ s16b weapon_exp[5][64]; /* Proficiency of weapons */ - s16b skill_exp[10]; /* Proficiency of misc. skill */ + s16b skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */ s32b magic_num1[108]; /* Array for non-spellbook type magic */ byte magic_num2[108]; /* Flags for non-spellbook type magics */ @@ -1112,8 +1118,11 @@ struct player_type s16b mane_dam[MAX_MANE]; s16b mane_num; + s16b concent; /* Sniper's concentration level */ + s16b player_hp[PY_MAX_LEVEL]; char died_from[80]; /* What killed the player */ + cptr last_message; /* Last message on death or retirement */ char history[4][60]; /* Textual "history" for the Player */ u16b total_winner; /* Total winner */ @@ -1143,13 +1152,18 @@ struct player_type bool dtrap; /* Whether you are on trap-safe grids */ s16b floor_id; /* Current floor location */ + bool autopick_autoregister; /* auto register is in-use or not */ + + byte feeling; /* Most recent dungeon feeling */ + s32b feeling_turn; /* The turn of the last dungeon feeling */ + + /*** Temporary fields ***/ bool playing; /* True if player is playing */ bool leaving; /* True if player is leaving */ byte exit_bldg; /* Goal obtained in arena? -KMW- */ - byte leftbldg; /* did we just leave a special area? -KMW- */ bool leaving_dungeon; /* True if player is leaving the dungeon */ bool teleport_town; @@ -1254,12 +1268,12 @@ struct player_type u32b cursed; /* Player is cursed */ bool can_swim; /* No damage falling */ - bool ffall; /* No damage falling */ + bool levitation; /* No damage falling */ bool lite; /* Permanent light */ bool free_act; /* Never paralyzed */ bool see_inv; /* Can see invisible */ bool regenerate; /* Regenerate hit pts */ - bool hold_life; /* Resist life draining */ + bool hold_exp; /* Resist exp draining */ bool telepathy; /* Telepathy */ bool esp_animal; @@ -1286,6 +1300,10 @@ struct player_type bool heavy_spell; bool warning; bool mighty_throw; + bool see_nocto; /* Noctovision */ + + s16b to_dd[2]; /* Extra dice/sides */ + s16b to_ds[2]; s16b dis_to_h[2]; /* Known bonus to hit (wield) */ s16b dis_to_h_b; /* Known bonus to hit (bow) */ @@ -1330,7 +1348,13 @@ struct player_type byte tval_ammo; /* Correct ammo tval */ - s16b pspeed; /* Current speed */ + byte pspeed; /* Current speed */ + + s16b energy_use; /* Energy use this turn */ + + int y; /* Player location in dungeon */ + int x; /* Player location in dungeon */ + char name[32]; /* Current player's character name */ }; @@ -1365,7 +1389,6 @@ struct birther char history[4][60]; - byte quests; bool quick_ok; }; @@ -1453,14 +1476,14 @@ struct building_type typedef struct border_type border_type; struct border_type { - byte north[MAX_WID]; - byte south[MAX_WID]; - byte east[MAX_HGT]; - byte west[MAX_HGT]; - byte north_west; - byte north_east; - byte south_west; - byte south_east; + s16b north[MAX_WID]; + s16b south[MAX_WID]; + s16b east[MAX_HGT]; + s16b west[MAX_HGT]; + s16b north_west; + s16b north_east; + s16b south_west; + s16b south_east; }; @@ -1511,7 +1534,7 @@ typedef struct tag_type tag_type; struct tag_type { int tag; - void *pointer; + int index; }; typedef bool (*monster_hook_type)(int r_idx); @@ -1565,6 +1588,15 @@ struct high_score char how[40]; /* Method of death (string) */ }; + +typedef struct +{ + s16b feat; /* Feature tile */ + byte percent; /* Chance of type */ +} +feat_prob; + + /* A structure for the != dungeon types */ typedef struct dungeon_info_type dungeon_info_type; struct dungeon_info_type { @@ -1574,25 +1606,16 @@ struct dungeon_info_type { byte dy; byte dx; - byte floor1; /* Floor tile 1 */ - byte floor_percent1; /* Chance of type 1 */ - byte floor2; /* Floor tile 2 */ - byte floor_percent2; /* Chance of type 2 */ - byte floor3; /* Floor tile 3 */ - byte floor_percent3; /* Chance of type 3 */ - byte outer_wall; /* Outer wall tile */ - byte inner_wall; /* Inner wall tile */ - s16b stream1; /* stream tile */ - s16b stream2; /* stream tile */ - byte fill_type1; /* Cave tile 1 */ - byte fill_percent1; /* Chance of type 1 */ - byte fill_type2; /* Cave tile 2 */ - byte fill_percent2; /* Chance of type 2 */ - byte fill_type3; /* Cave tile 3 */ - byte fill_percent3; /* Chance of type 3 */ - s16b mindepth; /* Minimal depth */ - s16b maxdepth; /* Maximal depth */ - byte min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */ + feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */ + feat_prob fill[DUNGEON_FEAT_PROB_NUM]; /* Cave wall probability */ + s16b outer_wall; /* Outer wall tile */ + s16b inner_wall; /* Inner wall tile */ + s16b stream1; /* stream tile */ + s16b stream2; /* stream tile */ + + s16b mindepth; /* Minimal depth */ + s16b maxdepth; /* Maximal depth */ + byte min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */ s16b pit; s16b nest; byte mode; /* Mode of combinaison of the monster flags */ @@ -1606,11 +1629,15 @@ struct dungeon_info_type { u32b mflags2; u32b mflags3; u32b mflags4; - u32b mflags5; - u32b mflags6; u32b mflags7; u32b mflags8; u32b mflags9; + u32b mflagsr; + + u32b m_a_ability_flags1; + u32b m_a_ability_flags2; + u32b m_a_ability_flags3; + u32b m_a_ability_flags4; char r_char[5]; /* Monster race allowed */ int final_object; /* The object you'll find at the bottom */ @@ -1624,16 +1651,17 @@ struct dungeon_info_type { }; -/* - * A structure type for entry of auto-picker/destroyer +/*! + * @struct autopick_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' */ - u32b 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 */ - byte bonus; /* Items which have more than 'bonus' magical bonus match */ + cptr name; /*!< èªåæ¾ã/ç ´å£å®ç¾©ã®å称ä¸è´åºæº / Items which have 'name' as part of its name match */ + cptr insc; /*!< 対象ã¨ãªã£ãã¢ã¤ãã ã«èªåã§å»ãå 容 / Items will be auto-inscribed as 'insc' */ + u32b 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 */ + byte bonus; /*!< ã¢ã¤ãã ã®ãã¼ãã¹åºæºå¤ / Items which have more than 'bonus' magical bonus match */ } autopick_type; @@ -1658,19 +1686,67 @@ typedef struct typedef struct { u16b info; - byte feat; - byte mimic; + s16b feat; + s16b mimic; s16b special; u16b occurrence; } cave_template_type; -/* - * A structure type for arena entry +/*! + * @struct arena_type + * @brief éæå ´ã®ã¢ã³ã¹ã¿ã¼ã¨ã³ããªã¼æ§é ä½ / A structure type for arena entry */ typedef struct { - s16b r_idx; /* Monster (0 means victory prizing) */ - byte tval; /* tval of prize (0 means no prize) */ - byte sval; /* sval of prize */ + s16b r_idx; /*!< éæå ´ã®ã¢ã³ã¹ã¿ã¼ç¨®æID(0ãªãã°è¡¨å½°å¼) / Monster (0 means victory prizing) */ + byte tval; /*!< ã¢ã³ã¹ã¿ã¼æåå¾ã«å¾ãããã¢ã¤ãã ã®å¤§ã«ãã´ãªID / tval of prize (0 means no prize) */ + byte sval; /*!< ã¢ã³ã¹ã¿ã¼æåå¾ã«å¾ãããã¢ã¤ãã ã®å°ã«ãã´ãªID / sval of prize */ } arena_type; + + +/* + * A structure type for doors + */ +typedef struct +{ + s16b open; + s16b broken; + s16b closed; + s16b locked[MAX_LJ_DOORS]; + s16b num_locked; + s16b jammed[MAX_LJ_DOORS]; + s16b num_jammed; +} door_type; + + +#ifdef TRAVEL +/* + * A structure type for travel command + */ +typedef struct { + int run; /* Remaining grid number */ + int cost[MAX_HGT][MAX_WID]; + int x; /* Target X */ + int y; /* Target Y */ + int dir; /* Running direction */ +} travel_type; +#endif + +typedef struct { + cptr flag; + byte index; + byte level; + s32b value; + struct { + int constant; + int dice; + } timeout; + cptr desc; +} activation_type; + +typedef struct { + int flag; + int type; + cptr name; +} dragonbreath_type;