fix middle alignment for patches with offsets (#1995)

This commit is contained in:
Roman Fomin 2024-11-08 14:06:07 +07:00 committed by GitHub
parent 1a4184da65
commit bf9f8ddf86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1104,7 +1104,7 @@ static void DrawPatch(int x, int y, int maxheight, sbaralignment_t alignment,
if (alignment & sbe_h_middle)
{
x -= (width >> 1);
x = x - width / 2 + SHORT(patch->leftoffset);
}
else if (alignment & sbe_h_right)
{
@ -1113,7 +1113,7 @@ static void DrawPatch(int x, int y, int maxheight, sbaralignment_t alignment,
if (alignment & sbe_v_middle)
{
y -= (height >> 1);
y = y - height / 2 + SHORT(patch->topoffset);
}
else if (alignment & sbe_v_bottom)
{