fixes per a windows: CRLF en parsers de text i SPV de postfx
This commit is contained in:
@@ -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
Reference in New Issue
Block a user