From a4e3289a9838827431250a220a554666fb78f7bd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 12 May 2019 20:06:24 +0200 Subject: [PATCH] 2d3d:: correct bird levels --- 3d-models.cpp | 19 +++++++++++-------- geometry.cpp | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index dbc4ef2c..0a49ddb7 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -650,6 +650,8 @@ void animate_bird(hpcshape& orig, hpcshape animated[30], ld body) { } } } + for(int i=0; i<30; i++) shift_shape(animated[i], geom3::BIRD); + shift_shape(orig, geom3::BIRD); } void slimetriangle(hyperpoint a, hyperpoint b, hyperpoint c, ld rad, int lev) { @@ -913,10 +915,10 @@ void make_3d_models() { make_revolution_cut(shShark, 180, WDIM == 2 ? -geom3::FLOOR : 0); - make_revolution_cut(shGhost, 60, g); + make_revolution_cut(shGhost, 60, geom3::GHOST + g); - make_revolution_cut(shEagle, 180, 0, 0.05*S); - make_revolution_cut(shHawk, 180, 0, 0.05*S); + make_revolution_cut(shEagle, 180, -geom3::BIRD, 0.05*S); + make_revolution_cut(shHawk, 180, -geom3::BIRD, 0.05*S); make_revolution_cut(shTinyBird, 180, 0, 0.025 * S); make_revolution_cut(shTinyShark, 90); @@ -924,14 +926,14 @@ void make_3d_models() { make_revolution_cut(shGargoyleWings, 180, 0, 0.05*S); make_revolution_cut(shGargoyleBody, 180, 0, 0.05*S); - make_revolution_cut(shGadflyWing, 180, 0, 0.05*S); - make_revolution_cut(shBatWings, 180, 0, 0.05*S); - make_revolution_cut(shBatBody, 180, 0, 0.05*S); + make_revolution_cut(shGadflyWing, 180, -geom3::BIRD, 0.05*S); + make_revolution_cut(shBatWings, 180, -geom3::BIRD, 0.05*S); + make_revolution_cut(shBatBody, 180, -geom3::BIRD, 0.05*S); make_revolution_cut(shJelly, 60); make_revolution(shFoxTail1); make_revolution(shFoxTail2); - make_revolution(shGadflyBody); + make_revolution(shGadflyBody, 180, -geom3::BIRD); for(int i=0; i<8; i++) make_revolution(shAsteroid[i], 360); @@ -940,7 +942,7 @@ void make_3d_models() { make_revolution(shBugArmor, 180, geom3::ABODY); make_revolution_cut(shBugAntenna, 90, geom3::ABODY); - make_revolution_cut(shButterflyBody, 180); + make_revolution_cut(shButterflyBody, 180, -geom3::BIRD); animate_bird(shEagle, shAnimatedEagle, 0.05*S); animate_bird(shTinyBird, shAnimatedTinyEagle, 0.05*S/2); @@ -1047,6 +1049,7 @@ void make_3d_models() { adjust_eye(shWolfEyes, shWolfHead, geom3::AHEAD, geom3::AHEAD, 1); adjust_eye(shReptileEye, shReptileHead, geom3::AHEAD, geom3::AHEAD, 1); + adjust_eye(shGadflyEye, shGadflyBody, -geom3::BIRD, -geom3::BIRD, 1); } #undef S diff --git a/geometry.cpp b/geometry.cpp index 8a4b60bc..096231f8 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -371,8 +371,8 @@ namespace geom3 { ALEG0 = lev_to_factor(human_height * .0 - reduce); ALEG = lev_to_factor(human_height * .2 - reduce); AHEAD = lev_to_factor(human_height * .6 - reduce); - BIRD = lev_to_factor(DIM == 3 ? 0 : (human_wall_ratio+1)/2 * wh * .8); - GHOST = lev_to_factor(DIM == 3 ? 0 : human_height * .5); + BIRD = lev_to_factor(WDIM == 3 ? 0 : (human_wall_ratio+1)/2 * wh * .8); + GHOST = lev_to_factor(WDIM == 3 ? 0 : human_height * .5); FLATEYE = lev_to_factor(human_height * .15); slev = rock_wall_ratio * wh / 3;