mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 01:29:22 +00:00
Inline readUInt32LE
This will allow us to do signed ints in some places but not all.
This commit is contained in:
parent
5dab717425
commit
585b75ae4e
1 changed files with 5 additions and 6 deletions
|
|
@ -234,26 +234,25 @@ function parseComand({ start, makiFile, length, pos, localFunctions }) {
|
|||
return command;
|
||||
}
|
||||
|
||||
const argValue = makiFile.readUInt32LE();
|
||||
const argType = command.command.arg;
|
||||
let arg = null;
|
||||
switch (argType) {
|
||||
case "var": {
|
||||
arg = argValue;
|
||||
arg = makiFile.readUInt32LE();
|
||||
break;
|
||||
}
|
||||
case "line": {
|
||||
arg = argValue + 5 + pos;
|
||||
arg = makiFile.readUInt32LE() + 5 + pos;
|
||||
break;
|
||||
}
|
||||
case "objFunc": {
|
||||
// TODO: ClassesOffset
|
||||
arg = argValue;
|
||||
arg = makiFile.readUInt32LE();
|
||||
break;
|
||||
}
|
||||
case "func": {
|
||||
// Note in the perl code here: "todo, something strange going on here..."
|
||||
const variable = argValue + 5;
|
||||
const variable = makiFile.readUInt32LE() + 5;
|
||||
const offset = variable + pos;
|
||||
arg = {
|
||||
name: `func${offset}`,
|
||||
|
|
@ -270,7 +269,7 @@ function parseComand({ start, makiFile, length, pos, localFunctions }) {
|
|||
}
|
||||
case "obj": {
|
||||
// Classes Offset
|
||||
arg = argValue;
|
||||
arg = makiFile.readUInt32LE();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue