From 3e13398ed6dac78ead0c361197fee3e1d7c39792 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Wed, 23 Sep 2015 22:04:14 +0200 Subject: [PATCH] diamonds fall through magic wall --- bd_game.c | 6 +++--- bd_lib.c | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bd_game.c b/bd_game.c index e1168b0..f378496 100644 --- a/bd_game.c +++ b/bd_game.c @@ -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) ) { diff --git a/bd_lib.c b/bd_lib.c index b7e048f..6c2e961 100644 --- a/bd_lib.c +++ b/bd_lib.c @@ -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; @@ -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;