full throttle speech,
fixed two bugs appearing in DOTT svn-id: r3541
This commit is contained in:
parent
03abddf888
commit
46dd55cf2a
4 changed files with 17 additions and 14 deletions
|
@ -352,6 +352,7 @@ void Scumm::saveOrLoad(Serializer *s) {
|
|||
#endif
|
||||
MKLINE(Scumm,_actorToPrintStrFor,sleByte),
|
||||
MKLINE(Scumm,_charsetColor,sleByte),
|
||||
/* XXX Convert into word next time format changes */
|
||||
MKLINE(Scumm,charset._bufPos,sleByte),
|
||||
MKLINE(Scumm,_haveMsg,sleByte),
|
||||
MKLINE(Scumm,_useTalkAnims,sleByte),
|
||||
|
|
|
@ -1319,9 +1319,9 @@ void Scumm::o6_roomOps() {
|
|||
b = pop();
|
||||
a = pop();
|
||||
if (a < 160) a=160;
|
||||
if (a > _scrWidth) a=_scrWidth;
|
||||
if (b < 160) b=160;
|
||||
if (b > _scrHeight) b=_scrHeight;
|
||||
if (a > _scrWidth-160) a=_scrWidth-160;
|
||||
if (b > _scrWidth-160) b=_scrWidth-160;
|
||||
_vars[VAR_CAMERA_MIN_X] = a;
|
||||
_vars[VAR_CAMERA_MAX_X] = b;
|
||||
break;
|
||||
|
|
2
scumm.h
2
scumm.h
|
@ -558,7 +558,7 @@ struct CharsetRenderer {
|
|||
|
||||
int _xpos2, _ypos2;
|
||||
|
||||
byte _bufPos;
|
||||
int _bufPos;
|
||||
byte _unk12,_disableOffsX;
|
||||
byte *_ptr;
|
||||
byte _unk2, _bpp;
|
||||
|
|
24
sound.cpp
24
sound.cpp
|
@ -303,27 +303,29 @@ void Scumm::pauseSounds(bool pause) {
|
|||
_soundsPaused = pause;
|
||||
}
|
||||
|
||||
#pragma START_PACK_STRUCTS
|
||||
struct VOCHeader {
|
||||
byte id[19];
|
||||
byte extra[7];
|
||||
} GCC_PACK;
|
||||
#pragma END_PACK_STRUCTS
|
||||
enum {
|
||||
SOUND_HEADER_SIZE = 26,
|
||||
SOUND_HEADER_BIG_SIZE = 26+8,
|
||||
|
||||
static const char VALID_VOC_ID[] = "Creative Voice File";
|
||||
};
|
||||
|
||||
void Scumm::startSfxSound(void *file) {
|
||||
VOCHeader hdr;
|
||||
char ident[8];
|
||||
int block_type;
|
||||
byte work[8];
|
||||
uint size,i;
|
||||
int rate,comp;
|
||||
byte *data;
|
||||
|
||||
/* Full throttle audio fix HERE */
|
||||
if ( fread(ident, 8, 1, (FILE*)file) != 1)
|
||||
goto invalid;
|
||||
|
||||
if (fread(&hdr, sizeof(hdr), 1, (FILE*)file) != 1 ||
|
||||
memcmp(hdr.id, VALID_VOC_ID, sizeof(hdr.id)) != 0) {
|
||||
if (!memcmp(ident, "VTLK", 4)) {
|
||||
fseek((FILE*)file, SOUND_HEADER_BIG_SIZE - 8, SEEK_CUR);
|
||||
} else if (!memcmp(ident, "Creative", 8)) {
|
||||
fseek((FILE*)file, SOUND_HEADER_SIZE - 8, SEEK_CUR);
|
||||
} else {
|
||||
invalid:;
|
||||
warning("startSfxSound: invalid header");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue