diff --git a/src/utils.c b/src/utils.c index 47defef..ea237a8 100644 --- a/src/utils.c +++ b/src/utils.c @@ -122,7 +122,11 @@ SYMBOL_EXPORT void DrawCentered(ALLEGRO_BITMAP* bitmap, int x, int y, int flags) } SYMBOL_EXPORT void DrawCenteredScaled(ALLEGRO_BITMAP* bitmap, int x, int y, double sx, double sy, int flags) { - al_draw_scaled_rotated_bitmap(bitmap, al_get_bitmap_width(bitmap) / 2.0, al_get_bitmap_height(bitmap) / 2.0, + DrawCenteredTintedScaled(bitmap, al_map_rgb(255, 255, 255), x, y, sx, sy, flags); +} + +SYMBOL_EXPORT void DrawCenteredTintedScaled(ALLEGRO_BITMAP* bitmap, ALLEGRO_COLOR tint, int x, int y, double sx, double sy, int flags) { + al_draw_tinted_scaled_rotated_bitmap(bitmap, tint, al_get_bitmap_width(bitmap) / 2.0, al_get_bitmap_height(bitmap) / 2.0, x, y, sx, sy, 0, flags); } diff --git a/src/utils.h b/src/utils.h index d2a1e0b..b1a6611 100644 --- a/src/utils.h +++ b/src/utils.h @@ -54,6 +54,7 @@ int DrawWrappedTextWithShadow(ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, void DrawCentered(ALLEGRO_BITMAP* bitmap, int x, int y, int flags); void DrawCenteredScaled(ALLEGRO_BITMAP* bitmap, int x, int y, double sx, double sy, int flags); +void DrawCenteredTintedScaled(ALLEGRO_BITMAP* bitmap, ALLEGRO_COLOR tint, int x, int y, double sx, double sy, int flags); double DotProduct(const double v[], const double u[], int n); double VectorLength(double x, double y, double z);