1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

ads:: scale proper times correctly

This commit is contained in:
Zeno Rogue 2024-09-17 17:55:29 +02:00
parent de4f4a5adf
commit cb89e8f1cb
3 changed files with 9 additions and 7 deletions

View File

@ -98,7 +98,7 @@ void draw_game_cell(const cell_to_draw& cd) {
if(view_proper_times) {
string str = hr::format(tformat, cd.center.shift / ads_time_unit);
queuestr(shiftless(rgpushxto0(cd.center.h)), .1, str, 0xFF4040, 8);
queuestr(shiftless(rgpushxto0(cd.center.h)), time_scale * ads_scale, str, 0xFF4040, 8);
}
// need i-loop because new rocks can be created in handle_turret
@ -169,7 +169,7 @@ void draw_game_cell(const cell_to_draw& cd) {
if(view_proper_times && rock.type != oParticle) {
string str = hr::format(tformat, rock.pt_main.shift / ads_time_unit);
queuestr(shiftless(rgpushxto0(rock.pt_main.h)), .1, str, 0xFFFFFF, 8);
queuestr(shiftless(rgpushxto0(rock.pt_main.h)), time_scale * ads_scale, str, 0xFFFFFF, 8);
}
}
@ -215,7 +215,7 @@ void draw_game_cell(const cell_to_draw& cd) {
if(view_proper_times) {
string str = hr::format(tformat, (cr.shift + rock.start) / ads_time_unit);
queuestr(shiftless(rgpushxto0(cr.h)), .1, str, 0xC0C0C0, 8);
queuestr(shiftless(rgpushxto0(cr.h)), time_scale * ads_scale, str, 0xC0C0C0, 8);
}
}
@ -354,7 +354,7 @@ void view_ads_game() {
if(view_proper_times) {
string str = hr::format(tformat, ship_pt / ads_time_unit);
queuestr(shiftless(Id), .1, str, 0xFFFFFF, 8);
queuestr(shiftless(Id), time_scale * ads_scale, str, 0xFFFFFF, 8);
}
}
}

View File

@ -586,7 +586,7 @@ void view_ds_game() {
ld t = rock.pt_main.shift;
if(rock.type == oMainRock) t += current.shift;
string str = hr::format(tformat, t / ds_time_unit);
queuestr(shiftless(sphereflip * rgpushxto0(rock.pt_main.h)), .1, str, 0xFFFF00, 8);
queuestr(shiftless(sphereflip * rgpushxto0(rock.pt_main.h)), time_scale * ds_scale, str, 0xFFFF00, 8);
}
if(rock.pt_main.h[2] > 0.1 && rock.life_end == HUGE_VAL) {
@ -639,7 +639,7 @@ void view_ds_game() {
if(view_proper_times) {
string str = hr::format(tformat, (cr.shift + ss.start) / ds_time_unit);
queuestr(shiftless(sphereflip * rgpushxto0(cr.h)), .1, str, 0xC0C0C0, 8);
queuestr(shiftless(sphereflip * rgpushxto0(cr.h)), time_scale * ds_scale, str, 0xC0C0C0, 8);
}
}
@ -665,7 +665,7 @@ void view_ds_game() {
if(view_proper_times) {
string str = hr::format(tformat, ship_pt / ds_time_unit);
queuestr(shiftless(sphereflip), .1, str, 0xFFFFFF, 8);
queuestr(shiftless(sphereflip), time_scale * ds_scale, str, 0xFFFFFF, 8);
}
}

View File

@ -69,6 +69,8 @@ vector<struct ads_object*> displayed;
ld ads_scale = 1;
ld ds_scale = 1;
ld time_scale = .1;
color_t missile_color = 0xFF0000FF;
bool game_over;