Commit Graph

194 Commits

Author SHA1 Message Date
scawful
e202d65780 Move GraphicsSheetManager to snes.h 2025-04-30 17:49:09 -04:00
scawful
53f1fa81f3 Refactor ROM class; introduce snes.h for address conversion utilities, enhancing code organization and maintainability. 2025-04-29 13:47:00 -04:00
scawful
114084ef95 Refactor ROM loading and saving methods for clarity and consistency; streamline filename handling, remove unused flags, and rename SaveGroupsToRom to SaveGfxGroups for better readability. 2025-04-29 10:27:35 -04:00
scawful
00d30efbf1 Add short name handling for ROMs in Rom class; update EditorManager to use short names in the ROM selector for improved UI clarity. 2025-04-16 17:33:48 -04:00
scawful
3e1dd19d48 Remove unused rom_file flag and version method from Rom class 2025-04-05 14:07:07 -04:00
scawful
169bd09495 Refactor EditorManager: remove DrawRomMenu method and simplify Close function 2025-02-10 11:50:17 -05:00
scawful
26cda69d44 Refactor common functionality into zelda3 namespace; remove references to core::common 2025-01-22 13:53:01 -05:00
scawful
43fc52dec7 Refactor SnesToPc and PcToSnes functions for improved readability and consistency; remove redundant core:: namespace usage 2025-01-22 13:45:58 -05:00
scawful
809282edad remove nonstandard type aliases 2025-01-19 20:16:40 -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
c8883a1e54 Remove unused includes and clean up header files 2025-01-16 03:44:37 -05:00
scawful
9c7f78a228 update z3_dungeon_room public data type internals 2025-01-06 15:48:36 -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
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
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
0e67413d55 Refactor logging to use logf function and update log file name 2024-12-31 16:54:44 -05:00
scawful
59e59f8a38 Refactor hex string handling: replace UppercaseHex functions with Hex equivalents 2024-12-30 09:48:19 -05:00
scawful
54c170373b Change Load2BppGraphics to standalone fn, add mutable_data accessor 2024-12-29 09:58:58 -05:00
scawful
e05e7c35db remove app namespace 2024-12-28 21:28:51 -05:00
scawful
6aadd51a2d Implement SaveAllGraphicsData function to handle graphics sheet saving 2024-11-13 09:30:55 -05:00
scawful
8555dacdb5 Refactor project structure: remove labeling.h and update references to use project.h, enhancing code clarity and maintainability 2024-11-09 21:04:39 -05:00
scawful
d6a4217118 Change gfx groups from vectors to arrays in Rom 2024-11-02 10:33:39 -05:00
scawful
b22da9edb4 Refactor Rom class to improve code organization and remove unused dependencies 2024-10-11 10:46:06 -04:00
scawful
52c844eb98 Add defer_render to LoadAllGraphicsData, overworld test 2024-08-29 22:45:50 -04:00
scawful
a97487fd2c Refactor EditorManager 2024-08-24 08:38:47 -04:00
scawful
4099d8731d Refactor ROM class to use uint32_t for loop counters in LoadLinkGraphics, LoadAllGraphicsData, LoadGfxGroups, and SaveGroupsToRom methods 2024-08-22 01:28:04 -04:00
scawful
c83d0440d8 cleanup snes_palette stuff 2024-08-21 10:13:13 -04:00
scawful
e0e8c58c61 Refactor Rom class to support additional game versions 2024-08-21 00:13:04 -04:00
scawful
a8ed9b7f92 remove magic numbers, enforce const correctness 2024-08-20 21:31:59 -04:00
scawful
49611d4944 big cleanup, replace Bytes alias with std::vector<uint8_t> to reduce ambiguity 2024-08-20 12:02:47 -04:00
scawful
97dda2bfd9 chore: Update ReadWritePreconditions for empty data but loaded file 2024-08-14 19:55:57 -04:00
scawful
1234510d29 Refactor Rom to fix LoadLinkGraphics format 2024-08-14 19:41:26 -04:00
scawful
4b990662df Add Rom::LoadZelda3 for loading game data across Load fns 2024-08-14 18:28:12 -04:00
scawful
5c68f61544 Refactor Rom class to use constants for blockset and spriteset sizes 2024-08-14 18:27:40 -04:00
scawful
11cedbbff1 MockRom, Read/WriteTransaction tests, make Rom::WriteAction public 2024-08-14 01:15:19 -04:00
scawful
6b35fcb07e Add out of range error in Rom class write functions, test Write fns 2024-08-14 01:04:50 -04:00
scawful
7dfc204443 chore: Refactor Rom class to include ReadWritePreconditions 2024-08-14 00:59:25 -04:00
scawful
6c259340f9 Add new RomTests and fix small bugs in Rom class 2024-08-14 00:51:43 -04:00
scawful
b7a8b3ce54 Refactor Rom for improved readability 2024-08-13 23:58:16 -04:00
scawful
54e8d7c3a5 Remove deprecated BitmapManager and experiment flag 2024-08-13 22:02:05 -04:00
scawful
3b7542e3a7 remove deprecated Rom::mutable_bitmap_manager() 2024-08-13 21:57:20 -04:00
scawful
5ccb30f999 Refactor Rom::LoadLinkGraphics() for improved readability and maintainability 2024-08-13 21:28:09 -04:00
scawful
164ae60f5a remove deprecated graphics_bin 2024-08-13 21:22:02 -04:00
scawful
6dc90ead13 change rom title from c char to std::string 2024-08-10 21:42:09 -04:00
scawful
4b8dcd3988 add explicit file extension checks to Rom::is_loaded 2024-08-10 14:48:55 -04:00
scawful
d3df11d492 cleanup Rom class interface 2024-08-09 19:29:37 -04:00
scawful
9a2c8ae17a replace old renderer access pattern 2024-08-09 18:58:07 -04:00
scawful
47461a567d add z3_load arg to Rom::LoadFromPointer 2024-08-07 15:22:27 -04:00