The main file

There's no header file associated with main.cpp because its only purpose is to act as an entry point to the application. In fact, the file is only seven lines long:

#include "game.h"

int main() {
Game game;
while (game.loop());
return 0;
}

The while statement is exited when the loop() function returns false, which occurs when the SDL_QUIT event fires. All this file is doing is creating a new instance of Game and starting the loop. That's it for the codebase; let's start porting!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset