Skip to content
Snippets Groups Projects
Commit 862eb898 authored by vautrin33u's avatar vautrin33u
Browse files

Début fonctions gestions de de sprites qui se rencontrent

parent 41118ada
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
File deleted
...@@ -77,9 +77,10 @@ void build_sprite_unique (sprite_t *sprite, char nom, int largeur, int hauteur, ...@@ -77,9 +77,10 @@ void build_sprite_unique (sprite_t *sprite, char nom, int largeur, int hauteur,
if (comptX == hauteur && comptY == largeur){ if (comptX == hauteur && comptY == largeur){
init_sprite(sprite, nom, x, y+1-largeur, hauteur, largeur, 0, 0); init_sprite(sprite, nom, x, y+1-largeur, hauteur, largeur, 0, 0);
} }
printf ("\n Sprite : %c, x: %d, y: %d", sprite->nom, sprite->rect.x, sprite->rect.y); print_sprite(sprite);
} }
/* //TODO: nécessaire pour trouver tous les blocs de comptoires, trouver une solution.
/*
void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur){ void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur){
for (int i=0; i<SCREEN_HEIGHT; i++){ for (int i=0; i<SCREEN_HEIGHT; i++){
...@@ -89,6 +90,10 @@ void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur ...@@ -89,6 +90,10 @@ void build_sprites_tab (world_t* world, char nomSprite, int largeur, int hauteur
} }
}*/ }*/
void limites_internes (world_t world, sprite_t spr1, sprite_t spr2){
//Gestion de rencontre entre deux sprites
}
void init_sprite(sprite_t *sprite, char nom, int x, int y, int w, int h, int v, int state){ void init_sprite(sprite_t *sprite, char nom, int x, int y, int w, int h, int v, int state){
//La fonction initialise tous les composants d'un sprite //La fonction initialise tous les composants d'un sprite
sprite->rect.x = x; sprite->rect.x = x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment