diff options
author | Chris Apers | 2004-09-12 12:40:51 +0000 |
---|---|---|
committer | Chris Apers | 2004-09-12 12:40:51 +0000 |
commit | edc26ee3a7d5d18b2c0bf8750092644123d7fd3d (patch) | |
tree | 75047a5520f5ab731ef036c8eb793bcf308452af /backends/PalmOS/Src | |
parent | 926571bf7938244da5268853ce87798fdf9a08ce (diff) | |
download | scummvm-rg350-edc26ee3a7d5d18b2c0bf8750092644123d7fd3d.tar.gz scummvm-rg350-edc26ee3a7d5d18b2c0bf8750092644123d7fd3d.tar.bz2 scummvm-rg350-edc26ee3a7d5d18b2c0bf8750092644123d7fd3d.zip |
Renamed and use the new ARM macros
svn-id: r15039
Diffstat (limited to 'backends/PalmOS/Src')
-rw-r--r-- | backends/PalmOS/Src/arm/copyrectangle.cpp | 28 | ||||
-rw-r--r-- | backends/PalmOS/Src/arm/copyrectangle.h | 11 | ||||
-rw-r--r-- | backends/PalmOS/Src/arm/widelandscape.cpp | 29 | ||||
-rw-r--r-- | backends/PalmOS/Src/arm/widelandscape.h | 11 | ||||
-rw-r--r-- | backends/PalmOS/Src/arm/wideportrait.cpp | 43 | ||||
-rw-r--r-- | backends/PalmOS/Src/arm/wideportrait.h | 11 |
6 files changed, 133 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/arm/copyrectangle.cpp b/backends/PalmOS/Src/arm/copyrectangle.cpp new file mode 100644 index 0000000000..76850b54d0 --- /dev/null +++ b/backends/PalmOS/Src/arm/copyrectangle.cpp @@ -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; +}
\ No newline at end of file diff --git a/backends/PalmOS/Src/arm/copyrectangle.h b/backends/PalmOS/Src/arm/copyrectangle.h new file mode 100644 index 0000000000..b464eb9f31 --- /dev/null +++ b/backends/PalmOS/Src/arm/copyrectangle.h @@ -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
\ No newline at end of file diff --git a/backends/PalmOS/Src/arm/widelandscape.cpp b/backends/PalmOS/Src/arm/widelandscape.cpp new file mode 100644 index 0000000000..2d3691b8cf --- /dev/null +++ b/backends/PalmOS/Src/arm/widelandscape.cpp @@ -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; +} diff --git a/backends/PalmOS/Src/arm/widelandscape.h b/backends/PalmOS/Src/arm/widelandscape.h new file mode 100644 index 0000000000..5ecbcdd5b7 --- /dev/null +++ b/backends/PalmOS/Src/arm/widelandscape.h @@ -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
\ No newline at end of file diff --git a/backends/PalmOS/Src/arm/wideportrait.cpp b/backends/PalmOS/Src/arm/wideportrait.cpp new file mode 100644 index 0000000000..5cbbcad04c --- /dev/null +++ b/backends/PalmOS/Src/arm/wideportrait.cpp @@ -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; +}
\ No newline at end of file diff --git a/backends/PalmOS/Src/arm/wideportrait.h b/backends/PalmOS/Src/arm/wideportrait.h new file mode 100644 index 0000000000..cb27c2c372 --- /dev/null +++ b/backends/PalmOS/Src/arm/wideportrait.h @@ -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
\ No newline at end of file |