X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fh-type.h;h=3aa85e3de94c6d22d63789df835dcd2ef58b80d0;hb=924ccf7dec90442b9f1dc29743203792b11fdd3d;hp=af4eab8e8e0b15750ff3c6d7fadf55fb05973d0e;hpb=c7b2453c02694e8bb0588d7688fe66b64972558a;p=hengband%2Fhengband.git
diff --git a/src/h-type.h b/src/h-type.h
index af4eab8e8..3aa85e3de 100644
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -1,43 +1,40 @@
-/* File: h-type.h */
-
-#ifndef INCLUDED_H_TYPE_H
-#define INCLUDED_H_TYPE_H
-
-/*
+/*!
+ * @file h-type.h
+ * @brief ã²ã¼ã ä¸ã«ç¨ããå¤æ°åå®ç¾© /
* Basic "types".
- *
+ * @date 2014/08/17
+ * @author
+ * ä¸æ(å¤æè®æã¹ã¿ããï¼)
+ * @details
+ *
* Note the attempt to make all basic types have 4 letters.
* This improves readibility and standardizes the code.
- *
* Likewise, all complex types are at least 4 letters.
* Thus, almost every three letter word is a legal variable.
* But beware of certain reserved words ('for' and 'if' and 'do').
- *
* Note that the type used in structures for bit flags should be uint.
* As long as these bit flags are sequential, they will be space smart.
- *
* Note that on some machines, apparently "signed char" is illegal.
- *
* It must be true that char/byte takes exactly 1 byte
* It must be true that sind/uind takes exactly 2 bytes
* It must be true that sbig/ubig takes exactly 4 bytes
- *
* On Sparc's, a sint takes 4 bytes (2 is legal)
* On Sparc's, a uint takes 4 bytes (2 is legal)
* On Sparc's, a long takes 4 bytes (8 is legal)
* On Sparc's, a huge takes 4 bytes (8 is legal)
* On Sparc's, a vptr takes 4 bytes (8 is legal)
* On Sparc's, a real takes 8 bytes (4 is legal)
- *
* Note that some files have already been included by "h-include.h"
* These include and , which define some types
* In particular, uint is defined so we do not have to define it
- *
* Also, see for min/max values for sind, uind, long, huge
* (SHRT_MIN, SHRT_MAX, USHRT_MAX, LONG_MIN, LONG_MAX, ULONG_MAX)
* These limits should be verified and coded into "h-constant.h".
+ *
*/
+#ifndef INCLUDED_H_TYPE_H
+#define INCLUDED_H_TYPE_H
#ifdef HAVE_STDINT_H
#include
@@ -45,46 +42,30 @@
/*** Special 4 letter names for some standard types ***/
-
-/* A standard pointer (to "void" because ANSI C says so) */
-typedef void *vptr;
-
-/* A simple pointer (to unmodifiable strings) */
-typedef const char *cptr;
-
-
-/* Since float's are silly, hard code real numbers as doubles */
-typedef double real;
+typedef void *vptr; /*!< voidåãã¤ã³ã¿å®ç¾© / A standard pointer (to "void" because ANSI C says so) */
+typedef const char *cptr; /*!< æååå®æ°ç¨ãã¤ã³ã¿å®ç¾© / A simple pointer (to unmodifiable strings) */
+typedef double real; /*!< doubleãrealåã¨ãã¦å®ç¾© / Since float's are silly, hard code real numbers as doubles */
-/* Error codes for function return values */
-/* Success = 0, Failure = -N, Problem = +N */
+/*!
+ * @brief ã¨ã©ã¼ã³ã¼ãã®å®ç¾© / Error codes for function return values
+ * @details
+ * ä¸è¬ã«æåæ0ã失ææè² æ°ãä½ããã®åé¡ææ´æ°ã¨ããã
+ * Success = 0, Failure = -N, Problem = +N
+ */
typedef int errr;
-
-/*
- * Hack -- prevent problems with non-MACINTOSH
- */
#undef uint
-#define uint uint_hack
+#define uint uint_hack /*!< éãããã³ããã·ã¥ç°å¢ã§éè¤ãé¿ããããã®uint_hackåå®ç¾© / Hack -- prevent problems with non-MACINTOSH */
-/*
- * Hack -- prevent problems with MSDOS and WINDOWS
- */
#undef huge
-#define huge huge_hack
+#define huge huge_hack /*!< WINDOWSç°å¢ã§éè¤ãé¿ããããã®huge_hackå®ç¾© / Hack -- prevent problems with WINDOWS */
-/*
- * Hack -- prevent problems with AMIGA
- */
#undef byte
-#define byte byte_hack
+#define byte byte_hack /*!< AMIGAç°å¢ã§éè¤ãé¿ããããã®byte_hackå®ç¾© / Hack -- prevent problems with AMIGA */
-/*
- * Hack -- prevent problems with C++
- */
#undef bool
-#define bool bool_hack
+#define bool bool_hack /*!< C++ç°å¢ã§éè¤ãé¿ããããã®bool_hackå®ç¾© Hack -- prevent problems with C++ */
/* Note that "signed char" is not always "defined" */
@@ -92,20 +73,10 @@ typedef int errr;
/* A signed byte of memory */
/* typedef signed char syte; */
-/* Note that unsigned values can cause math problems */
-/* An unsigned byte of memory */
-typedef unsigned char byte;
-
-/* Note that a bool is smaller than a full "int" */
-/* Simple True/False type */
-typedef char bool;
-
-
-/* A signed, standard integer (at least 2 bytes) */
-typedef int sint;
-
-/* An unsigned, "standard" integer (often pre-defined) */
-typedef unsigned int uint;
+typedef unsigned char byte; /*!< byteåãunsighned charã¨ãã¦å®ç¾© / Note that unsigned values can cause math problems / An unsigned byte of memory */
+typedef char bool; /*!< boolåãcharã¨ãã¦å®ç¾© / Note that a bool is smaller than a full "int" / Simple True/False type */
+typedef int sint; /*!< sintåãintã¨ãã¦å®ç¾© / A signed, standard integer (at least 2 bytes) */
+typedef unsigned int uint; /* uintåãintã¨ãã¦å®ç¾© / An unsigned, "standard" integer (often pre-defined) */
/* The largest possible signed integer (pre-defined) */
@@ -114,7 +85,6 @@ typedef unsigned int uint;
/* The largest possible unsigned integer */
typedef unsigned long huge;
-
/* Signed/Unsigned 16 bit value */
#ifdef HAVE_STDINT_H
typedef int16_t s16b;
@@ -134,7 +104,82 @@ typedef unsigned long u32b;
#endif
+typedef s16b IDX; /*!< ã²ã¼ã ä¸ã®IDåãå®ç¾© */
+typedef s16b FEAT_IDX; /*!< ã²ã¼ã ä¸ã®å°å½¢IDåãå®ç¾© */
+typedef s16b MONRACE_IDX; /*!< ã²ã¼ã ä¸ã®ã¢ã³ã¹ã¿ã¼ç¨®æIDåãå®ç¾© */
+typedef s16b MONSTER_IDX; /*!< ã²ã¼ã ä¸ã®ã¢ã³ã¹ã¿ã¼åä½IDåãå®ç¾© */
+typedef s16b DUNGEON_IDX; /*!< ã²ã¼ã ä¸ã®ãã³ã¸ã§ã³IDåãå®ç¾© */
+typedef s16b REALM_IDX; /*!< ã²ã¼ã ä¸ã®éæ³é åIDåãå®ç¾© */
+typedef s16b ARTIFACT_IDX; /*!< ã²ã¼ã ä¸ã®ã¢ã¼ãã£ãã¡ã¯ãIDåãå®ç¾© */
+typedef s16b VIRTUES_IDX; /*!< ã²ã¼ã ä¸ã®å¾³IDåãå®ç¾© */
+typedef s16b QUEST_IDX; /*!< ã²ã¼ã ä¸ã®ã¯ã¨ã¹ãIDåãå®ç¾© */
+
+typedef s16b INVENTORY_IDX; /*!< ã²ã¼ã ä¸ã®ææåIDåãå®ç¾© */
+typedef s16b OBJECT_IDX; /*!< ã²ã¼ã ä¸ã®ã¢ã¤ãã IDåãå®ç¾© */
+
+typedef s16b KIND_OBJECT_IDX; /*!< ã²ã¼ã ä¸ã®ãã¼ã¹ã¢ã¤ãã IDåãå®ç¾© */
+
+typedef s32b POSITION; /*!< ã²ã¼ã ä¸ã®åº§æ¨åãå®ç¾© */
+typedef s32b HIT_POINT; /*!< ã²ã¼ã ä¸ã®HP/ãã¡ã¼ã¸åãå®ç¾© */
+typedef s32b MANA_POINT; /*!< ã²ã¼ã ä¸ã®MPåãå®ç¾© */
+typedef s16b HIT_PROB; /*!< ã²ã¼ã ä¸ã®å½ä¸ä¿®æ£å¤ãå®ç¾© */
+typedef s16b BASE_STATUS; /*!< ã²ã¼ã ä¸ã®åºç¤è½åå¤åãå®ç¾© */
+
+typedef s32b MONSTER_NUMBER; /*!< ã²ã¼ã ä¸ã®ã¢ã³ã¹ã¿ã¼æ°åãå®ç¾© */
+typedef s32b ITEM_NUMBER; /*!< ã²ã¼ã ä¸ã®ã¢ã¤ãã æ°åãå®ç¾© */
+
+typedef s16b ACTION_ENERGY; /*!< ã²ã¼ã ä¸ã®è¡åã¨ãã«ã®ã¼åãå®ç¾© */
+typedef s16b ARMOUR_CLASS; /*!< ã²ã¼ã ä¸ã®è¡åã¢ã¼ãã¼ã¯ã©ã¹åãå®ç¾© */
+typedef s16b TIME_EFFECT; /*!< ã²ã¼ã ä¸ã®æéæéã®åãå®ç¾© */
+typedef byte CHARACTER_IDX; /*!< ã²ã¼ã ä¸ã®ãã£ã©ã¯ã¿ã¼ç¹æ§å種IDã®åãå®ç¾© */
+typedef byte DISCOUNT_RATE; /*!< ã²ã¼ã ä¸ã®å¤å¼ãçã®åãå®ç¾© */
+typedef byte SPEED; /*!< ã²ã¼ã ä¸ã®å éå¤ã®åå®ç¾© */
+typedef s16b ENERGY; /*!< ã²ã¼ã ä¸ã®è¡åã¨ãã«ã®ã¼ã®åå®ç¾© */
+
+typedef s16b PLAYER_LEVEL; /*!< ã²ã¼ã ä¸ã®ãã¬ã¤ã¤ã¼ã¬ãã«ã®åãå®ç¾© */
+typedef int DIRECTION; /*!< ã²ã¼ã ä¸ã®æ¹è§ã®åå®ç¾© */
+typedef s32b EXP; /*!< ã²ã¼ã ä¸ã®ä¸»çµé¨å¤ã®åå®ç¾© */
+typedef s16b SUB_EXP; /*!< ã²ã¼ã ä¸ã®å¯çµé¨å¤ã®åå®ç¾© */
+
+typedef s32b OBJECT_TYPE_VALUE; /*!< ã²ã¼ã ä¸ã®ã¢ã¤ãã 主åé¡ã®åå®ç¾© */
+typedef s32b OBJECT_SUBTYPE_VALUE; /*!< ã²ã¼ã ä¸ã®ã¢ã¤ãã å¯åé¡ã®åå®ç¾© */
+typedef s16b PARAMETER_VALUE; /*!< ã²ã¼ã ä¸ã®ã¢ã¤ãã è½åå¤ã®åå®ç¾© */
+typedef s16b WEIGHT; /*!< ã²ã¼ã ä¸ã®ééã®åå®ç¾©(ãã³ã) */
+
+typedef int DICE_NUMBER; /*!< ã²ã¼ã ä¸ã®ãã¤ã¹æ°ã®åå®ç¾© */
+typedef int DICE_SID; /*!< ã²ã¼ã ä¸ã®ãã¤ã¹é¢ã®åå®ç¾© */
+typedef s32b PRICE; /*!< ã²ã¼ã ä¸ã®éé¡ä¾¡å¤ã®åå®ç¾© */
+typedef s16b FEED; /*!< ã²ã¼ã ä¸ã®æ»é¤åº¦ã®åå®ç¾© */
+
+typedef u32b STR_OFFSET; /*!< ããã¹ããªãã»ããã®åå®ç¾© */
+
+typedef s32b DEPTH; /*!< ã²ã¼ã ä¸ã®é層ã¬ãã«ã®åå®ç¾© */
+typedef byte RARITY; /*!< ã²ã¼ã ä¸ã®å¸å°åº¦ã®åå®ç¾© */
+
+typedef s32b GAME_TURN; /*!< ã²ã¼ã ä¸ã®ã¿ã¼ã³ã®åå®ç¾© */
+
+typedef s16b PERCENTAGE; /*!< ã²ã¼ã ä¸ã®ãã¼ã»ã³ã表è¨ã®åå®ç¾© */
+
+typedef u32b BIT_FLAGS; /*!< 32ãããã®ãã©ã°é
åã®åå®ç¾© */
+typedef u16b BIT_FLAGS16; /*!< 16ãããã®ãã©ã°é
åã®åå®ç¾© */
+typedef byte BIT_FLAGS8; /*!< 8ãããã®ãã©ã°é
åã®åå®ç¾© */
+
+typedef s16b XTRA16; /*!< æ±ç¨å¤æ°16ãããã®åå®ç¾© */
+typedef byte XTRA8; /*!< æ±ç¨å¤æ°8ãããã®åå®ç¾© */
+
+typedef s16b COMMAND_CODE; /*!< ã³ãã³ãå
容ã®åå®ç¾© */
+typedef s16b COMMAND_ARG; /*!< ã³ãã³ãå¼æ°ã®åå®ç¾© */
+
+typedef int TERM_POSITION; /*!< ã³ã³ã½ã¼ã«è¡¨ç¤ºåº§æ¨ã®åå®ç¾© */
+typedef byte SYMBOL_COLOR; /*!< ãã£ã©ã®è²ã®åå®ç¾© */
+typedef byte SYMBOL_CODE; /*!< ãã£ã©ã®æåã®åå®ç¾© */
+
+typedef s32b MAGIC_NUM1; /*!< ãã¬ã¤ã¤ã¼ã®æ±ç¨éæ³æ
å ±é
å1ã®åå®ç¾©*/
+typedef byte MAGIC_NUM2; /*!< ãã¬ã¤ã¤ã¼ã®æ±ç¨éæ³æ
å ±é
å2ã®åå®ç¾©*/
+typedef s32b SPELL_IDX; /*!< åéæ³é å/è·æ¥è½åãã¨ã®åªæIDåå®ç¾© */
+typedef s16b PROB; /*!< 確çã®éã¿ã®åå®ç¾© */
+typedef byte FEAT_POWER; /*!< å°å½¢å¼·åº¦ã®åå®ç¾© */
/*** Pointers to all the basic types defined above ***/