Merge branch 'dev' of https://github.com/Jonny999999/snake-pp into dev
This commit is contained in:
commit
5a14a05d60
@ -21,6 +21,7 @@ typedef struct config_t
|
||||
int difficulty; // 0-3 //Schwierigkeitsgrad
|
||||
int snakeDefaultLength; // = 2 //Länge der Schlange
|
||||
const char *leaderboardFilename; // Dateiname des Leaderboards
|
||||
const char *defaultMapName; // Name der map die initial geladen wird
|
||||
} config_t;
|
||||
|
||||
// global config struct defined in config.c
|
||||
|
@ -8,5 +8,8 @@ config_t config = {
|
||||
.cycleDurationMs = 400,
|
||||
.difficulty = 1,
|
||||
.snakeDefaultLength = 2,
|
||||
.leaderboardFilename = ""
|
||||
.leaderboardFilename = "",
|
||||
//.defaultMapName = "default" //10x10
|
||||
.defaultMapName = "intermediate" //15x15
|
||||
//.defaultMapName = "empty" //20x10
|
||||
};
|
@ -37,9 +37,8 @@ void gameInit()
|
||||
//----- load map -----
|
||||
//load default map if no map loaded yet
|
||||
if (!game.mapIsLoaded){
|
||||
loadMapByName("default");
|
||||
//loadMapByName("empty");
|
||||
//loadMapByName("intermediate");
|
||||
//loadMapByName("default");
|
||||
loadMapByName(config.defaultMapName);
|
||||
}
|
||||
|
||||
//--- place initial food ---
|
||||
|
10
src/map.c
10
src/map.c
@ -230,13 +230,13 @@ static const map_t map_intermediate = {
|
||||
.portals = {
|
||||
{.posX = 5,
|
||||
.posY = 8,
|
||||
.targetX = 7,
|
||||
.targetY = 1,
|
||||
.targetX = 13,
|
||||
.targetY = 2,
|
||||
.color = "blue"},
|
||||
{.posX = 1,
|
||||
{.posX = 2,
|
||||
.posY = 2,
|
||||
.targetX = 2,
|
||||
.targetY = 8,
|
||||
.targetX = 3,
|
||||
.targetY = 12,
|
||||
.color = "red"}},
|
||||
.portalCount = 2};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user