From 58ec0f0aadd5228732a3c5915b9a94ec00e9cc53 Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Fri, 21 Jan 2005 21:55:54 +0000 Subject: problems solved: - Allow more than one script work at once - Proper implementation of address methods some opcodes may be broken - cause work in progress todo: rewrite opcodes with new address functionality svn-id: r16604 --- saga/font.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'saga/font.cpp') diff --git a/saga/font.cpp b/saga/font.cpp index b55d33f973..a364fb3ad2 100644 --- a/saga/font.cpp +++ b/saga/font.cpp @@ -47,7 +47,7 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) { _fonts = (FONT **)malloc(_vm->getFontsCount() * sizeof(*_fonts)); if (_fonts == NULL) { - error("Font::Font(): Memory allocation failure."); + memoryError("Font::Font"); } for (i = 0; i < _vm->getFontsCount(); i++) { @@ -104,7 +104,7 @@ int Font::loadFont(uint32 fontResourceId) { // Create new font structure font = (FONT *)malloc(sizeof(*font)); if (font == NULL) { - error("Font:loadFont(): Memory allocation error."); + memoryError("Font::loadFont"); } // Read font header @@ -121,7 +121,7 @@ int Font::loadFont(uint32 fontResourceId) { // Create normal font style normal_font = (FONT_STYLE *)malloc(sizeof(*normal_font)); if (normal_font == NULL) { - error("Font::loadFont(): Memory allocation error."); + memoryError("Font::loadFont"); } normal_font->font_free_p = fontres_p; @@ -207,7 +207,7 @@ FONT_STYLE *Font::createOutline(FONT_STYLE *src_font) { new_font = (FONT_STYLE *)malloc(sizeof(*new_font)); if (new_font == NULL) { - error("Font::createOutline(): Memory allocation error."); + memoryError("Font::createOutline"); } memset(new_font, 0, sizeof(*new_font)); @@ -250,7 +250,7 @@ FONT_STYLE *Font::createOutline(FONT_STYLE *src_font) { new_font_data = (unsigned char *)malloc(new_font_data_len); if (new_font_data == NULL) { - error("Font::createOutline(): Memory allocation error."); + memoryError("Font::createOutline"); } memset(new_font_data, 0, new_font_data_len); -- cgit v1.2.3