LAB: Handle intro font in intro constructor and destructor

This commit is contained in:
Strangerke 2015-12-24 02:03:00 +01:00
parent f4bc3c0ab4
commit ba243ea587
2 changed files with 6 additions and 5 deletions

View file

@ -43,7 +43,11 @@ namespace Lab {
Intro::Intro(LabEngine *vm) : _vm(vm) { Intro::Intro(LabEngine *vm) : _vm(vm) {
_quitIntro = false; _quitIntro = false;
_introDoBlack = false; _introDoBlack = false;
_font = nullptr; _font = _vm->_resource->getFont("F:Map.fon");
}
Intro::~Intro() {
_vm->_graphics->closeFont(&_font);
} }
void Intro::introEatMessages() { void Intro::introEatMessages() {
@ -316,8 +320,6 @@ void Intro::play() {
_vm->_graphics->blackAllScreen(); _vm->_graphics->blackAllScreen();
_vm->updateMusicAndEvents(); _vm->updateMusicAndEvents();
_font = _vm->_resource->getFont("F:Map.fon");
_vm->_anim->_noPalChange = true; _vm->_anim->_noPalChange = true;
nReadPict("Intro.1"); nReadPict("Intro.1");
_vm->_anim->_noPalChange = false; _vm->_anim->_noPalChange = false;
@ -435,8 +437,6 @@ void Intro::play() {
_vm->_graphics->rectFill(0, 0, _vm->_graphics->_screenWidth - 1, _vm->_graphics->_screenHeight - 1); _vm->_graphics->rectFill(0, 0, _vm->_graphics->_screenWidth - 1, _vm->_graphics->_screenHeight - 1);
_vm->_anim->_doBlack = true; _vm->_anim->_doBlack = true;
} }
_vm->_graphics->closeFont(&_font);
} }
} // End of namespace Lab } // End of namespace Lab

View file

@ -36,6 +36,7 @@ namespace Lab {
class Intro { class Intro {
public: public:
Intro(LabEngine *vm); Intro(LabEngine *vm);
~Intro();
/** /**
* Does the introduction sequence for Labyrinth. * Does the introduction sequence for Labyrinth.