SSBM Decomp
Loading...
Searching...
No Matches
lbrefract.c File Reference
#include "lbrefract.h"
#include "lb/types.h"
#include <math.h>
#include <dolphin/gx/GXTexture.h>
#include <baselib/debug.h>
#include <MetroTRK/intrinsics.h>

Macros

#define SIGN_BIT   (1 << 31)
 
#define BITWISE(f)   (*(u32*) &f)
 
#define SIGNED_BITWISE(f)   ((s32) BITWISE(f))
 
#define GET_SIGN_BIT(f)   (SIGNED_BITWISE(f) & SIGN_BIT)
 
#define BITWISE_PI_2   0x3FC90FDB
 
#define NAN   MSL_TrigF_80400770[0]
 
#define INF   MSL_TrigF_80400774[0]
 
#define SILVER_RATIO_1_CONJUGATE   lbRefract3_804D7DD4
 
#define BITWISE_INF   0x7F800000 /* = +Infinity */
 
#define BITWISE_0_5   0x3F000000 /* = 0.5f */
 
#define BITWISE_1_0   0x3F800000 /* = 1.0f */
 
#define BITWISE_2_0   0x40000000 /* = 2.0f */
 
#define BITWISE_THRESHOLD_0   0x3F08D5B9 /* = 0.534511148929596f */
 
#define BITWISE_THRESHOLD_1   0x3F521801 /* = 0.8206787705421448f */
 
#define BITWISE_THRESHOLD_2   0x3F9BF7EC /* = 1.218503475189209f */
 
#define BITWISE_THRESHOLD_3   0x3FEF789E /* = 1.870868444442749f */
 

Functions

static UNK_RET fn_80021F34 (UNK_PARAMS)
 
static UNK_RET fn_80021F70 (UNK_PARAMS)
 
static UNK_RET fn_80021FB4 (UNK_PARAMS)
 
static UNK_RET fn_80021FF8 (UNK_PARAMS)
 
static UNK_RET fn_8002206C (UNK_PARAMS)
 
static void fn_80022120 (lbRefract_CallbackData *arg0, s32 arg1, u32 arg2, u32 *arg3, u32 *arg4, u8 *arg5, u8 *arg6)
 
static float lbRefract_80022DF8 (float x)
 
s32 lbRefract_8002219C (lbRefract_CallbackData *, s32, s32, u16, u16)
 
void lbRefract_80022BB8 (void)
 
void lbRefract_80022BD0 (void)
 
float atan2f (float y, float x)
 
float acosf (float x)
 
float asinf (float x)
 
float atanf (float x)
 

Variables

static int lbl_804336D0 [0x10]
 
float MSL_TrigF_80400770 []
 
float MSL_TrigF_80400774 []
 
static const float atanf_lookup []
 

Macro Definition Documentation

◆ SIGN_BIT

#define SIGN_BIT   (1 << 31)

◆ BITWISE

#define BITWISE (   f)    (*(u32*) &f)

◆ SIGNED_BITWISE

#define SIGNED_BITWISE (   f)    ((s32) BITWISE(f))

◆ GET_SIGN_BIT

#define GET_SIGN_BIT (   f)    (SIGNED_BITWISE(f) & SIGN_BIT)

◆ BITWISE_PI_2

#define BITWISE_PI_2   0x3FC90FDB

◆ NAN

#define NAN   MSL_TrigF_80400770[0]

◆ INF

#define INF   MSL_TrigF_80400774[0]

◆ SILVER_RATIO_1_CONJUGATE

#define SILVER_RATIO_1_CONJUGATE   lbRefract3_804D7DD4

◆ BITWISE_INF

#define BITWISE_INF   0x7F800000 /* = +Infinity */

◆ BITWISE_0_5

#define BITWISE_0_5   0x3F000000 /* = 0.5f */

◆ BITWISE_1_0

#define BITWISE_1_0   0x3F800000 /* = 1.0f */

◆ BITWISE_2_0

#define BITWISE_2_0   0x40000000 /* = 2.0f */

◆ BITWISE_THRESHOLD_0

#define BITWISE_THRESHOLD_0   0x3F08D5B9 /* = 0.534511148929596f */

◆ BITWISE_THRESHOLD_1

#define BITWISE_THRESHOLD_1   0x3F521801 /* = 0.8206787705421448f */

◆ BITWISE_THRESHOLD_2

#define BITWISE_THRESHOLD_2   0x3F9BF7EC /* = 1.218503475189209f */

◆ BITWISE_THRESHOLD_3

#define BITWISE_THRESHOLD_3   0x3FEF789E /* = 1.870868444442749f */

Function Documentation

◆ fn_80021F34()

static UNK_RET fn_80021F34 ( UNK_PARAMS  )
static

◆ fn_80021F70()

static UNK_RET fn_80021F70 ( UNK_PARAMS  )
static

◆ fn_80021FB4()

static UNK_RET fn_80021FB4 ( UNK_PARAMS  )
static

◆ fn_80021FF8()

static UNK_RET fn_80021FF8 ( UNK_PARAMS  )
static

◆ fn_8002206C()

static UNK_RET fn_8002206C ( UNK_PARAMS  )
static

◆ fn_80022120()

void fn_80022120 ( lbRefract_CallbackData arg0,
s32  arg1,
u32  arg2,
u32 arg3,
u32 arg4,
u8 arg5,
u8 arg6 
)
static

◆ lbRefract_80022DF8()

static float lbRefract_80022DF8 ( float  x)
inlinestatic

◆ lbRefract_8002219C()

s32 lbRefract_8002219C ( lbRefract_CallbackData arg0,
s32  arg1,
s32  arg2,
u16  arg3,
u16  arg4 
)

◆ lbRefract_80022BB8()

void lbRefract_80022BB8 ( void  )

◆ lbRefract_80022BD0()

void lbRefract_80022BD0 ( void  )

◆ atan2f()

float atan2f ( float  y,
float  x 
)

◆ acosf()

float acosf ( float  x)

◆ asinf()

float asinf ( float  x)

◆ atanf()

float atanf ( float  x)

Variable Documentation

◆ lbl_804336D0

int lbl_804336D0[0x10]
static

◆ MSL_TrigF_80400770

float MSL_TrigF_80400770[]
extern

◆ MSL_TrigF_80400774

float MSL_TrigF_80400774[]

◆ atanf_lookup

const float atanf_lookup[]
static