Browse Source

fix critical bugs !

master
yann MAGNIN 2 months ago
parent
commit
cabca91344
8 changed files with 8 additions and 4 deletions
  1. 1
    0
      .gitignore
  2. BIN
      lib/libmycsfml.a
  3. BIN
      lib/libmystdio.a
  4. BIN
      lib/libmystdlib.a
  5. BIN
      lib/libmystring.a
  6. 2
    0
      src/core/engine.c
  7. 1
    1
      src/text/ascii.c
  8. 4
    3
      src/text/print_nbr.c

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
my_runner
*.cfg
build
*.[ao]

BIN
lib/libmycsfml.a View File


BIN
lib/libmystdio.a View File


BIN
lib/libmystdlib.a View File


BIN
lib/libmystring.a View File


+ 2
- 0
src/core/engine.c View File

@@ -24,6 +24,8 @@ static void check_id(sfml_t *sfml, int x, int y, int i)
{
uint8_t id;

if (i >= sfml->scene->level->width * sfml->scene->level->height)
return;
id = sfml->scene->level->map[i];
if (id == ID_GROUND || id == ID_FAKE_GROUND)
draw_ground(sfml, x, y,

+ 1
- 1
src/text/ascii.c View File

@@ -53,7 +53,7 @@ uint32_t color_alpha, uint8_t action)
{
uint32_t *option;

option = (uint32_t*)malloc(4);
option = (uint32_t*)malloc(4 * sizeof(uint32_t));
option[0] = (uint32_t)size;
option[1] = color_char;
option[2] = color_alpha;

+ 4
- 3
src/text/print_nbr.c View File

@@ -8,12 +8,13 @@

void my_print_nbr(sfml_t *sfml, int nb, uint32_t *option, int pos[2])
{
uint8_t buffer;
char buffer[2];

if (!nb)
return;
my_print_nbr(sfml, nb / 10, option, pos);
buffer = '0' + nb % 10;
my_print(sfml, pos, (const char*)&buffer, option);
buffer[0] = '0' + nb % 10;
buffer[1] = '\0';
my_print(sfml, pos, buffer, option);
pos[0] += ASCII_DEFAULT_WIDTH << option[0];
}

Loading…
Cancel
Save