mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 17:20:30 +00:00
- update names
- remove nonused access to atributes sequence in comi svn-id: r13721
This commit is contained in:
parent
4110aeb5d5
commit
0b86e3e69c
@ -161,18 +161,18 @@ public:
|
|||||||
|
|
||||||
struct imuseRoomMap {
|
struct imuseRoomMap {
|
||||||
int8 roomId;
|
int8 roomId;
|
||||||
byte musicTableIndex;
|
byte stateIndex1;
|
||||||
byte unk1;
|
byte offset;
|
||||||
byte unk2;
|
byte stateIndex2;
|
||||||
byte unk3;
|
byte atribPos;
|
||||||
byte unk4;
|
byte stateIndex3;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct imuseDigTable {
|
struct imuseDigTable {
|
||||||
byte opcode;
|
byte opcode;
|
||||||
int16 soundId;
|
int16 soundId;
|
||||||
char name[20];
|
char name[20];
|
||||||
byte param;
|
byte atribPos;
|
||||||
byte hookId;
|
byte hookId;
|
||||||
char filename[13];
|
char filename[13];
|
||||||
};
|
};
|
||||||
@ -181,7 +181,7 @@ struct imuseComiTable {
|
|||||||
byte opcode;
|
byte opcode;
|
||||||
int16 soundId;
|
int16 soundId;
|
||||||
char name[20];
|
char name[20];
|
||||||
byte param;
|
byte atribPos;
|
||||||
byte hookId;
|
byte hookId;
|
||||||
int16 fadeOut60TicksDelay;
|
int16 fadeOut60TicksDelay;
|
||||||
char filename[13];
|
char filename[13];
|
||||||
|
@ -28,7 +28,6 @@ namespace Scumm {
|
|||||||
#define DIG_STATE_OFFSET 11
|
#define DIG_STATE_OFFSET 11
|
||||||
#define DIG_SEQ_OFFSET (DIG_STATE_OFFSET + 65)
|
#define DIG_SEQ_OFFSET (DIG_STATE_OFFSET + 65)
|
||||||
#define COMI_STATE_OFFSET 3
|
#define COMI_STATE_OFFSET 3
|
||||||
#define COMI_SEQ_OFFSET (COMI_STATE_OFFSET + 94)
|
|
||||||
|
|
||||||
void IMuseDigital::setDigMusicState(int stateId) {
|
void IMuseDigital::setDigMusicState(int stateId) {
|
||||||
int l, num = -1;
|
int l, num = -1;
|
||||||
@ -49,19 +48,19 @@ void IMuseDigital::setDigMusicState(int stateId) {
|
|||||||
}
|
}
|
||||||
num = l;
|
num = l;
|
||||||
|
|
||||||
int val2 = _attributes[_digStateMusicMap[num].unk1];
|
int offset = _attributes[_digStateMusicMap[num].offset];
|
||||||
if (val2 == 0) {
|
if (offset == 0) {
|
||||||
if (_attributes[_digStateMusicMap[num].unk3] != 0) {
|
if (_attributes[_digStateMusicMap[num].atribPos] != 0) {
|
||||||
num = _digStateMusicMap[num].unk4;
|
num = _digStateMusicMap[num].stateIndex3;
|
||||||
} else {
|
} else {
|
||||||
num = _digStateMusicMap[num].musicTableIndex;
|
num = _digStateMusicMap[num].stateIndex1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int val = _digStateMusicMap[num].unk2;
|
int stateIndex2 = _digStateMusicMap[num].stateIndex2;
|
||||||
if (val == 0) {
|
if (stateIndex2 == 0) {
|
||||||
num = _digStateMusicMap[num].musicTableIndex + val2;
|
num = _digStateMusicMap[num].stateIndex1 + offset;
|
||||||
} else {
|
} else {
|
||||||
num = val;
|
num = stateIndex2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,8 +153,8 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((atribPos != 0) && (hookId == 0)) {
|
if ((atribPos != 0) && (hookId == 0)) {
|
||||||
if (table->param != 0)
|
if (table->atribPos != 0)
|
||||||
atribPos = table->param;
|
atribPos = table->atribPos;
|
||||||
hookId = _attributes[DIG_STATE_OFFSET + atribPos];
|
hookId = _attributes[DIG_STATE_OFFSET + atribPos];
|
||||||
if (table->hookId != 0) {
|
if (table->hookId != 0) {
|
||||||
if ((hookId != 0) && (table->hookId <= 1)) {
|
if ((hookId != 0) && (table->hookId <= 1)) {
|
||||||
@ -181,8 +180,8 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
|
|||||||
if (table->filename[0] == 0) {
|
if (table->filename[0] == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((!sequence) && (table->param != 0) &&
|
if ((!sequence) && (table->atribPos != 0) &&
|
||||||
(table->param == _digStateMusicTable[_curMusicState].param)) {
|
(table->atribPos == _digStateMusicTable[_curMusicState].atribPos)) {
|
||||||
startMusic(table->filename, table->soundId, 0, 127);
|
startMusic(table->filename, table->soundId, 0, 127);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -241,7 +240,6 @@ void IMuseDigital::setComiMusicSequence(int seqId) {
|
|||||||
if (_curMusicSeq == 0) {
|
if (_curMusicSeq == 0) {
|
||||||
playComiMusic(_comiSeqMusicTable[num].name, &_comiSeqMusicTable[num], 0, true);
|
playComiMusic(_comiSeqMusicTable[num].name, &_comiSeqMusicTable[num], 0, true);
|
||||||
_nextSeqToPlay = 0;
|
_nextSeqToPlay = 0;
|
||||||
_attributes[COMI_SEQ_OFFSET + num] = 1;
|
|
||||||
} else {
|
} else {
|
||||||
if ((_comiSeqMusicTable[_curMusicSeq].opcode == 4) || (_comiSeqMusicTable[_curMusicSeq].opcode == 6)) {
|
if ((_comiSeqMusicTable[_curMusicSeq].opcode == 4) || (_comiSeqMusicTable[_curMusicSeq].opcode == 6)) {
|
||||||
_nextSeqToPlay = num;
|
_nextSeqToPlay = num;
|
||||||
@ -249,13 +247,11 @@ void IMuseDigital::setComiMusicSequence(int seqId) {
|
|||||||
} else {
|
} else {
|
||||||
playComiMusic(_comiSeqMusicTable[num].name, &_comiSeqMusicTable[num], 0, true);
|
playComiMusic(_comiSeqMusicTable[num].name, &_comiSeqMusicTable[num], 0, true);
|
||||||
_nextSeqToPlay = 0;
|
_nextSeqToPlay = 0;
|
||||||
_attributes[COMI_SEQ_OFFSET + num] = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_nextSeqToPlay != 0) {
|
if (_nextSeqToPlay != 0) {
|
||||||
playComiMusic(_comiSeqMusicTable[_nextSeqToPlay].name, &_comiSeqMusicTable[_nextSeqToPlay], 0, true);
|
playComiMusic(_comiSeqMusicTable[_nextSeqToPlay].name, &_comiSeqMusicTable[_nextSeqToPlay], 0, true);
|
||||||
_attributes[COMI_SEQ_OFFSET + _nextSeqToPlay] = 1;
|
|
||||||
num = _nextSeqToPlay;
|
num = _nextSeqToPlay;
|
||||||
_nextSeqToPlay = 0;
|
_nextSeqToPlay = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -274,8 +270,8 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
|
|||||||
int hookId = 0;
|
int hookId = 0;
|
||||||
|
|
||||||
if ((songName != NULL) && (atribPos != 0)) {
|
if ((songName != NULL) && (atribPos != 0)) {
|
||||||
if (table->param != 0)
|
if (table->atribPos != 0)
|
||||||
atribPos = table->param;
|
atribPos = table->atribPos;
|
||||||
hookId = _attributes[COMI_STATE_OFFSET + atribPos];
|
hookId = _attributes[COMI_STATE_OFFSET + atribPos];
|
||||||
if (table->hookId != 0) {
|
if (table->hookId != 0) {
|
||||||
if ((hookId != 0) && (table->hookId <= 1)) {
|
if ((hookId != 0) && (table->hookId <= 1)) {
|
||||||
@ -319,8 +315,8 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fadeOutMusic(table->fadeOut60TicksDelay);
|
fadeOutMusic(table->fadeOut60TicksDelay);
|
||||||
if ((!sequence) && (table->param != 0) &&
|
if ((!sequence) && (table->atribPos != 0) &&
|
||||||
(table->param == _comiStateMusicTable[_curMusicState].param)) {
|
(table->atribPos == _comiStateMusicTable[_curMusicState].atribPos)) {
|
||||||
startMusic(table->filename, table->soundId, 0, 127);
|
startMusic(table->filename, table->soundId, 0, 127);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user