mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:27:44 +00:00
Ports: Added a Prince of Persia (SDLPoP) port.
This is a port of the dissasembly version of the DOS prince of persia game :)
This commit is contained in:
parent
bf1ad16078
commit
83b5655977
6 changed files with 167 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
diff --git a/src/options.c b/src/options.c
|
||||
index 1bfe473..2bf173e 100644
|
||||
--- a/src/options.c
|
||||
+++ b/src/options.c
|
||||
@@ -56,8 +56,8 @@ int ini_load(const char *filename,
|
||||
}
|
||||
|
||||
while (!feof(f)) {
|
||||
- if (fscanf(f, "[%127[^];\n]]\n", section) == 1) {
|
||||
- } else if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value))) {
|
||||
+ if (fscanf(f, "[%[^];\n]]\n", section) == 1) {
|
||||
+ } else if ((cnt = fscanf(f, " %[^=;\n] = %[^;\n]", name, value))) {
|
||||
if (cnt == 1)
|
||||
*value = 0;
|
||||
for (s = name + strlen(name) - 1; s > name && isspace(*s); s--)
|
||||
@@ -66,7 +66,7 @@ int ini_load(const char *filename,
|
||||
*s = 0;
|
||||
report(section, name, value);
|
||||
}
|
||||
- if (fscanf(f, " ;%*[^\n]") != 0 ||
|
||||
+ if (fscanf(f, " ;%[^\n]") != 0 ||
|
||||
fscanf(f, " \n") != 0) {
|
||||
fprintf(stderr, "short read from %s!?\n", filename);
|
||||
fclose(f);
|
||||
diff --git a/src/seg009.c b/src/seg009.c
|
||||
index 139c2d8..e2047fb 100644
|
||||
--- a/src/seg009.c
|
||||
+++ b/src/seg009.c
|
||||
@@ -2077,7 +2077,7 @@ void load_sound_names() {
|
||||
while (!feof(fp)) {
|
||||
int index;
|
||||
char name[POP_MAX_PATH];
|
||||
- if (fscanf(fp, "%d=%255s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
|
||||
+ if (fscanf(fp, "%d=%s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
|
||||
perror(names_path);
|
||||
continue;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue