changed driver func, and moved free bitmap data after driver conversion

This commit is contained in:
Pawel Kolodziejski 2005-03-20 14:03:08 +00:00
parent 51b5e54e34
commit 34b9c11b0d
6 changed files with 7 additions and 7 deletions

View file

@ -92,15 +92,15 @@ void TextObject::createBitmap() {
}
}
_textObjectHandle = g_driver->prepareToTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
_textObjectHandle = g_driver->createTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
delete[] _textBitmap;
_created = true;
g_engine->registerTextObject(this);
}
void TextObject::destroyBitmap() {
if (_textObjectHandle) {
delete[] _textBitmap;
g_driver->destroyTextBitmap(_textObjectHandle);
delete _textObjectHandle;
_textObjectHandle = NULL;