Questions tagged [allegro]

Allegro is a low-level game programming library distributed freely, supporting desktop and mobile platforms. It is coded in C and offers several language bindings.

The latest stable version is 5.0. It is completely rewritten with a new API and full hardware accelerated graphics via OpenGL or D3D. There is official support for Windows, OS X, Linux, and iOS. There is also an unstable branch 5.1.

Links

383 questions
3
votes
1 answer

How to load OpenGL into Visual Studio 2012

I don't understand how to load OpenGl so that I can start using the functions in it. At first I thought it would be as simple as Allegro, where I just specify the location of the library, but I guess not. Can someone either teach me how to install…
Jasper Lu
  • 173
  • 1
  • 2
  • 9
3
votes
2 answers

How can you efficiently create an allegro 5 title menu?

I'm working on my first game in Allegro 5, I've got the title menu rendering as such, however I want to add clickable text in the menu. How would I make it so that, when you hover over the text you can click it? I'm thinking having a for statement…
Bugster
  • 1,552
  • 8
  • 34
  • 56
3
votes
2 answers

How to link allegro 4.4 with visual studio 2010

I have been trying for several hours now to link allegro 4.4 with visual studio 2010. I am using microsoft visual C++ 2010 express edition. Here is what I did: I downloaded the windows binaries from http://www.allegro.cc/files/?v=4.4 (I downloaded…
rmaes4
  • 555
  • 9
  • 22
3
votes
1 answer

How can I allocate and re-use a C struct from Haskell?

In particular, I'm trying to learn Haskell's foreign function interface by writing a binding to the Allegro game library. In Allegro's native C, the main event loop looks something like this: // initialize event struct ALLEGRO_EVENT event; // main…
damien
  • 902
  • 1
  • 7
  • 12
2
votes
2 answers

what I'm including wrong ? undefined reference to al_init_image_addon error,

what I'm including wrong ? I am using codeblocks + allegro5 + ubuntu 11.10 and getting this 2 errors undefined reference to 'al_init_image_addon' undefined reference to `al_init_primitives_addon'| I did install allegro5 correctly with all the…
HoNgOuRu
  • 717
  • 4
  • 13
  • 26
2
votes
4 answers

C++: Erasing an iterator from a map and then incrementing to the next iterator

This method causes an abort error: "map/set iterator not incrementable." Due to that after the if fails and a vaild iterator that should be erased is determined, (and is), continuing to the next iterator in the map via ++_iter fails because _iter is…
Casey
  • 10,297
  • 11
  • 59
  • 88
2
votes
2 answers

Compiler detects allegro.h, but not allegro_primitives.h

When I compile my Allegro 5 program using g++, it complains about undefined reference to 'al_init_primitives_addon', al_draw_filled_rectangle and other such functions that are found in allegro_primitives.h. It does not complain about functions in…
awesomeguy
  • 290
  • 3
  • 10
2
votes
0 answers

Getting memory leaks in simple C/allegro5 game

My first post here. I'm beginner programmer. I'm compiling with clang 13.0.1. on Lenovo ThinkPad5 with AMD Ryzen 7 4800U with integrated Radeon Graphics OS: Manjaro linux with kernel 5.10.105 I'm using package allegro 5.2.7.0-2 My compile…
artqs01
  • 21
  • 3
2
votes
1 answer

allegro library 4.4 korean broken

I am working with allegro 4.4 library. When I print a Korean character, the character is broken. English character isn't in Allegro Manual. Allegro says "Allegro uses UTF8 encoding by default." I have no idea of what was wrong with the following…
kim taeyun
  • 1,837
  • 2
  • 24
  • 49
2
votes
1 answer

Allegro draw_sprite()

I have a 114x114 bitmap called "x.bmp" in my debug folder and this simple code #include BITMAP *Sprite; int main(){ allegro_init(); install_keyboard(); set_color_depth(16); set_gfx_mode( GFX_AUTODETECT, 640, 480, 0,…
Mark Lalor
  • 7,820
  • 18
  • 67
  • 106
2
votes
0 answers

C++ Allegro 5 Symbol not found: __al_mangled_main error

So I have a C++ game program which is supposed to load dynamic class/library loading and all reference to graphic libraries must only be in the respective libraries I'm creating. Now I created the one lib in allegro 5 and the Makefile looks like…
sassy_rog
  • 1,077
  • 12
  • 30
2
votes
0 answers

Is there a way to create a semi-transparent window with Allegro?

Is there a way to create a display (a window) using allegro, in such way that the background of the window would be translucent. In SDL2 we can achieve that result using this little bit of code: SDL_SetWindowOpacity(window, 0.5);
2
votes
1 answer

Setting up allegro

Can anyone tell me how to set up allegro for devc++?
umair
  • 21
  • 1
  • 2
2
votes
1 answer

I can't get a fast and easy way to get keyboard events in allegro

I am trying to make a text box in allegro and need a way of getting the ascii keycodes from the key presses. The ev.type == ALLEGRO_EVENT_KEY_DOWN does not always work. I have tried getting the event to work faster but it is still slow. If there is…
Main menu
  • 33
  • 4
2
votes
2 answers

Allegro question, how can I get rid of the cmd window?

I've made a small game in Allegro, but every time I run the .exe file it opens both the allegro window for the graphics but also a command line window even though I don't have anything that prints to it. It's kind ugly to have the cmd window next…
flammable
  • 23
  • 3
1 2
3
25 26