1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 22:11:16 +00:00

Document Framebuffer Filters, VisCvg and VisZbuf (#1534)

* Document z_viscvg and z_viszbuf

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Few more notes

* Some more notes

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Review

* Americanisation, FB RGB

* Oops

* Review

* Minor documentation modifications

* Header, base struct and enums

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* functions.h fix

* Suggested changes, further adjustments to file doc comments

* Further suggested changes, standardize capitalization of gfxP

* g

---------

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Tharo 2023-09-16 22:16:58 +01:00 committed by GitHub
parent 239a172114
commit 9b207c356a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 532 additions and 368 deletions

View file

@ -262,9 +262,9 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
}
}
void EnMag_DrawTextureI8(Gfx** gfxp, void* texture, s16 texWidth, s16 texHeight, s16 rectLeft, s16 rectTop,
void EnMag_DrawTextureI8(Gfx** gfxP, void* texture, s16 texWidth, s16 texHeight, s16 rectLeft, s16 rectTop,
s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
Gfx* gfx = *gfxp;
Gfx* gfx = *gfxP;
gDPLoadTextureBlock(gfx++, texture, G_IM_FMT_I, G_IM_SIZ_8b, texWidth, texHeight, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@ -272,13 +272,13 @@ void EnMag_DrawTextureI8(Gfx** gfxp, void* texture, s16 texWidth, s16 texHeight,
gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2,
G_TX_RENDERTILE, 0, 0, dsdx, dtdy);
*gfxp = gfx;
*gfxP = gfx;
}
void EnMag_DrawEffectTextures(Gfx** gfxp, void* maskTex, void* effectTex, s16 maskWidth, s16 maskHeight,
void EnMag_DrawEffectTextures(Gfx** gfxP, void* maskTex, void* effectTex, s16 maskWidth, s16 maskHeight,
s16 effectWidth, s16 effectHeight, s16 rectLeft, s16 rectTop, s16 rectWidth,
s16 rectHeight, u16 dsdx, u16 dtdy, u16 shifts, u16 shiftt, u16 flag, EnMag* this) {
Gfx* gfx = *gfxp;
Gfx* gfx = *gfxP;
gDPLoadMultiBlock_4b(gfx++, maskTex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_I, maskWidth, maskHeight, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@ -294,11 +294,11 @@ void EnMag_DrawEffectTextures(Gfx** gfxp, void* maskTex, void* effectTex, s16 ma
gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2,
G_TX_RENDERTILE, 0, 0, dsdx, dtdy);
*gfxp = gfx;
*gfxP = gfx;
}
void EnMag_DrawImageRGBA32(Gfx** gfxp, s16 centerX, s16 centerY, u8* source, u32 width, u32 height) {
Gfx* gfx = *gfxp;
void EnMag_DrawImageRGBA32(Gfx** gfxP, s16 centerX, s16 centerY, u8* source, u32 width, u32 height) {
Gfx* gfx = *gfxP;
u8* curTexture;
s32 textureCount;
u32 rectLeft;
@ -353,11 +353,11 @@ void EnMag_DrawImageRGBA32(Gfx** gfxp, s16 centerX, s16 centerY, u8* source, u32
}
}
*gfxp = gfx;
*gfxP = gfx;
}
void EnMag_DrawCharTexture(Gfx** gfxp, u8* texture, s32 rectLeft, s32 rectTop) {
Gfx* gfx = *gfxp;
void EnMag_DrawCharTexture(Gfx** gfxP, u8* texture, s32 rectLeft, s32 rectTop) {
Gfx* gfx = *gfxP;
YREG(0) = 1024.0f / (YREG(1) / 100.0f);
YREG(2) = 16.0f * (YREG(1) / 100.0f);
@ -368,10 +368,10 @@ void EnMag_DrawCharTexture(Gfx** gfxp, u8* texture, s32 rectLeft, s32 rectTop) {
gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + YREG(2)) << 2, (rectTop + YREG(2)) << 2,
G_TX_RENDERTILE, 0, 0, YREG(0), YREG(0));
*gfxp = gfx;
*gfxP = gfx;
}
void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxp) {
void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
static s16 textAlpha = 0;
static s16 textFadeDirection = 0;
static s16 textFadeTimer = 0;
@ -389,7 +389,7 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxp) {
EnMag* this = (EnMag*)thisx;
Font* font = &this->font;
s32 pad;
Gfx* gfx = *gfxp;
Gfx* gfx = *gfxP;
u16 i, j, k;
u16 rectLeft;
u16 rectTop;
@ -559,7 +559,7 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxp) {
}
}
*gfxp = gfx;
*gfxP = gfx;
}
void EnMag_Draw(Actor* thisx, PlayState* play) {