From 85a19d61ad603becac99c1bd71cde5173b0e6241 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 12 Sep 2011 07:01:21 +0200 Subject: CGE: Remove debug messages, fix a warning --- engines/cge/text.cpp | 5 +++-- engines/cge/vga13h.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index 2b949ab701..9e5ceac9c4 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -43,7 +43,8 @@ Text::Text(CGEEngine *vm, const char *fname) : _vm(vm) { if (!_cat->exist(_fileName)) error("No talk (%s)\n", _fileName); int16 txtCount = count() + 1; - warning("Number of texts: %d", txtCount); + if (!txtCount) + error("Unable to read dialog file %s", _fileName); _cache = new Handler[txtCount]; for (_size = 0; _size < txtCount; _size++) { @@ -61,7 +62,7 @@ Text::~Text() { int16 Text::count() { EncryptedStream tf = _fileName; if (tf.err()) - return NULL; + return -1; Common::String line; char tmpStr[kLineMax + 1]; diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index ef085359a7..93b729e5ec 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -681,13 +681,15 @@ Vga::Vga() : _frmCnt(0), _msg(NULL), _name(NULL), _setPal(false), _mono(0) { _page[idx]->create(320, 200, Graphics::PixelFormat::createFormatCLUT8()); } +#if 0 + // This part was used to display credits at the beginning of the game for (int i = 10; i < 20; i++) { char *text = _text->getText(i); if (text) { debugN(1, "%s\n", text); } } - +#endif _oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount); _newColors = (Dac *)malloc(sizeof(Dac) * kPalCount); getColors(_oldColors); -- cgit v1.2.3