[Scummvm-cvs-logs] SF.net SVN: scummvm:[49284] scummvm/branches/gsoc2010-opengl/backends

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Fri May 28 07:03:33 CEST 2010


Revision: 49284
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49284&view=rev
Author:   vgvgf
Date:     2010-05-28 05:03:32 +0000 (Fri, 28 May 2010)

Log Message:
-----------
Created base virtual classes for backends subsystems.
Removed base-backend, it won't be needed anymore.

Modified Paths:
--------------
    scummvm/branches/gsoc2010-opengl/backends/module.mk

Added Paths:
-----------
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-audio.h
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-events.h
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-file.h
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-graphics.h
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-mutex.h
    scummvm/branches/gsoc2010-opengl/backends/base-subsys-timer.h

Removed Paths:
-------------
    scummvm/branches/gsoc2010-opengl/backends/base-backend.cpp
    scummvm/branches/gsoc2010-opengl/backends/base-backend.h

Deleted: scummvm/branches/gsoc2010-opengl/backends/base-backend.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-backend.cpp	2010-05-28 00:57:54 UTC (rev 49283)
+++ scummvm/branches/gsoc2010-opengl/backends/base-backend.cpp	2010-05-28 05:03:32 UTC (rev 49284)
@@ -1,86 +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 "backends/base-backend.h"
-#include "backends/events/default/default-events.h"
-#include "gui/message.h"
-
-void BaseBackend::displayMessageOnOSD(const char *msg) {
-	// Display the message for 1.5 seconds
-	GUI::TimedMessageDialog dialog(msg, 1500);
-	dialog.runModal();
-}
-
-
-static Common::EventManager *s_eventManager = 0;
-
-Common::EventManager *BaseBackend::getEventManager() {
-	// FIXME/TODO: Eventually this method should be turned into an abstract one,
-	// to force backends to implement this conciously (even if they
-	// end up returning the default event manager anyway).
-	if (!s_eventManager)
-		s_eventManager = new DefaultEventManager(this);
-	return s_eventManager;
-}
-
-void BaseBackend::fillScreen(uint32 col) {
-	Graphics::Surface *screen = lockScreen();
-	if (screen && screen->pixels)
-		memset(screen->pixels, col, screen->h * screen->pitch);
-	unlockScreen();
-}
-
-
-/*
- FIXME: Maybe we should push the default config file loading/saving code below
- out to all the backends?
-*/
-
-
-#if defined(UNIX)
-#if defined(SAMSUNGTV)
-#define DEFAULT_CONFIG_FILE "/dtv/usb/sda1/.scummvmrc"
-#else
-#define DEFAULT_CONFIG_FILE ".scummvmrc"
-#endif
-#endif
-
-#if !defined(UNIX)
-#define DEFAULT_CONFIG_FILE "scummvm.ini"
-#endif
-
-Common::SeekableReadStream *BaseBackend::createConfigReadStream() {
-	Common::FSNode file(DEFAULT_CONFIG_FILE);
-	return file.createReadStream();
-}
-
-Common::WriteStream *BaseBackend::createConfigWriteStream() {
-#ifdef __DC__
-	return 0;
-#else
-	Common::FSNode file(DEFAULT_CONFIG_FILE);
-	return file.createWriteStream();
-#endif
-}

Deleted: scummvm/branches/gsoc2010-opengl/backends/base-backend.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-backend.h	2010-05-28 00:57:54 UTC (rev 49283)
+++ scummvm/branches/gsoc2010-opengl/backends/base-backend.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -1,43 +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 BACKENDS_BASE_BACKEND_H
-#define BACKENDS_BASE_BACKEND_H
-
-#include "common/system.h"
-#include "backends/events/default/default-events.h"
-
-class BaseBackend : public OSystem, Common::EventSource {
-public:
-	virtual Common::EventManager *getEventManager();
-	virtual void displayMessageOnOSD(const char *msg);
-	virtual void fillScreen(uint32 col);
-
-	virtual Common::SeekableReadStream *createConfigReadStream();
-	virtual Common::WriteStream *createConfigWriteStream();
-};
-
-
-#endif

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-audio.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-audio.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-audio.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_AUDIO_H
+#define BACKENDS_BASE_SUBSYS_AUDIO_H
+
+#include "common/system.h"
+
+class BaseSubSys_Audio : public virtual OSystem {
+public:
+	virtual void audioInit() = 0;
+	virtual void audioDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-audio.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-events.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-events.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-events.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_EVENTS_H
+#define BACKENDS_BASE_SUBSYS_EVENTS_H
+
+#include "common/system.h"
+
+class BaseSubSys_Events : public virtual OSystem {
+public:
+	virtual void eventsInit() = 0;
+	virtual void eventsDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-events.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-file.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-file.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-file.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_FILE_H
+#define BACKENDS_BASE_SUBSYS_FILE_H
+
+#include "common/system.h"
+
+class BaseSubSys_File : public virtual OSystem {
+public:
+	virtual void fileInit() = 0;
+	virtual void fileDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-file.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-graphics.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-graphics.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_GRAPHICS_H
+#define BACKENDS_BASE_SUBSYS_GRAPHICS_H
+
+#include "common/system.h"
+
+class BaseSubSys_Graphics : public virtual OSystem {
+public:
+	virtual void graphicsInit() = 0;
+	virtual void graphicsDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-graphics.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-mutex.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-mutex.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-mutex.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_MUTEX_H
+#define BACKENDS_BASE_SUBSYS_MUTEX_H
+
+#include "common/system.h"
+
+class BaseSubSys_Mutex : public virtual OSystem {
+public:
+	virtual void mutexInit() = 0;
+	virtual void mutexDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-mutex.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/base-subsys-timer.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/base-subsys-timer.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/base-subsys-timer.h	2010-05-28 05:03:32 UTC (rev 49284)
@@ -0,0 +1,38 @@
+/* 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 BACKENDS_BASE_SUBSYS_TIMER_H
+#define BACKENDS_BASE_SUBSYS_TIMER_H
+
+#include "common/system.h"
+
+class BaseSubSys_Timer : public virtual OSystem {
+public:
+	virtual void timerInit() = 0;
+	virtual void timerDone() = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/base-subsys-timer.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/branches/gsoc2010-opengl/backends/module.mk
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/module.mk	2010-05-28 00:57:54 UTC (rev 49283)
+++ scummvm/branches/gsoc2010-opengl/backends/module.mk	2010-05-28 05:03:32 UTC (rev 49284)
@@ -1,7 +1,6 @@
 MODULE := backends
 
 MODULE_OBJS := \
-	base-backend.o \
 	events/default/default-events.o \
 	fs/abstract-fs.o \
 	fs/stdiostream.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