Open main menu

Difference between revisions of "Sword25/TODO"

1,040 bytes added ,  16:52, 25 October 2010
→‎TODOs: Add various TODOs for Lua, taken from scummvm-devel
(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.
1,079

edits