orton_runner/src/text/print_nbr.c

20 lines
377 B
C
Raw Normal View History

2019-01-20 11:55:38 +01:00
/*
** EPITECH PROJECT, 2018
** task01
** File description:
** I do task
*/
#include "game/ascii.h"
void my_print_nbr(sfml_t *sfml, int nb, uint32_t *option, int pos[2])
{
uint8_t buffer;
if (!nb)
return;
my_print_nbr(sfml, nb / 10, option, pos);
buffer = '0' + nb % 10;
my_print(sfml, pos, (const char*)&buffer, option);
pos[0] += ASCII_DEFAULT_WIDTH << option[0];
}