Skip to content

Commit

Permalink
Wind Waker: Explicit return types for d_particle functions
Browse files Browse the repository at this point in the history
  • Loading branch information
themikelester committed Jan 3, 2025
1 parent eb9f410 commit aa99a35
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ZeldaWindWaker/d_particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class dPa_control_c {
this.emitterManager = new JPAEmitterManager(cache, 6000, 300);
}

public createCommon(globals: dGlobals, commonJpac: JPAC) {
public createCommon(globals: dGlobals, commonJpac: JPAC): void {
const jpacData = new JPACData(commonJpac);
const m = jpacData.getTextureMappingReference('AK_kagerouSwap00');
if (m !== null)
Expand All @@ -90,7 +90,7 @@ export class dPa_control_c {
}
}

public createRoomScene(globals: dGlobals, sceneJpac: JPAC) {
public createRoomScene(globals: dGlobals, sceneJpac: JPAC): void {
const jpacData = new JPACData(sceneJpac);
const m = jpacData.getTextureMappingReference('AK_kagerouSwap00');
if (m !== null)
Expand All @@ -109,7 +109,7 @@ export class dPa_control_c {
}
}

private newSimple(resData: JPAResourceData, userID: number, groupID: number) {
private newSimple(resData: JPAResourceData, userID: number, groupID: number): void {
const simple = new dPa_simpleEcallBack();
simple.create(this.emitterManager, resData, userID, groupID);
this.simpleCallbacks.push(simple);
Expand Down Expand Up @@ -227,7 +227,7 @@ export class dPa_control_c {
return baseEmitter;
}

public setSimple(userID: number, pos: vec3, alpha: number, prmColor: Color, envColor: Color, isAffectedByWind: boolean) {
public setSimple(userID: number, pos: vec3, alpha: number, prmColor: Color, envColor: Color, isAffectedByWind: boolean): boolean {
const simple = this.simpleCallbacks.find(s => s.userID == userID);
if (!simple)
return false;
Expand Down Expand Up @@ -281,8 +281,9 @@ class dPa_simpleEcallBack extends JPAEmitterCallBack {
}
}

public set(pos: vec3, alpha: number, prmColor: Color, envColor: Color, isAffectedByWind: boolean) {
public set(pos: vec3, alpha: number, prmColor: Color, envColor: Color, isAffectedByWind: boolean): boolean {
this.datas.push({ pos: vec3.clone(pos), prmColor: colorNewCopy(prmColor, alpha), envColor: colorNewCopy(envColor), isAffectedByWind });
return true;
}

public override executeAfter(emitter: JPABaseEmitter): void {
Expand Down

0 comments on commit aa99a35

Please sign in to comment.