Skip to content

Commit f0482a1

Browse files
author
markb5
committed
resolve merge
2 parents 6e48611 + eedfcf1 commit f0482a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1259
-1404
lines changed

.github/workflows/engine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Verify Engine Code
1+
name: Verify Engine Code
22

33
on:
44
pull_request:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<h1>Lost City - September 7, 2004</h1>
2+
<h1>Lost City - November 23, 2004</h1>
33
</div>
44

55
> [!NOTE]
@@ -23,8 +23,8 @@ The [Server](https://github.com/LostCityRS/Server) repository will simplify setu
2323
In absence of the [Server](https://github.com/LostCityRS/Server) scripts, download the specific engine and content repositories/branches you desire and extract them to the same parent folder.
2424

2525
```sh
26-
git clone https://github.com/LostCityRS/Engine-TS -b 254 --single-branch engine
27-
git clone https://github.com/LostCityRS/Content -b 254 --single-branch content
26+
git clone https://github.com/LostCityRS/Engine-TS -b 274 --single-branch engine
27+
git clone https://github.com/LostCityRS/Content -b 274 --single-branch content
2828
cd engine
2929
bun start
3030
```

bun.lock

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

neptune.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@
3434
]
3535
},
3636
"dependencies": {
37-
"@2004scape/rsbuf": "254.1.0",
37+
"@2004scape/rsbuf": "274.1.0",
3838
"@2004scape/rsmod-pathfinder": "^5.0.4",
3939
"@inquirer/prompts": "^8.0.1",
4040
"@isaacs/ttlcache": "^2.1.3",
4141
"@jimp/js-png": "^1.6.0",
4242
"@jimp/plugin-quantize": "^1.6.0",
43+
"@lostcityrs/runescript": "^0.9.6",
4344
"axios": "^1.13.2",
4445
"bcrypt": "^6.0.0",
4546
"dotenv": "^17.2.3",

public/client/client.js

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/client/deps.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

public/client/tinymidipcm.wasm

-5.32 KB
Binary file not shown.

src/app.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ import World from '#/engine/World.js';
77
import TcpServer from '#/server/tcp/TcpServer.js';
88
import Environment from '#/util/Environment.js';
99
import { printError, printInfo } from '#/util/Logger.js';
10-
import { updateCompiler } from '#/util/RuneScriptCompiler.js';
1110
import { startManagementWeb, startWeb } from '#/web.js';
1211
import OnDemand from '#/engine/OnDemand.js';
1312

14-
if (Environment.BUILD_STARTUP_UPDATE) {
15-
await updateCompiler();
16-
}
17-
1813
if (
1914
OnDemand.cache.count(0) !== 9 ||
2015
OnDemand.cache.count(2) === 0 ||

src/cache/CrcTable.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
import Packet from '#/io/Packet.js';
22
import OnDemand from '#/engine/OnDemand.js';
33

4-
export const CrcBuffer: Packet = new Packet(new Uint8Array(4 * 9));
4+
export const CrcBuffer: Packet = new Packet(new Uint8Array(4 * 9 + 4));
5+
export let CrcTable: number[] = [];
56
export let CrcBuffer32: number = 0;
67

78
export function makeCrcs() {
9+
CrcTable = [];
10+
811
CrcBuffer.pos = 0;
912

1013
const count = OnDemand.cache.count(0);
1114
for (let i = 0; i < count; i++) {
1215
const jag = OnDemand.cache.read(0, i);
1316
if (jag) {
14-
CrcBuffer.p4(Packet.getcrc(jag, 0, jag.length));
17+
CrcTable[i] = Packet.getcrc(jag, 0, jag.length);
18+
CrcBuffer.p4(CrcTable[i]);
1519
} else {
20+
CrcTable[i] = 0;
1621
CrcBuffer.p4(0);
1722
}
1823
}
1924

20-
CrcBuffer32 = Packet.getcrc(CrcBuffer.data, 0, CrcBuffer.data.length);
25+
let hash = 1234;
26+
for (let i = 0; i < 9; i++) {
27+
hash = (hash << 1) + CrcTable[i];
28+
}
29+
CrcBuffer.p4(hash);
30+
31+
CrcBuffer32 = Packet.getcrc(CrcBuffer.data, 0, CrcBuffer.data.length - 4);
2132
}

0 commit comments

Comments
 (0)