Advertisement

Alfont problems

Started by August 13, 2004 09:03 AM
0 comments, last by 23yrold3yrold 20 years, 6 months ago
Alfont - doesn't fail, but only displays a long black block and no text!

#include <allegro.h>
#include <alfont.h>

// Main - entry point for the application
int main()
{
    allegro_init();
    
    install_keyboard();
    install_timer();
    install_mouse();

    set_color_depth(32);
    set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1024, 768, 0, 0);
    set_display_switch_mode(SWITCH_PAUSE);
    set_window_title("Alfont Test");

    ALFONT_FONT* User_Font;
    if(alfont_init() != ALFONT_OK)
    {
        allegro_message("Failed to initialise AlFont!");
    }

    
    User_Font = alfont_load_font("E:\\Glenn.TTF");
    if(User_Font == NULL)
    {
        allegro_message("Failed");
    }
    alfont_set_font_size(User_Font, 60);
    alfont_textout_aa(screen, User_Font, "Test Message", 200, 200, makecol(255,255,255));

    show_mouse(screen);

    readkey();

    alfont_destroy_font(User_Font);
    alfont_exit();
    allegro_exit();

    return(0);
}
END_OF_MAIN();
Any ideas?
Answered. [smile]

Jesus saves ... the rest of you take 2d4 fire damage.

This topic is closed to new replies.

Advertisement