[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src/arm copy_rect.h,NONE,1.1 pa1_snd.cpp,NONE,1.1 pa1_snd.h,NONE,1.1 stream_snd.cpp,NONE,1.1 stream_snd.h,NONE,1.1 wide_ls.cpp,NONE,1.1 wide_ls.h,NONE,1.1 wide_pt.cpp,NONE,1.1 wide_pt.h,NONE,1.1

Chris Apers chrilith at users.sourceforge.net
Tue May 25 06:45:16 CEST 2004


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

Added Files:
	copy_rect.h pa1_snd.cpp pa1_snd.h stream_snd.cpp stream_snd.h 
	wide_ls.cpp wide_ls.h wide_pt.cpp wide_pt.h 
Log Message:
New ARM functions (sound, copyrect, wide display)

--- NEW FILE: copy_rect.h ---
#ifndef __WIDE_LS_H__
#define __WIDE_LS_H__

#include <PalmOS.h>

#define COMPILE_OCOPYRECT
#define COMPILE_PACE

void O_CopyRectToScreen(void *userData68KP);

#endif
--- NEW FILE: pa1_snd.cpp ---
#include "snd_pa1.cpp"
--- NEW FILE: pa1_snd.h ---
#ifndef __PA1_SND_H__
#define __PA1_SND_H__

#include <PalmOS.h>

#define COMPILE_PA1SND

void pcm2adpcm(Int16 *src, UInt8 *dst, UInt32 length);

#endif
--- NEW FILE: stream_snd.cpp ---
#include "snd_stream.cpp"
--- NEW FILE: stream_snd.h ---
#ifndef __PA1_SND_H__
#define __PA1_SND_H__

#include <PalmOS.h>

#define COMPILE_STREAMSND
#define COMPILE_PACE

Err sndCallback(void* UserDataP, SndStreamRef stream, void* bufferP, UInt32 *bufferSizeP);

#endif
--- NEW FILE: wide_ls.cpp ---
#include "ArmNative.h"
#include "endianutils.h"
#include "../shared.h"

void O_WideLandscape(void *userData68KP) {
	OSysWidePtr dataP = (OSysWideType *)userData68KP;

	Coord x, y;
	UInt8 *dst = (UInt8 *)ReadUnaligned32(&(dataP->dst));
	UInt8 *src = (UInt8 *)ReadUnaligned32(&(dataP->src));

	for (y = 0; y < WIDE_HALF_HEIGHT; y++) {
		// draw 2 lines
		for (x = 0; x < WIDE_FULL_WIDTH; x++) {
			*dst++ = *src++;
			*dst++ = *src;
			*dst++ = *src++;
		}
		// copy the second to the next line
		MemMove(dst, dst - 480, 480);
		dst += 480;
	}
}

--- NEW FILE: wide_ls.h ---
#ifndef __WIDE_LS_H__
#define __WIDE_LS_H__

#include <PalmOS.h>

#define COMPILE_OWIDELS
#define COMPILE_PACE

void O_WideLandscape(void *userData68KP);

#endif
--- NEW FILE: wide_pt.cpp ---
#include "ArmNative.h"
#include "endianutils.h"
#include "../shared.h"

void O_WidePortrait(void *userData68KP) {
	OSysWidePtr dataP = (OSysWideType *)userData68KP;

	Coord x, y;
	UInt8 *dst	= (UInt8 *)ReadUnaligned32(&(dataP->dst));
	UInt8 *src1	= (UInt8 *)ReadUnaligned32(&(dataP->src));
	UInt8 *src2	= src1;

	for (x = 0; x < WIDE_HALF_WIDTH; x++) {
		for (y = 0; y < WIDE_HALF_HEIGHT; y++) {
			*dst++ = *src1;
			src1 += WIDE_PITCH;
			*dst++ = *src1;
			*dst++ = *src1;
			src1 += WIDE_PITCH;
		}
		src1 = --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++ = *src1;
			src1 += WIDE_PITCH;
			*dst++ = *src1;
			*dst++ = *src1;
			src1 += WIDE_PITCH;
		}
		src1 = --src2;
		dst += 20;

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

#include <PalmOS.h>

#define COMPILE_OWIDEPT
#define COMPILE_PACE

void O_WidePortrait(void *userData68KP);

#endif




More information about the Scummvm-git-logs mailing list