SSBM Decomp
Loading...
Searching...
No Matches
lbcollision.c File Reference
#include "lbcollision.h"
#include "lb_00B0.h"
#include "lbaudio_ax.h"
#include "lbvector.h"
#include <placeholder.h>
#include <platform.h>
#include "lb/forward.h"
#include "ft/types.h"
#include "lb/types.h"
#include <math.h>
#include <dolphin/gx.h>
#include <dolphin/mtx.h>
#include <baselib/cobj.h>
#include <baselib/debug.h>
#include <baselib/jobj.h>
#include <baselib/mtx.h>
#include <baselib/particle.h>
#include <baselib/state.h>
#include <baselib/tev.h>
#include <MetroTRK/intrinsics.h>

Data Structures

struct  unk
 

Functions

static bool lbColl_80006E58 (Vec3 *arg0, Vec3 *arg1, Vec3 *arg2, Vec3 *arg3, Vec3 *arg4, Vec3 *arg5, MtxPtr arg6, Vec3 *arg7, float *arg8, float scl, float arg10, float arg11)
 
int lbColl_80005BB0 (HitCapsule *arg0, int arg1)
 
static void vector_sub (Vec3 *a, Vec3 *b, Vec3 *result)
 
static bool between (float x, float lo, float hi)
 
static bool nearzero (float x)
 
bool lbColl_80005C44 (const Vec3 *arg0, const Vec3 *arg1, const Vec3 *arg2, Vec3 *arg3, float arg8, float arg9)
 
float lbColl_80005EBC (const Vec3 *arg0, const Vec3 *arg1, const Vec3 *arg2, float *arg3)
 
float lbColl_80005FC0 (Vec3 *arg0, Vec3 *arg1, Vec3 *arg2, float *arg3)
 
bool end (Vec3 *a, Vec3 *b, float unk_sum)
 
int lbColl_80006094 (Vec3 *arg0, Vec3 *arg1, Vec3 *arg2, Vec3 *arg3, Vec3 *arg4, Vec3 *arg5, float arg6, float arg7)
 
bool lbColl_800067F8 (Vec3 *a, Vec3 *b, Vec3 *c, Vec3 *d, Vec3 *e, Vec3 *f, float p, float q, float r)
 
float sqrDistance (Vec3 *a, Vec3 *b)
 
void lbColl_800077A0 (Vec3 *a, MtxPtr arg1, Vec3 *b, Vec3 *c, Vec3 *d, Vec3 *e, float *angle, float x, float dist_offset)
 
bool lbColl_80007AFC (HitCapsule *a, HitCapsule *b, float x, float y)
 
bool lbColl_80007B78 (Mtx a, struct Fighter_x1614_t *b, float x, float y)
 
bool lbColl_80007BCC (HitCapsule *arg0, HitResult *shield_hit, void *arg2, s32 arg3, float arg4, float arg5, float arg6)
 
void lbColl_80007DD8 (HitCapsule *capsule, HitResult *hit, Mtx hit_transform, Vec3 *arg3, float *angle, float scale)
 
bool lbColl_80007ECC (HitCapsule *arg0, HurtCapsule *arg1, Mtx arg2, float hit_scl_y, float hurt_scl_y, float hurt_pos_z)
 
bool lbColl_8000805C (HitCapsule *arg0, HurtCapsule *arg1, Mtx arg2, s32 arg3, float arg4, float arg5, float arg6)
 
void checkPos (HurtCapsule *hurt, Mtx mtx, float arg5)
 
void mtxConcat (HurtCapsule *hurt, Mtx mtx)
 
MtxPtr pickMtx (HurtCapsule *hurt, Mtx mtx)
 
float getHit1C (HitCapsule *hit, float arg3)
 
bool lbColl_80008248 (HitCapsule *arg0, HurtCapsule *arg1, Mtx arg2, f32 arg3, f32 arg4, f32 arg5)
 
void lbColl_800083C4 (HurtCapsule *arg0)
 
void lbColl_80008428 (HitCapsule *arg0)
 
void lbColl_80008434 (HitCapsule *arg0)
 
void lbColl_80008440 (HitCapsule *hit)
 
void lbColl_CopyHitCapsule (HitCapsule *src, HitCapsule *dst)
 
bool lbColl_80008688 (HitCapsule *capsule, int type, void *victim)
 
bool lbColl_80008820 (HitCapsule *capsule, int type, void *victim)
 
void lbColl_800089B8 (HitCapsule *hit, UNK_T arg1)
 
void lbColl_80008A5C (HitCapsule *hit)
 
void lbColl_80008D30 (HitCapsule *arg0, lbColl_80008D30_arg1 *arg1)
 
void lbColl_80008DA4 (GXColor *arg0, GXColor *arg1)
 
static bool isSmall (float x)
 
void lbColl_80008FC8 (Vec3 arg0, Vec3 arg1, GXColor *arg2, GXColor *arg3, f32 arg4)
 
void lbColl_800096B4 (MtxPtr arg0, Vec3 arg1, Vec3 arg2, GXColor *arg3, GXColor *arg4, f32 arg5)
 
bool lbColl_80009F54 (HitCapsule *hit, u32 arg1, float arg8)
 
bool lbColl_8000A044 (HitCapsule *hit, u32 arg1, float arg8)
 
bool lbColl_8000A244 (HurtCapsule *hurt, u32 arg1, Mtx arg2, float arg3)
 
bool lbColl_8000A10C (struct lbColl_8000A10C_arg0_t *arg0, u32 arg1, f32 arg2)
 
bool lbColl_8000A1A8 (struct Fighter_x1614_t *arg0, int arg1, f32 scale_y)
 
bool lbColl_8000A460 (Fighter_x1670_t *hurt, u32 arg1)
 
bool lbColl_8000A584 (HurtCapsule *hurt, u32 arg1, u32 arg2, Mtx arg3, f32 arg8)
 
bool lbColl_8000A95C (HitResult *hit, u32 arg1, Mtx arg2, f32 pos_z)
 
bool lbColl_8000AB2C (HitResult *hit, u32 arg1, MtxPtr arg2, f32 pos_z)
 
bool lbColl_8000ACFC (UNK_T victim, HitCapsule *hitbox)
 

Variables

static GXColor lbColl_804D36D4 = { 0, 0x80, 0xFF, 0x80 }
 
static GXColor lbColl_804D36D8 = { 0, 0x40, 0x80, 0x80 }
 
float const lbColl_804D79F0 = 1e-5
 
float const lbColl_804D79F4 = -1e-5
 
float const lbColl_804D79F8 = 0
 
f64 const lbColl_804D7A00 = 1
 
float const lbColl_804D7A08 = 1
 
f64 const lbColl_804D7A10 = 0
 
f64 const lbColl_804D7A18 = 0.5
 
f64 const lbColl_804D7A20 = 3.0
 
float const lbColl_804D7A28 = 2
 
float const lbColl_804D7A2C = 4
 
float const lbColl_804D7A30 = M_PI
 
float const lbColl_804D7A34 = 20
 
float const lbColl_804D7A38 = 3
 
float const lbColl_804D7A3C = 0.5
 
float const lbColl_804D7A40 = 5
 
int lbColl_803B9880 []
 
GXColor lbColl_804D36AC
 
GXColor lbColl_804D36B0
 
GXColor lbColl_804D36B4
 
GXColor lbColl_804D36B8
 
GXColor lbColl_804D36BC
 
GXColor lbColl_804D36C0
 
struct unk lbColl_803B9928 []
 
u8 lbColl_803B9940 [0x1A0] = { 0 }
 
u8 lbColl_803B9AE0 [0x1A0] = { 0 }
 
u8 lbColl_803B9C80 [0x120] = { 0 }
 
u8 lbl_803B9DA0 [0x80] = { 0 }
 
u8 lbl_803B9E20 [0xA0] = { 0 }
 
u8 lbColl_803B9EC0 [0x60] = { 0 }
 
u8 lbColl_803B9F20 [0xA0] = { 0 }
 
GXColor const lbColl_804D7A50 = { 0 }
 
GXColor lbColl_804D36CC
 
GXColor lbColl_804D36D0
 
GXColor lbColl_804D36A0
 
GXColor lbColl_804D36A4
 
GXColor lbColl_804D36A8
 
GXColor lbColl_804D36DC
 
GXColor lbColl_804D36E8
 
GXColor lbColl_804D36EC
 
static GXColor lbColl_804D36F8 = { 0xFF, 0, 0, 0x80 }
 
static GXColor lbColl_804D36FC = { 0x80, 0, 0, 0x80 }
 
static GXColor lbColl_804D36F0 = { 0xFF, 0xFF, 0, 0x80 }
 
static GXColor lbColl_804D36F4 = { 0x80, 0x80, 0, 0x80 }
 
GXColor lbColl_804D36E0 = { 0 }
 
GXColor lbColl_804D36E4 = { 0x80, 0x40, 0x00, 0x80 }
 

Function Documentation

◆ lbColl_80006E58()

bool lbColl_80006E58 ( Vec3 *  arg0,
Vec3 *  arg1,
Vec3 *  arg2,
Vec3 *  arg3,
Vec3 *  arg4,
Vec3 *  arg5,
MtxPtr  arg6,
Vec3 *  arg7,
float *  arg8,
float  scl,
float  arg10,
float  arg11 
)
static

◆ lbColl_80005BB0()

int lbColl_80005BB0 ( HitCapsule arg0,
int  arg1 
)

◆ vector_sub()

static void vector_sub ( Vec3 *  a,
Vec3 *  b,
Vec3 *  result 
)
inlinestatic

◆ between()

static bool between ( float  x,
float  lo,
float  hi 
)
inlinestatic

◆ nearzero()

static bool nearzero ( float  x)
inlinestatic

◆ lbColl_80005C44()

bool lbColl_80005C44 ( const Vec3 *  arg0,
const Vec3 *  arg1,
const Vec3 *  arg2,
Vec3 *  arg3,
float  arg8,
float  arg9 
)

◆ lbColl_80005EBC()

float lbColl_80005EBC ( const Vec3 *  arg0,
const Vec3 *  arg1,
const Vec3 *  arg2,
float *  arg3 
)

◆ lbColl_80005FC0()

float lbColl_80005FC0 ( Vec3 *  arg0,
Vec3 *  arg1,
Vec3 *  arg2,
float *  arg3 
)

◆ end()

bool end ( Vec3 *  a,
Vec3 *  b,
float  unk_sum 
)
inline

◆ lbColl_80006094()

int lbColl_80006094 ( Vec3 *  arg0,
Vec3 *  arg1,
Vec3 *  arg2,
Vec3 *  arg3,
Vec3 *  arg4,
Vec3 *  arg5,
float  arg6,
float  arg7 
)

◆ lbColl_800067F8()

bool lbColl_800067F8 ( Vec3 *  a,
Vec3 *  b,
Vec3 *  c,
Vec3 *  d,
Vec3 *  e,
Vec3 *  f,
float  p,
float  q,
float  r 
)

◆ sqrDistance()

float sqrDistance ( Vec3 *  a,
Vec3 *  b 
)
inline

◆ lbColl_800077A0()

void lbColl_800077A0 ( Vec3 *  a,
MtxPtr  arg1,
Vec3 *  b,
Vec3 *  c,
Vec3 *  d,
Vec3 *  e,
float *  angle,
float  x,
float  dist_offset 
)

◆ lbColl_80007AFC()

bool lbColl_80007AFC ( HitCapsule a,
HitCapsule b,
float  x,
float  y 
)

◆ lbColl_80007B78()

bool lbColl_80007B78 ( Mtx  a,
struct Fighter_x1614_t *  b,
float  x,
float  y 
)
Todo:
Eliminate casts.

◆ lbColl_80007BCC()

bool lbColl_80007BCC ( HitCapsule arg0,
HitResult shield_hit,
void *  arg2,
s32  arg3,
float  arg4,
float  arg5,
float  arg6 
)

◆ lbColl_80007DD8()

void lbColl_80007DD8 ( HitCapsule capsule,
HitResult hit,
Mtx  hit_transform,
Vec3 *  arg3,
float *  angle,
float  scale 
)

◆ lbColl_80007ECC()

bool lbColl_80007ECC ( HitCapsule arg0,
HurtCapsule arg1,
Mtx  arg2,
float  hit_scl_y,
float  hurt_scl_y,
float  hurt_pos_z 
)

◆ lbColl_8000805C()

bool lbColl_8000805C ( HitCapsule arg0,
HurtCapsule arg1,
Mtx  arg2,
s32  arg3,
float  arg4,
float  arg5,
float  arg6 
)

◆ checkPos()

void checkPos ( HurtCapsule hurt,
Mtx  mtx,
float  arg5 
)
inline

◆ mtxConcat()

void mtxConcat ( HurtCapsule hurt,
Mtx  mtx 
)
inline

◆ pickMtx()

MtxPtr pickMtx ( HurtCapsule hurt,
Mtx  mtx 
)
inline

◆ getHit1C()

float getHit1C ( HitCapsule hit,
float  arg3 
)
inline

◆ lbColl_80008248()

bool lbColl_80008248 ( HitCapsule arg0,
HurtCapsule arg1,
Mtx  arg2,
f32  arg3,
f32  arg4,
f32  arg5 
)

◆ lbColl_800083C4()

void lbColl_800083C4 ( HurtCapsule arg0)

◆ lbColl_80008428()

void lbColl_80008428 ( HitCapsule arg0)

◆ lbColl_80008434()

void lbColl_80008434 ( HitCapsule arg0)

◆ lbColl_80008440()

void lbColl_80008440 ( HitCapsule hit)

◆ lbColl_CopyHitCapsule()

void lbColl_CopyHitCapsule ( HitCapsule src,
HitCapsule dst 
)

◆ lbColl_80008688()

bool lbColl_80008688 ( HitCapsule capsule,
int  type,
void *  victim 
)

◆ lbColl_80008820()

bool lbColl_80008820 ( HitCapsule capsule,
int  type,
void *  victim 
)

◆ lbColl_800089B8()

void lbColl_800089B8 ( HitCapsule hit,
UNK_T  arg1 
)

◆ lbColl_80008A5C()

void lbColl_80008A5C ( HitCapsule hit)

◆ lbColl_80008D30()

void lbColl_80008D30 ( HitCapsule arg0,
lbColl_80008D30_arg1 arg1 
)

◆ lbColl_80008DA4()

void lbColl_80008DA4 ( GXColor *  arg0,
GXColor *  arg1 
)

◆ isSmall()

static bool isSmall ( float  x)
inlinestatic

◆ lbColl_80008FC8()

void lbColl_80008FC8 ( Vec3  arg0,
Vec3  arg1,
GXColor *  arg2,
GXColor *  arg3,
f32  arg4 
)

◆ lbColl_800096B4()

void lbColl_800096B4 ( MtxPtr  arg0,
Vec3  arg1,
Vec3  arg2,
GXColor *  arg3,
GXColor *  arg4,
f32  arg5 
)

◆ lbColl_80009F54()

bool lbColl_80009F54 ( HitCapsule hit,
u32  arg1,
float  arg8 
)

◆ lbColl_8000A044()

bool lbColl_8000A044 ( HitCapsule hit,
u32  arg1,
float  arg8 
)

◆ lbColl_8000A244()

bool lbColl_8000A244 ( HurtCapsule hurt,
u32  arg1,
Mtx  arg2,
float  arg3 
)

◆ lbColl_8000A10C()

bool lbColl_8000A10C ( struct lbColl_8000A10C_arg0_t arg0,
u32  arg1,
f32  arg2 
)

◆ lbColl_8000A1A8()

bool lbColl_8000A1A8 ( struct Fighter_x1614_t *  arg0,
int  arg1,
f32  scale_y 
)

◆ lbColl_8000A460()

bool lbColl_8000A460 ( Fighter_x1670_t hurt,
u32  arg1 
)

◆ lbColl_8000A584()

bool lbColl_8000A584 ( HurtCapsule hurt,
u32  arg1,
u32  arg2,
Mtx  arg3,
f32  arg8 
)

◆ lbColl_8000A95C()

bool lbColl_8000A95C ( HitResult hit,
u32  arg1,
Mtx  arg2,
f32  pos_z 
)

◆ lbColl_8000AB2C()

bool lbColl_8000AB2C ( HitResult hit,
u32  arg1,
MtxPtr  arg2,
f32  pos_z 
)

◆ lbColl_8000ACFC()

bool lbColl_8000ACFC ( UNK_T  victim,
HitCapsule hitbox 
)

Variable Documentation

◆ lbColl_804D36D4

GXColor lbColl_804D36D4 = { 0, 0x80, 0xFF, 0x80 }
static

◆ lbColl_804D36D8

GXColor lbColl_804D36D8 = { 0, 0x40, 0x80, 0x80 }
static

◆ lbColl_804D79F0

float const lbColl_804D79F0 = 1e-5

◆ lbColl_804D79F4

float const lbColl_804D79F4 = -1e-5

◆ lbColl_804D79F8

float const lbColl_804D79F8 = 0

◆ lbColl_804D7A00

f64 const lbColl_804D7A00 = 1

◆ lbColl_804D7A08

float const lbColl_804D7A08 = 1

◆ lbColl_804D7A10

f64 const lbColl_804D7A10 = 0

◆ lbColl_804D7A18

f64 const lbColl_804D7A18 = 0.5

◆ lbColl_804D7A20

f64 const lbColl_804D7A20 = 3.0

◆ lbColl_804D7A28

float const lbColl_804D7A28 = 2

◆ lbColl_804D7A2C

float const lbColl_804D7A2C = 4

◆ lbColl_804D7A30

float const lbColl_804D7A30 = M_PI

◆ lbColl_804D7A34

float const lbColl_804D7A34 = 20

◆ lbColl_804D7A38

float const lbColl_804D7A38 = 3

◆ lbColl_804D7A3C

float const lbColl_804D7A3C = 0.5

◆ lbColl_804D7A40

float const lbColl_804D7A40 = 5

◆ lbColl_803B9880

int lbColl_803B9880[]
Initial value:
= {
0x00083D60, 0x00083D60, 0x00083D60, 0x0000005B, 0x0000005A, 0x00000059,
0x00000058, 0x00000057, 0x00000056, 0x0000006F, 0x00000070, 0x00000071,
0x00000054, 0x00000054, 0x00000054, 0x0000005A, 0x00000059, 0x000000DF,
0x000000E1, 0x000000E1, 0x000000E1, 0x00000062, 0x00000063, 0x00000064,
0x00000065, 0x00000066, 0x00000067, 0x0004461B, 0x0004461B, 0x0004461B,
0x000000F1, 0x000000F1, 0x000000F1, 0x0000005E, 0x0000005D, 0x0000005C,
0x00035BAF, 0x00035BB2, 0x00035BB5, 0x00083D60, 0x00083D60, 0x0000020D,
}

◆ lbColl_804D36AC

GXColor lbColl_804D36AC
extern

◆ lbColl_804D36B0

GXColor lbColl_804D36B0
extern

◆ lbColl_804D36B4

GXColor lbColl_804D36B4
extern

◆ lbColl_804D36B8

GXColor lbColl_804D36B8
extern

◆ lbColl_804D36BC

GXColor lbColl_804D36BC
extern

◆ lbColl_804D36C0

GXColor lbColl_804D36C0
extern

◆ lbColl_803B9928

struct unk lbColl_803B9928[]
Initial value:
= {
}
GXColor lbColl_804D36B4
GXColor lbColl_804D36BC
GXColor lbColl_804D36B0
GXColor lbColl_804D36B8
GXColor lbColl_804D36C0
GXColor lbColl_804D36AC

◆ lbColl_803B9940

u8 lbColl_803B9940[0x1A0] = { 0 }

◆ lbColl_803B9AE0

u8 lbColl_803B9AE0[0x1A0] = { 0 }

◆ lbColl_803B9C80

u8 lbColl_803B9C80[0x120] = { 0 }

◆ lbl_803B9DA0

u8 lbl_803B9DA0[0x80] = { 0 }

◆ lbl_803B9E20

u8 lbl_803B9E20[0xA0] = { 0 }

◆ lbColl_803B9EC0

u8 lbColl_803B9EC0[0x60] = { 0 }

◆ lbColl_803B9F20

u8 lbColl_803B9F20[0xA0] = { 0 }

◆ lbColl_804D7A50

GXColor const lbColl_804D7A50 = { 0 }

◆ lbColl_804D36CC

GXColor lbColl_804D36CC
extern

◆ lbColl_804D36D0

GXColor lbColl_804D36D0
extern

◆ lbColl_804D36A0

GXColor lbColl_804D36A0
extern

◆ lbColl_804D36A4

GXColor lbColl_804D36A4
extern

◆ lbColl_804D36A8

GXColor lbColl_804D36A8
extern

◆ lbColl_804D36DC

GXColor lbColl_804D36DC
extern

◆ lbColl_804D36E8

GXColor lbColl_804D36E8
extern

◆ lbColl_804D36EC

GXColor lbColl_804D36EC
extern

◆ lbColl_804D36F8

GXColor lbColl_804D36F8 = { 0xFF, 0, 0, 0x80 }
static

◆ lbColl_804D36FC

GXColor lbColl_804D36FC = { 0x80, 0, 0, 0x80 }
static

◆ lbColl_804D36F0

GXColor lbColl_804D36F0 = { 0xFF, 0xFF, 0, 0x80 }
static

◆ lbColl_804D36F4

GXColor lbColl_804D36F4 = { 0x80, 0x80, 0, 0x80 }
static

◆ lbColl_804D36E0

GXColor lbColl_804D36E0 = { 0 }

◆ lbColl_804D36E4

GXColor lbColl_804D36E4 = { 0x80, 0x40, 0x00, 0x80 }