<ClCompile Include="..\..\src\info-reader\skill-reader.c" />\r
<ClCompile Include="..\..\src\info-reader\vault-reader.c" />\r
<ClCompile Include="..\..\src\io\input-key-acceptor.c" />\r
+ <ClCompile Include="..\..\src\util\quarks.c" />\r
<ClCompile Include="..\..\src\lore\combat-types-setter.c" />\r
<ClCompile Include="..\..\src\lore\magic-types-setter.c" />\r
<ClCompile Include="..\..\src\lore\lore-calculator.c" />\r
<ClInclude Include="..\..\src\info-reader\skill-reader.h" />\r
<ClInclude Include="..\..\src\info-reader\vault-reader.h" />\r
<ClInclude Include="..\..\src\io\input-key-acceptor.h" />\r
+ <ClInclude Include="..\..\src\util\quarks.h" />\r
<ClInclude Include="..\..\src\lore\combat-types-setter.h" />\r
<ClInclude Include="..\..\src\lore\magic-types-setter.h" />\r
<ClInclude Include="..\..\src\lore\lore-calculator.h" />\r
<ClCompile Include="..\..\src\io\input-key-acceptor.c">
<Filter>io</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\util\quarks.c">
+ <Filter>util</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\io\input-key-acceptor.h">
<Filter>io</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\util\quarks.h">
+ <Filter>util</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
\
util/angband-files.c util/angband-files.h \
util/object-sort.c util/object-sort.h \
+ util/quarks.c util/quarks.h \
util/string-processor.c util/string-processor.h \
util/util.c util/util.h \
\
#include "object/object-kind.h"
#include "object/object-info.h"
#include "perception/object-perception.h"
+#include "util/quarks.h"
#ifdef JP
static char kanji_colon[] = ":";
#include "main/sound-of-music.h"
#include "monster-race/race-indice-types.h"
#include "object-enchant/item-feeling.h"
+#include "util/quarks.h"
/*
* 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
#include "player/player-skill.h"
#include "player/player-status.h"
#include "view/display-main-window.h"
+#include "util/quarks.h"
#include "world/world.h"
int total_friends = 0;
#include "spell/spells3.h"
#include "sv-definition/sv-lite-types.h"
#include "sv-definition/sv-ring-types.h"
+#include "util/quarks.h"
#include "world/world.h"
/*!
#include "realm/realm-hex-numbers.h"
#include "spell/spells3.h"
#include "sv-definition/sv-lite-types.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
/*!
#include "spell-kind/spells-random.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spells-summon.h"
+#include "util/quarks.h"
#define TRC_P_FLAG_MASK \
(TRC_TELEPORT_SELF | TRC_CHAINSWORD | TRC_TY_CURSE | TRC_DRAIN_EXP | TRC_ADD_L_CURSE | TRC_ADD_H_CURSE | TRC_CALL_ANIMAL | TRC_CALL_DEMON \
#include "player/player-move.h"
#include "term/gameterm.h"
#include "term/term-color-types.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
bool select_ring_slot;
#include "object/object-hook.h"
#include "object/object-kind.h"
#include "player/player-move.h"
+#include "util/quarks.h"
/*!
* @brief
#include "object/object-kind.h"
#include "system/game-option-types.h"
#include "term/gameterm.h"
+#include "util/quarks.h"
#include "util/string-processor.h"
#include "view/display-main-window.h" // 暫定。apply_default_feat_lighting()。後で消す.
#include "world/world.h"
* 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.
- * @details
- * This file loads savefiles from Angband 2.7.X and 2.8.X
- *
- * Ancient savefiles (pre-2.7.0) are loaded by another file.
- *
- * Note that Angband 2.7.0 through 2.7.3 are now officially obsolete,
- * and savefiles from those versions may not be successfully converted.
- *
- * We attempt to prevent corrupt savefiles from inducing memory errors.
- *
- * Note that this file should not use the random number generator, the
- * object flavors, the visual attr/char mappings, or anything else which
- * is initialized *after* or *during* the "load character" function.
- *
- * This file assumes that the monster/object records are initialized
- * to zero, and the race/kind tables have been loaded correctly. The
- * order of object stacks is currently not saved in the savefiles, but
- * the "next" pointers are saved, so all necessary knowledge is present.
- *
- * We should implement simple "savefile extenders" using some form of
- * "sized" chunks of bytes, with a {size,type,data} format, so everyone
- * can know the size, interested people can know the type, and the actual
- * data is available to the parsing routines that acknowledge the type.
- *
- * Consider changing the "globe of invulnerability" code so that it
- * takes some form of "maximum damage to protect from" in addition to
- * the existing "number of turns to protect for", and where each hit
- * by a monster will reduce the shield by that amount.
- *
- *
*/
#include "io/load.h"
#include "system/system-variables.h" // 暫定、init_flags の扱いを決めた上で消す.
#include "util/angband-files.h"
#include "util/object-sort.h"
+#include "util/quarks.h"
#include "world/world-object.h"
#include "world/world.h"
#include "store/store.h"
#include "system/angband-version.h"
#include "util/angband-files.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
#include "world/world.h"
#include "term/gameterm.h"
#include "term/term-color-types.h"
#include "util/angband-files.h"
+#include "util/quarks.h"
#include "world/world.h"
#include <sys/stat.h>
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
+#include "util/quarks.h"
/*!
* @brief モンスターの呼称を作成する / Build a string describing a monster in some way.
#include "player/player-class.h"
#include "player/player-personalities-types.h"
#include "spell/spells-object.h"
-#include "util/util.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
#include "world/world.h"
#include "shoot.h"
#include "sv-definition/sv-food-types.h"
#include "sv-definition/sv-lite-types.h"
-#include "util/util.h"
+#include "util/quarks.h"
#include "world/world.h"
/*!
#include "spell/technic-info-table.h"
#include "sv-definition/sv-lite-types.h"
#include "sv-definition/sv-weapon-types.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
#include "world/world.h"
#include "system/angband.h"
#include "term/gameterm.h"
#include "util/object-sort.h"
+#include "util/quarks.h"
#include "view/display-main-window.h"
#include "view/object-describer.h"
#include "world/world.h"
#include "term/gameterm.h"
#include "system/system-variables.h"
#include "term/term-color-types.h"
-#include "util/util.h"
+#include "util/quarks.h"
/*
* Convert an "attr"/"char" pair into a "pict" (P)
--- /dev/null
+#include "util/quarks.h"
+
+/*
+ * The number of quarks
+ */
+STR_OFFSET quark__num;
+
+/*
+ * The pointers to the quarks [QUARK_MAX]
+ */
+concptr *quark__str;
+
+/*
+ * Initialize the quark array
+ */
+void quark_init(void)
+{
+ C_MAKE(quark__str, QUARK_MAX, concptr);
+ quark__str[1] = string_make("");
+ quark__num = 2;
+}
+
+/*
+ * Add a new "quark" to the set of quarks.
+ */
+u16b quark_add(concptr str)
+{
+ u16b i;
+ for (i = 1; i < quark__num; i++) {
+ if (streq(quark__str[i], str))
+ return (i);
+ }
+
+ if (quark__num == QUARK_MAX)
+ return 1;
+
+ quark__num = i + 1;
+ quark__str[i] = string_make(str);
+ return (i);
+}
+
+/*
+ * This function looks up a quark
+ */
+concptr quark_str(STR_OFFSET i)
+{
+ concptr q;
+
+ /* Return NULL for an invalid index */
+ if ((i < 1) || (i >= quark__num))
+ return NULL;
+
+ /* Access the quark */
+ q = quark__str[i];
+
+ /* Return the quark */
+ return (q);
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+/*!
+ * @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
+
+extern STR_OFFSET quark__num;
+extern concptr *quark__str;
+
+concptr quark_str(STR_OFFSET num);
+void quark_init(void);
+u16b quark_add(concptr str);
#include "system/system-variables.h"
#include "term/gameterm.h"
#include "term/term-color-types.h"
+#include "util/quarks.h"
#include "util/string-processor.h"
#include "view/display-main-window.h"
#include "world/world.h"
pos_list tmp_pos;
-/*
- * The number of quarks
- */
-STR_OFFSET quark__num;
-
-/*
- * The pointers to the quarks [QUARK_MAX]
- */
-concptr *quark__str;
-
int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
concptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
concptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
}
-/*
- * Initialize the quark array
- */
-void quark_init(void)
-{
- C_MAKE(quark__str, QUARK_MAX, concptr);
- quark__str[1] = string_make("");
- quark__num = 2;
-}
-
-
-/*
- * Add a new "quark" to the set of quarks.
- */
-u16b quark_add(concptr str)
-{
- u16b i;
- for (i = 1; i < quark__num; i++)
- {
- if (streq(quark__str[i], str)) return (i);
- }
-
- if (quark__num == QUARK_MAX) return 1;
-
- quark__num = i + 1;
- quark__str[i] = string_make(str);
- return (i);
-}
-
-
-/*
- * This function looks up a quark
+/*!
+ * @brief 保存中の過去ゲームメッセージの数を返す。 / How many messages are "available"?
+ * @return 残っているメッセージの数
*/
-concptr quark_str(STR_OFFSET i)
-{
- concptr q;
-
- /* Return NULL for an invalid index */
- if ((i < 1) || (i >= quark__num)) return NULL;
-
- /* Access the quark */
- q = quark__str[i];
-
- /* Return the quark */
- return (q);
-}
-
-
- /*!
- * @brief 保存中の過去ゲームメッセージの数を返す。 / How many messages are "available"?
- * @return 残っているメッセージの数
- */
s32b message_num(void)
{
int n;
extern pos_list tmp_pos;
-extern STR_OFFSET quark__num;
-extern concptr *quark__str;
/*
* Automatically generated "variable" declarations
*/
extern concptr keymap_act[KEYMAP_MODES][256];
-/*!
- * @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
// todo ファイル処理関数・メッセージ処理関数・画面描画関数で最低限分割する.
extern void flush(void);
extern void move_cursor(int row, int col);
-extern concptr quark_str(STR_OFFSET num);
-extern void quark_init(void);
-extern u16b quark_add(concptr str);
extern s32b message_num(void);
extern concptr message_str(int age);
extern void message_add(concptr msg);
#include "system/angband-version.h"
#include "term/term-color-types.h"
#include "util/angband-files.h"
+#include "util/quarks.h"
#include "view/display-lore.h"
/*