void DreamWebEngine::doSomeTalk() { while (true) { const uint8 *str = getPersonText(_character & 0x7F, _talkPos); if (*str == 0) { // endheartalk _pointerMode = 0; return; } createPanel(); showPanel(); showMan(); showExit(); convIcons(); printDirect(str, 164, 64, 144, false); loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); if (_speechLoaded) playChannel1(62); _pointerMode = 3; workToScreenM(); if (hangOnPQ()) return; _talkPos++; str = getPersonText(_character & 0x7F, _talkPos); if (*str == 0) { // endheartalk _pointerMode = 0; return; } if (*str != ':' && *str != 32) { createPanel(); showPanel(); showMan(); showExit(); convIcons(); printDirect(str, 48, 128, 144, false); loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); if (_speechLoaded) playChannel1(62); _pointerMode = 3; workToScreenM(); if (hangOnPQ()) return; } _talkPos++; } }
void draw() { background(gray(122)); if (Soloud_getActiveVoiceCount(soloud) > 0) { float * v = Soloud_calcFFT(soloud); int p = (int)(v[10] * 30); rect(10, 10, p * 10, 30); } if (keyReleased) { char sentence[20]; sprintf(sentence, "%c", key); destroyAudio(keySound); keySound = loadSpeech(sentence); playAudio(keySound); } textFont(font); textAlign(NVG_ALIGN_LEFT); textSize(30); textLeading(5); text(sentence, 10, 100); }
void setup() { setupPAudio(); speech = loadSpeech(sentence); playAudio(speech); font = loadFont("../3rdparty/nanovg/example/Roboto-Regular.ttf"); }
int CSound::playSpeech(CDialogueFile *dialogueFile, int speechId, CProximity &prox) { CWaveFile *waveFile = loadSpeech(dialogueFile, speechId); if (!waveFile) return -1; prox._soundDuration = waveFile->getDuration(); activateSound(waveFile, prox._disposeAfterUse); return _soundManager.playSound(*waveFile, prox); }
void DreamWebEngine::startTalk() { _talkMode = 0; const uint8 *str = getPersonText(_character & 0x7F, 0); uint16 y; _charShift = 91+91; y = 64; printDirect(&str, 66, &y, 241, true); _charShift = 0; y = 80; printDirect(&str, 66, &y, 241, true); _speechLoaded = false; loadSpeech('R', _realLocation, 'C', 64*(_character & 0x7F)); if (_speechLoaded) { _volumeDirection = 1; _volumeTo = 6; playChannel1(50 + 12); } }
CWaveFile *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) { return loadSpeech(dialogueFile, index); }