X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Ffiles.c;h=156b21501d726263479fb0bb898ac15ccc65927d;hb=e536ce9e39cc1bfa82ecd1d6d73f874af655f9db;hp=6e4bec4314c757805640562a28cb57b75041902d;hpb=18379907e684280f6e70bf5c2205c2968e56fa67;p=inform.git diff --git a/src/files.c b/src/files.c index 6e4bec4..156b215 100644 --- a/src/files.c +++ b/src/files.c @@ -7,7 +7,7 @@ /* routines in "inform.c", since they are tied up with ICL */ /* settings and are very host OS-dependent. */ /* */ -/* Copyright (c) Graham Nelson 1993 - 2018 */ +/* Copyright (c) Graham Nelson 1993 - 2020 */ /* */ /* This file is part of Inform. */ /* */ @@ -1184,12 +1184,57 @@ game features require version 0x%08lx", (long)requested_glulx_version, (long)Ver } - /* (4.5) Output any null bytes (required to reach a GPAGESIZE address) + /* (5) Output static arrays (if any). */ + { + /* We have to backpatch entries mentioned in staticarray_backpatch_table. */ + int32 size_before_arrays = size; + int32 val, ix, jx; + for (ix=0, jx=0; ix> 24) & 0xFF); + sf_put((val >> 16) & 0xFF); + sf_put((val >> 8) & 0xFF); + sf_put((val) & 0xFF); + size += 4; + } + + /* Flush out the last bit of static_array_area, after the last backpatch marker. */ + offset = static_array_area_size; + while (jx