MADS: Fixes for drawing scene elements

This commit is contained in:
Paul Gilbert 2014-03-08 16:06:37 -05:00
parent 5536b8a933
commit 8cd85f3a00
3 changed files with 3 additions and 4 deletions

View File

@ -340,7 +340,7 @@ int TextDisplayList::add(int xp, int yp, uint fontColor, int charSpacing,
void TextDisplayList::setDirtyAreas() {
Scene &scene = _vm->_game->_scene;
for (uint idx = 0, dirtyIdx = DIRTY_AREAS_TEXT_DISPLAY_IDX; dirtyIdx < DIRTY_AREAS_SIZE; ++idx, ++dirtyIdx) {
for (uint idx = 0, dirtyIdx = DIRTY_AREAS_TEXT_DISPLAY_IDX; dirtyIdx < size(); ++idx, ++dirtyIdx) {
if (((*this)[idx]._expire >= 0) || !(*this)[idx]._active)
scene._dirtyAreas[dirtyIdx]._active = false;
else {
@ -353,7 +353,7 @@ void TextDisplayList::setDirtyAreas() {
void TextDisplayList::setDirtyAreas2() {
Scene &scene = _vm->_game->_scene;
for (uint idx = 0, dirtyIdx = DIRTY_AREAS_TEXT_DISPLAY_IDX; dirtyIdx < DIRTY_AREAS_SIZE; ++idx, ++dirtyIdx) {
for (uint idx = 0, dirtyIdx = DIRTY_AREAS_TEXT_DISPLAY_IDX; idx < size(); ++idx, ++dirtyIdx) {
if ((*this)[idx]._active && ((*this)[idx]._expire >= 0)) {
scene._dirtyAreas[dirtyIdx].setTextDisplay(&(*this)[idx]);
scene._dirtyAreas[dirtyIdx]._textActive = ((*this)[idx]._expire <= 0) ? 0 : 1;

View File

@ -422,7 +422,7 @@ void Scene::doFrame() {
}
// TODO: Verify correctness of frame wait
_vm->_events->waitForNextFrame();
}
void Scene::drawElements(bool transitionFlag, bool surfaceFlag) {

View File

@ -233,7 +233,6 @@ DirtyAreas::DirtyAreas(MADSEngine *vm) : _vm(vm) {
}
void DirtyAreas::merge(int startIndex, int count) {
error("TODO: DirtyAreas::merge");
if (startIndex >= count)
return;