mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
match PreRender_CopyImageRegionImpl (#2093)
This commit is contained in:
parent
160d8f4192
commit
c00991da29
1 changed files with 3 additions and 1 deletions
|
@ -138,6 +138,7 @@ void PreRender_CopyImageRegionImpl(PreRender* this, Gfx** gfxP) {
|
||||||
s32 ult;
|
s32 ult;
|
||||||
s32 lrt;
|
s32 lrt;
|
||||||
s32 uly;
|
s32 uly;
|
||||||
|
s32 lry;
|
||||||
|
|
||||||
// Make sure that we don't load past the end of the source image
|
// Make sure that we don't load past the end of the source image
|
||||||
if (nRows > rowsRemaining) {
|
if (nRows > rowsRemaining) {
|
||||||
|
@ -148,6 +149,7 @@ void PreRender_CopyImageRegionImpl(PreRender* this, Gfx** gfxP) {
|
||||||
ult = this->ulySave + curRow;
|
ult = this->ulySave + curRow;
|
||||||
lrt = ult + nRows - 1;
|
lrt = ult + nRows - 1;
|
||||||
uly = this->uly + curRow;
|
uly = this->uly + curRow;
|
||||||
|
lry = uly + nRows - 1;
|
||||||
|
|
||||||
// Load a horizontal strip of the source image in RGBA16 format
|
// Load a horizontal strip of the source image in RGBA16 format
|
||||||
gDPLoadTextureTile(gfx++, this->fbufSave, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->widthSave, this->height - 1,
|
gDPLoadTextureTile(gfx++, this->fbufSave, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->widthSave, this->height - 1,
|
||||||
|
@ -155,7 +157,7 @@ void PreRender_CopyImageRegionImpl(PreRender* this, Gfx** gfxP) {
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
// Draw that horizontal strip to the destination image, dsdx is 4 << 10 for COPY mode
|
// Draw that horizontal strip to the destination image, dsdx is 4 << 10 for COPY mode
|
||||||
gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, (uly + nRows - 1) << 2, G_TX_RENDERTILE,
|
gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, lry << 2, G_TX_RENDERTILE,
|
||||||
this->ulxSave << 5, ult << 5, 4 << 10, 1 << 10);
|
this->ulxSave << 5, ult << 5, 4 << 10, 1 << 10);
|
||||||
|
|
||||||
curRow += nRows;
|
curRow += nRows;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue