diff --git a/Source/DiabloUI/ttf_render_wrapped.cpp b/Source/DiabloUI/ttf_render_wrapped.cpp index d569ceec4..a88fe741f 100644 --- a/Source/DiabloUI/ttf_render_wrapped.cpp +++ b/Source/DiabloUI/ttf_render_wrapped.cpp @@ -142,7 +142,7 @@ SDL_Surface *RenderUTF8_Solid_Wrapped(TTF_Font *font, const char *text, SDL_Colo SDLC_SetColorKey(textbuf, 0); // Reduced space between lines to roughly match Diablo. - const int lineskip = 0.7 * TTF_FontLineSkip(font); + const int lineskip = TTF_FontLineSkip(font) * 7 / 10; // avoids forced int > float > int conversion SDL_Rect dest = { 0, 0, 0, 0 }; for (std::size_t line = 0; line < numLines; line++) { text = strLines[line]; diff --git a/Source/items.cpp b/Source/items.cpp index 281c47907..929e0bba4 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -4257,7 +4257,7 @@ static void SpawnOnePremium(int i, int plvl, int playerId) itemValue = 0; break; } - itemValue *= 0.8; + itemValue = itemValue * 4 / 5; // avoids forced int > float > int conversion count++; } while (keepGoing @@ -4504,7 +4504,7 @@ void SpawnBoy(int lvl) break; } } - ivalue *= 0.8; + ivalue = ivalue * 4 / 5; // avoids forced int > float > int conversion count++;