Skip to content

Commit 28c8029

Browse files
committed
feat: 4 more byte of data in command hint patching
1 parent e85560a commit 28c8029

File tree

3 files changed

+1
-81
lines changed

3 files changed

+1
-81
lines changed

electron/main.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Binaryen from "binaryen";
66
import * as fs from "node:fs";
77
import express from "express";
88
import serveIndex from "serve-index";
9-
import {parseRules} from "./parse.js";
109

1110
const isDev = process.env.NODE_ENV === 'development';
1211
const __filename = fileURLToPath(import.meta.url);
@@ -49,13 +48,6 @@ function createWindow() {
4948
let buffer = Buffer.concat(chunks);
5049

5150
try {
52-
// const parsed = parseRules(buffer, rules);
53-
// const parsedFunctions = {};
54-
//
55-
// for (let key in parsed) {
56-
// parsedFunctions[key] = parsed[key].substring(5);
57-
// }
58-
5951
const module = Binaryen.readBinary(buffer);
6052

6153
const newModule = Binaryen.readBinary(buffer);

electron/parse.js

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

src/commands/dispatcher.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ class CommandManager {
3636
window.Module.HEAPU32[(ptr + 40) / 4] = 2147483728;
3737
window.Module.HEAPU32[(ptr + 44) / 4] = 0x00f3c4a3; // color
3838
window.Module.HEAPU32[(ptr + 48) / 4] = 0;
39-
window.Module.HEAPU32[(ptr + 52) / 4] = 1039516303;
40-
39+
window.Module.HEAPF32[(ptr + 52) / 4] = 0.12;
4140
window.Module.HEAPF32[(ptr + 56) / 4] = 14.00;
42-
4341
window.Module.HEAPU32[(ptr + 60) / 4] = 264;
4442
window.Module.HEAPU32[(ptr + 64) / 4] = 0;
4543
writeString(name, desPtr);

0 commit comments

Comments
 (0)