aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-18 21:11:19 +0000
committerJohannes Schickel2008-05-18 21:11:19 +0000
commit74311906f24fa22256fdb7520dfb1851ea3324ab (patch)
treee3dbb611bf9c832e5f370e4b7616bc7b80a4935f /engines/kyra
parent17874266bd540aed192e2a8f550b181d2bd4b8ad (diff)
downloadscummvm-rg350-74311906f24fa22256fdb7520dfb1851ea3324ab.tar.gz
scummvm-rg350-74311906f24fa22256fdb7520dfb1851ea3324ab.tar.bz2
scummvm-rg350-74311906f24fa22256fdb7520dfb1851ea3324ab.zip
Cleanup.
svn-id: r32176
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/kyra_lok.h3
-rw-r--r--engines/kyra/kyra_mr.cpp2
-rw-r--r--engines/kyra/kyra_v1.h5
-rw-r--r--engines/kyra/kyra_v2.cpp4
-rw-r--r--engines/kyra/kyra_v2.h2
-rw-r--r--engines/kyra/scene_lok.cpp12
-rw-r--r--engines/kyra/staticres.cpp14
7 files changed, 16 insertions, 26 deletions
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index d3e06c701f..ad425eee8c 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -628,9 +628,6 @@ protected:
int _cdaTrackTableSize;
const AudioDataStruct * _soundData;
- static const int8 _charXPosTable[];
- static const int8 _charYPosTable[];
-
// positions of the inventory
static const uint16 _itemPosX[];
static const uint8 _itemPosY[];
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 6e4d266480..c842e318ec 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -411,8 +411,6 @@ void KyraEngine_MR::playMenuAudioFile() {
void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playWanderScoreViaMap(%d, %d)", track, force);
- // XXX byte_3C87C compare
-
if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel))
force = 1;
else if (_musicSoundChannel == -1)
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 81a6254c7f..919d853dfb 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -263,6 +263,11 @@ protected:
static const int8 _addXPosTable[];
static const int8 _addYPosTable[];
+ // Character
+
+ static const int8 _charAddXPosTable[];
+ static const int8 _charAddYPosTable[];
+
// save/load
int _gameToLoad;
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 7b720259cc..e987496ddb 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -326,8 +326,8 @@ int KyraEngine_v2::updateCharPos(int *table, int force) {
debugC(9, kDebugLevelMain, "KyraEngine_v2::updateCharPos(%p, %d)", (const void*)table, force);
if (_updateCharPosNextUpdate > _system->getMillis() && !force)
return 0;
- _mainCharacter.x1 += _updateCharPosXTable[_mainCharacter.facing];
- _mainCharacter.y1 += _updateCharPosYTable[_mainCharacter.facing];
+ _mainCharacter.x1 += _charAddXPosTable[_mainCharacter.facing];
+ _mainCharacter.y1 += _charAddYPosTable[_mainCharacter.facing];
updateCharAnimFrame(0, table);
_updateCharPosNextUpdate = _system->getMillis() + getCharacterWalkspeed() * _tickLength;
return 1;
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 2f6d8a6185..f75fd89234 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -355,8 +355,6 @@ protected:
void updateCharPosWithUpdate();
uint32 _updateCharPosNextUpdate;
- static const int8 _updateCharPosXTable[];
- static const int8 _updateCharPosYTable[];
virtual int getCharacterWalkspeed() const = 0;
virtual void updateCharAnimFrame(int num, int *table) = 0;
diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp
index 085332b525..e4ae67f751 100644
--- a/engines/kyra/scene_lok.cpp
+++ b/engines/kyra/scene_lok.cpp
@@ -295,13 +295,13 @@ int KyraEngine_LoK::setCharacterPosition(int character, int *facingTable) {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPosition(%d, %p)", character, (const void *)facingTable);
if (character == 0) {
- _currentCharacter->x1 += _charXPosTable[_currentCharacter->facing];
- _currentCharacter->y1 += _charYPosTable[_currentCharacter->facing];
+ _currentCharacter->x1 += _charAddXPosTable[_currentCharacter->facing];
+ _currentCharacter->y1 += _charAddYPosTable[_currentCharacter->facing];
setCharacterPositionHelper(0, facingTable);
return 1;
} else {
- _characterList[character].x1 += _charXPosTable[_characterList[character].facing];
- _characterList[character].y1 += _charYPosTable[_characterList[character].facing];
+ _characterList[character].x1 += _charAddXPosTable[_characterList[character].facing];
+ _characterList[character].y1 += _charAddYPosTable[_characterList[character].facing];
if (_characterList[character].sceneId == _currentCharacter->sceneId)
setCharacterPositionHelper(character, 0);
}
@@ -1009,8 +1009,8 @@ int KyraEngine_LoK::changeScene(int facing) {
return 0;
}
- int xpos = _charXPosTable[facing] + _currentCharacter->x1;
- int ypos = _charYPosTable[facing] + _currentCharacter->y1;
+ int xpos = _charAddXPosTable[facing] + _currentCharacter->x1;
+ int ypos = _charAddYPosTable[facing] + _currentCharacter->y1;
if (xpos >= 12 && xpos <= 308) {
if (!lineIsPassable(xpos, ypos))
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index e57a68c746..42d1e6b0df 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1281,7 +1281,7 @@ void KyraEngine_HoF::initStaticResource() {
&KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introLibrary2,
&KyraEngine_HoF::seq_introMarco, &KyraEngine_HoF::seq_introHand1a,
&KyraEngine_HoF::seq_introHand1b, &KyraEngine_HoF::seq_introHand1c,
- &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0
+ &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0
};
static const SeqProc hofDemoSequenceCallbacks[] = {
@@ -1363,11 +1363,11 @@ const int8 KyraEngine_v1::_addYPosTable[] = {
0, -2, -2, -2, 0, 2, 2, 2
};
-const int8 KyraEngine_LoK::_charXPosTable[] = {
+const int8 KyraEngine_v1::_charAddXPosTable[] = {
0, 4, 4, 4, 0, -4, -4, -4
};
-const int8 KyraEngine_LoK::_charYPosTable[] = {
+const int8 KyraEngine_v1::_charAddYPosTable[] = {
-2, -2, 0, 2, 2, 2, 0, -2
};
@@ -1534,14 +1534,6 @@ const int KyraEngine_LoK::_dosTrackMapSize = ARRAYSIZE(KyraEngine_LoK::_dosTrack
// kyra engine v2 static data
-const int8 KyraEngine_v2::_updateCharPosXTable[] = {
- 0, 4, 4, 4, 0, -4, -4, -4
-};
-
-const int8 KyraEngine_v2::_updateCharPosYTable[] = {
- -2, -2, 0, 2, 2, 2, 0, -2
-};
-
const int GUI_v2::_sliderBarsPosition[] = {
0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52
};