Difference between revisions of "TODO"

From ScummVM :: Wiki
Jump to navigation Jump to search
(Moved autosave interval to FR in order to deal with it soon(er))
(Add note about missing Broken Sword 2 feature.)
 
(159 intermediate revisions by 27 users not shown)
Line 1: Line 1:
{{Infobox_TODO|
taskname=Main TODO List|
techcontact=The ScummVM Team|
subsystem=Generic|
}}
Here is a list of things we consider doing in the future. Note that we don't promise to do any of these, nor when we will do them. It's just a list of what we hope to be able to do one day, and some items on the list really are more like ideas than real proposals, so take it with a grain of salt.
Here is a list of things we consider doing in the future. Note that we don't promise to do any of these, nor when we will do them. It's just a list of what we hope to be able to do one day, and some items on the list really are more like ideas than real proposals, so take it with a grain of salt.


Line 10: Line 16:




== Docs, Web site ==
== Documentation ==
 
See also the [[Documentation/TODO]] page.


=== General ===
=== General ===
* Add port specific user documentation (dreamcast/palm especially). That would include things like:
** How to use ScummVM on system XYZ
** Which Palm / WinCE devices will run ScummVM, which definitely will not run it (or with which limitations)?
* Update/enhance man page
* Write a high level overview of how ScummVM and its engines work?
* Write a high level overview of how ScummVM and its engines work?


=== README / Manual ===
== Web sites ==
* Fingolfin has started a DocBook based manual (and FAQ, and Developer's Guide). You can find it in the SVN module "docs". It's a starting place, but very unfinished.
* There is a LaTeX based version of the README in the "doc" subdir of the "scummvm" SVN module, but it tends to slip out of sync with the plain text README, and it's not really a manual, it's just the README in a different file format.
* Everybody is welcome to start helping out with the public manual project in the "docs" SVN module. You can either reuse content from the README, or replace it with new, better written stuff. Contact Fingolfin or our mailing list, scummvm-devel, if you are interested in helping out.
* Maybe move all/most of the compression related stuff from our README completely to the tools README, and only leave a pointer to that in the main README. This would be beneficial because this way, it's only documented in one place; it's *completly* documented (currently, the main README doesn't mention compress_scumm_bun, for example); and people who want to use the compression tools need to download the tools package anyway.
* It would be greate to have a "Developer's Guide to ScummVM" which explains the ScummVM framework, and also the engines, i.e.
** stuff in common/, like the config manager etc.
** the backend API, and how to create new backends
** the sound system
** how to create a new engine
** a chapter for each engine, with as many/little details as the resp. engine teams deem appropriate...
** ...


=== LaTeX docs ===
=== [[Buildbot]] ===
* These are constantly out of sync with the README :-/. Keep an eye on this and make sure that you always update both at once.


=== Code ===
=== [[Doxygen]] ===
* Add more Doxygen comments. However, quality is preferable over quantity
* Make it run again, upgrade
* Document the OSystem overlay API, it badly needs it...
* Unify the copyright in the GPL headers in our sources. Currently, some list Ludvig's copyright for 2001, and "ScummVM project 2001-2006". Some others do not mention Ludvig, and say "2002-2006" for the "ScummVM project" copyright range. Some others may something different again. All should be changed to the form found in "base/main.h".
* Note: Strictly spoken, none of these copyright strings has much of a meaning anyway, since (a) we never asked people to sign over their copyright to us, and (b) "ScummVM project" is not a proper legal entity...


=== Web site ===
== Common code, infrastructure ==
* Add the "Manual" / README to the site


=== Wiki ===
=== Audio ===
* Add some content to the Help:Editing link you see when editing a page.
* Move the content of http://www.scummvm.org/docs/specs/scrp-v6.php to [[SCUMM V6 opcodes]]
* Maybe move http://www.scummvm.org/documentation.php?view=datafiles to the Wiki?


== Common code, infrastructure ==
==== Mixer ====
* the "isReady" code is irritating. Most engines ignore it anyway. It's primary purpose is to allow ScummVM to run even if not digitial audio out is available. A better solution would likely be to enforce that all backends always return a valid mixer. In the worst case, if a backend cannot produce audio output, it should still instantiate an Audio::MixerImpl, with some arbitrary sample rate (I recommend 22050 Hz), and a fake playback thread, which acts like an audio output callback but simply discards the generated audio data. (Note: It doesn't suffice to just throw away input data in Mixer::playInputStream, as this breaks with QueuingAudioStream).


=== General ===
==== CD ====
* Revise the way "quit" is handled. Maybe add a global variable "g_quit" which we set when the application should be quit (e.g. when an EVENT_QUIT is received). This is useful if multiple levels of event loops have to be ended
* Consider extending the Audio CD Manager with WAV or VOC support (essentially, the WAV/VOC code would need to be enhanced by adding a factory function similar to that provided for the FLAC/Vorbis/MP3 streams).
* Make some generic "EventLoop" API/class which all backends and the GUI use. Initially this would just call the backend poll_event() etc. methods. But eventually the EventLoop object(s) could be made by the backend. This may allow for more efficient CPU usage etc. The current event handling model essentially is polling: the engines run some kind of main loop, which, besides many other things, also polls and dispatches events. The idea is to turn this around: the event loop frequently gives the engine time to do these "other things".
* add a "pause" feature to the AudioCDManager (might require us to extend the OSystem CD API, too). Useful to be able to fully pause the currently running engine
* Maybe add ways to modify the game configs via the command line. E.g. allow
    ./scummvm --add new_target --path=/foo monkey2
    ./scummvm --remove new_target
* Maybe allow launching games even if no target is specified? I.e. the user only has to specify a path (or run ScummVM from the right directory), and ScummVM auto-detects the game in that location
    ./scummvm --auto-detect
* The following things should be put into namespaces:
** MIDI related classes either to Audio, or a new "MIDI" namespace
** backend specific stuff into ??? (maybe new namespace "Backends" ?) not sure about this one.
* Get rid of getenv in as many places as possible. Ideally, we'd only use it to query HOME on Unix systems.


=== Build System ===
==== MIDI ====
* Add test(s) for backend usability in the configure script.
* See also [[Music drivers redesign]]
* Allow automatic re-runs of configure (this would have to 'save' the values of env vars like CXXFLAGS and also command line params)
* MIDI: Add API to OSystem which allows client code to query for "native" MIDI drivers (like Windows, ALSA, Zodiac, CoreAudio). Then change the MIDI interfacing code (GUI, command line, config file, etc.) and also MidiDriver::createMidi() to use both that list and the list of 'emulated' MIDI devices (AdLib, MT-32, PC Speaker, etc.) in an appropriate way.
* Add an install target to the Makefile - Copy binary, install manpage, add menu items, install README. See also patch #891909 (Gnome/KDE .desktop file)
 
=== Audio ===
* Get the high quality resample code to work [Fingolfin has started work on this]
* Consider changing the mixer volume to use range 0-255, for sake of consistency (but at a slight loss of efficiency). Note that this requires changes in at least rate.cpp and mixer.cpp.
* MIDI: Add API to OSystem which allows client code to query for "native" MIDI drivers (like Windows, ALSA, Zodiac, CoreAudio). Then change the MIDI interfacing code (GUI, command line, config file, etc.) and also MidiDriver::createMidi() to use both that list and the list of 'emulated' MIDI devices (Adlib, MT-32, PC Speaker, etc.) in an appropriate way.
* The Audio CD Manager, and especially the DigitalTrackInfo class could stand an overhaul. The system currently is not as easy to extend as one would wish. In particular, it would be nice if arbitrary AudioStream classes could be used here (this then would reduce code duplication and make it instantly possible to use WAV/VOC encoded audio tracks, should we desire to support those).
* Modify our audio stream classes (for MP3/Vorbis/FLAC/... playback) to use SeekableReadStream instead of Files -> allow from-memory-playback. And could take advantage of a new hypothetical "Sub(Seekable)Stream" class. (See below for more info on that).
* Make it possible to pass options to the midi/music drivers. This would allow us to get rid of the getenv hacks in the alsa & seq drivers.
* Make it possible to pass options to the midi/music drivers. This would allow us to get rid of the getenv hacks in the alsa & seq drivers.
**A simple approach would be to allow the user to specify "extended" driver descriptions. E.g. "alsa:1234" could indicate the alsa driver with port 1234; alternatively, "alsa:port=1234".
**A simple approach would be to allow the user to specify "extended" driver descriptions. E.g. "alsa:1234" could indicate the alsa driver with port 1234; alternatively, "alsa:port=1234".
**This doesn't allow for easy tweaking of those settings via the GUI.... to achieve that, one approach would be to invent a 'parameter description language' which allows a driver to specify which options with which kind of values it supports... very flexible, but possibly overkill.
**This doesn't allow for easy tweaking of those settings via the GUI.... to achieve that, one approach would be to invent a 'parameter description language' which allows a driver to specify which options with which kind of values it supports... very flexible, but possibly overkill.
**Instead, one could add a hook method to MIDI drivers that let's them add a few controls of their own to the options dialog. This is probably a lot easier to implement, though not quite as "clean"...
**Instead, one could add a hook method to MIDI drivers that let's them add a few controls of their own to the options dialog. This is probably a lot easier to implement, though not quite as "clean"...
* Some of our engines support the speech_mute / sfx_mute / music_mute options, but most don't. Almost all support the corresponding FOO_volume config keys. All engines use Mixer::setVolumeForSoundType to push those through to the mixer. I am wondering: Maybe it would make sense to remove Mixer::setVolumeForSoundType, and instead leave it up to the mixer to query the ConfigManager for the corresponding FOO_volume/_mute values? That way we'd ensure 100% identical behavior in all engines and actually simplify the code a bit... ? Not sure if this would work smoothly, it needs to be investigated.
* Our XMIDI parser seems to have a couple of missing features, but it's unclear which ones are actually needed. Possible references for a better implementation include the [http://exult.sf.net Exult] project and the [http://www.thegleam.com/ke5fx/ source code for AIL Version 2]. The KYRA engine contains some more complete XMIDI implementation on top of our XMIDI parser class too, so it might also be a place to look at for reference.
* Add a "SeekableAudioStream" class, which would allow seeking in an audiostream: Forward / backward; offset is specified in milliseconds. Then, convert at least the MP3/FLAC/Vorbis audiostream classes to subclass that, and also adapt the corresponding factory functions. Converting more would obviously be nice, too. The existing DigitalTrackInfo subclasses already contain seeking code which could be used as a starting point.
* Once SeekableAudioStream has been implemented, this can be used to greatly simplify the DigitalTrackInfo subclasses (like MP3TrackInfo) which are used by the Audio CD manager. In fact, it might then be possible to completely get rid of these special subclasses.
* Our XMIDI parser seems to have a couple of missing features, but it's unclear which ones are actually needed. For instance, [[Kyra|Kyrandia]] 1 (and probably 2) uses the XMIDI mechanism for looping, which we currently implement through a very simple hack. The [http://exult.sf.net Exult] project may have a good reference implementation.


=== Config Manager ===
=== Config Manager ===
* Add a 'notification' system. E.g. the SoundMixer could request to be notified whenever the value of the "volume" config option changes. In other words, instead of a "pull" approach (where each subsystem has to check whether any config option relevant to it has been changed) we use a "push" approach. Of course the current approach is "push", too: whenever e.g. the volume setting is changed, the code doing so has to updated the SoundMixer etc. That's cumbersome, and error prone. Would be much nicer if updating the volume config value automatically notifies the SoundMixer, iMuse etc.
* Modify the ConfigManager to make use of the ConfigFile class. This is more difficult than it sounds at first, because currently our ConfigManager is not just used for managing the active config, but also ab-used for editing config data (once for specific targets, in the launcher's "edit game" dialog, and once for editing the "active config" in the engines/dialog.cpp ConfigDialog). This mess needs to be untangled first.
* Modify the ConfigManager to make use of the ConfigFile class.
* Maybe even follow the pentagram (http://pentagram.sf.net) approach and have three classes:
* Maybe even follow the pentagram (http://pentragram.sf.net) approach and have three classes:
** SettingsManager (like our current ConfigManager)
** SettingsManager (like our current ConfigManager)
** ConfigFileManager (manages a set of config files, possibly merging the data from multiple config files)
** ConfigFileManager (manages a set of config files, possibly merging the data from multiple config files)
** ConfigFile (a simple .ini file accessor).
** ConfigFile (a simple .ini file accessor).
*: This makes it easy to add additional config sources (e.g. XMLConfigFile); makes it possible to treat the command line data like another config file (CommandLineConfig); and simply follows the good old MVC approach, which is always a good idea.
*: This makes it easy to add additional config sources (e.g. XMLConfigFile); makes it possible to treat the command line data like another config file (CommandLineConfig); and simply follows the good old MVC approach, which is always a good idea.
 
* Add a proper version to the Config file, which indicates true changes in the format / data in it. Right now, we only have a "fake" version number where any ScummVM instance will just write its version in. Which is totally useless. A proper version would allow us to ...
=== Files ===
** ... produce a warning if an older ScummVM version tries to load a config file written by a newer version with potentially incompatible changes (such as the switch from language code "hb" to "he" for Hebrew)
* Get rid of the incRef/decRef API of class File. Instead, add a clone() method which generates a new (independant) File object for the same file (only would work for files in read mode, obviously). Convert the audio code to use this instead of the ref counting.<br> Reason: Using a shared file object can lead to race conditions if multiple threads try to use it at the same time; on some systems (Symbian) it is apparently not even possible to do it; iahd t can also cause problems even in non-threaded code, when we seek in one block of code, and then try to access it from another block, w/o reseeking first.
** ... detect when we an old config file is loaded which needs to be updated (e.g. by changing language "hb" to "he"; by adding "guioptions" to targets; by fixing trailing slashes in "path"; maybe even updating old style; and maybe in the future by adding "engineid" fields to all targets)
* Currently, FilesystemNode's default constructor invokes AbstractFilesystemNode::getRoot. There is no specified way to obtain the "current" directory (and indeed, on some systems, that notion doesn't even make sense). Thing is, currently, the browser uses this as its default starting location, which may not always be optimal. Still, it might be useful to add a AbstractFilesystemNode::getDefaultDir() method or so (on systems w/o a "current directory", it could just call through to getRoot()).
* Method names in FilesystemNode are inconsistent: Compare getParent, getChild to displayName(), path(), and once again to listDir, isValid, isDirectory (of course this "problem" affects all of ScummVM to a degree). This is a typical clash of the "verb-object, verb-adjective" pattern (getParent, getPath, isValid) vs. the "pure object/adjective" pattern (parent, path, valid).
* Don't rely on the existence of SEEK_CUR, SEEK_END, SEEK_SET -- rather, define our own enum for this and convert all client code to use it.
* Try to replace all usages of paths by FilesystemNode. In particular, Engine::_gameDataPath and File::addDefaultDirectory() will have to be adjusted. The idea behind this is to ease portability.
* Consider removing write support from class File completely. After all, we do not support writing to data files on many platforms anyway. There are only three things for which we need writable files:
*# Savegames -- but for those we already have the SavefileManage, so no problem
*# Resources dumps -- useful for debugging. To support those, we could add a new DumpFile class, which simply does nothing on systems which don't support this
*# Config file -- this one is the trickiest. The best approach is probably to make the actual reading/writing of the config file adjustable by the backend. This would also help to reduce the #ifdef hell in config-manager.cpp (see also the [[Modular Backends]] plans).


=== GUI ===
=== GUI ===
* [[GUI TODO#To_Do|GUI TODO]]
* [[GUI Themes/TODO|GUI TODO]]


=== Plugins ===
=== Plugins ===
* Add a plugin API that allows querying a plugin for the savegames associated with a given game; that is, you pass the name of a target from the config to the plugin, and it returns a list of savegames. How that list would look like exactly is debatable; but it should be possible to extract a user friendly name; a slot ID corresponding to the "-x" command line param; and possibly a filename. Justification: This API would make it possible to directly load savegames from the launcher.<br>This savegame API could return additional (optional) information for each savegame entry: name; creation date; thumbnail screenshot
* On OSX: Support a plugin build in the bundle target: *.plugin files should be put into ScummVM.app/Contents/PlugIns/; this also means that the loader needs to search in the plugin dir of the active bundle. So use the CF bundle API, inside a #ifdef MACOSX block.
* On OSX: Support a plugin build in the bundle target: *.plugin files should be put into ScummVM.app/Contents/PlugIns/; this also means that the loader needs to search in the plugin dir of the active bundle. So use the CF bundle API, inside a #ifdef MACOSX block.
* Replace DetectedGame by a 'map' containing essentially the same data that the config file would contain -- i.e. gameid, description, language, platform; but also any further data, like e.g. basename, target_md5, or *anything* the engine deems important. -> far more flexible, and helps to simplify the launcher code, too.
* Make DetectedGame::updateDesc a normal function, not a member function.
* Make DetectedGame::updateDesc a normal function, not a member function.
* Allow static and dynamic plugins to be used at the same time. I.e. make it possible to build some plugins statically, and some dynamically.


=== Savegames ===
=== Launcher ===
* Enhance SaveFileManager by adding an API that allows renaming / deleting savegames.
* Enhance the Mass detector to show a list with the results (and optionally, allow the user to edit/cull that list before adding it).
* Added error return codes to openForSaving / openForLoading so that client code can nicely detect & report save/load failures ("media full", "file not found", "save path does not exist", "save path not writeable", etc.).
* Make the gameid editable via an "advanced" tab entry?
* Try to get rid of getSavePath(): It is mostly used to print out more meaningful error messages about save failures. Instead of that, consider adding a getLastError() or so call, which return a string with additional information about the error. This is more portable, too.  
* The global options dialog may show a button for configuring the savepath even on systems where it is fixed -> not good. This button should be hidden/removed for these systems
* <p>Let me give a specific example on how error handling could look like:
* separate launcher code even more from rest of ScummVM, to make custom launchers easier?
<pre>
** maybe separate launcher using MVC approach? Separate code which scans for games etc. from the presentation layer, to make it easier to write custom launchers with behavior matching that of the default launcher?
ErrorCode err = saveMan->openForSaving(name, &myFile);
* show cover art in launcher
if (!err) {
** this would only be done on "high end" systems, must be possible to disable code
myFile->write(...);
** we can't ship artwork directly, due to copyright concerns; so only ship artwork where  it is legally possible, and otherwise allow users to setup "artwork packs"
...
** control what artwork is shown using a config key
err = myFile->ioError();
 
}
=== Global Main Menu/Return to Launcher ===
switch (err) {
* Confirm exit dialog woes:
case kNoError:
** Double "confirm exit" dialog: When confirm exit is enabled in ScummVM, the ScummVM quit confirm dialog shows up in addition to the quit confirm dialogs for those games which have their own. For example, when you select 'Quit' from Beneath a Steel Sky's in-game menu, it asks you if you really want to quit. Then, after answering, ScummVM gives you another dialog asking you if you really want to quit. So, ScummVM should not show the quit confirm dialog if the in-game dialog has already been displayed. This affects any game which has it's own menu system from where you can quit, or has a native quit confirm dialog. So this means most games.
  break;
** Add/unify "confirm exit" dialog, globally (see [https://sourceforge.net/tracker/index.php?func=detail&aid=1731025&group_id=37116&atid=418823 FR #1731025])
case kMediaFullError:
* Options Dialog: Implement engine flags to define which features in the Options dialog are supported by the current running game. Use these flags to hide/show the appropriate sliders and buttons in the Options Dialog
  display("Writing your save game failed due to lack of space: %s", saveMan->getErrorString());
* Improve the look of the GMM: This could include displaying the engine name and the game name on the top of the GMM.
default:
* Config Dialog code: Resolve the FIXME in engines/dialogs.cpp which pertains to having to use the empty string as the domain name. This is a bigger task, but will enable many other changes (thus as finally changing ConfigManager to use ConfigFile). Essentially, the current game config dialog tries to abuse the system by editing the *active* settings via the config manager, in order to fully reduce the options dialog code from the launcher. But there is a big difference between editing the config settings of a specific target, and the active settings. So, one probably needs to rewrite the code for the config dialog shown from the GMM
  display("An error occured while writing a savegame: %s", saveMan->getErrorString());
 
}
=== Error handling ===
</pre>
As a slight variation, we could introduce an "error manager" which offers the "getErrorString" method and which could be used by more code. Compare also with SDL_SetError & SDL_GetError.
</p>


=== Streams ===
Sometimes, bugs are reported that are not easily reproducible, e.g. [https://sourceforge.net/p/scummvm/bugs/6751/ Bug #6751]. In such cases, it would be useful to have the error handler in ScummVM generate (and, optionally, automatically send) minidumps that can be used by us to successfully examine crashed ScummVM processes. Integration of something like [https://chromium.googlesource.com/breakpad/breakpad/ Google Breakpad] is one reasonable option. While it is not likely to be able to get such crash handling into all ports, just supporting the most popular platforms would be enough to make this feature very useful.
* Maybe add a "clone" method that makes a copy of the (seekable/readable) stream. In the case of files, this would create a new file descriptor. Purpose: Replace the Symbian hack in MP3InputStream and other places; in particular, often we need two parts of code to access the same file but in separate positions... Problem: It might not be possible on all our target systems to safely clone (file) streams.


== Engines / frontends ==
== Engines / frontends ==
=== General ===
* Fix engines so they clean up after themselves, to allow proper re-entry to the launcher. See "FIXME: LAUNCHERHACK" in base/main.cpp.


=== [[SCUMM]] ===
=== [[SCUMM]] ===
* Make it possible to restart games properly
* see [[SCUMM/TODO|SCUMM TODO]] list
* Possibly implement a new resource manager, which then also could be shared by ScummEX. [Jamieson has some ideas about this].
* Figure out how to extract resources from Apple II versions
* Figure out how to extract resources from Turbografx/PC Engine version of Loom
* Loom EGA: Add support for music and sound effects in Macintosh version
* Add support for handling Kanji in FM-Towns games (foreground is rendered on a second plane at 640x480), text uses Shift_JIS encoding [implementation now that currently depends on font rom, not needing the rom would be preferable]
* Add support for TFMX music format in Amiga version of Monkey Island 1 Check http://darkstar.tabu.uni-bonn.de/~neo/audio.html for music format details
* Clean up class Gdi. This class right now mostly is about decoding various graphic formats. However some other functionality has crept into it, too. It would be nice if class Gdi would only contain the GFX decoding code, and nothing else (assuming that is feasible w/o too much trouble). OTOH, the code which is responsible for managing virtual screens, rendering virtual screens to the real display etc. could be grouped into a new class (e.g. VSManager or so).
* Reduce kMD5FileSizeLimit from 1MB to e.g. 80 kb (this will force us to recompute the MD5 for the mac bundles, but hopefully nothing else)
* ADLIB: There seems to be some loop/repeat mechanism in old Adlib sound effects that we do not handle. [http://vogons.zetafleet.com/viewtopic.php?t=8644 This thread] has some discussion, and recordings. Two good examples are the door opening sound in Indy 3 and Monkey Island 1 (floppy), and the typewriter sound in Indy 3.
* ADLIB: We don't handle (global) music volume changes for adlib sounds in older SCUMM games. See [https://sourceforge.net/tracker/index.php?func=detail&aid=1159581&group_id=37116&atid=418820 bug #1159581].


==== SCUMM C64 ====
=== [[AGI]] ===
* see [[SCUMM_C64|SCUMM C64 TODO list]]
* see [[AGI/TODO|AGI TODO]] list


==== SCUMM NES ====
=== [[AGOS]] ===
* see [[SCUMM NES|SCUMM NES TODO list]]
* see [[AGOS/Bugs|AGOS Bugs]] list
* see [[AGOS/TODO|AGOS TODO]] list


==== HE games ====
=== [[Cine]] ===
* see [[HE_Progress|HE Progress status]]
* see [[Cine/TODO|Cine TODO]] list


=== [[AGOS]] ===
=== [[CruisE]] ===
* see [[AGOS Bugs]] list
* see [[Cruise/TODO|CruisE TODO]] list
* see [[AGOS TODO]] list


=== Broken Sword 2 ===
=== [[Drascula]] ===
* Enforce ScummVM [[Code Formatting Conventions]]. (Mostly done?)
* see [[Drascula/TODO|Drascula TODO]] list
* Encapsulate the code into sensible objects. (Partly done.)
* Enable the CD swapping code. (Partly done.)
* Fix the credits so they look more like the original. (Did we ever get the source code for that?)
* Maybe work around script bug which causes the mop to disappear briefly when trying to pick it up from the top of the boat at the London docks. (The event to hide the mop is sent too early.) See bug [https://sourceforge.net/support/tracker.php?aid=1214168 #1214168].
* Unify some of the code with Broken Sword 1 (e.g. in router.cpp).


=== [[Gob]] ===
=== [[Gob]] ===
* see [[Gob TODO]] list
* see [[Gob/TODO|Gob TODO]] list
 
=== [[Groovie]] ===
* see [[Groovie/TODO|Groovie TODO]] list
 
=== [[Hopkins]] ===
* see [[Hopkins/TODO|Hopkins TODO]] list
 
=== [[Hugo]] ===
* see [[Hugo/TODO|Hugo TODO]] list
 
=== [[Kyra]] ===
* see [[Kyra/TODO|Kyra TODO]] list
 
=== [[Lastexpress]] ===
* see [[Lastexpress/TODO|Lastexpress TODO]] list
 
=== [[MADE]] ===
* see [[MADE/TODO|MADE TODO]] list
 
=== [[Mohawk]] ===
* see [[Mohawk/TODO|Mohawk TODO]] list
 
=== [[Parallaction]] ===
* see [[Parallaction/TODO|Parallaction TODO]] list


=== [[SAGA]] ===
=== [[SAGA]] ===
* see [[SAGA TODO]] list
* see [[SAGA/TODO|SAGA TODO]] list
 
=== [[SCI]] ===
* see [[SCI/TODO|SCI TODO]] list
 
=== [[Sword1|Broken Sword 1]] ===
* Modify MoviePlayer class to use ManagedArray for _movieTexts.
* Add support for Bink RDFT compressed audio in the Smacker videos (used in some later releases).
 
=== [[Sword2|Broken Sword 2]] ===
* Fix the credits so they look more like the original. (Did we ever get the source code for that?)
* Maybe work around script bug which causes the mop to disappear briefly when trying to pick it up from the top of the boat at the London docks. (The event to hide the mop is sent too early.) {{Tracker|id=2058}}.
* Maybe (but probably not) work around a graphics glitch where George can be drawn partially in front of a metal beam he's walking behind. (He's obscured properly by the beam sprite, but part of the beam is only background.) {{Tracker|id=4483}}.
* Unify some of the code with Broken Sword 1 (e.g. in router.cpp).
*Lower the music volume when a character is speaking, like the original did.
 
=== [[Sword25]] ===
* see [[Sword25/TODO|Sword25 TODO]] list


=== [[Kyra]] ===
=== [[Tinsel]] ===
* see [[Kyra#TODO|Kyra TODO]] list
* see [[Tinsel/TODO|Tinsel TODO]] list


=== [[Cine]] ===
=== [[Tony]] ===
* see [[Cine TODO]] list
* see [[Tony/TODO|Tony TODO]] list


=== [[AGI]] ===
=== [[Toon]] ===
* see [[AGI TODO]] list
* see [[Toon/TODO|Tooon TODO]] list


=== [[Touche]] ===
=== [[Touche]] ===
* see [[Touche TODO]] list
* see [[Touche/TODO|Touche TODO]] list


== Backends ==
=== [[TsAGE]] ===
* see [[TsAGE/TODO|TsAGE TODO]] list


=== General ===
=== [[Tucker]] ===
* Add API to query backend for a list of available music engines. Useful for Options dialog
* see [[Tucker/TODO|Tucker TODO]] list
* Document key codes to be used for special keys, like F1-F15 etc.
* Right now gBitFormat is part of common/scaler.cpp; we might want to move it to common/system.cpp, or replace it with something better. No hasty changes here, please, make sure you understand how it is used right now before messing with it ;-)
* OSystem::RGBToColor and OSystem::colorToRGB are very flexible, but cause a bottleneck: One doesn't want to use these virtual methods to convert a lot of colors in one go. Hence consider removing these and related function in favor of a new API with which client code can query the backend for a description of the pixel format (maybe similar in spirt to [http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fPixelFormat SDL_PixelFormat], but maybe we can also reuse / extend a variant of gBitFormat). This is in particular useful for the new GUI code which wants to do things like color fading. Of course, we must still accomodate for backends that only offer palette mode!


=== Potential ports ===
=== [[Wintermute]] ===
* MS DOS port using [http://www.talula.demon.co.uk/allegro/ Allegro] and [http://www.delorie.com/djgpp/ DJGPP] ?
* see [[Wintermute/TODO|Wintermute TODO]] list
* [http://withintent.biz/ Intent] port (already done by David Given, merge?)
* [http://digita.mame.net/reviews.htm Digita OS port]? (play games on a select few digital cameras...)
* XBox port(s) exist, but can not be legally distributed, since the use the XDK, which is incompatible with the GPL. [http://openxdk.sourceforge.net/ OpenXDK] lacks C++ support, though has SDL.


=== X11 backend ===
== Backends and ports ==
* Add frills used by SDL backend like graphic filters usage and CD audio


=== SDL backend ===
=== General ===
* Right now, the WinCE and the Symbian backend subclasses the regular SDL backend. They both overload a lot of methods (mostly the graphics stuff). Since graphics.cpp uses the scalers (e.g. hq3x), these derived backends carry that baggage around, too, even though they don't need that code. Idea: split the SDL backend into two classes, one base class which only has the code which is used by all subclasses; and a "desktop" subclass, which implements the rest. Then WinCE/Symbian would only subclass the "base" SDL class.
* Add API to query backend for a list of available music engines. Useful for Options dialog. See [[Music drivers redesign]].
* We implemented GFX transactions & commits some time ago -- but they are only half the story. We are still missing a rollback system -- that is, check whether the requested video mode works, if it doesn't, revert to the current settings -- at least "if it makes sense". That is, if the transaction only modified the scaler or aspect ratio, we can safely revert. Of course if the screen size changed (e.g. from 320x200 -> 640x480) we can't just revert to the old screen size -- unless we augment the API accordingly, and update all engines to deal with this possibility.
* Right now gBitFormat is part of common/scaler.cpp; we might want to move it to common/system.cpp, or replace it with something better. No hasty changes here, please, make sure you understand how it is used right now before messing with it ;-)
* The <tt>kFeatureAutoComputeDirtyRects</tt> feature is not entirely reliable, and perhaps it cannot ever be. It is currently known to cause glitches in [[Simon_TODO|The Feeble Files]].


== Tools ==
== Tools ==


=== General ===
=== General ===
* Try to unify the usage of the compression tools, where possible / necessary.
* Use doxygen (or something else) to turn the short descs from the README into short man pages AND a single text file (replacing README) and a HTML file...
* Make compress_san use the common encoder "API" in compress.c
 
* Make compress_queen use the common encoder "API" in compress.c
=== GUI ===
* Add FLAC support to compress_sword1 (and the sword1 engine)
* One of the GUI assistants pages shows the following text to the user: "Note: Some tools display file picker here, this should perhaps be changed to always be directory output, since often don't want to name the output file." Clearly this should *not* be shown to the user, but rather is something we devs need to address.
* Consider using library APIs to encode data, instead of invoking the lame/oggenc/flac binaries.
* The last page of the assistant is weird. E.g. after successful run, it shows a "Finish" button in the lower right, and two checkboxes: "Open output folder" and "Process another file". This seems unintuitive and artificial to me. An IMHO better alternative would be to remove the "Finish" button, and instead show some big buttons with captions like "Process another file" (which does just that), "Open output folder", and "Quit". One can probably still do better, somebody should think about this.
*; Pro: Tighter integration, no need to create temporary files.
 
*; Con: Requires the resp. libs/headers to be compiled in, and the resulting binary would only run if all needed shared libs are present (unless we static link), whereas the current binary will work even if lame/oggenc/flac are missing
=== Compression tools ===
* (Semi-)automatically provide showhelp function
* Modify encodeAudio to accept "input streams", so that we can avoid creating temporary WAVE files
* Improved error checking !!! esp. for FT we got several reports about problems caused by the compression tool being called from the wrong directory. This should be avoidable by implementing suitable checks.


=== Descumm ===
=== Descumm ===
* Turn it into a library, to be used by a command line frontend (like now), ScummVM debugger, and ScummEX. Basically, the API could consist of a single function, which takes a pointer to a memory buffer, its length, the Scumm version and optionally a game id. Also, it would get a pointer to a print function (in the case of the CLI tool, print to stdout; for ScummVM, print to our GUI console; for ScummEX, append to some window/widget)
* Turn it into a library, to be used by a command line frontend (like now), ScummVM debugger, and ScummEX. Basically, the API could consist of a single function, which takes a pointer to a memory buffer, its length, the Scumm version and optionally a game id. Also, it would get a pointer to a print function (in the case of the CLI tool, print to stdout; for ScummVM, print to our GUI console; for ScummEX, append to some window/widget)
* Rewrite code to use 2 passes; first pass builds an intermediate graph, the second pass then tries to detect loops, break/continue statements etc.
* Rewrite code to use 2 passes; first pass builds an intermediate graph, the second pass then tries to detect loops, break/continue statements etc.
* Proper implementation of o6_startObjectQuick decompilation (see comment in descumm6.c). May requre rewrite of core program logic
* Proper implementation of o6_startObjectQuick decompilation (see comment in descumm6.c). May require rewrite of core program logic.

Latest revision as of 12:26, 20 April 2022

TODO List
Name Main TODO List
Technical Contact(s) The ScummVM Team
Subsystem Generic

Here is a list of things we consider doing in the future. Note that we don't promise to do any of these, nor when we will do them. It's just a list of what we hope to be able to do one day, and some items on the list really are more like ideas than real proposals, so take it with a grain of salt.

If you want to dig in, this is the stuff where you might make the most useful contribution. Note that this list is never complete, and may be partially outdated, so just because you don't see something here doesn't mean it is not important.

Before you start work on something, you should first talk to the team! Ideally ask on scummvm-devel, our mailing list. This will help us to prevent double work, i.e. several people working on the same stuff at once without knowing about each other. Furthermore, sometimes entries on our list are actually obsolete (because the feature has been implemented, or because for some reason we no longer think it to be desirable). Special caution should be taken for TODO entries that say "we may want to" or similar things; that usually means that we aren't sure whether we really want to implement that feature.

So, to repeat it: Always talk to the team before implementing a change on this list, or else risk having your patch rejected :-/.

Finally, always make sure to check out our bug tracker and our feature request tracker for things that need work.


Documentation

See also the Documentation/TODO page.

General

  • Write a high level overview of how ScummVM and its engines work?

Web sites

Buildbot

Doxygen

  • Make it run again, upgrade

Common code, infrastructure

Audio

Mixer

  • the "isReady" code is irritating. Most engines ignore it anyway. It's primary purpose is to allow ScummVM to run even if not digitial audio out is available. A better solution would likely be to enforce that all backends always return a valid mixer. In the worst case, if a backend cannot produce audio output, it should still instantiate an Audio::MixerImpl, with some arbitrary sample rate (I recommend 22050 Hz), and a fake playback thread, which acts like an audio output callback but simply discards the generated audio data. (Note: It doesn't suffice to just throw away input data in Mixer::playInputStream, as this breaks with QueuingAudioStream).

CD

  • Consider extending the Audio CD Manager with WAV or VOC support (essentially, the WAV/VOC code would need to be enhanced by adding a factory function similar to that provided for the FLAC/Vorbis/MP3 streams).
  • add a "pause" feature to the AudioCDManager (might require us to extend the OSystem CD API, too). Useful to be able to fully pause the currently running engine

MIDI

  • See also Music drivers redesign
  • MIDI: Add API to OSystem which allows client code to query for "native" MIDI drivers (like Windows, ALSA, Zodiac, CoreAudio). Then change the MIDI interfacing code (GUI, command line, config file, etc.) and also MidiDriver::createMidi() to use both that list and the list of 'emulated' MIDI devices (AdLib, MT-32, PC Speaker, etc.) in an appropriate way.
  • Make it possible to pass options to the midi/music drivers. This would allow us to get rid of the getenv hacks in the alsa & seq drivers.
    • A simple approach would be to allow the user to specify "extended" driver descriptions. E.g. "alsa:1234" could indicate the alsa driver with port 1234; alternatively, "alsa:port=1234".
    • This doesn't allow for easy tweaking of those settings via the GUI.... to achieve that, one approach would be to invent a 'parameter description language' which allows a driver to specify which options with which kind of values it supports... very flexible, but possibly overkill.
    • Instead, one could add a hook method to MIDI drivers that let's them add a few controls of their own to the options dialog. This is probably a lot easier to implement, though not quite as "clean"...
  • Our XMIDI parser seems to have a couple of missing features, but it's unclear which ones are actually needed. Possible references for a better implementation include the Exult project and the source code for AIL Version 2. The KYRA engine contains some more complete XMIDI implementation on top of our XMIDI parser class too, so it might also be a place to look at for reference.

Config Manager

  • Modify the ConfigManager to make use of the ConfigFile class. This is more difficult than it sounds at first, because currently our ConfigManager is not just used for managing the active config, but also ab-used for editing config data (once for specific targets, in the launcher's "edit game" dialog, and once for editing the "active config" in the engines/dialog.cpp ConfigDialog). This mess needs to be untangled first.
  • Maybe even follow the pentagram (http://pentagram.sf.net) approach and have three classes:
    • SettingsManager (like our current ConfigManager)
    • ConfigFileManager (manages a set of config files, possibly merging the data from multiple config files)
    • ConfigFile (a simple .ini file accessor).
    This makes it easy to add additional config sources (e.g. XMLConfigFile); makes it possible to treat the command line data like another config file (CommandLineConfig); and simply follows the good old MVC approach, which is always a good idea.
  • Add a proper version to the Config file, which indicates true changes in the format / data in it. Right now, we only have a "fake" version number where any ScummVM instance will just write its version in. Which is totally useless. A proper version would allow us to ...
    • ... produce a warning if an older ScummVM version tries to load a config file written by a newer version with potentially incompatible changes (such as the switch from language code "hb" to "he" for Hebrew)
    • ... detect when we an old config file is loaded which needs to be updated (e.g. by changing language "hb" to "he"; by adding "guioptions" to targets; by fixing trailing slashes in "path"; maybe even updating old style; and maybe in the future by adding "engineid" fields to all targets)

GUI

Plugins

  • On OSX: Support a plugin build in the bundle target: *.plugin files should be put into ScummVM.app/Contents/PlugIns/; this also means that the loader needs to search in the plugin dir of the active bundle. So use the CF bundle API, inside a #ifdef MACOSX block.
  • Make DetectedGame::updateDesc a normal function, not a member function.

Launcher

  • Enhance the Mass detector to show a list with the results (and optionally, allow the user to edit/cull that list before adding it).
  • Make the gameid editable via an "advanced" tab entry?
  • The global options dialog may show a button for configuring the savepath even on systems where it is fixed -> not good. This button should be hidden/removed for these systems
  • separate launcher code even more from rest of ScummVM, to make custom launchers easier?
    • maybe separate launcher using MVC approach? Separate code which scans for games etc. from the presentation layer, to make it easier to write custom launchers with behavior matching that of the default launcher?
  • show cover art in launcher
    • this would only be done on "high end" systems, must be possible to disable code
    • we can't ship artwork directly, due to copyright concerns; so only ship artwork where it is legally possible, and otherwise allow users to setup "artwork packs"
    • control what artwork is shown using a config key

Global Main Menu/Return to Launcher

  • Confirm exit dialog woes:
    • Double "confirm exit" dialog: When confirm exit is enabled in ScummVM, the ScummVM quit confirm dialog shows up in addition to the quit confirm dialogs for those games which have their own. For example, when you select 'Quit' from Beneath a Steel Sky's in-game menu, it asks you if you really want to quit. Then, after answering, ScummVM gives you another dialog asking you if you really want to quit. So, ScummVM should not show the quit confirm dialog if the in-game dialog has already been displayed. This affects any game which has it's own menu system from where you can quit, or has a native quit confirm dialog. So this means most games.
    • Add/unify "confirm exit" dialog, globally (see FR #1731025)
  • Options Dialog: Implement engine flags to define which features in the Options dialog are supported by the current running game. Use these flags to hide/show the appropriate sliders and buttons in the Options Dialog
  • Improve the look of the GMM: This could include displaying the engine name and the game name on the top of the GMM.
  • Config Dialog code: Resolve the FIXME in engines/dialogs.cpp which pertains to having to use the empty string as the domain name. This is a bigger task, but will enable many other changes (thus as finally changing ConfigManager to use ConfigFile). Essentially, the current game config dialog tries to abuse the system by editing the *active* settings via the config manager, in order to fully reduce the options dialog code from the launcher. But there is a big difference between editing the config settings of a specific target, and the active settings. So, one probably needs to rewrite the code for the config dialog shown from the GMM

Error handling

Sometimes, bugs are reported that are not easily reproducible, e.g. Bug #6751. In such cases, it would be useful to have the error handler in ScummVM generate (and, optionally, automatically send) minidumps that can be used by us to successfully examine crashed ScummVM processes. Integration of something like Google Breakpad is one reasonable option. While it is not likely to be able to get such crash handling into all ports, just supporting the most popular platforms would be enough to make this feature very useful.

Engines / frontends

SCUMM

AGI

AGOS

Cine

CruisE

Drascula

Gob

Groovie

Hopkins

Hugo

Kyra

Lastexpress

MADE

Mohawk

Parallaction

SAGA

SCI

Broken Sword 1

  • Modify MoviePlayer class to use ManagedArray for _movieTexts.
  • Add support for Bink RDFT compressed audio in the Smacker videos (used in some later releases).

Broken Sword 2

  • Fix the credits so they look more like the original. (Did we ever get the source code for that?)
  • Maybe work around script bug which causes the mop to disappear briefly when trying to pick it up from the top of the boat at the London docks. (The event to hide the mop is sent too early.) [Bug #2058].
  • Maybe (but probably not) work around a graphics glitch where George can be drawn partially in front of a metal beam he's walking behind. (He's obscured properly by the beam sprite, but part of the beam is only background.) [Bug #4483].
  • Unify some of the code with Broken Sword 1 (e.g. in router.cpp).
  • Lower the music volume when a character is speaking, like the original did.

Sword25

Tinsel

Tony

Toon

Touche

TsAGE

Tucker

Wintermute

Backends and ports

General

  • Add API to query backend for a list of available music engines. Useful for Options dialog. See Music drivers redesign.
  • Right now gBitFormat is part of common/scaler.cpp; we might want to move it to common/system.cpp, or replace it with something better. No hasty changes here, please, make sure you understand how it is used right now before messing with it ;-)

Tools

General

  • Use doxygen (or something else) to turn the short descs from the README into short man pages AND a single text file (replacing README) and a HTML file...

GUI

  • One of the GUI assistants pages shows the following text to the user: "Note: Some tools display file picker here, this should perhaps be changed to always be directory output, since often don't want to name the output file." Clearly this should *not* be shown to the user, but rather is something we devs need to address.
  • The last page of the assistant is weird. E.g. after successful run, it shows a "Finish" button in the lower right, and two checkboxes: "Open output folder" and "Process another file". This seems unintuitive and artificial to me. An IMHO better alternative would be to remove the "Finish" button, and instead show some big buttons with captions like "Process another file" (which does just that), "Open output folder", and "Quit". One can probably still do better, somebody should think about this.

Compression tools

  • (Semi-)automatically provide showhelp function
  • Modify encodeAudio to accept "input streams", so that we can avoid creating temporary WAVE files
  • Improved error checking !!! esp. for FT we got several reports about problems caused by the compression tool being called from the wrong directory. This should be avoidable by implementing suitable checks.

Descumm

  • Turn it into a library, to be used by a command line frontend (like now), ScummVM debugger, and ScummEX. Basically, the API could consist of a single function, which takes a pointer to a memory buffer, its length, the Scumm version and optionally a game id. Also, it would get a pointer to a print function (in the case of the CLI tool, print to stdout; for ScummVM, print to our GUI console; for ScummEX, append to some window/widget)
  • Rewrite code to use 2 passes; first pass builds an intermediate graph, the second pass then tries to detect loops, break/continue statements etc.
  • Proper implementation of o6_startObjectQuick decompilation (see comment in descumm6.c). May require rewrite of core program logic.