[Scummvm-cvs-logs] scummvm master -> 85a19d61ad603becac99c1bd71cde5173b0e6241

Strangerke Strangerke at scummvm.org
Mon Sep 12 07:06:45 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
85a19d61ad CGE: Remove debug messages, fix a warning


Commit: 85a19d61ad603becac99c1bd71cde5173b0e6241
    https://github.com/scummvm/scummvm/commit/85a19d61ad603becac99c1bd71cde5173b0e6241
Author: Strangerke (strangerke at scummvm.org)
Date: 2011-09-11T22:01:21-07:00

Commit Message:
CGE: Remove debug messages, fix a warning

Changed paths:
    engines/cge/text.cpp
    engines/cge/vga13h.cpp



diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index 2b949ab..9e5ceac 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 ef08535..93b729e 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);






More information about the Scummvm-git-logs mailing list