fixes per a windows: CRLF en parsers de text i SPV de postfx

This commit is contained in:
2026-05-14 13:17:46 +02:00
parent 6bdb5c207c
commit 6f9bdcbeb6
6 changed files with 314 additions and 752 deletions
+10 -1
View File
@@ -19,7 +19,15 @@ static animatedSprite_t parseAnimationStream(std::istream &file, Texture *textur
if (verbose) {
std::cout << "Animation loaded: " << filename << std::endl;
}
// Normalitza CRLF: fitxers .ani amb terminadors de Windows fan que
// line == "[animation]" no faci match i el parser entri en bucle
// infinit / no carregui cap animació.
auto strip_cr = [](std::string &s) {
if (!s.empty() && s.back() == '\r') s.pop_back();
};
while (std::getline(file, line)) {
strip_cr(line);
if (line == "[animation]") {
animation_t buffer;
buffer.speed = 0;
@@ -29,7 +37,8 @@ static animatedSprite_t parseAnimationStream(std::istream &file, Texture *textur
buffer.completed = false;
do {
std::getline(file, line);
if (!std::getline(file, line)) break;
strip_cr(line);
int pos = line.find("=");
if (pos != (int)line.npos) {
if (line.substr(0, pos) == "name") {
@@ -10357,6 +10357,5 @@ static const uint8_t kcrtpi_frag_spv[] = {
0x38,
0x00,
0x01,
0x00,
};
0x00};
static const size_t kcrtpi_frag_spv_size = 10356;
File diff suppressed because it is too large Load Diff