aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/arm/widelandscape.cpp
blob: c1b47d2cc9909dc3af83cb68f0f830fe6f144039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "native.h"
#include "endianutils.h"
#include "../shared.h"

#define MAIN_TYPE	WideType
#include "macros.h"

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

	Coord x, y;

	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;
	}
	
	return 0;
}