Skip to content

Commit

Permalink
Wind Waker: Remove old patchResData indirect particles hack
Browse files Browse the repository at this point in the history
This TEV patching is now done in a more proper place, inside the the simple particle callback
  • Loading branch information
themikelester committed Jan 3, 2025
1 parent 2c1e8f7 commit 8c65343
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/ZeldaWindWaker/d_particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,27 +158,13 @@ export class dPa_control_c {
return null;
}

// TODO: Remove
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);
if (data !== null) {
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);
} else {
return null;
Expand Down

0 comments on commit 8c65343

Please sign in to comment.