From b527183128ab4073eb98a2176a5d14db85d4302d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 11 May 2025 01:47:36 +0200 Subject: [PATCH] ru:: secret passages opened from below --- rogueviz/ru/globals.cpp | 6 +++++- rogueviz/ru/map.ru | 5 +++-- rogueviz/ru/render.cpp | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rogueviz/ru/globals.cpp b/rogueviz/ru/globals.cpp index 983d9226..6a8d6c80 100644 --- a/rogueviz/ru/globals.cpp +++ b/rogueviz/ru/globals.cpp @@ -55,7 +55,10 @@ struct ruwall { string help; }; -enum eWall { wAir, wWall, wBouncy, wSpike, wWater, wFrozen, wDoor, wSmashedDoor, wLockedDoor, wFountain, wBluePortal, wOrangePortal, wPlatform, wStaircase, wColumn, wForge, wWoodWall, wShopDoor, wGUARD }; +enum eWall { + wAir, wWall, wBouncy, wSpike, wWater, wFrozen, wDoor, wSmashedDoor, + wLockedDoor, wFountain, wBluePortal, wOrangePortal, wPlatform, wStaircase, + wColumn, wForge, wWoodWall, wShopDoor, wSecretPassage, wGUARD }; flagtype W_BLOCK = 1; flagtype W_TRANS = 2; @@ -88,6 +91,7 @@ ruwall walls[qwall] = { {"forge", "&", 0xB0202080, W_TRANS | W_PAIN, "Used by runesmiths."}, {"wooden wall", "#", 0xFF8000FF, W_BLOCK | W_STABLE, "These kinds of tough walls can be destroyed with fire."}, {"shop door", "#", 0xFFD500FF, W_TRANS, "A powerful door, to protect against shoplifters."}, + {"secret passage", "#", 0xFFFF40FF, W_PLATFORM | W_BLOCKBIRD, "You have discovered a secret passage from the other side."}, }; int sel = 1; diff --git a/rogueviz/ru/map.ru b/rogueviz/ru/map.ru index ebdbd1fb..e9a9588c 100644 --- a/rogueviz/ru/map.ru +++ b/rogueviz/ru/map.ru @@ -1124,6 +1124,7 @@ ROOM Mazes of Menace A staircase W wooden wall S shop door +P secret passage MAP ################################################################################ ################################################################################ @@ -1136,8 +1137,8 @@ MAP ###..........#####...............#######.......###############...........####### ###..........+...+...............+.....+.......###############...........####### ###..........+...+...............+.....+.......###################--############ -###..........#####...............########--#######################AA############ -###..........#####...............########..............###########AA############ +###..........#####...............#################################AA############ +###..........#####...............########PP............###########AA############ ###..........#####A.............A########..............###########AA############ .##..........#####A.............A####################..#######....AA........#### .##..........#####...............####################--#######....AA........#### diff --git a/rogueviz/ru/render.cpp b/rogueviz/ru/render.cpp index a8100f31..e9648357 100644 --- a/rogueviz/ru/render.cpp +++ b/rogueviz/ru/render.cpp @@ -149,6 +149,11 @@ void render_room_walls(room *r) { int cc = c >> 3; + if(cc == wSecretPassage && r->at(x, y-1) == wWall) { + current_room->replace_block(x, y, wAir); + current_room->replace_block(x, y-1, wSecretPassage); + } + if((c & 7) == 0) asciiletter(x*block_x, y*block_y, (x+1)*block_x, (y+1)*block_y, walls[cc].glyph, walls[cc].color);