summaryrefslogtreecommitdiffstats
path: root/test/source/mkmodebase.c
diff options
context:
space:
mode:
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 ;