mm/include/z64visfbuf.h
EllipticEllipsis 6bdb7c31ea
code_80140E80 OK and preliminary documentation, Fbdemo_Wipe4 OK and documented (#1106)
* OK, start documentation

* More documentation

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

* Decompile func_80167F0C

* FbdemoWipe4 OK and documented

* Mark bug in Wipe4

* More docs

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

* Mark bug

* Few more notes

* Fix function in Play

* Format

* Review

* Name Play_PostWorldDraw

* functions.h...

* Revert func_80167F0C

* Review

* functions.h

* Review

* Update Wipe4

* Rename system

* Format

* Put skeleton back in the cupboard

* bss

* Fix build

* rename to z_visfbuf

* review

* format

* bss

* some bss cleanup

* review

* bss

* review

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: angie <angheloalf95@gmail.com>
2023-10-26 17:42:24 +11:00

39 lines
1.7 KiB
C

#ifndef Z64_VISFBUF_H
#define Z64_VISFBUF_H
#include "ultra64.h"
#include "color.h"
#include "PR/gs2dex.h"
typedef enum VisFbufBgMode {
/* 0 */ VIS_FBUF_BG_CYC_1CYC, //!< Enable rescaling
/* 1 */ VIS_FBUF_BG_CYC_COPY //!< Direct copy, no scaling
} VisFbufBgMode;
typedef enum VisFbufMode {
/* 0 */ VIS_FBUF_MODE_NONE, //!< Do nothing but waste time loading microcode
/* 1 */ VIS_FBUF_MODE_GENERAL, //!< Interpolation, filling and scaling
/* 2 */ VIS_FBUF_MODE_INTERPOLATE
} VisFbufMode;
typedef struct VisFbuf {
/* 0x00 */ u8 mode;
/* 0x04 */ f32 scale;
/* 0x08 */ f32 lodProportion; // expected to be between 0.0f and 1.0f
/* 0x0C */ Color_RGBA8_u32 primColor;
/* 0x10 */ Color_RGBA8_u32 envColor;
} VisFbuf; // size = 0x14
void VisFbuf_Init(VisFbuf* this);
void VisFbuf_Destroy(VisFbuf* this);
void VisFbuf_DrawBgToColorImage(Gfx** gfxP, uObjBg* bg, void* img, s32 width, s32 height, VisFbufBgMode cycleMode);
void VisFbuf_SetBg(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX, f32 scaleY, VisFbufBgMode cycleMode);
void VisFbuf_SetBgSimple(Gfx** gfxP, void* source, void* img, s32 width, s32 height, VisFbufBgMode cycleMode);
void VisFbuf_SetBgGeneral(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX, f32 scaleY, VisFbufBgMode cycleMode);
void VisFbuf_ApplyEffects(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height);
void VisFbuf_DrawGeneral(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height);
void VisFbuf_DrawInterpolate(VisFbuf* this, Gfx** gfxP, void* img, s32 width, s32 height);
void VisFbuf_Draw(VisFbuf* this, Gfx** gfxP, void* img);
#endif