diff options
author | Chris Apers | 2004-02-05 14:02:24 +0000 |
---|---|---|
committer | Chris Apers | 2004-02-05 14:02:24 +0000 |
commit | 6830942213e4ad02ab895f34d1f547341c3aa81c (patch) | |
tree | 0ceb33ac50d0152c45df4fcd9e90177052c97cdb /backends/PalmOS/Src/arm/copy_rect.cpp | |
parent | ef1b06d8b36997e8572557d112cbd452c1136b96 (diff) | |
download | scummvm-rg350-6830942213e4ad02ab895f34d1f547341c3aa81c.tar.gz scummvm-rg350-6830942213e4ad02ab895f34d1f547341c3aa81c.tar.bz2 scummvm-rg350-6830942213e4ad02ab895f34d1f547341c3aa81c.zip |
Prepare ARM support
svn-id: r12736
Diffstat (limited to 'backends/PalmOS/Src/arm/copy_rect.cpp')
-rw-r--r-- | backends/PalmOS/Src/arm/copy_rect.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/arm/copy_rect.cpp b/backends/PalmOS/Src/arm/copy_rect.cpp new file mode 100644 index 0000000000..64aa1df69c --- /dev/null +++ b/backends/PalmOS/Src/arm/copy_rect.cpp @@ -0,0 +1,27 @@ +#include "PACEInterfaceLib.h" +#include "ArmNative.h" +#include "endianutils.h" +#include "../shared.h" + +unsigned long OSystem_PALMOS_copy_rect(void *userData68KP) { + UInt8* dataP = (UInt8 *)userData68KP; + + UInt8 *dst = (UInt8 *)ReadUnaligned32(dataP + 2); // ->dst + UInt8 *buf = (UInt8 *)ReadUnaligned32(dataP + 6); // ->buf + UInt32 pitch = ReadUnaligned32(dataP + 10); // ->pitch + UInt32 _offScreenPitch = ReadUnaligned32(dataP + 14); // ->_offScreenPitch + UInt32 w = ReadUnaligned32(dataP + 18); // ->w + UInt32 h = ReadUnaligned32(dataP + 22); // ->h + + if (_offScreenPitch == pitch && pitch == w) { + MemMove(dst, buf, h * w); + } else { + do { + MemMove(dst, buf, w); + dst += _offScreenPitch; + buf += pitch; + } while (--h); + } + + return 0; +}
\ No newline at end of file |