[Pkg-wmaker-commits] [wmbubble] 62/207: clean up alpha_cpu and alpha_graph and make more similar
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:03 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbubble.
commit bf9dba20eab07ecc43d0491f8bb7eef39b90771f
Author: Robert Jacobs <rnjacobs at mit.edu>
Date: Thu Aug 11 01:34:46 2011 -0700
clean up alpha_cpu and alpha_graph and make more similar
---
bubblemon.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/bubblemon.c b/bubblemon.c
index 60e87f0..f5b2b00 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -1201,29 +1201,28 @@ int calculate_transparencies(int proximity) {
void alpha_cpu(void) {
- unsigned char * kitptr;
- int y, bob, pos;
- kitptr = cpu_gauge;
+ unsigned char * gaugeptr, *rgbptr;
+ int y, bob;
+ gaugeptr = cpu_gauge;
for (y = 0; y < 9; y++) {
- pos = ((y + (BOX_SIZE-10)) * BOX_SIZE + (BOX_SIZE/2-12))*3;
+ rgbptr = &bm.rgb_buf[((y + (BOX_SIZE-10)) * BOX_SIZE + (BOX_SIZE/2-12))*3];
bob = 75; /* 25 * 3 */
while (bob--) {
- bm.rgb_buf[pos] =
- (blend * bm.rgb_buf[pos] + (256 - blend) * *kitptr++) >> 8;
- pos++;
+ *rgbptr = (blend * *rgbptr + (256 - blend) * *gaugeptr++) >> 8;
+ rgbptr++;
}
}
}
void alpha_graph(void) {
- unsigned char *ptr, *ptr2, src;
+ unsigned char *graphptr, *rgbptr;
int bob;
- ptr = bm.mem_buf;
- ptr2 = bm.rgb_buf;
+ graphptr = bm.mem_buf;
+ rgbptr = bm.rgb_buf;
bob = BOX_SIZE * BOX_SIZE * 3;
while (bob--) {
- src = *ptr2;
- *ptr2++ = (memblend * src + (256 - memblend) * *ptr++) >> 8;
+ *rgbptr = (memblend * *rgbptr + (256 - memblend) * *graphptr++) >> 8;
+ rgbptr++;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git
More information about the Pkg-wmaker-commits
mailing list