mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-31 12:40:43 +00:00
Removed significance of precompiler constant DEBUG, at black's request.
Cleaned the lno file writing code a little. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@325 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
81cc41e4a4
commit
a427a2050a
1 changed files with 4 additions and 14 deletions
|
@ -512,7 +512,6 @@ void QCC_UnmarshalLocals(void)
|
||||||
printf("Total of %i marshalled globals\n", maxo-ofs);
|
printf("Total of %i marshalled globals\n", maxo-ofs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CompilerConstant_t *QCC_PR_CheckCompConstDefined(char *def);
|
CompilerConstant_t *QCC_PR_CheckCompConstDefined(char *def);
|
||||||
void QCC_WriteData (int crc)
|
void QCC_WriteData (int crc)
|
||||||
{
|
{
|
||||||
|
@ -536,17 +535,6 @@ void QCC_WriteData (int crc)
|
||||||
|
|
||||||
QCC_UnmarshalLocals();
|
QCC_UnmarshalLocals();
|
||||||
|
|
||||||
if (QCC_PR_CheckCompConstDefined("DEBUG")) //debug forces it if standard
|
|
||||||
{
|
|
||||||
if (!qcc_targetformat)
|
|
||||||
{
|
|
||||||
printf("Forcing target due to debugging\n");
|
|
||||||
qcc_targetformat = QCF_FTEDEBUG;
|
|
||||||
}
|
|
||||||
else if (qcc_targetformat != QCF_FTE && qcc_targetformat != QCF_FTEDEBUG)
|
|
||||||
printf("Target does not support debugging info\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (qcc_targetformat)
|
switch (qcc_targetformat)
|
||||||
{
|
{
|
||||||
case QCF_HEXEN2:
|
case QCF_HEXEN2:
|
||||||
|
@ -1124,11 +1112,13 @@ strofs = (strofs+3)&~3;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int lnotype = *(unsigned int*)"LNOF";
|
unsigned int lnotype = *(unsigned int*)"LNOF";
|
||||||
COM_StripExtension(destfile);
|
unsigned int version = 1;
|
||||||
COM_DefaultExtension(destfile, ".lno");
|
StripExtension(destfile);
|
||||||
|
strcat(destfile, ".lno");
|
||||||
printf("Writing %s\n", destfile);
|
printf("Writing %s\n", destfile);
|
||||||
h = SafeOpenWrite (destfile, 2*1024*1024);
|
h = SafeOpenWrite (destfile, 2*1024*1024);
|
||||||
SafeWrite (h, &lnotype, sizeof(int));
|
SafeWrite (h, &lnotype, sizeof(int));
|
||||||
|
SafeWrite (h, &version, sizeof(int));
|
||||||
SafeWrite (h, &numglobaldefs, sizeof(int));
|
SafeWrite (h, &numglobaldefs, sizeof(int));
|
||||||
SafeWrite (h, &numpr_globals, sizeof(int));
|
SafeWrite (h, &numpr_globals, sizeof(int));
|
||||||
SafeWrite (h, &numfielddefs, sizeof(int));
|
SafeWrite (h, &numfielddefs, sizeof(int));
|
||||||
|
|
Loading…
Reference in a new issue