Compare commits

...

3 Commits

Author SHA1 Message Date
Milang 86286e4b29 new brick behaviour when destroying 2020-03-13 13:10:01 +01:00
Milang 0eaaac1a9c fix flour bug
this bug permitted to throw bullets without being big, when you are small and take a flower
2020-03-13 12:10:06 +01:00
Milang 0f6f429514 completed level 3
(some adjustements may come)
2020-03-13 10:55:17 +01:00
7 changed files with 25 additions and 24 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -55,32 +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)
switch (bonus.type)
{
bonusSet(BONUS_NONE,0,0);
scoreAdd(1000);
marioBigger();
}
if (bonus.type==BONUS_FLEUR)
{
bonusSet(BONUS_NONE,0,0);
mario_has_bullets=1;
scoreAdd(1000);
}
if (bonus.type==BONUS_1UP)
{
bonusSet(BONUS_NONE,0,0);
scoreAdd(1000);
case BONUS_CHAMPI:
case BONUS_FLEUR:
if (mario.size==M_SMALL) marioBigger();
else mario_has_bullets=1;
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);
}
}

View File

@ -46,8 +46,7 @@ void marioSmaller()
mario.p.h=8;
mario.size=M_SMALL;
mario_has_bullets=0;
if (mario_immunity==0)
mario_immunity=1;
if (mario_immunity==0) mario_immunity=1;
}
void marioDraw()
@ -214,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;
}
}

View File

@ -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: