Refactor CMake and enhance API documentation for YAZE
- Updated CMakeLists.txt to set a minimum required version of 3.5 and removed older policy settings for improved compatibility. - Enhanced yaze.h and zelda.h with detailed documentation, including versioning information and API descriptions, to improve clarity for developers. - Added new functions for version compatibility checks and improved error handling in the YAZE API. - Refactored existing structures and enums for better readability and maintainability, ensuring a more consistent coding style.
This commit is contained in:
@@ -13,7 +13,11 @@ ImVec4 ConvertSnesColorToImVec4(const gfx::SnesColor& color) {
|
||||
}
|
||||
|
||||
gfx::SnesColor ConvertImVec4ToSnesColor(const ImVec4& color) {
|
||||
return gfx::SnesColor(color.x, color.y, color.z);
|
||||
// Convert from float (0.0-1.0) to uint8_t (0-255)
|
||||
uint8_t r = static_cast<uint8_t>(color.x * 255.0f);
|
||||
uint8_t g = static_cast<uint8_t>(color.y * 255.0f);
|
||||
uint8_t b = static_cast<uint8_t>(color.z * 255.0f);
|
||||
return gfx::SnesColor(r, g, b);
|
||||
}
|
||||
|
||||
IMGUI_API bool SnesColorButton(absl::string_view id, gfx::SnesColor& color,
|
||||
|
||||
Reference in New Issue
Block a user