From 0319cd06ef8e20486a3c7aa69a84bd39e8a71683 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 22 Dec 2011 19:30:47 +1100 Subject: CGE: Added explicit 'PACKED_STRUCT' macro to the HideDesc structure --- engines/cge/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/cge') diff --git a/engines/cge/bitmap.h b/engines/cge/bitmap.h index e7179f3b0b..3de05ac2fd 100644 --- a/engines/cge/bitmap.h +++ b/engines/cge/bitmap.h @@ -49,7 +49,7 @@ enum { struct HideDesc { uint16 _skip; uint16 _hide; -}; +} PACKED_STRUCT; #include "common/pack-end.h" -- cgit v1.2.3 From 658080deeda79d20ea40643569fbcb072573e7cf Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Jan 2012 01:15:49 +0100 Subject: ALL: Avoid using is* macros from ctype.h 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. --- engines/cge/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/cge') diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index 331dc8ac2d..9fb3c95e93 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -72,7 +72,7 @@ int16 Text::count() { strcpy(tmpStr, line.c_str()); if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL) continue; - if (!isdigit(*s)) + if (!isDigit(*s)) continue; counter++; @@ -105,7 +105,7 @@ void Text::load() { strcpy(tmpStr, line.c_str()); if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL) continue; - if (!isdigit(*s)) + if (!isDigit(*s)) continue; int r = atoi(s); -- cgit v1.2.3 From 08223e97469e3bbfe33237c951751c77a94b04ed Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 12 Jan 2012 11:35:28 +0100 Subject: CGE: Change detector singleid to be all lowercase --- engines/cge/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/cge') diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp index 3fa3dbd7ff..b3ef31f30f 100644 --- a/engines/cge/detection.cpp +++ b/engines/cge/detection.cpp @@ -104,7 +104,7 @@ static const ADFileBasedFallback fileBasedFallback[] = { class CGEMetaEngine : public AdvancedMetaEngine { public: CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames) { - _singleid = "Soltys"; + _singleid = "soltys"; } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { -- cgit v1.2.3 From 4f8665fc836898ebf54fc73b1061125b748183bc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 20 Feb 2012 16:03:39 +0100 Subject: COMMON: Move isFoo functions to namespace Common, add doxygen comments --- engines/cge/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/cge') diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index 9fb3c95e93..fd4120d49d 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -72,7 +72,7 @@ int16 Text::count() { strcpy(tmpStr, line.c_str()); if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL) continue; - if (!isDigit(*s)) + if (!Common::isDigit(*s)) continue; counter++; @@ -105,7 +105,7 @@ void Text::load() { strcpy(tmpStr, line.c_str()); if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL) continue; - if (!isDigit(*s)) + if (!Common::isDigit(*s)) continue; int r = atoi(s); -- cgit v1.2.3 From 4202d45fce31db586991e9afb3aaca82baa4404b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 22 Feb 2012 16:30:39 +0100 Subject: CGE: Avoid including advancedDetector.h from cge.h --- engines/cge/cge.cpp | 1 + engines/cge/cge.h | 3 ++- engines/cge/events.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/cge') diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 34e7d3f2f9..875ac34cd0 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -28,6 +28,7 @@ #include "common/EventRecorder.h" #include "common/file.h" #include "common/fs.h" +#include "engines/advancedDetector.h" #include "engines/util.h" #include "cge/cge.h" #include "cge/vga13h.h" diff --git a/engines/cge/cge.h b/engines/cge/cge.h index d324b293fa..4ebc836ee0 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -31,11 +31,12 @@ #include "engines/engine.h" #include "gui/debugger.h" #include "graphics/surface.h" -#include "engines/advancedDetector.h" #include "cge/console.h" #include "cge/bitmap.h" #include "cge/sound.h" +struct ADGameDescription; + namespace CGE { class Console; diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 7c98f00b7b..3c561c5659 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -30,6 +30,7 @@ #include "gui/message.h" #include "common/config-manager.h" #include "common/events.h" +#include "engines/advancedDetector.h" #include "cge/events.h" #include "cge/events.h" #include "cge/text.h" -- cgit v1.2.3 From 050902756e51e2195f7818bfd002050a73d73d8a Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 22 Feb 2012 23:18:50 +0100 Subject: CGE: Use WRITE_LE_UINT16 for unaligned writes. --- engines/cge/bitmap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/cge') diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 4b5034756c..37f4eb070e 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -198,7 +198,7 @@ BitmapPtr Bitmap::code() { if ((pix == kPixelTransp) != skip || cnt >= 0x3FF0) { // end of block cnt |= (skip) ? kBmpSKP : kBmpCPY; if (_v) - *cp = TO_LE_16(cnt); // store block description uint16 + WRITE_LE_UINT16(cp, cnt); // store block description uint16 cp = (uint16 *) im; im += 2; @@ -220,7 +220,7 @@ BitmapPtr Bitmap::code() { } else { cnt |= kBmpCPY; if (_v) - *cp = TO_LE_16(cnt); + WRITE_LE_UINT16(cp, cnt); cp = (uint16 *) im; im += 2; @@ -232,13 +232,13 @@ BitmapPtr Bitmap::code() { if (cnt && ! skip) { cnt |= kBmpCPY; if (_v) - *cp = TO_LE_16(cnt); + WRITE_LE_UINT16(cp, cnt); cp = (uint16 *) im; im += 2; } if (_v) - *cp = TO_LE_16(kBmpEOI); + WRITE_LE_UINT16(cp, kBmpEOI); cp = (uint16 *) im; im += 2; } -- cgit v1.2.3 From 983cd2129496305bd68b12adde3117ef247135d1 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 8 Dec 2011 08:04:41 +0100 Subject: JANITORIAL: Do not convert false to a null pointer. --- engines/cge/bitmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/cge') diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 37f4eb070e..309b89bdda 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -158,7 +158,7 @@ BitmapPtr Bitmap::code() { debugC(1, kCGEDebugBitmap, "Bitmap::code()"); if (!_m) - return false; + return NULL; uint16 cnt; -- cgit v1.2.3