From 97852d473e05b03a1b9a18facc9c2cf0c3ac8a92 Mon Sep 17 00:00:00 2001 From: strangerke Date: Mon, 14 Feb 2011 08:31:01 +0100 Subject: HUGO: Some more refactoring Move _hotspots to mouse class and encapsulate it, rename some variables in route class --- engines/hugo/display.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'engines/hugo/display.cpp') diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 37b3e6e97b..a2902e3b9d 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -40,6 +40,7 @@ #include "hugo/inventory.h" #include "hugo/util.h" #include "hugo/object.h" +#include "hugo/mouse.h" namespace Hugo { /** @@ -658,20 +659,16 @@ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const { } /** - * Display exit hotspots in God Mode ('PPG') + * Display active boundaries in God Mode ('PPG') * Light Red = Exit hotspots * Light Green = Visible objects * White = Fixed objects, parts of background */ -void Screen::drawHotspots() { +void Screen::drawBoundaries() { if (!_vm->getGameStatus().godModeFl) return; - for (int i = 0; _vm->_hotspots[i].screenIndex >= 0; i++) { - hotspot_t *hotspot = &_vm->_hotspots[i]; - if (hotspot->screenIndex == _vm->_hero->screenIndex) - drawRectangle(false, hotspot->x1, hotspot->y1, hotspot->x2, hotspot->y2, _TLIGHTRED); - } + _vm->_mouse->drawHotspots(); for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; // Get pointer to object -- cgit v1.2.3