Fix some GCC warnings
Former-commit-id: 31c8460b4656c29ac165d7aa28f335851f2565df
This commit is contained in:
@@ -11,8 +11,8 @@ namespace Ndk
|
||||
inline CameraComponent::CameraComponent() :
|
||||
m_projectionType(Nz::ProjectionType_Perspective),
|
||||
m_targetRegion(0.f, 0.f, 1.f, 1.f),
|
||||
m_size(0.f),
|
||||
m_target(nullptr),
|
||||
m_size(0.f),
|
||||
m_frustumUpdated(false),
|
||||
m_projectionMatrixUpdated(false),
|
||||
m_viewMatrixUpdated(false),
|
||||
@@ -30,8 +30,8 @@ namespace Ndk
|
||||
AbstractViewer(camera),
|
||||
m_projectionType(camera.m_projectionType),
|
||||
m_targetRegion(camera.m_targetRegion),
|
||||
m_size(camera.m_size),
|
||||
m_target(nullptr),
|
||||
m_size(camera.m_size),
|
||||
m_frustumUpdated(false),
|
||||
m_projectionMatrixUpdated(false),
|
||||
m_viewMatrixUpdated(false),
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Ndk
|
||||
{
|
||||
inline GraphicsComponent::GraphicsComponent(const GraphicsComponent& graphicsComponent) :
|
||||
Component(graphicsComponent),
|
||||
HandledObject(graphicsComponent),
|
||||
m_boundingVolume(graphicsComponent.m_boundingVolume),
|
||||
m_transformMatrix(graphicsComponent.m_transformMatrix),
|
||||
m_boundingVolumeUpdated(graphicsComponent.m_boundingVolumeUpdated),
|
||||
@@ -41,7 +42,7 @@ namespace Ndk
|
||||
r.data.renderOrder = renderOrder;
|
||||
r.renderable = std::move(renderable);
|
||||
r.renderableInvalidationSlot.Connect(r.renderable->OnInstancedRenderableInvalidateData, std::bind(&GraphicsComponent::InvalidateRenderableData, this, std::placeholders::_1, std::placeholders::_2, m_renderables.size()-1));
|
||||
|
||||
|
||||
InvalidateBoundingVolume();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,12 @@ namespace Nz
|
||||
|
||||
inline unsigned int LuaImplQueryArg(const LuaInstance& instance, int index, FontParams* params, TypeTag<FontParams>)
|
||||
{
|
||||
NazaraUnused(params);
|
||||
|
||||
instance.CheckType(index, Nz::LuaType_Table);
|
||||
|
||||
// Structure is empty for now
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ namespace Ndk
|
||||
{
|
||||
case Nz::Keyboard::Down:
|
||||
case Nz::Keyboard::Up:
|
||||
{
|
||||
if (event.key.code == Nz::Keyboard::Up)
|
||||
m_historyPosition = std::min<std::size_t>(m_commandHistory.size(), m_historyPosition + 1);
|
||||
else
|
||||
@@ -159,6 +160,10 @@ namespace Ndk
|
||||
m_inputDrawer.SetText(s_inputPrefix + text);
|
||||
m_inputTextSprite->Update(m_inputDrawer);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Ndk
|
||||
|
||||
// SDK
|
||||
application("Application"),
|
||||
nodeComponent("NodeComponent"),
|
||||
entityClass("Entity"),
|
||||
nodeComponent("NodeComponent"),
|
||||
velocityComponent("VelocityComponent"),
|
||||
worldClass("World")
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace Ndk
|
||||
|
||||
// Audio
|
||||
musicClass("Music"),
|
||||
soundClass("Sound"),
|
||||
soundBuffer("SoundBuffer"),
|
||||
soundEmitter("SoundEmitter"),
|
||||
soundClass("Sound"),
|
||||
|
||||
// Graphics
|
||||
instancedRenderable("InstancedRenderable"),
|
||||
|
||||
@@ -76,6 +76,8 @@ namespace Ndk
|
||||
/*********************************** Nz::SoundBuffer **********************************/
|
||||
soundBuffer.SetConstructor([] (Nz::LuaInstance& lua, Nz::SoundBufferRef* instance)
|
||||
{
|
||||
NazaraUnused(lua);
|
||||
|
||||
Nz::PlacementNew(instance, Nz::SoundBuffer::New());
|
||||
return true;
|
||||
});
|
||||
@@ -115,16 +117,16 @@ namespace Ndk
|
||||
return 1;
|
||||
});
|
||||
|
||||
soundBuffer.BindMethod("__tostring", [] (Nz::LuaInstance& lua, Nz::SoundBufferRef& soundBuffer) -> int
|
||||
soundBuffer.BindMethod("__tostring", [] (Nz::LuaInstance& lua, Nz::SoundBufferRef& instance) -> int
|
||||
{
|
||||
Nz::StringStream stream("SoundBuffer(");
|
||||
if (soundBuffer->IsValid())
|
||||
if (instance->IsValid())
|
||||
{
|
||||
Nz::String filePath = soundBuffer->GetFilePath();
|
||||
Nz::String filePath = instance->GetFilePath();
|
||||
if (!filePath.IsEmpty())
|
||||
stream << "File: " << filePath << ", ";
|
||||
|
||||
stream << "Duration: " << soundBuffer->GetDuration() / 1000.f << "s";
|
||||
|
||||
stream << "Duration: " << instance->GetDuration() / 1000.f << "s";
|
||||
}
|
||||
stream << ')';
|
||||
|
||||
@@ -148,17 +150,17 @@ namespace Ndk
|
||||
|
||||
soundEmitter.BindMethod("IsLooping", &Nz::SoundEmitter::IsLooping);
|
||||
soundEmitter.BindMethod("IsSpatialized", &Nz::SoundEmitter::IsSpatialized);
|
||||
|
||||
|
||||
soundEmitter.BindMethod("Pause", &Nz::SoundEmitter::Pause);
|
||||
soundEmitter.BindMethod("Play", &Nz::SoundEmitter::Play);
|
||||
|
||||
|
||||
soundEmitter.BindMethod("SetAttenuation", &Nz::SoundEmitter::SetAttenuation);
|
||||
soundEmitter.BindMethod("SetMinDistance", &Nz::SoundEmitter::SetMinDistance);
|
||||
soundEmitter.BindMethod("SetPitch", &Nz::SoundEmitter::SetPitch);
|
||||
soundEmitter.BindMethod("SetPosition", (void(Nz::SoundEmitter::*)(const Nz::Vector3f&)) &Nz::SoundEmitter::SetPosition);
|
||||
soundEmitter.BindMethod("SetVelocity", (void(Nz::SoundEmitter::*)(const Nz::Vector3f&)) &Nz::SoundEmitter::SetVelocity);
|
||||
soundEmitter.BindMethod("SetVolume", &Nz::SoundEmitter::SetVolume);
|
||||
|
||||
|
||||
soundEmitter.BindMethod("Stop", &Nz::SoundEmitter::Stop);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,9 +238,15 @@ namespace Ndk
|
||||
case 'h':
|
||||
lua.Push(instance.height);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -290,6 +296,9 @@ namespace Ndk
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -313,7 +322,7 @@ namespace Ndk
|
||||
Nz::PlacementNew(quaternion, *static_cast<Nz::Quaterniond*>(lua.ToUserdata(1)));
|
||||
else
|
||||
break;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -389,6 +398,9 @@ namespace Ndk
|
||||
case 'z':
|
||||
instance.z = value;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -455,9 +467,15 @@ namespace Ndk
|
||||
case 'y':
|
||||
lua.Push(instance.y);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -496,9 +514,15 @@ namespace Ndk
|
||||
case 'y':
|
||||
instance.y = value;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -582,9 +606,15 @@ namespace Ndk
|
||||
case 'z':
|
||||
lua.Push(instance.z);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -627,9 +657,15 @@ namespace Ndk
|
||||
case 'z':
|
||||
instance.z = value;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user