| 62 | } |
| 63 | |
| 64 | void 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 | |
| 98 | void iLightSetColor(iLight* light, _xFColor* col) |
| 99 | { |