1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-25 22:53:19 +00:00

hat:: hat-animations:: shift parameter

This commit is contained in:
Zeno Rogue 2023-03-28 14:36:38 +02:00
parent 1dac5c731b
commit 86838ac307

View File

@ -165,9 +165,11 @@ color_t get_ori_color(void *v, int lev) {
return (rainbow_color(t ? 0.6 : 0.8, alpha / TAU) << 8) | 0xFF;
}
ld hat_shift = 0.7;
void hat_descent() {
ld sca = (3 + sqrt(5)) / 2; // scaling each axis
ld levf = -log(pconf.scale) / log(sca) - 0.7;
ld levf = -log(pconf.scale) / log(sca) - hat_shift;
ld levpart = frac(levf);
int lev = floor(levf);
if(lev < 0) lev = 0, levpart = 0;
@ -237,6 +239,7 @@ void enable_hat_descent() {
auto hd_hook =
arg::add3("-hat-descent", enable_hat_descent)
+ arg::add3("-hat-ori", [] { ori_color = true; })
+ arg::add3("-hat-shift", [] { arg::shift(); hat_shift = arg::argf(); })
+ arg::add3("-hat-normal", [] {
start_game();
heptagon *h = cwt.at->master;