Subversion Repositories gelsvn

Rev

Rev 369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 373
Line 357... Line 357...
357
					stbi_decode_DXT45_alpha_block ( block, compressed );
357
					stbi_decode_DXT45_alpha_block ( block, compressed );
358
					getn( s, compressed, 8 );
358
					getn( s, compressed, 8 );
359
					stbi_decode_DXT_color_block ( block, compressed );
359
					stbi_decode_DXT_color_block ( block, compressed );
360
				}
360
				}
361
				//	is this a partial block?
361
				//	is this a partial block?
362
				if( ref_x + 4 > s->img_x )
362
				if( ref_x + 4 > (int)s->img_x )
363
				{
363
				{
364
					bw = s->img_x - ref_x;
364
					bw = s->img_x - ref_x;
365
				}
365
				}
366
				if( ref_y + 4 > s->img_y )
366
				if( ref_y + 4 > (int)s->img_y )
367
				{
367
				{
368
					bh = s->img_y - ref_y;
368
					bh = s->img_y - ref_y;
369
				}
369
				}
370
				//	now drop our decompressed data into the buffer
370
				//	now drop our decompressed data into the buffer
371
				for( by = 0; by < bh; ++by )
371
				for( by = 0; by < bh; ++by )
Line 385... Line 385...
385
				int block_size = 16;
385
				int block_size = 16;
386
				if( DXT_family == 1 )
386
				if( DXT_family == 1 )
387
				{
387
				{
388
					block_size = 8;
388
					block_size = 8;
389
				}
389
				}
390
				for( i = 1; i < header.dwMipMapCount; ++i )
390
				for( i = 1; i < (int)header.dwMipMapCount; ++i )
391
				{
391
				{
392
					int mx = s->img_x >> (i + 2);
392
					int mx = s->img_x >> (i + 2);
393
					int my = s->img_y >> (i + 2);
393
					int my = s->img_y >> (i + 2);
394
					if( mx < 1 )
394
					if( mx < 1 )
395
					{
395
					{
Line 422... Line 422...
422
			getn( s, &dds_data[cf*s->img_x*s->img_y*s->img_n], s->img_x*s->img_y*s->img_n );
422
			getn( s, &dds_data[cf*s->img_x*s->img_y*s->img_n], s->img_x*s->img_y*s->img_n );
423
			/*	done reading and decoding the main image...
423
			/*	done reading and decoding the main image...
424
				skip MIPmaps if present	*/
424
				skip MIPmaps if present	*/
425
			if( has_mipmap )
425
			if( has_mipmap )
426
			{
426
			{
427
				for( i = 1; i < header.dwMipMapCount; ++i )
427
				for( i = 1; i < (int)header.dwMipMapCount; ++i )
428
				{
428
				{
429
					int mx = s->img_x >> i;
429
					int mx = s->img_x >> i;
430
					int my = s->img_y >> i;
430
					int my = s->img_y >> i;
431
					if( mx < 1 )
431
					if( mx < 1 )
432
					{
432
					{