MessageEditor updates
This commit is contained in:
@@ -13,10 +13,9 @@ namespace editor {
|
||||
const uint8_t MESSAGETERMINATOR = 0x7F;
|
||||
|
||||
std::string ReplaceAllDictionaryWords(std::string str);
|
||||
std::vector<uint8_t> ParseMessageToData(std::string str);
|
||||
|
||||
const std::string CHEESE = "\uBEBE"; // Inserted into commands to protect
|
||||
// them from dictionary replacements.
|
||||
// Inserted into commands to protect them from dictionary replacements.
|
||||
const std::string CHEESE = "\uBEBE";
|
||||
|
||||
struct MessageData {
|
||||
int ID;
|
||||
@@ -48,12 +47,6 @@ struct MessageData {
|
||||
ContentsParsed = other.ContentsParsed;
|
||||
}
|
||||
|
||||
void SetMessage(std::string messageString) {
|
||||
ContentsParsed = messageString;
|
||||
RawString = OptimizeMessageForDictionary(messageString);
|
||||
RecalculateData();
|
||||
}
|
||||
|
||||
std::string ToString() {
|
||||
return absl::StrFormat("%0X - %s", ID, ContentsParsed);
|
||||
}
|
||||
@@ -85,11 +78,6 @@ struct MessageData {
|
||||
|
||||
return finalString;
|
||||
}
|
||||
|
||||
void RecalculateData() {
|
||||
Data = ParseMessageToData(RawString);
|
||||
DataParsed = ParseMessageToData(ContentsParsed);
|
||||
}
|
||||
};
|
||||
|
||||
struct TextElement {
|
||||
|
||||
Reference in New Issue
Block a user