summaryrefslogtreecommitdiffstats
path: root/test/source/mkmodebase.c
diff options
context:
space:
mode:
authorHenning Makholm <henning@makholm.net>2006-02-11 18:00:00 (EST)
committer Julien Jorge <julien.jorge@stuff-o-matic.com>2013-01-10 16:03:45 (EST)
commit00a8b13b5bf8cf2c367a0db3ae09086e45230968 (patch)
tree2cf634f141fc82b26bf1cfcc9de4c6f194208905 /test/source/mkmodebase.c
parent03c71dffc5d7bcb4686260b21aaa268d68310613 (diff)
downloadxcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.zip
xcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.tar.gz
xcftools-00a8b13b5bf8cf2c367a0db3ae09086e45230968.tar.bz2
Import of release 0.9
Diffstat (limited to 'test/source/mkmodebase.c')
-rw-r--r--test/source/mkmodebase.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/source/mkmodebase.c b/test/source/mkmodebase.c
index 3e5c656..376be12 100644
--- a/test/source/mkmodebase.c
+++ b/test/source/mkmodebase.c
@@ -7,17 +7,14 @@
void
makepixel(int x,int y,int *r,int *g,int *b,int *a) {
- if( y < 3 || y >= 61 ) {
+ if( x < 3 || x >= 61 ) {
*a = 0 ;
return ;
}
- if( x < 3 || x >= 61 ||
- y < 6 || y >= 58 ) {
- *r=*g=*b=*a=255 ;
- return ;
- }
- if( x < 6 || x >= 58 ) {
- *a=0 ;
+ if( y < 3 || y >= 61 ||
+ x < 6 || x >= 58 ) {
+ *a = 255 ;
+ *r=*g=*b= 255*(x>=32) ;
return ;
}
x -= 6 ;
@@ -39,8 +36,8 @@ makepixel(int x,int y,int *r,int *g,int *b,int *a) {
x -= 17 ;
if( x <= 17 ) {
*r = (17-x)*15 ;
- *g = 255 ;
- *b = x*15 ;
+ *g = (17-x)*15 ;
+ *b = (x-1)*15 ;
return ;
}
*r=255 ;