diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index e704d5c9e..aed00e339 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -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) { ScriptPosition.Message(MSG_ERROR, "Unemitted expression found");