fix bb guild card save; implement comments

This commit is contained in:
Martin Michelsen
2022-07-30 12:19:46 -07:00
parent 8ac15c9aa3
commit 7c28ee05cc
6 changed files with 51 additions and 57 deletions
+9 -14
View File
@@ -211,11 +211,11 @@ struct PlayerDispDataBB {
// GC format)
struct GuildCardV3 {
le_uint32_t player_tag;
le_uint32_t serial_number;
le_uint32_t guild_card_number;
ptext<char, 0x18> name;
ptext<char, 0x6C> description;
uint8_t reserved1; // should be 1
uint8_t reserved2; // should be 1
uint8_t present; // should be 1
uint8_t present2; // should be 1
uint8_t section_id;
uint8_t char_class;
@@ -228,8 +228,8 @@ struct GuildCardBB {
ptext<char16_t, 0x18> name;
ptext<char16_t, 0x10> team_name;
ptext<char16_t, 0x58> description;
uint8_t reserved1; // should be 1
uint8_t reserved2; // should be 1
uint8_t present; // should be 1 if guild card entry exists
uint8_t present2; // should be 1 if guild card entry exists
uint8_t section_id;
uint8_t char_class;
@@ -240,21 +240,16 @@ struct GuildCardBB {
// an entry in the BB guild card file
struct GuildCardEntryBB {
GuildCardBB data;
// TODO: Almost all of this space (0x58 char16_ts) is probably the comment,
// but is the unknown 4 bytes at the beginning or end of this space?
parray<uint8_t, 0xB4> unknown_a1;
ptext<char16_t, 0x58> comment;
parray<uint8_t, 0x4> unknown_a1;
void clear();
} __attribute__((packed));
// the format of the BB guild card file
struct GuildCardFileBB {
parray<uint8_t, 6> unknown_a1;
uint8_t num_guild_cards; // TODO: This is a guess. Verify this.
uint8_t unknown_a2;
parray<uint8_t, 0x1F7C> unknown_a3;
GuildCardEntryBB entries[0x0068]; // that's 104 of them in decimal
parray<uint8_t, 0x01AC> unknown_a4;
parray<uint8_t, 0x1F74> unknown_a3;
GuildCardEntryBB entries[0x0069]; // that's 105 of them in decimal
} __attribute__((packed));
struct KeyAndTeamConfigBB {