Ja es pot "enner llour neim". Falta decidir quin de tots els dissenys m'agrada mes

This commit is contained in:
2024-09-29 22:25:31 +02:00
parent edc45b6cec
commit 2d5859b1c4
9 changed files with 327 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
#include "utils.h"
#include <stdlib.h> // for free, malloc
#include <stdlib.h> // for free, malloc
struct JA_Music_t;
struct JA_Sound_t;
@@ -288,4 +288,22 @@ color_t DarkenColor(color_t color, int amount)
newColor.g = std::max(0, (int)color.g - amount);
newColor.b = std::max(0, (int)color.b - amount);
return newColor;
}
// Quita los espacioes en un string
std::string trim(const std::string &str)
{
auto start = str.begin();
while (start != str.end() && std::isspace(*start))
{
start++;
}
auto end = str.end();
do
{
end--;
} while (std::distance(start, end) > 0 && std::isspace(*end));
return std::string(start, end + 1);
}