[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src/arm wideportrait.cpp,NONE,1.1 wideportrait.h,NONE,1.1

Chris Apers chrilith at users.sourceforge.net
Sun Sep 12 05:42:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src/arm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31435

Added Files:
	wideportrait.cpp wideportrait.h 
Log Message:
Renamed and use the new ARM macros

--- NEW FILE: wideportrait.cpp ---
#include "native.h"
#include "endianutils.h"
#include "../shared.h"

#define MAIN_TYPE	WideType
#include "macros.h"

UInt32 OSystem_updateScreen_widePortrait(void *userData68KP) {
// import variables
	SETPTR(UInt8 *	,dst)
	SETPTR(UInt8 *	,src)
// end of import

	Coord x, y;
	UInt8 *src2	= src;

	for (x = 0; x < WIDE_HALF_WIDTH; x++) {
		for (y = 0; y < WIDE_HALF_HEIGHT; y++) {
			*dst++ = *src;
			src += WIDE_PITCH;
			*dst++ = *src;
			*dst++ = *src;
			src += WIDE_PITCH;
		}
		src = --src2;
		dst += 20; // we draw 200pix scaled to 1.5 = 300, screen width=320, so next is 20

		for (y = 0; y < WIDE_HALF_HEIGHT; y++) {
			*dst++ = *src;
			src += WIDE_PITCH;
			*dst++ = *src;
			*dst++ = *src;
			src += WIDE_PITCH;
		}
		src = --src2;
		dst += 20;

		MemMove(dst, dst - WIDE_PITCH, 300);	// 300 = 200 x 1.5
		dst += WIDE_PITCH;
	}
	
	return 0;
}
--- NEW FILE: wideportrait.h ---
#ifndef __WIDE_PT_H__
#define __WIDE_PT_H__

#include <PalmOS.h>

#define COMPILE_WIDEPORTRAIT
#define COMPILE_PACE

UInt32 OSystem_updateScreen_widePortrait(void *userData68KP);

#endif




More information about the Scummvm-git-logs mailing list