Remove PNG and ZLIB support from the project

- Eliminated all references to PNG and ZLIB dependencies in CMake configuration and project files.
- Updated documentation to reflect the removal of PNG support and related functionalities.
- Adjusted build scripts and source files to remove unused code related to PNG handling, ensuring a cleaner codebase.
This commit is contained in:
scawful
2025-09-28 12:03:29 -04:00
parent dfc5b329af
commit cb107ae69c
18 changed files with 56 additions and 549 deletions

View File

@@ -121,35 +121,13 @@ void GraphicsEditor::DrawGfxEditToolset() {
TableNextColumn();
if (Button(ICON_MD_CONTENT_COPY)) {
#if YAZE_LIB_PNG == 1
std::vector<uint8_t> png_data =
gfx::Arena::Get().gfx_sheets().at(current_sheet_).GetPngData();
core::CopyImageToClipboard(png_data);
#else
// PNG support disabled - show message or alternative action
status_ = absl::UnimplementedError("PNG export not available in this build");
#endif
status_ = absl::UnimplementedError("PNG export functionality removed");
}
HOVER_HINT("Copy to Clipboard");
TableNextColumn();
if (Button(ICON_MD_CONTENT_PASTE)) {
#if YAZE_LIB_PNG == 1
std::vector<uint8_t> png_data;
int width, height;
core::GetImageFromClipboard(png_data, width, height);
if (png_data.size() > 0) {
gfx::Arena::Get()
.mutable_gfx_sheets()
->at(current_sheet_)
.Create(width, height, 8, png_data);
Renderer::Get().UpdateBitmap(
&gfx::Arena::Get().mutable_gfx_sheets()->at(current_sheet_));
}
#else
// PNG support disabled - show message or alternative action
status_ = absl::UnimplementedError("PNG import not available in this build");
#endif
status_ = absl::UnimplementedError("PNG import functionality removed");
}
HOVER_HINT("Paste from Clipboard");

View File

@@ -124,17 +124,7 @@ void OverworldEditor::Initialize() {
});
gui::AddTableColumn(toolset_table_, "##CopyMap", [&]() {
if (Button(ICON_MD_CONTENT_COPY)) {
#if YAZE_LIB_PNG == 1
std::vector<uint8_t> png_data = maps_bmp_[current_map_].GetPngData();
if (png_data.size() > 0) {
core::CopyImageToClipboard(png_data);
} else {
status_ = absl::InternalError(
"Failed to convert overworld map surface to PNG");
}
#else
status_ = absl::UnimplementedError("PNG export not available in this build");
#endif
status_ = absl::UnimplementedError("PNG export functionality removed");
}
HOVER_HINT("Copy Map to Clipboard");
});