aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorChristopher Page2008-05-14 20:37:18 +0000
committerChristopher Page2008-05-14 20:37:18 +0000
commitcbe03226a4e3e658a3832eec233e1630c4515474 (patch)
tree12ed6dde0fe22c977f96b66b0c87a7af2fb75fa5 /backends/platform
parent7d98ed714be064b75308db21ce6d5191fd040c94 (diff)
parente279d9693a1541f4595e73a5b646869890634922 (diff)
downloadscummvm-rg350-cbe03226a4e3e658a3832eec233e1630c4515474.tar.gz
scummvm-rg350-cbe03226a4e3e658a3832eec233e1630c4515474.tar.bz2
scummvm-rg350-cbe03226a4e3e658a3832eec233e1630c4515474.zip
Merged revisions 31972-31973,31975-31981,31984-31989,31993-31994,31996-32014,32016-32020,32022-32025,32027-32028,32030,32034,32037-32038,32040-32058,32060-32087,32089-32093,32095-32123 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r32125
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/dc/selector.cpp4
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp5
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp89
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h1
-rw-r--r--backends/platform/ds/arm9/source/ramsave.cpp12
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp2
6 files changed, 49 insertions, 64 deletions
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 4bca47afb2..880fbc400f 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -151,8 +151,8 @@ static Game the_game;
static void detectGames(FSList &files, GameList &candidates)
{
- const PluginList &plugins = PluginManager::instance().getPlugins();
- PluginList::const_iterator iter = plugins.begin();
+ const EnginePluginList &plugins = EngineMan.getPlugins();
+ EnginePluginList::const_iterator iter = plugins.begin();
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
candidates.push_back((*iter)->detectGames(files));
}
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index fbe0c69944..3ee572f0f7 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -146,7 +146,7 @@ GBAMPSaveFileManager::~GBAMPSaveFileManager() {
GBAMPSaveFile* GBAMPSaveFileManager::openSavefile(char const* name, bool saveOrLoad) {
char fileSpec[128];
- strcpy(fileSpec, getSavePath());
+ strcpy(fileSpec, getSavePath().c_str());
if (fileSpec[strlen(fileSpec) - 1] == '/') {
sprintf(fileSpec, "%s%s", getSavePath(), name);
@@ -169,7 +169,7 @@ Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
char name[256];
- DS::std_cwd((char *) getSavePath());
+ DS::std_cwd((char*)getSavePath().c_str()); //TODO : Check this suspicious const-cast
// consolePrintf("Save path: '%s', pattern: '%s'\n", getSavePath(),pattern);
@@ -177,7 +177,6 @@ Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
Common::StringList list;
-
do {
if (fileType == TYPE_FILE) {
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 2044448923..f9b0b768c0 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -57,8 +57,7 @@ OSystem_DS::~OSystem_DS() {
delete _timer;
}
-int OSystem_DS::timerHandler(int t)
-{
+int OSystem_DS::timerHandler(int t) {
DSTimerManager *tm = (DSTimerManager *)g_system->getTimerManager();
tm->handler();
return t;
@@ -183,8 +182,7 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
}
-void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h)
-{
+void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
// consolePrintf("Copy rect %d, %d %d, %d ", x, y, w, h);
if (w <= 1) return;
@@ -229,8 +227,7 @@ void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int
}
-void OSystem_DS::updateScreen()
-{
+void OSystem_DS::updateScreen() {
if (_frameBufferExists)
{
@@ -253,30 +250,25 @@ void OSystem_DS::setShakePos(int shakeOffset) {
DS::setShakePos(shakeOffset);
}
-void OSystem_DS::showOverlay ()
-{
+void OSystem_DS::showOverlay () {
// consolePrintf("showovl\n");
DS::displayMode16Bit();
}
-void OSystem_DS::hideOverlay ()
-{
+void OSystem_DS::hideOverlay () {
DS::displayMode8Bit();
}
-void OSystem_DS::clearOverlay ()
-{
+void OSystem_DS::clearOverlay () {
memset((u16 *) DS::get16BitBackBuffer(), 0, 512 * 256 * 2);
// consolePrintf("clearovl\n");
}
-void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch)
-{
+void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch) {
// consolePrintf("grabovl\n");
}
-void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h)
-{
+void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
u16* bg = (u16 *) DS::get16BitBackBuffer();
u16* src = (u16 *) buf;
@@ -313,27 +305,23 @@ void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, i
}
-int16 OSystem_DS::getOverlayHeight()
-{
+int16 OSystem_DS::getOverlayHeight() {
// consolePrintf("getovlheight\n");
return getHeight();
}
-int16 OSystem_DS::getOverlayWidth()
-{
+int16 OSystem_DS::getOverlayWidth() {
// consolePrintf("getovlwid\n");
return getWidth();
}
-bool OSystem_DS::showMouse(bool visible)
-{
+bool OSystem_DS::showMouse(bool visible) {
DS::setShowCursor(visible);
return true;
}
-void OSystem_DS::warpMouse(int x, int y)
-{
+void OSystem_DS::warpMouse(int x, int y) {
}
void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetCursorScale) {
@@ -344,8 +332,7 @@ void OSystem_DS::addEvent(Common::Event& e) {
eventQueue[queuePos++] = e;
}
-bool OSystem_DS::pollEvent(Common::Event &event)
-{
+bool OSystem_DS::pollEvent(Common::Event &event) {
if (lastPenFrame != DS::getMillis()) {
@@ -398,13 +385,11 @@ bool OSystem_DS::pollEvent(Common::Event &event)
return false;
}
-uint32 OSystem_DS::getMillis()
-{
+uint32 OSystem_DS::getMillis() {
return DS::getMillis();
}
-void OSystem_DS::delayMillis(uint msecs)
-{
+void OSystem_DS::delayMillis(uint msecs) {
int st = getMillis();
DS::addEventsToQueue();
DS::CD::update();
@@ -419,25 +404,25 @@ void OSystem_DS::delayMillis(uint msecs)
DS::addEventsToQueue();
}
-OSystem::MutexRef OSystem_DS::createMutex(void)
-{
+void OSystem_DS::getTimeAndDate(struct tm &t) const {
+ time_t curTime = time(0);
+ t = *localtime(&curTime);
+}
+
+OSystem::MutexRef OSystem_DS::createMutex(void) {
return NULL;
}
-void OSystem_DS::lockMutex(MutexRef mutex)
-{
+void OSystem_DS::lockMutex(MutexRef mutex) {
}
-void OSystem_DS::unlockMutex(MutexRef mutex)
-{
+void OSystem_DS::unlockMutex(MutexRef mutex) {
}
-void OSystem_DS::deleteMutex(MutexRef mutex)
-{
+void OSystem_DS::deleteMutex(MutexRef mutex) {
}
-void OSystem_DS::clearSoundCallback()
-{
+void OSystem_DS::clearSoundCallback() {
consolePrintf("Clearing sound callback");
// DS::setSoundProc(NULL, NULL);
}
@@ -447,23 +432,19 @@ int OSystem_DS::getOutputSampleRate() const
return DS::getSoundFrequency();
}
-bool OSystem_DS::openCD(int drive)
-{
+bool OSystem_DS::openCD(int drive) {
return DS::CD::checkCD();
}
-bool OSystem_DS::pollCD()
-{
+bool OSystem_DS::pollCD() {
return DS::CD::isPlaying();
}
-void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration)
-{
+void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration) {
DS::CD::playTrack(track, num_loops, start_frame, duration);
}
-void OSystem_DS::stopCD()
-{
+void OSystem_DS::stopCD() {
DS::CD::stopTrack();
}
@@ -471,8 +452,7 @@ void OSystem_DS::updateCD()
{
}
-void OSystem_DS::quit()
-{
+void OSystem_DS::quit() {
/* consolePrintf("Soft resetting...");
IPC->reset = 1;
REG_IE = 0;
@@ -481,16 +461,13 @@ void OSystem_DS::quit()
swiSoftReset();*/
}
-void OSystem_DS::setWindowCaption(const char *caption)
-{
+void OSystem_DS::setWindowCaption(const char *caption) {
}
-void OSystem_DS::displayMessageOnOSD(const char *msg)
-{
+void OSystem_DS::displayMessageOnOSD(const char *msg) {
}
-Common::SaveFileManager* OSystem_DS::getSavefileManager()
-{
+Common::SaveFileManager* OSystem_DS::getSavefileManager() {
bool forceSram;
if (ConfMan.hasKey("forcesramsave", "ds")) {
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index 9d6454d02d..2bbd82bcf7 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -107,6 +107,7 @@ public:
virtual bool pollEvent(Common::Event &event);
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
+ virtual void getTimeAndDate(struct tm &t) const;
virtual MutexRef createMutex(void);
virtual void lockMutex(MutexRef mutex);
diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp
index 8bcc34f9af..a9ac773dd2 100644
--- a/backends/platform/ds/arm9/source/ramsave.cpp
+++ b/backends/platform/ds/arm9/source/ramsave.cpp
@@ -383,16 +383,24 @@ void DSSaveFileManager::deleteFile(char* name) {
flushToSaveRAM();
}
-void DSSaveFileManager::removeSavefile(const char *filename) {
- TODO: Implement this. Most likely, you just have to use the code of deleteFile?
+bool DSSaveFileManager::removeSavefile(const char *filename) {
+ consolePrintf("DSSaveFileManager::removeSavefile : Not implemented yet.\n");
+ assert(false);
+ //TODO: Implement this. Most likely, you just have to use the code of deleteFile?
+ return false;
}
Common::StringList DSSaveFileManager::listSavefiles(const char *pattern) {
+ consolePrintf("DSSaveFileManager::listSavefiles : Not implemented yet.\n");
+ assert(false);
+ return Common::StringList();
+ /*
TODO: Implement this. If you don't understand what it should do, just ask
(e.g. on scummvm-devel or Fingolfin). It should be pretty simple if you
use Common::matchString from common/util.h and read the Doxygen docs,
then combine this with the old code below...
+ */
/*
void DSSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num) {
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index 45e41e5e93..d474110f26 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -77,7 +77,7 @@ void CELauncherDialog::automaticScanDirectory(const FilesystemNode &node) {
FSList files;
node.getChildren(files, FilesystemNode::kListFilesOnly);
// detect
- GameList candidates(PluginManager::instance().detectGames(files));
+ GameList candidates(EngineMan.detectGames(files));
// insert
if (candidates.size() >= 1) {
GameDescriptor result = candidates[0];