This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private decodeLocs = async (js5: Js5[], lands: Int8Array, buf: Packet, mapsquareX: number, mapsquareZ: number): Promise<void> => { | |
let locId: number = -1; | |
let locIdOffset: number = buf.gExtended1or2(); | |
while (locIdOffset !== 0) { | |
locId += locIdOffset; | |
let coord: number = 0; | |
let coordOffset: number = buf.gSmart1or2(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
__add, | |
__get, | |
__remove, | |
__set, | |
allocateIfAbsent, | |
CollisionFlag, | |
deallocateIfPresent, | |
isFlagged, | |
isZoneAllocated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Socket = { | |
host: string; | |
port: number; | |
}; | |
export default class ClientStream { | |
// constructor | |
private readonly socket: WebSocket; | |
private readonly wsin: WebSocketReader; | |
private readonly wsout: WebSocketWriter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import Packet from '#jagex2/io/Packet.js'; | |
import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; | |
import FloorCollider from '#lostcity/engine/collision/FloorCollider.js'; | |
import WallCollider from '#lostcity/engine/collision/WallCollider.js'; | |
import LocCollider from '#lostcity/engine/collision/LocCollider.js'; | |
import LocAngle from '#lostcity/engine/collision/LocAngle.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Packet from '#jagex2/io/Packet.js'; | |
import Loc from '#lostcity/entity/Loc.js'; | |
import Npc from '#lostcity/entity/Npc.js'; | |
import Obj from '#lostcity/entity/Obj.js'; | |
import Player from '#lostcity/entity/Player.js'; | |
import { ServerProt, ServerProtEncoders } from '#lostcity/server/ServerProt.js'; | |
import World from '#lostcity/engine/World.js'; | |
import { LocShapes } from '#lostcity/engine/collision/LocShape.js'; | |
import PathingEntity from '#lostcity/entity/PathingEntity.js'; | |
import LocType from '#lostcity/cache/LocType.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function fillTexturedTriangle( | |
xA: i32, | |
xB: i32, | |
xC: i32, | |
yA: i32, | |
yB: i32, | |
yC: i32, | |
shadeA: i32, | |
shadeB: i32, | |
shadeC: i32, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// // main | |
if (GameShell.getParameter('world').length === 0) { | |
GameShell.setParameter('world', '1'); | |
} | |
if (GameShell.getParameter('detail').length === 0) { | |
GameShell.setParameter('detail', 'high'); | |
} | |
if (GameShell.getParameter('method').length === 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
import Jagfile from '../src/js/jagex2/io/Jagfile'; | |
import Model from '../src/js/jagex2/graphics/Model'; | |
import NpcType from '../src/js/jagex2/config/NpcType'; | |
import Bzip from '../src/js/vendor/bzip'; | |
import PixFont from '../src/js/jagex2/graphics/PixFont'; | |
beforeAll(async (): Promise<void> => { | |
await Bzip.load(fs.readFileSync('./test/resources/bz2.wasm')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import Jagfile from '#jagex2/io/Jagfile.js'; | |
import Packet from '#jagex2/io/Packet.js'; | |
export default class WordEnc { | |
private static fragments: number[] = []; | |
private static bads: Uint16Array[] = []; | |
private static badCombinations: number[][][] = []; | |
private static domains: Uint16Array[] = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[oploc1,_door_left_closed] | |
def_coord $opposite = ~movecoord_loc_return(~door_close(loc_angle)); | |
sound_synth(door_open, 0, 0); | |
loc_del(500); | |
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 3) % 4), wall_straight, 500); | |
loc_findallzone($opposite); | |
while (loc_findnext = true) { | |
if (loc_coord = $opposite & loc_category = door_right_closed) { | |
loc_del(500); | |
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 1) % 4), wall_straight, 500); |
NewerOlder