Misc. fixes
svn-id: r4338
This commit is contained in:
parent
f0999a4838
commit
4670fee821
6 changed files with 44 additions and 31 deletions
4
actor.h
4
actor.h
|
@ -94,8 +94,8 @@ protected:
|
|||
public:
|
||||
|
||||
// Constructor
|
||||
Actor(Scumm *scumm) : _scumm(scumm) {}
|
||||
|
||||
//Actor(Scumm *scumm) : _scumm(scumm) {}
|
||||
void initActorClass(Scumm *scumm) {_scumm = scumm;}
|
||||
//protected:
|
||||
void hideActor();
|
||||
void showActor();
|
||||
|
|
5
init.cpp
5
init.cpp
|
@ -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) {
|
||||
|
|
|
@ -76,8 +76,11 @@ void Scumm::scummInit()
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ RSC=rc.exe
|
|||
# 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 @@ BSC32=bscmake.exe
|
|||
# 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"
|
||||
|
||||
|
@ -472,6 +473,10 @@ SOURCE=.\verbs.cpp
|
|||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\actor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\akos.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
18
sound.cpp
18
sound.cpp
|
@ -88,8 +88,8 @@ void Scumm::processSoundQues()
|
|||
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 @@ void Scumm::processSoundQues()
|
|||
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,11 +118,16 @@ void Scumm::processSoundQues()
|
|||
}
|
||||
if (chan == 1)
|
||||
{
|
||||
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;
|
||||
memset (buffer, 0, s_size);
|
||||
for (; l < size - 1; l += 3)
|
||||
for (; l < size; l += 3)
|
||||
{
|
||||
tmp = (ptr[l + 1] & 0x0f) << 8;
|
||||
tmp = (tmp | ptr[l + 0]) << 4;
|
||||
|
@ -135,6 +142,7 @@ void Scumm::processSoundQues()
|
|||
buffer[r++] = (uint8)((tmp >> 8) & 0xff);
|
||||
}
|
||||
_mixer->play_raw(NULL, buffer, s_size, rate, SoundMixer::FLAG_AUTOFREE);
|
||||
}
|
||||
} else {
|
||||
warning("DIG: ignoring stereo sample");
|
||||
}
|
||||
|
|
|
@ -238,8 +238,8 @@ void Scumm::drawVerbBitmap(int vrb, int x, int y)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue