Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'source/frontend')
-rw-r--r--source/frontend/StarActionBar.cpp2
-rw-r--r--source/frontend/StarChatBubbleSeparation.hpp3
-rw-r--r--source/frontend/StarCinematic.cpp2
-rw-r--r--source/frontend/StarCodexInterface.cpp2
-rw-r--r--source/frontend/StarMainInterface.cpp8
-rw-r--r--source/frontend/StarTeamBar.cpp3
-rw-r--r--source/frontend/StarTeleportDialog.cpp2
-rw-r--r--source/frontend/StarVoice.cpp8
-rw-r--r--source/frontend/StarWireInterface.cpp2
9 files changed, 12 insertions, 20 deletions
diff --git a/source/frontend/StarActionBar.cpp b/source/frontend/StarActionBar.cpp
index 15e1bd5..fb08e3b 100644
--- a/source/frontend/StarActionBar.cpp
+++ b/source/frontend/StarActionBar.cpp
@@ -196,7 +196,7 @@ bool ActionBar::sendEvent(InputEvent const& event) {
return false;
}
-void ActionBar::update(float dt) {
+void ActionBar::update(float) {
auto inventory = m_player->inventory();
auto abl = inventory->selectedActionBarLocation();
if (abl.is<CustomBarIndex>()) {
diff --git a/source/frontend/StarChatBubbleSeparation.hpp b/source/frontend/StarChatBubbleSeparation.hpp
index 03571cf..a79f122 100644
--- a/source/frontend/StarChatBubbleSeparation.hpp
+++ b/source/frontend/StarChatBubbleSeparation.hpp
@@ -169,11 +169,10 @@ void BubbleSeparator<T>::forEach(function<void(Bubble&, T&)> func) {
}
template <typename T>
-void BubbleSeparator<T>::update(float dt) {
+void BubbleSeparator<T>::update(float) {
m_bubbles.exec([this](Bubble& bubble) {
Vec2F delta = bubble.seperatedOffset - bubble.currentOffset;
bubble.currentOffset += m_tweenFactor * delta;
-
bubble.currentPosition = bubble.currentDestination + bubble.currentOffset;
});
}
diff --git a/source/frontend/StarCinematic.cpp b/source/frontend/StarCinematic.cpp
index ade940d..abd638d 100644
--- a/source/frontend/StarCinematic.cpp
+++ b/source/frontend/StarCinematic.cpp
@@ -102,7 +102,7 @@ void Cinematic::setPlayer(PlayerPtr player) {
m_player = player;
}
-void Cinematic::update(float dt) {
+void Cinematic::update(float) {
m_currentTimeSkip = {};
for (auto timeSkip : m_timeSkips) {
if (currentTimecode() >= timeSkip.availableTime && currentTimecode() < timeSkip.skipToTime)
diff --git a/source/frontend/StarCodexInterface.cpp b/source/frontend/StarCodexInterface.cpp
index dcd82f3..b773eb5 100644
--- a/source/frontend/StarCodexInterface.cpp
+++ b/source/frontend/StarCodexInterface.cpp
@@ -50,7 +50,7 @@ void CodexInterface::show() {
updateCodexList();
}
-void CodexInterface::tick(float dt) {
+void CodexInterface::tick(float) {
updateCodexList();
}
diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp
index aa06dc7..193deea 100644
--- a/source/frontend/StarMainInterface.cpp
+++ b/source/frontend/StarMainInterface.cpp
@@ -1365,11 +1365,9 @@ void MainInterface::renderDebug() {
m_debugTextRect = RectF::null();
- counter = 0;
- for (auto const& pair : logMapValues) {
+ for (size_t index = 0; index < logMapValues.size(); ++index) {
TextPositioning positioning = { Vec2F(m_config->debugOffset[0], windowHeight() - m_config->debugOffset[1] - m_config->fontSize * interfaceScale() * counter) };
- m_guiContext->renderText(formatted[counter], positioning);
- ++counter;
+ m_guiContext->renderText(formatted[index], positioning);
}
m_guiContext->setFontSize(8);
m_guiContext->setDefaultFont();
@@ -1515,7 +1513,7 @@ bool MainInterface::overButton(PolyI buttonPoly, Vec2I const& mousePos) const {
return buttonPoly.contains(mousePos);
}
-bool MainInterface::overlayClick(Vec2I const& mousePos, MouseButton mouseButton) {
+bool MainInterface::overlayClick(Vec2I const& mousePos, MouseButton) {
PolyI mainBarPoly = m_config->mainBarPoly;
Vec2I barPos = mainBarPosition();
mainBarPoly.translate(barPos);
diff --git a/source/frontend/StarTeamBar.cpp b/source/frontend/StarTeamBar.cpp
index d0c23c5..0909f9f 100644
--- a/source/frontend/StarTeamBar.cpp
+++ b/source/frontend/StarTeamBar.cpp
@@ -149,7 +149,6 @@ void TeamBar::buildTeamBar() {
Vec2I offset;
size_t controlIndex = 0;
- size_t memberIndex = 0;
float portraitScale = assets->json("/interface/windowconfig/teambar.config:memberPortraitScale").toFloat();
int memberSize = assets->json("/interface/windowconfig/teambar.config:memberSize").toInt();
@@ -158,7 +157,6 @@ void TeamBar::buildTeamBar() {
Uuid myUuid = player->clientContext()->playerUuid();
for (auto member : teamClient->members()) {
if (member.uuid == myUuid) {
- memberIndex++;
continue;
}
@@ -217,7 +215,6 @@ void TeamBar::buildTeamBar() {
offset[1] -= memberSpacing;
controlIndex++;
- memberIndex++;
}
auto inviteButton = fetchChild<ButtonWidget>("inviteButton");
diff --git a/source/frontend/StarTeleportDialog.cpp b/source/frontend/StarTeleportDialog.cpp
index c1ca4b4..7b4030d 100644
--- a/source/frontend/StarTeleportDialog.cpp
+++ b/source/frontend/StarTeleportDialog.cpp
@@ -120,7 +120,7 @@ TeleportDialog::TeleportDialog(UniverseClientPtr client,
fetchChild<ButtonWidget>("btnTeleport")->setEnabled(destList->selectedItem() != NPos);
}
-void TeleportDialog::tick(float dt) {
+void TeleportDialog::tick(float) {
if (!m_client->worldClient()->playerCanReachEntity(m_sourceEntityId))
dismiss();
}
diff --git a/source/frontend/StarVoice.cpp b/source/frontend/StarVoice.cpp
index fc1c5a9..752a7b4 100644
--- a/source/frontend/StarVoice.cpp
+++ b/source/frontend/StarVoice.cpp
@@ -13,7 +13,6 @@
constexpr int VOICE_SAMPLE_RATE = 48000;
constexpr int VOICE_FRAME_SIZE = 960;
-constexpr int VOICE_MAX_FRAME_SIZE = 6 * VOICE_FRAME_SIZE;
constexpr int VOICE_MAX_PACKET_SIZE = 3 * 1276;
constexpr uint16_t VOICE_VERSION = 1;
@@ -421,7 +420,7 @@ void Voice::mix(int16_t* buffer, size_t frameCount, unsigned channels) {
}
}
-void Voice::update(float dt, PositionalAttenuationFunction positionalAttenuationFunction) {
+void Voice::update(float, PositionalAttenuationFunction positionalAttenuationFunction) {
for (auto& entry : m_speakers) {
if (SpeakerPtr& speaker = entry.second) {
if (positionalAttenuationFunction) {
@@ -465,7 +464,7 @@ StringList Voice::availableDevices() {
StringList deviceList;
if (devices > 0) {
deviceList.reserve(devices);
- for (size_t i = 0; i != devices; ++i)
+ for (int i = 0; i != devices; ++i)
deviceList.emplace_back(SDL_GetAudioDeviceName(i, 1));
}
deviceList.sort();
@@ -482,7 +481,6 @@ int Voice::send(DataStreamBuffer& out, size_t budget) {
return 0;
std::vector<ByteArray> encodedChunks = std::move(m_encodedChunks);
- size_t encodedChunksLength = m_encodedChunksLength;
m_encodedChunksLength = 0;
encodeLock.unlock();
@@ -642,7 +640,7 @@ void Voice::closeDevice() {
m_deviceOpen = false;
}
-bool Voice::playSpeaker(SpeakerPtr const& speaker, int channels) {
+bool Voice::playSpeaker(SpeakerPtr const& speaker, int) {
if (speaker->playing || speaker->audioStream->samples.size() < speaker->minimumPlaySamples)
return false;
diff --git a/source/frontend/StarWireInterface.cpp b/source/frontend/StarWireInterface.cpp
index 61506fe..9d34a5b 100644
--- a/source/frontend/StarWireInterface.cpp
+++ b/source/frontend/StarWireInterface.cpp
@@ -35,7 +35,7 @@ void WirePane::reset() {
m_connecting = false;
}
-void WirePane::update(float dt) {
+void WirePane::update(float) {
if (!active())
return;
if (!m_worldClient->inWorld()) {