aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorEugene Sandulenko2004-04-28 23:19:45 +0000
committerEugene Sandulenko2004-04-28 23:19:45 +0000
commit4f25dbb45b5d7261231948702cb2a0664dbc729a (patch)
treea97c0d9b03d7a79c599e69ddb7b8d9c1bdfd8646 /saga
parent1ad6498bd5a650a39e343e87b33e02afb21abbef (diff)
downloadscummvm-rg350-4f25dbb45b5d7261231948702cb2a0664dbc729a.tar.gz
scummvm-rg350-4f25dbb45b5d7261231948702cb2a0664dbc729a.tar.bz2
scummvm-rg350-4f25dbb45b5d7261231948702cb2a0664dbc729a.zip
Rename Snd object to SndRes
svn-id: r13665
Diffstat (limited to 'saga')
-rw-r--r--saga/actor.cpp4
-rw-r--r--saga/events.cpp2
-rw-r--r--saga/ite_introproc.cpp8
-rw-r--r--saga/saga.cpp2
-rw-r--r--saga/saga.h4
-rw-r--r--saga/sndres.cpp12
-rw-r--r--saga/sndres.h4
7 files changed, 18 insertions, 18 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp
index 2f92031c09..7f270dc541 100644
--- a/saga/actor.cpp
+++ b/saga/actor.cpp
@@ -679,7 +679,7 @@ HandleSpeakIntent(R_ACTOR * actor,
if (!a_dialogue->d_playing) {
/* Dialogue voice hasn't played yet - play it now */
- _vm->_snd->playVoice(a_dialogue->d_voice_rn);
+ _vm->_sndRes->playVoice(a_dialogue->d_voice_rn);
a_dialogue->d_playing = 1;
}
@@ -733,7 +733,7 @@ int ACTOR_GetSpeechTime(const char *d_string, uint d_voice_rn)
{
int voice_len;
- voice_len = _vm->_snd->getVoiceLength(d_voice_rn);
+ voice_len = _vm->_sndRes->getVoiceLength(d_voice_rn);
if (voice_len < 0) {
voice_len = strlen(d_string) * ACTOR_DIALOGUE_LETTERTIME;
diff --git a/saga/events.cpp b/saga/events.cpp
index 13d0da0b96..3a7a009177 100644
--- a/saga/events.cpp
+++ b/saga/events.cpp
@@ -310,7 +310,7 @@ static int HandleOneShot(R_EVENT * event)
case R_VOICE_EVENT:
- _vm->_snd->playVoice(event->param);
+ _vm->_sndRes->playVoice(event->param);
break;
case R_MUSIC_EVENT:
diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp
index 329a07f5f8..37ab1bc862 100644
--- a/saga/ite_introproc.cpp
+++ b/saga/ite_introproc.cpp
@@ -350,7 +350,7 @@ int ITE_IntroCave1Proc(int param, R_SCENE_INFO * scene_info)
q_event = EVENT_Chain(q_event, &event);
voice_len =
- _vm->_snd->getVoiceLength(IntroDiag[i].i_voice_rn);
+ _vm->_sndRes->getVoiceLength(IntroDiag[i].i_voice_rn);
if (voice_len < 0) {
voice_len = strlen(IntroDiag[i].i_str) *
VOICE_LETTERLEN;
@@ -470,7 +470,7 @@ int ITE_IntroCave2Proc(int param, R_SCENE_INFO * scene_info)
q_event = EVENT_Chain(q_event, &event);
voice_len =
- _vm->_snd->getVoiceLength(IntroDiag[i].i_voice_rn);
+ _vm->_sndRes->getVoiceLength(IntroDiag[i].i_voice_rn);
if (voice_len < 0) {
voice_len = strlen(IntroDiag[i].i_str) *
VOICE_LETTERLEN;
@@ -588,7 +588,7 @@ int ITE_IntroCave3Proc(int param, R_SCENE_INFO * scene_info)
q_event = EVENT_Chain(q_event, &event);
voice_len =
- _vm->_snd->getVoiceLength(IntroDiag[i].i_voice_rn);
+ _vm->_sndRes->getVoiceLength(IntroDiag[i].i_voice_rn);
if (voice_len < 0) {
voice_len = strlen(IntroDiag[i].i_str) *
VOICE_LETTERLEN;
@@ -705,7 +705,7 @@ int ITE_IntroCave4Proc(int param, R_SCENE_INFO * scene_info)
q_event = EVENT_Chain(q_event, &event);
voice_len =
- _vm->_snd->getVoiceLength(IntroDiag[i].i_voice_rn);
+ _vm->_sndRes->getVoiceLength(IntroDiag[i].i_voice_rn);
if (voice_len < 0) {
voice_len = strlen(IntroDiag[i].i_str) *
VOICE_LETTERLEN;
diff --git a/saga/saga.cpp b/saga/saga.cpp
index 0d17d69143..bc81793966 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -211,7 +211,7 @@ void SagaEngine::go() {
/* Initialize engine modules
* \*------------------------------------------------------------- */
- _snd = new Snd();
+ _sndRes = new SndRes();
EVENT_Init();
FONT_Init();
SPRITE_Init();
diff --git a/saga/saga.h b/saga/saga.h
index 582d67f3ab..8395059cd3 100644
--- a/saga/saga.h
+++ b/saga/saga.h
@@ -34,7 +34,7 @@
namespace Saga {
-class Snd;
+class SndRes;
#define R_PBOUNDS(n,max) (((n)>=(0))&&((n)<(max)))
@@ -54,7 +54,7 @@ class SagaEngine:public Engine {
public:
SagaEngine(GameDetector * detector, OSystem * syst);
virtual ~SagaEngine();
- Snd *_snd;
+ SndRes *_sndRes;
};
// FIXME: Global var. We use it until everything will be turned into objects
diff --git a/saga/sndres.cpp b/saga/sndres.cpp
index 3b8a35e24a..9d04069516 100644
--- a/saga/sndres.cpp
+++ b/saga/sndres.cpp
@@ -47,7 +47,7 @@
namespace Saga {
-Snd::Snd(void) {
+SndRes::SndRes(void) {
int result;
/* Load sound module resource file contexts */
@@ -68,7 +68,7 @@ Snd::Snd(void) {
_init = 1;
}
-int Snd::playVoice(ulong voice_rn) {
+int SndRes::playVoice(ulong voice_rn) {
R_SOUNDBUFFER snd_buffer;
int result;
@@ -82,7 +82,7 @@ int Snd::playVoice(ulong voice_rn) {
return R_SUCCESS;
}
-int Snd::load(R_RSCFILE_CONTEXT *snd_ctxt, ulong snd_rn, R_SOUNDBUFFER *snd_buf_i) {
+int SndRes::load(R_RSCFILE_CONTEXT *snd_ctxt, ulong snd_rn, R_SOUNDBUFFER *snd_buf_i) {
uchar *snd_res;
size_t snd_res_len;
@@ -132,7 +132,7 @@ int Snd::load(R_RSCFILE_CONTEXT *snd_ctxt, ulong snd_rn, R_SOUNDBUFFER *snd_buf_
return R_SUCCESS;
}
-int Snd::loadVocSound(const uchar *snd_res, size_t snd_res_len, R_SOUNDBUFFER *snd_buf_i) {
+int SndRes::loadVocSound(const uchar *snd_res, size_t snd_res_len, R_SOUNDBUFFER *snd_buf_i) {
R_VOC_HEADER_BLOCK voc_hb;
R_VOC_GENBLOCK voc_gb;
R_VOC_BLOCK1 voc_b1;
@@ -225,7 +225,7 @@ int Snd::loadVocSound(const uchar *snd_res, size_t snd_res_len, R_SOUNDBUFFER *s
return R_SUCCESS;
}
-int Snd::getVoiceLength(ulong voice_rn) {
+int SndRes::getVoiceLength(ulong voice_rn) {
ulong length;
double ms_f;
@@ -257,7 +257,7 @@ int Snd::getVoiceLength(ulong voice_rn) {
return ms_i;
}
-int Snd::ITEVOC_Resample(long src_freq, long dst_freq, uchar *src_buf,
+int SndRes::ITEVOC_Resample(long src_freq, long dst_freq, uchar *src_buf,
size_t src_buf_len, uchar **dst_buf, size_t *dst_buf_len) {
uchar *resamp_buf;
size_t resamp_len;
diff --git a/saga/sndres.h b/saga/sndres.h
index 8f4a5935c4..f241af4151 100644
--- a/saga/sndres.h
+++ b/saga/sndres.h
@@ -62,10 +62,10 @@ struct R_VOC_BLOCK1 {
int pack_method; /* BYTE */
};
-class Snd {
+class SndRes {
public:
- Snd(void);
+ SndRes(void);
int loadSound(ulong sound_rn);
int playVoice(ulong voice_rn);