Category : allegro5

After installing allegro library on arch I found that allegro_native_dialog.h header file is not present. So I checked /usr/include/allegro5 folder and as expected it is not there. So I searched on github and found the code and saved in a file called allegro_native_dialog.h in /usr/include/allegro5 folder. But while using it gives so many warnings which ..

Read more

Description: The problem that I had with Allegro was that there was some kind of weird input delay where all of the events (keyboard, display, etc.) were only processed after a few seconds. I have pinpointed the source of the problem to the main loop since the if statement here actually fixes the problem: if ..

Read more

I created a C++ game that uses images from a folder in the same parent directory. /game_folder —-/Images ——–icon1.png ——–icon2.png —-game.cpp Program uses Allegro 5 library to include images: ALLEGRO_BITMAP* icon1 = al_load_bitmap("Images/icon1.png"); ALLEGRO_BITMAP* icon2 = al_load_bitmap("Images/icon2.png"); And this works great. However now I need to place this program into ROS/catkin package ‘beginner_tutorials’. If I ..

Read more

Allegro5 cannot seem to be able to decode png images for my game project. This function: ALLEGRO_BITMAP* BrushCollection::LoadBitmapFromFile(const char* fileName) { ALLEGRO_PATH* path = al_get_standard_path(ALLEGRO_EXENAME_PATH); al_append_path_component(path, "assets"); al_set_path_filename(path, fileName); ALLEGRO_BITMAP* bitmap = al_load_bitmap(al_path_cstr(path, ”)); allegro_init(bitmap, L"UI Bitmap"); return bitmap; } returns NULL. I know image paths are correct because the same code works on Windows. ..

Read more

I am trying to get started with the Allegro game development library for C++ on Mac OS Catalina 10.15.4, but I am having some issues with compilation and linking. The following code compiles: #include <stdio.h> #include <allegro5/allegro.h> #include <allegro5/allegro_ttf.h> #include <allegro5/allegro_font.h> #include <iostream> #define ScreenWidth 375 #define ScreenHeight 667 int main(int argc, char *argv[]){ al_init(); ..

Read more