diff --git a/rogueviz/ads/ads-game.cpp b/rogueviz/ads/ads-game.cpp index f975ca51..5a3df9ef 100644 --- a/rogueviz/ads/ads-game.cpp +++ b/rogueviz/ads/ads-game.cpp @@ -110,6 +110,8 @@ auto shot_hooks = -> editable("automatically rotate the projection", 'a'); param_f(simspeed, "ads_game_simspeed") -> editable(0, 2*TAU, TAU/4, "game speed", "Controls the speed of the game.", 's'); + param_f(scale, "ads_game_scale") + -> editable(0, 2, 0.1, "game scale", "Controls the scaling of game objects.", 'c'); param_f(accel, "ads_game_accel") -> editable(0, 30, 1, "acceleration", "Controls the speed of your ship's acceleration.", 'a'); param_f(time_unit, "ads_time_unit") diff --git a/rogueviz/ads/display.cpp b/rogueviz/ads/display.cpp index 28e1759e..7d97741c 100644 --- a/rogueviz/ads/display.cpp +++ b/rogueviz/ads/display.cpp @@ -108,7 +108,7 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) { auto& shape = *rock.shape; for(int i=0; i displayed; +/** how much should be the objects scaled */ +ld scale = 1; + color_t missile_color = 0xFF0000FF; bool game_over; diff --git a/rogueviz/ads/map.cpp b/rogueviz/ads/map.cpp index 17d7e7bb..047a2647 100644 --- a/rogueviz/ads/map.cpp +++ b/rogueviz/ads/map.cpp @@ -255,7 +255,7 @@ void handle_crashes() { } } if(!game_over) for(int i=0; ipts)) crash_ship(); } diff --git a/rogueviz/ads/shapes.cpp b/rogueviz/ads/shapes.cpp index 231b39b0..8306f363 100644 --- a/rogueviz/ads/shapes.cpp +++ b/rogueviz/ads/shapes.cpp @@ -3,7 +3,7 @@ namespace hr { namespace ads_game { hpcshape shShip; -bool made; +ld made_scale = -1; vector shape_rock = { -0.0176894, 0.0952504, 0.0278998, 0.0966286, 0.0686721, 0.0455547, 0.110983, 0.0122558, 0.0994024, -0.0483395, 0.0517039, -0.0802772, -0.00271848, -0.0706804, -0.0564861, -0.08575, -0.100087, -0.0483411, -0.100031, -0.0102072, -0.0761486, 0.0292356, -0.0639653, 0.077575 }; vector shape_rock2 = {-0.00204264, 0.111665, 0.0374777, 0.119247, 0.0797168, 0.0940249, 0.106214, 0.0326813, 0.121954, -0.0109009, 0.0837905, -0.0865154, 0.0517718, -0.108312, 0.00135972, -0.0802237, -0.0632991, -0.0837181, -0.0980407, -0.0510629, -0.122639, 0.00885725, -0.0817448, 0.0878757, }; @@ -17,13 +17,13 @@ vector shape_airtank = {-0.101054, 0.0134738, -0.0904219, 0.014429, -0.07790 vector shape_ship = { 0.0699706, 0, 0.0509304, 0.019032, 0.0056909, 0.023788, 0.0318813, 0.0309258, 0.0330715, 0.0368693, 0.00331668, 0.0380512, -0.0630665, 0.0699568, -0.0619577, 0.041535, -0.0678691, 0.0415233, -0.0678946, 0.0261072, -0.0572505, 0.0237463, -0.0572505, -0.0237463, -0.0678946, -0.0261072, -0.0678691, -0.0415233, -0.0619577, -0.041535, -0.0630665, -0.0699568, 0.00331668, -0.0380512, 0.0330715, -0.0368693, 0.0318813, -0.0309258, 0.0056909, -0.023788, 0.0509304, -0.019032 }; void make_shape() { - if(made) return; - made = true; + if(made_scale == scale) return; + made_scale = scale; cgi.bshape(shShip, PPR::MONSTER_BODY); int N = isize(shape_ship); vector lst; - for(int i=0; i