mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 09:48:51 +01:00
Added truRIP superdat and directory structure support.
This commit is contained in:
parent
0a3fa3957f
commit
aaa1eb05d9
17
Package/Environment/Common/controls.conf
Executable file
17
Package/Environment/Common/controls.conf
Executable file
@ -0,0 +1,17 @@
|
||||
up = Up, joyHat0Up
|
||||
down = Down, joyHat0Down
|
||||
left = Left, joyHat0Left
|
||||
right = Right, joyHat0Right
|
||||
pageUp = PageDown
|
||||
pageDown = PageUp
|
||||
letterUp = M
|
||||
letterDown = N
|
||||
favPlaylist = F
|
||||
nextPlaylist = F2
|
||||
prevPlaylist = F1
|
||||
addPlaylist = I
|
||||
removePlaylist = O
|
||||
random = R
|
||||
select = Return, 1, joyButton10
|
||||
back = Escape, joyButton6
|
||||
quit = Q
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -286,6 +286,7 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me
|
||||
std::string launcher;
|
||||
bool showMissing = false;
|
||||
bool romHierarchy = false;
|
||||
bool truRIP = false;
|
||||
|
||||
if (mergedCollectionName != "")
|
||||
{
|
||||
@ -299,6 +300,9 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me
|
||||
}
|
||||
(void)conf_.getProperty("collections." + info->name + ".list.includeMissingItems", showMissing);
|
||||
(void)conf_.getProperty("collections." + info->name + ".list.romHierarchy", romHierarchy);
|
||||
(void)conf_.getProperty("collections." + info->name + ".list.truRIP", truRIP);
|
||||
if (truRIP)
|
||||
romHierarchy = true;
|
||||
|
||||
// If no merged file exists, or it is empty, attempt to use the include and exclude from the subcollection
|
||||
// If this not a merged collection, the size will be 0 anyways and the code below will still execute
|
||||
@ -338,7 +342,7 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me
|
||||
rompath = path;
|
||||
path = "";
|
||||
}
|
||||
ImportRomDirectory(rompath, info, includeFilter, excludeFilter, romHierarchy);
|
||||
ImportRomDirectory(rompath, info, includeFilter, excludeFilter, romHierarchy, truRIP);
|
||||
} while (path != "");
|
||||
}
|
||||
|
||||
@ -439,7 +443,7 @@ void CollectionInfoBuilder::addPlaylists(CollectionInfo *info)
|
||||
}
|
||||
|
||||
|
||||
void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo *info, std::map<std::string, Item *> includeFilter, std::map<std::string, Item *> excludeFilter, bool romHierarchy)
|
||||
void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo *info, std::map<std::string, Item *> includeFilter, std::map<std::string, Item *> excludeFilter, bool romHierarchy, bool truRIP)
|
||||
{
|
||||
|
||||
DIR *dp;
|
||||
@ -466,7 +470,7 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo
|
||||
struct stat sb;
|
||||
if (romHierarchy && file != "." && file != ".." && stat( Utils::combinePath( path, file ).c_str(), &sb ) == 0 && S_ISDIR( sb.st_mode ))
|
||||
{
|
||||
ImportRomDirectory( Utils::combinePath( path, file ), info, includeFilter, excludeFilter, romHierarchy );
|
||||
ImportRomDirectory( Utils::combinePath( path, file ), info, includeFilter, excludeFilter, romHierarchy, truRIP );
|
||||
}
|
||||
else if (file != "." && file != "..")
|
||||
{
|
||||
@ -496,6 +500,14 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo
|
||||
i->collectionInfo = info;
|
||||
i->filepath = path + Utils::pathSeparator;
|
||||
|
||||
if ( truRIP )
|
||||
{
|
||||
i->file = basename;
|
||||
i->name = Utils::getFileName( path );
|
||||
i->fullTitle = i->name;
|
||||
i->title = i->name;
|
||||
}
|
||||
|
||||
info->items.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,5 +41,5 @@ private:
|
||||
MetadataDatabase &metaDB_;
|
||||
bool ImportBasicList(CollectionInfo *info, std::string file, std::map<std::string, Item *> &list);
|
||||
bool ImportDirectory(CollectionInfo *info, std::string mergedCollectionName);
|
||||
void ImportRomDirectory(std::string path, CollectionInfo *info, std::map<std::string, Item *> includeFilter, std::map<std::string, Item *> excludeFilter, bool romHierarchy);
|
||||
void ImportRomDirectory(std::string path, CollectionInfo *info, std::map<std::string, Item *> includeFilter, std::map<std::string, Item *> excludeFilter, bool romHierarchy, bool truRIP);
|
||||
};
|
||||
|
||||
@ -25,6 +25,7 @@ Item::Item()
|
||||
: collectionInfo(NULL)
|
||||
, leaf(true)
|
||||
{
|
||||
file = "";
|
||||
}
|
||||
|
||||
Item::~Item()
|
||||
|
||||
@ -29,6 +29,7 @@ public:
|
||||
std::string lowercaseFullTitle();
|
||||
std::string name;
|
||||
std::string filepath;
|
||||
std::string file;
|
||||
std::string title;
|
||||
std::string fullTitle;
|
||||
std::string year;
|
||||
|
||||
@ -604,7 +604,7 @@ bool MetadataDatabase::importTruriplist(std::string truriplistFile)
|
||||
for(rapidxml::xml_node<> *game = root->first_node("game"); game; game = game->next_sibling("game"))
|
||||
{
|
||||
rapidxml::xml_node<> *descriptionXml = game->first_node("description");
|
||||
rapidxml::xml_node<> *truripXml = game->first_node("trurip");
|
||||
rapidxml::xml_node<> *truripXml = game->first_node("EmuArc");
|
||||
if (!truripXml)
|
||||
{
|
||||
Logger::write(Logger::ZONE_ERROR, "Metadata", "Does not appear to be a TruripList SuperDat file (missing <trurip> tag)");
|
||||
@ -615,6 +615,7 @@ bool MetadataDatabase::importTruriplist(std::string truriplistFile)
|
||||
rapidxml::xml_node<> *developerXml = truripXml->first_node("developer");
|
||||
rapidxml::xml_node<> *yearXml = truripXml->first_node("year");
|
||||
rapidxml::xml_node<> *genreXml = truripXml->first_node("genre");
|
||||
rapidxml::xml_node<> *subgenreXml = truripXml->first_node("subgenre");
|
||||
rapidxml::xml_node<> *ratingXml = truripXml->first_node("ratings");
|
||||
rapidxml::xml_node<> *scoreXml = truripXml->first_node("score");
|
||||
rapidxml::xml_node<> *numberPlayersXml = truripXml->first_node("players");
|
||||
@ -627,6 +628,7 @@ bool MetadataDatabase::importTruriplist(std::string truriplistFile)
|
||||
std::string developer = (developerXml) ? developerXml->value() : "";
|
||||
std::string year = (yearXml) ? yearXml->value() : "";
|
||||
std::string genre = (genreXml) ? genreXml->value() : "";
|
||||
genre = (subgenreXml && subgenreXml->value_size() != 0) ? genre + "_" + subgenreXml->value() : genre;
|
||||
std::string rating = (ratingXml) ? ratingXml->value() : "";
|
||||
std::string score = (scoreXml) ? scoreXml->value() : "";
|
||||
std::string numberPlayers = (numberPlayersXml) ? numberPlayersXml->value() : "";
|
||||
|
||||
@ -85,7 +85,10 @@ bool Launcher::run(std::string collection, Item *collectionItem)
|
||||
}
|
||||
|
||||
// It is ok to continue if the file could not be found. We could be launching a merged romset
|
||||
if (collectionItem->file == "")
|
||||
findFile(selectedItemsPath, matchedExtension, selectedItemsDirectory, collectionItem->name, extensionstr);
|
||||
else
|
||||
findFile(selectedItemsPath, matchedExtension, selectedItemsDirectory, collectionItem->file, extensionstr);
|
||||
|
||||
args = replaceVariables(args,
|
||||
selectedItemsPath,
|
||||
|
||||
@ -148,12 +148,12 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the system artifact
|
||||
loadedComponent_ = findComponent(collectionName, "video", "video", true);
|
||||
loadedComponent_ = findComponent(collectionName, "video", "video", "", true);
|
||||
|
||||
// check the collection for the system artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", "video", true);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", "video", "", true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -165,12 +165,18 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadedComponent_ = findComponent(collectionName, "video", basename, false);
|
||||
loadedComponent_ = findComponent(collectionName, "video", basename, "", false);
|
||||
|
||||
// check the collection for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", basename, false);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", basename, "", false);
|
||||
}
|
||||
|
||||
// check the rom directory for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", "video", selectedItem->filepath, false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -178,18 +184,18 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadedComponent_ = findComponent(collectionName, "video", basename, false);
|
||||
loadedComponent_ = findComponent(collectionName, "video", basename, "", false);
|
||||
|
||||
// check the collection for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", basename, false);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, "video", basename, "", false);
|
||||
}
|
||||
|
||||
// check the submenu collection for the system artifact
|
||||
if (!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->name, "video", "video", true);
|
||||
loadedComponent_ = findComponent(selectedItem->name, "video", "video", "", true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -311,12 +317,12 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the system artifact
|
||||
loadedComponent_ = findComponent(collectionName, type_, type_, true);
|
||||
loadedComponent_ = findComponent(collectionName, type_, type_, "", true);
|
||||
|
||||
// check collection for the system artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, type_, true);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, type_, "", true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -328,12 +334,18 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadedComponent_ = findComponent(collectionName, type_, basename, false);
|
||||
loadedComponent_ = findComponent(collectionName, type_, basename, "", false);
|
||||
|
||||
// check the collection for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, basename, false);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, basename, "", false);
|
||||
}
|
||||
|
||||
// check the rom directory for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, type_, selectedItem->filepath, false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -341,18 +353,18 @@ void ReloadableMedia::reloadTexture()
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadedComponent_ = findComponent(collectionName, type_, basename, false);
|
||||
loadedComponent_ = findComponent(collectionName, type_, basename, "", false);
|
||||
|
||||
// check the collection for the artifact
|
||||
if(!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, basename, false);
|
||||
loadedComponent_ = findComponent(selectedItem->collectionInfo->name, type_, basename, "", false);
|
||||
}
|
||||
|
||||
// check the submenu collection for the system artifact
|
||||
if (!loadedComponent_)
|
||||
{
|
||||
loadedComponent_ = findComponent(selectedItem->name, type_, type_, true);
|
||||
loadedComponent_ = findComponent(selectedItem->name, type_, type_, "", true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -377,7 +389,7 @@ void ReloadableMedia::reloadTexture()
|
||||
}
|
||||
|
||||
|
||||
Component *ReloadableMedia::findComponent(std::string collection, std::string type, std::string basename, bool systemMode)
|
||||
Component *ReloadableMedia::findComponent(std::string collection, std::string type, std::string basename, std::string filepath, bool systemMode)
|
||||
{
|
||||
std::string imagePath;
|
||||
Component *component = NULL;
|
||||
@ -417,6 +429,8 @@ Component *ReloadableMedia::findComponent(std::string collection, std::string ty
|
||||
config_.getMediaPropertyAbsolutePath(collection, type, systemMode, imagePath);
|
||||
}
|
||||
}
|
||||
if ( filepath != "" )
|
||||
imagePath = filepath;
|
||||
|
||||
if(type == "video")
|
||||
{
|
||||
|
||||
@ -33,7 +33,7 @@ public:
|
||||
void draw();
|
||||
void freeGraphicsMemory();
|
||||
void allocateGraphicsMemory();
|
||||
Component *findComponent(std::string collection, std::string type, std::string basename, bool systemMode);
|
||||
Component *findComponent(std::string collection, std::string type, std::string basename, std::string filepath, bool systemMode);
|
||||
|
||||
void enableTextFallback_(bool value);
|
||||
|
||||
|
||||
@ -173,12 +173,12 @@ void ReloadableScrollingText::reloadTexture( )
|
||||
{
|
||||
|
||||
// check the master collection for the system artifact
|
||||
loadText( collectionName, type_, type_, true );
|
||||
loadText( collectionName, type_, type_, "", true );
|
||||
|
||||
// check collection for the system artifact
|
||||
if (text_.empty( ))
|
||||
{
|
||||
loadText( selectedItem->collectionInfo->name, type_, type_, true );
|
||||
loadText( selectedItem->collectionInfo->name, type_, type_, "", true );
|
||||
}
|
||||
|
||||
}
|
||||
@ -190,12 +190,12 @@ void ReloadableScrollingText::reloadTexture( )
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadText( collectionName, type_, basename, false );
|
||||
loadText( collectionName, type_, basename, "", false );
|
||||
|
||||
// check the collection for the artifact
|
||||
if (text_.empty( ))
|
||||
{
|
||||
loadText( selectedItem->collectionInfo->name, type_, basename, false );
|
||||
loadText( selectedItem->collectionInfo->name, type_, basename, "", false );
|
||||
}
|
||||
|
||||
}
|
||||
@ -203,18 +203,18 @@ void ReloadableScrollingText::reloadTexture( )
|
||||
{
|
||||
|
||||
// check the master collection for the artifact
|
||||
loadText( collectionName, type_, basename, false );
|
||||
loadText( collectionName, type_, basename, "", false );
|
||||
|
||||
// check the collection for the artifact
|
||||
if (text_.empty( ))
|
||||
{
|
||||
loadText( selectedItem->collectionInfo->name, type_, basename, false );
|
||||
loadText( selectedItem->collectionInfo->name, type_, basename, "", false );
|
||||
}
|
||||
|
||||
// check the submenu collection for the system artifact
|
||||
if (text_.empty( ))
|
||||
{
|
||||
loadText( selectedItem->name, type_, type_, true );
|
||||
loadText( selectedItem->name, type_, type_, "", true );
|
||||
}
|
||||
|
||||
}
|
||||
@ -222,6 +222,10 @@ void ReloadableScrollingText::reloadTexture( )
|
||||
}
|
||||
}
|
||||
|
||||
// Check for thext in the roms directory
|
||||
if ( text_.empty( ))
|
||||
loadText( selectedItem->filepath, type_, type_, selectedItem->filepath, false );
|
||||
|
||||
// Check for supported fields if text is still empty
|
||||
if (text_.empty( ))
|
||||
{
|
||||
@ -378,7 +382,7 @@ void ReloadableScrollingText::reloadTexture( )
|
||||
}
|
||||
|
||||
|
||||
void ReloadableScrollingText::loadText( std::string collection, std::string type, std::string basename, bool systemMode )
|
||||
void ReloadableScrollingText::loadText( std::string collection, std::string type, std::string basename, std::string filepath, bool systemMode )
|
||||
{
|
||||
|
||||
std::string textPath = "";
|
||||
@ -398,6 +402,8 @@ void ReloadableScrollingText::loadText( std::string collection, std::string type
|
||||
{
|
||||
config_.getMediaPropertyAbsolutePath( collection, type, systemMode, textPath );
|
||||
}
|
||||
if ( filepath != "" )
|
||||
textPath = filepath;
|
||||
|
||||
textPath = Utils::combinePath( textPath, basename );
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public:
|
||||
|
||||
private:
|
||||
void reloadTexture( );
|
||||
void loadText( std::string collection, std::string type, std::string basename, bool systemMode );
|
||||
void loadText( std::string collection, std::string type, std::string basename, std::string filepath, bool systemMode );
|
||||
Configuration &config_;
|
||||
bool systemMode_;
|
||||
bool layoutMode_;
|
||||
|
||||
@ -671,6 +671,10 @@ bool ScrollingList::allocateTexture( unsigned int index, Item *item )
|
||||
t = imageBuild.CreateImage( imagePath, page, imageType_, scaleX_, scaleY_ );
|
||||
}
|
||||
|
||||
// check rom directory path for art
|
||||
if ( !t )
|
||||
t = imageBuild.CreateImage( item->filepath, page, imageType_, scaleX_, scaleY_ );
|
||||
|
||||
if ( !t )
|
||||
{
|
||||
t = new Text(item->title, page, fontInst_, scaleX_, scaleY_ );
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
std::string retrofe_version_major = "0";
|
||||
std::string retrofe_version_minor = "8";
|
||||
std::string retrofe_version_build = "17";
|
||||
std::string retrofe_version_build = "18";
|
||||
|
||||
|
||||
std::string Version::getString( )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user