This time, in the Empire tutorial I've included SDL_draw a 3rd party library for drawing shapes, e.g. rectangles with curved corners (unused yet but it will be) and others, as well as a splash screen and general bitmap drawing control and started reorganizing for starting the game.
Full source code provided as usual as well as a binaries with all the graphics etc in so it should run. There's an interesting bug in debug mode. This is probably related to the code that loads the map from the text file. That well go away next time when I integrate the map generator in and no longer use text files for saving the map from the generator then reload it.
The bug relates to the globally defined struct sdllabel * nplabel; variable in empire.c. This has a valid value when initialized in the startpanel() function but when accessed in setplayers(), it has been completely changed.
- Read more about game tutorials in the Games Programming tutorials.