This commit is contained in:
Tituya 2021-05-02 20:35:38 +02:00
commit 6ed426c4f7
5 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
void set_level(int id_level, char level[], int *startx, int *starty,
char *gravity, int *appear, int *disappear, int *nbswitch);
void set_level(int id_level, char level[], int *startx, int *starty, char *gravity,
int *appear, int *disappear, int *nbswitch);
void set_gravity(int id_level, char *default_gravity);
void del_level(char level[]);

View File

@ -88,4 +88,4 @@ char collide_center(int x, int y, char level[], char block)
return 1;
}
return 0;
}
}

View File

@ -1,5 +1,6 @@
#include "menu.h"
#include "define.h"
#include "util.h"
#include "drawlevel.h"
#include "save.h"
#include "setlevel.h"
@ -110,3 +111,4 @@ char speed_menu(int *id_level)
}
return 0;
}

View File

@ -13,4 +13,4 @@ void replace_all_block(char a, char b, char level[])
void replace_xy_block(int x, int y, char block, char level[])
{
level[(x / TILE_HEIGHT) + ((y / TILE_HEIGHT) * LEVEL_WIDTH)] = block;
}
}

View File

@ -1,3 +1,6 @@
#include "util.h"
int round(float num) { return (num < 0) ? (num - 0.5) : (num + 0.5); }
int round(float num)
{
return (num < 0) ? (num - 0.5) : (num + 0.5);
}