From 48dd34baaf1be8ed7f1de9ad8950c990116399bc Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 9 Jul 2025 09:34:22 +0200 Subject: [PATCH] better graphical design of Crossroads VII --- bigstuff.cpp | 2 +- celldrawer.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-- content.cpp | 6 ++--- geometry.cpp | 4 +-- polygons.cpp | 1 + 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/bigstuff.cpp b/bigstuff.cpp index 71df35fb..0b01984e 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -1847,7 +1847,7 @@ EX void build_walls(cell *c, cell *from) { return; } - else if(good_for_wall(c) && ls::any_wall() && isThematic(c->land) && hrand(10000) < 1000 && !c->master->alt && !racing::on && + else if(good_for_wall(c) && ls::any_wall() && isThematic(c->land) && hrand(10000) < 1500 && !c->master->alt && !racing::on && buildBarrierNowall(c, getNewThematic(c->land))) ; else if(good_for_wall(c) && ls::any_wall() && c->land == laCrossroads4 && hrand(10000) < 7000 && c->land && !c->master->alt && !tactic::on && !racing::on && diff --git a/celldrawer.cpp b/celldrawer.cpp index d6b73e25..a3bd46ac 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -97,6 +97,11 @@ EX colortable endorian_colors = { 0x202010, 0x404030, 0x0000D0 }; EX colortable canopy_colors = { 0x60C060, 0x489048 }; EX colortable camelot_cheat_colors = { 0x606060, 0xC0C0C0 }; +bool thembound(cell *c) { + forCellEx(c1, c) if(c1->land != c->land && c1->land != laBarrier) return true; + return false; + } + /** return the special colortable for the given cell -- color menu uses this to know that a colortable should be edited */ EX colortable* special_colortable_for(cell *c) { if(c->land == laPrairie && prairie::isriver(c)) return &prairie_colors; @@ -190,8 +195,10 @@ void celldrawer::setcolors() { case laMotion: case laGraveyard: case laWineyard: case laLivefjord: case laRlyeh: case laHell: case laCrossroads: case laJungle: case laAlchemist: case laFrog: case laCursed: case laDice: - case laThematic: case laThematicNature: case laThematicUrban: case laThematicDeath: case laThematicAbstract: case laThematicWater: case laThematicEarth: fcol = floorcolors[c->land]; break; + + case laThematic: case laThematicNature: case laThematicUrban: case laThematicDeath: case laThematicAbstract: case laThematicWater: case laThematicEarth: case laThematicHeat: + fcol = floorcolors[laThematic]; break; case laCA: fcol = floorcolors[c->land]; @@ -444,7 +451,7 @@ void celldrawer::setcolors() { break; } - case laIce: case laCocytus: case laBlizzard: case laEclectic: case laThematicHeat: + case laIce: case laCocytus: case laBlizzard: case laEclectic: if(useHeatColoring(c)) { float h = HEAT(c); eLand l = c->land; @@ -1234,6 +1241,61 @@ void celldrawer::set_land_floor(const shiftmatrix& Vf) { queuepoly(Vf * ddspin(c, i, M_PI/S7) * xpush(cgi.rhexf), cgi.shSwitchDisk, darkena(minf[active_switch()].color, fd, 0xFF)); break; + case laThematicNature: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shTreeIcon, darkena(linf[laThematicNature].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicUrban: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shHumanoid, darkena(linf[laThematicUrban].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicEarth: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shLightningBolt, darkena(linf[laThematicEarth].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicWater: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shSmallPike, darkena(linf[laThematicWater].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicAbstract: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shDodeca, darkena(linf[laThematicAbstract].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicDeath: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + queuepolyat(Vf, cgi.shMiniGhost, darkena(linf[laThematicDeath].color, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + + case laThematicHeat: + if(c->wall == waNone) { + dynamicval p(poly_outline, OUTLINE_TRANS); + float h = HEAT(c); + color_t col; + if(h < -1) col = 0xFF; + else if(h < 0) col = gradient(0xFFFFFF, 0xFF, 0, h, -1); + else if(h < 1) col = gradient(0xFFFFFF, 0xFFFF00, 0, h, 1); + else col = 0xFFFF00; + queuepolyat(Vf, cgi.shGem[0], darkena(col, 0, thembound(c) ? 0xFF : 0x10), PPR::FLOOR_DRAGON); + } + break; + case laStorms: set_floor(cgi.shChargedFloor); break; diff --git a/content.cpp b/content.cpp index 5ec05ef6..1c1e6afd 100644 --- a/content.cpp +++ b/content.cpp @@ -1754,10 +1754,10 @@ LAND( 0x7030A0, "Crossroads VI", laCrossroads6, ZERO, itHyperstone, RESERVED, "A NATIVE(0) REQ(ITEMS(itCursed, 5)) -LAND( 0xC0C0C0, "Crossroads VII", laThematic, ZERO, itHyperstone, RESERVED, thematic_crossroads) +LAND( 0xFF0060, "Crossroads VII", laThematic, ZERO, itHyperstone, RESERVED, thematic_crossroads) NATIVE(0) REQ(GOLD(R400)) -LAND( 0x60C060, "Crossroads VII (Nature)", laThematicNature, ZERO, itHyperstone, RESERVED, thematic_crossroads) +LAND( 0x308030, "Crossroads VII (Nature)", laThematicNature, ZERO, itHyperstone, RESERVED, thematic_crossroads) NATIVE(0) REQ(GOLD(R400)) LAND( 0x60C0C0, "Crossroads VII (Urban)", laThematicUrban, ZERO, itHyperstone, RESERVED, thematic_crossroads) @@ -1775,7 +1775,7 @@ LAND( 0x6060C0, "Crossroads VII (Water)", laThematicWater, ZERO, itHyperstone, R LAND( 0x1030F0, "Crossroads VII (Fire/Ice)", laThematicHeat, LF_ICY, itHyperstone, RESERVED, thematic_crossroads) NATIVE(0) REQ(GOLD(R400)) -LAND( 0x505050, "Crossroads VII (Earth/Air)", laThematicEarth, ZERO, itHyperstone, RESERVED, thematic_crossroads) +LAND( 0xFFFF00, "Crossroads VII (Earth/Air)", laThematicEarth, ZERO, itHyperstone, RESERVED, thematic_crossroads) NATIVE(0) REQ(GOLD(R400)) LAND( 0xC0B090, "Master Crossroads", laMasterCrossroads, ZERO, itHyperstone, RESERVED, "A crossroads that connects only to other crossroads.") diff --git a/geometry.cpp b/geometry.cpp index fa632b72..6827b7bc 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -384,9 +384,9 @@ hpcshape hpcshape shSpaceship, shMissile, shSpaceshipBase, shSpaceshipCockpit, shSpaceshipGun, shSpaceshipEngine; - hpcshape shChristmasLight; + hpcshape shChristmasLight, shSmallPike; - hpcshape shReserved[9]; + hpcshape shReserved[8]; int orb_inner_ring; //< for shDisk* shapes, the number of vertices in the inner ring int res1, res2; diff --git a/polygons.cpp b/polygons.cpp index 474a532f..cb064267 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -1633,6 +1633,7 @@ void geometry_information::prepare_shapes() { bshape(shPikeBody, PPR::MONSTER_BODY, scalefactor, 402); bshape(shPikeEye, PPR::MONSTER_BODY, scalefactor, 403); + bshape(shSmallPike, PPR::MONSTER_BODY, scalefactor * 0.5, 402); // missiles bshape(shKnife, PPR::MISSILE, scalefactor, 87);