silphscope 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ export function resolveMonIconPalette(mon, reader) { // I kinda think this might
|
|
|
2
2
|
const indexTable = reader.getTable("monIconPaletteIndices");
|
|
3
3
|
const paletteIndex = reader.readU8(indexTable + mon.index);
|
|
4
4
|
const paletteTable = reader.getTable("monIconPaletteTable");
|
|
5
|
-
const palettePtr = reader.readPointer(paletteTable + paletteIndex *
|
|
5
|
+
const palettePtr = reader.readPointer(paletteTable + paletteIndex * 8);
|
|
6
6
|
return {
|
|
7
7
|
offset: palettePtr
|
|
8
8
|
};
|
package/src/rom-reader.js
CHANGED
|
@@ -10,7 +10,10 @@ export class RomReader {
|
|
|
10
10
|
(rom[offset + 1] << 8) |
|
|
11
11
|
(rom[offset + 2] << 16) |
|
|
12
12
|
(rom[offset + 3] << 24)
|
|
13
|
-
);
|
|
13
|
+
) >>> 0; // this should also prevent a bug for the numbers becoming negative due to unsigned and signed numbers canoodling :o
|
|
14
|
+
}
|
|
15
|
+
readU8(offset) { // how did I forget this T-T
|
|
16
|
+
return this.rom[offset];
|
|
14
17
|
}
|
|
15
18
|
readPointer(offset) {
|
|
16
19
|
return this.readU32(offset) - 0x08000000;
|