[Scummvm-cvs-logs] SF.net SVN: scummvm:[41025] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat May 30 12:42:11 CEST 2009


Revision: 41025
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41025&view=rev
Author:   thebluegr
Date:     2009-05-30 10:42:08 +0000 (Sat, 30 May 2009)

Log Message:
-----------
Removed/replaced BREAKPOINT

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/res_pic.cpp
    scummvm/trunk/engines/sci/sfx/core.cpp
    scummvm/trunk/engines/sci/sfx/iterator.cpp
    scummvm/trunk/engines/sci/tools.h

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -248,7 +248,6 @@
 
 		if (!parent) {
 			error("Attempted widget mass destruction by a snapshot");
-			BREAKPOINT();
 		}
 
 		reparentize_primary_widget_lists(s, (GfxPort *) parent);
@@ -1842,7 +1841,6 @@
 						SCIkdebug(SCIkGRAPHICS, "Adding view at %04x:%04x to background\n", PRINT_REG(obj));
 						if (!(gfxw_remove_id(widget->_parent, widget->_ID, widget->_subID) == widget)) {
 							error("Attempt to remove view with ID %x:%x from list failed!\n", widget->_ID, widget->_subID);
-							BREAKPOINT();
 						}
 
 						s->drop_views->add(GFXWC(s->drop_views), gfxw_picviewize_dynview(widget));
@@ -1961,7 +1959,6 @@
 
 	if (!*widget_list) {
 		error("make_view_list with widget_list == ()\n");
-		BREAKPOINT();
 	};
 
 	assert_primary_widget_lists(s);
@@ -1970,7 +1967,6 @@
 
 	if (!list) { // list sanity check
 		error("Attempt to make list from non-list!\n");
-		BREAKPOINT();
 	}
 
 	node = lookup_node(s, list->first);

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -535,7 +535,7 @@
 				for (k = 0; k < scr->_objects.size(); k++)
 					sciprintf("- obj#%d at %04x w/ %d vars\n", k, scr->_objects[k].pos.offset, scr->_objects[k]._variables.size());
 				sciprintf("Triggering breakpoint...\n");
-				BREAKPOINT();
+				error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 			}
 		}
 	}

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -264,7 +264,7 @@
 
 	if (!container) {
 		GFXERROR("Attempt to remove widget from NULL container!\n");
-		BREAKPOINT();
+		error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 	}
 
 	seekerp = &(container->_contents);
@@ -286,7 +286,7 @@
 		widget->print(1);
 		sciprintf("Container:");
 		widget->print(1);
-		BREAKPOINT();
+		error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 		return;
 	}
 
@@ -826,7 +826,7 @@
 		GfxState *state = _visual ? _visual->_gfxState : NULL;
 		if (!state) {
 			GFXERROR("Attempt to free text without supplying mode to free it from!\n");
-			BREAKPOINT();
+			error("GfxText destructor failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 		} else {
 			gfxop_free_text(state, _textHandle);
 			_textHandle = NULL;
@@ -1330,9 +1330,7 @@
 		widget->print(3);
 		sciprintf("\nList:");
 		container->print(3);
-		BREAKPOINT();
-
-		return 1;
+		error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 	}
 
 	if (_gfxw_container_id_equals(container, widget))

Modified: scummvm/trunk/engines/sci/gfx/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -485,7 +485,7 @@
 	int full_offset = (yoffset * pic->mode->yfact + offset) * pic->mode->xfact;
 
 	if (yoffset + offset >= 64000) {
-		BREAKPOINT();
+		error("_gfxr_auxplot_brush() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 	}
 
 	switch (brush_mode) {

Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/sfx/core.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -540,7 +540,9 @@
 		oldseeker->next_stopping = oldseeker->next_playing;
 		oldseeker->next_playing = &not_playing_anymore;
 
-		if (oldseeker == oldseeker->next_playing) { BREAKPOINT(); }
+		if (oldseeker == oldseeker->next_playing) { 
+			error("updateMultiSong() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
+		}
 	}
 
 	/* Second, re-generate the new song queue. */
@@ -549,7 +551,9 @@
 		newseeker->next_playing
 		= song_lib_find_next_active(_songlib, newseeker);
 
-		if (newseeker == newseeker->next_playing) { BREAKPOINT(); }
+		if (newseeker == newseeker->next_playing) { 
+			error("updateMultiSong() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
+		}
 	}
 	/* We now need to update the currently playing song list, because we're
 	** going to use some functions that require this list to be in a sane

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-30 10:42:08 UTC (rev 41025)
@@ -441,7 +441,7 @@
 
 	default:
 		warning("Invalid iterator state %d!", channel->state);
-		BREAKPOINT();
+		error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 		return SI_FINISHED;
 	}
 }
@@ -1290,7 +1290,7 @@
 		self->_status &= ~TEE_RIGHT_ACTIVE;
 		self->_children[TEE_RIGHT].it = NULL;
 	} else {
-		BREAKPOINT();
+		error("songit_tee_death_notification() failed: Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 	}
 }
 
@@ -1580,7 +1580,7 @@
 		if (retval == SI_MORPH) {
 			fprintf(stderr, "  Morphing %p (stored at %p)\n", (void *)*it, (void *)it);
 			if (!SIMSG_SEND((*it), SIMSG_ACK_MORPH)) {
-				BREAKPOINT();
+				error("SI_MORPH failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
 			} else
 				fprintf(stderr, "SI_MORPH successful\n");
 		}

Modified: scummvm/trunk/engines/sci/tools.h
===================================================================
--- scummvm/trunk/engines/sci/tools.h	2009-05-30 10:22:53 UTC (rev 41024)
+++ scummvm/trunk/engines/sci/tools.h	2009-05-30 10:42:08 UTC (rev 41025)
@@ -41,9 +41,6 @@
 /** Find first set bit in bits and return its index. Returns 0 if bits is 0. */
 int sci_ffs(int bits);
 
-
-#define BREAKPOINT() do { error("Breakpoint in %s, line %d\n", __FILE__, __LINE__); } while(0)
-
 } // End of namespace Sci
 
 #endif // SCI_TOOLS_H


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list