refine Ep3 map definition struct
This commit is contained in:
+64
-19
@@ -1046,10 +1046,9 @@ string MapDefinition::str(const DataIndex* data_index) const {
|
||||
lines.emplace_back(string_printf(" a1=%08" PRIX32, this->unknown_a1.load()));
|
||||
lines.emplace_back(string_printf(" environment_number=%02hhX", this->environment_number));
|
||||
lines.emplace_back(string_printf(" num_alt_maps=%02hhX", this->num_alt_maps));
|
||||
lines.emplace_back(string_printf(" num_alt_maps=%02hhX", this->num_alt_maps));
|
||||
lines.emplace_back(" tiles:");
|
||||
add_map(this->map_tiles);
|
||||
lines.emplace_back(string_printf(" start_tile_definitions=[%02hhX %02hhX %02hhX %02hhX %02hhX %02hhX], [%02hhX %02hhX %02hhX %02hhX %02hhX %02hhX]",
|
||||
lines.emplace_back(string_printf(" start_tile_definitions=[1p=%02hhX 2p=%02hhX,%02hhX 3p=%02hhX,%02hhX,%02hhX], [1p=%02hhX 2p=%02hhX,%02hhX 3p=%02hhX,%02hhX,%02hhX]",
|
||||
this->start_tile_definitions[0][0], this->start_tile_definitions[0][1],
|
||||
this->start_tile_definitions[0][2], this->start_tile_definitions[0][3],
|
||||
this->start_tile_definitions[0][4], this->start_tile_definitions[0][5],
|
||||
@@ -1076,26 +1075,26 @@ string MapDefinition::str(const DataIndex* data_index) const {
|
||||
}
|
||||
for (size_t w = 0; w < 3; w++) {
|
||||
for (size_t z = 0; z < 0x24; z += 3) {
|
||||
lines.emplace_back(string_printf(" a5[%zu][0x%02zX:0x%02zX]=%g %g %g", w, z, z + 3,
|
||||
this->unknown_a5[w][z + 0].load(),
|
||||
this->unknown_a5[w][z + 1].load(),
|
||||
this->unknown_a5[w][z + 2].load()));
|
||||
lines.emplace_back(string_printf(" a4[%zu][0x%02zX:0x%02zX]=%g %g %g", w, z, z + 3,
|
||||
this->unknown_a4[w][z + 0].load(),
|
||||
this->unknown_a4[w][z + 1].load(),
|
||||
this->unknown_a4[w][z + 2].load()));
|
||||
}
|
||||
}
|
||||
lines.emplace_back(" modification tiles:");
|
||||
add_map(this->modification_tiles);
|
||||
for (size_t z = 0; z < 0x70; z += 0x10) {
|
||||
lines.emplace_back(string_printf(" a6[0x%02zX:0x%02zX]=%02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX", z, z + 0x10,
|
||||
this->unknown_a6[z + 0x00], this->unknown_a6[z + 0x01], this->unknown_a6[z + 0x02], this->unknown_a6[z + 0x03],
|
||||
this->unknown_a6[z + 0x04], this->unknown_a6[z + 0x05], this->unknown_a6[z + 0x06], this->unknown_a6[z + 0x07],
|
||||
this->unknown_a6[z + 0x08], this->unknown_a6[z + 0x09], this->unknown_a6[z + 0x0A], this->unknown_a6[z + 0x0B],
|
||||
this->unknown_a6[z + 0x0C], this->unknown_a6[z + 0x0D], this->unknown_a6[z + 0x0E], this->unknown_a6[z + 0x0F]));
|
||||
lines.emplace_back(string_printf(" a5[0x%02zX:0x%02zX]=%02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX %02hhX", z, z + 0x10,
|
||||
this->unknown_a5[z + 0x00], this->unknown_a5[z + 0x01], this->unknown_a5[z + 0x02], this->unknown_a5[z + 0x03],
|
||||
this->unknown_a5[z + 0x04], this->unknown_a5[z + 0x05], this->unknown_a5[z + 0x06], this->unknown_a5[z + 0x07],
|
||||
this->unknown_a5[z + 0x08], this->unknown_a5[z + 0x09], this->unknown_a5[z + 0x0A], this->unknown_a5[z + 0x0B],
|
||||
this->unknown_a5[z + 0x0C], this->unknown_a5[z + 0x0D], this->unknown_a5[z + 0x0E], this->unknown_a5[z + 0x0F]));
|
||||
}
|
||||
lines.emplace_back(string_printf(" a6[0x70:0x74]=%02hhX %02hhX %02hhX %02hhX",
|
||||
this->unknown_a6[0x70], this->unknown_a6[0x71], this->unknown_a6[0x72], this->unknown_a6[0x73]));
|
||||
lines.emplace_back(string_printf(" a5[0x70:0x74]=%02hhX %02hhX %02hhX %02hhX",
|
||||
this->unknown_a5[0x70], this->unknown_a5[0x71], this->unknown_a5[0x72], this->unknown_a5[0x73]));
|
||||
lines.emplace_back(" default_rules: " + this->default_rules.str());
|
||||
lines.emplace_back(string_printf(" a7=%02hhX %02hhX %02hhX %02hhX",
|
||||
this->unknown_a7[0], this->unknown_a6[1], this->unknown_a6[2], this->unknown_a6[3]));
|
||||
lines.emplace_back(string_printf(" a6=%02hhX %02hhX %02hhX %02hhX",
|
||||
this->unknown_a6[0], this->unknown_a6[1], this->unknown_a6[2], this->unknown_a6[3]));
|
||||
lines.emplace_back(" name: " + string(this->name));
|
||||
lines.emplace_back(" location_name: " + string(this->location_name));
|
||||
lines.emplace_back(" quest_name: " + string(this->quest_name));
|
||||
@@ -1150,7 +1149,9 @@ string MapDefinition::str(const DataIndex* data_index) const {
|
||||
}
|
||||
}
|
||||
}
|
||||
lines.emplace_back(" a8=" + format_data_string(this->unknown_a8.data(), this->unknown_a8.bytes()));
|
||||
lines.emplace_back(" a7a=" + format_data_string(this->unknown_a7_a.data(), this->unknown_a7_a.bytes()));
|
||||
lines.emplace_back(string_printf(" a7b=[%08" PRIX32 " %08" PRIX32 " %08" PRIX32 "]",
|
||||
this->unknown_a7_b[0].load(), this->unknown_a7_b[1].load(), this->unknown_a7_b[2].load()));
|
||||
if (this->before_message[0]) {
|
||||
lines.emplace_back(" before_message: " + string(this->before_message));
|
||||
}
|
||||
@@ -1175,9 +1176,53 @@ string MapDefinition::str(const DataIndex* data_index) const {
|
||||
lines.emplace_back(string_printf(" reward_cards[%02zu]: %04hX", z, card_id));
|
||||
}
|
||||
}
|
||||
lines.emplace_back(" a9=" + format_data_string(this->unknown_a9.data(), this->unknown_a9.bytes()));
|
||||
lines.emplace_back(" a11=" + format_data_string(this->unknown_a11.data(), this->unknown_a11.bytes()));
|
||||
lines.emplace_back(" unavailable_sc_cards=" + format_data_string(this->unavailable_sc_cards.data(), this->unavailable_sc_cards.bytes()));
|
||||
lines.emplace_back(string_printf(" a9=[%08" PRIX32 " %08" PRIX32 " %04hX %04hX]",
|
||||
this->unknown_a9_a.load(), this->unknown_a9_b.load(), this->unknown_a9_c.load(), this->unknown_a9_d.load()));
|
||||
lines.emplace_back(string_printf(" a10=%02hhX", this->unknown_a10));
|
||||
lines.emplace_back(string_printf(" cyber_block_type=%02hhX", this->cyber_block_type));
|
||||
lines.emplace_back(string_printf(" a11=%02hhX%02hhX", this->unknown_a11[0], this->unknown_a11[1]));
|
||||
static const array<const char*, 0x18> sc_card_entry_names = {
|
||||
"00 (Guykild; 0005)",
|
||||
"01 (Kylria; 0006)",
|
||||
"02 (Saligun; 0110)",
|
||||
"03 (Relmitos; 0111)",
|
||||
"04 (Kranz; 0002)",
|
||||
"05 (Sil'fer; 0004)",
|
||||
"06 (Ino'lis; 0003)",
|
||||
"07 (Viviana; 0112)",
|
||||
"08 (Teifu; 0113)",
|
||||
"09 (Orland; 0001)",
|
||||
"0A (Stella; 0114)",
|
||||
"0B (Glustar; 0115)",
|
||||
"0C (Hyze; 0117)",
|
||||
"0D (Rufina; 0118)",
|
||||
"0E (Peko; 0119)",
|
||||
"0F (Creinu; 011A)",
|
||||
"10 (Reiz; 011B)",
|
||||
"11 (Lura; 0007)",
|
||||
"12 (Break; 0008)",
|
||||
"13 (Rio; 011C)",
|
||||
"14 (Endu; 0116)",
|
||||
"15 (Memoru; 011D)",
|
||||
"16 (K.C.; 011E)",
|
||||
"17 (Ohgun; 011F)",
|
||||
};
|
||||
string unavailable_sc_cards = " unavailable_sc_cards=[";
|
||||
for (size_t z = 0; z < 0x18; z++) {
|
||||
if (this->unavailable_sc_cards[z] == 0xFFFF) {
|
||||
continue;
|
||||
}
|
||||
if (unavailable_sc_cards.size() > 24) {
|
||||
unavailable_sc_cards += ", ";
|
||||
}
|
||||
if (this->unavailable_sc_cards[z] >= sc_card_entry_names.size()) {
|
||||
unavailable_sc_cards += string_printf("%04hX (invalid)", this->unavailable_sc_cards[z].load());
|
||||
} else {
|
||||
unavailable_sc_cards += sc_card_entry_names[this->unavailable_sc_cards[z]];
|
||||
}
|
||||
}
|
||||
unavailable_sc_cards += ']';
|
||||
lines.emplace_back(move(unavailable_sc_cards));
|
||||
for (size_t z = 0; z < 4; z++) {
|
||||
string player_type;
|
||||
switch (this->entry_states[z].player_type) {
|
||||
|
||||
@@ -808,7 +808,7 @@ struct MapDefinition { // .mnmd format; also the format of (decompressed) quests
|
||||
|
||||
/* 0118 */ parray<parray<uint8_t, 0x10>, 0x10> alt_maps1[2][0x0A];
|
||||
/* 1518 */ parray<be_float, 0x12> alt_maps_unknown_a3[2][0x0A];
|
||||
/* 1AB8 */ parray<be_float, 0x24> unknown_a5[3];
|
||||
/* 1AB8 */ parray<be_float, 0x24> unknown_a4[3];
|
||||
|
||||
// In the modification_tiles array, the values are:
|
||||
// 10 = blocked by rock (as if the corresponding map_tiles value was 00)
|
||||
@@ -820,9 +820,9 @@ struct MapDefinition { // .mnmd format; also the format of (decompressed) quests
|
||||
// preview; behaves like 10 and 20 in game)
|
||||
/* 1C68 */ parray<parray<uint8_t, 0x10>, 0x10> modification_tiles;
|
||||
|
||||
/* 1D68 */ parray<uint8_t, 0x74> unknown_a6;
|
||||
/* 1D68 */ parray<uint8_t, 0x74> unknown_a5;
|
||||
/* 1DDC */ Rules default_rules;
|
||||
/* 1DEC */ parray<uint8_t, 4> unknown_a7;
|
||||
/* 1DEC */ parray<uint8_t, 4> unknown_a6;
|
||||
|
||||
/* 1DF0 */ ptext<char, 0x14> name;
|
||||
/* 1E04 */ ptext<char, 0x14> location_name;
|
||||
@@ -847,7 +847,8 @@ struct MapDefinition { // .mnmd format; also the format of (decompressed) quests
|
||||
} __attribute__((packed));
|
||||
/* 20F0 */ NPCCharacter npc_chars[3]; // Unused if name[0] == 0
|
||||
|
||||
/* 242C */ parray<uint8_t, 0x14> unknown_a8; // Always FF?
|
||||
/* 242C */ parray<uint8_t, 8> unknown_a7_a; // Always FF?
|
||||
/* 2434 */ parray<be_uint32_t, 3> unknown_a7_b; // Always FF?
|
||||
|
||||
// before_message appears before the battle; after_message appears after the
|
||||
// battle. In free battle and online mode, before_message is ignored, but
|
||||
@@ -867,9 +868,19 @@ struct MapDefinition { // .mnmd format; also the format of (decompressed) quests
|
||||
|
||||
/* 59B0 */ parray<be_uint16_t, 0x10> reward_card_ids;
|
||||
|
||||
/* 59D0 */ parray<uint8_t, 0x0C> unknown_a9;
|
||||
/* 59D0 */be_uint32_t unknown_a9_a;
|
||||
/* 59D4 */be_uint32_t unknown_a9_b;
|
||||
/* 59D8 */be_uint16_t unknown_a9_c;
|
||||
/* 59DA */be_uint16_t unknown_a9_d;
|
||||
|
||||
/* 59DC */ uint8_t unknown_a10;
|
||||
/* 59DD */ parray<uint8_t, 3> unknown_a11;
|
||||
|
||||
// This field determines the type of block to be used in the Cyber
|
||||
// environment. There are 10 block types (0-9); if this value is >= 10, it is
|
||||
// treated as 0.
|
||||
/* 59DD */ uint8_t cyber_block_type;
|
||||
|
||||
/* 59DE */ parray<uint8_t, 2> unknown_a11;
|
||||
|
||||
// This array specifies which SC characters can't participate in the quest
|
||||
// (that is, the player is not allowed to choose decks with these SC cards).
|
||||
|
||||
Reference in New Issue
Block a user