author | ecalot
<ecalot> 2004-08-20 08:35:33 UTC |
committer | ecalot
<ecalot> 2004-08-20 08:35:33 UTC |
parent | 6c1508943f17eee5b74f9ffad9e8371705fd7e49 |
FP/src/include/map_defs.h | +3 | -3 |
FP/src/ker/room.c | +26 | -12 |
diff --git a/FP/src/include/map_defs.h b/FP/src/include/map_defs.h index 6762384..ae87ab2 100644 --- a/FP/src/include/map_defs.h +++ b/FP/src/include/map_defs.h @@ -169,8 +169,8 @@ Len Offs BlockName & Description wall 0x01 +Normal -No Blue line */ -#define MAP_B_NONE T_EMPTY -#define MAP_F_WALL 0 -#define MAP_F_FREE 0 +#define MAP_B_NONE 0 +#define MAP_F_WALL T_WALL +#define MAP_F_FREE T_EMPTY #endif diff --git a/FP/src/ker/room.c b/FP/src/ker/room.c index 7e7b527..fcef8e2 100644 --- a/FP/src/ker/room.c +++ b/FP/src/ker/room.c @@ -122,7 +122,7 @@ void roomDrawBackground(tRoom* room) { /* main panel block */ tTile tile=roomGetTile(room,x,y); tTile left=roomGetTile(room,x-1,y); - /* Wall */ + /* Wall/left */ if (!tile.isWall) { if (left.isWall) { outputDrawBitmap( @@ -132,25 +132,31 @@ void roomDrawBackground(tRoom* room) { ); } } - /* torch */ - if (tile.hasTorch) { + /* normal/left */ + if (left.hasFloor) { outputDrawBitmap( - roomGfx.torch->pFrames[(map->time+2*x+y)%(roomGfx.torch->frames)], - x*TILE_W+16, - y*TILE_H-40 + roomGfx.environment->pFrames[10], + (x-1)*TILE_W, + y*TILE_H ); } - /* TODO: draw base */ - - /* normal floor */ - if (left.hasFloor) { + /* debris/left */ + if (left.hasBrokenTile) { outputDrawBitmap( - roomGfx.environment->pFrames[10], + roomGfx.environment->pFrames[49], (x-1)*TILE_W, y*TILE_H ); - } + /* torch/this */ + if (tile.hasTorch) { + outputDrawBitmap( + roomGfx.torch->pFrames[(map->time+2*x+y)%(roomGfx.torch->frames)], + x*TILE_W+16, + y*TILE_H-40 + ); + } /* TODO: draw base */ + /* normal/this */ if (tile.hasFloor) { outputDrawBitmap( roomGfx.environment->pFrames[9], @@ -158,6 +164,14 @@ void roomDrawBackground(tRoom* room) { y*TILE_H-2 ); } + /* debris/this */ + if (tile.hasBrokenTile) { + outputDrawBitmap( + roomGfx.environment->pFrames[48], + (x-1)*TILE_W, + y*TILE_H-2 + ); + } } } }