fix: colisió de TRANSPATENT amb macro de windows

This commit is contained in:
2025-11-23 12:15:31 +01:00
parent d995680f71
commit 61d833a048
5 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
{
"permissions": {
"allow": [
"Bash(cat:*)",
"Bash(cmake --build:*)"
],
"deny": [],
"ask": []
}
}

View File

@@ -93,10 +93,10 @@ auto readPalFile(const std::string& file_path) -> Palette {
// Constructor
Surface::Surface(int w, int h)
: surface_data_(std::make_shared<SurfaceData>(w, h)),
transparent_color_(Color::index(Color::Cpc::TRANSPARENT)) { initializeSubPalette(sub_palette_); }
transparent_color_(Color::index(Color::Cpc::CLEAR)) { initializeSubPalette(sub_palette_); }
Surface::Surface(const std::string& file_path)
: transparent_color_(Color::index(Color::Cpc::TRANSPARENT)) {
: transparent_color_(Color::index(Color::Cpc::CLEAR)) {
SurfaceData loaded_data = loadSurface(file_path);
surface_data_ = std::make_shared<SurfaceData>(std::move(loaded_data));

View File

@@ -5,5 +5,5 @@ constexpr const char* NAME = "pollo";
constexpr const char* LONG_NAME = "Los pollos hermanos";
constexpr const char* VERSION = "0.1";
constexpr const char* COPYRIGHT = "@2025 JailDesigner";
constexpr const char* GIT_HASH = "";
constexpr const char* GIT_HASH = "d995680";
} // namespace Project

View File

@@ -12,7 +12,7 @@ auto Color::fromString(const std::string& name) -> Uint8 {
// Incluye nombres oficiales del CPC y aliases para compatibilidad
static const std::unordered_map<std::string, Uint8> COLOR_MAP = {
// Transparente
{"transparent", index(Cpc::TRANSPARENT)},
{"transparent", index(Cpc::CLEAR)},
// Colores oficiales Amstrad CPC
{"black", index(Cpc::BLACK)},

View File

@@ -28,7 +28,7 @@ class Color {
*/
enum class Cpc : Uint8 {
// Transparente (índice 0)
TRANSPARENT = 0,
CLEAR = 0, // Nota: No usar "TRANSPARENT" - colisiona con macro de Windows
// Negros y azules (R=0)
BLACK = 1, // 0, 0, 0