[Scummvm-cvs-logs] SF.net SVN: scummvm:[38473] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Feb 18 13:26:39 CET 2009


Revision: 38473
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38473&view=rev
Author:   thebluegr
Date:     2009-02-18 12:26:37 +0000 (Wed, 18 Feb 2009)

Log Message:
-----------
Removed some unused GFX driver capability code and flags

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
    scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/include/gfx_driver.h

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-18 12:09:11 UTC (rev 38472)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-18 12:26:37 UTC (rev 38473)
@@ -531,8 +531,6 @@
 	scummvm_exit,
 	scummvm_draw_line,
 	scummvm_draw_filled_rect,
-	NULL,
-	NULL,
 	scummvm_draw_pixmap,
 	scummvm_grab_pixmap,
 	scummvm_update,

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-02-18 12:09:11 UTC (rev 38472)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-02-18 12:26:37 UTC (rev 38473)
@@ -174,11 +174,6 @@
 void
 gfx_free_pixmap(gfx_driver_t *driver, gfx_pixmap_t *pxm) {
 	if (driver) {
-		if (pxm->flags & GFX_PIXMAP_FLAG_INSTALLED) {
-			if (driver->capabilities & GFX_CAPABILITY_PIXMAP_REGISTRY)
-				driver->unregister_pixmap(driver, pxm);
-		}
-
 		if (driver->mode->palette
 		        && pxm->flags & GFX_PIXMAP_FLAG_PALETTE_ALLOCATED
 		        && !(pxm->flags & GFX_PIXMAP_FLAG_DONT_UNALLOCATE_PALETTE)

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-18 12:09:11 UTC (rev 38472)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-18 12:26:37 UTC (rev 38473)
@@ -240,17 +240,6 @@
 _gfxop_install_pixmap(gfx_driver_t *driver, gfx_pixmap_t *pxm) {
 	int error;
 
-	if (driver->capabilities & GFX_CAPABILITY_PIXMAP_REGISTRY
-	        && !(pxm->flags & GFX_PIXMAP_FLAG_INSTALLED)) {
-		error = driver->register_pixmap(driver, pxm);
-
-		if (error) {
-			GFXERROR("driver->register_pixmap() returned error!\n");
-			return error;
-		}
-		pxm->flags |= GFX_PIXMAP_FLAG_INSTALLED;
-	}
-
 	if (driver->mode->palette &&
 	        (!(pxm->flags & GFX_PIXMAP_FLAG_PALETTE_SET))) {
 		int i;
@@ -1540,20 +1529,6 @@
 
 	draw_old = state->mouse_pointer != NULL;
 
-	if (!draw_old
-	        && state->mouse_pointer
-	        && (state->driver->capabilities & GFX_CAPABILITY_POINTER_PIXMAP_REGISTRY))
-		if ((retval = state->driver->unregister_pixmap(state->driver, state->mouse_pointer))) {
-			GFXERROR("Pointer un-registration failed!\n");
-			return retval;
-		}
-
-	if (state->driver->capabilities & GFX_CAPABILITY_POINTER_PIXMAP_REGISTRY) {
-		if ((pxm) && (retval = state->driver->register_pixmap(state->driver, pxm))) {
-			GFXERROR("Pixmap-registering a new mouse pointer failed!\n");
-			return retval;
-		}
-	}
 	draw_new = 0;
 	state->driver->set_pointer(state->driver, pxm);
 	state->mouse_pointer_in_hw = 1;
@@ -1836,8 +1811,7 @@
 		return error_event;
 	}
 
-	if (event.type == SCI_EVT_KEYBOARD
-	        && !(state->driver->capabilities & GFX_CAPABILITY_KEYTRANSLATE)) {
+	if (event.type == SCI_EVT_KEYBOARD) {
 		/* Do we still have to translate the key? */
 
 		event.character = event.data;

Modified: scummvm/trunk/engines/sci/include/gfx_driver.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_driver.h	2009-02-18 12:09:11 UTC (rev 38472)
+++ scummvm/trunk/engines/sci/include/gfx_driver.h	2009-02-18 12:26:37 UTC (rev 38473)
@@ -39,11 +39,7 @@
 
 /* graphics driver hints */
 #define GFX_CAPABILITY_SHADING (1<<0)
-#define GFX_CAPABILITY_PIXMAP_REGISTRY (1<<3)
-#define GFX_CAPABILITY_SCALEABLE_PIXMAPS (1<<4)
 #define GFX_CAPABILITY_STIPPLED_LINES (1<<6)
-#define GFX_CAPABILITY_POINTER_PIXMAP_REGISTRY (1<<8)
-#define GFX_CAPABILITY_KEYTRANSLATE (1<<11)
 
 #define GFX_DEBUG_POINTER (1<<0)
 #define GFX_DEBUG_UPDATES (1<<1)
@@ -90,25 +86,8 @@
 	**
 	** GFX_CAPABILITY_SHADING: draw_filled_rect() supports drawing shaded
 	**    rectangles.
-	** GFX_CAPABILITY_PIXMAP_REGISTRY: System provides a pixmap registry. The
-	**    invoking functions will assume that all pixmaps MUST be registered;
-	**    if this flag is not set, it assumes that pixmaps MUST NOT be
-	**    registered. Note that this excludes pointer pixmaps (see below)
-	** GFX_CAPABILITY_POINTER_PIXMAP_REGISTRY: The system provides a pixmap
-	**    registry which mouse pointers have to be registered in explicitly.
-	**    This MUST be used only if the registry is identical to the 'normal' pixmap
-	**    registry. Otherwise, it MUST be handled manually by the driver,
-	**    unless pointer support is disabled completely.
-	** GFX_CAPABILITY_SCALEABLE_PIXMAPS: Pixmap scaling is fully supported.
-	**    If this capability is flag is set, all pixmaps passed to the driver
-	**    will be unscaled.
 	** GFX_CAPABILITY_STIPPLED_LINES: The driver is able to draw stippled lines
 	**    horizontally and vertically (xl = 0 or yl = 0).
-	** GFX_CAPABILITY_KEYTRANSLATE: The driver's input layer automatically
-	**    handles 'shifted' keys (i.e. turning shift-'a' to 'A' etc.).
-	**    Drivers only need to handle this if they desire to support
-	**    non-US keyboard layouts, usually by localisation methods
-	**    provided by the underlying windowing or operating system.
 	*/
 
 	unsigned int debug_flags; /* Driver debug flags */
@@ -212,26 +191,6 @@
 
 	/*** Pixmap operations ***/
 
-	int (*register_pixmap)(struct _gfx_driver *drv, gfx_pixmap_t *pxm);
-	/* Registers a pixmap with the driver.
-	** Parameters: (gfx_driver_t *) drv: The driver
-	**             (gfx_pixmap_t *) pxm: The pixmap to register
-	** Returns   : GFX_OK or GFX_FATAL
-	** This function may be NULL if GFX_CAPABILITY_PIXMAP_REGISTRY is not
-	** set.
-	** pxm->internal may be used to store any handle or meta information.
-	*/
-
-	int (*unregister_pixmap)(struct _gfx_driver *drv, gfx_pixmap_t *pxm);
-	/* Unregisters a pixmap previously registered with register_pixmap()
-	** Parameters: (gfx_driver_t *) drv: The driver
-	**             (gfx_pixmap_t *) pxm: The pixmap to register
-	** Returns   : (int) GFX_OK or GFX_FATAL, or GFX_ERROR if pxm was
-	**             not registered
-	** Just like register_pixmap(), this function may be NULL unless
-	** GFX_CAPABILITY_PIXMAP_REGISTRY is set.
-	*/
-
 	int (*draw_pixmap)(struct _gfx_driver *drv, gfx_pixmap_t *pxm, int priority,
 	                   rect_t src, rect_t dest, gfx_buffer_t buffer);
 	/* Draws part of a pixmap to the static or back buffer
@@ -245,8 +204,6 @@
 	**             (int) buffer: One of GFX_BUFFER_STATIC and GFX_BUFFER_BACK
 	** Returns   : (int) GFX_OK or GFX_FATAL, or GFX_ERROR if pxm was not
 	**                   (but should have been) registered.
-	** dest.xl and dest.yl must be evaluated and used for scaling if
-	** GFX_CAPABILITY_SCALEABLE_PIXMAPS is supported.
 	*/
 
 	int (*grab_pixmap)(struct _gfx_driver *drv, rect_t src, gfx_pixmap_t *pxm,
@@ -298,8 +255,7 @@
 	** exit() was called in between.
 	** Note that later version of the driver interface may disallow modifying
 	** pic and priority.
-	** pic and priority are always scaled to the appropriate resolution, even
-	** if GFX_CAPABILITY_SCALEABLE_PIXMAPS is set.
+	** pic and priority are always scaled to the appropriate resolution
 	*/
 
 


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