mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
assets/tools/MiRCART{Reduce,ToAnsi}.py: fixed.
libcanvas/CanvasExportStore.py: fixed. assets/text/TODO: updated.
This commit is contained in:
parent
8abf95abee
commit
391ee21612
@ -1,14 +1,15 @@
|
||||
1) General {cleanup,refactor}
|
||||
2) Transparent {back,fore}ground colour
|
||||
3) Implement ANSI CSI CU[BDPU] sequences
|
||||
4) Incremental auto{load,save} & {backup,restore}
|
||||
5) Open and toggle a reference image in the background
|
||||
6) Client-Server or Peer-to-Peer realtime collaboration
|
||||
7) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
||||
8) Hotkey & graphical interfaces to {composed,parametrised} tools
|
||||
9) GUI: a) scrollbar b) switch from wxPython to GTK c) revisit About dialogue
|
||||
10) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking}
|
||||
11) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||
3) Implement instrumentation & unit tests
|
||||
4) Implement ANSI CSI CU[BDPU] sequences
|
||||
5) Incremental auto{load,save} & {backup,restore}
|
||||
6) Open and toggle a reference image in the background
|
||||
7) Client-Server or Peer-to-Peer realtime collaboration
|
||||
8) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
||||
9) Hotkey & graphical interfaces to {composed,parametrised} tools
|
||||
10) GUI: a) scrollbar b) switch from wxPython to GTK c) revisit About dialogue
|
||||
11) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking}
|
||||
12) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||
13) Composition and parametrisation of tools from higher-order operators (brushes, filters, outlines, patterns & shaders) and unit tools; unit tools:
|
||||
a) geometric primitives (arrow, circle, cloud/speech bubble, curve, heart, hexagon, line, pentagon, polygon, rhombus, triangle, square, star)
|
||||
b) regions (crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate)
|
||||
|
@ -9,6 +9,7 @@ import os, sys
|
||||
[sys.path.append(os.path.join(os.getcwd(), "..", "..", path)) for path in ["libcanvas", "librtl"]]
|
||||
|
||||
from CanvasImportStore import CanvasImportStore
|
||||
from CanvasExportStore import CanvasExportStore
|
||||
import sys
|
||||
|
||||
def reduce(inPathName):
|
||||
@ -25,15 +26,17 @@ def reduce(inPathName):
|
||||
print("\u001f", end="", file=outFile)
|
||||
lastAttribs = inCurCell[2]
|
||||
if lastColours == None \
|
||||
or (lastColours[0] != inCurCell[:2][0] \
|
||||
and lastColours[1] != inCurCell[:2][1]):
|
||||
or ((lastColours[0] != inCurCell[:2][0]) \
|
||||
and (lastColours[1] != inCurCell[:2][1])) \
|
||||
or ((lastColours[0] == inCurCell[:2][0]) \
|
||||
and (lastColours[1] != inCurCell[:2][1])):
|
||||
if (inCurCell[3] in set("0123456789")) and (inCurCell[1] < 10):
|
||||
print("\u0003{:d},{:02d}{}".format(*inCurCell[:2], inCurCell[3]), end="", file=outFile)
|
||||
else:
|
||||
print("\u0003{:d},{:d}{}".format(*inCurCell[:2], inCurCell[3]), end="", file=outFile)
|
||||
lastColours = inCurCell[:2]
|
||||
elif (lastColours[1] == inCurCell[:2][1]) \
|
||||
and (lastColours[0] != inCurCell[:2][0]):
|
||||
elif (lastColours[0] != inCurCell[:2][0]) \
|
||||
and (lastColours[1] == inCurCell[:2][1]):
|
||||
if (inCurCell[3] in set("0123456789")) and (inCurCell[0] < 10):
|
||||
print("\u0003{:02d}{}".format(inCurCell[0], inCurCell[3]), end="", file=outFile)
|
||||
else:
|
||||
|
@ -18,11 +18,11 @@ def main(*argv):
|
||||
print("usage: {} <MiRCART input file pathname>".format(sys.argv[0]), file=sys.stderr)
|
||||
else:
|
||||
canvasImportStore = CanvasImportStore()
|
||||
rc, error = canvasImportStore.importAnsiFile(argv[1])
|
||||
rc, error = canvasImportStore.importTextFile(argv[1])
|
||||
if rc:
|
||||
canvasExportStore = CanvasExportStore()
|
||||
canvasExportStore.exportAnsiFile(canvasImportStore.outMap, canvasImportStore.inSize, sys.stdout)
|
||||
else
|
||||
else:
|
||||
print("error: {}".format(error), file=sys.stderr)
|
||||
if __name__ == "__main__":
|
||||
main(*sys.argv)
|
||||
|
@ -125,7 +125,7 @@ class CanvasExportStore():
|
||||
outImgDraw = ImageDraw.Draw(outImg); outImgDraw.fontmode = "1";
|
||||
for inCurRow in range(len(canvasMap)):
|
||||
for inCurCol in range(len(canvasMap[inCurRow])):
|
||||
inCurCell = canvasMap[inCurRow][inCurCol]; outColours = (0, 0);
|
||||
inCurCell = canvasMap[inCurRow][inCurCol]; outColours = [0, 0];
|
||||
if inCurCell[2] & self._CellState.CS_BOLD:
|
||||
if inCurCell[3] != " ":
|
||||
if inCurCell[3] == "█":
|
||||
|
Loading…
Reference in New Issue
Block a user