diff --git a/rogueviz/ads/ds-game.cpp b/rogueviz/ads/ds-game.cpp index 21589f73..1811ead8 100644 --- a/rogueviz/ads/ds-game.cpp +++ b/rogueviz/ads/ds-game.cpp @@ -113,7 +113,7 @@ struct rock_generator { ld step = rand_range(0.17, 0.23); for(int i=0; i<45; i++) { cshift += step; - add(spin(alpha + i * TAU / 30) * div_matrix()); + add(spin(alpha + i * TAU / 30) * div_matrix())->subtype = 1; } cshift += rand_range(.3, .7); } @@ -125,7 +125,7 @@ struct rock_generator { ld step = rand_range(0.17, 0.23); for(int i=0; i<45; i++) { cshift += step; - add(spin(alpha + i * TAU / 30) * conv_matrix()); + add(spin(alpha + i * TAU / 30) * conv_matrix())->subtype = 2; } cshift += rand_range(.3, .7); } @@ -214,6 +214,8 @@ rock_generator rockgen, rsrcgen; auto future_shown = 5 * TAU; +auto future_shown_condiv = 2 * TAU; + /** start with a fixed good-looking sequence */ bool demo; @@ -526,8 +528,8 @@ void view_ds_game() { poly_outline = 0xFF; if(rock.type == oMainRock) rock.at.shift = current.shift; - if(rock.at.shift < current.shift - future_shown) continue; - if(rock.at.shift > current.shift + future_shown) continue; + if(current.shift < rock.at.shift - (rock.subtype == 1 ? future_shown_condiv : future_shown)) continue; + if(current.shift > rock.at.shift + (rock.subtype == 2 ? future_shown_condiv : future_shown)) continue; if(1) { dynamicval g(geometry, gSpace435); diff --git a/rogueviz/ads/globals.cpp b/rogueviz/ads/globals.cpp index bf839ea0..012c8d08 100644 --- a/rogueviz/ads/globals.cpp +++ b/rogueviz/ads/globals.cpp @@ -198,10 +198,12 @@ struct ads_object { ld life_start, life_end; cross_result pt_main; vector pts; + int subtype; ads_object(eObjType t, cell *_owner, const ads_matrix& T, color_t _col) : type(t), owner(_owner), at(T), col(_col) { life_start = -HUGE_VAL; life_end = HUGE_VAL; + subtype = 0; } };