aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Kagerer2009-02-14 14:33:26 +0000
committerFlorian Kagerer2009-02-14 14:33:26 +0000
commit6c586b3d4436abc994b5bae39d0c91427259b7b4 (patch)
tree42a124a40c572c3337c6bdae5c463d03db429f30
parent02c149e174137f179ac94c98979622a51720be31 (diff)
downloadscummvm-rg350-6c586b3d4436abc994b5bae39d0c91427259b7b4.tar.gz
scummvm-rg350-6c586b3d4436abc994b5bae39d0c91427259b7b4.tar.bz2
scummvm-rg350-6c586b3d4436abc994b5bae39d0c91427259b7b4.zip
LOL: fixed a bug in moveParty() and implemented some more gui code
svn-id: r36328
-rw-r--r--engines/kyra/gui_lol.cpp13
-rw-r--r--engines/kyra/lol.h1
-rw-r--r--engines/kyra/scene_lol.cpp12
3 files changed, 21 insertions, 5 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index b2fa4020c3..ac116e6e99 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -254,6 +254,16 @@ void LoLEngine::gui_drawCharFaceShape(int charNum, int x, int y, int pageNum) {
_screen->showMouse();
}
+void LoLEngine::gui_highlightPortraitFrame(int charNum) {
+ if (charNum != _selectedCharacter) {
+ int o = _selectedCharacter;
+ _selectedCharacter = charNum;
+ gui_drawCharPortraitWithStats(o);
+ }
+
+ gui_drawCharPortraitWithStats(charNum);
+}
+
void LoLEngine::gui_drawLiveMagicBar(int x, int y, int curPoints, int unk, int maxPoints, int w, int h, int col1, int col2, int flag) {
w--;
h--;
@@ -728,6 +738,9 @@ int LoLEngine::clickedPortraitLeft(Button *button) {
}
int LoLEngine::clickedLiveMagicBarsLeft(Button *button) {
+ gui_highlightPortraitFrame(button->data2Val2);
+ _txt->printMessage(0, getLangString(0x4047), _characters[button->data2Val2].name, _characters[button->data2Val2].hitPointsCur,
+ _characters[button->data2Val2].hitPointsMax, _characters[button->data2Val2].magicPointsCur, _characters[button->data2Val2].magicPointsMax);
return 1;
}
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index f35778ecde..9a5c61b879 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -360,6 +360,7 @@ private:
void gui_drawCharPortraitWithStats(int charNum);
void gui_drawBox(int x, int y, int w, int h, int frameColor1, int frameColor2, int fillColor);
void gui_drawCharFaceShape(int charNum, int x, int y, int pageNum);
+ void gui_highlightPortraitFrame(int charNum);
void gui_drawLiveMagicBar(int x, int y, int curPoints, int unk, int maxPoints, int w, int h, int col1, int col2, int flag);
void gui_drawMoneyBox(int pageNum);
void gui_drawInventory();
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 1d97de0fcc..529abe33a7 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -870,7 +870,7 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
_currentBlock = npos;
_sceneDefaultUpdate = 1;
- calcCoordinates(_partyPosX, _partyPosY, opos, 0x80, 0x80);
+ calcCoordinates(_partyPosX, _partyPosY, _currentBlock, 0x80, 0x80);
_unkFlag &= 0xfdff;
runSceneScript(opos, 4);
@@ -902,11 +902,13 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
gui_toggleButtonDisplayMode(buttonShape, 0);
- runSceneScript(opos, 8);
- runSceneScript(npos, 2);
+ if (npos == _currentBlock) {
+ runSceneScript(opos, 8);
+ runSceneScript(npos, 2);
- if (_levelBlockProperties[npos].walls[0] == 0x1a)
- memset(_levelBlockProperties[npos].walls, 0, 4);
+ if (_levelBlockProperties[npos].walls[0] == 0x1a)
+ memset(_levelBlockProperties[npos].walls, 0, 4);
+ }
}
setLF2(_currentBlock);