mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
Implement '.' sentence skipping, and other shutUpActor use
This commit is contained in:
parent
5b1490c130
commit
cb02f26732
@ -91,6 +91,13 @@ bool Actor::talking() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Actor::shutUp() {
|
||||
if (talkSound_) {
|
||||
Mixer::instance()->stopVoice(talkSound_);
|
||||
talkSound_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void Actor::pushCostume(const char *name) {
|
||||
Costume *newCost = ResourceLoader::instance()->
|
||||
loadCostume(name, currentCostume());
|
||||
|
1
actor.h
1
actor.h
@ -60,6 +60,7 @@ public:
|
||||
void turn(int dir);
|
||||
|
||||
void sayLine(const char *msg);
|
||||
void shutUp();
|
||||
bool talking();
|
||||
|
||||
void pushCostume(const char *name);
|
||||
|
10
lua.cpp
10
lua.cpp
@ -467,6 +467,12 @@ static void IsMessageGoing() {
|
||||
}
|
||||
}
|
||||
|
||||
static void ShutUpActor() {
|
||||
Actor *act = check_actor(1);
|
||||
if (act)
|
||||
act->shutUp();
|
||||
}
|
||||
|
||||
// Sector functions
|
||||
static void GetActorSector(void) {
|
||||
Actor *act = check_actor(1);
|
||||
@ -854,7 +860,6 @@ static char *stubFuncs[] = {
|
||||
"GetPointSector",
|
||||
"IsPointInSector",
|
||||
"SetActorFrustrumCull",
|
||||
"ShutUpActor",
|
||||
"SetActorFollowBoxes",
|
||||
"SetActorHead",
|
||||
"GetCameraActor",
|
||||
@ -1122,7 +1127,8 @@ struct luaL_reg builtins[] = {
|
||||
{ "InputDialog", InputDialog },
|
||||
{ "ChangeTextObject", ChangeTextObject },
|
||||
{ "GetTextObjectDimensions", GetTextObjectDimensions },
|
||||
{ "MakeTextObject", MakeTextObject }
|
||||
{ "MakeTextObject", MakeTextObject },
|
||||
{ "ShutUpActor", ShutUpActor }
|
||||
};
|
||||
|
||||
void register_lua() {
|
||||
|
12
mixer.cpp
12
mixer.cpp
@ -312,6 +312,18 @@ void Mixer::stopSfx(Sound *s) {
|
||||
}
|
||||
}
|
||||
|
||||
void Mixer::stopVoice(Sound *s) {
|
||||
AudioLock l;
|
||||
|
||||
for (sound_list::iterator i = voiceSounds_.begin();
|
||||
i != voiceSounds_.end(); ) {
|
||||
if (*i == s)
|
||||
i = voiceSounds_.erase(i);
|
||||
else
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
static int compareStates(const void *p1, const void *p2) {
|
||||
const imuseTableEntry *e1 = static_cast<const imuseTableEntry *>(p1);
|
||||
const imuseTableEntry *e2 = static_cast<const imuseTableEntry *>(p2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user