mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
Rename things
This commit is contained in:
parent
f7dc87f721
commit
a375dc118d
@ -3,7 +3,7 @@ import { RelationshipStatusEnum } from '../../../../../enums/RelationshipStatusE
|
||||
|
||||
export class RelationshipStatusInfo
|
||||
{
|
||||
private _relationshipStatusType: RelationshipStatusEnum;
|
||||
private _relationshipStatusType: number;
|
||||
private _friendCount: number;
|
||||
private _randomFriendId: number;
|
||||
private _randomFriendName: string;
|
||||
@ -19,11 +19,11 @@ export class RelationshipStatusInfo
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._relationshipStatusType = RelationshipStatusEnum.NONE;
|
||||
this._friendCount = 0;
|
||||
this._relationshipStatusType = RelationshipStatusEnum.NONE;
|
||||
this._friendCount = 0;
|
||||
this._randomFriendId = 0;
|
||||
this._randomFriendFigure = null;
|
||||
this._randomFriendName = null;
|
||||
this._randomFriendFigure = null;
|
||||
this._randomFriendName = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -32,16 +32,16 @@ export class RelationshipStatusInfo
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._relationshipStatusType = wrapper.readInt();
|
||||
this._relationshipStatusType = wrapper.readInt();
|
||||
this._friendCount = wrapper.readInt();
|
||||
this._randomFriendId = wrapper.readInt();
|
||||
this._randomFriendId = wrapper.readInt();
|
||||
this._randomFriendName = wrapper.readString();
|
||||
this._randomFriendFigure = wrapper.readString();
|
||||
this._randomFriendFigure = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get relationshipStatusType(): RelationshipStatusEnum
|
||||
public get relationshipStatusType(): number
|
||||
{
|
||||
return this._relationshipStatusType;
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
||||
import { AdvancedMap } from '../../../../../../core/utils/AdvancedMap';
|
||||
import { RelationshipStatusEnum } from '../../../../../enums/RelationshipStatusEnum';
|
||||
import { RelationshipStatusInfo } from './RelationshipStatusInfo';
|
||||
|
||||
export class RelationshipStatusInfoMessageParser implements IMessageParser
|
||||
{
|
||||
private _userId: number;
|
||||
private _relationshipStatusMap: AdvancedMap<RelationshipStatusEnum, RelationshipStatusInfo>;
|
||||
private _relationshipStatusMap: AdvancedMap<number, RelationshipStatusInfo>;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@ -20,7 +19,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._userId = wrapper.readInt();
|
||||
this._userId = wrapper.readInt();
|
||||
this._relationshipStatusMap = new AdvancedMap();
|
||||
|
||||
const relationshipsCount = wrapper.readInt();
|
||||
@ -40,7 +39,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get relationshipStatusMap(): AdvancedMap<RelationshipStatusEnum, RelationshipStatusInfo>
|
||||
public get relationshipStatusMap(): AdvancedMap<number, RelationshipStatusInfo>
|
||||
{
|
||||
return this._relationshipStatusMap;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ export class FurnitureLogic extends MovingObjectLogic
|
||||
{
|
||||
for(const direction of directions) this._directions.push(direction);
|
||||
|
||||
this._directions.sort();
|
||||
this._directions.sort((a, b) => (a - b));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,34 +68,34 @@ export class RoomPlane implements IRoomPlane
|
||||
private _height: number = 0;
|
||||
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._bitmapMasks = [];
|
||||
this._rectangleMasks = [];
|
||||
this._bitmapMasksOld = [];
|
||||
this._rectangleMasksOld = [];
|
||||
this._randomSeed = _arg_8;
|
||||
this._randomSeed = randomSeed;
|
||||
this._bitmapData = null;
|
||||
this._maskBitmapData = null;
|
||||
this._maskChanged = false;
|
||||
this._activeTexture = null;
|
||||
this._origin = new Vector3d();
|
||||
this._origin.assign(k);
|
||||
this._origin.assign(origin);
|
||||
this._location = new Vector3d();
|
||||
this._location.assign(_arg_2);
|
||||
this._location.assign(location);
|
||||
this._leftSide = new Vector3d();
|
||||
this._leftSide.assign(_arg_3);
|
||||
this._leftSide.assign(leftSide);
|
||||
this._rightSide = new Vector3d();
|
||||
this._rightSide.assign(_arg_4);
|
||||
this._rightSide.assign(rightSide);
|
||||
this._normal = Vector3d.crossProduct(this._leftSide, this._rightSide);
|
||||
if(this._normal.length > 0)
|
||||
{
|
||||
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;
|
||||
|
||||
@ -113,7 +113,7 @@ export class RoomPlane implements IRoomPlane
|
||||
this._geometryUpdateId = -1;
|
||||
this._offset = new Point();
|
||||
this._relativeDepth = 0;
|
||||
this._type = _arg_5;
|
||||
this._type = type;
|
||||
this._color = 0;
|
||||
this._rasterizer = null;
|
||||
this._canBeVisible = true;
|
||||
@ -124,11 +124,11 @@ export class RoomPlane implements IRoomPlane
|
||||
this._cornerD = new Vector3d();
|
||||
this._width = 0;
|
||||
this._height = 0;
|
||||
this._textureOffsetX = _arg_9;
|
||||
this._textureOffsetY = _arg_10;
|
||||
this._textureMaxX = _arg_11;
|
||||
this._textureMaxY = _arg_12;
|
||||
this._useMask = _arg_6;
|
||||
this._textureOffsetX = textureOffsetX;
|
||||
this._textureOffsetY = textureOffsetY;
|
||||
this._textureMaxX = textureMaxX;
|
||||
this._textureMaxY = textureMaxY;
|
||||
this._useMask = usesMask;
|
||||
this._uniqueId = ++RoomPlane._uniqueIdCounter;
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
const _local_4 = this.getLandscapeHeight();
|
||||
|
||||
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;
|
||||
|
||||
while(index < this._roomPlaneParser.planeCount)
|
||||
@ -478,17 +478,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
const _local_14 = Vector3d.crossProduct(leftSide, rightSide);
|
||||
|
||||
_local_6 = ((_local_6 * 7613) + 517);
|
||||
randomSeed = ((randomSeed * 7613) + 517);
|
||||
plane = null;
|
||||
|
||||
if(planeType === RoomPlaneData.PLANE_FLOOR)
|
||||
{
|
||||
const _local_15 = ((location.x + leftSide.x) + 0.5);
|
||||
const _local_16 = ((location.y + rightSide.y) + 0.5);
|
||||
const _local_17 = (Math.trunc(_local_15) - _local_15);
|
||||
const _local_18 = (Math.trunc(_local_16) - _local_16);
|
||||
const textureOffsetX = (Math.trunc(_local_15) - _local_15);
|
||||
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)
|
||||
{
|
||||
@ -504,7 +504,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
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))
|
||||
{
|
||||
@ -539,7 +539,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
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)
|
||||
{
|
||||
@ -564,7 +564,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
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)))
|
||||
{
|
||||
plane.hasTexture = false;
|
||||
|
Loading…
Reference in New Issue
Block a user