In order to locate things like the config and translation files, Allegro needs to know the path to your executable. Since there is no standard way to find that, it needs to capture a copy of your argv[] parameter, and it does this with some preprocessor macro trickery. Unfortunately it can't quite pull this off without a little bit of your help, so you will have to write END_OF_MAIN() right after your main() function. Pretty easy, really, and if you forget, you'll get a nice linker error about a missing _mangled_main function to remind you :-)
Under Unix resources are searched for in many different paths. When a configuration resource is looked for, it is usually tried with the variations `name.cfg' or `.namerc' in multiple paths: the current directory, the directory pointed to by the ALLEGRO environment variable, the user's home directory, one or more global system directories which usually only the root user has access to and any custom paths set up with set_allegro_resource_path(). Text files, like the main allegro config file or a language text translation files are looked for in the following places:
Binary resources like the keyboard mappings (keyboard.dat) or the language translation files packfile (language.dat) are looked for in:./allegro.cfg $ALLEGRO/allegro.cfg ~/allegro.cfg ~/.allegrorc /etc/allegro.cfg /etc/allegrorc
Note that if you have installed Allegro from the source distribution with the typical `make install', global files like `keyboard.dat', `language.dat' and `allegro.cfg' will not have been installed. As a system administrator you are required to install them manually wherever you prefer to have them. If you suspect that an Allegro program is somehow not finding the correct configuration file, you could try using the following command:./keyboard.dat $ALLEGRO/keyboard.dat ~/keyboard.dat /etc/keyboard.dat /usr/share/allegro/keyboard.dat /usr/local/share/allegro/keyboard.dat
The strace program traces system calls and signals. By default it outputs the information to stderr, so that's why we redirect it to stdin with `2>&1'. Since we are interested only in files being (un)successfully opened, we restrict the output of the log to stat or open calls with the extended grep command. You could add another grep to filter only lines with text like `keyboard' or `allegro'.strace program 2>&1|egrep "(open|stat)"
See also: set_gfx_mode, GFX_*/X.
See also: set_gfx_mode, GFX_*/Linux.
DIGI_AUTODETECT - let Allegro pick a digital sound driver DIGI_NONE - no digital sound DIGI_OSS - Open Sound System DIGI_ESD - Enlightened Sound Daemon DIGI_ARTS - aRts (Analog Real-Time Synthesizer) DIGI_ALSA - ALSA sound driver DIGI_JACK - JACK sound driver
See also: detect_digi_driver, install_sound, install_sound_input.
MIDI_AUTODETECT - let Allegro pick a MIDI sound driver MIDI_NONE - no MIDI sound MIDI_OSS - Open Sound System MIDI_DIGMID - sample-based software wavetable player MIDI_ALSA - ALSA RawMIDI driver
See also: detect_midi_driver, install_sound, install_sound_input.
See also: set_window_title.