fixes after module update

This commit is contained in:
BlackMATov
2020-04-20 13:50:38 +07:00
parent a1fa96555b
commit 85b2e482d7
14 changed files with 64 additions and 62 deletions

View File

@@ -96,14 +96,14 @@ matrix:
osx_image: xcode10 osx_image: xcode10
stage: macosx stage: macosx
name: debug, xcode10 name: debug, xcode10
addons: { homebrew: { packages: ["git-lfs"] } } addons: { homebrew: { packages: ["git-lfs"], update: true } }
script: ./scripts/build_debug.sh script: ./scripts/build_debug.sh
- os: osx - os: osx
osx_image: xcode10 osx_image: xcode10
stage: macosx stage: macosx
name: release, xcode10 name: release, xcode10
addons: { homebrew: { packages: ["git-lfs"] } } addons: { homebrew: { packages: ["git-lfs"], update: true } }
script: ./scripts/build_release.sh script: ./scripts/build_release.sh
# #
@@ -114,14 +114,14 @@ matrix:
osx_image: xcode11 osx_image: xcode11
stage: macosx stage: macosx
name: debug, xcode11 name: debug, xcode11
addons: { homebrew: { packages: ["git-lfs"] } } addons: { homebrew: { packages: ["git-lfs"], update: true } }
script: ./scripts/build_debug.sh script: ./scripts/build_debug.sh
- os: osx - os: osx
osx_image: xcode11 osx_image: xcode11
stage: macosx stage: macosx
name: release, xcode11 name: release, xcode11
addons: { homebrew: { packages: ["git-lfs"] } } addons: { homebrew: { packages: ["git-lfs"], update: true } }
script: ./scripts/build_release.sh script: ./scripts/build_release.sh
# #
@@ -132,7 +132,7 @@ matrix:
osx_image: xcode10 osx_image: xcode10
stage: coverage stage: coverage
name: coverage, xcode10 name: coverage, xcode10
addons: { homebrew: { packages: ["git-lfs", "lcov"] } } addons: { homebrew: { packages: ["git-lfs", "lcov"], update: true } }
script: ./scripts/upload_coverage.sh script: ./scripts/upload_coverage.sh
before_install: before_install:

View File

@@ -73,6 +73,7 @@ namespace e2d
(x1) (x1)
(x2) (x2)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(mouse_button)
ENUM_HPP_CLASS_DECL(keyboard_key, u16, ENUM_HPP_CLASS_DECL(keyboard_key, u16,
(_0) (_1) (_2) (_3) (_4) (_5) (_6) (_7) (_8) (_9) (_0) (_1) (_2) (_3) (_4) (_5) (_6) (_7) (_8) (_9)
@@ -110,20 +111,18 @@ namespace e2d
(kp_add) (kp_enter) (kp_equal) (kp_decimal) (kp_add) (kp_enter) (kp_equal) (kp_decimal)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(keyboard_key)
ENUM_HPP_CLASS_DECL(mouse_button_action, u8, ENUM_HPP_CLASS_DECL(mouse_button_action, u8,
(press) (press)
(release) (release)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(mouse_button_action)
ENUM_HPP_CLASS_DECL(keyboard_key_action, u8, ENUM_HPP_CLASS_DECL(keyboard_key_action, u8,
(press) (press)
(repeat) (repeat)
(release) (release)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(keyboard_key_action)
} }
ENUM_HPP_REGISTER_TRAITS(e2d::mouse_button)
ENUM_HPP_REGISTER_TRAITS(e2d::keyboard_key)
ENUM_HPP_REGISTER_TRAITS(e2d::mouse_button_action)
ENUM_HPP_REGISTER_TRAITS(e2d::keyboard_key_action)

View File

@@ -60,6 +60,8 @@ namespace e2d
level min_level_ = level::trace; level min_level_ = level::trace;
}; };
ENUM_HPP_REGISTER_TRAITS(debug::level)
class debug_stream_sink final : public debug::sink { class debug_stream_sink final : public debug::sink {
public: public:
debug_stream_sink(output_stream_uptr stream); debug_stream_sink(output_stream_uptr stream);
@@ -76,8 +78,6 @@ namespace e2d
}; };
} }
ENUM_HPP_REGISTER_TRAITS(e2d::debug::level)
namespace e2d namespace e2d
{ {
template < typename T, typename... Args > template < typename T, typename... Args >

View File

@@ -98,6 +98,8 @@ namespace e2d
pixel_type type_ = pixel_type::rgba8; pixel_type type_ = pixel_type::rgba8;
}; };
ENUM_HPP_REGISTER_TRAITS(pixel_declaration::pixel_type)
bool operator==( bool operator==(
const pixel_declaration& l, const pixel_declaration& l,
const pixel_declaration& r) noexcept; const pixel_declaration& r) noexcept;
@@ -129,6 +131,8 @@ namespace e2d
index_type type_ = index_type::unsigned_short; index_type type_ = index_type::unsigned_short;
}; };
ENUM_HPP_REGISTER_TRAITS(index_declaration::index_type)
bool operator==( bool operator==(
const index_declaration& l, const index_declaration& l,
const index_declaration& r) noexcept; const index_declaration& r) noexcept;
@@ -205,6 +209,8 @@ namespace e2d
std::size_t bytes_per_vertex_ = 0; std::size_t bytes_per_vertex_ = 0;
}; };
ENUM_HPP_REGISTER_TRAITS(vertex_declaration::attribute_type)
bool operator==( bool operator==(
const vertex_declaration& l, const vertex_declaration& l,
const vertex_declaration& r) noexcept; const vertex_declaration& r) noexcept;
@@ -278,6 +284,8 @@ namespace e2d
internal_state_uptr state_; internal_state_uptr state_;
}; };
ENUM_HPP_REGISTER_TRAITS(index_buffer::usage)
// //
// vertex buffer // vertex buffer
// //
@@ -303,6 +311,8 @@ namespace e2d
internal_state_uptr state_; internal_state_uptr state_;
}; };
ENUM_HPP_REGISTER_TRAITS(vertex_buffer::usage)
// //
// render target // render target
// //
@@ -328,6 +338,8 @@ namespace e2d
internal_state_uptr state_; internal_state_uptr state_;
}; };
ENUM_HPP_REGISTER_TRAITS(render_target::external_texture)
// //
// render // render
// //
@@ -971,27 +983,21 @@ namespace e2d
class internal_state; class internal_state;
std::unique_ptr<internal_state> state_; std::unique_ptr<internal_state> state_;
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::pixel_declaration::pixel_type) ENUM_HPP_REGISTER_TRAITS(render::topology)
ENUM_HPP_REGISTER_TRAITS(e2d::index_declaration::index_type) ENUM_HPP_REGISTER_TRAITS(render::stencil_op)
ENUM_HPP_REGISTER_TRAITS(e2d::vertex_declaration::attribute_type) ENUM_HPP_REGISTER_TRAITS(render::compare_func)
ENUM_HPP_REGISTER_TRAITS(e2d::index_buffer::usage) ENUM_HPP_REGISTER_TRAITS(render::culling_mode)
ENUM_HPP_REGISTER_TRAITS(e2d::vertex_buffer::usage) ENUM_HPP_REGISTER_TRAITS(render::culling_face)
ENUM_HPP_REGISTER_TRAITS(e2d::render_target::external_texture) ENUM_HPP_REGISTER_TRAITS(render::blending_factor)
ENUM_HPP_REGISTER_TRAITS(e2d::render::topology) ENUM_HPP_REGISTER_TRAITS(render::blending_equation)
ENUM_HPP_REGISTER_TRAITS(e2d::render::stencil_op) ENUM_HPP_REGISTER_TRAITS(render::blending_color_mask)
ENUM_HPP_REGISTER_TRAITS(e2d::render::compare_func) ENUM_HPP_REGISTER_TRAITS(render::sampler_wrap)
ENUM_HPP_REGISTER_TRAITS(e2d::render::culling_mode) ENUM_HPP_REGISTER_TRAITS(render::sampler_min_filter)
ENUM_HPP_REGISTER_TRAITS(e2d::render::culling_face) ENUM_HPP_REGISTER_TRAITS(render::sampler_mag_filter)
ENUM_HPP_REGISTER_TRAITS(e2d::render::blending_factor) ENUM_HPP_REGISTER_TRAITS(render::clear_command::buffer)
ENUM_HPP_REGISTER_TRAITS(e2d::render::blending_equation) ENUM_HPP_REGISTER_TRAITS(render::api_profile)
ENUM_HPP_REGISTER_TRAITS(e2d::render::blending_color_mask) }
ENUM_HPP_REGISTER_TRAITS(e2d::render::sampler_wrap)
ENUM_HPP_REGISTER_TRAITS(e2d::render::sampler_min_filter)
ENUM_HPP_REGISTER_TRAITS(e2d::render::sampler_mag_filter)
ENUM_HPP_REGISTER_TRAITS(e2d::render::clear_command::buffer)
ENUM_HPP_REGISTER_TRAITS(e2d::render::api_profile)
namespace e2d namespace e2d
{ {

View File

@@ -91,6 +91,8 @@ namespace e2d
std::unique_ptr<state> state_; std::unique_ptr<state> state_;
}; };
ENUM_HPP_REGISTER_TRAITS(window::cursor_shapes)
class window_event_tracer final : public window::event_listener { class window_event_tracer final : public window::event_listener {
public: public:
window_event_tracer(debug& debug) noexcept; window_event_tracer(debug& debug) noexcept;
@@ -122,8 +124,6 @@ namespace e2d
}; };
} }
ENUM_HPP_REGISTER_TRAITS(e2d::window::cursor_shapes)
namespace e2d namespace e2d
{ {
template < typename T, typename... Args > template < typename T, typename... Args >

View File

@@ -87,6 +87,7 @@ namespace e2d::behaviours
ENUM_HPP_CLASS_DECL(fill_result, u8, ENUM_HPP_CLASS_DECL(fill_result, u8,
(failed) (failed)
(success)) (success))
ENUM_HPP_REGISTER_TRAITS(fill_result)
inline fill_result fill_meta_table(behaviour& behaviour) { inline fill_result fill_meta_table(behaviour& behaviour) {
if ( !behaviour.script() ) { if ( !behaviour.script() ) {
@@ -116,6 +117,7 @@ namespace e2d::behaviours
(failed) (failed)
(success) (success)
(method_not_found)) (method_not_found))
ENUM_HPP_REGISTER_TRAITS(call_result)
template < typename... Args > template < typename... Args >
call_result call_meta_method(behaviour& behaviour, str_view method, Args&&... args) { call_result call_meta_method(behaviour& behaviour, str_view method, Args&&... args) {
@@ -145,6 +147,3 @@ namespace e2d::behaviours
return call_result::success; return call_result::success;
} }
} }
ENUM_HPP_REGISTER_TRAITS(e2d::behaviours::fill_result)
ENUM_HPP_REGISTER_TRAITS(e2d::behaviours::call_result)

View File

@@ -54,9 +54,9 @@ namespace e2d
render_target_ptr target_ = nullptr; render_target_ptr target_ = nullptr;
color background_ = color::clear(); color background_ = color::clear();
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::camera::modes) ENUM_HPP_REGISTER_TRAITS(camera::modes)
}
namespace e2d namespace e2d
{ {

View File

@@ -75,10 +75,10 @@ namespace e2d
f32 outline_width_ = 0.f; f32 outline_width_ = 0.f;
color32 outline_color_ = color32::white(); color32 outline_color_ = color32::white();
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::label::haligns) ENUM_HPP_REGISTER_TRAITS(label::haligns)
ENUM_HPP_REGISTER_TRAITS(e2d::label::valigns) ENUM_HPP_REGISTER_TRAITS(label::valigns)
}
namespace e2d namespace e2d
{ {

View File

@@ -71,13 +71,13 @@ namespace e2d
flex_wraps flex_wrap_ = flex_wraps::no_wrap; flex_wraps flex_wrap_ = flex_wraps::no_wrap;
flex_directions flex_direction_ = flex_directions::row; flex_directions flex_direction_ = flex_directions::row;
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::layout::directions) ENUM_HPP_REGISTER_TRAITS(layout::directions)
ENUM_HPP_REGISTER_TRAITS(e2d::layout::align_modes) ENUM_HPP_REGISTER_TRAITS(layout::align_modes)
ENUM_HPP_REGISTER_TRAITS(e2d::layout::justify_modes) ENUM_HPP_REGISTER_TRAITS(layout::justify_modes)
ENUM_HPP_REGISTER_TRAITS(e2d::layout::flex_wraps) ENUM_HPP_REGISTER_TRAITS(layout::flex_wraps)
ENUM_HPP_REGISTER_TRAITS(e2d::layout::flex_directions) ENUM_HPP_REGISTER_TRAITS(layout::flex_directions)
}
namespace e2d namespace e2d
{ {

View File

@@ -59,10 +59,10 @@ namespace e2d
sprite_asset::ptr sprite_; sprite_asset::ptr sprite_;
flat_map<str_hash, material_asset::ptr> materials_; flat_map<str_hash, material_asset::ptr> materials_;
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::sprite_renderer::modes) ENUM_HPP_REGISTER_TRAITS(sprite_renderer::modes)
ENUM_HPP_REGISTER_TRAITS(e2d::sprite_renderer::blendings) ENUM_HPP_REGISTER_TRAITS(sprite_renderer::blendings)
}
namespace e2d namespace e2d
{ {

View File

@@ -137,6 +137,8 @@ namespace e2d::touchable_events
mouse_button button_ = mouse_button::left; mouse_button button_ = mouse_button::left;
}; };
ENUM_HPP_REGISTER_TRAITS(touchable_events::mouse_evt::types)
class touch_evt final : public impl::base_evt<touch_evt> { class touch_evt final : public impl::base_evt<touch_evt> {
public: public:
ENUM_HPP_CLASS_DECL(types, u8, ENUM_HPP_CLASS_DECL(types, u8,
@@ -159,10 +161,9 @@ namespace e2d::touchable_events
types type_ = types::pressed; types type_ = types::pressed;
u32 finger_ = 0u; u32 finger_ = 0u;
}; };
}
ENUM_HPP_REGISTER_TRAITS(e2d::touchable_events::mouse_evt::types) ENUM_HPP_REGISTER_TRAITS(touchable_events::touch_evt::types)
ENUM_HPP_REGISTER_TRAITS(e2d::touchable_events::touch_evt::types) }
namespace e2d namespace e2d
{ {

View File

@@ -87,10 +87,9 @@ namespace e2d::filesystem
(documents) (documents)
(resources) (resources)
(executable)) (executable))
ENUM_HPP_REGISTER_TRAITS(predef_path)
bool extract_predef_path(str& dst, predef_path path_type); bool extract_predef_path(str& dst, predef_path path_type);
} }
ENUM_HPP_REGISTER_TRAITS(e2d::filesystem::predef_path)
#include "filesystem.inl" #include "filesystem.inl"

View File

@@ -21,6 +21,7 @@ namespace e2d
(png) (png)
(pvr) (pvr)
(tga)) (tga))
ENUM_HPP_REGISTER_TRAITS(image_file_format)
ENUM_HPP_CLASS_DECL(image_data_format, u8, ENUM_HPP_CLASS_DECL(image_data_format, u8,
(a8) (a8)
@@ -52,6 +53,7 @@ namespace e2d
(rgba_pvrtc2_v2) (rgba_pvrtc2_v2)
(rgba_pvrtc4_v2)) (rgba_pvrtc4_v2))
ENUM_HPP_REGISTER_TRAITS(image_data_format)
class bad_image_access final : public exception { class bad_image_access final : public exception {
public: public:
@@ -100,9 +102,6 @@ namespace e2d
bool operator!=(const image& l, const image& r) noexcept; bool operator!=(const image& l, const image& r) noexcept;
} }
ENUM_HPP_REGISTER_TRAITS(e2d::image_file_format)
ENUM_HPP_REGISTER_TRAITS(e2d::image_data_format)
namespace e2d::images namespace e2d::images
{ {
bool try_load_image( bool try_load_image(

View File

@@ -228,6 +228,7 @@ namespace e2d::opengl
(sampler_cube) (sampler_cube)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(uniform_type)
ENUM_HPP_CLASS_DECL(attribute_type, u8, ENUM_HPP_CLASS_DECL(attribute_type, u8,
(floating_point) (floating_point)
@@ -241,11 +242,9 @@ namespace e2d::opengl
(m4f) (m4f)
(unknown)) (unknown))
ENUM_HPP_REGISTER_TRAITS(attribute_type)
} }
ENUM_HPP_REGISTER_TRAITS(e2d::opengl::uniform_type)
ENUM_HPP_REGISTER_TRAITS(e2d::opengl::attribute_type)
namespace e2d::opengl namespace e2d::opengl
{ {
GLenum convert_image_data_format_to_external_format(image_data_format f) noexcept; GLenum convert_image_data_format_to_external_format(image_data_format f) noexcept;