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
0
votes
0 answers

why is the warning sign popping out? in lisp programming

Why is this "Warning: Free reference to undeclared variable ARAD assumed special." popping out? (defstruct Place() (pathCost 10) (childName 'none) ) (setf Arad(make-Place :childName 'Zerind)) (describe Arad)
Michimcchicken
  • 543
  • 1
  • 6
  • 21
0
votes
0 answers

Main Menu for 2d game in ALLEGRO5

I've big problem with my university project. I tried to make simple game in Allegro5, but I've stopped at making Main Menu. I've basic code, but on 4 possibility: Start Game, Options, Credits,Exit. I can see just one of them ( exit ). Don't know how…
0
votes
1 answer

Drawing in a graphics window from a second thread in C

I am creating my first graphics program in C, using Codeblocks. I am trying to run two graphics loops simultaneously using two threads. One is for keyboard controls and the other is to move a rectangle vertically. I have been trying to pass a…
SirCipher
  • 933
  • 1
  • 7
  • 16
0
votes
1 answer

Problems with compiling Open Surge in Linux Mint 17 x86_64: skipping incompatible libraries

I am using Linux Mint 17 x86_64 and I am getting the following warnings while compiling the modified library Alfont for open source game Open Surge (based on Allegro library): danil@linuxmint ~/opensnc-code-opensurge/alfont $ gcc -fPIC -DPIC -O2…
Daniel D
  • 87
  • 2
  • 4
  • 13
0
votes
1 answer

Allegro 5 detects long key press as several key presses

In the code block below I am trying to move a rectangle once for every key-press but the rectangle moves as long as I hold down a key. ALLEGRO_EVENT ev; while(!done) { al_wait_for_event(event_queue, &ev); if(ev.type ==…
nevermore
  • 1
  • 5
0
votes
1 answer

allegro 5 writing files when using physfs

i am currently trying to figure out a way to write a file (an allegro configuration file to be exact) to a mounted zip-file using physfs and allegro 5. reading the config file works fine, but when it comes to writing the changed config, nothing…
Hannes
  • 1
0
votes
2 answers

Passing a variable to load a bitmap file?

I want to pass a variable in bitmap filename, but to load a bitmap it needs a const char*. Is it possible to convert my array to load the bitmap file or are there any other solutions to my problem? #include #include…
AJ_83
  • 289
  • 1
  • 8
  • 22
0
votes
1 answer

C++ - Why do [pointer] and this->[pointer] give different values?

I have a GameWorld class, in which I have ALLEGRO_DISPLAY *display; I'm trying to define an object that has a pointer to the GameWorld object, which it then uses to access display. In my struggles to get that to reference properly, I noticed that my…
0
votes
2 answers

Allegro window mode

I'm stuck creating a window that fits my map. Allegro 4.2 shows just 70% of my map; I've tried changing the size of the windows but it stops working at my map size, and I've also tried FULLSCREEN in set_gfx_mode. This is the code that I'm…
joaortizro
  • 11
  • 1
  • 2
0
votes
2 answers

Name conflict between libraries

I'd like to include two libraries: and in my project, but I can't compile it. The IDE shows such errors: error C2371: 'BITMAP' : redefinition; different basic types error C2731: 'WinMain' : function cannot be overloaded error…
0
votes
1 answer

masked_blit Allegro 4.2.1

when I using masked_blit function: masked_blit( animations[which], buffer, 0, 0, x, y, animations[which]->w, animations[which]->h ) I get wrong colors on my buffer, my bmp is something like shifted or shocked. this is my problem. thanks for help
0
votes
1 answer

how to include Allegro5 into a project for the first time?

hi i am trying to download allegro, as stated in the title, i am using this guys youtube video for help and it has been more helpful than i thought it'd be, but of course i run into some sort of error. in the video, he tells you to go into the…
0
votes
0 answers

Allegro 5 strange behavior on drawing more scaled bitmap

I was trying to create a card solitaire in C with Allegro 5. void deck_printout(deck*d) { int i; al_clear_to_color(stdcolor); for(i=0;i<40;i++){ al_draw_scaled_bitmap(d->cards[i].img, d->cards[i].xpos, …
0
votes
0 answers

Allegro swap object

I'm trying to swap to objects of class. It's a puzzle game something like http://www.neos-guide.org/sites/default/files/Fifteen_puzzle.png. I'm using std::swap but it doesn't work. Here's code: if (puzzle[i-1][j].getNum() == 16) { …
amUser
  • 27
  • 4
0
votes
1 answer

Allegro 5 Drawing at wrong time

I'm having a problem with drawing in Allgero 5 using c++. I draw the bitmaps the do the transformations then use the transformations and flip the buffers but when I turn the FPS cap down I see that it first draws everything the applies the…