backend-infra-engineer: Release v0.3.3 snapshot

This commit is contained in:
scawful
2025-11-21 21:35:50 -05:00
parent 3d71417f62
commit 476dd1cd1c
818 changed files with 65706 additions and 35514 deletions

View File

@@ -97,7 +97,7 @@ std::string ParseTextDataByte(uint8_t value) {
// Check for dictionary.
int8_t dictionary = FindDictionaryEntry(value);
if (dictionary >= 0) {
return absl::StrFormat("[%s:%02X]", DICTIONARYTOKEN,
return absl::StrFormat("[%s:%02X]", DICTIONARYTOKEN,
static_cast<unsigned char>(dictionary));
}
@@ -181,8 +181,8 @@ std::vector<DictionaryEntry> BuildDictionaryEntries(Rom* rom) {
return AllDictionaries;
}
std::string ReplaceAllDictionaryWords(std::string str,
const std::vector<DictionaryEntry>& dictionary) {
std::string ReplaceAllDictionaryWords(
std::string str, const std::vector<DictionaryEntry>& dictionary) {
std::string temp = std::move(str);
for (const auto& entry : dictionary) {
if (entry.ContainedInString(temp)) {
@@ -251,7 +251,8 @@ absl::StatusOr<MessageData> ParseSingleMessage(
current_message_raw.append("[");
current_message_raw.append(DICTIONARYTOKEN);
current_message_raw.append(":");
current_message_raw.append(util::HexWord(static_cast<unsigned char>(dictionary)));
current_message_raw.append(
util::HexWord(static_cast<unsigned char>(dictionary)));
current_message_raw.append("]");
auto mutable_rom_data = const_cast<uint8_t*>(rom_data.data());
@@ -292,13 +293,13 @@ std::vector<std::string> ParseMessageData(
// Use index-based loop to properly skip argument bytes
for (size_t pos = 0; pos < message.Data.size(); ++pos) {
uint8_t byte = message.Data[pos];
// Check for text commands first (they may have arguments to skip)
auto text_element = FindMatchingCommand(byte);
if (text_element != std::nullopt) {
// Add newline for certain commands
if (text_element->ID == kScrollVertical ||
text_element->ID == kLine2 || text_element->ID == kLine3) {
if (text_element->ID == kScrollVertical || text_element->ID == kLine2 ||
text_element->ID == kLine3) {
parsed_message.append("\n");
}
// If command has an argument, get it from next byte and skip it
@@ -311,14 +312,14 @@ std::vector<std::string> ParseMessageData(
}
continue; // Move to next byte
}
// Check for special characters
auto special_element = FindMatchingSpecial(byte);
if (special_element != std::nullopt) {
parsed_message.append(special_element->GetParamToken());
continue;
}
// Check for dictionary entries
if (byte >= DICTOFF && byte < (DICTOFF + 97)) {
DictionaryEntry dic_entry;
@@ -331,7 +332,7 @@ std::vector<std::string> ParseMessageData(
parsed_message.append(dic_entry.Contents);
continue;
}
// Finally check for regular characters
if (CharEncoder.contains(byte)) {
parsed_message.push_back(CharEncoder.at(byte));
@@ -401,8 +402,9 @@ std::vector<MessageData> ReadAllTextData(uint8_t* rom, int pos) {
// Check for dictionary.
int8_t dictionary = FindDictionaryEntry(current_byte);
if (dictionary >= 0) {
current_raw_message.append(absl::StrFormat("[%s:%s]", DICTIONARYTOKEN,
util::HexByte(static_cast<unsigned char>(dictionary))));
current_raw_message.append(absl::StrFormat(
"[%s:%s]", DICTIONARYTOKEN,
util::HexByte(static_cast<unsigned char>(dictionary))));
uint32_t address =
Get24LocalFromPC(rom, kPointersDictionaries + (dictionary * 2));