From 4ace4333408f7e73c2a2c12997ada7548d76ffc5 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 16 Sep 2024 14:08:49 +0200 Subject: [PATCH 1/2] - Treballant en el mapa --- source/jdraw.cpp | 11 +++++ source/jdraw.h | 1 + source/m_editor_map.cpp | 90 +++++++++++++++++++++++++++-------------- 3 files changed, 72 insertions(+), 30 deletions(-) diff --git a/source/jdraw.cpp b/source/jdraw.cpp index 27b18b8..54acf7f 100644 --- a/source/jdraw.cpp +++ b/source/jdraw.cpp @@ -504,6 +504,17 @@ namespace draw sel_color = col; } + void isoline(int x, int y, const int dx, const int dy, const int len) + { + for (int i=0; i=-32) && (x<520) && (y>=-16) && (y<240) ) + { + draw::color(RED); + if (minirooms[room].exits[XN] != 255) { draw::isoline(x,y,-1,-1,14); draw::isoline(x,y-1,-1,-1,14); draw::isoline(x,y+1,-1,-1,14); } + if (minirooms[room].exits[YN] != 255) { draw::isoline(x,y,+1,-1,14); draw::isoline(x,y-1,+1,-1,14); draw::isoline(x,y+1,+1,-1,14); } + if (minirooms[room].exits[XP] != 255) { draw::isoline(x,y,+1,+1,14); draw::isoline(x,y-1,+1,+1,14); draw::isoline(x,y+1,+1,+1,14); } + if (minirooms[room].exits[YP] != 255) { draw::isoline(x,y,-1,+1,14); draw::isoline(x,y-1,-1,+1,14); draw::isoline(x,y+1,-1,+1,14); } + } + if (minirooms[room].exits[XN] != 255) drawLines(minirooms[room].exits[XN], x-24, y-12); + if (minirooms[room].exits[XP] != 255) drawLines(minirooms[room].exits[XP], x+24, y+12); + if (minirooms[room].exits[YN] != 255) drawLines(minirooms[room].exits[YN], x+24, y-12); + if (minirooms[room].exits[YP] != 255) drawLines(minirooms[room].exits[YP], x-24, y+12); + } + + void drawRoom(const int room, const int x, const int y) + { + if (drawn[room]) return; + drawn[room] = true; + if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) ) + { + draw::stencil::set(room); + draw::swapcol(1, minirooms[room].color); + draw::draw(x-16, y-8, 32, 16, minirooms[room].w*32, minirooms[room].h*16); + + //draw::swapcol(1, RED); + //if (minirooms[room].exits[XN] != 255) draw::draw(x-4-(minirooms[room].w*2), y-5-(minirooms[room].w),4,5,0,64); + //if (minirooms[room].exits[YN] != 255) draw::draw(x+(minirooms[room].h*2), y-5-(minirooms[room].h),4,5,3,64); + //if (minirooms[room].exits[XP] != 255) draw::draw(x+(minirooms[room].w*2), y-3+(minirooms[room].w),4,5,0,64); + //if (minirooms[room].exits[YP] != 255) draw::draw(x-4-(minirooms[room].h*2), y-3+(minirooms[room].h),4,5,3,64); + + char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10); + draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK); + } + if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12); + if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12); + if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12); + if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12); + } + void loadMiniRoom() { const int room = room::getCurrent(); @@ -53,45 +96,32 @@ namespace modules current_room = room::getCurrent(); loadMiniRoom(); room::load(current_room); + + for (int i=0;i<64;++i) drawn[i]=false; + draw::cls(2); + draw::setSource(surf); + + drawLines(room::getCurrent(), scroll.x, scroll.y); + + draw::swapcol(1, RED); + for (int y=-1; y<=1; ++y) + for (int x=-1; x<=1; ++x) + { + for (int i=0;i<64;++i) drawn[i]=false; + drawRoom(room::getCurrent(), scroll.x+x, scroll.y+y); + } + } - void drawRoom(const int room, const int x, const int y) - { - if (drawn[room]) return; - drawn[room] = true; - if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) ) - { - draw::stencil::set(room); - draw::swapcol(1, minirooms[room].color); - draw::draw(x-16, y-8, 32, 16, minirooms[room].w*32, minirooms[room].h*16); - - draw::swapcol(1, RED); - if (minirooms[room].exits[XN] != 255) draw::draw(x-4-(minirooms[room].w*2), y-5-(minirooms[room].w),4,5,0,64); - if (minirooms[room].exits[YN] != 255) draw::draw(x+(minirooms[room].h*2), y-5-(minirooms[room].h),4,5,3,64); - if (minirooms[room].exits[XP] != 255) draw::draw(x+(minirooms[room].w*2), y-3+(minirooms[room].w),4,5,0,64); - if (minirooms[room].exits[YP] != 255) draw::draw(x-4-(minirooms[room].h*2), y-3+(minirooms[room].h),4,5,3,64); - - char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10); - draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK); - } - if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12); - if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12); - if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12); - if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12); - } bool loop() { - for (int i=0;i<64;++i) drawn[i]=false; - if (input::keyPressed(SDL_SCANCODE_ESCAPE) || input::keyPressed(SDL_SCANCODE_TAB)) return false; - draw::cls(2); - draw::setSource(surf); - draw::stencil::enable(); draw::stencil::clear(255); + for (int i=0;i<64;++i) drawn[i]=false; drawRoom(room::getCurrent(), scroll.x, scroll.y); draw::render(); From 87d7b4ce4674b80d855f6338cc639a74a3ce4929 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Tue, 17 Sep 2024 13:54:32 +0200 Subject: [PATCH 2/2] =?UTF-8?q?-=20El=20minimapa=20es=20pinta=20millor=20-?= =?UTF-8?q?=20M=C3=A9s=20gr=C3=A0fics=20de=20caixes=20i=20pareds=20-=20M?= =?UTF-8?q?=C3=A9s=20habitacions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/caixes.gif | Bin 4283 -> 4551 bytes data/rooms/08.txt | 142 ++++++++++++------------ data/rooms/09.txt | 39 +++++++ data/rooms/10.txt | 11 ++ data/rooms/11.txt | 9 ++ data/rooms/12.txt | 13 +++ data/rooms/13.txt | 232 ++++++++++++++++++++++++++++++++++++++++ data/rooms/14.txt | 11 ++ data/rooms/15.txt | 13 +++ data/rooms/16.txt | 9 ++ data/rooms/17.txt | 9 ++ data/rooms/18.txt | 8 ++ data/walls.gif | Bin 1886 -> 1905 bytes source/m_editor_map.cpp | 36 +++---- 14 files changed, 442 insertions(+), 90 deletions(-) create mode 100644 data/rooms/09.txt create mode 100644 data/rooms/10.txt create mode 100644 data/rooms/11.txt create mode 100644 data/rooms/12.txt create mode 100644 data/rooms/13.txt create mode 100644 data/rooms/14.txt create mode 100644 data/rooms/15.txt create mode 100644 data/rooms/16.txt create mode 100644 data/rooms/17.txt create mode 100644 data/rooms/18.txt diff --git a/data/caixes.gif b/data/caixes.gif index 200413a8f1c392efcf9519200f85e0991fa4ac6f..c3c3084b7ab8e17fab8742a69ef1035b400fb49f 100644 GIT binary patch delta 1276 zcmV6&vloCbEA1rr*}3C;Fv5%38h{YfbrJ9cm{McPiB-U&dK)-1cZ@Dxy)! zW%bsYbpTuyMl4#IUV1i9d zp|sYi^r>her)pygY)(3=N=j^`3S$5ChN7k#TDj&%$yrr@RFTmZtL)*SI6!k~T5}Ee zpFLKlTK1*s*{j|btd;2uE=V56S6M$QPRE6F-@%`z_NSz}bmggVbLy&CMy;yKt#lTg z#%E*kxjKJBlAPu$8{{Exb(UpxMrY{RuJrY;N*Awa%5XgYBgX@Pc|Ye4T* z1)=MnqidCw;;-nH6>fvIBr}58a}{zsxn2QsDcZV!lP335xpVV5K+{hwAy;t=D0Zu} z4(e^aD~fa*ib!Zxs5>OomJ01SBiGA#8bg1l=E=DIginskxrbYUO!i`XRFo*>w!kaD zVP|SCE4h&hx2;9Lr^ttC_gMe%OKs`fPmYpto4cpdd#0+oxa2yzfY`sG(T0BXwQ9)~ zK{N*9A+HInvD{{LGI_mv)4xsx6Yha0rxbQ1k#N=OFZ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g=c c(^P?lXu*9qLm8{V8=OlX+?Nmw03iSXJLeSa;s5{u diff --git a/data/rooms/08.txt b/data/rooms/08.txt index d29918c..a62982f 100644 --- a/data/rooms/08.txt +++ b/data/rooms/08.txt @@ -1,73 +1,15 @@ width: 0 height: 3 +door-height-yp: 0 door-height-yn: 5 color: CYAN floor-texture: 6 wall-texture: 0 door-texture: 0 under-door-texture: 0 +exit-yp: 9 exit-yn: 7 -actor{ - name: BOX - bmp: caixes.gif - bmp-rect: 64 64 32 32 - bmp-offset: 0 32 - pos: 32 0 0 - size: 8 8 8 - movement: CW -} - -actor{ - name: BOX03 - bmp: caixes.gif - bmp-rect: 64 64 32 32 - bmp-offset: 0 32 - pos: 32 8 0 - size: 8 8 8 - movement: CW -} - -actor{ - name: BOX07 - bmp: caixes.gif - bmp-rect: 64 64 32 32 - bmp-offset: 0 32 - pos: 24 16 0 - size: 8 8 8 - movement: CW -} - -actor{ - name: BOX04 - bmp: caixes.gif - bmp-rect: 64 64 32 32 - bmp-offset: 0 32 - pos: 32 16 0 - size: 8 8 8 - movement: CW -} - -actor{ - name: BOX09 - bmp: caixes.gif - bmp-rect: 128 128 32 32 - bmp-offset: 0 32 - pos: 24 24 0 - size: 8 8 4 - movement: CW -} - -actor{ - name: BOX08 - bmp: caixes.gif - bmp-rect: 128 128 32 32 - bmp-offset: 0 32 - pos: 32 24 0 - size: 8 8 4 - movement: CW -} - actor{ name: BOX01 bmp: caixes.gif @@ -78,16 +20,6 @@ actor{ movement: CW } -actor{ - name: BOX02 - bmp: caixes.gif - bmp-rect: 64 64 32 32 - bmp-offset: 0 32 - pos: 32 0 8 - size: 8 8 8 - movement: CW -} - actor{ name: BOX06 bmp: caixes.gif @@ -98,6 +30,36 @@ actor{ movement: CW } +actor{ + name: BOX + bmp: caixes.gif + bmp-rect: 64 64 32 32 + bmp-offset: 0 32 + pos: 32 0 0 + size: 8 8 8 + movement: CW +} + +actor{ + name: BOX02 + bmp: caixes.gif + bmp-rect: 64 64 32 32 + bmp-offset: 0 32 + pos: 32 0 8 + size: 8 8 8 + movement: CW +} + +actor{ + name: BOX03 + bmp: caixes.gif + bmp-rect: 64 64 32 32 + bmp-offset: 0 32 + pos: 32 8 0 + size: 8 8 8 + movement: CW +} + actor{ name: BOX05 bmp: caixes.gif @@ -107,3 +69,43 @@ actor{ size: 8 8 4 movement: CW } + +actor{ + name: BOX07 + bmp: caixes.gif + bmp-rect: 64 64 32 32 + bmp-offset: 0 32 + pos: 24 16 0 + size: 8 8 8 + movement: CW +} + +actor{ + name: BOX09 + bmp: caixes.gif + bmp-rect: 128 128 32 32 + bmp-offset: 0 32 + pos: 24 24 0 + size: 8 8 4 + movement: CW +} + +actor{ + name: BOX04 + bmp: caixes.gif + bmp-rect: 64 64 32 32 + bmp-offset: 0 32 + pos: 32 16 0 + size: 8 8 8 + movement: CW +} + +actor{ + name: BOX08 + bmp: caixes.gif + bmp-rect: 128 128 32 32 + bmp-offset: 0 32 + pos: 32 24 0 + size: 8 8 4 + movement: CW +} diff --git a/data/rooms/09.txt b/data/rooms/09.txt new file mode 100644 index 0000000..0eb59dc --- /dev/null +++ b/data/rooms/09.txt @@ -0,0 +1,39 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-xn: 0 +door-height-yp: 0 +door-height-yn: 0 +color: WHITE +floor-texture: 0 +wall-texture: 7 +door-texture: 2 +under-door-texture: 0 +exit-xp: 12 +exit-xn: 10 +exit-yp: 17 +exit-yn: 8 + +actor{ + name: NEVERA1 + bmp: caixes.gif + bmp-rect: 0 96 32 32 + bmp-offset: 2 33 + pos: 8 8 0 + size: 8 8 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: NEVERA2 + bmp: caixes.gif + bmp-rect: 32 96 32 32 + bmp-offset: 2 33 + pos: 8 8 8 + size: 8 8 8 + orient: YP + flags: ORIENTABLE + movement: CW +} diff --git a/data/rooms/10.txt b/data/rooms/10.txt new file mode 100644 index 0000000..cb33220 --- /dev/null +++ b/data/rooms/10.txt @@ -0,0 +1,11 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-yn: 0 +color: PURPLE +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xp: 9 +exit-yn: 11 diff --git a/data/rooms/11.txt b/data/rooms/11.txt new file mode 100644 index 0000000..dc20fee --- /dev/null +++ b/data/rooms/11.txt @@ -0,0 +1,9 @@ +width: 2 +height: 2 +door-height-yp: 0 +color: YELLOW +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yp: 10 diff --git a/data/rooms/12.txt b/data/rooms/12.txt new file mode 100644 index 0000000..891a54d --- /dev/null +++ b/data/rooms/12.txt @@ -0,0 +1,13 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-xn: 0 +door-height-yn: 0 +color: GREEN +floor-texture: 3 +wall-texture: 3 +door-texture: 1 +under-door-texture: 3 +exit-xp: 13 +exit-xn: 9 +exit-yn: 15 diff --git a/data/rooms/13.txt b/data/rooms/13.txt new file mode 100644 index 0000000..d0d9d71 --- /dev/null +++ b/data/rooms/13.txt @@ -0,0 +1,232 @@ +width: 2 +height: 2 +door-height-xn: 1 +door-height-yn: 1 +color: CYAN +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xn: 12 +exit-yn: 14 +exit-zn: 18 + +actor{ + name: LIFT18 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT17 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 16 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT19 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 16 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT31 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 16 16 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT20 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 24 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT32 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 24 16 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT21 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 32 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT33 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 32 16 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT22 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 40 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT34 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 40 16 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT23 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 48 8 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT35 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 48 16 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT16 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 24 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT30 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 16 24 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT13 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 32 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT29 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 16 32 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT14 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 40 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT28 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 16 40 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: LIFT15 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 8 48 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: LIFT27 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 16 48 0 + size: 8 8 8 + orient: ZP + movement: Z +} diff --git a/data/rooms/14.txt b/data/rooms/14.txt new file mode 100644 index 0000000..58ae2d4 --- /dev/null +++ b/data/rooms/14.txt @@ -0,0 +1,11 @@ +width: 2 +height: 2 +door-height-xn: 0 +door-height-yp: 0 +color: WHITE +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xn: 15 +exit-yp: 13 diff --git a/data/rooms/15.txt b/data/rooms/15.txt new file mode 100644 index 0000000..b3f83f0 --- /dev/null +++ b/data/rooms/15.txt @@ -0,0 +1,13 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-yp: 0 +door-height-yn: 0 +color: YELLOW +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xp: 14 +exit-yp: 12 +exit-yn: 16 diff --git a/data/rooms/16.txt b/data/rooms/16.txt new file mode 100644 index 0000000..1763138 --- /dev/null +++ b/data/rooms/16.txt @@ -0,0 +1,9 @@ +width: 2 +height: 2 +door-height-yp: 0 +color: PURPLE +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yp: 15 diff --git a/data/rooms/17.txt b/data/rooms/17.txt new file mode 100644 index 0000000..d9b5389 --- /dev/null +++ b/data/rooms/17.txt @@ -0,0 +1,9 @@ +width: 2 +height: 2 +door-height-yn: 0 +color: CYAN +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yn: 9 diff --git a/data/rooms/18.txt b/data/rooms/18.txt new file mode 100644 index 0000000..ec60e56 --- /dev/null +++ b/data/rooms/18.txt @@ -0,0 +1,8 @@ +width: 2 +height: 2 +color: CYAN +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-zp: 13 diff --git a/data/walls.gif b/data/walls.gif index 08be7a541921980fa5f3585e5c86289d5c29d303..cb549606b656fc3a51483242900879d253518a01 100644 GIT binary patch delta 1843 zcmV-32h8~14)G3d|KrA8;|fY+_W%R3bS5Ff zd#BP`xq22a3V+MkFwZ}gGMhBCxZ|a{We7{QJ4i0#LzX&g0p!KBkf@vzX?7x{r=!fB z8;ikQhRz+yQ2C5T8!OhI)Rj<0(d4!3X3w;NvX)Ew6BW7=C+CEXJJu!Jhf8a|JqkCj z$c|W{-i#PnYu%yiKypp_6ernME!V~@O!u(cxtu#q^nclQXUe;+PGAMuq0V0zuX zGayz@6@RDSS@cZ>oo=nYB~MSi6`~Mw3JeCBg8zKS(}qkXmmgf3g;$Dy|Ivq7Kgt0` zP7m@O#hq(q@yOv^fvuQUi|3j5(SOrfSYAc@aG~9kxm~7Vl=YowQaD4J-6>@yRMv;pqB6ZQBM;-~0r->CPBR|7QQk`MI7_vAwvSqFUN! zQ&kaSY21m8GHDk!k)~2%ajdqK;hKrEW~)F_^u-@5$B_Xm=PFwOOlw;v!){t>VMZILAU2cC59gEXJ8AKp}?O?C!ZL7j^H%X#Q-W(Qhn#xbBWOGc|oGxkr;T?#@W}{NPXU z5Z#}?M*oF!StX!UJ7vHP7+}kv4u71(3t3nQfA%xgHuhmZ`YEYN#j(+J1|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yX96_U5I;&G}TV|K!=GTzuGcV5X3H#t|Z`JPI1w zcz+KyDHLqs*_7O^o&}4|VpJ_UD2P+S*J+UQz1A19az^Oqaym7K;ZQfC+fIGo^@in| z*hZ?KtHu@@RDQ!AtZzuf?)%xhjxP6Ro|G|sSu`6)8SjqU7K@2f$bzKYyt4@mZCB&e z+a9|P{q|OH+imM@rLDfIZdJMMhrvk#o`0){&ljtlqoqK#88d#qYPitL%_^2{%86l2 zV;*UhcJF<@!8eo5Fja;szfbEN7)l9e%4lUD*FbdJMg!W|YaC12TFAy)Ir5HreH?X$ zZY67CvQSzr)}bSwI1SKiEBhgO&?>IqL5%YWXPf_{X3Qq$y)F%8Qo?-bx7c-CiGSmg zjQNtB2W+q0xpF?Pqs!Mb*9M|%nA)$>^4@Te9;moLt_{x(F!?+@P&9BBOA%!6WSobihB&CAO}gvLbB0~rAmPz7s<#*G9w*6 z@K+HXNy$n!GCo~gOcE{0$xaRuMoMJa8(HDWQkwDuRv|^+VAzRMy7HB2lov3PRu&Jo z5|+4prD7aGA@YSu8@UXoCx0(BGW7Ioc*0DkBae3=6wys;(@>@~4au#Q;Vp70nWi=c z*}7br3wOxerZ}x&wv}aTKj9pwI_pqQhKMek>x^d;b#@$UO|ByH%x6iMNl&PGj2HS0 zXcPu#PRt;TK5!IhJPoHeW?BcJ3XQ1#yea>_R1T zf>fXuHP57CqLh;gbfvAsj0VNx(tz#~FlS2}Li<=#WfJo{##El&yx3E9^7CM?B2hYv zYSeX+`--Q_KbvrVgWJRaNEL%zh82w%ZwpHd$I&{xoNRbCc=>+ge=~?h6y`n*dRD zq1t}dqT-6&1X=6bTw2r*;9Q|TitE$yBPcN=-32) && (x<520) && (y>=-16) && (y<240) ) { draw::color(RED); - if (minirooms[room].exits[XN] != 255) { draw::isoline(x,y,-1,-1,14); draw::isoline(x,y-1,-1,-1,14); draw::isoline(x,y+1,-1,-1,14); } - if (minirooms[room].exits[YN] != 255) { draw::isoline(x,y,+1,-1,14); draw::isoline(x,y-1,+1,-1,14); draw::isoline(x,y+1,+1,-1,14); } - if (minirooms[room].exits[XP] != 255) { draw::isoline(x,y,+1,+1,14); draw::isoline(x,y-1,+1,+1,14); draw::isoline(x,y+1,+1,+1,14); } - if (minirooms[room].exits[YP] != 255) { draw::isoline(x,y,-1,+1,14); draw::isoline(x,y-1,-1,+1,14); draw::isoline(x,y+1,-1,+1,14); } + if (minirooms[room].exits[XN] != 255) { draw::isoline(x,y,-1,-1,14); /*draw::isoline(x,y-1,-1,-1,14);*/ draw::isoline(x,y+1,-1,-1,14); } + if (minirooms[room].exits[YN] != 255) { draw::isoline(x,y,+1,-1,14); /*draw::isoline(x,y-1,+1,-1,14);*/ draw::isoline(x,y+1,+1,-1,14); } + if (minirooms[room].exits[XP] != 255) { draw::isoline(x,y,+1,+1,14); /*draw::isoline(x,y-1,+1,+1,14);*/ draw::isoline(x,y+1,+1,+1,14); } + if (minirooms[room].exits[YP] != 255) { draw::isoline(x,y,-1,+1,14); /*draw::isoline(x,y-1,-1,+1,14);*/ draw::isoline(x,y+1,-1,+1,14); } } if (minirooms[room].exits[XN] != 255) drawLines(minirooms[room].exits[XN], x-24, y-12); if (minirooms[room].exits[XP] != 255) drawLines(minirooms[room].exits[XP], x+24, y+12); @@ -41,29 +41,26 @@ namespace modules if (minirooms[room].exits[YP] != 255) drawLines(minirooms[room].exits[YP], x-24, y+12); } - void drawRoom(const int room, const int x, const int y) + void drawRoom(const int room, const int x, const int y, const bool shadow=false) { if (drawn[room]) return; drawn[room] = true; if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) ) { draw::stencil::set(room); - draw::swapcol(1, minirooms[room].color); + draw::swapcol(1, !shadow ? minirooms[room].color : 2); draw::draw(x-16, y-8, 32, 16, minirooms[room].w*32, minirooms[room].h*16); - //draw::swapcol(1, RED); - //if (minirooms[room].exits[XN] != 255) draw::draw(x-4-(minirooms[room].w*2), y-5-(minirooms[room].w),4,5,0,64); - //if (minirooms[room].exits[YN] != 255) draw::draw(x+(minirooms[room].h*2), y-5-(minirooms[room].h),4,5,3,64); - //if (minirooms[room].exits[XP] != 255) draw::draw(x+(minirooms[room].w*2), y-3+(minirooms[room].w),4,5,0,64); - //if (minirooms[room].exits[YP] != 255) draw::draw(x-4-(minirooms[room].h*2), y-3+(minirooms[room].h),4,5,3,64); - - char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10); - draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK); + if (!shadow) + { + char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10); + draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK); + } } - if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12); - if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12); - if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12); - if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12); + if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12, shadow); + if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12, shadow); + if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12, shadow); + if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12, shadow); } void loadMiniRoom() @@ -103,12 +100,11 @@ namespace modules drawLines(room::getCurrent(), scroll.x, scroll.y); - draw::swapcol(1, RED); for (int y=-1; y<=1; ++y) for (int x=-1; x<=1; ++x) { for (int i=0;i<64;++i) drawn[i]=false; - drawRoom(room::getCurrent(), scroll.x+x, scroll.y+y); + drawRoom(room::getCurrent(), scroll.x+x, scroll.y+y, true); } }