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
23
votes
3 answers

Error: taking address of temporary [-fpermissive]

I've been looking into this for a few hours, to no avail. Basically I have struct rectangle { int x, y, w, h; }; rectangle player::RegionCoordinates() // Region Coord { rectangle temp; temp.x = colRegion.x + coordinates.x; temp.w =…
Jack Riales
  • 331
  • 1
  • 2
  • 4
14
votes
3 answers

Porting Autodesk Animator Pro to be cross platform

a previous relevant question from me is here Reverse Engineering old paint programs I have set up my base of operations here: http://animatorpro.org wiki coming soon. Okay, so now I have a 300,000 line legacy MSDOS codebase. It's sort of a "be…
Breton
  • 15,401
  • 3
  • 59
  • 76
13
votes
2 answers

Linking with -static-libstdc++ flag on MinGW 4.7.1

I try to compile with Allegro 5 on MinGW 4.7.1 using Code::Blocks 12.11 on Windows 7 with these compiler flags (In Project > Linker settings > Other linker settings): -static-libgcc -static-libstdc++ Result: unrecognized command line option…
topright gamedev
  • 2,617
  • 7
  • 35
  • 53
12
votes
8 answers

Render a vector graphic (.svg) in C++

My and a friend are working on a 2D game where the graphics will be .svg files and we will scale them appropriately either by rasterizing them first, or rendering them directly on a surface (which still would require rasterization at some…
Brad
  • 10,015
  • 17
  • 54
  • 77
11
votes
2 answers

CMake cannot find a static library using relative file paths

I'd like to play around with the Allegro library, but I can't seem to get my test project to link properly. To be exact, I'm getting cannot find -l<...> errors, where <...> is a file I specified using target_link_libraries. (See below for…
vvye
  • 1,208
  • 1
  • 10
  • 25
11
votes
0 answers

Allegro 5 crashes on calling al_clear_to_color(ALLEGRO_COLOR)

I'm starting at Allegro 5, but soon I got stuck in the second hello-world-like program I'm coding. After some debugging, I concluded that the program crashes when it calls the function al_clear_to_color(ALLEGRO_COLOR). I've tried linking allegro…
Bruno Garcia
  • 111
  • 6
10
votes
2 answers

Error on implicit cast from std:unique_ptr to bool

I am using Allegro to create a simple game. When I try to validate that my pointer to the display is not null I get a compiler error telling me error C2664: 'void validate(bool,std::string)' : cannot convert argument 1 from 'std::unique_ptr<…
janovak
  • 1,531
  • 2
  • 12
  • 22
7
votes
1 answer

Fatal error: 'QuickTime/QuickTime.h' file not found

I updated my macOS to Sierra, and some of my files vanished. The most important were Allegro's library. I am trying to install it again like the video (https://www.youtube.com/watch?v=UJtmJfWNTJY) which I saw the first time which I installed, but…
Aipi
  • 2,076
  • 4
  • 18
  • 27
6
votes
1 answer

How can I tell if the user tries to close the window in C++?

I need to break a while loop when the use clicks the close button on the window, but I don't know what to check for. I'm using allegro to run the GUI.
John Stimac
  • 5,335
  • 8
  • 40
  • 60
6
votes
3 answers

Private static data member in Cpp.. can only be initialized at its definition, yet invalid in-class initialization?

Initializing in the header file i get the following error: invalid in-class initialization of static data member of non-integral type 'bool [8]' if i try to initialize in the .cpp, i get: 'bool Ion::KeyboardInput::key [8]' is a static data member;…
ollo
  • 926
  • 1
  • 14
  • 33
5
votes
1 answer

How to add allegro Library in Clion and CMake?

I am trying to compile my game project using Clion IDE but I have a problem when porting allegro 5. I get this error: main.cpp:2:10: fatal error: 'allegro/allegro.h' file not found #include My CMakeLists…
NinjaDeveloper
  • 1,620
  • 3
  • 19
  • 51
5
votes
5 answers

C++: How do I prevent a function from accepting a pointer that is allocated in-line?

Couldn't figure out how to word the question accurately, so here's an example: Given this function prototype: void Foo(myClass* bar); I want to prevent this usage: Foo(new myClass()); and instead require a previously created object: myClass* bar =…
Casey
  • 10,297
  • 11
  • 59
  • 88
5
votes
1 answer

Playing sound file in C with Allegro5

I am trying to play wav file in C with allegro5 and I wrote below code: #include #include #include #include int main(int argc, char **argv){ ALLEGRO_DISPLAY…
Osman Villi
  • 346
  • 2
  • 24
4
votes
1 answer

Allegro5 al_create_display() crash on Mac OS Catalina

I am experiencing the following problem: I am able to compile my allegro application with a make file without errors, however when I run the ./file I get a "zsh: illegal hardware instruction ./file" message. I commented out some parts of the code…
ramkick
  • 49
  • 4
4
votes
2 answers

Allegro vs OpenGL speed/efficiency wise

I've been using Allegro 5 for a while now, and recently began looking into OpenGL with Freeglut. I would be ready to make a switch, but I would like to know if it's really worth it. Is OpenGL really much more efficient than Allegro5 for its drawing…
Johnathan
  • 787
  • 4
  • 10
  • 21
1
2 3
25 26