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

summaryrefslogtreecommitdiff
path: root/source/game/items
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-28 18:11:55 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-28 18:30:27 +0100
commitcd23817bf1884fee4457ab3381320b0c8fc33f48 (patch)
tree9440ff3b0386ca9e3b1bac9eda168741ec6debb3 /source/game/items
parent28d486446ca176ef0168a7284d85cb49a75a54fb (diff)
Fixed remaining compiler warnings
Some warnings (e.g. in Opus and the tests) can't be fixed, only suppressed.
Diffstat (limited to 'source/game/items')
-rw-r--r--source/game/items/StarArmors.cpp4
-rw-r--r--source/game/items/StarInspectionTool.cpp2
-rw-r--r--source/game/items/StarInstrumentItem.cpp2
-rw-r--r--source/game/items/StarMaterialItem.cpp8
-rw-r--r--source/game/items/StarUnlockItem.cpp2
5 files changed, 9 insertions, 9 deletions
diff --git a/source/game/items/StarArmors.cpp b/source/game/items/StarArmors.cpp
index 85580d9..01ff4c4 100644
--- a/source/game/items/StarArmors.cpp
+++ b/source/game/items/StarArmors.cpp
@@ -43,11 +43,11 @@ List<Drawable> ArmorItem::drawables() const {
return drawables;
}
-float ArmorItem::getAngle(float aimAngle) {
+float ArmorItem::getAngle(float) {
return -25.0f * Constants::deg2rad;
}
-void ArmorItem::fire(FireMode mode, bool shifting, bool edgeTriggered) {}
+void ArmorItem::fire(FireMode, bool, bool) {}
void ArmorItem::fireTriggered() {}
List<String> const& ArmorItem::colorOptions() {
diff --git a/source/game/items/StarInspectionTool.cpp b/source/game/items/StarInspectionTool.cpp
index a9b12c4..6ab6789 100644
--- a/source/game/items/StarInspectionTool.cpp
+++ b/source/game/items/StarInspectionTool.cpp
@@ -31,7 +31,7 @@ ItemPtr InspectionTool::clone() const {
return make_shared<InspectionTool>(*this);
}
-void InspectionTool::update(float dt, FireMode fireMode, bool, HashSet<MoveControlType> const&) {
+void InspectionTool::update(float, FireMode fireMode, bool, HashSet<MoveControlType> const&) {
m_currentAngle = world()->geometry().diff(owner()->aimPosition(), owner()->position()).angle();
m_currentPosition = owner()->position() + owner()->handPosition(hand(), m_lightPosition - m_handPosition);
SpatialLogger::logPoint("world", m_currentPosition, {0, 0, 255, 255});
diff --git a/source/game/items/StarInstrumentItem.cpp b/source/game/items/StarInstrumentItem.cpp
index f93bca7..1a31934 100644
--- a/source/game/items/StarInstrumentItem.cpp
+++ b/source/game/items/StarInstrumentItem.cpp
@@ -42,7 +42,7 @@ StringSet InstrumentItem::effectSources() const {
return m_inactiveEffectSources;
}
-void InstrumentItem::update(float dt, FireMode, bool, HashSet<MoveControlType> const&) {
+void InstrumentItem::update(float, FireMode, bool, HashSet<MoveControlType> const&) {
if (entityMode() == EntityMode::Master) {
if (active()) {
m_activeCooldown--;
diff --git a/source/game/items/StarMaterialItem.cpp b/source/game/items/StarMaterialItem.cpp
index c533add..42f90fc 100644
--- a/source/game/items/StarMaterialItem.cpp
+++ b/source/game/items/StarMaterialItem.cpp
@@ -119,7 +119,7 @@ void MaterialItem::update(float dt, FireMode fireMode, bool shifting, HashSet<Mo
}
}
-void MaterialItem::render(RenderCallback* renderCallback, EntityRenderLayer renderLayer) {
+void MaterialItem::render(RenderCallback* renderCallback, EntityRenderLayer) {
if (m_collisionOverride != TileCollisionOverride::None) {
float pulseLevel = 1.f - 0.3f * 0.5f * ((float)sin(2 * Constants::pi * 4.0 * Time::monotonicTime()) + 1.f);
Color color = Color::rgba(owner()->favoriteColor()).mix(Color::White);
@@ -190,8 +190,8 @@ void MaterialItem::fire(FireMode mode, bool shifting, bool edgeTriggered) {
: Root::singleton().materialDatabase()->materialCollisionKind(m_material);
size_t total = 0;
- for (int i = 0; i != steps; ++i) {
- auto placementOrigin = aimPosition + diff * (1.0f - ((float)i / steps));
+ for (unsigned i = 0; i != steps; ++i) {
+ auto placementOrigin = aimPosition + diff * (1.0f - (static_cast<float>(i) / steps));
if (!owner()->inToolRange(placementOrigin))
continue;
@@ -218,7 +218,7 @@ void MaterialItem::fire(FireMode mode, bool shifting, bool edgeTriggered) {
m_lastAimPosition = aimPosition;
}
-void MaterialItem::endFire(FireMode mode, bool shifting) {
+void MaterialItem::endFire(FireMode, bool) {
m_lastAimPosition.reset();
}
diff --git a/source/game/items/StarUnlockItem.cpp b/source/game/items/StarUnlockItem.cpp
index ee067fb..ad61eae 100644
--- a/source/game/items/StarUnlockItem.cpp
+++ b/source/game/items/StarUnlockItem.cpp
@@ -24,7 +24,7 @@ List<Drawable> UnlockItem::drawables() const {
return m_drawables;
}
-List<Drawable> UnlockItem::preview(PlayerPtr const& viewer) const {
+List<Drawable> UnlockItem::preview(PlayerPtr const&) const {
return iconDrawables();
}