Simplify weirdly matching division/substraction code

This commit is contained in:
DizzyEggg
2024-03-08 16:19:04 +01:00
parent 82c3e4af14
commit 9e67594dce
6 changed files with 14 additions and 38 deletions

View File

@@ -76,10 +76,7 @@ int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu)
}
finalWidth = maxWidth + listMenu->item_X + 9;
if (finalWidth < 0)
finalWidth += 7;
finalWidth >>= 3;
finalWidth /= 8;
if (finalWidth > 28)
finalWidth = 28;