aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/util/lua
AgeCommit message (Collapse)Author
2018-03-23JANITORIAL: Silence GCC 7 fallthrough warningsAdrian Frühwirth
2017-11-12SWORD25: Suppress GCC Cast Qualification Warnings.D G Turner
Since lua_pushlightuserdata and lua_touserdata operate on (void *) values, it is tricky to fix these warnings "correctly" without looking at invasive changes to a significant amount of Lua internal code. Since these pointers to consts are already being recast to drop the const qualifications, then removing the const on the underlying value declaration does not further expose this to change and stops the compiler warnings associated with this. Anyone with a better fix for this can restore the const qualifications later.
2017-08-06JANITORIAL: Silence some more GCC 7 fall through warningsTorbjörn Andersson
I think these are the last one that were already flagged as being deliberate.
2017-08-06SWORD25: Increase buffer length to silence GCC 7 warningTorbjörn Andersson
2017-08-06JANITORIAL: Silence GCC 7 fall through warningTorbjörn Andersson
2016-02-19SWORD25: Fixing bug #7041: SWORD25: Crash in final sceneEugene Sandulenko
The original was ignoring Lua errors in that scene and was restoring the state with longjmp. We are yet to see the platform compatibility, but Lua's code is too tangled to make simple replacement with error() work. Another possible alternative would be to rework the original game scripts. We will do it if this commit is problematic.
2016-02-15JANITORIAL: Typos detected with lintian & grepAlexandre Detiste
2015-11-19SWORD25: Fix Hungarian version supportEugene Sandulenko
2014-12-07SWORD25: Disable unused codeFilippos Karapetis
Thanks to fingolfin for pointing out this unused code
2014-04-28Merge pull request #426 from sunmax/masterEugene Sandulenko
PS2: Pull request to master for latest PS2 code
2014-02-18SWORD25: Make GPL headers consistent in themselves.Johannes Schickel
2014-01-19PS2: modified sword25 loslib.cpp to support PS2Max Lingua
2013-11-24SWORD25: Janitorial - Fix spacing errorsStrangerke
2013-09-27SWORD25: Remove explictit #includesEugene Sandulenko
Makes Coverity happier.
2013-04-18SWORD25: Silence warning in the Lua codeMax Horn
This fixes warnings like this that crop up when compiling sword25 with Apple clang 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
2013-02-03SWORD25: Fix some spacing in LUAFilippos Karapetis
2013-02-03SWORD25: Replace calls to LUAI_THROW() with error() in LUAFilippos Karapetis
This removes one of the uses of setjmp(), but its use in LUAI_TRY still remains
2012-12-13COMMON: Forbid symbols for the rest of is* from ctype.h.Johannes Schickel
I also moved the isprint case to the correct position. This adds a FIXME to our lua code from sword25, which uses iscntrl directly.
2012-03-17ALL: Use GCC_ATLEAST().Christoph Mallon
2012-02-26COMMON: Move Language and Platform functionality into separate filesMax Horn
2012-02-21Merge pull request #182 from fingolfin/forbid-ctypeWillem Jan Palenstijn
ALL: Avoid using is* macros from ctype.h
2012-02-20COMMON: Move isFoo functions to namespace Common, add doxygen commentsMax Horn
2012-02-15JANITORIAL: Fix missing whitespace in pointer castTarek Soliman
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15ALL: Avoid using is* macros from ctype.hMax Horn
On some systems, passing signed chars to macros like isspace() etc. lead to a runtime error. Hence, mark these macros as forbidden by default, and introduce otherwise equivalent alternatives for them.
2011-08-07JANITORIAL: Remove trailing empty lines.Christoph Mallon
2011-06-23ANALYSIS: Add static casts to is* functionsLittleboy
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results. See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-18SWORD25: Fix locale-related bug when reading the volume settingseriktorbjorn
I don't really like this, but I can't think of any better way. It seems that Lua doesn't like decimal comma at all, so we have to format the volume settings with a decimal point instead. Otherwise, all I'll ever get is either full volume or no volume, with nothing in between.
2011-06-18SWORD25: Fix getting volume settings from config fileeriktorbjorn
The tests had been inverted, so that if there were config file settings it would use the default settings instead.
2011-06-06COMMON: Make more symbols forbiddenMax Horn
2011-05-26SWORD25 (LUA): Removed unused code for handling precompiled LUA sciptsmd5
2011-05-26SWORD25: Fix warning: double format, float arg on DCMax Horn
2011-05-26SWORD25: Avoid using strcollMax Horn
2011-05-25ALL: behaviour -> behaviorMatthew Hoops
2011-05-25SWORD25: Remove more unused loadlib code + use of fopenMax Horn
The functions loader_C and loader_Croot provably did not do anything besides returning an error, so removing them was safe. For loader_Lua, this was using luaL_loadfile. But that in turn now uses Sword25FileProxy, which only supports loading config.lua, and config.lua is not used via the loadlib mechanism. Therefore, I deemed it safe to also remove this third loader. This leaves loader_preload as only remaining loader. It is probably unused, too, but I did not both to investigate further, as I already achieved my primary goal (getting rid of fopen/fclose use). All other removed functions were unused due to the removal of the first three loader_* functions.
2011-05-24SWORD25: Remove unused Lua print stuffMax Horn
2011-05-23COMMON: Add exit() to list of forbidden symbolsMax Horn
2011-05-23SWORD25: Include scummsys.h from lua.h, partially deal with the consequencesMax Horn
This should help mark the spots that are still non-portable, just follow the FIXMEs.
2011-05-23SWORD25: Replace some non-portable calls, add FIXMEsMax Horn
2011-05-23SWORD25: Fix ambiguous typingMax Horn
2011-05-23SWORD25: Fix error string parameterAlyssa Milburn
2011-05-23SWORD25: Replaced accidental backslash in include filenamePaul Gilbert
2011-05-23SWORD25: Added proxy code for converting writing config.lua to update the ↵Paul Gilbert
ScummVM game settings
2011-05-23SWORD25: Created proxy class that presents ScumMVM settings as a valid ↵Paul Gilbert
config.lua file
2011-05-20SWORD25: Don't assume that all locales use decimal pointeriktorbjorn
The trydecpoint() function *is* used, though probably only in countries which don't use a decimal point. We can't use the ISO C locale functions here because they're not fully implemented on some platforms, e.g. Android. Hopefully this method will work.
2011-05-20SWORD25: Re-implement two LUA library I/O functions necessary for detecting ↵Paul Gilbert
and creating the config.lua configuration file
2011-05-15SWORD25 (LUA): Removed unused non-portable locale codemd5
2011-05-15SWORD25 (LUA): Clarified the use of os_remove()md5
2011-05-14SWORD25 (LUA): Disabled a lot of non-portable LUA functionsmd5
sword25 doesn't use these (thankfully)
2011-05-14SWORD25 (LUA): Some compilation optimizationsmd5
For Android, define stroll() inside luaconf.h For PS2, don't use the visibility attribute, as the PS2 gcc isn't particularly happy about it...