mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 23:43:34 +00:00
DIRECTOR: Added test target for executing all movies
This commit is contained in:
parent
d64137740b
commit
0bf57feb40
@ -71,6 +71,7 @@ bool DirectorEngine::hasFeature(EngineFeature f) const {
|
||||
static const PlainGameDescriptor directorGames[] = {
|
||||
{ "director", "Macromedia Director Game" },
|
||||
{ "directortest", "Macromedia Director Test Target" },
|
||||
{ "directortest-all", "Macromedia Director All Movies Test Target" },
|
||||
{ "theapartment", "The Apartment, Interactive demo" },
|
||||
{ "gundam0079", "Gundam 0079: The War for Earth" },
|
||||
{ "jewels", "Jewels of the Oracle" },
|
||||
|
@ -33,6 +33,7 @@ namespace Director {
|
||||
#define WINDEMO(t,e,f,m,s,v) GENGAME_(t,e,f,m,s,Common::EN_ANY,Common::kPlatformWindows,ADGF_DEMO,v)
|
||||
|
||||
static const DirectorGameDescription gameDescriptions[] = {
|
||||
// Execute all *.lingo files in game directory
|
||||
{
|
||||
{
|
||||
"directortest",
|
||||
@ -47,6 +48,21 @@ static const DirectorGameDescription gameDescriptions[] = {
|
||||
4
|
||||
},
|
||||
|
||||
// Executa all movies in directory
|
||||
{
|
||||
{
|
||||
"directortest-all",
|
||||
"",
|
||||
AD_ENTRY1("lingotests-all", 0),
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformMacintosh,
|
||||
ADGF_NO_FLAGS,
|
||||
GUIO1(GUIO_NOASPECT)
|
||||
},
|
||||
GID_TESTALL,
|
||||
4
|
||||
},
|
||||
|
||||
// Generic D3 Mac entry
|
||||
MACGAME("director", "", "D3-mac", 0, -1, 3),
|
||||
// Generic D4 Mac entry
|
||||
|
@ -145,6 +145,8 @@ Common::Error DirectorEngine::run() {
|
||||
_lingo->runTests();
|
||||
|
||||
return Common::kNoError;
|
||||
} else if (getGameID() == GID_TESTALL) {
|
||||
enqueueAllMovies();
|
||||
}
|
||||
|
||||
// FIXME
|
||||
@ -202,6 +204,10 @@ Common::Error DirectorEngine::run() {
|
||||
|
||||
debugC(1, kDebugEvents, "Finished playback of score '%s'", _currentScore->getMacName().c_str());
|
||||
|
||||
if (getGameID() == GID_TESTALL) {
|
||||
_nextMovie = getNextMovieFromQueue();
|
||||
}
|
||||
|
||||
// If a loop was requested, do it
|
||||
if (!_nextMovie.movie.empty()) {
|
||||
_lingo->restartLingo();
|
||||
@ -273,4 +279,26 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo
|
||||
return nameMap;
|
||||
}
|
||||
|
||||
void DirectorEngine::enqueueAllMovies() {
|
||||
Common::ArchiveMemberList fsList;
|
||||
SearchMan.listMatchingMembers(fsList, "*");
|
||||
|
||||
for (Common::ArchiveMemberList::iterator it = fsList.begin(); it != fsList.end(); ++it)
|
||||
_movieQueue.push_back((*it)->getName());
|
||||
|
||||
Common::sort(_movieQueue.begin(), _movieQueue.end());
|
||||
|
||||
debug(1, "Enqueued %d movies", _movieQueue.size());
|
||||
}
|
||||
|
||||
MovieReference DirectorEngine::getNextMovieFromQueue() {
|
||||
MovieReference res;
|
||||
|
||||
res.movie = _movieQueue.front();
|
||||
|
||||
_movieQueue.remove_at(0);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
} // End of namespace Director
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "common/random.h"
|
||||
#include "common/rect.h"
|
||||
#include "common/str-array.h"
|
||||
|
||||
#include "common/hashmap.h"
|
||||
#include "engines/engine.h"
|
||||
@ -47,7 +48,8 @@ namespace Director {
|
||||
|
||||
enum DirectorGameID {
|
||||
GID_GENERIC,
|
||||
GID_TEST
|
||||
GID_TEST,
|
||||
GID_TESTALL
|
||||
};
|
||||
|
||||
class Archive;
|
||||
@ -178,9 +180,14 @@ private:
|
||||
uint16 _draggingSpriteId;
|
||||
Common::Point _draggingSpritePos;
|
||||
|
||||
Common::StringArray _movieQueue;
|
||||
|
||||
private:
|
||||
void testFontScaling();
|
||||
void testFonts();
|
||||
|
||||
void enqueueAllMovies();
|
||||
MovieReference getNextMovieFromQueue();
|
||||
};
|
||||
|
||||
extern DirectorEngine *g_director;
|
||||
|
Loading…
x
Reference in New Issue
Block a user