mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-25 09:15:08 +01:00
Fixed Windows compile errors.
This commit is contained in:
parent
6a2ab3d2af
commit
5ce0568ec7
@ -337,7 +337,7 @@ void ScrollingText::draw( )
|
|||||||
// Check if glyph falls partially outside the box at the back end
|
// Check if glyph falls partially outside the box at the back end
|
||||||
if ((rect.x + static_cast<int>( glyph.advance * scale * scaleX_ )) >= (static_cast<int>( xOrigin ) + imageMaxWidth))
|
if ((rect.x + static_cast<int>( glyph.advance * scale * scaleX_ )) >= (static_cast<int>( xOrigin ) + imageMaxWidth))
|
||||||
{
|
{
|
||||||
rect.w = static_cast<int>( xOrigin ) + imageMaxWidth - rect.x;
|
rect.w = static_cast<int>( xOrigin ) + static_cast<int>( imageMaxWidth ) - rect.x;
|
||||||
charRect.w = static_cast<int>( rect.w / scale / scaleX_ );
|
charRect.w = static_cast<int>( rect.w / scale / scaleX_ );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,8 +498,8 @@ void ScrollingText::draw( )
|
|||||||
std::istringstream iss(text[l]);
|
std::istringstream iss(text[l]);
|
||||||
std::string word;
|
std::string word;
|
||||||
unsigned int wordCount = textWords[l];
|
unsigned int wordCount = textWords[l];
|
||||||
unsigned int spaceFill = imageMaxWidth - textWidth[l];
|
unsigned int spaceFill = static_cast<int>( imageMaxWidth ) - textWidth[l];
|
||||||
unsigned int yAdvance = font->getHeight( ) * scale * scaleY_;
|
unsigned int yAdvance = static_cast<int>( font->getHeight( ) * scale * scaleY_ );
|
||||||
while (iss >> word)
|
while (iss >> word)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -512,12 +512,12 @@ void ScrollingText::draw( )
|
|||||||
SDL_Rect charRect = glyph.rect;
|
SDL_Rect charRect = glyph.rect;
|
||||||
rect.h = static_cast<int>( charRect.h * scale * scaleY_ );
|
rect.h = static_cast<int>( charRect.h * scale * scaleY_ );
|
||||||
rect.w = static_cast<int>( charRect.w * scale * scaleX_ );
|
rect.w = static_cast<int>( charRect.w * scale * scaleX_ );
|
||||||
yAdvance = font->getHeight( ) * scale * scaleY_;
|
yAdvance = static_cast<int>( font->getHeight( ) * scale * scaleY_ );
|
||||||
|
|
||||||
// Check if glyph falls partially outside the box at the bottom end
|
// Check if glyph falls partially outside the box at the bottom end
|
||||||
if ((rect.y + rect.h) >= (static_cast<int>( yOrigin ) + imageMaxHeight))
|
if ((rect.y + rect.h) >= (static_cast<int>( yOrigin ) + imageMaxHeight))
|
||||||
{
|
{
|
||||||
rect.h = static_cast<int>( yOrigin ) + imageMaxHeight - rect.y;
|
rect.h = static_cast<int>( yOrigin ) + static_cast<int>( imageMaxHeight ) - rect.y;
|
||||||
charRect.h = static_cast<int>( rect.h / scale / scaleY_ );
|
charRect.h = static_cast<int>( rect.h / scale / scaleY_ );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user