From 1af2c04407b1bab07d2d2520b24d2bed5cd15baf Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 28 Aug 2018 14:27:23 +0200 Subject: [PATCH] enum class used for PPR --- blizzard.cpp | 4 +- conformal.cpp | 6 +- floorshapes.cpp | 26 +- graph.cpp | 267 ++++++++++--------- hud.cpp | 2 +- hyper.h | 114 +++++---- hypgraph.cpp | 6 +- mapeditor.cpp | 8 +- polygons.cpp | 662 ++++++++++++++++++++++++------------------------ rogueviz.cpp | 22 +- shmup.cpp | 2 +- textures.cpp | 6 +- 12 files changed, 565 insertions(+), 560 deletions(-) diff --git a/blizzard.cpp b/blizzard.cpp index c58e9b4e..fd19f628 100644 --- a/blizzard.cpp +++ b/blizzard.cpp @@ -213,9 +213,9 @@ void drawArrowTraps() { transmatrix& t0 = gmatrix.at(r[0]); transmatrix& t1 = gmatrix.at(r[4]); - queueline(tC0(t0), tC0(t1), 0xFF0000FF, 4 + vid.linequality, PPR_ITEM); + queueline(tC0(t0), tC0(t1), 0xFF0000FF, 4 + vid.linequality, PPR::ITEM); if((c->wparam & 7) == 3 && !shmup::on) { -// queueline(t0 * randomPointIn(r[0]->type), t1 * randomPointIn(r[1]->type), 0xFFFFFFFF, 4, PPR_ITEM); +// queueline(t0 * randomPointIn(r[0]->type), t1 * randomPointIn(r[1]->type), 0xFFFFFFFF, 4, PPR::ITEM); int tt = ticks % 401; if(tt < 0) tt += 401; diff --git a/conformal.cpp b/conformal.cpp index 01996eef..1967d026 100644 --- a/conformal.cpp +++ b/conformal.cpp @@ -95,7 +95,7 @@ namespace polygonal { pair compute(ld x, ld y) { return compute(x,y,deg); } void drawBoundary(int color) { - queuereset(mdDisk, PPR_CIRCLE); + queuereset(mdDisk, PPR::CIRCLE); for(int r=0; r<=2000; r++) { cld z = exp(cld(0, 2*M_PI * r / 2000.0)); @@ -107,8 +107,8 @@ namespace polygonal { curvepoint(h); } - queuecurve(color, 0, PPR_CIRCLE); - queuereset(pmodel, PPR_CIRCLE); + queuecurve(color, 0, PPR::CIRCLE); + queuereset(pmodel, PPR::CIRCLE); } } diff --git a/floorshapes.cpp b/floorshapes.cpp index 3ba17b1f..1e47bbdc 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -234,17 +234,17 @@ void bshape_regular(floorshape &fsh, int id, int sides, int shift, ld size) { for(int k=0; k &shv, int col, PPR prio = PPR_DEFAULT) { +void draw_shapevec(cell *c, const transmatrix& V, const vector &shv, int col, PPR prio = PPR::DEFAULT) { if(!c) queuepolyat(V, shv[0], col, prio); else if(gp::on) { int id = gp::get_plainshape_id(c); @@ -636,11 +636,11 @@ void draw_shapevec(cell *c, const transmatrix& V, const vector &shv, i queuepolyat(V, shv[ctof(c)], col, prio); } -void draw_floorshape(cell *c, const transmatrix& V, const floorshape &fsh, int col, PPR prio = PPR_DEFAULT) { +void draw_floorshape(cell *c, const transmatrix& V, const floorshape &fsh, int col, PPR prio = PPR::DEFAULT) { draw_shapevec(c, V, fsh.b, col, prio); } -void draw_qfi(cell *c, const transmatrix& V, int col, PPR prio = PPR_DEFAULT, vector floorshape::* tab = &floorshape::b) { +void draw_qfi(cell *c, const transmatrix& V, int col, PPR prio = PPR::DEFAULT, vector floorshape::* tab = &floorshape::b) { if(qfi.shape) queuepolyat(V * qfi.spin, *qfi.shape, col, prio); else if(qfi.usershape >= 0) { @@ -649,7 +649,7 @@ void draw_qfi(cell *c, const transmatrix& V, int col, PPR prio = PPR_DEFAULT, ve else if(!qfi.fshape) ; #if CAP_TEXTURE else if(qfi.tinf) { - queuetable(V * qfi.spin, qfi.tinf->vertices, isize(qfi.tinf->vertices), texture::config.mesh_color, texture::config.recolor(col), prio == PPR_DEFAULT ? PPR_FLOOR : prio); + queuetable(V * qfi.spin, qfi.tinf->vertices, isize(qfi.tinf->vertices), texture::config.mesh_color, texture::config.recolor(col), prio == PPR::DEFAULT ? PPR::FLOOR : prio); lastptd().u.poly.tinf = qfi.tinf; if(true) lastptd().u.poly.flags = POLY_INVERSE; diff --git a/graph.cpp b/graph.cpp index 1421d9c5..43b1d2ef 100644 --- a/graph.cpp +++ b/graph.cpp @@ -141,7 +141,7 @@ void drawShield(const transmatrix& V, eItem it) { int mt = sphere ? 7 : 5; for(ld a=0; a<=S84*mt+1e-6; a+=pow(.5, vid.linequality)) curvepoint(V*xspinpush0(a * M_PI/S42, d + sin(ds + M_PI*2*a/4/mt)*.1)); - queuecurve(darkena(col, 0, 0xFF), 0x8080808, PPR_LINE); + queuecurve(darkena(col, 0, 0xFF), 0x8080808, PPR::LINE); #endif } @@ -152,7 +152,7 @@ void drawSpeed(const transmatrix& V) { for(int b=0; blandparam; i++) queuepolyat(V * spin(2 * M_PI * i / c->landparam) * xpush(.15) * spin(ticks / 1500.), *xsh, darkena(icol, 0, hidden ? 0x40 : (highwall(c) && wmspatial) ? 0x60 : 0xFF), - PPR_HIDDEN); + PPR::HIDDEN); // queuepoly(V*spin(M_PI+(1-2*ang)*2*M_PI/S84), shMagicSword, darkena(0xC00000, 0, 0x80 + 0x70 * sin(ticks / 200.0))); } @@ -692,23 +692,23 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, int icol, int ticks, if(xsh == &shBookCover && mmitem) queuepoly(V2, shBook, 0x805020FF); - PPR pr = PPR_ITEM; + PPR pr = PPR::ITEM; int alpha = hidden ? (it == itKraken ? 0xC0 : 0x40) : 0xF0; - if(c && c->wall == waIcewall) pr = PPR_HIDDEN, alpha = 0x80; + if(c && c->wall == waIcewall) pr = PPR::HIDDEN, alpha = 0x80; queuepolyat(V2, *xsh, darkena(icol, 0, alpha), pr); if(it == itZebra) - queuepolyat(V * spin(ticks / 1500. + M_PI/(ct6+6)), *xsh, darkena(0x202020, 0, hidden ? 0x40 : 0xF0), PPR_ITEMb); + queuepolyat(V * spin(ticks / 1500. + M_PI/(ct6+6)), *xsh, darkena(0x202020, 0, hidden ? 0x40 : 0xF0), PPR::ITEMb); /* if(it == itSwitch) - queuepolyat(V * spin(ticks / 1500. + M_PI/S3), *xsh, darkena(minf[active_switch()].color, 0, hidden ? 0x40 : 0xF0), PPR_ITEMb); */ + queuepolyat(V * spin(ticks / 1500. + M_PI/S3), *xsh, darkena(minf[active_switch()].color, 0, hidden ? 0x40 : 0xF0), PPR::ITEMb); */ } else if(xch == 'o' || it == itInventory) { if(it == itOrbFire) icol = firecolor(100); - PPR prio = PPR_ITEM; + PPR prio = PPR::ITEM; bool inice = c && c->wall == waIcewall; - if(inice) prio = PPR_HIDDEN; + if(inice) prio = PPR::HIDDEN; int icol1 = icol; if(it == itOrbFire) icol = firecolor(200); @@ -723,7 +723,7 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, int icol, int ticks, int col = darkena(icol, 0, int(0x80 + 0x70 * sin(ticks / 300.))); if(it == itOrbFish) - queuepolyat(V * spin(ticks / 1500.), shFishTail, col, PPR_ITEM_BELOW); + queuepolyat(V * spin(ticks / 1500.), shFishTail, col, PPR::ITEM_BELOW); queuepolyat(V, shDisk, darkena(icol1, 0, inice ? 0x80 : hidden ? 0x20 : 0xC0), prio); hpcshape& sh = @@ -1256,7 +1256,7 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, dou queuepoly(VBODY, shRaiderShirt, darkena(col, 2, 0xFF)); if(!peace::on) queuepoly(VBODY, shPKnife, 0xFFC0C0C0); queuepoly(VBODY, shRaiderArmor, darkena(col, 1, 0xFF)); - queuepolyat(VBODY, shRatCape2, darkena(col, 2, 0xFF), PPR_MONSTER_ARMOR0); + queuepolyat(VBODY, shRatCape2, darkena(col, 2, 0xFF), PPR::MONSTER_ARMOR0); queuepoly(VHEAD, shRaiderHelmet, darkena(col, 0, 0XFF)); queuepoly(VHEAD, shPFace, darkena(0xC0C0A0, 0, 0XFF)); } @@ -1438,9 +1438,9 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, dou } else if(isSwitch(m)) { queuepoly(VFISH, shJelly, darkena(col, 0, 0xD0)); - queuepolyat(VBODY, shJelly, darkena(col, 0, 0xD0), PPR_MONSTER_BODY); - queuepolyat(VHEAD, shJelly, darkena(col, 0, 0xD0), PPR_MONSTER_HEAD); - queuepolyat(VHEAD, shEyes, 0xFF, PPR_MONSTER_HEAD); + queuepolyat(VBODY, shJelly, darkena(col, 0, 0xD0), PPR::MONSTER_BODY); + queuepolyat(VHEAD, shJelly, darkena(col, 0, 0xD0), PPR::MONSTER_HEAD); + queuepolyat(VHEAD, shEyes, 0xFF, PPR::MONSTER_HEAD); } else if(m == moKrakenH) { queuepoly(VFISH, shKrakenHead, darkena(col, 0, 0xD0)); @@ -1624,8 +1624,8 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, dou } else if(isMagneticPole(m)) { if(m == moNorthPole) - queuepolyat(VBODY * spin(M_PI), shTentacle, 0x000000C0, PPR_TENTACLE1); - queuepolyat(VBODY, shDisk, darkena(col, 0, 0xFF), PPR_MONSTER_BODY); + queuepolyat(VBODY * spin(M_PI), shTentacle, 0x000000C0, PPR::TENTACLE1); + queuepolyat(VBODY, shDisk, darkena(col, 0, 0xFF), PPR::MONSTER_BODY); } else if(isMetalBeast(m)) { ShadowV(V, shTrylobite); @@ -1670,11 +1670,11 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, dou } else if(m == moWorm || m == moWormwait || m == moHexSnake) { queuepoly(V, shWormHead, darkena(col, 0, 0xFF)); - queuepolyat(V, shEyes, 0xFF, PPR_ONTENTACLE_EYES); + queuepolyat(V, shEyes, 0xFF, PPR::ONTENTACLE_EYES); } else if(m == moDragonHead) { queuepoly(V, shDragonHead, darkena(col, 0, 0xFF)); - queuepolyat(V, shEyes, 0xFF, PPR_ONTENTACLE_EYES); + queuepolyat(V, shEyes, 0xFF, PPR::ONTENTACLE_EYES); int noscolor = 0xFF0000FF; queuepoly(V, shDragonNostril, noscolor); queuepoly(V * Mirror, shDragonNostril, noscolor); @@ -1684,7 +1684,7 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, dou } else if(m == moTentacle || m == moTentaclewait || m == moTentacleEscaping) { queuepoly(V, shTentHead, darkena(col, 0, 0xFF)); - ShadowV(V, shTentHead, PPR_GIANTSHADOW); + ShadowV(V, shTentHead, PPR::GIANTSHADOW); } else return true; @@ -1880,7 +1880,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { if(isIvy(c) || isMutantIvy(c) || c->monst == moFriendlyIvy) queuepoly(Vb, shIBranch, (col << 8) + 0xFF); /* else if(c->monst < moTentacle && wormstyle == 0) { - ShadowV(Vb, shTentacleX, PPR_GIANTSHADOW); + ShadowV(Vb, shTentacleX, PPR::GIANTSHADOW); queuepoly(mmscale(Vb, geom3::ABODY), shTentacleX, 0xFF); queuepoly(mmscale(Vb, geom3::ABODY), shTentacle, (col << 8) + 0xFF); } */ @@ -1891,7 +1891,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { char part = dragon::bodypart(c, dragon::findhead(c)); if(part != '2') { queuepoly(mmscale(Vb, geom3::ABODY), shDragonSegment, darkena(col, 0, 0xFF)); - ShadowV(Vb, shDragonSegment, PPR_GIANTSHADOW); + ShadowV(Vb, shDragonSegment, PPR::GIANTSHADOW); } } else { @@ -1905,7 +1905,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { /* queuepoly(mmscale(Vb, geom3::ABODY), shTentacleX, 0xFFFFFFFF); queuepoly(mmscale(Vb, geom3::ABODY), shTentacle, (col << 8) + 0xFF); - ShadowV(Vb, shTentacleX, PPR_GIANTSHADOW); + ShadowV(Vb, shTentacleX, PPR::GIANTSHADOW); */ bool hexsnake = c->monst == moHexSnake || c->monst == moHexSnakeTail; bool thead = c->monst == moTentacle || c->monst == moTentaclewait || c->monst == moTentacleEscaping; @@ -1924,7 +1924,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { transmatrix Vbx = Vb * spin(sin(M_PI * i / 6.) * wav / (i+.1)) * xpush(length * (i) / 12.0); // transmatrix Vbx2 = Vnext * xpush(length2 * i / 6.0); // Vbx = Vbx * rspintox(inverse(Vbx) * Vbx2 * C0) * pispin; - ShadowV(Vbx, sh, PPR_GIANTSHADOW); + ShadowV(Vbx, sh, PPR::GIANTSHADOW); queuepoly(mmscale(Vbx, geom3::ABODY), sh, (col0 << 8) + 0xFF); } }); @@ -1942,20 +1942,20 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { if(mmmon) { if(isIvy(c) || isMutantIvy(c) || c->monst == moFriendlyIvy) { queuepoly(mmscale(Vb, geom3::ABODY), shILeaf[ctof(c)], darkena(col, 0, 0xFF)); - ShadowV(Vb, shILeaf[ctof(c)], PPR_GIANTSHADOW); + ShadowV(Vb, shILeaf[ctof(c)], PPR::GIANTSHADOW); } else if(m == moWorm || m == moWormwait || m == moHexSnake) { Vb = Vb * pispin; transmatrix Vbh = mmscale(Vb, geom3::AHEAD); queuepoly(Vbh, shWormHead, darkena(col, 0, 0xFF)); - queuepolyat(Vbh, shEyes, 0xFF, PPR_ONTENTACLE_EYES); - ShadowV(Vb, shWormHead, PPR_GIANTSHADOW); + queuepolyat(Vbh, shEyes, 0xFF, PPR::ONTENTACLE_EYES); + ShadowV(Vb, shWormHead, PPR::GIANTSHADOW); } else if(m == moDragonHead) { transmatrix Vbh = mmscale(Vb, geom3::AHEAD); - ShadowV(Vb, shDragonHead, PPR_GIANTSHADOW); + ShadowV(Vb, shDragonHead, PPR::GIANTSHADOW); queuepoly(Vbh, shDragonHead, darkena(col, c->hitpoints?0:1, 0xFF)); - queuepolyat(Vbh/* * pispin */, shEyes, 0xFF, PPR_ONTENTACLE_EYES); + queuepolyat(Vbh/* * pispin */, shEyes, 0xFF, PPR::ONTENTACLE_EYES); int noscolor = (c->hitpoints == 1 && c->stuntime ==1) ? 0xFF0000FF : 0xFF; queuepoly(Vbh, shDragonNostril, noscolor); @@ -1965,7 +1965,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { Vb = Vb * pispin; transmatrix Vbh = mmscale(Vb, geom3::AHEAD); queuepoly(Vbh, shTentHead, darkena(col, 0, 0xFF)); - ShadowV(Vb, shTentHead, PPR_GIANTSHADOW); + ShadowV(Vb, shTentHead, PPR::GIANTSHADOW); } else if(m == moDragonTail) { cell *c2 = NULL; @@ -1985,7 +1985,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { } transmatrix Vbb = mmscale(Vb, geom3::ABODY); queuepoly(Vbb, shDragonTail, darkena(col, c->hitpoints?0:1, 0xFF)); - ShadowV(Vb, shDragonTail, PPR_GIANTSHADOW); + ShadowV(Vb, shDragonTail, PPR::GIANTSHADOW); } else if(true) { if(nospinb) { @@ -2032,7 +2032,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { transmatrix Vbb = mmscale(Vb, geom3::ABODY) * pispin; hpcshape& sh = hexsnake ? shWormTail : shSmallWormTail; queuepoly(Vbb, sh, darkena(col, 0, 0xFF)); - ShadowV(Vb, sh, PPR_GIANTSHADOW); + ShadowV(Vb, sh, PPR::GIANTSHADOW); } } } @@ -3120,12 +3120,12 @@ void floorShadow(cell *c, const transmatrix& V, int col) { return; // shadows break the depth testing dynamicval p(poly_outline, OUTLINE_TRANS); if(qfi.shape) { - queuepolyat(V * qfi.spin * shadowmulmatrix, *qfi.shape, col, PPR_WALLSHADOW); + queuepolyat(V * qfi.spin * shadowmulmatrix, *qfi.shape, col, PPR::WALLSHADOW); } else if(qfi.usershape >= 0) - mapeditor::drawUserShape(V * qfi.spin * shadowmulmatrix, mapeditor::sgFloor, qfi.usershape, col, c, PPR_WALLSHADOW); + mapeditor::drawUserShape(V * qfi.spin * shadowmulmatrix, mapeditor::sgFloor, qfi.usershape, col, c, PPR::WALLSHADOW); else - draw_shapevec(c, V, qfi.fshape->shadow, col, PPR_WALLSHADOW); + draw_shapevec(c, V, qfi.fshape->shadow, col, PPR::WALLSHADOW); } void set_maywarp_floor(cell *c) { @@ -3153,28 +3153,28 @@ void escherSidewall(cell *c, int sidepar, const transmatrix& V, int col) { if(sidepar >= SIDE_SLEV && sidepar <= SIDE_SLEV+2) { int sl = sidepar - SIDE_SLEV; for(int z=1; z<=4; z++) if(z == 1 || (z == 4 && detaillevel == 2)) - draw_qfi(c, mscale(V, zgrad0(geom3::slev * sl, geom3::slev * (sl+1), z, 4)), col, PPR(PPR_REDWALL-4+z+4*sl)); + draw_qfi(c, mscale(V, zgrad0(geom3::slev * sl, geom3::slev * (sl+1), z, 4)), col, PPR::REDWALL-4+z+4*sl); } else if(sidepar == SIDE_WALL) { const int layers = 2 << detaillevel; for(int z=1; zmove(i))) return false; PPR prio; - /* if(mirr) prio = PPR_GLASS - 2; - else */ if(sidepar == SIDE_WALL) prio = PPR(PPR_WALL3 - 2); - else if(sidepar == SIDE_WTS3) prio = PPR(PPR_WALL3 - 2); - 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 prio = PPR(PPR_REDWALL-2+4*(sidepar-SIDE_SLEV)); + /* if(mirr) prio = PPR::GLASS - 2; + else */ if(sidepar == SIDE_WALL) prio = PPR::WALL3 - 2; + else if(sidepar == SIDE_WTS3) prio = PPR::WALL3 - 2; + 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 prio = PPR::REDWALL-2+4*(sidepar-SIDE_SLEV); transmatrix V2 = V * ddspin(c, i); @@ -3270,14 +3270,14 @@ void pushdown(cell *c, int& q, const transmatrix &V, double down, bool rezoom, b if(!repriority) ; else if(nlev < -geom3::lake_bottom-1e-3) { - ptd.prio = PPR_BELOWBOTTOM_FALLANIM; + ptd.prio = PPR::BELOWBOTTOM_FALLANIM; if(c->wall != waChasm) ptd.col = 0; // disappear! } else if(nlev < -geom3::lake_top-1e-3) - ptd.prio = PPR_INLAKEWALL_FALLANIM; + ptd.prio = PPR::INLAKEWALL_FALLANIM; else if(nlev < 0) - ptd.prio = PPR_LAKEWALL_FALLANIM; + ptd.prio = PPR::LAKEWALL_FALLANIM; } } } @@ -3404,7 +3404,7 @@ void draw_wall(cell *c, const transmatrix& V, int wcol, int& zcol, int ct6, int for(int i=0; itype; i++) if(c->move(i)->wall == waClosedGate) hdir = i; transmatrix V2 = mscale(V, wmspatial?geom3::WALL:1) * ddspin(c, hdir, M_PI); - queuepolyat(V2, shPalaceGate, darkena(wcol, 0, 0xFF), wmspatial?PPR_WALL3A:PPR_WALL); + queuepolyat(V2, shPalaceGate, darkena(wcol, 0, 0xFF), wmspatial?PPR::WALL3A:PPR::WALL); starcol = 0; } @@ -3415,7 +3415,7 @@ void draw_wall(cell *c, const transmatrix& V, int wcol, int& zcol, int ct6, int for(int z=1; zwall == waPlatform)) - queuepolyat(Vdepth, shThisWall, darkena(starcol, 0, 0xFF), PPR_WALL3A); + queuepolyat(Vdepth, shThisWall, darkena(starcol, 0, 0xFF), PPR::WALL3A); - draw_qfi(c, Vdepth, darkena(wcol0, fd, alpha), PPR_WALL3); + draw_qfi(c, Vdepth, darkena(wcol0, fd, alpha), PPR::WALL3); floorShadow(c, V, SHADOW_WALL); if(c->wall == waCamelot) { @@ -3636,7 +3636,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { wcol = gradient(wcol, dc, 0, .4, 1); fcol = gradient(fcol, dc, 0, .4, 1); /* queuepolyat(V, shFloor[ct6], darkena(gradient(0, distcolors[cd&7], 0, .25, 1), fd, 0xC0), - PPR_TEXT); */ + PPR::TEXT); */ queuestr(V, (cd > 9 ? .6 : 1) * .2, label, 0xFF000000 + distcolors[cd&7], 1); } @@ -3669,7 +3669,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { int tcol = darkena(gradient(forecolor, backcolor, 0, rad, 1.5 * hexf), 0, 0xFF); PRING(a) curvepoint(V*xspinpush0(a * M_PI / S42, rad)); - queuecurve(tcol, 0, PPR_LINE); + queuecurve(tcol, 0, PPR::LINE); } } @@ -3758,7 +3758,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(c->wall == waMagma) fd = 0; poly_outline = OUTLINE_DEFAULT; - + int sl = snakelevel(c); transmatrix Vd0, Vf0, Vboat0; @@ -3775,8 +3775,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { shmup::drawMonster(V, c, Vboat, Vboat0, Vdp); - poly_outline = OUTLINE_DEFAULT; - + poly_outline = OUTLINE_DEFAULT; if(!wmascii) { int gc; @@ -3801,7 +3800,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(c->land == laZebra) fd++; if(c->land == laHalloween && !wmblack) { transmatrix Vdepth = wmspatial ? mscale(V, geom3::BOTTOM) : V; - draw_floorshape(c, Vdepth, shFullFloor, darkena(firecolor(ticks / 10), 0, 0xDF), PPR_LAKEBOTTOM); + draw_floorshape(c, Vdepth, shFullFloor, darkena(firecolor(ticks / 10), 0, 0xDF), PPR::LAKEBOTTOM); } } @@ -3845,34 +3844,34 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { transmatrix V2 = V * qfi.spin; if(!wmblack) for(int d=0; dtype; d++) { inmirrorcount+=d; - queuepolyat(V2 * spin(d*M_PI/S3), shHalfFloor[2], darkena(fcol, fd, 0xFF), PPR_FLOORa); + queuepolyat(V2 * spin(d*M_PI/S3), shHalfFloor[2], darkena(fcol, fd, 0xFF), PPR::FLOORa); inmirrorcount-=d; } if(wmspatial) { const int layers = 2 << detaillevel; for(int z=1; z p(poly_outline, OUTLINE_TRANS); queuepolyat(V2 * spin(M_PI*2/3), shSemiFloorShadow, SHADOW_WALL, PPR_WALLSHADOW); } - queuepolyat(V2, shSemiFloorSide[SIDE_WALL], darkena(vcol, fd, 0xFF), PPR(PPR_WALL3A-2+away(V2))); + queuepolyat(Vdepth, shSemiFloor[0], darkena(vcol, fd, 0xFF), PPR::WALL3A); + {dynamicval p(poly_outline, OUTLINE_TRANS); queuepolyat(V2 * spin(M_PI*2/3), shSemiFloorShadow, SHADOW_WALL, PPR::WALLSHADOW); } + queuepolyat(V2, shSemiFloorSide[SIDE_WALL], darkena(vcol, fd, 0xFF), PPR::WALL3A-2+away(V2)); if(validsidepar[SIDE_WALL]) forCellIdEx(c2, j, c) { int dis = i-j; @@ -4137,8 +4136,8 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { bspin = Vf * bspin; queuepoly(bspin, shMercuryBridge[1], darkena(fcol, fd+1, 0xFF)); if(wmspatial) { - queuepolyat(mscale(bspin, geom3::LAKE), shMercuryBridge[1], darkena(gradient(0, winf[waMercury].color, 0, 0.8,1), 0, 0x80), PPR_LAKELEV); - queuepolyat(mscale(bspin, geom3::BOTTOM), shMercuryBridge[1], darkena(0x202020, 0, 0xFF), PPR_LAKEBOTTOM); + queuepolyat(mscale(bspin, geom3::LAKE), shMercuryBridge[1], darkena(gradient(0, winf[waMercury].color, 0, 0.8,1), 0, 0x80), PPR::LAKELEV); + queuepolyat(mscale(bspin, geom3::BOTTOM), shMercuryBridge[1], darkena(0x202020, 0, 0xFF), PPR::LAKEBOTTOM); } } } @@ -4151,9 +4150,9 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { fd = 1; set_floor(shFloor); if(c->wall != waMirror && c->wall != waCloud) - draw_floorshape(c, V, shMFloor, darkena(fcol, 2, 0xFF), PPR_FLOORa); + draw_floorshape(c, V, shMFloor, darkena(fcol, 2, 0xFF), PPR::FLOORa); if(c->wall != waMirror && c->wall != waCloud) - draw_floorshape(c, V, shMFloor2, darkena(fcol, fcol==wcol ? 1 : 2, 0xFF), PPR_FLOORb); + draw_floorshape(c, V, shMFloor2, darkena(fcol, fcol==wcol ? 1 : 2, 0xFF), PPR::FLOORb); } else set_floor(shFloor); @@ -4182,7 +4181,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(chasmg == 2) ; else if(chasmg && wmspatial && detaillevel == 0) { - draw_qfi(c, (*Vdp), darkena(fcol, fd, 0x80), PPR_LAKELEV); + draw_qfi(c, (*Vdp), darkena(fcol, fd, 0x80), PPR::LAKELEV); } else if(chasmg && wmspatial) { @@ -4195,10 +4194,10 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { else if(qfi.fshape == &shCaveFloor) set_floor(shCaveSeabed); - draw_qfi(c, mscale(V, geom3::BOTTOM), col, PPR_LAKEBOTTOM); + draw_qfi(c, mscale(V, geom3::BOTTOM), col, PPR::LAKEBOTTOM); int fd0 = fd ? fd-1 : 0; - draw_qfi(c, (*Vdp), darkena(fcol, fd0, 0x80), PPR_LAKELEV); + draw_qfi(c, (*Vdp), darkena(fcol, fd0, 0x80), PPR::LAKELEV); } else { draw_qfi(c, V, darkena(fcol, fd, flooralpha)); @@ -4266,22 +4265,22 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { case waBigBush: if(detaillevel >= 2) - queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 1, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR_REDWALL); + queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 1, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR::REDWALL); if(detaillevel >= 1) - queuepolyat(mmscale(V, geom3::SLEV[1]) * pispin, shWeakBranch, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+1)); + queuepolyat(mmscale(V, geom3::SLEV[1]) * pispin, shWeakBranch, darkena(wcol, 0, 0xFF), PPR::REDWALL+1); if(detaillevel >= 2) - queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 3, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+2)); - queuepolyat(mmscale(V, geom3::SLEV[2]), shSolidBranch, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+3)); + queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 3, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR::REDWALL+2); + queuepolyat(mmscale(V, geom3::SLEV[2]), shSolidBranch, darkena(wcol, 0, 0xFF), PPR::REDWALL+3); break; case waSmallBush: if(detaillevel >= 2) - queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 1, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR_REDWALL); + queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 1, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR::REDWALL); if(detaillevel >= 1) - queuepolyat(mmscale(V, geom3::SLEV[1]) * pispin, shWeakBranch, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+1)); + queuepolyat(mmscale(V, geom3::SLEV[1]) * pispin, shWeakBranch, darkena(wcol, 0, 0xFF), PPR::REDWALL+1); if(detaillevel >= 2) - queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 3, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+2)); - queuepolyat(mmscale(V, geom3::SLEV[2]), shWeakBranch, darkena(wcol, 0, 0xFF), PPR(PPR_REDWALL+3)); + queuepolyat(mmscale(V, zgrad0(0, geom3::slev, 3, 2)), shHeptaMarker, darkena(wcol, 0, 0xFF), PPR::REDWALL+2); + queuepolyat(mmscale(V, geom3::SLEV[2]), shWeakBranch, darkena(wcol, 0, 0xFF), PPR::REDWALL+3); break; case waSolidBranch: @@ -4298,8 +4297,8 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { draw_floorshape(c, V, shMFloor2, 0x000000FF); } else { - draw_floorshape(c, V, shFloor, 0x804000FF, PPR(PPR_FLOOR+1)); - draw_floorshape(c, V, shMFloor, 0x000000FF, PPR(PPR_FLOOR+2)); + draw_floorshape(c, V, shFloor, 0x804000FF, PPR::FLOOR+1); + draw_floorshape(c, V, shMFloor, 0x000000FF, PPR::FLOOR+2); } break; @@ -4331,7 +4330,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(wmspatial && c->wall == waBoat) { nospin = c->wall == waBoat && applyAnimation(c, Vboat0, footphase, LAYER_BOAT); if(!nospin) Vboat0 = Vboat0 * ddspin(c, c->mondir, M_PI); - queuepolyat(Vboat0, shBoatOuter, outcol, PPR_BOATLEV); + queuepolyat(Vboat0, shBoatOuter, outcol, PPR::BOATLEV); Vboat = &(Vboat0 = V); } if(c->wall == waBoat) { @@ -4345,7 +4344,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { animations[LAYER_SMALL][c].footphase = 0; } if(wmspatial) - queuepolyat(mscale(Vboat0, (geom3::LAKE+1)/2), shBoatOuter, outcol, PPR_BOATLEV2); + queuepolyat(mscale(Vboat0, (geom3::LAKE+1)/2), shBoatOuter, outcol, PPR::BOATLEV2); queuepoly(Vboat0, shBoatOuter, outcol); queuepoly(Vboat0, shBoatInner, incol); break; @@ -4358,7 +4357,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { queuepolyat(V2, shStatue, darkena(winf[c->wall].color, 0, 0xFF), - PPR_BIGSTATUE + PPR::BIGSTATUE ); break; } @@ -4367,7 +4366,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(drawstar(c)) { zcol = wcol; if(wmspatial) - queuepolyat(mscale(V, geom3::HELLSPIKE), shGiantStar[ct6], darkena(wcol, 0, 0x40), PPR_HELLSPIKE); + queuepolyat(mscale(V, geom3::HELLSPIKE), shGiantStar[ct6], darkena(wcol, 0, 0x40), PPR::HELLSPIKE); else queuepoly(V, shGiantStar[ct6], darkena(wcol, 0, 0xFF)); } @@ -4419,7 +4418,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { int col = winf[waGlass].color; int dcol = darkena(col, 0, 0x80); transmatrix Vdepth = mscale((*Vdp), geom3::WALL); - draw_floorshape(c, Vdepth, shMFloor, dcol, PPR_WALL); // GLASS + draw_floorshape(c, Vdepth, shMFloor, dcol, PPR::WALL); // GLASS dynamicval dq(qfi, qfi); set_floor(shMFloor); if(validsidepar[SIDE_WALL]) forCellIdEx(c2, i, c) @@ -4451,7 +4450,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { for(int z=1; zwall].color; int dcol = darkena(col, 0, 0xC0); transmatrix Vdepth = mscale((*Vdp), geom3::WALL); - draw_floorshape(c, Vdepth, shMFloor, dcol, PPR_WALL); // GLASS + draw_floorshape(c, Vdepth, shMFloor, dcol, PPR::WALL); // GLASS dynamicval dq(qfi, qfi); set_floor(shMFloor); if(validsidepar[SIDE_WALL]) forCellIdEx(c2, i, c) @@ -4553,7 +4552,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { bool dbot = true; forCellIdEx(c2, i, c) if(chasmgraph(c2) == 2) { if(dbot) dbot = false, - draw_qfi(c, mscale(V, geom3::BOTTOM), 0x080808FF, PPR_LAKEBOTTOM); + draw_qfi(c, mscale(V, geom3::BOTTOM), 0x080808FF, PPR::LAKEBOTTOM); if(placeSidewall(c, i, SIDE_BTOI, V, D(.6))) break; } #undef D @@ -4597,7 +4596,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(t <= maxtime) { erase = false; if(fa.walltype == waNone) - draw_qfi(c, V, darkena(fcol, fd, 0xFF), PPR_FLOOR); + draw_qfi(c, V, darkena(fcol, fd, 0xFF), PPR::FLOOR); else { int wcol2, fcol2; eWall w = c->wall; int p = c->wparam; @@ -4605,8 +4604,8 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { setcolors(c, wcol2, fcol2); int starcol = c->wall == waVinePlant ? 0x60C000 : wcol2; c->wall = w; c->wparam = p; - draw_qfi(c, mscale(V, geom3::WALL), darkena(starcol, fd, 0xFF), PPR_WALL3); - queuepolyat(mscale(V, geom3::WALL), shWall[ct6], darkena(wcol2, 0, 0xFF), PPR_WALL3A); + draw_qfi(c, mscale(V, geom3::WALL), darkena(starcol, fd, 0xFF), PPR::WALL3); + queuepolyat(mscale(V, geom3::WALL), shWall[ct6], darkena(wcol2, 0, 0xFF), PPR::WALL3A); forCellIdEx(c2, i, c) if(placeSidewall(c, i, SIDE_WALL, V, darkena(wcol2, 1, 0xFF))) break; } @@ -4657,7 +4656,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { } if(!shmup::on && sword::at(c)) { - queuepolyat(V, shDisk, 0xC0404040, PPR_SWORDMARK); + queuepolyat(V, shDisk, 0xC0404040, PPR::SWORDMARK); } #if CAP_TEXTURE @@ -4757,7 +4756,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(vid.linequality > 0) steps <<= vid.linequality; if(vid.linequality < 0) steps >>= -vid.linequality; for(int i=0; i<=steps; i++) curvepoint(V * get_horopoint(y, x1 + (x2-x1) * i / steps)); - queuecurve(gridcolor(c, c->move(dir)), 0, PPR_LINE); + queuecurve(gridcolor(c, c->move(dir)), 0, PPR::LINE); lastptd().u.poly.linewidth = linewidthat(V * get_horopoint(y, (x1+x2)/2), vid.linewidth, 0); }; horizontal(yy, 2*xx, xx, 4, binary::bd_up_right); @@ -4916,7 +4915,7 @@ void queuecircleat(cell *c, double rad, int col) { if(!gmatrix.count(c)) return; if(stereo::mode || sphere) { dynamicval p(poly_outline, col); - queuepolyat(gmatrix[c] * spin(ticks / 100.), shGem[1], 0, PPR_LINE); + queuepolyat(gmatrix[c] * spin(ticks / 100.), shGem[1], 0, PPR::LINE); return; } queuecircle(gmatrix[c], rad, col); @@ -5098,7 +5097,7 @@ void drawFlashes() { if(u > 500) flashcol = gradient(flashcol, 0, 500, u, 1100); flashcol = darkena(flashcol, 0, 0xFF); PRING(a) curvepoint(V*xspinpush0(a * M_PI / S42, rad)); - queuecurve(flashcol, 0x8080808, PPR_LINE); + queuecurve(flashcol, 0x8080808, PPR::LINE); } } else if(f.size == 2000) { @@ -5112,7 +5111,7 @@ void drawFlashes() { if(u > 1000) flashcol = gradient(flashcol, 0, 1000, u, 2200); flashcol = darkena(flashcol, 0, 0xFF); PRING(a) curvepoint(V*xspinpush0(a * M_PI / S42, rad)); - queuecurve(flashcol, 0x8080808, PPR_LINE); + queuecurve(flashcol, 0x8080808, PPR::LINE); } } @@ -5460,7 +5459,7 @@ void drawfullmap() { */ if(!twopoint_do_flips && !stereo::active() && sphere && pmodel == mdTwoPoint) { - queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR_CIRCLE); + queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR::CIRCLE); for(int b=-1; b<=1; b+=2) for(ld a=-90; a<=90+1e-6; a+=pow(.5, vid.linequality)) { @@ -5475,12 +5474,12 @@ void drawfullmap() { curvepoint(h1 * vid.radius); } - queuecurve(ringcolor, 0, PPR_CIRCLE); - queuereset(pmodel, PPR_CIRCLE); + queuecurve(ringcolor, 0, PPR::CIRCLE); + queuereset(pmodel, PPR::CIRCLE); } if(!stereo::active() && sphere && pmodel == mdSinusoidal) { - queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR_CIRCLE); + queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR::CIRCLE); for(ld a=-45; a<45+1e-6; a+=pow(.5, vid.linequality)) { curvepoint(hpxyz(cos(a * M_PI / 90) * vid.radius, a * vid.radius / 90, 0)); @@ -5488,9 +5487,9 @@ void drawfullmap() { for(ld a=45; a>=-45-1e-6; a-=pow(.5, vid.linequality)) { curvepoint(hpxyz(-cos(a * M_PI / 90) * vid.radius, a * vid.radius / 90, 0)); } - queuecurve(ringcolor, 0, PPR_CIRCLE); + queuecurve(ringcolor, 0, PPR::CIRCLE); - queuereset(pmodel, PPR_CIRCLE); + queuereset(pmodel, PPR::CIRCLE); } if(!stereo::active() && vid.grid) { @@ -5500,14 +5499,14 @@ void drawfullmap() { if(pmodel == mdBandEquiarea && sphere) rad = vid.radius / M_PI; if(rad) { - queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR_CIRCLE); + queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR::CIRCLE); curvepoint(hpxyz(-vid.xcenter, -rad, 0)); curvepoint(hpxyz(vid.xres-vid.xcenter, -rad, 0)); - queuecurve(ringcolor, 0, PPR_CIRCLE); + queuecurve(ringcolor, 0, PPR::CIRCLE); curvepoint(hpxyz(-vid.xcenter, rad, 0)); curvepoint(hpxyz(vid.xres-vid.xcenter, rad, 0)); - queuecurve(ringcolor, 0, PPR_CIRCLE); - queuereset(pmodel, PPR_CIRCLE); + queuecurve(ringcolor, 0, PPR::CIRCLE); + queuereset(pmodel, PPR::CIRCLE); } } @@ -5528,7 +5527,7 @@ void drawfullmap() { } if(rad && !haveaura()) { queuecircle(vid.xcenter, vid.ycenter, rad, ringcolor, - vid.usingGL ? PPR_CIRCLE : PPR_OUTCIRCLE); + vid.usingGL ? PPR::CIRCLE : PPR::OUTCIRCLE); if(isbnd) lastptd().u.cir.boundary = true; } if(pmodel == mdBall) ballgeometry(); @@ -5537,12 +5536,12 @@ void drawfullmap() { if(pmodel == mdHyperboloid) { #if CAP_QUEUE int col = darkena(0x80, 0, 0x80); - queueline(hpxyz(0,0,1), hpxyz(0,0,-vid.alpha), col, 0, PPR_CIRCLE); - queueline(xpush0(+4), hpxyz(0,0,0), col, 0, PPR_CIRCLE); - queueline(xpush0(+4), hpxyz(0,0,-vid.alpha), col, 0, PPR_CIRCLE); - queueline(xpush0(-4), hpxyz(0,0,0), col, 0, PPR_CIRCLE); - queueline(xpush0(-4), hpxyz(0,0,-vid.alpha), col, 0, PPR_CIRCLE); - queueline(hpxyz(-1,0,0), hpxyz(1,0,0), col, 0, PPR_CIRCLE); + queueline(hpxyz(0,0,1), hpxyz(0,0,-vid.alpha), col, 0, PPR::CIRCLE); + queueline(xpush0(+4), hpxyz(0,0,0), col, 0, PPR::CIRCLE); + queueline(xpush0(+4), hpxyz(0,0,-vid.alpha), col, 0, PPR::CIRCLE); + queueline(xpush0(-4), hpxyz(0,0,0), col, 0, PPR::CIRCLE); + queueline(xpush0(-4), hpxyz(0,0,-vid.alpha), col, 0, PPR::CIRCLE); + queueline(hpxyz(-1,0,0), hpxyz(1,0,0), col, 0, PPR::CIRCLE); #endif } diff --git a/hud.cpp b/hud.cpp index 5157f761..832f2470 100644 --- a/hud.cpp +++ b/hud.cpp @@ -338,7 +338,7 @@ void drawMobileArrow(int i) { double dx = xmove + rad*(1+SKIPFAC-.2)/2 * cos(alpha); double dy = yb + rad*(1+SKIPFAC-.2)/2 * sin(alpha); - queuepolyat(atscreenpos(dx, dy, scale) * spin(-alpha), shArrow, col, PPR_MOBILE_ARROW); + queuepolyat(atscreenpos(dx, dy, scale) * spin(-alpha), shArrow, col, PPR::MOBILE_ARROW); } bool nofps = false; diff --git a/hyper.h b/hyper.h index 3dd1ddc5..5216a3b0 100644 --- a/hyper.h +++ b/hyper.h @@ -1788,66 +1788,70 @@ void fallingFloorAnimation(cell *c, eWall w = waNone, eMonster m = moNone); void fallingMonsterAnimation(cell *c, eMonster m, int id = multi::cpid); // ranks: -enum PPR { - PPR_ZERO, PPR_OUTCIRCLE, PPR_MOVESTAR, - PPR_MINUSINF, - PPR_BELOWBOTTOMm, - PPR_BELOWBOTTOM, - PPR_BELOWBOTTOMp, - PPR_BELOWBOTTOM_FALLANIM, - PPR_LAKEBOTTOM, PPR_HELLSPIKE, - PPR_INLAKEWALLm, PPR_INLAKEWALL, PPR_INLAKEWALLp, - PPR_INLAKEWALL_FALLANIM, - PPR_SUBLAKELEV, PPR_LAKELEV, PPR_BOATLEV, PPR_BOATLEV2, PPR_BOATLEV3, - PPR_LAKEWALLm, PPR_LAKEWALL, PPR_LAKEWALLp, - PPR_LAKEWALL_FALLANIM, - PPR_FLOOR_TOWER, - PPR_FLOOR, - PPR_FLOOR_DRAGON, - PPR_FLOORa, PPR_FLOORb, PPR_FLOORc, PPR_FLOORd, - PPR_LIZEYE, - PPR_BFLOOR, - PPR_GFLOORa, PPR_GFLOORb, PPR_GFLOORc, - PPR_WALLSHADOW, - PPR_STRUCT0, PPR_STRUCT1, PPR_STRUCT2, PPR_STRUCT3, - PPR_THORNS, PPR_WALL, - PPR_REDWALLm, PPR_REDWALLs, PPR_REDWALLp, PPR_REDWALL, - PPR_REDWALLm2, PPR_REDWALLs2, PPR_REDWALLp2, PPR_REDWALLt2, - PPR_REDWALLm3, PPR_REDWALLs3, PPR_REDWALLp3, PPR_REDWALLt3, - PPR_HEPTAMARK, - PPR_ITEM_BELOW, - PPR_ITEM, PPR_ITEMa, PPR_ITEMb, - PPR_BIGSTATUE, +enum class PPR { + ZERO, OUTCIRCLE, MOVESTAR, + MINUSINF, + BELOWBOTTOMm, + BELOWBOTTOM, + BELOWBOTTOMp, + BELOWBOTTOM_FALLANIM, + LAKEBOTTOM, HELLSPIKE, + INLAKEWALLm, INLAKEWALL, INLAKEWALLp, + INLAKEWALL_FALLANIM, + SUBLAKELEV, LAKELEV, BOATLEV, BOATLEV2, BOATLEV3, + LAKEWALLm, LAKEWALL, LAKEWALLp, + LAKEWALL_FALLANIM, + FLOOR_TOWER, + FLOOR, + FLOOR_DRAGON, + FLOORa, FLOORb, FLOORc, FLOORd, + LIZEYE, + BFLOOR, + GFLOORa, GFLOORb, GFLOORc, + WALLSHADOW, + STRUCT0, STRUCT1, STRUCT2, STRUCT3, + THORNS, WALL, + REDWALLm, REDWALLs, REDWALLp, REDWALL, + REDWALLm2, REDWALLs2, REDWALLp2, REDWALLt2, + REDWALLm3, REDWALLs3, REDWALLp3, REDWALLt3, + HEPTAMARK, + ITEM_BELOW, + ITEM, ITEMa, ITEMb, + BIGSTATUE, - PPR_WALL3m, PPR_WALL3s, PPR_WALL3p, PPR_WALL3, PPR_WALL3A, + WALL3m, WALL3s, WALL3p, WALL3, WALL3A, -// PPR_WALL3m, PPR_WALL3s, PPR_WALL3p, PPR_WALL3, PPR_WALL3A, - PPR_HIDDEN, PPR_GIANTSHADOW, - PPR_TENTACLE0, PPR_TENTACLE1, - PPR_ONTENTACLE, PPR_ONTENTACLE_EYES, PPR_ONTENTACLE_EYES2, - PPR_MONSTER_SHADOW, - PPR_MONSTER_FOOT, PPR_MONSTER_LEG, PPR_MONSTER_GROIN, - PPR_MONSTER_SUBWPN, PPR_MONSTER_WPN, - PPR_MONSTER_BODY, PPR_MONSTER_ARMOR0, PPR_MONSTER_ARMOR1, - PPR_MONSTER_CLOAK, PPR_MONSTER_NECK, - PPR_MONSTER_HEAD, PPR_MONSTER_FACE, PPR_MONSTER_EYE0, PPR_MONSTER_EYE1, - PPR_MONSTER_HAIR, PPR_MONSTER_HAT0, PPR_MONSTER_HAT1, - PPR_MONSTER_HOODCLOAK1, PPR_MONSTER_HOODCLOAK2, - PPR_STUNSTARS, - PPR_CARRIED, PPR_CARRIEDa, PPR_CARRIEDb, - PPR_PARTICLE, PPR_SWORDMARK, PPR_MAGICSWORD, PPR_MISSILE, - PPR_MINEMARK, PPR_ARROW, - PPR_MOBILE_ARROW, - PPR_LINE, PPR_TEXT, PPR_CIRCLE, - PPR_MAX, - PPR_DEFAULT = -1 +// WALL3m, WALL3s, WALL3p, WALL3, WALL3A, + HIDDEN, GIANTSHADOW, + TENTACLE0, TENTACLE1, + ONTENTACLE, ONTENTACLE_EYES, ONTENTACLE_EYES2, + MONSTER_SHADOW, + MONSTER_FOOT, MONSTER_LEG, MONSTER_GROIN, + MONSTER_SUBWPN, MONSTER_WPN, + MONSTER_BODY, MONSTER_ARMOR0, MONSTER_ARMOR1, + MONSTER_CLOAK, MONSTER_NECK, + MONSTER_HEAD, MONSTER_FACE, MONSTER_EYE0, MONSTER_EYE1, + MONSTER_HAIR, MONSTER_HAT0, MONSTER_HAT1, + MONSTER_HOODCLOAK1, MONSTER_HOODCLOAK2, + STUNSTARS, + CARRIED, CARRIEDa, CARRIEDb, + PARTICLE, SWORDMARK, MAGICSWORD, MISSILE, + MINEMARK, ARROW, + MOBILE_ARROW, + LINE, TEXT, CIRCLE, + MAX, + DEFAULT = -1 }; +PPR operator + (PPR x, int y) { return PPR(int(x) + y); } +PPR operator - (PPR x, int y) { return PPR(int(x) - y); } +int operator - (PPR x, PPR y) { return int(x) - int(y); } + namespace mapeditor { - bool drawUserShape(const transmatrix& V, eShapegroup group, int id, int color, cell *c, PPR prio = PPR_DEFAULT); + bool drawUserShape(const transmatrix& V, eShapegroup group, int id, int color, cell *c, PPR prio = PPR::DEFAULT); } -void ShadowV(const transmatrix& V, const struct hpcshape& bp, PPR prio = PPR_MONSTER_SHADOW); +void ShadowV(const transmatrix& V, const struct hpcshape& bp, PPR prio = PPR::MONSTER_SHADOW); #define OUTLINE_NONE 0x000000FF #define OUTLINE_FRIEND 0x00FF00FF @@ -3055,7 +3059,7 @@ namespace texture { } #endif -void queueline(const hyperpoint& H1, const hyperpoint& H2, int col, int prf = 0, PPR prio = PPR_LINE); +void queueline(const hyperpoint& H1, const hyperpoint& H2, int col, int prf = 0, PPR prio = PPR::LINE); void queuelink(const string *link, PPR prio); extern ld tessf, crossf, hexf, hcrossf, hexhexdist, hexvdist, hepvdist, rhexf; @@ -3756,7 +3760,7 @@ struct floorshape { int shapeid; PPR prio; vector b, shadow, side[SIDEPARS], gpside[SIDEPARS][MAX_EDGE]; - floorshape() { prio = PPR_FLOOR; } + floorshape() { prio = PPR::FLOOR; } }; extern vector all_plain_floorshapes; diff --git a/hypgraph.cpp b/hypgraph.cpp index ae9fe345..bc1b3790 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -846,7 +846,7 @@ void addball(ld a, ld b, ld c) { } void ballgeometry() { - queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR_CIRCLE); + queuereset(vid.usingGL ? mdDisk : mdUnchanged, PPR::CIRCLE); for(int i=0; i<60; i++) addball(i * M_PI/30, 10, 0); for(double d=10; d>=-10; d-=.2) @@ -858,8 +858,8 @@ void ballgeometry() { addball(0, 0, -geom3::camera); addball(0, -10, 0); addball(0, 0, -geom3::camera); - queuecurve(darkena(0xFF, 0, 0x80), 0, PPR_CIRCLE); - queuereset(pmodel, PPR_CIRCLE); + queuecurve(darkena(0xFF, 0, 0x80), 0, PPR::CIRCLE); + queuereset(pmodel, PPR::CIRCLE); } void resetview() { diff --git a/mapeditor.cpp b/mapeditor.cpp index 586f07ee..9d6177ad 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -936,7 +936,7 @@ namespace mapeditor { PRING(d) { curvepoint(d2 * xspinpush0(M_PI*d/S42, u/20.)); } - queuecurve((u%5==0) ? gridcolor : lightgrid, 0, PPR_LINE); + queuecurve((u%5==0) ? gridcolor : lightgrid, 0, PPR::LINE); } queueline(drawtrans*ccenter, drawtrans*coldcenter, gridcolor, 4 + vid.linequality); } @@ -1172,7 +1172,7 @@ namespace mapeditor { drawItemType(eItem(id), drawcell, Id, iinf[id].color, 0, false); } else { - draw_qfi(drawcell, Id, 0, PPR_FLOOR); + draw_qfi(drawcell, Id, 0, PPR::FLOOR); } sortquickqueue(); @@ -1689,7 +1689,7 @@ namespace mapeditor { pts.push_back(Ctr * xspinpush0(M_PI*j*2/circp, radius)); for(int j=0; j ss(spherespecial, 0); drawpolyline(p); @@ -1127,30 +1127,32 @@ void drawqueue() { #else - int qp[PPR_MAX], qp0[PPR_MAX]; - for(int a=0; a= PPR_MAX) { - printf("Illegal priority %d of kind %d\n", ptds[i].prio, ptds[i].kind); - ptds[i].prio = PPR(rand() % PPR_MAX); + int pd = ptds[i].prio - PPR::ZERO; + if(pd < 0 || pd >= PMAX) { + printf("Illegal priority %d of kind %d\n", pd, ptds[i].kind); + ptds[i].prio = PPR(rand() % int(PPR::MAX)); } - qp[ptds[i].prio]++; + qp[pd]++; } int total = 0; - for(int a=0; au.poly.V * xpush0(.1)) < xintval(p2->u.poly.V * xpush0(.1)); @@ -1200,9 +1202,9 @@ void drawqueue() { stereo::set_projection(0); #ifndef STLSORT - for(int p: {PPR_REDWALLs, PPR_REDWALLs2, PPR_REDWALLs3, PPR_WALL3s, - PPR_LAKEWALL, PPR_INLAKEWALL, PPR_BELOWBOTTOM}) - reverse(&ptds2[qp0[p]], &ptds2[qp[p]]); + for(PPR p: {PPR::REDWALLs, PPR::REDWALLs2, PPR::REDWALLs3, PPR::WALL3s, + PPR::LAKEWALL, PPR::INLAKEWALL, PPR::BELOWBOTTOM}) + reverse(&ptds2[qp0[int(p)]], &ptds2[qp[int(p)]]); #endif for(int i=siz-1; i>=0; i--) { GET_PTD(i); @@ -1220,9 +1222,9 @@ void drawqueue() { } } #ifndef STLSORT - for(int p: {PPR_REDWALLs, PPR_REDWALLs2, PPR_REDWALLs3, PPR_WALL3s, - PPR_LAKEWALL, PPR_INLAKEWALL, PPR_BELOWBOTTOM}) - reverse(&ptds2[qp0[p]], &ptds2[qp[p]]); + for(PPR p: {PPR::REDWALLs, PPR::REDWALLs2, PPR::REDWALLs3, PPR::WALL3s, + PPR::LAKEWALL, PPR::INLAKEWALL, PPR::BELOWBOTTOM}) + reverse(&ptds2[qp0[int(p)]], &ptds2[qp[int(p)]]); #endif spherespecial *= -1; spherephase = 1; @@ -1609,7 +1611,7 @@ void buildpolys() { // printf("crossf = %f euclid = %d sphere = %d\n", float(crossf), euclid, sphere); hpc.clear(); - bshape(shMovestar, PPR_MOVESTAR); + bshape(shMovestar, PPR::MOVESTAR); for(int i=0; i<=8; i++) { hpcpush(xspinpush0(M_PI * i/4, crossf)); if(i != 8) hpcpush(xspinpush0(M_PI * i/4 + M_PI/8, crossf/4)); @@ -1707,12 +1709,12 @@ void buildpolys() { validsidepar[k] = (dlow > 0 && dhi > 0) || (dlow < 0 && dhi < 0); - bshape(shSemiFloorSide[k], PPR_LAKEWALL); + bshape(shSemiFloorSide[k], PPR::LAKEWALL); for(int t=0; t<=3; t+=3) hpcpush(ddi(S7 + (3+t)*S14, floorrad0) * C0); chasmifyPoly(dlow, dhi, k); } - bshape(shCircleFloor, PPR_FLOOR); + bshape(shCircleFloor, PPR::FLOOR); for(int t=0; t<=S84; t+=2) hpcpush(ddi(t, floorrad1*gp::scale*.9) * C0); for(int i=0; i<3; i++) for(int j=0; j<3; j++) shadowmulmatrix[i][j] = @@ -1721,51 +1723,51 @@ void buildpolys() { 0; for(int d=0; d<2; d++) { - bshape(shSemiFloor[d], PPR_FLOOR); + bshape(shSemiFloor[d], PPR::FLOOR); for(int t=0; t<=4; t++) hpcpush(ddi(S7 + (3+3*d+t%4)*S14, floorrad0) * C0); } // todo not shexf - bshape(shBigCarpet1, PPR_GFLOORa); + bshape(shBigCarpet1, PPR::GFLOORa); for(int t=0; t<=S7; t++) hpcpush(ddi(t*12, -zhexf*2.1) * C0); - bshape(shBigCarpet2, PPR_GFLOORb); + bshape(shBigCarpet2, PPR::GFLOORb); for(int t=0; t<=S7; t++) hpcpush(ddi(t*12, -zhexf*1.9) * C0); - bshape(shBigCarpet3, PPR_GFLOORc); + bshape(shBigCarpet3, PPR::GFLOORc); for(int t=0; t<=S7; t++) hpcpush(ddi(t*12*3, -zhexf*1.7) * C0); - bshape(shBFloor[0], PPR_BFLOOR); + bshape(shBFloor[0], PPR::BFLOOR); for(int t=0; t<=S6; t++) hpcpush(ddi(S7 + t*S14, floorrad0*.1) * C0); - bshape(shBFloor[1], PPR_BFLOOR); + bshape(shBFloor[1], PPR::BFLOOR); for(int t=0; t<=S7; t++) hpcpush(ddi(t*S12, floorrad1*.1) * C0); - bshape(shMineMark[0], PPR_MINEMARK); + bshape(shMineMark[0], PPR::MINEMARK); for(int t=0; t<=S6; t++) hpcpush(ddi(S7 + t*S14, floorrad0*.1) * C0); - bshape(shMineMark[1], PPR_MINEMARK); + bshape(shMineMark[1], PPR::MINEMARK); for(int t=0; t<=S7; t++) hpcpush(ddi(t*S12, floorrad1*.1) * C0); for(int d=0; d<2; d++) { - bshape(shSemiBFloor[d], PPR_BFLOOR); + bshape(shSemiBFloor[d], PPR::BFLOOR); for(int t=0; t<=4; t++) hpcpush(ddi(S7 + (3+3*d+t%4)*S14, floorrad0*.1) * C0); } // walls etc - bshape(shGiantStar[1], PPR_GFLOORa); + bshape(shGiantStar[1], PPR::GFLOORa); for(int t=0; t<=S7; t++) hpcpush(ddi(t*S36, -zhexf*2.4) * C0); - bshape(shGiantStar[0], PPR_GFLOORa); + bshape(shGiantStar[0], PPR::GFLOORa); for(int t=0; t<=S6; t++) { hpcpush(ddi(t*S14, -zhexf*2.4) * C0); hpcpush(ddi(t*S14+S7, zhexf*1.5) * C0); } hpcpush(ddi(0, -zhexf*2.4) * C0); - bshape(shMirror, PPR_WALL); + bshape(shMirror, PPR::WALL); if(nonbitrunc) { for(int t=0; t<=S7; t++) hpcpush(ddi(t*12, floorrad1*7/8 * gp::scale) * C0); } @@ -1775,7 +1777,7 @@ void buildpolys() { if(binarytiling) { for(int i=0; i<2; i++) { - bshape(shWall[i], PPR_WALL); + bshape(shWall[i], PPR::WALL); horopoint(log(2)/8, .1); horopoint(log(2)/8, -.1); horopoint(-log(2)/8, 0); @@ -1783,13 +1785,13 @@ void buildpolys() { } else { - bshape(shWall[0], PPR_WALL); + bshape(shWall[0], PPR::WALL); for(int t=0; t<=S6; t++) { hpcpush(ddi(S7 + t*S14, floorrad0 * goldbf) * C0); if(t != S6) hpcpush(ddi(S14 + t*S14, floorrad0 * goldbf/4) * C0); } - bshape(shWall[1], PPR_WALL); + bshape(shWall[1], PPR::WALL); if(S7 == 6 || S7 == 4) { for(int t=0; t<=S6; t++) { hpcpush(ddi(S7 + t*S14, floorrad1 * goldbf) * C0); @@ -1800,19 +1802,19 @@ void buildpolys() { for(int t=0; t<=S7; t++) hpcpush(ddi(t*S36+td, floorrad1 * goldbf) * C0); } - bshape(shCross, PPR_WALL); + bshape(shCross, PPR::WALL); for(int i=0; i<=84; i+=7) hpcpush(xspinpush0(2*M_PI*i/84, zhexf * (i%3 ? 0.8 : 0.3))); // items - bshape(shGem[0], PPR_ITEM); + bshape(shGem[0], PPR::ITEM); for(int t=0; t<=S6; t++) { hpcpush(ddi(S7 + t*S14, zhexf*.4) * C0); if(t != S6) hpcpush(ddi(S14 + t*S14, zhexf*.1) * C0); } - bshape(shGem[1], PPR_ITEM); + bshape(shGem[1], PPR::ITEM); if(S7 == 6) { for(int t=0; t<=S6; t++) { hpcpush(ddi(S7 + t*S14, zhexf*.4) * C0); @@ -1822,20 +1824,20 @@ void buildpolys() { else for(int t=0; t<=S7; t++) hpcpush(ddi(t*S36, zhexf*.5) * C0); - bshape(shStar, PPR_ITEM); + bshape(shStar, PPR::ITEM); for(int t=0; t<=S84; t+=S6) { hpcpush(ddi(t, zhexf*.2) * C0); if(t != S84) hpcpush(ddi(t+3, zhexf*.6) * C0); } - bshape(shDaisy, PPR_ITEM); + bshape(shDaisy, PPR::ITEM); for(int t=0; t<=S6; t++) { hpcpush(ddi(t*S14, zhexf*.8*3/4) * C0); if(t != S6) hpcpush(ddi(t*S14+S7, zhexf*-.5*3/4) * C0); } hpcpush(ddi(0, zhexf*.6) * C0); - bshape(shTriangle, PPR_ITEM); + bshape(shTriangle, PPR::ITEM); for(int t=0; t<=S3; t++) { hpcpush(ddi(t*S28, zhexf*.5) * C0); } @@ -1847,15 +1849,15 @@ void buildpolys() { if(a38 && gp::on) disksize /= 2; - bshape(shDisk, PPR_ITEM); + bshape(shDisk, PPR::ITEM); for(int i=0; i<=S84; i+=S3) hpcpush(ddi(i, disksize * .2) * C0); - bshape(shDiskT, PPR_ITEM); + bshape(shDiskT, PPR::ITEM); for(int i=0; i<=S84; i+=S28) hpcpush(ddi(i, disksize * .2) * C0); - bshape(shDiskS, PPR_ITEM); + bshape(shDiskS, PPR::ITEM); for(int i=0; i<=S84; i+=S21) { hpcpush(ddi(i, disksize * .2) * C0); if(i != S84) { @@ -1864,43 +1866,43 @@ void buildpolys() { } } - bshape(shDiskM, PPR_ITEM); + bshape(shDiskM, PPR::ITEM); for(int i=0; i<=S84; i+=S3) { hpcpush(ddi(i, disksize * .1) * C0); } - bshape(shDiskSq, PPR_ITEM); + bshape(shDiskSq, PPR::ITEM); for(int i=0; i<=S84; i+=S21) { hpcpush(ddi(i, disksize * .15) * C0); } - bshape(shEgg, PPR_ITEM); + bshape(shEgg, PPR::ITEM); RING(i) hpcpush(hpxy(sin(i*2*M_PI/S84)*.15, cos(i*2*M_PI/S84)*.11)); - bshape(shRing, PPR_ITEM); + bshape(shRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * .30) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shSpikedRing, PPR_ITEM); + bshape(shSpikedRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * (int(i)&1?.35:.30)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shTargetRing, PPR_ITEM); + bshape(shTargetRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * (i >= S42-6 && i <= S42+6 ?.36:.30)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shSpearRing, PPR_ITEM); + bshape(shSpearRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) { @@ -1913,7 +1915,7 @@ void buildpolys() { hpcpush(ddi(0, disksize * .25) * C0); /* three nice spikes - bshape(shLoveRing, PPR_ITEM); + bshape(shLoveRing, PPR::ITEM); for(int i=0; i<=S84; i+=3) hpcpush(ddi(i, disksize * .25) * C0); for(int i=S84; i>=0; i--) { @@ -1927,7 +1929,7 @@ void buildpolys() { hpcpush(ddi(0, disksize * .25) * C0); */ - bshape(shLoveRing, PPR_ITEM); + bshape(shLoveRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) { double j = i*3; @@ -1944,43 +1946,43 @@ void buildpolys() { auto dmod = [] (ld a, ld b) { return a - int(a/b)*b; }; - bshape(shSawRing, PPR_ITEM); + bshape(shSawRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * (.3 + (int(i) & 3) * .02)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shGearRing, PPR_ITEM); + bshape(shGearRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * ((dmod(i, 6)<3)?.3:.36)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shPeaceRing, PPR_ITEM); + bshape(shPeaceRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * (dmod(i, S28) < S7?.36 : .3)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shHeptaRing, PPR_ITEM); + bshape(shHeptaRing, PPR::ITEM); RING(i) hpcpush(ddi(i, disksize * .25) * C0); REVPRING(i) hpcpush(ddi(i, disksize * (dmod(i, S12) < S3?.4 : .27)) * C0); hpcpush(ddi(0, disksize * .25) * C0); - bshape(shCompass1, PPR_ITEM); + bshape(shCompass1, PPR::ITEM); RING(i) hpcpush(ddi(i, xcrossf * .35) * C0); - bshape(shCompass2, PPR_ITEMa); + bshape(shCompass2, PPR::ITEMa); RING(i) hpcpush(ddi(i, xcrossf * .3) * C0); - bshape(shCompass3, PPR_ITEMb); + bshape(shCompass3, PPR::ITEMb); hpcpush(ddi(0, xcrossf * .29) * C0); hpcpush(ddi(S21, xcrossf * .04) * C0); hpcpush(ddi(-S21, xcrossf * .04) * C0); @@ -1992,14 +1994,14 @@ void buildpolys() { hpcpush(ddi(21, -xcrossf/5) * ddi(0, xcrossf) * C0); hpcpush(ddi(21, xcrossf/5) * ddi(0, xcrossf) * C0); */ - bshape(shILeaf[0], PPR_ONTENTACLE); + bshape(shILeaf[0], PPR::ONTENTACLE); for(int t=0; t<=S6; t++) { hpcpush(ddi(S7 + t*S14, zhexf*.7) * C0); if(t != S6) hpcpush(ddi(S14 + t*S14, zhexf*.15) * C0); } - bshape(shILeaf[1], PPR_ONTENTACLE); + bshape(shILeaf[1], PPR::ONTENTACLE); if(S3 == 3) for(int t=0; t<=S7; t++) hpcpush(ddi(t*S36, zhexf*.8) * C0); else { @@ -2010,30 +2012,30 @@ void buildpolys() { } } - bshape(shSlime, PPR_MONSTER_BODY); + bshape(shSlime, PPR::MONSTER_BODY); PRING(i) hpcpush(ddi(i, xcrossf * (0.7 + .2 * sin(i * M_PI * 2 / S84 * 9))) * C0); - bshape(shJelly, PPR_MONSTER_BODY); + bshape(shJelly, PPR::MONSTER_BODY); PRING(i) hpcpush(ddi(i, xcrossf * (0.4 + .03 * sin(i * M_PI * 2 / S84 * 7))) * C0); - bshape(shHeptaMarker, PPR_HEPTAMARK); + bshape(shHeptaMarker, PPR::HEPTAMARK); for(int t=0; t<=S7; t++) hpcpush(ddi(t*S12, zhexf*.2) * C0); - bshape(shSnowball, PPR_ITEM); + bshape(shSnowball, PPR::ITEM); for(int t=0; t<=S7*4; t++) hpcpush(ddi(t*S3, zhexf*.1) * C0); - bshape(shRose, PPR_ITEM); + bshape(shRose, PPR::ITEM); PRING(t) hpcpush(xspinpush0(M_PI * t / (S42+.0), xcrossf * (0.2 + .15 * sin(M_PI * t / (S42+.0) * 3)))); - bshape(shThorns, PPR_THORNS); + bshape(shThorns, PPR::THORNS); for(int t=0; t<=60; t++) hpcpush(xspinpush0(M_PI * t / 30.0, xcrossf * ((t&1) ? 0.3 : 0.6))); for(int i=0; i<16; i++) { - bshape(shParticle[i], PPR_PARTICLE); + bshape(shParticle[i], PPR::PARTICLE); for(int t=0; t<6; t++) hpcpush(xspinpush0(M_PI * t * 2 / 6 + M_PI * 2/6 * hrand(100) / 150., (0.03 + hrand(100) * 0.0003) * goldbf)); hpc.push_back(hpc[last->s]); @@ -2056,116 +2058,116 @@ void buildpolys() { shMFloor2.configure(floorrad0*6/8, floorrad1*6/8); shMFloor3.configure(floorrad0*5/8, floorrad1*5/8); shMFloor4.configure(floorrad0*4/8, floorrad1*4/8); - shBigTriangle.configure(triangleside, 0); shBigTriangle.prio = PPR_FLOOR_TOWER; + shBigTriangle.configure(triangleside, 0); shBigTriangle.prio = PPR::FLOOR_TOWER; shBigHepta.configure(0, (nonbitrunc ? tessf : xcrossf) * .97); shTriheptaFloor.configure(trihepta0, trihepta1); - shDragonFloor.prio = PPR_FLOOR_DRAGON; - shPowerFloor.prio = PPR_FLOOR_DRAGON; + shDragonFloor.prio = PPR::FLOOR_DRAGON; + shPowerFloor.prio = PPR::FLOOR_DRAGON; for(int i=0; i<3; i++) shRedRockFloor[i].scale = .9 - .1 * i; generate_floorshapes(); - bshape(shHalfFloor[0], PPR_FLOOR, scalef*spzoom6, 329); - bshape(shHalfFloor[1], PPR_FLOOR, scalef*spzoom6, 327); - bshape(shHalfFloor[2], PPR_FLOOR, scalef*spzoom6, 331); - bshape(shHalfMirror[0], PPR_WALL, scalef*spzoom6, 330); - bshape(shHalfMirror[1], PPR_WALL, scalef*spzoom6, 328); - bshape(shHalfMirror[2], PPR_WALL, scalef*spzoom6, 332); + bshape(shHalfFloor[0], PPR::FLOOR, scalef*spzoom6, 329); + bshape(shHalfFloor[1], PPR::FLOOR, scalef*spzoom6, 327); + bshape(shHalfFloor[2], PPR::FLOOR, scalef*spzoom6, 331); + bshape(shHalfMirror[0], PPR::WALL, scalef*spzoom6, 330); + bshape(shHalfMirror[1], PPR::WALL, scalef*spzoom6, 328); + bshape(shHalfMirror[2], PPR::WALL, scalef*spzoom6, 332); - bshape(shAsymmetric, PPR_TEXT, scalef, 374); + bshape(shAsymmetric, PPR::TEXT, scalef, 374); - bshape(shTriheptaSpecial[2], PPR_FLOOR, scalef, 32); - bshape(shTriheptaSpecial[3], PPR_FLOOR, scalef, 33); - bshape(shTriheptaSpecial[4], PPR_FLOOR, scalef, 34); - bshape(shTriheptaSpecial[5], PPR_FLOOR, scalef, 35); - bshape(shTriheptaSpecial[6], PPR_FLOOR, scalef, 36); - bshape(shTriheptaSpecial[7], PPR_FLOOR, scalef, 37); - bshape(shTriheptaSpecial[12], PPR_FLOOR, scalef, 373); - bshape(shTriheptaSpecial[9], PPR_FLOOR, scalef, 38); - bshape(shTriheptaSpecial[10], PPR_FLOOR, scalef, 39); - bshape(shTriheptaSpecial[11], PPR_FLOOR, scalef, 372); - bshape(shSemiFloorShadow, PPR_FLOOR, scalef, 263); + bshape(shTriheptaSpecial[2], PPR::FLOOR, scalef, 32); + bshape(shTriheptaSpecial[3], PPR::FLOOR, scalef, 33); + bshape(shTriheptaSpecial[4], PPR::FLOOR, scalef, 34); + bshape(shTriheptaSpecial[5], PPR::FLOOR, scalef, 35); + bshape(shTriheptaSpecial[6], PPR::FLOOR, scalef, 36); + bshape(shTriheptaSpecial[7], PPR::FLOOR, scalef, 37); + bshape(shTriheptaSpecial[12], PPR::FLOOR, scalef, 373); + bshape(shTriheptaSpecial[9], PPR::FLOOR, scalef, 38); + bshape(shTriheptaSpecial[10], PPR::FLOOR, scalef, 39); + bshape(shTriheptaSpecial[11], PPR::FLOOR, scalef, 372); + bshape(shSemiFloorShadow, PPR::FLOOR, scalef, 263); - bshape(shMercuryBridge[0], PPR_FLOOR, scalef*spzoom6, 365); - bshape(shMercuryBridge[1], PPR_FLOOR, scalef*spzoomd7, 366); - bshape(shWindArrow, PPR_HEPTAMARK, scalef, 367); + bshape(shMercuryBridge[0], PPR::FLOOR, scalef*spzoom6, 365); + bshape(shMercuryBridge[1], PPR::FLOOR, scalef*spzoomd7, 366); + bshape(shWindArrow, PPR::HEPTAMARK, scalef, 367); - bshape(shPalaceGate, PPR_STRUCT1, scalef, 47); - bshape(shSemiFeatherFloor[0], PPR_FLOOR, scalef*spzoom6, 48); - bshape(shSemiFeatherFloor[1], PPR_FLOOR, scalef*spzoom6, 49); + bshape(shPalaceGate, PPR::STRUCT1, scalef, 47); + bshape(shSemiFeatherFloor[0], PPR::FLOOR, scalef*spzoom6, 48); + bshape(shSemiFeatherFloor[1], PPR::FLOOR, scalef*spzoom6, 49); - bshape(shSwitchDisk, PPR_FLOOR); for(int i=0; i<=S84; i+=S3) hpcpush(ddi(i, .06) * C0); + bshape(shSwitchDisk, PPR::FLOOR); for(int i=0; i<=S84; i+=S3) hpcpush(ddi(i, .06) * C0); - bshape(shZebra[0], PPR_FLOOR, scalef, 162); - bshape(shZebra[1], PPR_FLOOR, scalef, 163); - bshape(shZebra[2], PPR_FLOOR, scalef, 164); - bshape(shZebra[3], PPR_FLOOR, scalef, 165); - bshape(shZebra[4], PPR_FLOOR, 1, 166); // for nonbitrunc - bshape(shEmeraldFloor[0], PPR_FLOOR, scalef, 167); // 4 - bshape(shEmeraldFloor[1], PPR_FLOOR, scalef, 168); // 12 - bshape(shEmeraldFloor[2], PPR_FLOOR, scalef, 169); // 16 - bshape(shEmeraldFloor[3], PPR_FLOOR, scalef, 170); // 20 - bshape(shEmeraldFloor[4], PPR_FLOOR, scalef, 171); // 28 - bshape(shEmeraldFloor[5], PPR_FLOOR, scalef, 172); // 36 - bshape(shTower[0], PPR_FLOOR_TOWER, scalef, 196); // 4 - bshape(shTower[1], PPR_FLOOR_TOWER, scalef, 197); // 5 - bshape(shTower[2], PPR_FLOOR_TOWER, scalef, 198); // 6 - bshape(shTower[3], PPR_FLOOR_TOWER, scalef, 199); // 8 - bshape(shTower[4], PPR_FLOOR_TOWER, scalef, 200); // 9 - bshape(shTower[5], PPR_FLOOR_TOWER, scalef, 201); // 10 - bshape(shTower[6], PPR_FLOOR_TOWER, scalef, 202); // 10 - bshape(shTower[7], PPR_FLOOR_TOWER, 1, 203); // nonbitrunc 7 - bshape(shTower[8], PPR_FLOOR_TOWER, 1, 204); // nonbitrunc 11 - bshape(shTower[9], PPR_FLOOR_TOWER, 1, 205); // nonbitrunc 15 - bshape(shTower[10], PPR_FLOOR_TOWER, scalef, 206); // Euclidean + bshape(shZebra[0], PPR::FLOOR, scalef, 162); + bshape(shZebra[1], PPR::FLOOR, scalef, 163); + bshape(shZebra[2], PPR::FLOOR, scalef, 164); + bshape(shZebra[3], PPR::FLOOR, scalef, 165); + bshape(shZebra[4], PPR::FLOOR, 1, 166); // for nonbitrunc + bshape(shEmeraldFloor[0], PPR::FLOOR, scalef, 167); // 4 + bshape(shEmeraldFloor[1], PPR::FLOOR, scalef, 168); // 12 + bshape(shEmeraldFloor[2], PPR::FLOOR, scalef, 169); // 16 + bshape(shEmeraldFloor[3], PPR::FLOOR, scalef, 170); // 20 + bshape(shEmeraldFloor[4], PPR::FLOOR, scalef, 171); // 28 + bshape(shEmeraldFloor[5], PPR::FLOOR, scalef, 172); // 36 + bshape(shTower[0], PPR::FLOOR_TOWER, scalef, 196); // 4 + bshape(shTower[1], PPR::FLOOR_TOWER, scalef, 197); // 5 + bshape(shTower[2], PPR::FLOOR_TOWER, scalef, 198); // 6 + bshape(shTower[3], PPR::FLOOR_TOWER, scalef, 199); // 8 + bshape(shTower[4], PPR::FLOOR_TOWER, scalef, 200); // 9 + bshape(shTower[5], PPR::FLOOR_TOWER, scalef, 201); // 10 + bshape(shTower[6], PPR::FLOOR_TOWER, scalef, 202); // 10 + bshape(shTower[7], PPR::FLOOR_TOWER, 1, 203); // nonbitrunc 7 + bshape(shTower[8], PPR::FLOOR_TOWER, 1, 204); // nonbitrunc 11 + bshape(shTower[9], PPR::FLOOR_TOWER, 1, 205); // nonbitrunc 15 + bshape(shTower[10], PPR::FLOOR_TOWER, scalef, 206); // Euclidean // structures & walls - bshape(shBoatOuter, PPR_STRUCT0, scalef, 154); - bshape(shBoatInner, PPR_STRUCT1, scalef, 155); - bshape(shSolidBranch, PPR_STRUCT0, scalef, 235); - bshape(shWeakBranch, PPR_STRUCT0, scalef, 236); - bshape(shFan, PPR_WALL, scalef, 59); + bshape(shBoatOuter, PPR::STRUCT0, scalef, 154); + bshape(shBoatInner, PPR::STRUCT1, scalef, 155); + bshape(shSolidBranch, PPR::STRUCT0, scalef, 235); + bshape(shWeakBranch, PPR::STRUCT0, scalef, 236); + bshape(shFan, PPR::WALL, scalef, 59); // items: - bshape(shElementalShard, PPR_ITEM, scalef, 60); - bshape(shNecro, PPR_ITEM, scalef, 61); - bshape(shFigurine, PPR_ITEM, scalef, 62); - bshape(shStatue, PPR_ITEM, scalef, 63); - bshape(shBook, PPR_ITEM, scalef, 64); - bshape(shBookCover, PPR_ITEMa, scalef, 65); - bshape(shGrail, PPR_ITEM, scalef, 66); - bshape(shGun, PPR_ITEM, scalef, 67); - bshape(shKey, PPR_ITEM, scalef, 68); - bshape(shPirateX, PPR_ITEM, scalef, 124); - bshape(shTreat, PPR_ITEM, scalef, 253); + bshape(shElementalShard, PPR::ITEM, scalef, 60); + bshape(shNecro, PPR::ITEM, scalef, 61); + bshape(shFigurine, PPR::ITEM, scalef, 62); + bshape(shStatue, PPR::ITEM, scalef, 63); + bshape(shBook, PPR::ITEM, scalef, 64); + bshape(shBookCover, PPR::ITEMa, scalef, 65); + bshape(shGrail, PPR::ITEM, scalef, 66); + bshape(shGun, PPR::ITEM, scalef, 67); + bshape(shKey, PPR::ITEM, scalef, 68); + bshape(shPirateX, PPR::ITEM, scalef, 124); + bshape(shTreat, PPR::ITEM, scalef, 253); // first layer monsters - bshape(shTentacleX, PPR_TENTACLE0); + bshape(shTentacleX, PPR::TENTACLE0); drawTentacle(shTentacleX, xcrossf * .25, xcrossf * .1, 10); - bshape(shIBranch, PPR_TENTACLE1); + bshape(shIBranch, PPR::TENTACLE1); drawTentacle(shIBranch, xcrossf * .1, xcrossf * .2, 5); - bshape(shTentacle, PPR_TENTACLE1); + bshape(shTentacle, PPR::TENTACLE1); drawTentacle(shTentacle, xcrossf * .2, xcrossf * .1, 10); - copyshape(shJoint, shDisk, PPR_ONTENTACLE); - bshape(shTentHead, PPR_ONTENTACLE, scalef, 79); - bshape(shWormHead, PPR_ONTENTACLE, scalef, 80); + copyshape(shJoint, shDisk, PPR::ONTENTACLE); + bshape(shTentHead, PPR::ONTENTACLE, scalef, 79); + bshape(shWormHead, PPR::ONTENTACLE, scalef, 80); - bshape(shWormSegment, PPR_TENTACLE1); + bshape(shWormSegment, PPR::TENTACLE1); RING(i) hpcpush(ddi(i, .20 * scalef) * C0); - bshape(shSmallWormSegment, PPR_TENTACLE1); + bshape(shSmallWormSegment, PPR::TENTACLE1); RING(i) hpcpush(ddi(i, .16 * scalef) * C0); - bshape(shWormTail, PPR_TENTACLE1, scalef, 383); - bshape(shSmallWormTail, PPR_TENTACLE1, scalef, 384); + bshape(shWormTail, PPR::TENTACLE1, scalef, 383); + bshape(shSmallWormTail, PPR::TENTACLE1, scalef, 384); - if(nonbitrunc) bshape(shDragonSegment, PPR_TENTACLE1, gp::scale * irr::scale, 233); - else bshape(shDragonSegment, PPR_TENTACLE1, scalef, 234); - bshape(shDragonWings, PPR_ONTENTACLE, scalef, 237); - bshape(shDragonLegs, PPR_TENTACLE0, scalef, 238); - if(nonbitrunc) bshape(shDragonTail, PPR_TENTACLE1, gp::scale * irr::scale, 239); - else bshape(shDragonTail, PPR_TENTACLE1, scalef, 240); - bshape(shDragonNostril, PPR_ONTENTACLE_EYES, scalef, 241); - bshape(shDragonHead, PPR_ONTENTACLE, scalef, 242); + if(nonbitrunc) bshape(shDragonSegment, PPR::TENTACLE1, gp::scale * irr::scale, 233); + else bshape(shDragonSegment, PPR::TENTACLE1, scalef, 234); + bshape(shDragonWings, PPR::ONTENTACLE, scalef, 237); + bshape(shDragonLegs, PPR::TENTACLE0, scalef, 238); + if(nonbitrunc) bshape(shDragonTail, PPR::TENTACLE1, gp::scale * irr::scale, 239); + else bshape(shDragonTail, PPR::TENTACLE1, scalef, 240); + bshape(shDragonNostril, PPR::ONTENTACLE_EYES, scalef, 241); + bshape(shDragonHead, PPR::ONTENTACLE, scalef, 242); ld krsc = 1; if(sphere) krsc *= 1.4; @@ -2173,50 +2175,50 @@ void buildpolys() { if(nonbitrunc && !gp::on && !irr::on && !euclid4) { tentacle_length = 1.52; - bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245); + bshape(shSeaTentacle, PPR::TENTACLE1, 1, 245); } else if(gp::on || irr::on) { tentacle_length = 0.566256 * 1.6 * gp::scale * irr::scale * krsc; - bshape(shSeaTentacle, PPR_TENTACLE1, 1.6 * gp::scale * irr::scale * krsc, 246); + bshape(shSeaTentacle, PPR::TENTACLE1, 1.6 * gp::scale * irr::scale * krsc, 246); } else { tentacle_length = 0.566256 * gp::scale * irr::scale; - bshape(shSeaTentacle, PPR_TENTACLE1, gp::scale * irr::scale, 246); + bshape(shSeaTentacle, PPR::TENTACLE1, gp::scale * irr::scale, 246); } ld ksc = (nonbitrunc ? 1.8 : 1.5) * gp::scale * irr::scale * krsc; if(euclid4 && nonbitrunc) ksc *= .5; - bshape(shKrakenHead, PPR_ONTENTACLE, ksc, 247); - bshape(shKrakenEye, PPR_ONTENTACLE_EYES, ksc, 248); - bshape(shKrakenEye2, PPR_ONTENTACLE_EYES2, ksc, 249); + bshape(shKrakenHead, PPR::ONTENTACLE, ksc, 247); + bshape(shKrakenEye, PPR::ONTENTACLE_EYES, ksc, 248); + bshape(shKrakenEye2, PPR::ONTENTACLE_EYES2, ksc, 249); // monsters - bshape(shGhost, PPR_MONSTER_BODY, scalef, 69); - bshape(shGargoyleWings, PPR_MONSTER_CLOAK, scalef, 70); - bshape(shGargoyleBody, PPR_MONSTER_BODY, scalef, 71); - bshape(shDogStripes, PPR_MONSTER_ARMOR1, scalef, 72); - bshape(shWolf, PPR_MONSTER_BODY, scalef, 73); - bshape(shWolf1, PPR_MONSTER_EYE0, scalef, 74); - bshape(shWolf2, PPR_MONSTER_EYE0, scalef, 75); - bshape(shWolf3, PPR_MONSTER_EYE0, scalef, 76); - bshape(shFoxTail1, PPR_MONSTER_BODY, scalef, 363); - bshape(shFoxTail2, PPR_MONSTER_BODY, scalef, 364); - bshape(shHawk, PPR_MONSTER_BODY, scalef, 77); - bshape(shEagle, PPR_MONSTER_BODY, scalef, 78); - bshape(shWaterElemental, PPR_MONSTER_BODY, scalef, 81); - bshape(shMouse, PPR_MONSTER_BODY, scalef, 82); - bshape(shMouseLegs, PPR_MONSTER_LEG, scalef, 83); - bshape(shMouseEyes, PPR_MONSTER_EYE0, scalef, 84); + bshape(shGhost, PPR::MONSTER_BODY, scalef, 69); + bshape(shGargoyleWings, PPR::MONSTER_CLOAK, scalef, 70); + bshape(shGargoyleBody, PPR::MONSTER_BODY, scalef, 71); + bshape(shDogStripes, PPR::MONSTER_ARMOR1, scalef, 72); + bshape(shWolf, PPR::MONSTER_BODY, scalef, 73); + bshape(shWolf1, PPR::MONSTER_EYE0, scalef, 74); + bshape(shWolf2, PPR::MONSTER_EYE0, scalef, 75); + bshape(shWolf3, PPR::MONSTER_EYE0, scalef, 76); + bshape(shFoxTail1, PPR::MONSTER_BODY, scalef, 363); + bshape(shFoxTail2, PPR::MONSTER_BODY, scalef, 364); + bshape(shHawk, PPR::MONSTER_BODY, scalef, 77); + bshape(shEagle, PPR::MONSTER_BODY, scalef, 78); + bshape(shWaterElemental, PPR::MONSTER_BODY, scalef, 81); + bshape(shMouse, PPR::MONSTER_BODY, scalef, 82); + bshape(shMouseLegs, PPR::MONSTER_LEG, scalef, 83); + bshape(shMouseEyes, PPR::MONSTER_EYE0, scalef, 84); - bshape(shHumanFoot, PPR_MONSTER_FOOT, scalef, 259); - bshape(shHumanLeg, PPR_MONSTER_LEG, scalef, 260); - bshape(shHumanGroin, PPR_MONSTER_GROIN, scalef, 261); - bshape(shHumanNeck, PPR_MONSTER_NECK, scalef, 262); - bshape(shSkeletalFoot, PPR_MONSTER_FOOT, scalef, 264); - bshape(shYetiFoot, PPR_MONSTER_FOOT, scalef, 276); + bshape(shHumanFoot, PPR::MONSTER_FOOT, scalef, 259); + bshape(shHumanLeg, PPR::MONSTER_LEG, scalef, 260); + bshape(shHumanGroin, PPR::MONSTER_GROIN, scalef, 261); + bshape(shHumanNeck, PPR::MONSTER_NECK, scalef, 262); + bshape(shSkeletalFoot, PPR::MONSTER_FOOT, scalef, 264); + bshape(shYetiFoot, PPR::MONSTER_FOOT, scalef, 276); for(int i=0; i<5; i++) for(int j=0; j<4; j++) - bshape(shReptile[i][j], j >= 2 ? PPR_LIZEYE : j == 1 ? PPR_FLOORa : PPR_FLOOR_DRAGON, scalef * gsca(euclid, 1.16), 277+i*4+j); + bshape(shReptile[i][j], j >= 2 ? PPR::LIZEYE : j == 1 ? PPR::FLOORa : PPR::FLOOR_DRAGON, scalef * gsca(euclid, 1.16), 277+i*4+j); shift(shReptile[1][2], 0.316534, -0.136547, 1.057752); shift(shReptile[1][3], 0.340722, -0.059946, 1.058152); @@ -2230,157 +2232,157 @@ void buildpolys() { shift(shReptile[4][2], 0.05, 0, 1.00124921972503929); shift(shReptile[4][3], -0.05, 0, 1.00124921972503929); - bshape(shReptileBody, PPR_MONSTER_BODY, scalef, 297); - bshape(shReptileHead, PPR_MONSTER_HEAD, scalef, 298); - bshape(shReptileFrontFoot, PPR_MONSTER_FOOT, scalef, 299); - bshape(shReptileRearFoot, PPR_MONSTER_FOOT, scalef, 300); - bshape(shReptileFrontLeg, PPR_MONSTER_LEG, scalef, 301); - bshape(shReptileRearLeg, PPR_MONSTER_LEG, scalef, 302); - bshape(shReptileTail, PPR_MONSTER_BODY, scalef, 303); - bshape(shReptileEye, PPR_MONSTER_EYE0, scalef, 304); - bshape(shDodeca, PPR_ITEM, scalef, 305); + bshape(shReptileBody, PPR::MONSTER_BODY, scalef, 297); + bshape(shReptileHead, PPR::MONSTER_HEAD, scalef, 298); + bshape(shReptileFrontFoot, PPR::MONSTER_FOOT, scalef, 299); + bshape(shReptileRearFoot, PPR::MONSTER_FOOT, scalef, 300); + bshape(shReptileFrontLeg, PPR::MONSTER_LEG, scalef, 301); + bshape(shReptileRearLeg, PPR::MONSTER_LEG, scalef, 302); + bshape(shReptileTail, PPR::MONSTER_BODY, scalef, 303); + bshape(shReptileEye, PPR::MONSTER_EYE0, scalef, 304); + bshape(shDodeca, PPR::ITEM, scalef, 305); - bshape(shTerraArmor1, PPR_MONSTER_BODY, scalef, 349); - bshape(shTerraArmor2, PPR_MONSTER_BODY, scalef, 350); - bshape(shTerraArmor3, PPR_MONSTER_BODY, scalef, 351); - bshape(shTerraHead, PPR_MONSTER_HEAD, scalef, 352); - bshape(shTerraFace, PPR_MONSTER_FACE, scalef, 353); - bshape(shJiangShi, PPR_MONSTER_BODY, scalef, 355); - bshape(shJiangShiDress, PPR_MONSTER_BODY, scalef, 356); - bshape(shJiangShiCap1, PPR_MONSTER_HAT0, scalef, 357); - bshape(shJiangShiCap2, PPR_MONSTER_HAT1, scalef, 358); + bshape(shTerraArmor1, PPR::MONSTER_BODY, scalef, 349); + bshape(shTerraArmor2, PPR::MONSTER_BODY, scalef, 350); + bshape(shTerraArmor3, PPR::MONSTER_BODY, scalef, 351); + bshape(shTerraHead, PPR::MONSTER_HEAD, scalef, 352); + bshape(shTerraFace, PPR::MONSTER_FACE, scalef, 353); + bshape(shJiangShi, PPR::MONSTER_BODY, scalef, 355); + bshape(shJiangShiDress, PPR::MONSTER_BODY, scalef, 356); + bshape(shJiangShiCap1, PPR::MONSTER_HAT0, scalef, 357); + bshape(shJiangShiCap2, PPR::MONSTER_HAT1, scalef, 358); - bshape(shPBody, PPR_MONSTER_BODY, scalef, 85); - bshape(shYeti, PPR_MONSTER_BODY, scalef, 86); - bshape(shPSword, PPR_MONSTER_WPN, scalef, 90); - bshape(shFerocityM, PPR_MONSTER_WPN, scalef, 361); - bshape(shFerocityF, PPR_MONSTER_WPN, scalef, 362); - bshape(shPKnife, PPR_MONSTER_WPN, scalef, 91); - bshape(shPirateHook, PPR_MONSTER_WPN, scalef, 92); - bshape(shSabre, PPR_MONSTER_WPN, scalef, 93); - bshape(shHedgehogBlade, PPR_MONSTER_WPN, scalef, 94); - bshape(shHedgehogBladePlayer, PPR_MONSTER_WPN, scalef, 95); - bshape(shFemaleBody, PPR_MONSTER_BODY, scalef, 96); - bshape(shFemaleDress, PPR_MONSTER_ARMOR0, scalef, 97); - bshape(shDemon, PPR_MONSTER_HAIR, scalef, 98); + bshape(shPBody, PPR::MONSTER_BODY, scalef, 85); + bshape(shYeti, PPR::MONSTER_BODY, scalef, 86); + bshape(shPSword, PPR::MONSTER_WPN, scalef, 90); + bshape(shFerocityM, PPR::MONSTER_WPN, scalef, 361); + bshape(shFerocityF, PPR::MONSTER_WPN, scalef, 362); + bshape(shPKnife, PPR::MONSTER_WPN, scalef, 91); + bshape(shPirateHook, PPR::MONSTER_WPN, scalef, 92); + bshape(shSabre, PPR::MONSTER_WPN, scalef, 93); + bshape(shHedgehogBlade, PPR::MONSTER_WPN, scalef, 94); + bshape(shHedgehogBladePlayer, PPR::MONSTER_WPN, scalef, 95); + bshape(shFemaleBody, PPR::MONSTER_BODY, scalef, 96); + bshape(shFemaleDress, PPR::MONSTER_ARMOR0, scalef, 97); + bshape(shDemon, PPR::MONSTER_HAIR, scalef, 98); - bshape(shTrylobite, PPR_MONSTER_BODY, scalef, 99); - bshape(shTrylobiteHead, PPR_MONSTER_HEAD, scalef, 100); - bshape(shTrylobiteBody, PPR_MONSTER_BODY, scalef, 308); - bshape(shTrylobiteFrontClaw, PPR_MONSTER_FOOT, scalef, 309); - bshape(shTrylobiteRearClaw, PPR_MONSTER_FOOT, scalef, 310); - bshape(shTrylobiteFrontLeg, PPR_MONSTER_LEG, scalef, 311); - bshape(shTrylobiteRearLeg, PPR_MONSTER_LEG, scalef, 312); + bshape(shTrylobite, PPR::MONSTER_BODY, scalef, 99); + bshape(shTrylobiteHead, PPR::MONSTER_HEAD, scalef, 100); + bshape(shTrylobiteBody, PPR::MONSTER_BODY, scalef, 308); + bshape(shTrylobiteFrontClaw, PPR::MONSTER_FOOT, scalef, 309); + bshape(shTrylobiteRearClaw, PPR::MONSTER_FOOT, scalef, 310); + bshape(shTrylobiteFrontLeg, PPR::MONSTER_LEG, scalef, 311); + bshape(shTrylobiteRearLeg, PPR::MONSTER_LEG, scalef, 312); - bshape(shBullBody, PPR_MONSTER_BODY, scalef, 315); - bshape(shBullHorn, PPR_MONSTER_HEAD, scalef, 316); - bshape(shBullRearHoof, PPR_MONSTER_FOOT, scalef, 317); - bshape(shBullFrontHoof, PPR_MONSTER_FOOT, scalef, 318); - bshape(shBullHead, PPR_MONSTER_HEAD, scalef, 319); + bshape(shBullBody, PPR::MONSTER_BODY, scalef, 315); + bshape(shBullHorn, PPR::MONSTER_HEAD, scalef, 316); + bshape(shBullRearHoof, PPR::MONSTER_FOOT, scalef, 317); + bshape(shBullFrontHoof, PPR::MONSTER_FOOT, scalef, 318); + bshape(shBullHead, PPR::MONSTER_HEAD, scalef, 319); - bshape(shButterflyBody, PPR_MONSTER_BODY, scalef, 320); - bshape(shButterflyWing, PPR_MONSTER_BODY, scalef, 321); + bshape(shButterflyBody, PPR::MONSTER_BODY, scalef, 320); + bshape(shButterflyWing, PPR::MONSTER_BODY, scalef, 321); - bshape(shGadflyBody, PPR_MONSTER_BODY, scalef * 1.5, 322); - bshape(shGadflyWing, PPR_MONSTER_BODY, scalef * 1.5, 323); - bshape(shGadflyEye, PPR_MONSTER_BODY, scalef * 1.5, 324); + bshape(shGadflyBody, PPR::MONSTER_BODY, scalef * 1.5, 322); + bshape(shGadflyWing, PPR::MONSTER_BODY, scalef * 1.5, 323); + bshape(shGadflyEye, PPR::MONSTER_BODY, scalef * 1.5, 324); - bshape(shGoatHead, PPR_MONSTER_HAIR, scalef, 101); - bshape(shRatHead, PPR_MONSTER_HEAD, scalef, 102); - bshape(shRatEyes, PPR_MONSTER_EYE0, scalef, 103); - bshape(shRatTail, PPR_MONSTER_LEG, scalef, 104); - bshape(shRatCape1, PPR_MONSTER_HOODCLOAK2, scalef, 105); - bshape(shRatCape2, PPR_MONSTER_HOODCLOAK1, scalef, 106); - bshape(shKnightArmor, PPR_MONSTER_ARMOR0, scalef, 107); - bshape(shWightCloak, PPR_MONSTER_CLOAK, scalef, 108); - bshape(shKnightCloak, PPR_MONSTER_CLOAK, scalef, 109); - bshape(shPrincessDress, PPR_MONSTER_ARMOR1, scalef, 110); - bshape(shWizardCape1, PPR_MONSTER_HOODCLOAK1, 1, 111); - bshape(shWizardCape2, PPR_MONSTER_HOODCLOAK2, 1, 112); - bshape(shPrinceDress, PPR_MONSTER_ARMOR0, scalef, 113); - bshape(shArmor, PPR_MONSTER_HAT0, scalef, 114); - bshape(shTurban1, PPR_MONSTER_HAT0, scalef, 115); - bshape(shTurban2, PPR_MONSTER_HAT1, scalef, 116); - bshape(shWizardHat1, PPR_MONSTER_HAT0, 1, 117); - bshape(shWizardHat2, PPR_MONSTER_HAT1, 1, 118); - bshape(shWestHat1, PPR_MONSTER_HAT0, scalef, 119); - bshape(shWestHat2, PPR_MONSTER_HAT1, scalef, 120); - bshape(shGunInHand, PPR_MONSTER_WPN, scalef, 121); - bshape(shVikingHelmet, PPR_MONSTER_HAT0, scalef, 122); - bshape(shRaiderHelmet, PPR_MONSTER_HAT0, scalef, 375); - bshape(shRaiderArmor, PPR_MONSTER_BODY, scalef, 380); - bshape(shRaiderBody, PPR_MONSTER_BODY, scalef, 381); - bshape(shRaiderShirt, PPR_MONSTER_BODY, scalef, 382); - bshape(shHood, PPR_MONSTER_HAT0, scalef, 123); - bshape(shPirateHood, PPR_MONSTER_HAT0, scalef, 125); - bshape(shEyepatch, PPR_MONSTER_HAT1, scalef, 126); - bshape(shPHead, PPR_MONSTER_HEAD, scalef, 127); - shGolemhead = shDisk; shGolemhead.prio = PPR_MONSTER_HEAD; - bshape(shFemaleHair, PPR_MONSTER_HAIR, scalef, 128); - bshape(shWitchHair, PPR_MONSTER_HAIR, scalef, 129); - bshape(shBeautyHair, PPR_MONSTER_HAIR, scalef, 130); - bshape(shFlowerHair, PPR_MONSTER_HAT0, scalef, 131); - bshape(shSuspenders, PPR_MONSTER_ARMOR1, scalef, 132); - bshape(shFlowerHand, PPR_MONSTER_WPN, scalef, 133); - bshape(shPFace, PPR_MONSTER_FACE, scalef, 134); - bshape(shEyes, PPR_MONSTER_EYE0, scalef, 135); - bshape(shShark, PPR_MONSTER_BODY, scalef, 136); - bshape(shBugBody, PPR_MONSTER_BODY, scalef, 137); - bshape(shBugArmor, PPR_MONSTER_ARMOR0, scalef, 138); - bshape(shBugLeg, PPR_MONSTER_BODY, scalef, 306); - bshape(shBugAntenna, PPR_MONSTER_BODY, scalef, 307); - bshape(shCatBody, PPR_MONSTER_BODY, scalef, 139); - bshape(shCatLegs, PPR_MONSTER_LEG, scalef, 140); - bshape(shFamiliarHead, PPR_MONSTER_HEAD, scalef, 141); - bshape(shFamiliarEye, PPR_MONSTER_EYE1, scalef, 142); - bshape(shCatHead, PPR_MONSTER_HEAD, scalef, 143); - bshape(shWolfBody, PPR_MONSTER_BODY, WOLF, 144); - bshape(shWolfHead, PPR_MONSTER_HEAD, WOLF, 145); - bshape(shWolfLegs, PPR_MONSTER_LEG, WOLF, 146); - bshape(shWolfEyes, PPR_MONSTER_EYE0, WOLF, 147); - bshape(shWitchDress, PPR_MONSTER_ARMOR0, scalef, 148); - bshape(shPickAxe, PPR_MONSTER_WPN, scalef, 149); - bshape(shPike, PPR_MONSTER_WPN, scalef, 150); - bshape(shFlailBall, PPR_MONSTER_WPN, scalef, 151); - bshape(shFlailTrunk, PPR_MONSTER_WPN, scalef, 152); - bshape(shFlailChain, PPR_MONSTER_SUBWPN, scalef, 153); - bshape(shHammerHead, PPR_MONSTER_WPN, scalef, 376); + bshape(shGoatHead, PPR::MONSTER_HAIR, scalef, 101); + bshape(shRatHead, PPR::MONSTER_HEAD, scalef, 102); + bshape(shRatEyes, PPR::MONSTER_EYE0, scalef, 103); + bshape(shRatTail, PPR::MONSTER_LEG, scalef, 104); + bshape(shRatCape1, PPR::MONSTER_HOODCLOAK2, scalef, 105); + bshape(shRatCape2, PPR::MONSTER_HOODCLOAK1, scalef, 106); + bshape(shKnightArmor, PPR::MONSTER_ARMOR0, scalef, 107); + bshape(shWightCloak, PPR::MONSTER_CLOAK, scalef, 108); + bshape(shKnightCloak, PPR::MONSTER_CLOAK, scalef, 109); + bshape(shPrincessDress, PPR::MONSTER_ARMOR1, scalef, 110); + bshape(shWizardCape1, PPR::MONSTER_HOODCLOAK1, 1, 111); + bshape(shWizardCape2, PPR::MONSTER_HOODCLOAK2, 1, 112); + bshape(shPrinceDress, PPR::MONSTER_ARMOR0, scalef, 113); + bshape(shArmor, PPR::MONSTER_HAT0, scalef, 114); + bshape(shTurban1, PPR::MONSTER_HAT0, scalef, 115); + bshape(shTurban2, PPR::MONSTER_HAT1, scalef, 116); + bshape(shWizardHat1, PPR::MONSTER_HAT0, 1, 117); + bshape(shWizardHat2, PPR::MONSTER_HAT1, 1, 118); + bshape(shWestHat1, PPR::MONSTER_HAT0, scalef, 119); + bshape(shWestHat2, PPR::MONSTER_HAT1, scalef, 120); + bshape(shGunInHand, PPR::MONSTER_WPN, scalef, 121); + bshape(shVikingHelmet, PPR::MONSTER_HAT0, scalef, 122); + bshape(shRaiderHelmet, PPR::MONSTER_HAT0, scalef, 375); + bshape(shRaiderArmor, PPR::MONSTER_BODY, scalef, 380); + bshape(shRaiderBody, PPR::MONSTER_BODY, scalef, 381); + bshape(shRaiderShirt, PPR::MONSTER_BODY, scalef, 382); + bshape(shHood, PPR::MONSTER_HAT0, scalef, 123); + bshape(shPirateHood, PPR::MONSTER_HAT0, scalef, 125); + bshape(shEyepatch, PPR::MONSTER_HAT1, scalef, 126); + bshape(shPHead, PPR::MONSTER_HEAD, scalef, 127); + shGolemhead = shDisk; shGolemhead.prio = PPR::MONSTER_HEAD; + bshape(shFemaleHair, PPR::MONSTER_HAIR, scalef, 128); + bshape(shWitchHair, PPR::MONSTER_HAIR, scalef, 129); + bshape(shBeautyHair, PPR::MONSTER_HAIR, scalef, 130); + bshape(shFlowerHair, PPR::MONSTER_HAT0, scalef, 131); + bshape(shSuspenders, PPR::MONSTER_ARMOR1, scalef, 132); + bshape(shFlowerHand, PPR::MONSTER_WPN, scalef, 133); + bshape(shPFace, PPR::MONSTER_FACE, scalef, 134); + bshape(shEyes, PPR::MONSTER_EYE0, scalef, 135); + bshape(shShark, PPR::MONSTER_BODY, scalef, 136); + bshape(shBugBody, PPR::MONSTER_BODY, scalef, 137); + bshape(shBugArmor, PPR::MONSTER_ARMOR0, scalef, 138); + bshape(shBugLeg, PPR::MONSTER_BODY, scalef, 306); + bshape(shBugAntenna, PPR::MONSTER_BODY, scalef, 307); + bshape(shCatBody, PPR::MONSTER_BODY, scalef, 139); + bshape(shCatLegs, PPR::MONSTER_LEG, scalef, 140); + bshape(shFamiliarHead, PPR::MONSTER_HEAD, scalef, 141); + bshape(shFamiliarEye, PPR::MONSTER_EYE1, scalef, 142); + bshape(shCatHead, PPR::MONSTER_HEAD, scalef, 143); + bshape(shWolfBody, PPR::MONSTER_BODY, WOLF, 144); + bshape(shWolfHead, PPR::MONSTER_HEAD, WOLF, 145); + bshape(shWolfLegs, PPR::MONSTER_LEG, WOLF, 146); + bshape(shWolfEyes, PPR::MONSTER_EYE0, WOLF, 147); + bshape(shWitchDress, PPR::MONSTER_ARMOR0, scalef, 148); + bshape(shPickAxe, PPR::MONSTER_WPN, scalef, 149); + bshape(shPike, PPR::MONSTER_WPN, scalef, 150); + bshape(shFlailBall, PPR::MONSTER_WPN, scalef, 151); + bshape(shFlailTrunk, PPR::MONSTER_WPN, scalef, 152); + bshape(shFlailChain, PPR::MONSTER_SUBWPN, scalef, 153); + bshape(shHammerHead, PPR::MONSTER_WPN, scalef, 376); // bshape(shScratch, 17, scalef, 156); - bshape(shSkeletonBody, PPR_MONSTER_BODY, scalef, 157); - bshape(shSkull, PPR_MONSTER_HEAD, scalef, 158); - bshape(shSkullEyes, PPR_MONSTER_EYE0, scalef, 159); - bshape(shFishTail, PPR_MONSTER_LEG, scalef, 160); - bshape(shFatBody, PPR_MONSTER_BODY, scalef, 161); - bshape(shAztecHead, PPR_MONSTER_HEAD, scalef, 179); - bshape(shAztecCap, PPR_MONSTER_HAT0, scalef, 180); // 1 114 5 [000000] - bshape(shBatWings, PPR_MONSTER_LEG, scalef, 254); - bshape(shBatBody, PPR_MONSTER_BODY, scalef, 255); - bshape(shBatMouth, PPR_MONSTER_EYE0, scalef, 256); - bshape(shBatFang, PPR_MONSTER_EYE1, scalef, 257); - bshape(shBatEye, PPR_MONSTER_EYE0, scalef, 258); + bshape(shSkeletonBody, PPR::MONSTER_BODY, scalef, 157); + bshape(shSkull, PPR::MONSTER_HEAD, scalef, 158); + bshape(shSkullEyes, PPR::MONSTER_EYE0, scalef, 159); + bshape(shFishTail, PPR::MONSTER_LEG, scalef, 160); + bshape(shFatBody, PPR::MONSTER_BODY, scalef, 161); + bshape(shAztecHead, PPR::MONSTER_HEAD, scalef, 179); + bshape(shAztecCap, PPR::MONSTER_HAT0, scalef, 180); // 1 114 5 [000000] + bshape(shBatWings, PPR::MONSTER_LEG, scalef, 254); + bshape(shBatBody, PPR::MONSTER_BODY, scalef, 255); + bshape(shBatMouth, PPR::MONSTER_EYE0, scalef, 256); + bshape(shBatFang, PPR::MONSTER_EYE1, scalef, 257); + bshape(shBatEye, PPR::MONSTER_EYE0, scalef, 258); - bshape(shDogBody, PPR_MONSTER_BODY, scalef, 265); - bshape(shDogHead, PPR_MONSTER_HEAD, scalef, 266); - bshape(shDogTorso, PPR_MONSTER_BODY, scalef, 267); - bshape(shDogFrontPaw, PPR_MONSTER_FOOT, scalef, 268); - bshape(shDogRearPaw, PPR_MONSTER_FOOT, scalef, 269); - bshape(shDogFrontLeg, PPR_MONSTER_LEG, scalef, 270); - bshape(shDogRearLeg, PPR_MONSTER_LEG, scalef, 271); + bshape(shDogBody, PPR::MONSTER_BODY, scalef, 265); + bshape(shDogHead, PPR::MONSTER_HEAD, scalef, 266); + bshape(shDogTorso, PPR::MONSTER_BODY, scalef, 267); + bshape(shDogFrontPaw, PPR::MONSTER_FOOT, scalef, 268); + bshape(shDogRearPaw, PPR::MONSTER_FOOT, scalef, 269); + bshape(shDogFrontLeg, PPR::MONSTER_LEG, scalef, 270); + bshape(shDogRearLeg, PPR::MONSTER_LEG, scalef, 271); - bshape(shWolfFrontPaw, PPR_MONSTER_FOOT, scalef, 272); - bshape(shWolfRearPaw, PPR_MONSTER_FOOT, scalef, 273); - bshape(shWolfFrontLeg, PPR_MONSTER_LEG, scalef, 274); - bshape(shWolfRearLeg, PPR_MONSTER_LEG, scalef, 275); + bshape(shWolfFrontPaw, PPR::MONSTER_FOOT, scalef, 272); + bshape(shWolfRearPaw, PPR::MONSTER_FOOT, scalef, 273); + bshape(shWolfFrontLeg, PPR::MONSTER_LEG, scalef, 274); + bshape(shWolfRearLeg, PPR::MONSTER_LEG, scalef, 275); // missiles - bshape(shKnife, PPR_MISSILE, scalef, 87); - bshape(shTrapArrow, PPR_MISSILE, scalef, 354); - bshape(shTongue, PPR_MISSILE, scalef, 88); - bshape(shFlailMissile, PPR_MISSILE, scalef, 89); + bshape(shKnife, PPR::MISSILE, scalef, 87); + bshape(shTrapArrow, PPR::MISSILE, scalef, 354); + bshape(shTongue, PPR::MISSILE, scalef, 88); + bshape(shFlailMissile, PPR::MISSILE, scalef, 89); for(int u=0; u<=2; u+=2) { - PPR sh = u ? PPR_ITEM : PPR_MONSTER_LEG; + PPR sh = u ? PPR::ITEM : PPR::MONSTER_LEG; int uz = u?2:1; PPR sh1 = PPR(sh + 1); @@ -2416,17 +2418,17 @@ void buildpolys() { } for(int v=0; v<13; v++) for(int z=0; z<2; z++) - copyshape(shTortoise[v][4+z], shTortoise[v][2+z], PPR(shTortoise[v][2+z].prio + (PPR_CARRIED-PPR_ITEM))); + copyshape(shTortoise[v][4+z], shTortoise[v][2+z], PPR(shTortoise[v][2+z].prio + (PPR::CARRIED-PPR::ITEM))); - if(nonbitrunc) bshape(shMagicSword, PPR_MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 243); - else bshape(shMagicSword, PPR_MAGICSWORD, 1, 244); + if(nonbitrunc) bshape(shMagicSword, PPR::MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 243); + else bshape(shMagicSword, PPR::MAGICSWORD, 1, 244); - if(nonbitrunc) bshape(shMagicShovel, PPR_MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 333); - else bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333); + if(nonbitrunc) bshape(shMagicShovel, PPR::MAGICSWORD, euclid4 ? gp::scale * irr::scale / 2 : gp::scale * irr::scale, 333); + else bshape(shMagicShovel, PPR::MAGICSWORD, 1, 333); bshape(shBead0, PPR(20), 1, 250); bshape(shBead1, PPR(20), 1, 251); - bshape(shArrow, PPR_ARROW, 1, 252); + bshape(shArrow, PPR::ARROW, 1, 252); bshapeend(); @@ -2483,7 +2485,7 @@ void initShape(int sg, int id) { } void queuepolyat(const transmatrix& V, const hpcshape& h, int col, PPR prio) { - if(prio == PPR_DEFAULT) prio = h.prio; + if(prio == PPR::DEFAULT) prio = h.prio; polytodraw& ptd = nextptd(); ptd.kind = pkPoly; @@ -2587,7 +2589,7 @@ void queuestr(int x, int y, int shift, int size, string str, int col, int frame, ptd.u.chr.size = size; ptd.col = darkened(col); ptd.u.chr.frame = frame ? ((poly_outline & ~ 255)+frame) : 0; - ptd.prio = PPR_TEXT; + ptd.prio = PPR::TEXT; } void queuechr(int x, int y, int shift, int size, char chr, int col, int frame, int align) { @@ -2602,10 +2604,10 @@ void queuechr(int x, int y, int shift, int size, char chr, int col, int frame, i ptd.u.chr.align = align; ptd.col = col; ptd.u.chr.frame = frame ? (poly_outline & ~ 255) : 0; - ptd.prio = PPR_TEXT; + ptd.prio = PPR::TEXT; } -void queuecircle(int x, int y, int size, int color, PPR prio = PPR_CIRCLE) { +void queuecircle(int x, int y, int size, int color, PPR prio = PPR::CIRCLE) { polytodraw& ptd = nextptd(); ptd.kind = pkCircle; ptd.u.cir.x = x; @@ -2654,7 +2656,7 @@ void queuecircle(const transmatrix& V, double size, int col) { } void queuemarkerat(const transmatrix& V, int col) { - queuepolyat(V, shTriangle, col, PPR_LINE); + queuepolyat(V, shTriangle, col, PPR::LINE); } long double polydata[] = { diff --git a/rogueviz.cpp b/rogueviz.cpp index 93165e4e..516f4f86 100644 --- a/rogueviz.cpp +++ b/rogueviz.cpp @@ -1054,11 +1054,11 @@ void queuedisk(const transmatrix& V, const colorpair& cp, bool legend, const str if(vertex_shape == 0) ; else if(rog3) { int p = poly_outline; poly_outline = OUTLINE_TRANS; - queuepolyat(V, sh, 0x80, PPR_MONSTER_SHADOW); + queuepolyat(V, sh, 0x80, PPR::MONSTER_SHADOW); poly_outline = p; - if(info) queuelink(info, PPR_MONSTER_HEAD); - queuepolyat(V1 = mscale(V, geom3::BODY), sh, cp.color1, PPR_MONSTER_HEAD); - if(info) queuelink(NULL, PPR_MONSTER_HEAD); + if(info) queuelink(info, PPR::MONSTER_HEAD); + queuepolyat(V1 = mscale(V, geom3::BODY), sh, cp.color1, PPR::MONSTER_HEAD); + if(info) queuelink(NULL, PPR::MONSTER_HEAD); } else { if(info) queuelink(info, sh.prio); @@ -1175,12 +1175,12 @@ bool drawVertex(const transmatrix &V, cell *c, shmup::monster *m) { hyperpoint l2 = T*tC0(spiral::at(1+ei->i+(ei->j-ei->i) * z / (prec+.0))); queueline(l1, l2, col, vid.linequality); l1 = l2; - lastptd().prio = PPR_STRUCT0; + lastptd().prio = PPR::STRUCT0; } } else { queueline(h1, h2, col, 2 + vid.linequality); - lastptd().prio = PPR_STRUCT0; + lastptd().prio = PPR::STRUCT0; } } else { @@ -1210,7 +1210,7 @@ bool drawVertex(const transmatrix &V, cell *c, shmup::monster *m) { storeline(ei->prec, T*h1, T*h2); } queuetable(multidraw ? V : ggmatrix(ei->orig), ei->prec, isize(ei->prec), col, 0, - PPR_STRUCT0); + PPR::STRUCT0); } } /* @@ -1233,9 +1233,9 @@ bool drawVertex(const transmatrix &V, cell *c, shmup::monster *m) { hyperpoint h = tC0(V * m->at); transmatrix V2 = rgpushxto0(h) * ypush(nonbitrunc ? .3 : .2); if(doshow && !behindsphere(V2)) { - if(vd.info) queuelink(vd.info, PPR_TEXT); + if(vd.info) queuelink(vd.info, PPR::TEXT); queuestr(V2, (svg::in ? .28 : .2) * crossf / hcrossf, vd.name, backcolor ? 0x000000 : 0xFFFF00, svg::in ? 0 : 1); - if(vd.info) queuelink(NULL, PPR_TEXT); + if(vd.info) queuelink(NULL, PPR::TEXT); } } @@ -1343,7 +1343,7 @@ bool rogueviz_hud() { transmatrix V = atscreenpos(x, y, vid.radius/8); poly_outline = t->color | 0xFF; - queuepolyat(V, shTriangle, 0, PPR_MONSTER_HEAD); + queuepolyat(V, shTriangle, 0, PPR::MONSTER_HEAD); poly_outline = OUTLINE_DEFAULT; queuestr(int(x-rad), int(y), 0, rad*(svg::in?5:3)/4, t->name, forecolor, 0, 16); @@ -1366,7 +1366,7 @@ void drawExtra() { bool draw = true; for(int i=0; isecond, shDisk, dftcolor, PPR_LINE); + queuepolyat(it->second, shDisk, dftcolor, PPR::LINE); } for(int i=0; itype; i++) curvepoint(V * get_corner_position(c, i)), curvepoint(V * C0); - queuecurve(slave_color, 0, PPR_LINE); + queuecurve(slave_color, 0, PPR::LINE); return false; } @@ -344,7 +344,7 @@ bool texture_config::apply(cell *c, const transmatrix &V, int col) { qfi.spin = applyPatterndir(c, si); if(grid_color) { - draw_floorshape(c, V, shFullFloor, 0, PPR_FLOOR); + draw_floorshape(c, V, shFullFloor, 0, PPR::FLOOR); lastptd().u.poly.outline = grid_color; }