From aa947c9474ad83aa9315bc585d1f0b79060fee61 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:33 +0100 Subject: BUILD: Split configure.engines down to a single file per engine. This is the first part of allowing engines to be added dynamically. They are placed into a folder in engines/ which must contain a file named "configure.engine" to add the engine, which is pulled into the top level configure script automatically. --- engines/sword25/configure.engine | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/sword25/configure.engine (limited to 'engines/sword25') diff --git a/engines/sword25/configure.engine b/engines/sword25/configure.engine new file mode 100644 index 0000000000..1729bbeb33 --- /dev/null +++ b/engines/sword25/configure.engine @@ -0,0 +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" no "" "" "png zlib 16bit" -- cgit v1.2.3 From d77cf95a185a6c8f201f417d08f246727784f728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines.mk down to a single file per engine. This is the second part of allowing engines to be added dynamically. Each folder in engines/ which must contain a file named "engine.mk" containing the make definitions for that engine. --- engines/sword25/engine.mk | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 engines/sword25/engine.mk (limited to 'engines/sword25') diff --git a/engines/sword25/engine.mk b/engines/sword25/engine.mk new file mode 100644 index 0000000000..32a906c5cd --- /dev/null +++ b/engines/sword25/engine.mk @@ -0,0 +1,4 @@ +ifdef ENABLE_SWORD25 +DEFINES += -DENABLE_SWORD25=$(ENABLE_SWORD25) +MODULES += engines/sword25 +endif -- cgit v1.2.3 From 00c27a28f91cc2bbf512461e69c86be998462728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines/plugins_table header down to a file per engine. This is the third and final commit enabling fully pluggable engines. Now providing an engine folder contains a configure.engine, engine.mk and engine-plugin.h file, it will be picked up automatically by the configure script. --- engines/sword25/engine-plugin.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/sword25/engine-plugin.h (limited to 'engines/sword25') diff --git a/engines/sword25/engine-plugin.h b/engines/sword25/engine-plugin.h new file mode 100644 index 0000000000..526b443f57 --- /dev/null +++ b/engines/sword25/engine-plugin.h @@ -0,0 +1,3 @@ +#if PLUGIN_ENABLED_STATIC(SWORD25) +LINK_PLUGIN(SWORD25) +#endif -- cgit v1.2.3 From 1ac01d2333af11d403ef84dd5192abb18814e5b3 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine-plugin.h in engines. This is now generated automatically by the configure script from the engine directory names. --- engines/sword25/engine-plugin.h | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 engines/sword25/engine-plugin.h (limited to 'engines/sword25') diff --git a/engines/sword25/engine-plugin.h b/engines/sword25/engine-plugin.h deleted file mode 100644 index 526b443f57..0000000000 --- a/engines/sword25/engine-plugin.h +++ /dev/null @@ -1,3 +0,0 @@ -#if PLUGIN_ENABLED_STATIC(SWORD25) -LINK_PLUGIN(SWORD25) -#endif -- cgit v1.2.3 From ef85456859e466adc8913041e4f31809485c45ab Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine.mk in each engine directory. Each engine now only has to provide a single configure.engine file adding the engine into the configure script, which then produces the required other files automatically. --- engines/sword25/engine.mk | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 engines/sword25/engine.mk (limited to 'engines/sword25') diff --git a/engines/sword25/engine.mk b/engines/sword25/engine.mk deleted file mode 100644 index 32a906c5cd..0000000000 --- a/engines/sword25/engine.mk +++ /dev/null @@ -1,4 +0,0 @@ -ifdef ENABLE_SWORD25 -DEFINES += -DENABLE_SWORD25=$(ENABLE_SWORD25) -MODULES += engines/sword25 -endif -- cgit v1.2.3 From 622dfcf950c6b12633911568bcad940dca74ed9e Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 24 Nov 2013 18:40:10 +0100 Subject: SWORD25: Janitorial - Fix spacing errors --- engines/sword25/gfx/image/art.cpp | 3 +-- engines/sword25/gfx/renderobjectmanager.cpp | 17 ++++++++++------- engines/sword25/util/lua/lopcodes.cpp | 2 +- engines/sword25/util/lua/lua.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'engines/sword25') diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp index 9c4b9fe8bd..e2eeaca33f 100644 --- a/engines/sword25/gfx/image/art.cpp +++ b/engines/sword25/gfx/image/art.cpp @@ -424,8 +424,7 @@ static void art_vpath_render_bez(ArtVpath **p_vpath, int *pn, int *pn_max, x_m, y_m, xb1, yb1, xb2, yb2, x3, y3, flatness); } else { // don't subdivide - art_vpath_add_point(p_vpath, pn, pn_max, - ART_LINETO, x3, y3); + art_vpath_add_point(p_vpath, pn, pn_max, ART_LINETO, x3, y3); } } diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp index 57c8ec318f..bc7dd02636 100644 --- a/engines/sword25/gfx/renderobjectmanager.cpp +++ b/engines/sword25/gfx/renderobjectmanager.cpp @@ -103,13 +103,16 @@ bool RenderObjectManager::render() { _uta->clear(); // Add rectangles of objects which don't exist in this frame any more - for (RenderObjectQueue::iterator it = _prevQueue->begin(); it != _prevQueue->end(); ++it) - if (!_currQueue->exists(*it)) - _uta->addRect((*it)._bbox); - // Add rectangles of objects which are different from the previous frame - for (RenderObjectQueue::iterator it = _currQueue->begin(); it != _currQueue->end(); ++it) - if (!_prevQueue->exists(*it)) - _uta->addRect((*it)._bbox); + for (RenderObjectQueue::iterator it = _prevQueue->begin(); it != _prevQueue->end(); ++it) { + if (!_currQueue->exists(*it)) + _uta->addRect((*it)._bbox); + } + + // Add rectangles of objects which are different from the previous frame + for (RenderObjectQueue::iterator it = _currQueue->begin(); it != _currQueue->end(); ++it) { + if (!_prevQueue->exists(*it)) + _uta->addRect((*it)._bbox); + } RectangleList *updateRects = _uta->getRectangles(); Common::Array updateRectsMinZ; diff --git a/engines/sword25/util/lua/lopcodes.cpp b/engines/sword25/util/lua/lopcodes.cpp index 9d76862ae2..8b0a3ab330 100644 --- a/engines/sword25/util/lua/lopcodes.cpp +++ b/engines/sword25/util/lua/lopcodes.cpp @@ -61,7 +61,7 @@ const char *const luaP_opnames[NUM_OPCODES+1] = { const lu_byte luaP_opmodes[NUM_OPCODES] = { /* T A B C mode opcode */ - opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ + opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_LOADBOOL */ ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LOADNIL */ diff --git a/engines/sword25/util/lua/lua.h b/engines/sword25/util/lua/lua.h index a3b7573ca5..4f557e462b 100644 --- a/engines/sword25/util/lua/lua.h +++ b/engines/sword25/util/lua/lua.h @@ -22,7 +22,7 @@ #define LUA_RELEASE "Lua 5.1.3" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" -#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" +#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" /* mark for precompiled code (`Lua') */ -- cgit v1.2.3