I have made so many changes in the code that it's gonna take very long to post all them, so what I'm going to to is to make a list with updated things:
- I have added 3 fonts to the game, they only change in size so they can used for main tittles or the plain text in the game.
- TextOut function to draw text.
- IntOut function to draw numbers
- FillRect to fill a rectangle with a color
- Window function to switch between windowed / full screen mode
- Accel, Speed, Angle variables added
- Now the player's point of view is defined by an angle, an the movement is based in that angle, when you press <forward> player speed will increase by it's accel value (to a limit) and move accordingly to that.
- Needed two timers in the game so I found the easiest way to use them was to encapsulate into a class, now I have a timer for FPS calculation and another to regulate framerate.
- A new class used to grab input from keyboard and add to a string (Used to write player's name)
- DrawMap: In that function I have made a small but very important optimization: it drawed all the tiles in the three layers in the map but that was a mistake because not all the three layers were filled, only the first one, so what I did was to check in 2nd an 3rd layer if the tile was empty and then if it isn't, draw it, a simple change that made the processor use change from 99% to 30%, not too bad!
- ShowStats: a function to draw player stats (name, attibutes, skilss..)
- DrawGUI:To draw player's life and magic points
- DrawDir: To draw a single dot in player's point of view