summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09189f3)
raw | patch | inline | side by side (parent: 09189f3)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 11 Apr 2021 08:49:12 +0000 (11:49 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 11 Apr 2021 08:49:12 +0000 (11:49 +0300) |
src/common/wadres.c | patch | blob | history |
diff --git a/src/common/wadres.c b/src/common/wadres.c
index fba4039451bf99749206b15e3e251bba3b3ac449..356f591f2267be52967cfed126d433fefa21623b 100644 (file)
--- a/src/common/wadres.c
+++ b/src/common/wadres.c
return -1;
}
-static int WADRES_read (Stream *r) {
+static int WADRES_read (int f) {
+ Stream *r = wads[f];
stream_setpos(r, 4); // skip magic
int32_t n = stream_read32(r);
int32_t dir = stream_read32(r);
Entry e;
e.offset = stream_read32(r);
e.size = stream_read32(r);
+ e.f = f;
stream_read(e.name, 8, 1, r);
ok = WADRES_addresource(&e) != -1;
}
int WADRES_rehash (void) {
int ok = 1;
for (int i = 0; i < n_wads; ++i) {
- if (!WADRES_read(wads[i])) {
+ if (!WADRES_read(i)) {
ok = 0;
}
}