Difference between revisions of "Sword25/TODO"

From ScummVM :: Wiki
Jump to navigation Jump to search
(2 todos less)
(→‎TODOs: Add various TODOs for Lua, taken from scummvm-devel)
Line 21: Line 21:
 
* The engine is currently somewhat slower than the original game, particularly on game startup. Some profiling should be done to identify and improve performance.
 
* The engine is currently somewhat slower than the original game, particularly on game startup. Some profiling should be done to identify and improve performance.
 
** A major reason for slowness is that when finding a matching file list for a given file-spec, it currently scans the entire contents of the zip file index. When we correct the Zip file implementation to properly handle folders, this will speed things up, since since it will be able to traverse down to a specific folder, and only have to scan the files of that folder.
 
** A major reason for slowness is that when finding a matching file list for a given file-spec, it currently scans the entire contents of the zip file index. When we correct the Zip file implementation to properly handle folders, this will speed things up, since since it will be able to traverse down to a specific folder, and only have to scan the files of that folder.
 +
 +
== Lua TODO ==
 +
* Lua exceptions require use of setjmp (not portable) or throw/catch (but we normally disable exceptions in ScummVM builds to reduce memory usage). This needs to be dealt with. E.g. we should add a configure check for setjmp, and only enable the engines on ports that support this.
 +
* Lua makes use of several other potentially non-portable or "dangerous" routines, that should be avoided in ScummVM code. I noticed the following (but the list may not be complete):
 +
** in loslib.cpp:
 +
*** strerror
 +
*** system (!!)
 +
*** remove
 +
*** rename
 +
*** tmpname / mktemp
 +
*** getenv
 +
*** clock
 +
*** gmtime
 +
*** localtime
 +
*** mktime
 +
*** time
 +
*** difftime
 +
*** setlocale
 +
*** exit (replace by a call to OSystem::quit, or "just" quit the engine?)
 +
** in liolib.cpp and lauxlib.cpp:
 +
*** fopen, fread, fwrite, fclose, fseek, setvbuf, ... -> use our file API instead?
 +
** in loadlib.cpp
 +
*** fopen / fclose
 +
*** this contains stuff for dealing with loadable modules (which we don't really need, do we?). So we might be able to just stub it out completely.

Revision as of 16:52, 25 October 2010

TODOs

  • Fill stubs in audio code
  • Get rid of Window classes. We handle that in OSystem
  • Enhance package manager to allow running with extracted data just like original did
  • Graphics:
    • Problems with the exit menu:
      1. Wrong shading of 'yes/no' glyphs
      2. Background is black instead of shadowed game screen
    • Speedup Theora video playback
    • Audio sync for Theora video playback
  • Get rid of BS_SERVICE_TABLE (?)
    • because it is (a) ugly concept (b) implemented with global constructors. The worse approach would be to turn those into Singleton classes, but proper would be to remove the wrappers completely since we do not have multiple implementations of each service
  • Translate comments from German
  • Fix 64-bitness
  • Check how it behaves on BE machine
  • Rename/get rid of leftover BS_* things
  • Fix tons of warnings under MinGW and probably others
  • Make libtheora optional, as it really is (cutscenes then will be skipped) - this has been done, but it should be tested
  • The engine is currently somewhat slower than the original game, particularly on game startup. Some profiling should be done to identify and improve performance.
    • A major reason for slowness is that when finding a matching file list for a given file-spec, it currently scans the entire contents of the zip file index. When we correct the Zip file implementation to properly handle folders, this will speed things up, since since it will be able to traverse down to a specific folder, and only have to scan the files of that folder.

Lua TODO

  • Lua exceptions require use of setjmp (not portable) or throw/catch (but we normally disable exceptions in ScummVM builds to reduce memory usage). This needs to be dealt with. E.g. we should add a configure check for setjmp, and only enable the engines on ports that support this.
  • Lua makes use of several other potentially non-portable or "dangerous" routines, that should be avoided in ScummVM code. I noticed the following (but the list may not be complete):
    • in loslib.cpp:
      • strerror
      • system (!!)
      • remove
      • rename
      • tmpname / mktemp
      • getenv
      • clock
      • gmtime
      • localtime
      • mktime
      • time
      • difftime
      • setlocale
      • exit (replace by a call to OSystem::quit, or "just" quit the engine?)
    • in liolib.cpp and lauxlib.cpp:
      • fopen, fread, fwrite, fclose, fseek, setvbuf, ... -> use our file API instead?
    • in loadlib.cpp
      • fopen / fclose
      • this contains stuff for dealing with loadable modules (which we don't really need, do we?). So we might be able to just stub it out completely.