diff options
author | 2010-10-23 06:39:13 +0000 | |
---|---|---|
committer | 2010-10-23 06:39:13 +0000 | |
commit | 43eca9d9c87831cf3efc7119a1c1cc46f9fd7ac0 (patch) | |
tree | 085ba17f5971125abbf106ca00c66e2fb67eaeb4 /src/emu/ui.c | |
parent | b6647f7ae1d6d4d957c50fc9d4cef581e8425fd4 (diff) |
Convert rendfont to C++.
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 872b34b43fe..61031514f1a 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -240,7 +240,7 @@ int ui_init(running_machine *machine) machine->add_notifier(MACHINE_NOTIFY_EXIT, ui_exit); /* allocate the font and messagebox string */ - ui_font = render_font_alloc(*machine, "ui.bdf"); + ui_font = machine->render().font_alloc("ui.bdf"); /* initialize the other UI bits */ ui_menu_init(machine); @@ -263,8 +263,7 @@ int ui_init(running_machine *machine) static void ui_exit(running_machine &machine) { /* free the font */ - if (ui_font != NULL) - render_font_free(ui_font); + machine.render().font_free(ui_font); ui_font = NULL; } @@ -424,7 +423,7 @@ render_font *ui_get_font(void) float ui_get_line_height(running_machine &machine) { - INT32 raw_font_pixel_height = render_font_get_pixel_height(ui_font); + INT32 raw_font_pixel_height = ui_font->pixel_height(); render_target &ui_target = machine.render().ui_target(); INT32 target_pixel_height = ui_target.height(); float one_to_one_line_height; @@ -469,7 +468,7 @@ float ui_get_line_height(running_machine &machine) float ui_get_char_width(running_machine &machine, unicode_char ch) { - return render_font_get_char_width(ui_font, ui_get_line_height(machine), machine.render().ui_aspect(), ch); + return ui_font->char_width(ui_get_line_height(machine), machine.render().ui_aspect(), ch); } @@ -480,7 +479,7 @@ float ui_get_char_width(running_machine &machine, unicode_char ch) float ui_get_string_width(running_machine &machine, const char *s) { - return render_font_get_utf8string_width(ui_font, ui_get_line_height(machine), machine.render().ui_aspect(), s); + return ui_font->utf8string_width(ui_get_line_height(machine), machine.render().ui_aspect(), s); } |