Logo Search packages:      
Sourcecode: scummvm version File versions  Download package


/* ScummVM - Graphic Adventure Engine
 * ScummVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * $URL$
 * $Id$
#include "graphics/scaler/intern.h"
#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"

SDL_PixelFormat *screenPixelFormat;

extern "C" {
      void PocketPCHalfARM(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int mask, int round);
      // Rounding constants and masks used for different pixel formats
      int roundingconstants[] = { 0x00200802, 0x00201002 };
      int redbluegreenMasks[] = { 0x03E07C1F, 0x07E0F81F };

void HalfScale(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
      int maskUsed = (gBitFormat == 565);
      PocketPCHalfARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height, redbluegreenMasks[maskUsed],roundingconstants[maskUsed]);

Generated by  Doxygen 1.6.0   Back to index