aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/arm/drawsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/PalmOS/Src/arm/drawsprite.cpp')
-rwxr-xr-xbackends/PalmOS/Src/arm/drawsprite.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/arm/drawsprite.cpp b/backends/PalmOS/Src/arm/drawsprite.cpp
new file mode 100755
index 0000000000..3c368c17ef
--- /dev/null
+++ b/backends/PalmOS/Src/arm/drawsprite.cpp
@@ -0,0 +1,26 @@
+#include "native.h"
+#include "endianutils.h"
+
+#define MAIN_TYPE DrawSpriteType
+#include "macros.h"
+
+UInt32 Screen_drawSprite(void *userData68KP) {
+// import variables
+ SETPTR (UInt8 * ,sprData );
+ SET16 (UInt16, sprHeight );
+ SET16 (UInt16, sprWidth );
+ SET16 (UInt16, sprPitch );
+ SETPTR (UInt8 * ,dest );
+ SET16 (UInt16, _scrnSizeX );
+// end of import
+
+ for (uint16 cnty = 0; cnty < sprHeight; cnty++) {
+ for (uint16 cntx = 0; cntx < sprWidth; cntx++)
+ if (sprData[cntx])
+ dest[cntx] = sprData[cntx];
+ sprData += sprPitch;
+ dest += _scrnSizeX;
+ }
+
+ return 0;
+}