Files
yaze/src/app/gfx/gfx_library.cmake
scawful 9c89ad5843 feat(palette): implement centralized PaletteManager for improved color management
- Introduced PaletteManager to handle all palette-related operations, including color modifications, undo/redo functionality, and batch processing.
- Updated PaletteEditor and PaletteGroupCard to utilize PaletteManager for managing palette states and modifications, streamlining the editing process.
- Enhanced user interface with confirmation popups for discard actions and error notifications for save failures.

Benefits:
- Centralizes palette management, improving consistency and reducing code duplication across editors.
- Enhances user experience by providing clear feedback on unsaved changes and simplifying color operations.
2025-10-12 21:42:13 -04:00

80 lines
2.1 KiB
CMake

set(
YAZE_APP_GFX_SRC
app/gfx/arena.cc
app/gfx/atlas_renderer.cc
app/gfx/background_buffer.cc
app/gfx/bitmap.cc
app/gfx/compression.cc
app/gfx/memory_pool.cc
app/gfx/performance/performance_dashboard.cc
app/gfx/performance/performance_profiler.cc
app/gfx/scad_format.cc
app/gfx/snes_palette.cc
app/gfx/snes_tile.cc
app/gfx/snes_color.cc
app/gfx/texture_atlas.cc
app/gfx/tilemap.cc
app/gfx/graphics_optimizer.cc
app/gfx/bpp_format_manager.cc
app/gfx/palette_manager.cc
app/gfx/backend/sdl2_renderer.cc
)
# ==============================================================================
# Yaze Graphics Library
# ==============================================================================
# This library contains all graphics-related functionality:
# - Bitmap manipulation
# - SNES tile/palette handling
# - Compression/decompression
# - Arena memory management
# - Atlas rendering
# - Performance profiling
#
# Dependencies: yaze_util, SDL2, Abseil
# ==============================================================================
add_library(yaze_gfx STATIC ${YAZE_APP_GFX_SRC})
target_precompile_headers(yaze_gfx PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/src/yaze_pch.h>"
)
target_include_directories(yaze_gfx PUBLIC
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/lib
${CMAKE_SOURCE_DIR}/incl
${SDL2_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
)
target_link_libraries(yaze_gfx PUBLIC
yaze_util
yaze_common
${ABSL_TARGETS}
${SDL_TARGETS}
)
# Conditionally add PNG support
if(PNG_FOUND)
target_include_directories(yaze_gfx PUBLIC ${PNG_INCLUDE_DIRS})
target_link_libraries(yaze_gfx PUBLIC ${PNG_LIBRARIES})
endif()
set_target_properties(yaze_gfx PROPERTIES
POSITION_INDEPENDENT_CODE ON
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
# Platform-specific compile definitions
if(UNIX AND NOT APPLE)
target_compile_definitions(yaze_gfx PRIVATE linux stricmp=strcasecmp)
elseif(APPLE)
target_compile_definitions(yaze_gfx PRIVATE MACOS)
elseif(WIN32)
target_compile_definitions(yaze_gfx PRIVATE WINDOWS)
endif()
message(STATUS "✓ yaze_gfx library configured")