mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-22 11:21:09 +00:00
Remove FxGlobalVariable class
This commit is contained in:
parent
01822c002f
commit
d798c7896c
2 changed files with 0 additions and 81 deletions
|
@ -690,23 +690,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// FxGlobalVariable
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
class FxGlobalVariable : public FxExpression
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PSymbolVariable *var;
|
|
||||||
bool AddressRequested;
|
|
||||||
|
|
||||||
FxGlobalVariable(PSymbolVariable*, const FScriptPosition&);
|
|
||||||
FxExpression *Resolve(FCompileContext&);
|
|
||||||
void RequestAddress();
|
|
||||||
};
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// FxClassMember
|
// FxClassMember
|
||||||
|
|
|
@ -2348,12 +2348,6 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
|
||||||
ScriptPosition.Message(MSG_DEBUGLOG, "Resolving name '%s' as global constant\n", Identifier.GetChars());
|
ScriptPosition.Message(MSG_DEBUGLOG, "Resolving name '%s' as global constant\n", Identifier.GetChars());
|
||||||
newex = FxConstant::MakeConstant(sym, ScriptPosition);
|
newex = FxConstant::MakeConstant(sym, ScriptPosition);
|
||||||
}
|
}
|
||||||
else if (sym->IsKindOf(RUNTIME_CLASS(PSymbolVariable))) // global variables will always be native
|
|
||||||
{
|
|
||||||
PSymbolVariable *vsym = static_cast<PSymbolVariable*>(sym);
|
|
||||||
ScriptPosition.Message(MSG_DEBUGLOG, "Resolving name '%s' as global variable, address %d\n", Identifier.GetChars(), vsym->offset);
|
|
||||||
newex = new FxGlobalVariable(vsym, ScriptPosition);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ScriptPosition.Message(MSG_ERROR, "Invalid global identifier '%s'\n", Identifier.GetChars());
|
ScriptPosition.Message(MSG_ERROR, "Invalid global identifier '%s'\n", Identifier.GetChars());
|
||||||
|
@ -2444,64 +2438,6 @@ ExpEmit FxSelf::Emit(VMFunctionBuilder *build)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
FxGlobalVariable::FxGlobalVariable(PSymbolVariable *mem, const FScriptPosition &pos)
|
|
||||||
: FxExpression(pos)
|
|
||||||
{
|
|
||||||
var = mem;
|
|
||||||
AddressRequested = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
void FxGlobalVariable::RequestAddress()
|
|
||||||
{
|
|
||||||
AddressRequested = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
FxExpression *FxGlobalVariable::Resolve(FCompileContext&)
|
|
||||||
{
|
|
||||||
CHECKRESOLVED();
|
|
||||||
switch (var->ValueType.Type)
|
|
||||||
{
|
|
||||||
case VAL_Int:
|
|
||||||
case VAL_Bool:
|
|
||||||
ValueType = VAL_Int;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VAL_Float:
|
|
||||||
case VAL_Fixed:
|
|
||||||
case VAL_Angle:
|
|
||||||
ValueType = VAL_Float;
|
|
||||||
|
|
||||||
case VAL_Object:
|
|
||||||
case VAL_Class:
|
|
||||||
ValueType = var->ValueType;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ScriptPosition.Message(MSG_ERROR, "Invalid type for global variable");
|
|
||||||
delete this;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
FxClassMember::FxClassMember(FxExpression *x, PSymbolVariable* mem, const FScriptPosition &pos)
|
FxClassMember::FxClassMember(FxExpression *x, PSymbolVariable* mem, const FScriptPosition &pos)
|
||||||
: FxExpression(pos)
|
: FxExpression(pos)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue