1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 19:37:40 +00:00

ads-game:: configurable scale

This commit is contained in:
Zeno Rogue
2022-09-18 13:03:14 +02:00
parent 00b2dc522a
commit 707247d297
5 changed files with 12 additions and 7 deletions

View File

@@ -108,7 +108,7 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) {
auto& shape = *rock.shape;
for(int i=0; i<isize(shape); i += 2) {
hybrid::in_actual([&]{
auto h = V * rock.at * rots::uxpush(shape[i]) * rots::uypush(shape[i+1]);
auto h = V * rock.at * rots::uxpush(shape[i] * scale) * rots::uypush(shape[i+1] * scale);
cross_result f = cross0(current * h);
rock.pts.push_back(f);
});
@@ -142,7 +142,7 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) {
auto& shape = shape_ship;
for(int i=0; i<isize(shape); i += 2) {
hybrid::in_actual([&]{
auto h = V * rock.at * rgpushxto0(normalize(hyperpoint(shape[i], shape[i+1], 1, 0)));
auto h = V * rock.at * rgpushxto0(normalize(hyperpoint(shape[i] * scale, shape[i+1] * scale, 1, 0)));
pts.push_back(cross0(current * h).h);
});
}