<ClCompile Include="..\..\src\object-hook\hook-armor.c" />\r
<ClCompile Include="..\..\src\object-potion\quaff-execution.c" />\r
<ClCompile Include="..\..\src\savedata\angband-version-comparer.c" />\r
+ <ClCompile Include="..\..\src\savedata\birth-loader.c" />\r
<ClCompile Include="..\..\src\savedata\item-loader.c" />\r
<ClCompile Include="..\..\src\savedata\load-util.c" />\r
<ClCompile Include="..\..\src\savedata\load-v1-5-0.c" />\r
<ClInclude Include="..\..\src\object-hook\hook-weapon.h" />\r
<ClInclude Include="..\..\src\object-potion\quaff-execution.h" />\r
<ClInclude Include="..\..\src\savedata\angband-version-comparer.h" />\r
+ <ClInclude Include="..\..\src\savedata\birth-loader.h" />\r
<ClInclude Include="..\..\src\savedata\item-loader.h" />\r
<ClInclude Include="..\..\src\savedata\load-util.h" />\r
<ClInclude Include="..\..\src\savedata\load-v1-5-0.h" />\r
<ClCompile Include="..\..\src\savedata\option-loader.c">
<Filter>savedata</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\savedata\birth-loader.c">
+ <Filter>savedata</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\savedata\option-loader.h">
<Filter>savedata</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\savedata\birth-loader.h">
+ <Filter>savedata</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
room/pit-nest-kinds-table.c room/pit-nest-kinds-table.h \
\
savedata/angband-version-comparer.c savedata/angband-version-comparer.h \
+ savedata/birth-loader.c savedata/birth-loader.h \
savedata/item-loader.c savedata/item-loader.h \
savedata/monster-loader.c savedata/monster-loader.h \
savedata/old-feature-types.h \
--- /dev/null
+#include "birth-loader.h"
+#include "birth/quick-start.h"
+#include "savedata/angband-version-comparer.h"
+#include "savedata/load-util.h"
+#include "system/angband.h"
+
+/*!
+ * @brief クイックスタート情報を読み込む / Load quick start data
+ * @return なし
+ */
+void load_quick_start(void)
+{
+ if (z_older_than(11, 0, 13)) {
+ previous_char.quick_ok = FALSE;
+ return;
+ }
+
+ rd_byte(&previous_char.psex);
+ byte tmp8u;
+ rd_byte(&tmp8u);
+ previous_char.prace = (player_race_type)tmp8u;
+ rd_byte(&tmp8u);
+ previous_char.pclass = (player_class_type)tmp8u;
+ rd_byte(&tmp8u);
+ previous_char.pseikaku = (player_personality_type)tmp8u;
+ rd_byte(&tmp8u);
+ previous_char.realm1 = (REALM_IDX)tmp8u;
+ rd_byte(&tmp8u);
+ previous_char.realm2 = (REALM_IDX)tmp8u;
+
+ rd_s16b(&previous_char.age);
+ rd_s16b(&previous_char.ht);
+ rd_s16b(&previous_char.wt);
+ rd_s16b(&previous_char.sc);
+ rd_s32b(&previous_char.au);
+
+ for (int i = 0; i < A_MAX; i++)
+ rd_s16b(&previous_char.stat_max[i]);
+ for (int i = 0; i < A_MAX; i++)
+ rd_s16b(&previous_char.stat_max_max[i]);
+
+ for (int i = 0; i < PY_MAX_LEVEL; i++) {
+ s16b tmp16s;
+ rd_s16b(&tmp16s);
+ previous_char.player_hp[i] = (HIT_POINT)tmp16s;
+ }
+
+ rd_s16b(&previous_char.chaos_patron);
+
+ for (int i = 0; i < 8; i++)
+ rd_s16b(&previous_char.vir_types[i]);
+
+ for (int i = 0; i < 4; i++)
+ rd_string(previous_char.history[i], sizeof(previous_char.history[i]));
+
+ rd_byte(&tmp8u);
+ rd_byte(&tmp8u);
+ previous_char.quick_ok = (bool)tmp8u;
+}
--- /dev/null
+#pragma once
+
+void load_quick_start(void);
#include "player/race-info-table.h"
#include "player/special-defense-types.h"
#include "savedata/angband-version-comparer.h"
+#include "savedata/birth-loader.h"
#include "savedata/item-loader.h"
#include "savedata/load-util.h"
#include "savedata/load-v1-5-0.h"
static const int QUEST_ROYAL_CRYPT = 28; // 王家の墓.
/*!
- * @brief ダミー情報スキップ / Hack -- strip the "ghost" info
- * @return なし
- * @details
- * This is such a nasty hack it hurts.
- */
-static void rd_ghost(void)
-{
- char buf[64];
- rd_string(buf, sizeof(buf));
- strip_bytes(60);
-}
-
-/*!
- * @brief クイックスタート情報を読み込む / Load quick start data
- * @return なし
- */
-static void load_quick_start(void)
-{
- if (z_older_than(11, 0, 13)) {
- previous_char.quick_ok = FALSE;
- return;
- }
-
- rd_byte(&previous_char.psex);
- byte tmp8u;
- rd_byte(&tmp8u);
- previous_char.prace = (player_race_type)tmp8u;
- rd_byte(&tmp8u);
- previous_char.pclass = (player_class_type)tmp8u;
- rd_byte(&tmp8u);
- previous_char.pseikaku = (player_personality_type)tmp8u;
- rd_byte(&tmp8u);
- previous_char.realm1 = (REALM_IDX)tmp8u;
- rd_byte(&tmp8u);
- previous_char.realm2 = (REALM_IDX)tmp8u;
-
- rd_s16b(&previous_char.age);
- rd_s16b(&previous_char.ht);
- rd_s16b(&previous_char.wt);
- rd_s16b(&previous_char.sc);
- rd_s32b(&previous_char.au);
-
- for (int i = 0; i < A_MAX; i++)
- rd_s16b(&previous_char.stat_max[i]);
- for (int i = 0; i < A_MAX; i++)
- rd_s16b(&previous_char.stat_max_max[i]);
-
- for (int i = 0; i < PY_MAX_LEVEL; i++) {
- s16b tmp16s;
- rd_s16b(&tmp16s);
- previous_char.player_hp[i] = (HIT_POINT)tmp16s;
- }
-
- rd_s16b(&previous_char.chaos_patron);
-
- for (int i = 0; i < 8; i++)
- rd_s16b(&previous_char.vir_types[i]);
-
- for (int i = 0; i < 4; i++)
- rd_string(previous_char.history[i], sizeof(previous_char.history[i]));
-
- rd_byte(&tmp8u);
- rd_byte(&tmp8u);
- previous_char.quick_ok = (bool)tmp8u;
-}
-
-/*!
* @brief その他の情報を読み込む / Read the "extra" information
* @return なし
*/
}
/*!
+ * @brief ダミー情報スキップ / Strip the "ghost" info
+ * @return なし
+ * @details
+ * This is such a nasty hack it hurts.
+ */
+static void rd_ghost(void)
+{
+ char buf[64];
+ rd_string(buf, sizeof(buf));
+ strip_bytes(60);
+}
+
+/*!
* @brief ロード処理全体のサブ関数 / Actually read the savefile
* @return エラーコード
*/