например:
int score = 20;
int main(){
al_draw_text(foo, foo, foo, foo, foo, "SCORE");
//I would then like to print the score to the screen,
// is there anyway to do this?
al_rest(1000);
return 0;
}
Возможно ли это, или как насчет преобразования оценки в const char
или string
?
Вы можете использовать al_draw_textf для печати строки с использованием строки формата printf.
Что-то вроде этого:
al_draw_textf(my_font, my_color, x_pos, y_pos, 0, "score = %d", score);