mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
changes
This commit is contained in:
parent
b656ce4630
commit
88d4c2752f
@ -415,9 +415,12 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
if(!this._reusableTexture) return null;
|
||||
|
||||
if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale)
|
||||
if(this._avatarSpriteData)
|
||||
{
|
||||
this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds);
|
||||
if(this._avatarSpriteData.paletteIsGrayscale)
|
||||
{
|
||||
this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds);
|
||||
}
|
||||
}
|
||||
|
||||
this._image = this._reusableTexture;
|
||||
@ -436,11 +439,10 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
for(let i = 0; i < data.length; i += 4)
|
||||
{
|
||||
let paletteColor = reds[data[ i ]];
|
||||
|
||||
let paletteColor = (reds[ data[i] ]);
|
||||
if(paletteColor === undefined) paletteColor = 0;
|
||||
|
||||
data[ i ] = paletteColor[0];
|
||||
data[ i ] = ((paletteColor >> 16));
|
||||
}
|
||||
|
||||
textureCtx.putImageData(textureImageData, 0, 0);
|
||||
|
@ -121,7 +121,7 @@ export class AvatarDataContainer implements IAvatarDataContainer
|
||||
_local_22 = (_local_22 + _local_13);
|
||||
_local_23 = (_local_23 + _local_14);
|
||||
_local_19.push((_local_20 << 24));
|
||||
_local_16.push(~~(((((_local_20 << 24) | (_local_21 << 16)) | (_local_22 << 8)) | _local_23) / 255));
|
||||
_local_16.push((((((_local_20 << 24) | (_local_21 << 16)) | (_local_22 << 8)) | _local_23)));
|
||||
_local_17.push(((((_local_20 << 24) | (_local_21 << 16)) | (_local_22 << 8)) | _local_23));
|
||||
_local_18.push(((((_local_20 << 24) | (_local_21 << 16)) | (_local_22 << 8)) | _local_23));
|
||||
_local_24++;
|
||||
|
Loading…
Reference in New Issue
Block a user