Fix compiler warnings
This commit is contained in:
parent
4550c774f1
commit
5a4ad37fca
@ -90,7 +90,7 @@ subdir('test')
|
|||||||
executable(
|
executable(
|
||||||
'jujube',
|
'jujube',
|
||||||
sources,
|
sources,
|
||||||
dependencies: [sfml, thread_dep, m_dep, gl_dep],
|
dependencies: [sfml, thread_dep, gl_dep, m_dep],
|
||||||
include_directories : include_directories('include', 'include/imgui', 'include/imgui-sfml'),
|
include_directories : include_directories('include', 'include/imgui', 'include/imgui-sfml'),
|
||||||
cpp_args : [
|
cpp_args : [
|
||||||
'-Wall',
|
'-Wall',
|
||||||
|
@ -36,8 +36,8 @@ namespace Data {
|
|||||||
|
|
||||||
Button convert_memon_tail(Button note, unsigned int tail_position) {
|
Button convert_memon_tail(Button note, unsigned int tail_position) {
|
||||||
auto note_position = button_to_index(note);
|
auto note_position = button_to_index(note);
|
||||||
assert((note_position >= 0 and note_position <= 15));
|
assert((note_position <= 15));
|
||||||
assert((tail_position >= 0 and tail_position <= 11));
|
assert((tail_position <= 11));
|
||||||
int x = note_position%4;
|
int x = note_position%4;
|
||||||
int y = note_position/4;
|
int y = note_position/4;
|
||||||
int dx = 0;
|
int dx = 0;
|
||||||
|
@ -10,24 +10,24 @@ namespace MusicSelect {
|
|||||||
if (m_resources.m_preferences.options.marker == marker.m_metadata.name) {
|
if (m_resources.m_preferences.options.marker == marker.m_metadata.name) {
|
||||||
selected_since.emplace();
|
selected_since.emplace();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
void MarkerPanel::click(Ribbon&, const Data::Button&) {
|
void MarkerPanel::click(Ribbon&, const Data::Button&) {
|
||||||
if (not selected_since) {
|
if (not selected_since) {
|
||||||
selected_since.emplace();
|
selected_since.emplace();
|
||||||
m_resources.m_preferences.options.marker = m_marker.m_metadata.name;
|
m_resources.m_preferences.options.marker = m_marker.m_metadata.name;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
void MarkerPanel::draw(sf::RenderTarget& target, sf::RenderStates states) const {
|
void MarkerPanel::draw(sf::RenderTarget& target, sf::RenderStates states) const {
|
||||||
states.transform *= getTransform();
|
states.transform *= getTransform();
|
||||||
float animation_time = 0.f;
|
float animation_time = 0.f;
|
||||||
if (selected_since) {
|
if (selected_since) {
|
||||||
animation_time = std::fmodf(selected_since->getElapsedTime().asSeconds(), 2.f) - 1.f;
|
animation_time = std::fmod(selected_since->getElapsedTime().asSeconds(), 2.f) - 1.f;
|
||||||
}
|
}
|
||||||
auto sprite = m_marker.get_sprite(Resources::MarkerAnimation::APPROACH, animation_time);
|
auto sprite = m_marker.get_sprite(Resources::MarkerAnimation::APPROACH, animation_time);
|
||||||
if (sprite) {
|
if (sprite) {
|
||||||
target.draw(*sprite, states);
|
target.draw(*sprite, states);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user