[Scummvm-cvs-logs] CVS: scummvm actor.h,1.2,1.3 init.cpp,1.10,1.11 scummvm.cpp,1.154,1.155 scummvm.dsp,1.40,1.41 sound.cpp,1.90,1.91 verbs.cpp,1.25,1.26
James Brown
ender at users.sourceforge.net
Wed May 15 03:26:01 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv25827
Modified Files:
actor.h init.cpp scummvm.cpp scummvm.dsp sound.cpp verbs.cpp
Log Message:
Misc. fixes
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actor.h 14 May 2002 23:35:28 -0000 1.2
+++ actor.h 15 May 2002 10:25:00 -0000 1.3
@@ -94,8 +94,8 @@
public:
// Constructor
- Actor(Scumm *scumm) : _scumm(scumm) {}
-
+ //Actor(Scumm *scumm) : _scumm(scumm) {}
+ void initActorClass(Scumm *scumm) {_scumm = scumm;}
//protected:
void hideActor();
void showActor();
Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/init.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- init.cpp 14 May 2002 23:35:28 -0000 1.10
+++ init.cpp 15 May 2002 10:25:00 -0000 1.11
@@ -22,11 +22,8 @@
#include"stdafx.h"
#include"scumm.h"
-#include "actor.h"
-
+#include"actor.h"
Scumm::Scumm (void) {
- /* No need to put anything here yet :) */
- actor = new Actor[MAX_ACTORS](this);
}
Scumm::~Scumm (void) {
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- scummvm.cpp 14 May 2002 23:35:28 -0000 1.154
+++ scummvm.cpp 15 May 2002 10:25:00 -0000 1.155
@@ -76,8 +76,11 @@
setShake(0);
setupCursor();
+ /* Allocate and initilise actors */
+ actor = new Actor[MAX_ACTORS];
for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) {
a->number = i;
+ a->initActorClass(this);
a->initActor(1);
}
Index: scummvm.dsp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.dsp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- scummvm.dsp 30 Apr 2002 13:57:10 -0000 1.40
+++ scummvm.dsp 15 May 2002 10:25:00 -0000 1.41
@@ -43,7 +43,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /G6 /MD /W3 /O2 /Ob2 /I "." /I "sound" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "USE_ADLIB" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /O2 /Ob2 /I "." /I "sound" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "USE_ADLIB" /D "COMPRESSED_SOUND_FILE" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x41d /d "NDEBUG"
# ADD RSC /l 0x41d /d "NDEBUG"
@@ -52,7 +52,8 @@
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib sdl.lib winmm.lib wsock32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib sdl.lib winmm.lib wsock32.lib libmad.lib /nologo /subsystem:console /machine:I386
+# SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "scummvm - Win32 Debug"
@@ -470,6 +471,10 @@
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\actor.h
+# End Source File
# Begin Source File
SOURCE=.\akos.h
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- sound.cpp 14 May 2002 23:50:09 -0000 1.90
+++ sound.cpp 15 May 2002 10:25:00 -0000 1.91
@@ -88,8 +88,8 @@
data[1], data[2], data[3], data[4], data[5], data[6], data[7]
);
#endif
- if ((_gameId == GID_DIG) && (data[0] == 12)){
- uint32 size, rate, tag, chan;
+ if ((_gameId == GID_DIG) && ((data[0] == 12) || (data[0] == 14))){
+ uint32 size, rate, tag, chan, bits;
uint8 * ptr = getResourceAddress(rtSound, data[1]);
if (ptr != NULL) {
ptr+=16; /* Skip header */
@@ -97,13 +97,15 @@
tag = READ_BE_UINT32(ptr); ptr+=4;
switch(tag) {
case MKID_BE('FRMT'):
- size = READ_BE_UINT32(ptr); ptr+=16;
+ size = READ_BE_UINT32(ptr); ptr+=12;
+ bits = READ_BE_UINT32(ptr); ptr+=4;
rate = READ_BE_UINT32(ptr); ptr+=4;
chan = READ_BE_UINT32(ptr); ptr+=4;
break;
case MKID_BE('TEXT'):
case MKID_BE('REGN'):
case MKID_BE('STOP'):
+ case MKID_BE('JUMP'):
size = READ_BE_UINT32(ptr); ptr+=size+4;
break;
case MKID_BE('DATA'):
@@ -116,25 +118,31 @@
}
if (chan == 1)
{
- uint32 s_size = (size * 2) / 3;
- byte * buffer = (byte*)malloc (s_size);
- uint32 l = 0, r = 0, tmp;
- memset (buffer, 0, s_size);
- for (; l < size - 1; l += 3)
- {
- tmp = (ptr[l + 1] & 0x0f) << 8;
- tmp = (tmp | ptr[l + 0]) << 4;
- tmp -= 0x8000;
-// buffer[r++] = (uint8)(tmp & 0xff);
- buffer[r++] = (uint8)((tmp >> 8) & 0xff);
+ if (bits == 8) {
+ byte * buffer = (byte*)malloc (size);
+ memcpy(buffer, ptr, size);
+ _mixer->play_raw(NULL, buffer, size, rate, SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED);
+ }
+ if (bits == 12) {
+ uint32 s_size = (size * 2) / 3;
+ byte * buffer = (byte*)malloc (s_size);
+ uint32 l = 0, r = 0, tmp;
+ for (; l < size; l += 3)
+ {
+ tmp = (ptr[l + 1] & 0x0f) << 8;
+ tmp = (tmp | ptr[l + 0]) << 4;
+ tmp -= 0x8000;
+// buffer[r++] = (uint8)(tmp & 0xff);
+ buffer[r++] = (uint8)((tmp >> 8) & 0xff);
- tmp = (ptr[l + 1] & 0xf0) << 4;
- tmp = (tmp | ptr[l + 2]) << 4;
- tmp -= 0x8000;
-// buffer[r++] = (uint8)(tmp & 0xff);
- buffer[r++] = (uint8)((tmp >> 8) & 0xff);
- }
- _mixer->play_raw(NULL, buffer, s_size, rate, SoundMixer::FLAG_AUTOFREE);
+ tmp = (ptr[l + 1] & 0xf0) << 4;
+ tmp = (tmp | ptr[l + 2]) << 4;
+ tmp -= 0x8000;
+// buffer[r++] = (uint8)(tmp & 0xff);
+ buffer[r++] = (uint8)((tmp >> 8) & 0xff);
+ }
+ _mixer->play_raw(NULL, buffer, s_size, rate, SoundMixer::FLAG_AUTOFREE);
+ }
} else {
warning("DIG: ignoring stereo sample");
}
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/verbs.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- verbs.cpp 7 May 2002 18:44:34 -0000 1.25
+++ verbs.cpp 15 May 2002 10:25:00 -0000 1.26
@@ -238,8 +238,8 @@
}
vst = &_verbs[vrb];
- vst->right = vst->x + imgw * 8;
- vst->bottom = vst->y + imgh * 8;
+ vst->right = vst->x + imgw * 8 - 1;
+ vst->bottom = vst->y + imgh * 8 - 1;
vst->oldleft = vst->x;
vst->oldright = vst->right;
vst->oldtop = vst->y;
More information about the Scummvm-git-logs
mailing list