slightly more interesting output while I procrastinate doing the hard bits

This commit is contained in:
Bill Currie 2001-07-17 20:33:17 +00:00
parent c50793b54a
commit 3488946bb5

View file

@ -12,6 +12,8 @@
#include <QF/sys.h> #include <QF/sys.h>
#include <QF/zone.h> #include <QF/zone.h>
#include "def.h"
void *membase; void *membase;
int memsize = 16*1024*1024; int memsize = 16*1024*1024;
@ -22,8 +24,6 @@ progs_t progs;
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
int i;
Cvar_Init_Hash (); Cvar_Init_Hash ();
Cmd_Init_Hash (); Cmd_Init_Hash ();
membase = malloc (memsize); membase = malloc (memsize);
@ -58,10 +58,20 @@ main (int argc, char **argv)
(progs.progs->version >> 24) & 0xff, (progs.progs->version >> 24) & 0xff,
(progs.progs->version >> 12) & 0xfff, (progs.progs->version >> 12) & 0xfff,
progs.progs->version & 0xfff); progs.progs->version & 0xfff);
for (i = 0; i < progs.progs->numglobaldefs; i++) { if (progs.progs->crc == nq_crc) {
ddef_t *def = &progs.pr_globaldefs[i]; printf ("%s: netquake crc\n", *argv);
printf ("%-8s %d %-5d %s\n", type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); } else if (progs.progs->crc == qw_crc) {
printf ("%s: quakeworld crc\n", *argv);
} else {
printf ("%s: unknown crc %d\n", *argv, progs.progs->crc);
} }
printf ("statements: %d @ %d\n", progs.progs->numstatements, progs.progs->ofs_statements);
printf ("globaldefs: %d @ %d\n", progs.progs->numglobaldefs, progs.progs->ofs_globaldefs);
printf ("fielddefs: %d @ %d\n", progs.progs->numfielddefs, progs.progs->ofs_fielddefs);
printf ("functions: %d @ %d\n", progs.progs->numfunctions, progs.progs->ofs_functions);
printf ("strings: %d @ %d\n", progs.progs->numstrings, progs.progs->ofs_strings);
printf ("globals: %d @ %d\n", progs.progs->numglobals, progs.progs->ofs_globals);
printf ("fields: %d\n", progs.progs->entityfields);
} }
return 0; return 0;
} }