SVN r46 (trunk)
This commit is contained in:
parent
153d3b4681
commit
8a7ba616f4
15 changed files with 2000 additions and 85 deletions
31
src/thingdef_exp.cpp
Normal file
31
src/thingdef_exp.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "sc_man.h"
|
||||
|
||||
// A stub to simulate the interface of .96x's expression evaluator.
|
||||
|
||||
int ParseExpression (bool _not)
|
||||
{
|
||||
SC_MustGetFloat();
|
||||
if (_not)
|
||||
{
|
||||
if (sc_Float==0.f) sc_Float=1.f;
|
||||
else sc_Float=0.f;
|
||||
}
|
||||
|
||||
return (int)(fixed_t)(sc_Float * FRACUNIT);
|
||||
}
|
||||
|
||||
int EvalExpressionI (int id, AActor *self)
|
||||
{
|
||||
return id>>FRACBITS;
|
||||
}
|
||||
|
||||
bool EvalExpressionN(int id, AActor * self)
|
||||
{
|
||||
return !EvalExpressionI(id, self);
|
||||
}
|
||||
|
||||
float EvalExpressionF (int id, AActor *self)
|
||||
{
|
||||
return (float)id/FRACUNIT;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue