summaryrefslogtreecommitdiff
path: root/unrpyc
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-07-23 17:25:54 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-07-23 17:25:54 -0400
commit8e883a46948e25787ecb01c0fceeee0d2e252521 (patch)
treef3790a93a548ee3ab1555b63b289d64cc2d033cd /unrpyc
parent5366753037dfbbc242fe974cf2f2b8ba4499ac2b (diff)
downloadhtml5ks-8e883a46948e25787ecb01c0fceeee0d2e252521.tar.xz
html5ks-8e883a46948e25787ecb01c0fceeee0d2e252521.zip
working, fixing bugs...
Diffstat (limited to 'unrpyc')
-rw-r--r--unrpyc/Makefile6
-rw-r--r--unrpyc/README2
-rw-r--r--unrpyc/decompiler.py8
3 files changed, 12 insertions, 4 deletions
diff --git a/unrpyc/Makefile b/unrpyc/Makefile
index 86dcac3..6a94ca6 100644
--- a/unrpyc/Makefile
+++ b/unrpyc/Makefile
@@ -12,5 +12,7 @@ clean:
test: all
jshint --show-non-errors *.json
-.PHONY: all clean test
-.PRECIOUS: %.json.o
+install: all
+ install -t ../www/scripts *.json
+
+.PHONY: all clean test install
diff --git a/unrpyc/README b/unrpyc/README
index c046fe8..8d68bac 100644
--- a/unrpyc/README
+++ b/unrpyc/README
@@ -8,7 +8,7 @@ How to use:
2. Execute "2to3 -w renpy/*.py".
3. Put the rpyc files from the official KS distribution in here.
4. Run "make" with appropriate -j options (yay auto-parallelization)
-5. Copy the resulting .json files to /www/scripts.
+5. Run "make install".
If you want to hack on the code, have fun. This is all the documentation you get.
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py
index c6046f6..64d0e4c 100644
--- a/unrpyc/decompiler.py
+++ b/unrpyc/decompiler.py
@@ -21,6 +21,7 @@
import ast as python_ast
import renpy.ast as ast
import renpy.atl as atl
+import code
DECOMPILE_SCREENS = False
firstLabel = True
@@ -176,7 +177,7 @@ def print_imspec(f, imspec):
# at
if len(imspec[3]) > 0:
- f.write(' at ')
+ f.write('", "')
delim = ''
for s in imspec[3]:
f.write(delim + escape_string(s))
@@ -275,6 +276,8 @@ class PrintRenPython(python_ast.NodeVisitor):
self.f.write(self.visit(node.func))
self.f.write(', ')
self.f.write(', '.join(map(self.visit, node.args)))
+ self.f.write(', ')
+ self.f.write(', '.join(map(self.visit, node.keywords)))
self.f.write('],\n')
def quote(self, string):
@@ -292,6 +295,9 @@ class PrintRenPython(python_ast.NodeVisitor):
def visit_Str(self, node):
return self.quote(escape_string(node.s))
+ def visit_keyword(self, node):
+ return self.visit(node.value)
+
def print_Python(f, stmt, indent_level, early=False):
code_src = stmt.code.source