cleaned SpriteDataContainer

This commit is contained in:
Dank074 2021-05-12 04:04:13 -05:00
parent ed6eafb26a
commit 97a2cde086
3 changed files with 18 additions and 18 deletions

View File

@ -6,9 +6,9 @@ export interface ISpriteDataContainer
id: string;
ink: number;
member: string;
_Str_949: boolean;
_Str_767: boolean;
_Str_809(_arg_1: number): number;
_Str_739(_arg_1: number): number;
_Str_839(_arg_1: number): number;
hasDirections: boolean;
hasStaticY: boolean;
getDirectionOffsetX(_arg_1: number): number;
getDirectionOffsetY(_arg_1: number): number;
getDirectionOffsetZ(_arg_1: number): number;
}

View File

@ -43,21 +43,21 @@ export class SpriteDataContainer implements ISpriteDataContainer
}
}
public _Str_809(k: number): number
public getDirectionOffsetX(k: number): number
{
if(k < this._dx.length) return this._dx[k];
return 0;
}
public _Str_739(k: number): number
public getDirectionOffsetY(k: number): number
{
if(k < this._dy.length) return this._dy[k];
return 0;
}
public _Str_839(k: number): number
public getDirectionOffsetZ(k: number): number
{
if(k < this._dz.length) return this._dz[k];
@ -84,12 +84,12 @@ export class SpriteDataContainer implements ISpriteDataContainer
return this._member;
}
public get _Str_949(): boolean
public get hasDirections(): boolean
{
return this._hasDirections;
}
public get _Str_767(): boolean
public get hasStaticY(): boolean
{
return this._hasStaticY;
}

View File

@ -365,8 +365,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
{
const layerData = this._avatarImage.getLayerData(spriteData);
let offsetX = spriteData._Str_809(direction);
let offsetY = spriteData._Str_739(direction);
let offsetX = spriteData.getDirectionOffsetX(direction);
let offsetY = spriteData.getDirectionOffsetY(direction);
if(layerData)
{
@ -399,12 +399,12 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
const layerData = this._avatarImage.getLayerData(spriteData);
let frameNumber = 0;
let offsetX = spriteData._Str_809(direction);
let offsetY = spriteData._Str_739(direction);
const offsetZ = spriteData._Str_839(direction);
let offsetX = spriteData.getDirectionOffsetX(direction);
let offsetY = spriteData.getDirectionOffsetY(direction);
const offsetZ = spriteData.getDirectionOffsetZ(direction);
let dd = 0;
if(spriteData._Str_949) dd = direction;
if(spriteData.hasDirections) dd = direction;
if(layerData)
{
@ -437,7 +437,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
sprite.offsetY = (asset.offsetY + offsetY);
sprite.flipH = asset.flipH;
if(spriteData._Str_767)
if(spriteData.hasStaticY)
{
sprite.offsetY += ((this._verticalOffset * scale) / (2 * AvatarVisualization._Str_12370));
}