diff --git a/engine/actor.cpp b/engine/actor.cpp index 48a62591559..1a0c47a9141 100644 --- a/engine/actor.cpp +++ b/engine/actor.cpp @@ -30,7 +30,7 @@ #include "engine/actor.h" #include "engine/engine.h" #include "engine/costume.h" -#include "engine/lipsynch.h" +#include "engine/lipsync.h" #include "engine/localize.h" #include "engine/smush/smush.h" #include "engine/walkplane.h" @@ -50,7 +50,7 @@ Actor::Actor(const char *name) : // _walkRate so Glottis at the demon beaver entrance can walk _pitch(0), _yaw(0), _roll(0), _walkRate(1.0f), _turnRate(100.0f), _reflectionAngle(80), - _visible(true), _lipSynch(NULL), _turning(false), _walking(false), + _visible(true), _lipSync(NULL), _turning(false), _walking(false), _restCostume(NULL), _restChore(-1), _walkCostume(NULL), _walkChore(-1), _walkedLast(false), _walkedCur(false), _turnCostume(NULL), _leftTurnChore(-1), _rightTurnChore(-1), @@ -345,17 +345,17 @@ void Actor::sayLine(const char *msg, const char *msgId) { g_engine->currScene()->setSoundPosition(_talkSoundName.c_str(), pos()); } - // If the actor is clearly not visible then don't try to play the lip synch + // If the actor is clearly not visible then don't try to play the lip sync if (visible()) { // Sometimes actors speak offscreen before they, including their // talk chores are initialized. // For example, when reading the work order (a LIP file exists for no reason). - // Also, some lip synch files have no entries + // Also, some lip sync files have no entries // In these cases, revert to using the mumble chore. - _lipSynch = g_resourceloader->loadLipSynch(soundLip.c_str()); - // If there's no lip synch file then load the mumble chore if it exists + _lipSync = g_resourceloader->loadLipSync(soundLip.c_str()); + // If there's no lip sync file then load the mumble chore if it exists // (the mumble chore doesn't exist with the cat races announcer) - if (!_lipSynch && _mumbleChore != -1) + if (!_lipSync && _mumbleChore != -1) _mumbleCostume->playChoreLooping(_mumbleChore); _talkAnim = -1; @@ -404,10 +404,10 @@ void Actor::shutUp() { g_imuse->stopSound(_talkSoundName.c_str()); _talkSoundName = ""; } - if (_lipSynch) { + if (_lipSync) { if (_talkAnim != -1 && _talkChore[_talkAnim] >= 0) _talkCostume[_talkAnim]->stopChore(_talkChore[_talkAnim]); - _lipSynch = NULL; + _lipSync = NULL; } else if (_mumbleChore >= 0) { _mumbleCostume->stopChore(_mumbleChore); } @@ -573,8 +573,8 @@ void Actor::update() { _lastTurnDir = _currTurnDir; _currTurnDir = 0; - // Update lip synching - if (_lipSynch) { + // Update lip syncing + if (_lipSync) { int posSound; // While getPosIn60HzTicks will return "-1" to indicate that the @@ -584,7 +584,7 @@ void Actor::update() { else posSound = -1; if (posSound != -1) { - int anim = _lipSynch->getAnim(posSound); + int anim = _lipSync->getAnim(posSound); if (_talkAnim != anim) { if (_talkAnim != -1 && _talkChore[_talkAnim] >= 0) _talkCostume[_talkAnim]->stopChore(_talkChore[_talkAnim]); diff --git a/engine/actor.h b/engine/actor.h index 04631f1de80..a3d9b3f263c 100644 --- a/engine/actor.h +++ b/engine/actor.h @@ -35,7 +35,7 @@ #include class Costume; -class LipSynch; +class LipSync; class TextObject; class Sector; @@ -176,7 +176,7 @@ private: bool _visible; bool _lookingMode; std::string _talkSoundName; - ResPtr _lipSynch; + ResPtr _lipSync; std::list _costumeStack; // Variables for gradual turning diff --git a/engine/engine.cpp b/engine/engine.cpp index d7cc69f8f8d..86b0e1d9b50 100644 --- a/engine/engine.cpp +++ b/engine/engine.cpp @@ -36,7 +36,7 @@ #include "engine/smush/smush.h" #include "engine/backend/platform/driver.h" #include "engine/savegame.h" -#include "engine/lipsynch.h" +#include "engine/lipsync.h" #include "engine/registry.h" #include "engine/imuse/imuse.h" @@ -377,7 +377,7 @@ void Engine::handleDebugLoadResource() { else if (strstr(buf, ".cos")) resource = (void *)g_resourceloader->loadCostume(buf, NULL); else if (strstr(buf, ".lip")) - resource = (void *)g_resourceloader->loadLipSynch(buf); + resource = (void *)g_resourceloader->loadLipSync(buf); else if (strstr(buf, ".snm")) resource = (void *)g_smush->play(buf, 0, 0); else if (strstr(buf, ".wav") || strstr(buf, ".imu")) { diff --git a/engine/lipsync.cpp b/engine/lipsync.cpp index 14747cc2548..9bb5ba6cbb0 100644 --- a/engine/lipsync.cpp +++ b/engine/lipsync.cpp @@ -27,14 +27,14 @@ #include "common/endian.h" #include "common/debug.h" -#include "engine/lipsynch.h" +#include "engine/lipsync.h" #include // A new define that'll be around when theres a configure script :) #undef DEBUG_VERBOSE -LipSynch::LipSynch(const char *filename, const char *data, int len) : +LipSync::LipSync(const char *filename, const char *data, int len) : Resource(filename) { uint16 readPhoneme; int j; @@ -51,7 +51,7 @@ LipSynch::LipSynch(const char *filename, const char *data, int len) : else { data += 8; #ifdef DEBUG_VERBOSE - printf("Reading LipSynch %s, %d entries\n", filename, _numEntries); + printf("Reading LipSync %s, %d entries\n", filename, _numEntries); #endif _entries = new LipEntry[_numEntries]; for (int i = 0; i < _numEntries; i++) { @@ -75,11 +75,11 @@ LipSynch::LipSynch(const char *filename, const char *data, int len) : } } -LipSynch::~LipSynch() { +LipSync::~LipSync() { delete[] _entries; } -int LipSynch::getAnim(int pos) { +int LipSync::getAnim(int pos) { int frame1, frame2; // tune a bit to prevent internal imuse drift @@ -101,7 +101,7 @@ int LipSynch::getAnim(int pos) { return -1; } -const LipSynch::PhonemeAnim LipSynch::_animTable[] = { +const LipSync::PhonemeAnim LipSync::_animTable[] = { {0x005F, 0}, {0x0251, 1}, {0x0061, 1}, {0x00E6, 1}, {0x028C, 8}, {0x0254, 1}, {0x0259, 1}, {0x0062, 6}, {0x02A7, 2}, {0x0064, 2}, {0x00F0, 5}, {0x025B, 8}, {0x0268, 8}, {0x025A, 9}, {0x025D, 9}, @@ -114,4 +114,4 @@ const LipSynch::PhonemeAnim LipSynch::_animTable[] = { {0x0292, 2}, {0x002E, 2} }; -const int LipSynch::_animTableSize = sizeof(LipSynch::_animTable) / sizeof(LipSynch::_animTable[0]); +const int LipSync::_animTableSize = sizeof(LipSync::_animTable) / sizeof(LipSync::_animTable[0]); diff --git a/engine/lipsync.h b/engine/lipsync.h index 4a9ddc65083..935413fa774 100644 --- a/engine/lipsync.h +++ b/engine/lipsync.h @@ -23,8 +23,8 @@ * */ -#ifndef LIPSYNCH_H -#define LIPSYNCH_H +#ifndef LIPSYNC_H +#define LIPSYNC_H #include "common/sys.h" @@ -32,10 +32,10 @@ #include -class LipSynch : public Resource { +class LipSync : public Resource { public: - LipSynch(const char *filename, const char *data, int len); - ~LipSynch(); + LipSync(const char *filename, const char *data, int len); + ~LipSync(); struct LipEntry { uint16 frame; diff --git a/engine/lua.cpp b/engine/lua.cpp index bada6e9035c..208a72c9e61 100644 --- a/engine/lua.cpp +++ b/engine/lua.cpp @@ -49,7 +49,7 @@ #include "engine/font.h" #include "engine/primitives.h" #include "engine/savegame.h" -#include "engine/lipsynch.h" +#include "engine/lipsync.h" #include "engine/imuse/imuse.h" diff --git a/engine/resource.cpp b/engine/resource.cpp index 076be926435..dda53aa7f2d 100644 --- a/engine/resource.cpp +++ b/engine/resource.cpp @@ -37,7 +37,7 @@ #include "engine/material.h" #include "engine/model.h" #include "engine/engine.h" -#include "engine/lipsynch.h" +#include "engine/lipsync.h" #include @@ -225,25 +225,25 @@ KeyframeAnim *ResourceLoader::loadKeyframe(const char *filename) { return result; } -LipSynch *ResourceLoader::loadLipSynch(const char *filename) { +LipSync *ResourceLoader::loadLipSync(const char *filename) { std::string fname = filename; - LipSynch *result; + LipSync *result; makeLower(fname); CacheType::iterator i = _cache.find(fname); if (i != _cache.end()) { - return dynamic_cast(i->second); + return dynamic_cast(i->second); } Block *b = getFileBlock(filename); if (!b) { if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) - warning("Could not find lipsynch file %s", filename); + warning("Could not find lipsync file %s", filename); result = NULL; } else { - result = new LipSynch(filename, b->data(), b->len()); + result = new LipSync(filename, b->data(), b->len()); - // Some lipsynch files have no data + // Some lipsync files have no data if (result->isValid()) { delete b; _cache[fname] = result; diff --git a/engine/resource.h b/engine/resource.h index 430b1257b0e..88c62af6100 100644 --- a/engine/resource.h +++ b/engine/resource.h @@ -41,7 +41,7 @@ class Font; class KeyframeAnim; class Material; class Model; -class LipSynch; +class LipSync; class Resource { public: @@ -110,7 +110,7 @@ public: KeyframeAnim *loadKeyframe(const char *fname); Material *loadMaterial(const char *fname, const CMap &c); Model *loadModel(const char *fname, const CMap &c); - LipSynch *loadLipSynch(const char *fname); + LipSync *loadLipSync(const char *fname); void uncache(const char *fname); ResourceLoader();