aboutsummaryrefslogtreecommitdiff
path: root/modules/mod_grproc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mod_grproc')
-rw-r--r--modules/mod_grproc/Makefile609
-rw-r--r--modules/mod_grproc/Makefile.am14
-rw-r--r--modules/mod_grproc/Makefile.in609
-rw-r--r--modules/mod_grproc/mod_grproc.c957
-rw-r--r--modules/mod_grproc/mod_grproc_exports.h84
5 files changed, 2273 insertions, 0 deletions
diff --git a/modules/mod_grproc/Makefile b/modules/mod_grproc/Makefile
new file mode 100644
index 0000000..c54f8a4
--- /dev/null
+++ b/modules/mod_grproc/Makefile
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# mod_grproc/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2012 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/bennu
+pkgincludedir = $(includedir)/bennu
+pkglibdir = $(libdir)/bennu
+pkglibexecdir = $(libexecdir)/bennu
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-pc-none
+host_triplet = arm-unknown-linux-gnu
+target_triplet = arm-unknown-linux-gnu
+subdir = mod_grproc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libmod_grproc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libmod_grproc_la_OBJECTS = libmod_grproc_la-mod_grproc.lo
+libmod_grproc_la_OBJECTS = $(am_libmod_grproc_la_OBJECTS)
+libmod_grproc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmod_grproc_la_CFLAGS) \
+ $(CFLAGS) $(libmod_grproc_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libmod_grproc_la_SOURCES)
+DIST_SOURCES = $(libmod_grproc_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run aclocal-1.12
+AMTAR = $${TAR-tar}
+AR = /opt/miyoo/usr/bin/arm-linux-ar
+AS = as
+AUTOCONF = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run automake-1.12
+AWK = mawk
+BGD_PATH = /home/steward/Github/miyoo_src/bennugd/modules/../core
+CC = /opt/miyoo/usr/bin/arm-linux-gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -O2 -finline-functions -fno-strict-aliasing -Wall -DTARGET_LINUX -DUSE_LIBDES -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b
+COMMON_CFLAGS = -Wall -DTARGET_LINUX -DUSE_LIBDES -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b
+COMMON_LDFLAGS = -lc -ldl -D_REENTRANT -L/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b -ldes
+CPP = /opt/miyoo/usr/bin/arm-linux-gcc -E
+CPPFLAGS =
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"bennu\" -DPACKAGE_TARNAME=\"bennu\" -DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"bennu\ 1.0.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DPACKAGE=\"bennu\" -DVERSION=\"1.0.0\" -DHAVE_LIBM=1
+DEPDIR = .deps
+DESLIBS =
+DLLTOOL = false
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /opt/miyoo/usr/bin/arm-linux-ld
+LDFLAGS = -D_REENTRANT
+LIBOBJS =
+LIBS = -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /bin/mkdir -p
+NM = /opt/miyoo/bin//arm-linux-nm -B
+NMEDIT =
+OBJDUMP = arm-linux-objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = bennu
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = bennu
+PACKAGE_STRING = bennu 1.0.0
+PACKAGE_TARNAME = bennu
+PACKAGE_URL =
+PACKAGE_VERSION = 1.0.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = /opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib/pkgconfig
+PKG_CONFIG_PATH = /opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib/pkgconfig
+PNGLIBS =
+PNG_CFLAGS = -I/usr/include/libpng16
+PNG_LIBS = -lpng16 -lz
+RANLIB = /opt/miyoo/usr/bin/arm-linux-ranlib
+SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+SDL_LIBS = -lSDL -lpthread
+SDL_mixer_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+SDL_mixer_LIBS = -lSDL_mixer -lSDL -lpthread
+SED = /bin/sed
+SET_MAKE =
+SHELL = /bin/bash
+STRIP = /opt/miyoo/usr/bin/arm-linux-strip
+VERSION = 1.0.0
+WINDRES =
+X11LIBS = -lX11
+ZLIBS =
+ZLIB_CFLAGS =
+ZLIB_LIBS = -lz
+abs_builddir = /home/steward/Github/miyoo_src/bennugd/modules/mod_grproc
+abs_srcdir = /home/steward/Github/miyoo_src/bennugd/modules/mod_grproc
+abs_top_builddir = /home/steward/Github/miyoo_src/bennugd/modules
+abs_top_srcdir = /home/steward/Github/miyoo_src/bennugd/modules
+ac_ct_AR =
+ac_ct_CC =
+ac_ct_DUMPBIN =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-pc-none
+build_alias = x86_64
+build_cpu = x86_64
+build_os = none
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = arm-unknown-linux-gnu
+host_alias = arm-linux
+host_cpu = arm
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /opt/miyoo/usr
+program_transform_name = s&^&arm-linux-&
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = arm-unknown-linux-gnu
+target_alias = arm-linux
+target_cpu = arm
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+lib_LTLIBRARIES = libmod_grproc.la
+libmod_grproc_la_SOURCES = mod_grproc.c
+libmod_grproc_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../librender/ -I../libblit/ -I../libvideo/ -I../libgrbase/ -I../libscroll/
+libmod_grproc_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libmod_grproc_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libvideo/.libs -lvideo -L../libgrbase/.libs -lgrbase
+CLEANFILES = libmod_grproc.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mod_grproc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu mod_grproc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libmod_grproc.la: $(libmod_grproc_la_OBJECTS) $(libmod_grproc_la_DEPENDENCIES) $(EXTRA_libmod_grproc_la_DEPENDENCIES)
+ $(libmod_grproc_la_LINK) -rpath $(libdir) $(libmod_grproc_la_OBJECTS) $(libmod_grproc_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include ./$(DEPDIR)/libmod_grproc_la-mod_grproc.Plo
+
+.c.o:
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+# source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(LTCOMPILE) -c -o $@ $<
+
+libmod_grproc_la-mod_grproc.lo: mod_grproc.c
+ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_grproc_la_CFLAGS) $(CFLAGS) -MT libmod_grproc_la-mod_grproc.lo -MD -MP -MF $(DEPDIR)/libmod_grproc_la-mod_grproc.Tpo -c -o libmod_grproc_la-mod_grproc.lo `test -f 'mod_grproc.c' || echo '$(srcdir)/'`mod_grproc.c
+ $(am__mv) $(DEPDIR)/libmod_grproc_la-mod_grproc.Tpo $(DEPDIR)/libmod_grproc_la-mod_grproc.Plo
+# source='mod_grproc.c' object='libmod_grproc_la-mod_grproc.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_grproc_la_CFLAGS) $(CFLAGS) -c -o libmod_grproc_la-mod_grproc.lo `test -f 'mod_grproc.c' || echo '$(srcdir)/'`mod_grproc.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(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; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ 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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(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)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+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"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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.
+.NOEXPORT:
diff --git a/modules/mod_grproc/Makefile.am b/modules/mod_grproc/Makefile.am
new file mode 100644
index 0000000..08a9b6b
--- /dev/null
+++ b/modules/mod_grproc/Makefile.am
@@ -0,0 +1,14 @@
+## Process this file with automake to produce Makefile.in
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+lib_LTLIBRARIES = libmod_grproc.la
+
+libmod_grproc_la_SOURCES = mod_grproc.c
+libmod_grproc_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../librender/ -I../libblit/ -I../libvideo/ -I../libgrbase/ -I../libscroll/
+libmod_grproc_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libmod_grproc_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libvideo/.libs -lvideo -L../libgrbase/.libs -lgrbase
+
+## Make sure these will be cleaned even when they're not built by
+## default.
+CLEANFILES = libmod_grproc.la
diff --git a/modules/mod_grproc/Makefile.in b/modules/mod_grproc/Makefile.in
new file mode 100644
index 0000000..a118fdc
--- /dev/null
+++ b/modules/mod_grproc/Makefile.in
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = mod_grproc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libmod_grproc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libmod_grproc_la_OBJECTS = libmod_grproc_la-mod_grproc.lo
+libmod_grproc_la_OBJECTS = $(am_libmod_grproc_la_OBJECTS)
+libmod_grproc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmod_grproc_la_CFLAGS) \
+ $(CFLAGS) $(libmod_grproc_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libmod_grproc_la_SOURCES)
+DIST_SOURCES = $(libmod_grproc_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BGD_PATH = @BGD_PATH@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_CFLAGS = @COMMON_CFLAGS@
+COMMON_LDFLAGS = @COMMON_LDFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DESLIBS = @DESLIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PNGLIBS = @PNGLIBS@
+PNG_CFLAGS = @PNG_CFLAGS@
+PNG_LIBS = @PNG_LIBS@
+RANLIB = @RANLIB@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SDL_mixer_CFLAGS = @SDL_mixer_CFLAGS@
+SDL_mixer_LIBS = @SDL_mixer_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+X11LIBS = @X11LIBS@
+ZLIBS = @ZLIBS@
+ZLIB_CFLAGS = @ZLIB_CFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LTLIBRARIES = libmod_grproc.la
+libmod_grproc_la_SOURCES = mod_grproc.c
+libmod_grproc_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../librender/ -I../libblit/ -I../libvideo/ -I../libgrbase/ -I../libscroll/
+libmod_grproc_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libmod_grproc_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libvideo/.libs -lvideo -L../libgrbase/.libs -lgrbase
+CLEANFILES = libmod_grproc.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mod_grproc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu mod_grproc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libmod_grproc.la: $(libmod_grproc_la_OBJECTS) $(libmod_grproc_la_DEPENDENCIES) $(EXTRA_libmod_grproc_la_DEPENDENCIES)
+ $(libmod_grproc_la_LINK) -rpath $(libdir) $(libmod_grproc_la_OBJECTS) $(libmod_grproc_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_grproc_la-mod_grproc.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libmod_grproc_la-mod_grproc.lo: mod_grproc.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_grproc_la_CFLAGS) $(CFLAGS) -MT libmod_grproc_la-mod_grproc.lo -MD -MP -MF $(DEPDIR)/libmod_grproc_la-mod_grproc.Tpo -c -o libmod_grproc_la-mod_grproc.lo `test -f 'mod_grproc.c' || echo '$(srcdir)/'`mod_grproc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmod_grproc_la-mod_grproc.Tpo $(DEPDIR)/libmod_grproc_la-mod_grproc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mod_grproc.c' object='libmod_grproc_la-mod_grproc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_grproc_la_CFLAGS) $(CFLAGS) -c -o libmod_grproc_la-mod_grproc.lo `test -f 'mod_grproc.c' || echo '$(srcdir)/'`mod_grproc.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(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; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ 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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(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)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+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"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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.
+.NOEXPORT:
diff --git a/modules/mod_grproc/mod_grproc.c b/modules/mod_grproc/mod_grproc.c
new file mode 100644
index 0000000..537716f
--- /dev/null
+++ b/modules/mod_grproc/mod_grproc.c
@@ -0,0 +1,957 @@
+/*
+ * Copyright © 2006-2016 SplinterGU (Fenix/Bennugd)
+ * Copyright © 2002-2006 Fenix Team (Fenix)
+ * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
+ *
+ * This file is part of Bennu - Game Development
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+/* --------------------------------------------------------------------------- */
+
+#include <stdlib.h>
+
+#include "bgdrtm.h"
+#include "bgddl.h"
+#include "dlvaracc.h"
+#include "fmath.h"
+
+#include "libgrbase.h"
+#include "libvideo.h"
+#include "librender.h"
+#include "libblit.h"
+#include "resolution.h"
+
+#include "libscroll.h"
+
+/* --------------------------------------------------------------------------- */
+
+enum {
+ COLLISION_NORMAL = 0,
+ COLLISION_BOX,
+ COLLISION_CIRCLE
+};
+
+/* --------------------------------------------------------------------------- */
+
+/* Locals */
+
+enum {
+ GRPROC_TYPE_SCAN = 0,
+ GRPROC_ID_SCAN,
+ GRPROC_CONTEXT,
+ PROCESS_ID,
+ PROCESS_TYPE,
+ STATUS,
+ CTYPE,
+ CNUMBER,
+ COORDX,
+ COORDY,
+ ANGLE,
+ GRAPHSIZE,
+ GRAPHSIZEX,
+ GRAPHSIZEY,
+ FLAGS,
+ REGIONID,
+ RESOLUTION,
+ XGRAPH
+};
+
+/* Globals */
+
+enum {
+ MOUSEX = 0,
+ MOUSEY,
+ SCROLLS
+};
+
+/* ----------------------------------------------------------------- */
+
+DLVARFIXUP __bgdexport( mod_grproc, locals_fixup )[] =
+{
+ /* Nombre de variable local, offset al dato, tamaño del elemento, cantidad de elementos */
+ { "_mod_grproc_reserved.type_scan" , NULL, -1, -1 },
+ { "_mod_grproc_reserved.id_scan" , NULL, -1, -1 },
+ { "_mod_grproc_reserved.context" , NULL, -1, -1 },
+
+ { "id" , NULL, -1, -1 },
+ { "reserved.process_type" , NULL, -1, -1 },
+ { "reserved.status" , NULL, -1, -1 },
+
+ { "ctype" , NULL, -1, -1 },
+ { "cnumber" , NULL, -1, -1 },
+
+ { "x" , NULL, -1, -1 },
+ { "y" , NULL, -1, -1 },
+
+ { "angle" , NULL, -1, -1 },
+ { "size" , NULL, -1, -1 },
+ { "size_x" , NULL, -1, -1 },
+ { "size_y" , NULL, -1, -1 },
+ { "flags" , NULL, -1, -1 },
+
+ { "region" , NULL, -1, -1 },
+ { "resolution" , NULL, -1, -1 },
+ { "xgraph" , NULL, -1, -1 },
+
+ { NULL , NULL, -1, -1 }
+};
+
+/* --------------------------------------------------------------------------- */
+
+DLVARFIXUP __bgdexport( mod_grproc, globals_fixup )[] =
+{
+ /* Nombre de variable global, puntero al dato, tamaño del elemento, cantidad de elementos */
+
+ { "mouse.x" , NULL, -1, -1 },
+ { "mouse.y" , NULL, -1, -1 },
+ { "scroll" , NULL, -1, -1 },
+
+ { NULL , NULL, -1, -1 }
+};
+
+/* --------------------------------------------------------------------------- */
+/* Funciones del sistema */
+/* --------------------------------------------------------------------------- */
+
+static int grproc_advance( INSTANCE * my, int * params )
+{
+ int angle = LOCINT32( mod_grproc, my, ANGLE ) ;
+ LOCINT32( mod_grproc, my, COORDX ) += fixtoi( fmul( fcos( angle ), itofix( params[0] ) ) ) ;
+ LOCINT32( mod_grproc, my, COORDY ) -= fixtoi( fmul( fsin( angle ), itofix( params[0] ) ) ) ;
+ return 1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_xadvance( INSTANCE * my, int * params )
+{
+ int angle = params[0] ;
+ LOCINT32( mod_grproc, my, COORDX ) += fixtoi( fmul( fcos( angle ), itofix( params[1] ) ) ) ;
+ LOCINT32( mod_grproc, my, COORDY ) -= fixtoi( fmul( fsin( angle ), itofix( params[1] ) ) ) ;
+ return 1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_get_angle( INSTANCE * my, int * params )
+{
+ INSTANCE * b = instance_get( params[0] ) ;
+
+ if ( my && b )
+ {
+ double dx = ( double )(( int )( LOCINT32( mod_grproc, b, COORDX ) - LOCINT32( mod_grproc, my, COORDX ) ) ) ;
+ double dy = ( double )(( int )( LOCINT32( mod_grproc, b, COORDY ) - LOCINT32( mod_grproc, my, COORDY ) ) ) ;
+ int angle ;
+
+ if ( dx == 0 ) return ( dy > 0 ) ? 270000L : 90000L ;
+
+ angle = ( int )( atan( dy / dx ) * 180000.0 / M_PI ) ;
+
+ return ( dx > 0 ) ? -angle : -angle + 180000L ;
+ }
+ return -1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+#define RESOLXY_RES(x,y,res) \
+ { \
+ if ( res > 0 ) \
+ { \
+ if ( x < 0 ) \
+ ( x ) = ( ( x ) - ( res - 1 )) / res ; \
+ else \
+ ( x ) /= res ; \
+ \
+ if ( y < 0 ) \
+ ( y ) = ( ( y ) - ( res - 1 )) / res ; \
+ else \
+ ( y ) /= res ; \
+ } \
+ else if ( res < 0 ) \
+ { \
+ ( x ) *= -res ; \
+ ( y ) *= -res ; \
+ } \
+ }
+
+/* --------------------------------------------------------------------------- */
+
+static int inline get_distance( int x1, int y1, int r1, int x2, int y2, int r2 )
+{
+ RESOLXY_RES( x1, y1, r1 );
+ RESOLXY_RES( x2, y2, r2 );
+
+ double dx = ( x2 - x1 ) * ( x2 - x1 ) ;
+ double dy = ( y2 - y1 ) * ( y2 - y1 ) ;
+
+ if ( r1 > 0 ) return ( int )sqrt( dx + dy ) * r1 ;
+ else if ( r1 < 0 ) return ( int )sqrt( dx + dy ) / -r1 ;
+
+ return ( int )sqrt( dx + dy ) ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int inline get_distance_xy( INSTANCE * a, int x2, int y2, int r2 )
+{
+ if ( a )
+ {
+ int x1, y1;
+ int res = LOCINT32( mod_grproc, a, RESOLUTION ) ;
+
+ x1 = LOCINT32( mod_grproc, a, COORDX ) ;
+ y1 = LOCINT32( mod_grproc, a, COORDY ) ;
+
+ RESOLXY( mod_grproc, a, x1, y1 );
+
+ RESOLXY_RES( x2, y2, r2 );
+
+ double dx = ( x2 - x1 ) * ( x2 - x1 ) ;
+ double dy = ( y2 - y1 ) * ( y2 - y1 ) ;
+
+ if ( res > 0 ) return ( int )sqrt( dx + dy ) * res ;
+ else if ( res < 0 ) return ( int )sqrt( dx + dy ) / -res ;
+
+ return ( int )sqrt( dx + dy ) ;
+ }
+
+ return -1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int get_distance_proc( INSTANCE * a, INSTANCE * b )
+{
+ if ( a && b ) return ( get_distance_xy( a, LOCINT32( mod_grproc, b, COORDX ), LOCINT32( mod_grproc, b, COORDY ), LOCINT32( mod_grproc, b, RESOLUTION ) ) ) ;
+ return -1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_get_dist( INSTANCE * a, int * params )
+{
+ return ( get_distance_proc( a, instance_get( params[0] ) ) );
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_get_real_point( INSTANCE * my, int * params )
+{
+ GRAPH * b ;
+ int x, y, r, centerx, centery, px = 0, py = 0, rx = 0, ry = 0 ;
+ int _angle = 0, angle = 0;
+
+ b = instance_graph( my ) ;
+ if ( !b ) return 0 ;
+
+ /* Point 0 is the graphic center, but it may be not defined */
+ if ( params[0] == 0 && ( b->ncpoints == 0 || b->cpoints[0].x == CPOINT_UNDEFINED ) )
+ {
+ if ( b->ncpoints == 0 )
+ bitmap_add_cpoint( b, b->width / 2, b->height / 2 );
+ else
+ {
+ b->cpoints[0].x = b->width / 2;
+ b->cpoints[0].y = b->height / 2;
+ }
+ }
+ else
+ if (( uint32_t )params[0] >= b->ncpoints || params[0] < 0)
+ return 0 ;
+
+ if ( b->cpoints[params[0]].x == CPOINT_UNDEFINED && b->cpoints[params[0]].y == CPOINT_UNDEFINED )
+ return 0;
+
+ r = LOCINT32( mod_grproc, my, REGIONID ) ;
+ if ( r < 0 || r > 31 ) r = 0 ;
+
+ if ( b->cpoints[0].x != CPOINT_UNDEFINED && b->cpoints[0].y != CPOINT_UNDEFINED )
+ {
+ centerx = b->cpoints[0].x ;
+ centery = b->cpoints[0].y ;
+ }
+ else
+ {
+ centerx = b->width / 2 ;
+ centery = b->height / 2 ;
+ }
+
+
+ if ( LOCINT32( mod_grproc, my, ANGLE ) != 0 && !LOCDWORD( mod_grproc, my, XGRAPH ) )
+ {
+ _angle = angle = LOCINT32( mod_grproc, my, ANGLE ) ;
+ }
+
+/* if ( b->cpoints[params[0]].x >= 0 )
+ {
+ if ( LOCDWORD( mod_grproc, my, FLAGS ) & B_HMIRROR )
+ px = centerx - b->cpoints[params[0]].x - 1 ;
+ else
+ px = b->cpoints[params[0]].x - centerx ;
+
+ if ( LOCDWORD( mod_grproc, my, FLAGS ) & B_VMIRROR )
+ py = centery - b->cpoints[params[0]].y - 1 ;
+ else
+ py = b->cpoints[params[0]].y - centery ;
+ }
+ else
+ px = py = 0 ; */
+
+ if ( params[0] > 0 )
+ {
+ px = b->cpoints[params[0]].x - centerx ;
+ py = b->cpoints[params[0]].y - centery ;
+
+ if ( LOCDWORD( mod_grproc, my, FLAGS ) & B_HMIRROR )
+ {
+ if (_angle)
+ {
+ py = (centery - b->cpoints[params[0]].y) ;
+ angle = 90000 + ( 90000 - angle );
+ }
+ else
+ px = (centerx - b->cpoints[params[0]].x) ;
+ }
+
+ if ( LOCDWORD( mod_grproc, my, FLAGS ) & B_VMIRROR )
+ {
+ if (_angle)
+ {
+ px = (centerx - b->cpoints[params[0]].x) ;
+ angle = 360000 + ( 180000 - angle );
+ }
+ else
+ py = (centery - b->cpoints[params[0]].y) ;
+ }
+ }
+
+ if ( LOCINT32( mod_grproc, my, GRAPHSIZEX ) == 100 && LOCINT32( mod_grproc, my, GRAPHSIZEY ) == 100 )
+ {
+ if ((( int )LOCINT32( mod_grproc, my, GRAPHSIZE ) ) > 0 )
+ {
+ // Corrected a bug from the casting that rounded to 0
+ px = ( int )( px * ( LOCINT32( mod_grproc, my, GRAPHSIZE ) / 100.0F ) ) ;
+ py = ( int )( py * ( LOCINT32( mod_grproc, my, GRAPHSIZE ) / 100.0F ) ) ;
+ }
+ }
+ else
+ {
+ // Adding size_x/size_y control
+ if ( LOCINT32( mod_grproc, my, GRAPHSIZEX ) > 0 )
+ px = ( int )( px * ( LOCINT32( mod_grproc, my, GRAPHSIZEX ) / 100.0F ) ) ;
+
+ if ( LOCINT32( mod_grproc, my, GRAPHSIZEY ) > 0 )
+ py = ( int )( py * ( LOCINT32( mod_grproc, my, GRAPHSIZEY ) / 100.0F ) ) ;
+ }
+
+ if ( angle )
+ {
+ float cos_angle = ( float ) cos( angle * M_PI / -180000.0 );
+ float sin_angle = ( float ) sin( angle * M_PI / -180000.0 );
+
+ rx = ( int )(( double )px * cos_angle - ( double )py * sin_angle ) ;
+ ry = ( int )(( double )px * sin_angle + ( double )py * cos_angle ) ;
+
+ px = rx ;
+ py = ry ;
+ }
+
+ x = LOCINT32( mod_grproc, my, COORDX ) ;
+ y = LOCINT32( mod_grproc, my, COORDY ) ;
+
+ RESOLXY( mod_grproc, my, x, y );
+
+ rx = x + px ;
+ ry = y + py ;
+
+ if ( LOCINT32( mod_grproc, my, RESOLUTION ) > 0 )
+ {
+ rx *= LOCINT32( mod_grproc, my, RESOLUTION );
+ ry *= LOCINT32( mod_grproc, my, RESOLUTION );
+ }
+ else if ( LOCINT32( mod_grproc, my, RESOLUTION ) < 0 )
+ {
+ rx /= -LOCINT32( mod_grproc, my, RESOLUTION );
+ ry /= -LOCINT32( mod_grproc, my, RESOLUTION );
+ }
+
+ *( int * )params[1] = rx ;
+ *( int * )params[2] = ry ;
+
+ return 1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+/* Rutinas de utilidad local */
+
+static void draw_at( GRAPH * dest, int x, int y, REGION * r, INSTANCE * i )
+{
+ GRAPH * map ;
+ int scalex, scaley;
+
+ scalex = LOCINT32( mod_grproc, i, GRAPHSIZEX );
+ scaley = LOCINT32( mod_grproc, i, GRAPHSIZEY );
+ if ( scalex == 100 && scaley == 100 ) scalex = scaley = LOCINT32( mod_grproc, i, GRAPHSIZE );
+
+ map = instance_graph( i ) ;
+ if ( !map ) return ;
+
+ // PATCH - XGRAPH DOES NOT ROTATE DESTINATION GRAPHIC
+ if ( LOCINT32( mod_grproc, i, ANGLE ) || scaley != 100 || scalex != 100 )
+ {
+ if ( LOCDWORD( mod_grproc, i, XGRAPH ) && scalex == 100 && scaley == 100 )
+ {
+ gr_blit( dest, r, x, y, LOCDWORD( mod_grproc, i, FLAGS ) & ( B_HMIRROR | B_VMIRROR ), map ) ;
+ }
+ else
+ {
+ if ( LOCDWORD( mod_grproc, i, XGRAPH ) )
+ {
+ gr_rotated_blit( dest, r, x, y, LOCDWORD( mod_grproc, i, FLAGS ) & ( B_HMIRROR | B_VMIRROR ), 0, scalex, scaley, map ) ;
+ }
+ else
+ {
+ gr_rotated_blit( dest, r, x, y, LOCDWORD( mod_grproc, i, FLAGS ) & ( B_HMIRROR | B_VMIRROR ), LOCINT32( mod_grproc, i, ANGLE ), scalex, scaley, map ) ;
+ }
+ }
+ }
+ else
+ {
+ gr_blit( dest, r, x, y, LOCDWORD( mod_grproc, i, FLAGS ) & ( B_HMIRROR | B_VMIRROR ), map ) ;
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int get_bbox( REGION * bbox, INSTANCE * proc )
+{
+ GRAPH * b ;
+ int x, y ;
+ int scalex, scaley ;
+
+ b = instance_graph( proc ) ;
+ if ( !b ) return 0 ;
+
+ scalex = LOCINT32( mod_grproc, proc, GRAPHSIZEX );
+ scaley = LOCINT32( mod_grproc, proc, GRAPHSIZEY );
+ if ( scalex == 100 && scaley == 100 ) scalex = scaley = LOCINT32( mod_grproc, proc, GRAPHSIZE );
+
+ x = LOCINT32( mod_grproc, proc, COORDX ) ;
+ y = LOCINT32( mod_grproc, proc, COORDY ) ;
+
+ RESOLXY( mod_grproc, proc, x, y );
+
+ gr_get_bbox( bbox, 0, x, y, LOCDWORD( mod_grproc, proc, FLAGS ) & ( B_HMIRROR | B_VMIRROR ), LOCINT32( mod_grproc, proc, ANGLE ), scalex, scaley, b ) ;
+
+ return 1 ;
+}
+
+/* --------------------------------------------------------------------------- */
+/* Colisiones */
+
+static int check_collision_with_mouse( INSTANCE * proc1, int colltype )
+{
+ REGION bbox1, bbox2 ;
+ int x, y, mx, my ;
+ static GRAPH * bmp = NULL;
+
+ switch ( colltype )
+ {
+ case COLLISION_BOX:
+ case COLLISION_CIRCLE:
+ if ( !get_bbox( &bbox2, proc1 ) ) return 0 ;
+
+ case COLLISION_NORMAL:
+ break;
+
+ default:
+ return 0;
+ }
+
+ mx = GLOINT32( mod_grproc, MOUSEX ) ;
+ my = GLOINT32( mod_grproc, MOUSEY ) ;
+
+ /* Checks the process's bounding box to optimize checking
+ (only for screen-type objects) */
+
+ if ( LOCDWORD( mod_grproc, proc1, CTYPE ) == C_SCREEN )
+ {
+ switch ( colltype )
+ {
+ case COLLISION_NORMAL:
+ if ( !get_bbox( &bbox2, proc1 ) ) return 0 ;
+ if ( bbox2.x > mx || bbox2.x2 < mx || bbox2.y > my || bbox2.y2 < my ) return 0 ;
+ break;
+
+ case COLLISION_BOX:
+ if ( bbox2.x <= mx && bbox2.x2 >= mx && bbox2.y <= my && bbox2.y2 >= my ) return 1;
+ return 0;
+ break;
+
+ case COLLISION_CIRCLE:
+ {
+ int cx1, cy1, dx1, dy1;
+
+ cx1 = bbox2.x + ( dx1 = ( bbox2.x2 - bbox2.x + 1 ) ) / 2 ;
+ cy1 = bbox2.y + ( dy1 = ( bbox2.y2 - bbox2.y + 1 ) ) / 2 ;
+
+ if ( get_distance( cx1, cy1, 0, mx, my, 0 ) < ( dx1 + dy1 ) / 4 ) return 1;
+ return 0;
+ break;
+ }
+ }
+ }
+
+ /* Creates a temporary bitmap (only once) */
+
+ if ( colltype == COLLISION_NORMAL )
+ {
+ /* maybe must force this to 32 bits */
+ if ( bmp && bmp->format->depth != sys_pixel_format->depth ) { bitmap_destroy( bmp ); bmp = NULL; }
+ if ( !bmp ) bmp = bitmap_new( 0, 2, 1, sys_pixel_format->depth ) ;
+ if ( !bmp ) return 0 ;
+
+ memset( bmp->data, 0, bmp->pitch * bmp->height ) ;
+ }
+
+ /* Retrieves process information */
+
+ bbox1.x = 0 ; bbox1.x2 = 1 ;
+ bbox1.y = 0 ; bbox1.y2 = 0 ;
+
+ x = LOCINT32( mod_grproc, proc1, COORDX ) ;
+ y = LOCINT32( mod_grproc, proc1, COORDY ) ;
+
+ RESOLXY( mod_grproc, proc1, x, y );
+
+ /* Scroll-type process: check for each region */
+
+ if ( LOCDWORD( mod_grproc, proc1, CTYPE ) == C_SCROLL )
+ {
+ SCROLL_EXTRA_DATA * data;
+ scrolldata * scroll;
+ int i;
+
+ if ( GLOEXISTS( mod_grproc, SCROLLS ) )
+ {
+ int cnumber = LOCDWORD( mod_grproc, proc1, CNUMBER );
+ if ( !cnumber ) cnumber = 0xffffffff ;
+
+ for ( i = 0 ; i < 10 ; i++ )
+ {
+ data = &(( SCROLL_EXTRA_DATA * ) & GLODWORD( mod_grproc, SCROLLS ) )[i] ;
+ scroll = ( scrolldata * ) data->reserved[0];
+
+ if ( scroll && scroll->active && ( cnumber & ( 1 << i ) ) )
+ {
+ REGION * r = scroll->region;
+
+ switch ( colltype )
+ {
+ case COLLISION_NORMAL:
+ if ( r->x > mx || r->x2 < mx || r->y > my || r->y2 < my ) continue;
+
+ draw_at( bmp, x + r->x - mx - scroll->posx0, y + r->y - my - scroll->posy0, &bbox1, proc1 );
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ if ( *( uint8_t * )bmp->data ) return 1;
+ break;
+
+ case 16:
+ if ( *( uint16_t * )bmp->data ) return 1;
+ break;
+
+ case 32:
+ if ( *( uint32_t * )bmp->data ) return 1;
+ break;
+ }
+ break;
+
+ case COLLISION_BOX:
+ if ( bbox2.x <= scroll->posx0 + r->x + mx && bbox2.x2 >= scroll->posx0 + r->x + mx &&
+ bbox2.y <= scroll->posy0 + r->y + my && bbox2.y2 >= scroll->posy0 + r->y + my ) return 1;
+ break;
+
+ case COLLISION_CIRCLE:
+ {
+ int cx1, cy1, dx1, dy1;
+
+ cx1 = bbox2.x + ( dx1 = ( bbox2.x2 - bbox2.x + 1 ) ) / 2 ;
+ cy1 = bbox2.y + ( dy1 = ( bbox2.y2 - bbox2.y + 1 ) ) / 2 ;
+
+ if ( get_distance( cx1, cy1, 0, r->x + mx + scroll->posx0, r->y + my + scroll->posy0, 0 ) < ( dx1 + dy1 ) / 4 ) return 1;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return 0;
+ }
+
+ switch ( colltype )
+ {
+ case COLLISION_NORMAL:
+ /* Collision check (blits into temporary space and checks the resulting pixel) */
+ draw_at( bmp, x - mx, y - my, &bbox1, proc1 ) ;
+
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ if ( *( uint8_t * )bmp->data ) return 1;
+ break;
+
+ case 16:
+ if ( *( uint16_t * )bmp->data ) return 1;
+ break;
+
+ case 32:
+ if ( *( uint32_t * )bmp->data ) return 1;
+ break;
+ }
+ break;
+
+ case COLLISION_BOX:
+ if ( bbox2.x <= mx && bbox2.x2 >= mx &&
+ bbox2.y <= my && bbox2.y2 >= my ) return 1;
+ break;
+
+ case COLLISION_CIRCLE:
+ {
+ int cx1, cy1, dx1, dy1;
+
+ cx1 = bbox2.x + ( dx1 = ( bbox2.x2 - bbox2.x + 1 ) ) / 2 ;
+ cy1 = bbox2.y + ( dy1 = ( bbox2.y2 - bbox2.y + 1 ) ) / 2 ;
+
+ if ( get_distance( cx1, cy1, 0, mx, my, 0 ) < ( dx1 + dy1 ) / 4 ) return 1;
+ break;
+ }
+ }
+
+ return 0 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int check_collision_circle( INSTANCE * proc1, REGION * bbox1, INSTANCE * proc2 )
+{
+ REGION bbox2 ;
+ GRAPH * bmp ;
+ int cx1, cy1, cx2, cy2, dx1, dy1, dx2, dy2;
+
+ bmp = instance_graph( proc2 ) ; if ( !bmp ) return 0 ;
+ instance_get_bbox( proc2, bmp, &bbox2 );
+
+ cx1 = bbox1->x + ( dx1 = ( bbox1->x2 - bbox1->x + 1 ) ) / 2 ;
+ cy1 = bbox1->y + ( dy1 = ( bbox1->y2 - bbox1->y + 1 ) ) / 2 ;
+
+ cx2 = bbox2.x + ( dx2 = ( bbox2.x2 - bbox2.x + 1 ) ) / 2 ;
+ cy2 = bbox2.y + ( dy2 = ( bbox2.y2 - bbox2.y + 1 ) ) / 2 ;
+
+ if ( get_distance( cx1, cy1, 0, cx2, cy2, 0 ) < ( ( dx1 + dy1 ) / 2 + ( dx2 + dy2 ) / 2 ) / 2 ) return 1;
+
+ return 0;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int check_collision_box( INSTANCE * proc1, REGION * bbox1, INSTANCE * proc2 )
+{
+ REGION bbox2 ;
+ GRAPH * bmp ;
+
+ bmp = instance_graph( proc2 ) ; if ( !bmp ) return 0 ;
+ instance_get_bbox( proc2, bmp, &bbox2 );
+
+ region_union( &bbox2, bbox1 ) ;
+ if ( region_is_empty( &bbox2 ) ) return 0 ;
+
+ return 1;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int check_collision( INSTANCE * proc1, REGION * bbox3, INSTANCE * proc2 )
+{
+ REGION bbox1, bbox2 ;
+ int x, y, w, h ;
+ GRAPH * bmp1 = NULL, * bmp2 = NULL ;
+
+ bbox1 = *bbox3;
+
+ bmp2 = instance_graph( proc2 ) ; if ( !bmp2 ) return 0 ;
+ instance_get_bbox( proc2, bmp2, &bbox2 );
+
+ region_union( &bbox1, &bbox2 ) ;
+ if ( region_is_empty( &bbox1 ) ) return 0 ;
+
+ // Solo si las regiones de ambos bbox se superponen
+
+ w = bbox1.x2 - bbox1.x + 1 ;
+ h = bbox1.y2 - bbox1.y + 1 ;
+ bbox2.x = bbox2.y = 0 ;
+ bbox2.x2 = w - 1 ;
+ bbox2.y2 = h - 1 ;
+
+ bmp1 = bitmap_new( 0, w, h, sys_pixel_format->depth ) ;
+ if ( !bmp1 ) return 0;
+
+ bmp2 = bitmap_new( 0, w, h, sys_pixel_format->depth ) ;
+ if ( !bmp2 )
+ {
+ bitmap_destroy( bmp1 ) ;
+ return 0;
+ }
+
+ memset( bmp1->data, 0, bmp1->pitch * h ) ;
+ memset( bmp2->data, 0, bmp2->pitch * h ) ;
+
+ x = LOCINT32( mod_grproc, proc1, COORDX ) ;
+ y = LOCINT32( mod_grproc, proc1, COORDY ) ;
+ RESOLXY( mod_grproc, proc1, x, y );
+
+ x -= bbox1.x ;
+ y -= bbox1.y ;
+ draw_at( bmp1, x, y, &bbox2, proc1 ) ;
+
+ x = LOCINT32( mod_grproc, proc2, COORDX ) ;
+ y = LOCINT32( mod_grproc, proc2, COORDY ) ;
+ RESOLXY( mod_grproc, proc2, x, y );
+
+ x -= bbox1.x ;
+ y -= bbox1.y ;
+ draw_at( bmp2, x, y, &bbox2, proc2 ) ;
+
+ if ( sys_pixel_format->depth == 32 )
+ {
+ uint32_t * ptr1 = ( uint32_t * ) bmp1->data ;
+ uint32_t * ptr2 = ( uint32_t * ) bmp2->data ;
+
+ uint8_t * _ptr1 = ( uint8_t * ) ptr1 ;
+ uint8_t * _ptr2 = ( uint8_t * ) ptr2 ;
+
+ for ( y = 0 ; y < h ; y++ )
+ {
+ for ( x = 0 ; x < w ; x++, ptr1++, ptr2++ )
+ {
+ if ( *ptr1 && *ptr2 )
+ {
+ bitmap_destroy( bmp1 ) ;
+ bitmap_destroy( bmp2 ) ;
+ return 1;
+ }
+ }
+ ptr1 = ( uint32_t * )( _ptr1 += bmp1->pitch );
+ ptr2 = ( uint32_t * )( _ptr2 += bmp2->pitch );
+ }
+ }
+ else
+ {
+ if ( sys_pixel_format->depth == 16 )
+ {
+ uint16_t * ptr1 = ( uint16_t * ) bmp1->data ;
+ uint16_t * ptr2 = ( uint16_t * ) bmp2->data ;
+
+ uint8_t * _ptr1 = ( uint8_t * ) ptr1 ;
+ uint8_t * _ptr2 = ( uint8_t * ) ptr2 ;
+
+ for ( y = 0 ; y < h ; y++ )
+ {
+ for ( x = 0 ; x < w ; x++, ptr1++, ptr2++ )
+ {
+ if ( *ptr1 && *ptr2 )
+ {
+ bitmap_destroy( bmp1 ) ;
+ bitmap_destroy( bmp2 ) ;
+ return 1;
+ }
+ }
+ ptr1 = ( uint16_t * )( _ptr1 += bmp1->pitch );
+ ptr2 = ( uint16_t * )( _ptr2 += bmp2->pitch );
+ }
+ }
+ else
+ {
+ uint8_t * ptr1 = ( uint8_t * )bmp1->data ;
+ uint8_t * ptr2 = ( uint8_t * )bmp2->data ;
+
+ uint8_t * _ptr1 = ptr1 ;
+ uint8_t * _ptr2 = ptr2 ;
+
+ for ( y = 0 ; y < h ; y++ )
+ {
+ for ( x = 0 ; x < w ; x++, ptr1++, ptr2++ )
+ {
+ if ( *ptr1 && *ptr2 )
+ {
+ bitmap_destroy( bmp1 ) ;
+ bitmap_destroy( bmp2 ) ;
+ return 1;
+ }
+ }
+ ptr1 = _ptr1 += bmp1->pitch;
+ ptr2 = _ptr2 += bmp2->pitch;
+ }
+ }
+ }
+
+ bitmap_destroy( bmp1 ) ;
+ bitmap_destroy( bmp2 ) ;
+ return 0;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int __collision( INSTANCE * my, int id, int colltype )
+{
+ INSTANCE * ptr, ** ctx ;
+ int status, p ;
+ int ( *colfunc )( INSTANCE *, REGION *, INSTANCE * );
+ REGION bbox1 ;
+ GRAPH * bmp1 ;
+
+ if ( id == -1 ) return ( check_collision_with_mouse( my, colltype ) ) ? 1 : 0 ;
+
+ switch ( colltype )
+ {
+ case COLLISION_NORMAL:
+ colfunc = check_collision;
+ break;
+
+ case COLLISION_BOX:
+ colfunc = check_collision_box;
+ break;
+
+ case COLLISION_CIRCLE:
+ colfunc = check_collision_circle;
+ break;
+
+ default:
+ return 0;
+ }
+
+ bmp1 = instance_graph( my ) ; if ( !bmp1 ) return 0 ;
+ instance_get_bbox( my, bmp1, &bbox1 );
+
+ int ctype = LOCDWORD( mod_grproc, my, CTYPE );
+
+ /* Checks only for a single instance */
+ if ( id >= FIRST_INSTANCE_ID ) return ( ( ( ptr = instance_get( id ) ) && ctype == LOCDWORD( mod_grproc, ptr, CTYPE ) ) ? colfunc( my, &bbox1, ptr ) : 0 ) ;
+
+ /* we must use full list of instances or get types from it */
+ ptr = first_instance ;
+
+ if ( !id )
+ {
+ LOCDWORD( mod_grproc, my, GRPROC_TYPE_SCAN ) = 0 ;
+ if ( ( p = LOCDWORD( mod_grproc, my, GRPROC_ID_SCAN ) ) )
+ {
+ ptr = instance_get( p ) ;
+ if ( ptr ) ptr = ptr->next ;
+ }
+
+ while ( ptr )
+ {
+ if ( ptr != my &&
+ ctype == LOCDWORD( mod_grproc, ptr, CTYPE ) &&
+ (
+ ( status = ( LOCDWORD( mod_grproc, ptr, STATUS ) & ~STATUS_WAITING_MASK ) ) == STATUS_RUNNING ||
+ status == STATUS_FROZEN
+ ) && colfunc( my, &bbox1, ptr )
+ )
+ {
+ LOCDWORD( mod_grproc, my, GRPROC_ID_SCAN ) = LOCDWORD( mod_grproc, ptr, PROCESS_ID ) ;
+ return LOCDWORD( mod_grproc, ptr, PROCESS_ID ) ;
+ }
+ ptr = ptr->next ;
+ }
+ return 0 ;
+ }
+
+ LOCDWORD( mod_grproc, my, GRPROC_ID_SCAN ) = 0 ;
+ /* Check if already in scan by type and we reach limit */
+ ctx = ( INSTANCE ** ) LOCADDR( mod_grproc, my, GRPROC_CONTEXT );
+ if ( LOCDWORD( mod_grproc, my, GRPROC_TYPE_SCAN ) != id ) /* Check if type change from last call */
+ {
+ *ctx = NULL;
+ LOCDWORD( mod_grproc, my, GRPROC_TYPE_SCAN ) = id;
+ }
+
+ while ( ( ptr = instance_get_by_type( id, ctx ) ) )
+ {
+ if ( ptr != my &&
+ ctype == LOCDWORD( mod_grproc, ptr, CTYPE ) &&
+ (
+ ( status = ( LOCDWORD( mod_grproc, ptr, STATUS ) & ~STATUS_WAITING_MASK ) ) == STATUS_RUNNING ||
+ status == STATUS_FROZEN
+ ) &&
+ colfunc( my, &bbox1, ptr )
+ )
+ {
+ return LOCDWORD( mod_grproc, ptr, PROCESS_ID ) ;
+ }
+ }
+
+ return 0 ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_collision( INSTANCE * my, int * params )
+{
+ return __collision( my, params[ 0 ], COLLISION_NORMAL );
+}
+
+/* --------------------------------------------------------------------------- */
+
+static int grproc_collision_box( INSTANCE * my, int * params )
+{
+ return __collision( my, params[ 0 ], COLLISION_BOX );
+}
+
+/* ----------------------------------------------------------------- */
+
+static int grproc_collision_circle( INSTANCE * my, int * params )
+{
+ return __collision( my, params[ 0 ], COLLISION_CIRCLE );
+}
+
+/* ----------------------------------------------------------------- */
+
+void __bgdexport( mod_grproc, process_exec_hook )( INSTANCE * r )
+{
+ LOCDWORD( mod_grproc, r, GRPROC_ID_SCAN ) = 0;
+ LOCDWORD( mod_grproc, r, GRPROC_TYPE_SCAN ) = 0;
+ LOCDWORD( mod_grproc, r, GRPROC_CONTEXT ) = 0;
+}
+
+/* ----------------------------------------------------------------- */
+/* exports */
+/* ----------------------------------------------------------------- */
+
+#include "mod_grproc_exports.h"
+
+/* ----------------------------------------------------------------- */
diff --git a/modules/mod_grproc/mod_grproc_exports.h b/modules/mod_grproc/mod_grproc_exports.h
new file mode 100644
index 0000000..1321e56
--- /dev/null
+++ b/modules/mod_grproc/mod_grproc_exports.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd)
+ * Copyright © 2002-2006 Fenix Team (Fenix)
+ * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
+ *
+ * This file is part of Bennu - Game Development
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+#ifndef __MOD_GRPROC_EXPORTS
+#define __MOD_GRPROC_EXPORTS
+
+/* --------------------------------------------------------------------------- */
+
+#include "bgddl.h"
+
+/* --------------------------------------------------------------------------- */
+
+#if defined(__BGDC__) || !defined(__STATIC__)
+
+/* ----------------------------------------------------------------- */
+/* Locals */
+
+char * __bgdexport( mod_grproc, locals_def ) =
+ "STRUCT _mod_grproc_reserved\n"
+ "int type_scan;\n"
+ "int id_scan;\n"
+ "int context;\n"
+ "END\n";
+
+#endif
+
+/* ---------------------------------------------------------------------- */
+
+DLSYSFUNCS __bgdexport( mod_grproc, functions_exports )[] =
+{
+ FUNC( "ADVANCE" , "I" , TYPE_INT , grproc_advance ),
+ FUNC( "XADVANCE" , "II" , TYPE_INT , grproc_xadvance ),
+
+ FUNC( "GET_ANGLE" , "I" , TYPE_INT , grproc_get_angle ),
+ FUNC( "GET_DIST" , "I" , TYPE_INT , grproc_get_dist ),
+ FUNC( "COLLISION" , "I" , TYPE_INT , grproc_collision ),
+ FUNC( "COLLISION_BOX" , "I" , TYPE_INT , grproc_collision_box ),
+ FUNC( "COLLISION_CIRCLE" , "I" , TYPE_INT , grproc_collision_circle ),
+
+ FUNC( "GET_REAL_POINT" , "IPP" , TYPE_INT , grproc_get_real_point ),
+
+ FUNC( NULL , 0 , 0 , 0 )
+};
+
+/* --------------------------------------------------------------------------- */
+
+char * __bgdexport( mod_grproc, modules_dependency )[] =
+{
+ "libmouse",
+ "libgrbase",
+ "libvideo",
+ "librender",
+ "libblit",
+ NULL
+};
+
+/* --------------------------------------------------------------------------- */
+
+#endif