mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 04:33:09 +00:00
TOLTECS: Updated TODO
- Updated locations where the animation hack is necessary - Fixed crashes on scene changes (with a TODO) - MIDI Music is always XMIDI - sfClearScreen() doesn't seem to be necessary
This commit is contained in:
parent
1bddee1e73
commit
b6c3232ea3
@ -5,21 +5,36 @@ NOTES
|
|||||||
|
|
||||||
TODO
|
TODO
|
||||||
------
|
------
|
||||||
- Finish music support (game seems to use XMIDI, MIDI and headerless music...figure out more)
|
- Finish music support (volume, looping perhaps?)
|
||||||
|
- Check if background resources are used before purging them when changing scenes - check
|
||||||
|
the comments inside sfLoadScene.
|
||||||
|
- Sometimes, some stray lines are drawn below fonts - probably because the text doesn't
|
||||||
|
fit inside the screen and the surface is cut off incorrectly.
|
||||||
|
- Load/start sound and music of the saved scene when loading.
|
||||||
|
- The animation changes in commit 105 (probably) seem to be insufficient - some animations
|
||||||
|
exceed the screen height (together with the interface) - perhaps the interface height
|
||||||
|
should not be saved?
|
||||||
|
- Some sounds are cut off prematurely (e.g. when an animation finishes before the sound
|
||||||
|
sample, when changing scenes and a dialog is immediately started afterwards).
|
||||||
- When saving a game, save the whole screen when an animation is playing
|
- When saving a game, save the whole screen when an animation is playing
|
||||||
e.g. when playing animations (the script controlled ones, not the movies) it should save
|
e.g. when playing animations (the script controlled ones, not the movies) it should save
|
||||||
the whole screen when the game is saved when such an animation is running since it uses
|
the whole screen when the game is saved when such an animation is running since it uses
|
||||||
delta-frames so currently, once restored, the screen is wrong. This is only observed in
|
delta-frames so currently, once restored, the screen is wrong. This is only observed in
|
||||||
a few places.
|
a few places.
|
||||||
|
|
||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
------
|
------
|
||||||
- Crashes sometimes on scene changes
|
None known (see TODO).
|
||||||
(I guess because some talktext is still running although the slot used by it has changed)
|
|
||||||
- Crashes sometimes (e.g. when inside the barn and going up the ladder)
|
|
||||||
|
|
||||||
DONE
|
DONE
|
||||||
------
|
------
|
||||||
|
- Crashes sometimes on scene changes
|
||||||
|
(I guess because some talktext is still running although the slot used by it has changed)
|
||||||
|
Crashes sometimes (e.g. when inside the barn and going up the ladder)
|
||||||
|
These crashes are caused by non-stopping background sounds, see TODO above.
|
||||||
|
- The game music is in XMIDI. I'm assuming that the rest of the formats were because of badly
|
||||||
|
dumped resources - finalize() Calls were missing and the resulting music could contain anything.
|
||||||
- Implement dirty rectangles (low priority)
|
- Implement dirty rectangles (low priority)
|
||||||
- Optimize segment mask redrawing (only redraw what's neccessary)
|
- Optimize segment mask redrawing (only redraw what's neccessary)
|
||||||
- Add movie playback functionality (movie format is known, needs implementing)
|
- Add movie playback functionality (movie format is known, needs implementing)
|
||||||
|
@ -896,7 +896,17 @@ void ScriptInterpreter::sfLoadAddPalette() {
|
|||||||
|
|
||||||
void ScriptInterpreter::sfLoadScene() {
|
void ScriptInterpreter::sfLoadScene() {
|
||||||
if (arg8(3) == 0) {
|
if (arg8(3) == 0) {
|
||||||
_vm->_sound->stopSpeech();
|
// FIXME: Originally, this was stopSpeech(). However, we need to stop
|
||||||
|
// ALL sounds here (including sound effects and background sounds)
|
||||||
|
// before purgeCache() is called, otherwise the sound buffers will be
|
||||||
|
// invalidated. This is apparent when moving from a scene that has
|
||||||
|
// background sounds (such as the canyon at the beginning), to another
|
||||||
|
// one that doesn't (such as the map), and does not stop the sounds
|
||||||
|
// already playing. In this case, the engine will either crash or
|
||||||
|
// garbage will be heard through the speakers.
|
||||||
|
// TODO: We should either move purgeCache() elsewhere, or monitor
|
||||||
|
// which resources are still used before purging the cache.
|
||||||
|
_vm->_sound->stopAll();
|
||||||
_vm->_res->purgeCache();
|
_vm->_res->purgeCache();
|
||||||
_vm->loadScene(arg16(4));
|
_vm->loadScene(arg16(4));
|
||||||
} else {
|
} else {
|
||||||
@ -1053,8 +1063,8 @@ void ScriptInterpreter::sfStartSequence() {
|
|||||||
// TODO: It seems that music is always looping?
|
// TODO: It seems that music is always looping?
|
||||||
_vm->_musicPlayer->playMIDI(data, resourceSize, true);
|
_vm->_musicPlayer->playMIDI(data, resourceSize, true);
|
||||||
} else {
|
} else {
|
||||||
// TODO: Where does this occur? Are these SMF MIDI files?
|
// Sanity check: this should never occur
|
||||||
warning("sfStartSequence: resource %d isn't XMIDI", sequenceResIndex);
|
error("sfStartSequence: resource %d isn't XMIDI", sequenceResIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] data;
|
delete[] data;
|
||||||
@ -1080,8 +1090,8 @@ void ScriptInterpreter::sfPlaySound2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfClearScreen() {
|
void ScriptInterpreter::sfClearScreen() {
|
||||||
// TODO
|
// TODO: Occurs on every scene change, but seems unneeded
|
||||||
debug("ScriptInterpreter::sfClearScreen");
|
//debug("ScriptInterpreter::sfClearScreen");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfHandleInput() {
|
void ScriptInterpreter::sfHandleInput() {
|
||||||
|
@ -176,4 +176,13 @@ void Sound::stopSpeech() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sound::stopAll() {
|
||||||
|
for (int i = 0; i < kMaxChannels; i++) {
|
||||||
|
_vm->_mixer->stopHandle(channels[i].handle);
|
||||||
|
_vm->_screen->keepTalkTextItemsAlive();
|
||||||
|
channels[i].type = kChannelTypeEmpty;
|
||||||
|
channels[i].resIndex = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Toltecs
|
} // End of namespace Toltecs
|
||||||
|
@ -57,6 +57,7 @@ public:
|
|||||||
void playSoundAtPos(int16 resIndex, int16 x, int16 y);
|
void playSoundAtPos(int16 resIndex, int16 x, int16 y);
|
||||||
void updateSpeech();
|
void updateSpeech();
|
||||||
void stopSpeech();
|
void stopSpeech();
|
||||||
|
void stopAll();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ToltecsEngine *_vm;
|
ToltecsEngine *_vm;
|
||||||
|
@ -309,7 +309,8 @@ void ToltecsEngine::drawScreen() {
|
|||||||
// Update the GUI when needed and it's visible
|
// Update the GUI when needed and it's visible
|
||||||
if (_cameraHeight + _guiHeight > 400) {
|
if (_cameraHeight + _guiHeight > 400) {
|
||||||
// HACK: Sanity check - happens when smoking the peace pipe in the
|
// HACK: Sanity check - happens when smoking the peace pipe in the
|
||||||
// Indian village.
|
// Indian village, when cheating at the game of cards and when
|
||||||
|
// the ladies find out that the sergeant is drinking again.
|
||||||
// FIXME: why does this happen? Fix the actual cause.
|
// FIXME: why does this happen? Fix the actual cause.
|
||||||
warning("Scene height (%d) and GUI height (%d) exceed the screen "
|
warning("Scene height (%d) and GUI height (%d) exceed the screen "
|
||||||
"height, cutting off the screen", _cameraHeight, _guiHeight);
|
"height, cutting off the screen", _cameraHeight, _guiHeight);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user