[Scummvm-cvs-logs] CVS: residual Makefile.common,1.8,1.9 actor.cpp,1.31,1.32 actor.h,1.15,1.16 costume.cpp,1.18,1.19 lua.cpp,1.81,1.82 main.cpp,1.36,1.37 resource.cpp,1.15,1.16 resource.h,1.10,1.11 smush.cpp,1.46,1.47 sound.cpp,1.14,NONE sound.h,1.10,NONE
Pawel Kolodziejski
aquadran at users.sourceforge.net
Tue Dec 28 00:06:01 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: residual/imuse imuse_mcmp_mgr.cpp,NONE,1.1 imuse_mcmp_mgr.h,NONE,1.1 imuse.cpp,1.3,1.4 imuse_sndmgr.cpp,1.1,1.2 imuse_sndmgr.h,1.1,1.2 imuse_track.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.177,1.178
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19363
Modified Files:
Makefile.common actor.cpp actor.h costume.cpp lua.cpp main.cpp
resource.cpp resource.h smush.cpp
Removed Files:
sound.cpp sound.h
Log Message:
- removed/disabled current sound code, will be replaced with imuse
- updated more temporary imuse code
Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/residual/Makefile.common,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.common 25 Dec 2004 18:23:06 -0000 1.8
+++ Makefile.common 28 Dec 2004 08:05:17 -0000 1.9
@@ -49,7 +49,6 @@
scene.o \
screen.o \
smush.o \
- sound.o \
textobject.o \
textsplit.o \
timer.o \
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- actor.cpp 9 Dec 2004 23:55:43 -0000 1.31
+++ actor.cpp 28 Dec 2004 08:05:17 -0000 1.32
@@ -19,7 +19,6 @@
#include "actor.h"
#include "engine.h"
#include "costume.h"
-#include "sound.h"
#include "lipsynch.h"
#include "localize.h"
#include <cmath>
@@ -32,7 +31,7 @@
Actor::Actor(const char *name) :
_name(name), _talkColor(255, 255, 255), _pos(0, 0, 0),
_pitch(0), _yaw(0), _roll(0), _walkRate(0), _turnRate(0),
- _visible(true), _talkSound(NULL), _lipSynch(NULL), _turning(false), _walking(false),
+ _visible(true),/* _talkSound(NULL),*/ _lipSynch(NULL), _turning(false), _walking(false),
_restCostume(NULL), _restChore(-1),
_walkCostume(NULL), _walkChore(-1), _walkedLast(false), _walkedCur(false),
_turnCostume(NULL), _leftTurnChore(-1), _rightTurnChore(-1),
@@ -221,16 +220,16 @@
if (secondSlash == NULL)
return;
- if (_talkSound) // Only one line at a time, please :)
- shutUp();
+// if (_talkSound) // Only one line at a time, please :)
+// shutUp();
std::string msgText = Localizer::instance()->localize(secondSlash + 1);
std::string msgId(msg + 1, secondSlash);
- _talkSound = ResourceLoader::instance()->loadSound((msgId + ".wav").c_str());
+// _talkSound = ResourceLoader::instance()->loadSound((msgId + ".wav").c_str());
_lipSynch = ResourceLoader::instance()->loadLipSynch((msgId + ".lip").c_str());
- if (_talkSound != NULL) {
+/* if (_talkSound != NULL) {
Mixer::instance()->playVoice(_talkSound);
// Sometimes actors speak offscreen before they, including their
@@ -249,15 +248,16 @@
if (_mumbleChore >= 0)
_mumbleCostume->playChoreLooping(_mumbleChore);
}
- }
+ }*/
}
bool Actor::talking() {
- return (_talkSound != NULL && !_talkSound->done());
+// return (_talkSound != NULL && !_talkSound->done());
+ return false;
}
void Actor::shutUp() {
- if (_talkSound) {
+/* if (_talkSound) {
Mixer::instance()->stopVoice(_talkSound);
if (_lipSynch != NULL) {
if (_talkChore[_talkAnim] >= 0)
@@ -266,7 +266,7 @@
} else if (_mumbleChore >= 0)
_mumbleCostume->stopChore(_mumbleChore);
_talkSound = NULL;
- }
+ }*/
}
void Actor::pushCostume(const char *name) {
@@ -396,7 +396,7 @@
_currTurnDir = 0;
// Update lip synching
- if (_lipSynch != NULL && _talkSound != NULL &&
+/* if (_lipSynch != NULL && _talkSound != NULL &&
_talkSound->hasReachedPos(_lipSynch->getCurrEntry().frame * g_mixer->getOutputRate() / 60)) {
//printf("Reached beyond frame %d (=pos %d). Playing anim %d\n",
@@ -416,7 +416,7 @@
if (_talkSound != NULL && _talkSound->done())
shutUp();
-
+*/
for (std::list<Costume *>::iterator i = _costumeStack.begin(); i != _costumeStack.end(); i++) {
(*i)->setPosRotate(_pos, _pitch, _yaw, _roll);
(*i)->update();
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- actor.h 9 Dec 2004 23:55:43 -0000 1.15
+++ actor.h 28 Dec 2004 08:05:17 -0000 1.16
@@ -125,7 +125,7 @@
bool _constrain; // Constrain to walkboxes
bool _visible;
bool _lookingMode;
- ResPtr<Sound> _talkSound;
+// ResPtr<Sound> _talkSound;
ResPtr<LipSynch> _lipSynch;
std::list<Costume *> _costumeStack;
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- costume.cpp 10 Dec 2004 07:26:02 -0000 1.18
+++ costume.cpp 28 Dec 2004 08:05:17 -0000 1.19
@@ -25,7 +25,6 @@
#include "material.h"
#include "model.h"
#include "lua.h"
-#include "sound.h"
#include <string>
#include <cstdio>
#include <map>
@@ -480,7 +479,7 @@
~SoundComponent() { }
private:
- ResPtr<Sound> _sound;
+// ResPtr<Sound> _sound;
};
SoundComponent::SoundComponent(Costume::Component *parent, int parentID, const char *filename) :
@@ -488,14 +487,14 @@
const char *comma = std::strchr(filename, ',');
if (comma != NULL) {
std::string realName(filename, comma);
- _sound = ResourceLoader::instance()->loadSound(realName.c_str());
+// _sound = ResourceLoader::instance()->loadSound(realName.c_str());
} else {
- _sound = ResourceLoader::instance()->loadSound(filename);
+// _sound = ResourceLoader::instance()->loadSound(filename);
}
}
void SoundComponent::setKey(int val) {
- switch (val) {
+/* switch (val) {
case 0:
Mixer::instance()->playSfx(_sound);
break;
@@ -504,11 +503,11 @@
break;
default:
warning("Unknown key %d for sound %s\n", val, _sound->filename());
- }
+ }*/
}
void SoundComponent::reset() {
- Mixer::instance()->stopSfx(_sound);
+// Mixer::instance()->stopSfx(_sound);
}
Costume::Costume(const char *filename, const char *data, int len, Costume *prevCost) :
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- lua.cpp 25 Dec 2004 19:03:48 -0000 1.81
+++ lua.cpp 28 Dec 2004 08:05:17 -0000 1.82
@@ -25,7 +25,6 @@
#include "color.h"
#include "costume.h"
#include "engine.h"
-#include "sound.h"
#include "smush.h"
#include "textobject.h"
#include "objectstate.h"
@@ -78,13 +77,13 @@
luaL_argerror(num, "color expected");
return static_cast<Color *>(lua_getuserdata(lua_getparam(num)));
}
-
+/*
static inline Sound *check_sound(int num) {
if (lua_tag(lua_getparam(num)) != sound_tag)
luaL_argerror(num, "sound expected");
return static_cast<Sound *>(lua_getuserdata(lua_getparam(num)));
}
-
+*/
static inline int check_int(int num) {
double val = luaL_check_number(num);
@@ -691,7 +690,8 @@
static void IsMessageGoing() {
Actor *act;
if (lua_getparam(1) == LUA_NOOBJECT)
- pushbool(Mixer::instance()->voicePlaying());
+// pushbool(Mixer::instance()->voicePlaying());
+ pushbool(false);
else {
act = check_actor(1);
pushbool(act->talking());
@@ -848,34 +848,34 @@
};
void ImStartSound() {
- const char *name = luaL_check_string(1);
+/* const char *name = luaL_check_string(1);
Sound *s = ResourceLoader::instance()->loadSound(name);
if (s != NULL) {
Mixer::instance()->playSfx(s);
s->luaRef();
lua_pushusertag(s, sound_tag);
} else
- lua_pushnil();
+*/ lua_pushnil();
}
void gc_Sound() {
- Sound *s = check_sound(1);
- s->luaGc();
+// Sound *s = check_sound(1);
+// s->luaGc();
}
void ImStopSound() {
- Sound *s;
+/* Sound *s;
if (lua_isstring(lua_getparam(1))) {
s = Mixer::instance()->findSfx(lua_getstring(lua_getparam(1)));
if (s == NULL)
return;
} else
s = check_sound(1);
- Mixer::instance()->stopSfx(s);
+ Mixer::instance()->stopSfx(s);*/
}
void ImGetParam() {
- int param = check_int(2);
+/* int param = check_int(2);
switch (param) {
case IM_SOUND_PLAY_COUNT:
if (lua_isstring(lua_getparam(1))) {
@@ -896,19 +896,19 @@
lua_pushnumber(127);
break;
default:
- warning("Unimplemented ImGetParam with %d\n", param);
+ warning("Unimplemented ImGetParam with %d\n", param);*/
lua_pushnil();
- }
+// }
}
void ImSetState() {
- int state = check_int(1);
- Mixer::instance()->setImuseState(state);
+// int state = check_int(1);
+// Mixer::instance()->setImuseState(state);
}
void ImSetSequence() {
- int seq = check_int(1);
- Mixer::instance()->setImuseSeq(seq);
+// int seq = check_int(1);
+// Mixer::instance()->setImuseSeq(seq);
}
void setFrameTime(float frameTime) {
@@ -1239,8 +1239,8 @@
fprintf(stderr, "<color #%02x%02x%02x>", c->red(), c->green(), c->blue());
}
else if (lua_tag(lua_getparam(i)) == sound_tag) {
- Sound *s = check_sound(i);
- fprintf(stderr, "<sound %s>", s->filename());
+// Sound *s = check_sound(i);
+// fprintf(stderr, "<sound %s>", s->filename());
}
else
fprintf(stderr, "<userdata %p>", lua_getuserdata(lua_getparam(i)));
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/main.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- main.cpp 26 Dec 2004 12:40:37 -0000 1.36
+++ main.cpp 28 Dec 2004 08:05:17 -0000 1.37
@@ -24,7 +24,6 @@
#include "lua.h"
#include "registry.h"
#include "engine.h"
-#include "sound.h"
#include "timer.h"
#include "smush.h"
#include "mixer/mixer.h"
@@ -122,7 +121,7 @@
g_mixer->setVolume(255);
- Mixer::instance()->start();
+// Mixer::instance()->start();
Bitmap *splash_bm = ResourceLoader::instance()->loadBitmap("splash.bm");
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/resource.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- resource.cpp 11 Dec 2004 13:45:28 -0000 1.15
+++ resource.cpp 28 Dec 2004 08:05:17 -0000 1.16
@@ -24,7 +24,6 @@
#include "keyframe.h"
#include "material.h"
#include "model.h"
-#include "sound.h"
#include "lipsynch.h"
#include "debug.h"
#include <cstring>
@@ -262,23 +261,6 @@
return result;
}
-Sound *ResourceLoader::loadSound(const char *filename) {
- std::string fname = filename;
- makeLower(fname);
- CacheType::iterator i = _cache.find(fname);
- if (i != _cache.end()) {
- return dynamic_cast<Sound *>(i->second);
- }
-
- Block *b = getFileBlock(filename);
- if (b == NULL)
- return NULL;
- Sound *result = new Sound(filename, b->data(), b->len());
- delete b;
- _cache[fname] = result;
- return result;
-}
-
void ResourceLoader::uncache(const char *filename) {
std::string fname = filename;
makeLower(fname);
Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/residual/resource.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- resource.h 10 Dec 2004 07:26:03 -0000 1.10
+++ resource.h 28 Dec 2004 08:05:17 -0000 1.11
@@ -29,7 +29,6 @@
class KeyframeAnim;
class Material;
class Model;
-class Sound;
class LipSynch;
class Resource {
@@ -102,7 +101,6 @@
KeyframeAnim *loadKeyframe(const char *fname);
Material *loadMaterial(const char *fname, const CMap &c);
Model *loadModel(const char *fname, const CMap &c);
- Sound *loadSound(const char *fname);
LipSynch *loadLipSynch(const char *fname);
void uncache(const char *fname);
Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- smush.cpp 11 Dec 2004 20:26:24 -0000 1.46
+++ smush.cpp 28 Dec 2004 08:05:17 -0000 1.47
@@ -30,6 +30,11 @@
Smush *g_smush;
extern SoundMixer *g_mixer;
+static uint16 smushDestTable[5786];
+void vimaInit(uint16 *destTable);
+void decompressVima(const char *src, int16 *dest, int destLen, uint16 *destTable);
+
+extern SoundMixer *g_mixer;
void Smush::timerCallback(void *refCon) {
g_smush->handleFrame();
@@ -70,6 +75,7 @@
_internalBuffer = (byte *)malloc(_width * _height * 2);
_externalBuffer = (byte *)malloc(_width * _height * 2);
+ vimaInit(smushDestTable);
g_timer->installTimerProc(&timerCallback, _speed, NULL);
}
@@ -99,15 +105,9 @@
_blocky16.decode(_internalBuffer, src);
}
-static uint16 destTable[5786];
-void vimaInit(uint16 *destTable);
-void decompressVima(const char *src, int16 *dest, int destLen, uint16 *destTable);
-
-extern SoundMixer *g_mixer;
-
void Smush::handleWave(const byte *src, uint32 size) {
int16 *dst = new int16[size * _channels];
- decompressVima((char *)src, dst, size * _channels * 2, destTable);
+ decompressVima((char *)src, dst, size * _channels * 2, smushDestTable);
int flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
@@ -196,7 +196,6 @@
} else if (READ_BE_UINT32(f_header + pos) == MKID_BE('Wave')) {
_freq = READ_LE_UINT32(f_header + pos + 8);
_channels = READ_LE_UINT32(f_header + pos + 12);
- vimaInit(destTable);
pos += 20;
} else {
error("unknown tag");
--- sound.cpp DELETED ---
--- sound.h DELETED ---
- Previous message: [Scummvm-cvs-logs] CVS: residual/imuse imuse_mcmp_mgr.cpp,NONE,1.1 imuse_mcmp_mgr.h,NONE,1.1 imuse.cpp,1.3,1.4 imuse_sndmgr.cpp,1.1,1.2 imuse_sndmgr.h,1.1,1.2 imuse_track.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.177,1.178
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list