document flags field in character save file struct

This commit is contained in:
Martin Michelsen
2023-10-10 23:53:56 -07:00
parent 76ad50886f
commit bb89bc9b7b
4 changed files with 11 additions and 6 deletions
+3 -3
View File
@@ -30,8 +30,8 @@ extern FileContentsCache player_files_cache;
// levels (so a level 20 tech would have 14 in technique_levels_v1 and 5
// in the corresponding item's extension_data1 field).
// items[0].extension_data2 through items[3].extension_data2:
// The value known as unknown_a1 in the PSOGCCharacterFile::Character
// struct. See SaveFileFormats.hh.
// The flags field from the PSOGCCharacterFile::Character struct; see
// SaveFileFormats.hh for details.
// items[4].extension_data2 through items[7].extension_data2:
// The timestamp when the character was last saved, in seconds since
// January 1, 2000. Stored little-endian, so items[4] contains the LSB.
@@ -107,7 +107,7 @@ struct PlayerStats {
struct PlayerVisualConfig {
/* 00 */ ptext<char, 0x10> name;
/* 10 */ le_uint64_t unknown_a2 = 0; // Note: This is probably not actually a 64-bit int.
/* 10 */ parray<uint8_t, 8> unknown_a2;
/* 18 */ le_uint32_t name_color = 0x00000000; // RGBA
/* 1C */ uint8_t extra_model = 0;
/* 1D */ parray<uint8_t, 0x0F> unused;
+2 -1
View File
@@ -1400,7 +1400,8 @@ std::string disassemble_quest_script(const void* data, size_t size, QuestScriptV
string name = format_data_string(visual.name);
lines.emplace_back(string_printf(" %04zX name %s", l->offset + offsetof(PlayerVisualConfig, name), name.c_str()));
lines.emplace_back(string_printf(" %04zX name_color %08" PRIX32, l->offset + offsetof(PlayerVisualConfig, name_color), visual.name_color.load()));
lines.emplace_back(string_printf(" %04zX a2 %016" PRIX64, l->offset + offsetof(PlayerVisualConfig, unknown_a2), visual.unknown_a2.load()));
string a2_str = format_data_string(visual.unknown_a2.data(), sizeof(visual.unknown_a2));
lines.emplace_back(string_printf(" %04zX a2 %s", l->offset + offsetof(PlayerVisualConfig, unknown_a2), a2_str.c_str()));
lines.emplace_back(string_printf(" %04zX extra_model %02hhX", l->offset + offsetof(PlayerVisualConfig, extra_model), visual.extra_model));
string unused = format_data_string(visual.unused.data(), visual.unused.bytes());
lines.emplace_back(string_printf(" %04zX unused %s", l->offset + offsetof(PlayerVisualConfig, unused), unused.c_str()));
+5 -1
View File
@@ -170,7 +170,11 @@ struct PSOGCCharacterFile {
// to the start of the second internal structure (second column).
/* 0000:---- */ PlayerInventory inventory;
/* 034C:---- */ PlayerDispDataDCPCV3 disp;
/* 041C:0000 */ be_uint32_t unknown_a1;
// Known bits in the flags field:
// 00000001: Character was not saved after disconnecting (and the message
// about items being deleted is shown in the select menu)
// 00000002: Used for something, but it's not known what it does
/* 041C:0000 */ be_uint32_t flags;
/* 0420:0004 */ be_uint32_t creation_timestamp;
// The signature field holds the value 0xA205B064, which is 2718281828 in
// decimal - approximately e * 10^9. It's unknown why Sega chose this value.