Include settings from platform

This commit is contained in:
Miloslav Číž 2019-09-27 12:46:44 +02:00
parent e3685b58a5
commit 077668f337
2 changed files with 10 additions and 4 deletions

12
main.c
View File

@ -1,6 +1,5 @@
#include <stdint.h> #include <stdint.h>
#include "constants.h" #include "constants.h"
#include "settings.h"
#include "levels.h" #include "levels.h"
#include "assets.h" #include "assets.h"
@ -14,9 +13,14 @@
/* ============================= PORTING =================================== */ /* ============================= PORTING =================================== */
/* When porting, define the following in your specific platform_*.h. Also you /* When porting, do the following:
have to call SFG_mainLoopBody() in the platform's main loop and SFG_init() - implement the following functions in your platform_*.h.
in the platform initialization. Also set specific settings in settings.h */ - Call SFG_init() from your platform initialization code.
- Call SFG_mainLoopBody() from within your platform's main loop.
- include "settings.h" in your platform_*.h and optionally hard-override
(redefine) some settings in platform_*.h, according to the platform's
needs.
*/
/** Return 1 (0) if given key is pressed (not pressed). */ /** Return 1 (0) if given key is pressed (not pressed). */
int8_t SFG_keyPressed(uint8_t key); int8_t SFG_keyPressed(uint8_t key);

View File

@ -1,6 +1,8 @@
#ifndef _SFG_PLATFORM_H #ifndef _SFG_PLATFORM_H
#define _SFG_PLATFORM_H #define _SFG_PLATFORM_H
#include "settings.h"
#include <stdio.h> #include <stdio.h>
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <time.h> #include <time.h>