summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-03-20 01:15:58 +0100
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commitb89eba8253caccd027c861b5cfa68b29dceb6639 (patch)
tree42c778fb230d4b3095c7f3ded36d9bc9eb90bd11 /tools
parentad863219484ad675d138e0863880bf798060b493 (diff)
downloadandean-abyss-b89eba8253caccd027c861b5cfa68b29dceb6639.tar.gz
Fix optional instructions. Poppies.
Diffstat (limited to 'tools')
-rw-r--r--tools/gencode.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/gencode.py b/tools/gencode.py
index c78ce11..c02f24d 100644
--- a/tools/gencode.py
+++ b/tools/gencode.py
@@ -46,16 +46,10 @@ for event in range(2,146):
for line in code[event]:
if line.startswith('space'):
line = line.split(' ', 2)
- print('\t[ vm_space, ' + line[1] + ', (s)=>' + line[2] + ' ],')
- elif line.startswith('each space'):
- line = line.split(' ', 2)
- print('\t[ vm_space, 0, (s)=>' + line[2] + ' ],')
+ print('\t[ vm_'+line[0]+', ' + line[1] + ', (s)=>' + line[2] + ' ],')
elif line.startswith('piece'):
line = line.split(' ', 2)
- print('\t[ vm_piece, ' + line[1] + ', (p,s)=>' + line[2] + ' ],')
- elif line.startswith('each piece'):
- line = line.split(' ', 2)
- print('\t[ vm_piece, 0, (p,s)=>' + line[2] + ' ],')
+ print('\t[ vm_'+line[0]+', ' + line[1] + ', (p,s)=>' + line[2] + ' ],')
elif line.startswith('while'):
line = line.split(' ', 1)
print('\t[ vm_while, ()=>' + line[1] + ' ],')