如何在游戏的初始化部分使用allegro5调整初始化图像的大小?
ALLEGRO_BITMAP *player = NULL;
player = al_load_bitmap("st.png");
//something
al_draw_bitmap(player, player_position_x, player_position_y, 0);
答案 0 :(得分:4)
而不是al_draw_bitmap()
使用:
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);