Fix the remaining msvc warnings
This commit is contained in:
parent
fb6a0d7631
commit
fa48d099f2
@ -101,12 +101,12 @@ void CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs)
|
|||||||
if (FramesPerSecond > 0.f) //forwards...
|
if (FramesPerSecond > 0.f) //forwards...
|
||||||
{
|
{
|
||||||
if (CurrentFrameNr > EndFrame)
|
if (CurrentFrameNr > EndFrame)
|
||||||
CurrentFrameNr = StartFrame + fmod(CurrentFrameNr - StartFrame, (f32)(EndFrame-StartFrame));
|
CurrentFrameNr = StartFrame + fmodf(CurrentFrameNr - StartFrame, (f32)(EndFrame-StartFrame));
|
||||||
}
|
}
|
||||||
else //backwards...
|
else //backwards...
|
||||||
{
|
{
|
||||||
if (CurrentFrameNr < StartFrame)
|
if (CurrentFrameNr < StartFrame)
|
||||||
CurrentFrameNr = EndFrame - fmod(EndFrame - CurrentFrameNr, (f32)(EndFrame-StartFrame));
|
CurrentFrameNr = EndFrame - fmodf(EndFrame - CurrentFrameNr, (f32)(EndFrame-StartFrame));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1488,7 +1488,7 @@ void CSkinnedMesh::computeWeightInfluence(SJoint *joint, size_t &index, WeightIn
|
|||||||
{
|
{
|
||||||
SWeight& weight = joint->Weights[i];
|
SWeight& weight = joint->Weights[i];
|
||||||
JointInfluence tmp;
|
JointInfluence tmp;
|
||||||
tmp.joint_idx = index;
|
tmp.joint_idx = (int)index;
|
||||||
tmp.weight = weight.strength;
|
tmp.weight = weight.strength;
|
||||||
wi[weight.buffer_id][weight.vertex_id].push_back(tmp);
|
wi[weight.buffer_id][weight.vertex_id].push_back(tmp);
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ void CPUParticleManager::drawAll()
|
|||||||
}
|
}
|
||||||
glBindVertexArray(std::get<0>(m_gl_particles[p.second]));
|
glBindVertexArray(std::get<0>(m_gl_particles[p.second]));
|
||||||
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4,
|
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4,
|
||||||
m_particles_generated.at(p.second).size());
|
(unsigned)m_particles_generated.at(p.second).size());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // drawAll
|
} // drawAll
|
||||||
|
@ -253,11 +253,11 @@ void STKParticle::generate(std::vector<CPUParticle>* out)
|
|||||||
{
|
{
|
||||||
if (m_hm != NULL)
|
if (m_hm != NULL)
|
||||||
{
|
{
|
||||||
stimulateHeightMap(i, active_count, NULL);
|
stimulateHeightMap((float)i, active_count, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stimulateNormal(i, active_count, NULL);
|
stimulateNormal((float)i, active_count, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_first_execution = false;
|
m_first_execution = false;
|
||||||
|
@ -270,7 +270,7 @@ namespace Scripting
|
|||||||
{
|
{
|
||||||
if (memory)
|
if (memory)
|
||||||
{
|
{
|
||||||
return ((scene::IAnimatedMeshSceneNode*)(memory))->getFrameNr();
|
return (int)((scene::IAnimatedMeshSceneNode*)(memory))->getFrameNr();
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ namespace Scripting
|
|||||||
{
|
{
|
||||||
if (memory)
|
if (memory)
|
||||||
{
|
{
|
||||||
((scene::IAnimatedMeshSceneNode*)(memory))->setCurrentFrame(frame);
|
((scene::IAnimatedMeshSceneNode*)(memory))->setCurrentFrame((float)frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ void CheckCannon::removeFlyable(Flyable *flyable)
|
|||||||
m_all_flyables.end(),
|
m_all_flyables.end(),
|
||||||
flyable);
|
flyable);
|
||||||
assert(i != m_all_flyables.end());
|
assert(i != m_all_flyables.end());
|
||||||
int index = i - m_all_flyables.begin(); // get the index
|
size_t index = i - m_all_flyables.begin(); // get the index
|
||||||
m_all_flyables.erase(i);
|
m_all_flyables.erase(i);
|
||||||
m_flyable_previous_position.erase(m_flyable_previous_position.begin() + index);
|
m_flyable_previous_position.erase(m_flyable_previous_position.begin() + index);
|
||||||
} // removeFlyable
|
} // removeFlyable
|
||||||
|
@ -180,12 +180,12 @@ void Profiler::pushCPUMarker(const char* name, const video::SColor& colour)
|
|||||||
double start = getTimeMilliseconds() - m_time_last_sync;
|
double start = getTimeMilliseconds() - m_time_last_sync;
|
||||||
if (i != td.m_all_event_data.end())
|
if (i != td.m_all_event_data.end())
|
||||||
{
|
{
|
||||||
i->second.setStart(m_current_frame, start, td.m_event_stack.size());
|
i->second.setStart(m_current_frame, start, (int)td.m_event_stack.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EventData ed(colour, m_max_frames);
|
EventData ed(colour, m_max_frames);
|
||||||
ed.setStart(m_current_frame, start, td.m_event_stack.size());
|
ed.setStart(m_current_frame, start, (int)td.m_event_stack.size());
|
||||||
td.m_all_event_data[name] = ed;
|
td.m_all_event_data[name] = ed;
|
||||||
// Ordered headings is used to determine the order in which the
|
// Ordered headings is used to determine the order in which the
|
||||||
// bar graph is drawn. Outer profiling events will be added first,
|
// bar graph is drawn. Outer profiling events will be added first,
|
||||||
@ -392,8 +392,8 @@ void Profiler::draw()
|
|||||||
start_xpos += factor*marker.getDuration();
|
start_xpos += factor*marker.getDuration();
|
||||||
|
|
||||||
// Reduce vertically the size of the markers according to their layer
|
// Reduce vertically the size of the markers according to their layer
|
||||||
pos.UpperLeftCorner.Y += 2 * marker.getLayer();
|
pos.UpperLeftCorner.Y += 2 * (int)marker.getLayer();
|
||||||
pos.LowerRightCorner.Y -= 2 * marker.getLayer();
|
pos.LowerRightCorner.Y -= 2 * (int)marker.getLayer();
|
||||||
|
|
||||||
GL32_draw2DRectangle(j->second.getColour(), pos);
|
GL32_draw2DRectangle(j->second.getColour(), pos);
|
||||||
// If the mouse cursor is over the marker, get its information
|
// If the mouse cursor is over the marker, get its information
|
||||||
|
Loading…
x
Reference in New Issue
Block a user