mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 11:15:23 +01:00
4657928af2
Toward loading the logic by regions (docs/world-format-eu07.md, section 13, D4). The statement table keeps the state of the tape at the start of each statement, the tape reader can move to a statement and read only to its end (parser_tape::reader::seek, with the names of all the files of the tape), and the logic cache gives the table back. With EU07_WORLD_REPLAY_ORDER set, a scenery replayed from its cache goes statement by statement, each from its place on the tape with the transformations it was read with: "file" in the order of the file, "regions" the statements of the whole package ahead of the regions, "regions-first" the regions first. A check for the developers; without the variable the tape plays through as before. The loop of deserialize_continue gives its dispatch to deserialize_statement(), and the transformations go through transformations_of() and restore_transformations(). Checked in the game (--test 120 s, seed 1, world.binary 1): - "file": the physics logs of td.scn and Glinojeck.scn the same bit for bit as from the files, so the moves on the tape and the restored transformations give the very same scenery; - "regions-first": the same bit for bit too, for both; the error logs hold the same lines in another order (the models load in another order); - "regions": td.scn ends up without vehicles, its trainsets read before the tracks they stand on. The first thing D4 has to settle: the statements of the whole package that refer to the regions go after them.