diff --git a/celldrawer.cpp b/celldrawer.cpp index 89fe5638..f3bbb78a 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -140,6 +140,9 @@ void celldrawer::setcolors() { case laAlchemist: fcol = floorcolors[c->land]; break; + case laWet: + fcol = c->wall == waShallow ? 0x40C0C0 : 0x40FF40; break; + #if CAP_COMPLEX2 case laVariant: { int b = getBits(c); @@ -1332,6 +1335,7 @@ void celldrawer::draw_features() { case waFrozenLake: case waLake: case waCamelotMoat: case waSea: case waOpenGate: case waBubble: case waDock: + case waDeepWater: case waShallow: case waSulphur: case waMercury: break; @@ -1984,8 +1988,11 @@ void celldrawer::draw_wall_full() { else if(qfi.fshape == &cgi.shCaveFloor) set_floor(cgi.shCaveSeabed); + int sid = SIDE_LTOB; + if(c->wall == waShallow) sid = SIDE_ASHA; + if(WDIM == 2 && GDIM == 3 && qfi.fshape) - draw_shapevec(c, V, qfi.fshape->levels[SIDE_LTOB], col, PPR::LAKEBOTTOM); + draw_shapevec(c, V, qfi.fshape->levels[sid], col, PPR::LAKEBOTTOM); else draw_qfi(c, mscale(V, cgi.BOTTOM), col, PPR::LAKEBOTTOM); @@ -2096,11 +2103,17 @@ void celldrawer::draw_wall_full() { #if CAP_SHAPES int sha = shallow(c); - if(wmspatial && sha && WDIM == 2) { +#define D(v) darkena(gradient(0, col, 0, v * (sphere ? spherity(V * currentmap->adj(c,i)) : 1), 1), fd, 0xFF) + if(wmspatial && c->wall == waShallow && WDIM == 2) { + color_t col = (highwall(c) || c->wall == waTower) ? wcol : fcol; + forCellIdEx(c2, i, c) if(chasmgraph(c2) && c2->wall != waShallow) + if(placeSidewall(c, i, SIDE_BSHA, V, D(.6))) break; + } + + else if(wmspatial && sha && WDIM == 2) { color_t col = (highwall(c) || c->wall == waTower) ? wcol : fcol; if(!chasmg) { -#define D(v) darkena(gradient(0, col, 0, v * (sphere ? spherity(V * currentmap->adj(c,i)) : 1), 1), fd, 0xFF) // #define D(v) darkena(col, fd, 0xFF) if(sha & 1) { @@ -2108,8 +2121,11 @@ void celldrawer::draw_wall_full() { if(placeSidewall(c, i, SIDE_LAKE, V, D(.8))) break; } if(sha & 2) { - forCellIdEx(c2, i, c) if(chasmgraph(c2)) - if(placeSidewall(c, i, SIDE_LTOB, V, D(.7))) break; + forCellIdEx(c2, i, c) { + if(chasmgraph(c2)) { + if(placeSidewall(c, i, c2->wall == waShallow ? SIDE_ASHA : SIDE_LTOB, V, D(.7))) break; + } + } } if(sha & 4) { bool dbot = true; diff --git a/drawing.cpp b/drawing.cpp index 64e08660..126fbd8a 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -1803,7 +1803,7 @@ EX void reverse_priority(PPR p) { EX void reverse_side_priorities() { for(PPR p: {PPR::REDWALLs, PPR::REDWALLs2, PPR::REDWALLs3, PPR::WALL3s, - PPR::LAKEWALL, PPR::INLAKEWALL, PPR::BELOWBOTTOM}) + PPR::LAKEWALL, PPR::INLAKEWALL, PPR::BELOWBOTTOM, PPR::BSHALLOW, PPR::ASHALLOW}) reverse_priority(p); } diff --git a/environment.cpp b/environment.cpp index 981e429b..80ce5405 100644 --- a/environment.cpp +++ b/environment.cpp @@ -630,7 +630,7 @@ EX void moverefresh(bool turn IS(true)) { fallMonster(c, AF_FALL); } } - else if(!isWateryOrBoat(c)) { + else if(!isWateryOrBoat(c) && c->wall != waShallow) { if(c->monst == moGreaterShark) c->monst = moGreaterM; else if(c->monst == moShark || c->monst == moCShark) { diff --git a/flags.cpp b/flags.cpp index 9ea12825..8cb73042 100644 --- a/flags.cpp +++ b/flags.cpp @@ -333,6 +333,7 @@ EX int chasmgraph(cell *c) { if(c->wall == waChasm || c->wall == waInvisibleFloor) return 2; if(isChasmy(c)) return 1; if(isWateryOrBoat(c)) return 1; + if(c->wall == waShallow) return 1; if(wmescher && c->wall == waBarrier && c->land == laOceanWall) return 1; if(c->wall == waReptileBridge) return 1; return 0; diff --git a/geometry.cpp b/geometry.cpp index 40c9a755..9b57f135 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -46,7 +46,9 @@ struct hpcshape { #define SIDE_SKY 8 #define SIDE_HIGH 9 #define SIDE_HIGH2 10 -#define SIDEPARS 11 +#define SIDE_ASHA 11 +#define SIDE_BSHA 12 +#define SIDEPARS 13 #define BADMODEL 0 @@ -140,7 +142,8 @@ struct geometry_information { LEG0, LEG1, LEG, LEG3, GROIN, GROIN1, GHOST, BODY, BODY1, BODY2, BODY3, NECK1, NECK, NECK3, HEAD, HEAD1, HEAD2, HEAD3, - ALEG0, ALEG, ABODY, AHEAD, BIRD, LOWSKY, SKY, HIGH, HIGH2; + ALEG0, ALEG, ABODY, AHEAD, BIRD, LOWSKY, SKY, HIGH, HIGH2, + SHALLOW; ld human_height, slev; ld eyelevel_familiar, eyelevel_human, eyelevel_dog; @@ -767,6 +770,7 @@ EX namespace geom3 { for(int s=0; s<=3; s++) SLEV[s] = lev_to_factor(vid.rock_wall_ratio * wh * s/3); LAKE = lev_to_factor(-vid.lake_top); + SHALLOW = lev_to_factor(-.4); HELLSPIKE = lev_to_factor(-(vid.lake_top+vid.lake_bottom)/2); BOTTOM = lev_to_factor(-vid.lake_bottom); LOWSKY = lev_to_factor(2 * wh); diff --git a/graph.cpp b/graph.cpp index 9d10108f..4b2ac15e 100644 --- a/graph.cpp +++ b/graph.cpp @@ -3245,6 +3245,8 @@ EX bool placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, color_t else if(sidepar == SIDE_LAKE) prio = PPR::LAKEWALL; else if(sidepar == SIDE_LTOB) prio = PPR::INLAKEWALL; else if(sidepar == SIDE_BTOI) prio = PPR::BELOWBOTTOM; + else if(sidepar == SIDE_ASHA) prio = PPR::ASHALLOW; + else if(sidepar == SIDE_BSHA) prio = PPR::BSHALLOW; else prio = PPR::REDWALL-2+4*(sidepar-SIDE_SLEV); dynamicval ncor(approx_nearcorner, true); diff --git a/hyper.h b/hyper.h index 15ae5dc0..39a5137d 100644 --- a/hyper.h +++ b/hyper.h @@ -546,6 +546,7 @@ enum class PPR { LAKEBOTTOM, HELLSPIKE, INLAKEWALLm, INLAKEWALL, INLAKEWALLp, INLAKEWALL_FALLANIM, + BSHALLOW, SHALLOW, ASHALLOW, SUBLAKELEV, LAKELEV, BOATLEV, BOATLEV2, BOATLEV3, LAKEWALLm, LAKEWALL, LAKEWALLp, LAKEWALL_FALLANIM, diff --git a/passable.cpp b/passable.cpp index 7b0f5162..0a81b123 100644 --- a/passable.cpp +++ b/passable.cpp @@ -386,7 +386,7 @@ bool sharkpassable(cell *w, cell *c) { if(w == c || !c) return true; if(nonAdjacent(w,c)) return false; if(isPlayerOn(w)) return true; - if(!isWatery(w)) return false; + if(!isWatery(w) && w->wall != waShallow) return false; if(sword::at(w, 0)) return false; // don't go against the current diff --git a/polygons.cpp b/polygons.cpp index fa350851..23969ae6 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -307,6 +307,7 @@ void geometry_information::make_sidewalls() { dfloor_table[SIDE_HIGH] = HIGH; dfloor_table[SIDE_HIGH2] = HIGH2; dfloor_table[SIDE_SKY ] = SKY; + dfloor_table[SIDE_ASHA] = SHALLOW; // sidewall parameters for the 3D mode for(int k=0; k