From 9c5344289a154e1fa10bdcba7d7f86b2fae37861 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 25 May 2019 04:05:30 +0200 Subject: [PATCH] big carpet --- 3d-models.cpp | 31 ++++++++++++++++++++++++++++--- graph.cpp | 6 +++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index 0e92918a..df49d234 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -992,9 +992,9 @@ void make_3d_models() { for(int i=0; i<14; i++) shift_shape(shTriheptaSpecial[i], geom3::FLOOR); - shift_shape(shBigCarpet1, geom3::FLOOR - geom3::human_height * 1/40); - shift_shape(shBigCarpet2, geom3::FLOOR - geom3::human_height * 2/40); - shift_shape(shBigCarpet3, geom3::FLOOR - geom3::human_height * 3/40); + shift_shape_orthogonally(shBigCarpet1, geom3::FLOOR - geom3::human_height * 1/40); + shift_shape_orthogonally(shBigCarpet2, geom3::FLOOR - geom3::human_height * 2/40); + shift_shape_orthogonally(shBigCarpet3, geom3::FLOOR - geom3::human_height * 3/40); for(int a=0; a<5; a++) for(int b=0; b<4; b++) shift_shape(shReptile[a][b], geom3::FLOOR - geom3::human_height * min(b, 2) / 40); @@ -1091,6 +1091,31 @@ void make_3d_models() { } } shPalaceGate.flags |= POLY_TRIANGLES; + + for(int i=0; i<3; i++) { + + array sh = {&shBigCarpet1, &shBigCarpet2, &shBigCarpet3}; + + bshape(*sh[i], PPR::GFLOORa); + for(int t=0; t dv(vid.texture_step, 16); + texture_order([&] (ld x, ld y) { + using namespace hyperpoint_vec; + ld z = 1-x-y; + ld rad = 2.1 - i * 0.2; + hyperpoint hx = ddi(t*12, -zhexf*rad) * C0; + hyperpoint hy = ddi(t*12+12, -zhexf*rad) * C0; + hyperpoint hz = C0; + hyperpoint h = hx * x + hy * y + hz * z; + h = mid(h, h); + h = orthogonal_move(h, geom3::FLOOR - geom3::human_height * (i+2.5) / 100 * (x+y+1)/2); + hpcpush(h); + }); + } + + sh[i]->flags |= POLY_TRIANGLES; + } + finishshape(); } diff --git a/graph.cpp b/graph.cpp index 41c9a14f..cd7dd767 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5931,9 +5931,9 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { break; case waGiantRug: - queuepoly(V, shBigCarpet1, darkena(0xC09F00, 0, 0xFF)); - queuepoly(V, shBigCarpet2, darkena(0x600000, 0, 0xFF)); - queuepoly(V, shBigCarpet3, darkena(0xC09F00, 0, 0xFF)); + queuepoly(V, shBigCarpet1, darkena(DIM == 3 ? 0 : 0xC09F00, 0, 0xFF)); + queuepoly(V, shBigCarpet2, darkena(DIM == 3 ? 0xC09F00 : 0x600000, 0, 0xFF)); + queuepoly(V, shBigCarpet3, darkena(DIM == 3 ? 0x600000 : 0xC09F00, 0, 0xFF)); break; case waBarrier: