|
SSBM Decomp
|
#include "lbrefract.h"#include <math.h>#include <placeholder.h>#include <string.h>#include "lbarchive.h"#include "types.h"#include <dolphin/gx/GXBump.h>#include <dolphin/gx/GXEnum.h>#include <dolphin/gx/GXGeometry.h>#include <dolphin/gx/GXLighting.h>#include <dolphin/gx/GXPixel.h>#include <dolphin/gx/GXTev.h>#include <dolphin/gx/GXTexture.h>#include <dolphin/gx/GXTransform.h>#include <dolphin/os/OSCache.h>#include <sysdolphin/baselib/class.h>#include <sysdolphin/baselib/cobj.h>#include <sysdolphin/baselib/debug.h>#include <sysdolphin/baselib/dobj.h>#include <sysdolphin/baselib/memory.h>#include <sysdolphin/baselib/pobj.h>#include <sysdolphin/baselib/state.h>Functions | |
| static void | fn_80022650 (void) |
| static void | fn_80022940 (void) |
| static void | lbRefract_WriteTexCoord (lbRefract_CallbackData *cb, s32 row, u32 col, f32 y, f32 x, f32 param0) |
| static float | my_fmodf (float a, float b) |
| static void | lbRefract_80021CE8 (lbRefract_CallbackData *cb, s32 arg1) |
| static void | lbRefract_WriteTexCoordIA4 (lbRefract_CallbackData *data, u32 row, u32 col, u32 arg3, u8 arg4, u8 intensity, u8 alpha) |
| Write IA4 texture coordinate to refraction buffer. | |
| static void | fn_80021F70 (lbRefract_CallbackData *data, u32 row, u32 col, u8 r, u8 g, u32 b) |
| static void | fn_80021FB4 (lbRefract_CallbackData *data, u32 row, u32 col, u8 arg6, u8 arg7, u8 arg8, u8 arg9) |
| static void | fn_80021FF8 (lbRefract_CallbackData *data, u32 row, u32 col, s32 *arg3, s32 *arg4, s32 *arg5, s32 *arg6) |
| static void | fn_8002206C (lbRefract_CallbackData *data, s32 row, u32 col, s32 *arg3, s32 *arg4, s32 *arg5, s32 *arg6) |
| static void | lbRefract_ReadTexCoordRGBA8 (lbRefract_CallbackData *data, u32 row, u32 col, u32 *out_r, u32 *out_g, u32 *out_b, u32 *out_a) |
| Read RGBA8 texture coordinate addresses from refraction buffer. | |
| static int | lbRefract_8002219C (lbRefract_CallbackData *data, void *buffer, s32 format, u32 width, u32 height) |
| Initialize refraction callback data for a texture buffer. | |
| void | lbRefract_800222A4 (void) |
| void | lbRefract_8002247C (HSD_CObj *cobj) |
| Copy framebuffer to refraction source texture. | |
| void | lbRefract_80022560 (void) |
| Copy framebuffer to refraction source texture. | |
| void | lbRefract_800225D4 (void) |
| Reset TEV and indirect texture stages. | |
| static void | lbRefract_DObjDispReset (HSD_DObj *dobj, Mtx vmtx, Mtx pmtx, u32 rendermode) |
| Display DObj then reset TEV/indirect stages for refraction cleanup. | |
| s32 | lbRefract_PObjLoad (HSD_PObj *pobj, HSD_PObjDesc *desc) |
| void | lbRefract_80022998 (HSD_MObj *mobj, u32 rendermode, s32 arg2) |
| void | lbRefract_80022BB8 (void) |
| Increment refraction effect user count. | |
| void | lbRefSetUnuse (void) |
| Decrement refraction effect user count. | |
Variables | |
| struct { | |
| int refractionUserCount | |
| void * image_ptr | |
| HSD_ImageDesc * imagedesc | |
| HSD_TObj ** tobj_list | |
| Mtx texture_mtx | |
| } | lbl_804336D0 |
| struct { | |
| u8 x0 | |
| f32 * x4 | |
| } * | refract_data |
| float | texture_offset [2][3] |
| HSD_ImageDesc | imagedesc0 = { NULL, 0, 0, 4, 0, 0.0F, 0.0F } |
| HSD_TexLODDesc | loddesc0 = { 1, 0.0F, 1, 1, 0 } |
| HSD_TObjDesc | tobjdesc0 |
| HSD_ImageDesc | imagedesc1 = { NULL, 0, 0, 3, 0, 0.0F, 0.0F } |
| HSD_TexLODDesc | loddesc1 = { 1, 0.0F, 1, 1, 0 } |
| HSD_TObjDesc | tobjdesc1 |
| static HSD_DObjInfo | dobj_info = { fn_80022650 } |
| static HSD_PObjInfo | pobj_info = { fn_80022940 } |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Write IA4 texture coordinate to refraction buffer.
|
static |
|
static |
|
static |
|
static |
Read RGBA8 texture coordinate addresses from refraction buffer.
|
static |
Initialize refraction callback data for a texture buffer.
Initialize refraction callback data for a texture buffer.
| data | Callback data to initialize. |
| buffer | Base address of texture buffer. |
| format | Texture format (3=IA4, 4=IA8, 6=RGBA8). |
| width | Texture width in pixels. |
| height | Texture height in pixels. |
| void lbRefract_800222A4 | ( | void | ) |
| void lbRefract_8002247C | ( | HSD_CObj * | cobj | ) |
Copy framebuffer to refraction source texture.
| void lbRefract_80022560 | ( | void | ) |
Copy framebuffer to refraction source texture.
| void lbRefract_800225D4 | ( | void | ) |
Reset TEV and indirect texture stages.
Display DObj then reset TEV/indirect stages for refraction cleanup.
| s32 lbRefract_PObjLoad | ( | HSD_PObj * | pobj, |
| HSD_PObjDesc * | desc ) |
| void lbRefract_80022BB8 | ( | void | ) |
Increment refraction effect user count.
| void lbRefSetUnuse | ( | void | ) |
Decrement refraction effect user count.
| int refractionUserCount |
| void* image_ptr |
| HSD_ImageDesc* imagedesc |
| HSD_TObj** tobj_list |
| Mtx texture_mtx |
| struct { ... } lbl_804336D0 |
| u8 x0 |
| f32* x4 |
| struct { ... } * refract_data |
| float texture_offset[2][3] |
| HSD_ImageDesc imagedesc0 = { NULL, 0, 0, 4, 0, 0.0F, 0.0F } |
| HSD_TexLODDesc loddesc0 = { 1, 0.0F, 1, 1, 0 } |
| HSD_TObjDesc tobjdesc0 |
| HSD_ImageDesc imagedesc1 = { NULL, 0, 0, 3, 0, 0.0F, 0.0F } |
| HSD_TexLODDesc loddesc1 = { 1, 0.0F, 1, 1, 0 } |
| HSD_TObjDesc tobjdesc1 |
|
static |
|
static |