mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
export ptick
This commit is contained in:
parent
889bf3448c
commit
22ce25c396
@ -29,7 +29,7 @@ purehookset hooks_frame, hooks_markers;
|
|||||||
ld animation_factor = 1;
|
ld animation_factor = 1;
|
||||||
int animation_lcm = 0;
|
int animation_lcm = 0;
|
||||||
|
|
||||||
ld ptick(int period, ld phase = 0) {
|
ld ptick(int period, ld phase) {
|
||||||
if(animation_lcm) animation_lcm = animation_lcm * (period / gcd(animation_lcm, period));
|
if(animation_lcm) animation_lcm = animation_lcm * (period / gcd(animation_lcm, period));
|
||||||
return (ticks * animation_factor) / period + phase * 2 * M_PI;
|
return (ticks * animation_factor) / period + phase * 2 * M_PI;
|
||||||
}
|
}
|
||||||
|
1
hyper.h
1
hyper.h
@ -5079,5 +5079,6 @@ extern bool first_cell_to_draw;
|
|||||||
extern int current_rbuffer;
|
extern int current_rbuffer;
|
||||||
extern bool new_projection_needed;
|
extern bool new_projection_needed;
|
||||||
inline void reset_projection() { new_projection_needed = true; }
|
inline void reset_projection() { new_projection_needed = true; }
|
||||||
|
extern ld ptick(int period, ld phase = 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user