Merge lp:~corti-nico/gweled/fixGemBlinking into lp:gweled/legacy

Proposed by Nicola Corti
Status: Merged
Approved by: Daniele Napolitano
Approved revision: 92
Merged at revision: 99
Proposed branch: lp:~corti-nico/gweled/fixGemBlinking
Merge into: lp:gweled/legacy
Diff against target: 61 lines (+11/-6)
1 file modified
src/sge_core.c (+11/-6)
To merge this branch: bzr merge lp:~corti-nico/gweled/fixGemBlinking
Reviewer Review Type Date Requested Status
Daniele Napolitano Approve
Review via email: mp+258804@code.launchpad.net

Description of the change

This patch changes gem blinking using opacity instead of saturation.
This solves bug #720845

To post a comment you must log in.
Revision history for this message
Daniele Napolitano (dnax88) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sge_core.c'
2--- src/sge_core.c 2010-05-22 19:36:24 +0000
3+++ src/sge_core.c 2015-05-11 19:25:36 +0000
4@@ -32,6 +32,10 @@
5 #define ACCELERATION 1.0
6 #define SGE_TIMER_INTERVAL 20
7
8+#define MAX_OPACITY 255
9+#define STEP_OPACITY 20
10+#define BLINK_OPACITY 155
11+
12 // LOCAL FUNCTIONS
13 void invalidate_objects_above (T_SGEObject * object);
14 void invalidate_background_beneath (T_SGEObject * object);
15@@ -91,7 +95,7 @@
16
17 } else {
18
19- if (SGE_OBJECT(object)->opacity < 255
20+ if (SGE_OBJECT(object)->opacity < MAX_OPACITY
21 || SGE_OBJECT(object)->zoom != 1.0)
22 {
23
24@@ -207,16 +211,16 @@
25 invalidate_background_beneath (SGE_OBJECT(object));
26 }
27 if(SGE_OBJECT(object)->blink) {
28- if(SGE_OBJECT(object)->saturation >= 2.0)
29+ if(SGE_OBJECT(object)->opacity >= MAX_OPACITY)
30 SGE_OBJECT(object)->blink_increase = FALSE;
31
32- if(SGE_OBJECT(object)->saturation <= 0.4)
33+ if(SGE_OBJECT(object)->opacity <= BLINK_OPACITY)
34 SGE_OBJECT(object)->blink_increase = TRUE;
35
36 if(SGE_OBJECT(object)->blink_increase)
37- SGE_OBJECT(object)->saturation += 0.2;
38+ SGE_OBJECT(object)->opacity += STEP_OPACITY;
39 else
40- SGE_OBJECT(object)->saturation -= 0.2;
41+ SGE_OBJECT(object)->opacity -= STEP_OPACITY;
42
43 invalidate_background_beneath (SGE_OBJECT(object));
44 }
45@@ -500,7 +504,7 @@
46 object->dest_y = 0;
47
48 object->y_delay = 0;
49- object->opacity = 255;
50+ object->opacity = MAX_OPACITY;
51 object->fadeout = FALSE;
52 object->zoom = 1.0;
53 object->zoomout = FALSE;
54@@ -770,6 +774,7 @@
55 void sge_object_blink_stop (T_SGEObject *object)
56 {
57 object->blink = FALSE;
58+ object->opacity = MAX_OPACITY;
59 }
60
61 void sge_object_animate (T_SGEObject *object, gboolean repeat)

Subscribers

People subscribed via source and target branches