author | ecalot
<ecalot> 2005-03-01 15:56:51 UTC |
committer | ecalot
<ecalot> 2005-03-01 15:56:51 UTC |
parent | c13e26f9f68f81fe43d0222edfe6720bf7a4afdd |
FP/src/conf/tiles.conf | +6 | -2 |
FP/src/ker/room.c | +15 | -13 |
diff --git a/FP/src/conf/tiles.conf b/FP/src/conf/tiles.conf index 75541f0..5327991 100644 --- a/FP/src/conf/tiles.conf +++ b/FP/src/conf/tiles.conf @@ -45,12 +45,14 @@ tile GATE 4 gate door gates gateFrame walkable block@Gate@info->frame>15 - tile BTN_STUCK 5 none walkable tile BTN_DROP 6 event walkable pressable +unpressed@Pressable@info->action==eNormal +drop_unpressed@Pressable@info->action==eNormal +drop_pressed@Pressable@info->action!=eNormal tile TAPESTRY 7 tapest tile BP_BOTTOM 8 none @@ -90,7 +92,6 @@ tile LOOSE 11 none #it has floor and is walkable only if it is not down floor@Danger@info->action==eLosNormal walkable@Danger@info->action!=eLosDown - loosemoving@Danger@info->action==eLosMoving loosenormal@Danger@info->action==eLosNormal chopper_spike @@ -107,6 +108,9 @@ brokenTile walkable tile BTN_RAISE 15 event walkable dangerous pressable raise +unpressed@Pressable@info->action==eNormal +raise_unpressed@Pressable@info->action==eNormal +raise_pressed@Pressable@info->action!=eNormal tile EXIT_LEFT 16 none gates walkable diff --git a/FP/src/ker/room.c b/FP/src/ker/room.c index ab13b8b..4369308 100644 --- a/FP/src/ker/room.c +++ b/FP/src/ker/room.c @@ -305,10 +305,14 @@ void drawBackPanel(tRoom* room,int x, int y) { if (isIn(left,TILE_BP_TOP)) e(85,(x-1)*TILE_W+0,y*TILE_H+3); /* pressable/left */ - if (isIn(left,TILE_BTN_RAISE)) - e(10,(x-1)*TILE_W+0,y*TILE_H+(buttonIsNormal(left)?1:2)); - if (isIn(left,TILE_BTN_DROP)) - e(10,(x-1)*TILE_W+0,y*TILE_H+(buttonIsNormal(left)?2:3)); + if (isIn(left,TILES_RAISE_PRESSED)) + e(10,(x-1)*TILE_W+0,y*TILE_H+2); + if (isIn(left,TILES_RAISE_UNPRESSED)) + e(10,(x-1)*TILE_W+0,y*TILE_H+1); + if (isIn(left,TILES_DROP_PRESSED)) + e(10,(x-1)*TILE_W+0,y*TILE_H+3); + if (isIn(left,TILES_DROP_UNPRESSED)) + e(10,(x-1)*TILE_W+0,y*TILE_H+2); /* debris/left */ if (isIn(left,TILES_BROKENTILE)) e(49,(x-1)*TILE_W+0,y*TILE_H+2); @@ -369,19 +373,17 @@ void drawBackPanel(tRoom* room,int x, int y) { if (isIn(tile,TILE_BP_TOP)) e(87,(x-1)*TILE_W+8,y*TILE_H+3); /* pressable/this */ - if (isIn(tile,TILE_BTN_RAISE) && buttonIsNormal(tile) && isIn(left,TILES_WALKABLE) && ( !isIn(left,TILES_RAISE )) ) - e(57,(x-1)*TILE_W+0,y*TILE_H+(buttonIsNormal(tile)?0:1)); - if (isIn(tile,TILE_BTN_RAISE) && ( ( !buttonIsNormal(tile) )||( !isIn(left,TILES_WALKABLE) )|| isIn(left,TILES_RAISE) ) ) + if (isIn(tile,TILES_RAISE_UNPRESSED)&&isIn(left,TILES_WALKABLE)&&(!isIn(left,TILES_RAISE))) + e(57,(x-1)*TILE_W+0,y*TILE_H); + if (isIn(tile,TILES_RAISE) && ( ( !buttonIsNormal(tile) )||( !isIn(left,TILES_WALKABLE) )|| isIn(left,TILES_RAISE) ) ) e(58,(x-1)*TILE_W+0,y*TILE_H+(buttonIsNormal(tile)?0:1)); - if (isIn(tile,TILE_BTN_DROP)) - e(58,(x-1)*TILE_W+0,y*TILE_H+(buttonIsNormal(tile)?1:2)); + if (isIn(tile,TILES_DROP_PRESSED)) + e(58,(x-1)*TILE_W+0,y*TILE_H+2); + if (isIn(tile,TILES_DROP_UNPRESSED)) + e(58,(x-1)*TILE_W+0,y*TILE_H+1); /* debris/this */ if (isIn(tile,TILES_BROKENTILE)) e(48,(x-1)*TILE_W+0,y*TILE_H+0); - /* chopper/this / - if (isIn(tile,TILE_CHOPPER)) - e(9,(x-1)*TILE_W+0,y*TILE_H+0); - */ /* spikes/this */ if (isIn(tile,TILES_SPIKES)) { e(101,(x-1)*TILE_W+0,y*TILE_H+0);