Compare commits
3 Commits
21734f0765
...
86286e4b29
Author | SHA1 | Date |
---|---|---|
Milang | 86286e4b29 | |
Milang | 0eaaac1a9c | |
Milang | 0f6f429514 |
BIN
SuperCbr.g1a
BIN
SuperCbr.g1a
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 |
34
src/bonus.c
34
src/bonus.c
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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