From c30d5f219447f1c303ed7e61401dde30bf6c0c81 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Tue, 1 Jun 2021 02:39:02 -0500 Subject: [PATCH] cleaned PlaneTexture --- src/nitro/avatar/alias/AssetAliasCollection.ts | 10 +++++----- src/nitro/avatar/cache/AvatarImageCache.ts | 2 +- .../object/visualization/room/RoomPlane.ts | 4 ++-- .../visualization/room/mask/PlaneMask.ts | 4 ++-- .../visualization/room/mask/PlaneMaskBitmap.ts | 6 +++--- .../room/mask/PlaneMaskManager.ts | 10 +++++----- .../room/mask/PlaneMaskVisualization.ts | 10 +++++----- .../room/rasterizer/basic/PlaneMaterial.ts | 6 +++--- .../room/rasterizer/basic/PlaneMaterialCell.ts | 10 +++++----- .../basic/PlaneMaterialCellMatrix.ts | 6 +++--- .../room/rasterizer/basic/PlaneRasterizer.ts | 18 +++++++++--------- .../room/rasterizer/basic/PlaneTexture.ts | 18 +++++++++--------- .../rasterizer/basic/PlaneTextureBitmap.ts | 8 ++++---- 13 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/nitro/avatar/alias/AssetAliasCollection.ts b/src/nitro/avatar/alias/AssetAliasCollection.ts index 85b2f009..7f73d496 100644 --- a/src/nitro/avatar/alias/AssetAliasCollection.ts +++ b/src/nitro/avatar/alias/AssetAliasCollection.ts @@ -50,7 +50,7 @@ export class AssetAliasCollection } } - public _Str_1044(k: string): boolean + public hasAlias(k: string): boolean { const alias = this._aliases.get(k); @@ -59,12 +59,12 @@ export class AssetAliasCollection return false; } - public _Str_2125(k: string): string + public getAssetName(k: string): string { let _local_2 = k; let _local_3 = 5; - while(this._Str_1044(_local_2) && (_local_3 >= 0)) + while(this.hasAlias(_local_2) && (_local_3 >= 0)) { const _local_4 = this._aliases.get(_local_2); @@ -79,7 +79,7 @@ export class AssetAliasCollection { if(!this._assets) return null; - name = this._Str_2125(name); + name = this.getAssetName(name); const asset = this._assets.getAsset(name); @@ -87,4 +87,4 @@ export class AssetAliasCollection return asset; } -} \ No newline at end of file +} diff --git a/src/nitro/avatar/cache/AvatarImageCache.ts b/src/nitro/avatar/cache/AvatarImageCache.ts index ed70fc9c..c8086b08 100644 --- a/src/nitro/avatar/cache/AvatarImageCache.ts +++ b/src/nitro/avatar/cache/AvatarImageCache.ts @@ -407,7 +407,7 @@ export class AvatarImageCache { const spriteData = new RoomObjectSpriteData(); - spriteData.name = this._assets._Str_2125(assetName); + spriteData.name = this._assets.getAssetName(assetName); spriteData.x = (-(offset.x) - 33); spriteData.y = -(offset.y); spriteData.z = (this._serverRenderData.length * -0.0001); diff --git a/src/nitro/room/object/visualization/room/RoomPlane.ts b/src/nitro/room/object/visualization/room/RoomPlane.ts index 2e2c3f1e..50e703ee 100644 --- a/src/nitro/room/object/visualization/room/RoomPlane.ts +++ b/src/nitro/room/object/visualization/room/RoomPlane.ts @@ -457,7 +457,7 @@ export class RoomPlane implements IRoomPlane if(planeMask) { - const assetName = planeMask._Str_2125(k.scale); + const assetName = planeMask.getAssetName(k.scale); if(assetName) { @@ -520,7 +520,7 @@ export class RoomPlane implements IRoomPlane for(const cell of column._Str_22299()) { - const name = cell._Str_2125(normal); + const name = cell.getAssetName(normal); if(name) assetNames.push(name); } diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts index 877850ca..048050bc 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts @@ -102,7 +102,7 @@ export class PlaneMask return visualization.getAsset(_arg_2); } - public _Str_2125(k: number): string + public getAssetName(k: number): string { if(!this._assetNames) return null; @@ -115,4 +115,4 @@ export class PlaneMask this._assetNames.set(k, _arg_2); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts index bb7d496b..2432408b 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts @@ -2,8 +2,8 @@ export class PlaneMaskBitmap { - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; private _asset: IGraphicAsset; private _normalMinX: number; @@ -49,4 +49,4 @@ export class PlaneMaskBitmap { this._asset = null; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts index 8b76b8e5..b16b50d9 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts @@ -123,10 +123,10 @@ export class PlaneMaskManager if(!asset) continue; - let normalMinX = PlaneMaskVisualization._Str_3268; - let normalMaxX = PlaneMaskVisualization._Str_3271; - let normalMinY = PlaneMaskVisualization._Str_3268; - let normalMaxY = PlaneMaskVisualization._Str_3271; + let normalMinX = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxX = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; + let normalMinY = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxY = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX; if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX; @@ -135,7 +135,7 @@ export class PlaneMaskManager if(!asset.flipH) graphicName = assetName; - _arg_2._Str_16790(asset, normalMinX, normalMaxX, normalMinY, normalMaxY); + _arg_2.addBitmap(asset, normalMinX, normalMaxX, normalMinY, normalMaxY); } return graphicName; diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskVisualization.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskVisualization.ts index 84068357..5e770c89 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskVisualization.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskVisualization.ts @@ -1,11 +1,11 @@ -import { IGraphicAsset } from '../../../../../../room/object/visualization/utils/IGraphicAsset'; +import { IGraphicAsset } from '../../../../../../room/object/visualization/utils/IGraphicAsset'; import { IVector3D } from '../../../../../../room/utils/IVector3D'; import { PlaneMaskBitmap } from './PlaneMaskBitmap'; export class PlaneMaskVisualization { - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; private _bitmaps: PlaneMaskBitmap[]; @@ -26,7 +26,7 @@ export class PlaneMaskVisualization this._bitmaps = null; } - public _Str_16790(k: IGraphicAsset, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1): void + public addBitmap(k: IGraphicAsset, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1): void { this._bitmaps.push(new PlaneMaskBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5)); } @@ -47,4 +47,4 @@ export class PlaneMaskVisualization return null; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts index 5a62c7ce..2991902a 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts @@ -4,8 +4,8 @@ import { PlaneMaterialCellMatrix } from './PlaneMaterialCellMatrix'; export class PlaneMaterial { - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; private _planeMaterialItems: PlaneMaterialCellMatrix[]; private _isCached: boolean; @@ -90,4 +90,4 @@ export class PlaneMaterial return cellMatrix.render(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_8); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts index 02538e3b..9d0d65bf 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts @@ -93,7 +93,7 @@ export class PlaneMaterialCell { if(this._texture) { - const texture = this._texture._Str_4913(k); + const texture = this._texture.getBitmap(k); if(texture) return texture.height; } @@ -105,7 +105,7 @@ export class PlaneMaterialCell { if(!this._texture) return null; - const texture = this._texture._Str_4913(normal); + const texture = this._texture.getBitmap(normal); if(!texture) return null; @@ -235,8 +235,8 @@ export class PlaneMaterialCell return null; } - public _Str_2125(k:IVector3D): string + public getAssetName(k:IVector3D): string { - return (this._texture == null) ? null : this._texture._Str_2125(k); + return (this._texture == null) ? null : this._texture.getAssetName(k); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts index 7843c00f..107c98ca 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts @@ -16,8 +16,8 @@ export class PlaneMaterialCellMatrix public static _Str_6063: number = 5; public static _Str_9127: number = 6; public static _Str_18632: number = PlaneMaterialCellMatrix._Str_7916;//1 - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; public static ALIGN_TOP: number = 1; public static _Str_3606: number = 2; public static _Str_6914: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1 @@ -720,4 +720,4 @@ export class PlaneMaterialCellMatrix return this._columns; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts index 22542c64..973177d2 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts @@ -234,10 +234,10 @@ export class PlaneRasterizer implements IPlaneRasterizer const assetName = bitmap.assetName; - let normalMinX = PlaneTexture._Str_3268; - let normalMaxX = PlaneTexture._Str_3271; - let normalMinY = PlaneTexture._Str_3268; - let normalMaxY = PlaneTexture._Str_3271; + let normalMinX = PlaneTexture.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxX = PlaneTexture.MAX_NORMAL_COORDINATE_VALUE; + let normalMinY = PlaneTexture.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxY = PlaneTexture.MAX_NORMAL_COORDINATE_VALUE; if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX; if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX; @@ -259,7 +259,7 @@ export class PlaneRasterizer implements IPlaneRasterizer newTexture = Rasterizer.getFlipHBitmapData(texture); } - plane._Str_16790(newTexture, normalMinX, normalMaxX, normalMinY, normalMaxY, assetName); + plane.addBitmap(newTexture, normalMinX, normalMaxX, normalMinY, normalMaxY, assetName); } } } @@ -290,10 +290,10 @@ export class PlaneRasterizer implements IPlaneRasterizer let repeatMode = matrix.repeatMode; let align = matrix.align; - const normalMinX = PlaneMaterialCellMatrix._Str_3268; - const normalMaxX = PlaneMaterialCellMatrix._Str_3271; - const normalMinY = PlaneMaterialCellMatrix._Str_3268; - const normalMaxY = PlaneMaterialCellMatrix._Str_3271; + const normalMinX = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; + const normalMaxX = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; + const normalMinY = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; + const normalMaxY = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; switch(repeatMode) { diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTexture.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTexture.ts index 0e7a38a6..e6655d58 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTexture.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTexture.ts @@ -4,8 +4,8 @@ import { PlaneTextureBitmap } from './PlaneTextureBitmap'; export class PlaneTexture { - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; private _bitmaps: PlaneTextureBitmap[]; @@ -29,21 +29,21 @@ export class PlaneTexture } } - public _Str_16790(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void + public addBitmap(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void { this._bitmaps.push(new PlaneTextureBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6)); } - public _Str_4913(k: IVector3D): Texture + public getBitmap(k: IVector3D): Texture { - const _local_2 = this._Str_21702(k); + const _local_2 = this.getPlaneTextureBitmap(k); if(!_local_2) return null; return _local_2.bitmap; } - public _Str_21702(k: IVector3D): PlaneTextureBitmap + public getPlaneTextureBitmap(k: IVector3D): PlaneTextureBitmap { if(!k) return null; @@ -57,10 +57,10 @@ export class PlaneTexture return null; } - public _Str_2125(k: IVector3D): string + public getAssetName(k: IVector3D): string { - const _local_2 = this._Str_21702(k); + const _local_2 = this.getPlaneTextureBitmap(k); return (!_local_2) ? null : _local_2.assetName; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts index ca0be442..9adfdc53 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts @@ -1,9 +1,9 @@ -import { Texture } from 'pixi.js'; +import { Texture } from 'pixi.js'; export class PlaneTextureBitmap { - public static _Str_3268: number = -1; - public static _Str_3271: number = 1; + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; private _bitmap: Texture; private _normalMinX: number; @@ -56,4 +56,4 @@ export class PlaneTextureBitmap { this._bitmap = null; } -} \ No newline at end of file +}