mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +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:
parent
239a172114
commit
9b207c356a
19 changed files with 532 additions and 368 deletions
|
@ -16,7 +16,7 @@ typedef struct {
|
|||
/* 0x0010 */ Vec3f velocity;
|
||||
/* 0x001C */ Vec3f accel;
|
||||
/* 0x0028 */ char unk_28[0x4];
|
||||
/* 0x002C */ s16 primAlpha; // transparency in RGBA colour system
|
||||
/* 0x002C */ s16 primAlpha; // transparency in RGBA color system
|
||||
/* 0x002E */ s16 primAlphaState; // 0: increasing (more opaque) 1: decreasing (more transparent) 2: collision
|
||||
/* 0x0030 */ f32 xyScale;
|
||||
/* 0x0034 */ f32 xyScaleTarget;
|
||||
|
@ -42,7 +42,7 @@ typedef struct EnFz {
|
|||
/* 0x024C */ f32 iceSmokeFreezingSpawnHeight; // Height for Ice Smoke Spawn, only when freezing
|
||||
/* 0x0250 */ f32 unusedFloat; // Set to 135.0f
|
||||
/* 0x0254 */ f32 speedXZ; // Set to 4.0f when moving
|
||||
/* 0x0258 */ u32 envAlpha; // transparency in RGBA colour system
|
||||
/* 0x0258 */ u32 envAlpha; // transparency in RGBA color system
|
||||
/* 0x025C */ u16 unusedNum1; // Only set to 0
|
||||
/* 0x025E */ u16 unusedNum2; // Set to either 0 when hidden or 4000 when growing
|
||||
/* 0x0260 */ u8 state; // 0 (hidden) 1 (growning/shrinking) 2 (full size) 3 (melting from fire)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
#include "alloca.h"
|
||||
#include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
||||
|
||||
void ConsoleLogo_PrintBuildInfo(Gfx** gfxp) {
|
||||
Gfx* g;
|
||||
void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
|
||||
Gfx* gfx;
|
||||
GfxPrint* printer;
|
||||
|
||||
g = *gfxp;
|
||||
g = Gfx_SetupDL_28(g);
|
||||
gfx = *gfxP;
|
||||
gfx = Gfx_SetupDL_28(gfx);
|
||||
printer = alloca(sizeof(GfxPrint));
|
||||
GfxPrint_Init(printer);
|
||||
GfxPrint_Open(printer, g);
|
||||
GfxPrint_Open(printer, gfx);
|
||||
GfxPrint_SetColor(printer, 255, 155, 255, 255);
|
||||
GfxPrint_SetPos(printer, 9, 21);
|
||||
GfxPrint_Printf(printer, "NOT MARIO CLUB VERSION");
|
||||
|
@ -25,9 +25,9 @@ void ConsoleLogo_PrintBuildInfo(Gfx** gfxp) {
|
|||
GfxPrint_Printf(printer, "[Creator:%s]", gBuildTeam);
|
||||
GfxPrint_SetPos(printer, 7, 24);
|
||||
GfxPrint_Printf(printer, "[Date:%s]", gBuildDate);
|
||||
g = GfxPrint_Close(printer);
|
||||
gfx = GfxPrint_Close(printer);
|
||||
GfxPrint_Destroy(printer);
|
||||
*gfxp = g;
|
||||
*gfxP = gfx;
|
||||
}
|
||||
|
||||
// Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate
|
||||
|
|
|
@ -34,12 +34,12 @@ static s16 sSlotItems[] = {
|
|||
ITEM_BOOMERANG, ITEM_LENS_OF_TRUTH, ITEM_MAGIC_BEAN, ITEM_HAMMER, ITEM_ARROW_LIGHT, ITEM_NAYRUS_LOVE,
|
||||
};
|
||||
|
||||
void KaleidoScope_DrawDebugEditorText(Gfx** gfxp) {
|
||||
void KaleidoScope_DrawDebugEditorText(Gfx** gfxP) {
|
||||
GfxPrint printer;
|
||||
s32 pad[2];
|
||||
|
||||
GfxPrint_Init(&printer);
|
||||
GfxPrint_Open(&printer, *gfxp);
|
||||
GfxPrint_Open(&printer, *gfxP);
|
||||
|
||||
GfxPrint_SetPos(&printer, 4, 2);
|
||||
GfxPrint_SetColor(&printer, 255, 60, 0, 255);
|
||||
|
@ -75,7 +75,7 @@ void KaleidoScope_DrawDebugEditorText(Gfx** gfxp) {
|
|||
GfxPrint_SetPos(&printer, 28, 24);
|
||||
GfxPrint_Printf(&printer, "%s", "/4");
|
||||
|
||||
*gfxp = GfxPrint_Close(&printer);
|
||||
*gfxP = GfxPrint_Close(&printer);
|
||||
GfxPrint_Destroy(&printer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue