Moved Dreamcast filesystem factory to platform directory.

svn-id: r31021
This commit is contained in:
Marcus Comstedt 2008-03-01 15:45:54 +00:00
parent 85b61f3d10
commit 964caae2dd
7 changed files with 10 additions and 17 deletions

View File

@ -2,7 +2,6 @@ MODULE := backends
MODULE_OBJS := \
fs/amigaos4/amigaos4-fs-factory.o \
fs/dc/ronincd-fs-factory.o \
fs/ds/ds-fs-factory.o \
fs/gp32/gp32-fs-factory.o \
fs/morphos/abox-fs-factory.o \

View File

@ -35,7 +35,7 @@ POST_OBJS_FLAGS = -Wl,--no-whole-archive
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
label.o vmsave.o softkbd.o dcloader.o cache.o ronincd-fs-factory.o
MODULE_DIRS += .

View File

@ -27,6 +27,7 @@
#include <graphics/surface.h>
#include <ronin/soundcommon.h>
#include "backends/timer/default/default-timer.h"
#include "ronincd-fs-factory.h"
#define NUM_BUFFERS 4
#define SOUND_BUFFER_SHIFT 3
@ -182,6 +183,8 @@ class OSystem_Dreamcast : public OSystem {
// Extra SoftKbd support
void mouseToSoftKbd(int x, int y, int &rx, int &ry) const;
// Filesystem
FilesystemFactory *getFilesystemFactory() { return &_fileSystemFactory; }
private:
@ -189,6 +192,7 @@ class OSystem_Dreamcast : public OSystem {
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;

View File

@ -23,10 +23,8 @@
*/
#if defined(__DC__)
#include "backends/fs/dc/ronincd-fs-factory.h"
#include "backends/fs/dc/dc-fs.cpp"
DECLARE_SINGLETON(RoninCDFilesystemFactory);
#include "ronincd-fs-factory.h"
#include "dc-fs.cpp"
AbstractFilesystemNode *RoninCDFilesystemFactory::makeRootFileNode() const {
return new RoninCDFilesystemNode();

View File

@ -25,7 +25,6 @@
#ifndef RONINCD_FILESYSTEM_FACTORY_H
#define RONINCD_FILESYSTEM_FACTORY_H
#include "common/singleton.h"
#include "backends/fs/fs-factory.h"
/**
@ -33,19 +32,13 @@
*
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
class RoninCDFilesystemFactory : public FilesystemFactory, public Common::Singleton<RoninCDFilesystemFactory> {
class RoninCDFilesystemFactory : public FilesystemFactory {
public:
typedef Common::String String;
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
protected:
RoninCDFilesystemFactory() {};
private:
friend class Common::Singleton<SingletonBaseType>;
};
#endif /*RONINCD_FILESYSTEM_FACTORY_H*/

View File

@ -138,8 +138,6 @@ void OSystem::getTimeAndDate(struct tm &t) const {
*/
#if defined(__amigaos4__)
#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
#elif defined(__DC__)
#include "backends/fs/dc/ronincd-fs-factory.h"
#elif defined(__DS__)
#include "backends/fs/ds/ds-fs-factory.h"
#elif defined(__GP32__)
@ -164,7 +162,8 @@ FilesystemFactory *OSystem::getFilesystemFactory() {
#if defined(__amigaos4__)
return &AmigaOSFilesystemFactory::instance();
#elif defined(__DC__)
return &RoninCDFilesystemFactory::instance();
// The DC port overrides this function...
abort();
#elif defined(__DS__)
return &DSFilesystemFactory::instance();
#elif defined(__GP32__)