diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
-rw-r--r-- | engines/agi/agi.h | 2 | ||||
-rw-r--r-- | engines/agi/checks.cpp | 8 | ||||
-rw-r--r-- | engines/agi/cycle.cpp | 2 | ||||
-rw-r--r-- | engines/agi/keyboard.cpp | 2 | ||||
-rw-r--r-- | engines/agi/motion.cpp | 16 | ||||
-rw-r--r-- | engines/agi/op_cmd.cpp | 4 | ||||
-rw-r--r-- | engines/agi/op_test.cpp | 8 | ||||
-rw-r--r-- | engines/agi/savegame.cpp | 6 | ||||
-rw-r--r-- | engines/sky/intro.cpp | 2 | ||||
-rw-r--r-- | engines/sky/sound.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/sound.cpp | 6 | ||||
-rw-r--r-- | engines/sword2/animation.cpp | 2 |
13 files changed, 31 insertions, 31 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index b1888e362e..16ab0511cc 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -347,7 +347,7 @@ int AgiEngine::agiInit() { /* clear view table */ for (i = 0; i < MAX_VIEWTABLE; i++) - memset(&_game.viewTable[i], 0, sizeof(struct VtEntry)); + memset(&_game.viewTable[i], 0, sizeof(VtEntry)); initWords(); diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 6b2f4d98c4..88d93d019e 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -392,7 +392,7 @@ struct AgiGame { AgiSound sounds[MAX_DIRS]; /**< AGI sound resources */ /* view table */ - struct VtEntry viewTable[MAX_VIEWTABLE]; + VtEntry viewTable[MAX_VIEWTABLE]; int32 ver; /**< detected game version */ diff --git a/engines/agi/checks.cpp b/engines/agi/checks.cpp index 367964cd26..d77afce0d3 100644 --- a/engines/agi/checks.cpp +++ b/engines/agi/checks.cpp @@ -27,7 +27,7 @@ namespace Agi { -int AgiEngine::checkPosition(struct VtEntry *v) { +int AgiEngine::checkPosition(VtEntry *v) { debugC(4, kDebugLevelSprites, "check position @ %d, %d", v->xPos, v->yPos); if (v->xPos < 0 || @@ -52,8 +52,8 @@ int AgiEngine::checkPosition(struct VtEntry *v) { /** * Check if there's another object on the way */ -int AgiEngine::checkCollision(struct VtEntry *v) { - struct VtEntry *u; +int AgiEngine::checkCollision(VtEntry *v) { + VtEntry *u; if (v->flags & IGNORE_OBJECTS) return 0; @@ -168,7 +168,7 @@ check_ego: * rules, otherwise the previous position will be kept. */ void AgiEngine::updatePosition() { - struct VtEntry *v; + VtEntry *v; int x, y, oldX, oldY, border; _game.vars[vBorderCode] = 0; diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 9a7884640d..2309f26e2b 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -186,7 +186,7 @@ void AgiEngine::oldInputMode() { /* If main_cycle returns false, don't process more events! */ int AgiEngine::mainCycle() { unsigned int key, kascii; - struct VtEntry *v = &_game.viewTable[0]; + VtEntry *v = &_game.viewTable[0]; _gfx->pollTimer(); /* msdos driver -> does nothing */ updateTimer(); diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index 62a11e0b83..becb6faf56 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -99,7 +99,7 @@ int AgiEngine::doPollKeyboard() { } int AgiEngine::handleController(int key) { - struct VtEntry *v = &_game.viewTable[0]; + VtEntry *v = &_game.viewTable[0]; int i; /* The Black Cauldron needs KEY_ESCAPE to use menus */ diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp index 3536a73605..864953a81f 100644 --- a/engines/agi/motion.cpp +++ b/engines/agi/motion.cpp @@ -42,7 +42,7 @@ int AgiEngine::checkBlock(int x, int y) { return true; } -void AgiEngine::changePos(struct VtEntry *v) { +void AgiEngine::changePos(VtEntry *v) { int b, x, y; int dx[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 }; int dy[9] = { 0, -1, -1, 0, 1, 1, 1, 0, -1 }; @@ -64,7 +64,7 @@ void AgiEngine::changePos(struct VtEntry *v) { } } -void AgiEngine::motionWander(struct VtEntry *v) { +void AgiEngine::motionWander(VtEntry *v) { if (v->parm1--) { if (~v->flags & DIDNT_MOVE) return; @@ -80,7 +80,7 @@ void AgiEngine::motionWander(struct VtEntry *v) { } } -void AgiEngine::motionFollowEgo(struct VtEntry *v) { +void AgiEngine::motionFollowEgo(VtEntry *v) { int egoX, egoY; int objX, objY; int dir; @@ -142,7 +142,7 @@ void AgiEngine::motionFollowEgo(struct VtEntry *v) { } } -void AgiEngine::motionMoveObj(struct VtEntry *v) { +void AgiEngine::motionMoveObj(VtEntry *v) { v->direction = getDirection(v->xPos, v->yPos, v->parm1, v->parm2, v->stepSize); /* Update V6 if ego */ @@ -153,7 +153,7 @@ void AgiEngine::motionMoveObj(struct VtEntry *v) { inDestination(v); } -void AgiEngine::checkMotion(struct VtEntry *v) { +void AgiEngine::checkMotion(VtEntry *v) { switch (v->motion) { case MOTION_WANDER: motionWander(v); @@ -178,7 +178,7 @@ void AgiEngine::checkMotion(struct VtEntry *v) { * */ void AgiEngine::checkAllMotions() { - struct VtEntry *v; + VtEntry *v; for (v = _game.viewTable; v < &_game.viewTable[MAX_VIEWTABLE]; v++) { if ((v->flags & (ANIMATED | UPDATE | DRAWN)) == (ANIMATED | UPDATE | DRAWN) @@ -194,7 +194,7 @@ void AgiEngine::checkAllMotions() { * type motion that * has reached its final destination coordinates. * @param v Pointer to view table entry */ -void AgiEngine::inDestination(struct VtEntry *v) { +void AgiEngine::inDestination(VtEntry *v) { if (v->motion == MOTION_MOVE_OBJ) { v->stepSize = v->parm3; setflag(v->parm4, true); @@ -210,7 +210,7 @@ void AgiEngine::inDestination(struct VtEntry *v) { * after setting the motion mode to MOTION_MOVE_OBJ. * @param v Pointer to view table entry */ -void AgiEngine::moveObj(struct VtEntry *v) { +void AgiEngine::moveObj(VtEntry *v) { motionMoveObj(v); } diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index c3798bc4fb..3b1800abee 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -1006,8 +1006,8 @@ cmd(restart_game) { cmd(distance) { int16 x1, y1, x2, y2, d; - struct VtEntry *v0 = &game.viewTable[p0]; - struct VtEntry *v1 = &game.viewTable[p1]; + VtEntry *v0 = &game.viewTable[p0]; + VtEntry *v1 = &game.viewTable[p1]; if (v0->flags & DRAWN && v1->flags & DRAWN) { x1 = v0->xPos + v0->xSize / 2; diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index 463a51e8c1..43624a1801 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -129,7 +129,7 @@ static uint8 testController(uint8 cont) { } static uint8 testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { - struct VtEntry *v = &game.viewTable[n]; + VtEntry *v = &game.viewTable[n]; uint8 r; r = v->xPos >= x1 && v->yPos >= y1 && v->xPos <= x2 && v->yPos <= y2; @@ -140,7 +140,7 @@ static uint8 testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { } static uint8 testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { - struct VtEntry *v = &game.viewTable[n]; + VtEntry *v = &game.viewTable[n]; return v->xPos >= x1 && v->yPos >= y1 && v->xPos + v->xSize - 1 <= x2 && v->yPos <= y2; @@ -148,7 +148,7 @@ static uint8 testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { /* if n is in centre of box */ static uint8 testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { - struct VtEntry *v = &game.viewTable[n]; + VtEntry *v = &game.viewTable[n]; return v->xPos + v->xSize / 2 >= x1 && v->xPos + v->xSize / 2 <= x2 && v->yPos >= y1 && v->yPos <= y2; @@ -156,7 +156,7 @@ static uint8 testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { /* if nect N is in right corner */ static uint8 testObjRight(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { - struct VtEntry *v = &game.viewTable[n]; + VtEntry *v = &game.viewTable[n]; return v->xPos + v->xSize - 1 >= x1 && v->xPos + v->xSize - 1 <= x2 && v->yPos >= y1 && v->yPos <= y2; diff --git a/engines/agi/savegame.cpp b/engines/agi/savegame.cpp index 010ad79fdf..515fa35234 100644 --- a/engines/agi/savegame.cpp +++ b/engines/agi/savegame.cpp @@ -352,7 +352,7 @@ int AgiEngine::loadGame(const char *fileName) { /* game.sounds - loaded above */ for (i = 0; i < vtEntries; i++) { - struct VtEntry *v = &_game.viewTable[i]; + VtEntry *v = &_game.viewTable[i]; v->stepTime = in->readByte(); v->stepTimeCount = in->readByte(); @@ -398,13 +398,13 @@ int AgiEngine::loadGame(const char *fileName) { v->parm4 = in->readByte(); } for (i = vtEntries; i < MAX_VIEWTABLE; i++) { - memset(&_game.viewTable[i], 0, sizeof(struct VtEntry)); + memset(&_game.viewTable[i], 0, sizeof(VtEntry)); } /* Fix some pointers in viewtable */ for (i = 0; i < MAX_VIEWTABLE; i++) { - struct VtEntry *v = &_game.viewTable[i]; + VtEntry *v = &_game.viewTable[i]; if (_game.dirView[v->currentView].offset == _EMPTY) continue; diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 55143d7f86..c6cd1f344b 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -740,7 +740,7 @@ bool Intro::nextPart(uint16 *&data) { // probably use _skySound instead of calling playRaw() // directly, but this will have to do for now. memset(vData, 127, sizeof(struct dataFileHeader)); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_voice, vData, _skyDisk->_lastLoadedFileSize, 11025, + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_voice, vData, _skyDisk->_lastLoadedFileSize, 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED, SOUND_VOICE); return true; case WAITVOICE: diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index edcfd81581..5e17ab4d01 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -1245,7 +1245,7 @@ bool Sound::startSpeech(uint16 textNum) { rate = 11025; _mixer->stopID(SOUND_SPEECH); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSpeech, playBuffer, speechSize, rate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE, SOUND_SPEECH); + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, playBuffer, speechSize, rate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE, SOUND_SPEECH); return true; } diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index fa4d9c3adc..42107ae6b1 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -196,12 +196,12 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { uint32 size; int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size); if (data) - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_speechHandle, data, size, 11025, SPEECH_FLAGS, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_speechHandle, data, size, 11025, SPEECH_FLAGS, SOUND_SPEECH_ID, speechVol, speechPan); } #ifdef USE_MAD else if (_cowMode == CowMp3) { _cowFile.seek(index); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speechHandle, Audio::makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -212,7 +212,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { #ifdef USE_VORBIS else if (_cowMode == CowVorbis) { _cowFile.seek(index); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speechHandle, Audio::makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); for (int cnt = 0; cnt < 480; cnt++) _waveVolume[cnt] = true; _waveVolPos = 0; diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 838c37dc6e..2ebbdf4386 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -351,7 +351,7 @@ void MoviePlayer::play(int32 leadIn, int32 leadOut) { } if (startNextText && !_mixer->isSoundHandleActive(_speechHandle)) { - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_speechHandle, t->speech, t->speechBufferSize, 22050, flags); + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_speechHandle, t->speech, t->speechBufferSize, 22050, flags); startNextText = false; } |