summaryrefslogtreecommitdiff
path: root/soh
diff options
context:
space:
mode:
authorLywx <kiritodev01@gmail.com>2024-05-27 16:33:02 -0600
committerGitHub <noreply@github.com>2024-05-27 18:33:02 -0400
commit53efc22a23efd7bc76733efa00a35d67b798ae29 (patch)
tree59c9d7c43b8cfa3863cb2b1072e4a73f31e139f3 /soh
parentad0e17383e72c652541e6a90367ab720c6a18723 (diff)
Framebuffer clear and bump LUS (#4187)
Diffstat (limited to 'soh')
-rw-r--r--soh/CMakeLists.txt4
-rw-r--r--soh/include/functions.h2
-rw-r--r--soh/soh/GbiWrap.cpp9
-rw-r--r--soh/src/code/z_rcp.c8
4 files changed, 8 insertions, 15 deletions
diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt
index 3f086bcac..6984291d3 100644
--- a/soh/CMakeLists.txt
+++ b/soh/CMakeLists.txt
@@ -407,6 +407,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
">"
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>"
"INCLUDE_GAME_PRINTF;"
+ "F3DEX_GBI_2"
"UNICODE;"
"_UNICODE"
STORMLIB_NO_AUTO_LINK
@@ -425,6 +426,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
"NDEBUG;"
">"
"INCLUDE_GAME_PRINTF;"
+ "F3DEX_GBI_2"
"WIN32;"
"UNICODE;"
"_UNICODE"
@@ -440,6 +442,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
"$<$<CONFIG:Release>:"
"NDEBUG"
">"
+ "F3DEX_GBI_2"
"SPDLOG_ACTIVE_LEVEL=3;"
"SPDLOG_NO_THREAD_ID;"
"SPDLOG_NO_TLS;"
@@ -453,6 +456,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang")
"$<$<CONFIG:Release>:"
"NDEBUG"
">"
+ "F3DEX_GBI_2"
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>"
"SPDLOG_ACTIVE_LEVEL=0;"
"_CONSOLE;"
diff --git a/soh/include/functions.h b/soh/include/functions.h
index b9e1f6981..fc7fc15b7 100644
--- a/soh/include/functions.h
+++ b/soh/include/functions.h
@@ -22,12 +22,10 @@ extern "C"
void gSPSegment(void* value, int segNum, uintptr_t target);
void gSPSegmentLoadRes(void* value, int segNum, uintptr_t target);
-void gDPSetTextureImage(Gfx* pkt, u32 f, u32 s, u32 w, uintptr_t i);
void gSPDisplayList(Gfx* pkt, Gfx* dl);
void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset);
void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0);
void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr);
-void gDPSetTextureImageFB(Gfx* pkt, u32 format, u32 size, u32 width, int fb);
void cleararena(void);
diff --git a/soh/soh/GbiWrap.cpp b/soh/soh/GbiWrap.cpp
index 2399051f5..2dad29e60 100644
--- a/soh/soh/GbiWrap.cpp
+++ b/soh/soh/GbiWrap.cpp
@@ -66,15 +66,6 @@ extern "C" void gSPSegmentLoadRes(void* value, int segNum, uintptr_t target) {
__gSPSegment(value, segNum, target);
}
-extern "C" void gDPSetTextureImage(Gfx* pkt, u32 format, u32 size, u32 width, uintptr_t i) {
- __gDPSetTextureImage(pkt, format, size, width, i);
-}
-
-extern "C" void gDPSetTextureImageFB(Gfx* pkt, u32 format, u32 size, u32 width, int fb)
-{
- __gDPSetTextureImageFB(pkt, format, size, width, fb);
-}
-
extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) {
char* imgData = (char*)dl;
diff --git a/soh/src/code/z_rcp.c b/soh/src/code/z_rcp.c
index adfa946e7..978c04d3c 100644
--- a/soh/src/code/z_rcp.c
+++ b/soh/src/code/z_rcp.c
@@ -1539,7 +1539,7 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_ZDZ(G_MAXFBZ, 0) << 16) | GPACK_ZDZ(G_MAXFBZ, 0));
- gDPFillRectangle(POLY_OPA_DISP++, 0, letterboxSize, gScreenWidth - 1, gScreenHeight - letterboxSize - 1);
+ gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
gDPPipeSync(POLY_OPA_DISP++);
// Fill the whole screen with the base color
@@ -1548,7 +1548,7 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1));
- gDPFillRectangle(POLY_OPA_DISP++, 0, letterboxSize, gScreenWidth - 1, gScreenHeight - letterboxSize - 1);
+ gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
gDPPipeSync(POLY_OPA_DISP++);
// Draw the letterbox if applicable (uses the same color as the screen base)
@@ -1557,8 +1557,8 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
gDPSetCycleType(OVERLAY_DISP++, G_CYC_FILL);
gDPSetRenderMode(OVERLAY_DISP++, G_RM_NOOP, G_RM_NOOP2);
gDPSetFillColor(OVERLAY_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1));
- gDPFillRectangle(OVERLAY_DISP++, 0, 0, gScreenWidth - 1, letterboxSize - 1);
- gDPFillRectangle(OVERLAY_DISP++, 0, gScreenHeight - letterboxSize, gScreenWidth - 1, gScreenHeight - 1);
+ gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), letterboxSize - 1);
+ gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), gScreenHeight - letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - 1);
gDPPipeSync(OVERLAY_DISP++);
}
}