File diff r9110:c1c12a8355e3 → r9111:983de9c5a848
src/blitter/32bpp_optimized.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file 32bpp_optimized.cpp Implementation of the optimized 32 bpp blitter. */
 

	
 
#include "../stdafx.h"
 
#include "../zoom_func.h"
 
#include "../gfx_func.h"
 
#include "../debug.h"
 
#include "32bpp_optimized.hpp"
 

	
 
static FBlitter_32bppOptimized iFBlitter_32bppOptimized;
 

	
 
void Blitter_32bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
 
{
 
	const SpriteLoader::CommonPixel *src, *src_line;
 
	uint32 *dst, *dst_line;
 

	
 
	/* Find where to start reading in the source sprite */
 
	src_line = (const SpriteLoader::CommonPixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
 
	dst_line = (uint32 *)bp->dst + bp->top * bp->pitch + bp->left;
 

	
 
	for (int y = 0; y < bp->height; y++) {
 
		dst = dst_line;
 
		dst_line += bp->pitch;
 

	
 
		src = src_line;
 
		src_line += bp->sprite_width * ScaleByZoom(1, zoom);