diff options
| author | Martin Kiewitz | 2010-02-04 20:43:00 +0000 | 
|---|---|---|
| committer | Martin Kiewitz | 2010-02-04 20:43:00 +0000 | 
| commit | 00ac235331bcffc19fbc96dc973e876085f2db93 (patch) | |
| tree | 962af01ff3e6a05d5688d97951c8108847ea892b /engines/sci/engine/kpathing.cpp | |
| parent | e74bd30a2e249598b6ec8ec1cb6c03fd95797ddc (diff) | |
| download | scummvm-rg350-00ac235331bcffc19fbc96dc973e876085f2db93.tar.gz scummvm-rg350-00ac235331bcffc19fbc96dc973e876085f2db93.tar.bz2 scummvm-rg350-00ac235331bcffc19fbc96dc973e876085f2db93.zip | |
SCI: making pathfinding debug support also work in sci32 (though it just shows the path for 2.5 seconds there)
svn-id: r47888
Diffstat (limited to 'engines/sci/engine/kpathing.cpp')
| -rw-r--r-- | engines/sci/engine/kpathing.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 7797ead3e6..1a466bc6c1 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -29,6 +29,7 @@  #include "sci/engine/kernel.h"  #include "sci/graphics/paint16.h"  #include "sci/graphics/palette.h" +#include "sci/graphics/screen.h"  #include "common/list.h" @@ -307,7 +308,7 @@ static void draw_line(EngineState *s, Common::Point p1, Common::Point p2, int ty  	p2.y = CLIP<int16>(p2.y, 0, height - 1);  	assert(type >= 0 && type <= 3); -	s->_gfxPaint16->kernelGraphDrawLine(p1, p2, poly_colors[type], 255, 255); +	s->_gfxPaint->kernelGraphDrawLine(p1, p2, poly_colors[type], 255, 255);  }  static void draw_point(EngineState *s, Common::Point p, int start, int width, int height) { @@ -328,7 +329,8 @@ static void draw_point(EngineState *s, Common::Point p, int start, int width, in  	rect.right = CLIP<int16>(rect.right, 0, width - 1);  	assert(start >= 0 && start <= 1); -	s->_gfxPaint16->kernelGraphFrameBox(rect, point_colors[start]); +	if (s->_gfxPaint16) +		s->_gfxPaint16->kernelGraphFrameBox(rect, point_colors[start]);  }  static void draw_polygon(EngineState *s, reg_t polygon, int width, int height) { @@ -1405,8 +1407,6 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) {  		}  		if (Common::isDebugChannelEnabled(kDebugLevelAvoidPath)) { -			assert(s->_gui); -  			debug("[avoidpath] Pathfinding input:");  			draw_point(s, start, 1, width, height);  			draw_point(s, end, 0, width, height); @@ -1417,7 +1417,10 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) {  			}  			// Update the whole screen -			s->_gfxPaint16->kernelGraphUpdateBox(Common::Rect(0, 0, width - 1, height - 1), width > 320); +			s->_gfxScreen->copyToScreen(); +			g_system->updateScreen(); +			if (!s->_gfxPaint16) +				g_system->delayMillis(2500);  		}  		PathfindingState *p = convert_polygon_set(s, poly_list, start, end, width, height, opt); | 
