• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiond8e5a8714dafd4c090d9445bf33bd7213b03d1f9 (tree)
Time2019-06-01 13:06:26
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 MAX_SHORT, MAX_UCHAR, MAX_NLEN を h-type.h へ移動.

Change Summary

Incremental Difference

--- a/src/core.h
+++ b/src/core.h
@@ -65,6 +65,7 @@ extern const concptr copyright[5];
6565 #define INIT_CREATE_DUNGEON 0x08
6666 #define INIT_ONLY_FEATURES 0x10
6767 #define INIT_ONLY_BUILDINGS 0x20
68+
6869 extern int init_flags;
6970
7071 extern concptr ANGBAND_SYS;
--- a/src/defines.h
+++ b/src/defines.h
@@ -165,21 +165,6 @@
165165
166166
167167 /*
168- * Maximum value storable in a "byte" (hard-coded)
169- */
170-#define MAX_UCHAR 255
171-
172-/*
173- * Maximum value storable in a "s16b" (hard-coded)
174- */
175-#define MAX_SHORT 32767
176-
177-/*
178- * Maximum length of object's name
179- */
180-#define MAX_NLEN 160
181-
182-/*
183168 * Misc constants
184169 */
185170 #define TOWN_DAWN 10000 /*!< 1日分のターン / Number of ticks from dawn to dawn XXX */
--- a/src/gameoption.h
+++ b/src/gameoption.h
@@ -1,4 +1,5 @@
11 #pragma once
2+#include "h-type.h"
23
34 /*** Option Definitions ***/
45
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -68,6 +68,11 @@ typedef int errr;
6868 #undef bool
6969 #define bool bool_hack /*!< C++環境で重複を避けるためのbool_hack定義 Hack -- prevent problems with C++ */
7070
71+#define MAX_UCHAR 255 /*!< Maximum value storable in a "byte" (hard-coded) */
72+#define MAX_SHORT 32767 /*!< Maximum value storable in a "s16b" (hard-coded) */
73+
74+#define MAX_NLEN 160 /*!< Maximum length of object's name */
75+
7176
7277 /* Note that "signed char" is not always "defined" */
7378 /* So always use "s16b" to hold small signed values */
@@ -79,7 +84,6 @@ typedef char bool; /*!< bool型をcharとして定義 / Note that a bool is smal
7984 typedef int sint; /*!< sint型をintとして定義 / A signed, standard integer (at least 2 bytes) */
8085 typedef unsigned int uint; /* uint型をintとして定義 / An unsigned, "standard" integer (often pre-defined) */
8186
82-
8387 /* The largest possible signed integer (pre-defined) */
8488 /* typedef long long; */
8589
Show on old repository browser