[Scummvm-devel] Finding the theme archive via SearchMan

Max Horn max at quendi.de
Wed Apr 28 19:07:12 CEST 2010


Am 28.04.2010 um 15:42 schrieb Angus Lees:

> Android packages are basically zip files.  In the Android port, I
> bundle kyra.dat, scummmodern.zip, etc into the package zip to avoid
> the user having to install anything extra -- and then I have a
> Common::Archive sub-class that I hook in via
> addSysArchivesToSearchSet.  It actually works really well ...
> 
> ... except for themes.  ThemeEngine.cpp currently does its own
> directory searching, etc using FSNode and doesn't use SearchMan or the
> standard ArchiveMember methods.  In the Android port, I patched
> ThemeEngine.cpp to do the latter but in the process lost the ability
> to use unzipped themes since the Archive member methods don't present
> a sub-directory equivalent.
> 
> So:  is preserving the ability to use unzipped themes important to anyone?
> 
> I can (presumably) make the code do a combination of the two
> approaches if required - the downside will be some code duplication,
> since the two approaches are a few functions of almost-but-not-quite
> the same code.
> 
> Thoughts?

As Johannes already pointed out, we really do want to be able to use unzipped themes. The best solution seems indeed to accept some code duplication and first only search for unzipped themes (i.e. directories containing theme data files), and then using SearchMan to locate suitable theme .zip files... Unless I am missing something, in which case I am sure otherwise will quickly speak up :)

Cheers,
Max



More information about the Scummvm-devel mailing list