Remove unused GetVariableValue()

This commit is contained in:
Randy Heit 2013-08-21 23:19:46 -05:00
parent d798c7896c
commit 3f6c3fa927

View file

@ -130,74 +130,6 @@ static PSymbol *FindDecorateBuiltinFunction(FName funcname, VMNativeFunction::Na
// //
//========================================================================== //==========================================================================
static ExpVal GetVariableValue (void *address, FExpressionType &type)
{
// NOTE: This cannot access native variables of types
// char, short and float. These need to be redefined if necessary!
ExpVal ret;
switch(type.Type)
{
case VAL_Int:
ret.Type = VAL_Int;
ret.Int = *(int*)address;
break;
case VAL_Sound:
ret.Type = VAL_Sound;
ret.Int = *(FSoundID*)address;
break;
case VAL_Name:
ret.Type = VAL_Name;
ret.Int = *(FName*)address;
break;
case VAL_Color:
ret.Type = VAL_Color;
ret.Int = *(int*)address;
break;
case VAL_Bool:
ret.Type = VAL_Int;
ret.Int = *(bool*)address;
break;
case VAL_Float:
ret.Type = VAL_Float;
ret.Float = *(double*)address;
break;
case VAL_Fixed:
ret.Type = VAL_Float;
ret.Float = (*(fixed_t*)address) / 65536.;
break;
case VAL_Angle:
ret.Type = VAL_Float;
ret.Float = (*(angle_t*)address) * 90./ANGLE_90; // intentionally not using ANGLE_1
break;
case VAL_Object:
case VAL_Class:
ret.Type = ExpValType(type.Type); // object and class pointers don't retain their specific class information as values
ret.pointer = *(void**)address;
break;
default:
ret.Type = VAL_Unknown;
ret.pointer = NULL;
break;
}
return ret;
}
//==========================================================================
//
//
//
//==========================================================================
ExpEmit FxExpression::Emit (VMFunctionBuilder *build) ExpEmit FxExpression::Emit (VMFunctionBuilder *build)
{ {
ScriptPosition.Message(MSG_ERROR, "Unemitted expression found"); ScriptPosition.Message(MSG_ERROR, "Unemitted expression found");