diff options
author | Chris Apers | 2004-05-25 13:44:22 +0000 |
---|---|---|
committer | Chris Apers | 2004-05-25 13:44:22 +0000 |
commit | bbd13e5d91c04383cf63d3cd70517e6b4bae8e3b (patch) | |
tree | 3f9e5441eea914646a26709074423599d8ce983f /backends/PalmOS/Src/arm/wide_pt.cpp | |
parent | 662ead7dcc78e594bcdb2888927c7ebccc97cda6 (diff) | |
download | scummvm-rg350-bbd13e5d91c04383cf63d3cd70517e6b4bae8e3b.tar.gz scummvm-rg350-bbd13e5d91c04383cf63d3cd70517e6b4bae8e3b.tar.bz2 scummvm-rg350-bbd13e5d91c04383cf63d3cd70517e6b4bae8e3b.zip |
New ARM functions (sound, copyrect, wide display)
svn-id: r13871
Diffstat (limited to 'backends/PalmOS/Src/arm/wide_pt.cpp')
-rw-r--r-- | backends/PalmOS/Src/arm/wide_pt.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/arm/wide_pt.cpp b/backends/PalmOS/Src/arm/wide_pt.cpp new file mode 100644 index 0000000000..007bfa3481 --- /dev/null +++ b/backends/PalmOS/Src/arm/wide_pt.cpp @@ -0,0 +1,37 @@ +#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; + } +}
\ No newline at end of file |