Fix some silly issues.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5066 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-02-28 05:04:41 +00:00
parent 655c09bd76
commit 1b88cda2db
4 changed files with 13 additions and 11 deletions

View file

@ -52,6 +52,7 @@ NATIVE_BASE_DIR?=$(BASE_DIR)
NATIVE_RELEASE_DIR?=$(RELEASE_DIR) NATIVE_RELEASE_DIR?=$(RELEASE_DIR)
NATIVE_DEBUG_DIR?=$(DEBUG_DIR) NATIVE_DEBUG_DIR?=$(DEBUG_DIR)
EXE_NAME=fteqw
#include the appropriate games. #include the appropriate games.
ifneq (,$(BRANDING)) ifneq (,$(BRANDING))

View file

@ -2515,7 +2515,7 @@ void QCC_PR_MacroFrame(char *name, int value, pbool force)
//our caller incremented the value externally //our caller incremented the value externally
//so warn+ignore if its from the same file //so warn+ignore if its from the same file
if (pr_framemacro[i].file == s_filen && !force) if (pr_framemacro[i].file == s_filen && !force)
QCC_PR_ParseWarning(WARN_DUPLICATEMACRO, "Duplicate macro defined (%s)", pr_token); QCC_PR_ParseWarning(WARN_DUPLICATEMACRO, "Duplicate macro defined (%s). Rename it.", pr_token);
else else
{ {
pr_framemacro[i].value = value; //old file, override it, whatever the old value was is redundant now pr_framemacro[i].value = value; //old file, override it, whatever the old value was is redundant now
@ -4446,21 +4446,23 @@ QCC_type_t *QCC_PR_ParseFunctionType (int newtype, QCC_type_t *returntype)
{ {
if (!paramlist[numparms].optional && QCC_PR_CheckKeyword(keyword_optional, "optional")) if (!paramlist[numparms].optional && QCC_PR_CheckKeyword(keyword_optional, "optional"))
paramlist[numparms].optional = true; paramlist[numparms].optional = true;
if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "inout")) else if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "inout"))
{ {
paramlist[numparms].out = true; paramlist[numparms].out = true;
foundinout = true; foundinout = true;
} }
if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "out")) else if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "out"))
{ {
paramlist[numparms].out = 2; //not really supported, but parsed for readability. paramlist[numparms].out = 2; //not really supported, but parsed for readability.
foundinout = true; foundinout = true;
} }
if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "in")) else if (!foundinout && QCC_PR_CheckKeyword(keyword_inout, "in"))
{ {
paramlist[numparms].out = false; paramlist[numparms].out = false;
foundinout = true; foundinout = true;
} }
else
break;
} }
paramlist[numparms].defltvalue.cast = NULL; paramlist[numparms].defltvalue.cast = NULL;

View file

@ -2743,7 +2743,6 @@ int EditorSave(editor_t *edit)
free(afile); free(afile);
if (saved < 0) if (saved < 0)
{ {
free(afile);
MessageBox(NULL, "Save failed\nCheck path and ReadOnly flags", "Failure", 0); MessageBox(NULL, "Save failed\nCheck path and ReadOnly flags", "Failure", 0);
return false; return false;
} }

View file

@ -928,12 +928,12 @@ void QCC_DetermineNeededSymbols(QCC_def_t *endsyssym)
//FIXME: we want to strip these. fte/dp extensions.qc have a LOT of fields that could be stripped. //FIXME: we want to strip these. fte/dp extensions.qc have a LOT of fields that could be stripped.
sym->referenced = true; //FIXME sym->referenced = true; //FIXME
} }
else if (sym->constant && sym->type->type == ev_function) // else if (sym->constant && sym->type->type == ev_function)
{ //non-builtins must be present, because of spawn functions and other entrypoints. // { //non-builtins must be present, because of spawn functions and other entrypoints.
unsigned int fnum = sym->symboldata[0]._int; // unsigned int fnum = sym->symboldata[0]._int;
if (fnum < numfunctions && functions[fnum].code == -1) // if (fnum < numfunctions && functions[fnum].code == -1)
sym->symbolheader->used = true; // sym->symbolheader->used = true;
} // }
} }
for (i=0 ; i<numstatements ; i++) for (i=0 ; i<numstatements ; i++)