Refactor and add default values to various structs

- Removed `FindMatchingCharacter` declaration from `message_data.h`
- Added default values to `DictionaryEntry` and `MessageData` members
- Marked several methods in `DictionaryEntry`, `MessageData`, and `TextElement` as `const`
- Updated `TextElement` constructor to take `const std::string&`
- Added string constants for text descriptions in `TextElement`
- Updated `TextCommands` vector to use new string constants
- Declared new function `FindMatchingCommand`
- Included `<array>` header in `message_editor.h`
- Changed `width_array` in `MessageEditor` to `std::array` with default initialization
- Removed `list_of_texts_` and `all_dictionaries_` vectors from `MessageEditor`
- Added default values to `GameEntity` members
- Initialized `sheets` array in `PseudoVram`
- Initialized `map_parent_` and `all_tiles_types_` arrays in `Overworld`
This commit is contained in:
Justin Scofield
2025-01-04 20:05:46 -05:00
parent fe0dbd3642
commit 2d9f4be91d
5 changed files with 71 additions and 49 deletions

View File

@@ -240,8 +240,8 @@ class Overworld : public SharedRom {
OverworldMapTiles map_tiles_;
std::array<uint8_t, kNumOverworldMaps> map_parent_;
std::array<uint8_t, kNumTileTypes> all_tiles_types_;
std::array<uint8_t, kNumOverworldMaps> map_parent_ = { 0 };
std::array<uint8_t, kNumTileTypes> all_tiles_types_ = { 0 };
std::vector<gfx::Tile16> tiles16_;
std::vector<gfx::Tile32> tiles32_;
std::vector<uint16_t> tiles32_list_;