Commit Graph

2027 Commits

Author SHA1 Message Date
scawful
b3bc05e620 consolidate file related functions, add nativefiledialog-extended to build 2025-01-06 13:21:28 -05:00
scawful
fdce133e39 add nativefiledialog-extended as submodule 2025-01-06 12:58:41 -05:00
scawful
6bf8b62d64 Merge remote-tracking branch 'refs/remotes/origin/master'
Merge changes made on visual studio repo.
2025-01-06 11:13:29 -05:00
Justin Scofield
88198323b3 Refactor ROM handling and update Overworld methods
Updated MessageEditor, RoomEntrance, and Overworld classes to use WriteByte instead of Write for byte values. Refactored ROM class by removing Write and toint16 methods, moving constants, and updating operator[]. Modified Overworld methods to return absl::Status and handle errors. Updated Inventory and OverworldMap methods to use ReadWord instead of toint16.
2025-01-05 21:19:53 -05:00
Justin Scofield
510581ad1f Refactor Overworld loading to use async tasks
Refactored Overworld::LoadSprites to use std::async for concurrent sprite loading, improving efficiency. Modified Overworld::LoadOverworldMaps to wait for all async tasks and check results for errors. Updated Overworld::LoadSpritesFromMap to use mutable_current_graphics() for mutable access to current graphics. Added mutable_current_graphics method to OverworldMap class. Optimized Sprite constructor to take a const reference to avoid unnecessary copying.
2025-01-05 20:57:13 -05:00
Justin Scofield
839449e85d Improve logging and reformat CreateWindow call
Updated common.h to include <chrono> and absl/strings/str_cat.h.
Modified logf to include a timestamp in log messages.
Replaced log_to_console with ExperimentFlags::get().kLogToConsole.
Removed newline character from logf output.
Reformatted SDL_CreateWindow call in controller.cc for readability.
2025-01-05 20:56:53 -05:00
Justin Scofield
cf13d6bf9e Update Bitmap and add Initialize function 2025-01-05 20:55:36 -05:00
Justin Scofield
5e0fb9e36e Add ReloadPackageFonts 2025-01-05 20:54:56 -05:00
Justin Scofield
f625fc94b3 Updated GraphicsEditor and Tile16Editor to use std::array instead of std::vector for better performance. 2025-01-05 20:54:19 -05:00
Justin Scofield
02a86c41da Refactored EditorManager to consolidate popup drawing methods into a single DrawPopups method and added a DrawMenuBar method. Replaced DrawYazeMenu with DrawHomepage for displaying a welcome message and options for opening a ROM. Introduced a LoadRom method to handle ROM loading and updated related methods to set the current_rom_ pointer. Added settings_editor_ to the list of active editors. 2025-01-05 20:54:02 -05:00
Justin Scofield
31217e1c5c Refactor flags and add Font Manager to settings editor
Simplified `ExperimentFlags` by removing unused flags and updated
`Controller` to no longer inherit from it. Refactored `FlagsMenu`
to separate flag categories into individual methods for better
organization. Enhanced settings editor with a new "Font Manager"
tab and updated `DrawGeneralSettings` to use the new flag category
methods. Added `DrawFontManager` function for font management.
2025-01-05 11:58:45 -05:00
Justin Scofield
66dc72148d Add helper functions SetFontPath, LoadFont, AddIconFont, and AddJapaneseFont 2025-01-05 06:38:14 -05:00
Justin Scofield
f1f6df829f controller and canvas houskeeping 2025-01-05 06:17:09 -05:00
Justin Scofield
2d9f4be91d 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`
2025-01-04 20:05:46 -05:00
Justin Scofield
fe0dbd3642 Refactor graphics sheet management with singleton class
Refactor the handling of graphics sheets by introducing a singleton class `GraphicsSheetManager`. This centralizes the management of graphics sheets, replacing direct access through the `Rom` object. Key changes include:

- Updated various methods across multiple classes to use `GraphicsSheetManager::GetInstance()` for accessing and manipulating graphics sheets.
- Introduced standalone functions `LoadLinkGraphics`, `LoadAllGraphicsData`, and `SaveAllGraphicsData` for loading and saving graphics data.
- Refactored the `Rom` class to remove methods and member variables related to graphics sheet management.
- Updated `OverworldEditor` to use `std::array` for `maps_bmp_` and added error handling for `std::bad_alloc` exceptions.
- Improved code modularity and error handling throughout the application.
2025-01-04 20:04:00 -05:00
scawful
698b5a43fa update editors based on namespace changes 2025-01-02 10:16:50 -05:00
scawful
1f5acc66c9 remove unnecessary whitespace and comments in room_object and sprite files 2025-01-02 10:07:15 -05:00
scawful
1e8a6cff90 Refactor tracker: standardize function name casing and remove unnecessary comment separators 2025-01-02 10:06:29 -05:00
scawful
2909809f21 Remove unnecessary screen namespace declarations from dungeon_map, inventory, and title_screen files 2025-01-02 10:06:20 -05:00
scawful
3cbcb61222 Add CalculateRoomSize to Room 2025-01-02 08:37:48 -05:00
scawful
df67e6aaf7 Add LayerMergeType and list of constant types 2025-01-02 08:37:34 -05:00
scawful
72b51376d9 add enums for collision, effects, and tags 2025-01-02 08:35:15 -05:00
scawful
ca702d62e3 refactor overworld: add constants for exits, items, entrances, and map IDs 2025-01-01 19:30:36 -05:00
scawful
92d6738a5c remove cached converted surface from Bitmap class 2025-01-01 16:08:43 -05:00
scawful
9164fec53f refactor OverworldEditor: replace ConvertSurfaceToPNG with GetPngData for clipboard image copying 2025-01-01 15:53:59 -05:00
scawful
4a250a35cb refactor Tile16Editor: improve LoadTile8 method with asynchronous tile data loading 2025-01-01 15:53:42 -05:00
scawful
d711a84ed3 refactor Bitmap class: rename ConvertSurfaceToPNG to ConvertSurfaceToPng and streamline GetPngData method 2025-01-01 15:53:17 -05:00
Justin Scofield
8cb9eedb25 replace constexpr std string with static const 2024-12-31 21:00:27 -05:00
Justin Scofield
bdc5e756cf temporary removal of std format 2024-12-31 20:57:05 -05:00
Justin Scofield
8b57760bb6 ok i give up 2024-12-31 20:52:08 -05:00
Justin Scofield
ef44313671 housekeeping combo 2024-12-31 20:50:24 -05:00
Justin Scofield
0e97df2fd2 omg 2024-12-31 20:48:03 -05:00
Justin Scofield
54a5be8d3a housekeeping 2024-12-31 20:45:43 -05:00
Justin Scofield
20c0b0b5a7 adjust gcc update command 2024-12-31 20:45:20 -05:00
Justin Scofield
e04fc3d828 housekeeping 2024-12-31 20:43:23 -05:00
Justin Scofield
5e0f1a072f Set standard to C++23 2024-12-31 20:25:05 -05:00
Justin Scofield
42c4d8ab18 Update to GCC-14 for CI pipeline 2024-12-31 20:20:51 -05:00
Justin Scofield
8b54906a51 Merge branch 'master' of https://github.com/scawful/yaze 2024-12-31 19:21:24 -05:00
scawful
427fd50496 Guard custom overworld loading code with experiment flag 2024-12-31 19:20:32 -05:00
Justin Scofield
75845b368d include string in spc700.h 2024-12-31 18:53:52 -05:00
Justin Scofield
7b00e0838f Fix ROM title extraction in LoadZelda3 function
Resized the `title_` variable to `kTitleStringLength` to ensure it can hold the ROM title string. Used `std::copy` to copy the ROM title from `rom_data_` starting at `kTitleStringOffset` to `kTitleStringOffset + kTitleStringLength` into the `title_` variable. This change ensures that the `title_` variable correctly stores the ROM title extracted from the `rom_data_`.
2024-12-31 18:53:33 -05:00
scawful
a54143cbab Refactor Hyrule Magic compression functions to return std::vector<uint8_t> instead of raw pointers for improved memory management 2024-12-31 18:32:25 -05:00
scawful
308eb4b287 Rename Hyrule Magic compression functions; update deprecation notes 2024-12-31 18:20:18 -05:00
scawful
fd102a5d3c Refactor CompressionPiece constructor to accept string by reference and clean up unused comments 2024-12-31 18:19:49 -05:00
scawful
d3eca0f950 Make ExperimentFlags a singleton, remove inheritance relationships 2024-12-31 18:13:53 -05:00
scawful
5e1e2901ff Refactor overworld constants 2024-12-31 17:50:19 -05:00
scawful
1a5d5befb9 Initialize member variables in Controller class for improved stability 2024-12-31 17:41:47 -05:00
scawful
daad7a4731 Improve error handling in LoadBinaryGfx by checking palette application status before rendering 2024-12-31 17:40:41 -05:00
scawful
aece708513 Refactor overworld entity constants for improved naming consistency and readability 2024-12-31 17:40:15 -05:00
scawful
41c31e3193 Refactor overworld constants to improve naming consistency and readability 2024-12-31 17:39:57 -05:00