[Scummvm-cvs-logs] SF.net SVN: scummvm:[35638] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Dec 31 16:11:39 CET 2008


Revision: 35638
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35638&view=rev
Author:   fingolfin
Date:     2008-12-31 15:11:39 +0000 (Wed, 31 Dec 2008)

Log Message:
-----------
Removed Graphics::ImageMan. Nothing uses it

Modified Paths:
--------------
    scummvm/trunk/dists/codeblocks/scummvm.cbp
    scummvm/trunk/dists/codeblocks/scummvm.depend
    scummvm/trunk/dists/codeblocks/scummvm.layout
    scummvm/trunk/dists/msvc7/scummvm.vcproj
    scummvm/trunk/dists/msvc71/scummvm.vcproj
    scummvm/trunk/dists/msvc8/scummvm.vcproj
    scummvm/trunk/dists/msvc9/scummvm.vcproj
    scummvm/trunk/graphics/module.mk

Removed Paths:
-------------
    scummvm/trunk/graphics/imageman.cpp
    scummvm/trunk/graphics/imageman.h

Modified: scummvm/trunk/dists/codeblocks/scummvm.cbp
===================================================================
--- scummvm/trunk/dists/codeblocks/scummvm.cbp	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/codeblocks/scummvm.cbp	2008-12-31 15:11:39 UTC (rev 35638)
@@ -4470,16 +4470,6 @@
 			<Option link="0" />
 			<Option target="default" />
 		</Unit>
-		<Unit filename="..\..\graphics\imageman.cpp">
-			<Option compilerVar="CPP" />
-			<Option target="default" />
-		</Unit>
-		<Unit filename="..\..\graphics\imageman.h">
-			<Option compilerVar="CPP" />
-			<Option compile="0" />
-			<Option link="0" />
-			<Option target="default" />
-		</Unit>
 		<Unit filename="..\..\graphics\mpeg_player.cpp">
 			<Option compilerVar="CPP" />
 			<Option target="default" />

Modified: scummvm/trunk/dists/codeblocks/scummvm.depend
===================================================================
--- scummvm/trunk/dists/codeblocks/scummvm.depend	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/codeblocks/scummvm.depend	2008-12-31 15:11:39 UTC (rev 35638)
@@ -599,19 +599,6 @@
 	"common/stream.h"
 	"graphics/surface.h"
 
-1173402496 source:c:\documents and settings\usoquotidiano\desktop\scummvm\graphics\imageman.cpp
-	"graphics/imagedec.h"
-	"graphics/imageman.h"
-	"graphics/surface.h"
-
-1173402496 c:\documents and settings\usoquotidiano\desktop\scummvm\graphics\imageman.h
-	"common/stdafx.h"
-	"common/scummsys.h"
-	"common/singleton.h"
-	"common/str.h"
-	"common/list.h"
-	"common/unzip.h"
-
 1173402496 source:c:\documents and settings\usoquotidiano\desktop\scummvm\graphics\primitives.cpp
 	"common/stdafx.h"
 	"common/util.h"

Modified: scummvm/trunk/dists/codeblocks/scummvm.layout
===================================================================
--- scummvm/trunk/dists/codeblocks/scummvm.layout	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/codeblocks/scummvm.layout	2008-12-31 15:11:39 UTC (rev 35638)
@@ -220,12 +220,6 @@
 	<File name="..\..\graphics\imagedec.h" open="0" top="0" tabpos="0">
 		<Cursor position="1186" topLine="16" />
 	</File>
-	<File name="..\..\graphics\imageman.cpp" open="0" top="0" tabpos="0">
-		<Cursor position="1217" topLine="0" />
-	</File>
-	<File name="..\..\graphics\imageman.h" open="0" top="0" tabpos="0">
-		<Cursor position="1186" topLine="16" />
-	</File>
 	<File name="..\..\graphics\mpeg_player.cpp" open="1" top="0" tabpos="2">
 		<Cursor position="1136" topLine="9" />
 	</File>

Modified: scummvm/trunk/dists/msvc7/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc7/scummvm.vcproj	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/msvc7/scummvm.vcproj	2008-12-31 15:11:39 UTC (rev 35638)
@@ -977,12 +977,6 @@
 				RelativePath="..\..\graphics\imagedec.h">
 			</File>
 			<File
-				RelativePath="..\..\graphics\imageman.cpp">
-			</File>
-			<File
-				RelativePath="..\..\graphics\imageman.h">
-			</File>
-			<File
 				RelativePath="..\..\graphics\primitives.cpp">
 			</File>
 			<File

Modified: scummvm/trunk/dists/msvc71/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc71/scummvm.vcproj	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/msvc71/scummvm.vcproj	2008-12-31 15:11:39 UTC (rev 35638)
@@ -991,12 +991,6 @@
 				RelativePath="..\..\graphics\imagedec.h">
 			</File>
 			<File
-				RelativePath="..\..\graphics\imageman.cpp">
-			</File>
-			<File
-				RelativePath="..\..\graphics\imageman.h">
-			</File>
-			<File
 				RelativePath="..\..\graphics\primitives.cpp">
 			</File>
 			<File

Modified: scummvm/trunk/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/scummvm.vcproj	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/msvc8/scummvm.vcproj	2008-12-31 15:11:39 UTC (rev 35638)
@@ -1333,14 +1333,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\graphics\imageman.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\graphics\imageman.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\graphics\primitives.cpp"
 				>
 			</File>

Modified: scummvm/trunk/dists/msvc9/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc9/scummvm.vcproj	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/dists/msvc9/scummvm.vcproj	2008-12-31 15:11:39 UTC (rev 35638)
@@ -1338,14 +1338,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\graphics\imageman.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\graphics\imageman.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\graphics\primitives.cpp"
 				>
 			</File>

Deleted: scummvm/trunk/graphics/imageman.cpp
===================================================================
--- scummvm/trunk/graphics/imageman.cpp	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/graphics/imageman.cpp	2008-12-31 15:11:39 UTC (rev 35638)
@@ -1,145 +0,0 @@
-/* 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.
- *
- * $URL$
- * $Id$
- */
-
-#include "graphics/imagedec.h"
-#include "graphics/imageman.h"
-#include "graphics/surface.h"
-
-#include "common/fs.h"
-#include "common/unzip.h"
-
-DECLARE_SINGLETON(Graphics::ImageManager);
-
-namespace Graphics {
-
-ImageManager::ImageManager() {
-}
-
-ImageManager::~ImageManager() {
-	for (Iterator pos = _surfaces.begin(); pos != _surfaces.end(); ++pos) {
-		(*pos)->surface->free();
-		delete (*pos)->surface;
-		delete *pos;
-		*pos = 0;
-	}
-	_surfaces.clear();
-}
-
-bool ImageManager::addArchive(const Common::String &name) {
-	Common::Archive *arch = 0;
-	Common::FSNode node(name);
-
-	if (node.getName().hasSuffix(".zip")) {
-#ifdef USE_ZLIB
-		Common::ZipArchive *zip = new Common::ZipArchive(node);
-		if (!zip || !zip->isOpen())
-			return false;
-
-		arch = zip;
-#else
-		return false;
-#endif
-	} else {
-		Common::FSDirectory *dir = new Common::FSDirectory(node);
-		if (!dir || !dir->getFSNode().isDirectory())
-			return false;
-
-		arch = dir;
-	}
-
-	_archives.add(name, arch);
-	return true;
-}
-
-void ImageManager::removeArchive(const Common::String &name) {
-	if (_archives.hasArchive(name))
-		_archives.remove(name);
-}
-
-bool ImageManager::registerSurface(const Common::String &name, Surface *surf) {
-	if (getSurface(name)) {
-		return false;
-	}
-
-	Entry *newHandle = new Entry;
-	if (!newHandle)
-		return false;
-
-	if (!surf)
-		surf = ImageDecoder::loadFile(name);
-
-	if (!surf) {
-		Common::SeekableReadStream *stream = _archives.openFile(name);
-		if (stream) {
-			surf = ImageDecoder::loadFile(*stream);
-			delete stream;
-		}
-	}
-
-	if (!surf)
-		return false;
-
-	newHandle->surface = surf;
-	newHandle->name = name;
-	_surfaces.push_back(newHandle);
-
-	return true;
-}
-
-bool ImageManager::unregisterSurface(const Common::String &name) {
-	Iterator pos = searchHandle(name);
-	if (pos == _surfaces.end()) {
-		// no surface handle it as success
-		return true;
-	}
-
-	(*pos)->surface->free();
-	delete (*pos)->surface;
-	delete *pos;
-	*pos = 0;
-
-	_surfaces.erase(pos);
-
-	return true;
-}
-
-Surface * ImageManager::getSurface(const Common::String &name) {
-	Iterator pos = searchHandle(name);
-	if (pos == _surfaces.end()) {
-		// no surface handle it as success
-		return 0;
-	}
-	return (*pos)->surface;
-}
-
-ImageManager::Iterator ImageManager::searchHandle(const Common::String &name) {
-	Iterator pos = _surfaces.begin();
-	while (pos != _surfaces.end()) {
-		if ((*pos)->name == name)
-			break;
-		++pos;
-	}
-	return pos;
-}
-} // end of namespace Graphics

Deleted: scummvm/trunk/graphics/imageman.h
===================================================================
--- scummvm/trunk/graphics/imageman.h	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/graphics/imageman.h	2008-12-31 15:11:39 UTC (rev 35638)
@@ -1,113 +0,0 @@
-/* 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.
- *
- * $URL$
- * $Id$
- */
-
-#ifndef GRAPHICS_IMAGEMAN_H
-#define GRAPHICS_IMAGEMAN_H
-
-#include "common/scummsys.h"
-
-#include "common/archive.h"
-#include "common/singleton.h"
-#include "common/str.h"
-#include "common/list.h"
-
-namespace Graphics {
-
-struct Surface;
-
-class ImageManager : public Common::Singleton<ImageManager> {
-public:
-	~ImageManager();
-
-	/**
-	 * Adds a directory or .zip archive to the list of places where
-	 * the ImageManager searches for image files.
-	 *
-	 * @param name an FSNode pointing to the archive
-	 * @return true on success and false on failure
-	 */
-	bool addArchive(const Common::String &name);
-
-	/**
-	 * Removes a directory or .zip archive from the the list of places where
-	 * the ImageManager searches for image files.
-	 *
-	 * @param name the name of the archive
-	 */
-	void removeArchive(const Common::String &name);
-
-	/**
-	 * Registers a surface with the ImageManager.
-	 * The ImageManager takes over ownership of the surface, in particular
-	 * when the surface gets unregistered, Surface::free() is invoked and
-	 * the surface gets deleted by the ImageManager.
-	 * If the parameter 'surf' is 0 the ImageManager tries to load an image with
-	 * the filename 'name'.
-	 *
-	 * @param name the name of the new handle
-	 * @param surf the surface which should be associated to the given name
-	 * @return returns true on success and false on failure
-	 */
-	bool registerSurface(const Common::String &name, Surface *surf);
-
-	/**
-	 * Unregisters and delete a surface which was previously registered
-	 * with the ImageManager. After unregistering a surface, it must NOT
-	 * be used anymore.
-	 *
-	 * @param name the handle
-	 * @return true on success, false on failure
-	 */
-	bool unregisterSurface(const Common::String &name);
-
-	/**
-	 * Gets a surface registered to a certain name.
-	 *
-	 * @param name the name of the surface
-	 * @return returns an pointer to an Surface object or 0 on failure
-	 */
-	Surface *getSurface(const Common::String &name);
-private:
-	friend class Common::Singleton<SingletonBaseType>;
-	ImageManager();
-
-	struct Entry {
-		Common::String name;
-		Surface *surface;
-	};
-	typedef Common::List<Entry*>::iterator Iterator;
-
-	Iterator searchHandle(const Common::String &name);
-
-	Common::List<Entry*> _surfaces;
-	Common::SearchSet _archives;
-};
-
-} // end of namespace Graphics
-
-/** Shortcut for accessing the image manager. */
-#define ImageMan		(Graphics::ImageManager::instance())
-
-#endif
-

Modified: scummvm/trunk/graphics/module.mk
===================================================================
--- scummvm/trunk/graphics/module.mk	2008-12-31 15:09:32 UTC (rev 35637)
+++ scummvm/trunk/graphics/module.mk	2008-12-31 15:11:39 UTC (rev 35638)
@@ -11,7 +11,6 @@
 	fonts/scummfont.o \
 	iff.o \
 	imagedec.o \
-	imageman.o \
 	primitives.o \
 	scaler.o \
 	scaler/thumbnail_intern.o \


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