[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [AL] Re: FW: language.dat in allegro



> Thanks!
> 
> I've tried it and it doesn't seem to work. Even though
> setup/setup.c routines in allegro library seem to use
> that #defined variable, SETUP_LANGUAGE_FILE, kraptor
> uses a procedure called:
> 
> void reload_config_texts(AL_CONST char *new_language)
> 
> which is defined in src/config.c and seems to be using
> "language.dat" in a hardcoded way:
> 
>       datafile = uconvert_ascii("language.dat", tmp2);
> 
> I tried to #define that item at the beginning of the
> program and it doesn't seem to work. The only hack I
> found to be able to make multiple languages work in
> kraptor is adding in main.c the following line before
> calling the language stuff:
> 
> setenv("ALLEGRO", "/usr/share/games/kraptor/",0);
> 
> But, of course, I don't like that way of fixing things
> at all.
> 
> Might that be a bug in allegro library?
> 

Hm, what would be the bug? Too many hardcoded pathes inside Allegro?

The intented way to find language.dat is for it to reside
in /usr[/local]/share/allegro/language.dat (both pathes are hardcoded),
so if you update Allegro, and it includes updated translation, then all
games have the updated translation. I'd assume, the Debian package of
Allegro installs that file - so Kraptor need not include it. Unless it
puts game specific things into it..

.. in which case, you could use something like:

set_allegro_resource_path("/usr/share/games/kraptor/")

http://alleg.sourceforge.net/onlinedocs/en/alleg030.html#set_allegro_resource_path 

-- 
Elias Pschernig



Reply to: