mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
Match functions using gDPSetTileCustom (#2100)
This commit is contained in:
parent
6b58a15fc0
commit
17debe8620
3 changed files with 28 additions and 19 deletions
|
@ -429,16 +429,17 @@ void EnMag_DrawImageRGBA32(Gfx** gfxP, s16 centerX, s16 centerY, u8* source, u32
|
|||
curTexture = source;
|
||||
rectLeft = centerX - (width / 2);
|
||||
rectTop = centerY - (height / 2);
|
||||
textureHeight = 4096 / (width << 2);
|
||||
remainingSize = (width * height) << 2;
|
||||
textureHeight = 4096 / (width << 2);
|
||||
textureSize = (width * textureHeight) << 2;
|
||||
textureCount = remainingSize / textureSize;
|
||||
if ((remainingSize % textureSize) != 0) {
|
||||
textureCount += 1;
|
||||
}
|
||||
|
||||
gDPSetTileCustom(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, textureHeight, 0, G_TX_NOMIRROR | G_TX_CLAMP,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPSetTileCustom(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0, width - 1, textureHeight - 1, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOLOD);
|
||||
|
||||
remainingSize -= textureSize;
|
||||
|
||||
|
@ -459,7 +460,7 @@ void EnMag_DrawImageRGBA32(Gfx** gfxP, s16 centerX, s16 centerY, u8* source, u32
|
|||
textureHeight = remainingSize / (s32)(width << 2);
|
||||
remainingSize -= textureSize;
|
||||
|
||||
gDPSetTileCustom(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, textureHeight, 0,
|
||||
gDPSetTileCustom(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0, width - 1, textureHeight - 1, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue