X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tools%2Flevelconverter-0.1.3_0.2.0.scm;h=10b0cea5b1a308600985f975d87a75f92e58b807;hb=df83da561c6cd76bea017991352a34560bcc5b85;hp=e0638588feb7bf6ee867ceef4204d216e0635b15;hpb=2a712700f56e71ec58f1a7d7243e0616f9fb6708;p=supertux.git diff --git a/tools/levelconverter-0.1.3_0.2.0.scm b/tools/levelconverter-0.1.3_0.2.0.scm index e0638588f..10b0cea5b 100755 --- a/tools/levelconverter-0.1.3_0.2.0.scm +++ b/tools/levelconverter-0.1.3_0.2.0.scm @@ -1,5 +1,4 @@ -#!/usr/bin/scm - +; ; ; $Id$ ; @@ -25,15 +24,18 @@ ; ; The rest of this file may seem like a Long Irritating Series of Parentheses, -; but it's actually a program. Install a Scheme interpreter, e.g. scm, to run +; but it's actually a program. Install a Scheme interpreter, e.g. scm, to run ; it. ; -; This program aids in the conversion of SuperTux levels from 0.1.3 level +; This program aids in the conversion of SuperTux levels from 0.1.3 level ; format to the one used by SuperTux 0.2.x. ; ; Usage: ; levelconverter-0.1.3_0.2.0.scm < oldformat.stl > newformat.stl ; +; Bugs: +; Some things (like what background image to use) are not converted: +; they will need manual adjustment afterwards. ; --------------------------------------------------------------------------- @@ -71,7 +73,7 @@ ; return SuperTux 0.1.3 level in SuperTux 0.2.x form (define (convert-level level) - (let + (let ( (type (car level)) (version (find-sublist level 'version)) @@ -98,12 +100,12 @@ (if (not background-tm) (error "No background tilemap given")) (if (not foreground-tm) (error "No foreground tilemap given")) (if (not objects) (error "No objects list given")) - (quasiquote + (quasiquote (supertux-level (version 2) (name (_ ,(car name))) (author ,(car author)) - ,(append + ,(append (quasiquote (sector (name "main") @@ -148,7 +150,7 @@ ) ) ) - + ; run conversion on stdin, output to stdout (write (convert-level (read))) (newline)