Rev 5229 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5229 | Rev 5231 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
8 | __u8 rect_transform(rect* from, rect* to, __u16 step) |
8 | __u8 rect_transform(rect* from, rect* to, __u16 step) |
9 | { |
9 | { |
10 | if (from->width < to->width) |
10 | if (from->width < to->width) |
11 | { |
11 | { |
12 | from->width += (ANIM_STEP << 1); |
12 | from->width += (step << 1); |
13 | if (from->width > to->width) from->width = to->width; |
13 | if (from->width > to->width) from->width = to->width; |
14 | } |
14 | } |
15 | else if (from->width > to->width) |
15 | else if (from->width > to->width) |
16 | { |
16 | { |
17 | from->width -= (ANIM_STEP << 1); |
17 | from->width -= (step << 1); |
18 | if (from->width < to->width) from->width = to->width; |
18 | if (from->width < to->width) from->width = to->width; |
Line 19... | Line 19... | ||
19 | } |
19 | } |
20 | 20 | ||
21 | if (from->height < to->height) |
21 | if (from->height < to->height) |
22 | { |
22 | { |
23 | from->height += (ANIM_STEP << 1); |
23 | from->height += (step << 1); |
24 | if (from->height > to->height) from->height = to->height; |
24 | if (from->height > to->height) from->height = to->height; |
25 | } |
25 | } |
26 | else if (from->height > to->height) |
26 | else if (from->height > to->height) |
27 | { |
27 | { |
28 | from->height -= (ANIM_STEP << 1); |
28 | from->height -= (step << 1); |
Line 29... | Line 29... | ||
29 | if (from->height < to->height) from->height = to->height; |
29 | if (from->height < to->height) from->height = to->height; |
30 | } |
30 | } |
31 | 31 | ||
32 | if (from->x < to->x) |
32 | if (from->x < to->x) |
33 | { |
33 | { |
34 | from->x += ANIM_STEP; |
34 | from->x += step; |
35 | if (from->x > to->x) from->x = to->x; |
35 | if (from->x > to->x) from->x = to->x; |
36 | } |
36 | } |
37 | else if (from->x > to->x) |
37 | else if (from->x > to->x) |
38 | { |
38 | { |
Line 39... | Line 39... | ||
39 | from->x -= ANIM_STEP; |
39 | from->x -= step; |
40 | if (from->x < to->x) from->x = to->x; |
40 | if (from->x < to->x) from->x = to->x; |
41 | } |
41 | } |
42 | 42 | ||
43 | if (from->y < to->y) |
43 | if (from->y < to->y) |
44 | { |
44 | { |
45 | from->y += ANIM_STEP; |
45 | from->y += step; |
46 | if (from->y > to->y) from->y = to->y; |
46 | if (from->y > to->y) from->y = to->y; |
47 | } |
47 | } |
48 | else if (from->y > to->y) |
48 | else if (from->y > to->y) |
Line 49... | Line 49... | ||
49 | { |
49 | { |
50 | from->y -= ANIM_STEP; |
50 | from->y -= step; |