aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2011-11-12 14:35:16 +0100
committerJohannes Schickel2011-12-26 16:18:15 +0100
commit5837e0f94ea7abf67ecd618fb641eec98231ebcb (patch)
tree95ed71226c0d1c2268220e94b6c85231d6eb4bad
parenta944990a6896e9e667e987a3cb3d3d8affc0e5b3 (diff)
downloadscummvm-rg350-5837e0f94ea7abf67ecd618fb641eec98231ebcb.tar.gz
scummvm-rg350-5837e0f94ea7abf67ecd618fb641eec98231ebcb.tar.bz2
scummvm-rg350-5837e0f94ea7abf67ecd618fb641eec98231ebcb.zip
KYRA: (EOB) - make sure that the music stops after character generation in Eob 1
(also more cleanup)
-rw-r--r--engines/kyra/chargen.cpp26
-rw-r--r--engines/kyra/eobcommon.h1
-rw-r--r--engines/kyra/gui_eob.cpp27
-rw-r--r--engines/kyra/gui_eob.h7
-rw-r--r--engines/kyra/scene_eob.cpp3
5 files changed, 30 insertions, 34 deletions
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index a288359092..f7a546091d 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -224,7 +224,8 @@ bool CharacterGenerator::start(EobCharacter *characters, uint8 ***faceShapes) {
finish();
}
- _vm->sound()->playTrack(15);
+ if (_vm->game() == GI_EOB2)
+ _vm->sound()->playTrack(15);
*faceShapes = _faceShapes;
return true;
@@ -1406,29 +1407,6 @@ const EobRect8 CharacterGenerator::_chargenButtonBodyCoords[] = {
{ 0x14, 0x90, 0x0B, 0x10 }
};
-const EobRect16 GUI_Eob::_updateBoxFrameHighLights[] = {
- { 0x00B7, 0x0001, 0x00F7, 0x0034 },
- { 0x00FF, 0x0001, 0x013F, 0x0034 },
- { 0x00B7, 0x0035, 0x00F7, 0x0068 },
- { 0x00FF, 0x0035, 0x013F, 0x0068 },
- { 0x00B7, 0x0069, 0x00F7, 0x009C },
- { 0x00FF, 0x0069, 0x013F, 0x009C },
- { 0x0010, 0x003F, 0x0030, 0x0060 },
- { 0x0050, 0x003F, 0x0070, 0x0060 },
- { 0x0010, 0x007F, 0x0030, 0x00A0 },
- { 0x0050, 0x007F, 0x0070, 0x00A0 },
- { 0x00B0, 0x0042, 0x00D0, 0x0061 },
- { 0x00D0, 0x0042, 0x00F0, 0x0061 },
- { 0x00F0, 0x0042, 0x0110, 0x0061 },
- { 0x0110, 0x0042, 0x0130, 0x0061 },
- { 0x0004, 0x0018, 0x0024, 0x0039 },
- { 0x00A3, 0x0018, 0x00C3, 0x0039 },
- { 0x0004, 0x0040, 0x0024, 0x0061 },
- { 0x00A3, 0x0040, 0x00C3, 0x0061 },
- { 0x0004, 0x0068, 0x0024, 0x0089 },
- { 0x00A3, 0x0068, 0x00C3, 0x0089 }
-};
-
const int16 CharacterGenerator::_chargenBoxX[] = { 0x10, 0x50, 0x10, 0x50 };
const int16 CharacterGenerator::_chargenBoxY[] = { 0x3F, 0x3F, 0x7F, 0x7F };
const int16 CharacterGenerator::_chargenNameFieldX[] = { 0x02, 0x42, 0x02, 0x42 };
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index e4c06fefcd..06d43272cc 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -314,7 +314,6 @@ protected:
bool checkPartyStatus(bool handleDeath);
bool _runFlag;
- //int _runLoopUnk2;
// Character generation / party transfer
bool startCharacterGeneration();
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 4ced205d91..f084bc9978 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -2451,9 +2451,7 @@ void GUI_Eob::messageDialogue2(int dim, int id, int buttonTextCol) {
}
void GUI_Eob::updateBoxFrameHighLight(int box) {
- static const uint8 colorTable[] = { 0x0F, 0xB0, 0xB2, 0xB4, 0xB6,
- 0xB8, 0xBA, 0xBC, 0x0C, 0xBC, 0xBA, 0xB8, 0xB6, 0xB4, 0xB2, 0xB0, 0x00
- };
+ static const uint8 colorTable[] = { 0x0F, 0xB0, 0xB2, 0xB4, 0xB6, 0xB8, 0xBA, 0xBC, 0x0C, 0xBC, 0xBA, 0xB8, 0xB6, 0xB4, 0xB2, 0xB0, 0x00 };
if (_updateBoxIndex == box) {
if (_updateBoxIndex == -1)
@@ -4044,6 +4042,29 @@ void GUI_Eob::restParty_updateRestTime(int hours, bool init) {
_screen->setFont(of);
}
+const EobRect16 GUI_Eob::_updateBoxFrameHighLights[] = {
+ { 0x00B7, 0x0001, 0x00F7, 0x0034 },
+ { 0x00FF, 0x0001, 0x013F, 0x0034 },
+ { 0x00B7, 0x0035, 0x00F7, 0x0068 },
+ { 0x00FF, 0x0035, 0x013F, 0x0068 },
+ { 0x00B7, 0x0069, 0x00F7, 0x009C },
+ { 0x00FF, 0x0069, 0x013F, 0x009C },
+ { 0x0010, 0x003F, 0x0030, 0x0060 },
+ { 0x0050, 0x003F, 0x0070, 0x0060 },
+ { 0x0010, 0x007F, 0x0030, 0x00A0 },
+ { 0x0050, 0x007F, 0x0070, 0x00A0 },
+ { 0x00B0, 0x0042, 0x00D0, 0x0061 },
+ { 0x00D0, 0x0042, 0x00F0, 0x0061 },
+ { 0x00F0, 0x0042, 0x0110, 0x0061 },
+ { 0x0110, 0x0042, 0x0130, 0x0061 },
+ { 0x0004, 0x0018, 0x0024, 0x0039 },
+ { 0x00A3, 0x0018, 0x00C3, 0x0039 },
+ { 0x0004, 0x0040, 0x0024, 0x0061 },
+ { 0x00A3, 0x0040, 0x00C3, 0x0061 },
+ { 0x0004, 0x0068, 0x0024, 0x0089 },
+ { 0x00A3, 0x0068, 0x00C3, 0x0089 }
+};
+
#endif // ENABLE_EOB
} // End of namespace Kyra
diff --git a/engines/kyra/gui_eob.h b/engines/kyra/gui_eob.h
index 30fd4ccc38..a0ac509026 100644
--- a/engines/kyra/gui_eob.h
+++ b/engines/kyra/gui_eob.h
@@ -106,9 +106,6 @@ private:
void restParty_updateRestTime(int hours, bool init);
- Button _scrollUpButton;//////////////////77
- Button _scrollDownButton;
-
char **_menuStringsPrefsTemp;
char **_saveSlotStringsTemp;
int16 *_saveSlotIdTemp;
@@ -130,9 +127,6 @@ private:
uint16 _prcButtonUnk3;
uint16 _cflag;
- //Button::Callback _scrollUpFunctor;
- //Button::Callback _scrollDownFunctor;
-
int _menuLineSpacing;
int _menuLastInFlags;
@@ -150,6 +144,7 @@ private:
int _updateBoxIndex;
int _updateBoxColorIndex;
uint32 _highLightBoxTimer;
+
static const EobRect16 _updateBoxFrameHighLights[];
};
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index ce0cdf8b59..0aaad6d35c 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -620,6 +620,7 @@ namespace Kyra {
void EobCoreEngine::loadLevel(int level, int sub) {
_currentLevel = level;
_currentSub = sub;
+ uint32 end = _system->getMillis() + 500;
Common::String file;
Common::SeekableReadStream *s = 0;
@@ -695,6 +696,8 @@ void EobCoreEngine::loadLevel(int level, int sub) {
loadVcnData(gfxFile.c_str(), 0);
_screen->loadEobBitmap("INVENT", 0, 5, 3, 2);
+ delayUntil(end);
+ snd_stopSound();
enableSysTimer(2);
_sceneDrawPage1 = 2;