filename | src/util.c |
changeset | 220:f72f8a7dff88 |
prev | 187:f6ce97841afc |
next | 422:61a0598e07ff |
author | nkeynes |
date | Mon Jan 15 08:32:09 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Break vram routines out into pvr2mem.c Initial (untested) implementation of stride textures Hookup YUV converter code in pvr2.c |
file | annotate | diff | log | raw |
1.1 --- a/src/util.c Tue Aug 01 21:55:38 2006 +00001.2 +++ b/src/util.c Mon Jan 15 08:32:09 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: util.c,v 1.5 2006-08-01 21:55:38 nkeynes Exp $1.6 + * $Id: util.c,v 1.6 2006-09-12 08:36:09 nkeynes Exp $1.7 *1.8 * Miscellaneous utility functions.1.9 *1.10 @@ -61,13 +61,17 @@1.11 }1.12 }1.14 -1.15 void fwrite_dump32( unsigned int *data, unsigned int length, FILE *f )1.16 {1.17 + fwrite_dump32v( data, length, 8, f );1.18 +}1.19 +1.20 +void fwrite_dump32v( unsigned int *data, unsigned int length, int wordsPerLine, FILE *f )1.21 +{1.22 unsigned int i, j;1.23 - for( i =0; i<length>>2; i+=8 ) {1.24 + for( i =0; i<length>>2; i+=wordsPerLine ) {1.25 fprintf( f, "%08X:", i);1.26 - for( j=i; j<i+8; j++ ) {1.27 + for( j=i; j<i+wordsPerLine; j++ ) {1.28 if( j < length )1.29 fprintf( f, " %08X", (unsigned int)(data[j]) );1.30 else
.