diff --git a/src/ZeldaWindWaker/d_particle.ts b/src/ZeldaWindWaker/d_particle.ts index e80a703b6..4b6e092d1 100644 --- a/src/ZeldaWindWaker/d_particle.ts +++ b/src/ZeldaWindWaker/d_particle.ts @@ -106,6 +106,18 @@ export class dPa_control_c { return null; } + private patchResData(globals: dGlobals, resData: JPAResourceData): void { + if (resData.resourceId & 0x4000) { + const m = resData.materialHelper.material; + m.tevStages[0].alphaInA = GX.CA.ZERO; + m.tevStages[0].alphaInB = GX.CA.ZERO; + m.tevStages[0].alphaInC = GX.CA.ZERO; + m.tevStages[0].alphaInD = GX.CA.A0; + + resData.materialHelper.materialInvalidated(); + } + } + private getResData(globals: dGlobals, userIndex: number): JPAResourceData | null { if (!this.resourceDatas.has(userIndex)) { const data = this.findResData(userIndex); @@ -113,6 +125,7 @@ export class dPa_control_c { const [jpacData, jpaResRaw] = data; const device = globals.modelCache.device, cache = globals.modelCache.cache; const resData = new JPAResourceData(device, cache, jpacData, jpaResRaw); + this.patchResData(globals, resData); this.resourceDatas.set(userIndex, resData); } }