Re-add different level sizes in Defines.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
4f972bcb28
commit
dd8847a441
|
@ -40,6 +40,16 @@ endif ()
|
||||||
if (LEVEL_SIZE STREQUAL "8")
|
if (LEVEL_SIZE STREQUAL "8")
|
||||||
add_definitions(-DLEVEL_U8)
|
add_definitions(-DLEVEL_U8)
|
||||||
message(STATUS "Using level size of 8")
|
message(STATUS "Using level size of 8")
|
||||||
|
elseif (LEVEL_SIZE STREQUAL "16")
|
||||||
|
add_definitions(-DLEVEL_U16)
|
||||||
|
message(STATUS "Using level size of 16")
|
||||||
|
elseif (LEVEL_SIZE STREQUAL "32")
|
||||||
|
add_definitions(-DLEVEL_U32)
|
||||||
|
message(STATUS "Using level size of 32")
|
||||||
|
elseif (LEVEL_SIZE STREQUAL "64")
|
||||||
|
add_definitions(-DLEVEL_U64)
|
||||||
|
message(STATUS "Using level size of 64")
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR, "Invalid level size was given.")
|
message(FATAL_ERROR, "Invalid level size was given.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
#ifndef CREATURELIB_DEFINES_HPP
|
#ifndef CREATURELIB_DEFINES_HPP
|
||||||
#define CREATURELIB_DEFINES_HPP
|
#define CREATURELIB_DEFINES_HPP
|
||||||
|
|
||||||
using level_int_t = int;
|
#if LEVEL_U8
|
||||||
|
using level_int_t = uint8_t;
|
||||||
|
#elif LEVEL_U16
|
||||||
|
using level_int_t = uint16_t;
|
||||||
|
#elif LEVEL_U32
|
||||||
|
using level_int_t = uint32_t;
|
||||||
|
#elif LEVEL_U64
|
||||||
|
using level_int_t = uint64_t;
|
||||||
|
#else
|
||||||
|
#warning Level size was not specified, falling back to uint8_t
|
||||||
|
using level_int_t = uint8_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // CREATURELIB_DEFINES_HPP
|
#endif // CREATURELIB_DEFINES_HPP
|
||||||
|
|
Loading…
Reference in New Issue