Commit Graph

112 Commits

Author SHA1 Message Date
scawful
7cc808918d Enhance Bitmap class with error handling and code improvements
- Introduced BitmapError class for more specific error handling in the Bitmap class.
- Updated data checks to use `empty()` for clarity and consistency.
- Improved pixel data handling by ensuring proper type usage and modifying loop constructs for better performance.
- Refactored constructor and method implementations for improved readability and maintainability.
2025-05-18 16:44:15 -04:00
scawful
ceab496226 Refactor Bitmap class for improved data handling
- Removed unused data_size_ member and updated size() method to return the size of data_ directly.
- Simplified data size checks in Create method to enhance clarity.
- Updated UpdateTexture method to use memcpy for pixel data assignment, improving performance.
- Ensured WriteToPixel method updates both pixel_data_ and data_ for consistency in modifications.
2025-05-15 23:01:03 -04:00
scawful
5167bb7206 Refactor bitmap handling and remove unused functions for improved clarity
- Simplified pixel format handling by removing the 2BPP format and adjusting related cases.
- Eliminated unused texture tracking variables from the Bitmap class.
- Removed the ExtractTile8Bitmaps function to streamline bitmap processing and reduce complexity.
2025-05-08 19:42:20 -04:00
scawful
1710430c2e Remove unused methods and comments from Bitmap class for improved clarity and maintainability. This includes the removal of surface saving, initialization, cleanup, and palette management functions that are no longer needed. 2025-05-02 12:14:04 -04:00
scawful
4f8d765c48 Refactor Bitmap class to utilize Arena for surface and texture management
Replace custom surface and texture allocation methods with Arena's allocation, improving memory management. Update related methods to work with raw pointers instead of smart pointers, enhancing performance and reducing overhead. Clean up unused code and comments for better clarity.
2025-04-30 18:00:44 -04:00
scawful
44e13cf4bb Refactor bitmap palette management across various components to streamline palette setting and improve error handling; remove unnecessary status checks and enhance consistency in palette application methods. 2025-04-17 21:49:47 -04:00
scawful
a267e18f46 Refactor Bitmap class to improve texture management and memory tracking; implement custom allocators for SDL_Surface and SDL_Texture, enhance bitmap constructors, and add utility functions for tile extraction and pixel manipulation. 2025-04-16 22:35:47 -04:00
scawful
95df0b5d8b Refactor Bitmap class: remove deprecated constructor and update Initialize method signature 2025-03-20 18:17:45 -04:00
scawful
c99a4b0bc4 rename ApplyPalette with SetPalette 2025-03-02 17:06:46 -05:00
scawful
4dc09ad5fc Refactor graphics loading: simplify function calls by removing namespace prefixes and improve header organization in scad_format 2025-02-28 00:46:39 -05:00
scawful
809282edad remove nonstandard type aliases 2025-01-19 20:16:40 -05:00
scawful
65be2d0bd2 move sdl_delete.h to platform 2025-01-06 13:23:07 -05:00
Justin Scofield
cf13d6bf9e Update Bitmap and add Initialize function 2025-01-05 20:55:36 -05:00
scawful
92d6738a5c remove cached converted surface from Bitmap class 2025-01-01 16:08:43 -05:00
scawful
d711a84ed3 refactor Bitmap class: rename ConvertSurfaceToPNG to ConvertSurfaceToPng and streamline GetPngData method 2025-01-01 15:53:17 -05:00
scawful
e05e7c35db remove app namespace 2024-12-28 21:28:51 -05:00
scawful
7798d769a5 Refactor bitmap update methods to remove unnecessary parameters; simplify texture updating in Renderer and Bitmap classes 2024-11-13 09:16:16 -05:00
scawful
160a9c4c47 Refactor bitmap and compression headers to remove unused includes for clarity 2024-11-13 08:51:32 -05:00
scawful
089dc4017c Remove unused functions 2024-11-10 21:40:22 -05:00
scawful
6465486443 Refactor Bitmap class to use shared_ptr for SDL_Surface objects 2024-08-25 14:22:52 -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
54e8d7c3a5 Remove deprecated BitmapManager and experiment flag 2024-08-13 22:02:05 -04:00
scawful
327985b1c9 gfx cleanup 2024-08-13 18:04:41 -04:00
scawful
f1f2a7a25f gfx housekeeping 2024-08-13 00:50:39 -04:00
scawful
9f9edc9666 add YAZE_LIB_PNG if directives 2024-08-13 00:32:02 -04:00
scawful
d94735baf5 add SDL_RETURN_IF_ERROR, refactor bitmap 2024-08-13 00:26:10 -04:00
scawful
35d0130fc3 cleanup bitmap 2024-08-09 19:36:43 -04:00
scawful
579a7a9607 move SDL_Surface_Deleter and SDL_Texture_Deleter 2024-08-09 19:16:09 -04:00
scawful
7e5b3858f4 mark BitmapManager as deprecated, transitioning to fixed arrays or vectors over hash map 2024-08-06 19:19:28 -04:00
scawful
7488551335 add BitmapFormat enum, update Reformat 2024-08-06 18:01:24 -04:00
scawful
988f89a9cc refactor bitmap 2024-08-04 21:03:57 -04:00
scawful
b1119a0c35 housekeeping 2024-08-02 18:44:46 -04:00
scawful
a1bc11b34d housekeeping 2024-07-29 12:42:52 -04:00
scawful
2962ae8e4e fix bpp format constant values 2024-07-27 09:46:04 -04:00
scawful
bf0379edc4 add Create and Reformat with GetSnesPixelFormat 2024-07-24 01:40:37 -04:00
scawful
f2b2bb17a5 add GetSnesPixelFormat and SNES_PIXELFORMAT_XBPP constants 2024-07-24 01:40:15 -04:00
scawful
f02d0d85ee update bitmap manager methods 2024-07-19 20:48:02 -04:00
scawful
934b9e05f3 remove shared_ptr semantics from BitmapManager as underlying texture/surface are already smart ptrs 2024-07-13 13:07:47 -04:00
scawful
eb51c43d7d remove old graphics bin from ow editor 2024-05-30 18:25:14 -04:00
scawful
18769163a2 remove shared ptr reset in bitmap cleanup 2024-05-30 18:10:11 -04:00
scawful
ba1e2367bb fix double free bug 2024-05-30 12:14:01 -04:00
scawful
00e82140e0 cleanup bitmap class 2024-05-28 23:49:45 -04:00
scawful
3272037f72 cleanup bitmap class 2024-05-28 23:10:15 -04:00
scawful
b31a8e3ca2 add error logging to bitmap constructor 2024-05-28 17:38:35 -04:00
scawful
f28e26ef28 housekeeping 2024-05-24 20:37:29 -04:00
scawful
81e5659c1f Replace BuildAndRenderBitmap with Rom::CreateAndRenderBitmap 2024-04-14 15:02:56 -05:00
scawful
5953e58bd4 Rename SharedROM to SharedRom 2024-04-14 14:51:53 -05:00
scawful
b7cd8bccd3 document gfx and lc_lz2 namespace 2024-04-14 10:18:25 -05:00
scawful
012eee1525 add more comments to gfx classes and canvas 2024-04-14 00:11:50 -05:00