mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-18 15:37:40 +00:00
moving platforms v0
This commit is contained in:
@@ -133,6 +133,17 @@ void load_room(fhstream& f, cell *c) {
|
||||
sscanf(param.c_str(), "%lf%lf", &b->where.x, &b->where.y);
|
||||
r.entities.emplace_back(std::move(b));
|
||||
}
|
||||
else if(cap == "FERRIS") {
|
||||
ld cx, cy, radius; int qty;
|
||||
sscanf(param.c_str(), "%lf%lf%lf%d", &cx, &cy, &radius, &qty);
|
||||
|
||||
for(int i=0; i<qty; i++) {
|
||||
auto b = std::make_unique<ferris_platform>();
|
||||
b->ctr = {cx, cy}; b->radius = radius;
|
||||
b->shift = i * TAU / qty;
|
||||
r.entities.emplace_back(std::move(b));
|
||||
}
|
||||
}
|
||||
else if(cap == "HINT") {
|
||||
auto b = std::make_unique<hint>();
|
||||
sscanf(param.c_str(), "%lf%lf%lf%lf", &b->where.x, &b->where.y, &b->size.x, &b->size.y);
|
||||
|
Reference in New Issue
Block a user