diff --git a/src/am_map.cpp b/src/am_map.cpp index c22714316..e52d39211 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -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 { diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 448c200d8..2513a68a8 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -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); } } diff --git a/src/fragglescript/t_script.h b/src/fragglescript/t_script.h index e3db7da3d..ffa2dae3c 100644 --- a/src/fragglescript/t_script.h +++ b/src/fragglescript/t_script.h @@ -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); diff --git a/src/fragglescript/t_variable.cpp b/src/fragglescript/t_variable.cpp index 7326fe4eb..7076a395b 100644 --- a/src/fragglescript/t_variable.cpp +++ b/src/fragglescript/t_variable.cpp @@ -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; } //========================================================================== diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 350c46478..e51389ce8 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -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) diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index 95c8f5dc0..6ea32b308 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -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); diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index def35606a..ba126bf54 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -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)