mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
Renamed and use the new ARM macros
svn-id: r15039
This commit is contained in:
parent
926571bf79
commit
edc26ee3a7
28
backends/PalmOS/Src/arm/copyrectangle.cpp
Normal file
28
backends/PalmOS/Src/arm/copyrectangle.cpp
Normal file
@ -0,0 +1,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;
|
||||
}
|
11
backends/PalmOS/Src/arm/copyrectangle.h
Normal file
11
backends/PalmOS/Src/arm/copyrectangle.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __WIDE_LS_H__
|
||||
#define __WIDE_LS_H__
|
||||
|
||||
#include <PalmOS.h>
|
||||
|
||||
#define COMPILE_COPYRECT
|
||||
#define COMPILE_PACE
|
||||
|
||||
UInt32 OSystem_CopyRectToScreen(void *userData68KP);
|
||||
|
||||
#endif
|
29
backends/PalmOS/Src/arm/widelandscape.cpp
Normal file
29
backends/PalmOS/Src/arm/widelandscape.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#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;
|
||||
}
|
11
backends/PalmOS/Src/arm/widelandscape.h
Normal file
11
backends/PalmOS/Src/arm/widelandscape.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __WIDE_LS_H__
|
||||
#define __WIDE_LS_H__
|
||||
|
||||
#include <PalmOS.h>
|
||||
|
||||
#define COMPILE_WIDELANDSCAPE
|
||||
#define COMPILE_PACE
|
||||
|
||||
UInt32 OSystem_updateScreen_wideLandscape(void *userData68KP);
|
||||
|
||||
#endif
|
43
backends/PalmOS/Src/arm/wideportrait.cpp
Normal file
43
backends/PalmOS/Src/arm/wideportrait.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
#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;
|
||||
}
|
11
backends/PalmOS/Src/arm/wideportrait.h
Normal file
11
backends/PalmOS/Src/arm/wideportrait.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __WIDE_PT_H__
|
||||
#define __WIDE_PT_H__
|
||||
|
||||
#include <PalmOS.h>
|
||||
|
||||
#define COMPILE_WIDEPORTRAIT
|
||||
#define COMPILE_PACE
|
||||
|
||||
UInt32 OSystem_updateScreen_widePortrait(void *userData68KP);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user