diff options
author | Filippos Karapetis | 2009-05-30 10:42:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-30 10:42:08 +0000 |
commit | c7c9f05cac225b65fb4cd8faf957f167a3b0d576 (patch) | |
tree | ef260d04d9ab364e8dbdbbad3ab370da33b9bece | |
parent | 56c0a41b71256118eda1ffa08f2317aba673faf9 (diff) | |
download | scummvm-rg350-c7c9f05cac225b65fb4cd8faf957f167a3b0d576.tar.gz scummvm-rg350-c7c9f05cac225b65fb4cd8faf957f167a3b0d576.tar.bz2 scummvm-rg350-c7c9f05cac225b65fb4cd8faf957f167a3b0d576.zip |
Removed/replaced BREAKPOINT
svn-id: r41025
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 2 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_widgets.cpp | 10 | ||||
-rw-r--r-- | engines/sci/gfx/res_pic.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/core.cpp | 8 | ||||
-rw-r--r-- | engines/sci/sfx/iterator.cpp | 6 | ||||
-rw-r--r-- | engines/sci/tools.h | 3 |
7 files changed, 15 insertions, 20 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index b0fe1d50cb..c59b824b18 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -248,7 +248,6 @@ void graph_restore_box(EngineState *s, reg_t handle) { if (!parent) { error("Attempted widget mass destruction by a snapshot"); - BREAKPOINT(); } reparentize_primary_widget_lists(s, (GfxPort *) parent); @@ -1842,7 +1841,6 @@ int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, in 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 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list, if (!*widget_list) { error("make_view_list with widget_list == ()\n"); - BREAKPOINT(); }; assert_primary_widget_lists(s); @@ -1970,7 +1967,6 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list, if (!list) { // list sanity check error("Attempt to make list from non-list!\n"); - BREAKPOINT(); } node = lookup_node(s, list->first); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index fbefcb0c18..eb7a01da57 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -535,7 +535,7 @@ void SegManager::heapRelocate(reg_t block) { 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__); } } } diff --git a/engines/sci/gfx/gfx_widgets.cpp b/engines/sci/gfx/gfx_widgets.cpp index 713366649b..32f30b0518 100644 --- a/engines/sci/gfx/gfx_widgets.cpp +++ b/engines/sci/gfx/gfx_widgets.cpp @@ -264,7 +264,7 @@ void gfxw_remove_widget_from_container(GfxContainer *container, GfxWidget *widge 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 @@ void gfxw_remove_widget_from_container(GfxContainer *container, GfxWidget *widge 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 @@ GfxText::~GfxText() { 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 @@ int _gfxwop_ordered_add(GfxContainer *container, GfxWidget *widget, int compare_ 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)) diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp index 8aecdd09b4..a404df1d43 100644 --- a/engines/sci/gfx/res_pic.cpp +++ b/engines/sci/gfx/res_pic.cpp @@ -485,7 +485,7 @@ static void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffset, int 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) { diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index 5030cde77e..549a337a64 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -540,7 +540,9 @@ void SfxState::updateMultiSong() { oldseeker->next_stopping = oldseeker->next_playing; oldseeker->next_playing = ¬_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 @@ void SfxState::updateMultiSong() { 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 diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp index 173c4ab160..8192e4c75b 100644 --- a/engines/sci/sfx/iterator.cpp +++ b/engines/sci/sfx/iterator.cpp @@ -441,7 +441,7 @@ static int _sci_midi_process_state(BaseSongIterator *self, byte *buf, int *resul 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 @@ static void songit_tee_death_notification(TeeSongIterator *self, SongIterator *c 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 @@ int songit_next(SongIterator **it, byte *buf, int *result, int mask) { 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"); } diff --git a/engines/sci/tools.h b/engines/sci/tools.h index 66c6638510..a4352837e8 100644 --- a/engines/sci/tools.h +++ b/engines/sci/tools.h @@ -41,9 +41,6 @@ void sciprintf(const char *fmt, ...) GCC_PRINTF(1, 2); /** 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 |