From 8c98d2f30e9fea652bd201072ffa98ef26985b9a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 25 Jun 2024 11:18:55 +0200 Subject: [PATCH] ads:: using the new 'twisted' names --- rogueviz/ads/ads-game.cpp | 2 +- rogueviz/ads/control.cpp | 2 +- rogueviz/ads/display.cpp | 12 ++++++------ rogueviz/ads/ds-game.cpp | 2 +- rogueviz/ads/map.cpp | 8 ++++---- rogueviz/ads/views.cpp | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rogueviz/ads/ads-game.cpp b/rogueviz/ads/ads-game.cpp index e4c43d90..95f34546 100644 --- a/rogueviz/ads/ads-game.cpp +++ b/rogueviz/ads/ads-game.cpp @@ -94,7 +94,7 @@ void restart() { void run_ads_game() { - if(!sl2) set_geometry(gRotSpace); + if(!sl2) set_geometry(gTwistedProduct); if(hybrid::csteps) { stop_game(); hybrid::csteps = 0; diff --git a/rogueviz/ads/control.cpp b/rogueviz/ads/control.cpp index 1ad6cbba..5b3ae92b 100644 --- a/rogueviz/ads/control.cpp +++ b/rogueviz/ads/control.cpp @@ -177,7 +177,7 @@ bool ads_turn(int idelta) { if(!paused) { pdata.fuel -= dv; - gen_particles(rpoisson(dv*fuel_particle_qty), vctr, ads_inverse(current * vctrV) * spin(ang*degree+M_PI) * rots::uxpush(0.06 * ads_scale), rsrc_color[rtFuel], fuel_particle_rapidity, fuel_particle_life, 0.02); + gen_particles(rpoisson(dv*fuel_particle_qty), vctr, ads_inverse(current * vctrV) * spin(ang*degree+M_PI) * twist::uxpush(0.06 * ads_scale), rsrc_color[rtFuel], fuel_particle_rapidity, fuel_particle_life, 0.02); } ld tc = 0; diff --git a/rogueviz/ads/display.cpp b/rogueviz/ads/display.cpp index 23fe9874..8b6b40ba 100644 --- a/rogueviz/ads/display.cpp +++ b/rogueviz/ads/display.cpp @@ -29,7 +29,7 @@ void apply_duality(shiftmatrix& S) { } void draw_game_cell(const cell_to_draw& cd) { - bool hv = rotspace; + bool hv = mtwisted; using cellptr = cell*; const cellptr& c = cd.c; const ads_matrix& V = cd.V; @@ -118,7 +118,7 @@ void draw_game_cell(const cell_to_draw& cd) { } hybrid::in_actual([&]{ - dynamicval b(geometry, gRotSpace); + dynamicval b(geometry, gTwistedProduct); auto h = V * rock.at; rock.pt_main = cross0(current * h); }); @@ -130,7 +130,7 @@ void draw_game_cell(const cell_to_draw& cd) { auto& shape = *rock.shape; for(int i=0; i rock.life_end) continue; for(int i=0; i b(geometry, gRotSpace); + dynamicval b(geometry, gTwistedProduct); auto h = V * rock.at; cr = cross0(current * h); }); diff --git a/rogueviz/ads/ds-game.cpp b/rogueviz/ads/ds-game.cpp index cdc32b99..ee04d8ce 100644 --- a/rogueviz/ads/ds-game.cpp +++ b/rogueviz/ads/ds-game.cpp @@ -367,7 +367,7 @@ bool ds_turn(int idelta) { if(!paused) { pdata.fuel -= dv; - ds_gen_particles(rpoisson(dv*fuel_particle_qty), inverse(current.T) * spin(ang*degree+M_PI) * rots::uxpush(0.06 * ds_scale), current.shift, rsrc_color[rtFuel], fuel_particle_rapidity, fuel_particle_life, 0.02); + ds_gen_particles(rpoisson(dv*fuel_particle_qty), inverse(current.T) * spin(ang*degree+M_PI) * twist::uxpush(0.06 * ds_scale), current.shift, rsrc_color[rtFuel], fuel_particle_rapidity, fuel_particle_life, 0.02); } ld tc = 0; diff --git a/rogueviz/ads/map.cpp b/rogueviz/ads/map.cpp index 83428c2f..a9fdf1d1 100644 --- a/rogueviz/ads/map.cpp +++ b/rogueviz/ads/map.cpp @@ -138,7 +138,7 @@ void add_rock(cell *c, cellinfo& ci, const ads_matrix& T) { r->resource = rt; r->expire = gen_expire(); r->shape = &(rand() % 2 ? shape_rock2 : shape_rock); - if(geometry != gRotSpace) { println(hlog, "wrong geometry detected in gen_rocks 2!"); exit(1); } + if(geometry != gTwistedProduct) { println(hlog, "wrong geometry detected in gen_rocks 2!"); exit(1); } int q = 0; auto cleanup = [&] (cell *c, ld t) { @@ -159,7 +159,7 @@ void add_rock(cell *c, cellinfo& ci, const ads_matrix& T) { h[2] = 0; h[3] = 1; */ if(0) for(int i=0; i<4; i++) { - hyperpoint h = spin(90*degree*i) * rots::uxpush(0.15) * C0; + hyperpoint h = spin(90*degree*i) * twist::uxpush(0.15) * C0; compute_life(hybrid::get_at(c, 0), unshift(r->at) * rgpushxto0(h), cleanup); } ci.rocks.emplace_back(std::move(r)); @@ -189,7 +189,7 @@ void gen_rocks(cell *c, cellinfo& ci, int radius) { } hybrid::in_actual([&] { - add_rock(c, ci, ads_matrix(spin(alpha) * rots::uxpush(r/2) * chg_shift(randd() * TAU) * spin(randd() * TAU) * lorentz(0, 3, randd() * rock_max_rapidity))); + add_rock(c, ci, ads_matrix(spin(alpha) * twist::uxpush(r/2) * chg_shift(randd() * TAU) * spin(randd() * TAU) * lorentz(0, 3, randd() * rock_max_rapidity))); }); } } @@ -248,7 +248,7 @@ void ads_crash_ship() { void handle_crashes() { if(paused) return; - if(rotspace) { + if(mtwisted) { if(!currentmap) { println(hlog, "no currentmap!"); return; } PIU({ handle_crashes(); }); return; diff --git a/rogueviz/ads/views.cpp b/rogueviz/ads/views.cpp index 19b1541f..a037605b 100644 --- a/rogueviz/ads/views.cpp +++ b/rogueviz/ads/views.cpp @@ -32,7 +32,7 @@ void switch_spacetime_to(bool b) { } bool in_spacetime() { - return main_rock ? hyperbolic : rotspace; + return main_rock ? hyperbolic : mtwisted; } void switch_spacetime() { @@ -145,7 +145,7 @@ void replay_animation() { centerover->wall = waNone; } - if(!main_rock && rotspace) { + if(!main_rock && mtwisted) { check_cgi(); ads_matrix CV = current * vctrV;