revision 306:818c11570593
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 306:818c11570593 |
parent | 305:1191085c5988 |
child | 307:a357a469f5ff |
author | nkeynes |
date | Sun Jan 21 05:23:53 2007 +0000 (17 years ago) |
Add general draw_grid function
test/pvr.c | view | annotate | diff | log |
1.1 --- a/test/pvr.c Thu Jan 18 11:14:01 2007 +00001.2 +++ b/test/pvr.c Sun Jan 21 05:23:53 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: pvr.c,v 1.3 2006-08-18 09:33:19 nkeynes Exp $1.6 + * $Id: pvr.c,v 1.4 2007-01-21 05:23:53 nkeynes Exp $1.7 *1.8 * PVR support code1.9 *1.10 @@ -475,3 +475,19 @@1.11 pvr_init_video(pvr_check_cable(), 1, 2);1.12 }1.14 +void draw_grid( unsigned short *addr, unsigned short colour )1.15 +{1.16 + int x,y;1.17 + unsigned int linesize = 640;1.18 + for( x=0; x<640; x+=32 ) {1.19 + for( y=0; y<480; y++ ) {1.20 + addr[(linesize*y) + x] = colour;1.21 + }1.22 + }1.23 + for( y=0; y<480; y+=32 ) {1.24 + for( x=0; x<640; x++ ) {1.25 + addr[(linesize*y) + x] = colour;1.26 + }1.27 + }1.28 +1.29 +}
.