mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fractals: Use constants for screen panning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24258 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
51cb7eb5f2
commit
55240a2e85
3 changed files with 10 additions and 4 deletions
|
@ -139,8 +139,9 @@ static int ilog2_fp(long value) /* calculate integer log2(value_fp_6.26) */
|
|||
static void recalc_parameters(void)
|
||||
{
|
||||
ctx.x_step = (ctx.x_max - ctx.x_min) / LCD_WIDTH;
|
||||
ctx.x_delta = (ctx.x_step * LCD_WIDTH) / 8;
|
||||
ctx.x_delta = X_DELTA(ctx.x_step);
|
||||
ctx.y_step = (ctx.y_max - ctx.y_min) / LCD_HEIGHT;
|
||||
ctx.y_delta = Y_DELTA(ctx.y_step);
|
||||
ctx.y_delta = (ctx.y_step * LCD_HEIGHT) / 8;
|
||||
ctx.step_log2 = ilog2_fp(MIN(ctx.x_step, ctx.y_step));
|
||||
ctx.max_iter = MAX(15, -15 * ctx.step_log2 - 45);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue