mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Closes: #50
idstuff.c: don't write the defs at offset 0 to progdefs.h qfcc.c: generate progdefs.h and the crc for v6 code when linking object files to the progs.dat
This commit is contained in:
parent
b8829faac4
commit
1e5402a30a
2 changed files with 11 additions and 2 deletions
|
@ -214,6 +214,8 @@ WriteProgdefs (char *filename)
|
|||
for (d = pr.scope->head; d; d = d->def_next) {
|
||||
if (!strcmp (d->name, "end_sys_globals"))
|
||||
break;
|
||||
if (!d->ofs)
|
||||
continue;
|
||||
|
||||
switch (d->type->type) {
|
||||
case ev_float:
|
||||
|
@ -245,7 +247,7 @@ WriteProgdefs (char *filename)
|
|||
if (!strcmp (d->name, "end_sys_fields"))
|
||||
break;
|
||||
|
||||
if (d->type->type != ev_field)
|
||||
if (!d->ofs || d->type->type != ev_field)
|
||||
continue;
|
||||
|
||||
switch (d->type->aux_type->type) {
|
||||
|
|
|
@ -576,10 +576,17 @@ separate_compile (void)
|
|||
if (options.partial_link) {
|
||||
qfo_write (qfo, options.output_file);
|
||||
} else {
|
||||
int crc = 0;
|
||||
|
||||
qfo_to_progs (qfo, &pr);
|
||||
setup_sym_file (options.output_file);
|
||||
finish_compilation ();
|
||||
WriteData (0);
|
||||
|
||||
// write progdefs.h
|
||||
if (options.code.progsversion == PROG_ID_VERSION)
|
||||
crc = WriteProgdefs ("progdefs.h");
|
||||
|
||||
WriteData (crc);
|
||||
}
|
||||
} else {
|
||||
err = 1;
|
||||
|
|
Loading…
Reference in a new issue