MacLO/src/Levels.h

40 lines
966 B
C
Raw Normal View History

2021-10-11 18:11:48 +00:00
// Copyright (c) Jon Thysell <http://jonthysell.com>
// Licensed under the MIT License.
2021-12-07 19:07:28 +00:00
/**
* @file Levels.h
*
* This file provides functions for loading the light puzzles, or levels,
* as well as the "par" for each level. Each light puzzle is stored as 25
* bits within a 32-bit integer.
*/
2021-10-11 18:11:48 +00:00
#ifndef LEVELS_H
#define LEVELS_H
#include "stdint.h"
#include "stdbool.h"
2021-12-07 19:07:28 +00:00
/** The number of levels in each set. */
#define LevelCount 50
2021-10-11 18:11:48 +00:00
/** The number of sets. */
#define SetCount 2
2021-12-07 19:07:28 +00:00
/**
* Gets the lights for a given set and level number.
* @param level The level number.
* @param setB Whether or not to load from Set B.
* @return The lights.
*/
2021-10-11 18:11:48 +00:00
uint32_t Levels_GetLightsForLevel(const int8_t level, const bool setB);
2021-12-07 19:07:28 +00:00
/**
* Gets the minimum number of toggles to solve a given level number.
* @param level The level number.
* @return The minimum number of toggles to complete the level.
*/
2021-10-11 18:11:48 +00:00
uint16_t Levels_GetParForLevel(const int8_t level);
#endif