From 528eedb2de57eae737d0f7135b77a860d1b9eb41 Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Thu, 14 Jul 2005 17:46:21 +0000 Subject: font & text related changes: -rewritten font loading -actors box text output implemented -many fixes -implemented nonactors textoutput svn-id: r18542 --- saga/scene.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'saga/scene.cpp') diff --git a/saga/scene.cpp b/saga/scene.cpp index 753a758dbf..5f738b20e7 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -36,7 +36,6 @@ #include "saga/render.h" #include "saga/rscfile_mod.h" #include "saga/script.h" -#include "saga/text.h" #include "saga/sound.h" #include "saga/music.h" @@ -95,15 +94,7 @@ Scene::Scene(SagaEngine *vm) : _vm(vm), _initialized(false) { debug(3, "First scene set to %d.", _firstScene); - debug(3, "LUT has %d entries.", _sceneCount); - - // Create scene module text list - _textList = _vm->textCreateList(); - - if (_textList == NULL) { - warning("Scene::Scene(): Error: Couldn't create scene text list"); - return; - } + debug(3, "LUT has %d entries.", _sceneCount); _sceneLoaded = false; _sceneNumber = 0; @@ -129,6 +120,18 @@ Scene::~Scene() { } } +void Scene::drawTextList(Surface *ds) { + TextListEntry *entry; + + for (TextList::iterator textIterator = _textList.begin(); textIterator != _textList.end(); ++textIterator) { + entry = (TextListEntry *)textIterator.operator->(); + if (entry->display != 0) { + _vm->_font->textDraw(entry->fontId, ds, entry->text, entry->point, entry->color, entry->effectColor, entry->flags); + } + } +} + + void Scene::startScene() { SceneQueueList::iterator queueIterator; LoadSceneParams *sceneQueue; @@ -953,7 +956,7 @@ void Scene::endScene() { _vm->_isoMap->freeMem(); _vm->_events->clearList(); - _vm->textClearList(_textList); + _textList.clear(); _sceneLoaded = false; -- cgit v1.2.3