MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / iLightModify

Function iLightModify

src/SB/Core/gc/iLight.cpp:64–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void iLightModify(iLight* light, U32 flags)
65{
66 if (flags & 0x5)
67 {
68 RwFrame* frame = RpLightGetFrame(light->hw);
69 RwMatrix temp;
70
71 *(xVec3*)RwMatrixGetRight(&temp) = g_O3;
72 *(xVec3*)RwMatrixGetUp(&temp) = g_O3;
73 *(xVec3*)RwMatrixGetAt(&temp) = light->dir;
74 *(xVec3*)RwMatrixGetPos(&temp) = light->sph.center;
75
76 RwFrameTransform(frame, &temp, rwCOMBINEREPLACE);
77 }
78
79 if (flags & 0x2)
80 {
81 RpLightSetRadius(light->hw, light->sph.r);
82 }
83
84 if (flags & 0x8)
85 {
86 RpLightSetColor(light->hw, (RwRGBAReal*)&light->color);
87 }
88
89 if (flags & 0x10)
90 {
91 if (light->type == ILIGHT_TYPE_SPOT || light->type == ILIGHT_TYPE_SPOTSOFT)
92 {
93 RpLightSetConeAngle(light->hw, light->coneangle);
94 }
95 }
96}
97
98void iLightSetColor(iLight* light, _xFColor* col)
99{

Callers 1

zLightInitFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected