Im creating a simple game. very simple. just as a test for the console library im working on, problem is, ive got zero experience with game writing in C++, so advice on the following would be appreciated.
ive currently got the CApp class sorted, which is the main application. loop is setup and running too.
int main(int argc, char *argv)
CApp *thapp = new CApp();
Now im wanting to add a CGame class which would have a functions such as InitGame, ShowMenu, GenerateMap, etc, think very simple roguelike. Ive properly setup this wrong, but how would i allow a function such as CGame::ShowMenu to output to the screen via c_cmd in CApp? Or should i just declare another console library object for it to use in the CGame class.
ConLib c_cmd; // My own console library (just a class with functions e.g c_cmd.WriteToScreen(text) )
Execute(); <-- this is the loop, every cycle do whats in here
Not sure if ive explained it right or not, kinda confused myself.
For example my original thought was to do this:
Is that last section for CGame_Output.cpp the right way to go? have i missed something?
// need to access ConLib c_cmd from CApp here.