This commit is contained in:
dank074 2021-10-14 00:20:03 -05:00
commit a13c1591a7
6 changed files with 36 additions and 37 deletions

View File

@ -3,7 +3,7 @@ import { RelationshipStatusEnum } from '../../../../../enums/RelationshipStatusE
export class RelationshipStatusInfo export class RelationshipStatusInfo
{ {
private _relationshipStatusType: RelationshipStatusEnum; private _relationshipStatusType: number;
private _friendCount: number; private _friendCount: number;
private _randomFriendId: number; private _randomFriendId: number;
private _randomFriendName: string; private _randomFriendName: string;
@ -19,11 +19,11 @@ export class RelationshipStatusInfo
public flush(): boolean public flush(): boolean
{ {
this._relationshipStatusType = RelationshipStatusEnum.NONE; this._relationshipStatusType = RelationshipStatusEnum.NONE;
this._friendCount = 0; this._friendCount = 0;
this._randomFriendId = 0; this._randomFriendId = 0;
this._randomFriendFigure = null; this._randomFriendFigure = null;
this._randomFriendName = null; this._randomFriendName = null;
return true; return true;
} }
@ -32,16 +32,16 @@ export class RelationshipStatusInfo
{ {
if(!wrapper) return false; if(!wrapper) return false;
this._relationshipStatusType = wrapper.readInt(); this._relationshipStatusType = wrapper.readInt();
this._friendCount = wrapper.readInt(); this._friendCount = wrapper.readInt();
this._randomFriendId = wrapper.readInt(); this._randomFriendId = wrapper.readInt();
this._randomFriendName = wrapper.readString(); this._randomFriendName = wrapper.readString();
this._randomFriendFigure = wrapper.readString(); this._randomFriendFigure = wrapper.readString();
return true; return true;
} }
public get relationshipStatusType(): RelationshipStatusEnum public get relationshipStatusType(): number
{ {
return this._relationshipStatusType; return this._relationshipStatusType;
} }

View File

@ -1,12 +1,11 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
import { AdvancedMap } from '../../../../../../core/utils/AdvancedMap'; import { AdvancedMap } from '../../../../../../core/utils/AdvancedMap';
import { RelationshipStatusEnum } from '../../../../../enums/RelationshipStatusEnum';
import { RelationshipStatusInfo } from './RelationshipStatusInfo'; import { RelationshipStatusInfo } from './RelationshipStatusInfo';
export class RelationshipStatusInfoMessageParser implements IMessageParser export class RelationshipStatusInfoMessageParser implements IMessageParser
{ {
private _userId: number; private _userId: number;
private _relationshipStatusMap: AdvancedMap<RelationshipStatusEnum, RelationshipStatusInfo>; private _relationshipStatusMap: AdvancedMap<number, RelationshipStatusInfo>;
public flush(): boolean public flush(): boolean
{ {
@ -20,7 +19,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser
{ {
if(!wrapper) return false; if(!wrapper) return false;
this._userId = wrapper.readInt(); this._userId = wrapper.readInt();
this._relationshipStatusMap = new AdvancedMap(); this._relationshipStatusMap = new AdvancedMap();
const relationshipsCount = wrapper.readInt(); const relationshipsCount = wrapper.readInt();
@ -40,7 +39,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser
return this._userId; return this._userId;
} }
public get relationshipStatusMap(): AdvancedMap<RelationshipStatusEnum, RelationshipStatusInfo> public get relationshipStatusMap(): AdvancedMap<number, RelationshipStatusInfo>
{ {
return this._relationshipStatusMap; return this._relationshipStatusMap;
} }

View File

@ -122,7 +122,7 @@ export class FurnitureLogic extends MovingObjectLogic
{ {
for(const direction of directions) this._directions.push(direction); for(const direction of directions) this._directions.push(direction);
this._directions.sort(); this._directions.sort((a, b) => (a - b));
} }
} }

View File

@ -68,34 +68,34 @@ export class RoomPlane implements IRoomPlane
private _height: number = 0; private _height: number = 0;
private _canBeVisible: boolean; private _canBeVisible: boolean;
constructor(k: IVector3D, _arg_2: IVector3D, _arg_3: IVector3D, _arg_4: IVector3D, _arg_5: number, _arg_6: boolean, _arg_7: IVector3D[], _arg_8: number, _arg_9: number=0, _arg_10: number=0, _arg_11: number=0, _arg_12: number=0) constructor(origin: IVector3D, location: IVector3D, leftSide: IVector3D, rightSide: IVector3D, type: number, usesMask: boolean, secondaryNormals: IVector3D[], randomSeed: number, textureOffsetX: number=0, textureOffsetY: number=0, textureMaxX: number=0, textureMaxY: number=0)
{ {
this._secondaryNormals = []; this._secondaryNormals = [];
this._bitmapMasks = []; this._bitmapMasks = [];
this._rectangleMasks = []; this._rectangleMasks = [];
this._bitmapMasksOld = []; this._bitmapMasksOld = [];
this._rectangleMasksOld = []; this._rectangleMasksOld = [];
this._randomSeed = _arg_8; this._randomSeed = randomSeed;
this._bitmapData = null; this._bitmapData = null;
this._maskBitmapData = null; this._maskBitmapData = null;
this._maskChanged = false; this._maskChanged = false;
this._activeTexture = null; this._activeTexture = null;
this._origin = new Vector3d(); this._origin = new Vector3d();
this._origin.assign(k); this._origin.assign(origin);
this._location = new Vector3d(); this._location = new Vector3d();
this._location.assign(_arg_2); this._location.assign(location);
this._leftSide = new Vector3d(); this._leftSide = new Vector3d();
this._leftSide.assign(_arg_3); this._leftSide.assign(leftSide);
this._rightSide = new Vector3d(); this._rightSide = new Vector3d();
this._rightSide.assign(_arg_4); this._rightSide.assign(rightSide);
this._normal = Vector3d.crossProduct(this._leftSide, this._rightSide); this._normal = Vector3d.crossProduct(this._leftSide, this._rightSide);
if(this._normal.length > 0) if(this._normal.length > 0)
{ {
this._normal.multiply((1 / this._normal.length)); this._normal.multiply((1 / this._normal.length));
} }
if(_arg_7 != null) if(secondaryNormals != null)
{ {
for(const entry of _arg_7) for(const entry of secondaryNormals)
{ {
if(!entry) continue; if(!entry) continue;
@ -113,7 +113,7 @@ export class RoomPlane implements IRoomPlane
this._geometryUpdateId = -1; this._geometryUpdateId = -1;
this._offset = new Point(); this._offset = new Point();
this._relativeDepth = 0; this._relativeDepth = 0;
this._type = _arg_5; this._type = type;
this._color = 0; this._color = 0;
this._rasterizer = null; this._rasterizer = null;
this._canBeVisible = true; this._canBeVisible = true;
@ -124,11 +124,11 @@ export class RoomPlane implements IRoomPlane
this._cornerD = new Vector3d(); this._cornerD = new Vector3d();
this._width = 0; this._width = 0;
this._height = 0; this._height = 0;
this._textureOffsetX = _arg_9; this._textureOffsetX = textureOffsetX;
this._textureOffsetY = _arg_10; this._textureOffsetY = textureOffsetY;
this._textureMaxX = _arg_11; this._textureMaxX = textureMaxX;
this._textureMaxY = _arg_12; this._textureMaxY = textureMaxY;
this._useMask = _arg_6; this._useMask = usesMask;
this._uniqueId = ++RoomPlane._uniqueIdCounter; this._uniqueId = ++RoomPlane._uniqueIdCounter;
} }

View File

@ -461,7 +461,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
const _local_4 = this.getLandscapeHeight(); const _local_4 = this.getLandscapeHeight();
let _local_5 = 0; let _local_5 = 0;
let _local_6 = this.object.model.getValue<number>(RoomObjectVariable.ROOM_RANDOM_SEED); let randomSeed = this.object.model.getValue<number>(RoomObjectVariable.ROOM_RANDOM_SEED);
let index = 0; let index = 0;
while(index < this._roomPlaneParser.planeCount) while(index < this._roomPlaneParser.planeCount)
@ -478,17 +478,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
{ {
const _local_14 = Vector3d.crossProduct(leftSide, rightSide); const _local_14 = Vector3d.crossProduct(leftSide, rightSide);
_local_6 = ((_local_6 * 7613) + 517); randomSeed = ((randomSeed * 7613) + 517);
plane = null; plane = null;
if(planeType === RoomPlaneData.PLANE_FLOOR) if(planeType === RoomPlaneData.PLANE_FLOOR)
{ {
const _local_15 = ((location.x + leftSide.x) + 0.5); const _local_15 = ((location.x + leftSide.x) + 0.5);
const _local_16 = ((location.y + rightSide.y) + 0.5); const _local_16 = ((location.y + rightSide.y) + 0.5);
const _local_17 = (Math.trunc(_local_15) - _local_15); const textureOffsetX = (Math.trunc(_local_15) - _local_15);
const _local_18 = (Math.trunc(_local_16) - _local_16); const textureOffsetY = (Math.trunc(_local_16) - _local_16);
plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_FLOOR, true, secondaryNormals, _local_6, -(_local_17), -(_local_18)); plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_FLOOR, true, secondaryNormals, randomSeed, -(textureOffsetX), -(textureOffsetY));
if(_local_14.z !== 0) if(_local_14.z !== 0)
{ {
@ -504,7 +504,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
else if(planeType === RoomPlaneData.PLANE_WALL) else if(planeType === RoomPlaneData.PLANE_WALL)
{ {
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, randomSeed);
if((leftSide.length < 1) || (rightSide.length < 1)) if((leftSide.length < 1) || (rightSide.length < 1))
{ {
@ -539,7 +539,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
else if(planeType === RoomPlaneData.PLANE_LANDSCAPE) else if(planeType === RoomPlaneData.PLANE_LANDSCAPE)
{ {
plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_LANDSCAPE, true, secondaryNormals, _local_6, _local_5, 0, _local_3, _local_4); plane = new RoomPlane(this.object.getLocation(), location, leftSide, rightSide, RoomPlane.TYPE_LANDSCAPE, true, secondaryNormals, randomSeed, _local_5, 0, _local_3, _local_4);
if(_local_14.y > 0) if(_local_14.y > 0)
{ {
@ -564,7 +564,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
else if(planeType == RoomPlaneData.PLANE_BILLBOARD) else if(planeType == RoomPlaneData.PLANE_BILLBOARD)
{ {
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, randomSeed);
if(((leftSide.length < 1) || (rightSide.length < 1))) if(((leftSide.length < 1) || (rightSide.length < 1)))
{ {
plane.hasTexture = false; plane.hasTexture = false;