aboutsummaryrefslogtreecommitdiff
path: root/kyra
diff options
context:
space:
mode:
Diffstat (limited to 'kyra')
-rw-r--r--kyra/debugger.cpp2
-rw-r--r--kyra/screen.cpp9
-rw-r--r--kyra/screen.h2
-rw-r--r--kyra/sprites.cpp6
4 files changed, 13 insertions, 6 deletions
diff --git a/kyra/debugger.cpp b/kyra/debugger.cpp
index 1384ce5fd8..e74d328f62 100644
--- a/kyra/debugger.cpp
+++ b/kyra/debugger.cpp
@@ -85,6 +85,8 @@ bool Debugger::cmd_enterRoom(int argc, const char **argv) {
_vm->enterNewScene(room, _vm->_currentCharacter->facing, 0, 0, 1);
_vm->_system->showOverlay();
+ _vm->_screen->_mouseLockCount = 0;
+
_detach_now = true;
return false;
}
diff --git a/kyra/screen.cpp b/kyra/screen.cpp
index 14f4bfb516..f4071c880b 100644
--- a/kyra/screen.cpp
+++ b/kyra/screen.cpp
@@ -1650,15 +1650,18 @@ int Screen::getRectSize(int x, int y) {
void Screen::hideMouse() {
debug(9, "Screen::hideMouse()");
- //++_mouseLockCount;
+ ++_mouseLockCount;
_system->showMouse(false);
}
void Screen::showMouse() {
debug(9, "Screen::showMouse()");
- //if (--_mouseLockCount == 0) {
+
+ if (_mouseLockCount > 0)
+ _mouseLockCount--;
+
+ if (_mouseLockCount == 0)
_system->showMouse(true);
- //}
}
void Screen::setShapePages(int page1, int page2) {
diff --git a/kyra/screen.h b/kyra/screen.h
index a59a61f4b8..fbf00c23f0 100644
--- a/kyra/screen.h
+++ b/kyra/screen.h
@@ -30,6 +30,7 @@ class OSystem;
namespace Kyra {
class KyraEngine;
+class Debugger;
struct Rect;
struct ScreenDim {
@@ -53,6 +54,7 @@ struct Font {
};
class Screen {
+ friend class Debugger;
public:
enum {
diff --git a/kyra/sprites.cpp b/kyra/sprites.cpp
index 89bdc0cbb6..91563d2ee5 100644
--- a/kyra/sprites.cpp
+++ b/kyra/sprites.cpp
@@ -88,7 +88,7 @@ void Sprites::setupSceneAnims() {
data += 4;
_anims[i].y = READ_LE_UINT16(data);
data += 4;
- _anims[i].width = *(data)/8 + 1;
+ _anims[i].width = *(data) - 1;
data += 4;
_anims[i].height = *(data);
data += 4;
@@ -111,14 +111,14 @@ void Sprites::setupSceneAnims() {
int bkgdHeight = _anims[i].height;
if (_anims[i].width2)
- bkgdWidth += (_anims[i].width2 >> 3) + 1;
+ bkgdWidth += _anims[i].width2 << 3;
if (_anims[i].height2)
bkgdHeight += _anims[i].height2;
_anims[i].background = (uint8 *)malloc(_screen->getRectSize(bkgdWidth + 1, bkgdHeight));
memset(_anims[i].background, 0, _screen->getRectSize(bkgdWidth + 1, bkgdHeight));
- //_anims[i].background = (uint8 *)malloc(100*100);
+
assert(_anims[i].background);
}
}