From 06c46fe423616f516648c67279f5c204398a2bd2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 30 Oct 2004 22:13:48 +0000 Subject: Let Saga::SURFACE inherit from SURFACE svn-id: r15702 --- saga/text.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'saga/text.cpp') diff --git a/saga/text.cpp b/saga/text.cpp index f48ab11806..be14528995 100644 --- a/saga/text.cpp +++ b/saga/text.cpp @@ -59,8 +59,8 @@ int SagaEngine::textDraw(int font_id, SURFACE *ds, const char *string, int text_ text_x = TEXT_CENTERLIMIT; } - if (text_x > ds->buf_w - TEXT_CENTERLIMIT) { - text_x = ds->buf_w - TEXT_CENTERLIMIT; + if (text_x > ds->w - TEXT_CENTERLIMIT) { + text_x = ds->w - TEXT_CENTERLIMIT; } if (text_x < (TEXT_MARGIN * 2)) { @@ -70,12 +70,12 @@ int SagaEngine::textDraw(int font_id, SURFACE *ds, const char *string, int text_ string_w = _font->getStringWidth(font_id, string, string_len, flags); - if (text_x < (ds->buf_w / 2)) { + if (text_x < (ds->w / 2)) { // Fit to right side fit_w = (text_x - TEXT_MARGIN) * 2; } else { // Fit to left side - fit_w = ((ds->buf_w - TEXT_MARGIN) - text_x) * 2; + fit_w = ((ds->w - TEXT_MARGIN) - text_x) * 2; } if (fit_w >= string_w) { -- cgit v1.2.3