lanceewing / agile

Sierra AGI (Adventure Game Interpreter) engine written in C#
15 stars 7 forks source link

allow restore game to bypass NO_SCRIPT flag #40

Closed vafada closed 2 years ago

vafada commented 2 years ago

fixes #37

On restore game, AGI restores the script buffer regardless of what NO_SCRIPT flag is set to

in RESTGAME.C

if (!ReadSave(fd, &saveStart)
        || !ReadSave(fd, aniObj)
        || !ReadSave(fd, object)
        || !ReadSave(fd, script)
        || !ReadSave(fd, scanOfs))
            {
            close(fd);
            WindowPrint("Error in restoring game.\nPress ENTER to quit.");
            Quit();
            }

in AGILE, the NO_SCRIPT flag was set to true (see details on linked issue why its true) so all calls the AddScript during restore game was resulting to a no-op thus the buffer wasn't adding new events.

lanceewing commented 2 years ago

Looks good to me. Thanks.