mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
fixed AvatarVisualization variables
This commit is contained in:
parent
35850e1bb2
commit
505033a9cb
@ -33,19 +33,18 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
private static MUTED_BUBBLE_ID: number = 6;
|
||||
private static OWN_USER_ID: number = 4;
|
||||
private static UPDATE_TIME_INCREASER: number = 41;
|
||||
private static OFFSET_MULTIPLIER: number = 1000;
|
||||
private static AVATAR_LAYER_ID: number = 0;
|
||||
private static SHADOW_LAYER_ID: number = 1;
|
||||
private static _Str_17502: number = 97;
|
||||
private static _Str_11587: number = 2;
|
||||
private static _Str_14491: number = 2;
|
||||
private static _Str_18338: number[] = [0, 0, 0];
|
||||
private static SNOWBOARDING_EFFECT: number = 97;
|
||||
private static INITIAL_RESERVED_SPRITES: number = 2;
|
||||
private static ANIMATION_FRAME_UPDATE_INTERVAL: number = 2;
|
||||
private static DEFAULT_CANVAS_OFFSETS: number[] = [0, 0, 0];
|
||||
private static MAX_EFFECT_CACHE: number = 2;
|
||||
private static _Str_9540: number = 0;
|
||||
private static _Str_12370: number = 1000;
|
||||
private static _Str_11358: number = -0.01;
|
||||
private static _Str_17708: number = 0.001;
|
||||
private static _Str_9235: number = -0.409;
|
||||
private static SPRITE_INDEX_AVATAR: number = 0;
|
||||
private static BASE_Y_SCALE: number = 1000;
|
||||
private static AVATAR_SPRITE_DEFAULT_DEPTH: number = -0.01;
|
||||
private static AVATAR_OWN_DEPTH_ADJUST: number = 0.001;
|
||||
private static AVATAR_SPRITE_LAYING_DEPTH: number = -0.409;
|
||||
|
||||
protected _data: AvatarVisualizationData;
|
||||
|
||||
@ -81,12 +80,12 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
private _useObject: number;
|
||||
private _ownUser: boolean;
|
||||
|
||||
private _Str_8935: boolean;
|
||||
private _Str_17860: boolean;
|
||||
private _Str_1222: boolean;
|
||||
private _Str_16697: number;
|
||||
private _Str_12697: number;
|
||||
private _Str_14276: number;
|
||||
private _isLaying: boolean;
|
||||
private _layInside: boolean;
|
||||
private _isAnimating: boolean;
|
||||
private _extraSpritesStartIndex: number;
|
||||
private _forcedAnimFrames: number;
|
||||
private _updatesUntilFrameUpdate: number;
|
||||
|
||||
private _isAvatarReady: boolean;
|
||||
private _needsUpdate: boolean;
|
||||
@ -105,7 +104,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
this._cachedAvatarEffects = new AdvancedMap();
|
||||
this._shadow = null;
|
||||
this._lastUpdate = -1000;
|
||||
this._disposed = false;
|
||||
this._disposed = false;
|
||||
|
||||
this._figure = null;
|
||||
this._gender = null;
|
||||
@ -132,12 +131,12 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
this._useObject = 0;
|
||||
this._ownUser = false;
|
||||
|
||||
this._Str_8935 = false;
|
||||
this._Str_17860 = false;
|
||||
this._Str_1222 = false;
|
||||
this._Str_16697 = 2;
|
||||
this._Str_12697 = 0;
|
||||
this._Str_14276 = 0;
|
||||
this._isLaying = false;
|
||||
this._layInside = false;
|
||||
this._isAnimating = false;
|
||||
this._extraSpritesStartIndex = 2;
|
||||
this._forcedAnimFrames = 0;
|
||||
this._updatesUntilFrameUpdate = 0;
|
||||
|
||||
this._isAvatarReady = false;
|
||||
this._needsUpdate = false;
|
||||
@ -152,7 +151,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
this._data = data;
|
||||
|
||||
this.setSpriteCount(AvatarVisualization._Str_11587);
|
||||
this.createSprites(AvatarVisualization.INITIAL_RESERVED_SPRITES);
|
||||
|
||||
super.initialize(data);
|
||||
|
||||
@ -236,7 +235,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
if(this._additions)
|
||||
{
|
||||
let index = this._Str_16697;
|
||||
let index = this._extraSpritesStartIndex;
|
||||
|
||||
for(const addition of this._additions.values())
|
||||
{
|
||||
@ -253,7 +252,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
if(this._additions)
|
||||
{
|
||||
let index = this._Str_16697;
|
||||
let index = this._extraSpritesStartIndex;
|
||||
|
||||
for(const addition of this._additions.values())
|
||||
{
|
||||
@ -262,22 +261,22 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
}
|
||||
|
||||
const update1 = (objectUpdate || updateModel || didScaleUpdate);
|
||||
const update2 = ((this._Str_1222 || (this._Str_12697 > 0)) && update);
|
||||
const update2 = ((this._isAnimating || (this._forcedAnimFrames > 0)) && update);
|
||||
|
||||
if(update1) this._Str_12697 = AvatarVisualization._Str_14491;
|
||||
if(update1) this._forcedAnimFrames = AvatarVisualization.ANIMATION_FRAME_UPDATE_INTERVAL;
|
||||
|
||||
if(update1 || update2)
|
||||
{
|
||||
this.updateSpriteCounter++;
|
||||
|
||||
this._Str_12697--;
|
||||
this._Str_14276--;
|
||||
this._forcedAnimFrames--;
|
||||
this._updatesUntilFrameUpdate--;
|
||||
|
||||
if((((this._Str_14276 <= 0) || didScaleUpdate) || updateModel) || otherUpdate)
|
||||
if((((this._updatesUntilFrameUpdate <= 0) || didScaleUpdate) || updateModel) || otherUpdate)
|
||||
{
|
||||
this._avatarImage.updateAnimationByFrames(1);
|
||||
|
||||
this._Str_14276 = AvatarVisualization._Str_14491;
|
||||
this._updatesUntilFrameUpdate = AvatarVisualization.ANIMATION_FRAME_UPDATE_INTERVAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -286,9 +285,9 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
let _local_20 = this._avatarImage.getCanvasOffsets();
|
||||
|
||||
if(!_local_20 || (_local_20.length < 3)) _local_20 = AvatarVisualization._Str_18338;
|
||||
if(!_local_20 || (_local_20.length < 3)) _local_20 = AvatarVisualization.DEFAULT_CANVAS_OFFSETS;
|
||||
|
||||
const sprite = this.getSprite(AvatarVisualization._Str_9540);
|
||||
const sprite = this.getSprite(AvatarVisualization.SPRITE_INDEX_AVATAR);
|
||||
|
||||
if(sprite)
|
||||
{
|
||||
@ -321,19 +320,19 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
sprite.offsetY = (((-(sprite.texture.height) + (scale / 4)) + _local_20[1]) + this._postureOffset);
|
||||
}
|
||||
|
||||
if(this._Str_8935)
|
||||
if(this._isLaying)
|
||||
{
|
||||
if(this._Str_17860) sprite.relativeDepth = -0.5;
|
||||
else sprite.relativeDepth = (AvatarVisualization._Str_9235 + _local_20[2]);
|
||||
if(this._layInside) sprite.relativeDepth = -0.5;
|
||||
else sprite.relativeDepth = (AvatarVisualization.AVATAR_SPRITE_LAYING_DEPTH + _local_20[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.relativeDepth = (AvatarVisualization._Str_11358 + _local_20[2]);
|
||||
sprite.relativeDepth = (AvatarVisualization.AVATAR_SPRITE_DEFAULT_DEPTH + _local_20[2]);
|
||||
}
|
||||
|
||||
if(this._ownUser)
|
||||
{
|
||||
sprite.relativeDepth -= AvatarVisualization._Str_17708;
|
||||
sprite.relativeDepth -= AvatarVisualization.AVATAR_OWN_DEPTH_ADJUST;
|
||||
sprite.spriteType = RoomObjectSpriteType.AVATAR_OWN;
|
||||
}
|
||||
else
|
||||
@ -346,20 +345,20 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
if(typingBubble)
|
||||
{
|
||||
if(!this._Str_8935) typingBubble.relativeDepth = ((AvatarVisualization._Str_11358 - 0.01) + _local_20[2]);
|
||||
else typingBubble.relativeDepth = ((AvatarVisualization._Str_9235 - 0.01) + _local_20[2]);
|
||||
if(!this._isLaying) typingBubble.relativeDepth = ((AvatarVisualization.AVATAR_SPRITE_DEFAULT_DEPTH - 0.01) + _local_20[2]);
|
||||
else typingBubble.relativeDepth = ((AvatarVisualization.AVATAR_SPRITE_LAYING_DEPTH - 0.01) + _local_20[2]);
|
||||
}
|
||||
|
||||
this._Str_1222 = this._avatarImage.isAnimating();
|
||||
this._isAnimating = this._avatarImage.isAnimating();
|
||||
|
||||
let _local_21 = AvatarVisualization._Str_11587;
|
||||
let _local_21 = AvatarVisualization.INITIAL_RESERVED_SPRITES;
|
||||
const direction = this._avatarImage.getDirection();
|
||||
|
||||
for(const spriteData of this._avatarImage.getSprites())
|
||||
{
|
||||
if(spriteData.id === AvatarVisualization.AVATAR)
|
||||
{
|
||||
const sprite = this.getSprite(AvatarVisualization._Str_9540);
|
||||
const sprite = this.getSprite(AvatarVisualization.SPRITE_INDEX_AVATAR);
|
||||
|
||||
if(sprite)
|
||||
{
|
||||
@ -439,20 +438,20 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
if(spriteData.hasStaticY)
|
||||
{
|
||||
sprite.offsetY += ((this._verticalOffset * scale) / (2 * AvatarVisualization._Str_12370));
|
||||
sprite.offsetY += ((this._verticalOffset * scale) / (2 * AvatarVisualization.BASE_Y_SCALE));
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.offsetY += this._postureOffset;
|
||||
}
|
||||
|
||||
if(this._Str_8935)
|
||||
if(this._isLaying)
|
||||
{
|
||||
sprite.relativeDepth = (AvatarVisualization._Str_9235 - ((0.001 * this.totalSprites) * offsetZ));
|
||||
sprite.relativeDepth = (AvatarVisualization.AVATAR_SPRITE_LAYING_DEPTH - ((0.001 * this.totalSprites) * offsetZ));
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.relativeDepth = (AvatarVisualization._Str_11358 - ((0.001 * this.totalSprites) * offsetZ));
|
||||
sprite.relativeDepth = (AvatarVisualization.AVATAR_SPRITE_DEFAULT_DEPTH - ((0.001 * this.totalSprites) * offsetZ));
|
||||
}
|
||||
|
||||
if(spriteData.ink === 33) sprite.blendMode = BLEND_MODES.ADD;
|
||||
@ -641,7 +640,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
const verticalOffset = (model.getValue<number>(RoomObjectVariable.FIGURE_VERTICAL_OFFSET) * AvatarVisualization.OFFSET_MULTIPLIER);
|
||||
const verticalOffset = (model.getValue<number>(RoomObjectVariable.FIGURE_VERTICAL_OFFSET) * AvatarVisualization.BASE_Y_SCALE);
|
||||
|
||||
if(verticalOffset !== this._verticalOffset)
|
||||
{
|
||||
@ -879,16 +878,16 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
this._postureOffset = 0;
|
||||
}
|
||||
|
||||
this._Str_17860 = false;
|
||||
this._Str_8935 = false;
|
||||
this._layInside = false;
|
||||
this._isLaying = false;
|
||||
|
||||
if(this._posture === 'lay')
|
||||
{
|
||||
this._Str_8935 = true;
|
||||
this._isLaying = true;
|
||||
|
||||
const _local_2 = parseInt(this._postureParameter);
|
||||
|
||||
if(_local_2 < 0) this._Str_17860 = true;
|
||||
if(_local_2 < 0) this._layInside = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -936,18 +935,18 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
avatar.endActionAppends();
|
||||
|
||||
this._Str_1222 = avatar.isAnimating();
|
||||
this._isAnimating = avatar.isAnimating();
|
||||
|
||||
let spriteCount = AvatarVisualization._Str_11587;
|
||||
let spriteCount = AvatarVisualization.INITIAL_RESERVED_SPRITES;
|
||||
|
||||
for(const sprite of this._avatarImage.getSprites())
|
||||
{
|
||||
if(sprite.id !== AvatarVisualization.AVATAR) spriteCount++;
|
||||
}
|
||||
|
||||
if(spriteCount !== this.totalSprites) this.setSpriteCount(spriteCount);
|
||||
if(spriteCount !== this.totalSprites) this.createSprites(spriteCount);
|
||||
|
||||
this._Str_16697 = spriteCount;
|
||||
this._extraSpritesStartIndex = spriteCount;
|
||||
|
||||
if(this._additions)
|
||||
{
|
||||
@ -1039,7 +1038,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
||||
|
||||
let hasShadow = (((this._posture === 'mv') || (this._posture === 'std')) || ((this._posture === 'sit') && this._canStandUp));
|
||||
|
||||
if(this._effect === AvatarVisualization._Str_17502) hasShadow = false;
|
||||
if(this._effect === AvatarVisualization.SNOWBOARDING_EFFECT) hasShadow = false;
|
||||
|
||||
if(hasShadow)
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization
|
||||
this._spriteYOffsets = [];
|
||||
this._spriteZOffsets = [];
|
||||
|
||||
this.setSpriteCount(0);
|
||||
this.createSprites(0);
|
||||
}
|
||||
|
||||
protected resetLayers(scale: number, direction: number): void
|
||||
@ -244,7 +244,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization
|
||||
|
||||
protected updateSprites(scale: number, update: boolean, animation: number): void
|
||||
{
|
||||
if(this._layerCount !== this.totalSprites) this.setSpriteCount(this._layerCount);
|
||||
if(this._layerCount !== this.totalSprites) this.createSprites(this._layerCount);
|
||||
|
||||
if(update)
|
||||
{
|
||||
|
@ -26,17 +26,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
public static RENDER_TEXTURE_CACHE: Map<RoomVisualization, AdvancedMap<any, RenderTexture>> = new Map();
|
||||
|
||||
public static _Str_18544: number = 0xFFFFFF;
|
||||
public static _Str_18640: number = 0xDDDDDD;
|
||||
public static _Str_16664: number = 0xBBBBBB;
|
||||
private static _Str_14503: number = 0xFFFFFF;
|
||||
private static _Str_15851: number = 0xCCCCCC;
|
||||
private static _Str_13715: number = 0x999999;
|
||||
private static _Str_14868: number = 0x999999;
|
||||
public static _Str_17403: number = 0xFFFFFF;
|
||||
public static _Str_16113: number = 0xCCCCCC;
|
||||
public static _Str_18370: number = 0x999999;
|
||||
private static _Str_8621: number = 1000;
|
||||
public static FLOOR_COLOR: number = 0xFFFFFF;
|
||||
public static FLOOR_COLOR_LEFT: number = 0xDDDDDD;
|
||||
public static FLOOR_COLOR_RIGHT: number = 0xBBBBBB;
|
||||
private static WALL_COLOR_TOP: number = 0xFFFFFF;
|
||||
private static WALL_COLOR_SIDE: number = 0xCCCCCC;
|
||||
private static WALL_COLOR_BOTTOM: number = 0x999999;
|
||||
private static WALL_COLOR_BORDER: number = 0x999999;
|
||||
public static LANDSCAPE_COLOR_TOP: number = 0xFFFFFF;
|
||||
public static LANDSCAPE_COLOR_SIDE: number = 0xCCCCCC;
|
||||
public static LANDSCAPE_COLOR_BOTTOM: number = 0x999999;
|
||||
private static ROOM_DEPTH_OFFSET: number = 1000;
|
||||
|
||||
protected _data: RoomVisualizationData;
|
||||
|
||||
@ -51,9 +51,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
private _floorThickness: number;
|
||||
private _wallThickness: number;
|
||||
private _holeUpdateTime: number;
|
||||
private _Str_2540: RoomPlane[];
|
||||
private _Str_4864: RoomPlane[];
|
||||
private _Str_6648: number[];
|
||||
private _planes: RoomPlane[];
|
||||
private _visiblePlanes: RoomPlane[];
|
||||
private _visiblePlaneSpriteNumbers: number[];
|
||||
private _roomScale: number;
|
||||
private _lastUpdateTime: number;
|
||||
private _updateIntervalTime: number;
|
||||
@ -66,7 +66,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
private _greenColor: number;
|
||||
private _blueColor: number;
|
||||
private _typeVisibility: boolean[];
|
||||
private _Str_5928: number;
|
||||
private _assetUpdateCounter: number;
|
||||
private _maskData: RoomMapMaskData;
|
||||
private _isPlaneSet: boolean;
|
||||
|
||||
@ -86,9 +86,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
this._floorThickness = 1;
|
||||
this._wallThickness = 1;
|
||||
this._holeUpdateTime = NaN;
|
||||
this._Str_2540 = [];
|
||||
this._Str_4864 = [];
|
||||
this._Str_6648 = [];
|
||||
this._planes = [];
|
||||
this._visiblePlanes = [];
|
||||
this._visiblePlaneSpriteNumbers = [];
|
||||
this._roomScale = 0;
|
||||
this._lastUpdateTime = -1000;
|
||||
this._updateIntervalTime = 250;
|
||||
@ -101,7 +101,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
this._greenColor = 0xFF;
|
||||
this._blueColor = 0xFF;
|
||||
this._typeVisibility = [];
|
||||
this._Str_5928 = 0;
|
||||
this._assetUpdateCounter = 0;
|
||||
this._maskData = null;
|
||||
this._isPlaneSet = false;
|
||||
|
||||
@ -155,9 +155,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
this.clearPlanes();
|
||||
|
||||
this._Str_2540 = null;
|
||||
this._Str_4864 = null;
|
||||
this._Str_6648 = null;
|
||||
this._planes = null;
|
||||
this._visiblePlanes = null;
|
||||
this._visiblePlaneSpriteNumbers = null;
|
||||
|
||||
if(this._roomPlaneParser)
|
||||
{
|
||||
@ -263,11 +263,11 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
let index = 0;
|
||||
|
||||
while(index < this._Str_4864.length)
|
||||
while(index < this._visiblePlanes.length)
|
||||
{
|
||||
const spriteIndex = this._Str_6648[index];
|
||||
const spriteIndex = this._visiblePlaneSpriteNumbers[index];
|
||||
const sprite = this.getSprite(spriteIndex);
|
||||
const plane = this._Str_4864[index];
|
||||
const plane = this._visiblePlanes[index];
|
||||
|
||||
if(sprite && plane && (plane.type !== RoomPlane.TYPE_LANDSCAPE))
|
||||
{
|
||||
@ -424,23 +424,23 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
private clearPlanes(): void
|
||||
{
|
||||
if(this._Str_2540)
|
||||
if(this._planes)
|
||||
{
|
||||
while(this._Str_2540.length)
|
||||
while(this._planes.length)
|
||||
{
|
||||
const plane = this._Str_2540[0];
|
||||
const plane = this._planes[0];
|
||||
|
||||
if(plane) plane.dispose();
|
||||
|
||||
this._Str_2540.pop();
|
||||
this._planes.pop();
|
||||
}
|
||||
|
||||
this._Str_2540 = [];
|
||||
this._Str_2540 = [];
|
||||
this._planes = [];
|
||||
this._planes = [];
|
||||
}
|
||||
|
||||
this._isPlaneSet = false;
|
||||
this._Str_5928 = (this._Str_5928 + 1);
|
||||
this._assetUpdateCounter = (this._assetUpdateCounter + 1);
|
||||
|
||||
this.reset();
|
||||
}
|
||||
@ -456,8 +456,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(!this._roomPlaneParser.initializeFromMapData(mapData)) return;
|
||||
|
||||
const _local_3 = this._Str_23949();
|
||||
const _local_4 = this._Str_23063();
|
||||
const _local_3 = this.getLandscapeWidth();
|
||||
const _local_4 = this.getLandscapeHeight();
|
||||
|
||||
let _local_5 = 0;
|
||||
let _local_6 = this.object.model.getValue<number>(RoomObjectVariable.ROOM_RANDOM_SEED);
|
||||
@ -491,11 +491,11 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(_local_14.z !== 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_18544;
|
||||
plane.color = RoomVisualization.FLOOR_COLOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.color = ((_local_14.x !== 0) ? RoomVisualization._Str_16664 : RoomVisualization._Str_18640);
|
||||
plane.color = ((_local_14.x !== 0) ? RoomVisualization.FLOOR_COLOR_RIGHT : RoomVisualization.FLOOR_COLOR_LEFT);
|
||||
}
|
||||
|
||||
if(this._data) plane.rasterizer = this._data.floorRasterizer;
|
||||
@ -512,23 +512,23 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if((_local_14.x === 0) && (_local_14.y === 0))
|
||||
{
|
||||
plane.color = RoomVisualization._Str_14868;
|
||||
plane.color = RoomVisualization.WALL_COLOR_BORDER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_14.y > 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_14503;
|
||||
plane.color = RoomVisualization.WALL_COLOR_TOP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_14.y === 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_15851;
|
||||
plane.color = RoomVisualization.WALL_COLOR_SIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.color = RoomVisualization._Str_13715;
|
||||
plane.color = RoomVisualization.WALL_COLOR_BOTTOM;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -542,17 +542,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(_local_14.y > 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_17403;
|
||||
plane.color = RoomVisualization.LANDSCAPE_COLOR_TOP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_14.y == 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_16113;
|
||||
plane.color = RoomVisualization.LANDSCAPE_COLOR_SIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.color = RoomVisualization._Str_18370;
|
||||
plane.color = RoomVisualization.LANDSCAPE_COLOR_BOTTOM;
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,23 +570,23 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
}
|
||||
if(((_local_14.x == 0) && (_local_14.y == 0)))
|
||||
{
|
||||
plane.color = RoomVisualization._Str_14868;
|
||||
plane.color = RoomVisualization.WALL_COLOR_BORDER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_14.y > 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_14503;
|
||||
plane.color = RoomVisualization.WALL_COLOR_TOP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_14.y == 0)
|
||||
{
|
||||
plane.color = RoomVisualization._Str_15851;
|
||||
plane.color = RoomVisualization.WALL_COLOR_SIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.color = RoomVisualization._Str_13715;
|
||||
plane.color = RoomVisualization.WALL_COLOR_BOTTOM;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -615,7 +615,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
_local_19++;
|
||||
}
|
||||
|
||||
this._Str_2540.push(plane);
|
||||
this._planes.push(plane);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -634,13 +634,13 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
protected _Str_18024(): void
|
||||
{
|
||||
this.setSpriteCount(this._Str_2540.length);
|
||||
this.createSprites(this._planes.length);
|
||||
|
||||
let planeIndex = 0;
|
||||
|
||||
while(planeIndex < this._Str_2540.length)
|
||||
while(planeIndex < this._planes.length)
|
||||
{
|
||||
const plane = this._Str_2540[planeIndex];
|
||||
const plane = this._planes[planeIndex];
|
||||
const sprite = this.getSprite(planeIndex);
|
||||
|
||||
if(plane && sprite && plane.leftSide && plane.rightSide)
|
||||
@ -676,7 +676,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
}
|
||||
}
|
||||
|
||||
private _Str_23949(): number
|
||||
private getLandscapeWidth(): number
|
||||
{
|
||||
let length = 0;
|
||||
let index = 0;
|
||||
@ -698,7 +698,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
return length;
|
||||
}
|
||||
|
||||
private _Str_23063(): number
|
||||
private getLandscapeHeight(): number
|
||||
{
|
||||
let length = 0;
|
||||
let index = 0;
|
||||
@ -737,9 +737,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
let index = 0;
|
||||
|
||||
while(index < this._Str_2540.length)
|
||||
while(index < this._planes.length)
|
||||
{
|
||||
const plane = this._Str_2540[index];
|
||||
const plane = this._planes[index];
|
||||
|
||||
if(plane)
|
||||
{
|
||||
@ -773,27 +773,27 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
this._typeVisibility[RoomPlane.TYPE_WALL] = _arg_2;
|
||||
this._typeVisibility[RoomPlane.TYPE_LANDSCAPE] = _arg_3;
|
||||
|
||||
this._Str_4864 = [];
|
||||
this._Str_6648 = [];
|
||||
this._visiblePlanes = [];
|
||||
this._visiblePlaneSpriteNumbers = [];
|
||||
}
|
||||
|
||||
protected _Str_16913(k: IRoomGeometry, _arg_2: boolean, _arg_3: number): boolean
|
||||
{
|
||||
if(!k || !this.object) return;
|
||||
|
||||
this._Str_5928++;
|
||||
this._assetUpdateCounter++;
|
||||
|
||||
if(_arg_2)
|
||||
{
|
||||
this._Str_4864 = [];
|
||||
this._Str_6648 = [];
|
||||
this._visiblePlanes = [];
|
||||
this._visiblePlaneSpriteNumbers = [];
|
||||
}
|
||||
|
||||
const _local_8 = (this._Str_4864.length > 0);
|
||||
const _local_8 = (this._visiblePlanes.length > 0);
|
||||
|
||||
let _local_6 = this._Str_4864;
|
||||
let _local_6 = this._visiblePlanes;
|
||||
|
||||
if(!this._Str_4864.length) _local_6 = this._Str_2540;
|
||||
if(!this._visiblePlanes.length) _local_6 = this._planes;
|
||||
|
||||
let depth = 0;
|
||||
let updated = false;
|
||||
@ -803,7 +803,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
let _local_10 = index;
|
||||
|
||||
if(_local_8) _local_10 = this._Str_6648[index];
|
||||
if(_local_8) _local_10 = this._visiblePlaneSpriteNumbers[index];
|
||||
|
||||
const _local_11 = this.getSprite(_local_10);
|
||||
|
||||
@ -819,21 +819,21 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
if(_local_12.visible)
|
||||
{
|
||||
depth = ((_local_12.relativeDepth + this._Str_24891) + (_local_10 / 1000));
|
||||
depth = ((_local_12.relativeDepth + this.floorRelativeDepth) + (_local_10 / 1000));
|
||||
|
||||
if(_local_12.type !== RoomPlane.TYPE_FLOOR)
|
||||
{
|
||||
depth = ((_local_12.relativeDepth + this._Str_25403) + (_local_10 / 1000));
|
||||
depth = ((_local_12.relativeDepth + this.wallRelativeDepth) + (_local_10 / 1000));
|
||||
|
||||
if((_local_12.leftSide.length < 1) || (_local_12.rightSide.length < 1))
|
||||
{
|
||||
depth = (depth + (RoomVisualization._Str_8621 * 0.5));
|
||||
depth = (depth + (RoomVisualization.ROOM_DEPTH_OFFSET * 0.5));
|
||||
}
|
||||
}
|
||||
|
||||
const _local_14 = ((('plane ' + _local_10) + ' ') + k.scale);
|
||||
|
||||
this._Str_7421(_local_11, _local_12, _local_14, depth);
|
||||
this.updateSprite(_local_11, _local_12, _local_14, depth);
|
||||
}
|
||||
updated = true;
|
||||
}
|
||||
@ -846,8 +846,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
if(!_local_8)
|
||||
{
|
||||
this._Str_4864.push(_local_12);
|
||||
this._Str_6648.push(index);
|
||||
this._visiblePlanes.push(_local_12);
|
||||
this._visiblePlaneSpriteNumbers.push(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -879,9 +879,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
let _local_6 = false;
|
||||
let index = 0;
|
||||
|
||||
while(index < this._Str_2540.length)
|
||||
while(index < this._planes.length)
|
||||
{
|
||||
const plane = this._Str_2540[index];
|
||||
const plane = this._planes[index];
|
||||
|
||||
if(plane)
|
||||
{
|
||||
@ -903,9 +903,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
let i = 0;
|
||||
|
||||
while(i < this._Str_2540.length)
|
||||
while(i < this._planes.length)
|
||||
{
|
||||
const plane = this._Str_2540[i];
|
||||
const plane = this._planes[i];
|
||||
|
||||
if((plane.type === RoomPlane.TYPE_WALL) || (plane.type === RoomPlane.TYPE_LANDSCAPE))
|
||||
{
|
||||
@ -954,7 +954,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(_local_5.indexOf(planeIndex) < 0)
|
||||
{
|
||||
const plane = this._Str_2540[planeIndex];
|
||||
const plane = this._planes[planeIndex];
|
||||
|
||||
plane.canBeVisible = false;
|
||||
_local_6 = true;
|
||||
@ -965,12 +965,12 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(_local_6)
|
||||
{
|
||||
this._Str_4864 = [];
|
||||
this._Str_6648 = [];
|
||||
this._visiblePlanes = [];
|
||||
this._visiblePlaneSpriteNumbers = [];
|
||||
}
|
||||
}
|
||||
|
||||
private _Str_7421(k: IRoomObjectSprite, _arg_2: RoomPlane, _arg_3: string, _arg_4: number): void
|
||||
private updateSprite(k: IRoomObjectSprite, _arg_2: RoomPlane, _arg_3: string, _arg_4: number): void
|
||||
{
|
||||
const offset = _arg_2.offset;
|
||||
|
||||
@ -978,11 +978,11 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
k.offsetY = -(offset.y);
|
||||
k.relativeDepth = _arg_4;
|
||||
k.color = _arg_2.color;
|
||||
k.texture = this._Str_22446(_arg_2, _arg_3);
|
||||
k.name = ((_arg_3 + '_') + this._Str_5928);
|
||||
k.texture = this.getPlaneBitmap(_arg_2, _arg_3);
|
||||
k.name = ((_arg_3 + '_') + this._assetUpdateCounter);
|
||||
}
|
||||
|
||||
private _Str_22446(k: RoomPlane, _arg_2: string): Texture
|
||||
private getPlaneBitmap(k: RoomPlane, _arg_2: string): Texture
|
||||
{
|
||||
return k.bitmapData;
|
||||
}
|
||||
@ -998,18 +998,18 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
const planes: IRoomPlane[] = [];
|
||||
|
||||
for(const plane of this._Str_4864) planes.push(plane);
|
||||
for(const plane of this._visiblePlanes) planes.push(plane);
|
||||
|
||||
return planes;
|
||||
}
|
||||
|
||||
public get _Str_24891(): number
|
||||
public get floorRelativeDepth(): number
|
||||
{
|
||||
return RoomVisualization._Str_8621 + 0.1;
|
||||
return RoomVisualization.ROOM_DEPTH_OFFSET + 0.1;
|
||||
}
|
||||
|
||||
public get _Str_25403(): number
|
||||
public get wallRelativeDepth(): number
|
||||
{
|
||||
return RoomVisualization._Str_8621 + 0.5;
|
||||
return RoomVisualization.ROOM_DEPTH_OFFSET + 0.5;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
export class RoomWidgetFurniInfoUsagePolicyEnum
|
||||
{
|
||||
public static _Str_21805: number = 0;
|
||||
public static _Str_18194: number = 1;
|
||||
public static _Str_18353: number = 2;
|
||||
}
|
||||
public static NOBODY: number = 0;
|
||||
public static CONTROLLER: number = 1;
|
||||
public static EVERYBODY: number = 2;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza
|
||||
return sprite;
|
||||
}
|
||||
|
||||
protected setSpriteCount(count: number): void
|
||||
protected createSprites(count: number): void
|
||||
{
|
||||
while(this._sprites.length > count)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user