I can't debug it now because I have to go to work (and I'd have to get SDL), but I'll try to give it a spin when I get home if I remember. I don't immediately see why the player's hud wouldn't be drawing. I can only suspect that it IS drawing, but just at the wrong coordinates (so maybe it's being drawn offscreen or something?)
What I did notice, though, is that you are using inheritance incorrectly.
Public inheritance forms an "is a" relationship. For example, class Cat might inherit from class Animal because a Cat "is a" Animal. player_one is not a char_hud, so it should not be inheriting from it.
If you want a "has a" relationship (ie: player_one "has a" char_hud), then you want composition:
1 2 3 4 5 6 7 8 9 10 11 12
|
class player_one
{
private:
char_hud myhud;
public:
void Display()
{
// ..
myhud.Display();
}
};
|
Also, if you find yourself naming things like "player_one", "player_two", etc, you're probably doing it wrong. All players should use the same code, so a class just named "player" would probably be more appropriate.