mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 12:44:02 +00:00
Added beep sound to Nippon Safes for Amiga.
svn-id: r29171
This commit is contained in:
parent
205b65ba11
commit
8a73ce38bb
@ -212,7 +212,7 @@ uint16 Menu::chooseLanguage() {
|
|||||||
if (128 + _si * 49 <= _vm->_mousePos.x) continue;
|
if (128 + _si * 49 <= _vm->_mousePos.x) continue;
|
||||||
if (180 - _si * 25 <= _vm->_mousePos.y) continue;
|
if (180 - _si * 25 <= _vm->_mousePos.y) continue;
|
||||||
|
|
||||||
// beep();
|
_vm->beep();
|
||||||
|
|
||||||
switch (_si) {
|
switch (_si) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -368,7 +368,7 @@ void Menu::selectCharacter() {
|
|||||||
if (_si != -1) {
|
if (_si != -1) {
|
||||||
_vm->_gfx->grabRect((byte*)v14.pixels, r, Gfx::kBitFront, BLOCK_WIDTH);
|
_vm->_gfx->grabRect((byte*)v14.pixels, r, Gfx::kBitFront, BLOCK_WIDTH);
|
||||||
_vm->_gfx->flatBlitCnv(&v14, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBitFront);
|
_vm->_gfx->flatBlitCnv(&v14, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBitFront);
|
||||||
// beep();
|
_vm->beep();
|
||||||
|
|
||||||
if (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) {
|
if (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) {
|
||||||
if (_amigaDinoKey[_di] == _si)
|
if (_amigaDinoKey[_di] == _si)
|
||||||
|
@ -547,7 +547,7 @@ Parallaction::InputData *Parallaction::translateInput() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// beep();
|
beep();
|
||||||
setArrowCursor();
|
setArrowCursor();
|
||||||
return &_input;
|
return &_input;
|
||||||
}
|
}
|
||||||
@ -1142,6 +1142,9 @@ const char *Character::getFullName() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Parallaction::beep() {
|
||||||
|
_soundMan->playSfx("beep", 3, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -580,6 +580,7 @@ public:
|
|||||||
virtual void jobEraseLabel(void *parm, Job *j) = 0;
|
virtual void jobEraseLabel(void *parm, Job *j) = 0;
|
||||||
virtual void jobWaitRemoveJob(void *parm, Job *j) = 0;
|
virtual void jobWaitRemoveJob(void *parm, Job *j) = 0;
|
||||||
|
|
||||||
|
void beep();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const char **_zoneFlagNamesRes;
|
const char **_zoneFlagNamesRes;
|
||||||
@ -789,7 +790,6 @@ protected:
|
|||||||
void initOpcodes();
|
void initOpcodes();
|
||||||
void initParsers();
|
void initParsers();
|
||||||
|
|
||||||
|
|
||||||
// program parser
|
// program parser
|
||||||
OpcodeSet _instructionParsers;
|
OpcodeSet _instructionParsers;
|
||||||
Table *_instructionNames;
|
Table *_instructionNames;
|
||||||
|
@ -407,4 +407,5 @@ JobOpcode* Parallaction_ns::createJobOpcode(uint functionId, Job *job) {
|
|||||||
return new OpcodeImpl2<Parallaction_ns>(this, _jobsFn[functionId], job);
|
return new OpcodeImpl2<Parallaction_ns>(this, _jobsFn[functionId], job);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Parallaction
|
} // namespace Parallaction
|
||||||
|
@ -318,6 +318,28 @@ AmigaSoundMan::~AmigaSoundMan() {
|
|||||||
stopSfx(3);
|
stopSfx(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static byte res_amigaBeep[] = {
|
||||||
|
0, 20, 40, 60, 80, 60, 40, 20, 0, 236, 216, 196, 176, 196, 216, 236
|
||||||
|
};
|
||||||
|
|
||||||
|
void AmigaSoundMan::loadChannelData(const char *filename, Channel *ch) {
|
||||||
|
if (!scumm_stricmp("beep", filename)) {
|
||||||
|
ch->header.oneShotHiSamples = 0;
|
||||||
|
ch->header.repeatHiSamples = 0;
|
||||||
|
ch->header.samplesPerHiCycle = 0;
|
||||||
|
ch->header.samplesPerSec = 12000;
|
||||||
|
ch->header.volume = 255;
|
||||||
|
ch->data = res_amigaBeep;
|
||||||
|
ch->dataSize = 16;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Common::ReadStream *stream = _vm->_disk->loadSound(filename);
|
||||||
|
Audio::A8SVXDecoder decoder(*stream, ch->header, ch->data, ch->dataSize);
|
||||||
|
decoder.decode();
|
||||||
|
delete stream;
|
||||||
|
}
|
||||||
|
|
||||||
void AmigaSoundMan::playSfx(const char *filename, uint channel, bool looping, int volume, int rate) {
|
void AmigaSoundMan::playSfx(const char *filename, uint channel, bool looping, int volume, int rate) {
|
||||||
if (channel >= NUM_AMIGA_CHANNELS) {
|
if (channel >= NUM_AMIGA_CHANNELS) {
|
||||||
warning("unknown sfx channel");
|
warning("unknown sfx channel");
|
||||||
@ -327,10 +349,7 @@ void AmigaSoundMan::playSfx(const char *filename, uint channel, bool looping, in
|
|||||||
debugC(1, kDebugAudio, "AmigaSoundMan::playSfx(%s, %i)", filename, channel);
|
debugC(1, kDebugAudio, "AmigaSoundMan::playSfx(%s, %i)", filename, channel);
|
||||||
|
|
||||||
Channel *ch = &_channels[channel];
|
Channel *ch = &_channels[channel];
|
||||||
Common::ReadStream *stream = _vm->_disk->loadSound(filename);
|
loadChannelData(filename, ch);
|
||||||
Audio::A8SVXDecoder decoder(*stream, ch->header, ch->data, ch->dataSize);
|
|
||||||
decoder.decode();
|
|
||||||
delete stream;
|
|
||||||
|
|
||||||
uint32 loopStart, loopEnd, flags;
|
uint32 loopStart, loopEnd, flags;
|
||||||
if (looping) {
|
if (looping) {
|
||||||
|
@ -95,6 +95,8 @@ class AmigaSoundMan : public SoundMan {
|
|||||||
uint32 flags;
|
uint32 flags;
|
||||||
} _channels[NUM_AMIGA_CHANNELS];
|
} _channels[NUM_AMIGA_CHANNELS];
|
||||||
|
|
||||||
|
void loadChannelData(const char *filename, Channel *ch);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AmigaSoundMan(Parallaction *vm);
|
AmigaSoundMan(Parallaction *vm);
|
||||||
~AmigaSoundMan();
|
~AmigaSoundMan();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user