I am just starting to use PF and am having a small problem. I am trying to use an interface type of class (vitual funcs) that will represent a "screen" in my game. There will be one active screen at a time that all of the Game methods will get forwarded to (key, mouse, draw, etc.) For instance I may have screen such as Splash, MainMenu, GameOptions, etc.
What I am having trouble with is that most of the variables/methods that are part of the Game class (m_keys, GetDisplay(), Shutdown(), etc.) are Protected so I cannot access them from any other class except my main game one. I need to get access to these in order to do anything really.
I thought about changing them to public and recompiling PF but then I would have to keep changing it for future releases of PF. So here I am... asking for some input instead!!
My questions...
1. Does anyone know what these were declared Protected in the first place instead of Public (outside of the OOP "rules").
2. Has anyone else created a framework that they use for creating games? If so how did you get around this type of issue?
Thanks for any input!!
What I am having trouble with is that most of the variables/methods that are part of the Game class (m_keys, GetDisplay(), Shutdown(), etc.) are Protected so I cannot access them from any other class except my main game one. I need to get access to these in order to do anything really.
I thought about changing them to public and recompiling PF but then I would have to keep changing it for future releases of PF. So here I am... asking for some input instead!!
My questions...
1. Does anyone know what these were declared Protected in the first place instead of Public (outside of the OOP "rules").
2. Has anyone else created a framework that they use for creating games? If so how did you get around this type of issue?
Thanks for any input!!