summaryrefslogtreecommitdiff
path: root/src/egg/core/eggAsyncDisplay.cpp
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2024-04-27 15:07:18 +0200
committerrobojumper <robojumper@gmail.com>2024-04-27 16:32:40 +0200
commit010a351e4d874dd4d479986bd8f87c29523505fc (patch)
tree502822595b4d03732d1bf294a2b9786dccac3397 /src/egg/core/eggAsyncDisplay.cpp
parentb35d67e5550230075d7b8aa6d121d460a4c6409e (diff)
Use GXPosition functions
Diffstat (limited to 'src/egg/core/eggAsyncDisplay.cpp')
-rw-r--r--src/egg/core/eggAsyncDisplay.cpp34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/egg/core/eggAsyncDisplay.cpp b/src/egg/core/eggAsyncDisplay.cpp
index 8aaf943c..258c7145 100644
--- a/src/egg/core/eggAsyncDisplay.cpp
+++ b/src/egg/core/eggAsyncDisplay.cpp
@@ -11,8 +11,8 @@ static EGG::AsyncDisplay *lbl_80576790[2];
namespace EGG {
AsyncDisplay::AsyncDisplay(u8 maxRetrace): Display(maxRetrace) {
- this->field_0x98 = 0.0;
- this->field_0x9C = 0.0;
+ this->field_0x98 = 0;
+ this->field_0x9C = 0.0f;
this->field_0xA4 = 0;
this->field_0xA8 = 0;
this->field_0xAC = 0;
@@ -166,9 +166,9 @@ void AsyncDisplay::clearEFB(u16 fbWidth, u16 fbHeight, u16 x, u16 y, u16 width,
GXInitTexObj(&lbl_80673B20, &lbl_8056EB20, 4, 4, GX_TF_Z24X8, GX_REPEAT, GX_REPEAT, 0);
GXInitTexObjLOD(&lbl_80673B20, GX_NEAR, GX_NEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
Mtx44 mat;
- C_MTXOrtho(mat, 0.0, (float)fbHeight, 0.0, (float)fbWidth, 0.0, 1.0f);
+ C_MTXOrtho(mat, 0.0, fbHeight, 0.0, fbWidth, 0.0, 1.0f);
GXSetProjection(mat, GX_ORTHOGRAPHIC);
- GXSetViewport(0.0, 0.0, (float)fbWidth, (float)fbHeight, 0.0, 1.0f);
+ GXSetViewport(0.0, 0.0, fbWidth, fbHeight, 0.0, 1.0f);
GXSetScissor(0, 0, fbWidth, fbHeight);
lbl_80674C00.loadPosMtx(0);
GXSetCurrentMtx(0);
@@ -201,22 +201,16 @@ void AsyncDisplay::clearEFB(u16 fbWidth, u16 fbHeight, u16 x, u16 y, u16 width,
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
// The regs are wrong here
- WGPIPE.us = x;
- WGPIPE.us = y;
- WGPIPE.c = 0;
- WGPIPE.c = 0;
- WGPIPE.us = x + width;
- WGPIPE.us = y;
- WGPIPE.c = 1;
- WGPIPE.c = 0;
- WGPIPE.us = x + width;
- WGPIPE.us = y + height;
- WGPIPE.c = 1;
- WGPIPE.c = 1;
- WGPIPE.us = width;
- WGPIPE.us = y + height;
- WGPIPE.c = 0;
- WGPIPE.c = 1;
+ GXPosition2u16(x, y);
+ GXPosition2u8(0, 0);
+ GXPosition2u16(x + width, y);
+ GXPosition2u8(1, 0);
+ GXPosition2u16(x + width, y + height);
+ GXPosition2u8(1, 1);
+ GXPosition2u16(width, y + height);
+ GXPosition2u8(0, 1);
+
+ // GXEnd();
GXSetZTexture(0, GX_TF_Z24X8, 0);
GXSetZCompLoc(true);