Skip to content

Commit fa7d52e

Browse files
committed
1.1.2
1 parent e68518f commit fa7d52e

File tree

8 files changed

+31
-6
lines changed

8 files changed

+31
-6
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.1.2]
4+
- Assume undefined labels are at address 0 [#33](/../../issues/33)
5+
- Made generated mapping labels random
6+
- Made default format Sonic 1
7+
8+
## [1.1.1]
9+
- allow closing a project when a broken one has been loaded
10+
311
## [1.1.0]
412
- Export spritesheet
513

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The UI layout is fully customisable by moving or resizing tabs.
2424

2525
## File Screen
2626

27-
After selecting a game format, individual assets can be saved and loaded. Art based assetts can specify an offset to load from (for example, for loading HUD graphics from a VRAM dump). To load every asset at once, use the load/save in the 'Object' line.
27+
After selecting a game format, individual assets can be saved and loaded. Art based assets can specify an offset to load from (for example, for loading HUD graphics from a VRAM dump). To load every asset at once, use the load/save in the 'Object' line.
2828

2929
The 'label' specified in the mapping and DPLC definitions will be used as the main label in ASM file output.
3030

S2FT.json

Whitespace-only changes.

TODO

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
<--- Last few GCs --->
2+
3+
[13424:0x16b81c0b9000] 4101829 ms: Mark-sweep 2045.5 (2052.8) -> 2043.7 (2053.0) MB, 255.8 / 2.0 ms (average mu = 0.098, current mu = 0.010) allocation failure scavenge might not succeed
4+
[13424:0x16b81c0b9000] 4102148 ms: Mark-sweep 2045.7 (2053.0) -> 2043.9 (2053.0) MB, 316.8 / 2.0 ms (average mu = 0.053, current mu = 0.008) allocation failure scavenge might not succeed
5+
6+
7+
<--- JS stacktrace --->
8+
9+
==== JS stack trace =========================================
10+
11+
0: ExitFrame [pc: 0x55a61ac44019]
12+
Security context: 0x08f21517ef51 <String[#39]: file://CD552D653EC98D0FCB75745E2A65E2F4>
13+
1: e(aka e) [0x86cab96f1f1] [file:///home/dustin/Desktop/Tools/Flex2/resources/app.asar/bundles/main.js:~15] [pc=0x3b5492b0376c](this=0x2899d8a80469 <undefined>,2,0x065e2fb79cd1 <Object map = 0x24f968842f81>,0x067399efffd9 <Map map = 0x4f2b0400ca1>)
14+
2: /* anonymous */(aka /* anonymous */) [0xb47f01db931] [f...
115
// formats to support
216

317
// crackers

app/components/file/file-object.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import ErrorMsg from './error';
1717
import SaveLoad from './save-load';
1818
import { promises } from 'fs';
1919
import { extname } from 'path';
20+
import { uuid } from '#util/uuid';
2021

2122
const fs = promises;
2223
const compressionList = Object.keys(compressionFormats);
@@ -138,7 +139,7 @@ export const FileObject = observer(({ obj }) => {
138139
if (!mappingsASM) {
139140
await fs.writeFile(path, writeBIN(mappings));
140141
} else {
141-
const label = obj.mappings.label || 'Mappings';
142+
const label = obj.mappings.label || 'Map_' + uuid().slice(0, 4);
142143
await fs.writeFile(path, writeASM(label, mappings));
143144
}
144145
});
@@ -166,7 +167,7 @@ export const FileObject = observer(({ obj }) => {
166167
if (!dplcsASM) {
167168
await fs.writeFile(path, writeBIN(dplcs));
168169
} else {
169-
const label = obj.dplcs.label || 'DPLCS';
170+
const label = obj.dplcs.label || 'DPLC_' + uuid().slice(0, 4);
170171
await fs.writeFile(path, writeASM(label, dplcs));
171172
}
172173
});

app/formats/scripts/parse-asm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export function parseASM(text) {
6262
}
6363
});
6464

65+
const getLabelAddr = (label) => labelAddr[label] || 0;
66+
6567
const bytes = [];
6668

6769
parsed.forEach((item) => {
@@ -70,7 +72,7 @@ export function parseASM(text) {
7072
items.forEach(([type, value]) => {
7173
if (type === addr) {
7274
const [left, right] = value.toLowerCase().split('-');
73-
value = labelAddr[left] - labelAddr[right]; // mutate param (!)
75+
value = getLabelAddr(left) - getLabelAddr(right); // mutate param (!)
7476
}
7577
bytes.push(...Array.from({ length: size }, (_, i) => {
7678
return (value >> (8 * i)) & 0xFF;

app/store/objectdef.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { observable } from 'mobx';
22

33
export class ObjectDef {
4-
@observable format = '';
4+
@observable format = 'Sonic 1.js';
55

66
@observable name = 'object';
77
@observable palettes = [];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.0",
2+
"version": "1.1.2",
33
"scripts": {
44
"start": "electron ./static --dev"
55
},

0 commit comments

Comments
 (0)