mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-02-26 11:13:51 +01:00
Fixed Windows compile errors.
This commit is contained in:
parent
d6e7de7596
commit
a293717351
@ -64,8 +64,8 @@ void Image::allocateGraphicsMemory()
|
||||
{
|
||||
SDL_SetTextureBlendMode(texture_, SDL_BLENDMODE_BLEND);
|
||||
SDL_QueryTexture(texture_, NULL, NULL, &width, &height);
|
||||
baseViewInfo.ImageWidth = width;
|
||||
baseViewInfo.ImageHeight = height;
|
||||
baseViewInfo.ImageWidth = (float)width;
|
||||
baseViewInfo.ImageHeight = (float)height;
|
||||
}
|
||||
SDL_UnlockMutex(SDL::getMutex());
|
||||
|
||||
|
||||
@ -374,10 +374,10 @@ bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect
|
||||
dstRectCopy.w = dstRect.w;
|
||||
dstRectCopy.h = dstRect.h;
|
||||
|
||||
dstRect.x *= scaleX;
|
||||
dstRect.y *= scaleY;
|
||||
dstRect.w *= scaleX;
|
||||
dstRect.h *= scaleY;
|
||||
dstRect.x = (int)(dstRect.x*scaleX);
|
||||
dstRect.y = (int)(dstRect.y*scaleY);
|
||||
dstRect.w = (int)(dstRect.w*scaleX);
|
||||
dstRect.h = (int)(dstRect.h*scaleY);
|
||||
|
||||
SDL_SetTextureAlphaMod( texture, static_cast<char>( alpha * 255 ) );
|
||||
SDL_RenderCopyEx( getRenderer( ), texture, &srcRect, &dstRect, viewInfo.Angle, NULL, SDL_FLIP_NONE );
|
||||
@ -391,10 +391,10 @@ bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect
|
||||
{
|
||||
dstRect.h = static_cast<unsigned int>( static_cast<float>(dstRect.h ) * viewInfo.ReflectionScale);
|
||||
dstRect.y = dstRect.y - dstRect.h - viewInfo.ReflectionDistance;
|
||||
dstRect.x *= scaleX;
|
||||
dstRect.y *= scaleY;
|
||||
dstRect.w *= scaleX;
|
||||
dstRect.h *= scaleY;
|
||||
dstRect.x = (int)(dstRect.x*scaleX);
|
||||
dstRect.y = (int)(dstRect.y*scaleY);
|
||||
dstRect.w = (int)(dstRect.w*scaleX);
|
||||
dstRect.h = (int)(dstRect.h*scaleY);
|
||||
SDL_SetTextureAlphaMod( texture, static_cast<char>( viewInfo.ReflectionAlpha * alpha * 255 ) );
|
||||
SDL_RenderCopyEx( getRenderer( ), texture, src, &dstRect, viewInfo.Angle, NULL, SDL_FLIP_VERTICAL );
|
||||
}
|
||||
@ -403,10 +403,10 @@ bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect
|
||||
{
|
||||
dstRect.y = dstRect.y + dstRect.h + viewInfo.ReflectionDistance;
|
||||
dstRect.h = static_cast<unsigned int>( static_cast<float>(dstRect.h ) * viewInfo.ReflectionScale);
|
||||
dstRect.x *= scaleX;
|
||||
dstRect.y *= scaleY;
|
||||
dstRect.w *= scaleX;
|
||||
dstRect.h *= scaleY;
|
||||
dstRect.x = (int)(dstRect.x*scaleX);
|
||||
dstRect.y = (int)(dstRect.y*scaleY);
|
||||
dstRect.w = (int)(dstRect.w*scaleX);
|
||||
dstRect.h = (int)(dstRect.h*scaleY);
|
||||
SDL_SetTextureAlphaMod( texture, static_cast<char>( viewInfo.ReflectionAlpha * alpha * 255 ) );
|
||||
SDL_RenderCopyEx( getRenderer( ), texture, src, &dstRect, viewInfo.Angle, NULL, SDL_FLIP_VERTICAL );
|
||||
}
|
||||
@ -415,10 +415,10 @@ bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect
|
||||
{
|
||||
dstRect.w = static_cast<unsigned int>( static_cast<float>(dstRect.w ) * viewInfo.ReflectionScale);
|
||||
dstRect.x = dstRect.x - dstRect.w - viewInfo.ReflectionDistance;
|
||||
dstRect.x *= scaleX;
|
||||
dstRect.y *= scaleY;
|
||||
dstRect.w *= scaleX;
|
||||
dstRect.h *= scaleY;
|
||||
dstRect.x = (int)(dstRect.x*scaleX);
|
||||
dstRect.y = (int)(dstRect.y*scaleY);
|
||||
dstRect.w = (int)(dstRect.w*scaleX);
|
||||
dstRect.h = (int)(dstRect.h*scaleY);
|
||||
SDL_SetTextureAlphaMod( texture, static_cast<char>( viewInfo.ReflectionAlpha * alpha * 255 ) );
|
||||
SDL_RenderCopyEx( getRenderer( ), texture, src, &dstRect, viewInfo.Angle, NULL, SDL_FLIP_HORIZONTAL );
|
||||
}
|
||||
@ -427,10 +427,10 @@ bool SDL::renderCopy( SDL_Texture *texture, float alpha, SDL_Rect *src, SDL_Rect
|
||||
{
|
||||
dstRect.x = dstRect.x + dstRect.w + viewInfo.ReflectionDistance;
|
||||
dstRect.w = static_cast<unsigned int>( static_cast<float>(dstRect.w ) * viewInfo.ReflectionScale);
|
||||
dstRect.x *= scaleX;
|
||||
dstRect.y *= scaleY;
|
||||
dstRect.w *= scaleX;
|
||||
dstRect.h *= scaleY;
|
||||
dstRect.x = (int)(dstRect.x*scaleX);
|
||||
dstRect.y = (int)(dstRect.y*scaleY);
|
||||
dstRect.w = (int)(dstRect.w*scaleX);
|
||||
dstRect.h = (int)(dstRect.h*scaleY);
|
||||
SDL_SetTextureAlphaMod( texture, static_cast<char>( viewInfo.ReflectionAlpha * alpha * 255 ) );
|
||||
SDL_RenderCopyEx( getRenderer( ), texture, src, &dstRect, viewInfo.Angle, NULL, SDL_FLIP_HORIZONTAL );
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user