Skip to content
Permalink
Browse files

COMMON: Move Lua into Common and make it into...

an engine feature
  • Loading branch information...
nipunG314 authored and sev- committed Mar 8, 2019
1 parent f019afa commit c1f029c6dcd606b3dbe8e3952ac55f89968ab6c4
Showing with 88 additions and 70 deletions.
  1. 0 {engines/sword25/util → common}/lua/COPYRIGHT
  2. 0 {engines/sword25/util → common}/lua/HISTORY
  3. 0 {engines/sword25/util → common}/lua/README
  4. +1 −1 {engines/sword25/util → common/lua}/double_serialization.cpp
  5. 0 {engines/sword25/util → common/lua}/double_serialization.h
  6. 0 {engines/sword25/util → common}/lua/lapi.cpp
  7. 0 {engines/sword25/util → common}/lua/lapi.h
  8. 0 {engines/sword25/util → common}/lua/lauxlib.cpp
  9. 0 {engines/sword25/util → common}/lua/lauxlib.h
  10. 0 {engines/sword25/util → common}/lua/lbaselib.cpp
  11. 0 {engines/sword25/util → common}/lua/lcode.cpp
  12. 0 {engines/sword25/util → common}/lua/lcode.h
  13. 0 {engines/sword25/util → common}/lua/ldblib.cpp
  14. 0 {engines/sword25/util → common}/lua/ldebug.cpp
  15. 0 {engines/sword25/util → common}/lua/ldebug.h
  16. 0 {engines/sword25/util → common}/lua/ldo.cpp
  17. 0 {engines/sword25/util → common}/lua/ldo.h
  18. 0 {engines/sword25/util → common}/lua/lfunc.cpp
  19. 0 {engines/sword25/util → common}/lua/lfunc.h
  20. 0 {engines/sword25/util → common}/lua/lgc.cpp
  21. 0 {engines/sword25/util → common}/lua/lgc.h
  22. 0 {engines/sword25/util → common}/lua/linit.cpp
  23. 0 {engines/sword25/util → common}/lua/liolib.cpp
  24. 0 {engines/sword25/util → common}/lua/llex.cpp
  25. 0 {engines/sword25/util → common}/lua/llex.h
  26. 0 {engines/sword25/util → common}/lua/llimits.h
  27. 0 {engines/sword25/util → common}/lua/lmathlib.cpp
  28. 0 {engines/sword25/util → common}/lua/lmem.cpp
  29. 0 {engines/sword25/util → common}/lua/lmem.h
  30. 0 {engines/sword25/util → common}/lua/loadlib.cpp
  31. 0 {engines/sword25/util → common}/lua/lobject.cpp
  32. 0 {engines/sword25/util → common}/lua/lobject.h
  33. 0 {engines/sword25/util → common}/lua/lopcodes.cpp
  34. 0 {engines/sword25/util → common}/lua/lopcodes.h
  35. 0 {engines/sword25/util → common}/lua/loslib.cpp
  36. 0 {engines/sword25/util → common}/lua/lparser.cpp
  37. 0 {engines/sword25/util → common}/lua/lparser.h
  38. 0 {engines/sword25/util → common}/lua/lstate.cpp
  39. 0 {engines/sword25/util → common}/lua/lstate.h
  40. 0 {engines/sword25/util → common}/lua/lstring.cpp
  41. 0 {engines/sword25/util → common}/lua/lstring.h
  42. 0 {engines/sword25/util → common}/lua/lstrlib.cpp
  43. 0 {engines/sword25/util → common}/lua/ltable.cpp
  44. 0 {engines/sword25/util → common}/lua/ltable.h
  45. 0 {engines/sword25/util → common}/lua/ltablib.cpp
  46. 0 {engines/sword25/util → common}/lua/ltm.cpp
  47. 0 {engines/sword25/util → common}/lua/ltm.h
  48. 0 {engines/sword25/util → common}/lua/lua.h
  49. +6 −6 {engines/sword25/util → common/lua}/lua_persist.cpp
  50. +1 −1 {engines/sword25/util → common/lua}/lua_persistence.h
  51. +5 −5 {engines/sword25/util → common/lua}/lua_persistence_util.cpp
  52. +1 −1 {engines/sword25/util → common/lua}/lua_persistence_util.h
  53. +7 −7 {engines/sword25/util → common/lua}/lua_unpersist.cpp
  54. 0 {engines/sword25/util → common}/lua/luaconf.h
  55. 0 {engines/sword25/util → common}/lua/lualib.h
  56. 0 {engines/sword25/util → common}/lua/lvm.cpp
  57. 0 {engines/sword25/util → common}/lua/lvm.h
  58. 0 {engines/sword25/util → common}/lua/lzio.cpp
  59. 0 {engines/sword25/util → common}/lua/lzio.h
  60. +1 −1 {engines/sword25/util → common}/lua/scummvm_file.cpp
  61. 0 {engines/sword25/util → common}/lua/scummvm_file.h
  62. +37 −0 common/module.mk
  63. +14 −2 configure
  64. +1 −0 devtools/create_project/create_project.cpp
  65. +1 −1 engines/sword25/configure.engine
  66. +2 −2 engines/sword25/gfx/graphicengine.cpp
  67. +2 −2 engines/sword25/math/vertex.cpp
  68. +1 −33 engines/sword25/module.mk
  69. +2 −2 engines/sword25/script/luabindhelper.h
  70. +2 −2 engines/sword25/script/luacallback.cpp
  71. +4 −4 engines/sword25/script/luascript.cpp
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,7 +20,7 @@
*
*/

#include "sword25/util/double_serialization.h"
#include "common/lua/double_serialization.h"

#include "common/scummsys.h"

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -44,16 +44,16 @@
*/


#include "sword25/util/lua_persistence.h"
#include "lua_persistence.h"

#include "sword25/util/double_serialization.h"
#include "sword25/util/lua_persistence_util.h"
#include "double_serialization.h"
#include "lua_persistence_util.h"

#include "common/stream.h"

#include "lua/lobject.h"
#include "lua/lstate.h"
#include "lua/lgc.h"
#include "lobject.h"
#include "lstate.h"
#include "lgc.h"


namespace Lua {
@@ -46,7 +46,7 @@
#ifndef LUA_PERSISTENCE_H
#define LUA_PERSISTENCE_H

#include "sword25/util/lua/lua.h"
#include "lua.h"


namespace Common {
@@ -67,14 +67,14 @@
*/


#include "sword25/util/lua_persistence_util.h"
#include "lua_persistence_util.h"

#include "common/scummsys.h"

#include "lua/lobject.h"
#include "lua/lstate.h"
#include "lua/lgc.h"
#include "lua/lopcodes.h"
#include "lobject.h"
#include "lstate.h"
#include "lgc.h"
#include "lopcodes.h"


namespace Lua {
@@ -50,7 +50,7 @@

struct lua_State;

#include "lua/lobject.h"
#include "lobject.h"

typedef TValue *StkId;

@@ -44,17 +44,17 @@
*/


#include "sword25/util/lua_persistence.h"
#include "lua_persistence.h"

#include "sword25/util/double_serialization.h"
#include "sword25/util/lua_persistence_util.h"
#include "double_serialization.h"
#include "lua_persistence_util.h"

#include "common/stream.h"

#include "lua/lobject.h"
#include "lua/lstate.h"
#include "lua/lgc.h"
#include "lua/lopcodes.h"
#include "lobject.h"
#include "lstate.h"
#include "lgc.h"
#include "lopcodes.h"


namespace Lua {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,7 +20,7 @@
*
*/

#include "sword25/util/lua/scummvm_file.h"
#include "scummvm_file.h"
#include "common/config-manager.h"
#include "common/language.h"

File renamed without changes.
@@ -62,5 +62,42 @@ MODULE_OBJS += \
updates.o
endif

ifdef USE_LUA
MODULE_OBJS += \
lua/double_serialization.o \
lua/lapi.o \
lua/lauxlib.o \
lua/lbaselib.o \
lua/lcode.o \
lua/ldblib.o \
lua/ldblib.o \
lua/ldebug.o \
lua/ldo.o \
lua/lfunc.o \
lua/lgc.o \
lua/linit.o \
lua/liolib.o \
lua/llex.o \
lua/lmathlib.o \
lua/lmem.o \
lua/loadlib.o \
lua/lobject.o \
lua/lopcodes.o \
lua/loslib.o \
lua/lparser.o \
lua/lstate.o \
lua/lstring.o \
lua/lstrlib.o \
lua/ltable.o \
lua/ltablib.o \
lua/ltm.o \
lua/lua_persist.o \
lua/lua_persistence_util.o \
lua/lua_unpersist.o \
lua/lvm.o \
lua/lzio.o \
lua/scummvm_file.o
endif

# Include common rules
include $(srcdir)/rules.mk
@@ -173,6 +173,7 @@ _use_cxx11=no
_verbose_build=no
_text_console=no
_mt32emu=yes
_lua=yes
_build_scalers=yes
_build_hq_scalers=yes
_enable_prof=no
@@ -253,8 +254,7 @@ add_feature png "PNG" "_png"
add_feature theoradec "libtheoradec" "_theoradec"
add_feature vorbis "Vorbis file support" "_vorbis _tremor"
add_feature zlib "zlib" "_zlib"


add_feature lua "lua" "_lua"

# Directories for installing ScummVM.
# This list is closely based on what GNU autoconf does,
@@ -1027,6 +1027,7 @@ Optional Features:
--enable-plugins enable the support for dynamic plugins
--default-dynamic make plugins dynamic by default
--disable-mt32emu don't enable the integrated MT-32 emulator
--disable-lua don't enable Lua support
--disable-nuked-opl don't build Nuked OPL driver
--disable-16bit don't enable 16bit color support
--disable-highres don't enable support for high resolution engines >320x240
@@ -1255,6 +1256,8 @@ for ac_option in $@; do
--default-dynamic) _plugins_default=dynamic;;
--enable-mt32emu) _mt32emu=yes ;;
--disable-mt32emu) _mt32emu=no ;;
--enable-lua) _lua=yes ;;
--disable-lua) _lua=no ;;
--enable-nuked-opl) _nuked_opl=yes ;;
--disable-nuked-opl) _nuked_opl=no ;;
--enable-translation) _translation=yes ;;
@@ -4107,6 +4110,11 @@ fi
#
define_in_config_if_yes "$_mt32emu" 'USE_MT32EMU'

#
# Check whether Lua support is requested
#
define_in_config_if_yes "$_lua" 'USE_LUA'

#
# Check whether Nuked OPL emulator support is disabled
#
@@ -5405,6 +5413,10 @@ if test "$_mt32emu" = yes ; then
echo_n ", MT-32 emulator"
fi

if test "$_lua" = yes ; then
echo_n ", Lua"
fi

if test "$_nuked_opl" = yes ; then
echo_n ", Nuked OPL emulator"
fi
@@ -1074,6 +1074,7 @@ const Feature s_features[] = {
{ "16bit", "USE_RGB_COLOR", "", true, "16bit color support" },
{ "highres", "USE_HIGHRES", "", true, "high resolution" },
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
{ "lua", "USE_LUA", "", true, "lua" },
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
{ "opengl", "USE_OPENGL", "", true, "OpenGL support" },
{ "opengles", "USE_GLES", "", true, "forced OpenGL ES mode" },
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
add_engine sword25 "Broken Sword 2.5" yes "" "" "png zlib 16bit highres"
add_engine sword25 "Broken Sword 2.5" yes "" "" "png zlib 16bit highres lua"
@@ -50,8 +50,8 @@

#include "sword25/fmv/movieplayer.h"

#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
#include "common/lua/lua.h"
#include "common/lua/lauxlib.h"
enum {
BIT_DEPTH = 32,
BACKBUFFER_COUNT = 1
@@ -31,8 +31,8 @@

#include "sword25/math/vertex.h"

#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
#include "common/lua/lua.h"
#include "common/lua/lauxlib.h"

namespace Sword25 {

@@ -53,39 +53,7 @@ MODULE_OBJS := \
script/luascript.o \
script/lua_extensions.o \
sfx/soundengine.o \
sfx/soundengine_script.o \
util/lua/lapi.o \
util/lua/lauxlib.o \
util/lua/lbaselib.o \
util/lua/lcode.o \
util/lua/ldblib.o \
util/lua/ldebug.o \
util/lua/ldo.o \
util/lua/lfunc.o \
util/lua/lgc.o \
util/lua/linit.o \
util/lua/liolib.o \
util/lua/llex.o \
util/lua/lmathlib.o \
util/lua/lmem.o \
util/lua/loadlib.o \
util/lua/lobject.o \
util/lua/lopcodes.o \
util/lua/loslib.o \
util/lua/lparser.o \
util/lua/lstate.o \
util/lua/lstring.o \
util/lua/lstrlib.o \
util/lua/ltable.o \
util/lua/ltablib.o \
util/lua/ltm.o \
util/lua/lvm.o \
util/lua/lzio.o \
util/lua/scummvm_file.o \
util/double_serialization.o \
util/lua_persistence_util.o \
util/lua_persist.o \
util/lua_unpersist.o
sfx/soundengine_script.o

# This module can be built as a plugin
ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN)
@@ -34,8 +34,8 @@

#include "sword25/kernel/common.h"

#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
#include "common/lua/lua.h"
#include "common/lua/lauxlib.h"

namespace Sword25 {

@@ -34,8 +34,8 @@
#include "sword25/script/luacallback.h"
#include "sword25/script/luabindhelper.h"

#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
#include "common/lua/lua.h"
#include "common/lua/lauxlib.h"

const char *CALLBACKTABLE_NAME = "__CALLBACKS";

@@ -40,10 +40,10 @@
#include "sword25/kernel/outputpersistenceblock.h"
#include "sword25/kernel/inputpersistenceblock.h"

#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lualib.h"
#include "sword25/util/lua/lauxlib.h"
#include "sword25/util/lua_persistence.h"
#include "common/lua/lua.h"
#include "common/lua/lualib.h"
#include "common/lua/lauxlib.h"
#include "common/lua/lua_persistence.h"

namespace Sword25 {

0 comments on commit c1f029c

Please sign in to comment.
You can’t perform that action at this time.