SDL Game Programming Organization!

I have the hardest time trying to separate code into classes. If I could separate it out I think I would have a better chance of debugging my problems.

I want a formal set-up.

main game
gameEvents
gameEvents.Init, gameEvents.load, gameEvents.Input ect....
loadTexture


Here's the code I've been working with.
http://pastebin.com/TWYFqAPF


The part I can't figure out is where to declare a lot of the following


SDL_Window* gWindow = NULL;


SDL_Renderer* gRenderer = NULL;


SDL_Rect gSpriteClips[BUTTON_SPRITE_TOTAL];
LTexture gButtonSpriteSheetTexture;


LButton gButtons[TOTAL_BUTTONS];


LTexture gDotTexture;
LTexture gBGTexture;
Topic archived. No new replies allowed.