cleaned RoomPlane

This commit is contained in:
Dank074 2021-05-15 04:50:18 -05:00
parent b9cb3203da
commit cb983ed710
8 changed files with 313 additions and 313 deletions

View File

@ -104,12 +104,12 @@ export class RoomPlaneData
return this._loc; return this._loc;
} }
public get _Str_5424(): IVector3D public get leftSide(): IVector3D
{ {
return this._leftSide; return this._leftSide;
} }
public get _Str_4968(): IVector3D public get rightSide(): IVector3D
{ {
return this._rightSide; return this._rightSide;
} }
@ -199,4 +199,4 @@ export class RoomPlaneData
} }
return -1; return -1;
} }
} }

View File

@ -1385,7 +1385,7 @@ export class RoomPlaneParser
if(!planeData) return null; if(!planeData) return null;
return planeData._Str_5424; return planeData.leftSide;
} }
public getPlaneRightSide(k: number): IVector3D public getPlaneRightSide(k: number): IVector3D
@ -1396,7 +1396,7 @@ export class RoomPlaneParser
if(!planeData) return null; if(!planeData) return null;
return planeData._Str_4968; return planeData.rightSide;
} }
public getPlaneNormalDirection(k: number): IVector3D public getPlaneNormalDirection(k: number): IVector3D
@ -1697,4 +1697,4 @@ export class RoomPlaneParser
{ {
this._restrictedScale = scale; this._restrictedScale = scale;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -507,7 +507,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
if((leftSide.length < 1) || (rightSide.length < 1)) if((leftSide.length < 1) || (rightSide.length < 1))
{ {
plane._Str_18448 = false; plane.hasTexture = false;
} }
if((_local_14.x === 0) && (_local_14.y === 0)) if((_local_14.x === 0) && (_local_14.y === 0))
@ -566,7 +566,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_WALL, true, secondaryNormals, _local_6); plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_WALL, true, secondaryNormals, _local_6);
if(((leftSide.length < 1) || (rightSide.length < 1))) if(((leftSide.length < 1) || (rightSide.length < 1)))
{ {
plane._Str_18448 = false; plane.hasTexture = false;
} }
if(((_local_14.x == 0) && (_local_14.y == 0))) if(((_local_14.x == 0) && (_local_14.y == 0)))
{ {
@ -599,7 +599,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
if(plane) if(plane)
{ {
plane._Str_16279 = this._data.maskManager; plane.maskManager = this._data.maskManager;
let _local_19 = 0; let _local_19 = 0;
@ -610,7 +610,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
const _local_22 = this._roomPlaneParser.getPlaneMaskLeftSideLength(index, _local_19); const _local_22 = this._roomPlaneParser.getPlaneMaskLeftSideLength(index, _local_19);
const _local_23 = this._roomPlaneParser.getPlaneMaskRightSideLength(index, _local_19); const _local_23 = this._roomPlaneParser.getPlaneMaskRightSideLength(index, _local_19);
plane._Str_24758(_local_20, _local_21, _local_22, _local_23); plane.addRectangleMask(_local_20, _local_21, _local_22, _local_23);
_local_19++; _local_19++;
} }
@ -643,9 +643,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
const plane = this._Str_2540[planeIndex]; const plane = this._Str_2540[planeIndex];
const sprite = this.getSprite(planeIndex); const sprite = this.getSprite(planeIndex);
if(plane && sprite && plane._Str_5424 && plane._Str_4968) if(plane && sprite && plane.leftSide && plane.rightSide)
{ {
if((plane.type === RoomPlane.TYPE_WALL) && ((plane._Str_5424.length < 1) || (plane._Str_4968.length < 1))) if((plane.type === RoomPlane.TYPE_WALL) && ((plane.leftSide.length < 1) || (plane.rightSide.length < 1)))
{ {
sprite.alphaTolerance = AlphaTolerance._Str_9268; sprite.alphaTolerance = AlphaTolerance._Str_9268;
} }
@ -825,7 +825,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
{ {
depth = ((_local_12.relativeDepth + this._Str_25403) + (_local_10 / 1000)); depth = ((_local_12.relativeDepth + this._Str_25403) + (_local_10 / 1000));
if((_local_12._Str_5424.length < 1) || (_local_12._Str_4968.length < 1)) if((_local_12.leftSide.length < 1) || (_local_12.rightSide.length < 1))
{ {
depth = (depth + (RoomVisualization._Str_8621 * 0.5)); depth = (depth + (RoomVisualization._Str_8621 * 0.5));
} }
@ -885,7 +885,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
if(plane) if(plane)
{ {
plane._Str_25213(); plane.resetBitmapMasks();
if(plane.type === RoomPlane.TYPE_LANDSCAPE) _local_4.push(index); if(plane.type === RoomPlane.TYPE_LANDSCAPE) _local_4.push(index);
} }
@ -916,22 +916,22 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
if(_local_15 < 0.01) if(_local_15 < 0.01)
{ {
if(plane._Str_5424 && plane._Str_4968) if(plane.leftSide && plane.rightSide)
{ {
const _local_16 = Vector3d.scalarProjection(_local_14, plane._Str_5424); const _local_16 = Vector3d.scalarProjection(_local_14, plane.leftSide);
const _local_17 = Vector3d.scalarProjection(_local_14, plane._Str_4968); const _local_17 = Vector3d.scalarProjection(_local_14, plane.rightSide);
if((plane.type === RoomPlane.TYPE_WALL) || ((plane.type === RoomPlane.TYPE_LANDSCAPE) && (maskCategory === RoomPlaneBitmapMaskData.HOLE))) if((plane.type === RoomPlane.TYPE_WALL) || ((plane.type === RoomPlane.TYPE_LANDSCAPE) && (maskCategory === RoomPlaneBitmapMaskData.HOLE)))
{ {
plane._Str_24569(maskType, _local_16, _local_17); plane.addBitmapMask(maskType, _local_16, _local_17);
} }
else else
{ {
if(plane.type === RoomPlane.TYPE_LANDSCAPE) if(plane.type === RoomPlane.TYPE_LANDSCAPE)
{ {
if(!plane._Str_14801) _local_6 = true; if(!plane.canBeVisible) _local_6 = true;
plane._Str_14801 = true; plane.canBeVisible = true;
_local_5.push(i); _local_5.push(i);
} }
@ -956,7 +956,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
{ {
const plane = this._Str_2540[planeIndex]; const plane = this._Str_2540[planeIndex];
plane._Str_14801 = false; plane.canBeVisible = false;
_local_6 = true; _local_6 = true;
} }
@ -1012,4 +1012,4 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
{ {
return RoomVisualization._Str_8621 + 0.5; return RoomVisualization._Str_8621 + 0.5;
} }
} }

View File

@ -141,7 +141,7 @@ export class PlaneMaskManager
return graphicName; return graphicName;
} }
public _Str_17859(k: Graphics, _arg_2: string, _arg_3: number, _arg_4: IVector3D, _arg_5: number, _arg_6: number): boolean public updateMask(k: Graphics, _arg_2: string, _arg_3: number, _arg_4: IVector3D, _arg_5: number, _arg_6: number): boolean
{ {
const mask = this._masks.get(_arg_2); const mask = this._masks.get(_arg_2);
@ -193,4 +193,4 @@ export class PlaneMaskManager
return this._masks.get(k) || null; return this._masks.get(k) || null;
} }
} }

View File

@ -150,7 +150,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
this._textures.clear(); this._textures.clear();
} }
protected _Str_10114(k: string): PlaneTexture protected getTexture(k: string): PlaneTexture
{ {
return this._textures.get(k); return this._textures.get(k);
} }
@ -446,7 +446,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
} }
} }
const texture = this._Str_10114(textureId); const texture = this.getTexture(textureId);
const newCell = new PlaneMaterialCell(texture, graphics, offsetPoints, limit); const newCell = new PlaneMaterialCell(texture, graphics, offsetPoints, limit);
cells.push(newCell); cells.push(newCell);

View File

@ -403,11 +403,11 @@ export class SpriteDataCollector
const _local_12 = _local_11.plane; const _local_12 = _local_11.plane;
const _local_13: Point[] = []; const _local_13: Point[] = [];
const _local_14 = Vector3d.sum(_local_12.location, _local_12._Str_5424); const _local_14 = Vector3d.sum(_local_12.location, _local_12.leftSide);
const _local_15 = _local_8.getScreenPoint(_local_12.location); const _local_15 = _local_8.getScreenPoint(_local_12.location);
const _local_16 = _local_8.getScreenPoint(_local_14); const _local_16 = _local_8.getScreenPoint(_local_14);
const _local_17 = _local_8.getScreenPoint(Vector3d.sum(_local_12.location, _local_12._Str_4968)); const _local_17 = _local_8.getScreenPoint(Vector3d.sum(_local_12.location, _local_12.rightSide));
const _local_18 = _local_8.getScreenPoint(Vector3d.sum(_local_14, _local_12._Str_4968)); const _local_18 = _local_8.getScreenPoint(Vector3d.sum(_local_14, _local_12.rightSide));
_local_13.push(_local_15, _local_16, _local_17, _local_18); _local_13.push(_local_15, _local_16, _local_17, _local_18);
@ -442,7 +442,7 @@ export class SpriteDataCollector
{ {
const _local_22 = SpriteDataCollector._Str_14110(_local_15, _local_16, _local_17, _local_18); const _local_22 = SpriteDataCollector._Str_14110(_local_15, _local_16, _local_17, _local_18);
for(const _local_23 of _local_12._Str_22136(_local_8)) for(const _local_23 of _local_12.getDrawingDatas(_local_8))
{ {
_local_23.cornerPoints = _local_22; _local_23.cornerPoints = _local_22;
_local_23.z = _local_11.z; _local_23.z = _local_11.z;

View File

@ -6,8 +6,8 @@ export interface IRoomPlane
{ {
uniqueId: number; uniqueId: number;
location: IVector3D; location: IVector3D;
_Str_5424: IVector3D; leftSide: IVector3D;
_Str_4968: IVector3D; rightSide: IVector3D;
color: number; color: number;
_Str_22136(_arg_1: IRoomGeometry): PlaneDrawingData[]; getDrawingDatas(_arg_1: IRoomGeometry): PlaneDrawingData[];
} }