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
1 answer

How do I get allegro on Orwell Dev C++

I'm not using bloodshed dev c++ , instead I'm using orwell dev c++ , I got Allegro 5 and installed the package (as a .zip file) but it says 'allegro5/allegro.h: No such file or directory'. Maybe I'm using the wrong type of header or is it another…
user5561831
0
votes
1 answer

Allegro/C++: Screen is null pointer

Just installed Allegro 4.2.2, and I'm trying to run a simple program. When launched, screen is totally black, but input normally reacts to keys. I found that screen is 0x00000000 (a nullptr). Anyway, set_gfx_mode returns no error. MinGW doesn't yell…
0
votes
1 answer

_main not defined on Mac OS X 10.11 in c++

I am currently writing a c++ game using allegro 5.0 and c++. I will eventually get it working on mac, linux, windows, and possibly android and iPhone. Currently it compiles and runs on linux (tested on arch linux latest), but on mac there is a…
0
votes
1 answer

How can I zoom in and zoom out in Allegro 4.4 game programming library?

void al_scale_transform(ALLEGRO_TRANSFORM *trans, float sx, float sy); I guess this function zoom in and zoom out in allegro 5.But I use allegro 4.4. How can I zoom in and zoom out in Allegro 4.4 game programming library? Which function?
o_O
  • 51
  • 7
0
votes
1 answer

allegro - How to draw limited part of display

I'm coding a game like agar.io and I want to create a world like 5000x5000 but for example player can see only 900x600 part. Namely player must have a scope. My background is not a bitmap, I'm basicaly make backbuffer black, draw primitives on it…
user4612022
0
votes
1 answer

trying to call class function character.Draw(buffer)

im doing a project at the moment and trying to draw_sprite(example.bmp,NULL) to the screen via a class function of Character.Draw(Buffer). It keeps crashing and would like to know why it doesn't work. It works when im not using the class function. …
0
votes
1 answer

Allegro 5 ALLEGRO_BITMAP to text file

I'm currently working on a video game project in C++ using Allegro 5 as my graphics library. I store my graphic and font assets in subfolders within the root folder of the .exe. To use them in the program, I have an initGraphics() function that…
CaptainTid
  • 21
  • 4
0
votes
0 answers

Seg fault with Allegro bitmaps

I am using liballegro4.2-dev on Ubuntu 14.04 to (hopefully) write a simple game. My code compiles fine using the command g++ Picker.cpp -o out ``allegro-config --libs, but when I run the code I always get the error message Shutting down Allegro due…
user266929
  • 11
  • 2
0
votes
0 answers

Allegro 4 text output

I'm trying to display the text contained in a text file using Allegro 4, I have no trouble doing it while on the console on C++, but when I try to switch from cout<< to textprintf I get some errors, here's the code of the part I have trouble…
0
votes
1 answer

How to assign a unique_ptr with a custom deleter

I am trying to pass a pointer to a function that then sets a unique_ptr inside a struct to the pointer passed in. However, I get the following compile error on the last line of the function. error C2280: 'std::unique_ptr<…
janovak
  • 1,531
  • 2
  • 12
  • 22
0
votes
2 answers

Rotate image according to the mouse

I'm trying to rotate an image according to the mouse. The idea is a spaceship game. The tip of the spaceship follows the mouse cursor, depending on the cursor position the spacecraft rotates an angle. The Allegro rotation function I am…
user50811
  • 11
  • 1
0
votes
2 answers

How to shorten linking process in Visual Studio

I'm working with allegro library in Visual Studio C++. And every time I'm creating project I must go through following proccess. Right click your project under Solution Explorer on the right, then select Properties. Under Configuration…
dagi12
  • 449
  • 1
  • 5
  • 20
0
votes
3 answers

Random' crashes when using delete

I'm trying to write my first simple game using C++ and Allegro 4.2.3, but I'm getting crashes that sometimes occur when I change the game-state. When a state is started it uses the 'new' operator to make it, and then uses 'delete' before switching…
Nin
  • 11
  • 2
0
votes
0 answers

installed allegro to use with c++ on Ubuntu. #include says can't find file

used these instructions https://wiki.allegro.cc/index.php?title=Ubuntu_and_Allegro_5 and all seemed to work. but in my code I've used #include and it says "fatal error: allegro: no such file or directory". I've tried #include etc but same problem.…
user3376851
  • 149
  • 10
0
votes
0 answers

Dev c++ and allegro 5.0.x

I cannot manage to install Allegro 5 into Dev c++ 5.9 by Orwell or the original version on bloodshed.I install Dev C++ into the address already typed in(c drive) and then I used the built in devpak download and installer but whenever I try to…