- [FIX] Corregits errors per a que compile en Windows

This commit is contained in:
2026-09-08 18:08:14 +02:00
parent 1a6634bc6f
commit 64926a3797
3 changed files with 21 additions and 2 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
syntax: glob
mathwars
mathwars.exe
recursos/*
bin/*
obj/*
@@ -16,4 +17,5 @@ data/*
trick.ini
*.xcuserstate
project.xcworkspace/
xcuserdata/
xcuserdata/
*.zip
+1
View File
@@ -1,5 +1,6 @@
#include "Score.h"
#include "api.h"
#include <stdio.h>
namespace {
int lives = 3;
+17 -1
View File
@@ -4,7 +4,23 @@
#include "System.h"
#include <stdlib.h>
#define message_eq(m) (strncmp(msg, m, 20)==0)
// En tu archivo .h común (ej. mensajes.h)
static inline int message_eq_func(const char *msg, const char *m) {
// Compara carácter por carácter hasta el final de la cadena 'm' o máximo 20
for (int i = 0; i < 20; i++) {
if (msg[i] != m[i]) {
return 0; // No son iguales
}
if (m[i] == '\0') {
return 1; // Llegamos al final de 'm' y coinciden perfectamente
}
}
return 1; // Llegó a 20 caracteres idénticos
}
// Tu macro ahora llama a esta función inline
#define message_eq(m) message_eq_func(msg, m)
enum BlendMode { BlendNone, BlendBlend, BlendAdd, BlendMod };