mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-28 08:22:18 +00:00
rope segments now easier to edit
This commit is contained in:
parent
906ee9459b
commit
8f04d0a21f
@ -389,6 +389,7 @@ struct rope_platform : public moving_platform {
|
||||
string glyph() override { return "-"; }
|
||||
string get_name() override { return "Swinging rope"; }
|
||||
string get_help() override { return "A part of a swinging rope."; }
|
||||
void draw() override;
|
||||
};
|
||||
|
||||
struct timed_orb : public entity {
|
||||
|
@ -470,6 +470,19 @@ xy rope_platform::location_at(ld t) {
|
||||
return from_hyper(eupush(to_hyper(ctr)) * xspinpush0(sin(t / game_fps / period * TAU + shift) * max_swing, dist));
|
||||
}
|
||||
|
||||
void rope_platform::draw() {
|
||||
if(cmode == mode::editmap) {
|
||||
for(int a=-50; a<=50; a++) {
|
||||
auto h = from_hyper(eupush(to_hyper(ctr)) * xspinpush0(a/50. * max_swing, dist));
|
||||
curvepoint(eupush(h.x, h.y) * C0);
|
||||
}
|
||||
color_t col = color_t(dist * 0x41268517) | 0xFF;
|
||||
queuecurve(scrm, col, 0, PPR::LINE);
|
||||
}
|
||||
|
||||
moving_platform::draw();
|
||||
}
|
||||
|
||||
xy pendulum_platform::location_at(ld t) {
|
||||
auto h1 = to_hyper(a);
|
||||
auto h2 = to_hyper(b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user