Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistake correction #50

Merged
merged 3 commits into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 1 addition & 124 deletions packages/client/game/misc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,110 +186,6 @@ interface CopyMemoryResult {
src: number;
}

interface VoiceFxChorus {
fWetDryMix: number;
fDepth: number;
fFeedback: number;
fFrequency: number;
lWaveform: number;
fDelay: number;
lPhase: RageEnums.Voice.BASSFXPhase;
}

interface VoiceFxCompressor {
fGain: number;
fAttack: number;
fRelease: number;
fThreshold: number;
fRatio: number;
fPredelay: number;
}

interface VoiceFxDistortion {
fGain: number;
fEdge: number;
fPostEQCenterFrequency: number;
fPostEQBandwidth: number;
fPreLowpassCutoff: number;
}

interface VoiceFxEcho {
fWetDryMix: number;
fFeedback: number;
fLeftDelay: number;
fRightDelay: number;
lPanDelay: number;
}

interface VoiceFxFlanger {
fWetDryMix: number;
fDepth: number;
fFeedback: number;
fFrequency: number;
lWaveform: number;
fDelay: number;
lPhase: RageEnums.Voice.BASSFXPhase;
}

interface VoiceFxGargle {
dwRateHz: number;
dwWaveShape: number;
}

interface VoiceFxI3DL2Reverb {
lRoom: number;
lRoomHF: number;
flRoomRolloffFactor: number;
flDecayTime: number;
flDecayHFRatio: number;
lReflections: number;
flReflectionsDelay: number;
lReverb: number;
flReverbDelay: number;
flDiffusion: number;
flDensity: number;
flHFReference: number;
}

interface VoiceFxParamEq {
fCenter: number;
fBandwidth: number;
fGain: number;
}

interface VoiceFxReverb {
fInGain: number;
fReverbMix: number;
fReverbTime: number;
fHighFreqRTRatio: number;
}

interface VoiceFxVolume {
fTarget: number;
fCurrent: number;
fTime: number;
lCurve: number;
}

interface VoiceFxPeakEq {
lBand: number;
fBandwidth: number;
fQ: number;
fCenter: number;
fGain: number;
lChannel: RageEnums.Voice.BASSFXChan;
}

interface VoiceFxBQF {
lFilter: number;
fCenter: number;
fGain: number;
fBandwidth: number;
fQ: number;
fS: number;
lChannel: RageEnums.Voice.BASSFXChan;
}

interface GameMisc extends GameMiscLegacy {
getAllocatedStackSize(): number;
getNumberOfFreeStacksOfThisSize(stackSize: number): number;
Expand Down Expand Up @@ -781,30 +677,11 @@ interface GameMisc extends GameMiscLegacy {
getIsPlayerInAnimalForm(): boolean;
setPlayerRockstarEditorDisabled(toggle: boolean): void;

/**
* https://wiki.rage.mp/index.php?title=Player::setVoiceFx
*/
setVoiceFx(fxType: RageEnums.Voice.BASSFXType, priority: number): void;
removeVoiceFx(fxHandle: VoiceHandle): void;
resetVoiceFx(fxHandle: VoiceHandle): void;
setVoiceFxChorus(fxHandle: VoiceHandle, { fWetDryMix, fDepth, fFeedback, fFrequency, lWaveform, fDelay, lPhase }: VoiceFxChorus): void;
setVoiceFxCompressor(fxHandle: VoiceHandle, { fGain, fAttack, fRelease, fThreshold, fRatio, fPredelay }: VoiceFxCompressor): void;
setVoiceFxDistortion(fxHandle: VoiceHandle, { fGain, fEdge, fPostEQCenterFrequency, fPostEQBandwidth, fPreLowpassCutoff }: VoiceFxDistortion): void;
setVoiceFxEcho(fxHandle: VoiceHandle, { fWetDryMix, fFeedback, fLeftDelay, fRightDelay, lPanDelay }: VoiceFxEcho): void;
setVoiceFxFlanger(fxHandle: VoiceHandle, { fWetDryMix, fDepth, fFeedback, fFrequency, lWaveform, fDelay, lPhase }: VoiceFxFlanger): void;
setVoiceFxGargle(fxHandle: VoiceHandle, { dwRateHz, dwWaveShape }: VoiceFxGargle): void;
setVoiceFxI3DL2Reverb(fxHandle: VoiceHandle, { lRoom, lRoomHF, flRoomRolloffFactor, flDecayTime, flDecayHFRatio, lReflections, flReflectionsDelay, lReverb, flReverbDelay, flDiffusion, flDensity, flHFReference }: VoiceFxI3DL2Reverb): void;
setVoiceFxParamEq(fxHandle: VoiceHandle, { fCenter, fBandwidth, fGain }: VoiceFxParamEq): void;
setVoiceFxReverb(fxHandle: VoiceHandle, { fInGain, fReverbMix, fReverbTime, fHighFreqRTRatio }: VoiceFxReverb): void;
setVoiceFxVolume(fxHandle: VoiceHandle, { fTarget, fCurrent, fTime, lCurve }: VoiceFxVolume): void;
setVoiceFxPeakEq(fxHandle: VoiceHandle, { lBand, fBandwidth, fQ, fCenter, fGain, lChannel }: VoiceFxPeakEq): void;
setVoiceFxBQF(fxHandle: VoiceHandle, { lFilter, fCenter, fGain, fBandwidth, fQ, fS, lChannel }: VoiceFxBQF): void;

/**
* Overrides snow value set by server setter
* - ⚠️ mp.game1.gameplay.enableSnow is a temporary workaround, "game" setter to be fixed later
*/
enableSnow(toggle: boolean): void;
enableSnow: boolean;

unk: GameMiscUnk;
}
Expand Down
123 changes: 122 additions & 1 deletion packages/client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,110 @@ declare type RGB = Array3d;
declare type RGBA = Array4d;
declare type VoiceHandle = number;

interface VoiceFxChorus {
fWetDryMix: number;
fDepth: number;
fFeedback: number;
fFrequency: number;
lWaveform: number;
fDelay: number;
lPhase: RageEnums.Voice.BASSFXPhase;
}

interface VoiceFxCompressor {
fGain: number;
fAttack: number;
fRelease: number;
fThreshold: number;
fRatio: number;
fPredelay: number;
}

interface VoiceFxDistortion {
fGain: number;
fEdge: number;
fPostEQCenterFrequency: number;
fPostEQBandwidth: number;
fPreLowpassCutoff: number;
}

interface VoiceFxEcho {
fWetDryMix: number;
fFeedback: number;
fLeftDelay: number;
fRightDelay: number;
lPanDelay: number;
}

interface VoiceFxFlanger {
fWetDryMix: number;
fDepth: number;
fFeedback: number;
fFrequency: number;
lWaveform: number;
fDelay: number;
lPhase: RageEnums.Voice.BASSFXPhase;
}

interface VoiceFxGargle {
dwRateHz: number;
dwWaveShape: number;
}

interface VoiceFxI3DL2Reverb {
lRoom: number;
lRoomHF: number;
flRoomRolloffFactor: number;
flDecayTime: number;
flDecayHFRatio: number;
lReflections: number;
flReflectionsDelay: number;
lReverb: number;
flReverbDelay: number;
flDiffusion: number;
flDensity: number;
flHFReference: number;
}

interface VoiceFxParamEq {
fCenter: number;
fBandwidth: number;
fGain: number;
}

interface VoiceFxReverb {
fInGain: number;
fReverbMix: number;
fReverbTime: number;
fHighFreqRTRatio: number;
}

interface VoiceFxVolume {
fTarget: number;
fCurrent: number;
fTime: number;
lCurve: number;
}

interface VoiceFxPeakEq {
lBand: number;
fBandwidth: number;
fQ: number;
fCenter: number;
fGain: number;
lChannel: RageEnums.Voice.BASSFXChan;
}

interface VoiceFxBQF {
lFilter: number;
fCenter: number;
fGain: number;
fBandwidth: number;
fQ: number;
fS: number;
lChannel: RageEnums.Voice.BASSFXChan;
}

declare interface IVector3 {
x: number;
y: number;
Expand Down Expand Up @@ -2326,7 +2430,24 @@ declare interface PlayerMp extends PedMpBase {
*/
isPositionFrozen: boolean;


/**
* https://wiki.rage.mp/index.php?title=Player::setVoiceFx
*/
setVoiceFx(fxType: RageEnums.Voice.BASSFXType, priority: number): void;
removeVoiceFx(fxHandle: VoiceHandle): void;
resetVoiceFx(fxHandle: VoiceHandle): void;
setVoiceFxChorus(fxHandle: VoiceHandle, { fWetDryMix, fDepth, fFeedback, fFrequency, lWaveform, fDelay, lPhase }: VoiceFxChorus): void;
setVoiceFxCompressor(fxHandle: VoiceHandle, { fGain, fAttack, fRelease, fThreshold, fRatio, fPredelay }: VoiceFxCompressor): void;
setVoiceFxDistortion(fxHandle: VoiceHandle, { fGain, fEdge, fPostEQCenterFrequency, fPostEQBandwidth, fPreLowpassCutoff }: VoiceFxDistortion): void;
setVoiceFxEcho(fxHandle: VoiceHandle, { fWetDryMix, fFeedback, fLeftDelay, fRightDelay, lPanDelay }: VoiceFxEcho): void;
setVoiceFxFlanger(fxHandle: VoiceHandle, { fWetDryMix, fDepth, fFeedback, fFrequency, lWaveform, fDelay, lPhase }: VoiceFxFlanger): void;
setVoiceFxGargle(fxHandle: VoiceHandle, { dwRateHz, dwWaveShape }: VoiceFxGargle): void;
setVoiceFxI3DL2Reverb(fxHandle: VoiceHandle, { lRoom, lRoomHF, flRoomRolloffFactor, flDecayTime, flDecayHFRatio, lReflections, flReflectionsDelay, lReverb, flReverbDelay, flDiffusion, flDensity, flHFReference }: VoiceFxI3DL2Reverb): void;
setVoiceFxParamEq(fxHandle: VoiceHandle, { fCenter, fBandwidth, fGain }: VoiceFxParamEq): void;
setVoiceFxReverb(fxHandle: VoiceHandle, { fInGain, fReverbMix, fReverbTime, fHighFreqRTRatio }: VoiceFxReverb): void;
setVoiceFxVolume(fxHandle: VoiceHandle, { fTarget, fCurrent, fTime, lCurve }: VoiceFxVolume): void;
setVoiceFxPeakEq(fxHandle: VoiceHandle, { lBand, fBandwidth, fQ, fCenter, fGain, lChannel }: VoiceFxPeakEq): void;
setVoiceFxBQF(fxHandle: VoiceHandle, { lFilter, fCenter, fGain, fBandwidth, fQ, fS, lChannel }: VoiceFxBQF): void;
}

declare interface PlayerMpPool extends EntityMpPool<PlayerMp> {
Expand Down