mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2024-11-12 02:00:53 +01:00
Fix typo in data member name
This commit is contained in:
parent
d8eec1064a
commit
df3a00a00c
@ -106,7 +106,7 @@ void Playfield::draw_tail_and_receptor(
|
||||
long_note.triangle.setTexture(*tex, true);
|
||||
}
|
||||
if (auto tex = long_note.marker.background_at(note_offset)) {
|
||||
long_note.backgroud.setTexture(*tex, true);
|
||||
long_note.background.setTexture(*tex, true);
|
||||
}
|
||||
if (auto tex = long_note.marker.outline_at(note_offset)) {
|
||||
long_note.outline.setTexture(*tex, true);
|
||||
@ -147,50 +147,57 @@ void Playfield::draw_tail_and_receptor(
|
||||
);
|
||||
}
|
||||
|
||||
auto rect = long_note.tail.getTextureRect();
|
||||
rect.height = static_cast<int>(rect.height * tail_length_factor);
|
||||
long_note.tail.setTextureRect(rect);
|
||||
long_note.tail.setOrigin(rect.width / 2.f, -rect.width / 2.f);
|
||||
long_note.tail.setRotation(note.get_tail_angle() + 180);
|
||||
|
||||
rect = long_note.triangle.getTextureRect();
|
||||
long_note.triangle.setOrigin(
|
||||
rect.width / 2.f,
|
||||
rect.width * (
|
||||
0.5f
|
||||
+ OffsetToTriangleDistance.clampedTransform(
|
||||
note_offset.asSeconds()
|
||||
{
|
||||
auto rect = long_note.tail.getTextureRect();
|
||||
rect.height = static_cast<int>(rect.height * tail_length_factor);
|
||||
long_note.tail.setTextureRect(rect);
|
||||
long_note.tail.setOrigin(rect.width / 2.f, -rect.width / 2.f);
|
||||
long_note.tail.setRotation(note.get_tail_angle() + 180);
|
||||
}
|
||||
{
|
||||
auto rect = long_note.triangle.getTextureRect();
|
||||
long_note.triangle.setOrigin(
|
||||
rect.width / 2.f,
|
||||
rect.width * (
|
||||
0.5f
|
||||
+ OffsetToTriangleDistance.clampedTransform(
|
||||
note_offset.asSeconds()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
long_note.triangle.setRotation(note.get_tail_angle());
|
||||
|
||||
rect = long_note.backgroud.getTextureRect();
|
||||
long_note.backgroud.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
long_note.backgroud.setRotation(note.get_tail_angle());
|
||||
|
||||
rect = long_note.outline.getTextureRect();
|
||||
long_note.outline.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
long_note.outline.setRotation(note.get_tail_angle());
|
||||
|
||||
rect = long_note.highlight.getTextureRect();
|
||||
long_note.highlight.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
);
|
||||
long_note.triangle.setRotation(note.get_tail_angle());
|
||||
}
|
||||
{
|
||||
auto rect = long_note.background.getTextureRect();
|
||||
long_note.background.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
long_note.background.setRotation(note.get_tail_angle());
|
||||
}
|
||||
{
|
||||
auto rect = long_note.outline.getTextureRect();
|
||||
long_note.outline.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
long_note.outline.setRotation(note.get_tail_angle());
|
||||
}
|
||||
{
|
||||
auto rect = long_note.highlight.getTextureRect();
|
||||
long_note.highlight.setOrigin(rect.width / 2.f, rect.height / 2.f);
|
||||
}
|
||||
|
||||
auto rect = long_note.highlight.getTextureRect();
|
||||
const float scale = square_size / rect.width;
|
||||
long_note.tail.setScale(scale, scale);
|
||||
long_note.triangle.setScale(scale, scale);
|
||||
long_note.backgroud.setScale(scale, scale);
|
||||
long_note.background.setScale(scale, scale);
|
||||
long_note.outline.setScale(scale, scale);
|
||||
long_note.highlight.setScale(scale, scale);
|
||||
|
||||
long_note.tail.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
long_note.triangle.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
long_note.backgroud.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
long_note.background.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
long_note.outline.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
long_note.highlight.setPosition((x + 0.5f) * square_size, (y + 0.5f) * square_size);
|
||||
|
||||
long_note.layer.draw(long_note.tail);
|
||||
long_note.layer.draw(long_note.backgroud);
|
||||
long_note.layer.draw(long_note.background);
|
||||
long_note.layer.draw(long_note.outline);
|
||||
long_note.layer.draw(long_note.triangle);
|
||||
long_note.layer.draw(long_note.highlight);
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
|
||||
LNMarker marker;
|
||||
sf::RenderTexture layer;
|
||||
sf::Sprite backgroud;
|
||||
sf::Sprite background;
|
||||
sf::Sprite outline;
|
||||
sf::Sprite highlight;
|
||||
sf::Sprite tail;
|
||||
|
Loading…
Reference in New Issue
Block a user