From e82142f2231e5aacf47e3f0cf5e82679d4291af2 Mon Sep 17 00:00:00 2001 From: jsancho Date: Wed, 10 Aug 2011 10:51:30 +0000 Subject: [PATCH] --- Makefile | 281 +++++++++++++++++++++++++++++--------------- src/gacela.c | 24 ++-- src/gacela.scm | 17 +-- src/gacela_GL.c | 13 ++ src/gacela_SDL.c | 7 ++ src/gacela_draw.scm | 14 ++- src/gacela_mobs.scm | 6 + 7 files changed, 244 insertions(+), 118 deletions(-) diff --git a/Makefile b/Makefile index ca6088c..b562aea 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ pkgdatadir = $(datadir)/gacela -pkglibdir = $(libdir)/gacela pkgincludedir = $(includedir)/gacela +pkglibdir = $(libdir)/gacela +pkglibexecdir = $(libexecdir)/gacela am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -44,6 +46,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -58,12 +61,29 @@ am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docdir)" -dist_docDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -71,18 +91,43 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run aclocal-1.11 -AMTAR = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run tar -AUTOCONF = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run autoconf -AUTOHEADER = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run autoheader -AUTOMAKE = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run automake-1.11 +ACLOCAL = ${SHELL} /home/jsancho/proyectos/guile/missing --run aclocal-1.11 +AMTAR = ${SHELL} /home/jsancho/proyectos/guile/missing --run tar +AUTOCONF = ${SHELL} /home/jsancho/proyectos/guile/missing --run autoconf +AUTOHEADER = ${SHELL} /home/jsancho/proyectos/guile/missing --run autoheader +AUTOMAKE = ${SHELL} /home/jsancho/proyectos/guile/missing --run automake-1.11 AWK = mawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -95,11 +140,11 @@ ECHO_C = ECHO_N = -n ECHO_T = EXEEXT = -GUILE = /usr/bin/guile -GUILE_CFLAGS = -GUILE_CONFIG = /usr/bin/guile-config -GUILE_LDFLAGS = -lguile -lltdl -lgmp -lcrypt -lm -lltdl -GUILE_TOOLS = /usr/bin/guile-tools +GUILE = /usr/local/bin/guile +GUILE_CFLAGS = -I/usr/local/include -pthread +GUILE_CONFIG = /usr/local/bin/guile-config +GUILE_LDFLAGS = -pthread -L/usr/local/lib -lguile -lltdl -lgmp -lcrypt -lm -lltdl +GUILE_TOOLS = /usr/local/bin/guile-tools INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} @@ -109,7 +154,7 @@ LDFLAGS = LIBOBJS = LIBS = -lreadline -lSDL -lSDL_image -lSDL_gfx -lSDL_mixer -lGL -lGLU -lftgl LTLIBOBJS = -MAKEINFO = ${SHELL} /home/jsancho/proyectos/gacela/trunk/missing --run makeinfo +MAKEINFO = ${SHELL} /home/jsancho/proyectos/guile/missing --run makeinfo MKDIR_P = /bin/mkdir -p OBJEXT = o PACKAGE = gacela @@ -117,16 +162,17 @@ PACKAGE_BUGREPORT = jsf@jsancho.org PACKAGE_NAME = gacela PACKAGE_STRING = gacela 0.5 PACKAGE_TARNAME = gacela +PACKAGE_URL = PACKAGE_VERSION = 0.5 PATH_SEPARATOR = : SET_MAKE = SHELL = /bin/bash STRIP = VERSION = 0.5 -abs_builddir = /home/jsancho/proyectos/gacela/trunk -abs_srcdir = /home/jsancho/proyectos/gacela/trunk -abs_top_builddir = /home/jsancho/proyectos/gacela/trunk -abs_top_srcdir = /home/jsancho/proyectos/gacela/trunk +abs_builddir = /home/jsancho/proyectos/guile +abs_srcdir = /home/jsancho/proyectos/guile +abs_top_builddir = /home/jsancho/proyectos/guile +abs_top_srcdir = /home/jsancho/proyectos/guile ac_ct_CC = gcc am__include = include am__leading_dot = . @@ -145,7 +191,7 @@ host_alias = htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/jsancho/proyectos/gacela/trunk/install-sh +install_sh = ${SHELL} /home/jsancho/proyectos/guile/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale @@ -162,6 +208,7 @@ sharedstatedir = ${prefix}/com srcdir = . sysconfdir = ${prefix}/etc target_alias = +top_build_prefix = top_builddir = . top_srcdir = . SUBDIRS = src @@ -176,15 +223,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -200,9 +247,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ @@ -214,7 +262,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -223,20 +271,23 @@ distclean-hdr: install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(dist_doc_DATA)'; for p in $$list; do \ + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ - $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docdir)/$$f"; \ - done + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(docdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -245,7 +296,7 @@ uninstall-dist_docDATA: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -262,7 +313,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -270,7 +321,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -296,16 +347,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -313,14 +364,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -332,7 +383,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ @@ -341,36 +392,41 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -386,38 +442,55 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -430,6 +503,10 @@ dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -453,15 +530,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -469,9 +548,11 @@ distcheck: dist mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -493,13 +574,15 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -544,6 +627,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -563,6 +647,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -571,18 +657,28 @@ install-data-am: install-dist_docDATA install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -605,24 +701,25 @@ ps-am: uninstall-am: uninstall-dist_docDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-dist_docDATA + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dist_docDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-dist_docDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/gacela.c b/src/gacela.c index 2f82d72..6891d4b 100644 --- a/src/gacela.c +++ b/src/gacela.c @@ -177,7 +177,7 @@ gacela_client (SCM rec_channel, SCM send_channel) } static void* -init_gacela (void *data, int argc, char **argv) +init_scheme (void *data, int argc, char **argv) { // Guile configuration scm_c_eval_string ("(set-repl-prompt! \"gacela> \")"); @@ -204,6 +204,14 @@ load_scheme_files (char *path) scm_primitive_load_path (scm_from_locale_string ("gacela_loader.scm")); } +void +init_gacela (char *path) +{ + scm_with_guile (&init_scheme, NULL); + load_scheme_files (path); + scm_c_eval_string ("(init-video-mode)"); +} + void start_server (int port) { @@ -237,7 +245,7 @@ int main (int argc, char *argv[]) { char *arg; - int mode = 0; // playing: 1, server: 2, client: 3 + int mode = 0; // dev: 1, server: 2, client: 3 char *host; int port = 0; int i; @@ -246,7 +254,7 @@ main (int argc, char *argv[]) // Checking arguments for (i = 1; i < argc; i++) { - if (strcmp (argv[i], "--playing") == 0) + if (strcmp (argv[i], "--dev") == 0) mode = 1; else if (strncmp (argv[i], "--server", 8) == 0) { mode = 2; @@ -278,8 +286,7 @@ main (int argc, char *argv[]) if (pid == 0) { scm_close (SCM_CAR (fd1)); scm_close (SCM_CDR (fd2)); - scm_with_guile (&init_gacela, NULL); - load_scheme_files (dirname (argv[0])); + init_gacela (dirname (argv[0])); start_local_server (scm_cons (SCM_CAR (fd2), SCM_CDR (fd1))); } else { @@ -290,15 +297,14 @@ main (int argc, char *argv[]) } } else if (mode == 2 && port != 0) { - scm_with_guile (&init_gacela, NULL); - load_scheme_files (dirname (argv[0])); + init_gacela (dirname (argv[0])); start_server (port); } else if (mode == 3 && port != 0) start_remote_client (host, port); else { - scm_with_guile (&init_gacela, NULL); - load_scheme_files (dirname (argv[0])); + init_gacela (dirname (argv[0])); scm_shell (argc, argv); + SDL_Quit (); } } diff --git a/src/gacela.scm b/src/gacela.scm index aeea861..6a0b501 100644 --- a/src/gacela.scm +++ b/src/gacela.scm @@ -17,10 +17,12 @@ ;;; Default values for Gacela +(define *title* "Gacela") (define *width-screen* 640) (define *height-screen* 480) (define *bpp-screen* 32) (define *frames-per-second* 20) +(define *mode* '2d) ;;; SDL Initialization Subsystem @@ -81,7 +83,9 @@ (resize-screen-GL width height))))) (set! quit-video-mode - (lambda () (set! screen #f)))) + (lambda () + (SDL_FreeSurface screen) + (set! screen #f)))) (define (set-2d-mode) (cond ((not (3d-mode?)) @@ -187,7 +191,7 @@ (define set-game-properties #f) (define get-game-properties #f) -(let ((ptitle "") (pwidth *width-screen*) (pheight *height-screen*) (pbpp *bpp-screen*) (pfps *frames-per-second*) (pmode '2d)) +(let ((ptitle *title*) (pwidth *width-screen*) (pheight *height-screen*) (pbpp *bpp-screen*) (pfps *frames-per-second*) (pmode *mode*)) (set! set-game-properties (lambda* (#:key title width height bpp fps mode) ; (init-video-mode) @@ -261,12 +265,3 @@ (set! set-game-code (lambda (game-function) (set! game-code game-function)))) - -(define (quit-game) - (quit-audio) - (quit-video-mode) -; (quit-all-mobs) -; (kill-all-objects) -; (clear-events) - (quit-events) - (quit-sdl)) diff --git a/src/gacela_GL.c b/src/gacela_GL.c index 7e232bb..da64a2e 100644 --- a/src/gacela_GL.c +++ b/src/gacela_GL.c @@ -76,6 +76,18 @@ get_glTexture_height (SCM glTexture_smob) return scm_from_int (glTexture->height); } +SCM +set_glTexture_size (SCM glTexture_smob, SCM width, SCM height) +{ + struct glTexture *glTexture; + + scm_assert_smob_type (glTexture_tag, glTexture_smob); + glTexture = (struct glTexture *) SCM_SMOB_DATA (glTexture_smob); + glTexture->width = scm_to_int (width); + glTexture->height = scm_to_int (height); + return SCM_UNSPECIFIED; +} + size_t free_glTexture (SCM glTexture_smob) { @@ -369,6 +381,7 @@ GL_register_functions (void* data) scm_set_smob_free (glTexture_tag, free_glTexture); scm_c_define_gsubr ("texture-w", 1, 0, 0, get_glTexture_width); scm_c_define_gsubr ("texture-h", 1, 0, 0, get_glTexture_height); + scm_c_define_gsubr ("set-texture-size!", 3, 0, 0, set_glTexture_size); // Data types scm_c_define ("GL_UNSIGNED_BYTE", scm_from_int (GL_UNSIGNED_BYTE)); diff --git a/src/gacela_SDL.c b/src/gacela_SDL.c index ba47328..7977444 100644 --- a/src/gacela_SDL.c +++ b/src/gacela_SDL.c @@ -164,6 +164,12 @@ gacela_SDL_SetVideoMode (SCM width, SCM height, SCM bpp, SCM flags) } } +SCM +gacela_SDL_FreeSurface (SCM surface) +{ + return scm_from_int (free_surface (surface)); +} + SCM gacela_SDL_WM_SetCaption (SCM title, SCM icon) { @@ -465,6 +471,7 @@ SDL_register_functions (void* data) scm_c_define_gsubr ("SDL_Init", 1, 0, 0, gacela_SDL_Init); scm_c_define_gsubr ("SDL_Quit", 0, 0, 0, gacela_SDL_Quit); scm_c_define_gsubr ("SDL_SetVideoMode", 4, 0, 0, gacela_SDL_SetVideoMode); + scm_c_define_gsubr ("SDL_FreeSurface", 1, 0, 0, gacela_SDL_FreeSurface); scm_c_define_gsubr ("SDL_WM_SetCaption", 2, 0, 0, gacela_SDL_WM_SetCaption); scm_c_define_gsubr ("SDL_Flip", 1, 0, 0, gacela_SDL_Flip); scm_c_define_gsubr ("SDL_Delay", 1, 0, 0, gacela_SDL_Delay); diff --git a/src/gacela_draw.scm b/src/gacela_draw.scm index 8870529..184eba2 100644 --- a/src/gacela_draw.scm +++ b/src/gacela_draw.scm @@ -93,6 +93,7 @@ (glTexImage2D GL_TEXTURE_2D 0 3 width height 0 byteorder GL_UNSIGNED_BYTE (surface-pixels image)) (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER min-filter) (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER mag-filter) + (set-texture-size! texture real-w real-h) texture)))))) (define* (draw-image filename #:optional (zoom 1)) @@ -121,12 +122,13 @@ (draw v1 v2 v3 v4)))) (define* (draw-rectangle width height #:key texture color) - (draw-quad (list (- width) height 0) - (list width height 0) - (list width (- height) 0) - (list (- width) (- height) 0) - #:texture texture - #:color color)) + (let ((w (/ width 2)) (h (/ height 2))) + (draw-quad (list (- w) h 0) + (list w h 0) + (list w (- h) 0) + (list (- w) (- h) 0) + #:texture texture + #:color color))) (define* (draw-square #:key (size 1) texture color) (draw-rectangle size size #:texture texture #:color color)) diff --git a/src/gacela_mobs.scm b/src/gacela_mobs.scm index 5e15907..ed55a00 100755 --- a/src/gacela_mobs.scm +++ b/src/gacela_mobs.scm @@ -20,6 +20,7 @@ (define show-mob-hash #f) (define hide-mob-hash #f) (define get-active-mobs #f) +(define clear-active-mobs #f) (define mobs-changed? #f) (let ((active-mobs (make-hash-table)) (changed #f)) @@ -38,6 +39,11 @@ (set! changed (not refreshed)) (hash-map->list (lambda (k v) v) active-mobs))) + (set! clear-active-mobs + (lambda () + (set! changed #t) + (hash-clear! active-mobs))) + (set! mobs-changed? (lambda () changed))) -- 2.39.5