Commit Graph

2500 Commits

Author SHA1 Message Date
scawful
956a70e8fa Rename z3 structures to zelda3 for consistency and clarity; add zelda3_rom struct and related functions 2025-01-18 15:09:38 -05:00
scawful
7b939d9a70 Remove unused MockClock class from testing mocks 2025-01-18 12:33:46 -05:00
scawful
339df53674 Refactor ROM loading methods 2025-01-18 12:33:33 -05:00
scawful
3fc52cce62 Add zelda.h for game version handling and refactor ROM version management 2025-01-18 00:45:44 -05:00
scawful
1c53ba24c5 Refactor PPU and CPU classes by removing Clock dependency and updating constructors 2025-01-18 00:12:12 -05:00
scawful
70510ec0e9 Fix overworld initialization by passing internal ROM to constructor 2025-01-17 23:31:32 -05:00
scawful
ec2cc95b5a Update submodule references for imgui and imgui_test_engine 2025-01-17 23:31:27 -05:00
scawful
911cac401d Refactor message data handling and improve variable naming for clarity 2025-01-17 23:30:41 -05:00
scawful
0cbaaccb66 Enhance message tests and refactor graphics data loading in overworld tests 2025-01-16 05:08:04 -05:00
scawful
c8883a1e54 Remove unused includes and clean up header files 2025-01-16 03:44:37 -05:00
scawful
d9cc92edca Add ParseMessageData to message data helper fns 2025-01-09 21:23:14 -05:00
scawful
30bfa91427 Refactor yaze initialization and shutdown to use status codes and add error messaging 2025-01-06 23:17:18 -05:00
scawful
5085d8ebad update imgui and imgui_test_engine 2025-01-06 21:39:41 -05:00
scawful
e13cdcbf4b Add DrawDungeonMapsRoomGfx 2025-01-06 21:39:27 -05:00
scawful
40a09f17e9 re-render graphics injected into tile16 editor 2025-01-06 21:38:59 -05:00
scawful
7ad0672e74 Wrap overworld sprite graphics draw in experiment flag 2025-01-06 21:38:42 -05:00
scawful
d38ae7914d Load sprites after overworld maps for current gfx 2025-01-06 21:36:51 -05:00
scawful
196eba42e8 Add roadmap towards 1.0 based on features planned 2025-01-06 21:34:25 -05:00
scawful
013edb3fae update yaze public header, remove sprite.h, add z3_dungeon_sprite 2025-01-06 16:21:37 -05:00
scawful
4c39f02224 update dungeon header 2025-01-06 15:55:44 -05:00
scawful
9c7f78a228 update z3_dungeon_room public data type internals 2025-01-06 15:48:36 -05:00
scawful
2d15833b0d Implement folder dialog, subdirs, files with nfd 2025-01-06 13:25:49 -05:00
scawful
65be2d0bd2 move sdl_delete.h to platform 2025-01-06 13:23:07 -05:00
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