1

如何在游戏的初始化部分使用 allegro5 调整初始化图像的大小?

ALLEGRO_BITMAP *player = NULL;
player = al_load_bitmap("st.png");
//something
al_draw_bitmap(player, player_position_x, player_position_y, 0);
4

1 回答 1

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);
于 2012-05-03T23:19:45.887 回答