CGraphics: Fix implicit truncation errors

This commit is contained in:
Luke Street 2020-09-29 01:00:10 -04:00
parent fc9e18fe46
commit 4b40767050
2 changed files with 7 additions and 7 deletions

View File

@ -317,8 +317,8 @@ SClipScreenRect CGraphics::ClipScreenRectFromVS(const zeus::CVector3f& p1, const
// int finalMinY = std::max(minY, 0 /* ViewportY origin */);
// int finalMaxY = std::min(maxY, int(g_Viewport.xc_height));
int width = maxX2 - minX2;
int height = maxY2 - minY2;
u32 width = maxX2 - minX2;
u32 height = maxY2 - minY2;
return {true,
minX2,
minY2,

View File

@ -116,11 +116,11 @@ extern SViewport g_Viewport;
struct SClipScreenRect {
bool x0_valid = false;
int32_t x4_left = 0;
int32_t x8_top = 0;
uint32_t xc_width = 0;
uint32_t x10_height = 0;
uint32_t x14_dstWidth = 0;
s32 x4_left = 0;
s32 x8_top = 0;
u32 xc_width = 0;
u32 x10_height = 0;
u32 x14_dstWidth = 0;
float x18_uvXMin = 0.f;
float x1c_uvXMax = 0.f;
float x20_uvYMin = 0.f;