yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
message_data.cc File Reference
#include "message_data.h"
#include <fstream>
#include <optional>
#include <sstream>
#include <string>
#include "absl/strings/ascii.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
#include "core/rom_settings.h"
#include "rom/snes.h"
#include "rom/write_fence.h"
#include "util/hex.h"
#include "util/log.h"
#include "util/macro.h"

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::editor
 Editors are the view controllers for the application.
 
namespace  yaze::editor::anonymous_namespace{message_data.cc}
 

Functions

int yaze::editor::GetExpandedTextDataStart ()
 
int yaze::editor::GetExpandedTextDataEnd ()
 
uint8_t yaze::editor::FindMatchingCharacter (char value)
 
int8_t yaze::editor::FindDictionaryEntry (uint8_t value)
 
std::optional< TextElementyaze::editor::FindMatchingCommand (uint8_t b)
 
std::optional< TextElementyaze::editor::FindMatchingSpecial (uint8_t value)
 
ParsedElement yaze::editor::FindMatchingElement (const std::string &str)
 
std::string yaze::editor::ParseTextDataByte (uint8_t value)
 
std::vector< uint8_t > yaze::editor::ParseMessageToData (std::string str)
 
MessageParseResult yaze::editor::ParseMessageToDataWithDiagnostics (std::string_view str)
 
std::string yaze::editor::MessageBankToString (MessageBank bank)
 
absl::StatusOr< MessageBankyaze::editor::MessageBankFromString (std::string_view value)
 
std::vector< DictionaryEntryyaze::editor::BuildDictionaryEntries (Rom *rom)
 
std::string yaze::editor::ReplaceAllDictionaryWords (std::string str, const std::vector< DictionaryEntry > &dictionary)
 
DictionaryEntry yaze::editor::FindRealDictionaryEntry (uint8_t value, const std::vector< DictionaryEntry > &dictionary)
 
absl::StatusOr< MessageDatayaze::editor::ParseSingleMessage (const std::vector< uint8_t > &rom_data, int *current_pos)
 
std::vector< std::string > yaze::editor::ParseMessageData (std::vector< MessageData > &message_data, const std::vector< DictionaryEntry > &dictionary_entries)
 
std::vector< MessageDatayaze::editor::ReadAllTextData (uint8_t *rom, int pos, int max_pos)
 
absl::Status yaze::editor::LoadExpandedMessages (std::string &expanded_message_path, std::vector< std::string > &parsed_messages, std::vector< MessageData > &expanded_messages, std::vector< DictionaryEntry > &dictionary)
 
nlohmann::json yaze::editor::SerializeMessagesToJson (const std::vector< MessageData > &messages)
 
absl::Status yaze::editor::ExportMessagesToJson (const std::string &path, const std::vector< MessageData > &messages)
 
nlohmann::json yaze::editor::SerializeMessageBundle (const std::vector< MessageData > &vanilla, const std::vector< MessageData > &expanded)
 
absl::Status yaze::editor::ExportMessageBundleToJson (const std::string &path, const std::vector< MessageData > &vanilla, const std::vector< MessageData > &expanded)
 
absl::StatusOr< MessageBundleEntryyaze::editor::anonymous_namespace{message_data.cc}::ParseMessageBundleEntry (const nlohmann::json &entry, MessageBank default_bank)
 
absl::StatusOr< std::vector< MessageBundleEntry > > yaze::editor::ParseMessageBundleJson (const nlohmann::json &json)
 
absl::StatusOr< std::vector< MessageBundleEntry > > yaze::editor::LoadMessageBundleFromJson (const std::string &path)
 
std::vector< std::string > yaze::editor::ValidateMessageLineWidths (const std::string &message)
 
std::optional< std::pair< int, std::string > > yaze::editor::ParseOrgHeader (const std::string &line)
 
std::vector< std::pair< int, std::string > > yaze::editor::ParseOrgContent (const std::string &content)
 
std::string yaze::editor::ExportToOrgFormat (const std::vector< std::pair< int, std::string > > &messages, const std::vector< std::string > &labels)
 
std::vector< MessageDatayaze::editor::ReadExpandedTextData (uint8_t *rom, int pos)
 
absl::Status yaze::editor::WriteExpandedTextData (Rom *rom, int start, int end, const std::vector< std::string > &messages)
 
absl::Status yaze::editor::WriteExpandedTextData (uint8_t *rom, int start, int end, const std::vector< std::string > &messages)
 
absl::Status yaze::editor::WriteAllTextData (Rom *rom, const std::vector< MessageData > &messages)