Skip to content

Commit

Permalink
diamonds fall through magic wall
Browse files Browse the repository at this point in the history
  • Loading branch information
sebseb7 committed Sep 23, 2015
1 parent 0ebee92 commit 3e13398
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bd_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@ void bd_game_process(struct bd_game_struct_t* bd_game, int direction)
}
else if(
(new_cavemap[x][y+1] == BD_MAGICWALL)&&
((new_cavemap[x][y] == BD_BOULDERfall)||
(new_cavemap[x][y] == BD_BOULDER))
(new_cavemap[x][y] == BD_BOULDERfall)
)
{
bd_game->MagicWallActive=1;
}
else if(
(new_cavemap[x][y+1] == BD_MAGICWALLactive)&&
(new_cavemap[x][y] == BD_BOULDERfall)&&
((new_cavemap[x][y] == BD_DIAMONDfall)||
(new_cavemap[x][y] == BD_BOULDERfall))&&
(new_cavemap[x][y+2] == BD_SPACE)
)
{
Expand Down
8 changes: 8 additions & 0 deletions bd_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ void get_colors(int type,int tick,int* colors)
colors[2]=36;
break;
case BD_BOULDER:
colors[0]=07;
colors[1]=99;
colors[2]=90;
break;
case BD_BOULDERfall:
colors[0]=107;
colors[1]=99;
Expand Down Expand Up @@ -235,6 +239,10 @@ void get_colors(int type,int tick,int* colors)
colors[2]=100+(13*sinlut[(tick>>2)%10]);
break;
case BD_DIAMOND:
colors[0]=86+(4*sinlut[(tick>>2)%10]);
colors[1]=6;
colors[2]=86+(4*sinlut[((tick+5)>>2)%10]);
break;
case BD_DIAMONDfall:
colors[0]=86+(4*sinlut[(tick>>2)%10]);
colors[1]=76;
Expand Down

0 comments on commit 3e13398

Please sign in to comment.