Hey guys I've just been playing around with allegro 5, and playing with examples from codingmadeeasy, this is an example from him, and It works fine when he compiles it. He is however using vs and i'm using codeblocks. The code is
[code]// C++ ALLEGRO 5 MADE EASY TUTORIAL 5 - FONT & TEXT
#define ScreenWidth 800
#define ScreenHeight 600
al_show_native_message_box(NULL, NULL, "Error", "Could not initialize Allegro 5", NULL, ALLEGRO_MESSAGEBOX_ERROR);
display = al_create_display(ScreenWidth, ScreenHeight);
al_show_native_message_box(NULL, NULL, "Error", "Could not create Allegro 5 display", NULL, ALLEGRO_MESSAGEBOX_ERROR);
// You generally want to do this after you check to see if the display was created. If the display wasn't created then there's
// no point in calling this function
al_set_window_position(display, 200, 100);
ALLEGRO_FONT *font = al_load_font("font.ttf", 36, NULL);
al_draw_text(font, al_map_rgb(44, 117, 255), ScreenWidth / 2, ScreenHeight / 2, ALLEGRO_ALIGN_CENTRE, "www.codingmadeeasy.ca");
The error given is ..
Assertion failed C:\ ...
expression : Font
So my original though was maybe I needed to use my own font, So I downloaded it from urban fonts, placed it in project folder and set it up to use it, the font name is molten and was set accordingly and doesn't give the error when it pops up...but after a few seconds it crashes..
and advice/help appreciated.
thanks for reading.