[Scummvm-cvs-logs] SF.net SVN: scummvm: [31024] scummvm/trunk/backends/platform/dc
marcus_c at users.sourceforge.net
marcus_c at users.sourceforge.net
Sat Mar 1 18:48:43 CET 2008
Revision: 31024
http://scummvm.svn.sourceforge.net/scummvm/?rev=31024&view=rev
Author: marcus_c
Date: 2008-03-01 09:48:42 -0800 (Sat, 01 Mar 2008)
Log Message:
-----------
Integrated fs factory into osystem object.
Modified Paths:
--------------
scummvm/trunk/backends/platform/dc/Makefile
scummvm/trunk/backends/platform/dc/dc-fs.cpp
scummvm/trunk/backends/platform/dc/dc.h
Removed Paths:
-------------
scummvm/trunk/backends/platform/dc/ronincd-fs-factory.cpp
scummvm/trunk/backends/platform/dc/ronincd-fs-factory.h
Modified: scummvm/trunk/backends/platform/dc/Makefile
===================================================================
--- scummvm/trunk/backends/platform/dc/Makefile 2008-03-01 16:15:00 UTC (rev 31023)
+++ scummvm/trunk/backends/platform/dc/Makefile 2008-03-01 17:48:42 UTC (rev 31024)
@@ -35,7 +35,7 @@
endif
OBJS := dcmain.o time.o display.o audio.o input.o selector.o icon.o \
- label.o vmsave.o softkbd.o dcloader.o cache.o ronincd-fs-factory.o
+ label.o vmsave.o softkbd.o dcloader.o cache.o dc-fs.o
MODULE_DIRS += .
Modified: scummvm/trunk/backends/platform/dc/dc-fs.cpp
===================================================================
--- scummvm/trunk/backends/platform/dc/dc-fs.cpp 2008-03-01 16:15:00 UTC (rev 31023)
+++ scummvm/trunk/backends/platform/dc/dc-fs.cpp 2008-03-01 17:48:42 UTC (rev 31024)
@@ -22,8 +22,7 @@
* $Id$
*/
-#if defined(__DC__)
-
+#include "dc.h"
#include "backends/fs/abstract-fs.h"
#include <ronin/cdfs.h>
@@ -190,4 +189,14 @@
return new RoninCDFilesystemNode(String(start, end - start), false);
}
-#endif // defined(__DC__)
+AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const {
+ return new RoninCDFilesystemNode();
+}
+
+AbstractFilesystemNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
+ return new RoninCDFilesystemNode();
+}
+
+AbstractFilesystemNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
+ return new RoninCDFilesystemNode(path, true);
+}
Modified: scummvm/trunk/backends/platform/dc/dc.h
===================================================================
--- scummvm/trunk/backends/platform/dc/dc.h 2008-03-01 16:15:00 UTC (rev 31023)
+++ scummvm/trunk/backends/platform/dc/dc.h 2008-03-01 17:48:42 UTC (rev 31024)
@@ -27,7 +27,7 @@
#include <graphics/surface.h>
#include <ronin/soundcommon.h>
#include "backends/timer/default/default-timer.h"
-#include "ronincd-fs-factory.h"
+#include "backends/fs/fs-factory.h"
#define NUM_BUFFERS 4
#define SOUND_BUFFER_SHIFT 3
@@ -41,7 +41,7 @@
#include "softkbd.h"
-class OSystem_Dreamcast : public OSystem {
+class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
public:
OSystem_Dreamcast();
@@ -184,7 +184,10 @@
void mouseToSoftKbd(int x, int y, int &rx, int &ry) const;
// Filesystem
- FilesystemFactory *getFilesystemFactory() { return &_fileSystemFactory; }
+ FilesystemFactory *getFilesystemFactory() { return this; }
+ AbstractFilesystemNode *makeRootFileNode() const;
+ AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
+ AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
private:
@@ -192,7 +195,6 @@
Audio::Mixer *_mixer;
DefaultTimerManager *_timer;
SoftKeyboard _softkbd;
- RoninCDFilesystemFactory _fileSystemFactory;
int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll;
Deleted: scummvm/trunk/backends/platform/dc/ronincd-fs-factory.cpp
===================================================================
--- scummvm/trunk/backends/platform/dc/ronincd-fs-factory.cpp 2008-03-01 16:15:00 UTC (rev 31023)
+++ scummvm/trunk/backends/platform/dc/ronincd-fs-factory.cpp 2008-03-01 17:48:42 UTC (rev 31024)
@@ -1,40 +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$
- */
-
-#if defined(__DC__)
-#include "ronincd-fs-factory.h"
-#include "dc-fs.cpp"
-
-AbstractFilesystemNode *RoninCDFilesystemFactory::makeRootFileNode() const {
- return new RoninCDFilesystemNode();
-}
-
-AbstractFilesystemNode *RoninCDFilesystemFactory::makeCurrentDirectoryFileNode() const {
- return new RoninCDFilesystemNode();
-}
-
-AbstractFilesystemNode *RoninCDFilesystemFactory::makeFileNodePath(const String &path) const {
- return new RoninCDFilesystemNode(path, true);
-}
-#endif
Deleted: scummvm/trunk/backends/platform/dc/ronincd-fs-factory.h
===================================================================
--- scummvm/trunk/backends/platform/dc/ronincd-fs-factory.h 2008-03-01 16:15:00 UTC (rev 31023)
+++ scummvm/trunk/backends/platform/dc/ronincd-fs-factory.h 2008-03-01 17:48:42 UTC (rev 31024)
@@ -1,44 +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 RONINCD_FILESYSTEM_FACTORY_H
-#define RONINCD_FILESYSTEM_FACTORY_H
-
-#include "backends/fs/fs-factory.h"
-
-/**
- * Creates RoninCDFilesystemNode objects.
- *
- * Parts of this class are documented in the base interface class, FilesystemFactory.
- */
-class RoninCDFilesystemFactory : public FilesystemFactory {
-public:
- typedef Common::String String;
-
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-};
-
-#endif /*RONINCD_FILESYSTEM_FACTORY_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