cleaned AvatarDataContainer

This commit is contained in:
Dank074 2021-05-29 17:58:03 -05:00
parent 973240c997
commit 302212ba5c
3 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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<string, number[]>
private generatePaletteMapForGrayscale(k: number, _arg_2: number): Map<string, number[]>
{
const _local_3 = ((k >> 24) & 0xFF);
const _local_4 = ((k >> 16) & 0xFF);

View File

@ -4,7 +4,7 @@ export interface IAvatarDataContainer
{
ink: number;
colorTransform: AdjustmentFilter;
_Str_832: boolean;
paletteIsGrayscale: boolean;
reds: number[];
greens: number[];
blues: number[];