- removed fixed_t and associated utility macros from FraggleScript code.

This commit is contained in:
Christoph Oelckers 2016-03-24 09:16:35 +01:00
commit eac0bfeaeb
6 changed files with 34 additions and 48 deletions

View file

@ -82,15 +82,17 @@ enum
//
//
//==========================================================================
typedef int fsfix;
struct svalue_t
{
int type;
FString string;
union
{
int i;
fixed_t f; // haleyjd: 8-17
fsfix f; // haleyjd: 8-17
AActor *mobj;
} value;
@ -113,7 +115,7 @@ struct svalue_t
type = svt_int;
}
void setFixed(fixed_t fp)
void setFixed(fsfix fp)
{
value.f = fp;
type = svt_fixed;
@ -121,13 +123,13 @@ struct svalue_t
void setDouble(double dp)
{
value.f = FLOAT2FIXED(dp);
value.f = fsfix(dp/65536);
type = svt_fixed;
}
};
int intvalue(const svalue_t & v);
fixed_t fixedvalue(const svalue_t & v);
fsfix fixedvalue(const svalue_t & v);
double floatvalue(const svalue_t & v);
const char *stringvalue(const svalue_t & v);
AActor *actorvalue(const svalue_t &svalue);
@ -171,7 +173,7 @@ public:
union value_t
{
SDWORD i;
fixed_t fixed; // haleyjd: fixed-point
fsfix fixed; // haleyjd: fixed-point
// the following are only used in the global script so we don't need to bother with them
// when serializing variables.