Difference between revisions of "User:Fingolfin"

From ScummVM :: Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
* get rid of getSavePath -> AFAICT it's only used for enhanced error/warning messages. So let's just finally add a Stream::ioErrorString methor or so, which describes the error that occured
 
* get rid of getSavePath -> AFAICT it's only used for enhanced error/warning messages. So let's just finally add a Stream::ioErrorString methor or so, which describes the error that occured
 
* at the same time might want to replace ioFailed() with an ioError() method which returns an error code, not just a bool
 
* at the same time might want to replace ioFailed() with an ioError() method which returns an error code, not just a bool
* add a method to remove a savestate  
+
* add a method to remove a savestate
* properly document listSavefiles
+
* maybe also one to rename a savestate (less important)
** reimplement DefaultSaveFileManager::listSavefiles
+
* replace listSavefiles with a better API (possibly function with same name)
 +
** it should take a regex (well, allowing only "?" and "*" like in DOS)
 +
** it would return a List<String> with all matched filenames
 +
** reimplement DefaultSaveFileManager::listSavefiles to actual do more than returning "yes" for all and every filename
 +
** update engines to use (and trust) the new API. With "trust" I mean that some engines currently double-check the results of it with openFileForLoading (and good that they do so, considering that right now the default savefilemanager does *not* implement it. *sigh*) 
 +
* Consider replacing "const char *" usages with "Common::String". This might or might not be a good idea -- don't just do it blindly!
 +
 
  
 
=== File code ===
 
=== File code ===
Line 27: Line 33:
 
* at the same time, finally change File to read-only, and add a DumpFile class, which can be used for script dumps, screenshots etc.; ports can simply provide an "empty" implementations if they don't support dumping large files
 
* at the same time, finally change File to read-only, and add a DumpFile class, which can be used for script dumps, screenshots etc.; ports can simply provide an "empty" implementations if they don't support dumping large files
 
* To enforce that no code uses fopen etc. directly, we could add our own #define's to scummsys.h to trigger errors in code doing it
 
* To enforce that no code uses fopen etc. directly, we could add our own #define's to scummsys.h to trigger errors in code doing it
 +
*
  
 
=== GUI ===
 
=== GUI ===
Line 49: Line 56:
 
** document the semantics of sound handles and sound ids
 
** document the semantics of sound handles and sound ids
 
** cleanup the API (TODO: Be more specific)
 
** cleanup the API (TODO: Be more specific)
 +
 +
=== SCUMM ===
 +
* Once the new SaveFileManager::remove method is there, add a "remove" button to the save/load dialog
 +
 +
=== Misc ===
 +
* Remove the 'addDefaultDirectory' calls from runGame in base/main.cpp. Reason: Their presence causes an asymmetry between the "detect a game" and "run a game" use cases, as different files are "seen" in each case. This can lead to subtle bugs, and also causes ugly code duplication in the AdvancedDetector code right now (there to work around asymmetries like this one)
 +
* Right now the SCUMM engine uses zlib directly. This causes problems when building plugins, as we have to link the SCUMM engine against zlib, so we have to hack the build system to do so. It also causes backlinking problems on e.g. Windows
 +
** Solution #1: Let the ScummVM binary re-export the zlib API. Pro: Very clean and elegant, Con: Might not be possible on all targets (investigate)
 +
** Solution #2: Create thin wrappers around all relevant zlib APIs, put those into a new file common/zlib.cpp, and make SCUMM use those
 +
* add plugin API to fetch a fresh desc string for a given target ?!?
  
 
== Wish list ==
 
== Wish list ==

Revision as of 21:30, 21 June 2007

Fingolfin
Name Max Horn
Team Member since 2002-04-26
Working on SCUMM Engine, SDL backend,
infrastructure
Personal webpage/BLOG -
Email fingolfin AT scummvm DOT org

I am co-lead developer of ScummVM, together with Ender and Sev. I joined the project in April 2002. During this time I worked on the SCUMM engine, the SDL backend, the OSystem backend interface, the sound mixer, the GUI system, the general infrastructure of ScummVM, and many other things.

TODO

Web site

  • Add big (green?) shiny buttons in the middle of the page for (1) Donations and (2) Downloads ?
  • simplify screenshots: use a single screenshot "database" file, and use meaningful names on the screenshots, maybe even organize them in subdirs

Savefile manager

  • get rid of getSavePath -> AFAICT it's only used for enhanced error/warning messages. So let's just finally add a Stream::ioErrorString methor or so, which describes the error that occured
  • at the same time might want to replace ioFailed() with an ioError() method which returns an error code, not just a bool
  • add a method to remove a savestate
  • maybe also one to rename a savestate (less important)
  • replace listSavefiles with a better API (possibly function with same name)
    • it should take a regex (well, allowing only "?" and "*" like in DOS)
    • it would return a List<String> with all matched filenames
    • reimplement DefaultSaveFileManager::listSavefiles to actual do more than returning "yes" for all and every filename
    • update engines to use (and trust) the new API. With "trust" I mean that some engines currently double-check the results of it with openFileForLoading (and good that they do so, considering that right now the default savefilemanager does *not* implement it. *sigh*)
  • Consider replacing "const char *" usages with "Common::String". This might or might not be a good idea -- don't just do it blindly!


File code

  • several backends #define fopen, fread etc. -- this is bad, try to get rid of these hacks
  • to get rid of all usages of fopen, etc. we could add backends/file and move the current file.cpp to backends/file/stdc (this is just a rough idea, mind you)
  • at the same time, finally change File to read-only, and add a DumpFile class, which can be used for script dumps, screenshots etc.; ports can simply provide an "empty" implementations if they don't support dumping large files
  • To enforce that no code uses fopen etc. directly, we could add our own #define's to scummsys.h to trigger errors in code doing it

GUI

  • The 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
  • make a shared "main menu dialog", based on the SCUMM one
    • accessible via the same hotkey in all engines
    • save/load/help optional
    • enhance the current dialog by displaying the engine name at the top, maybe also "ScummVM 0.x.y"

OSystem

  • get to rid of the evil global gBitFormat!
  • Add getOverlayBitFormat() method, so we can avoid using RGBToColor, colorToRGB, ARGBToColor, colorToARGB in tight loops (it would return a value of 8 to indicate palette mode, otherwise a bitformat value compatible to those used in graphics/colormasks.h)
  • Remove slack in OSystem
    • move getScreenChangeID functionality to EventManager
    • what are these for (and can we remove them)?: screenToOverlayX, screenToOverlayY, overlayToScreenX, overlayToScreenY
    • remove getOutputSampleRate -- instead, add a private API to the mixer code to setup the sample rate (like, a param to the Mixer constructor)
  • Implement the RFC: Flexible keymapping via new EVENT_ (post 0.10)
  • Further work on the modularization of OSystem

Mixer

  • Cleanup the mixer code
    • document the semantics of sound handles and sound ids
    • cleanup the API (TODO: Be more specific)

SCUMM

  • Once the new SaveFileManager::remove method is there, add a "remove" button to the save/load dialog

Misc

  • Remove the 'addDefaultDirectory' calls from runGame in base/main.cpp. Reason: Their presence causes an asymmetry between the "detect a game" and "run a game" use cases, as different files are "seen" in each case. This can lead to subtle bugs, and also causes ugly code duplication in the AdvancedDetector code right now (there to work around asymmetries like this one)
  • Right now the SCUMM engine uses zlib directly. This causes problems when building plugins, as we have to link the SCUMM engine against zlib, so we have to hack the build system to do so. It also causes backlinking problems on e.g. Windows
    • Solution #1: Let the ScummVM binary re-export the zlib API. Pro: Very clean and elegant, Con: Might not be possible on all targets (investigate)
    • Solution #2: Create thin wrappers around all relevant zlib APIs, put those into a new file common/zlib.cpp, and make SCUMM use those
  • add plugin API to fetch a fresh desc string for a given target ?!?

Wish list

ScummVM supports many many games. Not just that, it also supports many variants of each of these games. Unfortunately, often bugs will only occur in one specific variant of a game, so unless you happen to own that particular version, it is very difficult to fix the problem (think of surgery while being blindfolded, with one hand tied behind your back).

In particular, being from Germany, I often only own the german version of a given game. While that is on the one hand useful (we have quite a big user base in Germany, it seems), the drawback is that often I lack an english variant, making it that much harder to work on bugs reported by English users.

Due to all this, here is a list of games resp. game variants that I lack and which might be useful. If you have a spare copy of any of these, feel free to donate it. I am only interested in originals, though, no warez! In addition, I also try from time to time to obtain these games e.g. via Ebay, so make sure to ask me before sending me anything, just in case I bought it in the meantime :-)

  • SCUMM
    • Zak McKracken: FM-TOWNS (OK, I am probably being unrealistic here :-) ), classic (V1) English, any other languages
    • Indiana Jones and the last Crusade: EGA German
    • Loom: FM-TOWNS (see above), EGA German
    • Monkey Island: EGA (*any* language, English or German preferred)
    • Indiana Jones and the Fate of Atlantis: Mac version
    • Sam & Max: German PC
    • The Dig: Mac version
  • Others
    • Any AGI games