add $frame_reset grab command to reset the frame macro counter and sneak the command in before each file in the single-cpp script. This fixes the bogus animations in nq (and anything else, for that matter)

This commit is contained in:
Bill Currie 2007-03-31 13:54:09 +00:00 committed by Jeff Teunissen
parent 03e1d6c3bf
commit 90129fc4ec
2 changed files with 5 additions and 0 deletions

View file

@ -439,6 +439,10 @@ do_grab (char *token)
;
if (!strcmp (token, "frame"))
return -grab_frame;
if (!strcmp (token, "frame_reset")) {
clear_frame_macros ();
return -grab_other;
}
if (Hash_Find (grab_tab, token))
return -grab_other;
frame = Hash_Find (frame_tab, token);

View file

@ -811,6 +811,7 @@ progs_src_compile (void)
printf ("%s:%d: compiling %s\n", script->file, script->line, qc_filename->str);
if (single) {
fprintf (single, "$frame_reset\n");
fprintf (single, "# %d \"%s\"\n", script->line, script->file);
fprintf (single, "#include \"%s\"\n", qc_filename->str);
} else {