SDLPoP just detects that it's Levels.dat and not LEVELS.DAT, so loads the default directory with altered graphics.
Or is PoPOT (Norbert) responsible to use UPPERCASE file names before making it available to general public?

PoPOT should perhaps do that anyway, at least for LEVELS.DAT.atrueprincefanfrom18 wrote: ↑January 6th, 2021, 4:11 pmOr is PoPOT (Norbert) responsible to use UPPERCASE file names before making it available to general public?
Code: Select all
<?php
$arResult = preg_grep ('/' . preg_quote ('LEVELS.DAT') . '$/i', glob ("./*"));
if (count ($arResult) == 1) { rename (reset ($arResult), 'LEVELS.DAT'); }
?>
Maybe good for all (DAT) files. Because some graphics might be altered heavily, that SDLPoP should load them instead of the default ones otherwise the game might break.
Maybe there could be a failure path, where if the case-sensitive filename is not found, SDLPoP checks the directory listing and tries to select another file that matches case-insensitively.atrueprincefanfrom18 wrote: ↑January 6th, 2021, 4:11 pm On Linux, SDLPoP doesn't load the files which are cAsE sEnSiTiVe. Any fix that can be done?
You can find more of these here: viewtopic.php?f=68&t=4467atrueprincefanfrom18 wrote: ↑March 25th, 2021, 5:46 pm Was playing Repetition Of Time. And I died and revived the Kid (R). I got to this room!
These glitched rooms are usually room 128 or -128, so yes, the game is reading out of range data.atrueprincefanfrom18 wrote: ↑March 25th, 2021, 5:46 pm Funny, what exactly does SDLPoP check while drawing the room? It might be anything because it's out of range memory data?
Code: Select all
case SDL_SCANCODE_1 | WITH_ALT:
// ALT + 1
// Move the kid to first row of same room, same column.
Char.y = 55;
break;
case SDL_SCANCODE_2 | WITH_ALT:
// ALT + 2
// Move the kid to second row of same room, same column.
Char.y = 118;
break;
case SDL_SCANCODE_3 | WITH_ALT:
// ALT + 3
// Move the kid to third row of same room, same column.
Char.y = 181;
break;
Code: Select all
// first row (0)
Char.y = y_land[1]; // row 0 + 1
Char.curr_row = 0;
// second row (1)
Char.y = y_land[2];
Char.curr_row = 1;
// third row (2)
Char.y = y_land[3];
Char.curr_row = 2;
Code: Select all
Kid.x = x_bump[1 + 5] + 7;
// Kid.curr_col = 1;
The problem seems to be happening here on the line below. The first time kid falls out into a non-existing room, the "Char.room" value is set to 0. But I think the logic below that changes kid's coordinates can shift him to a different room. The second time the function is called the "Char.room" is now set to a weird -128/127 value is you print it as an int.
Code: Select all
byte other_room = ((byte*)&level.roomlinks[Char.room - 1])[direction];
if (other_room == 0 || other_room > 24) {
Char.room = 0;
return 0;
}
Char.room = other_room;
Here is my fix: https://github.com/NagyD/SDLPoP/commit/ ... 0d8c7d773f