add kNumDictionaryEntries
This commit is contained in:
@@ -322,16 +322,16 @@ absl::Status MessageEditor::Initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessageEditor::BuildDictionaryEntries() {
|
void MessageEditor::BuildDictionaryEntries() {
|
||||||
for (int i = 0; i < 97; i++) {
|
for (int i = 0; i < kNumDictionaryEntries; i++) {
|
||||||
std::vector<uint8_t> bytes;
|
std::vector<uint8_t> bytes;
|
||||||
std::stringstream stringBuilder;
|
std::stringstream stringBuilder;
|
||||||
|
|
||||||
int address = core::SnesToPc(
|
int address = core::SnesToPc(
|
||||||
0x0E0000 + (rom()->data()[kPointersDictionaries + (i * 2) + 1] << 8) +
|
kTextData + (rom()->data()[kPointersDictionaries + (i * 2) + 1] << 8) +
|
||||||
rom()->data()[kPointersDictionaries + (i * 2)]);
|
rom()->data()[kPointersDictionaries + (i * 2)]);
|
||||||
|
|
||||||
int temppush_backress = core::SnesToPc(
|
int temppush_backress = core::SnesToPc(
|
||||||
0x0E0000 +
|
kTextData +
|
||||||
(rom()->data()[kPointersDictionaries + ((i + 1) * 2) + 1] << 8) +
|
(rom()->data()[kPointersDictionaries + ((i + 1) * 2) + 1] << 8) +
|
||||||
rom()->data()[kPointersDictionaries + ((i + 1) * 2)]);
|
rom()->data()[kPointersDictionaries + ((i + 1) * 2)]);
|
||||||
|
|
||||||
@@ -341,7 +341,6 @@ void MessageEditor::BuildDictionaryEntries() {
|
|||||||
stringBuilder << ParseTextDataByte(uint8_tDictionary);
|
stringBuilder << ParseTextDataByte(uint8_tDictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
// AllDictionaries[i] = DictionaryEntry{(uint8_t)i, stringBuilder.str()};
|
|
||||||
AllDictionaries.push_back(DictionaryEntry{(uint8_t)i, stringBuilder.str()});
|
AllDictionaries.push_back(DictionaryEntry{(uint8_t)i, stringBuilder.str()});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,9 +349,9 @@ void MessageEditor::BuildDictionaryEntries() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessageEditor::ReadAllTextData() {
|
void MessageEditor::ReadAllTextData() {
|
||||||
int messageID = 0;
|
|
||||||
uint8_t current_byte;
|
|
||||||
int pos = kTextData;
|
int pos = kTextData;
|
||||||
|
int message_id = 0;
|
||||||
|
uint8_t current_byte;
|
||||||
std::vector<uint8_t> temp_bytes_raw;
|
std::vector<uint8_t> temp_bytes_raw;
|
||||||
std::vector<uint8_t> temp_bytes_parsed;
|
std::vector<uint8_t> temp_bytes_parsed;
|
||||||
|
|
||||||
@@ -365,7 +364,7 @@ void MessageEditor::ReadAllTextData() {
|
|||||||
|
|
||||||
if (current_byte == MESSAGETERMINATOR) {
|
if (current_byte == MESSAGETERMINATOR) {
|
||||||
auto message =
|
auto message =
|
||||||
MessageData(messageID++, pos, current_message_raw, temp_bytes_raw,
|
MessageData(message_id++, pos, current_message_raw, temp_bytes_raw,
|
||||||
current_message_parsed, temp_bytes_parsed);
|
current_message_parsed, temp_bytes_parsed);
|
||||||
|
|
||||||
ListOfTexts.push_back(message);
|
ListOfTexts.push_back(message);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const int kTextData2 = 0x75F40;
|
|||||||
const int kTextData2End = 0x773FF;
|
const int kTextData2End = 0x773FF;
|
||||||
const int kPointersDictionaries = 0x74703;
|
const int kPointersDictionaries = 0x74703;
|
||||||
const int kCharactersWidth = 0x74ADF;
|
const int kCharactersWidth = 0x74ADF;
|
||||||
|
constexpr int kNumDictionaryEntries = 97;
|
||||||
|
|
||||||
const string DICTIONARYTOKEN = "D";
|
const string DICTIONARYTOKEN = "D";
|
||||||
const uint8_t DICTOFF = 0x88;
|
const uint8_t DICTOFF = 0x88;
|
||||||
|
|||||||
Reference in New Issue
Block a user