playing with enum stuff. getting it actually working properly.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@346 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-10-16 14:02:43 +00:00
parent a180cf5004
commit 4c60d97a27
1 changed files with 6 additions and 4 deletions

View File

@ -6339,11 +6339,11 @@ void QCC_PR_ParseDefs (char *classname)
{
if (pr_token_type != tt_immediate && pr_immediate_type->type != ev_float)
{
def = QCC_PR_GetDef(NULL, name, NULL, false, 0);
def = QCC_PR_GetDef(NULL, QCC_PR_ParseName(), NULL, false, 0);
if (def)
{
if (!def->constant)
QCC_PR_ParseError(ERR_NOTANUMBER, "enum - %s is not a constant", name);
QCC_PR_ParseError(ERR_NOTANUMBER, "enum - %s is not a constant", def->name);
else
v = G_FLOAT(def->ofs);
}
@ -6355,6 +6355,7 @@ void QCC_PR_ParseDefs (char *classname)
QCC_PR_Lex();
}
def = QCC_PR_GetDef(type_float, name, pr_scope, true, 1);
def->constant = true;
G_FLOAT(def->ofs) = v;
v++;
@ -6380,11 +6381,11 @@ void QCC_PR_ParseDefs (char *classname)
{
if (pr_token_type != tt_immediate && pr_immediate_type->type != ev_float)
{
def = QCC_PR_GetDef(NULL, name, NULL, false, 0);
def = QCC_PR_GetDef(NULL, QCC_PR_ParseName(), NULL, false, 0);
if (def)
{
if (!def->constant)
QCC_PR_ParseError(ERR_NOTANUMBER, "enumflags - %s is not a constant", name);
QCC_PR_ParseError(ERR_NOTANUMBER, "enumflags - %s is not a constant", def->name);
else
v = G_FLOAT(def->ofs);
}
@ -6412,6 +6413,7 @@ void QCC_PR_ParseDefs (char *classname)
QCC_PR_Lex();
}
def = QCC_PR_GetDef(type_float, name, pr_scope, true, 1);
def->constant = true;
G_FLOAT(def->ofs) = v;
v*=2;