new brick behaviour when destroying
This commit is contained in:
parent
0eaaac1a9c
commit
86286e4b29
BIN
SuperCbr.g1a
BIN
SuperCbr.g1a
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 647 B |
25
src/bonus.c
25
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue