blob: 0cdb93158de14ebe0d0bba4e3716a44338cb850a (
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
 | #include "native.h"
#include "endianutils.h"
#define MAIN_TYPE	CopyRectangleType
#include "macros.h"
UInt32 OSystem_CopyRectToScreen(void *userData68KP) {
// import variables
	SETPTR	(UInt8 *,	dst				)
	SETPTR	(UInt8 *,	buf				)
	SET32	(UInt32,	pitch			)
	SET32	(UInt32,	_offScreenPitch	)
	SET32	(UInt32,	w	)
	SET32	(UInt32,	h	)
// end of import
	if (w == pitch && w == _offScreenPitch) {
		MemMove(dst, buf, w*h);
	} else {
		do {
			MemMove(dst, buf, w);
			dst += _offScreenPitch;
			buf += pitch;
		} while (--h);
	}
	return 0;
}
 |