This is a really basic SDL2 project template for the C
programming language.
Included is some boilerplate code to get you up and running quickly, and a Makefile to build.
It is intended for use on the *nix
operating systems so linux, OSX, etc...
Makefile
- usemake
to build andmake clean
to delete built files between major buildssrc/main.c
- program entry point. Creates an instance of theGame
struct and calls theinit_game
,run_game
, anddestroy_game
functions.src/game/init_game.c
- initializes the gamesrc/game/run_game.c
- runs the gamesrc/game/destroy_game.c
- destroys (cleans up allocations of) the gamesrc/game/game.h
- master game header include file - defines theGame
struct and function prototypes for the other .c files.
Currently, nothing but opens up a window that is 640x480
in size and clears the window to a nice blue color while waiting for you to press the escape key on your keyboard or just close the window.
You don't need it. But it's here if you want to quickly start up an SDL2 project in C and not have to think about how to do so.
MIT License (c) 2018, Richard Marks See the included LICENSE.md file for more details.