Well I've tried adding in the *al_get_current_directory(void) into that code to get the current directory, but I can't figure out how to properly implement it. I've tried using
Now I'm not sure why this is necessary, I know the directory that the executable and source code is in.
Try using the complete path to the font, something like "/usr/local/mygame/data/pirulen.ttf".
Sorry I'm not sure what you mean by that , I've only studied C/C++ for about 1 1/2 years and this is my first time dealing with a non-standard library.
Step one is to use an absolute path to verify that's the problem.
If it works, step two is to make sure the game data is stored in a location relative to the executable, and then use the ALLEGRO_RESOURCES standard path to build the path.
Not sure what you mean by absolute path
Also, the executable is in the same place as the source code. I'm reading the al5pdf about ALLEGRO_RESOURCES_PATH, so from what I understand this will direct the my program to use the default path where Allegro's resources are kept?
Are you running it from a console in the current directory, or clicking on it from Konqueror or something?
I'm running it from the terminal in the current directory, and I don't even know what Konqueror is.
This is how I'm compiling and running it:
jason@Wally:~/Documents/game dev/allegro wiki lessons/lesson 6$ gcc lesson6fonts.cc -o lesson $(pkg-config --libs allegro-5.0 allegro_font-5.0 allegro_ttf-5.0)
jason@Wally:~/Documents/game dev/allegro wiki lessons/lesson 6$ ./lesson