[ GGRecoverObjects id; ! If GGRecoverObjects() has been called, all these stored IDs are ! invalid, so we start by clearing them all out. ! (In fact, after a restoreundo, some of them may still be good. ! For simplicity, though, we assume the general case.) gg_mainwin = 0; gg_statuswin = 0; gg_quotewin = 0; gg_scriptfref = 0; gg_scriptstr = 0; gg_savestr = 0; gg_statuswin_cursize = 0; #Ifdef DEBUG; gg_commandstr = 0; gg_command_reading = false; #Endif; ! DEBUG ! Also tell the game to clear its object references. IdentifyGlkObject(0); id = glk($0040, 0, gg_arguments); ! stream_iterate while (id) { switch (gg_arguments-->0) { GG_SAVESTR_ROCK: gg_savestr = id; GG_SCRIPTSTR_ROCK: gg_scriptstr = id; #Ifdef DEBUG; GG_COMMANDWSTR_ROCK: gg_commandstr = id; gg_command_reading = false; GG_COMMANDRSTR_ROCK: gg_commandstr = id; gg_command_reading = true; #Endif; ! DEBUG default: IdentifyGlkObject(1, 1, id, gg_arguments-->0); } id = glk($0040, id, gg_arguments); ! stream_iterate } id = glk($0020, 0, gg_arguments); ! window_iterate while (id) { switch (gg_arguments-->0) { GG_MAINWIN_ROCK: gg_mainwin = id; GG_STATUSWIN_ROCK: gg_statuswin = id; GG_QUOTEWIN_ROCK: gg_quotewin = id; default: IdentifyGlkObject(1, 0, id, gg_arguments-->0); } id = glk($0020, id, gg_arguments); ! window_iterate } id = glk($0064, 0, gg_arguments); ! fileref_iterate while (id) { switch (gg_arguments-->0) { GG_SCRIPTFREF_ROCK: gg_scriptfref = id; default: IdentifyGlkObject(1, 2, id, gg_arguments-->0); } id = glk($0064, id, gg_arguments); ! fileref_iterate } ! Tell the game to tie up any loose ends. IdentifyGlkObject(2); ];