LyShine
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,7 @@ namespace UiSpline
|
||||
ILINE void flag_clr(int flag) { m_flags &= ~flag; };
|
||||
ILINE int flag(int flag) { return m_flags & flag; };
|
||||
|
||||
ILINE void ORT(int ort) { m_ORT = ort; };
|
||||
ILINE void ORT(int ort) { m_ORT = static_cast<uint8>(ort); };
|
||||
ILINE int ORT() const { return m_ORT; };
|
||||
ILINE int isORT(int o) const { return (m_ORT == o); };
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ static int Create2DTexture(int width, int height, byte* data, ETEX_Format format
|
||||
static AZ::Vector2 GetTextureSize(AZ::Data::Instance<AZ::RPI::Image> image)
|
||||
{
|
||||
AZ::RHI::Size size = image->GetDescriptor().m_size;
|
||||
return AZ::Vector2(size.m_width, size.m_height);
|
||||
return AZ::Vector2(static_cast<float>(size.m_width), static_cast<float>(size.m_height));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ namespace LyShine
|
||||
curBaseState.m_stencilState.m_backFace = stencilOpState;
|
||||
|
||||
// set up for stencil write
|
||||
dynamicDraw->SetStencilReference(uiRenderer->GetStencilRef());
|
||||
dynamicDraw->SetStencilReference(static_cast<uint8_t>(uiRenderer->GetStencilRef()));
|
||||
curBaseState.m_stencilState.m_enable = true;
|
||||
curBaseState.m_stencilState.m_writeMask = 0xFF;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ namespace LyShine
|
||||
uiRenderer->DecrementStencilRef();
|
||||
}
|
||||
|
||||
dynamicDraw->SetStencilReference(uiRenderer->GetStencilRef());
|
||||
dynamicDraw->SetStencilReference(static_cast<uint8_t>(uiRenderer->GetStencilRef()));
|
||||
|
||||
if (firstPass)
|
||||
{
|
||||
@@ -790,7 +790,7 @@ namespace LyShine
|
||||
{
|
||||
for (int i = 0; i < primitive->m_numVertices; ++i)
|
||||
{
|
||||
primitive->m_vertices[i].texIndex = texUnit;
|
||||
primitive->m_vertices[i].texIndex = static_cast<uint8>(texUnit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ AZ::Vector2 CSprite::GetSize()
|
||||
}
|
||||
|
||||
AZ::RHI::Size size = image->GetRHIImage()->GetDescriptor().m_size;
|
||||
return AZ::Vector2(size.m_width, size.m_height);
|
||||
return AZ::Vector2(static_cast<float>(size.m_width), static_cast<float>(size.m_height));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1666,7 +1666,7 @@ void UiImageComponent::RenderRadialFilledQuad(const AZ::Vector2* positions, cons
|
||||
|
||||
const int numIndices = 15;
|
||||
uint16 indices[numIndices];
|
||||
for (int ix = 0; ix < 5; ++ix)
|
||||
for (uint16 ix = 0; ix < 5; ++ix)
|
||||
{
|
||||
indices[ix * 3 + firstIndexOffset] = ix + 1;
|
||||
indices[ix * 3 + secondIndexOffset] = ix + 2;
|
||||
@@ -2268,20 +2268,20 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint
|
||||
int indicesAdded = 0;
|
||||
if (verticesAdded == 3)
|
||||
{
|
||||
renderIndices[renderIndexOffset] = vertexOffset - 3;
|
||||
renderIndices[renderIndexOffset + 1] = vertexOffset - 2;
|
||||
renderIndices[renderIndexOffset + 2] = vertexOffset - 1;
|
||||
renderIndices[renderIndexOffset] = static_cast<uint16>(vertexOffset - 3);
|
||||
renderIndices[renderIndexOffset + 1] = static_cast<uint16>(vertexOffset - 2);
|
||||
renderIndices[renderIndexOffset + 2] = static_cast<uint16>(vertexOffset - 1);
|
||||
indicesAdded = 3;
|
||||
}
|
||||
else if (verticesAdded == 4)
|
||||
{
|
||||
renderIndices[renderIndexOffset] = vertexOffset - 4;
|
||||
renderIndices[renderIndexOffset + 1] = vertexOffset - 3;
|
||||
renderIndices[renderIndexOffset + 2] = vertexOffset - 2;
|
||||
renderIndices[renderIndexOffset] = static_cast<uint16>(vertexOffset - 4);
|
||||
renderIndices[renderIndexOffset + 1] = static_cast<uint16>(vertexOffset - 3);
|
||||
renderIndices[renderIndexOffset + 2] = static_cast<uint16>(vertexOffset - 2);
|
||||
|
||||
renderIndices[renderIndexOffset + 3] = vertexOffset - 4;
|
||||
renderIndices[renderIndexOffset + 4] = vertexOffset - 2;
|
||||
renderIndices[renderIndexOffset + 5] = vertexOffset - 1;
|
||||
renderIndices[renderIndexOffset + 3] = static_cast<uint16>(vertexOffset - 4);
|
||||
renderIndices[renderIndexOffset + 4] = static_cast<uint16>(vertexOffset - 2);
|
||||
renderIndices[renderIndexOffset + 5] = static_cast<uint16>(vertexOffset - 1);
|
||||
indicesAdded = 6;
|
||||
}
|
||||
|
||||
|
||||
@@ -1825,8 +1825,8 @@ void UiParticleEmitterComponent::ResetParticleBuffers()
|
||||
}
|
||||
m_cachedPrimitive.m_indices = new uint16[numIndices];
|
||||
|
||||
const int verticesPerParticle = 4;
|
||||
int baseIndex = 0;
|
||||
const uint16 verticesPerParticle = 4;
|
||||
uint16 baseIndex = 0;
|
||||
for (AZ::u32 i = 0; i < numIndices; i += indicesPerParticle)
|
||||
{
|
||||
m_cachedPrimitive.m_indices[i + 0] = 0 + baseIndex;
|
||||
|
||||
@@ -1096,7 +1096,7 @@ UiTextComponent::InlineImage::InlineImage(const AZStd::string& texturePathname,
|
||||
if (m_texture)
|
||||
{
|
||||
AZ::RHI::Size size = m_texture->GetDescriptor().m_size;
|
||||
m_size = AZ::Vector2(size.m_width, size.m_height);
|
||||
m_size = AZ::Vector2(static_cast<float>(size.m_width), static_cast<float>(size.m_height));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user