diff --git a/SuperCbr.g1a b/SuperCbr.g1a index 3e24417..eaaeb31 100644 Binary files a/SuperCbr.g1a and b/SuperCbr.g1a differ diff --git a/assets-fx/img/brick.png b/assets-fx/img/brick.png index 12451b7..737dcf9 100755 Binary files a/assets-fx/img/brick.png and b/assets-fx/img/brick.png differ diff --git a/src/bonus.c b/src/bonus.c index 12dfb4b..a69394f 100644 --- a/src/bonus.c +++ b/src/bonus.c @@ -55,27 +55,26 @@ void bonusMove() //+collision } int collide=boxContact(&mario.p, &bonus.b); - if (collide) + if (collide && bonus.type!=BONUS_NONE) { - if (bonus.type==BONUS_CHAMPI || bonus.type==BONUS_FLEUR) + switch (bonus.type) { + case BONUS_CHAMPI: + case BONUS_FLEUR: if (mario.size==M_SMALL) marioBigger(); else mario_has_bullets=1; - bonusSet(BONUS_NONE,0,0); - scoreAdd(1000); - } - if (bonus.type==BONUS_1UP) - { - bonusSet(BONUS_NONE,0,0); - scoreAdd(1000); + break; + + case BONUS_1UP: lifesAdd(1); - } - if (bonus.type==BONUS_STAR) - { + break; + + case BONUS_STAR: bonusSet(BONUS_NONE,0,0); - scoreAdd(1000); mario_starMode=1; } + scoreAdd(1000); + bonusSet(BONUS_NONE,0,0); } } diff --git a/src/mario.c b/src/mario.c index ba319c4..87b2681 100755 --- a/src/mario.c +++ b/src/mario.c @@ -213,7 +213,11 @@ void marioMove() case 4: c->number--; bonusSet(BONUS_STAR,((mario.p.x+mario.p.w/2)/8)*8,mario.p.y+mario.p.h+8); break; } } - else if (c->content==0 && mario.size==M_BIG && c->type==BRICK) c->state=c->time_hit_id=1; + else if (c->content==0 && mario.size==M_BIG && c->type==BRICK) + { + c->state=c->time_hit_id=1; + mario.p.vy=3; + } else if (c->content==0 && c->type==BRICK) c->time_hit_id=1; } } diff --git a/src/world.c b/src/world.c index 24901c2..d9ad47a 100755 --- a/src/world.c +++ b/src/world.c @@ -136,7 +136,11 @@ int worldGetCellCategory(int x, int y) switch (c->type) { - case TUYAU: case GIFT: case BRICK: case EARTH: case BLOC: case ARBRE: + case BRICK: + if (((brick_t*)c)->content==0 && ((brick_t*)c)->time_hit_id && ((brick_t*)c)->state) return CTG_EMPTY; + + // fall through + case TUYAU: case GIFT: case EARTH: case BLOC: case ARBRE: return CTG_SOIL; default: