Skip to content

Commit

Permalink
Merge branch 'maint2.4' of https://github.com/coelckers/gzdoom into m…
Browse files Browse the repository at this point in the history
…aint-1.3

# Conflicts:
#	src/version.h
  • Loading branch information
madame-rachelle committed Mar 19, 2017
2 parents e4814f2 + 5c286dc commit fa3d228
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
14 changes: 8 additions & 6 deletions src/g_statusbar/sbarinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,6 @@ class DSBarInfo
{ // Calculate cleanX and cleanY
wrapper->ScreenSizeChanged();
}
wrapper->GetCoords(ST_X, ST_Y);
int hud = STBAR_NORMAL;
if(state == HUD_StatusBar)
{
Expand Down Expand Up @@ -1225,8 +1224,10 @@ class DSBarInfo
if(!fullScreenOffsets)
{
double tmp = 0;
dx += ST_X;
dy += ST_Y - (Scaled ? script->resH : 200) + script->height;
int stX, stY;
wrapper->GetCoords(stX, stY);
dx += stX;
dy += stY - (Scaled ? script->resH : 200) + script->height;
w = forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth;
h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight;
double dcx = clip[0] == 0 ? 0 : dx + clip[0] - texture->GetScaledLeftOffsetDouble();
Expand Down Expand Up @@ -1451,8 +1452,10 @@ class DSBarInfo

if(!fullScreenOffsets)
{
rx += ST_X;
ry += ST_Y - (Scaled ? script->resH : 200) + script->height;
int stX, stY;
wrapper->GetCoords(stX, stY);
rx += stX;
ry += stY - (Scaled ? script->resH : 200) + script->height;
if(Scaled)
screen->VirtualToRealCoords(rx, ry, rw, rh, script->resW, script->resH, true);
else
Expand Down Expand Up @@ -1520,7 +1523,6 @@ class DSBarInfo
player_t *CPlayer = nullptr;
DBaseStatusBar *wrapper;
bool Scaled;
int ST_X, ST_Y;

private:
SBarInfo *script;
Expand Down
2 changes: 1 addition & 1 deletion src/scripting/backend/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ ExpEmit FxAssign::Emit(VMFunctionBuilder *build)

if (IsBitWrite == -1)
{
build->Emit(ValueType->GetStoreOp(), pointer.RegNum, result.RegNum, build->GetConstantInt(0));
build->Emit(Base->ValueType->GetStoreOp(), pointer.RegNum, result.RegNum, build->GetConstantInt(0));
}
else
{
Expand Down
1 change: 0 additions & 1 deletion src/scripting/backend/vmbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ size_t VMFunctionBuilder::Emit(int opcode, int opa, int opb, int opc)
assert(opb >= 0);
assert(opc >= 0);


// The following were just asserts, meaning this would silently create broken code if there was an overflow
// if this happened in a release build. Not good.
// These are critical errors that need to be reported to the user.
Expand Down
8 changes: 7 additions & 1 deletion src/v_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,12 @@ void V_CalcCleanFacs (int designwidth, int designheight, int realwidth, int real
int cheight;
int cx1, cy1, cx2, cy2;

// For larger screems always use at least a 16:9 ratio for clean factor calculation, even if the actual ratio is narrower.
if (realwidth > 1280 && (double)realwidth / realheight < 16./9)
{
realheight = realwidth * 9 / 16;
}

ratio = ActiveRatio(realwidth, realheight);
if (AspectTallerThanWide(ratio))
{
Expand All @@ -1415,7 +1421,7 @@ void V_CalcCleanFacs (int designwidth, int designheight, int realwidth, int real
cy1 = MAX(cheight / designheight, 1);
cx2 = MAX(realwidth / designwidth, 1);
cy2 = MAX(realheight / designheight, 1);
if (abs(cx1 - cy1) <= abs(cx2 - cy2) || cx1 >= 4)
if (abs(cx1 - cy1) <= abs(cx2 - cy2) || MAX(cx1, cx2) >= 4)
{ // e.g. 640x360 looks better with this.
*cleanx = cx1;
*cleany = cy1;
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const char *GetVersionString();
#ifdef GIT_DESCRIPTION
#define VERSIONSTR GIT_DESCRIPTION
#else
#define VERSIONSTR "1.3"
#define VERSIONSTR "1.3.0"
#endif

// The version as seen in the Windows resource
Expand Down

0 comments on commit fa3d228

Please sign in to comment.