mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 23:32:02 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
37de4bea67
7 changed files with 17 additions and 14 deletions
|
@ -2657,10 +2657,11 @@ void AM_drawThings ()
|
|||
|
||||
if (texture == NULL) goto drawTriangle; // fall back to standard display if no sprite can be found.
|
||||
|
||||
const fixed_t spriteScale = 10 * scale_mtof;
|
||||
const fixed_t spriteXScale = FixedMul(t->scaleX, 10 * scale_mtof);
|
||||
const fixed_t spriteYScale = FixedMul(t->scaleY, 10 * scale_mtof);
|
||||
|
||||
DrawMarker (texture, p.x, p.y, 0, !!(frame->Flip & (1 << rotation)),
|
||||
spriteScale, spriteScale, 0, FRACUNIT, 0, LegacyRenderStyles[STYLE_Normal]);
|
||||
spriteXScale, spriteYScale, t->Translation, FRACUNIT, 0, LegacyRenderStyles[STYLE_Normal]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -73,7 +73,6 @@ static FRandom pr_script("FScript");
|
|||
|
||||
#define AngleToFixed(x) ((((double) x) / ((double) ANG45/45)) * FRACUNIT)
|
||||
#define FixedToAngle(x) ((((double) x) / FRACUNIT) * ANG45/45)
|
||||
#define FIXED_TO_FLOAT(f) ((f)/(float)FRACUNIT)
|
||||
|
||||
// functions. FParser::SF_ means Script Function not, well.. heh, me
|
||||
|
||||
|
@ -1417,11 +1416,11 @@ void FParser::SF_PointToDist(void)
|
|||
if (CheckArgs(4))
|
||||
{
|
||||
// Doing this in floating point is actually faster with modern computers!
|
||||
float x = floatvalue(t_argv[2]) - floatvalue(t_argv[0]);
|
||||
float y = floatvalue(t_argv[3]) - floatvalue(t_argv[1]);
|
||||
double x = floatvalue(t_argv[2]) - floatvalue(t_argv[0]);
|
||||
double y = floatvalue(t_argv[3]) - floatvalue(t_argv[1]);
|
||||
|
||||
t_return.type = svt_fixed;
|
||||
t_return.value.f = (fixed_t)(sqrtf(x*x+y*y)*65536.f);
|
||||
t_return.value.f = FLOAT2FIXED(sqrt(x*x+y*y)*65536.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ struct svalue_t
|
|||
|
||||
int intvalue(const svalue_t & v);
|
||||
fixed_t fixedvalue(const svalue_t & v);
|
||||
float floatvalue(const svalue_t & v);
|
||||
double floatvalue(const svalue_t & v);
|
||||
const char *stringvalue(const svalue_t & v);
|
||||
AActor *actorvalue(const svalue_t &svalue);
|
||||
|
||||
|
|
|
@ -89,11 +89,12 @@ fixed_t fixedvalue(const svalue_t &v)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
float floatvalue(const svalue_t &v)
|
||||
double floatvalue(const svalue_t &v)
|
||||
{
|
||||
return (float)( (v.type == svt_string ? atof(v.string) :
|
||||
v.type == svt_fixed ? (float)(v.value.f / (float)FRACUNIT) :
|
||||
v.type == svt_mobj ? -1.f : (float)v.value.i ));
|
||||
return
|
||||
v.type == svt_string ? atof(v.string) :
|
||||
v.type == svt_fixed ? FIXED2DBL(v.value.f) :
|
||||
v.type == svt_mobj ? -1. : (double)v.value.i;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -752,7 +752,10 @@ public:
|
|||
{
|
||||
ReplyText = GStrings(ReplyText + 1);
|
||||
}
|
||||
FBrokenLines *ReplyLines = V_BreakLines (SmallFont, 320-50-10, ReplyText);
|
||||
FString ReplyString = ReplyText;
|
||||
if (reply->NeedsGold) ReplyString.AppendFormat(" for %u", reply->ItemCheck[0].Amount);
|
||||
|
||||
FBrokenLines *ReplyLines = V_BreakLines (SmallFont, 320-50-10, ReplyString);
|
||||
|
||||
mResponses.Push(mResponseLines.Size());
|
||||
for (j = 0; ReplyLines[j].Width >= 0; ++j)
|
||||
|
|
|
@ -224,7 +224,6 @@ class USDFParser : public UDMFParserBase
|
|||
if (reply->ItemCheck.Size() > 0)
|
||||
{
|
||||
if (reply->ItemCheck[0].Amount <= 0) reply->NeedsGold = false;
|
||||
if (reply->NeedsGold) ReplyString.AppendFormat(" for %u", reply->ItemCheck[0].Amount);
|
||||
}
|
||||
|
||||
reply->Reply = ncopystring(ReplyString);
|
||||
|
|
|
@ -699,7 +699,7 @@ bool I_WriteIniFailed ()
|
|||
|
||||
static const char *pattern;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && !defined(__llvm__)
|
||||
static int matchfile (struct dirent *ent)
|
||||
#else
|
||||
static int matchfile (const struct dirent *ent)
|
||||
|
|
Loading…
Reference in a new issue