diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
-rw-r--r-- | engines/agi/agi.h | 5 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 12 | ||||
-rw-r--r-- | engines/agi/sound.h | 4 |
4 files changed, 13 insertions, 10 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index ee71c73da8..5552e7081f 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -588,7 +588,7 @@ void AgiEngine::initialize() { game.color_fg = 15; game.color_bg = 0; - *game.name = NULL; + game.name[0] = '\0'; game.sbuf = (uint8 *)calloc(_WIDTH, _HEIGHT); game.hires = (uint8 *)calloc(_WIDTH * 2, _HEIGHT); diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 5e8ee30767..bbf2d78aae 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -437,9 +437,8 @@ private: int int_version; AgiEngine *_vm; - int AgiLoader_v3::load_dir(agi_dir *agid, Common::File *fp, - uint32 offs, uint32 len); - uint8 *AgiLoader_v3::load_vol_res(agi_dir *agid); + int load_dir(agi_dir *agid, Common::File *fp, uint32 offs, uint32 len); + uint8 *load_vol_res(agi_dir *agid); public: diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index f2a7776627..f89ec72b3d 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -178,18 +178,18 @@ void SoundMgr::decode_sound(int resnum) { struct sound_iigs_sample *smp; debugC(3, kDebugLevelSound, "(%d)", resnum); - type = READ_LE_UINT16(game.sounds[resnum].rdata); + type = READ_LE_UINT16(_vm->game.sounds[resnum].rdata); if (type == AGI_SOUND_SAMPLE) { /* Convert sample data to 16 bit signed format */ - smp = (struct sound_iigs_sample *)game.sounds[resnum].rdata; + smp = (struct sound_iigs_sample *)_vm->game.sounds[resnum].rdata; size = ((int)smp->size_hi << 8) + smp->size_lo; - src = (uint8 *) game.sounds[resnum].rdata; + src = (uint8 *) _vm->game.sounds[resnum].rdata; buf = (int16 *) calloc(1, 54 + (size << 1) + 100); /* FIXME */ memcpy(buf, src, 54); for (; size--; buf[size + 54] = ((int16) src[size + 54] - 0x80) << 4); /* FIXME */ - game.sounds[resnum].rdata = (uint8 *) buf; + _vm->game.sounds[resnum].rdata = (uint8 *) buf; free(src); } #endif /* USE_IIGS_SOUND */ @@ -223,11 +223,11 @@ void SoundMgr::start_sound(int resnum, int flag) { #ifdef USE_IIGS_SOUND case AGI_SOUND_SAMPLE: debugC(3, kDebugLevelSound, "IIGS sample"); - smp = (struct sound_iigs_sample *)game.sounds[resnum].rdata; + smp = (struct sound_iigs_sample *)_vm->game.sounds[resnum].rdata; for (i = 0; i < NUM_CHANNELS; i++) { chn[i].type = type; chn[i].flags = 0; - chn[i].ins = (int16 *) & game.sounds[resnum].rdata[54]; + chn[i].ins = (int16 *) & _vm->game.sounds[resnum].rdata[54]; chn[i].size = ((int)smp->size_hi << 8) + smp->size_lo; chn[i].ptr = &play_sample[i]; chn[i].timer = 0; diff --git a/engines/agi/sound.h b/engines/agi/sound.h index 90420ac673..8af71161d4 100644 --- a/engines/agi/sound.h +++ b/engines/agi/sound.h @@ -146,6 +146,10 @@ public: void play_agi_sound(); uint32 mix_sound(); int load_instruments(char *fname); +#ifdef USE_IIGS_SOUND + void play_midi_sound(); + void play_sample_sound(); +#endif }; } // End of namespace Agi |