From ae56d38a34b40d00928241ca669a0682c5d8483a Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Fri, 22 Nov 2002 17:06:59 +0000 Subject: [PATCH] added converter script --- construo_main.cxx | 2 +- examples/Makefile.am | 23 +++++++++++++++++++++++ xml2sexpr.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 examples/Makefile.am create mode 100755 xml2sexpr.sh diff --git a/construo_main.cxx b/construo_main.cxx index c1c19a7..a757dd7 100644 --- a/construo_main.cxx +++ b/construo_main.cxx @@ -655,7 +655,7 @@ ConstruoMain::main (int argc, char* argv[]) } graphic_context->draw_string (10, 20, "..:: Construo V"VERSION" ::.."); - graphic_context->draw_string (10, 32, "============================="); + graphic_context->draw_string (10, 32, "========================="); graphic_context->draw_string (400, 20, " [1-9] - quick save"); graphic_context->draw_string (400, 32, "[shift 1-9] - quick load"); diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..059bb77 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,23 @@ +## Construo - A wire-frame construction game +## Copyright (C) 2002 Ingo Ruhnke +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License +## as published by the Free Software Foundation; either version 2 +## of the License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +pkgdatadir = $(datadir)/games/@PACKAGE@/examples/ + +pkgdata_DATA = *.construo +EXTRA_DIST=$(pkgdata_DATA) + +# EOF # \ No newline at end of file diff --git a/xml2sexpr.sh b/xml2sexpr.sh new file mode 100755 index 0000000..5dffaed --- /dev/null +++ b/xml2sexpr.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +sed "s///" | \ +sed "s//(spring /" | \ +sed "s/<\/spring>/)/" | \ +sed "s//(first /" | \ +sed "s/<\/first>/)/" | \ +sed "s//(second /" | \ +sed "s/<\/second>/)/" | \ +sed "s//(construo-scene/" | \ +sed "s/<\/construo-scene>/)/" | \ +sed "s///g" | \ +sed "s/<\/cl-vector>//g" | \ +sed "s//(springs /" | \ +sed "s/<\/spring-list>/)/" | \ +sed "s/<[xyz]>/ /g" | \ +sed "s/<\/[xyz]>/ /g" | \ +sed "s//(pos /g" | \ +sed "s/<\/position>/) /g" | \ +sed "s//(velocity /g" | \ +sed "s/<\/velocity>/) /g" | \ +sed "s//(particles /" | \ +sed "s/<\/particle-list>/)/" | \ +sed "s/<\/particle>/)/" | \ +sed "s//(particle (id \1) /" + +# EOF # \ No newline at end of file