Fixed up several sound system script methods
svn-id: r28712
This commit is contained in:
parent
37cdd1c69a
commit
234c2a5770
2 changed files with 19 additions and 17 deletions
|
@ -75,8 +75,8 @@ void Script::setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Script::addSound2(uint16 soundId, uint16 v2, uint16 v3) {
|
void Script::addSound2(uint16 soundIndex, uint16 v2, uint16 v3) {
|
||||||
// TODO: Not yet implemented
|
Sound.addSound2(soundIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the bitmask indicating what group of rooms/hotspots to display when the
|
// Sets the bitmask indicating what group of rooms/hotspots to display when the
|
||||||
|
@ -132,8 +132,7 @@ void Script::deactivateHotspot(uint16 hotspotId, uint16 v2, uint16 v3) {
|
||||||
hs->layer = 0xff;
|
hs->layer = 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the offset for the table of action sequence offsets for the given
|
// Sets the offset for the table of action sequence offsets for the given hotspot
|
||||||
// hotspot
|
|
||||||
|
|
||||||
void Script::setDesc(uint16 hotspotId, uint16 descId, uint16 v3) {
|
void Script::setDesc(uint16 hotspotId, uint16 descId, uint16 v3) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
|
@ -151,8 +150,8 @@ void Script::addDelayedSequence(uint16 seqOffset, uint16 delay, uint16 canClear)
|
||||||
|
|
||||||
// Stops the specified sound
|
// Stops the specified sound
|
||||||
|
|
||||||
void Script::killSound(uint16 soundId, uint16 v2, uint16 v3) {
|
void Script::killSound(uint16 soundNumber, uint16 v2, uint16 v3) {
|
||||||
// TODO
|
Sound.musicInterface_Stop(soundNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks whether the given character is in the specified room, and stores
|
// Checks whether the given character is in the specified room, and stores
|
||||||
|
@ -179,8 +178,8 @@ void Script::setHotspotName(uint16 hotspotId, uint16 nameId, uint16 v3) {
|
||||||
|
|
||||||
// Unsure about this method, but at the moment I think it plays a sound
|
// Unsure about this method, but at the moment I think it plays a sound
|
||||||
|
|
||||||
void Script::addSound(uint16 v1, uint16 v2, uint16 v3) {
|
void Script::addSound(uint16 soundIndex, uint16 v2, uint16 v3) {
|
||||||
// TODO: No implementation currently
|
Sound.addSound(soundIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Script::endgameSequence(uint16 v1, uint16 v2, uint16 v3) {
|
void Script::endgameSequence(uint16 v1, uint16 v2, uint16 v3) {
|
||||||
|
@ -251,10 +250,10 @@ void Script::startSpeakingToNoone(uint16 characterId, uint16 stringId, uint16 v3
|
||||||
charHotspot->converse(NOONE_ID, stringId, false);
|
charHotspot->converse(NOONE_ID, stringId, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stops playing the specified sound index
|
||||||
|
|
||||||
void Script::playMusic(uint16 musicNum, uint16 v2, uint16 v3) {
|
void Script::stopSound(uint16 soundIndex, uint16 v2, uint16 v3) {
|
||||||
// TODO: Play a given music
|
Sound.stopSound(soundIndex);
|
||||||
warning("TODO: Play music #%d", musicNum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the current blocked state for the given door and stores it in the
|
// Gets the current blocked state for the given door and stores it in the
|
||||||
|
@ -724,9 +723,12 @@ void Script::checkCellDoor(uint16 v1, uint16 v2, uint16 v3) {
|
||||||
// Checks if a sound is running
|
// Checks if a sound is running
|
||||||
|
|
||||||
void Script::checkSound(uint16 hotspotId, uint16 v2, uint16 v3) {
|
void Script::checkSound(uint16 hotspotId, uint16 v2, uint16 v3) {
|
||||||
|
Sound.tidySounds();
|
||||||
|
|
||||||
// For now, simply set the general value field so that the Skorl schedule
|
// For now, simply set the general value field so that the Skorl schedule
|
||||||
// will work properly
|
// will work properly
|
||||||
Resources::getReference().fieldList().setField(GENERAL, 0);
|
Resources::getReference().fieldList().setField(GENERAL, 0);
|
||||||
|
|
||||||
// TODO: Check whether active sound can be found or not
|
// TODO: Check whether active sound can be found or not
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -759,7 +761,7 @@ SequenceMethodRecord scriptMethods[] = {
|
||||||
{18, Script::remoteRoomViewSetup},
|
{18, Script::remoteRoomViewSetup},
|
||||||
{19, Script::startSpeakingToNoone},
|
{19, Script::startSpeakingToNoone},
|
||||||
{20, Script::checkCellDoor},
|
{20, Script::checkCellDoor},
|
||||||
{21, Script::playMusic},
|
{21, Script::stopSound},
|
||||||
{22, Script::getDoorBlocked},
|
{22, Script::getDoorBlocked},
|
||||||
{23, Script::isSkorlInCell},
|
{23, Script::isSkorlInCell},
|
||||||
{24, Script::ratpouchPushBricks},
|
{24, Script::ratpouchPushBricks},
|
||||||
|
@ -1231,7 +1233,7 @@ bool HotspotScript::execute(Hotspot *h)
|
||||||
param2 = nextVal(scriptData, offset);
|
param2 = nextVal(scriptData, offset);
|
||||||
|
|
||||||
if ((param2 == 0) || (room.roomNumber() == param2)) {
|
if ((param2 == 0) || (room.roomNumber() == param2)) {
|
||||||
debugC(ERROR_DETAILED, kLureDebugScripts, "PLAY_SOUND(%d,%d)", param1, param2);
|
debugC(ERROR_DETAILED, kLureDebugScripts, "PLAY_SOUND(%d,%d)", param2, param1);
|
||||||
Sound.addSound2((uint8)param1);
|
Sound.addSound2((uint8)param1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -79,25 +79,25 @@ public:
|
||||||
|
|
||||||
static void activateHotspot(uint16 hotspotId, uint16 v2, uint16 v3);
|
static void activateHotspot(uint16 hotspotId, uint16 v2, uint16 v3);
|
||||||
static void setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3);
|
static void setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3);
|
||||||
static void addSound2(uint16 v1, uint16 v2, uint16 v3);
|
static void addSound2(uint16 soundIndex, uint16 v2, uint16 v3);
|
||||||
static void setHotspotFlagMask(uint16 maskVal, uint16 v2, uint16 v3);
|
static void setHotspotFlagMask(uint16 maskVal, uint16 v2, uint16 v3);
|
||||||
static void clearSequenceDelayList(uint16 v1, uint16 scriptIndex, uint16 v3);
|
static void clearSequenceDelayList(uint16 v1, uint16 scriptIndex, uint16 v3);
|
||||||
static void deactivateHotspotSet(uint16 listIndex, uint16 v2, uint16 v3);
|
static void deactivateHotspotSet(uint16 listIndex, uint16 v2, uint16 v3);
|
||||||
static void deactivateHotspot(uint16 hotspotId, uint16 v2, uint16 v3);
|
static void deactivateHotspot(uint16 hotspotId, uint16 v2, uint16 v3);
|
||||||
static void resetPathfinder(uint16 v1, uint16 v2, uint16 v3);
|
static void resetPathfinder(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void addDelayedSequence(uint16 seqOffset, uint16 delay, uint16 canClear);
|
static void addDelayedSequence(uint16 seqOffset, uint16 delay, uint16 canClear);
|
||||||
static void killSound(uint16 soundId, uint16 v2, uint16 v3);
|
static void killSound(uint16 soundNumber, uint16 v2, uint16 v3);
|
||||||
static void characterInRoom(uint16 characterId, uint16 roomNumber, uint16 v3);
|
static void characterInRoom(uint16 characterId, uint16 roomNumber, uint16 v3);
|
||||||
static void setDesc(uint16 hotspotId, uint16 descId, uint16 v3);
|
static void setDesc(uint16 hotspotId, uint16 descId, uint16 v3);
|
||||||
static void setHotspotName(uint16 hotspotId, uint16 nameId, uint16 v3);
|
static void setHotspotName(uint16 hotspotId, uint16 nameId, uint16 v3);
|
||||||
static void addSound(uint16 soundId, uint16 v2, uint16 v3);
|
static void addSound(uint16 soundIndex, uint16 v2, uint16 v3);
|
||||||
static void endgameSequence(uint16 v1, uint16 v2, uint16 v3);
|
static void endgameSequence(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void setupPigFight(uint16 v1, uint16 v2, uint16 v3);
|
static void setupPigFight(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void displayDialog(uint16 stringId, uint16 v2, uint16 v3);
|
static void displayDialog(uint16 stringId, uint16 v2, uint16 v3);
|
||||||
static void setupSkorlFight(uint16 v1, uint16 v2, uint16 v3);
|
static void setupSkorlFight(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void remoteRoomViewSetup(uint16 v1, uint16 v2, uint16 v3);
|
static void remoteRoomViewSetup(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void startSpeakingToNoone(uint16 characterId, uint16 stringId, uint16 v3);
|
static void startSpeakingToNoone(uint16 characterId, uint16 stringId, uint16 v3);
|
||||||
static void playMusic(uint16 musicNum, uint16 v2, uint16 v3);
|
static void stopSound(uint16 soundIndex, uint16 v2, uint16 v3);
|
||||||
static void getDoorBlocked(uint16 hotspotId, uint16 v2, uint16 v3);
|
static void getDoorBlocked(uint16 hotspotId, uint16 v2, uint16 v3);
|
||||||
static void isSkorlInCell(uint16 v1, uint16 v2, uint16 v3);
|
static void isSkorlInCell(uint16 v1, uint16 v2, uint16 v3);
|
||||||
static void ratpouchPushBricks(uint16 v1, uint16 v2, uint16 v3);
|
static void ratpouchPushBricks(uint16 v1, uint16 v2, uint16 v3);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue