mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
Voice support for loom talkie. Thanks Arisme.
Other ports will have to add a new 'cd_playtrack' function, lest there be compile errors. svn-id: r3608
This commit is contained in:
parent
834c5efee9
commit
5897caa9e5
@ -2433,10 +2433,14 @@ void Scumm::decodeParseString() {
|
||||
case 7: /* overhead */
|
||||
string[textSlot].overhead = true;
|
||||
break;
|
||||
case 8: /* ignore */
|
||||
getVarOrDirectWord(0x80);
|
||||
getVarOrDirectWord(0x40);
|
||||
case 8: { /* play loom talkie sound - use in other games ? */
|
||||
int offset = getVarOrDirectWord(0x80);
|
||||
int delay = getVarOrDirectWord(0x40);
|
||||
|
||||
if (_gameId == GID_LOOM256)
|
||||
cd_playtrack(1, offset, delay);
|
||||
break;
|
||||
}
|
||||
case 15:
|
||||
_messagePtr = _scriptPointer;
|
||||
switch(textSlot) {
|
||||
|
1
scumm.h
1
scumm.h
@ -2264,3 +2264,4 @@ bool isSfxFinished();
|
||||
void waitForTimer(Scumm *s, int msec_delay);
|
||||
void setShakePos(Scumm *s, int shake_pos);
|
||||
uint16 newTag2Old(uint32 oldTag);
|
||||
void cd_playtrack(int track, int offset, int delay);
|
11
sdl.cpp
11
sdl.cpp
@ -37,6 +37,7 @@ SoundEngine sound;
|
||||
SOUND_DRIVER_TYPE snd_driv;
|
||||
|
||||
static SDL_Surface *screen;
|
||||
static SDL_CD *cdrom;
|
||||
|
||||
static int current_shake_pos;
|
||||
|
||||
@ -462,6 +463,11 @@ void fill_sound(void *userdata, Uint8 *stream, int len) {
|
||||
scumm.mixWaves((int16*)stream, len>>1);
|
||||
}
|
||||
|
||||
void cd_playtrack(int track, int offset, int delay) {
|
||||
SDL_CDStatus(cdrom);
|
||||
SDL_CDPlayTracks(cdrom, track, (offset * 7.5) - 22650, 0, delay * 7.5);
|
||||
}
|
||||
|
||||
int music_thread(Scumm *s) {
|
||||
int old_time, cur_time;
|
||||
|
||||
@ -489,6 +495,11 @@ void initGraphics(Scumm *s, bool fullScreen) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1)
|
||||
cdrom = NULL;
|
||||
else
|
||||
cdrom = SDL_CDOpen(0);
|
||||
|
||||
/* Clean up on exit */
|
||||
atexit(SDL_Quit);
|
||||
|
||||
|
@ -461,6 +461,10 @@ void fill_buffer(int16 *buf, int len) {
|
||||
scumm.mixWaves(buf, len);
|
||||
}
|
||||
|
||||
void cd_playtrack(int track, int offset, int delay) { // FIXME: Add for Win32
|
||||
;
|
||||
}
|
||||
|
||||
void WndMan::prepare_header(WAVEHDR *wh, int i) {
|
||||
memset(wh, 0, sizeof(WAVEHDR));
|
||||
wh->lpData = (char*)malloc(BUFFER_SIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user