Quote:
Here's a friendly piece of advice: your excessive commenting will waste lots of your time. Look around for some articles and hints about writing "good" comments.
Indeed, for example:
/* game_state states ================= 0 = main menu (no game in progress) 1 = new game 2 = load game menu 3 = loaded game 4 = options 5 = quit game 6 = main menu (game in progress) */ extern int game_state = 0; //^ See above ^
should be done without magic values, no matter how well they are commented:
enum GameStates { main_menu, //no game in progress new_game, load_game_menu, loaded_game, options, quit_game, main_menu_in_game //game in progress};extern int game_state = main_menu;
Now you can either remember the name of a particular game state (rather than trying to memorize magic values), or you can easily look it up in the enum. Also there's no possibility of a "comment going out of synch with the reality".