C++ coding outside classes (seek anyhowl opinion)
i decided to clean up my earliest RTS engine today. when i wrote the codes, it was in a very isolated and noob way; the entire GUI subsystem is operated (rendering, event handling, rescaling, draw order, memory cleanup etc) by a managing class 'guimain.cpp' just so to keep the 'main.cpp' neat.
i create the only instant of this class in the 'main.cpp', but it doesn't make alot of sense since i am likely to use only 1 copy of this. so what do i do with this 240 lines class now? should i just pack it out and use it like a include? is there a correct way of keeping things nice and clean? or should i leave it as is...
some background on use:
this class is access by 'gamestate.cpp' which load the different menus mode to the gui. orginally i plan for 'gamestate.cpp' to load seperate GUI, but then i discover my implementation could "hide" entire node within 1 instant so there was no need to create more gui which would need to refresh the display when reloaded. what a design mix up i had back then creating more work then needed!! :(
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement