cleaned RoomObjectSprite

This commit is contained in:
Dank074 2021-05-08 19:31:05 -05:00
parent a6f8bb4d54
commit 9ed63945a4
6 changed files with 33 additions and 33 deletions

View File

@ -1052,18 +1052,18 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
if(scale < 48) if(scale < 48)
{ {
sprite._Str_3582 = 'sh_std_sd_1_0_0'; sprite.libraryAssetName = 'sh_std_sd_1_0_0';
this._shadow = this._avatarImage.getAsset(sprite._Str_3582); this._shadow = this._avatarImage.getAsset(sprite.libraryAssetName);
offsetX = -8; offsetX = -8;
offsetY = ((this._canStandUp) ? 6 : -3); offsetY = ((this._canStandUp) ? 6 : -3);
} }
else else
{ {
sprite._Str_3582 = 'h_std_sd_1_0_0'; sprite.libraryAssetName = 'h_std_sd_1_0_0';
this._shadow = this._avatarImage.getAsset(sprite._Str_3582); this._shadow = this._avatarImage.getAsset(sprite.libraryAssetName);
offsetX = -17; offsetX = -17;
offsetY = ((this._canStandUp) ? 10 : -7); offsetY = ((this._canStandUp) ? 10 : -7);

View File

@ -318,7 +318,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization
sprite.relativeDepth = (relativeDepth * FurnitureVisualization.DEPTH_MULTIPLIER); sprite.relativeDepth = (relativeDepth * FurnitureVisualization.DEPTH_MULTIPLIER);
sprite.name = assetName; sprite.name = assetName;
sprite._Str_3582 = this.getLibraryAssetNameForSprite(assetData, sprite); sprite.libraryAssetName = this.getLibraryAssetNameForSprite(assetData, sprite);
sprite.posture = this.getPostureForAsset(scale, assetData.source); sprite.posture = this.getPostureForAsset(scale, assetData.source);
sprite.clickHandling = false; sprite.clickHandling = false;
} }

View File

@ -19,8 +19,8 @@ export interface IRoomObjectSprite
blendMode: number; blendMode: number;
color: number; color: number;
relativeDepth: number; relativeDepth: number;
_Str_4593: boolean; varyingDepth: boolean;
_Str_3582: string; libraryAssetName: string;
clickHandling: boolean; clickHandling: boolean;
visible: boolean; visible: boolean;
tag: string; tag: string;
@ -29,4 +29,4 @@ export interface IRoomObjectSprite
filters: Filter[]; filters: Filter[];
updateCounter: number; updateCounter: number;
updateContainer: boolean; updateContainer: boolean;
} }

View File

@ -26,8 +26,8 @@ export class RoomObjectSprite implements IRoomObjectSprite
private _blendMode: number; private _blendMode: number;
private _color: number; private _color: number;
private _relativeDepth: number; private _relativeDepth: number;
private _Str_8253: boolean; private _varyingDepth: boolean;
private _Str_11397: string; private _libraryAssetName: string;
private _clickHandling: boolean; private _clickHandling: boolean;
private _visible: boolean; private _visible: boolean;
private _tag: string; private _tag: string;
@ -59,8 +59,8 @@ export class RoomObjectSprite implements IRoomObjectSprite
this._blendMode = BLEND_MODES.NORMAL; this._blendMode = BLEND_MODES.NORMAL;
this._color = 0xFFFFFF; this._color = 0xFFFFFF;
this._relativeDepth = 0; this._relativeDepth = 0;
this._Str_8253 = false; this._varyingDepth = false;
this._Str_11397 = ''; this._libraryAssetName = '';
this._clickHandling = false; this._clickHandling = false;
this._visible = true; this._visible = true;
this._tag = ''; this._tag = '';
@ -303,28 +303,28 @@ export class RoomObjectSprite implements IRoomObjectSprite
this._updateCounter++; this._updateCounter++;
} }
public get _Str_4593(): boolean public get varyingDepth(): boolean
{ {
return this._Str_8253; return this._varyingDepth;
} }
public set _Str_4593(flag: boolean) public set varyingDepth(flag: boolean)
{ {
if(flag === this._Str_8253) return; if(flag === this._varyingDepth) return;
this._Str_8253 = flag; this._varyingDepth = flag;
this._updateCounter++; this._updateCounter++;
} }
public get _Str_3582(): string public get libraryAssetName(): string
{ {
return this._Str_11397; return this._libraryAssetName;
} }
public set _Str_3582(value: string) public set libraryAssetName(value: string)
{ {
this._Str_11397 = value; this._libraryAssetName = value;
} }
public get clickHandling(): boolean public get clickHandling(): boolean
@ -419,4 +419,4 @@ export class RoomObjectSprite implements IRoomObjectSprite
{ {
this._updateContainer = flag; this._updateContainer = flag;
} }
} }

View File

@ -512,7 +512,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
if((sprite.spriteType === RoomObjectSpriteType._Str_11629) || (sprite.spriteType === RoomObjectSpriteType._Str_10494)) if((sprite.spriteType === RoomObjectSpriteType._Str_11629) || (sprite.spriteType === RoomObjectSpriteType._Str_10494))
{ {
sortableSprite.sprite._Str_3582 = 'avatar_' + object.id; sortableSprite.sprite.libraryAssetName = 'avatar_' + object.id;
} }
sortableSprite.x = (spriteX - this._screenOffsetX); sortableSprite.x = (spriteX - this._screenOffsetX);
@ -564,9 +564,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
if(!objectSprite || !extendedSprite) return false; if(!objectSprite || !extendedSprite) return false;
if(extendedSprite._Str_4593 !== objectSprite._Str_4593) if(extendedSprite.varyingDepth !== objectSprite.varyingDepth)
{ {
if(extendedSprite._Str_4593 && !objectSprite._Str_4593) if(extendedSprite.varyingDepth && !objectSprite.varyingDepth)
{ {
this._display.removeChildAt(index); this._display.removeChildAt(index);
@ -585,7 +585,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
extendedSprite.tag = objectSprite.tag; extendedSprite.tag = objectSprite.tag;
extendedSprite.alphaTolerance = objectSprite.alphaTolerance; extendedSprite.alphaTolerance = objectSprite.alphaTolerance;
extendedSprite.name = sprite.name; extendedSprite.name = sprite.name;
extendedSprite._Str_4593 = objectSprite._Str_4593; extendedSprite.varyingDepth = objectSprite.varyingDepth;
extendedSprite.clickHandling = objectSprite.clickHandling; extendedSprite.clickHandling = objectSprite.clickHandling;
extendedSprite.filters = objectSprite.filters; extendedSprite.filters = objectSprite.filters;
@ -663,7 +663,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
extendedSprite.offsetX = sprite.offsetX; extendedSprite.offsetX = sprite.offsetX;
extendedSprite.offsetY = sprite.offsetY; extendedSprite.offsetY = sprite.offsetY;
extendedSprite.name = sprite.name; extendedSprite.name = sprite.name;
extendedSprite._Str_4593 = sprite._Str_4593; extendedSprite.varyingDepth = sprite.varyingDepth;
extendedSprite.clickHandling = sprite.clickHandling; extendedSprite.clickHandling = sprite.clickHandling;
extendedSprite.blendMode = sprite.blendMode; extendedSprite.blendMode = sprite.blendMode;
extendedSprite.filters = sprite.filters; extendedSprite.filters = sprite.filters;

View File

@ -7,7 +7,7 @@ export class ExtendedSprite extends Sprite
private _offsetY: number; private _offsetY: number;
private _tag: string; private _tag: string;
private _alphaTolerance: number; private _alphaTolerance: number;
private _Str_8253: boolean; private _varyingDepth: boolean;
private _clickHandling: boolean; private _clickHandling: boolean;
private _pairedSpriteId: number; private _pairedSpriteId: number;
@ -21,7 +21,7 @@ export class ExtendedSprite extends Sprite
this._offsetY = 0; this._offsetY = 0;
this._tag = ''; this._tag = '';
this._alphaTolerance = 128; this._alphaTolerance = 128;
this._Str_8253 = false; this._varyingDepth = false;
this._clickHandling = false; this._clickHandling = false;
this._pairedSpriteId = -1; this._pairedSpriteId = -1;
@ -219,14 +219,14 @@ export class ExtendedSprite extends Sprite
this._alphaTolerance = tolerance; this._alphaTolerance = tolerance;
} }
public get _Str_4593(): boolean public get varyingDepth(): boolean
{ {
return this._Str_8253; return this._varyingDepth;
} }
public set _Str_4593(flag: boolean) public set varyingDepth(flag: boolean)
{ {
this._Str_8253 = flag; this._varyingDepth = flag;
} }
public get clickHandling(): boolean public get clickHandling(): boolean