Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kirjavascript committed Apr 10, 2021
1 parent e68518f commit fa7d52e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
@@ -1,5 +1,13 @@
# Changelog

## [1.1.2]
- Assume undefined labels are at address 0 [#33](/../../issues/33)
- Made generated mapping labels random
- Made default format Sonic 1

## [1.1.1]
- allow closing a project when a broken one has been loaded

## [1.1.0]
- Export spritesheet

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -24,7 +24,7 @@ The UI layout is fully customisable by moving or resizing tabs.

## File Screen

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.
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.

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

Expand Down
Empty file removed S2FT.json
Empty file.
14 changes: 14 additions & 0 deletions TODO
@@ -1,3 +1,17 @@
<--- Last few GCs --->

[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
[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


<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0x55a61ac44019]
Security context: 0x08f21517ef51 <String[#39]: file://CD552D653EC98D0FCB75745E2A65E2F4>
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>)
2: /* anonymous */(aka /* anonymous */) [0xb47f01db931] [f...
// formats to support

// crackers
Expand Down
5 changes: 3 additions & 2 deletions app/components/file/file-object.js
Expand Up @@ -17,6 +17,7 @@ import ErrorMsg from './error';
import SaveLoad from './save-load';
import { promises } from 'fs';
import { extname } from 'path';
import { uuid } from '#util/uuid';

const fs = promises;
const compressionList = Object.keys(compressionFormats);
Expand Down Expand Up @@ -138,7 +139,7 @@ export const FileObject = observer(({ obj }) => {
if (!mappingsASM) {
await fs.writeFile(path, writeBIN(mappings));
} else {
const label = obj.mappings.label || 'Mappings';
const label = obj.mappings.label || 'Map_' + uuid().slice(0, 4);
await fs.writeFile(path, writeASM(label, mappings));
}
});
Expand Down Expand Up @@ -166,7 +167,7 @@ export const FileObject = observer(({ obj }) => {
if (!dplcsASM) {
await fs.writeFile(path, writeBIN(dplcs));
} else {
const label = obj.dplcs.label || 'DPLCS';
const label = obj.dplcs.label || 'DPLC_' + uuid().slice(0, 4);
await fs.writeFile(path, writeASM(label, dplcs));
}
});
Expand Down
4 changes: 3 additions & 1 deletion app/formats/scripts/parse-asm.js
Expand Up @@ -62,6 +62,8 @@ export function parseASM(text) {
}
});

const getLabelAddr = (label) => labelAddr[label] || 0;

const bytes = [];

parsed.forEach((item) => {
Expand All @@ -70,7 +72,7 @@ export function parseASM(text) {
items.forEach(([type, value]) => {
if (type === addr) {
const [left, right] = value.toLowerCase().split('-');
value = labelAddr[left] - labelAddr[right]; // mutate param (!)
value = getLabelAddr(left) - getLabelAddr(right); // mutate param (!)
}
bytes.push(...Array.from({ length: size }, (_, i) => {
return (value >> (8 * i)) & 0xFF;
Expand Down
2 changes: 1 addition & 1 deletion app/store/objectdef.js
@@ -1,7 +1,7 @@
import { observable } from 'mobx';

export class ObjectDef {
@observable format = '';
@observable format = 'Sonic 1.js';

@observable name = 'object';
@observable palettes = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,5 +1,5 @@
{
"version": "1.1.0",
"version": "1.1.2",
"scripts": {
"start": "electron ./static --dev"
},
Expand Down

0 comments on commit fa7d52e

Please sign in to comment.