summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAlexander Baldeck <alexander@archlinux.org>2004-12-19 17:21:34 +0000
committerAlexander Baldeck <alexander@archlinux.org>2004-12-19 17:21:34 +0000
commita432321fb91bc0afbe802878fcd45adcee946a5b (patch)
tree6222ae0392064cc0250d41bc89bfc14b38892395 /src/gui
parentdd06564ec071884d1980d74c96dc136fc6205e19 (diff)
downloadmana-a432321fb91bc0afbe802878fcd45adcee946a5b.tar.gz
mana-a432321fb91bc0afbe802878fcd45adcee946a5b.tar.bz2
mana-a432321fb91bc0afbe802878fcd45adcee946a5b.tar.xz
mana-a432321fb91bc0afbe802878fcd45adcee946a5b.zip
killed a few warnings about depcrated functions. mostly textprintf
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chat.cpp14
-rw-r--r--src/gui/chat.h1
-rw-r--r--src/gui/gui.cpp4
-rw-r--r--src/gui/inventory.cpp10
4 files changed, 15 insertions, 14 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index f9c87a55..76d7ff0e 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -131,19 +131,19 @@ void Chat::chat_draw(BITMAP * bmp, int n, FONT * font) {
switch (line.own) {
case BY_GM :
- textprintf(bmp, font, 1, y, COLOR_BLUE, "Global announcement: ");
- textprintf(bmp, font, TEXT_GETWIDTH("Global announcement: "), y, COLOR_GREEN, line.text.c_str());
+ textprintf_ex(bmp, font, 1, y, COLOR_BLUE, -1, "Global announcement: ");
+ textprintf_ex(bmp, font, TEXT_GETWIDTH("Global announcement: "), y, -1, COLOR_GREEN, line.text.c_str());
break;
case BY_PLAYER :
- textprintf(bmp, font, 1, y, COLOR_YELLOW, line.nick.c_str());
- textprintf(bmp, font, line.width, y, COLOR_WHITE, line.text.c_str());
+ textprintf_ex(bmp, font, 1, y, COLOR_YELLOW, -1, line.nick.c_str());
+ textprintf_ex(bmp, font, line.width, y, COLOR_WHITE, -1, line.text.c_str());
break;
case BY_OTHER :
- textprintf(bmp, font, 1, y, COLOR_GREEN, line.nick.c_str());
- textprintf(bmp, font, line.width, y, COLOR_WHITE, line.text.c_str());
+ textprintf_ex(bmp, font, 1, y, COLOR_GREEN, -1, line.nick.c_str());
+ textprintf_ex(bmp, font, line.width, y, COLOR_WHITE, -1, line.text.c_str());
break;
default :
- textprintf(bmp, font, 1, y, COLOR_LIGHTBLUE, line.text.c_str());
+ textprintf_ex(bmp, font, 1, y, COLOR_LIGHTBLUE, -1, line.text.c_str());
}
if (i>=n) {
diff --git a/src/gui/chat.h b/src/gui/chat.h
index 2321eb09..ea482aa1 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -58,6 +58,7 @@
/** calculate text-width in pixel */
#define TEXT_GETWIDTH(str) (text_length(font, str))
+#define TEXT_OUT(bmp, col, str) (textprintf_ex(bmp, font, 1, y, col, str, 1))
/** job dependend identifiers (?) */
#define SKILL_BASIC 0x0001
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 270cbb5e..49bf35e3 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -1120,9 +1120,9 @@ int tmw_dialog_proc(int msg, DIALOG *d, int c) {
}
draw_skinned_rect(gui_bitmap, &gui_skin.dialog.bg, d->x, d->y, d->w, d->h);
rtm = text_mode(-1);
- textprintf_centre(gui_bitmap, font,
+ textprintf_centre_ex(gui_bitmap, font,
d->x + d->w/2,
- d->y + (gui_skin.dialog.bg.grid[1]->h - text_height(font))/2, d->fg, "%s", d->dp);
+ d->y + (gui_skin.dialog.bg.grid[1]->h - text_height(font))/2, d->fg, -1, "%s", d->dp);
text_mode(rtm);
break;
}
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp
index d82db607..807fae15 100644
--- a/src/gui/inventory.cpp
+++ b/src/gui/inventory.cpp
@@ -57,7 +57,7 @@ void TmwInventory::draw(BITMAP * buffer) {
masked_blit((BITMAP *)itemset[items[i].id-500].dat, gui_bitmap, 0, 0, inventory_dialog[0].x+24*i, inventory_dialog[0].y+26, 22, 22);
else
masked_blit((BITMAP *)itemset[0].dat, gui_bitmap, 0, 0, inventory_dialog[0].x+24*i, inventory_dialog[0].y+26, 22, 22);
- textprintf(gui_bitmap, font, inventory_dialog[0].x+24*i, inventory_dialog[0].y+44, makecol(0,0,0), "%i", items[i].quantity);
+ textprintf_ex(gui_bitmap, font, inventory_dialog[0].x+24*i, inventory_dialog[0].y+44, makecol(0,0,0), -1, "%i", items[i].quantity);
}
}
}
@@ -84,9 +84,9 @@ void TmwInventory::draw(BITMAP * buffer) {
use_item(itemMeny_i,items[itemMeny_i].id);
itemMeny = 0;
}
- textprintf(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y, makecol(255,237,33), "Use item");
+ textprintf_ex(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y, makecol(255,237,33), -1, "Use item");
} else {
- textprintf(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y, MAKECOL_BLACK, "Use item");
+ textprintf_ex(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y, MAKECOL_BLACK, -1, "Use item");
}
if(inventory_dialog[0].y+itemMeny_y+10 < mouse_y && inventory_dialog[0].y+itemMeny_y+20 > mouse_y) {
if(mouse_b&1)
@@ -94,9 +94,9 @@ void TmwInventory::draw(BITMAP * buffer) {
drop_item(itemMeny_i,1);
itemMeny = 0;
}
- textprintf(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y+10, makecol(255,237,33), "Del item");
+ textprintf_ex(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y+10, makecol(255,237,33), -1, "Del item");
} else {
- textprintf(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y+10, MAKECOL_BLACK, "Del item");
+ textprintf_ex(buffer, font, inventory_dialog[0].x+itemMeny_x, inventory_dialog[0].y+itemMeny_y+10, MAKECOL_BLACK, -1, "Del item");
}
}