[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src i_zodiac.cpp,1.1,1.2
Chris Apers
chrilith at users.sourceforge.net
Sun Sep 12 06:26:02 CEST 2004
Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7790
Modified Files:
i_zodiac.cpp
Log Message:
Added Zodiac code
Index: i_zodiac.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/i_zodiac.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- i_zodiac.cpp 5 Feb 2004 14:00:02 -0000 1.1
+++ i_zodiac.cpp 12 Sep 2004 13:25:15 -0000 1.2
@@ -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
More information about the Scummvm-git-logs
mailing list