[Scummvm-cvs-logs] SF.net SVN: scummvm:[38280] scummvm/trunk/backends/platform/iphone

vinterstum at users.sourceforge.net vinterstum at users.sourceforge.net
Sun Feb 15 20:09:59 CET 2009


Revision: 38280
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38280&view=rev
Author:   vinterstum
Date:     2009-02-15 19:09:59 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Compatibility fixes for the official iPhone SDK

Modified Paths:
--------------
    scummvm/trunk/backends/platform/iphone/iphone_video.h
    scummvm/trunk/backends/platform/iphone/iphone_video.m
    scummvm/trunk/backends/platform/iphone/osys_iphone.cpp
    scummvm/trunk/backends/platform/iphone/osys_iphone.h

Added Paths:
-----------
    scummvm/trunk/backends/platform/iphone/blit.cpp

Added: scummvm/trunk/backends/platform/iphone/blit.cpp
===================================================================
--- scummvm/trunk/backends/platform/iphone/blit.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/iphone/blit.cpp	2009-02-15 19:09:59 UTC (rev 38280)
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $UR$
+ * $Id$
+ *
+ */
+
+#include "common/scummsys.h"
+#include "blit_arm.h"
+
+void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src, int width, int height, int screenWidth, int screenHeight)
+{	
+	for (int x = width; x > 0; x--) {
+		for (int y = height; y > 0; y--) {
+			*(dst++) = *src;
+			src += screenWidth;
+		}
+		dst -= screenHeight + height - 0;
+		src += 1 - (height - 0) * screenWidth;
+	}
+}
+
+void blitLandscapeScreenRect8bpp(uint16 *dst, byte *src, int width, int height, uint16 *palette, int screenWidth, int screenHeight)
+{
+	for (int x = width; x > 0; x--) {
+		for (int y = height; y > 0; y--) {
+			*(dst++) = palette[*src];
+			src += screenWidth;
+		}
+		dst -= screenHeight + height - 0;
+		src += 1 - (height - 0) * screenWidth;
+	}	
+}


Property changes on: scummvm/trunk/backends/platform/iphone/blit.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/backends/platform/iphone/iphone_video.h
===================================================================
--- scummvm/trunk/backends/platform/iphone/iphone_video.h	2009-02-15 18:58:10 UTC (rev 38279)
+++ scummvm/trunk/backends/platform/iphone/iphone_video.h	2009-02-15 19:09:59 UTC (rev 38280)
@@ -28,14 +28,30 @@
 
 #import <UIKit/UIKit.h>
 #import <Foundation/Foundation.h>
-#import <CoreSurface/CoreSurface.h>
+#import <QuartzCore/QuartzCore.h>
 
-#import <QuartzCore/QuartzCore.h>
 #import "iphone_keyboard.h"
 
+void *CoreSurfaceBufferGetBaseAddress(void* surface);
+int CoreSurfaceBufferLock(void* surface, unsigned int lockType);
+int CoreSurfaceBufferUnlock(void* surface);
+void* CoreSurfaceBufferCreate(CFDictionaryRef dict);
+
+extern CFStringRef kCoreSurfaceBufferGlobal;
+extern CFStringRef kCoreSurfaceBufferMemoryRegion;
+extern CFStringRef kCoreSurfaceBufferPitch;
+extern CFStringRef kCoreSurfaceBufferWidth;
+extern CFStringRef kCoreSurfaceBufferHeight;
+extern CFStringRef kCoreSurfaceBufferPixelFormat;
+extern CFStringRef kCoreSurfaceBufferAllocSize;
+
+struct __GSEvent;
+CGPoint GSEventGetLocationInWindow(struct __GSEvent *ev); 
+unsigned int GSEventDeviceOrientation(struct __GSEvent *ev);
+
 @interface iPhoneView : UIView
 {
-	CoreSurfaceBufferRef _screenSurface;
+	void* _screenSurface;
 	NSMutableArray* _events;
 	NSLock* _lock;
 	SoftKeyboard* _keyboardView;
@@ -51,7 +67,7 @@
 
 - (void)drawRect:(CGRect)frame;
 
-- (CoreSurfaceBufferRef)getSurface;
+- (void *)getSurface;
 
 - (void)initSurface;
 

Modified: scummvm/trunk/backends/platform/iphone/iphone_video.m
===================================================================
--- scummvm/trunk/backends/platform/iphone/iphone_video.m	2009-02-15 18:58:10 UTC (rev 38279)
+++ scummvm/trunk/backends/platform/iphone/iphone_video.m	2009-02-15 19:09:59 UTC (rev 38280)
@@ -27,16 +27,13 @@
 #include "iphone_common.h"
 
 #import <UIKit/UIKit.h>
-#import <GraphicsServices/GraphicsServices.h>
 #import <Foundation/Foundation.h>
-#import <CoreSurface/CoreSurface.h>
 #import <QuartzCore/QuartzCore.h>
 
 static iPhoneView *sharedInstance = nil;
 static int _width = 0;
 static int _height = 0;
 static bool _landscape;
-static int _orientation = -1;
 static CGRect _screenRect;
 
 // static long lastTick = 0;
@@ -126,7 +123,7 @@
 	}
 }
 
-- (CoreSurfaceBufferRef)getSurface {
+- (void *)getSurface {
 	return _screenSurface;
 }
 
@@ -220,9 +217,9 @@
 	[screenLayer setOpaque: YES];
 
 	if (_screenLayer != nil) {
-		[[sharedInstance _layer] replaceSublayer: _screenLayer with: screenLayer];
+		[[sharedInstance layer] replaceSublayer: _screenLayer with: screenLayer];
 	} else {
-		[[sharedInstance _layer] addSublayer: screenLayer];
+		[[sharedInstance layer] addSublayer: screenLayer];
 	}
 	_screenLayer = screenLayer;
 
@@ -396,7 +393,7 @@
 	return TRUE;
 }
 
-- (int)swipe:(int)num withEvent:(GSEvent*)event {
+- (int)swipe:(int)num withEvent:(struct __GSEvent *)event {
 	//printf("swipe: %i\n", num);
 
 	[self addEvent:

Modified: scummvm/trunk/backends/platform/iphone/osys_iphone.cpp
===================================================================
--- scummvm/trunk/backends/platform/iphone/osys_iphone.cpp	2009-02-15 18:58:10 UTC (rev 38279)
+++ scummvm/trunk/backends/platform/iphone/osys_iphone.cpp	2009-02-15 19:09:59 UTC (rev 38280)
@@ -46,9 +46,6 @@
 #include "blit_arm.h"
 #include <sys/time.h>
 
-#include <CoreGraphics/CGDirectDisplay.h>
-#include <CoreSurface/CoreSurface.h>
-
 const OSystem::GraphicsMode OSystem_IPHONE::s_supportedGraphicsModes[] = {
 	{0, 0, 0}
 };
@@ -513,7 +510,7 @@
 				break;
 			}
 		}
-	}	
+	}
 }
 
 Graphics::Surface *OSystem_IPHONE::lockScreen() {

Modified: scummvm/trunk/backends/platform/iphone/osys_iphone.h
===================================================================
--- scummvm/trunk/backends/platform/iphone/osys_iphone.h	2009-02-15 18:58:10 UTC (rev 38279)
+++ scummvm/trunk/backends/platform/iphone/osys_iphone.h	2009-02-15 19:09:59 UTC (rev 38280)
@@ -31,6 +31,7 @@
 #include "common/events.h"
 #include "sound/mixer_intern.h"
 #include "backends/fs/posix/posix-fs-factory.h"
+#include "graphics/colormasks.h"
 
 #include <AudioToolbox/AudioQueue.h>
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list