[Scummvm-cvs-logs] SF.net SVN: scummvm: [30374] scummvm/trunk/base
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Jan 10 13:00:11 CET 2008
Revision: 30374
http://scummvm.svn.sourceforge.net/scummvm/?rev=30374&view=rev
Author: fingolfin
Date: 2008-01-10 04:00:10 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Revert accidental commits in rev 30372
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=30372&view=rev
Modified Paths:
--------------
scummvm/trunk/base/game.cpp
scummvm/trunk/base/game.h
scummvm/trunk/base/plugins.cpp
scummvm/trunk/base/plugins.h
Modified: scummvm/trunk/base/game.cpp
===================================================================
--- scummvm/trunk/base/game.cpp 2008-01-10 11:54:31 UTC (rev 30373)
+++ scummvm/trunk/base/game.cpp 2008-01-10 12:00:10 UTC (rev 30374)
@@ -25,9 +25,7 @@
#include "base/game.h"
#include "base/plugins.h"
-#include "graphics/surface.h"
-
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list) {
const PlainGameDescriptor *g = list;
while (g->gameid) {
@@ -68,15 +66,6 @@
}
}
-void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
- if (_thumbnail && _thumbnail != t) {
- _thumbnail->free();
- delete _thumbnail;
- }
- _thumbnail = t;
-}
-
-
namespace Base {
// TODO: Find a better name & place for this function.
Modified: scummvm/trunk/base/game.h
===================================================================
--- scummvm/trunk/base/game.h 2008-01-10 11:54:31 UTC (rev 30373)
+++ scummvm/trunk/base/game.h 2008-01-10 12:00:10 UTC (rev 30374)
@@ -30,10 +30,6 @@
#include "common/array.h"
#include "common/hash-str.h"
-namespace Graphics {
- class Surface;
-}
-
/**
* A simple structure used to map gameids (like "monkey", "sword1", ...) to
* nice human readable and descriptive game titles (like "The Secret of Monkey Island").
@@ -71,7 +67,7 @@
setVal("description", pgd.description);
}
- GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l = Common::UNK_LANG,
+ GameDescriptor(Common::String g, Common::String d, Common::Language l = Common::UNK_LANG,
Common::Platform p = Common::kPlatformUnknown) {
setVal("gameid", g);
setVal("description", d);
@@ -107,63 +103,8 @@
}
};
-/**
- * A hashmap describing details about a given save state.
- * TODO
- * Guaranteed to contain save_slot and description values.
- * Additional ideas: Playtime, creation date, thumbnail, ...
- */
-class SaveStateDescriptor : public Common::StringMap {
-protected:
- Graphics::Surface *_thumbnail; // can be NULL
-public:
- SaveStateDescriptor() : _thumbnail(0) {
- setVal("save_slot", "-1"); // FIXME: default to 0 (first slot) or to -1 (invalid slot) ?
- setVal("description", "");
- }
- SaveStateDescriptor(const Common::String &s, const Common::String &d) : _thumbnail(0) {
- setVal("save_slot", s);
- setVal("description", d);
- }
- ~SaveStateDescriptor() {
- setThumbnail(0);
- }
-
- /** The saveslot id, as it would be passed to the "-x" command line switch. */
- Common::String &slot() { return getVal("save_slot"); }
-
- /** The saveslot id, as it would be passed to the "-x" command line switch (read-only variant). */
- const Common::String &slot() const { return getVal("save_slot"); }
-
- /** A human readable description of the save state. */
- Common::String &description() { return getVal("description"); }
-
- /** A human readable description of the save state (read-only variant). */
- const Common::String &description() const { return getVal("description"); }
-
- /**
- * Return a thumbnail graphics surface representing the savestate visually
- * This is usually a scaled down version of the game graphics. The size
- * should be either 160x100 or 160x120 pixels, depending on the aspect
- * ratio of the game. If another ratio is required, contact the core team.
- *
- * TODO: it is probably a bad idea to read this for *all* games at once,
- * at least on low-end devices. So this info should probably normally only
- * be included optionally. I.e. only upon a query for a specific savegame...
- * To this end, add a getFullSaveStateInfo(target, slot) to the plugin API.
- */
- const Graphics::Surface *getThumbnail() const { return _thumbnail; }
-
-
- void setThumbnail(Graphics::Surface *t);
-};
-
-/** List of savestates. */
-typedef Common::Array<SaveStateDescriptor> SaveStateList;
-
-
class Plugin;
namespace Base {
Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp 2008-01-10 11:54:31 UTC (rev 30373)
+++ scummvm/trunk/base/plugins.cpp 2008-01-10 12:00:10 UTC (rev 30374)
@@ -62,11 +62,6 @@
assert(_plugin->_df);
return (*_plugin->_df)(fslist);
}
-
- SaveStateList listSaves(const char *target) const {
- assert(_plugin->_lsf);
- return (*_plugin->_lsf)(target);
- }
};
class StaticPluginProvider : public PluginProvider {
Modified: scummvm/trunk/base/plugins.h
===================================================================
--- scummvm/trunk/base/plugins.h 2008-01-10 11:54:31 UTC (rev 30373)
+++ scummvm/trunk/base/plugins.h 2008-01-10 12:00:10 UTC (rev 30374)
@@ -59,7 +59,6 @@
public:
virtual ~Plugin() {}
-// virtual bool isLoaded() const = 0; // TODO
virtual bool loadPlugin() = 0;
virtual void unloadPlugin() = 0;
@@ -71,8 +70,6 @@
virtual GameDescriptor findGame(const char *gameid) const = 0;
virtual GameList detectGames(const FSList &fslist) const = 0;
- virtual SaveStateList listSaves(const char *target) const = 0;
-
virtual PluginError createInstance(OSystem *syst, Engine **engine) const = 0;
};
@@ -109,8 +106,7 @@
Engine_##ID##_gameIDList(), \
Engine_##ID##_findGameID, \
Engine_##ID##_create, \
- Engine_##ID##_detectGames, \
- Engine_##ID##_listSaves \
+ Engine_##ID##_detectGames \
);\
} \
void dummyFuncToAllowTrailingSemicolon()
@@ -123,7 +119,6 @@
PLUGIN_EXPORT GameDescriptor PLUGIN_findGameID(const char *gameid) { return Engine_##ID##_findGameID(gameid); } \
PLUGIN_EXPORT PluginError PLUGIN_createEngine(OSystem *syst, Engine **engine) { return Engine_##ID##_create(syst, engine); } \
PLUGIN_EXPORT GameList PLUGIN_detectGames(const FSList &fslist) { return Engine_##ID##_detectGames(fslist); } \
- PLUGIN_EXPORT SaveStateList PLUGIN_listSaves(const char *target) { return Engine_##ID##_listSaves(target); } \
} \
void dummyFuncToAllowTrailingSemicolon()
#endif
@@ -139,7 +134,6 @@
typedef GameDescriptor (*GameIDQueryFunc)(const char *gameid);
typedef PluginError (*EngineFactory)(OSystem *syst, Engine **engine);
typedef GameList (*DetectFunc)(const FSList &fslist);
- typedef SaveStateList (*ListSavesFunc)(const char *target);
protected:
const char *_name;
@@ -147,12 +141,11 @@
GameIDQueryFunc _qf;
EngineFactory _ef;
DetectFunc _df;
- ListSavesFunc _lsf;
GameList _games;
public:
- PluginRegistrator(const char *name, const char *copyright, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df, ListSavesFunc lsf)
- : _name(name), _copyright(copyright), _qf(qf), _ef(ef), _df(df), _lsf(lsf), _games(games) {}
+ PluginRegistrator(const char *name, const char *copyright, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df)
+ : _name(name), _copyright(copyright), _qf(qf), _ef(ef), _df(df), _games(games) {}
};
#endif
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