tractant d'entendre el codi de Player i posar ordre
This commit is contained in:
@@ -155,17 +155,17 @@ void playMusic(const std::string& music_path);
|
||||
void fillTextureWithColor(SDL_Renderer* renderer, SDL_Texture* texture, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
||||
|
||||
inline auto toSDLRect(const SDL_FRect& frect) -> SDL_Rect {
|
||||
SDL_Rect rect;
|
||||
rect.x = static_cast<int>(frect.x);
|
||||
rect.y = static_cast<int>(frect.y);
|
||||
rect.w = static_cast<int>(frect.w);
|
||||
rect.h = static_cast<int>(frect.h);
|
||||
SDL_Rect rect = {
|
||||
.x = static_cast<int>(frect.x),
|
||||
.y = static_cast<int>(frect.y),
|
||||
.w = static_cast<int>(frect.w),
|
||||
.h = static_cast<int>(frect.h)};
|
||||
return rect;
|
||||
}
|
||||
|
||||
inline auto toSDLPoint(const SDL_FPoint& fpoint) -> SDL_Point {
|
||||
SDL_Point point;
|
||||
point.x = static_cast<int>(fpoint.x);
|
||||
point.y = static_cast<int>(fpoint.y);
|
||||
SDL_Point point = {
|
||||
.x = static_cast<int>(fpoint.x),
|
||||
.y = static_cast<int>(fpoint.y)};
|
||||
return point;
|
||||
}
|
||||
Reference in New Issue
Block a user