Allegro

Allegro is, as their website states,

a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.

Installation

Install the allegro package.

For the development version, install the allegro-gitAUR package.

There is also a package for the legacy version of Allegro, allegro4, which you can use for source which it requires.

Note: Allegro 5 is not backwards compatible with Allegro 4. Developing new applications using Allegro 4 is discouraged.

Use

Once installed, include the necessary base header into necessary source files:

main.c
#include <allegro5/allegro5.h>

If your main function is inside a C++ file, then it must have this signature: int main(int argc, char **argv)

Troubleshooting

  • A common first mistake is to forget to link against the Allegro libraries. For an overview, use pkg-config --list-all .
  • Another trap for young players is to forget to include and initialise the necessary modules. Each module is a header, which needs to be included in the source file. Make sure you initialised it with the correct command and linked against the module, see above. For the exact details, refer to the manual.
gollark: If I make it delete data from ≥2 years ago, it'll only use 250MB at most, which is fine. So, since it's not 2 years yet, I can ignore it. Great!
gollark: Obviously, Electron.
gollark: I guess this depends on exactly what the overhead of a SQLite row is?
gollark: Oh, 117MB/year, I may have actually underestimated this.
gollark: It pings 7 websites every 30 seconds, and then generates something like 16 bytes of data each, so it should grow slower than Moore's law if ubq's disk is big enough.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.