diff --git a/include/config.hpp b/include/config.hpp index 1bd9a22..007bed7 100644 --- a/include/config.hpp +++ b/include/config.hpp @@ -48,8 +48,6 @@ #define VAR_ENUM(section, name, enum_type) enum_type name; #define VAR_ENUM_D(section, name, enum_type, default) enum_type name = enum_type::default; -#define VAR_BITS(section, name, amount, offset) unsigned int name : amount; - #define STRUCT(name, ...) \ struct name {\ __VA_ARGS__\ @@ -142,8 +140,6 @@ #undef VAR_ENUM #undef VAR_ENUM_D -#undef VAR_BITS - #undef STRUCT_FIELD_TO_STRING #undef STRUCT_FROM_STRING diff --git a/include/config_def.hpp b/include/config_def.hpp index c10f331..d889b0c 100644 --- a/include/config_def.hpp +++ b/include/config_def.hpp @@ -31,8 +31,6 @@ #define VAR_ENUM(section, name, enum_type) #define VAR_ENUM_D(section, name, enum_type, default) -#define VAR_BITS(section, name, amount, offset) - #define STRUCT_STREAM_OPS(name, ...) #define STRUCT(name, ...) @@ -84,20 +82,20 @@ STRUCT(TimingPoint, STRUCT_STREAM_OPS(TimingPoint, time, beatLength, meter, sampleSet, sampleIndex, volume, uninherited, effects) STRUCT(HitObjectType, - VAR_BITS(, hitCircle, 1, 0) - VAR_BITS(, slider, 1, 1) - VAR_BITS(, newCombo, 1, 2) - VAR_BITS(, spinner, 1, 3) - VAR_BITS(, colourHax, 3, 4) - VAR_BITS(, holdNote, 1, 7) + VAR_UINT(, hitCircle) + VAR_UINT(, slider) + VAR_UINT(, newCombo) + VAR_UINT(, spinner) + VAR_UINT(, colourHax) + VAR_UINT(, holdNote) ) STRUCT_STREAM_OPS(HitObjectType, hitCircle, slider, newCombo, spinner, colourHax, holdNote) STRUCT(HitSound, - VAR_BITS(, normal, 1, 0) - VAR_BITS(, whistle, 1, 1) - VAR_BITS(, finish, 1, 2) - VAR_BITS(, clap, 1, 3) + VAR_UINT(, normal) + VAR_UINT(, whistle) + VAR_UINT(, finish) + VAR_UINT(, clap) ) STRUCT_STREAM_OPS(HitSound, normal, whistle, finish, clap) @@ -200,8 +198,6 @@ CONFIG(Difficulty, #undef VAR_ENUM #undef VAR_ENUM_D -#undef VAR_BITS - #undef STRUCT #undef VAR_STRUCT #undef VAR_STRUCT_D diff --git a/src/osuparser.cpp b/src/osuparser.cpp index f7e4666..a29f2dd 100644 --- a/src/osuparser.cpp +++ b/src/osuparser.cpp @@ -156,15 +156,6 @@ inline void toLower(std::string &str) { value << ss;\ ) -#define VAR_BITS(section, name, amount, offset) \ - VAR_GENERIC(section, name,\ - uint8_t val = std::stoul(checkAndRemove(line, namePascalCased));\ - unsigned int value = 0;\ - for (size_t i = offset; i < offset + amount; ++i) {\ - value |= (1 << i);\ - }\ - ) - #define STRUCT(name, ...) #define VAR_STRUCT(section, name, struct_type) \ VAR_GENERIC(section, name,\