mirror of https://github.com/AxioDL/metaforce.git
CGraphics: Fix implicit truncation errors
This commit is contained in:
parent
fc9e18fe46
commit
4b40767050
|
@ -317,8 +317,8 @@ SClipScreenRect CGraphics::ClipScreenRectFromVS(const zeus::CVector3f& p1, const
|
||||||
// int finalMinY = std::max(minY, 0 /* ViewportY origin */);
|
// int finalMinY = std::max(minY, 0 /* ViewportY origin */);
|
||||||
// int finalMaxY = std::min(maxY, int(g_Viewport.xc_height));
|
// int finalMaxY = std::min(maxY, int(g_Viewport.xc_height));
|
||||||
|
|
||||||
int width = maxX2 - minX2;
|
u32 width = maxX2 - minX2;
|
||||||
int height = maxY2 - minY2;
|
u32 height = maxY2 - minY2;
|
||||||
return {true,
|
return {true,
|
||||||
minX2,
|
minX2,
|
||||||
minY2,
|
minY2,
|
||||||
|
|
|
@ -116,11 +116,11 @@ extern SViewport g_Viewport;
|
||||||
|
|
||||||
struct SClipScreenRect {
|
struct SClipScreenRect {
|
||||||
bool x0_valid = false;
|
bool x0_valid = false;
|
||||||
int32_t x4_left = 0;
|
s32 x4_left = 0;
|
||||||
int32_t x8_top = 0;
|
s32 x8_top = 0;
|
||||||
uint32_t xc_width = 0;
|
u32 xc_width = 0;
|
||||||
uint32_t x10_height = 0;
|
u32 x10_height = 0;
|
||||||
uint32_t x14_dstWidth = 0;
|
u32 x14_dstWidth = 0;
|
||||||
float x18_uvXMin = 0.f;
|
float x18_uvXMin = 0.f;
|
||||||
float x1c_uvXMax = 0.f;
|
float x1c_uvXMax = 0.f;
|
||||||
float x20_uvYMin = 0.f;
|
float x20_uvYMin = 0.f;
|
||||||
|
|
Loading…
Reference in New Issue