Hi guys, I'm having a self doubt right now. But first, let me tell you the cause. It's the way I structure my game code. Specifically it's how I put my variables. Basically I have a source code for each module (gfx, sound, input, log). Thing is, I put each variable in their specific .cpp files:
for example, I put screen attributes (and any screen related function definition) in gfx.cpp
int screen_w, screen_h, screen_bpp;
and I put any screen related function declaration in gfx.h
int gfx_create_screen(int w, int h, int bpp);
int gfx_switch_fullscreen(int fs);
I also do the same with the logging module. I put the log function declaration in the log.h, and the definition and logfile handle in log.cpp
-is what I do is right? and uh, if not, can you tell me a better way? I really really appreciate any input here. thanks!