diff --git a/src/nitro/avatar/AvatarImage.ts b/src/nitro/avatar/AvatarImage.ts index 22a33451..d7f358a7 100644 --- a/src/nitro/avatar/AvatarImage.ts +++ b/src/nitro/avatar/AvatarImage.ts @@ -386,7 +386,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener partCount--; } - if(this._avatarSpriteData && this._avatarSpriteData._Str_832) this.convertToGrayscale(container); + if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale) this.convertToGrayscale(container); if(!cache) { @@ -404,7 +404,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener if(!this._reusableTexture) return null; - if(this._avatarSpriteData && this._avatarSpriteData._Str_832) + if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale) { //this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds); } diff --git a/src/nitro/avatar/animation/AvatarDataContainer.ts b/src/nitro/avatar/animation/AvatarDataContainer.ts index 466b033a..9fef8136 100644 --- a/src/nitro/avatar/animation/AvatarDataContainer.ts +++ b/src/nitro/avatar/animation/AvatarDataContainer.ts @@ -48,7 +48,7 @@ export class AvatarDataContainer implements IAvatarDataContainer this._paletteIsGrayscale = false; } - this._colorMap = this._Str_1181(this._backGround, this._foreGround); + this._colorMap = this.generatePaletteMapForGrayscale(this._backGround, this._foreGround); } public get ink(): number @@ -81,12 +81,12 @@ export class AvatarDataContainer implements IAvatarDataContainer return this._colorMap.get('alphas'); } - public get _Str_832(): boolean + public get paletteIsGrayscale(): boolean { return this._paletteIsGrayscale; } - private _Str_1181(k: number, _arg_2: number): Map + private generatePaletteMapForGrayscale(k: number, _arg_2: number): Map { const _local_3 = ((k >> 24) & 0xFF); const _local_4 = ((k >> 16) & 0xFF); diff --git a/src/nitro/avatar/animation/IAvatarDataContainer.ts b/src/nitro/avatar/animation/IAvatarDataContainer.ts index 7cb2fbb3..1e6ed488 100644 --- a/src/nitro/avatar/animation/IAvatarDataContainer.ts +++ b/src/nitro/avatar/animation/IAvatarDataContainer.ts @@ -4,9 +4,9 @@ export interface IAvatarDataContainer { ink: number; colorTransform: AdjustmentFilter; - _Str_832: boolean; + paletteIsGrayscale: boolean; reds: number[]; greens: number[]; blues: number[]; alphas: number[]; -} \ No newline at end of file +}