diff --git a/celldrawer.cpp b/celldrawer.cpp index af840202..388010bf 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -494,6 +494,10 @@ void celldrawer::setcolors() { fcol = wcol; break; + case waCrateCrate: case waCrateTarget: case waCrateOnTarget: + fcol = c->landparam; + break; + case waDeadTroll2: case waPetrifiedBridge: case waPetrified: { eMonster m = eMonster((unsigned char)c->wparam); if(c->wall == waPetrified || c->wall == waPetrifiedBridge) @@ -1413,6 +1417,27 @@ void celldrawer::draw_features() { break; } + case waCrateCrate: case waCrateTarget: case waCrateOnTarget: { + shiftmatrix V2 = V; + if(c->wall != waCrateCrate) { + draw_floorshape(c, V2, cgi.shMFloor, darkena(winf[waCrateTarget].color, 0, 0xFF)); + draw_floorshape(c, V2, cgi.shMFloor2, c->wall == waCrateOnTarget ? darkena(0xFFFF00, 0, 0xFF) : (!wmblack) ? darkena(fcol, 1, 0xFF) : darkena(0,1,0xFF)); + } + if(c->wall != waCrateTarget) { + if(wmspatial) { + const int layers = 2 << detaillevel; + for(int z=1; z<=layers; z++) { + double zg = zgrad0(0, geom3::actual_wall_height(), z, layers); + queuepolyat(xyzscale(V, zg, zg), cgi.shBarrel, darkena((z&1) ? 0xFF0000 : 0xC00000, 0, 0xFF), PPR(PPR::REDWALLm+z)); + } + } + else { + queuepolyat(V, cgi.shBarrel, darkena(0xC00000, 0, 0xFF), PPR(PPR::REDWALLm)); + } + } + break; + } + case waFrozenLake: case waLake: case waCamelotMoat: case waSea: case waOpenGate: case waBubble: case waDock: case waDeepWater: case waShallow: diff --git a/content.cpp b/content.cpp index 12320982..6492cd8d 100644 --- a/content.cpp +++ b/content.cpp @@ -1633,6 +1633,18 @@ ITEM( 'o', 0x808080, "Orb of Chaos", itOrbChaos, IC_ORB, ZERO, RESERVED, osUtili REQ(ITEMS_TOTAL(LST, variant_unlock_value()*4/3)) #undef LST +WALL( '$', 0xFD692F, "Crate", waCrateCrate, WF_WALL | WF_PUSHABLE, RESERVED, 0, sgNone, + "These crates can be pushed." + ) + +WALL( '.', 0x40FD40, "Target", waCrateTarget, 0, RESERVED, 0, sgNone, + "Push all your crates on targets." + ) + +WALL( '$', 0x40FD40, "Crate on Target", waCrateOnTarget, WF_WALL | WF_PUSHABLE, RESERVED, 0, sgNone, + "A crate already on a target." + ) + //shmupspecials MONSTER( '@', 0xC0C0C0, "Rogue", moPlayer, CF_FACE_UP | CF_PLAYER, RESERVED, moNone, "In the Shoot'em Up mode, you are armed with thrown Knives.") MONSTER( '*', 0xC0C0C0, "Knife", moBullet, ZERO | CF_BULLET, RESERVED, moNone, "A simple, but effective, missile, used by rogues.") diff --git a/game.cpp b/game.cpp index 0b53a018..d6572a75 100644 --- a/game.cpp +++ b/game.cpp @@ -361,7 +361,19 @@ EX void pushThumper(const movei& mi) { cto->wall = waNone; playSound(cto, "splash"+pick12()); } - else + else if(w == waCrateCrate && cto->wall == waCrateTarget) { + cto->wall = waCrateOnTarget; + th->wall = waNone; + } + else if(w == waCrateOnTarget && cto->wall == waNone) { + cto->wall = waCrateCrate; + th->wall = waCrateTarget; + } + else if(w == waCrateOnTarget && cto->wall == waCrateTarget) { + cto->wall = waCrateOnTarget; + th->wall = waCrateTarget; + } + else cto->wall = w; if(explode) cto->wall = waFireTrap, cto->wparam = explode; if(cto->wall == waThumperOn)