1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/sprout/darkroom/load/texture.hpp
bolero-MURAKAMI d01ee064e2 fix weed warnings.
add compost library.
2012-11-09 01:09:49 +09:00

63 lines
2.3 KiB
C++

#ifndef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
# error should define DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER.
#endif
#ifndef DARKROOM_DEF_LOAD_TEXTURE_FILE
# error should define DARKROOM_DEF_LOAD_TEXTURE_FILE.
#endif
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix)
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(id ## suffix)
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(res) res
#define DARKROOM_LOAD_DETAIL_IDENTIFIER(id) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT( \
DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER, id), \
_darkroom_load_texture_detail \
)
#define DARKROOM_LOAD_IDENTIFIER DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_DEF_LOAD_INFO_IDENTIFIER
#else
# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_LOAD_DETAIL_IDENTIFIER(info)
#endif
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::version_type DARKROOM_LOAD_DETAIL_IDENTIFIER(version) =
# define DARKROOM_LOADING_TEXTURE_VERSION
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
# undef DARKROOM_LOADING_TEXTURE_VERSION
;
static_assert(DARKROOM_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported darkroom tex version");
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::info_type DARKROOM_LOAD_INFO_IDENTIFIER = {
# define DARKROOM_LOADING_TEXTURE_INFO
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
# undef DARKROOM_LOADING_TEXTURE_INFO
};
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::image_type<
DARKROOM_LOAD_INFO_IDENTIFIER.width,
DARKROOM_LOAD_INFO_IDENTIFIER.height
> DARKROOM_LOAD_IDENTIFIER(
DARKROOM_LOAD_INFO_IDENTIFIER,
# define DARKROOM_LOADING_TEXTURE_PIXEL
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
# undef DARKROOM_LOADING_TEXTURE_PIXEL
);
#undef DARKROOM_LOAD_IDENTIFIER
#undef DARKROOM_LOAD_INFO_IDENTIFIER
#undef DARKROOM_LOAD_DETAIL_IDENTIFIER
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II
#undef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
#undef DARKROOM_DEF_LOAD_TEXTURE_FILE
#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
# undef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
#endif