Reputation: 11
How to resize initialized image with allegro5 in initializition part of game?
ALLEGRO_BITMAP *player = NULL;
player = al_load_bitmap("st.png");
//something
al_draw_bitmap(player, player_position_x, player_position_y, 0);
Upvotes: 1
Views: 680
Reputation: 48304
Instead of al_draw_bitmap()
use:
void al_draw_scaled_bitmap(ALLEGRO_BITMAP *bitmap,
float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh, int flags);
Upvotes: 4