aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/i_zodiac.cpp
diff options
context:
space:
mode:
authorChris Apers2004-09-12 13:25:15 +0000
committerChris Apers2004-09-12 13:25:15 +0000
commit53114674058599844436c83151596f676fe721ba (patch)
tree5d41058c454d6d84649e6fdc7b3bd5100025d920 /backends/PalmOS/Src/i_zodiac.cpp
parent5789eb3204aec1c2e36e0d0185eb00e68ef70792 (diff)
downloadscummvm-rg350-53114674058599844436c83151596f676fe721ba.tar.gz
scummvm-rg350-53114674058599844436c83151596f676fe721ba.tar.bz2
scummvm-rg350-53114674058599844436c83151596f676fe721ba.zip
Added Zodiac code
svn-id: r15056
Diffstat (limited to 'backends/PalmOS/Src/i_zodiac.cpp')
-rw-r--r--backends/PalmOS/Src/i_zodiac.cpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/backends/PalmOS/Src/i_zodiac.cpp b/backends/PalmOS/Src/i_zodiac.cpp
index ef5767fa72..f15d83516f 100644
--- a/backends/PalmOS/Src/i_zodiac.cpp
+++ b/backends/PalmOS/Src/i_zodiac.cpp
@@ -2,5 +2,40 @@
#include "extend.h"
#ifndef DISABLE_TAPWAVE
-// Tapwave code will come here
+
+#include "tapwave.h"
+#include "i_zodiac.h"
+
+// _twBmpV3 = offscreen bitmap, must be set before this call
+Err ZodiacInit(void **ptrP, Int32 w, Int32 h) {
+ Err e;
+
+ TwGfxSurfaceInfoType surface = {
+ sizeof(TwGfxSurfaceInfoType),
+ w, h, w * 2,
+ twGfxLocationAcceleratorMemory,
+ twGfxPixelFormatRGB565_LE
+ };
+
+ e = SysSetOrientation(sysOrientationLandscape);
+ e = TwGfxOpen((TwGfxType **)&_twGfxLib, NULL);
+ e = TwGfxAllocSurface( (TwGfxType *)_twGfxLib,
+ (TwGfxSurfaceType **)&_twSrc,
+ &surface);
+
+ e = TwGfxGetPalmDisplaySurface( (TwGfxType *)_twGfxLib,
+ (TwGfxSurfaceType **)&_twDst);
+
+ return e;
+}
+
+Err ZodiacRelease(void **ptrP) {
+ Err e = errNone;
+
+ TwGfxFreeSurface((TwGfxSurfaceType *)_twSrc);
+ TwGfxClose((TwGfxType *)_twGfxLib);
+
+ return e;
+}
+
#endif